aural-ui 4.0.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
- package/dist/components/avatar/Avatar.stories.tsx +219 -235
- package/dist/components/badge/Badge.stories.tsx +379 -116
- package/dist/components/banner/Banner.stories.tsx +445 -391
- package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
- package/dist/components/button/Button.stories.tsx +585 -230
- package/dist/components/card/Card.stories.tsx +619 -301
- package/dist/components/char-count/CharCount.stories.tsx +350 -248
- package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
- package/dist/components/chip/Chip.stories.tsx +362 -168
- package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -636
- package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
- package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
- package/dist/components/command/Command.stories.tsx +530 -867
- package/dist/components/dialog/Dialog.stories.tsx +501 -950
- package/dist/components/divider/Divider.stories.tsx +264 -527
- package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
- package/dist/components/drawer/Drawer.stories.tsx +659 -1023
- package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
- package/dist/components/form/Form.stories.tsx +560 -274
- package/dist/components/helper-text/HelperText.stories.tsx +199 -200
- package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
- package/dist/components/icon-button/IconButton.stories.tsx +837 -194
- package/dist/components/if-else/if-else.stories.tsx +370 -83
- package/dist/components/input/Input.stories.tsx +436 -368
- package/dist/components/label/Label.stories.tsx +156 -154
- package/dist/components/list/List.stories.tsx +484 -835
- package/dist/components/marquee/Marquee.stories.tsx +356 -712
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
- package/dist/components/overlay/Overlay.stories.tsx +452 -824
- package/dist/components/pagination/Pagination.stories.tsx +721 -210
- package/dist/components/popover/Popover.stories.tsx +481 -896
- package/dist/components/radio/Radio.stories.tsx +432 -124
- package/dist/components/resizable/Resizable.stories.tsx +495 -799
- package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
- package/dist/components/search/Search.stories.tsx +312 -595
- package/dist/components/select/Select.stories.tsx +684 -789
- package/dist/components/sheet/Sheet.stories.tsx +671 -950
- package/dist/components/skelton/Skelton.stories.tsx +230 -764
- package/dist/components/slider/Slider.stories.tsx +383 -760
- package/dist/components/stepper/Stepper.stories.tsx +371 -514
- package/dist/components/switch/Switch.stories.tsx +461 -208
- package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
- package/dist/components/table/Table.stories.tsx +770 -916
- package/dist/components/tabs/Tabs.stories.tsx +458 -1455
- package/dist/components/tag/Tag.stories.tsx +714 -542
- package/dist/components/textarea/TextArea.stories.tsx +621 -562
- package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
- package/dist/components/toast/Toast.stories.tsx +452 -1339
- package/dist/components/toggle/Toggle.stories.tsx +488 -931
- package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
- package/dist/components/typography/Typography.stories.tsx +406 -89
- package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
- package/dist/icons/Icons.stories.tsx +0 -12
- package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
- package/dist/icons/all-icons.tsx +37 -16
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
- package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
- package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
- package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
- package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
- package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
- package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
- package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
- package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
- package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
- package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
- package/dist/index.cjs +90 -90
- package/dist/index.js +90 -90
- package/package.json +8 -3
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
3
|
|
|
4
|
+
import { CameraIcon } from "src/ui/icons/camera-icon"
|
|
5
|
+
import { ImageAvatarSparkleIcon } from "src/ui/icons/image-avatar-sparkle-icon"
|
|
6
|
+
import { VideoPlaylistIcon } from "src/ui/icons/video-play-list-icon"
|
|
7
|
+
import { VoicePlayingIcon } from "src/ui/icons/voice-playing-icon"
|
|
8
|
+
import {
|
|
9
|
+
IconColorVariations,
|
|
10
|
+
IconDefaultCanvas,
|
|
11
|
+
IconPlaygroundCanvas,
|
|
12
|
+
IconSizeVariations,
|
|
13
|
+
IconUsageCanvas,
|
|
14
|
+
IconUsageSection,
|
|
15
|
+
} from "src/ui/story-spec/icons/icon-story-canvas"
|
|
16
|
+
import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
|
|
17
|
+
|
|
4
18
|
import { ImageIcon } from "."
|
|
5
19
|
|
|
6
20
|
const meta: Meta<typeof ImageIcon> = {
|
|
@@ -18,955 +32,71 @@ const meta: Meta<typeof ImageIcon> = {
|
|
|
18
32
|
},
|
|
19
33
|
docs: {
|
|
20
34
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
.docs-story {
|
|
37
|
-
background: transparent ;
|
|
38
|
-
}
|
|
39
|
-
.sbdocs {
|
|
40
|
-
background: transparent ;
|
|
41
|
-
}
|
|
42
|
-
body {
|
|
43
|
-
background: var(--color-fm-surface-primary) ;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: var(--color-fm-surface-primary) ;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent ;
|
|
50
|
-
border: none ;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: var(--color-fm-icon-active) ;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: var(--color-fm-secondary) ;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: var(--color-fm-surface-secondary) ;
|
|
60
|
-
color: var(--color-fm-secondary-500) ;
|
|
61
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: var(--color-fm-surface-secondary) ;
|
|
65
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: var(--color-fm-surface-secondary) ;
|
|
69
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: var(--color-fm-surface-secondary) ;
|
|
73
|
-
color: var(--color-fm-icon-active) ;
|
|
74
|
-
border-bottom: 1px solid var(--color-fm-divider-secondary) ;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: var(--color-fm-secondary) ;
|
|
78
|
-
border-bottom: 1px solid var(--color-fm-divider-tertiary) ;
|
|
79
|
-
}
|
|
80
|
-
@keyframes shimmer {
|
|
81
|
-
0% { transform: translateX(-100%); }
|
|
82
|
-
100% { transform: translateX(100%); }
|
|
83
|
-
}
|
|
84
|
-
.animate-shimmer {
|
|
85
|
-
animation: shimmer 2s ease-in-out infinite;
|
|
86
|
-
}
|
|
87
|
-
`}
|
|
88
|
-
</style>
|
|
89
|
-
|
|
90
|
-
<div className="bg-fm-surface-primary min-h-screen">
|
|
91
|
-
{/* Header */}
|
|
92
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
|
|
93
|
-
<div className="from-fm-icon-info/10 to-fm-icon-positive/10 absolute inset-0 bg-linear-to-r via-transparent" />
|
|
94
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
95
|
-
<div className="!space-y-6 text-center">
|
|
96
|
-
<div className="border-fm-icon-info/30 from-fm-icon-info/20 to-fm-icon-positive/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
|
|
97
|
-
<ImageIcon className="text-fm-icon-info h-12 w-12" />
|
|
98
|
-
</div>
|
|
99
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
100
|
-
ImageIcon
|
|
101
|
-
</h1>
|
|
102
|
-
<p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
|
|
103
|
-
A versatile image icon for media representations,
|
|
104
|
-
placeholders, and visual content indicators. Features a
|
|
105
|
-
clean design with a mountain landscape silhouette and a sun
|
|
106
|
-
element. Built with accessibility in mind using Radix UI's
|
|
107
|
-
AccessibleIcon wrapper.
|
|
108
|
-
</p>
|
|
109
|
-
|
|
110
|
-
{/* Stats */}
|
|
111
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
112
|
-
<div className="text-center">
|
|
113
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
114
|
-
Visual
|
|
115
|
-
</div>
|
|
116
|
-
<div className="text-fm-tertiary text-sm">
|
|
117
|
-
Media representation
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
121
|
-
<div className="text-center">
|
|
122
|
-
<div className="text-fm-icon-positive text-3xl font-bold">
|
|
123
|
-
Flexible
|
|
124
|
-
</div>
|
|
125
|
-
<div className="text-fm-tertiary text-sm">
|
|
126
|
-
Gallery & uploads
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
130
|
-
<div className="text-center">
|
|
131
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
132
|
-
Intuitive
|
|
133
|
-
</div>
|
|
134
|
-
<div className="text-fm-tertiary text-sm">
|
|
135
|
-
Universal recognition
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
|
|
143
|
-
{/* Content */}
|
|
144
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
145
|
-
{/* Quick Usage */}
|
|
146
|
-
<div className="!space-y-8">
|
|
147
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
148
|
-
Quick Start
|
|
149
|
-
</h2>
|
|
150
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
151
|
-
<div className="!space-y-4">
|
|
152
|
-
<h3 className="text-fm-icon-info! text-xl font-semibold">
|
|
153
|
-
Basic Usage
|
|
154
|
-
</h3>
|
|
155
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
156
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
157
|
-
{`import { ImageIcon } from "@icons/image-icon"
|
|
158
|
-
|
|
159
|
-
function MediaUpload() {
|
|
35
|
+
<AuralIconDocsPage
|
|
36
|
+
accentToken="info"
|
|
37
|
+
features={[
|
|
38
|
+
{
|
|
39
|
+
title: "Image Placeholder",
|
|
40
|
+
description: "Cover art or media slot",
|
|
41
|
+
},
|
|
42
|
+
{ title: "Media Upload", description: "Image input trigger" },
|
|
43
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
44
|
+
]}
|
|
45
|
+
quickStart={{
|
|
46
|
+
codeExample: `import { ImageIcon } from "src/ui/icons/image-icon"
|
|
47
|
+
|
|
48
|
+
function CoverPlaceholder() {
|
|
160
49
|
return (
|
|
161
|
-
<div className="flex items-center
|
|
162
|
-
|
|
163
|
-
<span>Upload Images</span>
|
|
50
|
+
<div className="flex items-center justify-center h-24 w-24 bg-fm-surface-secondary rounded-xl">
|
|
51
|
+
<ImageIcon className="h-8 w-8 text-fm-icon-inactive" />
|
|
164
52
|
</div>
|
|
165
53
|
)
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
<div className="!space-y-4">
|
|
172
|
-
<h3 className="text-fm-icon-info! text-xl font-semibold">
|
|
173
|
-
Live Preview
|
|
174
|
-
</h3>
|
|
175
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
|
|
176
|
-
<div className="border-fm-icon-info/20 bg-fm-icon-info/10 flex items-center gap-3 rounded-lg border px-4 py-3">
|
|
177
|
-
<ImageIcon className="text-fm-icon-info h-6 w-6" />
|
|
178
|
-
<span className="text-fm-icon-active">
|
|
179
|
-
Upload Images
|
|
180
|
-
</span>
|
|
181
|
-
</div>
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
54
|
+
}`,
|
|
55
|
+
livePreview: (
|
|
56
|
+
<div className="bg-fm-surface-secondary flex h-16 w-16 items-center justify-center rounded-xl">
|
|
57
|
+
<ImageIcon className="text-fm-icon-inactive h-8 w-8" />
|
|
185
58
|
</div>
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
</thead>
|
|
216
|
-
<tbody>
|
|
217
|
-
{" "}
|
|
218
|
-
<tr className="bg-fm-surface-secondary!">
|
|
219
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
220
|
-
withAccessibility
|
|
221
|
-
</td>
|
|
222
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
223
|
-
boolean
|
|
224
|
-
</td>
|
|
225
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
226
|
-
true
|
|
227
|
-
</td>
|
|
228
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
229
|
-
Whether to wrap the icon with accessibility feature
|
|
230
|
-
</td>
|
|
231
|
-
</tr>
|
|
232
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
233
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
234
|
-
height
|
|
235
|
-
</td>
|
|
236
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
237
|
-
number | string
|
|
238
|
-
</td>
|
|
239
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
240
|
-
24
|
|
241
|
-
</td>
|
|
242
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
243
|
-
Height of the icon in pixels
|
|
244
|
-
</td>
|
|
245
|
-
</tr>
|
|
246
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
247
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
248
|
-
stroke
|
|
249
|
-
</td>
|
|
250
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
251
|
-
string
|
|
252
|
-
</td>
|
|
253
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
254
|
-
currentColor
|
|
255
|
-
</td>
|
|
256
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
257
|
-
Stroke color of the image outline
|
|
258
|
-
</td>
|
|
259
|
-
</tr>
|
|
260
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
261
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
262
|
-
strokeWidth
|
|
263
|
-
</td>
|
|
264
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
265
|
-
string | number
|
|
266
|
-
</td>
|
|
267
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
268
|
-
1.5
|
|
269
|
-
</td>
|
|
270
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
271
|
-
Stroke width of the outline
|
|
272
|
-
</td>
|
|
273
|
-
</tr>
|
|
274
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
275
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
276
|
-
fill
|
|
277
|
-
</td>
|
|
278
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
279
|
-
string
|
|
280
|
-
</td>
|
|
281
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
282
|
-
none
|
|
283
|
-
</td>
|
|
284
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
285
|
-
Fill color of the icon
|
|
286
|
-
</td>
|
|
287
|
-
</tr>
|
|
288
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
289
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
290
|
-
className
|
|
291
|
-
</td>
|
|
292
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
293
|
-
string
|
|
294
|
-
</td>
|
|
295
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
296
|
-
-
|
|
297
|
-
</td>
|
|
298
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
299
|
-
CSS classes for styling (use for overrides)
|
|
300
|
-
</td>
|
|
301
|
-
</tr>
|
|
302
|
-
<tr className="bg-fm-surface-secondary!">
|
|
303
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
304
|
-
...svgProps
|
|
305
|
-
</td>
|
|
306
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
307
|
-
SVGProps
|
|
308
|
-
</td>
|
|
309
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
310
|
-
-
|
|
311
|
-
</td>
|
|
312
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
313
|
-
All standard SVG element props
|
|
314
|
-
</td>
|
|
315
|
-
</tr>
|
|
316
|
-
</tbody>
|
|
317
|
-
</table>
|
|
318
|
-
</div>
|
|
319
|
-
</div>
|
|
320
|
-
|
|
321
|
-
{/* Size Variations */}
|
|
322
|
-
<div className="!space-y-8">
|
|
323
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
324
|
-
Size Variations
|
|
325
|
-
</h2>
|
|
326
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
|
|
327
|
-
<div className="!space-y-6">
|
|
328
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
329
|
-
<div className="!space-y-4">
|
|
330
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
331
|
-
Standard Sizes
|
|
332
|
-
</h3>
|
|
333
|
-
<div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
|
|
334
|
-
<div className="text-center">
|
|
335
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
|
|
336
|
-
<span className="text-fm-tertiary text-xs">
|
|
337
|
-
12px
|
|
338
|
-
</span>
|
|
339
|
-
</div>
|
|
340
|
-
<div className="text-center">
|
|
341
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
|
|
342
|
-
<span className="text-fm-tertiary text-xs">
|
|
343
|
-
16px
|
|
344
|
-
</span>
|
|
345
|
-
</div>
|
|
346
|
-
<div className="text-center">
|
|
347
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
|
|
348
|
-
<span className="text-fm-tertiary text-xs">
|
|
349
|
-
20px
|
|
350
|
-
</span>
|
|
351
|
-
</div>
|
|
352
|
-
<div className="text-center">
|
|
353
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
|
|
354
|
-
<span className="text-fm-tertiary text-xs">
|
|
355
|
-
24px
|
|
356
|
-
</span>
|
|
357
|
-
</div>
|
|
358
|
-
<div className="text-center">
|
|
359
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
|
|
360
|
-
<span className="text-fm-tertiary text-xs">
|
|
361
|
-
32px
|
|
362
|
-
</span>
|
|
363
|
-
</div>
|
|
364
|
-
<div className="text-center">
|
|
365
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
|
|
366
|
-
<span className="text-fm-tertiary text-xs">
|
|
367
|
-
48px
|
|
368
|
-
</span>
|
|
369
|
-
</div>
|
|
370
|
-
</div>
|
|
371
|
-
</div>
|
|
372
|
-
|
|
373
|
-
<div className="!space-y-4">
|
|
374
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
375
|
-
Code Example
|
|
376
|
-
</h3>
|
|
377
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
378
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
379
|
-
{`// Small (16px)
|
|
380
|
-
<ImageIcon className="h-4 w-4 " />
|
|
381
|
-
|
|
382
|
-
// Medium (24px)
|
|
383
|
-
<ImageIcon className="h-6 w-6 " />
|
|
384
|
-
|
|
385
|
-
// Large (32px)
|
|
386
|
-
<ImageIcon className="h-8 w-8 " />
|
|
387
|
-
|
|
388
|
-
// Custom size for placeholders
|
|
389
|
-
<ImageIcon
|
|
390
|
-
width={64}
|
|
391
|
-
height={64}
|
|
392
|
-
className="text-gray-400 "
|
|
393
|
-
/>`}
|
|
394
|
-
</pre>
|
|
395
|
-
</div>
|
|
396
|
-
</div>
|
|
397
|
-
</div>
|
|
398
|
-
</div>
|
|
399
|
-
</div>
|
|
400
|
-
</div>
|
|
401
|
-
|
|
402
|
-
{/* Color Variations */}
|
|
403
|
-
<div className="!space-y-8">
|
|
404
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
405
|
-
Color Variations
|
|
406
|
-
</h2>
|
|
407
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
408
|
-
<div className="!space-y-4">
|
|
409
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
410
|
-
Semantic Colors
|
|
411
|
-
</h3>
|
|
412
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
413
|
-
<div className="flex items-center gap-4">
|
|
414
|
-
<ImageIcon className="text-fm-icon-info h-6 w-6" />
|
|
415
|
-
<div>
|
|
416
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
417
|
-
Primary
|
|
418
|
-
</div>
|
|
419
|
-
<div className="text-fm-tertiary text-xs">
|
|
420
|
-
text-fm-icon-info
|
|
421
|
-
</div>
|
|
422
|
-
</div>
|
|
423
|
-
</div>
|
|
424
|
-
<div className="flex items-center gap-4">
|
|
425
|
-
<ImageIcon className="text-fm-icon-positive h-6 w-6" />
|
|
426
|
-
<div>
|
|
427
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
428
|
-
Success
|
|
429
|
-
</div>
|
|
430
|
-
<div className="text-fm-tertiary text-xs">
|
|
431
|
-
text-fm-icon-positive
|
|
432
|
-
</div>
|
|
433
|
-
</div>
|
|
434
|
-
</div>
|
|
435
|
-
<div className="flex items-center gap-4">
|
|
436
|
-
<ImageIcon className="text-fm-placeholder h-6 w-6" />
|
|
437
|
-
<div>
|
|
438
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
439
|
-
Muted
|
|
440
|
-
</div>
|
|
441
|
-
<div className="text-fm-tertiary text-xs">
|
|
442
|
-
text-fm-placeholder
|
|
443
|
-
</div>
|
|
444
|
-
</div>
|
|
445
|
-
</div>
|
|
446
|
-
<div className="flex items-center gap-4">
|
|
447
|
-
<ImageIcon className="text-fm-icon-active/30 h-6 w-6" />
|
|
448
|
-
<div>
|
|
449
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
450
|
-
Disabled
|
|
451
|
-
</div>
|
|
452
|
-
<div className="text-fm-tertiary text-xs">
|
|
453
|
-
text-fm-icon-active/30
|
|
454
|
-
</div>
|
|
455
|
-
</div>
|
|
456
|
-
</div>
|
|
457
|
-
</div>
|
|
458
|
-
</div>
|
|
459
|
-
|
|
460
|
-
<div className="!space-y-4">
|
|
461
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
462
|
-
Custom Colors
|
|
463
|
-
</h3>
|
|
464
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
465
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
466
|
-
{`// Using Tailwind classes with
|
|
467
|
-
<ImageIcon className="h-6 w-6 text-blue-400 " />
|
|
468
|
-
<ImageIcon className="h-6 w-6 text-green-500 " />
|
|
469
|
-
|
|
470
|
-
// Using CSS custom properties
|
|
471
|
-
<ImageIcon
|
|
472
|
-
className="h-6 w-6 "
|
|
473
|
-
style={{ color: 'var(--color-primary)' }}
|
|
474
|
-
/>
|
|
475
|
-
|
|
476
|
-
// Direct stroke prop
|
|
477
|
-
<ImageIcon
|
|
478
|
-
width={24}
|
|
479
|
-
height={24}
|
|
480
|
-
stroke="#3b82f6"
|
|
481
|
-
/>`}
|
|
482
|
-
</pre>
|
|
483
|
-
</div>
|
|
484
|
-
</div>
|
|
485
|
-
</div>
|
|
486
|
-
</div>
|
|
487
|
-
|
|
488
|
-
{/* Usage Examples */}
|
|
489
|
-
<div className="!space-y-8">
|
|
490
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
491
|
-
Usage Examples
|
|
492
|
-
</h2>
|
|
493
|
-
|
|
494
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
495
|
-
{/* Image Upload */}
|
|
496
|
-
<div className="!space-y-4">
|
|
497
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
498
|
-
Image Upload
|
|
499
|
-
</h3>
|
|
500
|
-
<div className="!space-y-4">
|
|
501
|
-
<div className="border-fm-divider-primary bg-fm-surface-secondary hover:border-fm-icon-info/50 hover:bg-fm-icon-info/10 relative rounded-lg border-2 border-dashed p-8 text-center transition-colors">
|
|
502
|
-
<ImageIcon className="text-fm-placeholder !mx-auto h-12 w-12" />
|
|
503
|
-
<h4 className="text-fm-icon-active! mt-4 text-lg font-medium">
|
|
504
|
-
Upload Images
|
|
505
|
-
</h4>
|
|
506
|
-
<p className="text-fm-tertiary! mt-2 text-sm">
|
|
507
|
-
Drag and drop your images here, or click to browse
|
|
508
|
-
</p>
|
|
509
|
-
<button className="bg-fm-icon-info/20 text-fm-icon-info hover:bg-fm-icon-info/30 mt-4 rounded-lg px-4 py-2 transition-colors">
|
|
510
|
-
Browse Files
|
|
511
|
-
</button>
|
|
512
|
-
</div>
|
|
513
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
514
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
515
|
-
{`<div className="relative border-2 border-dashed border-white/20 bg-white/5 p-8 text-center rounded-lg hover:border-blue-400/50 hover:bg-blue-500/10 transition-colors">
|
|
516
|
-
<ImageIcon className="mx-auto h-12 w-12 text-white/40 " />
|
|
517
|
-
<h4 className="mt-4 text-lg font-medium text-white">Upload Images</h4>
|
|
518
|
-
<p className="mt-2 text-sm text-white/60">
|
|
519
|
-
Drag and drop your images here, or click to browse
|
|
520
|
-
</p>
|
|
521
|
-
<button className="mt-4 bg-blue-500/20 px-4 py-2 rounded-lg text-blue-300 hover:bg-blue-500/30 transition-colors">
|
|
522
|
-
Browse Files
|
|
523
|
-
</button>
|
|
524
|
-
</div>`}
|
|
525
|
-
</pre>
|
|
526
|
-
</div>
|
|
527
|
-
</div>
|
|
528
|
-
</div>
|
|
529
|
-
|
|
530
|
-
{/* Gallery Placeholder */}
|
|
531
|
-
<div className="!space-y-4">
|
|
532
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
533
|
-
Gallery Placeholder
|
|
534
|
-
</h3>
|
|
535
|
-
<div className="!space-y-4">
|
|
536
|
-
<div className="grid grid-cols-3 gap-4">
|
|
537
|
-
{[1, 2, 3, 4, 5, 6].map((item) => (
|
|
538
|
-
<div
|
|
539
|
-
key={item}
|
|
540
|
-
className="border-fm-divider-secondary bg-fm-surface-secondary hover:bg-fm-surface-secondary flex aspect-square items-center justify-center rounded-lg border p-4 transition-colors"
|
|
541
|
-
>
|
|
542
|
-
<ImageIcon className="text-fm-icon-active/30 h-8 w-8" />
|
|
543
|
-
</div>
|
|
544
|
-
))}
|
|
545
|
-
</div>
|
|
546
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
547
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
548
|
-
{`// Gallery grid with placeholders
|
|
549
|
-
<div className="grid grid-cols-3 gap-4">
|
|
550
|
-
{placeholders.map((item) => (
|
|
551
|
-
<div
|
|
552
|
-
key={item}
|
|
553
|
-
className="aspect-square border border-white/10 bg-white/5 p-4 flex items-center justify-center rounded-lg hover:bg-white/10 transition-colors"
|
|
554
|
-
>
|
|
555
|
-
<ImageIcon className="h-8 w-8 text-white/30 " />
|
|
556
|
-
</div>
|
|
557
|
-
))}
|
|
558
|
-
</div>`}
|
|
559
|
-
</pre>
|
|
560
|
-
</div>
|
|
561
|
-
</div>
|
|
562
|
-
</div>
|
|
563
|
-
|
|
564
|
-
{/* Media Card */}
|
|
565
|
-
<div className="!space-y-4">
|
|
566
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
567
|
-
Media Cards
|
|
568
|
-
</h3>
|
|
569
|
-
<div className="!space-y-4">
|
|
570
|
-
<div className="!space-y-4">
|
|
571
|
-
{[
|
|
572
|
-
"Photo Gallery",
|
|
573
|
-
"Video Collection",
|
|
574
|
-
"Design Assets",
|
|
575
|
-
].map((title, index) => (
|
|
576
|
-
<div
|
|
577
|
-
key={index}
|
|
578
|
-
className="border-fm-divider-secondary bg-fm-surface-secondary hover:bg-fm-surface-secondary flex items-start gap-4 rounded-lg border p-4 transition-colors"
|
|
579
|
-
>
|
|
580
|
-
<div className="bg-fm-icon-info/20 flex h-12 w-12 items-center justify-center rounded-lg">
|
|
581
|
-
<ImageIcon className="text-fm-icon-info h-6 w-6" />
|
|
582
|
-
</div>
|
|
583
|
-
<div className="flex-1">
|
|
584
|
-
<h4 className="text-fm-icon-active! font-medium">
|
|
585
|
-
{title}
|
|
586
|
-
</h4>
|
|
587
|
-
<p className="text-fm-tertiary! text-sm">
|
|
588
|
-
{Math.floor(Math.random() * 50) + 10} items
|
|
589
|
-
</p>
|
|
590
|
-
</div>
|
|
591
|
-
<div className="text-fm-placeholder text-xs">
|
|
592
|
-
{new Date().toLocaleDateString()}
|
|
593
|
-
</div>
|
|
594
|
-
</div>
|
|
595
|
-
))}
|
|
596
|
-
</div>
|
|
597
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
598
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
599
|
-
{`// Media collection card
|
|
600
|
-
<div className="flex items-center gap-4 border border-white/10 bg-white/5 p-4 rounded-lg hover:bg-white/10 transition-colors">
|
|
601
|
-
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
602
|
-
<ImageIcon className="h-6 w-6 text-blue-400 " />
|
|
603
|
-
</div>
|
|
604
|
-
<div className="flex-1">
|
|
605
|
-
<h4 className="font-medium text-white">Photo Gallery</h4>
|
|
606
|
-
<p className="text-sm text-white/60">24 items</p>
|
|
607
|
-
</div>
|
|
608
|
-
<div className="text-xs text-white/40">
|
|
609
|
-
Dec 8, 2024
|
|
610
|
-
</div>
|
|
611
|
-
</div>`}
|
|
612
|
-
</pre>
|
|
613
|
-
</div>
|
|
614
|
-
</div>
|
|
615
|
-
</div>
|
|
616
|
-
|
|
617
|
-
{/* Button Integration */}
|
|
618
|
-
<div className="!space-y-4">
|
|
619
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
620
|
-
Button Integration
|
|
621
|
-
</h3>
|
|
622
|
-
<div className="!space-y-4">
|
|
623
|
-
<div className="flex flex-wrap gap-4">
|
|
624
|
-
<button className="border-fm-icon-info/30 bg-fm-icon-info/20 text-fm-icon-info hover:bg-fm-icon-info/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
625
|
-
<ImageIcon className="h-4 w-4" />
|
|
626
|
-
Add Photo
|
|
627
|
-
</button>
|
|
628
|
-
<button className="border-fm-icon-positive/30 bg-fm-icon-positive/20 text-fm-icon-positive hover:bg-fm-icon-positive/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
629
|
-
<ImageIcon className="h-4 w-4" />
|
|
630
|
-
Gallery
|
|
631
|
-
</button>
|
|
632
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-secondary hover:bg-fm-surface-secondary flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
633
|
-
<ImageIcon className="h-4 w-4" />
|
|
634
|
-
Media Library
|
|
635
|
-
</button>
|
|
636
|
-
</div>
|
|
637
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
638
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
639
|
-
{`// Primary action button
|
|
640
|
-
<button className="flex items-center gap-2 bg-blue-500/20 border border-blue-500/30 px-4 py-2 rounded-lg">
|
|
641
|
-
<ImageIcon className="h-4 w-4 " />
|
|
642
|
-
Add Photo
|
|
643
|
-
</button>
|
|
644
|
-
|
|
645
|
-
// Secondary button
|
|
646
|
-
<button className="flex items-center gap-2 bg-white/5 border border-white/20 px-4 py-2 rounded-lg">
|
|
647
|
-
<ImageIcon className="h-4 w-4 " />
|
|
648
|
-
Media Library
|
|
649
|
-
</button>`}
|
|
650
|
-
</pre>
|
|
651
|
-
</div>
|
|
652
|
-
</div>
|
|
653
|
-
</div>
|
|
654
|
-
</div>
|
|
655
|
-
</div>
|
|
656
|
-
|
|
657
|
-
{/* Interactive States */}
|
|
658
|
-
<div className="!space-y-8">
|
|
659
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
660
|
-
Interactive States & Animations
|
|
661
|
-
</h2>
|
|
662
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
663
|
-
<div className="!space-y-4">
|
|
664
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
665
|
-
Hover & Loading States
|
|
666
|
-
</h3>
|
|
667
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
668
|
-
<div className="flex items-center gap-4">
|
|
669
|
-
<ImageIcon className="text-fm-tertiary hover:text-fm-icon-info h-6 w-6 transition-colors" />
|
|
670
|
-
<div>
|
|
671
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
672
|
-
Color Change
|
|
673
|
-
</div>
|
|
674
|
-
<div className="text-fm-tertiary text-xs">
|
|
675
|
-
hover:text-fm-icon-info
|
|
676
|
-
</div>
|
|
677
|
-
</div>
|
|
678
|
-
</div>
|
|
679
|
-
<div className="flex items-center gap-4">
|
|
680
|
-
<ImageIcon className="text-fm-icon-active h-6 w-6 transition-transform hover:scale-110" />
|
|
681
|
-
<div>
|
|
682
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
683
|
-
Scale Effect
|
|
684
|
-
</div>
|
|
685
|
-
<div className="text-fm-tertiary text-xs">
|
|
686
|
-
hover:scale-110
|
|
687
|
-
</div>
|
|
688
|
-
</div>
|
|
689
|
-
</div>
|
|
690
|
-
<div className="flex items-center gap-4">
|
|
691
|
-
<div className="relative overflow-hidden">
|
|
692
|
-
<ImageIcon className="text-fm-icon-info h-6 w-6" />
|
|
693
|
-
<div className="animate-shimmer absolute inset-0 bg-linear-to-r from-transparent via-transparent to-transparent"></div>
|
|
694
|
-
</div>
|
|
695
|
-
<div>
|
|
696
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
697
|
-
Loading Shimmer
|
|
698
|
-
</div>
|
|
699
|
-
<div className="text-fm-tertiary text-xs">
|
|
700
|
-
animate-shimmer
|
|
701
|
-
</div>
|
|
702
|
-
</div>
|
|
703
|
-
</div>
|
|
704
|
-
<div className="flex items-center gap-4">
|
|
705
|
-
<div
|
|
706
|
-
className="rounded p-2 focus:ring-2 focus:ring-blue-500 focus:outline-none"
|
|
707
|
-
tabIndex={0}
|
|
708
|
-
>
|
|
709
|
-
<ImageIcon className="text-fm-icon-active h-6 w-6" />
|
|
710
|
-
</div>
|
|
711
|
-
<div>
|
|
712
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
713
|
-
Focus Ring
|
|
714
|
-
</div>
|
|
715
|
-
<div className="text-fm-tertiary text-xs">
|
|
716
|
-
focus:ring-2
|
|
717
|
-
</div>
|
|
718
|
-
</div>
|
|
719
|
-
</div>
|
|
720
|
-
</div>
|
|
721
|
-
</div>
|
|
722
|
-
|
|
723
|
-
<div className="!space-y-4">
|
|
724
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
725
|
-
Animation Examples
|
|
726
|
-
</h3>
|
|
727
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
728
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
729
|
-
{`// Hover effects
|
|
730
|
-
<ImageIcon className="h-6 w-6 text-white/60 hover:text-blue-400 transition-colors " />
|
|
731
|
-
|
|
732
|
-
// Scale on hover
|
|
733
|
-
<ImageIcon className="h-6 w-6 text-white hover:scale-110 transition-transform " />
|
|
734
|
-
|
|
735
|
-
// Loading shimmer animation
|
|
736
|
-
<div className="relative overflow-hidden">
|
|
737
|
-
<ImageIcon className="h-6 w-6 text-blue-400 " />
|
|
738
|
-
<div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent animate-shimmer"></div>
|
|
739
|
-
</div>
|
|
740
|
-
|
|
741
|
-
// Shimmer keyframes
|
|
742
|
-
@keyframes shimmer {
|
|
743
|
-
0% { transform: translateX(-100%); }
|
|
744
|
-
100% { transform: translateX(100%); }
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
.animate-shimmer {
|
|
748
|
-
animation: shimmer 2s ease-in-out infinite;
|
|
749
|
-
}`}
|
|
750
|
-
</pre>
|
|
751
|
-
</div>
|
|
752
|
-
</div>
|
|
753
|
-
</div>
|
|
754
|
-
</div>
|
|
755
|
-
|
|
756
|
-
{/* Accessibility */}
|
|
757
|
-
<div className="!space-y-8">
|
|
758
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
759
|
-
Accessibility Features
|
|
760
|
-
</h2>
|
|
761
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
762
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
763
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
764
|
-
✅ Built-in Features
|
|
765
|
-
</h3>
|
|
766
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
767
|
-
<li className="text-fm-secondary!">
|
|
768
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
769
|
-
</li>
|
|
770
|
-
<li className="text-fm-secondary!">
|
|
771
|
-
Provides screen reader label "Image icon"
|
|
772
|
-
</li>
|
|
773
|
-
<li className="text-fm-secondary!">
|
|
774
|
-
Supports keyboard navigation when interactive
|
|
775
|
-
</li>
|
|
776
|
-
<li className="text-fm-secondary!">
|
|
777
|
-
Maintains proper color contrast ratios
|
|
778
|
-
</li>
|
|
779
|
-
<li className="text-fm-secondary!">
|
|
780
|
-
Scales with user's font size preferences
|
|
781
|
-
</li>
|
|
782
|
-
</ul>
|
|
783
|
-
</div>
|
|
784
|
-
|
|
785
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
786
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
787
|
-
💡 Best Practices
|
|
788
|
-
</h3>
|
|
789
|
-
<ul className="text-fm-secondary !space-y-2 text-sm">
|
|
790
|
-
<li className="text-fm-secondary!">
|
|
791
|
-
Always provide alt text for image content
|
|
792
|
-
</li>
|
|
793
|
-
<li className="text-fm-secondary!">
|
|
794
|
-
Use descriptive labels for upload areas
|
|
795
|
-
</li>
|
|
796
|
-
<li className="text-fm-secondary!">
|
|
797
|
-
Ensure sufficient color contrast
|
|
798
|
-
</li>
|
|
799
|
-
<li className="text-fm-secondary!">
|
|
800
|
-
Add focus states for interactive elements
|
|
801
|
-
</li>
|
|
802
|
-
<li className="text-fm-secondary!">
|
|
803
|
-
Consider motion sensitivity for animations
|
|
804
|
-
</li>
|
|
805
|
-
</ul>
|
|
806
|
-
</div>
|
|
807
|
-
</div>
|
|
808
|
-
|
|
809
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
810
|
-
<h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
|
|
811
|
-
Custom Accessibility Implementation
|
|
812
|
-
</h3>
|
|
813
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
814
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
815
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
816
|
-
{`// Upload area with proper ARIA labels
|
|
817
|
-
<div
|
|
818
|
-
role="button"
|
|
819
|
-
aria-label="Upload images - drag and drop files or click to browse"
|
|
820
|
-
tabIndex={0}
|
|
821
|
-
className="border-2 border-dashed border-white/20 p-8 text-center rounded-lg focus:ring-2 focus:ring-blue-500"
|
|
822
|
-
onKeyDown={(e) => {
|
|
823
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
824
|
-
handleFileSelect()
|
|
825
|
-
}
|
|
826
|
-
}}
|
|
827
|
-
>
|
|
828
|
-
<ImageIcon className="mx-auto h-12 w-12 text-white/40 " />
|
|
829
|
-
<p className="mt-4 text-white">Drop images here or click to browse</p>
|
|
830
|
-
</div>
|
|
831
|
-
|
|
832
|
-
// Gallery with proper semantics
|
|
833
|
-
<div role="img" aria-label="Image gallery with 12 photos">
|
|
834
|
-
<ImageIcon className="h-6 w-6 " />
|
|
835
|
-
<span className="sr-only">Gallery contains landscape and portrait photos</span>
|
|
836
|
-
</div>`}
|
|
837
|
-
</pre>
|
|
838
|
-
</div>
|
|
839
|
-
<div className="!space-y-4">
|
|
840
|
-
<p className="text-fm-secondary! text-sm">
|
|
841
|
-
When using ImageIcon for interactive elements like
|
|
842
|
-
upload areas or gallery triggers, provide comprehensive
|
|
843
|
-
ARIA labels and keyboard support.
|
|
844
|
-
</p>
|
|
845
|
-
<div className="border-fm-icon-info/20 bg-fm-icon-info/10 rounded-lg border p-4">
|
|
846
|
-
<div className="text-fm-icon-info flex items-center gap-2 text-sm">
|
|
847
|
-
<ImageIcon className="h-4 w-4" />
|
|
848
|
-
<span>
|
|
849
|
-
Screen readers get context about image functionality
|
|
850
|
-
</span>
|
|
851
|
-
</div>
|
|
852
|
-
</div>
|
|
853
|
-
</div>
|
|
854
|
-
</div>
|
|
855
|
-
</div>
|
|
856
|
-
</div>
|
|
857
|
-
|
|
858
|
-
{/* Related Icons */}
|
|
859
|
-
<div className="!space-y-8">
|
|
860
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
861
|
-
Related Icons
|
|
862
|
-
</h2>
|
|
863
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
864
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
865
|
-
<div className="bg-fm-icon-negative/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
866
|
-
<span className="text-2xl">📹</span>
|
|
867
|
-
</div>
|
|
868
|
-
<div>
|
|
869
|
-
<div className="text-fm-icon-active font-medium">
|
|
870
|
-
VideoIcon
|
|
871
|
-
</div>
|
|
872
|
-
<div className="text-fm-tertiary text-xs">
|
|
873
|
-
Video content
|
|
874
|
-
</div>
|
|
875
|
-
</div>
|
|
876
|
-
</div>
|
|
877
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
878
|
-
<div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
879
|
-
<span className="text-2xl">📁</span>
|
|
880
|
-
</div>
|
|
881
|
-
<div>
|
|
882
|
-
<div className="text-fm-icon-active font-medium">
|
|
883
|
-
FolderIcon
|
|
884
|
-
</div>
|
|
885
|
-
<div className="text-fm-tertiary text-xs">
|
|
886
|
-
File organization
|
|
887
|
-
</div>
|
|
888
|
-
</div>
|
|
889
|
-
</div>
|
|
890
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
891
|
-
<div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
892
|
-
<span className="text-2xl">⬆️</span>
|
|
893
|
-
</div>
|
|
894
|
-
<div>
|
|
895
|
-
<div className="text-fm-icon-active font-medium">
|
|
896
|
-
UploadIcon
|
|
897
|
-
</div>
|
|
898
|
-
<div className="text-fm-tertiary text-xs">
|
|
899
|
-
File uploads
|
|
900
|
-
</div>
|
|
901
|
-
</div>
|
|
902
|
-
</div>
|
|
903
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
904
|
-
<div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
905
|
-
<span className="text-2xl">🎨</span>
|
|
906
|
-
</div>
|
|
907
|
-
<div>
|
|
908
|
-
<div className="text-fm-icon-active font-medium">
|
|
909
|
-
PaletteIcon
|
|
910
|
-
</div>
|
|
911
|
-
<div className="text-fm-tertiary text-xs">
|
|
912
|
-
Design tools
|
|
913
|
-
</div>
|
|
914
|
-
</div>
|
|
915
|
-
</div>
|
|
916
|
-
</div>
|
|
917
|
-
</div>
|
|
918
|
-
</div>
|
|
919
|
-
|
|
920
|
-
{/* Footer */}
|
|
921
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
|
|
922
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
923
|
-
<div className="!space-y-4 text-center">
|
|
924
|
-
<p className="text-fm-tertiary!">
|
|
925
|
-
ImageIcon is part of the Aural UI icon library, built for
|
|
926
|
-
media-rich applications and visual content management.
|
|
927
|
-
</p>
|
|
928
|
-
<p className="text-fm-placeholder! text-sm">
|
|
929
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
930
|
-
compatibility and follow WCAG guidelines for media
|
|
931
|
-
accessibility.
|
|
932
|
-
</p>
|
|
933
|
-
</div>
|
|
934
|
-
</div>
|
|
935
|
-
</div>
|
|
936
|
-
</div>
|
|
937
|
-
</>
|
|
59
|
+
),
|
|
60
|
+
}}
|
|
61
|
+
relatedIcons={[
|
|
62
|
+
{
|
|
63
|
+
name: "CameraIcon",
|
|
64
|
+
description: "Camera / photo input icon",
|
|
65
|
+
icon: CameraIcon,
|
|
66
|
+
accentToken: "info",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "ImageAvatarSparkleIcon",
|
|
70
|
+
description: "AI avatar sparkle icon",
|
|
71
|
+
icon: ImageAvatarSparkleIcon,
|
|
72
|
+
accentToken: "positive",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "VideoPlaylistIcon",
|
|
76
|
+
description: "Video playlist / queue icon",
|
|
77
|
+
icon: VideoPlaylistIcon,
|
|
78
|
+
accentToken: "warning",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "VoicePlayingIcon",
|
|
82
|
+
description: "Voice / audio playing icon",
|
|
83
|
+
icon: VoicePlayingIcon,
|
|
84
|
+
accentToken: "negative",
|
|
85
|
+
},
|
|
86
|
+
]}
|
|
87
|
+
/>
|
|
938
88
|
),
|
|
939
89
|
},
|
|
940
90
|
},
|
|
941
91
|
tags: ["autodocs"],
|
|
942
92
|
argTypes: {
|
|
943
|
-
|
|
944
|
-
control:
|
|
945
|
-
description: "
|
|
93
|
+
className: {
|
|
94
|
+
control: "text",
|
|
95
|
+
description: "CSS classes including color token",
|
|
946
96
|
},
|
|
947
97
|
withAccessibility: {
|
|
948
98
|
control: "boolean",
|
|
949
|
-
description: "
|
|
950
|
-
},
|
|
951
|
-
height: {
|
|
952
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
953
|
-
description: "Height of the icon in pixels",
|
|
954
|
-
},
|
|
955
|
-
stroke: {
|
|
956
|
-
control: "color",
|
|
957
|
-
description: "Stroke color of the image outline",
|
|
958
|
-
},
|
|
959
|
-
strokeWidth: {
|
|
960
|
-
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
961
|
-
description: "Stroke width of the outline",
|
|
962
|
-
},
|
|
963
|
-
fill: {
|
|
964
|
-
control: "color",
|
|
965
|
-
description: "Fill color of the icon",
|
|
966
|
-
},
|
|
967
|
-
className: {
|
|
968
|
-
control: "text",
|
|
969
|
-
description: "CSS classes for styling (use for overrides)",
|
|
99
|
+
description: "Wrap with accessibility label",
|
|
970
100
|
},
|
|
971
101
|
},
|
|
972
102
|
}
|
|
@@ -974,262 +104,70 @@ function MediaUpload() {
|
|
|
974
104
|
export default meta
|
|
975
105
|
type Story = StoryObj<typeof ImageIcon>
|
|
976
106
|
|
|
977
|
-
// Story parameters for consistent dark theme
|
|
978
|
-
const storyParameters = {
|
|
979
|
-
backgrounds: {
|
|
980
|
-
default: "dark",
|
|
981
|
-
values: [
|
|
982
|
-
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
983
|
-
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
984
|
-
],
|
|
985
|
-
},
|
|
986
|
-
}
|
|
987
|
-
|
|
988
107
|
export const Default: Story = {
|
|
989
108
|
args: {
|
|
990
|
-
className: "h-6 w-6 text-fm-icon-
|
|
109
|
+
className: "h-6 w-6 text-fm-icon-inactive",
|
|
991
110
|
withAccessibility: true,
|
|
992
111
|
},
|
|
993
|
-
parameters: storyParameters,
|
|
994
112
|
render: (args) => (
|
|
995
|
-
<
|
|
113
|
+
<IconDefaultCanvas>
|
|
996
114
|
<ImageIcon {...args} />
|
|
997
|
-
</
|
|
115
|
+
</IconDefaultCanvas>
|
|
998
116
|
),
|
|
999
117
|
}
|
|
1000
118
|
|
|
1001
119
|
export const SizeVariations: Story = {
|
|
1002
|
-
|
|
1003
|
-
...storyParameters,
|
|
1004
|
-
docs: {
|
|
1005
|
-
description: {
|
|
1006
|
-
story:
|
|
1007
|
-
"ImageIcon in different sizes, from small UI elements to large placeholders.",
|
|
1008
|
-
},
|
|
1009
|
-
},
|
|
1010
|
-
},
|
|
1011
|
-
render: () => (
|
|
1012
|
-
<div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-linear-to-br p-8">
|
|
1013
|
-
<div className="text-center">
|
|
1014
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
|
|
1015
|
-
<span className="text-fm-tertiary text-xs">12px</span>
|
|
1016
|
-
</div>
|
|
1017
|
-
<div className="text-center">
|
|
1018
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
|
|
1019
|
-
<span className="text-fm-tertiary text-xs">16px</span>
|
|
1020
|
-
</div>
|
|
1021
|
-
<div className="text-center">
|
|
1022
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
|
|
1023
|
-
<span className="text-fm-tertiary text-xs">20px</span>
|
|
1024
|
-
</div>
|
|
1025
|
-
<div className="text-center">
|
|
1026
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
|
|
1027
|
-
<span className="text-fm-tertiary text-xs">24px</span>
|
|
1028
|
-
</div>
|
|
1029
|
-
<div className="text-center">
|
|
1030
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
|
|
1031
|
-
<span className="text-fm-tertiary text-xs">32px</span>
|
|
1032
|
-
</div>
|
|
1033
|
-
<div className="text-center">
|
|
1034
|
-
<ImageIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
|
|
1035
|
-
<span className="text-fm-tertiary text-xs">48px</span>
|
|
1036
|
-
</div>
|
|
1037
|
-
</div>
|
|
1038
|
-
),
|
|
120
|
+
render: () => <IconSizeVariations icon={ImageIcon} />,
|
|
1039
121
|
}
|
|
1040
122
|
|
|
1041
123
|
export const ColorVariations: Story = {
|
|
1042
|
-
|
|
1043
|
-
...storyParameters,
|
|
1044
|
-
docs: {
|
|
1045
|
-
description: {
|
|
1046
|
-
story:
|
|
1047
|
-
"ImageIcon in different colors for various media contexts and states.",
|
|
1048
|
-
},
|
|
1049
|
-
},
|
|
1050
|
-
},
|
|
1051
|
-
render: () => (
|
|
1052
|
-
<div className="from-fm-surface-primary to-fm-surface-secondary grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-linear-to-br p-8 md:grid-cols-4">
|
|
1053
|
-
<div className="text-center">
|
|
1054
|
-
<div className="border-fm-icon-info/30 bg-fm-icon-info/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1055
|
-
<ImageIcon className="text-fm-icon-info h-8 w-8" />
|
|
1056
|
-
</div>
|
|
1057
|
-
<div className="text-fm-icon-active text-sm font-medium">Primary</div>
|
|
1058
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
1059
|
-
</div>
|
|
1060
|
-
<div className="text-center">
|
|
1061
|
-
<div className="border-fm-icon-positive/30 bg-fm-icon-positive/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1062
|
-
<ImageIcon className="text-fm-icon-positive h-8 w-8" />
|
|
1063
|
-
</div>
|
|
1064
|
-
<div className="text-fm-icon-active text-sm font-medium">Success</div>
|
|
1065
|
-
<div className="text-fm-icon-positive text-xs">
|
|
1066
|
-
text-fm-icon-positive
|
|
1067
|
-
</div>
|
|
1068
|
-
</div>
|
|
1069
|
-
<div className="text-center">
|
|
1070
|
-
<div className="border-fm-divider-primary bg-fm-surface-tertiary/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1071
|
-
<ImageIcon className="text-fm-placeholder h-8 w-8" />
|
|
1072
|
-
</div>
|
|
1073
|
-
<div className="text-fm-icon-active text-sm font-medium">Muted</div>
|
|
1074
|
-
<div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
|
|
1075
|
-
</div>
|
|
1076
|
-
<div className="text-center">
|
|
1077
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1078
|
-
<ImageIcon className="text-fm-icon-active/30 h-8 w-8" />
|
|
1079
|
-
</div>
|
|
1080
|
-
<div className="text-fm-icon-active text-sm font-medium">Disabled</div>
|
|
1081
|
-
<div className="text-fm-icon-active/30 text-xs">
|
|
1082
|
-
text-fm-icon-active/30
|
|
1083
|
-
</div>
|
|
1084
|
-
</div>
|
|
1085
|
-
</div>
|
|
1086
|
-
),
|
|
124
|
+
render: () => <IconColorVariations icon={ImageIcon} />,
|
|
1087
125
|
}
|
|
1088
126
|
|
|
1089
127
|
export const UsageExamples: Story = {
|
|
1090
|
-
parameters: {
|
|
1091
|
-
...storyParameters,
|
|
1092
|
-
docs: {
|
|
1093
|
-
description: {
|
|
1094
|
-
story:
|
|
1095
|
-
"Real-world usage examples showing ImageIcon in different media and upload contexts.",
|
|
1096
|
-
},
|
|
1097
|
-
},
|
|
1098
|
-
},
|
|
1099
128
|
render: () => (
|
|
1100
|
-
<
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
Image Upload
|
|
1105
|
-
</h3>
|
|
1106
|
-
<div className="border-fm-divider-primary bg-fm-surface-secondary hover:border-fm-icon-info/50 hover:bg-fm-icon-info/10 relative rounded-lg border-2 border-dashed p-8 text-center transition-colors">
|
|
1107
|
-
<ImageIcon className="text-fm-placeholder !mx-auto h-12 w-12" />
|
|
1108
|
-
<h4 className="text-fm-icon-active! mt-4 text-lg font-medium">
|
|
1109
|
-
Upload Images
|
|
1110
|
-
</h4>
|
|
1111
|
-
<p className="text-fm-tertiary! mt-2 text-sm">
|
|
1112
|
-
Drag and drop your images here, or click to browse
|
|
1113
|
-
</p>
|
|
1114
|
-
<button className="bg-fm-icon-info/20 text-fm-icon-info hover:bg-fm-icon-info/30 mt-4 rounded-lg px-4 py-2 transition-colors">
|
|
1115
|
-
Browse Files
|
|
1116
|
-
</button>
|
|
129
|
+
<IconUsageCanvas>
|
|
130
|
+
<IconUsageSection title="Cover Art Placeholder">
|
|
131
|
+
<div className="bg-fm-divider-secondary flex h-24 w-24 items-center justify-center rounded-xl">
|
|
132
|
+
<ImageIcon className="text-fm-icon-inactive h-10 w-10" />
|
|
1117
133
|
</div>
|
|
1118
|
-
</
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
134
|
+
</IconUsageSection>
|
|
135
|
+
|
|
136
|
+
<IconUsageSection title="Upload Cover Art">
|
|
137
|
+
<button className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm flex-col items-center gap-3 rounded-xl border px-4 py-6">
|
|
138
|
+
<ImageIcon className="text-fm-icon-inactive h-8 w-8" />
|
|
139
|
+
<span className="text-fm-secondary font-fm-text text-sm">
|
|
140
|
+
Upload cover image
|
|
141
|
+
</span>
|
|
142
|
+
</button>
|
|
143
|
+
</IconUsageSection>
|
|
144
|
+
|
|
145
|
+
<IconUsageSection title="Media Type Picker">
|
|
146
|
+
<div className="flex gap-3">
|
|
147
|
+
{[ImageIcon, CameraIcon, VideoPlaylistIcon].map((Icon, i) => (
|
|
1127
148
|
<div
|
|
1128
|
-
key={
|
|
1129
|
-
className=
|
|
149
|
+
key={i}
|
|
150
|
+
className={`border-fm-divider-secondary flex h-12 w-12 items-center justify-center rounded-xl border ${i === 0 ? "bg-fm-surface-primary" : "bg-fm-surface-secondary"}`}
|
|
1130
151
|
>
|
|
1131
|
-
<
|
|
152
|
+
<Icon
|
|
153
|
+
className={`h-5 w-5 ${i === 0 ? "text-fm-icon-active" : "text-fm-icon-inactive"}`}
|
|
154
|
+
/>
|
|
1132
155
|
</div>
|
|
1133
156
|
))}
|
|
1134
157
|
</div>
|
|
1135
|
-
</
|
|
1136
|
-
|
|
1137
|
-
{/* Button Integration */}
|
|
1138
|
-
<div className="!space-y-2">
|
|
1139
|
-
<h3 className="text-fm-icon-active text-sm font-medium">
|
|
1140
|
-
Button Integration
|
|
1141
|
-
</h3>
|
|
1142
|
-
<div className="flex flex-wrap gap-4">
|
|
1143
|
-
<button className="border-fm-icon-info/30 bg-fm-icon-info/20 text-fm-icon-info hover:bg-fm-icon-info/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
1144
|
-
<ImageIcon className="h-4 w-4" />
|
|
1145
|
-
Add Photo
|
|
1146
|
-
</button>
|
|
1147
|
-
<button className="border-fm-icon-positive/30 bg-fm-icon-positive/20 text-fm-icon-positive hover:bg-fm-icon-positive/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
1148
|
-
<ImageIcon className="h-4 w-4" />
|
|
1149
|
-
Gallery
|
|
1150
|
-
</button>
|
|
1151
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-secondary hover:bg-fm-surface-secondary flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
1152
|
-
<ImageIcon className="h-4 w-4" />
|
|
1153
|
-
Media Library
|
|
1154
|
-
</button>
|
|
1155
|
-
</div>
|
|
1156
|
-
</div>
|
|
1157
|
-
</div>
|
|
1158
|
-
),
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
export const InteractiveStates: Story = {
|
|
1162
|
-
parameters: {
|
|
1163
|
-
...storyParameters,
|
|
1164
|
-
docs: {
|
|
1165
|
-
description: {
|
|
1166
|
-
story:
|
|
1167
|
-
"Interactive states showing hover effects, loading animations, and focus states for the image icon.",
|
|
1168
|
-
},
|
|
1169
|
-
},
|
|
1170
|
-
},
|
|
1171
|
-
render: () => (
|
|
1172
|
-
<div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
|
|
1173
|
-
<div className="!space-y-4">
|
|
1174
|
-
<h3 className="text-fm-secondary text-sm font-medium">Hover Effects</h3>
|
|
1175
|
-
<div className="flex gap-8">
|
|
1176
|
-
<div className="flex flex-col items-center gap-2">
|
|
1177
|
-
<ImageIcon className="text-fm-tertiary hover:text-fm-icon-info h-8 w-8 transition-colors" />
|
|
1178
|
-
<span className="text-fm-tertiary text-xs">Color Change</span>
|
|
1179
|
-
</div>
|
|
1180
|
-
<div className="flex flex-col items-center gap-2">
|
|
1181
|
-
<ImageIcon className="text-fm-icon-active h-8 w-8 transition-transform hover:scale-110" />
|
|
1182
|
-
<span className="text-fm-tertiary text-xs">Scale Up</span>
|
|
1183
|
-
</div>
|
|
1184
|
-
<div className="flex flex-col items-center gap-2">
|
|
1185
|
-
<div className="relative overflow-hidden">
|
|
1186
|
-
<ImageIcon className="text-fm-icon-info h-8 w-8" />
|
|
1187
|
-
<div className="animate-shimmer absolute inset-0 bg-linear-to-r from-transparent via-transparent to-transparent"></div>
|
|
1188
|
-
</div>
|
|
1189
|
-
<span className="text-fm-tertiary text-xs">Loading Shimmer</span>
|
|
1190
|
-
</div>
|
|
1191
|
-
</div>
|
|
1192
|
-
</div>
|
|
1193
|
-
|
|
1194
|
-
<div className="!space-y-4">
|
|
1195
|
-
<h3 className="text-fm-secondary text-sm font-medium">Focus States</h3>
|
|
1196
|
-
<div className="flex gap-8">
|
|
1197
|
-
<div className="flex flex-col items-center gap-2">
|
|
1198
|
-
<div
|
|
1199
|
-
className="rounded p-2 focus:ring-2 focus:ring-blue-500 focus:outline-none"
|
|
1200
|
-
tabIndex={0}
|
|
1201
|
-
>
|
|
1202
|
-
<ImageIcon className="text-fm-icon-active h-8 w-8" />
|
|
1203
|
-
</div>
|
|
1204
|
-
<span className="text-fm-tertiary text-xs">Focus Ring</span>
|
|
1205
|
-
</div>
|
|
1206
|
-
</div>
|
|
1207
|
-
</div>
|
|
1208
|
-
</div>
|
|
158
|
+
</IconUsageSection>
|
|
159
|
+
</IconUsageCanvas>
|
|
1209
160
|
),
|
|
1210
161
|
}
|
|
1211
162
|
|
|
1212
163
|
export const Playground: Story = {
|
|
1213
|
-
parameters: {
|
|
1214
|
-
...storyParameters,
|
|
1215
|
-
docs: {
|
|
1216
|
-
description: {
|
|
1217
|
-
story:
|
|
1218
|
-
"Interactive playground to experiment with different ImageIcon configurations.",
|
|
1219
|
-
},
|
|
1220
|
-
},
|
|
1221
|
-
},
|
|
1222
164
|
args: {
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
className: "text-fm-icon-info ",
|
|
1226
|
-
strokeWidth: 1.5,
|
|
165
|
+
className: "h-8 w-8 text-fm-icon-inactive",
|
|
166
|
+
withAccessibility: true,
|
|
1227
167
|
},
|
|
1228
168
|
render: (args) => (
|
|
1229
|
-
<
|
|
1230
|
-
<
|
|
1231
|
-
|
|
1232
|
-
</div>
|
|
1233
|
-
</div>
|
|
169
|
+
<IconPlaygroundCanvas>
|
|
170
|
+
<ImageIcon {...args} />
|
|
171
|
+
</IconPlaygroundCanvas>
|
|
1234
172
|
),
|
|
1235
173
|
}
|