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