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 { FilterBarRowIcon } from "src/ui/icons/filter-bar-row-icon"
5
+ import { GlobeIcon } from "src/ui/icons/globe-icon"
6
+ import { PageSearchIcon } from "src/ui/icons/page-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 { SearchIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof SearchIcon> = {
@@ -18,1009 +32,69 @@ const meta: Meta<typeof SearchIcon> = {
18
32
  },
19
33
  docs: {
20
34
  page: () => (
21
- <>
22
- {/* Override default docs styling */}
23
- <style>
24
- {`
25
- .sbdocs-wrapper {
26
- padding: 0 !important;
27
- max-width: none !important;
28
- background: transparent !important;
29
- }
30
- .sbdocs-content {
31
- max-width: none !important;
32
- padding: 0 !important;
33
- margin: 0 !important;
34
- background: transparent !important;
35
- }
36
- .docs-story {
37
- background: transparent !important;
38
- }
39
- .sbdocs {
40
- background: transparent !important;
41
- }
42
- body {
43
- background: var(--color-fm-surface-primary) !important;
44
- }
45
- #storybook-docs {
46
- background: var(--color-fm-surface-primary) !important;
47
- }
48
- .sbdocs-preview {
49
- background: transparent !important;
50
- border: none !important;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: var(--color-fm-icon-active) !important;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: var(--color-fm-secondary) !important;
57
- }
58
- .sbdocs-code {
59
- background: var(--color-fm-surface-secondary) !important;
60
- color: var(--color-fm-secondary-500) !important;
61
- border: 1px solid var(--color-fm-divider-secondary) !important;
62
- }
63
- .sbdocs-pre {
64
- background: var(--color-fm-surface-secondary) !important;
65
- border: 1px solid var(--color-fm-divider-secondary) !important;
66
- }
67
- .sbdocs-table {
68
- background: var(--color-fm-surface-secondary) !important;
69
- border: 1px solid var(--color-fm-divider-secondary) !important;
70
- }
71
- .sbdocs-table th {
72
- background: var(--color-fm-surface-secondary) !important;
73
- color: var(--color-fm-icon-active) !important;
74
- border-bottom: 1px solid var(--color-fm-divider-secondary) !important;
75
- }
76
- .sbdocs-table td {
77
- color: var(--color-fm-secondary) !important;
78
- border-bottom: 1px solid var(--color-fm-divider-tertiary) !important;
79
- }
80
- @keyframes search-pulse {
81
- 0%, 100% { transform: scale(1); opacity: 1; }
82
- 50% { transform: scale(1.05); opacity: 0.8; }
83
- }
84
- .animate-search-pulse {
85
- animation: search-pulse 2s ease-in-out infinite;
86
- }
87
- @keyframes search-bounce {
88
- 0%, 100% { transform: translateY(0); }
89
- 50% { transform: translateY(-4px); }
90
- }
91
- .animate-search-bounce {
92
- animation: search-bounce 1.5s ease-in-out infinite;
93
- }
94
- @keyframes search-glow {
95
- 0%, 100% { filter: drop-shadow(0 0 2px currentColor); }
96
- 50% { filter: drop-shadow(0 0 8px currentColor); }
97
- }
98
- .animate-search-glow {
99
- animation: search-glow 2s ease-in-out infinite;
100
- }
101
- `}
102
- </style>
103
-
104
- <div className="from-fm-surface-primary via-fm-icon-info/5 to-fm-surface-primary min-h-screen bg-linear-to-br">
105
- {/* Header */}
106
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
107
- <div className="from-fm-icon-info/10 to-fm-secondary-500/10 absolute inset-0 bg-linear-to-r via-transparent" />
108
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
109
- <div className="!space-y-6 text-center">
110
- <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">
111
- <SearchIcon className="text-fm-icon-info h-12 w-12" />
112
- </div>
113
- <h1 className="!text-fm-primary text-5xl font-bold">
114
- SearchIcon
115
- </h1>
116
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
117
- A versatile search icon for search inputs, filters, and
118
- discovery features. Perfect for search bars, data tables,
119
- and navigation. Built with accessibility in mind using Radix
120
- UI's AccessibleIcon wrapper.
121
- </p>
122
-
123
- {/* Stats */}
124
- <div className="flex items-center justify-center gap-8 pt-8">
125
- <div className="text-center">
126
- <div className="text-fm-icon-info text-3xl font-bold">
127
- Discover
128
- </div>
129
- <div className="text-fm-tertiary text-sm">
130
- Find what you need
131
- </div>
132
- </div>
133
- <div className="bg-fm-divider-primary h-8 w-px" />
134
- <div className="text-center">
135
- <div className="text-fm-secondary-600 text-3xl font-bold">
136
- Filter
137
- </div>
138
- <div className="text-fm-tertiary text-sm">
139
- Refine your results
140
- </div>
141
- </div>
142
- <div className="bg-fm-divider-primary h-8 w-px" />
143
- <div className="text-center">
144
- <div className="text-fm-icon-info text-3xl font-bold">
145
- Explore
146
- </div>
147
- <div className="text-fm-tertiary text-sm">
148
- Navigate content
149
- </div>
150
- </div>
151
- </div>
152
- </div>
153
- </div>
154
- </div>
155
-
156
- {/* Content */}
157
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
158
- {/* Quick Usage */}
159
- <div className="!space-y-8">
160
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
161
- Quick Start
162
- </h2>
163
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
164
- <div className="!space-y-4">
165
- <h3 className="text-fm-icon-info! text-xl font-semibold">
166
- Basic Usage
167
- </h3>
168
- <div className="bg-fm-surface-secondary rounded-lg p-4">
169
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
170
- {`import { SearchIcon } from "@icons/search-icon"
171
-
172
- function SearchInput() {
35
+ <AuralIconDocsPage
36
+ accentToken="info"
37
+ features={[
38
+ { title: "Search", description: "Global content search" },
39
+ { title: "Discover", description: "Find stories and episodes" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { SearchIcon } from "src/ui/icons/search-icon"
44
+
45
+ function SearchBar() {
173
46
  return (
174
- <div className="relative">
175
- <SearchIcon className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400" />
176
- <input
177
- type="text"
178
- placeholder="Search..."
179
- className="pl-10 pr-4 py-2 rounded-lg"
180
- />
47
+ <div className="flex items-center gap-2 rounded-xl border px-4 py-2">
48
+ <SearchIcon className="h-4 w-4 text-fm-icon-inactive" />
49
+ <input placeholder="Search..." />
181
50
  </div>
182
51
  )
183
- }`}
184
- </pre>
185
- </div>
186
- </div>
187
-
188
- <div className="!space-y-4">
189
- <h3 className="text-fm-icon-info! text-xl font-semibold">
190
- Live Preview
191
- </h3>
192
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
193
- <div className="relative">
194
- <SearchIcon className="text-fm-placeholder absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2" />
195
- <input
196
- type="text"
197
- placeholder="Search..."
198
- className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active focus:border-fm-icon-info rounded-lg border py-2 pr-4 pl-10 placeholder-white/50 focus:ring-2 focus:ring-blue-400/20 focus:outline-none"
199
- />
200
- </div>
201
- </div>
202
- </div>
203
- </div>
204
- </div>
205
-
206
- {/* Props Documentation */}
207
- <div className="!space-y-8">
208
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
209
- Props & Configuration
210
- </h2>
211
-
212
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
213
- <div className="bg-fm-surface-secondary p-4">
214
- <h3 className="text-fm-icon-active! text-xl font-semibold">
215
- Props
216
- </h3>
217
- </div>
218
- <table className="!my-0 w-full">
219
- <thead className="bg-fm-surface-secondary">
220
- <tr className="border-fm-divider-secondary border-b">
221
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
222
- Prop
223
- </th>
224
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
225
- Type
226
- </th>
227
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
228
- Default
229
- </th>
230
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
231
- Description
232
- </th>
233
- </tr>
234
- </thead>
235
- <tbody>
236
- {" "}
237
- <tr className="bg-fm-surface-secondary!">
238
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
239
- withAccessibility
240
- </td>
241
- <td className="text-fm-secondary! px-6 py-4 text-sm">
242
- boolean
243
- </td>
244
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
245
- true
246
- </td>
247
- <td className="text-fm-secondary! px-6 py-4 text-sm">
248
- Whether to wrap the icon with accessibility feature
249
- </td>
250
- </tr>
251
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
252
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
253
- height
254
- </td>
255
- <td className="text-fm-secondary! px-6 py-4 text-sm">
256
- number | string
257
- </td>
258
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
259
- 14
260
- </td>
261
- <td className="text-fm-secondary! px-6 py-4 text-sm">
262
- Height of the icon in pixels
263
- </td>
264
- </tr>
265
- <tr className="border-fm-divider-tertiary border-b">
266
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
267
- stroke
268
- </td>
269
- <td className="text-fm-secondary! px-6 py-4 text-sm">
270
- string
271
- </td>
272
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
273
- currentColor
274
- </td>
275
- <td className="text-fm-secondary! px-6 py-4 text-sm">
276
- Stroke color of the search icon
277
- </td>
278
- </tr>
279
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
280
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
281
- strokeWidth
282
- </td>
283
- <td className="text-fm-secondary! px-6 py-4 text-sm">
284
- number | string
285
- </td>
286
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
287
- 1.5
288
- </td>
289
- <td className="text-fm-secondary! px-6 py-4 text-sm">
290
- Thickness of the stroke lines
291
- </td>
292
- </tr>
293
- <tr className="border-fm-divider-tertiary border-b">
294
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
295
- strokeLinecap
296
- </td>
297
- <td className="text-fm-secondary! px-6 py-4 text-sm">
298
- string
299
- </td>
300
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
301
- square
302
- </td>
303
- <td className="text-fm-secondary! px-6 py-4 text-sm">
304
- Style of line endings
305
- </td>
306
- </tr>
307
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
308
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
309
- className
310
- </td>
311
- <td className="text-fm-secondary! px-6 py-4 text-sm">
312
- string
313
- </td>
314
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
315
- -
316
- </td>
317
- <td className="text-fm-secondary! px-6 py-4 text-sm">
318
- CSS classes for styling
319
- </td>
320
- </tr>
321
- <tr className="bg-fm-surface-secondary!">
322
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
323
- ...svgProps
324
- </td>
325
- <td className="text-fm-secondary! px-6 py-4 text-sm">
326
- SVGProps
327
- </td>
328
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
329
- -
330
- </td>
331
- <td className="text-fm-secondary! px-6 py-4 text-sm">
332
- All standard SVG element props
333
- </td>
334
- </tr>
335
- </tbody>
336
- </table>
337
- </div>
338
- </div>
339
-
340
- {/* Size Variations */}
341
- <div className="!space-y-8">
342
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
343
- Size Variations
344
- </h2>
345
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
346
- <div className="!space-y-6">
347
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
348
- <div className="!space-y-4">
349
- <h3 className="text-fm-icon-info! text-lg font-semibold">
350
- Standard Sizes
351
- </h3>
352
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
353
- <div className="text-center">
354
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
355
- <span className="text-fm-tertiary text-xs">
356
- 12px
357
- </span>
358
- </div>
359
- <div className="text-center">
360
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
361
- <span className="text-fm-tertiary text-xs">
362
- 16px
363
- </span>
364
- </div>
365
- <div className="text-center">
366
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
367
- <span className="text-fm-tertiary text-xs">
368
- 20px
369
- </span>
370
- </div>
371
- <div className="text-center">
372
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
373
- <span className="text-fm-tertiary text-xs">
374
- 24px
375
- </span>
376
- </div>
377
- <div className="text-center">
378
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
379
- <span className="text-fm-tertiary text-xs">
380
- 32px
381
- </span>
382
- </div>
383
- <div className="text-center">
384
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
385
- <span className="text-fm-tertiary text-xs">
386
- 48px
387
- </span>
388
- </div>
389
- </div>
390
- </div>
391
-
392
- <div className="!space-y-4">
393
- <h3 className="text-fm-icon-info! text-lg font-semibold">
394
- Code Example
395
- </h3>
396
- <div className="bg-fm-surface-secondary rounded-lg p-4">
397
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
398
- {`// Small (16px)
399
- <SearchIcon className="h-4 w-4" />
400
-
401
- // Medium (24px)
402
- <SearchIcon className="h-6 w-6" />
403
-
404
- // Large (32px)
405
- <SearchIcon className="h-8 w-8" />
406
-
407
- // Custom size with props
408
- <SearchIcon width={40} height={40} />`}
409
- </pre>
410
- </div>
411
- </div>
412
- </div>
413
- </div>
414
- </div>
415
- </div>
416
-
417
- {/* Color Variations */}
418
- <div className="!space-y-8">
419
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
420
- Color Variations
421
- </h2>
422
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
423
- <div className="!space-y-4">
424
- <h3 className="text-fm-icon-info! text-lg font-semibold">
425
- Semantic Colors
426
- </h3>
427
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
428
- <div className="flex items-center gap-4">
429
- <SearchIcon className="text-fm-icon-info h-6 w-6" />
430
- <div>
431
- <div className="text-fm-icon-active text-sm font-medium">
432
- Primary
433
- </div>
434
- <div className="text-fm-tertiary text-xs">
435
- text-fm-icon-info
436
- </div>
437
- </div>
438
- </div>
439
- <div className="flex items-center gap-4">
440
- <SearchIcon className="text-fm-secondary-600 h-6 w-6" />
441
- <div>
442
- <div className="text-fm-icon-active text-sm font-medium">
443
- Secondary
444
- </div>
445
- <div className="text-fm-tertiary text-xs">
446
- text-fm-secondary-600
447
- </div>
448
- </div>
449
- </div>
450
- <div className="flex items-center gap-4">
451
- <SearchIcon className="text-fm-icon-info h-6 w-6" />
452
- <div>
453
- <div className="text-fm-icon-active text-sm font-medium">
454
- Info
455
- </div>
456
- <div className="text-fm-tertiary text-xs">
457
- text-fm-icon-info
458
- </div>
459
- </div>
460
- </div>
461
- <div className="flex items-center gap-4">
462
- <SearchIcon className="text-fm-placeholder h-6 w-6" />
463
- <div>
464
- <div className="text-fm-icon-active text-sm font-medium">
465
- Muted
466
- </div>
467
- <div className="text-fm-tertiary text-xs">
468
- text-fm-placeholder
469
- </div>
470
- </div>
471
- </div>
472
- </div>
473
- </div>
474
-
475
- <div className="!space-y-4">
476
- <h3 className="text-fm-icon-info! text-lg font-semibold">
477
- Custom Colors
478
- </h3>
479
- <div className="bg-fm-surface-secondary rounded-lg p-4">
480
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
481
- {`// Using Tailwind classes
482
- <SearchIcon className="h-6 w-6 text-blue-400" />
483
- <SearchIcon className="h-6 w-6 text-purple-500" />
484
-
485
- // Using CSS custom properties
486
- <SearchIcon
487
- className="h-6 w-6"
488
- style={{ color: 'var(--color-primary)' }}
489
- />
490
-
491
- // Direct stroke prop
492
- <SearchIcon
493
- width={24}
494
- height={24}
495
- stroke="#3b82f6"
496
- />`}
497
- </pre>
498
- </div>
499
- </div>
500
- </div>
501
- </div>
502
-
503
- {/* Usage Examples */}
504
- <div className="!space-y-8">
505
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
506
- Usage Examples
507
- </h2>
508
-
509
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
510
- {/* Search Input */}
511
- <div className="!space-y-4">
512
- <h3 className="text-fm-icon-info! text-lg font-semibold">
513
- Search Input Fields
514
- </h3>
515
- <div className="!space-y-4">
516
- <div className="!space-y-3">
517
- <div className="relative">
518
- <SearchIcon className="text-fm-placeholder absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2" />
519
- <input
520
- type="text"
521
- placeholder="Search products..."
522
- className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active focus:border-fm-icon-info w-full rounded-lg border py-2 pr-4 pl-10 placeholder-white/50 focus:ring-2 focus:ring-blue-400/20 focus:outline-none"
523
- />
524
- </div>
525
- <div className="relative">
526
- <SearchIcon className="text-fm-icon-info absolute top-1/2 left-3 h-5 w-5 -translate-y-1/2" />
527
- <input
528
- type="text"
529
- placeholder="Search users..."
530
- className="border-fm-icon-info/50 bg-fm-icon-info/10 text-fm-icon-active focus:border-fm-icon-info w-full rounded-lg border py-3 pr-4 pl-12 placeholder-blue-200/70 focus:ring-2 focus:ring-blue-400/20 focus:outline-none"
531
- />
532
- </div>
533
- </div>
534
- <div className="bg-fm-surface-secondary rounded-lg p-4">
535
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
536
- {`<div className="relative">
537
- <SearchIcon className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400" />
538
- <input
539
- type="text"
540
- placeholder="Search..."
541
- className="w-full pl-10 pr-4 py-2 rounded-lg border border-white/20 bg-white/10"
542
- />
543
- </div>`}
544
- </pre>
545
- </div>
546
- </div>
547
- </div>
548
-
549
- {/* Search Button */}
550
- <div className="!space-y-4">
551
- <h3 className="text-fm-icon-info! text-lg font-semibold">
552
- Search Buttons
553
- </h3>
554
- <div className="!space-y-4">
555
- <div className="flex gap-4">
556
- <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">
557
- <SearchIcon className="h-4 w-4" />
558
- Search
559
- </button>
560
- <button className="border-fm-secondary-500/30 bg-fm-secondary-500/20 text-fm-secondary-600 hover:bg-fm-secondary-500/30 flex h-10 w-10 items-center justify-center rounded-lg border transition-colors">
561
- <SearchIcon className="h-5 w-5" />
562
- </button>
563
- <button className="bg-fm-icon-info text-fm-icon-active flex h-8 w-8 items-center justify-center rounded-full shadow-lg transition-transform hover:scale-110">
564
- <SearchIcon className="h-4 w-4" />
565
- </button>
566
- </div>
567
- <div className="bg-fm-surface-secondary rounded-lg p-4">
568
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
569
- {`// Search button with text
570
- <button className="flex items-center gap-2 bg-blue-500/20 border border-blue-500/30 px-4 py-2 rounded-lg">
571
- <SearchIcon className="h-4 w-4" />
572
- Search
573
- </button>
574
-
575
- // Icon-only button
576
- <button className="flex h-10 w-10 items-center justify-center rounded-lg bg-purple-500/20">
577
- <SearchIcon className="h-5 w-5" />
578
- </button>
579
-
580
- // Floating search button
581
- <button className="flex h-8 w-8 items-center justify-center rounded-full bg-blue-500 text-white">
582
- <SearchIcon className="h-4 w-4" />
583
- </button>`}
584
- </pre>
585
- </div>
586
- </div>
587
- </div>
588
-
589
- {/* Data Table */}
590
- <div className="!space-y-4">
591
- <h3 className="text-fm-icon-info! text-lg font-semibold">
592
- Data Table Search
593
- </h3>
594
- <div className="!space-y-4">
595
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
596
- <div className="mb-4 flex items-center justify-between">
597
- <h4 className="text-fm-icon-active font-medium">
598
- Users
599
- </h4>
600
- <div className="relative">
601
- <SearchIcon className="text-fm-placeholder absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2" />
602
- <input
603
- type="text"
604
- placeholder="Filter users..."
605
- className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active focus:border-fm-icon-info rounded-lg border py-1.5 pr-4 pl-10 text-sm placeholder-white/50 focus:outline-none"
606
- />
607
- </div>
608
- </div>
609
- <div className="!space-y-2">
610
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded border p-2">
611
- <div className="bg-fm-icon-info/20 h-8 w-8 rounded-full"></div>
612
- <div>
613
- <div className="text-fm-icon-active text-sm font-medium">
614
- John Doe
615
- </div>
616
- <div className="text-fm-tertiary text-xs">
617
- john@example.com
618
- </div>
619
- </div>
620
- </div>
621
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded border p-2">
622
- <div className="bg-fm-secondary-500/20 h-8 w-8 rounded-full"></div>
623
- <div>
624
- <div className="text-fm-icon-active text-sm font-medium">
625
- Jane Smith
626
- </div>
627
- <div className="text-fm-tertiary text-xs">
628
- jane@example.com
629
- </div>
630
- </div>
631
- </div>
632
- </div>
633
- </div>
634
- <div className="bg-fm-surface-secondary rounded-lg p-4">
635
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
636
- {`<div className="flex items-center justify-between mb-4">
637
- <h4>Users</h4>
638
- <div className="relative">
639
- <SearchIcon className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400" />
640
- <input placeholder="Filter users..." className="pl-10 pr-4 py-1.5" />
641
- </div>
642
- </div>`}
643
- </pre>
644
- </div>
645
- </div>
646
- </div>
647
-
648
- {/* Navigation Search */}
649
- <div className="!space-y-4">
650
- <h3 className="text-fm-icon-info! text-lg font-semibold">
651
- Navigation & Command Palette
652
- </h3>
653
- <div className="!space-y-4">
654
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
655
- <div className="!space-y-3">
656
- <div className="border-fm-icon-info/30 bg-fm-icon-info/10 flex items-center gap-3 rounded-lg border p-3">
657
- <SearchIcon className="text-fm-icon-info h-5 w-5" />
658
- <input
659
- type="text"
660
- placeholder="Search commands..."
661
- className="text-fm-icon-active flex-1 bg-transparent placeholder-blue-200/70 focus:outline-none"
662
- />
663
- <kbd className="bg-fm-surface-secondary text-fm-secondary rounded px-2 py-1 text-xs">
664
- ⌘K
665
- </kbd>
666
- </div>
667
- <div className="!space-y-1">
668
- <div className="text-fm-icon-active/80 hover:bg-fm-surface-secondary flex items-center gap-3 rounded p-2">
669
- <SearchIcon className="text-fm-icon-info h-4 w-4" />
670
- <span className="text-sm">Search files</span>
671
- </div>
672
- <div className="text-fm-icon-active/80 hover:bg-fm-surface-secondary flex items-center gap-3 rounded p-2">
673
- <SearchIcon className="text-fm-secondary-600 h-4 w-4" />
674
- <span className="text-sm">Find in project</span>
675
- </div>
676
- </div>
677
- </div>
678
- </div>
679
- <div className="bg-fm-surface-secondary rounded-lg p-4">
680
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
681
- {`<div className="flex items-center gap-3 rounded-lg border border-blue-400/30 bg-blue-500/10 p-3">
682
- <SearchIcon className="h-5 w-5 text-blue-400" />
683
- <input
684
- type="text"
685
- placeholder="Search commands..."
686
- className="flex-1 bg-transparent"
687
- />
688
- <kbd className="rounded bg-white/10 px-2 py-1 text-xs">⌘K</kbd>
689
- </div>`}
690
- </pre>
691
- </div>
692
- </div>
693
- </div>
694
- </div>
695
- </div>
696
-
697
- {/* Interactive States */}
698
- <div className="!space-y-8">
699
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
700
- Interactive States & Animations
701
- </h2>
702
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
703
- <div className="!space-y-4">
704
- <h3 className="text-fm-icon-info! text-lg font-semibold">
705
- Hover & Animation Effects
706
- </h3>
707
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
708
- <div className="flex items-center gap-4">
709
- <SearchIcon className="text-fm-tertiary hover:text-fm-icon-info h-6 w-6 transition-colors" />
710
- <div>
711
- <div className="text-fm-icon-active text-sm font-medium">
712
- Color Change
713
- </div>
714
- <div className="text-fm-tertiary text-xs">
715
- Hover to see effect
716
- </div>
717
- </div>
718
- </div>
719
- <div className="flex items-center gap-4">
720
- <SearchIcon className="text-fm-icon-active h-6 w-6 transition-transform hover:scale-125" />
721
- <div>
722
- <div className="text-fm-icon-active text-sm font-medium">
723
- Scale on Hover
724
- </div>
725
- <div className="text-fm-tertiary text-xs">
726
- Grow on interaction
727
- </div>
728
- </div>
729
- </div>
730
- <div className="flex items-center gap-4">
731
- <SearchIcon className="animate-search-pulse text-fm-icon-info h-6 w-6" />
732
- <div>
733
- <div className="text-fm-icon-active text-sm font-medium">
734
- Search Pulse
735
- </div>
736
- <div className="text-fm-tertiary text-xs">
737
- Continuous animation
738
- </div>
739
- </div>
740
- </div>
741
- <div className="flex items-center gap-4">
742
- <SearchIcon className="animate-search-bounce text-fm-secondary-600 h-6 w-6" />
743
- <div>
744
- <div className="text-fm-icon-active text-sm font-medium">
745
- Bounce Effect
746
- </div>
747
- <div className="text-fm-tertiary text-xs">
748
- Gentle bounce motion
749
- </div>
750
- </div>
751
- </div>
752
- <div className="flex items-center gap-4">
753
- <SearchIcon className="animate-search-glow text-fm-icon-info h-6 w-6" />
754
- <div>
755
- <div className="text-fm-icon-active text-sm font-medium">
756
- Glow Animation
757
- </div>
758
- <div className="text-fm-tertiary text-xs">
759
- Glowing search effect
760
- </div>
761
- </div>
762
- </div>
763
- </div>
764
- </div>
765
-
766
- <div className="!space-y-4">
767
- <h3 className="text-fm-icon-info! text-lg font-semibold">
768
- State Examples
769
- </h3>
770
- <div className="bg-fm-surface-secondary rounded-lg p-4">
771
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
772
- {`// Color change on hover
773
- <SearchIcon className="h-6 w-6 text-white/60 transition-colors hover:text-blue-400" />
774
-
775
- // Scale on hover
776
- <SearchIcon className="h-6 w-6 text-white transition-transform hover:scale-125" />
777
-
778
- // Pulsing animation
779
- <SearchIcon className="h-6 w-6 text-blue-400 animate-pulse" />
780
-
781
- // Loading/searching state
782
- <SearchIcon className="h-6 w-6 text-blue-400 animate-spin" />
783
-
784
- // Focused state
785
- <SearchIcon className="h-6 w-6 text-blue-400 drop-shadow-lg" />
786
-
787
- // Disabled state
788
- <SearchIcon className="h-6 w-6 text-gray-400 opacity-50" />`}
789
- </pre>
790
- </div>
791
- </div>
792
- </div>
52
+ }`,
53
+ livePreview: (
54
+ <div className="border-fm-divider-secondary flex items-center gap-2 rounded-xl border px-4 py-2">
55
+ <SearchIcon className="text-fm-icon-inactive h-5 w-5" />
793
56
  </div>
794
-
795
- {/* Accessibility */}
796
- <div className="!space-y-8">
797
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
798
- Accessibility Features
799
- </h2>
800
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
801
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
802
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
803
- ✅ Built-in Features
804
- </h3>
805
- <ul className="text-fm-secondary! !space-y-2 text-sm">
806
- <li className="text-fm-secondary!">
807
- Uses Radix UI AccessibleIcon wrapper
808
- </li>
809
- <li className="text-fm-secondary!">
810
- Provides screen reader label "Search icon"
811
- </li>
812
- <li className="text-fm-secondary!">
813
- Supports keyboard navigation when interactive
814
- </li>
815
- <li className="text-fm-secondary!">
816
- Maintains proper color contrast ratios
817
- </li>
818
- <li className="text-fm-secondary!">
819
- Scales with user's font size preferences
820
- </li>
821
- </ul>
822
- </div>
823
-
824
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
825
- <h3 className="text-fm-icon-info! text-lg font-semibold">
826
- 💡 Best Practices
827
- </h3>
828
- <ul className="text-fm-secondary! !space-y-2 text-sm">
829
- <li className="text-fm-secondary!">
830
- Always provide descriptive labels for search inputs
831
- </li>
832
- <li className="text-fm-secondary!">
833
- Use consistent placement in search interfaces
834
- </li>
835
- <li className="text-fm-secondary!">
836
- Ensure sufficient click/touch target sizes
837
- </li>
838
- <li className="text-fm-secondary!">
839
- Add focus states for keyboard navigation
840
- </li>
841
- <li className="text-fm-secondary!">
842
- Consider motion sensitivity for animations
843
- </li>
844
- </ul>
845
- </div>
846
- </div>
847
-
848
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
849
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
850
- Custom Accessibility Implementation
851
- </h3>
852
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
853
- <div className="bg-fm-surface-secondary rounded-lg p-4">
854
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
855
- {`// Search input with proper ARIA
856
- <div className="relative">
857
- <SearchIcon
858
- className="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"
859
- aria-hidden="true"
860
- />
861
- <input
862
- type="search"
863
- aria-label="Search products"
864
- placeholder="Search..."
865
- className="pl-10 pr-4 py-2"
866
- />
867
- </div>
868
-
869
- // Search button with context
870
- <button
871
- type="submit"
872
- aria-label="Search for products"
873
- className="flex items-center gap-2"
874
- >
875
- <SearchIcon className="h-4 w-4" />
876
- <span>Search</span>
877
- </button>
878
-
879
- // Command palette trigger
880
- <button
881
- aria-label="Open command palette"
882
- aria-keyshortcuts="Meta+K"
883
- className="flex items-center gap-2"
884
- >
885
- <SearchIcon className="h-4 w-4" />
886
- <span>Quick search</span>
887
- <kbd>⌘K</kbd>
888
- </button>`}
889
- </pre>
890
- </div>
891
- <div className="!space-y-4">
892
- <p className="text-fm-secondary! text-sm">
893
- When using SearchIcon in search interfaces, provide
894
- clear context about what can be searched and how to
895
- interact with the search functionality.
896
- </p>
897
- <div className="border-fm-icon-info/20 bg-fm-icon-info/10 rounded-lg border p-4">
898
- <div className="text-fm-icon-info flex items-center gap-2 text-sm">
899
- <SearchIcon className="h-4 w-4" />
900
- <span>
901
- This approach gives screen readers clear context
902
- about the search functionality
903
- </span>
904
- </div>
905
- </div>
906
- </div>
907
- </div>
908
- </div>
909
- </div>
910
-
911
- {/* Related Icons */}
912
- <div className="!space-y-8">
913
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
914
- Related Icons
915
- </h2>
916
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
917
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
918
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
919
- <span className="text-2xl">🔍</span>
920
- </div>
921
- <div>
922
- <div className="text-fm-icon-active font-medium">
923
- FilterIcon
924
- </div>
925
- <div className="text-fm-tertiary text-xs">
926
- Filter results
927
- </div>
928
- </div>
929
- </div>
930
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
931
- <div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
932
- <span className="text-fm-icon-active! !text-2xl">↻</span>
933
- </div>
934
- <div>
935
- <div className="text-fm-icon-active font-medium">
936
- RefreshIcon
937
- </div>
938
- <div className="text-fm-tertiary text-xs">
939
- Refresh search
940
- </div>
941
- </div>
942
- </div>
943
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
944
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
945
- <span className="text-fm-icon-active! !text-2xl">✕</span>
946
- </div>
947
- <div>
948
- <div className="text-fm-icon-active font-medium">
949
- CloseIcon
950
- </div>
951
- <div className="text-fm-tertiary text-xs">
952
- Clear search
953
- </div>
954
- </div>
955
- </div>
956
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
957
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
958
- <span className="text-2xl">⚙️</span>
959
- </div>
960
- <div>
961
- <div className="text-fm-icon-active font-medium">
962
- SettingsIcon
963
- </div>
964
- <div className="text-fm-tertiary text-xs">
965
- Search settings
966
- </div>
967
- </div>
968
- </div>
969
- </div>
970
- </div>
971
- </div>
972
-
973
- {/* Footer */}
974
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
975
- <div className="!mx-auto max-w-7xl px-6 py-8">
976
- <div className="!space-y-4 text-center">
977
- <p className="text-fm-tertiary!">
978
- SearchIcon is part of the Aural UI icon library, built for
979
- search interfaces, discovery, and navigation.
980
- </p>
981
- <p className="text-fm-placeholder! text-sm">
982
- All icons use Radix UI's AccessibleIcon for screen reader
983
- compatibility and follow WCAG guidelines for interactive
984
- elements.
985
- </p>
986
- </div>
987
- </div>
988
- </div>
989
- </div>
990
- </>
57
+ ),
58
+ }}
59
+ relatedIcons={[
60
+ {
61
+ name: "PageSearchIcon",
62
+ description: "Search within a document",
63
+ icon: PageSearchIcon,
64
+ accentToken: "info",
65
+ },
66
+ {
67
+ name: "FilterBarRowIcon",
68
+ description: "Filter bar row icon",
69
+ icon: FilterBarRowIcon,
70
+ accentToken: "positive",
71
+ },
72
+ {
73
+ name: "GlobeIcon",
74
+ description: "Globalisation / language icon",
75
+ icon: GlobeIcon,
76
+ accentToken: "warning",
77
+ },
78
+ {
79
+ name: "SettingIcon",
80
+ description: "Settings / preferences icon",
81
+ icon: SettingIcon,
82
+ accentToken: "negative",
83
+ },
84
+ ]}
85
+ />
991
86
  ),
992
87
  },
993
88
  },
994
89
  tags: ["autodocs"],
995
90
  argTypes: {
996
- width: {
997
- control: { type: "range", min: 8, max: 96, step: 2 },
998
- description: "Width of the icon in pixels",
91
+ className: {
92
+ control: "text",
93
+ description: "CSS classes including color token",
999
94
  },
1000
95
  withAccessibility: {
1001
96
  control: "boolean",
1002
- description: "Whether to wrap the icon with accessibility features",
1003
- },
1004
- height: {
1005
- control: { type: "range", min: 8, max: 96, step: 2 },
1006
- description: "Height of the icon in pixels",
1007
- },
1008
- stroke: {
1009
- control: "color",
1010
- description: "Stroke color of the search icon",
1011
- },
1012
- strokeWidth: {
1013
- control: { type: "range", min: 0.5, max: 4, step: 0.5 },
1014
- description: "Thickness of the stroke lines",
1015
- },
1016
- strokeLinecap: {
1017
- control: "select",
1018
- options: ["butt", "round", "square"],
1019
- description: "Style of line endings",
1020
- },
1021
- className: {
1022
- control: "text",
1023
- description: "CSS classes for styling",
97
+ description: "Wrap with accessibility label",
1024
98
  },
1025
99
  },
1026
100
  }
@@ -1028,202 +102,75 @@ function SearchInput() {
1028
102
  export default meta
1029
103
  type Story = StoryObj<typeof SearchIcon>
1030
104
 
1031
- // Story parameters for consistent dark theme
1032
- const storyParameters = {
1033
- backgrounds: {
1034
- default: "dark",
1035
- values: [
1036
- { name: "dark", value: "var(--color-fm-surface-primary)" },
1037
- { name: "darker", value: "var(--color-fm-neutral-0)" },
1038
- ],
1039
- },
1040
- }
1041
-
1042
105
  export const Default: Story = {
1043
106
  args: {
1044
- width: 24,
1045
- height: 24,
1046
- className: "text-fm-icon-info",
107
+ className: "h-6 w-6 text-fm-icon-inactive",
1047
108
  withAccessibility: true,
1048
109
  },
1049
- parameters: storyParameters,
1050
110
  render: (args) => (
1051
- <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">
111
+ <IconDefaultCanvas>
1052
112
  <SearchIcon {...args} />
1053
- </div>
113
+ </IconDefaultCanvas>
1054
114
  ),
1055
115
  }
1056
116
 
1057
117
  export const SizeVariations: Story = {
1058
- parameters: {
1059
- ...storyParameters,
1060
- docs: {
1061
- description: {
1062
- story:
1063
- "SearchIcon in different sizes, from small UI elements to large search interfaces.",
1064
- },
1065
- },
1066
- },
1067
- render: () => (
1068
- <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">
1069
- <div className="text-center">
1070
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
1071
- <span className="text-fm-tertiary text-xs">12px</span>
1072
- </div>
1073
- <div className="text-center">
1074
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
1075
- <span className="text-fm-tertiary text-xs">16px</span>
1076
- </div>
1077
- <div className="text-center">
1078
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
1079
- <span className="text-fm-tertiary text-xs">20px</span>
1080
- </div>
1081
- <div className="text-center">
1082
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
1083
- <span className="text-fm-tertiary text-xs">24px</span>
1084
- </div>
1085
- <div className="text-center">
1086
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
1087
- <span className="text-fm-tertiary text-xs">32px</span>
1088
- </div>
1089
- <div className="text-center">
1090
- <SearchIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
1091
- <span className="text-fm-tertiary text-xs">48px</span>
1092
- </div>
1093
- </div>
1094
- ),
118
+ render: () => <IconSizeVariations icon={SearchIcon} />,
1095
119
  }
1096
120
 
1097
121
  export const ColorVariations: Story = {
1098
- parameters: {
1099
- ...storyParameters,
1100
- docs: {
1101
- description: {
1102
- story:
1103
- "SearchIcon in different colors for various search and discovery contexts.",
1104
- },
1105
- },
1106
- },
1107
- render: () => (
1108
- <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">
1109
- <div className="text-center">
1110
- <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">
1111
- <SearchIcon className="text-fm-icon-info h-8 w-8" />
1112
- </div>
1113
- <div className="text-fm-icon-active text-sm font-medium">Primary</div>
1114
- <div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
1115
- </div>
1116
- <div className="text-center">
1117
- <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">
1118
- <SearchIcon className="text-fm-secondary-600 h-8 w-8" />
1119
- </div>
1120
- <div className="text-fm-icon-active text-sm font-medium">Secondary</div>
1121
- <div className="text-fm-secondary-600 text-xs">
1122
- text-fm-secondary-600
1123
- </div>
1124
- </div>
1125
- <div className="text-center">
1126
- <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">
1127
- <SearchIcon className="text-fm-icon-info h-8 w-8" />
1128
- </div>
1129
- <div className="text-fm-icon-active text-sm font-medium">Info</div>
1130
- <div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
1131
- </div>
1132
- <div className="text-center">
1133
- <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">
1134
- <SearchIcon className="text-fm-placeholder h-8 w-8" />
1135
- </div>
1136
- <div className="text-fm-icon-active text-sm font-medium">Muted</div>
1137
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
1138
- </div>
1139
- </div>
1140
- ),
122
+ render: () => <IconColorVariations icon={SearchIcon} />,
1141
123
  }
1142
124
 
1143
125
  export const UsageExamples: Story = {
1144
- parameters: {
1145
- ...storyParameters,
1146
- docs: {
1147
- description: {
1148
- story:
1149
- "Real-world usage examples showing SearchIcon in different UI contexts.",
1150
- },
1151
- },
1152
- },
1153
126
  render: () => (
1154
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
1155
- {/* Search Input */}
1156
- <div className="!space-y-2">
1157
- <h3 className="text-fm-icon-active text-sm font-medium">
1158
- Search Input
1159
- </h3>
1160
- <div className="relative">
1161
- <SearchIcon className="text-fm-placeholder absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2" />
1162
- <input
1163
- type="text"
1164
- placeholder="Search products..."
1165
- className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active focus:border-fm-icon-info w-full rounded-lg border py-2 pr-4 pl-10 placeholder-white/50 focus:ring-2 focus:ring-blue-400/20 focus:outline-none"
1166
- />
127
+ <IconUsageCanvas>
128
+ <IconUsageSection title="Search Bar">
129
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center gap-2 rounded-xl border px-4 py-2">
130
+ <SearchIcon className="text-fm-icon-inactive h-4 w-4 shrink-0" />
131
+ <span className="text-fm-tertiary font-fm-text text-sm">
132
+ Search stories...
133
+ </span>
1167
134
  </div>
1168
- </div>
1169
-
1170
- {/* Search Buttons */}
1171
- <div className="!space-y-2">
1172
- <h3 className="text-fm-icon-active text-sm font-medium">
1173
- Search Buttons
1174
- </h3>
1175
- <div className="flex gap-4">
1176
- <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">
1177
- <SearchIcon className="h-4 w-4" />
1178
- Search
1179
- </button>
1180
- <button className="border-fm-secondary-500/30 bg-fm-secondary-500/20 text-fm-secondary-600 hover:bg-fm-secondary-500/30 flex h-10 w-10 items-center justify-center rounded-lg border transition-colors">
1181
- <SearchIcon className="h-5 w-5" />
1182
- </button>
135
+ </IconUsageSection>
136
+
137
+ <IconUsageSection title="Nav Bar Icon">
138
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-around rounded-xl border px-4 py-3">
139
+ {[SearchIcon, FilterBarRowIcon, SettingIcon].map((Icon, i) => (
140
+ <button key={i}>
141
+ <Icon
142
+ className={`h-5 w-5 ${i === 0 ? "text-fm-icon-active" : "text-fm-icon-inactive"}`}
143
+ />
144
+ </button>
145
+ ))}
1183
146
  </div>
1184
- </div>
1185
-
1186
- {/* Command Palette */}
1187
- <div className="!space-y-2">
1188
- <h3 className="text-fm-icon-active text-sm font-medium">
1189
- Command Palette
1190
- </h3>
1191
- <div className="border-fm-icon-info/30 bg-fm-icon-info/10 flex items-center gap-3 rounded-lg border p-3">
1192
- <SearchIcon className="text-fm-icon-info h-5 w-5" />
1193
- <input
1194
- type="text"
1195
- placeholder="Search commands..."
1196
- className="text-fm-icon-active flex-1 bg-transparent placeholder-blue-200/70 focus:outline-none"
1197
- />
1198
- <kbd className="bg-fm-surface-secondary text-fm-secondary rounded px-2 py-1 text-xs">
1199
- ⌘K
1200
- </kbd>
147
+ </IconUsageSection>
148
+
149
+ <IconUsageSection title="Empty Search">
150
+ <div className="flex flex-col items-center gap-3 py-4">
151
+ <SearchIcon className="text-fm-icon-inactive h-10 w-10" />
152
+ <div className="text-center">
153
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
154
+ Search anything
155
+ </div>
156
+ <div className="text-fm-secondary font-fm-text text-xs">
157
+ Stories, episodes, authors
158
+ </div>
159
+ </div>
1201
160
  </div>
1202
- </div>
1203
- </div>
161
+ </IconUsageSection>
162
+ </IconUsageCanvas>
1204
163
  ),
1205
164
  }
1206
165
 
1207
166
  export const Playground: Story = {
1208
- parameters: {
1209
- ...storyParameters,
1210
- docs: {
1211
- description: {
1212
- story:
1213
- "Interactive playground to experiment with different SearchIcon configurations.",
1214
- },
1215
- },
1216
- },
1217
167
  args: {
1218
- width: 32,
1219
- height: 32,
1220
- className: "text-fm-icon-info",
168
+ className: "h-8 w-8 text-fm-icon-inactive",
169
+ withAccessibility: true,
1221
170
  },
1222
171
  render: (args) => (
1223
- <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">
1224
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1225
- <SearchIcon {...args} />
1226
- </div>
1227
- </div>
172
+ <IconPlaygroundCanvas>
173
+ <SearchIcon {...args} />
174
+ </IconPlaygroundCanvas>
1228
175
  ),
1229
176
  }