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