aural-ui 4.0.1 → 4.2.0

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