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 { EyeCloseIcon } from "src/ui/icons/eye-close-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 { EyeOpenIcon } from "."
5
20
 
6
21
  const meta: Meta<typeof EyeOpenIcon> = {
@@ -11,893 +26,78 @@ const meta: Meta<typeof EyeOpenIcon> = {
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-blue-500/10 via-transparent to-green-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-blue-500/30 bg-gradient-to-br from-blue-500/20 to-green-500/20">
90
- <EyeOpenIcon className="h-12 w-12 text-blue-400" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- EyeOpenIcon
94
- </h1>
95
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
96
- A visibility toggle icon for showing content, password
97
- fields, and interactive elements. Features an open eye
98
- design that clearly indicates visible or public state.
99
- Perfect for password visibility toggles, content reveals,
100
- and transparency controls. Built with accessibility in mind
101
- using 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-blue-300">
108
- Visible
109
- </div>
110
- <div className="text-sm text-white/60">Content shown</div>
111
- </div>
112
- <div className="h-8 w-px bg-white/20" />
113
- <div className="text-center">
114
- <div className="text-3xl font-bold text-green-300">
115
- Accessible
116
- </div>
117
- <div className="text-sm text-white/60">
118
- Screen reader friendly
119
- </div>
120
- </div>
121
- <div className="h-8 w-px bg-white/20" />
122
- <div className="text-center">
123
- <div className="text-3xl font-bold text-indigo-300">
124
- Interactive
125
- </div>
126
- <div className="text-sm text-white/60">Toggle states</div>
127
- </div>
128
- </div>
129
- </div>
130
- </div>
131
- </div>
132
-
133
- {/* Content */}
134
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
135
- {/* Quick Usage */}
136
- <div className="!space-y-8">
137
- <h2 className="text-center text-3xl font-bold !text-white">
138
- Quick Start
139
- </h2>
140
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
141
- <div className="!space-y-4">
142
- <h3 className="text-xl font-semibold !text-blue-300">
143
- Basic Usage
144
- </h3>
145
- <div className="rounded-lg bg-black/40 p-4">
146
- <pre className="overflow-x-auto text-sm !text-green-300">
147
- {`import { EyeOpenIcon } from "@icons/eye-open-icon"
148
-
149
- function PasswordField() {
150
- const [isVisible, setIsVisible] = useState(true)
151
-
36
+ <AuralIconDocsPage
37
+ accentToken="info"
38
+ features={[
39
+ { title: "Visibility", description: "Show content or passwords" },
40
+ { title: "currentColor", description: "Responds to text tokens" },
41
+ { title: "Accessible", description: "ARIA-ready by default" },
42
+ ]}
43
+ quickStart={{
44
+ codeExample: `import { EyeOpenIcon } from "src/ui/icons/eye-open-icon"
45
+
46
+ function PasswordInput() {
152
47
  return (
153
- <div className="relative">
154
- <input
155
- type={isVisible ? "text" : "password"}
156
- className="pr-10"
157
- />
158
- <button
159
- onClick={() => setIsVisible(!isVisible)}
160
- className="absolute right-2 top-1/2 -translate-y-1/2"
161
- >
162
- <EyeOpenIcon className="h-5 w-5 text-blue-400 " />
163
- </button>
164
- </div>
48
+ <button aria-label="Show password">
49
+ <EyeOpenIcon className="h-5 w-5 text-fm-icon-active" />
50
+ </button>
165
51
  )
166
- }`}
167
- </pre>
168
- </div>
169
- </div>
170
-
171
- <div className="!space-y-4">
172
- <h3 className="text-xl font-semibold !text-blue-300">
173
- Live Preview
174
- </h3>
175
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
176
- <div className="relative">
177
- <input
178
- type="text"
179
- placeholder="Visible password"
180
- defaultValue="mypassword123"
181
- className="rounded-lg border border-white/20 bg-white/5 px-3 py-2 pr-10 text-white placeholder-white/50"
182
- />
183
- <button className="absolute top-1/2 right-2 -translate-y-1/2 rounded p-1 hover:bg-white/10">
184
- <EyeOpenIcon className="h-5 w-5 text-blue-400" />
185
- </button>
186
- </div>
187
- </div>
188
- </div>
189
- </div>
190
- </div>
191
-
192
- {/* Props Documentation */}
193
- <div className="!space-y-8">
194
- <h2 className="text-center text-3xl font-bold !text-white">
195
- Props & Configuration
196
- </h2>
197
-
198
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
199
- <div className="bg-white/5 p-4">
200
- <h3 className="text-xl font-semibold !text-white">Props</h3>
201
- </div>
202
- <table className="!my-0 w-full">
203
- <thead className="bg-white/5">
204
- <tr className="border-b border-white/10">
205
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
206
- Prop
207
- </th>
208
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
209
- Type
210
- </th>
211
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
212
- Default
213
- </th>
214
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
215
- Description
216
- </th>
217
- </tr>
218
- </thead>
219
- <tbody>
220
- {" "}
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-blue-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-blue-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-blue-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-blue-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-blue-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-blue-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-blue-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
- <EyeOpenIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
329
- <span className="text-xs text-white/60">12px</span>
330
- </div>
331
- <div className="text-center">
332
- <EyeOpenIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
333
- <span className="text-xs text-white/60">16px</span>
334
- </div>
335
- <div className="text-center">
336
- <EyeOpenIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
337
- <span className="text-xs text-white/60">20px</span>
338
- </div>
339
- <div className="text-center">
340
- <EyeOpenIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
341
- <span className="text-xs text-white/60">24px</span>
342
- </div>
343
- <div className="text-center">
344
- <EyeOpenIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
345
- <span className="text-xs text-white/60">32px</span>
346
- </div>
347
- <div className="text-center">
348
- <EyeOpenIcon className="!mx-auto mb-2 h-12 w-12 text-blue-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-blue-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
- <EyeOpenIcon className="h-4 w-4 " />
362
-
363
- // Medium (24px)
364
- <EyeOpenIcon className="h-6 w-6 " />
365
-
366
- // Large (32px)
367
- <EyeOpenIcon className="h-8 w-8 " />
368
-
369
- // Custom size with stroke width
370
- <EyeOpenIcon
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-blue-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
- <EyeOpenIcon className="h-6 w-6 text-blue-400" />
396
- <div>
397
- <div className="text-sm font-medium text-white">
398
- Default / Visible
399
- </div>
400
- <div className="text-xs text-white/60">
401
- text-blue-400
402
- </div>
403
- </div>
404
- </div>
405
- <div className="flex items-center gap-4">
406
- <EyeOpenIcon className="h-6 w-6 text-green-400" />
407
- <div>
408
- <div className="text-sm font-medium text-white">
409
- Active
410
- </div>
411
- <div className="text-xs text-white/60">
412
- text-green-400
413
- </div>
414
- </div>
415
- </div>
416
- <div className="flex items-center gap-4">
417
- <EyeOpenIcon className="h-6 w-6 text-purple-400" />
418
- <div>
419
- <div className="text-sm font-medium text-white">
420
- Interactive
421
- </div>
422
- <div className="text-xs text-white/60">
423
- text-purple-400
424
- </div>
425
- </div>
426
- </div>
427
- <div className="flex items-center gap-4">
428
- <EyeOpenIcon className="h-6 w-6 text-slate-400" />
429
- <div>
430
- <div className="text-sm font-medium text-white">
431
- Neutral
432
- </div>
433
- <div className="text-xs text-white/60">
434
- text-slate-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-blue-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
- <EyeOpenIcon className="h-6 w-6 text-blue-400 " />
449
- <EyeOpenIcon className="h-6 w-6 text-green-500 " />
450
-
451
- // Using CSS custom properties
452
- <EyeOpenIcon
453
- className="h-6 w-6 "
454
- style={{ color: 'var(--color-visibility)' }}
455
- />
456
-
457
- // Direct stroke prop
458
- <EyeOpenIcon
459
- width={24}
460
- height={24}
461
- stroke="#3b82f6"
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-blue-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="text"
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-blue-400 focus:ring-2 focus:ring-blue-400/20"
491
- placeholder="Enter your password"
492
- defaultValue="myvisiblepassword"
493
- />
494
- <button className="absolute top-1/2 right-2 -translate-y-1/2 rounded p-1 transition-colors hover:bg-white/10">
495
- <EyeOpenIcon className="h-5 w-5 text-blue-400" />
496
- </button>
497
- </div>
498
- <p className="text-xs !text-white/60">
499
- Password is currently visible. Click the eye icon to
500
- hide it.
501
- </p>
502
- </div>
503
- <div className="rounded-lg bg-black/40 p-4">
504
- <pre className="overflow-x-auto text-sm !text-green-300">
505
- {`// Password visibility toggle
506
- const [showPassword, setShowPassword] = useState(true)
507
-
508
- <div className="relative">
509
- <input
510
- type={showPassword ? "text" : "password"}
511
- className="w-full pr-10"
512
- />
513
- <button
514
- onClick={() => setShowPassword(!showPassword)}
515
- className="absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-white/10 rounded"
516
- >
517
- {showPassword ? (
518
- <EyeOpenIcon className="h-5 w-5 text-blue-400 " />
519
- ) : (
520
- <EyeCloseIcon className="h-5 w-5 text-slate-400 " />
521
- )}
522
- </button>
523
- </div>`}
524
- </pre>
525
- </div>
526
- </div>
527
- </div>
528
-
529
- {/* Content Reveal */}
530
- <div className="!space-y-4">
531
- <h3 className="text-lg font-semibold !text-blue-300">
532
- Content Reveal
533
- </h3>
534
- <div className="!space-y-4">
535
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
536
- <div className="mb-3 flex items-center justify-between">
537
- <span className="font-medium text-white">
538
- Protected Content
539
- </span>
540
- <button className="flex items-center gap-2 text-sm text-blue-400 hover:text-blue-300">
541
- <EyeOpenIcon className="h-4 w-4" />
542
- Visible
543
- </button>
544
- </div>
545
- <div className="rounded-lg border border-blue-500/20 bg-gradient-to-r from-blue-500/10 to-green-500/10 p-6 text-center">
546
- <div className="mb-3 flex items-center justify-center gap-2">
547
- <EyeOpenIcon className="h-6 w-6 text-blue-400" />
548
- <span className="font-medium text-white">
549
- Content is visible
550
- </span>
551
- </div>
552
- <p className="text-sm !text-white/80">
553
- This sensitive information is now displayed. You can
554
- view all details below.
555
- </p>
556
- <div className="mt-4 rounded bg-black/20 p-3 text-left text-sm text-white/70">
557
- Secret Key: sk_live_123456789
558
- <br />
559
- API Endpoint: https://api.example.com/v1
560
- <br />
561
- Access Level: Administrator
562
- </div>
563
- </div>
564
- </div>
565
- <div className="rounded-lg bg-black/40 p-4">
566
- <pre className="overflow-x-auto text-sm !text-green-300">
567
- {`// Content reveal with visible state
568
- <div className="border border-blue-500/20 bg-gradient-to-r from-blue-500/10 to-green-500/10 p-6 text-center rounded-lg">
569
- <div className="flex items-center justify-center gap-2 mb-3">
570
- <EyeOpenIcon className="h-6 w-6 text-blue-400 " />
571
- <span className="font-medium text-white">Content is visible</span>
572
- </div>
573
- <div className="sensitive-content">
574
- {/* Revealed content here */}
575
- </div>
576
- </div>`}
577
- </pre>
578
- </div>
579
- </div>
580
- </div>
581
-
582
- {/* Visibility Settings */}
583
- <div className="!space-y-4">
584
- <h3 className="text-lg font-semibold !text-blue-300">
585
- Visibility Settings
586
- </h3>
587
- <div className="!space-y-4">
588
- <div className="!space-y-3">
589
- <div className="flex items-center justify-between rounded-lg border border-white/10 bg-white/5 p-4">
590
- <div className="flex items-center gap-3">
591
- <EyeOpenIcon className="h-5 w-5 text-blue-400" />
592
- <div>
593
- <div className="text-sm font-medium text-white">
594
- Profile Visibility
595
- </div>
596
- <div className="text-xs text-white/60">
597
- Your profile is visible to everyone
598
- </div>
599
- </div>
600
- </div>
601
- <div className="flex items-center">
602
- <span className="mr-3 text-xs text-blue-400">
603
- Public
604
- </span>
605
- <div className="relative h-6 w-11 rounded-full bg-blue-600">
606
- <div className="absolute top-1 right-1 h-4 w-4 rounded-full bg-white transition-transform"></div>
607
- </div>
608
- </div>
609
- </div>
610
- <div className="flex items-center justify-between rounded-lg border border-white/10 bg-white/5 p-4">
611
- <div className="flex items-center gap-3">
612
- <EyeOpenIcon className="h-5 w-5 text-green-400" />
613
- <div>
614
- <div className="text-sm font-medium text-white">
615
- Activity Status
616
- </div>
617
- <div className="text-xs text-white/60">
618
- Show your online status
619
- </div>
620
- </div>
621
- </div>
622
- <div className="flex items-center">
623
- <span className="mr-3 text-xs text-green-400">
624
- Visible
625
- </span>
626
- <div className="relative h-6 w-11 rounded-full bg-green-600">
627
- <div className="absolute top-1 right-1 h-4 w-4 rounded-full bg-white transition-transform"></div>
628
- </div>
629
- </div>
630
- </div>
631
- </div>
632
- <div className="rounded-lg bg-black/40 p-4">
633
- <pre className="overflow-x-auto text-sm !text-green-300">
634
- {`// Visibility setting item
635
- <div className="flex items-center justify-between p-4 border border-white/10 bg-white/5 rounded-lg">
636
- <div className="flex items-center gap-3">
637
- <EyeOpenIcon className="h-5 w-5 text-blue-400 " />
638
- <div>
639
- <div className="text-sm font-medium text-white">Profile Visibility</div>
640
- <div className="text-xs text-white/60">Your profile is visible to everyone</div>
641
- </div>
642
- </div>
643
- <ToggleSwitch checked={true} onChange={handleToggle} />
644
- </div>`}
645
- </pre>
646
- </div>
647
- </div>
648
- </div>
649
-
650
- {/* Data Transparency */}
651
- <div className="!space-y-4">
652
- <h3 className="text-lg font-semibold !text-blue-300">
653
- Data Transparency
654
- </h3>
655
- <div className="!space-y-4">
656
- <div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
657
- <div className="flex items-start gap-3">
658
- <EyeOpenIcon className="mt-0.5 h-5 w-5 flex-shrink-0 text-blue-400" />
659
- <div>
660
- <h4 className="font-medium !text-blue-200">
661
- Transparent Data Usage
662
- </h4>
663
- <p className="text-sm !text-blue-300/80">
664
- Your data usage is fully visible and trackable.
665
- You can see exactly how your information is being
666
- processed.
667
- </p>
668
- <div className="mt-2 flex gap-2">
669
- <span className="inline-flex items-center rounded bg-blue-500/20 px-2 py-1 text-xs text-blue-300">
670
- Fully transparent
671
- </span>
672
- <span className="inline-flex items-center rounded bg-green-500/20 px-2 py-1 text-xs text-green-300">
673
- Auditable
674
- </span>
675
- </div>
676
- </div>
677
- </div>
678
- </div>
679
- <div className="rounded-lg bg-black/40 p-4">
680
- <pre className="overflow-x-auto text-sm !text-green-300">
681
- {`// Data transparency notice
682
- <div className="border border-blue-500/20 bg-blue-500/10 p-4 rounded-lg">
683
- <div className="flex items-start gap-3">
684
- <EyeOpenIcon className="h-5 w-5 text-blue-400 mt-0.5 flex-shrink-0 " />
685
- <div>
686
- <h4 className="font-medium text-blue-200">Transparent Data Usage</h4>
687
- <p className="text-sm text-blue-300/80">
688
- Your data usage is fully visible and trackable.
689
- </p>
690
- </div>
691
- </div>
692
- </div>`}
693
- </pre>
694
- </div>
695
- </div>
696
- </div>
697
- </div>
698
- </div>
699
-
700
- {/* Accessibility */}
701
- <div className="!space-y-8">
702
- <h2 className="text-center text-3xl font-bold !text-white">
703
- Accessibility Features
704
- </h2>
705
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
706
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
707
- <h3 className="text-lg font-semibold !text-green-300">
708
- ✅ Built-in Features
709
- </h3>
710
- <ul className="!space-y-2 text-sm !text-white/70">
711
- <li className="!text-white/70">
712
- Uses Radix UI AccessibleIcon wrapper
713
- </li>
714
- <li className="!text-white/70">
715
- Provides screen reader label "Eye Open icon"
716
- </li>
717
- <li className="!text-white/70">
718
- Supports keyboard navigation when interactive
719
- </li>
720
- <li className="!text-white/70">
721
- Maintains proper color contrast ratios
722
- </li>
723
- <li className="!text-white/70">
724
- Scales with user's font size preferences
725
- </li>
726
- </ul>
727
- </div>
728
-
729
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
730
- <h3 className="text-lg font-semibold !text-blue-300">
731
- 💡 Best Practices
732
- </h3>
733
- <ul className="!space-y-2 text-sm text-white/70">
734
- <li className="!text-white/70">
735
- Always provide clear button labels for toggle actions
736
- </li>
737
- <li className="!text-white/70">
738
- Use consistent placement in form fields
739
- </li>
740
- <li className="!text-white/70">
741
- Ensure sufficient touch target size (44px minimum)
742
- </li>
743
- <li className="!text-white/70">
744
- Provide visible focus states for keyboard users
745
- </li>
746
- <li className="!text-white/70">
747
- Consider screen reader announcements for state changes
748
- </li>
749
- </ul>
750
- </div>
751
- </div>
752
-
753
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
754
- <h3 className="mb-4 text-lg font-semibold !text-purple-300">
755
- Proper ARIA Implementation
756
- </h3>
757
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
758
- <div className="rounded-lg bg-black/40 p-4">
759
- <pre className="overflow-x-auto text-sm !text-cyan-300">
760
- {`// Password toggle with proper ARIA
761
- <button
762
- aria-label={showPassword ? "Hide password" : "Show password"}
763
- aria-pressed={showPassword}
764
- onClick={() => setShowPassword(!showPassword)}
765
- className="p-1 hover:bg-white/10 rounded"
766
- >
767
- {showPassword ? (
768
- <EyeOpenIcon className="h-5 w-5 text-blue-400 " />
769
- ) : (
770
- <EyeCloseIcon className="h-5 w-5 text-slate-400 " />
771
- )}
772
- </button>
773
-
774
- // Visibility setting with description
775
- <button
776
- aria-label="Toggle content visibility"
777
- aria-describedby="visibility-help"
778
- onClick={toggleVisibility}
779
- >
780
- <EyeOpenIcon className="h-5 w-5 text-blue-400 " />
781
- </button>
782
- <p id="visibility-help" className="text-xs text-white/60">
783
- Controls whether your content is publicly visible
784
- </p>`}
785
- </pre>
786
- </div>
787
- <div className="!space-y-4">
788
- <p className="text-sm !text-white/70">
789
- When using EyeOpenIcon for interactive elements, always
790
- provide descriptive aria-label attributes that explain
791
- the current state and what will happen when activated.
792
- </p>
793
- <div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
794
- <div className="flex items-center gap-2 text-sm text-blue-200">
795
- <EyeOpenIcon className="h-4 w-4" />
796
- <span>
797
- Screen readers need context about visibility states
798
- </span>
799
- </div>
800
- </div>
801
- </div>
802
- </div>
803
- </div>
804
- </div>
805
-
806
- {/* Related Icons */}
807
- <div className="!space-y-8">
808
- <h2 className="text-center text-3xl font-bold !text-white">
809
- Related Icons
810
- </h2>
811
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
812
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
813
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-slate-500/20">
814
- <span className="text-2xl">🙈</span>
815
- </div>
816
- <div>
817
- <div className="font-medium text-white">EyeCloseIcon</div>
818
- <div className="text-xs text-white/60">Hide content</div>
819
- </div>
820
- </div>
821
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
822
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
823
- <span className="text-2xl">✅</span>
824
- </div>
825
- <div>
826
- <div className="font-medium text-white">CheckIcon</div>
827
- <div className="text-xs text-white/60">Verified</div>
828
- </div>
829
- </div>
830
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
831
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
832
- <span className="text-2xl">🛡️</span>
833
- </div>
834
- <div>
835
- <div className="font-medium text-white">ShieldIcon</div>
836
- <div className="text-xs text-white/60">Security</div>
837
- </div>
838
- </div>
839
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
840
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
841
- <span className="text-2xl">⚙️</span>
842
- </div>
843
- <div>
844
- <div className="font-medium text-white">SettingsIcon</div>
845
- <div className="text-xs text-white/60">Configure</div>
846
- </div>
847
- </div>
848
- </div>
849
- </div>
850
- </div>
851
-
852
- {/* Footer */}
853
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
854
- <div className="!mx-auto max-w-7xl px-6 py-8">
855
- <div className="!space-y-4 text-center">
856
- <p className="!text-white/60">
857
- EyeOpenIcon is part of the Aural UI icon library, built with
858
- visibility and accessibility in mind.
859
- </p>
860
- <p className="text-sm !text-white/40">
861
- All icons use Radix UI's AccessibleIcon for screen reader
862
- compatibility and follow WCAG guidelines.
863
- </p>
864
- </div>
865
- </div>
866
- </div>
867
- </div>
868
- </>
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
+ <EyeOpenIcon className="text-fm-icon-active h-5 w-5" />
56
+ <span className="text-fm-primary font-fm-text text-sm">
57
+ Show
58
+ </span>
59
+ </button>
60
+ ),
61
+ }}
62
+ relatedIcons={[
63
+ {
64
+ name: "EyeCloseIcon",
65
+ description: "Hide content",
66
+ icon: EyeCloseIcon,
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
+ />
869
89
  ),
870
90
  },
871
91
  },
872
92
  tags: ["autodocs"],
873
93
  argTypes: {
874
- width: {
875
- control: { type: "range", min: 8, max: 96, step: 2 },
876
- description: "Width of the icon in pixels",
877
- },
878
- withAccessibility: {
879
- control: "boolean",
880
- description: "Whether to wrap the icon with accessibility features",
881
- },
882
- height: {
883
- control: { type: "range", min: 8, max: 96, step: 2 },
884
- description: "Height of the icon in pixels",
885
- },
886
- stroke: {
887
- control: "color",
888
- description: "Stroke color of the icon",
889
- },
890
- strokeWidth: {
891
- control: { type: "range", min: 0.5, max: 4, step: 0.5 },
892
- description: "Stroke width of the icon lines",
893
- },
894
94
  className: {
895
95
  control: "text",
896
- description: "CSS classes for styling (use for overrides)",
96
+ description: "CSS classes including color token",
897
97
  },
898
- onClick: {
899
- action: "clicked",
900
- description: "Click handler for toggle functionality",
98
+ withAccessibility: {
99
+ control: "boolean",
100
+ description: "Wrap with accessibility label",
901
101
  },
902
102
  },
903
103
  }
@@ -905,202 +105,109 @@ const [showPassword, setShowPassword] = useState(true)
905
105
  export default meta
906
106
  type Story = StoryObj<typeof EyeOpenIcon>
907
107
 
908
- // Story parameters for consistent dark theme
909
- const storyParameters = {
910
- backgrounds: {
911
- default: "dark",
912
- values: [
913
- { name: "dark", value: "#0a0a0a" },
914
- { name: "darker", value: "#000000" },
915
- ],
916
- },
917
- }
918
-
919
108
  export const Default: Story = {
920
109
  args: {
921
- className: "h-6 w-6 text-blue-400 ",
110
+ className: "h-6 w-6 text-fm-icon-active",
922
111
  withAccessibility: true,
923
112
  },
924
- parameters: storyParameters,
925
113
  render: (args) => (
926
- <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>
927
115
  <EyeOpenIcon {...args} />
928
- </div>
116
+ </IconDefaultCanvas>
929
117
  ),
930
118
  }
931
119
 
932
120
  export const SizeVariations: Story = {
933
- parameters: {
934
- ...storyParameters,
935
- docs: {
936
- description: {
937
- story:
938
- "EyeOpenIcon in different sizes, from small UI elements to large displays.",
939
- },
940
- },
941
- },
942
- render: () => (
943
- <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">
944
- <div className="text-center">
945
- <EyeOpenIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
946
- <span className="text-xs text-white/60">12px</span>
947
- </div>
948
- <div className="text-center">
949
- <EyeOpenIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
950
- <span className="text-xs text-white/60">16px</span>
951
- </div>
952
- <div className="text-center">
953
- <EyeOpenIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
954
- <span className="text-xs text-white/60">20px</span>
955
- </div>
956
- <div className="text-center">
957
- <EyeOpenIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
958
- <span className="text-xs text-white/60">24px</span>
959
- </div>
960
- <div className="text-center">
961
- <EyeOpenIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
962
- <span className="text-xs text-white/60">32px</span>
963
- </div>
964
- <div className="text-center">
965
- <EyeOpenIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
966
- <span className="text-xs text-white/60">48px</span>
967
- </div>
968
- </div>
969
- ),
121
+ render: () => <IconSizeVariations icon={EyeOpenIcon} />,
970
122
  }
971
123
 
972
124
  export const ColorVariations: Story = {
973
- parameters: {
974
- ...storyParameters,
975
- docs: {
976
- description: {
977
- story:
978
- "EyeOpenIcon in different semantic colors for various visibility contexts.",
979
- },
980
- },
981
- },
125
+ render: () => <IconColorVariations icon={EyeOpenIcon} />,
126
+ }
127
+
128
+ export const InteractiveStates: Story = {
982
129
  render: () => (
983
- <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">
984
- <div className="text-center">
985
- <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">
986
- <EyeOpenIcon className="h-8 w-8 text-blue-400" />
987
- </div>
988
- <div className="text-sm font-medium text-white">Default</div>
989
- <div className="text-xs text-blue-400">text-blue-400</div>
990
- </div>
991
- <div className="text-center">
992
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-green-500/30 bg-green-500/20">
993
- <EyeOpenIcon className="h-8 w-8 text-green-400" />
994
- </div>
995
- <div className="text-sm font-medium text-white">Active</div>
996
- <div className="text-xs text-green-400">text-green-400</div>
997
- </div>
998
- <div className="text-center">
999
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
1000
- <EyeOpenIcon className="h-8 w-8 text-purple-400" />
1001
- </div>
1002
- <div className="text-sm font-medium text-white">Interactive</div>
1003
- <div className="text-xs text-purple-400">text-purple-400</div>
1004
- </div>
1005
- <div className="text-center">
1006
- <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">
1007
- <EyeOpenIcon className="h-8 w-8 text-slate-400" />
1008
- </div>
1009
- <div className="text-sm font-medium text-white">Neutral</div>
1010
- <div className="text-xs text-slate-400">text-slate-400</div>
1011
- </div>
1012
- </div>
130
+ <IconInteractiveStates
131
+ icon={EyeOpenIcon}
132
+ states={[
133
+ {
134
+ label: "Active",
135
+ className: "h-8 w-8 text-fm-icon-active",
136
+ description: "Default visible 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
+ />
1013
150
  ),
1014
151
  }
1015
152
 
1016
153
  export const UsageExamples: Story = {
1017
- parameters: {
1018
- ...storyParameters,
1019
- docs: {
1020
- description: {
1021
- story:
1022
- "Real-world usage examples showing EyeOpenIcon in different UI contexts.",
1023
- },
1024
- },
1025
- },
1026
154
  render: () => (
1027
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
1028
- {/* Password Field */}
1029
- <div className="!space-y-2">
1030
- <h3 className="text-sm font-medium text-white">
1031
- Password Field Toggle
1032
- </h3>
1033
- <div className="relative">
155
+ <IconUsageCanvas>
156
+ <IconUsageSection title="Password Field">
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">
1034
158
  <input
1035
159
  type="text"
1036
- className="w-full rounded-lg border border-white/20 bg-white/5 px-3 py-2 pr-10 text-white placeholder-white/50"
1037
- placeholder="Enter your password"
1038
- defaultValue="myvisiblepassword"
160
+ placeholder="Enter password"
161
+ defaultValue="••••••••"
162
+ className="text-fm-primary font-fm-text flex-1 bg-transparent text-sm outline-none"
1039
163
  />
1040
- <button className="absolute top-1/2 right-2 -translate-y-1/2 rounded p-1 hover:bg-white/10">
1041
- <EyeOpenIcon className="h-5 w-5 text-blue-400" />
1042
- </button>
1043
- </div>
1044
- </div>
1045
-
1046
- {/* Content Reveal */}
1047
- <div className="!space-y-2">
1048
- <h3 className="text-sm font-medium text-white">Content Reveal</h3>
1049
- <div className="rounded-lg border border-blue-500/20 bg-gradient-to-r from-blue-500/10 to-green-500/10 p-6 text-center">
1050
- <EyeOpenIcon className="mx-auto mb-3 h-12 w-12 text-blue-400" />
1051
- <p className="text-sm text-white/60">Content is now visible</p>
1052
- <button className="mt-2 text-xs text-blue-400 hover:text-blue-300">
1053
- Hide content
164
+ <button aria-label="Hide password">
165
+ <EyeOpenIcon className="text-fm-icon-active h-5 w-5" />
1054
166
  </button>
1055
167
  </div>
1056
- </div>
1057
-
1058
- {/* Visibility Settings */}
1059
- <div className="!space-y-2">
1060
- <h3 className="text-sm font-medium text-white">Visibility Settings</h3>
1061
- <div className="flex items-center justify-between rounded-lg border border-white/10 bg-white/5 p-4">
1062
- <div className="flex items-center gap-3">
1063
- <EyeOpenIcon className="h-5 w-5 text-blue-400" />
1064
- <div>
1065
- <div className="text-sm font-medium text-white">
1066
- Profile Visibility
1067
- </div>
1068
- <div className="text-xs text-white/60">
1069
- Your profile is visible to everyone
1070
- </div>
1071
- </div>
168
+ </IconUsageSection>
169
+
170
+ <IconUsageSection title="Visibility Toggle">
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
+ Show sensitive data
175
+ </span>
176
+ <button className="flex items-center gap-1.5">
177
+ <EyeOpenIcon className="text-fm-icon-info h-4 w-4" />
178
+ <span className="text-fm-icon-info font-fm-text text-xs">
179
+ Visible
180
+ </span>
181
+ </button>
1072
182
  </div>
1073
- <div className="flex items-center">
1074
- <span className="mr-3 text-xs text-blue-400">Public</span>
1075
- <div className="h-6 w-11 rounded-full bg-blue-600"></div>
183
+ <p className="text-fm-secondary font-fm-text text-xs">
184
+ Your account balance is displayed
185
+ </p>
186
+ </div>
187
+ </IconUsageSection>
188
+
189
+ <IconUsageSection title="Content Preview">
190
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-3 rounded-xl border p-4">
191
+ <div className="flex items-center gap-2">
192
+ <EyeOpenIcon className="text-fm-icon-active h-4 w-4" />
193
+ <span className="text-fm-secondary font-fm-text text-sm">
194
+ 142 views
195
+ </span>
1076
196
  </div>
1077
197
  </div>
1078
- </div>
1079
- </div>
198
+ </IconUsageSection>
199
+ </IconUsageCanvas>
1080
200
  ),
1081
201
  }
1082
202
 
1083
203
  export const Playground: Story = {
1084
- parameters: {
1085
- ...storyParameters,
1086
- docs: {
1087
- description: {
1088
- story:
1089
- "Interactive playground to experiment with different EyeOpenIcon configurations.",
1090
- },
1091
- },
1092
- },
1093
204
  args: {
1094
- width: 32,
1095
- height: 32,
1096
- className: "text-blue-400 ",
1097
- strokeWidth: 1,
205
+ className: "h-8 w-8 text-fm-icon-active",
206
+ withAccessibility: true,
1098
207
  },
1099
208
  render: (args) => (
1100
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1101
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1102
- <EyeOpenIcon {...args} />
1103
- </div>
1104
- </div>
209
+ <IconPlaygroundCanvas>
210
+ <EyeOpenIcon {...args} />
211
+ </IconPlaygroundCanvas>
1105
212
  ),
1106
213
  }