aural-ui 4.0.1 → 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 (174) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
  2. package/dist/components/avatar/Avatar.stories.tsx +219 -235
  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/card/Card.stories.tsx +619 -301
  8. package/dist/components/char-count/CharCount.stories.tsx +350 -248
  9. package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
  10. package/dist/components/chip/Chip.stories.tsx +362 -168
  11. package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -636
  12. package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
  13. package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
  14. package/dist/components/command/Command.stories.tsx +530 -867
  15. package/dist/components/dialog/Dialog.stories.tsx +501 -950
  16. package/dist/components/divider/Divider.stories.tsx +264 -527
  17. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  18. package/dist/components/drawer/Drawer.stories.tsx +659 -1023
  19. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
  20. package/dist/components/form/Form.stories.tsx +560 -274
  21. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  22. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
  23. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  24. package/dist/components/if-else/if-else.stories.tsx +370 -83
  25. package/dist/components/input/Input.stories.tsx +436 -368
  26. package/dist/components/label/Label.stories.tsx +156 -154
  27. package/dist/components/list/List.stories.tsx +484 -835
  28. package/dist/components/marquee/Marquee.stories.tsx +356 -712
  29. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
  30. package/dist/components/overlay/Overlay.stories.tsx +452 -824
  31. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  32. package/dist/components/popover/Popover.stories.tsx +481 -896
  33. package/dist/components/radio/Radio.stories.tsx +432 -124
  34. package/dist/components/resizable/Resizable.stories.tsx +495 -799
  35. package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
  36. package/dist/components/search/Search.stories.tsx +312 -595
  37. package/dist/components/select/Select.stories.tsx +684 -789
  38. package/dist/components/sheet/Sheet.stories.tsx +671 -950
  39. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  40. package/dist/components/slider/Slider.stories.tsx +383 -760
  41. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  42. package/dist/components/switch/Switch.stories.tsx +461 -208
  43. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  44. package/dist/components/table/Table.stories.tsx +770 -916
  45. package/dist/components/tabs/Tabs.stories.tsx +458 -1455
  46. package/dist/components/tag/Tag.stories.tsx +714 -542
  47. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  48. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
  49. package/dist/components/toast/Toast.stories.tsx +452 -1339
  50. package/dist/components/toggle/Toggle.stories.tsx +488 -931
  51. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
  52. package/dist/components/typography/Typography.stories.tsx +406 -89
  53. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  54. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  55. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  56. package/dist/icons/Icons.stories.tsx +0 -12
  57. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
  58. package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
  59. package/dist/icons/all-icons.tsx +37 -16
  60. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
  61. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
  62. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
  63. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
  64. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
  65. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
  66. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
  67. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
  68. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
  69. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
  70. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
  71. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
  72. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
  73. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
  74. package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
  75. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
  76. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
  77. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
  78. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
  79. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
  80. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
  81. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
  82. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
  83. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
  84. package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
  85. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
  86. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
  87. package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
  88. package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
  89. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
  90. package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
  91. package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
  92. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
  93. package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
  94. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
  95. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
  96. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
  97. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
  98. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
  99. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
  100. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
  101. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
  102. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
  103. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
  104. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
  105. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
  106. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
  107. package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
  108. package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
  109. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
  110. package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
  111. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
  112. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
  113. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
  114. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
  115. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
  116. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
  117. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
  118. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
  119. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
  120. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
  121. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
  122. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
  123. package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
  124. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
  125. package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
  126. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
  127. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
  128. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
  129. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
  130. package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
  131. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
  132. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
  133. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
  134. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
  135. package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
  136. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
  137. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
  138. package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
  139. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
  140. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
  141. package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
  142. package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
  143. package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
  144. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
  145. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
  146. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
  147. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
  148. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
  149. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
  150. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
  151. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
  152. package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
  153. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
  154. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
  155. package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
  156. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
  157. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
  158. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
  159. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
  160. package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
  161. package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
  162. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
  163. package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
  164. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
  165. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
  166. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
  167. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
  168. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
  169. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
  170. package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
  171. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
  172. package/dist/index.cjs +1 -1
  173. package/dist/index.js +1 -1
  174. 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 { GripVerticalIcon } from "src/ui/icons/grip-vertical-icon"
5
+ import { PlusIcon } from "src/ui/icons/plus-icon"
6
+ import { SearchIcon } from "src/ui/icons/search-icon"
7
+ import { SettingIcon } from "src/ui/icons/setting-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 { CommandIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof CommandIcon> = {
@@ -18,903 +32,72 @@ const meta: Meta<typeof CommandIcon> = {
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-icon-info/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-icon-info/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
90
- <CommandIcon className="text-fm-icon-info h-12 w-12" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- CommandIcon
94
- </h1>
95
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
96
- A distinctive command key icon representing keyboard
97
- shortcuts, system commands, and power user functionality.
98
- Built with accessibility in mind using Radix UI's
99
- AccessibleIcon 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-icon-info 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
- Shortcuts
125
- </div>
126
- <div className="text-fm-tertiary text-sm">
127
- Command symbols
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 { CommandIcon } from "@icons/command-icon"
150
-
151
- function ShortcutHint() {
35
+ <AuralIconDocsPage
36
+ accentToken="info"
37
+ features={[
38
+ { title: "Keyboard", description: "Command / keyboard shortcut" },
39
+ { title: "Quick Actions", description: "Command palette trigger" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { CommandIcon } from "src/ui/icons/command-icon"
44
+
45
+ function CommandPalette() {
152
46
  return (
153
- <div className="flex items-center gap-2">
154
- <CommandIcon className="h-4 w-4 text-blue-400 " />
155
- <span>+ K to open command palette</span>
156
- </div>
47
+ <button className="flex items-center gap-2">
48
+ <CommandIcon className="h-4 w-4 text-fm-icon-inactive" />
49
+ <span>K</span>
50
+ </button>
157
51
  )
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
- <CommandIcon className="text-fm-icon-info h-4 w-4" />
170
- <span className="text-fm-icon-active">
171
- + K to search
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
- 24
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
- className
255
- </td>
256
- <td className="text-fm-secondary! px-6 py-4 text-sm">
257
- string
258
- </td>
259
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
260
- -
261
- </td>
262
- <td className="text-fm-secondary! px-6 py-4 text-sm">
263
- CSS classes for styling (use for overrides)
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
- strokeWidth
269
- </td>
270
- <td className="text-fm-secondary! px-6 py-4 text-sm">
271
- number | string
272
- </td>
273
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
274
- 1.5
275
- </td>
276
- <td className="text-fm-secondary! px-6 py-4 text-sm">
277
- Stroke width of the command symbol
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
- <CommandIcon 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
- <CommandIcon 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
- <CommandIcon 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
- <CommandIcon 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
- <CommandIcon 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
- <CommandIcon 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
- <CommandIcon className="h-4 w-4 " />
359
-
360
- // Medium (24px)
361
- <CommandIcon className="h-6 w-6 " />
362
-
363
- // Large (32px)
364
- <CommandIcon className="h-8 w-8 " />
365
-
366
- // Custom size
367
- <CommandIcon 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
- Semantic Colors
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
- <CommandIcon className="text-fm-icon-info h-6 w-6" />
389
- <div>
390
- <div className="text-fm-icon-active text-sm font-medium">
391
- Primary
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
- <CommandIcon className="text-fm-placeholder h-6 w-6" />
400
- <div>
401
- <div className="text-fm-icon-active text-sm font-medium">
402
- Secondary
403
- </div>
404
- <div className="text-fm-tertiary text-xs">
405
- text-fm-placeholder
406
- </div>
407
- </div>
408
- </div>
409
- <div className="flex items-center gap-4">
410
- <CommandIcon className="text-fm-icon-info h-6 w-6" />
411
- <div>
412
- <div className="text-fm-icon-active text-sm font-medium">
413
- Accent
414
- </div>
415
- <div className="text-fm-tertiary text-xs">
416
- text-fm-icon-info
417
- </div>
418
- </div>
419
- </div>
420
- <div className="flex items-center gap-4">
421
- <CommandIcon className="text-fm-placeholder h-6 w-6" />
422
- <div>
423
- <div className="text-fm-icon-active text-sm font-medium">
424
- Disabled
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 with
441
- <CommandIcon className="h-6 w-6 text-blue-400 " />
442
- <CommandIcon className="h-6 w-6 text-cyan-500 " />
443
-
444
- // Using CSS custom properties
445
- <CommandIcon
446
- className="h-6 w-6 "
447
- style={{ color: 'var(--color-primary)' }}
448
- />
449
-
450
- // Direct stroke prop
451
- <CommandIcon
452
- width={24}
453
- height={24}
454
- stroke="#3b82f6"
455
- />`}
456
- </pre>
457
- </div>
458
- </div>
459
- </div>
460
- </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
- {/* Keyboard Shortcuts */}
470
- <div className="!space-y-4">
471
- <h3 className="text-fm-icon-info! text-lg font-semibold">
472
- Keyboard Shortcuts
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="space-y-3">
477
- <div className="flex items-center justify-between">
478
- <span className="text-fm-icon-active">
479
- Quick Search
480
- </span>
481
- <div className="flex items-center gap-1">
482
- <kbd className="border-fm-divider-primary bg-fm-surface-secondary flex h-6 w-6 items-center justify-center rounded border text-xs">
483
- <CommandIcon className="text-fm-secondary h-3 w-3" />
484
- </kbd>
485
- <span className="text-fm-tertiary">+</span>
486
- <kbd className="border-fm-divider-primary bg-fm-surface-secondary text-fm-secondary flex h-6 w-6 items-center justify-center rounded border text-xs">
487
- K
488
- </kbd>
489
- </div>
490
- </div>
491
- <div className="flex items-center justify-between">
492
- <span className="text-fm-icon-active">
493
- New File
494
- </span>
495
- <div className="flex items-center gap-1">
496
- <kbd className="border-fm-divider-primary bg-fm-surface-secondary flex h-6 w-6 items-center justify-center rounded border text-xs">
497
- <CommandIcon className="text-fm-secondary h-3 w-3" />
498
- </kbd>
499
- <span className="text-fm-tertiary">+</span>
500
- <kbd className="border-fm-divider-primary bg-fm-surface-secondary text-fm-secondary flex h-6 w-6 items-center justify-center rounded border text-xs">
501
- N
502
- </kbd>
503
- </div>
504
- </div>
505
- <div className="flex items-center justify-between">
506
- <span className="text-fm-icon-active">Save</span>
507
- <div className="flex items-center gap-1">
508
- <kbd className="border-fm-divider-primary bg-fm-surface-secondary flex h-6 w-6 items-center justify-center rounded border text-xs">
509
- <CommandIcon className="text-fm-secondary h-3 w-3" />
510
- </kbd>
511
- <span className="text-fm-tertiary">+</span>
512
- <kbd className="border-fm-divider-primary bg-fm-surface-secondary text-fm-secondary flex h-6 w-6 items-center justify-center rounded border text-xs">
513
- S
514
- </kbd>
515
- </div>
516
- </div>
517
- </div>
518
- </div>
519
- <div className="bg-fm-surface-secondary rounded-lg p-4">
520
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
521
- {`// Keyboard shortcut display
522
- <div className="flex items-center gap-1">
523
- <kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10">
524
- <CommandIcon className="h-3 w-3 text-white/70 " />
525
- </kbd>
526
- <span>+</span>
527
- <kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10">
528
- K
529
- </kbd>
530
- </div>
531
-
532
- // Shortcut hint
533
- <div className="flex items-center gap-2 text-sm text-white/60">
534
- <CommandIcon className="h-3 w-3 " />
535
- <span>+ K to open command palette</span>
536
- </div>`}
537
- </pre>
538
- </div>
539
- </div>
540
- </div>
541
-
542
- {/* Command Palette */}
543
- <div className="!space-y-4">
544
- <h3 className="text-fm-icon-info! text-lg font-semibold">
545
- Command Palette
546
- </h3>
547
- <div className="!space-y-4">
548
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
549
- <div className="space-y-3">
550
- <div className="border-fm-divider-secondary flex items-center gap-3 border-b pb-3">
551
- <CommandIcon className="text-fm-icon-info h-5 w-5" />
552
- <input
553
- type="text"
554
- placeholder="Type a command..."
555
- className="text-fm-icon-active flex-1 bg-transparent placeholder-white/50 focus:outline-none"
556
- />
557
- </div>
558
- <div className="space-y-1">
559
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-2 py-1">
560
- <CommandIcon className="text-fm-tertiary h-4 w-4" />
561
- <span className="text-fm-icon-active">
562
- Create new file
563
- </span>
564
- </div>
565
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-2 py-1">
566
- <CommandIcon className="text-fm-tertiary h-4 w-4" />
567
- <span className="text-fm-icon-active">
568
- Open recent
569
- </span>
570
- </div>
571
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-2 py-1">
572
- <CommandIcon className="text-fm-tertiary h-4 w-4" />
573
- <span className="text-fm-icon-active">
574
- Toggle sidebar
575
- </span>
576
- </div>
577
- </div>
578
- </div>
579
- </div>
580
- <div className="bg-fm-surface-secondary rounded-lg p-4">
581
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
582
- {`// Command palette header
583
- <div className="flex items-center gap-3 border-b border-white/10 pb-3">
584
- <CommandIcon className="h-5 w-5 text-blue-400 " />
585
- <input
586
- type="text"
587
- placeholder="Type a command..."
588
- className="flex-1 bg-transparent text-white placeholder-white/50"
589
- />
590
- </div>
591
-
592
- // Command items
593
- <div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
594
- <CommandIcon className="h-4 w-4 text-white/60 " />
595
- <span className="text-white">Create new file</span>
596
- </div>`}
597
- </pre>
598
- </div>
599
- </div>
600
- </div>
601
-
602
- {/* Button Integration */}
603
- <div className="!space-y-4">
604
- <h3 className="text-fm-icon-info! text-lg font-semibold">
605
- Button Integration
606
- </h3>
607
- <div className="!space-y-4">
608
- <div className="flex gap-4">
609
- <button className="border-fm-icon-info/30 bg-fm-icon-info/20 text-fm-icon-info hover:bg-fm-icon-info/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
610
- <CommandIcon className="h-4 w-4" />
611
- Open Command Menu
612
- </button>
613
- <button className="border-fm-divider-primary bg-fm-surface-tertiary/20 text-fm-secondary hover:bg-fm-surface-tertiary/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
614
- <CommandIcon className="h-4 w-4" />
615
- Shortcuts
616
- </button>
617
- </div>
618
- <div className="bg-fm-surface-secondary rounded-lg p-4">
619
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
620
- {`// Command menu button
621
- <button className="flex items-center gap-2 bg-blue-500/20 border border-blue-500/30 px-4 py-2 rounded-lg">
622
- <CommandIcon className="h-4 w-4 " />
623
- Open Command Menu
624
- </button>
625
-
626
- // Shortcuts button
627
- <button className="flex items-center gap-2 bg-gray-500/20 border border-gray-500/30 px-4 py-2 rounded-lg">
628
- <CommandIcon className="h-4 w-4 " />
629
- Shortcuts
630
- </button>`}
631
- </pre>
632
- </div>
633
- </div>
634
- </div>
635
-
636
- {/* Help Documentation */}
637
- <div className="!space-y-4">
638
- <h3 className="text-fm-icon-info! text-lg font-semibold">
639
- Help Documentation
640
- </h3>
641
- <div className="!space-y-4">
642
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
643
- <div className="space-y-4">
644
- <div className="flex items-start gap-3">
645
- <CommandIcon className="text-fm-icon-info mt-0.5 h-5 w-5 flex-shrink-0" />
646
- <div>
647
- <h4 className="text-fm-icon-active! font-medium">
648
- Power User Tips
649
- </h4>
650
- <p className="text-fm-secondary! text-sm">
651
- Use Command key combinations to navigate faster
652
- and boost your productivity.
653
- </p>
654
- </div>
655
- </div>
656
- <div className="text-fm-tertiary ml-8 space-y-2 text-sm">
657
- <div>
658
- <CommandIcon className="mr-2 inline h-3 w-3" />+
659
- K: Quick search
660
- </div>
661
- <div>
662
- <CommandIcon className="mr-2 inline h-3 w-3" />+
663
- P: Command palette
664
- </div>
665
- <div>
666
- <CommandIcon className="mr-2 inline h-3 w-3" />+
667
- /: Show all shortcuts
668
- </div>
669
- </div>
670
- </div>
671
- </div>
672
- <div className="bg-fm-surface-secondary rounded-lg p-4">
673
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
674
- {`// Help section with command icon
675
- <div className="flex items-start gap-3">
676
- <CommandIcon className="mt-0.5 h-5 w-5 flex-shrink-0 text-blue-400 " />
677
- <div>
678
- <h4 className="font-medium text-white">Power User Tips</h4>
679
- <p className="text-sm text-white/70">
680
- Use Command key combinations to navigate faster and boost your productivity.
681
- </p>
682
- </div>
683
- </div>
684
-
685
- // Inline shortcut references
686
- <div>
687
- <CommandIcon className="mr-2 inline h-3 w-3 " />
688
- + K: Quick search
689
- </div>`}
690
- </pre>
691
- </div>
692
- </div>
693
- </div>
694
- </div>
695
- </div>
696
-
697
- {/* Accessibility */}
698
- <div className="!space-y-8">
699
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
700
- Accessibility Features
701
- </h2>
702
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
703
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
704
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
705
- ✅ Built-in Features
706
- </h3>
707
- <ul className="text-fm-secondary! !space-y-2 text-sm">
708
- <li className="text-fm-secondary!">
709
- Uses Radix UI AccessibleIcon wrapper
710
- </li>
711
- <li className="text-fm-secondary!">
712
- Provides screen reader label "Command icon"
713
- </li>
714
- <li className="text-fm-secondary!">
715
- Supports keyboard navigation when interactive
716
- </li>
717
- <li className="text-fm-secondary!">
718
- Maintains proper color contrast ratios
719
- </li>
720
- <li className="text-fm-secondary!">
721
- Scales with user's font size preferences
722
- </li>
723
- </ul>
724
- </div>
725
-
726
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
727
- <h3 className="text-fm-icon-info! text-lg font-semibold">
728
- 💡 Best Practices
729
- </h3>
730
- <ul className="text-fm-secondary !space-y-2 text-sm">
731
- <li className="text-fm-secondary!">
732
- Always pair with descriptive text or alt text
733
- </li>
734
- <li className="text-fm-secondary!">
735
- Use consistent shortcut patterns across your app
736
- </li>
737
- <li className="text-fm-secondary!">
738
- Provide alternative navigation methods
739
- </li>
740
- <li className="text-fm-secondary!">
741
- Add focus states for interactive elements
742
- </li>
743
- <li className="text-fm-secondary!">
744
- Consider screen reader announcements for shortcuts
745
- </li>
746
- </ul>
747
- </div>
748
- </div>
749
-
750
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
751
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
752
- Proper ARIA Implementation
753
- </h3>
754
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
755
- <div className="bg-fm-surface-secondary rounded-lg p-4">
756
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
757
- {`// Keyboard shortcut with proper ARIA
758
- <button
759
- aria-label="Open command palette (Cmd+K)"
760
- className="flex items-center gap-2"
761
- >
762
- <CommandIcon className="h-4 w-4 " />
763
- Command Menu
764
- </button>
765
-
766
- // Shortcut display with screen reader text
767
- <div
768
- role="group"
769
- aria-label="Keyboard shortcut: Command plus K"
770
- >
771
- <CommandIcon className="h-4 w-4 " />
772
- <span aria-hidden="true">+ K</span>
773
- <span className="sr-only">Command plus K</span>
774
- </div>
775
-
776
- // Command palette with live region
777
- <div
778
- role="combobox"
779
- aria-expanded="true"
780
- aria-label="Command palette"
781
- >
782
- <CommandIcon className="h-5 w-5 " />
783
- <input
784
- type="text"
785
- aria-label="Search commands"
786
- placeholder="Type a command..."
787
- />
788
- </div>`}
789
- </pre>
790
- </div>
791
- <div className="!space-y-4">
792
- <p className="text-fm-secondary! text-sm">
793
- Always provide context-appropriate ARIA labels for
794
- command interfaces. The Command icon should indicate
795
- keyboard-driven functionality and shortcuts.
796
- </p>
797
- <div className="border-fm-icon-info/20 bg-fm-icon-info/10 rounded-lg border p-4">
798
- <div className="text-fm-icon-info flex items-center gap-2 text-sm">
799
- <CommandIcon className="h-4 w-4" />
800
- <span>
801
- Consider the user's platform (⌘ on Mac, Ctrl on
802
- Windows)
803
- </span>
804
- </div>
805
- </div>
806
- </div>
807
- </div>
808
- </div>
809
- </div>
810
-
811
- {/* Related Icons */}
812
- <div className="!space-y-8">
813
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
814
- Related Icons
815
- </h2>
816
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
817
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
818
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
819
- <span className="text-2xl">⌨️</span>
820
- </div>
821
- <div>
822
- <div className="text-fm-icon-active font-medium">
823
- KeyboardIcon
824
- </div>
825
- <div className="text-fm-tertiary text-xs">
826
- Keyboard input
827
- </div>
828
- </div>
829
- </div>
830
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
831
- <div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
832
- <span className="text-2xl">🔍</span>
833
- </div>
834
- <div>
835
- <div className="text-fm-icon-active font-medium">
836
- SearchIcon
837
- </div>
838
- <div className="text-fm-tertiary text-xs">
839
- Search function
840
- </div>
841
- </div>
842
- </div>
843
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
844
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
845
- <span className="text-2xl">⚙️</span>
846
- </div>
847
- <div>
848
- <div className="text-fm-icon-active font-medium">
849
- SettingsIcon
850
- </div>
851
- <div className="text-fm-tertiary text-xs">
852
- Configuration
853
- </div>
854
- </div>
855
- </div>
856
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
857
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
858
- <span className="text-2xl">📋</span>
859
- </div>
860
- <div>
861
- <div className="text-fm-icon-active font-medium">
862
- MenuIcon
863
- </div>
864
- <div className="text-fm-tertiary text-xs">
865
- Menu options
866
- </div>
867
- </div>
868
- </div>
869
- </div>
870
- </div>
871
- </div>
872
-
873
- {/* Footer */}
874
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
875
- <div className="!mx-auto max-w-7xl px-6 py-8">
876
- <div className="!space-y-4 text-center">
877
- <p className="text-fm-tertiary!">
878
- CommandIcon is part of the Aural UI icon library, built with
879
- accessibility and keyboard navigation in mind.
880
- </p>
881
- <p className="text-fm-placeholder! text-sm">
882
- All icons use Radix UI's AccessibleIcon for screen reader
883
- compatibility and follow WCAG guidelines.
884
- </p>
885
- </div>
52
+ }`,
53
+ livePreview: (
54
+ <div className="flex items-center gap-1">
55
+ <CommandIcon className="text-fm-icon-inactive h-4 w-4" />
56
+ <span className="text-fm-secondary font-fm-text text-sm">
57
+ K
58
+ </span>
886
59
  </div>
887
- </div>
888
- </div>
889
- </>
60
+ ),
61
+ }}
62
+ relatedIcons={[
63
+ {
64
+ name: "SearchIcon",
65
+ description: "Search / find icon",
66
+ icon: SearchIcon,
67
+ accentToken: "info",
68
+ },
69
+ {
70
+ name: "SettingIcon",
71
+ description: "Settings / preferences icon",
72
+ icon: SettingIcon,
73
+ accentToken: "positive",
74
+ },
75
+ {
76
+ name: "PlusIcon",
77
+ description: "Add / create action icon",
78
+ icon: PlusIcon,
79
+ accentToken: "warning",
80
+ },
81
+ {
82
+ name: "GripVerticalIcon",
83
+ description: "Drag handle icon",
84
+ icon: GripVerticalIcon,
85
+ accentToken: "negative",
86
+ },
87
+ ]}
88
+ />
890
89
  ),
891
90
  },
892
91
  },
893
92
  tags: ["autodocs"],
894
93
  argTypes: {
895
- width: {
896
- control: { type: "range", min: 8, max: 96, step: 2 },
897
- description: "Width of the icon in pixels",
94
+ className: {
95
+ control: "text",
96
+ description: "CSS classes including color token",
898
97
  },
899
98
  withAccessibility: {
900
99
  control: "boolean",
901
- description: "Whether to wrap the icon with accessibility features",
902
- },
903
- height: {
904
- control: { type: "range", min: 8, max: 96, step: 2 },
905
- description: "Height of the icon in pixels",
906
- },
907
- stroke: {
908
- control: "color",
909
- description: "Stroke color of the icon",
910
- },
911
- strokeWidth: {
912
- control: { type: "range", min: 0.5, max: 3, step: 0.1 },
913
- description: "Stroke width of the command symbol",
914
- },
915
- className: {
916
- control: "text",
917
- description: "CSS classes for styling (use for overrides)",
100
+ description: "Wrap with accessibility label",
918
101
  },
919
102
  },
920
103
  }
@@ -922,233 +105,87 @@ function ShortcutHint() {
922
105
  export default meta
923
106
  type Story = StoryObj<typeof CommandIcon>
924
107
 
925
- // Story parameters for consistent dark theme
926
- const storyParameters = {
927
- backgrounds: {
928
- default: "dark",
929
- values: [
930
- { name: "dark", value: "var(--color-fm-surface-primary)" },
931
- { name: "darker", value: "var(--color-fm-neutral-0)" },
932
- ],
933
- },
934
- }
935
-
936
108
  export const Default: Story = {
937
109
  args: {
938
- width: 24,
939
- height: 24,
940
- className: "text-fm-icon-info ",
110
+ className: "h-6 w-6 text-fm-icon-active",
941
111
  withAccessibility: true,
942
112
  },
943
- parameters: storyParameters,
944
113
  render: (args) => (
945
- <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>
946
115
  <CommandIcon {...args} />
947
- </div>
116
+ </IconDefaultCanvas>
948
117
  ),
949
118
  }
950
119
 
951
120
  export const SizeVariations: Story = {
952
- parameters: {
953
- ...storyParameters,
954
- docs: {
955
- description: {
956
- story:
957
- "CommandIcon in different sizes, from small shortcuts to large command interfaces.",
958
- },
959
- },
960
- },
961
- render: () => (
962
- <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">
963
- <div className="text-center">
964
- <CommandIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
965
- <span className="text-fm-tertiary text-xs">12px</span>
966
- </div>
967
- <div className="text-center">
968
- <CommandIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
969
- <span className="text-fm-tertiary text-xs">16px</span>
970
- </div>
971
- <div className="text-center">
972
- <CommandIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
973
- <span className="text-fm-tertiary text-xs">20px</span>
974
- </div>
975
- <div className="text-center">
976
- <CommandIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
977
- <span className="text-fm-tertiary text-xs">24px</span>
978
- </div>
979
- <div className="text-center">
980
- <CommandIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
981
- <span className="text-fm-tertiary text-xs">32px</span>
982
- </div>
983
- <div className="text-center">
984
- <CommandIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
985
- <span className="text-fm-tertiary text-xs">48px</span>
986
- </div>
987
- </div>
988
- ),
121
+ render: () => <IconSizeVariations icon={CommandIcon} />,
989
122
  }
990
123
 
991
124
  export const ColorVariations: Story = {
992
- parameters: {
993
- ...storyParameters,
994
- docs: {
995
- description: {
996
- story:
997
- "CommandIcon in different semantic colors for various command contexts.",
998
- },
999
- },
1000
- },
1001
- render: () => (
1002
- <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">
1003
- <div className="text-center">
1004
- <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">
1005
- <CommandIcon className="text-fm-icon-info h-8 w-8" />
1006
- </div>
1007
- <div className="text-fm-icon-active text-sm font-medium">Primary</div>
1008
- <div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
1009
- </div>
1010
- <div className="text-center">
1011
- <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">
1012
- <CommandIcon className="text-fm-placeholder h-8 w-8" />
1013
- </div>
1014
- <div className="text-fm-icon-active text-sm font-medium">Secondary</div>
1015
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
1016
- </div>
1017
- <div className="text-center">
1018
- <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">
1019
- <CommandIcon className="text-fm-icon-info h-8 w-8" />
1020
- </div>
1021
- <div className="text-fm-icon-active text-sm font-medium">Accent</div>
1022
- <div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
1023
- </div>
1024
- <div className="text-center">
1025
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
1026
- <CommandIcon className="text-fm-placeholder h-8 w-8" />
1027
- </div>
1028
- <div className="text-fm-icon-active text-sm font-medium">Disabled</div>
1029
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
1030
- </div>
1031
- </div>
1032
- ),
125
+ render: () => <IconColorVariations icon={CommandIcon} />,
1033
126
  }
1034
127
 
1035
128
  export const UsageExamples: Story = {
1036
- parameters: {
1037
- ...storyParameters,
1038
- docs: {
1039
- description: {
1040
- story:
1041
- "Real-world usage examples showing CommandIcon in different command interface contexts.",
1042
- },
1043
- },
1044
- },
1045
129
  render: () => (
1046
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
1047
- {/* Keyboard Shortcuts */}
1048
- <div className="!space-y-2">
1049
- <h3 className="text-fm-icon-active text-sm font-medium">
1050
- Keyboard Shortcuts
1051
- </h3>
1052
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
1053
- <div className="space-y-3">
1054
- <div className="flex items-center justify-between">
1055
- <span className="text-fm-icon-active">Quick Search</span>
1056
- <div className="flex items-center gap-1">
1057
- <kbd className="border-fm-divider-primary bg-fm-surface-secondary flex h-6 w-6 items-center justify-center rounded border text-xs">
1058
- <CommandIcon className="text-fm-secondary h-3 w-3" />
1059
- </kbd>
1060
- <span className="text-fm-tertiary">+</span>
1061
- <kbd className="border-fm-divider-primary bg-fm-surface-secondary text-fm-secondary flex h-6 w-6 items-center justify-center rounded border text-xs">
1062
- K
1063
- </kbd>
1064
- </div>
1065
- </div>
1066
- <div className="flex items-center justify-between">
1067
- <span className="text-fm-icon-active">New File</span>
1068
- <div className="flex items-center gap-1">
1069
- <kbd className="border-fm-divider-primary bg-fm-surface-secondary flex h-6 w-6 items-center justify-center rounded border text-xs">
1070
- <CommandIcon className="text-fm-secondary h-3 w-3" />
1071
- </kbd>
1072
- <span className="text-fm-tertiary">+</span>
1073
- <kbd className="border-fm-divider-primary bg-fm-surface-secondary text-fm-secondary flex h-6 w-6 items-center justify-center rounded border text-xs">
1074
- N
1075
- </kbd>
1076
- </div>
1077
- </div>
1078
- </div>
130
+ <IconUsageCanvas>
131
+ <IconUsageSection title="Keyboard Shortcut Hint">
132
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-1.5 rounded-xl border px-3 py-1.5">
133
+ <CommandIcon className="text-fm-icon-inactive h-3.5 w-3.5" />
134
+ <span className="text-fm-secondary font-fm-text text-xs">K</span>
1079
135
  </div>
1080
- </div>
1081
-
1082
- {/* Command Palette */}
1083
- <div className="!space-y-2">
1084
- <h3 className="text-fm-icon-active text-sm font-medium">
1085
- Command Palette
1086
- </h3>
1087
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
1088
- <div className="space-y-3">
1089
- <div className="border-fm-divider-secondary flex items-center gap-3 border-b pb-3">
1090
- <CommandIcon className="text-fm-icon-info h-5 w-5" />
1091
- <input
1092
- type="text"
1093
- placeholder="Type a command..."
1094
- className="text-fm-icon-active flex-1 bg-transparent placeholder-white/50 focus:outline-none"
1095
- />
1096
- </div>
1097
- <div className="space-y-1">
1098
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-2 py-1">
1099
- <CommandIcon className="text-fm-tertiary h-4 w-4" />
1100
- <span className="text-fm-icon-active">Create new file</span>
1101
- </div>
1102
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-2 py-1">
1103
- <CommandIcon className="text-fm-tertiary h-4 w-4" />
1104
- <span className="text-fm-icon-active">Toggle sidebar</span>
1105
- </div>
1106
- </div>
136
+ </IconUsageSection>
137
+
138
+ <IconUsageSection title="Command Palette Trigger">
139
+ <button className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-between rounded-xl border px-4 py-2">
140
+ <div className="flex items-center gap-2">
141
+ <SearchIcon className="text-fm-icon-inactive h-4 w-4" />
142
+ <span className="text-fm-tertiary font-fm-text text-sm">
143
+ Search commands...
144
+ </span>
1107
145
  </div>
146
+ <div className="flex items-center gap-1">
147
+ <CommandIcon className="text-fm-icon-inactive h-3.5 w-3.5" />
148
+ <span className="text-fm-tertiary font-fm-text text-xs">K</span>
149
+ </div>
150
+ </button>
151
+ </IconUsageSection>
152
+
153
+ <IconUsageSection title="Menu Item with Shortcut">
154
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm overflow-hidden rounded-xl border">
155
+ {[
156
+ { label: "Search", shortcut: "K" },
157
+ { label: "Settings", shortcut: "," },
158
+ { label: "New item", shortcut: "N" },
159
+ ].map(({ label, shortcut }) => (
160
+ <button
161
+ key={label}
162
+ className="border-fm-divider-secondary flex w-full items-center justify-between border-b px-4 py-3 last:border-b-0"
163
+ >
164
+ <span className="text-fm-primary font-fm-text text-sm">
165
+ {label}
166
+ </span>
167
+ <div className="flex items-center gap-1">
168
+ <CommandIcon className="text-fm-icon-inactive h-3 w-3" />
169
+ <span className="text-fm-tertiary font-fm-text text-xs">
170
+ {shortcut}
171
+ </span>
172
+ </div>
173
+ </button>
174
+ ))}
1108
175
  </div>
1109
- </div>
1110
-
1111
- {/* Button Integration */}
1112
- <div className="!space-y-2">
1113
- <h3 className="text-fm-icon-active text-sm font-medium">
1114
- Button Integration
1115
- </h3>
1116
- <div className="flex gap-4">
1117
- <button className="border-fm-icon-info/30 bg-fm-icon-info/20 text-fm-icon-info hover:bg-fm-icon-info/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
1118
- <CommandIcon className="h-4 w-4" />
1119
- Open Command Menu
1120
- </button>
1121
- <button className="border-fm-divider-primary bg-fm-surface-tertiary/20 text-fm-secondary hover:bg-fm-surface-tertiary/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
1122
- <CommandIcon className="h-4 w-4" />
1123
- Shortcuts
1124
- </button>
1125
- </div>
1126
- </div>
1127
- </div>
176
+ </IconUsageSection>
177
+ </IconUsageCanvas>
1128
178
  ),
1129
179
  }
1130
180
 
1131
181
  export const Playground: Story = {
1132
- parameters: {
1133
- ...storyParameters,
1134
- docs: {
1135
- description: {
1136
- story:
1137
- "Interactive playground to experiment with different CommandIcon configurations.",
1138
- },
1139
- },
1140
- },
1141
182
  args: {
1142
- width: 32,
1143
- height: 32,
1144
- className: "text-fm-icon-info ",
1145
- strokeWidth: 1.5,
183
+ className: "h-8 w-8 text-fm-icon-active",
184
+ withAccessibility: true,
1146
185
  },
1147
186
  render: (args) => (
1148
- <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">
1149
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1150
- <CommandIcon {...args} />
1151
- </div>
1152
- </div>
187
+ <IconPlaygroundCanvas>
188
+ <CommandIcon {...args} />
189
+ </IconPlaygroundCanvas>
1153
190
  ),
1154
191
  }