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 { AngleDownIcon } from "src/ui/icons/angle-down-icon"
|
|
5
|
+
import { ChevronDownIcon } from "src/ui/icons/chevron-down-icon"
|
|
6
|
+
import { GripVerticalIcon } from "src/ui/icons/grip-vertical-icon"
|
|
7
|
+
import { MoveVerticalIcon } from "src/ui/icons/move-vertical-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 { ScrollDownIcon } from "."
|
|
5
19
|
|
|
6
20
|
const meta: Meta<typeof ScrollDownIcon> = {
|
|
@@ -11,368 +25,76 @@ const meta: Meta<typeof ScrollDownIcon> = {
|
|
|
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
|
-
.sbdocs-p, .sbdocs-li { color: rgba(255, 255, 255, 0.7) !important; }
|
|
31
|
-
.sbdocs-code { background: rgba(255, 255, 255, 0.1) !important; color: rgba(168, 85, 247, 1) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
32
|
-
.sbdocs-pre { background: rgba(0, 0, 0, 0.4) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
33
|
-
.sbdocs-table { background: rgba(255, 255, 255, 0.05) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
34
|
-
.sbdocs-table th { background: rgba(255, 255, 255, 0.05) !important; color: white !important; border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; }
|
|
35
|
-
.sbdocs-table td { color: rgba(255, 255, 255, 0.7) !important; border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important; }
|
|
36
|
-
`}
|
|
37
|
-
</style>
|
|
38
|
-
|
|
39
|
-
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
|
|
40
|
-
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
41
|
-
<div className="absolute inset-0 bg-gradient-to-r from-purple-500/10 via-transparent to-pink-500/10" />
|
|
42
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
43
|
-
<div className="!space-y-6 text-center">
|
|
44
|
-
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-purple-500/30 bg-gradient-to-br from-purple-500/20 to-pink-500/20">
|
|
45
|
-
<ScrollDownIcon className="h-12 w-12 text-white" />
|
|
46
|
-
</div>
|
|
47
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
48
|
-
ScrollDownIcon
|
|
49
|
-
</h1>
|
|
50
|
-
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
51
|
-
A double-chevron scroll-down icon for scroll hints,
|
|
52
|
-
"see more" prompts, and navigation. Built with
|
|
53
|
-
accessibility in mind using Radix UI's AccessibleIcon
|
|
54
|
-
wrapper.
|
|
55
|
-
</p>
|
|
56
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
57
|
-
<div className="text-center">
|
|
58
|
-
<div className="text-3xl font-bold text-purple-300">
|
|
59
|
-
Scroll
|
|
60
|
-
</div>
|
|
61
|
-
<div className="text-sm text-white/60">
|
|
62
|
-
Scroll hint / see more
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div className="h-8 w-px bg-white/20" />
|
|
66
|
-
<div className="text-center">
|
|
67
|
-
<div className="text-3xl font-bold text-pink-300">
|
|
68
|
-
Accessible
|
|
69
|
-
</div>
|
|
70
|
-
<div className="text-sm text-white/60">
|
|
71
|
-
Screen reader friendly
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
<div className="h-8 w-px bg-white/20" />
|
|
75
|
-
<div className="text-center">
|
|
76
|
-
<div className="text-3xl font-bold text-indigo-300">
|
|
77
|
-
Minimal
|
|
78
|
-
</div>
|
|
79
|
-
<div className="text-sm text-white/60">
|
|
80
|
-
Clean stroke design
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
89
|
-
<div className="!space-y-8">
|
|
90
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
91
|
-
Quick Start
|
|
92
|
-
</h2>
|
|
93
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
94
|
-
<div className="!space-y-4">
|
|
95
|
-
<h3 className="text-xl font-semibold !text-purple-300">
|
|
96
|
-
Basic Usage
|
|
97
|
-
</h3>
|
|
98
|
-
<div className="rounded-lg bg-black/40 p-4">
|
|
99
|
-
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
100
|
-
{`import { ScrollDownIcon } from "@icons/scroll-down-icon"
|
|
35
|
+
<AuralIconDocsPage
|
|
36
|
+
accentToken="info"
|
|
37
|
+
features={[
|
|
38
|
+
{ title: "Scroll", description: "Scroll down indicator" },
|
|
39
|
+
{ title: "Navigate", description: "Navigate to next section" },
|
|
40
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
41
|
+
]}
|
|
42
|
+
quickStart={{
|
|
43
|
+
codeExample: `import { ScrollDownIcon } from "src/ui/icons/scroll-down-icon"
|
|
101
44
|
|
|
102
45
|
function ScrollHint() {
|
|
103
46
|
return (
|
|
104
|
-
<div className="flex
|
|
105
|
-
<ScrollDownIcon className="h-
|
|
47
|
+
<div className="flex flex-col items-center gap-1">
|
|
48
|
+
<ScrollDownIcon className="h-5 w-5 text-fm-icon-inactive" />
|
|
49
|
+
<span className="text-xs">Scroll down</span>
|
|
106
50
|
</div>
|
|
107
51
|
)
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
<div className="!space-y-4">
|
|
113
|
-
<h3 className="text-xl font-semibold !text-purple-300">
|
|
114
|
-
Live Preview
|
|
115
|
-
</h3>
|
|
116
|
-
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
117
|
-
<ScrollDownIcon className="h-10 w-10 text-white" />
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
<div className="!space-y-8">
|
|
124
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
125
|
-
Props & Configuration
|
|
126
|
-
</h2>
|
|
127
|
-
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
128
|
-
<div className="bg-white/5 p-4">
|
|
129
|
-
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
130
|
-
</div>
|
|
131
|
-
<table className="!my-0 w-full">
|
|
132
|
-
<thead className="bg-white/5">
|
|
133
|
-
<tr className="border-b border-white/10">
|
|
134
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
135
|
-
Prop
|
|
136
|
-
</th>
|
|
137
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
138
|
-
Type
|
|
139
|
-
</th>
|
|
140
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
141
|
-
Default
|
|
142
|
-
</th>
|
|
143
|
-
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
144
|
-
Description
|
|
145
|
-
</th>
|
|
146
|
-
</tr>
|
|
147
|
-
</thead>
|
|
148
|
-
<tbody>
|
|
149
|
-
<tr className="!bg-black/10">
|
|
150
|
-
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
151
|
-
withAccessibility
|
|
152
|
-
</td>
|
|
153
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
154
|
-
boolean
|
|
155
|
-
</td>
|
|
156
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
157
|
-
true
|
|
158
|
-
</td>
|
|
159
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
160
|
-
Whether to wrap the icon with accessibility feature
|
|
161
|
-
</td>
|
|
162
|
-
</tr>
|
|
163
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
164
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
165
|
-
width
|
|
166
|
-
</td>
|
|
167
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
168
|
-
number | string
|
|
169
|
-
</td>
|
|
170
|
-
<td className="px-6 py-4 text-sm !text-white/50">26</td>
|
|
171
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
172
|
-
Width of the icon
|
|
173
|
-
</td>
|
|
174
|
-
</tr>
|
|
175
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
176
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
177
|
-
height
|
|
178
|
-
</td>
|
|
179
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
180
|
-
number | string
|
|
181
|
-
</td>
|
|
182
|
-
<td className="px-6 py-4 text-sm !text-white/50">26</td>
|
|
183
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
184
|
-
Height of the icon
|
|
185
|
-
</td>
|
|
186
|
-
</tr>
|
|
187
|
-
<tr className="border-b border-white/5">
|
|
188
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
189
|
-
stroke
|
|
190
|
-
</td>
|
|
191
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
192
|
-
string
|
|
193
|
-
</td>
|
|
194
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
195
|
-
white (in SVG)
|
|
196
|
-
</td>
|
|
197
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
198
|
-
Stroke color; use className (e.g. text-white) to
|
|
199
|
-
override
|
|
200
|
-
</td>
|
|
201
|
-
</tr>
|
|
202
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
203
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
204
|
-
strokeWidth
|
|
205
|
-
</td>
|
|
206
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
207
|
-
string | number
|
|
208
|
-
</td>
|
|
209
|
-
<td className="px-6 py-4 text-sm !text-white/50">
|
|
210
|
-
1.17857
|
|
211
|
-
</td>
|
|
212
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
213
|
-
Width of the stroke
|
|
214
|
-
</td>
|
|
215
|
-
</tr>
|
|
216
|
-
<tr className="border-b border-white/5 !bg-black/10">
|
|
217
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
218
|
-
className
|
|
219
|
-
</td>
|
|
220
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
221
|
-
string
|
|
222
|
-
</td>
|
|
223
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
224
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
225
|
-
CSS classes for styling
|
|
226
|
-
</td>
|
|
227
|
-
</tr>
|
|
228
|
-
<tr className="!bg-black/10">
|
|
229
|
-
<td className="px-6 py-4 font-mono text-sm !text-purple-300">
|
|
230
|
-
...svgProps
|
|
231
|
-
</td>
|
|
232
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
233
|
-
SVGProps
|
|
234
|
-
</td>
|
|
235
|
-
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
236
|
-
<td className="px-6 py-4 text-sm !text-white/70">
|
|
237
|
-
All standard SVG element props
|
|
238
|
-
</td>
|
|
239
|
-
</tr>
|
|
240
|
-
</tbody>
|
|
241
|
-
</table>
|
|
242
|
-
</div>
|
|
243
|
-
</div>
|
|
244
|
-
|
|
245
|
-
<div className="!space-y-8">
|
|
246
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
247
|
-
Size Variations
|
|
248
|
-
</h2>
|
|
249
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
250
|
-
<div className="flex items-end justify-center gap-6 rounded-lg bg-black/20 p-6">
|
|
251
|
-
<div className="text-center">
|
|
252
|
-
<ScrollDownIcon className="!mx-auto mb-2 h-4 w-4 text-white" />
|
|
253
|
-
<span className="text-xs text-white/60">16px</span>
|
|
254
|
-
</div>
|
|
255
|
-
<div className="text-center">
|
|
256
|
-
<ScrollDownIcon className="!mx-auto mb-2 h-6 w-6 text-white" />
|
|
257
|
-
<span className="text-xs text-white/60">24px</span>
|
|
258
|
-
</div>
|
|
259
|
-
<div className="text-center">
|
|
260
|
-
<ScrollDownIcon className="!mx-auto mb-2 h-8 w-8 text-white" />
|
|
261
|
-
<span className="text-xs text-white/60">32px</span>
|
|
262
|
-
</div>
|
|
263
|
-
<div className="text-center">
|
|
264
|
-
<ScrollDownIcon className="!mx-auto mb-2 h-10 w-10 text-white" />
|
|
265
|
-
<span className="text-xs text-white/60">40px</span>
|
|
266
|
-
</div>
|
|
267
|
-
<div className="text-center">
|
|
268
|
-
<ScrollDownIcon className="!mx-auto mb-2 h-12 w-12 text-white" />
|
|
269
|
-
<span className="text-xs text-white/60">48px</span>
|
|
270
|
-
</div>
|
|
271
|
-
</div>
|
|
272
|
-
</div>
|
|
52
|
+
}`,
|
|
53
|
+
livePreview: (
|
|
54
|
+
<div className="flex flex-col items-center gap-1">
|
|
55
|
+
<ScrollDownIcon className="text-fm-icon-inactive h-6 w-6" />
|
|
273
56
|
</div>
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
<ScrollDownIcon className="h-6 w-6 text-white" />
|
|
304
|
-
</button>
|
|
305
|
-
</div>
|
|
306
|
-
</div>
|
|
307
|
-
</div>
|
|
308
|
-
</div>
|
|
309
|
-
|
|
310
|
-
<div className="!space-y-8">
|
|
311
|
-
<h2 className="text-center text-3xl font-bold !text-white">
|
|
312
|
-
Accessibility
|
|
313
|
-
</h2>
|
|
314
|
-
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
315
|
-
<ul className="!space-y-2 text-sm !text-white/70">
|
|
316
|
-
<li>
|
|
317
|
-
Uses Radix UI AccessibleIcon with label "Scroll down
|
|
318
|
-
icon"
|
|
319
|
-
</li>
|
|
320
|
-
<li>
|
|
321
|
-
When used in a button, add aria-label e.g. "Scroll
|
|
322
|
-
down" or "See more content"
|
|
323
|
-
</li>
|
|
324
|
-
<li>
|
|
325
|
-
Ensure sufficient touch target size for interactive use
|
|
326
|
-
</li>
|
|
327
|
-
</ul>
|
|
328
|
-
</div>
|
|
329
|
-
</div>
|
|
330
|
-
</div>
|
|
331
|
-
|
|
332
|
-
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
333
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
334
|
-
<div className="!space-y-4 text-center">
|
|
335
|
-
<p className="!text-white/60">
|
|
336
|
-
ScrollDownIcon is part of the Aural UI icon library for
|
|
337
|
-
scroll and navigation hints.
|
|
338
|
-
</p>
|
|
339
|
-
<p className="text-sm !text-white/40">
|
|
340
|
-
Uses Radix UI AccessibleIcon for screen reader
|
|
341
|
-
compatibility.
|
|
342
|
-
</p>
|
|
343
|
-
</div>
|
|
344
|
-
</div>
|
|
345
|
-
</div>
|
|
346
|
-
</div>
|
|
347
|
-
</>
|
|
57
|
+
),
|
|
58
|
+
}}
|
|
59
|
+
relatedIcons={[
|
|
60
|
+
{
|
|
61
|
+
name: "ChevronDownIcon",
|
|
62
|
+
description: "Chevron pointing down",
|
|
63
|
+
icon: ChevronDownIcon,
|
|
64
|
+
accentToken: "info",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "AngleDownIcon",
|
|
68
|
+
description: "Angle / caret down icon",
|
|
69
|
+
icon: AngleDownIcon,
|
|
70
|
+
accentToken: "positive",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "MoveVerticalIcon",
|
|
74
|
+
description: "Move vertically icon",
|
|
75
|
+
icon: MoveVerticalIcon,
|
|
76
|
+
accentToken: "warning",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "GripVerticalIcon",
|
|
80
|
+
description: "Vertical grip drag handle",
|
|
81
|
+
icon: GripVerticalIcon,
|
|
82
|
+
accentToken: "negative",
|
|
83
|
+
},
|
|
84
|
+
]}
|
|
85
|
+
/>
|
|
348
86
|
),
|
|
349
87
|
},
|
|
350
88
|
},
|
|
351
89
|
tags: ["autodocs"],
|
|
352
90
|
argTypes: {
|
|
353
|
-
|
|
354
|
-
control:
|
|
355
|
-
description: "
|
|
356
|
-
},
|
|
357
|
-
height: {
|
|
358
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
359
|
-
description: "Height of the icon in pixels",
|
|
91
|
+
className: {
|
|
92
|
+
control: "text",
|
|
93
|
+
description: "CSS classes including color token",
|
|
360
94
|
},
|
|
361
95
|
withAccessibility: {
|
|
362
96
|
control: "boolean",
|
|
363
|
-
description: "
|
|
364
|
-
},
|
|
365
|
-
stroke: {
|
|
366
|
-
control: "color",
|
|
367
|
-
description: "Stroke color of the icon",
|
|
368
|
-
},
|
|
369
|
-
strokeWidth: {
|
|
370
|
-
control: { type: "range", min: 0.5, max: 3, step: 0.25 },
|
|
371
|
-
description: "Width of the stroke",
|
|
372
|
-
},
|
|
373
|
-
className: {
|
|
374
|
-
control: "text",
|
|
375
|
-
description: "CSS classes for styling",
|
|
97
|
+
description: "Wrap with accessibility label",
|
|
376
98
|
},
|
|
377
99
|
},
|
|
378
100
|
}
|
|
@@ -380,156 +102,67 @@ function ScrollHint() {
|
|
|
380
102
|
export default meta
|
|
381
103
|
type Story = StoryObj<typeof ScrollDownIcon>
|
|
382
104
|
|
|
383
|
-
const storyParameters = {
|
|
384
|
-
backgrounds: {
|
|
385
|
-
default: "dark",
|
|
386
|
-
values: [
|
|
387
|
-
{ name: "dark", value: "#0a0a0a" },
|
|
388
|
-
{ name: "darker", value: "#000000" },
|
|
389
|
-
],
|
|
390
|
-
},
|
|
391
|
-
}
|
|
392
|
-
|
|
393
105
|
export const Default: Story = {
|
|
394
106
|
args: {
|
|
395
|
-
|
|
396
|
-
height: 26,
|
|
397
|
-
className: "text-white",
|
|
107
|
+
className: "h-6 w-6 text-fm-icon-inactive",
|
|
398
108
|
withAccessibility: true,
|
|
399
109
|
},
|
|
400
|
-
parameters: storyParameters,
|
|
401
110
|
render: (args) => (
|
|
402
|
-
<
|
|
111
|
+
<IconDefaultCanvas>
|
|
403
112
|
<ScrollDownIcon {...args} />
|
|
404
|
-
</
|
|
113
|
+
</IconDefaultCanvas>
|
|
405
114
|
),
|
|
406
115
|
}
|
|
407
116
|
|
|
408
117
|
export const SizeVariations: Story = {
|
|
409
|
-
|
|
410
|
-
...storyParameters,
|
|
411
|
-
docs: {
|
|
412
|
-
description: {
|
|
413
|
-
story: "ScrollDownIcon in different sizes for scroll hints and CTAs.",
|
|
414
|
-
},
|
|
415
|
-
},
|
|
416
|
-
},
|
|
417
|
-
render: () => (
|
|
418
|
-
<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">
|
|
419
|
-
<div className="text-center">
|
|
420
|
-
<ScrollDownIcon className="!mx-auto mb-2 h-4 w-4 text-white" />
|
|
421
|
-
<span className="text-xs text-white/60">16px</span>
|
|
422
|
-
</div>
|
|
423
|
-
<div className="text-center">
|
|
424
|
-
<ScrollDownIcon className="!mx-auto mb-2 h-6 w-6 text-white" />
|
|
425
|
-
<span className="text-xs text-white/60">24px</span>
|
|
426
|
-
</div>
|
|
427
|
-
<div className="text-center">
|
|
428
|
-
<ScrollDownIcon className="!mx-auto mb-2 h-8 w-8 text-white" />
|
|
429
|
-
<span className="text-xs text-white/60">32px</span>
|
|
430
|
-
</div>
|
|
431
|
-
<div className="text-center">
|
|
432
|
-
<ScrollDownIcon className="!mx-auto mb-2 h-10 w-10 text-white" />
|
|
433
|
-
<span className="text-xs text-white/60">40px</span>
|
|
434
|
-
</div>
|
|
435
|
-
<div className="text-center">
|
|
436
|
-
<ScrollDownIcon className="!mx-auto mb-2 h-12 w-12 text-white" />
|
|
437
|
-
<span className="text-xs text-white/60">48px</span>
|
|
438
|
-
</div>
|
|
439
|
-
</div>
|
|
440
|
-
),
|
|
118
|
+
render: () => <IconSizeVariations icon={ScrollDownIcon} />,
|
|
441
119
|
}
|
|
442
120
|
|
|
443
121
|
export const ColorVariations: Story = {
|
|
444
|
-
|
|
445
|
-
...storyParameters,
|
|
446
|
-
docs: {
|
|
447
|
-
description: {
|
|
448
|
-
story: "ScrollDownIcon with different colors for context and branding.",
|
|
449
|
-
},
|
|
450
|
-
},
|
|
451
|
-
},
|
|
452
|
-
render: () => (
|
|
453
|
-
<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">
|
|
454
|
-
<div className="text-center">
|
|
455
|
-
<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">
|
|
456
|
-
<ScrollDownIcon className="h-8 w-8 text-white" />
|
|
457
|
-
</div>
|
|
458
|
-
<div className="text-sm font-medium text-white">Primary</div>
|
|
459
|
-
</div>
|
|
460
|
-
<div className="text-center">
|
|
461
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-gray-500/30 bg-gray-500/20">
|
|
462
|
-
<ScrollDownIcon className="h-8 w-8 text-gray-200" />
|
|
463
|
-
</div>
|
|
464
|
-
<div className="text-sm font-medium text-white">Neutral</div>
|
|
465
|
-
</div>
|
|
466
|
-
<div className="text-center">
|
|
467
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/20 bg-white/10">
|
|
468
|
-
<ScrollDownIcon className="h-8 w-8 text-white/90" />
|
|
469
|
-
</div>
|
|
470
|
-
<div className="text-sm font-medium text-white">Overlay</div>
|
|
471
|
-
</div>
|
|
472
|
-
<div className="text-center">
|
|
473
|
-
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-pink-500/30 bg-pink-500/20">
|
|
474
|
-
<ScrollDownIcon className="h-8 w-8 text-white" />
|
|
475
|
-
</div>
|
|
476
|
-
<div className="text-sm font-medium text-white">Accent</div>
|
|
477
|
-
</div>
|
|
478
|
-
</div>
|
|
479
|
-
),
|
|
122
|
+
render: () => <IconColorVariations icon={ScrollDownIcon} />,
|
|
480
123
|
}
|
|
481
124
|
|
|
482
125
|
export const UsageExamples: Story = {
|
|
483
|
-
parameters: {
|
|
484
|
-
...storyParameters,
|
|
485
|
-
docs: {
|
|
486
|
-
description: {
|
|
487
|
-
story: "Real-world usage: scroll hint and hero CTA.",
|
|
488
|
-
},
|
|
489
|
-
},
|
|
490
|
-
},
|
|
491
126
|
render: () => (
|
|
492
|
-
<
|
|
493
|
-
<
|
|
494
|
-
<
|
|
495
|
-
|
|
496
|
-
<span className="text-
|
|
497
|
-
|
|
127
|
+
<IconUsageCanvas>
|
|
128
|
+
<IconUsageSection title="Scroll Hint">
|
|
129
|
+
<div className="flex flex-col items-center gap-2 py-2">
|
|
130
|
+
<ScrollDownIcon className="text-fm-icon-inactive h-6 w-6" />
|
|
131
|
+
<span className="text-fm-secondary font-fm-text text-xs">
|
|
132
|
+
Scroll to read more
|
|
133
|
+
</span>
|
|
498
134
|
</div>
|
|
499
|
-
</
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
<div className="flex
|
|
503
|
-
<
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
</button>
|
|
135
|
+
</IconUsageSection>
|
|
136
|
+
|
|
137
|
+
<IconUsageSection title="Section Navigator">
|
|
138
|
+
<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">
|
|
139
|
+
<span className="text-fm-primary font-fm-text text-sm">
|
|
140
|
+
Section 1 of 5
|
|
141
|
+
</span>
|
|
142
|
+
<ScrollDownIcon className="text-fm-icon-active h-5 w-5" />
|
|
508
143
|
</div>
|
|
509
|
-
</
|
|
510
|
-
|
|
144
|
+
</IconUsageSection>
|
|
145
|
+
|
|
146
|
+
<IconUsageSection title="Loading More Indicator">
|
|
147
|
+
<div className="flex flex-col items-center gap-1 py-2">
|
|
148
|
+
<ScrollDownIcon className="text-fm-icon-inactive h-5 w-5 animate-bounce" />
|
|
149
|
+
<span className="text-fm-tertiary font-fm-text text-xs">
|
|
150
|
+
Scroll for more
|
|
151
|
+
</span>
|
|
152
|
+
</div>
|
|
153
|
+
</IconUsageSection>
|
|
154
|
+
</IconUsageCanvas>
|
|
511
155
|
),
|
|
512
156
|
}
|
|
513
157
|
|
|
514
158
|
export const Playground: Story = {
|
|
515
|
-
parameters: {
|
|
516
|
-
...storyParameters,
|
|
517
|
-
docs: {
|
|
518
|
-
description: {
|
|
519
|
-
story: "Interactive playground for ScrollDownIcon.",
|
|
520
|
-
},
|
|
521
|
-
},
|
|
522
|
-
},
|
|
523
159
|
args: {
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
className: "text-white",
|
|
160
|
+
className: "h-8 w-8 text-fm-icon-inactive",
|
|
161
|
+
withAccessibility: true,
|
|
527
162
|
},
|
|
528
163
|
render: (args) => (
|
|
529
|
-
<
|
|
530
|
-
<
|
|
531
|
-
|
|
532
|
-
</div>
|
|
533
|
-
</div>
|
|
164
|
+
<IconPlaygroundCanvas>
|
|
165
|
+
<ScrollDownIcon {...args} />
|
|
166
|
+
</IconPlaygroundCanvas>
|
|
534
167
|
),
|
|
535
168
|
}
|