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