aural-ui 4.0.1 → 4.1.0

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