aural-ui 3.0.7 → 4.1.0

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