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.
Files changed (175) hide show
  1. package/README.md +8 -1
  2. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
  3. package/dist/components/avatar/Avatar.stories.tsx +219 -235
  4. package/dist/components/badge/Badge.stories.tsx +379 -116
  5. package/dist/components/banner/Banner.stories.tsx +445 -391
  6. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  7. package/dist/components/button/Button.stories.tsx +585 -230
  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 -636
  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 +530 -867
  16. package/dist/components/dialog/Dialog.stories.tsx +501 -950
  17. package/dist/components/divider/Divider.stories.tsx +264 -527
  18. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  19. package/dist/components/drawer/Drawer.stories.tsx +659 -1023
  20. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
  21. package/dist/components/form/Form.stories.tsx +560 -274
  22. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  23. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
  24. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  25. package/dist/components/if-else/if-else.stories.tsx +370 -83
  26. package/dist/components/input/Input.stories.tsx +436 -368
  27. package/dist/components/label/Label.stories.tsx +156 -154
  28. package/dist/components/list/List.stories.tsx +484 -835
  29. package/dist/components/marquee/Marquee.stories.tsx +356 -712
  30. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
  31. package/dist/components/overlay/Overlay.stories.tsx +452 -824
  32. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  33. package/dist/components/popover/Popover.stories.tsx +481 -896
  34. package/dist/components/radio/Radio.stories.tsx +432 -124
  35. package/dist/components/resizable/Resizable.stories.tsx +495 -799
  36. package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
  37. package/dist/components/search/Search.stories.tsx +312 -595
  38. package/dist/components/select/Select.stories.tsx +684 -789
  39. package/dist/components/sheet/Sheet.stories.tsx +671 -950
  40. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  41. package/dist/components/slider/Slider.stories.tsx +383 -760
  42. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  43. package/dist/components/switch/Switch.stories.tsx +461 -208
  44. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  45. package/dist/components/table/Table.stories.tsx +770 -916
  46. package/dist/components/tabs/Tabs.stories.tsx +458 -1455
  47. package/dist/components/tag/Tag.stories.tsx +714 -542
  48. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  49. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
  50. package/dist/components/toast/Toast.stories.tsx +452 -1339
  51. package/dist/components/toggle/Toggle.stories.tsx +488 -931
  52. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
  53. package/dist/components/typography/Typography.stories.tsx +406 -89
  54. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  55. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  56. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  57. package/dist/icons/Icons.stories.tsx +0 -12
  58. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
  59. package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
  60. package/dist/icons/all-icons.tsx +37 -16
  61. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
  62. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
  63. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
  64. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
  65. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
  66. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
  67. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
  68. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
  69. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
  70. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
  71. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
  72. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
  73. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
  74. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
  75. package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
  76. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
  77. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
  78. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
  79. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
  80. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
  81. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
  82. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
  83. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
  84. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
  85. package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
  86. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
  87. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
  88. package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
  89. package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
  90. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
  91. package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
  92. package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
  93. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
  94. package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
  95. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
  96. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
  97. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
  98. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
  99. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
  100. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
  101. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
  102. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
  103. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
  104. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
  105. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
  106. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
  107. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
  108. package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
  109. package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
  110. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
  111. package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
  112. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
  113. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
  114. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
  115. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
  116. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
  117. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
  118. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
  119. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
  120. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
  121. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
  122. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
  123. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
  124. package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
  125. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
  126. package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
  127. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
  128. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
  129. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
  130. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
  131. package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
  132. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
  133. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
  134. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
  135. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
  136. package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
  137. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
  138. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
  139. package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
  140. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
  141. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
  142. package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
  143. package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
  144. package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
  145. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
  146. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
  147. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
  148. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
  149. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
  150. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
  151. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
  152. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
  153. package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
  154. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
  155. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
  156. package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
  157. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
  158. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
  159. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
  160. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
  161. package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
  162. package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
  163. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
  164. package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
  165. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
  166. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
  167. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
  168. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
  169. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
  170. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
  171. package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
  172. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
  173. package/dist/index.cjs +90 -90
  174. package/dist/index.js +90 -90
  175. 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 { ImageAvatarSparkleIcon } from "src/ui/icons/image-avatar-sparkle-icon"
5
+ import { MagicBookIcon } from "src/ui/icons/magic-book-icon"
6
+ import { MessageIcon } from "src/ui/icons/message-icon"
7
+ import { SuggestionIcon } from "src/ui/icons/suggestion-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 { HeadIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof HeadIcon> = {
@@ -18,798 +32,72 @@ const meta: Meta<typeof HeadIcon> = {
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: 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
- `}
81
- </style>
82
-
83
- <div className="bg-fm-surface-primary min-h-screen">
84
- {/* Header */}
85
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
86
- <div className="from-fm-secondary-500/10 to-fm-icon-info/10 absolute inset-0 bg-linear-to-r via-transparent" />
87
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
88
- <div className="!space-y-6 text-center">
89
- <div className="border-fm-icon-info/30 from-fm-icon-info/20 to-fm-secondary-500/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
90
- <HeadIcon className="text-fm-icon-info h-12 w-12" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- HeadIcon
94
- </h1>
95
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
96
- A versatile head/profile icon for user avatars, profile
97
- sections, and account-related elements. Built with
98
- accessibility in mind using Radix UI's AccessibleIcon
99
- wrapper.
100
- </p>
101
-
102
- {/* Stats */}
103
- <div className="flex items-center justify-center gap-8 pt-8">
104
- <div className="text-center">
105
- <div className="text-fm-icon-info text-3xl font-bold">
106
- Accessible
107
- </div>
108
- <div className="text-fm-tertiary text-sm">
109
- Screen reader friendly
110
- </div>
111
- </div>
112
- <div className="bg-fm-divider-primary h-8 w-px" />
113
- <div className="text-center">
114
- <div className="text-fm-secondary-600 text-3xl font-bold">
115
- Scalable
116
- </div>
117
- <div className="text-fm-tertiary text-sm">
118
- Any size needed
119
- </div>
120
- </div>
121
- <div className="bg-fm-divider-primary h-8 w-px" />
122
- <div className="text-center">
123
- <div className="text-fm-icon-info text-3xl font-bold">
124
- Flexible
125
- </div>
126
- <div className="text-fm-tertiary text-sm">
127
- Customizable styling
128
- </div>
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
- </div>
134
-
135
- {/* Content */}
136
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
137
- {/* Quick Usage */}
138
- <div className="!space-y-8">
139
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
140
- Quick Start
141
- </h2>
142
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
143
- <div className="!space-y-4">
144
- <h3 className="text-fm-icon-info! text-xl font-semibold">
145
- Basic Usage
146
- </h3>
147
- <div className="bg-fm-surface-secondary rounded-lg p-4">
148
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
149
- {`import { HeadIcon } from "@icons/head-icon"
150
-
151
- function MyComponent() {
35
+ <AuralIconDocsPage
36
+ accentToken="info"
37
+ features={[
38
+ { title: "Character", description: "Head / avatar placeholder" },
39
+ {
40
+ title: "Voice / Audio",
41
+ description: "Narrator or character cue",
42
+ },
43
+ { title: "Accessible", description: "ARIA-ready by default" },
44
+ ]}
45
+ quickStart={{
46
+ codeExample: `import { HeadIcon } from "src/ui/icons/head-icon"
47
+
48
+ function NarratorBadge() {
152
49
  return (
153
50
  <div className="flex items-center gap-2">
154
- <HeadIcon className="h-5 w-5 text-blue-500" />
155
- <span>User Profile</span>
51
+ <HeadIcon className="h-5 w-5 text-fm-icon-active" />
52
+ <span>Narrator</span>
156
53
  </div>
157
54
  )
158
- }`}
159
- </pre>
160
- </div>
161
- </div>
162
-
163
- <div className="!space-y-4">
164
- <h3 className="text-fm-icon-info! text-xl font-semibold">
165
- Live Preview
166
- </h3>
167
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
168
- <div className="border-fm-icon-info/20 bg-fm-icon-info/10 flex items-center gap-3 rounded-lg border px-4 py-2">
169
- <HeadIcon className="text-fm-icon-info h-5 w-5" />
170
- <span className="text-fm-icon-active">
171
- User Profile
172
- </span>
173
- </div>
174
- </div>
175
- </div>
176
- </div>
177
- </div>
178
-
179
- {/* Props Documentation */}
180
- <div className="!space-y-8">
181
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
182
- Props & Configuration
183
- </h2>
184
-
185
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
186
- <div className="bg-fm-surface-secondary p-4">
187
- <h3 className="text-fm-icon-active! text-xl font-semibold">
188
- Props
189
- </h3>
190
- </div>
191
- <table className="!my-0 w-full">
192
- <thead className="bg-fm-surface-secondary">
193
- <tr className="border-fm-divider-secondary border-b">
194
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
195
- Prop
196
- </th>
197
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
198
- Type
199
- </th>
200
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
201
- Default
202
- </th>
203
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
204
- Description
205
- </th>
206
- </tr>
207
- </thead>
208
- <tbody>
209
- {" "}
210
- <tr className="bg-fm-surface-secondary!">
211
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
212
- withAccessibility
213
- </td>
214
- <td className="text-fm-secondary! px-6 py-4 text-sm">
215
- boolean
216
- </td>
217
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
218
- true
219
- </td>
220
- <td className="text-fm-secondary! px-6 py-4 text-sm">
221
- Whether to wrap the icon with accessibility feature
222
- </td>
223
- </tr>
224
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
225
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
226
- height
227
- </td>
228
- <td className="text-fm-secondary! px-6 py-4 text-sm">
229
- number | string
230
- </td>
231
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
232
- 17
233
- </td>
234
- <td className="text-fm-secondary! px-6 py-4 text-sm">
235
- Height of the icon in pixels
236
- </td>
237
- </tr>
238
- <tr className="border-fm-divider-tertiary border-b">
239
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
240
- stroke
241
- </td>
242
- <td className="text-fm-secondary! px-6 py-4 text-sm">
243
- string
244
- </td>
245
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
246
- currentColor
247
- </td>
248
- <td className="text-fm-secondary! px-6 py-4 text-sm">
249
- Stroke color of the icon
250
- </td>
251
- </tr>
252
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
253
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
254
- strokeWidth
255
- </td>
256
- <td className="text-fm-secondary! px-6 py-4 text-sm">
257
- number | string
258
- </td>
259
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
260
- 1.5
261
- </td>
262
- <td className="text-fm-secondary! px-6 py-4 text-sm">
263
- Width of the stroke
264
- </td>
265
- </tr>
266
- <tr className="border-fm-divider-tertiary border-b">
267
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
268
- className
269
- </td>
270
- <td className="text-fm-secondary! px-6 py-4 text-sm">
271
- string
272
- </td>
273
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
274
- -
275
- </td>
276
- <td className="text-fm-secondary! px-6 py-4 text-sm">
277
- CSS classes for styling
278
- </td>
279
- </tr>
280
- <tr className="bg-fm-surface-secondary!">
281
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
282
- ...svgProps
283
- </td>
284
- <td className="text-fm-secondary! px-6 py-4 text-sm">
285
- SVGProps
286
- </td>
287
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
288
- -
289
- </td>
290
- <td className="text-fm-secondary! px-6 py-4 text-sm">
291
- All standard SVG element props
292
- </td>
293
- </tr>
294
- </tbody>
295
- </table>
296
- </div>
297
- </div>
298
-
299
- {/* Size Variations */}
300
- <div className="!space-y-8">
301
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
302
- Size Variations
303
- </h2>
304
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
305
- <div className="!space-y-6">
306
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
307
- <div className="!space-y-4">
308
- <h3 className="text-fm-icon-info! text-lg font-semibold">
309
- Standard Sizes
310
- </h3>
311
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
312
- <div className="text-center">
313
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
314
- <span className="text-fm-tertiary text-xs">
315
- 12px
316
- </span>
317
- </div>
318
- <div className="text-center">
319
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
320
- <span className="text-fm-tertiary text-xs">
321
- 16px
322
- </span>
323
- </div>
324
- <div className="text-center">
325
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
326
- <span className="text-fm-tertiary text-xs">
327
- 20px
328
- </span>
329
- </div>
330
- <div className="text-center">
331
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
332
- <span className="text-fm-tertiary text-xs">
333
- 24px
334
- </span>
335
- </div>
336
- <div className="text-center">
337
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
338
- <span className="text-fm-tertiary text-xs">
339
- 32px
340
- </span>
341
- </div>
342
- <div className="text-center">
343
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
344
- <span className="text-fm-tertiary text-xs">
345
- 48px
346
- </span>
347
- </div>
348
- </div>
349
- </div>
350
-
351
- <div className="!space-y-4">
352
- <h3 className="text-fm-icon-info! text-lg font-semibold">
353
- Code Example
354
- </h3>
355
- <div className="bg-fm-surface-secondary rounded-lg p-4">
356
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
357
- {`// Small (16px)
358
- <HeadIcon className="h-4 w-4" />
359
-
360
- // Medium (24px)
361
- <HeadIcon className="h-6 w-6" />
362
-
363
- // Large (32px)
364
- <HeadIcon className="h-8 w-8" />
365
-
366
- // Custom size
367
- <HeadIcon width={40} height={40} />`}
368
- </pre>
369
- </div>
370
- </div>
371
- </div>
372
- </div>
373
- </div>
374
- </div>
375
-
376
- {/* Color Variations */}
377
- <div className="!space-y-8">
378
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
379
- Color Variations
380
- </h2>
381
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
382
- <div className="!space-y-4">
383
- <h3 className="text-fm-icon-info! text-lg font-semibold">
384
- Profile States
385
- </h3>
386
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
387
- <div className="flex items-center gap-4">
388
- <HeadIcon className="text-fm-icon-info h-6 w-6" />
389
- <div>
390
- <div className="text-fm-icon-active text-sm font-medium">
391
- Default User
392
- </div>
393
- <div className="text-fm-tertiary text-xs">
394
- text-fm-icon-info
395
- </div>
396
- </div>
397
- </div>
398
- <div className="flex items-center gap-4">
399
- <HeadIcon className="text-fm-icon-positive h-6 w-6" />
400
- <div>
401
- <div className="text-fm-icon-active text-sm font-medium">
402
- Active User
403
- </div>
404
- <div className="text-fm-tertiary text-xs">
405
- text-fm-icon-positive
406
- </div>
407
- </div>
408
- </div>
409
- <div className="flex items-center gap-4">
410
- <HeadIcon className="text-fm-secondary-600 h-6 w-6" />
411
- <div>
412
- <div className="text-fm-icon-active text-sm font-medium">
413
- Premium User
414
- </div>
415
- <div className="text-fm-tertiary text-xs">
416
- text-fm-secondary-600
417
- </div>
418
- </div>
419
- </div>
420
- <div className="flex items-center gap-4">
421
- <HeadIcon className="text-fm-placeholder h-6 w-6" />
422
- <div>
423
- <div className="text-fm-icon-active text-sm font-medium">
424
- Inactive User
425
- </div>
426
- <div className="text-fm-tertiary text-xs">
427
- text-fm-placeholder
428
- </div>
429
- </div>
430
- </div>
431
- </div>
432
- </div>
433
-
434
- <div className="!space-y-4">
435
- <h3 className="text-fm-icon-info! text-lg font-semibold">
436
- Custom Colors
437
- </h3>
438
- <div className="bg-fm-surface-secondary rounded-lg p-4">
439
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
440
- {`// Using Tailwind classes
441
- <HeadIcon className="h-6 w-6 text-blue-400" />
442
- <HeadIcon className="h-6 w-6 text-purple-500" />
443
-
444
- // Using CSS custom properties
445
- <HeadIcon
446
- className="h-6 w-6"
447
- style={{ color: 'var(--color-user)' }}
448
- />
449
-
450
- // Direct stroke prop
451
- <HeadIcon
452
- width={24}
453
- height={24}
454
- stroke="#6366f1"
455
- />`}
456
- </pre>
457
- </div>
458
- </div>
459
- </div>
55
+ }`,
56
+ livePreview: (
57
+ <div className="flex items-center gap-2">
58
+ <HeadIcon className="text-fm-icon-active h-6 w-6" />
460
59
  </div>
461
-
462
- {/* Usage Examples */}
463
- <div className="!space-y-8">
464
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
465
- Usage Examples
466
- </h2>
467
-
468
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
469
- {/* User Profile Card */}
470
- <div className="!space-y-4">
471
- <h3 className="text-fm-icon-info! text-lg font-semibold">
472
- User Profile Card
473
- </h3>
474
- <div className="!space-y-4">
475
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
476
- <div className="flex items-center gap-3">
477
- <div className="border-fm-icon-info/30 bg-fm-icon-info/20 flex h-12 w-12 items-center justify-center rounded-full border">
478
- <HeadIcon className="text-fm-icon-info h-6 w-6" />
479
- </div>
480
- <div>
481
- <h4 className="text-fm-icon-active! font-medium">
482
- John Doe
483
- </h4>
484
- <p className="text-fm-tertiary! text-sm">
485
- Software Engineer
486
- </p>
487
- </div>
488
- </div>
489
- </div>
490
- <div className="bg-fm-surface-secondary rounded-lg p-4">
491
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
492
- {`<div className="flex items-center gap-3">
493
- <div className="flex h-12 w-12 items-center justify-center rounded-full bg-blue-500/20 border border-blue-500/30">
494
- <HeadIcon className="h-6 w-6 text-blue-400" />
495
- </div>
496
- <div>
497
- <h4 className="font-medium text-white">John Doe</h4>
498
- <p className="text-sm text-white/60">Software Engineer</p>
499
- </div>
500
- </div>`}
501
- </pre>
502
- </div>
503
- </div>
504
- </div>
505
-
506
- {/* Navigation Menu */}
507
- <div className="!space-y-4">
508
- <h3 className="text-fm-icon-info! text-lg font-semibold">
509
- Navigation Menu
510
- </h3>
511
- <div className="!space-y-4">
512
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
513
- <nav className="!space-y-2">
514
- <a
515
- href="#"
516
- className="text-fm-secondary hover:bg-fm-surface-secondary hover:text-fm-icon-active flex items-center gap-3 rounded-lg px-3 py-2"
517
- >
518
- <HeadIcon className="h-5 w-5" />
519
- <span>Profile</span>
520
- </a>
521
- <a
522
- href="#"
523
- className="text-fm-secondary hover:bg-fm-surface-secondary hover:text-fm-icon-active flex items-center gap-3 rounded-lg px-3 py-2"
524
- >
525
- <span className="h-5 w-5">⚙️</span>
526
- <span>Settings</span>
527
- </a>
528
- <a
529
- href="#"
530
- className="text-fm-secondary hover:bg-fm-surface-secondary hover:text-fm-icon-active flex items-center gap-3 rounded-lg px-3 py-2"
531
- >
532
- <span className="h-5 w-5">📊</span>
533
- <span>Analytics</span>
534
- </a>
535
- </nav>
536
- </div>
537
- <div className="bg-fm-surface-secondary rounded-lg p-4">
538
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
539
- {`<nav className="space-y-2">
540
- <a href="#" className="flex items-center gap-3 rounded-lg px-3 py-2 hover:bg-white/10">
541
- <HeadIcon className="h-5 w-5" />
542
- <span>Profile</span>
543
- </a>
544
- {/* ... other menu items */}
545
- </nav>`}
546
- </pre>
547
- </div>
548
- </div>
549
- </div>
550
-
551
- {/* Account Dropdown */}
552
- <div className="!space-y-4">
553
- <h3 className="text-fm-icon-info! text-lg font-semibold">
554
- Account Dropdown
555
- </h3>
556
- <div className="!space-y-4">
557
- <div className="relative inline-block">
558
- <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-3 py-2 transition-colors">
559
- <HeadIcon className="h-4 w-4" />
560
- <span>My Account</span>
561
- <span className="text-xs">▼</span>
562
- </button>
563
- </div>
564
- <div className="bg-fm-surface-secondary rounded-lg p-4">
565
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
566
- {`<button className="flex items-center gap-2 bg-blue-500/20 border border-blue-500/30 px-3 py-2 rounded-lg">
567
- <HeadIcon className="h-4 w-4" />
568
- <span>My Account</span>
569
- <span className="text-xs">▼</span>
570
- </button>`}
571
- </pre>
572
- </div>
573
- </div>
574
- </div>
575
-
576
- {/* User Status */}
577
- <div className="!space-y-4">
578
- <h3 className="text-fm-icon-info! text-lg font-semibold">
579
- User Status Indicator
580
- </h3>
581
- <div className="!space-y-4">
582
- <div className="flex gap-4">
583
- <div className="relative">
584
- <HeadIcon className="text-fm-icon-positive h-8 w-8" />
585
- <div className="border-fm-divider-contrast bg-fm-icon-positive absolute -right-1 -bottom-1 h-3 w-3 rounded-full border-2"></div>
586
- </div>
587
- <div className="relative">
588
- <HeadIcon className="text-fm-icon-warning h-8 w-8" />
589
- <div className="border-fm-divider-contrast bg-fm-icon-warning absolute -right-1 -bottom-1 h-3 w-3 rounded-full border-2"></div>
590
- </div>
591
- <div className="relative">
592
- <HeadIcon className="text-fm-placeholder h-8 w-8" />
593
- <div className="border-fm-divider-contrast bg-fm-surface-tertiary absolute -right-1 -bottom-1 h-3 w-3 rounded-full border-2"></div>
594
- </div>
595
- </div>
596
- <div className="bg-fm-surface-secondary rounded-lg p-4">
597
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
598
- {`<div className="relative">
599
- <HeadIcon className="h-8 w-8 text-green-400" />
600
- <div className="absolute -bottom-1 -right-1 h-3 w-3 rounded-full border-2 border-gray-900 bg-green-400"></div>
601
- </div>`}
602
- </pre>
603
- </div>
604
- </div>
605
- </div>
606
- </div>
607
- </div>
608
-
609
- {/* Accessibility */}
610
- <div className="!space-y-8">
611
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
612
- Accessibility Features
613
- </h2>
614
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
615
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
616
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
617
- ✅ Built-in Features
618
- </h3>
619
- <ul className="text-fm-secondary! !space-y-2 text-sm">
620
- <li className="text-fm-secondary!">
621
- Uses Radix UI AccessibleIcon wrapper
622
- </li>
623
- <li className="text-fm-secondary!">
624
- Provides screen reader label "Head Icon"
625
- </li>
626
- <li className="text-fm-secondary!">
627
- Supports keyboard navigation when interactive
628
- </li>
629
- <li className="text-fm-secondary!">
630
- Maintains proper color contrast ratios
631
- </li>
632
- <li className="text-fm-secondary!">
633
- Scales with user's font size preferences
634
- </li>
635
- </ul>
636
- </div>
637
-
638
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
639
- <h3 className="text-fm-icon-info! text-lg font-semibold">
640
- 💡 Best Practices
641
- </h3>
642
- <ul className="text-fm-secondary !space-y-2 text-sm">
643
- <li className="text-fm-secondary!">
644
- Use for user profile and account contexts
645
- </li>
646
- <li className="text-fm-secondary!">
647
- Pair with user names or descriptions
648
- </li>
649
- <li className="text-fm-secondary!">
650
- Ensure sufficient color contrast
651
- </li>
652
- <li className="text-fm-secondary!">
653
- Add focus states for interactive elements
654
- </li>
655
- <li className="text-fm-secondary!">
656
- Consider adding status indicators when needed
657
- </li>
658
- </ul>
659
- </div>
660
- </div>
661
-
662
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
663
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
664
- Custom Accessibility Label
665
- </h3>
666
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
667
- <div className="bg-fm-surface-secondary rounded-lg p-4">
668
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
669
- {`// Custom implementation with specific label
670
- import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
671
-
672
- function CustomHeadIcon({ label = "User profile", ...props }) {
673
- return (
674
- <AccessibleIcon label={label}>
675
- <HeadIcon {...props} />
676
- </AccessibleIcon>
677
- )
678
- }
679
-
680
- // Usage with specific context
681
- <CustomHeadIcon
682
- label="Current user avatar"
683
- className="h-6 w-6 text-blue-400"
684
- />`}
685
- </pre>
686
- </div>
687
- <div className="!space-y-4">
688
- <p className="text-fm-secondary! text-sm">
689
- For specific contexts, you can wrap the HeadIcon with a
690
- custom AccessibleIcon component that provides more
691
- descriptive labels.
692
- </p>
693
- <div className="border-fm-icon-info/20 bg-fm-icon-info/10 rounded-lg border p-4">
694
- <div className="text-fm-icon-info flex items-center gap-2 text-sm">
695
- <HeadIcon className="h-4 w-4" />
696
- <span>
697
- This approach gives screen readers more context
698
- </span>
699
- </div>
700
- </div>
701
- </div>
702
- </div>
703
- </div>
704
- </div>
705
-
706
- {/* Related Icons */}
707
- <div className="!space-y-8">
708
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
709
- Related Icons
710
- </h2>
711
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
712
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
713
- <div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
714
- <span className="text-2xl">👥</span>
715
- </div>
716
- <div>
717
- <div className="text-fm-icon-active font-medium">
718
- GroupIcon
719
- </div>
720
- <div className="text-fm-tertiary text-xs">
721
- Multiple users
722
- </div>
723
- </div>
724
- </div>
725
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
726
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
727
- <span className="text-2xl">⚙️</span>
728
- </div>
729
- <div>
730
- <div className="text-fm-icon-active font-medium">
731
- SettingsIcon
732
- </div>
733
- <div className="text-fm-tertiary text-xs">
734
- Account settings
735
- </div>
736
- </div>
737
- </div>
738
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
739
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
740
- <span className="text-2xl">🔐</span>
741
- </div>
742
- <div>
743
- <div className="text-fm-icon-active font-medium">
744
- SecurityIcon
745
- </div>
746
- <div className="text-fm-tertiary text-xs">
747
- Security & auth
748
- </div>
749
- </div>
750
- </div>
751
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
752
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
753
- <span className="text-2xl">📊</span>
754
- </div>
755
- <div>
756
- <div className="text-fm-icon-active font-medium">
757
- StatsIcon
758
- </div>
759
- <div className="text-fm-tertiary text-xs">
760
- User analytics
761
- </div>
762
- </div>
763
- </div>
764
- </div>
765
- </div>
766
- </div>
767
-
768
- {/* Footer */}
769
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
770
- <div className="!mx-auto max-w-7xl px-6 py-8">
771
- <div className="!space-y-4 text-center">
772
- <p className="text-fm-tertiary!">
773
- HeadIcon is part of the Aural UI icon library, built with
774
- accessibility and consistency in mind.
775
- </p>
776
- <p className="text-fm-placeholder! text-sm">
777
- All icons use Radix UI's AccessibleIcon for screen reader
778
- compatibility and follow WCAG guidelines.
779
- </p>
780
- </div>
781
- </div>
782
- </div>
783
- </div>
784
- </>
60
+ ),
61
+ }}
62
+ relatedIcons={[
63
+ {
64
+ name: "ImageAvatarSparkleIcon",
65
+ description: "AI avatar sparkle icon",
66
+ icon: ImageAvatarSparkleIcon,
67
+ accentToken: "info",
68
+ },
69
+ {
70
+ name: "MessageIcon",
71
+ description: "Chat / message bubble icon",
72
+ icon: MessageIcon,
73
+ accentToken: "positive",
74
+ },
75
+ {
76
+ name: "SuggestionIcon",
77
+ description: "Suggestion / idea icon",
78
+ icon: SuggestionIcon,
79
+ accentToken: "warning",
80
+ },
81
+ {
82
+ name: "MagicBookIcon",
83
+ description: "AI-enhanced book icon",
84
+ icon: MagicBookIcon,
85
+ accentToken: "negative",
86
+ },
87
+ ]}
88
+ />
785
89
  ),
786
90
  },
787
91
  },
788
92
  tags: ["autodocs"],
789
93
  argTypes: {
790
- width: {
791
- control: { type: "range", min: 8, max: 96, step: 2 },
792
- description: "Width of the icon in pixels",
94
+ className: {
95
+ control: "text",
96
+ description: "CSS classes including color token",
793
97
  },
794
98
  withAccessibility: {
795
99
  control: "boolean",
796
- description: "Whether to wrap the icon with accessibility features",
797
- },
798
- height: {
799
- control: { type: "range", min: 8, max: 96, step: 2 },
800
- description: "Height of the icon in pixels",
801
- },
802
- stroke: {
803
- control: "color",
804
- description: "Stroke color of the icon",
805
- },
806
- strokeWidth: {
807
- control: { type: "range", min: 0.5, max: 4, step: 0.5 },
808
- description: "Width of the stroke",
809
- },
810
- className: {
811
- control: "text",
812
- description: "CSS classes for styling",
100
+ description: "Wrap with accessibility label",
813
101
  },
814
102
  },
815
103
  }
@@ -817,213 +105,80 @@ function CustomHeadIcon({ label = "User profile", ...props }) {
817
105
  export default meta
818
106
  type Story = StoryObj<typeof HeadIcon>
819
107
 
820
- // Story parameters for consistent dark theme
821
- const storyParameters = {
822
- backgrounds: {
823
- default: "dark",
824
- values: [
825
- { name: "dark", value: "var(--color-fm-surface-primary)" },
826
- { name: "darker", value: "var(--color-fm-neutral-0)" },
827
- ],
828
- },
829
- }
830
-
831
108
  export const Default: Story = {
832
109
  args: {
833
- width: 24,
834
- height: 24,
835
- className: "text-fm-icon-info",
110
+ className: "h-6 w-6 text-fm-icon-active",
836
111
  withAccessibility: true,
837
112
  },
838
- parameters: storyParameters,
839
113
  render: (args) => (
840
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-32 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
114
+ <IconDefaultCanvas>
841
115
  <HeadIcon {...args} />
842
- </div>
116
+ </IconDefaultCanvas>
843
117
  ),
844
118
  }
845
119
 
846
120
  export const SizeVariations: Story = {
847
- parameters: {
848
- ...storyParameters,
849
- docs: {
850
- description: {
851
- story:
852
- "HeadIcon in different sizes, from small UI elements to large profile displays.",
853
- },
854
- },
855
- },
856
- render: () => (
857
- <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">
858
- <div className="text-center">
859
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
860
- <span className="text-fm-tertiary text-xs">12px</span>
861
- </div>
862
- <div className="text-center">
863
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
864
- <span className="text-fm-tertiary text-xs">16px</span>
865
- </div>
866
- <div className="text-center">
867
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
868
- <span className="text-fm-tertiary text-xs">20px</span>
869
- </div>
870
- <div className="text-center">
871
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
872
- <span className="text-fm-tertiary text-xs">24px</span>
873
- </div>
874
- <div className="text-center">
875
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
876
- <span className="text-fm-tertiary text-xs">32px</span>
877
- </div>
878
- <div className="text-center">
879
- <HeadIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
880
- <span className="text-fm-tertiary text-xs">48px</span>
881
- </div>
882
- </div>
883
- ),
121
+ render: () => <IconSizeVariations icon={HeadIcon} />,
884
122
  }
885
123
 
886
124
  export const ColorVariations: Story = {
887
- parameters: {
888
- ...storyParameters,
889
- docs: {
890
- description: {
891
- story:
892
- "HeadIcon in different colors for various user states and contexts.",
893
- },
894
- },
895
- },
896
- render: () => (
897
- <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">
898
- <div className="text-center">
899
- <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">
900
- <HeadIcon className="text-fm-icon-info h-8 w-8" />
901
- </div>
902
- <div className="text-fm-icon-active text-sm font-medium">Default</div>
903
- <div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
904
- </div>
905
- <div className="text-center">
906
- <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">
907
- <HeadIcon className="text-fm-icon-positive h-8 w-8" />
908
- </div>
909
- <div className="text-fm-icon-active text-sm font-medium">Active</div>
910
- <div className="text-fm-icon-positive text-xs">
911
- text-fm-icon-positive
912
- </div>
913
- </div>
914
- <div className="text-center">
915
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
916
- <HeadIcon className="text-fm-secondary-600 h-8 w-8" />
917
- </div>
918
- <div className="text-fm-icon-active text-sm font-medium">Premium</div>
919
- <div className="text-fm-secondary-600 text-xs">
920
- text-fm-secondary-600
921
- </div>
922
- </div>
923
- <div className="text-center">
924
- <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">
925
- <HeadIcon className="text-fm-placeholder h-8 w-8" />
926
- </div>
927
- <div className="text-fm-icon-active text-sm font-medium">Inactive</div>
928
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
929
- </div>
930
- </div>
931
- ),
125
+ render: () => <IconColorVariations icon={HeadIcon} />,
932
126
  }
933
127
 
934
128
  export const UsageExamples: Story = {
935
- parameters: {
936
- ...storyParameters,
937
- docs: {
938
- description: {
939
- story:
940
- "Real-world usage examples showing HeadIcon in different UI contexts.",
941
- },
942
- },
943
- },
944
129
  render: () => (
945
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
946
- {/* User Profile Card */}
947
- <div className="!space-y-2">
948
- <h3 className="text-fm-icon-active text-sm font-medium">
949
- User Profile Card
950
- </h3>
951
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
130
+ <IconUsageCanvas>
131
+ <IconUsageSection title="Narrator Card">
132
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
952
133
  <div className="flex items-center gap-3">
953
- <div className="border-fm-icon-info/30 bg-fm-icon-info/20 flex h-12 w-12 items-center justify-center rounded-full border">
954
- <HeadIcon className="text-fm-icon-info h-6 w-6" />
134
+ <div className="bg-fm-divider-secondary flex h-12 w-12 items-center justify-center rounded-full">
135
+ <HeadIcon className="text-fm-icon-active h-6 w-6" />
955
136
  </div>
956
137
  <div>
957
- <h4 className="text-fm-icon-active font-medium">John Doe</h4>
958
- <p className="text-fm-tertiary text-sm">Software Engineer</p>
138
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
139
+ Voice Actor
140
+ </div>
141
+ <div className="text-fm-secondary font-fm-text text-xs">
142
+ Main narrator
143
+ </div>
959
144
  </div>
960
145
  </div>
961
146
  </div>
962
- </div>
963
-
964
- {/* Navigation Menu */}
965
- <div className="!space-y-2">
966
- <h3 className="text-fm-icon-active text-sm font-medium">
967
- Navigation Menu
968
- </h3>
969
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
970
- <nav className="!space-y-2">
971
- <a
972
- href="#"
973
- className="text-fm-secondary hover:bg-fm-surface-secondary hover:text-fm-icon-active flex items-center gap-3 rounded-lg px-3 py-2"
974
- >
975
- <HeadIcon className="h-5 w-5" />
976
- <span>Profile</span>
977
- </a>
978
- <a
979
- href="#"
980
- className="text-fm-secondary hover:bg-fm-surface-secondary hover:text-fm-icon-active flex items-center gap-3 rounded-lg px-3 py-2"
147
+ </IconUsageSection>
148
+
149
+ <IconUsageSection title="Character List">
150
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm overflow-hidden rounded-xl border">
151
+ {["Narrator", "Hero", "Villain"].map((label) => (
152
+ <div
153
+ key={label}
154
+ className="border-fm-divider-secondary flex items-center gap-3 border-b px-4 py-3 last:border-b-0"
981
155
  >
982
- <span className="h-5 w-5">⚙️</span>
983
- <span>Settings</span>
984
- </a>
985
- </nav>
156
+ <HeadIcon className="text-fm-icon-active h-4 w-4" />
157
+ <span className="text-fm-primary font-fm-text text-sm">
158
+ {label}
159
+ </span>
160
+ </div>
161
+ ))}
986
162
  </div>
987
- </div>
163
+ </IconUsageSection>
988
164
 
989
- {/* Account Dropdown */}
990
- <div className="!space-y-2">
991
- <h3 className="text-fm-icon-active text-sm font-medium">
992
- Account Dropdown
993
- </h3>
994
- <div className="flex gap-4">
995
- <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-3 py-2 transition-colors">
996
- <HeadIcon className="h-4 w-4" />
997
- <span>My Account</span>
998
- <span className="text-xs">▼</span>
999
- </button>
165
+ <IconUsageSection title="Avatar Placeholder">
166
+ <div className="bg-fm-divider-secondary flex h-16 w-16 items-center justify-center rounded-full">
167
+ <HeadIcon className="text-fm-icon-inactive h-8 w-8" />
1000
168
  </div>
1001
- </div>
1002
- </div>
169
+ </IconUsageSection>
170
+ </IconUsageCanvas>
1003
171
  ),
1004
172
  }
1005
173
 
1006
174
  export const Playground: Story = {
1007
- parameters: {
1008
- ...storyParameters,
1009
- docs: {
1010
- description: {
1011
- story:
1012
- "Interactive playground to experiment with different HeadIcon configurations.",
1013
- },
1014
- },
1015
- },
1016
175
  args: {
1017
- width: 32,
1018
- height: 32,
1019
- className: "text-fm-icon-info",
1020
- strokeWidth: 1.5,
176
+ className: "h-8 w-8 text-fm-icon-active",
177
+ withAccessibility: true,
1021
178
  },
1022
179
  render: (args) => (
1023
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-64 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
1024
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1025
- <HeadIcon {...args} />
1026
- </div>
1027
- </div>
180
+ <IconPlaygroundCanvas>
181
+ <HeadIcon {...args} />
182
+ </IconPlaygroundCanvas>
1028
183
  ),
1029
184
  }