aural-ui 3.0.7 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1199
- package/dist/components/avatar/Avatar.stories.tsx +235 -237
- 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/button/index.tsx +7 -7
- 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 -620
- 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 +533 -856
- package/dist/components/dialog/Dialog.stories.tsx +505 -949
- package/dist/components/divider/Divider.stories.tsx +265 -502
- package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
- package/dist/components/drawer/Drawer.stories.tsx +659 -993
- package/dist/components/drawer/index.tsx +3 -3
- package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
- 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 -1221
- 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 +485 -822
- package/dist/components/marquee/Marquee.stories.tsx +356 -694
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
- package/dist/components/overlay/Overlay.stories.tsx +452 -818
- package/dist/components/overlay/index.tsx +4 -4
- package/dist/components/pagination/Pagination.stories.tsx +721 -210
- package/dist/components/popover/Popover.stories.tsx +484 -873
- package/dist/components/radio/Radio.stories.tsx +432 -124
- package/dist/components/resizable/Resizable.stories.tsx +496 -752
- package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
- package/dist/components/search/Search.stories.tsx +314 -575
- package/dist/components/select/Select.stories.tsx +684 -787
- package/dist/components/sheet/Sheet.stories.tsx +671 -936
- package/dist/components/skelton/Skelton.stories.tsx +230 -764
- package/dist/components/slider/Slider.stories.tsx +384 -737
- 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 -914
- package/dist/components/tabs/Tabs.stories.tsx +459 -1400
- 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 -148
- package/dist/components/toast/Toast.stories.tsx +452 -1333
- package/dist/components/toggle/Toggle.stories.tsx +488 -909
- package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
- 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 +226 -1013
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
- package/dist/icons/all-icons.tsx +124 -87
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
- package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
- package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
- package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
- package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
- package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
- package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
- package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
- package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
- package/dist/icons/spinner-solid-icon/index.tsx +6 -1
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
- package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
- package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
- package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
- package/dist/index.cjs +84 -84
- package/dist/index.js +84 -84
- package/dist/styles/aural-all-theme.css +1222 -0
- package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
- package/dist/styles/aural-light-theme.css +1047 -0
- package/package.json +1 -1
|
@@ -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> = {
|
|
@@ -11,702 +25,75 @@ const meta: Meta<typeof SunIcon> = {
|
|
|
11
25
|
backgrounds: {
|
|
12
26
|
default: "dark",
|
|
13
27
|
values: [
|
|
14
|
-
{ name: "dark", value: "
|
|
15
|
-
{ name: "darker", value: "
|
|
16
|
-
{ name: "light", value: "
|
|
28
|
+
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
29
|
+
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
30
|
+
{ name: "light", value: "var(--color-fm-neutral-1100)" },
|
|
17
31
|
],
|
|
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: #0a0a0a ;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: #0a0a0a ;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent ;
|
|
50
|
-
border: none ;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: white ;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: rgba(255, 255, 255, 0.7) ;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: rgba(255, 255, 255, 0.1) ;
|
|
60
|
-
color: rgba(168, 85, 247, 1) ;
|
|
61
|
-
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: rgba(0, 0, 0, 0.4) ;
|
|
65
|
-
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: rgba(255, 255, 255, 0.05) ;
|
|
69
|
-
border: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: rgba(255, 255, 255, 0.05) ;
|
|
73
|
-
color: white ;
|
|
74
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: rgba(255, 255, 255, 0.7) ;
|
|
78
|
-
border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
|
|
79
|
-
}
|
|
80
|
-
`}
|
|
81
|
-
</style>
|
|
82
|
-
|
|
83
|
-
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-blue-900/20 to-gray-900">
|
|
84
|
-
{/* Header */}
|
|
85
|
-
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
86
|
-
<div className="absolute inset-0 bg-gradient-to-r from-blue-500/10 via-transparent to-purple-500/10" />
|
|
87
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
88
|
-
<div className="!space-y-6 text-center">
|
|
89
|
-
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-blue-500/30 bg-gradient-to-br from-blue-500/20 to-purple-500/20">
|
|
90
|
-
<SunIcon className="h-12 w-12 text-blue-400" />
|
|
91
|
-
</div>
|
|
92
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
-
SunIcon
|
|
94
|
-
</h1>
|
|
95
|
-
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
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-3xl font-bold text-blue-300">
|
|
105
|
-
Accessible
|
|
106
|
-
</div>
|
|
107
|
-
<div className="text-sm text-white/60">
|
|
108
|
-
Screen reader friendly
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<div className="h-8 w-px bg-white/20" />
|
|
112
|
-
<div className="text-center">
|
|
113
|
-
<div className="text-3xl font-bold text-purple-300">
|
|
114
|
-
Scalable
|
|
115
|
-
</div>
|
|
116
|
-
<div className="text-sm text-white/60">
|
|
117
|
-
Any size needed
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
<div className="h-8 w-px bg-white/20" />
|
|
121
|
-
<div className="text-center">
|
|
122
|
-
<div className="text-3xl font-bold text-indigo-300">
|
|
123
|
-
Flexible
|
|
124
|
-
</div>
|
|
125
|
-
<div className="text-sm text-white/60">
|
|
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-center text-3xl font-bold !text-white">
|
|
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-xl font-semibold !text-blue-300">
|
|
144
|
-
Basic Usage
|
|
145
|
-
</h3>
|
|
146
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
147
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
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
|
-
</th>
|
|
192
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
193
|
-
Type
|
|
194
|
-
</th>
|
|
195
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
196
|
-
Default
|
|
197
|
-
</th>
|
|
198
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
199
|
-
Description
|
|
200
|
-
</th>
|
|
201
|
-
</tr>
|
|
202
|
-
</thead>
|
|
203
|
-
<tbody>
|
|
204
|
-
{" "}
|
|
205
|
-
<tr className="!bg-black/10">
|
|
206
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
207
|
-
withAccessibility
|
|
208
|
-
</td>
|
|
209
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
210
|
-
boolean
|
|
211
|
-
</td>
|
|
212
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
213
|
-
true
|
|
214
|
-
</td>
|
|
215
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
216
|
-
Whether to wrap the icon with accessibility feature
|
|
217
|
-
</td>
|
|
218
|
-
</tr>
|
|
219
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
220
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
221
|
-
height
|
|
222
|
-
</td>
|
|
223
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
224
|
-
number | string
|
|
225
|
-
</td>
|
|
226
|
-
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
227
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
228
|
-
Height of the icon in pixels
|
|
229
|
-
</td>
|
|
230
|
-
</tr>
|
|
231
|
-
<tr className="border-b border-white/5">
|
|
232
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
233
|
-
fill
|
|
234
|
-
</td>
|
|
235
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
236
|
-
string
|
|
237
|
-
</td>
|
|
238
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
239
|
-
currentColor
|
|
240
|
-
</td>
|
|
241
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
242
|
-
Fill color of the icon
|
|
243
|
-
</td>
|
|
244
|
-
</tr>
|
|
245
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
246
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
247
|
-
className
|
|
248
|
-
</td>
|
|
249
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
250
|
-
string
|
|
251
|
-
</td>
|
|
252
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
253
|
-
undefined
|
|
254
|
-
</td>
|
|
255
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
256
|
-
CSS classes for styling
|
|
257
|
-
</td>
|
|
258
|
-
</tr>
|
|
259
|
-
<tr className="border-b border-white/5">
|
|
260
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
261
|
-
stroke
|
|
262
|
-
</td>
|
|
263
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
264
|
-
string
|
|
265
|
-
</td>
|
|
266
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
267
|
-
currentColor
|
|
268
|
-
</td>
|
|
269
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
270
|
-
Stroke color of the icon
|
|
271
|
-
</td>
|
|
272
|
-
</tr>
|
|
273
|
-
<tr className="!bg-black/10">
|
|
274
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
275
|
-
strokeWidth
|
|
276
|
-
</td>
|
|
277
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
278
|
-
number | string
|
|
279
|
-
</td>
|
|
280
|
-
<td className="px-6 py-4 text-sm !text-white/50">1</td>
|
|
281
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
282
|
-
Width of the stroke
|
|
283
|
-
</td>
|
|
284
|
-
</tr>
|
|
285
|
-
</tbody>
|
|
286
|
-
</table>
|
|
287
|
-
</div>
|
|
288
|
-
</div>
|
|
289
|
-
|
|
290
|
-
{/* Size Variations */}
|
|
291
|
-
<div className="!space-y-8">
|
|
292
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
293
|
-
Size Variations
|
|
294
|
-
</h2>
|
|
295
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
296
|
-
<div className="!space-y-6">
|
|
297
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
298
|
-
<div className="!space-y-4">
|
|
299
|
-
<h3 className="text-lg font-semibold !text-blue-300">
|
|
300
|
-
Common Sizes
|
|
301
|
-
</h3>
|
|
302
|
-
<div className="flex items-center gap-6">
|
|
303
|
-
<div className="text-center">
|
|
304
|
-
<SunIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
305
|
-
<span className="text-xs text-white/60">16px</span>
|
|
306
|
-
</div>
|
|
307
|
-
<div className="text-center">
|
|
308
|
-
<SunIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
309
|
-
<span className="text-xs text-white/60">20px</span>
|
|
310
|
-
</div>
|
|
311
|
-
<div className="text-center">
|
|
312
|
-
<SunIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
313
|
-
<span className="text-xs text-white/60">24px</span>
|
|
314
|
-
</div>
|
|
315
|
-
<div className="text-center">
|
|
316
|
-
<SunIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
317
|
-
<span className="text-xs text-white/60">32px</span>
|
|
318
|
-
</div>
|
|
319
|
-
</div>
|
|
320
|
-
</div>
|
|
321
|
-
|
|
322
|
-
<div className="!space-y-4">
|
|
323
|
-
<h3 className="text-lg font-semibold !text-blue-300">
|
|
324
|
-
Large Displays
|
|
325
|
-
</h3>
|
|
326
|
-
<div className="flex items-center gap-6">
|
|
327
|
-
<div className="text-center">
|
|
328
|
-
<SunIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
329
|
-
<span className="text-xs text-white/60">48px</span>
|
|
330
|
-
</div>
|
|
331
|
-
<div className="text-center">
|
|
332
|
-
<SunIcon className="!mx-auto mb-2 h-16 w-16 text-blue-400" />
|
|
333
|
-
<span className="text-xs text-white/60">64px</span>
|
|
334
|
-
</div>
|
|
335
|
-
</div>
|
|
336
|
-
</div>
|
|
337
|
-
</div>
|
|
338
|
-
</div>
|
|
339
|
-
</div>
|
|
340
|
-
</div>
|
|
341
|
-
|
|
342
|
-
{/* Color Variations */}
|
|
343
|
-
<div className="!space-y-8">
|
|
344
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
345
|
-
Color Variations
|
|
346
|
-
</h2>
|
|
347
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
348
|
-
<div className="!space-y-4">
|
|
349
|
-
<h3 className="text-lg font-semibold !text-blue-300">
|
|
350
|
-
Semantic Colors
|
|
351
|
-
</h3>
|
|
352
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
353
|
-
<div className="flex items-center gap-4">
|
|
354
|
-
<SunIcon className="h-6 w-6 text-blue-400" />
|
|
355
|
-
<span className="text-blue-300">
|
|
356
|
-
Primary suggestion
|
|
357
|
-
</span>
|
|
358
|
-
</div>
|
|
359
|
-
<div className="flex items-center gap-4">
|
|
360
|
-
<SunIcon className="h-6 w-6 text-purple-400" />
|
|
361
|
-
<span className="text-purple-300">Hint</span>
|
|
362
|
-
</div>
|
|
363
|
-
<div className="flex items-center gap-4">
|
|
364
|
-
<SunIcon className="h-6 w-6 text-indigo-400" />
|
|
365
|
-
<span className="text-indigo-300">Recommendation</span>
|
|
366
|
-
</div>
|
|
367
|
-
<div className="flex items-center gap-4">
|
|
368
|
-
<SunIcon className="h-6 w-6 text-cyan-400" />
|
|
369
|
-
<span className="text-cyan-300">Tip</span>
|
|
370
|
-
</div>
|
|
371
|
-
</div>
|
|
372
|
-
</div>
|
|
373
|
-
|
|
374
|
-
<div className="!space-y-4">
|
|
375
|
-
<h3 className="text-lg font-semibold !text-blue-300">
|
|
376
|
-
Custom Colors
|
|
377
|
-
</h3>
|
|
378
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
379
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
380
|
-
{`// Using Tailwind classes
|
|
381
|
-
<SunIcon className="h-6 w-6 text-blue-500" />
|
|
382
|
-
<SunIcon className="h-6 w-6 text-purple-500" />
|
|
383
|
-
<SunIcon className="h-6 w-6 text-indigo-500" />
|
|
384
|
-
|
|
385
|
-
// Using custom colors
|
|
386
|
-
<SunIcon
|
|
387
|
-
className="h-6 w-6"
|
|
388
|
-
style={{ color: '#3B82F6' }}
|
|
389
|
-
/>`}
|
|
390
|
-
</pre>
|
|
391
|
-
</div>
|
|
392
|
-
</div>
|
|
393
|
-
</div>
|
|
394
|
-
</div>
|
|
395
|
-
|
|
396
|
-
{/* Usage Examples */}
|
|
397
|
-
<div className="!space-y-8">
|
|
398
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
399
|
-
Usage Examples
|
|
400
|
-
</h2>
|
|
401
|
-
|
|
402
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
403
|
-
{/* Suggestion Card */}
|
|
404
|
-
<div className="!space-y-4">
|
|
405
|
-
<h3 className="text-lg font-semibold !text-blue-300">
|
|
406
|
-
Suggestion Card
|
|
407
|
-
</h3>
|
|
408
|
-
<div className="!space-y-4">
|
|
409
|
-
<div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
|
|
410
|
-
<div className="flex items-start gap-3">
|
|
411
|
-
<SunIcon className="mt-0.5 h-5 w-5 flex-shrink-0 text-blue-400" />
|
|
412
|
-
<div>
|
|
413
|
-
<h4 className="font-medium !text-blue-200">
|
|
414
|
-
Pro Tip
|
|
415
|
-
</h4>
|
|
416
|
-
<p className="text-sm !text-blue-300/80">
|
|
417
|
-
Use keyboard shortcuts to speed up your workflow.
|
|
418
|
-
</p>
|
|
419
|
-
</div>
|
|
420
|
-
</div>
|
|
421
|
-
</div>
|
|
422
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
423
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
424
|
-
{`<div className="border border-blue-500/20 bg-blue-500/10 p-4">
|
|
425
|
-
<div className="flex items-start gap-3">
|
|
426
|
-
<SunIcon className="h-5 w-5 text-blue-400" />
|
|
427
|
-
<div>
|
|
428
|
-
<h4>Pro Tip</h4>
|
|
429
|
-
<p>Use keyboard shortcuts...</p>
|
|
430
|
-
</div>
|
|
431
|
-
</div>
|
|
432
|
-
</div>`}
|
|
433
|
-
</pre>
|
|
434
|
-
</div>
|
|
435
|
-
</div>
|
|
436
|
-
</div>
|
|
437
|
-
|
|
438
|
-
{/* Help Text */}
|
|
439
|
-
<div className="!space-y-4">
|
|
440
|
-
<h3 className="text-lg font-semibold !text-blue-300">
|
|
441
|
-
Help Text
|
|
442
|
-
</h3>
|
|
443
|
-
<div className="!space-y-4">
|
|
444
|
-
<div className="!space-y-2">
|
|
445
|
-
<label className="block text-sm font-medium text-white">
|
|
446
|
-
Username
|
|
447
|
-
</label>
|
|
448
|
-
<input
|
|
449
|
-
type="text"
|
|
450
|
-
className="w-full rounded-lg border border-white/20 bg-white/5 px-3 py-2 text-white placeholder-white/50"
|
|
451
|
-
placeholder="Enter username"
|
|
452
|
-
/>
|
|
453
|
-
<div className="flex items-center gap-2 text-sm text-blue-400">
|
|
454
|
-
<SunIcon className="h-4 w-4" />
|
|
455
|
-
<span>Use at least 3 characters</span>
|
|
456
|
-
</div>
|
|
457
|
-
</div>
|
|
458
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
459
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
460
|
-
{`<div className="flex items-center gap-2 text-blue-400">
|
|
461
|
-
<SunIcon className="h-4 w-4" />
|
|
462
|
-
<span>Use at least 3 characters</span>
|
|
463
|
-
</div>`}
|
|
464
|
-
</pre>
|
|
465
|
-
</div>
|
|
466
|
-
</div>
|
|
467
|
-
</div>
|
|
468
|
-
|
|
469
|
-
{/* Button Integration */}
|
|
470
|
-
<div className="!space-y-4">
|
|
471
|
-
<h3 className="text-lg font-semibold !text-blue-300">
|
|
472
|
-
Button Integration
|
|
473
|
-
</h3>
|
|
474
|
-
<div className="!space-y-4">
|
|
475
|
-
<div className="flex gap-4">
|
|
476
|
-
<button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/20 px-4 py-2 text-blue-200 transition-colors hover:bg-blue-500/30">
|
|
477
|
-
<SunIcon className="h-4 w-4" />
|
|
478
|
-
Show Hints
|
|
479
|
-
</button>
|
|
480
|
-
<button className="flex items-center gap-2 rounded-lg border border-purple-500/30 bg-purple-500/20 px-4 py-2 text-purple-200 transition-colors hover:bg-purple-500/30">
|
|
481
|
-
<SunIcon className="h-4 w-4" />
|
|
482
|
-
Get Suggestions
|
|
483
|
-
</button>
|
|
484
|
-
</div>
|
|
485
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
486
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
487
|
-
{`<button className="flex items-center gap-2">
|
|
488
|
-
<SunIcon className="h-4 w-4" />
|
|
489
|
-
Show Hints
|
|
490
|
-
</button>`}
|
|
491
|
-
</pre>
|
|
492
|
-
</div>
|
|
493
|
-
</div>
|
|
494
|
-
</div>
|
|
495
|
-
|
|
496
|
-
{/* Tooltip */}
|
|
497
|
-
<div className="!space-y-4">
|
|
498
|
-
<h3 className="text-lg font-semibold !text-blue-300">
|
|
499
|
-
Interactive Tooltip
|
|
500
|
-
</h3>
|
|
501
|
-
<div className="!space-y-4">
|
|
502
|
-
<div className="flex items-center gap-2">
|
|
503
|
-
<span className="text-white">Need help?</span>
|
|
504
|
-
<div className="group relative">
|
|
505
|
-
<SunIcon className="h-4 w-4 cursor-help text-blue-400" />
|
|
506
|
-
<div className="invisible absolute bottom-full left-1/2 mb-2 -translate-x-1/2 transform rounded bg-black px-2 py-1 text-xs text-white opacity-0 transition-all group-hover:visible group-hover:opacity-100">
|
|
507
|
-
Click for suggestions
|
|
508
|
-
</div>
|
|
509
|
-
</div>
|
|
510
|
-
</div>
|
|
511
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
512
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
513
|
-
{`<div className="group relative">
|
|
514
|
-
<SunIcon className="h-4 w-4 cursor-help text-blue-400" />
|
|
515
|
-
<div className="tooltip">Click for suggestions</div>
|
|
516
|
-
</div>`}
|
|
517
|
-
</pre>
|
|
518
|
-
</div>
|
|
519
|
-
</div>
|
|
520
|
-
</div>
|
|
521
|
-
</div>
|
|
522
|
-
</div>
|
|
523
|
-
|
|
524
|
-
{/* Accessibility */}
|
|
525
|
-
<div className="!space-y-8">
|
|
526
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
527
|
-
Accessibility Features
|
|
528
|
-
</h2>
|
|
529
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
530
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
531
|
-
<h3 className="text-lg font-semibold !text-green-300">
|
|
532
|
-
✅ Built-in Features
|
|
533
|
-
</h3>
|
|
534
|
-
<ul className="!space-y-2 text-sm !text-white/70">
|
|
535
|
-
<li className="!text-white/70">
|
|
536
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
537
|
-
</li>
|
|
538
|
-
<li className="!text-white/70">
|
|
539
|
-
Provides screen reader label "Suggestion icon"
|
|
540
|
-
</li>
|
|
541
|
-
<li className="!text-white/70">
|
|
542
|
-
Supports keyboard navigation when interactive
|
|
543
|
-
</li>
|
|
544
|
-
<li className="!text-white/70">
|
|
545
|
-
Maintains proper color contrast ratios
|
|
546
|
-
</li>
|
|
547
|
-
<li className="!text-white/70">
|
|
548
|
-
Scales with user's font size preferences
|
|
549
|
-
</li>
|
|
550
|
-
</ul>
|
|
551
|
-
</div>
|
|
552
|
-
|
|
553
|
-
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
554
|
-
<h3 className="text-lg font-semibold !text-blue-300">
|
|
555
|
-
💡 Best Practices
|
|
556
|
-
</h3>
|
|
557
|
-
<ul className="!space-y-2 text-sm text-white/70">
|
|
558
|
-
<li className="!text-white/70">
|
|
559
|
-
Always pair with descriptive text
|
|
560
|
-
</li>
|
|
561
|
-
<li className="!text-white/70">
|
|
562
|
-
Use consistent colors for suggestion types
|
|
563
|
-
</li>
|
|
564
|
-
<li className="!text-white/70">
|
|
565
|
-
Ensure sufficient color contrast
|
|
566
|
-
</li>
|
|
567
|
-
<li className="!text-white/70">
|
|
568
|
-
Add focus states for interactive elements
|
|
569
|
-
</li>
|
|
570
|
-
<li className="!text-white/70">
|
|
571
|
-
Provide alternative text for screen readers
|
|
572
|
-
</li>
|
|
573
|
-
</ul>
|
|
574
|
-
</div>
|
|
575
|
-
</div>
|
|
576
|
-
|
|
577
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
578
|
-
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
579
|
-
Custom Accessibility Label
|
|
580
|
-
</h3>
|
|
581
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
582
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
583
|
-
<pre className="overflow-x-auto text-sm !text-blue-300">
|
|
584
|
-
{`import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
585
|
-
import { SunIcon } from "@icons/suggestion-icon"
|
|
586
|
-
|
|
587
|
-
<AccessibleIcon label="Helpful tip available">
|
|
588
|
-
<SunIcon className="h-4 w-4 text-blue-500" />
|
|
589
|
-
</AccessibleIcon>`}
|
|
590
|
-
</pre>
|
|
591
|
-
</div>
|
|
592
|
-
<div className="!space-y-4">
|
|
593
|
-
<p className="text-sm !text-white/70">
|
|
594
|
-
For specific contexts, you can wrap the SunIcon with a
|
|
595
|
-
custom AccessibleIcon component that provides more
|
|
596
|
-
descriptive labels.
|
|
597
|
-
</p>
|
|
598
|
-
<div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
|
|
599
|
-
<div className="flex items-center gap-2 text-blue-200">
|
|
600
|
-
<SunIcon className="h-4 w-4" />
|
|
601
|
-
<span>Helpful tip available</span>
|
|
602
|
-
</div>
|
|
603
|
-
</div>
|
|
604
|
-
</div>
|
|
605
|
-
</div>
|
|
606
|
-
</div>
|
|
607
|
-
</div>
|
|
608
|
-
|
|
609
|
-
{/* Related Icons */}
|
|
610
|
-
<div className="!space-y-8">
|
|
611
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
612
|
-
Related Icons
|
|
613
|
-
</h2>
|
|
614
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
615
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
616
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
617
|
-
<span className="text-2xl">ℹ️</span>
|
|
618
|
-
</div>
|
|
619
|
-
<div>
|
|
620
|
-
<div className="font-medium text-white">InfoIcon</div>
|
|
621
|
-
<div className="text-xs text-white/60">
|
|
622
|
-
Information states
|
|
623
|
-
</div>
|
|
624
|
-
</div>
|
|
625
|
-
</div>
|
|
626
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
627
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-yellow-500/20">
|
|
628
|
-
<span className="text-2xl">💡</span>
|
|
629
|
-
</div>
|
|
630
|
-
<div>
|
|
631
|
-
<div className="font-medium text-white">
|
|
632
|
-
LightbulbIcon
|
|
633
|
-
</div>
|
|
634
|
-
<div className="text-xs text-white/60">Ideas & tips</div>
|
|
635
|
-
</div>
|
|
636
|
-
</div>
|
|
637
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
638
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
639
|
-
<span className="text-2xl">❓</span>
|
|
640
|
-
</div>
|
|
641
|
-
<div>
|
|
642
|
-
<div className="font-medium text-white">HelpIcon</div>
|
|
643
|
-
<div className="text-xs text-white/60">
|
|
644
|
-
Help & guidance
|
|
645
|
-
</div>
|
|
646
|
-
</div>
|
|
647
|
-
</div>
|
|
648
|
-
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
649
|
-
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
650
|
-
<span className="text-2xl">✨</span>
|
|
651
|
-
</div>
|
|
652
|
-
<div>
|
|
653
|
-
<div className="font-medium text-white">SparkleIcon</div>
|
|
654
|
-
<div className="text-xs text-white/60">Enhancement</div>
|
|
655
|
-
</div>
|
|
656
|
-
</div>
|
|
657
|
-
</div>
|
|
658
|
-
</div>
|
|
659
|
-
</div>
|
|
660
|
-
|
|
661
|
-
{/* Footer */}
|
|
662
|
-
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
663
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
664
|
-
<div className="!space-y-4 text-center">
|
|
665
|
-
<p className="!text-white/60">
|
|
666
|
-
SunIcon is part of the Aural UI icon library, built with
|
|
667
|
-
accessibility and consistency in mind.
|
|
668
|
-
</p>
|
|
669
|
-
<p className="text-sm !text-white/40">
|
|
670
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
671
|
-
compatibility and follow WCAG guidelines.
|
|
672
|
-
</p>
|
|
673
|
-
</div>
|
|
674
|
-
</div>
|
|
675
|
-
</div>
|
|
676
|
-
</div>
|
|
677
|
-
</>
|
|
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
|
+
/>
|
|
678
85
|
),
|
|
679
86
|
},
|
|
680
87
|
},
|
|
681
88
|
tags: ["autodocs"],
|
|
682
89
|
argTypes: {
|
|
683
|
-
width: {
|
|
684
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
685
|
-
description: "Width of the icon in pixels",
|
|
686
|
-
},
|
|
687
|
-
withAccessibility: {
|
|
688
|
-
control: "boolean",
|
|
689
|
-
description: "Whether to wrap the icon with accessibility features",
|
|
690
|
-
},
|
|
691
|
-
height: {
|
|
692
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
693
|
-
description: "Height of the icon in pixels",
|
|
694
|
-
},
|
|
695
|
-
fill: {
|
|
696
|
-
control: "color",
|
|
697
|
-
description: "Fill color of the icon",
|
|
698
|
-
},
|
|
699
90
|
className: {
|
|
700
91
|
control: "text",
|
|
701
|
-
description: "CSS classes
|
|
702
|
-
},
|
|
703
|
-
stroke: {
|
|
704
|
-
control: "color",
|
|
705
|
-
description: "Stroke color of the icon",
|
|
92
|
+
description: "CSS classes including color token",
|
|
706
93
|
},
|
|
707
|
-
|
|
708
|
-
control:
|
|
709
|
-
description: "
|
|
94
|
+
withAccessibility: {
|
|
95
|
+
control: "boolean",
|
|
96
|
+
description: "Wrap with accessibility label",
|
|
710
97
|
},
|
|
711
98
|
},
|
|
712
99
|
}
|
|
@@ -714,181 +101,83 @@ import { SunIcon } from "@icons/suggestion-icon"
|
|
|
714
101
|
export default meta
|
|
715
102
|
type Story = StoryObj<typeof SunIcon>
|
|
716
103
|
|
|
717
|
-
// Story parameters for consistent dark theme
|
|
718
|
-
const storyParameters = {
|
|
719
|
-
backgrounds: {
|
|
720
|
-
default: "dark",
|
|
721
|
-
values: [
|
|
722
|
-
{ name: "dark", value: "#0a0a0a" },
|
|
723
|
-
{ name: "darker", value: "#000000" },
|
|
724
|
-
],
|
|
725
|
-
},
|
|
726
|
-
}
|
|
727
|
-
|
|
728
104
|
export const Default: Story = {
|
|
729
105
|
args: {
|
|
730
|
-
|
|
731
|
-
height: 24,
|
|
732
|
-
className: "text-blue-400",
|
|
106
|
+
className: "h-6 w-6 text-fm-icon-warning",
|
|
733
107
|
withAccessibility: true,
|
|
734
108
|
},
|
|
735
|
-
parameters: storyParameters,
|
|
736
109
|
render: (args) => (
|
|
737
|
-
<
|
|
110
|
+
<IconDefaultCanvas>
|
|
738
111
|
<SunIcon {...args} />
|
|
739
|
-
</
|
|
112
|
+
</IconDefaultCanvas>
|
|
740
113
|
),
|
|
741
114
|
}
|
|
742
115
|
|
|
743
116
|
export const SizeVariations: Story = {
|
|
744
|
-
|
|
745
|
-
...storyParameters,
|
|
746
|
-
docs: {
|
|
747
|
-
description: {
|
|
748
|
-
story:
|
|
749
|
-
"SunIcon in different sizes, from small UI elements to large displays.",
|
|
750
|
-
},
|
|
751
|
-
},
|
|
752
|
-
},
|
|
753
|
-
render: () => (
|
|
754
|
-
<div className="flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
755
|
-
<div className="text-center">
|
|
756
|
-
<SunIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
757
|
-
<span className="text-xs text-white/60">12px</span>
|
|
758
|
-
</div>
|
|
759
|
-
<div className="text-center">
|
|
760
|
-
<SunIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
761
|
-
<span className="text-xs text-white/60">16px</span>
|
|
762
|
-
</div>
|
|
763
|
-
<div className="text-center">
|
|
764
|
-
<SunIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
765
|
-
<span className="text-xs text-white/60">20px</span>
|
|
766
|
-
</div>
|
|
767
|
-
<div className="text-center">
|
|
768
|
-
<SunIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
769
|
-
<span className="text-xs text-white/60">24px</span>
|
|
770
|
-
</div>
|
|
771
|
-
<div className="text-center">
|
|
772
|
-
<SunIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
773
|
-
<span className="text-xs text-white/60">32px</span>
|
|
774
|
-
</div>
|
|
775
|
-
<div className="text-center">
|
|
776
|
-
<SunIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
777
|
-
<span className="text-xs text-white/60">48px</span>
|
|
778
|
-
</div>
|
|
779
|
-
</div>
|
|
780
|
-
),
|
|
117
|
+
render: () => <IconSizeVariations icon={SunIcon} />,
|
|
781
118
|
}
|
|
782
119
|
|
|
783
120
|
export const ColorVariations: Story = {
|
|
784
|
-
|
|
785
|
-
...storyParameters,
|
|
786
|
-
docs: {
|
|
787
|
-
description: {
|
|
788
|
-
story:
|
|
789
|
-
"SunIcon in different semantic colors for various suggestion types.",
|
|
790
|
-
},
|
|
791
|
-
},
|
|
792
|
-
},
|
|
793
|
-
render: () => (
|
|
794
|
-
<div className="grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8 md:grid-cols-4">
|
|
795
|
-
<div className="text-center">
|
|
796
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
|
|
797
|
-
<SunIcon className="h-8 w-8 text-blue-400" />
|
|
798
|
-
</div>
|
|
799
|
-
<div className="text-sm font-medium text-white">Primary</div>
|
|
800
|
-
<div className="text-xs text-blue-400">text-blue-400</div>
|
|
801
|
-
</div>
|
|
802
|
-
<div className="text-center">
|
|
803
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
|
|
804
|
-
<SunIcon className="h-8 w-8 text-purple-400" />
|
|
805
|
-
</div>
|
|
806
|
-
<div className="text-sm font-medium text-white">Hint</div>
|
|
807
|
-
<div className="text-xs text-purple-400">text-purple-400</div>
|
|
808
|
-
</div>
|
|
809
|
-
<div className="text-center">
|
|
810
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-indigo-500/30 bg-indigo-500/20">
|
|
811
|
-
<SunIcon className="h-8 w-8 text-indigo-400" />
|
|
812
|
-
</div>
|
|
813
|
-
<div className="text-sm font-medium text-white">Recommendation</div>
|
|
814
|
-
<div className="text-xs text-indigo-400">text-indigo-400</div>
|
|
815
|
-
</div>
|
|
816
|
-
<div className="text-center">
|
|
817
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-cyan-500/30 bg-cyan-500/20">
|
|
818
|
-
<SunIcon className="h-8 w-8 text-cyan-400" />
|
|
819
|
-
</div>
|
|
820
|
-
<div className="text-sm font-medium text-white">Tip</div>
|
|
821
|
-
<div className="text-xs text-cyan-400">text-cyan-400</div>
|
|
822
|
-
</div>
|
|
823
|
-
</div>
|
|
824
|
-
),
|
|
121
|
+
render: () => <IconColorVariations icon={SunIcon} />,
|
|
825
122
|
}
|
|
826
123
|
|
|
827
124
|
export const UsageExamples: Story = {
|
|
828
|
-
parameters: {
|
|
829
|
-
...storyParameters,
|
|
830
|
-
docs: {
|
|
831
|
-
description: {
|
|
832
|
-
story:
|
|
833
|
-
"Practical examples showing SunIcon used for theme toggles, weather widgets, and status indicators.",
|
|
834
|
-
},
|
|
835
|
-
},
|
|
836
|
-
},
|
|
837
125
|
render: () => (
|
|
838
|
-
<
|
|
839
|
-
<
|
|
840
|
-
<
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
<
|
|
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>
|
|
854
150
|
</div>
|
|
151
|
+
<div className="bg-fm-icon-active h-5 w-9 rounded-full" />
|
|
855
152
|
</div>
|
|
856
|
-
</
|
|
857
|
-
|
|
858
|
-
<
|
|
859
|
-
<
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
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>
|
|
865
167
|
</div>
|
|
866
|
-
</
|
|
867
|
-
</
|
|
168
|
+
</IconUsageSection>
|
|
169
|
+
</IconUsageCanvas>
|
|
868
170
|
),
|
|
869
171
|
}
|
|
870
172
|
|
|
871
173
|
export const Playground: Story = {
|
|
872
|
-
parameters: {
|
|
873
|
-
...storyParameters,
|
|
874
|
-
docs: {
|
|
875
|
-
description: {
|
|
876
|
-
story:
|
|
877
|
-
"Interactive playground to experiment with different SunIcon configurations.",
|
|
878
|
-
},
|
|
879
|
-
},
|
|
880
|
-
},
|
|
881
174
|
args: {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
className: "text-blue-400",
|
|
885
|
-
strokeWidth: 1,
|
|
175
|
+
className: "h-8 w-8 text-fm-icon-warning",
|
|
176
|
+
withAccessibility: true,
|
|
886
177
|
},
|
|
887
178
|
render: (args) => (
|
|
888
|
-
<
|
|
889
|
-
<
|
|
890
|
-
|
|
891
|
-
</div>
|
|
892
|
-
</div>
|
|
179
|
+
<IconPlaygroundCanvas>
|
|
180
|
+
<SunIcon {...args} />
|
|
181
|
+
</IconPlaygroundCanvas>
|
|
893
182
|
),
|
|
894
183
|
}
|