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,20 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
3
|
|
|
4
|
+
import { MoonIcon } from "src/ui/icons/moon-icon"
|
|
5
|
+
import { SettingIcon } from "src/ui/icons/setting-icon"
|
|
6
|
+
import { SparklesSoftIcon } from "src/ui/icons/sparkles-soft-icon"
|
|
7
|
+
import { StarIcon } from "src/ui/icons/star-icon"
|
|
8
|
+
import {
|
|
9
|
+
IconColorVariations,
|
|
10
|
+
IconDefaultCanvas,
|
|
11
|
+
IconPlaygroundCanvas,
|
|
12
|
+
IconSizeVariations,
|
|
13
|
+
IconUsageCanvas,
|
|
14
|
+
IconUsageSection,
|
|
15
|
+
} from "src/ui/story-spec/icons/icon-story-canvas"
|
|
16
|
+
import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
|
|
17
|
+
|
|
4
18
|
import { SunIcon } from "."
|
|
5
19
|
|
|
6
20
|
const meta: Meta<typeof SunIcon> = {
|
|
@@ -18,727 +32,68 @@ const meta: Meta<typeof SunIcon> = {
|
|
|
18
32
|
},
|
|
19
33
|
docs: {
|
|
20
34
|
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="from-fm-surface-primary via-fm-icon-info/5 to-fm-surface-primary min-h-screen bg-linear-to-br">
|
|
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-secondary-500/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-secondary-500/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
|
|
90
|
-
<SunIcon className="text-fm-icon-info h-12 w-12" />
|
|
91
|
-
</div>
|
|
92
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
-
SunIcon
|
|
94
|
-
</h1>
|
|
95
|
-
<p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
|
|
96
|
-
A versatile suggestion icon for hints, recommendations, and
|
|
97
|
-
guidance elements. Built with accessibility in mind using
|
|
98
|
-
Radix UI's AccessibleIcon wrapper.
|
|
99
|
-
</p>
|
|
100
|
-
|
|
101
|
-
{/* Stats */}
|
|
102
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
103
|
-
<div className="text-center">
|
|
104
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
105
|
-
Accessible
|
|
106
|
-
</div>
|
|
107
|
-
<div className="text-fm-tertiary text-sm">
|
|
108
|
-
Screen reader friendly
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
112
|
-
<div className="text-center">
|
|
113
|
-
<div className="text-fm-secondary-600 text-3xl font-bold">
|
|
114
|
-
Scalable
|
|
115
|
-
</div>
|
|
116
|
-
<div className="text-fm-tertiary text-sm">
|
|
117
|
-
Any size needed
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
121
|
-
<div className="text-center">
|
|
122
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
123
|
-
Flexible
|
|
124
|
-
</div>
|
|
125
|
-
<div className="text-fm-tertiary text-sm">
|
|
126
|
-
Customizable styling
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
|
|
134
|
-
{/* Content */}
|
|
135
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
136
|
-
{/* Quick Usage */}
|
|
137
|
-
<div className="!space-y-8">
|
|
138
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
139
|
-
Quick Start
|
|
140
|
-
</h2>
|
|
141
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
142
|
-
<div className="!space-y-4">
|
|
143
|
-
<h3 className="text-fm-icon-info! text-xl font-semibold">
|
|
144
|
-
Basic Usage
|
|
145
|
-
</h3>
|
|
146
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
147
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
148
|
-
{`import { SunIcon } from "@icons/suggestion-icon"
|
|
149
|
-
|
|
150
|
-
function MyComponent() {
|
|
35
|
+
<AuralIconDocsPage
|
|
36
|
+
accentToken="warning"
|
|
37
|
+
features={[
|
|
38
|
+
{ title: "Light Mode", description: "Toggle to light theme" },
|
|
39
|
+
{ title: "Brightness", description: "Display brightness control" },
|
|
40
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
41
|
+
]}
|
|
42
|
+
quickStart={{
|
|
43
|
+
codeExample: `import { SunIcon } from "src/ui/icons/sun-icon"
|
|
44
|
+
|
|
45
|
+
function LightModeToggle() {
|
|
151
46
|
return (
|
|
152
|
-
<
|
|
153
|
-
<SunIcon className="h-5 w-5 text-
|
|
154
|
-
|
|
155
|
-
</div>
|
|
47
|
+
<button>
|
|
48
|
+
<SunIcon className="h-5 w-5 text-fm-icon-warning" />
|
|
49
|
+
</button>
|
|
156
50
|
)
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<thead className="bg-fm-surface-secondary">
|
|
192
|
-
<tr className="border-fm-divider-secondary border-b">
|
|
193
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
194
|
-
Prop
|
|
195
|
-
</th>
|
|
196
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
197
|
-
Type
|
|
198
|
-
</th>
|
|
199
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
200
|
-
Default
|
|
201
|
-
</th>
|
|
202
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
203
|
-
Description
|
|
204
|
-
</th>
|
|
205
|
-
</tr>
|
|
206
|
-
</thead>
|
|
207
|
-
<tbody>
|
|
208
|
-
{" "}
|
|
209
|
-
<tr className="bg-fm-surface-secondary!">
|
|
210
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
211
|
-
withAccessibility
|
|
212
|
-
</td>
|
|
213
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
214
|
-
boolean
|
|
215
|
-
</td>
|
|
216
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
217
|
-
true
|
|
218
|
-
</td>
|
|
219
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
220
|
-
Whether to wrap the icon with accessibility feature
|
|
221
|
-
</td>
|
|
222
|
-
</tr>
|
|
223
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
224
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
225
|
-
height
|
|
226
|
-
</td>
|
|
227
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
228
|
-
number | string
|
|
229
|
-
</td>
|
|
230
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
231
|
-
24
|
|
232
|
-
</td>
|
|
233
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
234
|
-
Height of the icon in pixels
|
|
235
|
-
</td>
|
|
236
|
-
</tr>
|
|
237
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
238
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
239
|
-
fill
|
|
240
|
-
</td>
|
|
241
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
242
|
-
string
|
|
243
|
-
</td>
|
|
244
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
245
|
-
currentColor
|
|
246
|
-
</td>
|
|
247
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
248
|
-
Fill color of the icon
|
|
249
|
-
</td>
|
|
250
|
-
</tr>
|
|
251
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
252
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
253
|
-
className
|
|
254
|
-
</td>
|
|
255
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
256
|
-
string
|
|
257
|
-
</td>
|
|
258
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
259
|
-
undefined
|
|
260
|
-
</td>
|
|
261
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
262
|
-
CSS classes for styling
|
|
263
|
-
</td>
|
|
264
|
-
</tr>
|
|
265
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
266
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
267
|
-
stroke
|
|
268
|
-
</td>
|
|
269
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
270
|
-
string
|
|
271
|
-
</td>
|
|
272
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
273
|
-
currentColor
|
|
274
|
-
</td>
|
|
275
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
276
|
-
Stroke color of the icon
|
|
277
|
-
</td>
|
|
278
|
-
</tr>
|
|
279
|
-
<tr className="bg-fm-surface-secondary!">
|
|
280
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
281
|
-
strokeWidth
|
|
282
|
-
</td>
|
|
283
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
284
|
-
number | string
|
|
285
|
-
</td>
|
|
286
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
287
|
-
1
|
|
288
|
-
</td>
|
|
289
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
290
|
-
Width of the stroke
|
|
291
|
-
</td>
|
|
292
|
-
</tr>
|
|
293
|
-
</tbody>
|
|
294
|
-
</table>
|
|
295
|
-
</div>
|
|
296
|
-
</div>
|
|
297
|
-
|
|
298
|
-
{/* Size Variations */}
|
|
299
|
-
<div className="!space-y-8">
|
|
300
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
301
|
-
Size Variations
|
|
302
|
-
</h2>
|
|
303
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
|
|
304
|
-
<div className="!space-y-6">
|
|
305
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
306
|
-
<div className="!space-y-4">
|
|
307
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
308
|
-
Common Sizes
|
|
309
|
-
</h3>
|
|
310
|
-
<div className="flex items-center gap-6">
|
|
311
|
-
<div className="text-center">
|
|
312
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
|
|
313
|
-
<span className="text-fm-tertiary text-xs">
|
|
314
|
-
16px
|
|
315
|
-
</span>
|
|
316
|
-
</div>
|
|
317
|
-
<div className="text-center">
|
|
318
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
|
|
319
|
-
<span className="text-fm-tertiary text-xs">
|
|
320
|
-
20px
|
|
321
|
-
</span>
|
|
322
|
-
</div>
|
|
323
|
-
<div className="text-center">
|
|
324
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
|
|
325
|
-
<span className="text-fm-tertiary text-xs">
|
|
326
|
-
24px
|
|
327
|
-
</span>
|
|
328
|
-
</div>
|
|
329
|
-
<div className="text-center">
|
|
330
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
|
|
331
|
-
<span className="text-fm-tertiary text-xs">
|
|
332
|
-
32px
|
|
333
|
-
</span>
|
|
334
|
-
</div>
|
|
335
|
-
</div>
|
|
336
|
-
</div>
|
|
337
|
-
|
|
338
|
-
<div className="!space-y-4">
|
|
339
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
340
|
-
Large Displays
|
|
341
|
-
</h3>
|
|
342
|
-
<div className="flex items-center gap-6">
|
|
343
|
-
<div className="text-center">
|
|
344
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
|
|
345
|
-
<span className="text-fm-tertiary text-xs">
|
|
346
|
-
48px
|
|
347
|
-
</span>
|
|
348
|
-
</div>
|
|
349
|
-
<div className="text-center">
|
|
350
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-16 w-16" />
|
|
351
|
-
<span className="text-fm-tertiary text-xs">
|
|
352
|
-
64px
|
|
353
|
-
</span>
|
|
354
|
-
</div>
|
|
355
|
-
</div>
|
|
356
|
-
</div>
|
|
357
|
-
</div>
|
|
358
|
-
</div>
|
|
359
|
-
</div>
|
|
360
|
-
</div>
|
|
361
|
-
|
|
362
|
-
{/* Color Variations */}
|
|
363
|
-
<div className="!space-y-8">
|
|
364
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
365
|
-
Color Variations
|
|
366
|
-
</h2>
|
|
367
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
368
|
-
<div className="!space-y-4">
|
|
369
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
370
|
-
Semantic Colors
|
|
371
|
-
</h3>
|
|
372
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
373
|
-
<div className="flex items-center gap-4">
|
|
374
|
-
<SunIcon className="text-fm-icon-info h-6 w-6" />
|
|
375
|
-
<span className="text-fm-icon-info">
|
|
376
|
-
Primary suggestion
|
|
377
|
-
</span>
|
|
378
|
-
</div>
|
|
379
|
-
<div className="flex items-center gap-4">
|
|
380
|
-
<SunIcon className="text-fm-secondary-600 h-6 w-6" />
|
|
381
|
-
<span className="text-fm-secondary-600">Hint</span>
|
|
382
|
-
</div>
|
|
383
|
-
<div className="flex items-center gap-4">
|
|
384
|
-
<SunIcon className="text-fm-icon-info h-6 w-6" />
|
|
385
|
-
<span className="text-fm-icon-info">
|
|
386
|
-
Recommendation
|
|
387
|
-
</span>
|
|
388
|
-
</div>
|
|
389
|
-
<div className="flex items-center gap-4">
|
|
390
|
-
<SunIcon className="text-fm-icon-info h-6 w-6" />
|
|
391
|
-
<span className="text-fm-icon-info">Tip</span>
|
|
392
|
-
</div>
|
|
393
|
-
</div>
|
|
394
|
-
</div>
|
|
395
|
-
|
|
396
|
-
<div className="!space-y-4">
|
|
397
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
398
|
-
Custom Colors
|
|
399
|
-
</h3>
|
|
400
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
401
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
402
|
-
{`// Using Tailwind classes
|
|
403
|
-
<SunIcon className="h-6 w-6 text-blue-500" />
|
|
404
|
-
<SunIcon className="h-6 w-6 text-purple-500" />
|
|
405
|
-
<SunIcon className="h-6 w-6 text-indigo-500" />
|
|
406
|
-
|
|
407
|
-
// Using custom colors
|
|
408
|
-
<SunIcon
|
|
409
|
-
className="h-6 w-6"
|
|
410
|
-
style={{ color: '#3B82F6' }}
|
|
411
|
-
/>`}
|
|
412
|
-
</pre>
|
|
413
|
-
</div>
|
|
414
|
-
</div>
|
|
415
|
-
</div>
|
|
416
|
-
</div>
|
|
417
|
-
|
|
418
|
-
{/* Usage Examples */}
|
|
419
|
-
<div className="!space-y-8">
|
|
420
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
421
|
-
Usage Examples
|
|
422
|
-
</h2>
|
|
423
|
-
|
|
424
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
425
|
-
{/* Suggestion Card */}
|
|
426
|
-
<div className="!space-y-4">
|
|
427
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
428
|
-
Suggestion Card
|
|
429
|
-
</h3>
|
|
430
|
-
<div className="!space-y-4">
|
|
431
|
-
<div className="border-fm-icon-info/20 bg-fm-icon-info/10 rounded-lg border p-4">
|
|
432
|
-
<div className="flex items-start gap-3">
|
|
433
|
-
<SunIcon className="text-fm-icon-info mt-0.5 h-5 w-5 flex-shrink-0" />
|
|
434
|
-
<div>
|
|
435
|
-
<h4 className="text-fm-icon-info! font-medium">
|
|
436
|
-
Pro Tip
|
|
437
|
-
</h4>
|
|
438
|
-
<p className="text-fm-icon-info!/80 text-sm">
|
|
439
|
-
Use keyboard shortcuts to speed up your workflow.
|
|
440
|
-
</p>
|
|
441
|
-
</div>
|
|
442
|
-
</div>
|
|
443
|
-
</div>
|
|
444
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
445
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
446
|
-
{`<div className="border border-blue-500/20 bg-blue-500/10 p-4">
|
|
447
|
-
<div className="flex items-start gap-3">
|
|
448
|
-
<SunIcon className="h-5 w-5 text-blue-400" />
|
|
449
|
-
<div>
|
|
450
|
-
<h4>Pro Tip</h4>
|
|
451
|
-
<p>Use keyboard shortcuts...</p>
|
|
452
|
-
</div>
|
|
453
|
-
</div>
|
|
454
|
-
</div>`}
|
|
455
|
-
</pre>
|
|
456
|
-
</div>
|
|
457
|
-
</div>
|
|
458
|
-
</div>
|
|
459
|
-
|
|
460
|
-
{/* Help Text */}
|
|
461
|
-
<div className="!space-y-4">
|
|
462
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
463
|
-
Help Text
|
|
464
|
-
</h3>
|
|
465
|
-
<div className="!space-y-4">
|
|
466
|
-
<div className="!space-y-2">
|
|
467
|
-
<label className="text-fm-icon-active block text-sm font-medium">
|
|
468
|
-
Username
|
|
469
|
-
</label>
|
|
470
|
-
<input
|
|
471
|
-
type="text"
|
|
472
|
-
className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active w-full rounded-lg border px-3 py-2 placeholder-white/50"
|
|
473
|
-
placeholder="Enter username"
|
|
474
|
-
/>
|
|
475
|
-
<div className="text-fm-icon-info flex items-center gap-2 text-sm">
|
|
476
|
-
<SunIcon className="h-4 w-4" />
|
|
477
|
-
<span>Use at least 3 characters</span>
|
|
478
|
-
</div>
|
|
479
|
-
</div>
|
|
480
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
481
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
482
|
-
{`<div className="flex items-center gap-2 text-blue-400">
|
|
483
|
-
<SunIcon className="h-4 w-4" />
|
|
484
|
-
<span>Use at least 3 characters</span>
|
|
485
|
-
</div>`}
|
|
486
|
-
</pre>
|
|
487
|
-
</div>
|
|
488
|
-
</div>
|
|
489
|
-
</div>
|
|
490
|
-
|
|
491
|
-
{/* Button Integration */}
|
|
492
|
-
<div className="!space-y-4">
|
|
493
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
494
|
-
Button Integration
|
|
495
|
-
</h3>
|
|
496
|
-
<div className="!space-y-4">
|
|
497
|
-
<div className="flex gap-4">
|
|
498
|
-
<button className="border-fm-icon-info/30 bg-fm-icon-info/20 text-fm-icon-info hover:bg-fm-icon-info/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
499
|
-
<SunIcon className="h-4 w-4" />
|
|
500
|
-
Show Hints
|
|
501
|
-
</button>
|
|
502
|
-
<button className="border-fm-secondary-500/30 bg-fm-secondary-500/20 text-fm-secondary-600 hover:bg-fm-secondary-500/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
503
|
-
<SunIcon className="h-4 w-4" />
|
|
504
|
-
Get Suggestions
|
|
505
|
-
</button>
|
|
506
|
-
</div>
|
|
507
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
508
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
509
|
-
{`<button className="flex items-center gap-2">
|
|
510
|
-
<SunIcon className="h-4 w-4" />
|
|
511
|
-
Show Hints
|
|
512
|
-
</button>`}
|
|
513
|
-
</pre>
|
|
514
|
-
</div>
|
|
515
|
-
</div>
|
|
516
|
-
</div>
|
|
517
|
-
|
|
518
|
-
{/* Tooltip */}
|
|
519
|
-
<div className="!space-y-4">
|
|
520
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
521
|
-
Interactive Tooltip
|
|
522
|
-
</h3>
|
|
523
|
-
<div className="!space-y-4">
|
|
524
|
-
<div className="flex items-center gap-2">
|
|
525
|
-
<span className="text-fm-icon-active">Need help?</span>
|
|
526
|
-
<div className="group relative">
|
|
527
|
-
<SunIcon className="text-fm-icon-info h-4 w-4 cursor-help" />
|
|
528
|
-
<div className="bg-fm-surface-primary text-fm-icon-active invisible absolute bottom-full left-1/2 mb-2 -translate-x-1/2 transform rounded px-2 py-1 text-xs opacity-0 transition-all group-hover:visible group-hover:opacity-100">
|
|
529
|
-
Click for suggestions
|
|
530
|
-
</div>
|
|
531
|
-
</div>
|
|
532
|
-
</div>
|
|
533
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
534
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
535
|
-
{`<div className="group relative">
|
|
536
|
-
<SunIcon className="h-4 w-4 cursor-help text-blue-400" />
|
|
537
|
-
<div className="tooltip">Click for suggestions</div>
|
|
538
|
-
</div>`}
|
|
539
|
-
</pre>
|
|
540
|
-
</div>
|
|
541
|
-
</div>
|
|
542
|
-
</div>
|
|
543
|
-
</div>
|
|
544
|
-
</div>
|
|
545
|
-
|
|
546
|
-
{/* Accessibility */}
|
|
547
|
-
<div className="!space-y-8">
|
|
548
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
549
|
-
Accessibility Features
|
|
550
|
-
</h2>
|
|
551
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
552
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
553
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
554
|
-
✅ Built-in Features
|
|
555
|
-
</h3>
|
|
556
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
557
|
-
<li className="text-fm-secondary!">
|
|
558
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
559
|
-
</li>
|
|
560
|
-
<li className="text-fm-secondary!">
|
|
561
|
-
Provides screen reader label "Suggestion icon"
|
|
562
|
-
</li>
|
|
563
|
-
<li className="text-fm-secondary!">
|
|
564
|
-
Supports keyboard navigation when interactive
|
|
565
|
-
</li>
|
|
566
|
-
<li className="text-fm-secondary!">
|
|
567
|
-
Maintains proper color contrast ratios
|
|
568
|
-
</li>
|
|
569
|
-
<li className="text-fm-secondary!">
|
|
570
|
-
Scales with user's font size preferences
|
|
571
|
-
</li>
|
|
572
|
-
</ul>
|
|
573
|
-
</div>
|
|
574
|
-
|
|
575
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
576
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
577
|
-
💡 Best Practices
|
|
578
|
-
</h3>
|
|
579
|
-
<ul className="text-fm-secondary !space-y-2 text-sm">
|
|
580
|
-
<li className="text-fm-secondary!">
|
|
581
|
-
Always pair with descriptive text
|
|
582
|
-
</li>
|
|
583
|
-
<li className="text-fm-secondary!">
|
|
584
|
-
Use consistent colors for suggestion types
|
|
585
|
-
</li>
|
|
586
|
-
<li className="text-fm-secondary!">
|
|
587
|
-
Ensure sufficient color contrast
|
|
588
|
-
</li>
|
|
589
|
-
<li className="text-fm-secondary!">
|
|
590
|
-
Add focus states for interactive elements
|
|
591
|
-
</li>
|
|
592
|
-
<li className="text-fm-secondary!">
|
|
593
|
-
Provide alternative text for screen readers
|
|
594
|
-
</li>
|
|
595
|
-
</ul>
|
|
596
|
-
</div>
|
|
597
|
-
</div>
|
|
598
|
-
|
|
599
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
600
|
-
<h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
|
|
601
|
-
Custom Accessibility Label
|
|
602
|
-
</h3>
|
|
603
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
604
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
605
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
606
|
-
{`import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
607
|
-
import { SunIcon } from "@icons/suggestion-icon"
|
|
608
|
-
|
|
609
|
-
<AccessibleIcon label="Helpful tip available">
|
|
610
|
-
<SunIcon className="h-4 w-4 text-blue-500" />
|
|
611
|
-
</AccessibleIcon>`}
|
|
612
|
-
</pre>
|
|
613
|
-
</div>
|
|
614
|
-
<div className="!space-y-4">
|
|
615
|
-
<p className="text-fm-secondary! text-sm">
|
|
616
|
-
For specific contexts, you can wrap the SunIcon with a
|
|
617
|
-
custom AccessibleIcon component that provides more
|
|
618
|
-
descriptive labels.
|
|
619
|
-
</p>
|
|
620
|
-
<div className="border-fm-icon-info/20 bg-fm-icon-info/10 rounded-lg border p-4">
|
|
621
|
-
<div className="text-fm-icon-info flex items-center gap-2">
|
|
622
|
-
<SunIcon className="h-4 w-4" />
|
|
623
|
-
<span>Helpful tip available</span>
|
|
624
|
-
</div>
|
|
625
|
-
</div>
|
|
626
|
-
</div>
|
|
627
|
-
</div>
|
|
628
|
-
</div>
|
|
629
|
-
</div>
|
|
630
|
-
|
|
631
|
-
{/* Related Icons */}
|
|
632
|
-
<div className="!space-y-8">
|
|
633
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
634
|
-
Related Icons
|
|
635
|
-
</h2>
|
|
636
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
637
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
638
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
639
|
-
<span className="text-2xl">ℹ️</span>
|
|
640
|
-
</div>
|
|
641
|
-
<div>
|
|
642
|
-
<div className="text-fm-icon-active font-medium">
|
|
643
|
-
InfoIcon
|
|
644
|
-
</div>
|
|
645
|
-
<div className="text-fm-tertiary text-xs">
|
|
646
|
-
Information states
|
|
647
|
-
</div>
|
|
648
|
-
</div>
|
|
649
|
-
</div>
|
|
650
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
651
|
-
<div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
652
|
-
<span className="text-2xl">💡</span>
|
|
653
|
-
</div>
|
|
654
|
-
<div>
|
|
655
|
-
<div className="text-fm-icon-active font-medium">
|
|
656
|
-
LightbulbIcon
|
|
657
|
-
</div>
|
|
658
|
-
<div className="text-fm-tertiary text-xs">
|
|
659
|
-
Ideas & tips
|
|
660
|
-
</div>
|
|
661
|
-
</div>
|
|
662
|
-
</div>
|
|
663
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
664
|
-
<div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
665
|
-
<span className="text-2xl">❓</span>
|
|
666
|
-
</div>
|
|
667
|
-
<div>
|
|
668
|
-
<div className="text-fm-icon-active font-medium">
|
|
669
|
-
HelpIcon
|
|
670
|
-
</div>
|
|
671
|
-
<div className="text-fm-tertiary text-xs">
|
|
672
|
-
Help & guidance
|
|
673
|
-
</div>
|
|
674
|
-
</div>
|
|
675
|
-
</div>
|
|
676
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
677
|
-
<div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
678
|
-
<span className="text-2xl">✨</span>
|
|
679
|
-
</div>
|
|
680
|
-
<div>
|
|
681
|
-
<div className="text-fm-icon-active font-medium">
|
|
682
|
-
SparkleIcon
|
|
683
|
-
</div>
|
|
684
|
-
<div className="text-fm-tertiary text-xs">
|
|
685
|
-
Enhancement
|
|
686
|
-
</div>
|
|
687
|
-
</div>
|
|
688
|
-
</div>
|
|
689
|
-
</div>
|
|
690
|
-
</div>
|
|
691
|
-
</div>
|
|
692
|
-
|
|
693
|
-
{/* Footer */}
|
|
694
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
|
|
695
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
696
|
-
<div className="!space-y-4 text-center">
|
|
697
|
-
<p className="text-fm-tertiary!">
|
|
698
|
-
SunIcon is part of the Aural UI icon library, built with
|
|
699
|
-
accessibility and consistency in mind.
|
|
700
|
-
</p>
|
|
701
|
-
<p className="text-fm-placeholder! text-sm">
|
|
702
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
703
|
-
compatibility and follow WCAG guidelines.
|
|
704
|
-
</p>
|
|
705
|
-
</div>
|
|
706
|
-
</div>
|
|
707
|
-
</div>
|
|
708
|
-
</div>
|
|
709
|
-
</>
|
|
51
|
+
}`,
|
|
52
|
+
livePreview: (
|
|
53
|
+
<button>
|
|
54
|
+
<SunIcon className="text-fm-icon-warning h-6 w-6" />
|
|
55
|
+
</button>
|
|
56
|
+
),
|
|
57
|
+
}}
|
|
58
|
+
relatedIcons={[
|
|
59
|
+
{
|
|
60
|
+
name: "MoonIcon",
|
|
61
|
+
description: "Dark mode / night mode icon",
|
|
62
|
+
icon: MoonIcon,
|
|
63
|
+
accentToken: "info",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "StarIcon",
|
|
67
|
+
description: "Star / rating icon",
|
|
68
|
+
icon: StarIcon,
|
|
69
|
+
accentToken: "positive",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "SparklesSoftIcon",
|
|
73
|
+
description: "Soft sparkle / AI glow icon",
|
|
74
|
+
icon: SparklesSoftIcon,
|
|
75
|
+
accentToken: "warning",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "SettingIcon",
|
|
79
|
+
description: "Settings / preferences icon",
|
|
80
|
+
icon: SettingIcon,
|
|
81
|
+
accentToken: "negative",
|
|
82
|
+
},
|
|
83
|
+
]}
|
|
84
|
+
/>
|
|
710
85
|
),
|
|
711
86
|
},
|
|
712
87
|
},
|
|
713
88
|
tags: ["autodocs"],
|
|
714
89
|
argTypes: {
|
|
715
|
-
width: {
|
|
716
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
717
|
-
description: "Width of the icon in pixels",
|
|
718
|
-
},
|
|
719
|
-
withAccessibility: {
|
|
720
|
-
control: "boolean",
|
|
721
|
-
description: "Whether to wrap the icon with accessibility features",
|
|
722
|
-
},
|
|
723
|
-
height: {
|
|
724
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
725
|
-
description: "Height of the icon in pixels",
|
|
726
|
-
},
|
|
727
|
-
fill: {
|
|
728
|
-
control: "color",
|
|
729
|
-
description: "Fill color of the icon",
|
|
730
|
-
},
|
|
731
90
|
className: {
|
|
732
91
|
control: "text",
|
|
733
|
-
description: "CSS classes
|
|
92
|
+
description: "CSS classes including color token",
|
|
734
93
|
},
|
|
735
|
-
|
|
736
|
-
control: "
|
|
737
|
-
description: "
|
|
738
|
-
},
|
|
739
|
-
strokeWidth: {
|
|
740
|
-
control: { type: "range", min: 0.5, max: 3, step: 0.1 },
|
|
741
|
-
description: "Width of the stroke",
|
|
94
|
+
withAccessibility: {
|
|
95
|
+
control: "boolean",
|
|
96
|
+
description: "Wrap with accessibility label",
|
|
742
97
|
},
|
|
743
98
|
},
|
|
744
99
|
}
|
|
@@ -746,185 +101,83 @@ import { SunIcon } from "@icons/suggestion-icon"
|
|
|
746
101
|
export default meta
|
|
747
102
|
type Story = StoryObj<typeof SunIcon>
|
|
748
103
|
|
|
749
|
-
// Story parameters for consistent dark theme
|
|
750
|
-
const storyParameters = {
|
|
751
|
-
backgrounds: {
|
|
752
|
-
default: "dark",
|
|
753
|
-
values: [
|
|
754
|
-
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
755
|
-
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
756
|
-
],
|
|
757
|
-
},
|
|
758
|
-
}
|
|
759
|
-
|
|
760
104
|
export const Default: Story = {
|
|
761
105
|
args: {
|
|
762
|
-
|
|
763
|
-
height: 24,
|
|
764
|
-
className: "text-fm-icon-info",
|
|
106
|
+
className: "h-6 w-6 text-fm-icon-warning",
|
|
765
107
|
withAccessibility: true,
|
|
766
108
|
},
|
|
767
|
-
parameters: storyParameters,
|
|
768
109
|
render: (args) => (
|
|
769
|
-
<
|
|
110
|
+
<IconDefaultCanvas>
|
|
770
111
|
<SunIcon {...args} />
|
|
771
|
-
</
|
|
112
|
+
</IconDefaultCanvas>
|
|
772
113
|
),
|
|
773
114
|
}
|
|
774
115
|
|
|
775
116
|
export const SizeVariations: Story = {
|
|
776
|
-
|
|
777
|
-
...storyParameters,
|
|
778
|
-
docs: {
|
|
779
|
-
description: {
|
|
780
|
-
story:
|
|
781
|
-
"SunIcon in different sizes, from small UI elements to large displays.",
|
|
782
|
-
},
|
|
783
|
-
},
|
|
784
|
-
},
|
|
785
|
-
render: () => (
|
|
786
|
-
<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">
|
|
787
|
-
<div className="text-center">
|
|
788
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
|
|
789
|
-
<span className="text-fm-tertiary text-xs">12px</span>
|
|
790
|
-
</div>
|
|
791
|
-
<div className="text-center">
|
|
792
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
|
|
793
|
-
<span className="text-fm-tertiary text-xs">16px</span>
|
|
794
|
-
</div>
|
|
795
|
-
<div className="text-center">
|
|
796
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
|
|
797
|
-
<span className="text-fm-tertiary text-xs">20px</span>
|
|
798
|
-
</div>
|
|
799
|
-
<div className="text-center">
|
|
800
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
|
|
801
|
-
<span className="text-fm-tertiary text-xs">24px</span>
|
|
802
|
-
</div>
|
|
803
|
-
<div className="text-center">
|
|
804
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
|
|
805
|
-
<span className="text-fm-tertiary text-xs">32px</span>
|
|
806
|
-
</div>
|
|
807
|
-
<div className="text-center">
|
|
808
|
-
<SunIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
|
|
809
|
-
<span className="text-fm-tertiary text-xs">48px</span>
|
|
810
|
-
</div>
|
|
811
|
-
</div>
|
|
812
|
-
),
|
|
117
|
+
render: () => <IconSizeVariations icon={SunIcon} />,
|
|
813
118
|
}
|
|
814
119
|
|
|
815
120
|
export const ColorVariations: Story = {
|
|
816
|
-
|
|
817
|
-
...storyParameters,
|
|
818
|
-
docs: {
|
|
819
|
-
description: {
|
|
820
|
-
story:
|
|
821
|
-
"SunIcon in different semantic colors for various suggestion types.",
|
|
822
|
-
},
|
|
823
|
-
},
|
|
824
|
-
},
|
|
825
|
-
render: () => (
|
|
826
|
-
<div className="from-fm-surface-primary to-fm-surface-secondary grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-linear-to-br p-8 md:grid-cols-4">
|
|
827
|
-
<div className="text-center">
|
|
828
|
-
<div className="border-fm-icon-info/30 bg-fm-icon-info/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
829
|
-
<SunIcon className="text-fm-icon-info h-8 w-8" />
|
|
830
|
-
</div>
|
|
831
|
-
<div className="text-fm-icon-active text-sm font-medium">Primary</div>
|
|
832
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
833
|
-
</div>
|
|
834
|
-
<div className="text-center">
|
|
835
|
-
<div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
836
|
-
<SunIcon className="text-fm-secondary-600 h-8 w-8" />
|
|
837
|
-
</div>
|
|
838
|
-
<div className="text-fm-icon-active text-sm font-medium">Hint</div>
|
|
839
|
-
<div className="text-fm-secondary-600 text-xs">
|
|
840
|
-
text-fm-secondary-600
|
|
841
|
-
</div>
|
|
842
|
-
</div>
|
|
843
|
-
<div className="text-center">
|
|
844
|
-
<div className="border-fm-icon-info/30 bg-fm-icon-info/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
845
|
-
<SunIcon className="text-fm-icon-info h-8 w-8" />
|
|
846
|
-
</div>
|
|
847
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
848
|
-
Recommendation
|
|
849
|
-
</div>
|
|
850
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
851
|
-
</div>
|
|
852
|
-
<div className="text-center">
|
|
853
|
-
<div className="border-fm-icon-info/30 bg-fm-icon-info/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
854
|
-
<SunIcon className="text-fm-icon-info h-8 w-8" />
|
|
855
|
-
</div>
|
|
856
|
-
<div className="text-fm-icon-active text-sm font-medium">Tip</div>
|
|
857
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
858
|
-
</div>
|
|
859
|
-
</div>
|
|
860
|
-
),
|
|
121
|
+
render: () => <IconColorVariations icon={SunIcon} />,
|
|
861
122
|
}
|
|
862
123
|
|
|
863
124
|
export const UsageExamples: Story = {
|
|
864
|
-
parameters: {
|
|
865
|
-
...storyParameters,
|
|
866
|
-
docs: {
|
|
867
|
-
description: {
|
|
868
|
-
story:
|
|
869
|
-
"Practical examples showing SunIcon used for theme toggles, weather widgets, and status indicators.",
|
|
870
|
-
},
|
|
871
|
-
},
|
|
872
|
-
},
|
|
873
125
|
render: () => (
|
|
874
|
-
<
|
|
875
|
-
<
|
|
876
|
-
<
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
<
|
|
126
|
+
<IconUsageCanvas>
|
|
127
|
+
<IconUsageSection title="Theme Toggle">
|
|
128
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-1 rounded-full border p-1">
|
|
129
|
+
<button className="flex h-8 w-8 items-center justify-center rounded-full">
|
|
130
|
+
<MoonIcon className="text-fm-icon-inactive h-4 w-4" />
|
|
131
|
+
</button>
|
|
132
|
+
<button className="bg-fm-surface-primary flex h-8 w-8 items-center justify-center rounded-full">
|
|
133
|
+
<SunIcon className="text-fm-icon-warning h-4 w-4" />
|
|
134
|
+
</button>
|
|
135
|
+
</div>
|
|
136
|
+
</IconUsageSection>
|
|
137
|
+
|
|
138
|
+
<IconUsageSection title="Brightness Setting">
|
|
139
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-between rounded-xl border px-4 py-3">
|
|
140
|
+
<div className="flex items-center gap-3">
|
|
141
|
+
<SunIcon className="text-fm-icon-warning h-5 w-5" />
|
|
142
|
+
<div>
|
|
143
|
+
<div className="text-fm-primary font-fm-text text-sm font-medium">
|
|
144
|
+
Light Mode
|
|
145
|
+
</div>
|
|
146
|
+
<div className="text-fm-secondary font-fm-text text-xs">
|
|
147
|
+
Bright display theme
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
890
150
|
</div>
|
|
151
|
+
<div className="bg-fm-icon-active h-5 w-9 rounded-full" />
|
|
891
152
|
</div>
|
|
892
|
-
</
|
|
893
|
-
|
|
894
|
-
<
|
|
895
|
-
<
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
153
|
+
</IconUsageSection>
|
|
154
|
+
|
|
155
|
+
<IconUsageSection title="Day / Night Pair">
|
|
156
|
+
<div className="flex gap-4">
|
|
157
|
+
<div className="flex flex-col items-center gap-1">
|
|
158
|
+
<SunIcon className="text-fm-icon-warning h-6 w-6" />
|
|
159
|
+
<span className="text-fm-secondary font-fm-text text-xs">
|
|
160
|
+
Light
|
|
161
|
+
</span>
|
|
162
|
+
</div>
|
|
163
|
+
<div className="flex flex-col items-center gap-1">
|
|
164
|
+
<MoonIcon className="text-fm-icon-active h-6 w-6" />
|
|
165
|
+
<span className="text-fm-secondary font-fm-text text-xs">Dark</span>
|
|
166
|
+
</div>
|
|
901
167
|
</div>
|
|
902
|
-
</
|
|
903
|
-
</
|
|
168
|
+
</IconUsageSection>
|
|
169
|
+
</IconUsageCanvas>
|
|
904
170
|
),
|
|
905
171
|
}
|
|
906
172
|
|
|
907
173
|
export const Playground: Story = {
|
|
908
|
-
parameters: {
|
|
909
|
-
...storyParameters,
|
|
910
|
-
docs: {
|
|
911
|
-
description: {
|
|
912
|
-
story:
|
|
913
|
-
"Interactive playground to experiment with different SunIcon configurations.",
|
|
914
|
-
},
|
|
915
|
-
},
|
|
916
|
-
},
|
|
917
174
|
args: {
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
className: "text-fm-icon-info",
|
|
921
|
-
strokeWidth: 1,
|
|
175
|
+
className: "h-8 w-8 text-fm-icon-warning",
|
|
176
|
+
withAccessibility: true,
|
|
922
177
|
},
|
|
923
178
|
render: (args) => (
|
|
924
|
-
<
|
|
925
|
-
<
|
|
926
|
-
|
|
927
|
-
</div>
|
|
928
|
-
</div>
|
|
179
|
+
<IconPlaygroundCanvas>
|
|
180
|
+
<SunIcon {...args} />
|
|
181
|
+
</IconPlaygroundCanvas>
|
|
929
182
|
),
|
|
930
183
|
}
|