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,21 @@
1
1
  import React from "react"
2
2
  import type { Meta, StoryObj } from "@storybook/react-vite"
3
3
 
4
+ import { EyeOpenIcon } from "src/ui/icons/eye-open-icon"
5
+ import { SearchIcon } from "src/ui/icons/search-icon"
6
+ import { SettingIcon } from "src/ui/icons/setting-icon"
7
+ import { TickIcon } from "src/ui/icons/tick-icon"
8
+ import {
9
+ IconColorVariations,
10
+ IconDefaultCanvas,
11
+ IconInteractiveStates,
12
+ IconPlaygroundCanvas,
13
+ IconSizeVariations,
14
+ IconUsageCanvas,
15
+ IconUsageSection,
16
+ } from "src/ui/story-spec/icons/icon-story-canvas"
17
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
18
+
4
19
  import { EyeCloseIcon } from "."
5
20
 
6
21
  const meta: Meta<typeof EyeCloseIcon> = {
@@ -18,911 +33,71 @@ const meta: Meta<typeof EyeCloseIcon> = {
18
33
  },
19
34
  docs: {
20
35
  page: () => (
21
- <>
22
- {/* Override default docs styling */}
23
- <style>
24
- {`
25
- .sbdocs-wrapper {
26
- padding: 0 ;
27
- max-width: none ;
28
- background: transparent ;
29
- }
30
- .sbdocs-content {
31
- max-width: none ;
32
- padding: 0 ;
33
- margin: 0 ;
34
- background: transparent ;
35
- }
36
- .docs-story {
37
- background: transparent ;
38
- }
39
- .sbdocs {
40
- background: transparent ;
41
- }
42
- body {
43
- background: var(--color-fm-surface-primary) ;
44
- }
45
- #storybook-docs {
46
- background: var(--color-fm-surface-primary) ;
47
- }
48
- .sbdocs-preview {
49
- background: transparent ;
50
- border: none ;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: var(--color-fm-icon-active) ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: var(--color-fm-secondary) ;
57
- }
58
- .sbdocs-code {
59
- background: var(--color-fm-surface-secondary) ;
60
- color: var(--color-fm-secondary-500) ;
61
- border: 1px solid var(--color-fm-divider-secondary) ;
62
- }
63
- .sbdocs-pre {
64
- background: var(--color-fm-surface-secondary) ;
65
- border: 1px solid var(--color-fm-divider-secondary) ;
66
- }
67
- .sbdocs-table {
68
- background: var(--color-fm-surface-secondary) ;
69
- border: 1px solid var(--color-fm-divider-secondary) ;
70
- }
71
- .sbdocs-table th {
72
- background: var(--color-fm-surface-secondary) ;
73
- color: var(--color-fm-icon-active) ;
74
- border-bottom: 1px solid var(--color-fm-divider-secondary) ;
75
- }
76
- .sbdocs-table td {
77
- color: var(--color-fm-secondary) ;
78
- border-bottom: 1px solid var(--color-fm-divider-tertiary) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="bg-fm-surface-primary min-h-screen">
84
- {/* Header */}
85
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
86
- <div className="from-fm-surface-tertiary/10 to-fm-surface-tertiary/10 absolute inset-0 bg-linear-to-r via-transparent" />
87
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
88
- <div className="!space-y-6 text-center">
89
- <div className="border-fm-divider-primary from-fm-surface-tertiary/20 to-fm-surface-tertiary/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
90
- <EyeCloseIcon className="text-fm-tertiary h-12 w-12" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- EyeCloseIcon
94
- </h1>
95
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
96
- A visibility toggle icon for hiding content, password
97
- fields, and privacy controls. Features a crossed-out eye
98
- design that clearly indicates hidden or private state.
99
- Perfect for password visibility toggles, content filters,
100
- and privacy settings. Built with accessibility in mind using
101
- Radix UI's AccessibleIcon wrapper.
102
- </p>
103
-
104
- {/* Stats */}
105
- <div className="flex items-center justify-center gap-8 pt-8">
106
- <div className="text-center">
107
- <div className="text-fm-secondary text-3xl font-bold">
108
- Private
109
- </div>
110
- <div className="text-fm-tertiary text-sm">
111
- Content hidden
112
- </div>
113
- </div>
114
- <div className="bg-fm-divider-primary h-8 w-px" />
115
- <div className="text-center">
116
- <div className="text-fm-secondary text-3xl font-bold">
117
- Secure
118
- </div>
119
- <div className="text-fm-tertiary text-sm">
120
- Privacy focused
121
- </div>
122
- </div>
123
- <div className="bg-fm-divider-primary h-8 w-px" />
124
- <div className="text-center">
125
- <div className="text-fm-icon-info text-3xl font-bold">
126
- Interactive
127
- </div>
128
- <div className="text-fm-tertiary text-sm">
129
- Toggle states
130
- </div>
131
- </div>
132
- </div>
133
- </div>
134
- </div>
135
- </div>
136
-
137
- {/* Content */}
138
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
139
- {/* Quick Usage */}
140
- <div className="!space-y-8">
141
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
142
- Quick Start
143
- </h2>
144
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
145
- <div className="!space-y-4">
146
- <h3 className="text-fm-secondary! text-xl font-semibold">
147
- Basic Usage
148
- </h3>
149
- <div className="bg-fm-surface-secondary rounded-lg p-4">
150
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
151
- {`import { EyeCloseIcon } from "@icons/eye-close-icon"
152
-
153
- function PasswordField() {
154
- const [isVisible, setIsVisible] = useState(false)
155
-
36
+ <AuralIconDocsPage
37
+ accentToken="info"
38
+ features={[
39
+ { title: "Hidden State", description: "Conceal passwords or data" },
40
+ { title: "currentColor", description: "Responds to text tokens" },
41
+ { title: "Accessible", description: "ARIA-ready by default" },
42
+ ]}
43
+ quickStart={{
44
+ codeExample: `import { EyeCloseIcon } from "src/ui/icons/eye-close-icon"
45
+
46
+ function PasswordInput() {
156
47
  return (
157
- <div className="relative">
158
- <input
159
- type={isVisible ? "text" : "password"}
160
- className="pr-10"
161
- />
162
- <button
163
- onClick={() => setIsVisible(!isVisible)}
164
- className="absolute right-2 top-1/2 -translate-y-1/2"
165
- >
166
- <EyeCloseIcon className="h-5 w-5 text-gray-400 " />
167
- </button>
168
- </div>
48
+ <button aria-label="Hide password">
49
+ <EyeCloseIcon className="h-5 w-5 text-fm-icon-active" />
50
+ </button>
169
51
  )
170
- }`}
171
- </pre>
172
- </div>
173
- </div>
174
-
175
- <div className="!space-y-4">
176
- <h3 className="text-fm-secondary! text-xl font-semibold">
177
- Live Preview
178
- </h3>
179
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
180
- <div className="relative">
181
- <input
182
- type="password"
183
- placeholder="Enter password"
184
- className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active rounded-lg border px-3 py-2 pr-10 placeholder-white/50"
185
- />
186
- <button className="hover:bg-fm-surface-secondary absolute top-1/2 right-2 -translate-y-1/2 rounded p-1">
187
- <EyeCloseIcon className="text-fm-tertiary h-5 w-5" />
188
- </button>
189
- </div>
190
- </div>
191
- </div>
192
- </div>
193
- </div>
194
-
195
- {/* Props Documentation */}
196
- <div className="!space-y-8">
197
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
198
- Props & Configuration
199
- </h2>
200
-
201
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
202
- <div className="bg-fm-surface-secondary p-4">
203
- <h3 className="text-fm-icon-active! text-xl font-semibold">
204
- Props
205
- </h3>
206
- </div>
207
- <table className="!my-0 w-full">
208
- <thead className="bg-fm-surface-secondary">
209
- <tr className="border-fm-divider-secondary border-b">
210
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
211
- Prop
212
- </th>
213
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
214
- Type
215
- </th>
216
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
217
- Default
218
- </th>
219
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
220
- Description
221
- </th>
222
- </tr>
223
- </thead>
224
- <tbody>
225
- <tr className="bg-fm-surface-secondary!">
226
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
227
- withAccessibility
228
- </td>
229
- <td className="text-fm-secondary! px-6 py-4 text-sm">
230
- boolean
231
- </td>
232
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
233
- true
234
- </td>
235
- <td className="text-fm-secondary! px-6 py-4 text-sm">
236
- Whether to wrap the icon with accessibility feature
237
- </td>
238
- </tr>
239
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
240
- <td className="text-fm-secondary! px-6 py-4 font-mono text-sm">
241
- height
242
- </td>
243
- <td className="text-fm-secondary! px-6 py-4 text-sm">
244
- number | string
245
- </td>
246
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
247
- 24
248
- </td>
249
- <td className="text-fm-secondary! px-6 py-4 text-sm">
250
- Height of the icon in pixels
251
- </td>
252
- </tr>
253
- <tr className="border-fm-divider-tertiary border-b">
254
- <td className="text-fm-secondary! px-6 py-4 font-mono text-sm">
255
- stroke
256
- </td>
257
- <td className="text-fm-secondary! px-6 py-4 text-sm">
258
- string
259
- </td>
260
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
261
- currentColor
262
- </td>
263
- <td className="text-fm-secondary! px-6 py-4 text-sm">
264
- Stroke color of the icon
265
- </td>
266
- </tr>
267
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
268
- <td className="text-fm-secondary! px-6 py-4 font-mono text-sm">
269
- strokeWidth
270
- </td>
271
- <td className="text-fm-secondary! px-6 py-4 text-sm">
272
- string | number
273
- </td>
274
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
275
- 1
276
- </td>
277
- <td className="text-fm-secondary! px-6 py-4 text-sm">
278
- Stroke width of the icon lines
279
- </td>
280
- </tr>
281
- <tr className="border-fm-divider-tertiary border-b">
282
- <td className="text-fm-secondary! px-6 py-4 font-mono text-sm">
283
- className
284
- </td>
285
- <td className="text-fm-secondary! px-6 py-4 text-sm">
286
- string
287
- </td>
288
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
289
- -
290
- </td>
291
- <td className="text-fm-secondary! px-6 py-4 text-sm">
292
- CSS classes for styling (use for overrides)
293
- </td>
294
- </tr>
295
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
296
- <td className="text-fm-secondary! px-6 py-4 font-mono text-sm">
297
- onClick
298
- </td>
299
- <td className="text-fm-secondary! px-6 py-4 text-sm">
300
- function
301
- </td>
302
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
303
- -
304
- </td>
305
- <td className="text-fm-secondary! px-6 py-4 text-sm">
306
- Click handler for toggle functionality
307
- </td>
308
- </tr>
309
- <tr className="bg-fm-surface-secondary!">
310
- <td className="text-fm-secondary! px-6 py-4 font-mono text-sm">
311
- ...svgProps
312
- </td>
313
- <td className="text-fm-secondary! px-6 py-4 text-sm">
314
- SVGProps
315
- </td>
316
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
317
- -
318
- </td>
319
- <td className="text-fm-secondary! px-6 py-4 text-sm">
320
- All standard SVG element props
321
- </td>
322
- </tr>
323
- </tbody>
324
- </table>
325
- </div>
326
- </div>
327
-
328
- {/* Size Variations */}
329
- <div className="!space-y-8">
330
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
331
- Size Variations
332
- </h2>
333
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
334
- <div className="!space-y-6">
335
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
336
- <div className="!space-y-4">
337
- <h3 className="text-fm-secondary! text-lg font-semibold">
338
- Standard Sizes
339
- </h3>
340
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
341
- <div className="text-center">
342
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-3 w-3" />
343
- <span className="text-fm-tertiary text-xs">
344
- 12px
345
- </span>
346
- </div>
347
- <div className="text-center">
348
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-4 w-4" />
349
- <span className="text-fm-tertiary text-xs">
350
- 16px
351
- </span>
352
- </div>
353
- <div className="text-center">
354
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-5 w-5" />
355
- <span className="text-fm-tertiary text-xs">
356
- 20px
357
- </span>
358
- </div>
359
- <div className="text-center">
360
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-6 w-6" />
361
- <span className="text-fm-tertiary text-xs">
362
- 24px
363
- </span>
364
- </div>
365
- <div className="text-center">
366
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-8 w-8" />
367
- <span className="text-fm-tertiary text-xs">
368
- 32px
369
- </span>
370
- </div>
371
- <div className="text-center">
372
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-12 w-12" />
373
- <span className="text-fm-tertiary text-xs">
374
- 48px
375
- </span>
376
- </div>
377
- </div>
378
- </div>
379
-
380
- <div className="!space-y-4">
381
- <h3 className="text-fm-secondary! text-lg font-semibold">
382
- Code Example
383
- </h3>
384
- <div className="bg-fm-surface-secondary rounded-lg p-4">
385
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
386
- {`// Small (16px)
387
- <EyeCloseIcon className="h-4 w-4 " />
388
-
389
- // Medium (24px)
390
- <EyeCloseIcon className="h-6 w-6 " />
391
-
392
- // Large (32px)
393
- <EyeCloseIcon className="h-8 w-8 " />
394
-
395
- // Custom size with stroke width
396
- <EyeCloseIcon
397
- width={40}
398
- height={40}
399
- strokeWidth={2}
400
- />`}
401
- </pre>
402
- </div>
403
- </div>
404
- </div>
405
- </div>
406
- </div>
407
- </div>
408
-
409
- {/* Color Variations */}
410
- <div className="!space-y-8">
411
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
412
- Color Variations
413
- </h2>
414
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
415
- <div className="!space-y-4">
416
- <h3 className="text-fm-secondary! text-lg font-semibold">
417
- Semantic Colors
418
- </h3>
419
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
420
- <div className="flex items-center gap-4">
421
- <EyeCloseIcon className="text-fm-tertiary h-6 w-6" />
422
- <div>
423
- <div className="text-fm-icon-active text-sm font-medium">
424
- Default / Hidden
425
- </div>
426
- <div className="text-fm-tertiary text-xs">
427
- text-fm-tertiary
428
- </div>
429
- </div>
430
- </div>
431
- <div className="flex items-center gap-4">
432
- <EyeCloseIcon className="text-fm-placeholder h-6 w-6" />
433
- <div>
434
- <div className="text-fm-icon-active text-sm font-medium">
435
- Disabled
436
- </div>
437
- <div className="text-fm-tertiary text-xs">
438
- text-fm-placeholder
439
- </div>
440
- </div>
441
- </div>
442
- <div className="flex items-center gap-4">
443
- <EyeCloseIcon className="text-fm-icon-negative h-6 w-6" />
444
- <div>
445
- <div className="text-fm-icon-active text-sm font-medium">
446
- Restricted
447
- </div>
448
- <div className="text-fm-tertiary text-xs">
449
- text-fm-icon-negative
450
- </div>
451
- </div>
452
- </div>
453
- <div className="flex items-center gap-4">
454
- <EyeCloseIcon className="text-fm-icon-info h-6 w-6" />
455
- <div>
456
- <div className="text-fm-icon-active text-sm font-medium">
457
- Interactive
458
- </div>
459
- <div className="text-fm-tertiary text-xs">
460
- text-fm-icon-info
461
- </div>
462
- </div>
463
- </div>
464
- </div>
465
- </div>
466
-
467
- <div className="!space-y-4">
468
- <h3 className="text-fm-secondary! text-lg font-semibold">
469
- Custom Colors
470
- </h3>
471
- <div className="bg-fm-surface-secondary rounded-lg p-4">
472
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
473
- {`// Using Tailwind classes with
474
- <EyeCloseIcon className="h-6 w-6 text-slate-400 " />
475
- <EyeCloseIcon className="h-6 w-6 text-red-500 " />
476
-
477
- // Using CSS custom properties
478
- <EyeCloseIcon
479
- className="h-6 w-6 "
480
- style={{ color: 'var(--color-privacy)' }}
481
- />
482
-
483
- // Direct stroke prop
484
- <EyeCloseIcon
485
- width={24}
486
- height={24}
487
- stroke="#64748b"
488
- strokeWidth={1.5}
489
- />`}
490
- </pre>
491
- </div>
492
- </div>
493
- </div>
494
- </div>
495
-
496
- {/* Usage Examples */}
497
- <div className="!space-y-8">
498
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
499
- Usage Examples
500
- </h2>
501
-
502
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
503
- {/* Password Field */}
504
- <div className="!space-y-4">
505
- <h3 className="text-fm-secondary! text-lg font-semibold">
506
- Password Field Toggle
507
- </h3>
508
- <div className="!space-y-4">
509
- <div className="!space-y-2">
510
- <label className="text-fm-icon-active! text-sm font-medium">
511
- Password
512
- </label>
513
- <div className="relative">
514
- <input
515
- type="password"
516
- className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active! focus:border-fm-divider-primary w-full rounded-lg border px-3 py-2 pr-10 placeholder-white/50 focus:ring-2 focus:ring-slate-400/20"
517
- placeholder="Enter your password"
518
- defaultValue="mysecretpassword"
519
- />
520
- <button className="hover:bg-fm-surface-secondary absolute top-1/2 right-2 -translate-y-1/2 rounded p-1 transition-colors">
521
- <EyeCloseIcon className="text-fm-tertiary h-5 w-5" />
522
- </button>
523
- </div>
524
- <p className="text-fm-tertiary text-xs">
525
- Click the eye icon to toggle password visibility
526
- </p>
527
- </div>
528
- <div className="bg-fm-surface-secondary rounded-lg p-4">
529
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
530
- {`// Password visibility toggle
531
- const [showPassword, setShowPassword] = useState(false)
532
-
533
- <div className="relative">
534
- <input
535
- type={showPassword ? "text" : "password"}
536
- className="w-full pr-10"
537
- />
538
- <button
539
- onClick={() => setShowPassword(!showPassword)}
540
- className="absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-white/10 rounded"
541
- >
542
- {showPassword ? (
543
- <EyeIcon className="h-5 w-5 text-slate-400 " />
544
- ) : (
545
- <EyeCloseIcon className="h-5 w-5 text-slate-400 " />
546
- )}
547
- </button>
548
- </div>`}
549
- </pre>
550
- </div>
551
- </div>
552
- </div>
553
-
554
- {/* Content Filter */}
555
- <div className="!space-y-4">
556
- <h3 className="text-fm-secondary! text-lg font-semibold">
557
- Content Filter
558
- </h3>
559
- <div className="!space-y-4">
560
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
561
- <div className="mb-3 flex items-center justify-between">
562
- <span className="text-fm-icon-active font-medium">
563
- Sensitive Content
564
- </span>
565
- <button className="text-fm-tertiary hover:text-fm-icon-active flex items-center gap-2 text-sm">
566
- <EyeCloseIcon className="h-4 w-4" />
567
- Hidden
568
- </button>
569
- </div>
570
- <div className="bg-fm-surface-secondary rounded-lg p-8 text-center">
571
- <EyeCloseIcon className="text-fm-icon-inactive mx-auto mb-3 h-12 w-12" />
572
- <p className="text-fm-tertiary! text-sm">
573
- Content hidden due to privacy settings
574
- </p>
575
- <button className="text-fm-icon-info hover:text-fm-icon-info mt-2 text-xs">
576
- Show content
577
- </button>
578
- </div>
579
- </div>
580
- <div className="bg-fm-surface-secondary rounded-lg p-4">
581
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
582
- {`// Content filter with hidden state
583
- <div className="rounded-lg bg-black/20 p-8 text-center">
584
- <EyeCloseIcon className="mx-auto h-12 w-12 text-slate-600 mb-3 " />
585
- <p className="text-sm text-white/60">Content hidden due to privacy settings</p>
586
- <button
587
- onClick={showContent}
588
- className="mt-2 text-xs text-blue-400 hover:text-blue-300"
589
- >
590
- Show content
591
- </button>
592
- </div>`}
593
- </pre>
594
- </div>
595
- </div>
596
- </div>
597
-
598
- {/* Privacy Settings */}
599
- <div className="!space-y-4">
600
- <h3 className="text-fm-secondary! text-lg font-semibold">
601
- Privacy Settings
602
- </h3>
603
- <div className="!space-y-4">
604
- <div className="!space-y-3">
605
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-between rounded-lg border p-4">
606
- <div className="flex items-center gap-3">
607
- <EyeCloseIcon className="text-fm-tertiary h-5 w-5" />
608
- <div>
609
- <div className="text-fm-icon-active text-sm font-medium">
610
- Profile Visibility
611
- </div>
612
- <div className="text-fm-tertiary text-xs">
613
- Your profile is hidden from search
614
- </div>
615
- </div>
616
- </div>
617
- <div className="flex items-center">
618
- <span className="text-fm-tertiary mr-3 text-xs">
619
- Private
620
- </span>
621
- <div className="bg-fm-icon-inactive relative h-6 w-11 rounded-full">
622
- <div className="bg-fm-surface-contrast absolute top-1 left-1 h-4 w-4 rounded-full transition-transform"></div>
623
- </div>
624
- </div>
625
- </div>
626
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-between rounded-lg border p-4">
627
- <div className="flex items-center gap-3">
628
- <EyeCloseIcon className="text-fm-tertiary h-5 w-5" />
629
- <div>
630
- <div className="text-fm-icon-active text-sm font-medium">
631
- Activity Status
632
- </div>
633
- <div className="text-fm-tertiary text-xs">
634
- Hide your online status
635
- </div>
636
- </div>
637
- </div>
638
- <div className="flex items-center">
639
- <span className="text-fm-tertiary mr-3 text-xs">
640
- Hidden
641
- </span>
642
- <div className="bg-fm-icon-inactive relative h-6 w-11 rounded-full">
643
- <div className="bg-fm-surface-contrast absolute top-1 left-1 h-4 w-4 rounded-full transition-transform"></div>
644
- </div>
645
- </div>
646
- </div>
647
- </div>
648
- <div className="bg-fm-surface-secondary rounded-lg p-4">
649
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
650
- {`// Privacy setting item
651
- <div className="flex items-center justify-between p-4 border border-white/10 bg-white/5 rounded-lg">
652
- <div className="flex items-center gap-3">
653
- <EyeCloseIcon className="h-5 w-5 text-slate-400 " />
654
- <div>
655
- <div className="text-sm font-medium text-white">Profile Visibility</div>
656
- <div className="text-xs text-white/60">Your profile is hidden from search</div>
657
- </div>
658
- </div>
659
- <ToggleSwitch checked={false} onChange={handleToggle} />
660
- </div>`}
661
- </pre>
662
- </div>
663
- </div>
664
- </div>
665
-
666
- {/* Data Protection */}
667
- <div className="!space-y-4">
668
- <h3 className="text-fm-secondary! text-lg font-semibold">
669
- Data Protection
670
- </h3>
671
- <div className="!space-y-4">
672
- <div className="border-fm-divider-secondary bg-fm-icon-inactive/10 rounded-lg border p-4">
673
- <div className="flex items-start gap-3">
674
- <EyeCloseIcon className="text-fm-tertiary mt-0.5 h-5 w-5 flex-shrink-0" />
675
- <div>
676
- <h4 className="text-fm-secondary! font-medium">
677
- Encrypted Data
678
- </h4>
679
- <p className="text-fm-secondary!/80 text-sm">
680
- Your personal information is encrypted and
681
- protected from unauthorized access.
682
- </p>
683
- <div className="mt-2 flex gap-2">
684
- <span className="bg-fm-icon-inactive/20 text-fm-secondary inline-flex items-center rounded px-2 py-1 text-xs">
685
- End-to-end encrypted
686
- </span>
687
- <span className="bg-fm-icon-positive/20 text-fm-icon-positive inline-flex items-center rounded px-2 py-1 text-xs">
688
- Secure
689
- </span>
690
- </div>
691
- </div>
692
- </div>
693
- </div>
694
- <div className="bg-fm-surface-secondary rounded-lg p-4">
695
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
696
- {`// Data protection notice
697
- <div className="border border-slate-500/20 bg-slate-500/10 p-4 rounded-lg">
698
- <div className="flex items-start gap-3">
699
- <EyeCloseIcon className="h-5 w-5 text-slate-400 mt-0.5 flex-shrink-0 " />
700
- <div>
701
- <h4 className="font-medium text-slate-200">Encrypted Data</h4>
702
- <p className="text-sm text-slate-300/80">
703
- Your personal information is encrypted and protected.
704
- </p>
705
- </div>
706
- </div>
707
- </div>`}
708
- </pre>
709
- </div>
710
- </div>
711
- </div>
712
- </div>
713
- </div>
714
-
715
- {/* Accessibility */}
716
- <div className="!space-y-8">
717
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
718
- Accessibility Features
719
- </h2>
720
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
721
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
722
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
723
- ✅ Built-in Features
724
- </h3>
725
- <ul className="text-fm-secondary! !space-y-2 text-sm">
726
- <li className="text-fm-secondary!">
727
- Uses Radix UI AccessibleIcon wrapper
728
- </li>
729
- <li className="text-fm-secondary!">
730
- Provides screen reader label "Eye Close icon"
731
- </li>
732
- <li className="text-fm-secondary!">
733
- Supports keyboard navigation when interactive
734
- </li>
735
- <li className="text-fm-secondary!">
736
- Maintains proper color contrast ratios
737
- </li>
738
- <li className="text-fm-secondary!">
739
- Scales with user's font size preferences
740
- </li>
741
- </ul>
742
- </div>
743
-
744
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
745
- <h3 className="text-fm-secondary! text-lg font-semibold">
746
- 💡 Best Practices
747
- </h3>
748
- <ul className="text-fm-secondary !space-y-2 text-sm">
749
- <li className="text-fm-secondary!">
750
- Always provide clear button labels for toggle actions
751
- </li>
752
- <li className="text-fm-secondary!">
753
- Use consistent placement in form fields
754
- </li>
755
- <li className="text-fm-secondary!">
756
- Ensure sufficient touch target size (44px minimum)
757
- </li>
758
- <li className="text-fm-secondary!">
759
- Provide visible focus states for keyboard users
760
- </li>
761
- <li className="text-fm-secondary!">
762
- Consider screen reader announcements for state changes
763
- </li>
764
- </ul>
765
- </div>
766
- </div>
767
-
768
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
769
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
770
- Proper ARIA Implementation
771
- </h3>
772
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
773
- <div className="bg-fm-surface-secondary rounded-lg p-4">
774
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
775
- {`// Password toggle with proper ARIA
776
- <button
777
- aria-label={showPassword ? "Hide password" : "Show password"}
778
- aria-pressed={!showPassword}
779
- onClick={() => setShowPassword(!showPassword)}
780
- className="p-1 hover:bg-white/10 rounded"
781
- >
782
- {showPassword ? (
783
- <EyeIcon className="h-5 w-5 text-slate-400 " />
784
- ) : (
785
- <EyeCloseIcon className="h-5 w-5 text-slate-400 " />
786
- )}
787
- </button>
788
-
789
- // Privacy setting with description
790
- <button
791
- aria-label="Toggle profile visibility"
792
- aria-describedby="privacy-help"
793
- onClick={togglePrivacy}
794
- >
795
- <EyeCloseIcon className="h-5 w-5 text-slate-400 " />
796
- </button>
797
- <p id="privacy-help" className="text-xs text-white/60">
798
- Controls whether your profile is visible in search results
799
- </p>`}
800
- </pre>
801
- </div>
802
- <div className="!space-y-4">
803
- <p className="text-fm-secondary! text-sm">
804
- When using EyeCloseIcon for interactive elements, always
805
- provide descriptive aria-label attributes that explain
806
- the current state and what will happen when activated.
807
- </p>
808
- <div className="border-fm-divider-secondary bg-fm-icon-inactive/10 rounded-lg border p-4">
809
- <div className="text-fm-secondary flex items-center gap-2 text-sm">
810
- <EyeCloseIcon className="h-4 w-4" />
811
- <span>
812
- Screen readers need context about visibility states
813
- </span>
814
- </div>
815
- </div>
816
- </div>
817
- </div>
818
- </div>
819
- </div>
820
-
821
- {/* Related Icons */}
822
- <div className="!space-y-8">
823
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
824
- Related Icons
825
- </h2>
826
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
827
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
828
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
829
- <span className="text-2xl">👁️</span>
830
- </div>
831
- <div>
832
- <div className="text-fm-icon-active font-medium">
833
- EyeIcon
834
- </div>
835
- <div className="text-fm-tertiary text-xs">
836
- Show content
837
- </div>
838
- </div>
839
- </div>
840
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
841
- <div className="bg-fm-icon-negative/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
842
- <span className="text-2xl">🔒</span>
843
- </div>
844
- <div>
845
- <div className="text-fm-icon-active font-medium">
846
- LockIcon
847
- </div>
848
- <div className="text-fm-tertiary text-xs">Security</div>
849
- </div>
850
- </div>
851
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
852
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
853
- <span className="text-2xl">🛡️</span>
854
- </div>
855
- <div>
856
- <div className="text-fm-icon-active font-medium">
857
- ShieldIcon
858
- </div>
859
- <div className="text-fm-tertiary text-xs">Protection</div>
860
- </div>
861
- </div>
862
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
863
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
864
- <span className="text-2xl">⚙️</span>
865
- </div>
866
- <div>
867
- <div className="text-fm-icon-active font-medium">
868
- SettingsIcon
869
- </div>
870
- <div className="text-fm-tertiary text-xs">Configure</div>
871
- </div>
872
- </div>
873
- </div>
874
- </div>
875
- </div>
876
-
877
- {/* Footer */}
878
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
879
- <div className="!mx-auto max-w-7xl px-6 py-8">
880
- <div className="!space-y-4 text-center">
881
- <p className="text-fm-tertiary!">
882
- EyeCloseIcon is part of the Aural UI icon library, built
883
- with privacy and accessibility in mind.
884
- </p>
885
- <p className="text-fm-placeholder! text-sm">
886
- All icons use Radix UI's AccessibleIcon for screen reader
887
- compatibility and follow WCAG guidelines.
888
- </p>
889
- </div>
890
- </div>
891
- </div>
892
- </div>
893
- </>
52
+ }`,
53
+ livePreview: (
54
+ <button className="bg-fm-surface-secondary border-fm-divider-secondary flex items-center gap-2 rounded-lg border px-3 py-2">
55
+ <EyeCloseIcon className="text-fm-icon-active h-5 w-5" />
56
+ <span className="text-fm-primary font-fm-text text-sm">
57
+ Hide
58
+ </span>
59
+ </button>
60
+ ),
61
+ }}
62
+ relatedIcons={[
63
+ {
64
+ name: "EyeOpenIcon",
65
+ description: "Show content",
66
+ icon: EyeOpenIcon,
67
+ accentToken: "info",
68
+ },
69
+ {
70
+ name: "TickIcon",
71
+ description: "Confirm action",
72
+ icon: TickIcon,
73
+ accentToken: "positive",
74
+ },
75
+ {
76
+ name: "SearchIcon",
77
+ description: "Search content",
78
+ icon: SearchIcon,
79
+ accentToken: "warning",
80
+ },
81
+ {
82
+ name: "SettingIcon",
83
+ description: "Settings control",
84
+ icon: SettingIcon,
85
+ accentToken: "negative",
86
+ },
87
+ ]}
88
+ />
894
89
  ),
895
90
  },
896
91
  },
897
92
  tags: ["autodocs"],
898
93
  argTypes: {
899
- width: {
900
- control: { type: "range", min: 8, max: 96, step: 2 },
901
- description: "Width of the icon in pixels",
902
- },
903
- withAccessibility: {
904
- control: "boolean",
905
- description: "Whether to wrap the icon with accessibility features",
906
- },
907
- height: {
908
- control: { type: "range", min: 8, max: 96, step: 2 },
909
- description: "Height of the icon in pixels",
910
- },
911
- stroke: {
912
- control: "color",
913
- description: "Stroke color of the icon",
914
- },
915
- strokeWidth: {
916
- control: { type: "range", min: 0.5, max: 4, step: 0.5 },
917
- description: "Stroke width of the icon lines",
918
- },
919
94
  className: {
920
95
  control: "text",
921
- description: "CSS classes for styling (use for overrides)",
96
+ description: "CSS classes including color token",
922
97
  },
923
- onClick: {
924
- action: "clicked",
925
- description: "Click handler for toggle functionality",
98
+ withAccessibility: {
99
+ control: "boolean",
100
+ description: "Wrap with accessibility label",
926
101
  },
927
102
  },
928
103
  }
@@ -930,214 +105,112 @@ const [showPassword, setShowPassword] = useState(false)
930
105
  export default meta
931
106
  type Story = StoryObj<typeof EyeCloseIcon>
932
107
 
933
- // Story parameters for consistent dark theme
934
- const storyParameters = {
935
- backgrounds: {
936
- default: "dark",
937
- values: [
938
- { name: "dark", value: "var(--color-fm-surface-primary)" },
939
- { name: "darker", value: "var(--color-fm-neutral-0)" },
940
- ],
941
- },
942
- }
943
-
944
108
  export const Default: Story = {
945
109
  args: {
946
- className: "h-6 w-6 text-fm-tertiary ",
110
+ className: "h-6 w-6 text-fm-icon-active",
947
111
  withAccessibility: true,
948
112
  },
949
- parameters: storyParameters,
950
113
  render: (args) => (
951
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-32 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
114
+ <IconDefaultCanvas>
952
115
  <EyeCloseIcon {...args} />
953
- </div>
116
+ </IconDefaultCanvas>
954
117
  ),
955
118
  }
956
119
 
957
120
  export const SizeVariations: Story = {
958
- parameters: {
959
- ...storyParameters,
960
- docs: {
961
- description: {
962
- story:
963
- "EyeCloseIcon in different sizes, from small UI elements to large displays.",
964
- },
965
- },
966
- },
967
- render: () => (
968
- <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">
969
- <div className="text-center">
970
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-3 w-3" />
971
- <span className="text-fm-tertiary text-xs">12px</span>
972
- </div>
973
- <div className="text-center">
974
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-4 w-4" />
975
- <span className="text-fm-tertiary text-xs">16px</span>
976
- </div>
977
- <div className="text-center">
978
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-5 w-5" />
979
- <span className="text-fm-tertiary text-xs">20px</span>
980
- </div>
981
- <div className="text-center">
982
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-6 w-6" />
983
- <span className="text-fm-tertiary text-xs">24px</span>
984
- </div>
985
- <div className="text-center">
986
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-8 w-8" />
987
- <span className="text-fm-tertiary text-xs">32px</span>
988
- </div>
989
- <div className="text-center">
990
- <EyeCloseIcon className="text-fm-tertiary !mx-auto mb-2 h-12 w-12" />
991
- <span className="text-fm-tertiary text-xs">48px</span>
992
- </div>
993
- </div>
994
- ),
121
+ render: () => <IconSizeVariations icon={EyeCloseIcon} />,
995
122
  }
996
123
 
997
124
  export const ColorVariations: Story = {
998
- parameters: {
999
- ...storyParameters,
1000
- docs: {
1001
- description: {
1002
- story:
1003
- "EyeCloseIcon in different semantic colors for various privacy contexts.",
1004
- },
1005
- },
1006
- },
125
+ render: () => <IconColorVariations icon={EyeCloseIcon} />,
126
+ }
127
+
128
+ export const InteractiveStates: Story = {
1007
129
  render: () => (
1008
- <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">
1009
- <div className="text-center">
1010
- <div className="border-fm-divider-primary bg-fm-icon-inactive/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
1011
- <EyeCloseIcon className="text-fm-tertiary h-8 w-8" />
1012
- </div>
1013
- <div className="text-fm-icon-active text-sm font-medium">Default</div>
1014
- <div className="text-fm-tertiary text-xs">text-fm-tertiary</div>
1015
- </div>
1016
- <div className="text-center">
1017
- <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">
1018
- <EyeCloseIcon className="text-fm-placeholder h-8 w-8" />
1019
- </div>
1020
- <div className="text-fm-icon-active text-sm font-medium">Disabled</div>
1021
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
1022
- </div>
1023
- <div className="text-center">
1024
- <div className="border-fm-icon-negative/30 bg-fm-icon-negative/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
1025
- <EyeCloseIcon className="text-fm-icon-negative h-8 w-8" />
1026
- </div>
1027
- <div className="text-fm-icon-active text-sm font-medium">
1028
- Restricted
1029
- </div>
1030
- <div className="text-fm-icon-negative text-xs">
1031
- text-fm-icon-negative
1032
- </div>
1033
- </div>
1034
- <div className="text-center">
1035
- <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">
1036
- <EyeCloseIcon className="text-fm-icon-info h-8 w-8" />
1037
- </div>
1038
- <div className="text-fm-icon-active text-sm font-medium">
1039
- Interactive
1040
- </div>
1041
- <div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
1042
- </div>
1043
- </div>
130
+ <IconInteractiveStates
131
+ icon={EyeCloseIcon}
132
+ states={[
133
+ {
134
+ label: "Active",
135
+ className: "h-8 w-8 text-fm-icon-active",
136
+ description: "Hidden state",
137
+ },
138
+ {
139
+ label: "Info",
140
+ className: "h-8 w-8 text-fm-icon-info",
141
+ description: "Highlighted state",
142
+ },
143
+ {
144
+ label: "Inactive",
145
+ className: "h-8 w-8 text-fm-icon-inactive",
146
+ description: "Muted / disabled",
147
+ },
148
+ ]}
149
+ />
1044
150
  ),
1045
151
  }
1046
152
 
1047
153
  export const UsageExamples: Story = {
1048
- parameters: {
1049
- ...storyParameters,
1050
- docs: {
1051
- description: {
1052
- story:
1053
- "Real-world usage examples showing EyeCloseIcon in different UI contexts.",
1054
- },
1055
- },
1056
- },
1057
154
  render: () => (
1058
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
1059
- {/* Password Field */}
1060
- <div className="!space-y-2">
1061
- <h3 className="text-fm-icon-active text-sm font-medium">
1062
- Password Field Toggle
1063
- </h3>
1064
- <div className="relative">
155
+ <IconUsageCanvas>
156
+ <IconUsageSection title="Password Field (Hidden)">
157
+ <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-3">
1065
158
  <input
1066
159
  type="password"
1067
- className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active w-full rounded-lg border px-3 py-2 pr-10 placeholder-white/50"
1068
- placeholder="Enter your password"
1069
- defaultValue="mysecretpassword"
160
+ placeholder="Enter password"
161
+ defaultValue="password123"
162
+ className="text-fm-primary font-fm-text flex-1 bg-transparent text-sm outline-none"
1070
163
  />
1071
- <button className="hover:bg-fm-surface-secondary absolute top-1/2 right-2 -translate-y-1/2 rounded p-1">
1072
- <EyeCloseIcon className="text-fm-tertiary h-5 w-5" />
164
+ <button aria-label="Show password">
165
+ <EyeCloseIcon className="text-fm-icon-active h-5 w-5" />
1073
166
  </button>
1074
167
  </div>
1075
- </div>
1076
-
1077
- {/* Content Filter */}
1078
- <div className="!space-y-2">
1079
- <h3 className="text-fm-icon-active text-sm font-medium">
1080
- Content Filter
1081
- </h3>
1082
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8 text-center">
1083
- <EyeCloseIcon className="text-fm-icon-inactive mx-auto mb-3 h-12 w-12" />
1084
- <p className="text-fm-tertiary text-sm">
1085
- Content hidden due to privacy settings
168
+ </IconUsageSection>
169
+
170
+ <IconUsageSection title="Visibility Toggle (Hidden)">
171
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-2 rounded-xl border p-4">
172
+ <div className="flex items-center justify-between">
173
+ <span className="text-fm-primary font-fm-text text-sm font-medium">
174
+ Hide sensitive data
175
+ </span>
176
+ <button className="flex items-center gap-1.5">
177
+ <EyeCloseIcon className="text-fm-icon-inactive h-4 w-4" />
178
+ <span className="text-fm-tertiary font-fm-text text-xs">
179
+ Hidden
180
+ </span>
181
+ </button>
182
+ </div>
183
+ <p className="text-fm-secondary font-fm-text text-xs">
184
+ Account balance is hidden
1086
185
  </p>
1087
- <button className="text-fm-icon-info hover:text-fm-icon-info mt-2 text-xs">
1088
- Show content
1089
- </button>
1090
186
  </div>
1091
- </div>
1092
-
1093
- {/* Privacy Settings */}
1094
- <div className="!space-y-2">
1095
- <h3 className="text-fm-icon-active text-sm font-medium">
1096
- Privacy Settings
1097
- </h3>
1098
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-between rounded-lg border p-4">
1099
- <div className="flex items-center gap-3">
1100
- <EyeCloseIcon className="text-fm-tertiary h-5 w-5" />
1101
- <div>
1102
- <div className="text-fm-icon-active text-sm font-medium">
1103
- Profile Visibility
1104
- </div>
1105
- <div className="text-fm-tertiary text-xs">
1106
- Your profile is hidden from search
1107
- </div>
187
+ </IconUsageSection>
188
+
189
+ <IconUsageSection title="Privacy Indicator">
190
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center gap-3 rounded-xl border p-4">
191
+ <EyeCloseIcon className="text-fm-icon-inactive h-5 w-5" />
192
+ <div>
193
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
194
+ Private profile
195
+ </div>
196
+ <div className="text-fm-secondary font-fm-text text-xs">
197
+ Only you can see this
1108
198
  </div>
1109
- </div>
1110
- <div className="flex items-center">
1111
- <span className="text-fm-tertiary mr-3 text-xs">Private</span>
1112
- <div className="bg-fm-icon-inactive h-6 w-11 rounded-full"></div>
1113
199
  </div>
1114
200
  </div>
1115
- </div>
1116
- </div>
201
+ </IconUsageSection>
202
+ </IconUsageCanvas>
1117
203
  ),
1118
204
  }
1119
205
 
1120
206
  export const Playground: Story = {
1121
- parameters: {
1122
- ...storyParameters,
1123
- docs: {
1124
- description: {
1125
- story:
1126
- "Interactive playground to experiment with different EyeCloseIcon configurations.",
1127
- },
1128
- },
1129
- },
1130
207
  args: {
1131
- width: 32,
1132
- height: 32,
1133
- className: "text-fm-tertiary ",
1134
- strokeWidth: 1,
208
+ className: "h-8 w-8 text-fm-icon-active",
209
+ withAccessibility: true,
1135
210
  },
1136
211
  render: (args) => (
1137
- <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">
1138
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1139
- <EyeCloseIcon {...args} />
1140
- </div>
1141
- </div>
212
+ <IconPlaygroundCanvas>
213
+ <EyeCloseIcon {...args} />
214
+ </IconPlaygroundCanvas>
1142
215
  ),
1143
216
  }