aural-ui 4.0.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
- package/dist/components/avatar/Avatar.stories.tsx +219 -235
- package/dist/components/badge/Badge.stories.tsx +379 -116
- package/dist/components/banner/Banner.stories.tsx +445 -391
- package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
- package/dist/components/button/Button.stories.tsx +585 -230
- package/dist/components/card/Card.stories.tsx +619 -301
- package/dist/components/char-count/CharCount.stories.tsx +350 -248
- package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
- package/dist/components/chip/Chip.stories.tsx +362 -168
- package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -636
- package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
- package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
- package/dist/components/command/Command.stories.tsx +530 -867
- package/dist/components/dialog/Dialog.stories.tsx +501 -950
- package/dist/components/divider/Divider.stories.tsx +264 -527
- package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
- package/dist/components/drawer/Drawer.stories.tsx +659 -1023
- package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
- package/dist/components/form/Form.stories.tsx +560 -274
- package/dist/components/helper-text/HelperText.stories.tsx +199 -200
- package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
- package/dist/components/icon-button/IconButton.stories.tsx +837 -194
- package/dist/components/if-else/if-else.stories.tsx +370 -83
- package/dist/components/input/Input.stories.tsx +436 -368
- package/dist/components/label/Label.stories.tsx +156 -154
- package/dist/components/list/List.stories.tsx +484 -835
- package/dist/components/marquee/Marquee.stories.tsx +356 -712
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
- package/dist/components/overlay/Overlay.stories.tsx +452 -824
- package/dist/components/pagination/Pagination.stories.tsx +721 -210
- package/dist/components/popover/Popover.stories.tsx +481 -896
- package/dist/components/radio/Radio.stories.tsx +432 -124
- package/dist/components/resizable/Resizable.stories.tsx +495 -799
- package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
- package/dist/components/search/Search.stories.tsx +312 -595
- package/dist/components/select/Select.stories.tsx +684 -789
- package/dist/components/sheet/Sheet.stories.tsx +671 -950
- package/dist/components/skelton/Skelton.stories.tsx +230 -764
- package/dist/components/slider/Slider.stories.tsx +383 -760
- package/dist/components/stepper/Stepper.stories.tsx +371 -514
- package/dist/components/switch/Switch.stories.tsx +461 -208
- package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
- package/dist/components/table/Table.stories.tsx +770 -916
- package/dist/components/tabs/Tabs.stories.tsx +458 -1455
- package/dist/components/tag/Tag.stories.tsx +714 -542
- package/dist/components/textarea/TextArea.stories.tsx +621 -562
- package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
- package/dist/components/toast/Toast.stories.tsx +452 -1339
- package/dist/components/toggle/Toggle.stories.tsx +488 -931
- package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
- package/dist/components/typography/Typography.stories.tsx +406 -89
- package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
- package/dist/icons/Icons.stories.tsx +0 -12
- package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
- package/dist/icons/all-icons.tsx +37 -16
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
- package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
- package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
- package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
- package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
- package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
- package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
- package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
- package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
- package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
- package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
- package/dist/index.cjs +90 -90
- package/dist/index.js +90 -90
- package/package.json +8 -3
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
3
|
|
|
4
|
+
import { GripVerticalIcon } from "src/ui/icons/grip-vertical-icon"
|
|
5
|
+
import { MoveHorizontalIcon } from "src/ui/icons/move-horizontal-icon"
|
|
6
|
+
import { ScrollDownIcon } from "src/ui/icons/scroll-down-icon"
|
|
7
|
+
import { VerticalMenuIcon } from "src/ui/icons/vertical-menu-icon"
|
|
8
|
+
import {
|
|
9
|
+
IconColorVariations,
|
|
10
|
+
IconDefaultCanvas,
|
|
11
|
+
IconPlaygroundCanvas,
|
|
12
|
+
IconSizeVariations,
|
|
13
|
+
IconUsageCanvas,
|
|
14
|
+
IconUsageSection,
|
|
15
|
+
} from "src/ui/story-spec/icons/icon-story-canvas"
|
|
16
|
+
import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
|
|
17
|
+
|
|
4
18
|
import { MoveVerticalIcon } from "."
|
|
5
19
|
|
|
6
20
|
const meta: Meta<typeof MoveVerticalIcon> = {
|
|
@@ -18,957 +32,68 @@ const meta: Meta<typeof MoveVerticalIcon> = {
|
|
|
18
32
|
},
|
|
19
33
|
docs: {
|
|
20
34
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
padding: 0 ;
|
|
33
|
-
margin: 0 ;
|
|
34
|
-
background: transparent ;
|
|
35
|
-
}
|
|
36
|
-
.docs-story {
|
|
37
|
-
background: transparent ;
|
|
38
|
-
}
|
|
39
|
-
.sbdocs {
|
|
40
|
-
background: transparent ;
|
|
41
|
-
}
|
|
42
|
-
body {
|
|
43
|
-
background: var(--color-fm-surface-primary) ;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: var(--color-fm-surface-primary) ;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent ;
|
|
50
|
-
border: none ;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: var(--color-fm-icon-active) ;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: var(--color-fm-secondary) ;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: var(--color-fm-surface-secondary) ;
|
|
60
|
-
color: var(--color-fm-secondary-500) ;
|
|
61
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: var(--color-fm-surface-secondary) ;
|
|
65
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: var(--color-fm-surface-secondary) ;
|
|
69
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: var(--color-fm-surface-secondary) ;
|
|
73
|
-
color: var(--color-fm-icon-active) ;
|
|
74
|
-
border-bottom: 1px solid var(--color-fm-divider-secondary) ;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: var(--color-fm-secondary) ;
|
|
78
|
-
border-bottom: 1px solid var(--color-fm-divider-tertiary) ;
|
|
79
|
-
}
|
|
80
|
-
@keyframes slide-up-down {
|
|
81
|
-
0%, 100% { transform: translateY(0); }
|
|
82
|
-
25% { transform: translateY(-4px); }
|
|
83
|
-
75% { transform: translateY(4px); }
|
|
84
|
-
}
|
|
85
|
-
.animate-slide-vertical {
|
|
86
|
-
animation: slide-up-down 2s ease-in-out infinite;
|
|
87
|
-
}
|
|
88
|
-
@keyframes pulse-bounce {
|
|
89
|
-
0%, 100% { transform: scale(1) translateY(0); }
|
|
90
|
-
50% { transform: scale(1.05) translateY(-2px); }
|
|
91
|
-
}
|
|
92
|
-
.animate-pulse-bounce {
|
|
93
|
-
animation: pulse-bounce 2s ease-in-out infinite;
|
|
94
|
-
}
|
|
95
|
-
`}
|
|
96
|
-
</style>
|
|
97
|
-
|
|
98
|
-
<div className="from-fm-surface-primary via-fm-icon-info/5 to-fm-surface-primary min-h-screen bg-linear-to-br">
|
|
99
|
-
{/* Header */}
|
|
100
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
|
|
101
|
-
<div className="from-fm-icon-info/10 to-fm-secondary-500/10 absolute inset-0 bg-linear-to-r via-transparent" />
|
|
102
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
103
|
-
<div className="!space-y-6 text-center">
|
|
104
|
-
<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">
|
|
105
|
-
<MoveVerticalIcon className="text-fm-icon-info h-12 w-12" />
|
|
106
|
-
</div>
|
|
107
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
108
|
-
MoveVerticalIcon
|
|
109
|
-
</h1>
|
|
110
|
-
<p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
|
|
111
|
-
A vertical movement icon featuring up and down arrows,
|
|
112
|
-
perfect for indicating vertical drag operations, sortable
|
|
113
|
-
lists, up/down navigation, and reordering controls. Built
|
|
114
|
-
with accessibility in mind using Radix UI's AccessibleIcon
|
|
115
|
-
wrapper.
|
|
116
|
-
</p>
|
|
117
|
-
|
|
118
|
-
{/* Stats */}
|
|
119
|
-
<div className="flex items-center justify-center gap-8 pt-8">
|
|
120
|
-
<div className="text-center">
|
|
121
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
122
|
-
Sort
|
|
123
|
-
</div>
|
|
124
|
-
<div className="text-fm-tertiary text-sm">
|
|
125
|
-
List ordering
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
129
|
-
<div className="text-center">
|
|
130
|
-
<div className="text-fm-secondary-600 text-3xl font-bold">
|
|
131
|
-
Navigate
|
|
132
|
-
</div>
|
|
133
|
-
<div className="text-fm-tertiary text-sm">
|
|
134
|
-
Up/down movement
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
138
|
-
<div className="text-center">
|
|
139
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
140
|
-
Reorder
|
|
141
|
-
</div>
|
|
142
|
-
<div className="text-fm-tertiary text-sm">
|
|
143
|
-
Interactive handles
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
|
|
151
|
-
{/* Content */}
|
|
152
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
153
|
-
{/* Quick Usage */}
|
|
154
|
-
<div className="!space-y-8">
|
|
155
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
156
|
-
Quick Start
|
|
157
|
-
</h2>
|
|
158
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
159
|
-
<div className="!space-y-4">
|
|
160
|
-
<h3 className="text-fm-icon-info! text-xl font-semibold">
|
|
161
|
-
Basic Usage
|
|
162
|
-
</h3>
|
|
163
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
164
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
165
|
-
{`import { MoveVerticalIcon } from "@icons/move-vertical-icon"
|
|
166
|
-
|
|
167
|
-
function SortableItem({ children }) {
|
|
35
|
+
<AuralIconDocsPage
|
|
36
|
+
accentToken="info"
|
|
37
|
+
features={[
|
|
38
|
+
{ title: "Move", description: "Vertical drag or reorder" },
|
|
39
|
+
{ title: "Resize Handle", description: "Row height adjustment" },
|
|
40
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
41
|
+
]}
|
|
42
|
+
quickStart={{
|
|
43
|
+
codeExample: `import { MoveVerticalIcon } from "src/ui/icons/move-vertical-icon"
|
|
44
|
+
|
|
45
|
+
function RowResizeHandle() {
|
|
168
46
|
return (
|
|
169
|
-
<div className="flex items-center
|
|
170
|
-
<MoveVerticalIcon className="h-4 w-4 text-
|
|
171
|
-
<span>{children}</span>
|
|
47
|
+
<div className="cursor-row-resize flex items-center">
|
|
48
|
+
<MoveVerticalIcon className="h-4 w-4 text-fm-icon-inactive" />
|
|
172
49
|
</div>
|
|
173
50
|
)
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
<div className="!space-y-4">
|
|
180
|
-
<h3 className="text-fm-icon-info! text-xl font-semibold">
|
|
181
|
-
Live Preview
|
|
182
|
-
</h3>
|
|
183
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center justify-center rounded-lg border p-6">
|
|
184
|
-
<div className="!space-y-2">
|
|
185
|
-
{["First Item", "Second Item", "Third Item"].map(
|
|
186
|
-
(item, index) => (
|
|
187
|
-
<div
|
|
188
|
-
key={index}
|
|
189
|
-
className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded border p-2"
|
|
190
|
-
>
|
|
191
|
-
<MoveVerticalIcon className="text-fm-icon-info hover:text-fm-icon-info h-4 w-4 cursor-move" />
|
|
192
|
-
<span className="text-fm-icon-active/80 text-sm">
|
|
193
|
-
{item}
|
|
194
|
-
</span>
|
|
195
|
-
</div>
|
|
196
|
-
)
|
|
197
|
-
)}
|
|
198
|
-
</div>
|
|
199
|
-
</div>
|
|
200
|
-
</div>
|
|
201
|
-
</div>
|
|
202
|
-
</div>
|
|
203
|
-
|
|
204
|
-
{/* Props Documentation */}
|
|
205
|
-
<div className="!space-y-8">
|
|
206
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
207
|
-
Props & Configuration
|
|
208
|
-
</h2>
|
|
209
|
-
|
|
210
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
|
|
211
|
-
<div className="bg-fm-surface-secondary p-4">
|
|
212
|
-
<h3 className="text-fm-icon-active! text-xl font-semibold">
|
|
213
|
-
Props
|
|
214
|
-
</h3>
|
|
215
|
-
</div>
|
|
216
|
-
<table className="!my-0 w-full">
|
|
217
|
-
<thead className="bg-fm-surface-secondary">
|
|
218
|
-
<tr className="border-fm-divider-secondary border-b">
|
|
219
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
220
|
-
Prop
|
|
221
|
-
</th>
|
|
222
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
223
|
-
Type
|
|
224
|
-
</th>
|
|
225
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
226
|
-
Default
|
|
227
|
-
</th>
|
|
228
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
229
|
-
Description
|
|
230
|
-
</th>
|
|
231
|
-
</tr>
|
|
232
|
-
</thead>
|
|
233
|
-
<tbody>
|
|
234
|
-
{" "}
|
|
235
|
-
<tr className="bg-fm-surface-secondary!">
|
|
236
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
237
|
-
withAccessibility
|
|
238
|
-
</td>
|
|
239
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
240
|
-
boolean
|
|
241
|
-
</td>
|
|
242
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
243
|
-
true
|
|
244
|
-
</td>
|
|
245
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
246
|
-
Whether to wrap the icon with accessibility feature
|
|
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
|
-
height
|
|
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
|
-
24
|
|
258
|
-
</td>
|
|
259
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
260
|
-
Height of the icon in pixels
|
|
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
|
-
stroke
|
|
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
|
-
currentColor
|
|
272
|
-
</td>
|
|
273
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
274
|
-
Stroke color of the icon lines
|
|
275
|
-
</td>
|
|
276
|
-
</tr>
|
|
277
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
278
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
279
|
-
strokeWidth
|
|
280
|
-
</td>
|
|
281
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
282
|
-
string | number
|
|
283
|
-
</td>
|
|
284
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
285
|
-
2
|
|
286
|
-
</td>
|
|
287
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
288
|
-
Width of the stroke lines
|
|
289
|
-
</td>
|
|
290
|
-
</tr>
|
|
291
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
292
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
293
|
-
className
|
|
294
|
-
</td>
|
|
295
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
296
|
-
string
|
|
297
|
-
</td>
|
|
298
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
299
|
-
-
|
|
300
|
-
</td>
|
|
301
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
302
|
-
CSS classes for styling (use for overrides)
|
|
303
|
-
</td>
|
|
304
|
-
</tr>
|
|
305
|
-
<tr className="bg-fm-surface-secondary!">
|
|
306
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
307
|
-
...svgProps
|
|
308
|
-
</td>
|
|
309
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
310
|
-
SVGProps
|
|
311
|
-
</td>
|
|
312
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
313
|
-
-
|
|
314
|
-
</td>
|
|
315
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
316
|
-
All standard SVG element props
|
|
317
|
-
</td>
|
|
318
|
-
</tr>
|
|
319
|
-
</tbody>
|
|
320
|
-
</table>
|
|
321
|
-
</div>
|
|
322
|
-
</div>
|
|
323
|
-
|
|
324
|
-
{/* Size Variations */}
|
|
325
|
-
<div className="!space-y-8">
|
|
326
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
327
|
-
Size Variations
|
|
328
|
-
</h2>
|
|
329
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
|
|
330
|
-
<div className="!space-y-6">
|
|
331
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
332
|
-
<div className="!space-y-4">
|
|
333
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
334
|
-
Standard Sizes
|
|
335
|
-
</h3>
|
|
336
|
-
<div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
|
|
337
|
-
<div className="text-center">
|
|
338
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
|
|
339
|
-
<span className="text-fm-tertiary text-xs">
|
|
340
|
-
12px
|
|
341
|
-
</span>
|
|
342
|
-
</div>
|
|
343
|
-
<div className="text-center">
|
|
344
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
|
|
345
|
-
<span className="text-fm-tertiary text-xs">
|
|
346
|
-
16px
|
|
347
|
-
</span>
|
|
348
|
-
</div>
|
|
349
|
-
<div className="text-center">
|
|
350
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
|
|
351
|
-
<span className="text-fm-tertiary text-xs">
|
|
352
|
-
20px
|
|
353
|
-
</span>
|
|
354
|
-
</div>
|
|
355
|
-
<div className="text-center">
|
|
356
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
|
|
357
|
-
<span className="text-fm-tertiary text-xs">
|
|
358
|
-
24px
|
|
359
|
-
</span>
|
|
360
|
-
</div>
|
|
361
|
-
<div className="text-center">
|
|
362
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
|
|
363
|
-
<span className="text-fm-tertiary text-xs">
|
|
364
|
-
32px
|
|
365
|
-
</span>
|
|
366
|
-
</div>
|
|
367
|
-
<div className="text-center">
|
|
368
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
|
|
369
|
-
<span className="text-fm-tertiary text-xs">
|
|
370
|
-
48px
|
|
371
|
-
</span>
|
|
372
|
-
</div>
|
|
373
|
-
</div>
|
|
374
|
-
</div>
|
|
375
|
-
|
|
376
|
-
<div className="!space-y-4">
|
|
377
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
378
|
-
Code Example
|
|
379
|
-
</h3>
|
|
380
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
381
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
382
|
-
{`// Small (16px)
|
|
383
|
-
<MoveVerticalIcon className="h-4 w-4 " />
|
|
384
|
-
|
|
385
|
-
// Medium (24px)
|
|
386
|
-
<MoveVerticalIcon className="h-6 w-6 " />
|
|
387
|
-
|
|
388
|
-
// Large (32px)
|
|
389
|
-
<MoveVerticalIcon className="h-8 w-8 " />
|
|
390
|
-
|
|
391
|
-
// Custom size with props
|
|
392
|
-
<MoveVerticalIcon width={40} height={40} />`}
|
|
393
|
-
</pre>
|
|
394
|
-
</div>
|
|
395
|
-
</div>
|
|
396
|
-
</div>
|
|
397
|
-
</div>
|
|
398
|
-
</div>
|
|
399
|
-
</div>
|
|
400
|
-
|
|
401
|
-
{/* Color Variations */}
|
|
402
|
-
<div className="!space-y-8">
|
|
403
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
404
|
-
Color Variations
|
|
405
|
-
</h2>
|
|
406
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
407
|
-
<div className="!space-y-4">
|
|
408
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
409
|
-
Semantic Colors
|
|
410
|
-
</h3>
|
|
411
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
412
|
-
<div className="flex items-center gap-4">
|
|
413
|
-
<MoveVerticalIcon className="text-fm-icon-info h-6 w-6" />
|
|
414
|
-
<div>
|
|
415
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
416
|
-
Primary
|
|
417
|
-
</div>
|
|
418
|
-
<div className="text-fm-tertiary text-xs">
|
|
419
|
-
text-fm-icon-info
|
|
420
|
-
</div>
|
|
421
|
-
</div>
|
|
422
|
-
</div>
|
|
423
|
-
<div className="flex items-center gap-4">
|
|
424
|
-
<MoveVerticalIcon className="text-fm-secondary-600 h-6 w-6" />
|
|
425
|
-
<div>
|
|
426
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
427
|
-
Interactive
|
|
428
|
-
</div>
|
|
429
|
-
<div className="text-fm-tertiary text-xs">
|
|
430
|
-
text-fm-secondary-600
|
|
431
|
-
</div>
|
|
432
|
-
</div>
|
|
433
|
-
</div>
|
|
434
|
-
<div className="flex items-center gap-4">
|
|
435
|
-
<MoveVerticalIcon className="text-fm-placeholder h-6 w-6" />
|
|
436
|
-
<div>
|
|
437
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
438
|
-
Disabled
|
|
439
|
-
</div>
|
|
440
|
-
<div className="text-fm-tertiary text-xs">
|
|
441
|
-
text-fm-placeholder
|
|
442
|
-
</div>
|
|
443
|
-
</div>
|
|
444
|
-
</div>
|
|
445
|
-
<div className="flex items-center gap-4">
|
|
446
|
-
<MoveVerticalIcon className="text-fm-icon-info h-6 w-6" />
|
|
447
|
-
<div>
|
|
448
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
449
|
-
Accent
|
|
450
|
-
</div>
|
|
451
|
-
<div className="text-fm-tertiary text-xs">
|
|
452
|
-
text-fm-icon-info
|
|
453
|
-
</div>
|
|
454
|
-
</div>
|
|
455
|
-
</div>
|
|
456
|
-
</div>
|
|
457
|
-
</div>
|
|
458
|
-
|
|
459
|
-
<div className="!space-y-4">
|
|
460
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
461
|
-
Custom Colors
|
|
462
|
-
</h3>
|
|
463
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
464
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
465
|
-
{`// Using Tailwind classes with
|
|
466
|
-
<MoveVerticalIcon className="h-6 w-6 text-blue-400 " />
|
|
467
|
-
<MoveVerticalIcon className="h-6 w-6 text-purple-500 " />
|
|
468
|
-
|
|
469
|
-
// Using CSS custom properties
|
|
470
|
-
<MoveVerticalIcon
|
|
471
|
-
className="h-6 w-6 "
|
|
472
|
-
style={{ color: 'var(--color-primary)' }}
|
|
473
|
-
/>
|
|
474
|
-
|
|
475
|
-
// Direct stroke prop
|
|
476
|
-
<MoveVerticalIcon
|
|
477
|
-
width={24}
|
|
478
|
-
height={24}
|
|
479
|
-
stroke="#3b82f6"
|
|
480
|
-
/>`}
|
|
481
|
-
</pre>
|
|
482
|
-
</div>
|
|
483
|
-
</div>
|
|
484
|
-
</div>
|
|
485
|
-
</div>
|
|
486
|
-
|
|
487
|
-
{/* Usage Examples */}
|
|
488
|
-
<div className="!space-y-8">
|
|
489
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
490
|
-
Usage Examples
|
|
491
|
-
</h2>
|
|
492
|
-
|
|
493
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
494
|
-
{/* Sortable List */}
|
|
495
|
-
<div className="!space-y-4">
|
|
496
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
497
|
-
Sortable List
|
|
498
|
-
</h3>
|
|
499
|
-
<div className="!space-y-4">
|
|
500
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-2 rounded-lg border p-4">
|
|
501
|
-
{["First Item", "Second Item", "Third Item"].map(
|
|
502
|
-
(item, index) => (
|
|
503
|
-
<div
|
|
504
|
-
key={index}
|
|
505
|
-
className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded border p-3"
|
|
506
|
-
>
|
|
507
|
-
<MoveVerticalIcon className="text-fm-icon-info hover:text-fm-icon-info h-4 w-4 cursor-move" />
|
|
508
|
-
<span className="text-fm-icon-active text-sm">
|
|
509
|
-
{item}
|
|
510
|
-
</span>
|
|
511
|
-
</div>
|
|
512
|
-
)
|
|
513
|
-
)}
|
|
514
|
-
</div>
|
|
515
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
516
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
517
|
-
{`{items.map((item, index) => (
|
|
518
|
-
<div key={index} className="flex items-center gap-3 p-3">
|
|
519
|
-
<MoveVerticalIcon className="h-4 w-4 cursor-move text-blue-400 hover:text-blue-300 " />
|
|
520
|
-
<span>{item}</span>
|
|
521
|
-
</div>
|
|
522
|
-
))}`}
|
|
523
|
-
</pre>
|
|
524
|
-
</div>
|
|
525
|
-
</div>
|
|
526
|
-
</div>
|
|
527
|
-
|
|
528
|
-
{/* Up/Down Navigation */}
|
|
529
|
-
<div className="!space-y-4">
|
|
530
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
531
|
-
Up/Down Navigation
|
|
532
|
-
</h3>
|
|
533
|
-
<div className="!space-y-4">
|
|
534
|
-
<div className="flex justify-center">
|
|
535
|
-
<div className="flex flex-col gap-2">
|
|
536
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary hover:bg-fm-surface-secondary rounded-lg border p-3 transition-colors">
|
|
537
|
-
<MoveVerticalIcon className="text-fm-icon-active h-5 w-5 rotate-180" />
|
|
538
|
-
</button>
|
|
539
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
540
|
-
<span className="text-fm-secondary text-sm">
|
|
541
|
-
Content Item
|
|
542
|
-
</span>
|
|
543
|
-
</div>
|
|
544
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary hover:bg-fm-surface-secondary rounded-lg border p-3 transition-colors">
|
|
545
|
-
<MoveVerticalIcon className="text-fm-icon-active h-5 w-5" />
|
|
546
|
-
</button>
|
|
547
|
-
</div>
|
|
548
|
-
</div>
|
|
549
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
550
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
551
|
-
{`// Up button (rotated)
|
|
552
|
-
<button onClick={moveUp}>
|
|
553
|
-
<MoveVerticalIcon className="h-5 w-5 rotate-180 text-white " />
|
|
554
|
-
</button>
|
|
555
|
-
|
|
556
|
-
// Down button
|
|
557
|
-
<button onClick={moveDown}>
|
|
558
|
-
<MoveVerticalIcon className="h-5 w-5 text-white " />
|
|
559
|
-
</button>`}
|
|
560
|
-
</pre>
|
|
561
|
-
</div>
|
|
562
|
-
</div>
|
|
563
|
-
</div>
|
|
564
|
-
|
|
565
|
-
{/* Table Row Reorder */}
|
|
566
|
-
<div className="!space-y-4">
|
|
567
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
568
|
-
Table Row Reorder
|
|
569
|
-
</h3>
|
|
570
|
-
<div className="!space-y-4">
|
|
571
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border">
|
|
572
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex border-b p-3">
|
|
573
|
-
<div className="w-8"></div>
|
|
574
|
-
<div className="text-fm-icon-active flex-1 text-sm font-medium">
|
|
575
|
-
Name
|
|
576
|
-
</div>
|
|
577
|
-
<div className="text-fm-icon-active flex-1 text-sm font-medium">
|
|
578
|
-
Email
|
|
579
|
-
</div>
|
|
580
|
-
<div className="text-fm-icon-active w-20 text-sm font-medium">
|
|
581
|
-
Status
|
|
582
|
-
</div>
|
|
583
|
-
</div>
|
|
584
|
-
{[
|
|
585
|
-
{
|
|
586
|
-
name: "John Doe",
|
|
587
|
-
email: "john@example.com",
|
|
588
|
-
status: "Active",
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
name: "Jane Smith",
|
|
592
|
-
email: "jane@example.com",
|
|
593
|
-
status: "Inactive",
|
|
594
|
-
},
|
|
595
|
-
].map((row, index) => (
|
|
596
|
-
<div
|
|
597
|
-
key={index}
|
|
598
|
-
className="border-fm-divider-secondary flex items-center border-b p-3 last:border-b-0"
|
|
599
|
-
>
|
|
600
|
-
<div className="w-8">
|
|
601
|
-
<MoveVerticalIcon className="text-fm-icon-active/30 hover:text-fm-tertiary h-4 w-4 cursor-move" />
|
|
602
|
-
</div>
|
|
603
|
-
<div className="text-fm-secondary flex-1 text-sm">
|
|
604
|
-
{row.name}
|
|
605
|
-
</div>
|
|
606
|
-
<div className="text-fm-secondary flex-1 text-sm">
|
|
607
|
-
{row.email}
|
|
608
|
-
</div>
|
|
609
|
-
<div className="w-20">
|
|
610
|
-
<span
|
|
611
|
-
className={`rounded-full px-2 py-1 text-xs ${
|
|
612
|
-
row.status === "Active"
|
|
613
|
-
? "bg-green-500/20 text-green-300"
|
|
614
|
-
: "bg-gray-500/20 text-gray-300"
|
|
615
|
-
}`}
|
|
616
|
-
>
|
|
617
|
-
{row.status}
|
|
618
|
-
</span>
|
|
619
|
-
</div>
|
|
620
|
-
</div>
|
|
621
|
-
))}
|
|
622
|
-
</div>
|
|
623
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
624
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
625
|
-
{`<td className="w-8">
|
|
626
|
-
<MoveVerticalIcon className="h-4 w-4 cursor-move text-white/30 hover:text-white/60 " />
|
|
627
|
-
</td>`}
|
|
628
|
-
</pre>
|
|
629
|
-
</div>
|
|
630
|
-
</div>
|
|
631
|
-
</div>
|
|
632
|
-
|
|
633
|
-
{/* Card Reordering */}
|
|
634
|
-
<div className="!space-y-4">
|
|
635
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
636
|
-
Card Reordering
|
|
637
|
-
</h3>
|
|
638
|
-
<div className="!space-y-4">
|
|
639
|
-
<div className="!space-y-3">
|
|
640
|
-
{["Task A", "Task B", "Task C"].map((task, index) => (
|
|
641
|
-
<div
|
|
642
|
-
key={index}
|
|
643
|
-
className="border-fm-divider-secondary bg-fm-surface-secondary relative rounded-lg border p-4"
|
|
644
|
-
>
|
|
645
|
-
<div className="absolute top-3 right-3">
|
|
646
|
-
<MoveVerticalIcon className="text-fm-icon-active/30 hover:text-fm-tertiary h-4 w-4 cursor-move" />
|
|
647
|
-
</div>
|
|
648
|
-
<div>
|
|
649
|
-
<h4 className="text-fm-icon-active! text-sm font-medium">
|
|
650
|
-
{task}
|
|
651
|
-
</h4>
|
|
652
|
-
<p className="text-fm-placeholder! text-xs">
|
|
653
|
-
Task description goes here
|
|
654
|
-
</p>
|
|
655
|
-
</div>
|
|
656
|
-
</div>
|
|
657
|
-
))}
|
|
658
|
-
</div>
|
|
659
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
660
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
661
|
-
{`<div className="relative rounded-lg p-4">
|
|
662
|
-
<div className="absolute top-3 right-3">
|
|
663
|
-
<MoveVerticalIcon className="h-4 w-4 cursor-move text-white/30 hover:text-white/60 " />
|
|
664
|
-
</div>
|
|
665
|
-
<div>{content}</div>
|
|
666
|
-
</div>`}
|
|
667
|
-
</pre>
|
|
668
|
-
</div>
|
|
669
|
-
</div>
|
|
670
|
-
</div>
|
|
671
|
-
</div>
|
|
51
|
+
}`,
|
|
52
|
+
livePreview: (
|
|
53
|
+
<div className="flex cursor-row-resize items-center">
|
|
54
|
+
<MoveVerticalIcon className="text-fm-icon-inactive h-5 w-5" />
|
|
672
55
|
</div>
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
<div className="text-fm-tertiary text-xs">
|
|
703
|
-
Scale on hover
|
|
704
|
-
</div>
|
|
705
|
-
</div>
|
|
706
|
-
</div>
|
|
707
|
-
<div className="flex items-center gap-4">
|
|
708
|
-
<MoveVerticalIcon className="animate-slide-vertical text-fm-icon-info h-6 w-6" />
|
|
709
|
-
<div>
|
|
710
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
711
|
-
Vertical Slide
|
|
712
|
-
</div>
|
|
713
|
-
<div className="text-fm-tertiary text-xs">
|
|
714
|
-
Continuous animation
|
|
715
|
-
</div>
|
|
716
|
-
</div>
|
|
717
|
-
</div>
|
|
718
|
-
<div className="flex items-center gap-4">
|
|
719
|
-
<MoveVerticalIcon className="animate-pulse-bounce text-fm-secondary-600 h-6 w-6" />
|
|
720
|
-
<div>
|
|
721
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
722
|
-
Pulse Bounce
|
|
723
|
-
</div>
|
|
724
|
-
<div className="text-fm-tertiary text-xs">
|
|
725
|
-
Bounce effect
|
|
726
|
-
</div>
|
|
727
|
-
</div>
|
|
728
|
-
</div>
|
|
729
|
-
</div>
|
|
730
|
-
</div>
|
|
731
|
-
|
|
732
|
-
<div className="!space-y-4">
|
|
733
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
734
|
-
Cursor & State Examples
|
|
735
|
-
</h3>
|
|
736
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
737
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
738
|
-
{`// Color change on hover
|
|
739
|
-
<MoveVerticalIcon className="h-6 w-6 text-white/60 transition-colors hover:text-blue-400 " />
|
|
740
|
-
|
|
741
|
-
// Scale up on hover
|
|
742
|
-
<MoveVerticalIcon className="h-6 w-6 text-white transition-transform hover:scale-110 " />
|
|
743
|
-
|
|
744
|
-
// Cursor for drag operations
|
|
745
|
-
<MoveVerticalIcon className="h-6 w-6 cursor-move text-blue-400 " />
|
|
746
|
-
|
|
747
|
-
// Cursor for grab operations
|
|
748
|
-
<MoveVerticalIcon className="h-6 w-6 cursor-grab hover:cursor-grabbing text-blue-400 " />
|
|
749
|
-
|
|
750
|
-
// With focus states
|
|
751
|
-
<MoveVerticalIcon className="h-6 w-6 focus:ring-2 focus:ring-blue-500 focus:outline-none " />`}
|
|
752
|
-
</pre>
|
|
753
|
-
</div>
|
|
754
|
-
</div>
|
|
755
|
-
</div>
|
|
756
|
-
</div>
|
|
757
|
-
|
|
758
|
-
{/* Accessibility */}
|
|
759
|
-
<div className="!space-y-8">
|
|
760
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
761
|
-
Accessibility Features
|
|
762
|
-
</h2>
|
|
763
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
764
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
765
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
766
|
-
✅ Built-in Features
|
|
767
|
-
</h3>
|
|
768
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
769
|
-
<li className="text-fm-secondary!">
|
|
770
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
771
|
-
</li>
|
|
772
|
-
<li className="text-fm-secondary!">
|
|
773
|
-
Provides screen reader label "Move Vertical icon"
|
|
774
|
-
</li>
|
|
775
|
-
<li className="text-fm-secondary!">
|
|
776
|
-
Supports keyboard navigation when interactive
|
|
777
|
-
</li>
|
|
778
|
-
<li className="text-fm-secondary!">
|
|
779
|
-
Maintains proper color contrast ratios
|
|
780
|
-
</li>
|
|
781
|
-
<li className="text-fm-secondary!">
|
|
782
|
-
Scales with user's font size preferences
|
|
783
|
-
</li>
|
|
784
|
-
</ul>
|
|
785
|
-
</div>
|
|
786
|
-
|
|
787
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
788
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
789
|
-
💡 Best Practices
|
|
790
|
-
</h3>
|
|
791
|
-
<ul className="text-fm-secondary !space-y-2 text-sm">
|
|
792
|
-
<li className="text-fm-secondary!">
|
|
793
|
-
Always provide descriptive ARIA labels for interactive
|
|
794
|
-
elements
|
|
795
|
-
</li>
|
|
796
|
-
<li className="text-fm-secondary!">
|
|
797
|
-
Use appropriate cursor styles for different interactions
|
|
798
|
-
</li>
|
|
799
|
-
<li className="text-fm-secondary!">
|
|
800
|
-
Ensure sufficient click/touch target sizes
|
|
801
|
-
</li>
|
|
802
|
-
<li className="text-fm-secondary!">
|
|
803
|
-
Add focus states for keyboard navigation
|
|
804
|
-
</li>
|
|
805
|
-
<li className="text-fm-secondary!">
|
|
806
|
-
Consider motion sensitivity for animations
|
|
807
|
-
</li>
|
|
808
|
-
</ul>
|
|
809
|
-
</div>
|
|
810
|
-
</div>
|
|
811
|
-
|
|
812
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
813
|
-
<h3 className="text-fm-icon-info! mb-4 text-lg font-semibold">
|
|
814
|
-
Interactive Element Accessibility
|
|
815
|
-
</h3>
|
|
816
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
817
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
818
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
819
|
-
{`// Sortable list item with proper ARIA
|
|
820
|
-
<div
|
|
821
|
-
role="listitem"
|
|
822
|
-
aria-label="Sortable item for"
|
|
823
|
-
className="flex items-center gap-3"
|
|
824
|
-
>
|
|
825
|
-
<button
|
|
826
|
-
aria-label="Move item up"
|
|
827
|
-
className="p-1 rounded focus:ring-2 focus:ring-blue-500"
|
|
828
|
-
>
|
|
829
|
-
<MoveVerticalIcon className="h-4 w-4 text-blue-400 " />
|
|
830
|
-
</button>
|
|
831
|
-
<span>{item.name}</span>
|
|
832
|
-
</div>
|
|
833
|
-
|
|
834
|
-
// Navigation buttons
|
|
835
|
-
<button aria-label="Move up">
|
|
836
|
-
<MoveVerticalIcon className="h-5 w-5 rotate-180 " />
|
|
837
|
-
</button>
|
|
838
|
-
<button aria-label="Move down">
|
|
839
|
-
<MoveVerticalIcon className="h-5 w-5 " />
|
|
840
|
-
</button>`}
|
|
841
|
-
</pre>
|
|
842
|
-
</div>
|
|
843
|
-
<div className="!space-y-4">
|
|
844
|
-
<p className="text-fm-secondary! text-sm">
|
|
845
|
-
When using MoveVerticalIcon for interactive controls,
|
|
846
|
-
provide clear context about the action being performed
|
|
847
|
-
and the current state.
|
|
848
|
-
</p>
|
|
849
|
-
<div className="border-fm-icon-info/20 bg-fm-icon-info/10 rounded-lg border p-4">
|
|
850
|
-
<div className="text-fm-icon-info flex items-center gap-2 text-sm">
|
|
851
|
-
<MoveVerticalIcon className="h-4 w-4" />
|
|
852
|
-
<span>
|
|
853
|
-
This approach gives screen readers more context
|
|
854
|
-
about the movement direction and purpose
|
|
855
|
-
</span>
|
|
856
|
-
</div>
|
|
857
|
-
</div>
|
|
858
|
-
</div>
|
|
859
|
-
</div>
|
|
860
|
-
</div>
|
|
861
|
-
</div>
|
|
862
|
-
|
|
863
|
-
{/* Related Icons */}
|
|
864
|
-
<div className="!space-y-8">
|
|
865
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
866
|
-
Related Icons
|
|
867
|
-
</h2>
|
|
868
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
869
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
870
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
871
|
-
<span className="text-2xl">↔️</span>
|
|
872
|
-
</div>
|
|
873
|
-
<div>
|
|
874
|
-
<div className="text-fm-icon-active font-medium">
|
|
875
|
-
MoveHorizontalIcon
|
|
876
|
-
</div>
|
|
877
|
-
<div className="text-fm-tertiary text-xs">
|
|
878
|
-
Horizontal movement
|
|
879
|
-
</div>
|
|
880
|
-
</div>
|
|
881
|
-
</div>
|
|
882
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
883
|
-
<div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
884
|
-
<span className="text-2xl">🎯</span>
|
|
885
|
-
</div>
|
|
886
|
-
<div>
|
|
887
|
-
<div className="text-fm-icon-active font-medium">
|
|
888
|
-
DragIcon
|
|
889
|
-
</div>
|
|
890
|
-
<div className="text-fm-tertiary text-xs">
|
|
891
|
-
Drag & drop
|
|
892
|
-
</div>
|
|
893
|
-
</div>
|
|
894
|
-
</div>
|
|
895
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
896
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
897
|
-
<span className="text-2xl">📋</span>
|
|
898
|
-
</div>
|
|
899
|
-
<div>
|
|
900
|
-
<div className="text-fm-icon-active font-medium">
|
|
901
|
-
SortIcon
|
|
902
|
-
</div>
|
|
903
|
-
<div className="text-fm-tertiary text-xs">
|
|
904
|
-
Sort controls
|
|
905
|
-
</div>
|
|
906
|
-
</div>
|
|
907
|
-
</div>
|
|
908
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
909
|
-
<div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
910
|
-
<span className="text-2xl">🔄</span>
|
|
911
|
-
</div>
|
|
912
|
-
<div>
|
|
913
|
-
<div className="text-fm-icon-active font-medium">
|
|
914
|
-
ReorderIcon
|
|
915
|
-
</div>
|
|
916
|
-
<div className="text-fm-tertiary text-xs">
|
|
917
|
-
Reorder controls
|
|
918
|
-
</div>
|
|
919
|
-
</div>
|
|
920
|
-
</div>
|
|
921
|
-
</div>
|
|
922
|
-
</div>
|
|
923
|
-
</div>
|
|
924
|
-
|
|
925
|
-
{/* Footer */}
|
|
926
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
|
|
927
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
928
|
-
<div className="!space-y-4 text-center">
|
|
929
|
-
<p className="text-fm-tertiary!">
|
|
930
|
-
MoveVerticalIcon is part of the Aural UI icon library, built
|
|
931
|
-
for representing vertical movement, sorting, and reordering
|
|
932
|
-
operations.
|
|
933
|
-
</p>
|
|
934
|
-
<p className="text-fm-placeholder! text-sm">
|
|
935
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
936
|
-
compatibility and follow WCAG guidelines for interactive
|
|
937
|
-
controls.
|
|
938
|
-
</p>
|
|
939
|
-
</div>
|
|
940
|
-
</div>
|
|
941
|
-
</div>
|
|
942
|
-
</div>
|
|
943
|
-
</>
|
|
56
|
+
),
|
|
57
|
+
}}
|
|
58
|
+
relatedIcons={[
|
|
59
|
+
{
|
|
60
|
+
name: "MoveHorizontalIcon",
|
|
61
|
+
description: "Move horizontally icon",
|
|
62
|
+
icon: MoveHorizontalIcon,
|
|
63
|
+
accentToken: "info",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "GripVerticalIcon",
|
|
67
|
+
description: "Vertical grip drag handle",
|
|
68
|
+
icon: GripVerticalIcon,
|
|
69
|
+
accentToken: "positive",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "ScrollDownIcon",
|
|
73
|
+
description: "Scroll down indicator icon",
|
|
74
|
+
icon: ScrollDownIcon,
|
|
75
|
+
accentToken: "warning",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "VerticalMenuIcon",
|
|
79
|
+
description: "Vertical more / overflow menu",
|
|
80
|
+
icon: VerticalMenuIcon,
|
|
81
|
+
accentToken: "negative",
|
|
82
|
+
},
|
|
83
|
+
]}
|
|
84
|
+
/>
|
|
944
85
|
),
|
|
945
86
|
},
|
|
946
87
|
},
|
|
947
88
|
tags: ["autodocs"],
|
|
948
89
|
argTypes: {
|
|
949
|
-
|
|
950
|
-
control:
|
|
951
|
-
description: "
|
|
90
|
+
className: {
|
|
91
|
+
control: "text",
|
|
92
|
+
description: "CSS classes including color token",
|
|
952
93
|
},
|
|
953
94
|
withAccessibility: {
|
|
954
95
|
control: "boolean",
|
|
955
|
-
description: "
|
|
956
|
-
},
|
|
957
|
-
height: {
|
|
958
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
959
|
-
description: "Height of the icon in pixels",
|
|
960
|
-
},
|
|
961
|
-
stroke: {
|
|
962
|
-
control: "color",
|
|
963
|
-
description: "Stroke color of the icon lines",
|
|
964
|
-
},
|
|
965
|
-
strokeWidth: {
|
|
966
|
-
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
967
|
-
description: "Width of the stroke lines",
|
|
968
|
-
},
|
|
969
|
-
className: {
|
|
970
|
-
control: "text",
|
|
971
|
-
description: "CSS classes for styling (use for overrides)",
|
|
96
|
+
description: "Wrap with accessibility label",
|
|
972
97
|
},
|
|
973
98
|
},
|
|
974
99
|
}
|
|
@@ -976,283 +101,85 @@ function SortableItem({ children }) {
|
|
|
976
101
|
export default meta
|
|
977
102
|
type Story = StoryObj<typeof MoveVerticalIcon>
|
|
978
103
|
|
|
979
|
-
// Story parameters for consistent dark theme
|
|
980
|
-
const storyParameters = {
|
|
981
|
-
backgrounds: {
|
|
982
|
-
default: "dark",
|
|
983
|
-
values: [
|
|
984
|
-
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
985
|
-
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
986
|
-
],
|
|
987
|
-
},
|
|
988
|
-
}
|
|
989
|
-
|
|
990
104
|
export const Default: Story = {
|
|
991
105
|
args: {
|
|
992
|
-
className: "h-6 w-6 text-fm-icon-
|
|
106
|
+
className: "h-6 w-6 text-fm-icon-inactive",
|
|
993
107
|
withAccessibility: true,
|
|
994
108
|
},
|
|
995
|
-
parameters: storyParameters,
|
|
996
109
|
render: (args) => (
|
|
997
|
-
<
|
|
110
|
+
<IconDefaultCanvas>
|
|
998
111
|
<MoveVerticalIcon {...args} />
|
|
999
|
-
</
|
|
112
|
+
</IconDefaultCanvas>
|
|
1000
113
|
),
|
|
1001
114
|
}
|
|
1002
115
|
|
|
1003
116
|
export const SizeVariations: Story = {
|
|
1004
|
-
|
|
1005
|
-
...storyParameters,
|
|
1006
|
-
docs: {
|
|
1007
|
-
description: {
|
|
1008
|
-
story:
|
|
1009
|
-
"MoveVerticalIcon in different sizes, from small drag handles to large sorting controls.",
|
|
1010
|
-
},
|
|
1011
|
-
},
|
|
1012
|
-
},
|
|
1013
|
-
render: () => (
|
|
1014
|
-
<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">
|
|
1015
|
-
<div className="text-center">
|
|
1016
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
|
|
1017
|
-
<span className="text-fm-tertiary text-xs">12px</span>
|
|
1018
|
-
</div>
|
|
1019
|
-
<div className="text-center">
|
|
1020
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
|
|
1021
|
-
<span className="text-fm-tertiary text-xs">16px</span>
|
|
1022
|
-
</div>
|
|
1023
|
-
<div className="text-center">
|
|
1024
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
|
|
1025
|
-
<span className="text-fm-tertiary text-xs">20px</span>
|
|
1026
|
-
</div>
|
|
1027
|
-
<div className="text-center">
|
|
1028
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
|
|
1029
|
-
<span className="text-fm-tertiary text-xs">24px</span>
|
|
1030
|
-
</div>
|
|
1031
|
-
<div className="text-center">
|
|
1032
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
|
|
1033
|
-
<span className="text-fm-tertiary text-xs">32px</span>
|
|
1034
|
-
</div>
|
|
1035
|
-
<div className="text-center">
|
|
1036
|
-
<MoveVerticalIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
|
|
1037
|
-
<span className="text-fm-tertiary text-xs">48px</span>
|
|
1038
|
-
</div>
|
|
1039
|
-
</div>
|
|
1040
|
-
),
|
|
117
|
+
render: () => <IconSizeVariations icon={MoveVerticalIcon} />,
|
|
1041
118
|
}
|
|
1042
119
|
|
|
1043
120
|
export const ColorVariations: Story = {
|
|
1044
|
-
|
|
1045
|
-
...storyParameters,
|
|
1046
|
-
docs: {
|
|
1047
|
-
description: {
|
|
1048
|
-
story:
|
|
1049
|
-
"MoveVerticalIcon in different colors for various interaction states and UI contexts.",
|
|
1050
|
-
},
|
|
1051
|
-
},
|
|
1052
|
-
},
|
|
1053
|
-
render: () => (
|
|
1054
|
-
<div className="from-fm-surface-primary to-fm-surface-secondary grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-linear-to-br p-8 md:grid-cols-4">
|
|
1055
|
-
<div className="text-center">
|
|
1056
|
-
<div className="border-fm-icon-info/30 bg-fm-icon-info/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1057
|
-
<MoveVerticalIcon className="text-fm-icon-info h-8 w-8" />
|
|
1058
|
-
</div>
|
|
1059
|
-
<div className="text-fm-icon-active text-sm font-medium">Primary</div>
|
|
1060
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
1061
|
-
</div>
|
|
1062
|
-
<div className="text-center">
|
|
1063
|
-
<div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1064
|
-
<MoveVerticalIcon className="text-fm-secondary-600 h-8 w-8" />
|
|
1065
|
-
</div>
|
|
1066
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
1067
|
-
Interactive
|
|
1068
|
-
</div>
|
|
1069
|
-
<div className="text-fm-secondary-600 text-xs">
|
|
1070
|
-
text-fm-secondary-600
|
|
1071
|
-
</div>
|
|
1072
|
-
</div>
|
|
1073
|
-
<div className="text-center">
|
|
1074
|
-
<div className="border-fm-divider-primary bg-fm-surface-tertiary/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1075
|
-
<MoveVerticalIcon className="text-fm-placeholder h-8 w-8" />
|
|
1076
|
-
</div>
|
|
1077
|
-
<div className="text-fm-icon-active text-sm font-medium">Disabled</div>
|
|
1078
|
-
<div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
|
|
1079
|
-
</div>
|
|
1080
|
-
<div className="text-center">
|
|
1081
|
-
<div className="border-fm-icon-info/30 bg-fm-icon-info/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1082
|
-
<MoveVerticalIcon className="text-fm-icon-info h-8 w-8" />
|
|
1083
|
-
</div>
|
|
1084
|
-
<div className="text-fm-icon-active text-sm font-medium">Accent</div>
|
|
1085
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
1086
|
-
</div>
|
|
1087
|
-
</div>
|
|
1088
|
-
),
|
|
121
|
+
render: () => <IconColorVariations icon={MoveVerticalIcon} />,
|
|
1089
122
|
}
|
|
1090
123
|
|
|
1091
124
|
export const UsageExamples: Story = {
|
|
1092
|
-
parameters: {
|
|
1093
|
-
...storyParameters,
|
|
1094
|
-
docs: {
|
|
1095
|
-
description: {
|
|
1096
|
-
story:
|
|
1097
|
-
"Real-world usage examples showing MoveVerticalIcon in different layout and interaction contexts.",
|
|
1098
|
-
},
|
|
1099
|
-
},
|
|
1100
|
-
},
|
|
1101
125
|
render: () => (
|
|
1102
|
-
<
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
<div
|
|
1111
|
-
key={index}
|
|
1112
|
-
className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded border p-3"
|
|
1113
|
-
>
|
|
1114
|
-
<MoveVerticalIcon className="text-fm-icon-info hover:text-fm-icon-info h-4 w-4 cursor-move" />
|
|
1115
|
-
<span className="text-fm-icon-active text-sm">{item}</span>
|
|
1116
|
-
</div>
|
|
1117
|
-
))}
|
|
1118
|
-
</div>
|
|
1119
|
-
</div>
|
|
1120
|
-
|
|
1121
|
-
{/* Up/Down Navigation */}
|
|
1122
|
-
<div className="!space-y-2">
|
|
1123
|
-
<h3 className="text-fm-icon-active text-sm font-medium">
|
|
1124
|
-
Up/Down Navigation
|
|
1125
|
-
</h3>
|
|
1126
|
-
<div className="flex justify-center">
|
|
1127
|
-
<div className="flex flex-col gap-2">
|
|
1128
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary hover:bg-fm-surface-secondary rounded-lg border p-3">
|
|
1129
|
-
<MoveVerticalIcon className="text-fm-icon-active h-5 w-5 rotate-180" />
|
|
1130
|
-
</button>
|
|
1131
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
1132
|
-
<span className="text-fm-secondary text-sm">Content Item</span>
|
|
1133
|
-
</div>
|
|
1134
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary hover:bg-fm-surface-secondary rounded-lg border p-3">
|
|
1135
|
-
<MoveVerticalIcon className="text-fm-icon-active h-5 w-5" />
|
|
1136
|
-
</button>
|
|
1137
|
-
</div>
|
|
1138
|
-
</div>
|
|
1139
|
-
</div>
|
|
1140
|
-
|
|
1141
|
-
{/* Table Row Reorder */}
|
|
1142
|
-
<div className="!space-y-2">
|
|
1143
|
-
<h3 className="text-fm-icon-active text-sm font-medium">
|
|
1144
|
-
Table Row Reorder
|
|
1145
|
-
</h3>
|
|
1146
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border">
|
|
1147
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex border-b p-3">
|
|
1148
|
-
<div className="w-8"></div>
|
|
1149
|
-
<div className="text-fm-icon-active flex-1 text-sm font-medium">
|
|
1150
|
-
Name
|
|
1151
|
-
</div>
|
|
1152
|
-
<div className="text-fm-icon-active flex-1 text-sm font-medium">
|
|
1153
|
-
Email
|
|
1154
|
-
</div>
|
|
1155
|
-
<div className="text-fm-icon-active w-20 text-sm font-medium">
|
|
1156
|
-
Status
|
|
1157
|
-
</div>
|
|
1158
|
-
</div>
|
|
1159
|
-
{[
|
|
1160
|
-
{ name: "John Doe", email: "john@example.com", status: "Active" },
|
|
1161
|
-
{
|
|
1162
|
-
name: "Jane Smith",
|
|
1163
|
-
email: "jane@example.com",
|
|
1164
|
-
status: "Inactive",
|
|
1165
|
-
},
|
|
1166
|
-
].map((row, index) => (
|
|
1167
|
-
<div
|
|
1168
|
-
key={index}
|
|
1169
|
-
className="border-fm-divider-secondary flex items-center border-b p-3 last:border-b-0"
|
|
1170
|
-
>
|
|
1171
|
-
<div className="w-8">
|
|
1172
|
-
<MoveVerticalIcon className="text-fm-icon-active/30 hover:text-fm-tertiary h-4 w-4 cursor-move" />
|
|
1173
|
-
</div>
|
|
1174
|
-
<div className="text-fm-secondary flex-1 text-sm">{row.name}</div>
|
|
1175
|
-
<div className="text-fm-secondary flex-1 text-sm">
|
|
1176
|
-
{row.email}
|
|
1177
|
-
</div>
|
|
1178
|
-
<div className="w-20">
|
|
1179
|
-
<span
|
|
1180
|
-
className={`rounded-full px-2 py-1 text-xs ${
|
|
1181
|
-
row.status === "Active"
|
|
1182
|
-
? "bg-green-500/20 text-green-300"
|
|
1183
|
-
: "bg-gray-500/20 text-gray-300"
|
|
1184
|
-
}`}
|
|
1185
|
-
>
|
|
1186
|
-
{row.status}
|
|
126
|
+
<IconUsageCanvas>
|
|
127
|
+
<IconUsageSection title="Row Resize Handle">
|
|
128
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm overflow-hidden rounded-xl border">
|
|
129
|
+
{["Row 1", "Row 2"].map((label, i) => (
|
|
130
|
+
<div key={label}>
|
|
131
|
+
<div className="flex items-center px-4 py-3">
|
|
132
|
+
<span className="text-fm-primary font-fm-text flex-1 text-sm">
|
|
133
|
+
{label}
|
|
1187
134
|
</span>
|
|
1188
135
|
</div>
|
|
136
|
+
{i === 0 && (
|
|
137
|
+
<div className="border-fm-divider-secondary flex cursor-row-resize items-center justify-center border-y py-1">
|
|
138
|
+
<MoveVerticalIcon className="text-fm-icon-inactive h-3 w-3" />
|
|
139
|
+
</div>
|
|
140
|
+
)}
|
|
1189
141
|
</div>
|
|
1190
142
|
))}
|
|
1191
143
|
</div>
|
|
1192
|
-
</
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
<h3 className="text-fm-secondary text-sm font-medium">
|
|
1211
|
-
Hover & Animation Effects
|
|
1212
|
-
</h3>
|
|
1213
|
-
<div className="flex gap-8">
|
|
1214
|
-
<div className="flex flex-col items-center gap-2">
|
|
1215
|
-
<MoveVerticalIcon className="text-fm-tertiary hover:text-fm-icon-info h-8 w-8 transition-colors" />
|
|
1216
|
-
<span className="text-fm-tertiary text-xs">Color Change</span>
|
|
1217
|
-
</div>
|
|
1218
|
-
<div className="flex flex-col items-center gap-2">
|
|
1219
|
-
<MoveVerticalIcon className="text-fm-icon-active h-8 w-8 transition-transform hover:scale-110" />
|
|
1220
|
-
<span className="text-fm-tertiary text-xs">Scale Up</span>
|
|
1221
|
-
</div>
|
|
1222
|
-
<div className="flex flex-col items-center gap-2">
|
|
1223
|
-
<MoveVerticalIcon className="animate-slide-vertical text-fm-icon-info h-8 w-8" />
|
|
1224
|
-
<span className="text-fm-tertiary text-xs">Slide</span>
|
|
144
|
+
</IconUsageSection>
|
|
145
|
+
|
|
146
|
+
<IconUsageSection title="Scroll Hint">
|
|
147
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm flex-col items-center gap-2 rounded-xl border px-4 py-4">
|
|
148
|
+
<MoveVerticalIcon className="text-fm-icon-inactive h-5 w-5" />
|
|
149
|
+
<span className="text-fm-secondary font-fm-text text-xs">
|
|
150
|
+
Scroll to navigate
|
|
151
|
+
</span>
|
|
152
|
+
</div>
|
|
153
|
+
</IconUsageSection>
|
|
154
|
+
|
|
155
|
+
<IconUsageSection title="Move Axes Pair">
|
|
156
|
+
<div className="flex gap-4">
|
|
157
|
+
<div className="flex flex-col items-center gap-1">
|
|
158
|
+
<MoveVerticalIcon className="text-fm-icon-active h-6 w-6" />
|
|
159
|
+
<span className="text-fm-secondary font-fm-text text-xs">
|
|
160
|
+
Vertical
|
|
161
|
+
</span>
|
|
1225
162
|
</div>
|
|
1226
|
-
<div className="flex flex-col items-center gap-
|
|
1227
|
-
<
|
|
1228
|
-
<span className="text-fm-
|
|
163
|
+
<div className="flex flex-col items-center gap-1">
|
|
164
|
+
<MoveHorizontalIcon className="text-fm-icon-inactive h-6 w-6" />
|
|
165
|
+
<span className="text-fm-secondary font-fm-text text-xs">
|
|
166
|
+
Horizontal
|
|
167
|
+
</span>
|
|
1229
168
|
</div>
|
|
1230
169
|
</div>
|
|
1231
|
-
</
|
|
1232
|
-
</
|
|
170
|
+
</IconUsageSection>
|
|
171
|
+
</IconUsageCanvas>
|
|
1233
172
|
),
|
|
1234
173
|
}
|
|
1235
174
|
|
|
1236
175
|
export const Playground: Story = {
|
|
1237
|
-
parameters: {
|
|
1238
|
-
...storyParameters,
|
|
1239
|
-
docs: {
|
|
1240
|
-
description: {
|
|
1241
|
-
story:
|
|
1242
|
-
"Interactive playground to experiment with different MoveVerticalIcon configurations.",
|
|
1243
|
-
},
|
|
1244
|
-
},
|
|
1245
|
-
},
|
|
1246
176
|
args: {
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
className: "text-fm-icon-info ",
|
|
177
|
+
className: "h-8 w-8 text-fm-icon-inactive",
|
|
178
|
+
withAccessibility: true,
|
|
1250
179
|
},
|
|
1251
180
|
render: (args) => (
|
|
1252
|
-
<
|
|
1253
|
-
<
|
|
1254
|
-
|
|
1255
|
-
</div>
|
|
1256
|
-
</div>
|
|
181
|
+
<IconPlaygroundCanvas>
|
|
182
|
+
<MoveVerticalIcon {...args} />
|
|
183
|
+
</IconPlaygroundCanvas>
|
|
1257
184
|
),
|
|
1258
185
|
}
|