aural-ui 4.0.1 → 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 -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 +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
3
|
|
|
4
|
+
import { AngleDownIcon } from "src/ui/icons/angle-down-icon"
|
|
5
|
+
import { ChevronDownIcon } from "src/ui/icons/chevron-down-icon"
|
|
6
|
+
import { ChevronLeftIcon } from "src/ui/icons/chevron-left-icon"
|
|
7
|
+
import { ChevronRightIcon } from "src/ui/icons/chevron-right-icon"
|
|
8
|
+
import {
|
|
9
|
+
IconColorVariations,
|
|
10
|
+
IconDefaultCanvas,
|
|
11
|
+
IconDirectionalVariations,
|
|
12
|
+
IconPlaygroundCanvas,
|
|
13
|
+
IconSizeVariations,
|
|
14
|
+
IconUsageCanvas,
|
|
15
|
+
IconUsageSection,
|
|
16
|
+
} from "src/ui/story-spec/icons/icon-story-canvas"
|
|
17
|
+
import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
|
|
18
|
+
|
|
4
19
|
import { ChevronUpIcon } from "."
|
|
5
20
|
|
|
6
21
|
const meta: Meta<typeof ChevronUpIcon> = {
|
|
@@ -18,852 +33,73 @@ const meta: Meta<typeof ChevronUpIcon> = {
|
|
|
18
33
|
},
|
|
19
34
|
docs: {
|
|
20
35
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
.docs-story {
|
|
37
|
-
background: transparent ;
|
|
38
|
-
}
|
|
39
|
-
.sbdocs {
|
|
40
|
-
background: transparent ;
|
|
41
|
-
}
|
|
42
|
-
body {
|
|
43
|
-
background: var(--color-fm-surface-primary) ;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: var(--color-fm-surface-primary) ;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent ;
|
|
50
|
-
border: none ;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: var(--color-fm-icon-active) ;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: var(--color-fm-secondary) ;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: var(--color-fm-surface-secondary) ;
|
|
60
|
-
color: var(--color-fm-secondary-500) ;
|
|
61
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: var(--color-fm-surface-secondary) ;
|
|
65
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: var(--color-fm-surface-secondary) ;
|
|
69
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: var(--color-fm-surface-secondary) ;
|
|
73
|
-
color: var(--color-fm-icon-active) ;
|
|
74
|
-
border-bottom: 1px solid var(--color-fm-divider-secondary) ;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: var(--color-fm-secondary) ;
|
|
78
|
-
border-bottom: 1px solid var(--color-fm-divider-tertiary) ;
|
|
79
|
-
}
|
|
80
|
-
`}
|
|
81
|
-
</style>
|
|
82
|
-
|
|
83
|
-
<div className="bg-fm-surface-primary min-h-screen">
|
|
84
|
-
{/* Header */}
|
|
85
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
|
|
86
|
-
<div className="from-fm-secondary-500/10 to-fm-icon-positive/10 absolute inset-0 bg-linear-to-r via-transparent" />
|
|
87
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
88
|
-
<div className="!space-y-6 text-center">
|
|
89
|
-
<div className="border-fm-secondary-500/30 from-fm-secondary-500/20 to-fm-icon-positive/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
|
|
90
|
-
<ChevronUpIcon className="text-fm-secondary-600 h-12 w-12" />
|
|
91
|
-
</div>
|
|
92
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
-
ChevronUpIcon
|
|
94
|
-
</h1>
|
|
95
|
-
<p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
|
|
96
|
-
A versatile chevron up icon for upward navigation, collapse
|
|
97
|
-
controls, and ascending direction indicators. Built with
|
|
98
|
-
accessibility in mind using Radix UI's AccessibleIcon
|
|
99
|
-
wrapper.
|
|
100
|
-
</p>
|
|
101
|
-
|
|
102
|
-
{/* Stats */}
|
|
103
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
104
|
-
<div className="text-center">
|
|
105
|
-
<div className="text-fm-secondary-600 text-3xl font-bold">
|
|
106
|
-
Accessible
|
|
107
|
-
</div>
|
|
108
|
-
<div className="text-fm-tertiary text-sm">
|
|
109
|
-
Screen reader friendly
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
113
|
-
<div className="text-center">
|
|
114
|
-
<div className="text-fm-icon-positive text-3xl font-bold">
|
|
115
|
-
Scalable
|
|
116
|
-
</div>
|
|
117
|
-
<div className="text-fm-tertiary text-sm">
|
|
118
|
-
Any size needed
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
122
|
-
<div className="text-center">
|
|
123
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
124
|
-
Navigation
|
|
125
|
-
</div>
|
|
126
|
-
<div className="text-fm-tertiary text-sm">
|
|
127
|
-
Upward movement
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
{/* Content */}
|
|
136
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
137
|
-
{/* Quick Usage */}
|
|
138
|
-
<div className="!space-y-8">
|
|
139
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
140
|
-
Quick Start
|
|
141
|
-
</h2>
|
|
142
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
143
|
-
<div className="!space-y-4">
|
|
144
|
-
<h3 className="text-fm-secondary-600! text-xl font-semibold">
|
|
145
|
-
Basic Usage
|
|
146
|
-
</h3>
|
|
147
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
148
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
149
|
-
{`import { ChevronUpIcon } from "@icons/chevron-up-icon"
|
|
150
|
-
|
|
151
|
-
function ScrollToTop() {
|
|
36
|
+
<AuralIconDocsPage
|
|
37
|
+
accentToken="info"
|
|
38
|
+
features={[
|
|
39
|
+
{
|
|
40
|
+
title: "Directional",
|
|
41
|
+
description: "Rotates to all 4 directions",
|
|
42
|
+
},
|
|
43
|
+
{ title: "currentColor", description: "Responds to text tokens" },
|
|
44
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
45
|
+
]}
|
|
46
|
+
quickStart={{
|
|
47
|
+
codeExample: `import { ChevronUpIcon } from "src/ui/icons/chevron-up-icon"
|
|
48
|
+
|
|
49
|
+
function CollapseButton() {
|
|
152
50
|
return (
|
|
153
51
|
<button className="flex items-center gap-2">
|
|
154
|
-
|
|
155
|
-
<
|
|
52
|
+
Collapse
|
|
53
|
+
<ChevronUpIcon className="h-4 w-4 text-fm-icon-active" />
|
|
156
54
|
</button>
|
|
157
55
|
)
|
|
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
|
-
|
|
192
|
-
|
|
193
|
-
Prop
|
|
194
|
-
</th>
|
|
195
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
196
|
-
Type
|
|
197
|
-
</th>
|
|
198
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
199
|
-
Default
|
|
200
|
-
</th>
|
|
201
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
202
|
-
Description
|
|
203
|
-
</th>
|
|
204
|
-
</tr>
|
|
205
|
-
</thead>
|
|
206
|
-
<tbody>
|
|
207
|
-
{" "}
|
|
208
|
-
<tr className="bg-fm-surface-secondary!">
|
|
209
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
210
|
-
withAccessibility
|
|
211
|
-
</td>
|
|
212
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
213
|
-
boolean
|
|
214
|
-
</td>
|
|
215
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
216
|
-
true
|
|
217
|
-
</td>
|
|
218
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
219
|
-
Whether to wrap the icon with accessibility feature
|
|
220
|
-
</td>
|
|
221
|
-
</tr>
|
|
222
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
223
|
-
<td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
|
|
224
|
-
height
|
|
225
|
-
</td>
|
|
226
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
227
|
-
number | string
|
|
228
|
-
</td>
|
|
229
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
230
|
-
24
|
|
231
|
-
</td>
|
|
232
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
233
|
-
Height of the icon in pixels
|
|
234
|
-
</td>
|
|
235
|
-
</tr>
|
|
236
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
237
|
-
<td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
|
|
238
|
-
stroke
|
|
239
|
-
</td>
|
|
240
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
241
|
-
string
|
|
242
|
-
</td>
|
|
243
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
244
|
-
currentColor
|
|
245
|
-
</td>
|
|
246
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
247
|
-
Stroke color of the icon
|
|
248
|
-
</td>
|
|
249
|
-
</tr>
|
|
250
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
251
|
-
<td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
|
|
252
|
-
className
|
|
253
|
-
</td>
|
|
254
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
255
|
-
string
|
|
256
|
-
</td>
|
|
257
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
258
|
-
-
|
|
259
|
-
</td>
|
|
260
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
261
|
-
CSS classes for styling (use for overrides)
|
|
262
|
-
</td>
|
|
263
|
-
</tr>
|
|
264
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
265
|
-
<td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
|
|
266
|
-
strokeWidth
|
|
267
|
-
</td>
|
|
268
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
269
|
-
number | string
|
|
270
|
-
</td>
|
|
271
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
272
|
-
1.5
|
|
273
|
-
</td>
|
|
274
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
275
|
-
Stroke width of the chevron line
|
|
276
|
-
</td>
|
|
277
|
-
</tr>
|
|
278
|
-
<tr className="bg-fm-surface-secondary!">
|
|
279
|
-
<td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
|
|
280
|
-
...svgProps
|
|
281
|
-
</td>
|
|
282
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
283
|
-
SVGProps
|
|
284
|
-
</td>
|
|
285
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
286
|
-
-
|
|
287
|
-
</td>
|
|
288
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
289
|
-
All standard SVG element props
|
|
290
|
-
</td>
|
|
291
|
-
</tr>
|
|
292
|
-
</tbody>
|
|
293
|
-
</table>
|
|
294
|
-
</div>
|
|
295
|
-
</div>
|
|
296
|
-
|
|
297
|
-
{/* Size Variations */}
|
|
298
|
-
<div className="!space-y-8">
|
|
299
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
300
|
-
Size Variations
|
|
301
|
-
</h2>
|
|
302
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
|
|
303
|
-
<div className="!space-y-6">
|
|
304
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
305
|
-
<div className="!space-y-4">
|
|
306
|
-
<h3 className="text-fm-secondary-600! text-lg font-semibold">
|
|
307
|
-
Standard Sizes
|
|
308
|
-
</h3>
|
|
309
|
-
<div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
|
|
310
|
-
<div className="text-center">
|
|
311
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-3 w-3" />
|
|
312
|
-
<span className="text-fm-tertiary text-xs">
|
|
313
|
-
12px
|
|
314
|
-
</span>
|
|
315
|
-
</div>
|
|
316
|
-
<div className="text-center">
|
|
317
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-4 w-4" />
|
|
318
|
-
<span className="text-fm-tertiary text-xs">
|
|
319
|
-
16px
|
|
320
|
-
</span>
|
|
321
|
-
</div>
|
|
322
|
-
<div className="text-center">
|
|
323
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-5 w-5" />
|
|
324
|
-
<span className="text-fm-tertiary text-xs">
|
|
325
|
-
20px
|
|
326
|
-
</span>
|
|
327
|
-
</div>
|
|
328
|
-
<div className="text-center">
|
|
329
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-6 w-6" />
|
|
330
|
-
<span className="text-fm-tertiary text-xs">
|
|
331
|
-
24px
|
|
332
|
-
</span>
|
|
333
|
-
</div>
|
|
334
|
-
<div className="text-center">
|
|
335
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-8 w-8" />
|
|
336
|
-
<span className="text-fm-tertiary text-xs">
|
|
337
|
-
32px
|
|
338
|
-
</span>
|
|
339
|
-
</div>
|
|
340
|
-
<div className="text-center">
|
|
341
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-12 w-12" />
|
|
342
|
-
<span className="text-fm-tertiary text-xs">
|
|
343
|
-
48px
|
|
344
|
-
</span>
|
|
345
|
-
</div>
|
|
346
|
-
</div>
|
|
347
|
-
</div>
|
|
348
|
-
|
|
349
|
-
<div className="!space-y-4">
|
|
350
|
-
<h3 className="text-fm-secondary-600! text-lg font-semibold">
|
|
351
|
-
Code Example
|
|
352
|
-
</h3>
|
|
353
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
354
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
355
|
-
{`// Small (16px)
|
|
356
|
-
<ChevronUpIcon className="h-4 w-4 " />
|
|
357
|
-
|
|
358
|
-
// Medium (24px)
|
|
359
|
-
<ChevronUpIcon className="h-6 w-6 " />
|
|
360
|
-
|
|
361
|
-
// Large (32px)
|
|
362
|
-
<ChevronUpIcon className="h-8 w-8 " />
|
|
363
|
-
|
|
364
|
-
// Custom size
|
|
365
|
-
<ChevronUpIcon width={40} height={40} />`}
|
|
366
|
-
</pre>
|
|
367
|
-
</div>
|
|
368
|
-
</div>
|
|
369
|
-
</div>
|
|
370
|
-
</div>
|
|
371
|
-
</div>
|
|
372
|
-
</div>
|
|
373
|
-
|
|
374
|
-
{/* Color Variations */}
|
|
375
|
-
<div className="!space-y-8">
|
|
376
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
377
|
-
Color Variations
|
|
378
|
-
</h2>
|
|
379
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
380
|
-
<div className="!space-y-4">
|
|
381
|
-
<h3 className="text-fm-secondary-600! text-lg font-semibold">
|
|
382
|
-
Semantic Colors
|
|
383
|
-
</h3>
|
|
384
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
385
|
-
<div className="flex items-center gap-4">
|
|
386
|
-
<ChevronUpIcon className="text-fm-secondary-600 h-6 w-6" />
|
|
387
|
-
<div>
|
|
388
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
389
|
-
Primary
|
|
390
|
-
</div>
|
|
391
|
-
<div className="text-fm-tertiary text-xs">
|
|
392
|
-
text-fm-secondary-600
|
|
393
|
-
</div>
|
|
394
|
-
</div>
|
|
395
|
-
</div>
|
|
396
|
-
<div className="flex items-center gap-4">
|
|
397
|
-
<ChevronUpIcon className="text-fm-placeholder h-6 w-6" />
|
|
398
|
-
<div>
|
|
399
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
400
|
-
Secondary
|
|
401
|
-
</div>
|
|
402
|
-
<div className="text-fm-tertiary text-xs">
|
|
403
|
-
text-fm-placeholder
|
|
404
|
-
</div>
|
|
405
|
-
</div>
|
|
406
|
-
</div>
|
|
407
|
-
<div className="flex items-center gap-4">
|
|
408
|
-
<ChevronUpIcon className="text-fm-icon-positive h-6 w-6" />
|
|
409
|
-
<div>
|
|
410
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
411
|
-
Accent
|
|
412
|
-
</div>
|
|
413
|
-
<div className="text-fm-tertiary text-xs">
|
|
414
|
-
text-fm-icon-positive
|
|
415
|
-
</div>
|
|
416
|
-
</div>
|
|
417
|
-
</div>
|
|
418
|
-
<div className="flex items-center gap-4">
|
|
419
|
-
<ChevronUpIcon className="text-fm-placeholder h-6 w-6" />
|
|
420
|
-
<div>
|
|
421
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
422
|
-
Disabled
|
|
423
|
-
</div>
|
|
424
|
-
<div className="text-fm-tertiary text-xs">
|
|
425
|
-
text-fm-placeholder
|
|
426
|
-
</div>
|
|
427
|
-
</div>
|
|
428
|
-
</div>
|
|
429
|
-
</div>
|
|
430
|
-
</div>
|
|
431
|
-
|
|
432
|
-
<div className="!space-y-4">
|
|
433
|
-
<h3 className="text-fm-secondary-600! text-lg font-semibold">
|
|
434
|
-
Custom Colors
|
|
435
|
-
</h3>
|
|
436
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
437
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
438
|
-
{`// Using Tailwind classes with
|
|
439
|
-
<ChevronUpIcon className="h-6 w-6 text-purple-400 " />
|
|
440
|
-
<ChevronUpIcon className="h-6 w-6 text-green-500 " />
|
|
441
|
-
|
|
442
|
-
// Using CSS custom properties
|
|
443
|
-
<ChevronUpIcon
|
|
444
|
-
className="h-6 w-6 "
|
|
445
|
-
style={{ color: 'var(--color-primary)' }}
|
|
446
|
-
/>
|
|
447
|
-
|
|
448
|
-
// Direct stroke prop
|
|
449
|
-
<ChevronUpIcon
|
|
450
|
-
width={24}
|
|
451
|
-
height={24}
|
|
452
|
-
stroke="#9333ea"
|
|
453
|
-
/>`}
|
|
454
|
-
</pre>
|
|
455
|
-
</div>
|
|
456
|
-
</div>
|
|
457
|
-
</div>
|
|
458
|
-
</div>
|
|
459
|
-
|
|
460
|
-
{/* Usage Examples */}
|
|
461
|
-
<div className="!space-y-8">
|
|
462
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
463
|
-
Usage Examples
|
|
464
|
-
</h2>
|
|
465
|
-
|
|
466
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
467
|
-
{/* Scroll to Top */}
|
|
468
|
-
<div className="!space-y-4">
|
|
469
|
-
<h3 className="text-fm-secondary-600! text-lg font-semibold">
|
|
470
|
-
Scroll to Top Button
|
|
471
|
-
</h3>
|
|
472
|
-
<div className="!space-y-4">
|
|
473
|
-
<div className="flex items-center gap-4">
|
|
474
|
-
<button className="border-fm-secondary-500/30 bg-fm-secondary-500/10 text-fm-secondary-600 hover:bg-fm-secondary-500/20 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
475
|
-
<ChevronUpIcon className="h-4 w-4" />
|
|
476
|
-
Back to Top
|
|
477
|
-
</button>
|
|
478
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center justify-center rounded-full border p-3 transition-colors">
|
|
479
|
-
<ChevronUpIcon className="h-5 w-5" />
|
|
480
|
-
</button>
|
|
481
|
-
</div>
|
|
482
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
483
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
484
|
-
{`// Text button
|
|
485
|
-
<button className="flex items-center gap-2 bg-purple-500/10 border border-purple-500/30 px-4 py-2 rounded-lg">
|
|
486
|
-
<ChevronUpIcon className="h-4 w-4 " />
|
|
487
|
-
Back to Top
|
|
488
|
-
</button>
|
|
489
|
-
|
|
490
|
-
// Icon-only button
|
|
491
|
-
<button className="flex items-center justify-center bg-white/5 border border-white/20 p-3 rounded-full">
|
|
492
|
-
<ChevronUpIcon className="h-5 w-5 " />
|
|
493
|
-
</button>`}
|
|
494
|
-
</pre>
|
|
495
|
-
</div>
|
|
496
|
-
</div>
|
|
497
|
-
</div>
|
|
498
|
-
|
|
499
|
-
{/* Collapsible Content */}
|
|
500
|
-
<div className="!space-y-4">
|
|
501
|
-
<h3 className="text-fm-secondary-600! text-lg font-semibold">
|
|
502
|
-
Collapsible Content
|
|
503
|
-
</h3>
|
|
504
|
-
<div className="!space-y-4">
|
|
505
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
506
|
-
<button className="flex w-full items-center justify-between text-left">
|
|
507
|
-
<span className="text-fm-icon-active font-medium">
|
|
508
|
-
Advanced Settings
|
|
509
|
-
</span>
|
|
510
|
-
<ChevronUpIcon className="text-fm-tertiary h-4 w-4 transition-transform" />
|
|
511
|
-
</button>
|
|
512
|
-
<div className="text-fm-secondary mt-3 space-y-2 text-sm">
|
|
513
|
-
<div>Option 1: Enable advanced features</div>
|
|
514
|
-
<div>Option 2: Custom configuration</div>
|
|
515
|
-
<div>Option 3: Developer tools</div>
|
|
516
|
-
</div>
|
|
517
|
-
</div>
|
|
518
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
519
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
520
|
-
{`// Collapsible header
|
|
521
|
-
<button className="flex w-full items-center justify-between text-left">
|
|
522
|
-
<span className="font-medium text-white">Advanced Settings</span>
|
|
523
|
-
<ChevronUpIcon
|
|
524
|
-
className={cn(
|
|
525
|
-
"h-4 w-4 text-white/60 transition-transform ",
|
|
526
|
-
isExpanded && "rotate-180"
|
|
527
|
-
)}
|
|
528
|
-
/>
|
|
529
|
-
</button>
|
|
530
|
-
|
|
531
|
-
// Content area
|
|
532
|
-
<div className="mt-3 space-y-2 text-sm text-white/70">
|
|
533
|
-
<div>Option 1: Enable advanced features</div>
|
|
534
|
-
<div>Option 2: Custom configuration</div>
|
|
535
|
-
</div>`}
|
|
536
|
-
</pre>
|
|
537
|
-
</div>
|
|
538
|
-
</div>
|
|
539
|
-
</div>
|
|
540
|
-
|
|
541
|
-
{/* Sort Controls */}
|
|
542
|
-
<div className="!space-y-4">
|
|
543
|
-
<h3 className="text-fm-secondary-600! text-lg font-semibold">
|
|
544
|
-
Sort Controls
|
|
545
|
-
</h3>
|
|
546
|
-
<div className="!space-y-4">
|
|
547
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
548
|
-
<div className="space-y-2">
|
|
549
|
-
<button className="text-fm-icon-active hover:bg-fm-surface-secondary flex w-full items-center justify-between rounded px-3 py-2 text-left">
|
|
550
|
-
<span>Name</span>
|
|
551
|
-
<ChevronUpIcon className="text-fm-secondary-600 h-4 w-4" />
|
|
552
|
-
</button>
|
|
553
|
-
<button className="text-fm-icon-active hover:bg-fm-surface-secondary flex w-full items-center justify-between rounded px-3 py-2 text-left">
|
|
554
|
-
<span>Date</span>
|
|
555
|
-
<ChevronUpIcon className="text-fm-placeholder h-4 w-4" />
|
|
556
|
-
</button>
|
|
557
|
-
<button className="text-fm-icon-active hover:bg-fm-surface-secondary flex w-full items-center justify-between rounded px-3 py-2 text-left">
|
|
558
|
-
<span>Size</span>
|
|
559
|
-
<ChevronUpIcon className="text-fm-placeholder h-4 w-4" />
|
|
560
|
-
</button>
|
|
561
|
-
</div>
|
|
562
|
-
</div>
|
|
563
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
564
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
565
|
-
{`// Sort button with active state
|
|
566
|
-
<button className="flex w-full items-center justify-between rounded px-3 py-2 text-left hover:bg-white/10">
|
|
567
|
-
<span>Name</span>
|
|
568
|
-
<ChevronUpIcon
|
|
569
|
-
className={cn(
|
|
570
|
-
"h-4 w-4 ",
|
|
571
|
-
sortBy === 'name' ? 'text-purple-400' : 'text-white/40'
|
|
572
|
-
)}
|
|
573
|
-
/>
|
|
574
|
-
</button>
|
|
575
|
-
|
|
576
|
-
// Reverse sort indicator
|
|
577
|
-
<ChevronUpIcon
|
|
578
|
-
className={cn(
|
|
579
|
-
"h-4 w-4 ",
|
|
580
|
-
sortOrder === 'desc' && "rotate-180"
|
|
581
|
-
)}
|
|
582
|
-
/>`}
|
|
583
|
-
</pre>
|
|
584
|
-
</div>
|
|
585
|
-
</div>
|
|
586
|
-
</div>
|
|
587
|
-
|
|
588
|
-
{/* Accordion */}
|
|
589
|
-
<div className="!space-y-4">
|
|
590
|
-
<h3 className="text-fm-secondary-600! text-lg font-semibold">
|
|
591
|
-
Accordion Component
|
|
592
|
-
</h3>
|
|
593
|
-
<div className="!space-y-4">
|
|
594
|
-
<div className="w-full space-y-2">
|
|
595
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border">
|
|
596
|
-
<button className="flex w-full items-center justify-between p-4 text-left">
|
|
597
|
-
<span className="text-fm-icon-active font-medium">
|
|
598
|
-
What is your return policy?
|
|
599
|
-
</span>
|
|
600
|
-
<ChevronUpIcon className="text-fm-tertiary h-4 w-4" />
|
|
601
|
-
</button>
|
|
602
|
-
<div className="border-fm-divider-secondary text-fm-secondary border-t p-4 text-sm">
|
|
603
|
-
We offer a 30-day return policy for all items in
|
|
604
|
-
original condition.
|
|
605
|
-
</div>
|
|
606
|
-
</div>
|
|
607
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border">
|
|
608
|
-
<button className="flex w-full items-center justify-between p-4 text-left">
|
|
609
|
-
<span className="text-fm-icon-active font-medium">
|
|
610
|
-
How do I track my order?
|
|
611
|
-
</span>
|
|
612
|
-
<ChevronUpIcon className="text-fm-tertiary h-4 w-4 rotate-180" />
|
|
613
|
-
</button>
|
|
614
|
-
</div>
|
|
615
|
-
</div>
|
|
616
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
617
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
618
|
-
{`// Accordion item
|
|
619
|
-
<div className="rounded-lg border border-white/10 bg-white/5">
|
|
620
|
-
<button
|
|
621
|
-
className="flex w-full items-center justify-between p-4 text-left"
|
|
622
|
-
onClick={() => setExpanded(!expanded)}
|
|
623
|
-
>
|
|
624
|
-
<span className="font-medium text-white">
|
|
625
|
-
What is your return policy?
|
|
626
|
-
</span>
|
|
627
|
-
<ChevronUpIcon
|
|
628
|
-
className={cn(
|
|
629
|
-
"h-4 w-4 text-white/60 transition-transform ",
|
|
630
|
-
expanded && "rotate-180"
|
|
631
|
-
)}
|
|
632
|
-
/>
|
|
633
|
-
</button>
|
|
634
|
-
{expanded && (
|
|
635
|
-
<div className="border-t border-white/10 p-4 text-sm text-white/70">
|
|
636
|
-
We offer a 30-day return policy for all items in original condition.
|
|
637
|
-
</div>
|
|
638
|
-
)}
|
|
639
|
-
</div>`}
|
|
640
|
-
</pre>
|
|
641
|
-
</div>
|
|
642
|
-
</div>
|
|
643
|
-
</div>
|
|
644
|
-
</div>
|
|
645
|
-
</div>
|
|
646
|
-
|
|
647
|
-
{/* Accessibility */}
|
|
648
|
-
<div className="!space-y-8">
|
|
649
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
650
|
-
Accessibility Features
|
|
651
|
-
</h2>
|
|
652
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
653
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
654
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
655
|
-
✅ Built-in Features
|
|
656
|
-
</h3>
|
|
657
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
658
|
-
<li className="text-fm-secondary!">
|
|
659
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
660
|
-
</li>
|
|
661
|
-
<li className="text-fm-secondary!">
|
|
662
|
-
Provides screen reader label "Chevron Up icon"
|
|
663
|
-
</li>
|
|
664
|
-
<li className="text-fm-secondary!">
|
|
665
|
-
Supports keyboard navigation when interactive
|
|
666
|
-
</li>
|
|
667
|
-
<li className="text-fm-secondary!">
|
|
668
|
-
Maintains proper color contrast ratios
|
|
669
|
-
</li>
|
|
670
|
-
<li className="text-fm-secondary!">
|
|
671
|
-
Scales with user's font size preferences
|
|
672
|
-
</li>
|
|
673
|
-
</ul>
|
|
674
|
-
</div>
|
|
675
|
-
|
|
676
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
677
|
-
<h3 className="text-fm-secondary-600! text-lg font-semibold">
|
|
678
|
-
💡 Best Practices
|
|
679
|
-
</h3>
|
|
680
|
-
<ul className="text-fm-secondary !space-y-2 text-sm">
|
|
681
|
-
<li className="text-fm-secondary!">
|
|
682
|
-
Use descriptive aria-labels for navigation buttons
|
|
683
|
-
</li>
|
|
684
|
-
<li className="text-fm-secondary!">
|
|
685
|
-
Provide keyboard shortcuts for common actions
|
|
686
|
-
</li>
|
|
687
|
-
<li className="text-fm-secondary!">
|
|
688
|
-
Ensure sufficient touch target size (44px minimum)
|
|
689
|
-
</li>
|
|
690
|
-
<li className="text-fm-secondary!">
|
|
691
|
-
Add focus states for interactive elements
|
|
692
|
-
</li>
|
|
693
|
-
<li className="text-fm-secondary!">
|
|
694
|
-
Consider aria-expanded for collapsible content
|
|
695
|
-
</li>
|
|
696
|
-
</ul>
|
|
697
|
-
</div>
|
|
698
|
-
</div>
|
|
699
|
-
|
|
700
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
701
|
-
<h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
|
|
702
|
-
Proper ARIA Implementation
|
|
703
|
-
</h3>
|
|
704
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
705
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
706
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
707
|
-
{`// Scroll to top button with proper ARIA
|
|
708
|
-
<button
|
|
709
|
-
aria-label="Scroll to top of page"
|
|
710
|
-
className="flex items-center gap-2"
|
|
711
|
-
>
|
|
712
|
-
<ChevronUpIcon className="h-4 w-4 " />
|
|
713
|
-
Back to Top
|
|
714
|
-
</button>
|
|
715
|
-
|
|
716
|
-
// Collapsible section
|
|
717
|
-
<button
|
|
718
|
-
aria-label="Toggle advanced settings"
|
|
719
|
-
aria-expanded={isExpanded}
|
|
720
|
-
className="flex items-center justify-between"
|
|
721
|
-
>
|
|
722
|
-
Advanced Settings
|
|
723
|
-
<ChevronUpIcon
|
|
724
|
-
className={cn(
|
|
725
|
-
"h-4 w-4 transition-transform ",
|
|
726
|
-
isExpanded && "rotate-180"
|
|
727
|
-
)}
|
|
728
|
-
/>
|
|
729
|
-
</button>
|
|
730
|
-
|
|
731
|
-
// Sort control
|
|
732
|
-
<button
|
|
733
|
-
aria-label="Sort by name"
|
|
734
|
-
aria-pressed={sortBy === 'name'}
|
|
735
|
-
>
|
|
736
|
-
Name
|
|
737
|
-
<ChevronUpIcon className="h-4 w-4 " />
|
|
738
|
-
</button>`}
|
|
739
|
-
</pre>
|
|
740
|
-
</div>
|
|
741
|
-
<div className="!space-y-4">
|
|
742
|
-
<p className="text-fm-secondary! text-sm">
|
|
743
|
-
Always provide context-appropriate ARIA labels for
|
|
744
|
-
upward navigation and collapsible content. The chevron
|
|
745
|
-
direction should indicate the intended action or state.
|
|
746
|
-
</p>
|
|
747
|
-
<div className="border-fm-secondary-500/20 bg-fm-secondary-500/10 rounded-lg border p-4">
|
|
748
|
-
<div className="text-fm-secondary-600 flex items-center gap-2 text-sm">
|
|
749
|
-
<ChevronUpIcon className="h-4 w-4" />
|
|
750
|
-
<span>
|
|
751
|
-
Consider the user's mental model of "up" direction
|
|
752
|
-
</span>
|
|
753
|
-
</div>
|
|
754
|
-
</div>
|
|
755
|
-
</div>
|
|
756
|
-
</div>
|
|
757
|
-
</div>
|
|
758
|
-
</div>
|
|
759
|
-
|
|
760
|
-
{/* Related Icons */}
|
|
761
|
-
<div className="!space-y-8">
|
|
762
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
763
|
-
Related Icons
|
|
764
|
-
</h2>
|
|
765
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
766
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
767
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
768
|
-
<span className="text-fm-icon-active! !text-2xl">↓</span>
|
|
769
|
-
</div>
|
|
770
|
-
<div>
|
|
771
|
-
<div className="text-fm-icon-active font-medium">
|
|
772
|
-
ChevronDownIcon
|
|
773
|
-
</div>
|
|
774
|
-
<div className="text-fm-tertiary text-xs">
|
|
775
|
-
Downward direction
|
|
776
|
-
</div>
|
|
777
|
-
</div>
|
|
778
|
-
</div>
|
|
779
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
780
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
781
|
-
<span className="text-fm-icon-active! !text-2xl">→</span>
|
|
782
|
-
</div>
|
|
783
|
-
<div>
|
|
784
|
-
<div className="text-fm-icon-active font-medium">
|
|
785
|
-
ChevronRightIcon
|
|
786
|
-
</div>
|
|
787
|
-
<div className="text-fm-tertiary text-xs">
|
|
788
|
-
Right direction
|
|
789
|
-
</div>
|
|
790
|
-
</div>
|
|
791
|
-
</div>
|
|
792
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
793
|
-
<div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
794
|
-
<span className="text-fm-icon-active! !text-2xl">←</span>
|
|
795
|
-
</div>
|
|
796
|
-
<div>
|
|
797
|
-
<div className="text-fm-icon-active font-medium">
|
|
798
|
-
ChevronLeftIcon
|
|
799
|
-
</div>
|
|
800
|
-
<div className="text-fm-tertiary text-xs">
|
|
801
|
-
Left direction
|
|
802
|
-
</div>
|
|
803
|
-
</div>
|
|
804
|
-
</div>
|
|
805
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
806
|
-
<div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
807
|
-
<span className="text-fm-icon-active! !text-2xl">↑</span>
|
|
808
|
-
</div>
|
|
809
|
-
<div>
|
|
810
|
-
<div className="text-fm-icon-active font-medium">
|
|
811
|
-
ArrowUpIcon
|
|
812
|
-
</div>
|
|
813
|
-
<div className="text-fm-tertiary text-xs">
|
|
814
|
-
Arrow variant
|
|
815
|
-
</div>
|
|
816
|
-
</div>
|
|
817
|
-
</div>
|
|
818
|
-
</div>
|
|
819
|
-
</div>
|
|
820
|
-
</div>
|
|
821
|
-
|
|
822
|
-
{/* Footer */}
|
|
823
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
|
|
824
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
825
|
-
<div className="!space-y-4 text-center">
|
|
826
|
-
<p className="text-fm-tertiary!">
|
|
827
|
-
ChevronUpIcon is part of the Aural UI icon library, built
|
|
828
|
-
with accessibility and intuitive upward navigation in mind.
|
|
829
|
-
</p>
|
|
830
|
-
<p className="text-fm-placeholder! text-sm">
|
|
831
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
832
|
-
compatibility and follow WCAG guidelines.
|
|
833
|
-
</p>
|
|
834
|
-
</div>
|
|
835
|
-
</div>
|
|
836
|
-
</div>
|
|
837
|
-
</div>
|
|
838
|
-
</>
|
|
56
|
+
}`,
|
|
57
|
+
livePreview: (
|
|
58
|
+
<button className="text-fm-primary font-fm-text flex items-center gap-2 text-sm">
|
|
59
|
+
Collapse
|
|
60
|
+
<ChevronUpIcon className="text-fm-icon-active h-4 w-4" />
|
|
61
|
+
</button>
|
|
62
|
+
),
|
|
63
|
+
}}
|
|
64
|
+
relatedIcons={[
|
|
65
|
+
{
|
|
66
|
+
name: "ChevronDownIcon",
|
|
67
|
+
description: "Points downward",
|
|
68
|
+
icon: ChevronDownIcon,
|
|
69
|
+
accentToken: "info",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "ChevronLeftIcon",
|
|
73
|
+
description: "Points left",
|
|
74
|
+
icon: ChevronLeftIcon,
|
|
75
|
+
accentToken: "positive",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "ChevronRightIcon",
|
|
79
|
+
description: "Points right",
|
|
80
|
+
icon: ChevronRightIcon,
|
|
81
|
+
accentToken: "warning",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "AngleDownIcon",
|
|
85
|
+
description: "Softer angle chevron",
|
|
86
|
+
icon: AngleDownIcon,
|
|
87
|
+
accentToken: "negative",
|
|
88
|
+
},
|
|
89
|
+
]}
|
|
90
|
+
/>
|
|
839
91
|
),
|
|
840
92
|
},
|
|
841
93
|
},
|
|
842
94
|
tags: ["autodocs"],
|
|
843
95
|
argTypes: {
|
|
844
|
-
|
|
845
|
-
control:
|
|
846
|
-
description: "
|
|
96
|
+
className: {
|
|
97
|
+
control: "text",
|
|
98
|
+
description: "CSS classes including size and color token",
|
|
847
99
|
},
|
|
848
100
|
withAccessibility: {
|
|
849
101
|
control: "boolean",
|
|
850
|
-
description: "
|
|
851
|
-
},
|
|
852
|
-
height: {
|
|
853
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
854
|
-
description: "Height of the icon in pixels",
|
|
855
|
-
},
|
|
856
|
-
stroke: {
|
|
857
|
-
control: "color",
|
|
858
|
-
description: "Stroke color of the icon",
|
|
859
|
-
},
|
|
860
|
-
strokeWidth: {
|
|
861
|
-
control: { type: "range", min: 0.5, max: 3, step: 0.1 },
|
|
862
|
-
description: "Stroke width of the chevron line",
|
|
863
|
-
},
|
|
864
|
-
className: {
|
|
865
|
-
control: "text",
|
|
866
|
-
description: "CSS classes for styling (use for overrides)",
|
|
102
|
+
description: "Wrap with accessibility label",
|
|
867
103
|
},
|
|
868
104
|
},
|
|
869
105
|
}
|
|
@@ -871,210 +107,108 @@ function ScrollToTop() {
|
|
|
871
107
|
export default meta
|
|
872
108
|
type Story = StoryObj<typeof ChevronUpIcon>
|
|
873
109
|
|
|
874
|
-
// Story parameters for consistent dark theme
|
|
875
|
-
const storyParameters = {
|
|
876
|
-
backgrounds: {
|
|
877
|
-
default: "dark",
|
|
878
|
-
values: [
|
|
879
|
-
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
880
|
-
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
881
|
-
],
|
|
882
|
-
},
|
|
883
|
-
}
|
|
884
|
-
|
|
885
110
|
export const Default: Story = {
|
|
886
111
|
args: {
|
|
887
|
-
|
|
888
|
-
height: 24,
|
|
889
|
-
className: "text-fm-secondary-600 ",
|
|
112
|
+
className: "h-6 w-6 text-fm-icon-active",
|
|
890
113
|
withAccessibility: true,
|
|
891
114
|
},
|
|
892
|
-
parameters: storyParameters,
|
|
893
115
|
render: (args) => (
|
|
894
|
-
<
|
|
116
|
+
<IconDefaultCanvas>
|
|
895
117
|
<ChevronUpIcon {...args} />
|
|
896
|
-
</
|
|
118
|
+
</IconDefaultCanvas>
|
|
897
119
|
),
|
|
898
120
|
}
|
|
899
121
|
|
|
900
122
|
export const SizeVariations: Story = {
|
|
901
|
-
|
|
902
|
-
...storyParameters,
|
|
903
|
-
docs: {
|
|
904
|
-
description: {
|
|
905
|
-
story:
|
|
906
|
-
"ChevronUpIcon in different sizes, from small UI elements to large displays.",
|
|
907
|
-
},
|
|
908
|
-
},
|
|
909
|
-
},
|
|
910
|
-
render: () => (
|
|
911
|
-
<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">
|
|
912
|
-
<div className="text-center">
|
|
913
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-3 w-3" />
|
|
914
|
-
<span className="text-fm-tertiary text-xs">12px</span>
|
|
915
|
-
</div>
|
|
916
|
-
<div className="text-center">
|
|
917
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-4 w-4" />
|
|
918
|
-
<span className="text-fm-tertiary text-xs">16px</span>
|
|
919
|
-
</div>
|
|
920
|
-
<div className="text-center">
|
|
921
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-5 w-5" />
|
|
922
|
-
<span className="text-fm-tertiary text-xs">20px</span>
|
|
923
|
-
</div>
|
|
924
|
-
<div className="text-center">
|
|
925
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-6 w-6" />
|
|
926
|
-
<span className="text-fm-tertiary text-xs">24px</span>
|
|
927
|
-
</div>
|
|
928
|
-
<div className="text-center">
|
|
929
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-8 w-8" />
|
|
930
|
-
<span className="text-fm-tertiary text-xs">32px</span>
|
|
931
|
-
</div>
|
|
932
|
-
<div className="text-center">
|
|
933
|
-
<ChevronUpIcon className="text-fm-secondary-600 !mx-auto mb-2 h-12 w-12" />
|
|
934
|
-
<span className="text-fm-tertiary text-xs">48px</span>
|
|
935
|
-
</div>
|
|
936
|
-
</div>
|
|
937
|
-
),
|
|
123
|
+
render: () => <IconSizeVariations icon={ChevronUpIcon} />,
|
|
938
124
|
}
|
|
939
125
|
|
|
940
126
|
export const ColorVariations: Story = {
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
story:
|
|
946
|
-
"ChevronUpIcon in different semantic colors for various upward navigation contexts.",
|
|
947
|
-
},
|
|
948
|
-
},
|
|
949
|
-
},
|
|
127
|
+
render: () => <IconColorVariations icon={ChevronUpIcon} />,
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export const DirectionalVariations: Story = {
|
|
950
131
|
render: () => (
|
|
951
|
-
<
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
<ChevronUpIcon className="text-fm-placeholder h-8 w-8" />
|
|
964
|
-
</div>
|
|
965
|
-
<div className="text-fm-icon-active text-sm font-medium">Secondary</div>
|
|
966
|
-
<div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
|
|
967
|
-
</div>
|
|
968
|
-
<div className="text-center">
|
|
969
|
-
<div className="border-fm-icon-positive/30 bg-fm-icon-positive/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
970
|
-
<ChevronUpIcon className="text-fm-icon-positive h-8 w-8" />
|
|
971
|
-
</div>
|
|
972
|
-
<div className="text-fm-icon-active text-sm font-medium">Accent</div>
|
|
973
|
-
<div className="text-fm-icon-positive text-xs">
|
|
974
|
-
text-fm-icon-positive
|
|
975
|
-
</div>
|
|
976
|
-
</div>
|
|
977
|
-
<div className="text-center">
|
|
978
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
979
|
-
<ChevronUpIcon className="text-fm-placeholder h-8 w-8" />
|
|
980
|
-
</div>
|
|
981
|
-
<div className="text-fm-icon-active text-sm font-medium">Disabled</div>
|
|
982
|
-
<div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
|
|
983
|
-
</div>
|
|
984
|
-
</div>
|
|
132
|
+
<IconDirectionalVariations
|
|
133
|
+
icon={ChevronUpIcon}
|
|
134
|
+
directions={[
|
|
135
|
+
{ label: "Up", className: "h-8 w-8 text-fm-icon-active" },
|
|
136
|
+
{
|
|
137
|
+
label: "Right",
|
|
138
|
+
className: "h-8 w-8 text-fm-icon-active rotate-90",
|
|
139
|
+
},
|
|
140
|
+
{ label: "Down", className: "h-8 w-8 text-fm-icon-active rotate-180" },
|
|
141
|
+
{ label: "Left", className: "h-8 w-8 text-fm-icon-active -rotate-90" },
|
|
142
|
+
]}
|
|
143
|
+
/>
|
|
985
144
|
),
|
|
986
145
|
}
|
|
987
146
|
|
|
988
147
|
export const UsageExamples: Story = {
|
|
989
|
-
parameters: {
|
|
990
|
-
...storyParameters,
|
|
991
|
-
docs: {
|
|
992
|
-
description: {
|
|
993
|
-
story:
|
|
994
|
-
"Real-world usage examples showing ChevronUpIcon in different upward navigation contexts.",
|
|
995
|
-
},
|
|
996
|
-
},
|
|
997
|
-
},
|
|
998
148
|
render: () => (
|
|
999
|
-
<
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
<div className="flex items-center gap-4">
|
|
1006
|
-
<button className="border-fm-secondary-500/30 bg-fm-secondary-500/10 text-fm-secondary-600 hover:bg-fm-secondary-500/20 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
|
|
1007
|
-
<ChevronUpIcon className="h-4 w-4" />
|
|
1008
|
-
Back to Top
|
|
1009
|
-
</button>
|
|
1010
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center justify-center rounded-full border p-3 transition-colors">
|
|
1011
|
-
<ChevronUpIcon className="h-5 w-5" />
|
|
1012
|
-
</button>
|
|
1013
|
-
</div>
|
|
1014
|
-
</div>
|
|
1015
|
-
|
|
1016
|
-
{/* Collapsible */}
|
|
1017
|
-
<div className="!space-y-2">
|
|
1018
|
-
<h3 className="text-fm-icon-active text-sm font-medium">
|
|
1019
|
-
Collapsible Content
|
|
1020
|
-
</h3>
|
|
1021
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
1022
|
-
<button className="flex w-full items-center justify-between text-left">
|
|
1023
|
-
<span className="text-fm-icon-active font-medium">
|
|
1024
|
-
Advanced Settings
|
|
149
|
+
<IconUsageCanvas>
|
|
150
|
+
<IconUsageSection title="Collapse Panel">
|
|
151
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border">
|
|
152
|
+
<div className="border-fm-divider-secondary flex items-center justify-between border-b px-4 py-3">
|
|
153
|
+
<span className="text-fm-primary font-fm-text text-sm font-medium">
|
|
154
|
+
Filters
|
|
1025
155
|
</span>
|
|
1026
|
-
<
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
<div>Option 1: Enable advanced features</div>
|
|
1030
|
-
<div>Option 2: Custom configuration</div>
|
|
156
|
+
<button aria-label="Collapse filters">
|
|
157
|
+
<ChevronUpIcon className="text-fm-icon-active h-4 w-4" />
|
|
158
|
+
</button>
|
|
1031
159
|
</div>
|
|
160
|
+
<div className="p-4">
|
|
161
|
+
<span className="text-fm-secondary font-fm-text text-sm">
|
|
162
|
+
Filter content visible here
|
|
163
|
+
</span>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
</IconUsageSection>
|
|
167
|
+
|
|
168
|
+
<IconUsageSection title="Scroll to Top">
|
|
169
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-between rounded-xl border p-4">
|
|
170
|
+
<span className="text-fm-secondary font-fm-text text-sm">
|
|
171
|
+
Long list content...
|
|
172
|
+
</span>
|
|
173
|
+
<button
|
|
174
|
+
className="border-fm-divider-secondary flex h-8 w-8 items-center justify-center rounded-full border"
|
|
175
|
+
aria-label="Scroll to top"
|
|
176
|
+
>
|
|
177
|
+
<ChevronUpIcon className="text-fm-icon-active h-4 w-4" />
|
|
178
|
+
</button>
|
|
1032
179
|
</div>
|
|
1033
|
-
</
|
|
180
|
+
</IconUsageSection>
|
|
1034
181
|
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
<button className="text-fm-icon-active hover:bg-fm-surface-secondary flex w-full items-center justify-between rounded px-3 py-2 text-left">
|
|
1043
|
-
<span>Name</span>
|
|
1044
|
-
<ChevronUpIcon className="text-fm-secondary-600 h-4 w-4" />
|
|
1045
|
-
</button>
|
|
1046
|
-
<button className="text-fm-icon-active hover:bg-fm-surface-secondary flex w-full items-center justify-between rounded px-3 py-2 text-left">
|
|
1047
|
-
<span>Date</span>
|
|
1048
|
-
<ChevronUpIcon className="text-fm-placeholder h-4 w-4" />
|
|
1049
|
-
</button>
|
|
182
|
+
<IconUsageSection title="Sort Toggle">
|
|
183
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm overflow-hidden rounded-xl border">
|
|
184
|
+
<div className="border-fm-divider-secondary flex items-center justify-between border-b px-4 py-2">
|
|
185
|
+
<span className="text-fm-secondary font-fm-text text-xs font-medium uppercase">
|
|
186
|
+
Rating
|
|
187
|
+
</span>
|
|
188
|
+
<ChevronUpIcon className="text-fm-icon-info h-3 w-3" />
|
|
1050
189
|
</div>
|
|
190
|
+
{["5 stars", "4 stars", "3 stars"].map((r) => (
|
|
191
|
+
<div
|
|
192
|
+
key={r}
|
|
193
|
+
className="border-fm-divider-secondary border-b px-4 py-2.5 last:border-b-0"
|
|
194
|
+
>
|
|
195
|
+
<span className="text-fm-primary font-fm-text text-sm">{r}</span>
|
|
196
|
+
</div>
|
|
197
|
+
))}
|
|
1051
198
|
</div>
|
|
1052
|
-
</
|
|
1053
|
-
</
|
|
199
|
+
</IconUsageSection>
|
|
200
|
+
</IconUsageCanvas>
|
|
1054
201
|
),
|
|
1055
202
|
}
|
|
1056
203
|
|
|
1057
204
|
export const Playground: Story = {
|
|
1058
|
-
parameters: {
|
|
1059
|
-
...storyParameters,
|
|
1060
|
-
docs: {
|
|
1061
|
-
description: {
|
|
1062
|
-
story:
|
|
1063
|
-
"Interactive playground to experiment with different ChevronUpIcon configurations.",
|
|
1064
|
-
},
|
|
1065
|
-
},
|
|
1066
|
-
},
|
|
1067
205
|
args: {
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
className: "text-fm-secondary-600 ",
|
|
1071
|
-
strokeWidth: 1.5,
|
|
206
|
+
className: "h-8 w-8 text-fm-icon-active",
|
|
207
|
+
withAccessibility: true,
|
|
1072
208
|
},
|
|
1073
209
|
render: (args) => (
|
|
1074
|
-
<
|
|
1075
|
-
<
|
|
1076
|
-
|
|
1077
|
-
</div>
|
|
1078
|
-
</div>
|
|
210
|
+
<IconPlaygroundCanvas>
|
|
211
|
+
<ChevronUpIcon {...args} />
|
|
212
|
+
</IconPlaygroundCanvas>
|
|
1079
213
|
),
|
|
1080
214
|
}
|