Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PE-4751: update icons #84

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/fonts/ArDriveIcons.ttf
Binary file not shown.
56 changes: 42 additions & 14 deletions assets/fonts/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -636,20 +636,6 @@
"minus-rectangle"
]
},
{
"uid": "641cee69d0ab8673d1185dfd2a425995",
"css": "move",
"code": 59439,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M664 83H667 668Q684 83 696 95L905 304Q917 316 917 333V792Q917 825 900 854T855 900 792 917H563Q545 917 533 905T521 875 533 845 563 833H792Q809 833 821 821T833 792V375H708Q674 375 650 350T625 292V167H375Q358 167 346 179T334 208V542Q334 559 322 571T292 583 263 571 250 542V208Q250 174 267 145T313 100 375 83H664ZM775 292L708 225V292H775ZM304 946Q316 958 334 958H333Q348 958 362 946L487 821Q493 815 496 807T499 791H500L499 787Q498 779 496 775 493 767 488 762L363 637Q350 624 333 624T304 636 291 666 304 696L358 749H167Q149 749 137 761T125 791 137 820 167 833H358L304 887Q291 899 291 917T304 946Z",
"width": 1000
},
"search": [
"move"
]
},
{
"uid": "55cb30fbbeea922b15cc16da5845cc29",
"css": "music",
Expand Down Expand Up @@ -901,6 +887,48 @@
"search": [
"detach"
]
},
{
"uid": "397bbab0a396d03a856d2809d4d67558",
"css": "download_2",
"code": 59456,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M411.9 533C411.8 531.8 411.8 530.6 411.8 529.4V58.8C411.8 26.3 438.1 0 470.6 0S529.4 26.3 529.4 58.8V529.4C529.4 529.6 529.4 529.7 529.4 529.9L670.7 423.5C696.7 404 733.5 409.3 753 435.3S767.2 498.2 741.3 517.6L506 694.1C495.8 701.7 483.4 705.8 470.7 705.8 458.5 705.9 446.6 702.2 436.6 695.3L201.3 529.4C174.9 510.7 168.6 474.1 187.2 447.6 205.8 421 242.5 414.6 269.1 433.2L269.5 433.5 411.9 533ZM0 823.5V941.2C0 973.7 26.3 1000 58.8 1000H882.3C914.8 1000 941.2 973.7 941.2 941.2V823.5C941.2 791 914.8 764.7 882.3 764.7S823.5 791.1 823.5 823.5V882.3H117.7V823.5C117.7 791 91.3 764.7 58.8 764.7S0 791.1 0 823.5Z",
"width": 938
},
"search": [
"style-2"
]
},
{
"uid": "71ab18efd92fae50885b1f20b596ac54",
"css": "manifest",
"code": 59457,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M550 0C632.8 0 700 67.2 700 150V250C700 332.8 632.8 400 550 400V450H700C779.9 450 845.2 512.4 849.8 591.2L850 600C932.8 600 1000 667.2 1000 750V850C1000 932.8 932.8 1000 850 1000H750C667.2 1000 600 932.8 600 850V750C600 667.2 667.2 600 750 600 750 574.3 730.7 553.2 705.8 550.3L300 550C274.3 550 253.2 569.3 250.3 594.2L250 600C332.8 600 400 667.2 400 750V850C400 932.8 332.8 1000 250 1000H150C67.2 1000 0 932.8 0 850V750C0 667.2 67.2 600 150 600 150 520.1 212.4 454.8 291.2 450.3L300 450H450V400C367.2 400 300 332.8 300 250V150C300 67.2 367.2 0 450 0H550ZM550 300C577.6 300 600 277.6 600 250V150C600 122.4 577.6 100 550 100H450C422.4 100 400 122.4 400 150V250C400 277.6 422.4 300 450 300H550ZM750 700C722.4 700 700 722.4 700 750V850C700 877.6 722.4 900 750 900H850C877.6 900 900 877.6 900 850V750C900 722.4 877.6 700 850 700H750ZM250 700H150C122.4 700 100 722.4 100 750V850C100 877.6 122.4 900 150 900H250C277.6 900 300 877.6 300 850V750C300 722.4 277.6 700 250 700Z",
"width": 1000
},
"search": [
"style"
]
},
{
"uid": "641cee69d0ab8673d1185dfd2a425995",
"css": "move",
"code": 59439,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M664 83H667 668Q684 83 696 95L905 304Q917 316 917 333V792Q917 825 900 854T855 900 792 917H563Q545 917 533 905T521 875 533 845 563 833H792Q809 833 821 821T833 792V375H708Q674 375 650 350T625 292V167H375Q358 167 346 179T334 208V542Q334 559 322 571T292 583 263 571 250 542V208Q250 174 267 145T313 100 375 83H664ZM775 292L708 225V292H775ZM304 946Q316 958 334 958H333Q348 958 362 946L487 821Q493 815 496 807T499 791H500L499 787Q498 779 496 775 493 767 488 762L363 637Q350 624 333 624T304 636 291 666 304 696L358 749H167Q149 749 137 761T125 791 137 820 167 833H358L304 887Q291 899 291 917T304 946Z",
"width": 1000
},
"search": [
"move"
]
}
]
}
4 changes: 4 additions & 0 deletions lib/src/styles/icons/ar_drive_icons_icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ class ArDriveIconsData {
IconData(0xe83d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData detach =
IconData(0xe83f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData download_2 =
IconData(0xe840, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData manifest =
IconData(0xe841, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData pin_circle =
IconData(0xe844, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData pin_no_circle =
Expand Down
12 changes: 12 additions & 0 deletions lib/src/styles/icons/icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -433,4 +433,16 @@ class ArDriveIcons {
size: size,
color: color,
);

static ArDriveIcon download2({double? size, Color? color}) => ArDriveIcon(
icon: ArDriveIconsData.download_2,
size: size,
color: color,
);

static ArDriveIcon manifest({double? size, Color? color}) => ArDriveIcon(
icon: ArDriveIconsData.manifest,
size: size,
color: color,
);
}
112 changes: 112 additions & 0 deletions storybook/lib/src/icons.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import 'package:ardrive_ui/ardrive_ui.dart';
import 'package:flutter/material.dart';
import 'package:storybook/src/ardrive_app_base.dart';
import 'package:widgetbook/widgetbook.dart';

WidgetbookCategory icons() {
return WidgetbookCategory(
name: 'Icons',
children: [
WidgetbookComponent(
name: 'Icons',
useCases: [
WidgetbookUseCase(
name: 'Icons',
builder: (context) {
return ArDriveStorybookAppBase(builder: (context) {
return ListView.builder(
itemCount: _options.length,
itemBuilder: (context, index) {
return ListTile(
leading: _options[index].icon,
title: Text(_options[index].name,
style: ArDriveTypography.body.buttonNormalBold()),
);
},
);
});
},
),
],
),
],
);
}

// TODO: we may want to generate this list from the icons.dart file
List<IconOption> _options = [
IconOption(icon: ArDriveIcons.iconAddDrive(), name: 'iconAddDrive'),
IconOption(icon: ArDriveIcons.iconNewFolder1(), name: 'iconNewFolder1'),
IconOption(icon: ArDriveIcons.iconUploadFolder1(), name: 'iconUploadFolder1'),
IconOption(icon: ArDriveIcons.iconUploadFiles(), name: 'iconUploadFiles'),
IconOption(
icon: ArDriveIcons.iconCreateSnapshot(), name: 'iconCreateSnapshot'),
IconOption(icon: ArDriveIcons.iconAttachDrive(), name: 'iconAttachDrive'),
IconOption(icon: ArDriveIcons.arconnectIcon1(), name: 'arconnectIcon1'),
IconOption(icon: ArDriveIcons.addDrive(), name: 'addDrive'),
IconOption(icon: ArDriveIcons.arrowLeftFilled(), name: 'arrowLeftFilled'),
IconOption(icon: ArDriveIcons.arrowLeftOutline(), name: 'arrowLeftOutline'),
IconOption(icon: ArDriveIcons.arrowLeft(), name: 'arrowLeft'),
IconOption(icon: ArDriveIcons.arrowRightFilled(), name: 'arrowRightFilled'),
IconOption(icon: ArDriveIcons.arrowRightOutline(), name: 'arrowRightOutline'),
IconOption(icon: ArDriveIcons.bullertList(), name: 'bullertList'),
IconOption(icon: ArDriveIcons.camera1(), name: 'camera1'),
IconOption(icon: ArDriveIcons.camera2(), name: 'camera2'),
IconOption(icon: ArDriveIcons.carretDown(), name: 'carretDown'),
IconOption(icon: ArDriveIcons.carretLeft(), name: 'carretLeft'),
IconOption(icon: ArDriveIcons.carretRight(), name: 'carretRight'),
IconOption(icon: ArDriveIcons.carretUp(), name: 'carretUp'),
IconOption(icon: ArDriveIcons.checkCirle(), name: 'checkCirle'),
IconOption(icon: ArDriveIcons.checkmark(), name: 'checkmark'),
IconOption(icon: ArDriveIcons.closeCircle(), name: 'closeCircle'),
IconOption(icon: ArDriveIcons.closeRectangle(), name: 'closeRectangle'),
IconOption(icon: ArDriveIcons.copy(), name: 'copy'),
IconOption(icon: ArDriveIcons.dots(), name: 'dots'),
IconOption(icon: ArDriveIcons.download(), name: 'download'),
IconOption(icon: ArDriveIcons.editFilled(), name: 'editFilled'),
IconOption(icon: ArDriveIcons.edit(), name: 'edit'),
IconOption(icon: ArDriveIcons.fileX(), name: 'fileX'),
IconOption(icon: ArDriveIcons.file(), name: 'file'),
IconOption(icon: ArDriveIcons.fileOutlined(), name: 'fileOutlined'),
IconOption(icon: ArDriveIcons.folderFilled(), name: 'folderFilled'),
IconOption(icon: ArDriveIcons.folderOutline(), name: 'folderOutline'),
IconOption(icon: ArDriveIcons.upload(), name: 'upload'),
IconOption(icon: ArDriveIcons.triangle(), name: 'triangle'),
IconOption(icon: ArDriveIcons.menu(), name: 'menu'),
IconOption(icon: ArDriveIcons.refresh(), name: 'refresh'),
IconOption(icon: ArDriveIcons.x(), name: 'x'),
IconOption(icon: ArDriveIcons.newWindow(), name: 'newWindow'),
IconOption(icon: ArDriveIcons.share(), name: 'share'),
IconOption(icon: ArDriveIcons.move(), name: 'move'),
IconOption(icon: ArDriveIcons.plus(), name: 'plus'),
IconOption(icon: ArDriveIcons.tournament(), name: 'tournament'),
IconOption(icon: ArDriveIcons.logout(), name: 'logout'),
IconOption(icon: ArDriveIcons.user(), name: 'user'),
IconOption(icon: ArDriveIcons.zip(), name: 'zip'),
IconOption(icon: ArDriveIcons.question(), name: 'question'),
IconOption(icon: ArDriveIcons.image(), name: 'image'),
IconOption(icon: ArDriveIcons.video(), name: 'video'),
IconOption(icon: ArDriveIcons.music(), name: 'music'),
IconOption(icon: ArDriveIcons.info(), name: 'info'),
IconOption(icon: ArDriveIcons.kebabMenu(), name: 'kebabMenu'),
IconOption(icon: ArDriveIcons.eyeClosed(), name: 'eyeClosed'),
IconOption(icon: ArDriveIcons.eyeOpen(), name: 'eyeOpen'),
IconOption(icon: ArDriveIcons.keypad(), name: 'keypad'),
IconOption(icon: ArDriveIcons.pinNoCircle(), name: 'pinNoCircle'),
IconOption(icon: ArDriveIcons.pinWithCircle(), name: 'pinWithCircle'),
IconOption(icon: ArDriveIcons.arrowDownload(), name: 'arrowDownload'),
IconOption(icon: ArDriveIcons.cloudSync(), name: 'cloudSync'),
IconOption(icon: ArDriveIcons.detach(), name: 'detach'),
IconOption(icon: ArDriveIcons.download2(), name: 'download2'),
IconOption(icon: ArDriveIcons.manifest(), name: 'manifest'),
];

class IconOption {
final ArDriveIcon icon;
final String name;

const IconOption({
required this.icon,
required this.name,
});
}
2 changes: 2 additions & 0 deletions storybook/lib/src/story_book.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:storybook/src/colors.dart';
import 'package:storybook/src/drop_area.dart';
import 'package:storybook/src/fab.dart';
import 'package:storybook/src/feedback_message.dart';
import 'package:storybook/src/icons.dart';
import 'package:storybook/src/image.dart';
import 'package:storybook/src/modals.dart';
import 'package:storybook/src/overlay.dart';
Expand Down Expand Up @@ -59,6 +60,7 @@ class StoryBook extends StatelessWidget {
fab(),
clickArea(),
feedbackMessage(),
icons(),
],
)
],
Expand Down
6 changes: 3 additions & 3 deletions storybook/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ packages:
dependency: transitive
description:
path: "."
ref: PE-4896-drag-and-drop-applies-wrong-content-type-to-files
resolved-ref: "19616c9d8490db3a09b23292f36ee6480b7b7dc3"
ref: "v1.4.1"
resolved-ref: "441c37764a1b120057ec2cd1e6eecb47bb35a37a"
url: "https://github.com/ar-io/ardrive_io.git"
source: git
version: "1.4.1"
Expand All @@ -16,7 +16,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.13.1"
version: "1.14.0"
args:
dependency: transitive
description:
Expand Down