aural-ui 3.0.7 → 4.1.0

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