aural-ui 3.0.7 → 4.1.0

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