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