aural-ui 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
  2. package/dist/components/avatar/Avatar.stories.tsx +219 -235
  3. package/dist/components/badge/Badge.stories.tsx +379 -116
  4. package/dist/components/banner/Banner.stories.tsx +445 -391
  5. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  6. package/dist/components/button/Button.stories.tsx +585 -230
  7. package/dist/components/card/Card.stories.tsx +619 -301
  8. package/dist/components/char-count/CharCount.stories.tsx +350 -248
  9. package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
  10. package/dist/components/chip/Chip.stories.tsx +362 -168
  11. package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -636
  12. package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
  13. package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
  14. package/dist/components/command/Command.stories.tsx +530 -867
  15. package/dist/components/dialog/Dialog.stories.tsx +501 -950
  16. package/dist/components/divider/Divider.stories.tsx +264 -527
  17. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  18. package/dist/components/drawer/Drawer.stories.tsx +659 -1023
  19. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
  20. package/dist/components/form/Form.stories.tsx +560 -274
  21. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  22. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
  23. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  24. package/dist/components/if-else/if-else.stories.tsx +370 -83
  25. package/dist/components/input/Input.stories.tsx +436 -368
  26. package/dist/components/label/Label.stories.tsx +156 -154
  27. package/dist/components/list/List.stories.tsx +484 -835
  28. package/dist/components/marquee/Marquee.stories.tsx +356 -712
  29. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
  30. package/dist/components/overlay/Overlay.stories.tsx +452 -824
  31. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  32. package/dist/components/popover/Popover.stories.tsx +481 -896
  33. package/dist/components/radio/Radio.stories.tsx +432 -124
  34. package/dist/components/resizable/Resizable.stories.tsx +495 -799
  35. package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
  36. package/dist/components/search/Search.stories.tsx +312 -595
  37. package/dist/components/select/Select.stories.tsx +684 -789
  38. package/dist/components/sheet/Sheet.stories.tsx +671 -950
  39. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  40. package/dist/components/slider/Slider.stories.tsx +383 -760
  41. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  42. package/dist/components/switch/Switch.stories.tsx +461 -208
  43. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  44. package/dist/components/table/Table.stories.tsx +770 -916
  45. package/dist/components/tabs/Tabs.stories.tsx +458 -1455
  46. package/dist/components/tag/Tag.stories.tsx +714 -542
  47. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  48. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
  49. package/dist/components/toast/Toast.stories.tsx +452 -1339
  50. package/dist/components/toggle/Toggle.stories.tsx +488 -931
  51. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
  52. package/dist/components/typography/Typography.stories.tsx +406 -89
  53. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  54. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  55. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  56. package/dist/icons/Icons.stories.tsx +0 -12
  57. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
  58. package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
  59. package/dist/icons/all-icons.tsx +37 -16
  60. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
  61. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
  62. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
  63. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
  64. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
  65. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
  66. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
  67. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
  68. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
  69. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
  70. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
  71. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
  72. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
  73. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
  74. package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
  75. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
  76. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
  77. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
  78. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
  79. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
  80. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
  81. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
  82. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
  83. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
  84. package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
  85. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
  86. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
  87. package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
  88. package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
  89. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
  90. package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
  91. package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
  92. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
  93. package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
  94. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
  95. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
  96. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
  97. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
  98. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
  99. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
  100. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
  101. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
  102. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
  103. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
  104. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
  105. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
  106. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
  107. package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
  108. package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
  109. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
  110. package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
  111. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
  112. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
  113. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
  114. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
  115. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
  116. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
  117. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
  118. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
  119. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
  120. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
  121. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
  122. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
  123. package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
  124. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
  125. package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
  126. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
  127. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
  128. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
  129. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
  130. package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
  131. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
  132. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
  133. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
  134. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
  135. package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
  136. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
  137. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
  138. package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
  139. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
  140. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
  141. package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
  142. package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
  143. package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
  144. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
  145. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
  146. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
  147. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
  148. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
  149. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
  150. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
  151. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
  152. package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
  153. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
  154. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
  155. package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
  156. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
  157. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
  158. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
  159. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
  160. package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
  161. package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
  162. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
  163. package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
  164. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
  165. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
  166. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
  167. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
  168. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
  169. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
  170. package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
  171. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
  172. package/dist/index.cjs +1 -1
  173. package/dist/index.js +1 -1
  174. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  import React from "react"
2
2
  import type { Meta, StoryObj } from "@storybook/react-vite"
3
3
 
4
+ import { AuralComponentDocsPage } from "src/ui/story-spec/components/component-story-docs-page"
5
+
4
6
  import { Tag } from "."
5
7
 
6
8
  const meta: Meta<typeof Tag> = {
@@ -8,12 +10,29 @@ const meta: Meta<typeof Tag> = {
8
10
  component: Tag,
9
11
  parameters: {
10
12
  layout: "centered",
11
- backgrounds: {
12
- default: "dark",
13
- values: [
14
- { name: "dark", value: "#0a0a0a" },
15
- { name: "light", value: "#ffffff" },
16
- ],
13
+ docs: {
14
+ description: {
15
+ component:
16
+ "A compact inline label for categorising and filtering content. Supports two variants (promotional and system), ten colors, three emphasis levels (primary/secondary/tertiary), three sizes, and optional left/right icons.",
17
+ },
18
+ page: () => (
19
+ <AuralComponentDocsPage
20
+ features={[
21
+ {
22
+ title: "10 Colors",
23
+ description: "Neutral to neongreen",
24
+ },
25
+ {
26
+ title: "3 Emphasis Levels",
27
+ description: "Filled, tinted, outline",
28
+ },
29
+ {
30
+ title: "Icon Slots",
31
+ description: "Left and right icons",
32
+ },
33
+ ]}
34
+ />
35
+ ),
17
36
  },
18
37
  },
19
38
  tags: ["autodocs"],
@@ -21,7 +40,8 @@ const meta: Meta<typeof Tag> = {
21
40
  variant: {
22
41
  control: "select",
23
42
  options: ["promotional", "system"],
24
- description: "Determines the visual style of the tag",
43
+ description:
44
+ "Visual style family — promotional uses brand colors, system uses semantic colors",
25
45
  },
26
46
  color: {
27
47
  control: "select",
@@ -37,39 +57,36 @@ const meta: Meta<typeof Tag> = {
37
57
  "electricblue",
38
58
  "neongreen",
39
59
  ],
40
- description: "The color scheme of the tag",
60
+ description: "Color scheme applied to the tag surface and text",
41
61
  },
42
62
  emphasis: {
43
63
  control: "select",
44
64
  options: ["primary", "secondary", "tertiary"],
45
- description: "Defines the visual weight of the tag",
65
+ description:
66
+ "Visual weight — primary is filled, secondary is tinted, tertiary is transparent",
46
67
  },
47
68
  size: {
48
69
  control: "select",
49
- options: ["sm", "md"],
50
- description: "Size of the tag",
70
+ options: ["xs", "sm", "md"],
71
+ description: "Tag size",
51
72
  },
52
73
  leftIcon: {
53
74
  control: "boolean",
54
75
  description:
55
- "Shows an icon on the left side of the tag text or accepts a custom React node",
76
+ "Show default FeatureShineIcon on the left, or pass a custom React node",
56
77
  },
57
78
  rightIcon: {
58
79
  control: "boolean",
59
80
  description:
60
- "Shows an icon on the right side of the tag text or accepts a custom React node",
81
+ "Show default FeatureShineIcon on the right, or pass a custom React node",
61
82
  },
62
- className: {
83
+ children: {
63
84
  control: "text",
64
- description: "Set the class for the tag",
85
+ description: "Tag label text",
65
86
  },
66
87
  iconProps: {
67
88
  control: "object",
68
- description: "Props to pass to the default FeatureShineIcon",
69
- },
70
- children: {
71
- control: "text",
72
- description: "The content of the tag",
89
+ description: "Props forwarded to the default FeatureShineIcon",
73
90
  },
74
91
  },
75
92
  } satisfies Meta<typeof Tag>
@@ -77,556 +94,711 @@ const meta: Meta<typeof Tag> = {
77
94
  export default meta
78
95
  type Story = StoryObj<typeof meta>
79
96
 
80
- export const Default: Story = {
81
- args: {
82
- children: "Tag",
83
- variant: "system",
84
- color: "neutral",
85
- emphasis: "primary",
86
- size: "md",
87
- leftIcon: true,
88
- rightIcon: false,
89
- },
90
- }
97
+ // ─── 1. Playground ────────────────────────────────────────────────────────────
91
98
 
92
- // System Tag Variants
93
- export const SystemNeutralPrimary: Story = {
99
+ export const Playground: Story = {
94
100
  args: {
95
- ...Default.args,
96
- variant: "system",
97
- color: "neutral",
98
- emphasis: "primary",
99
- children: "Neutral Primary",
100
- },
101
- }
102
-
103
- export const SystemNeutralSecondary: Story = {
104
- args: {
105
- ...Default.args,
106
- variant: "system",
107
- color: "neutral",
108
- emphasis: "secondary",
109
- children: "Neutral Secondary",
110
- },
111
- }
112
-
113
- export const SystemNeutralTertiary: Story = {
114
- args: {
115
- ...Default.args,
116
- variant: "system",
117
- color: "neutral",
118
- emphasis: "tertiary",
119
- children: "Neutral Tertiary",
120
- },
121
- }
122
-
123
- export const SystemInfoPrimary: Story = {
124
- args: {
125
- ...Default.args,
126
- variant: "system",
127
- color: "info",
128
- emphasis: "primary",
129
- children: "Info Primary",
130
- },
131
- }
132
-
133
- export const SystemInfoSecondary: Story = {
134
- args: {
135
- ...Default.args,
136
- variant: "system",
137
- color: "info",
138
- emphasis: "secondary",
139
- children: "Info Secondary",
140
- },
141
- }
142
-
143
- export const SystemInfoTertiary: Story = {
144
- args: {
145
- ...Default.args,
101
+ children: "Label",
146
102
  variant: "system",
147
103
  color: "info",
148
- emphasis: "tertiary",
149
- children: "Info Tertiary",
150
- },
151
- }
152
-
153
- export const SystemPositivePrimary: Story = {
154
- args: {
155
- ...Default.args,
156
- variant: "system",
157
- color: "positive",
158
- emphasis: "primary",
159
- children: "Positive Primary",
160
- },
161
- }
162
-
163
- export const SystemPositiveSecondary: Story = {
164
- args: {
165
- ...Default.args,
166
- variant: "system",
167
- color: "positive",
168
- emphasis: "secondary",
169
- children: "Positive Secondary",
170
- },
171
- }
172
-
173
- export const SystemPositiveTertiary: Story = {
174
- args: {
175
- ...Default.args,
176
- variant: "system",
177
- color: "positive",
178
- emphasis: "tertiary",
179
- children: "Positive Tertiary",
180
- },
181
- }
182
-
183
- export const SystemNegativePrimary: Story = {
184
- args: {
185
- ...Default.args,
186
- variant: "system",
187
- color: "negative",
188
- emphasis: "primary",
189
- children: "Negative Primary",
190
- },
191
- }
192
-
193
- export const SystemNegativeSecondary: Story = {
194
- args: {
195
- ...Default.args,
196
- variant: "system",
197
- color: "negative",
198
104
  emphasis: "secondary",
199
- children: "Negative Secondary",
200
- },
201
- }
202
-
203
- export const SystemNegativeTertiary: Story = {
204
- args: {
205
- ...Default.args,
206
- variant: "system",
207
- color: "negative",
208
- emphasis: "tertiary",
209
- children: "Negative Tertiary",
210
- },
211
- }
212
-
213
- export const SystemNegativeNoFill: Story = {
214
- args: {
215
- ...Default.args,
216
- variant: "system",
217
- color: "negative",
218
- emphasis: "no-fill",
219
- children: "Negative No Fill",
220
- },
221
- }
222
-
223
- export const SystemWarningPrimary: Story = {
224
- args: {
225
- ...Default.args,
226
- variant: "system",
227
- color: "warning",
228
- emphasis: "primary",
229
- children: "Warning Primary",
230
- },
231
- }
232
-
233
- export const SystemWarningSecondary: Story = {
234
- args: {
235
- ...Default.args,
236
- variant: "system",
237
- color: "warning",
238
- emphasis: "secondary",
239
- children: "Warning Secondary",
240
- },
241
- }
242
-
243
- export const SystemWarningTertiary: Story = {
244
- args: {
245
- ...Default.args,
246
- variant: "system",
247
- color: "warning",
248
- emphasis: "tertiary",
249
- children: "Warning Tertiary",
250
- },
251
- }
252
-
253
- // Promotional Tag Variants
254
- export const PromotionalLemonPrimary: Story = {
255
- args: {
256
- ...Default.args,
257
- variant: "promotional",
258
- color: "lemon",
259
- emphasis: "primary",
260
- children: "Lemon Primary",
261
- },
262
- }
263
-
264
- export const PromotionalLemonSecondary: Story = {
265
- args: {
266
- ...Default.args,
267
- variant: "promotional",
268
- color: "lemon",
269
- emphasis: "secondary",
270
- children: "Lemon Secondary",
271
- },
272
- }
273
-
274
- export const PromotionalLemonTertiary: Story = {
275
- args: {
276
- ...Default.args,
277
- variant: "promotional",
278
- color: "lemon",
279
- emphasis: "tertiary",
280
- children: "Lemon Tertiary",
281
- },
282
- }
283
-
284
- export const PromotionalEmeraldPrimary: Story = {
285
- args: {
286
- ...Default.args,
287
- variant: "promotional",
288
- color: "emerald",
289
- emphasis: "primary",
290
- children: "Emerald Primary",
291
- },
292
- }
293
-
294
- export const PromotionalEmeraldSecondary: Story = {
295
- args: {
296
- ...Default.args,
297
- variant: "promotional",
298
- color: "emerald",
299
- emphasis: "secondary",
300
- children: "Emerald Secondary",
301
- },
302
- }
303
-
304
- export const PromotionalEmeraldTertiary: Story = {
305
- args: {
306
- ...Default.args,
307
- variant: "promotional",
308
- color: "emerald",
309
- emphasis: "tertiary",
310
- children: "Emerald Tertiary",
311
- },
312
- }
313
-
314
- export const PromotionalHotpinkPrimary: Story = {
315
- args: {
316
- ...Default.args,
317
- variant: "promotional",
318
- color: "hotpink",
319
- emphasis: "primary",
320
- children: "Hotpink Primary",
321
- },
322
- }
323
-
324
- export const PromotionalHotpinkSecondary: Story = {
325
- args: {
326
- ...Default.args,
327
- variant: "promotional",
328
- color: "hotpink",
329
- emphasis: "secondary",
330
- children: "Hotpink Secondary",
331
- },
332
- }
333
-
334
- export const PromotionalHotpinkTertiary: Story = {
335
- args: {
336
- ...Default.args,
337
- variant: "promotional",
338
- color: "hotpink",
339
- emphasis: "tertiary",
340
- children: "Hotpink Tertiary",
341
- },
342
- }
343
-
344
- export const PromotionalElectricbluePrimary: Story = {
345
- args: {
346
- ...Default.args,
347
- variant: "promotional",
348
- color: "electricblue",
349
- emphasis: "primary",
350
- children: "Electricblue Primary",
351
- },
352
- }
353
-
354
- export const PromotionalElectricblueSecondary: Story = {
355
- args: {
356
- ...Default.args,
357
- variant: "promotional",
358
- color: "electricblue",
359
- emphasis: "secondary",
360
- children: "Electricblue Secondary",
361
- },
362
- }
363
-
364
- export const PromotionalElectricblueTertiary: Story = {
365
- args: {
366
- ...Default.args,
367
- variant: "promotional",
368
- color: "electricblue",
369
- emphasis: "tertiary",
370
- children: "Electricblue Tertiary",
371
- },
372
- }
373
-
374
- export const PromotionalNeonGreenPrimary: Story = {
375
- args: {
376
- ...Default.args,
377
- variant: "promotional",
378
- color: "neongreen",
379
- emphasis: "primary",
380
- children: "Neongreen Primary",
381
- },
382
- }
383
-
384
- export const PromotionalNeonGreenSecondary: Story = {
385
- args: {
386
- ...Default.args,
387
- variant: "promotional",
388
- color: "neongreen",
389
- emphasis: "secondary",
390
- children: "Neongreen Secondary",
391
- },
392
- }
393
-
394
- export const PromotionalNeonGreenTertiary: Story = {
395
- args: {
396
- ...Default.args,
397
- variant: "promotional",
398
- color: "neongreen",
399
- emphasis: "tertiary",
400
- children: "Neongreen Tertiary",
401
- },
402
- }
403
-
404
- // Size variants
405
- export const SmallSize: Story = {
406
- args: {
407
- ...Default.args,
408
- size: "sm",
409
- children: "Small Tag",
410
- },
411
- }
412
-
413
- export const MediumSize: Story = {
414
- args: {
415
- ...Default.args,
416
105
  size: "md",
417
- children: "Medium Tag",
418
- },
419
- }
420
-
421
- // Icon variants
422
- export const WithLeftIcon: Story = {
423
- args: {
424
- ...Default.args,
425
- leftIcon: true,
426
- rightIcon: false,
427
- children: "Left Icon",
428
- },
429
- }
430
-
431
- export const WithRightIcon: Story = {
432
- args: {
433
- ...Default.args,
434
- leftIcon: false,
435
- rightIcon: true,
436
- children: "Right Icon",
437
- },
438
- }
439
-
440
- export const WithBothIcons: Story = {
441
- args: {
442
- ...Default.args,
443
- leftIcon: true,
444
- rightIcon: true,
445
- children: "Both Icons",
446
- },
447
- }
448
-
449
- // Custom Icon examples
450
- export const WithCustomIconProps: Story = {
451
- args: {
452
- ...Default.args,
453
106
  leftIcon: true,
454
- iconProps: { color: "red", width: 20, height: 20 },
455
- children: "Custom Icon Props",
456
107
  },
457
- }
458
-
459
- export const WithCustomLeftIcon: Story = {
460
- args: {
461
- ...Default.args,
462
- leftIcon: (
463
- <svg
464
- width="16"
465
- height="16"
466
- viewBox="0 0 16 16"
467
- fill="none"
468
- xmlns="http://www.w3.org/2000/svg"
469
- >
470
- <circle cx="8" cy="8" r="7" stroke="currentColor" strokeWidth="2" />
471
- <path
472
- d="M5 8L7 10L11 6"
473
- stroke="currentColor"
474
- strokeWidth="2"
475
- strokeLinecap="round"
476
- strokeLinejoin="round"
477
- />
478
- </svg>
479
- ),
480
- children: "Custom Left Icon",
108
+ render: (args) => (
109
+ <div className="w-full max-w-sm space-y-4">
110
+ <div className="flex justify-center">
111
+ <Tag {...args} />
112
+ </div>
113
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border px-4 py-3">
114
+ <code
115
+ className="text-fm-secondary text-fm-md leading-fm-md"
116
+ style={{ fontFamily: "var(--font-fm-mono)" }}
117
+ >
118
+ {`<Tag variant="${args.variant}" color="${args.color}" emphasis="${args.emphasis}" size="${args.size}">${String(args.children)}</Tag>`}
119
+ </code>
120
+ </div>
121
+ </div>
122
+ ),
123
+ parameters: {
124
+ docs: {
125
+ description: {
126
+ story:
127
+ "Use the controls panel to explore variant (promotional/system), color, emphasis, size, and icon placement.",
128
+ },
129
+ },
481
130
  },
482
131
  }
483
132
 
484
- export const WithCustomRightIcon: Story = {
485
- args: {
486
- ...Default.args,
487
- leftIcon: false,
488
- rightIcon: (
489
- <svg
490
- width="16"
491
- height="16"
492
- viewBox="0 0 16 16"
493
- fill="none"
494
- xmlns="http://www.w3.org/2000/svg"
495
- >
496
- <path
497
- d="M8 3V13"
498
- stroke="currentColor"
499
- strokeWidth="2"
500
- strokeLinecap="round"
501
- />
502
- <path
503
- d="M13 8L3 8"
504
- stroke="currentColor"
505
- strokeWidth="2"
506
- strokeLinecap="round"
507
- />
508
- </svg>
509
- ),
510
- children: "Custom Right Icon",
511
- },
512
- }
133
+ // ─── 2. All Variants ──────────────────────────────────────────────────────────
513
134
 
514
- // Additional story to show multiple tags together
515
- export const TagCollection: Story = {
516
- args: {
517
- ...Default.args,
518
- },
135
+ export const AllVariants: Story = {
519
136
  render: () => (
520
- <div className="flex flex-wrap gap-2">
521
- <Tag variant="system" color="neutral" emphasis="primary">
522
- Neutral
523
- </Tag>
524
- <Tag variant="system" color="info" emphasis="primary">
525
- Info
526
- </Tag>
527
- <Tag variant="system" color="positive" emphasis="primary">
528
- Success
529
- </Tag>
530
- <Tag variant="system" color="warning" emphasis="primary">
531
- Warning
532
- </Tag>
533
- <Tag variant="system" color="negative" emphasis="primary">
534
- Error
535
- </Tag>
536
- <Tag variant="promotional" color="lemon" emphasis="primary">
537
- Lemon
538
- </Tag>
539
- <Tag variant="promotional" color="emerald" emphasis="primary">
540
- Emerald
541
- </Tag>
542
- <Tag variant="promotional" color="hotpink" emphasis="primary">
543
- Hotpink
544
- </Tag>
545
- <Tag variant="promotional" color="electricblue" emphasis="primary">
546
- Electric Blue
547
- </Tag>
548
- <Tag
549
- variant="promotional"
550
- color="neongreen"
551
- emphasis="primary"
552
- className="px-10"
553
- >
554
- Neon Green
555
- </Tag>
137
+ <div className="space-y-8">
138
+ {/* System variant */}
139
+ <div className="space-y-4">
140
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
141
+ System Primary Emphasis
142
+ </h4>
143
+ <div className="flex flex-wrap gap-3">
144
+ {(
145
+ ["neutral", "info", "positive", "negative", "warning"] as const
146
+ ).map((color) => (
147
+ <div key={color} className="space-y-2 text-center">
148
+ <Tag variant="system" color={color} emphasis="primary" leftIcon>
149
+ {color}
150
+ </Tag>
151
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm capitalize">
152
+ {color}
153
+ </p>
154
+ </div>
155
+ ))}
156
+ </div>
157
+ </div>
158
+
159
+ <div className="space-y-4">
160
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
161
+ System — Secondary Emphasis
162
+ </h4>
163
+ <div className="flex flex-wrap gap-3">
164
+ {(
165
+ ["neutral", "info", "positive", "negative", "warning"] as const
166
+ ).map((color) => (
167
+ <div key={color} className="space-y-2 text-center">
168
+ <Tag variant="system" color={color} emphasis="secondary" leftIcon>
169
+ {color}
170
+ </Tag>
171
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm capitalize">
172
+ {color}
173
+ </p>
174
+ </div>
175
+ ))}
176
+ </div>
177
+ </div>
178
+
179
+ <div className="space-y-4">
180
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
181
+ System — Tertiary Emphasis
182
+ </h4>
183
+ <div className="flex flex-wrap gap-3">
184
+ {(
185
+ ["neutral", "info", "positive", "negative", "warning"] as const
186
+ ).map((color) => (
187
+ <div key={color} className="space-y-2 text-center">
188
+ <Tag variant="system" color={color} emphasis="tertiary" leftIcon>
189
+ {color}
190
+ </Tag>
191
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm capitalize">
192
+ {color}
193
+ </p>
194
+ </div>
195
+ ))}
196
+ </div>
197
+ </div>
198
+
199
+ {/* Promotional variant */}
200
+ <div className="space-y-4">
201
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
202
+ Promotional — Primary Emphasis
203
+ </h4>
204
+ <div className="flex flex-wrap gap-3">
205
+ {(
206
+ [
207
+ "lemon",
208
+ "emerald",
209
+ "hotpink",
210
+ "electricblue",
211
+ "neongreen",
212
+ ] as const
213
+ ).map((color) => (
214
+ <div key={color} className="space-y-2 text-center">
215
+ <Tag
216
+ variant="promotional"
217
+ color={color}
218
+ emphasis="primary"
219
+ leftIcon
220
+ >
221
+ {color}
222
+ </Tag>
223
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm capitalize">
224
+ {color}
225
+ </p>
226
+ </div>
227
+ ))}
228
+ </div>
229
+ </div>
230
+
231
+ <div className="space-y-4">
232
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
233
+ Promotional — Secondary Emphasis
234
+ </h4>
235
+ <div className="flex flex-wrap gap-3">
236
+ {(
237
+ [
238
+ "lemon",
239
+ "emerald",
240
+ "hotpink",
241
+ "electricblue",
242
+ "neongreen",
243
+ ] as const
244
+ ).map((color) => (
245
+ <div key={color} className="space-y-2 text-center">
246
+ <Tag
247
+ variant="promotional"
248
+ color={color}
249
+ emphasis="secondary"
250
+ leftIcon
251
+ >
252
+ {color}
253
+ </Tag>
254
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm capitalize">
255
+ {color}
256
+ </p>
257
+ </div>
258
+ ))}
259
+ </div>
260
+ </div>
261
+
262
+ <div className="space-y-4">
263
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
264
+ Promotional — Tertiary Emphasis
265
+ </h4>
266
+ <div className="flex flex-wrap gap-3">
267
+ {(
268
+ [
269
+ "lemon",
270
+ "emerald",
271
+ "hotpink",
272
+ "electricblue",
273
+ "neongreen",
274
+ ] as const
275
+ ).map((color) => (
276
+ <div key={color} className="space-y-2 text-center">
277
+ <Tag
278
+ variant="promotional"
279
+ color={color}
280
+ emphasis="tertiary"
281
+ leftIcon
282
+ >
283
+ {color}
284
+ </Tag>
285
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm capitalize">
286
+ {color}
287
+ </p>
288
+ </div>
289
+ ))}
290
+ </div>
291
+ </div>
556
292
  </div>
557
293
  ),
294
+ parameters: {
295
+ layout: "padded",
296
+ docs: {
297
+ description: {
298
+ story:
299
+ "Full variant × color × emphasis matrix. System colors (neutral, info, positive, negative, warning) across all three emphasis levels, then promotional colors (lemon, emerald, hotpink, electricblue, neongreen) across all three emphasis levels.",
300
+ },
301
+ },
302
+ },
558
303
  }
559
304
 
560
- // Showcase different emphasis styles
561
- export const EmphasisVariants: Story = {
562
- args: {
563
- ...Default.args,
564
- },
305
+ // ─── 2. Sizes ─────────────────────────────────────────────────────────────────
306
+
307
+ export const Sizes: Story = {
565
308
  render: () => (
566
- <div className="flex flex-wrap gap-2">
567
- <Tag variant="system" color="info" emphasis="primary">
568
- Primary
569
- </Tag>
570
- <Tag variant="system" color="info" emphasis="secondary">
571
- Secondary
572
- </Tag>
573
- <Tag variant="system" color="info" emphasis="tertiary">
574
- Tertiary
575
- </Tag>
309
+ <div className="space-y-8">
310
+ <div className="flex flex-wrap items-end justify-center gap-6">
311
+ <div className="space-y-2 text-center">
312
+ <Tag
313
+ variant="system"
314
+ color="info"
315
+ emphasis="secondary"
316
+ size="xs"
317
+ leftIcon
318
+ >
319
+ Extra Small
320
+ </Tag>
321
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
322
+ xs
323
+ </p>
324
+ </div>
325
+ <div className="space-y-2 text-center">
326
+ <Tag
327
+ variant="system"
328
+ color="info"
329
+ emphasis="secondary"
330
+ size="sm"
331
+ leftIcon
332
+ >
333
+ Small
334
+ </Tag>
335
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
336
+ sm
337
+ </p>
338
+ </div>
339
+ <div className="space-y-2 text-center">
340
+ <Tag
341
+ variant="system"
342
+ color="info"
343
+ emphasis="secondary"
344
+ size="md"
345
+ leftIcon
346
+ >
347
+ Medium
348
+ </Tag>
349
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
350
+ md (default)
351
+ </p>
352
+ </div>
353
+ </div>
354
+
355
+ <div className="space-y-4">
356
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
357
+ Size × Color
358
+ </h4>
359
+ <div className="flex flex-wrap items-end justify-center gap-4">
360
+ {(["xs", "sm", "md"] as const).map((size) => (
361
+ <div key={size} className="space-y-3">
362
+ <div className="space-y-2 text-center">
363
+ <Tag
364
+ variant="system"
365
+ color="positive"
366
+ emphasis="secondary"
367
+ size={size}
368
+ leftIcon
369
+ >
370
+ Positive
371
+ </Tag>
372
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
373
+ positive · {size}
374
+ </p>
375
+ </div>
376
+ <div className="space-y-2 text-center">
377
+ <Tag
378
+ variant="promotional"
379
+ color="lemon"
380
+ emphasis="primary"
381
+ size={size}
382
+ leftIcon
383
+ >
384
+ Lemon
385
+ </Tag>
386
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
387
+ lemon · {size}
388
+ </p>
389
+ </div>
390
+ <div className="space-y-2 text-center">
391
+ <Tag
392
+ variant="system"
393
+ color="warning"
394
+ emphasis="secondary"
395
+ size={size}
396
+ leftIcon
397
+ >
398
+ Warning
399
+ </Tag>
400
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
401
+ warning · {size}
402
+ </p>
403
+ </div>
404
+ </div>
405
+ ))}
406
+ </div>
407
+ </div>
576
408
  </div>
577
409
  ),
410
+ parameters: {
411
+ layout: "padded",
412
+ docs: {
413
+ description: {
414
+ story:
415
+ "Three sizes (xs, sm, md) shown side by side, plus a size × color cross-axis grid.",
416
+ },
417
+ },
418
+ },
578
419
  }
579
420
 
580
- // Showcase different sizes
581
- export const SizeVariants: Story = {
582
- args: {
583
- ...Default.args,
584
- },
421
+ // ─── 3. Configurations ────────────────────────────────────────────────────────
422
+
423
+ export const Configurations: Story = {
585
424
  render: () => (
586
- <div className="flex flex-wrap items-center gap-2">
587
- <Tag variant="system" color="positive" size="sm">
588
- Small Tag
589
- </Tag>
590
- <Tag variant="system" color="positive" size="md">
591
- Medium Tag
592
- </Tag>
425
+ <div className="space-y-8">
426
+ <div className="space-y-4">
427
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
428
+ Icon Placement
429
+ </h4>
430
+ <div className="flex flex-wrap items-center gap-3">
431
+ <div className="space-y-2 text-center">
432
+ <Tag variant="system" color="neutral" emphasis="primary">
433
+ No Icon
434
+ </Tag>
435
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
436
+ none
437
+ </p>
438
+ </div>
439
+ <div className="space-y-2 text-center">
440
+ <Tag variant="system" color="neutral" emphasis="primary" leftIcon>
441
+ Left Icon
442
+ </Tag>
443
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
444
+ left
445
+ </p>
446
+ </div>
447
+ <div className="space-y-2 text-center">
448
+ <Tag variant="system" color="neutral" emphasis="primary" rightIcon>
449
+ Right Icon
450
+ </Tag>
451
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
452
+ right
453
+ </p>
454
+ </div>
455
+ <div className="space-y-2 text-center">
456
+ <Tag
457
+ variant="system"
458
+ color="neutral"
459
+ emphasis="primary"
460
+ leftIcon
461
+ rightIcon
462
+ >
463
+ Both Icons
464
+ </Tag>
465
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
466
+ both
467
+ </p>
468
+ </div>
469
+ </div>
470
+ </div>
471
+
472
+ <div className="space-y-4">
473
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
474
+ Icon Placement × Variant
475
+ </h4>
476
+ <div className="flex flex-wrap gap-6">
477
+ {(
478
+ [
479
+ { variant: "system", color: "info", emphasis: "secondary" },
480
+ { variant: "system", color: "positive", emphasis: "secondary" },
481
+ { variant: "system", color: "negative", emphasis: "secondary" },
482
+ { variant: "promotional", color: "lemon", emphasis: "primary" },
483
+ { variant: "promotional", color: "hotpink", emphasis: "primary" },
484
+ ] as const
485
+ ).map(({ variant, color, emphasis }) => (
486
+ <div key={`${variant}-${color}`} className="space-y-2">
487
+ <div className="flex flex-wrap items-center gap-2">
488
+ <Tag
489
+ variant={variant}
490
+ color={color}
491
+ emphasis={emphasis}
492
+ leftIcon
493
+ >
494
+ {color}
495
+ </Tag>
496
+ <Tag
497
+ variant={variant}
498
+ color={color}
499
+ emphasis={emphasis}
500
+ rightIcon
501
+ >
502
+ {color}
503
+ </Tag>
504
+ <Tag
505
+ variant={variant}
506
+ color={color}
507
+ emphasis={emphasis}
508
+ leftIcon
509
+ rightIcon
510
+ >
511
+ {color}
512
+ </Tag>
513
+ </div>
514
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm capitalize">
515
+ {color} · {emphasis}
516
+ </p>
517
+ </div>
518
+ ))}
519
+ </div>
520
+ </div>
521
+
522
+ <div className="space-y-4">
523
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
524
+ Custom SVG Icons
525
+ </h4>
526
+ <div className="flex flex-wrap items-center gap-3">
527
+ <div className="space-y-2 text-center">
528
+ <Tag
529
+ variant="system"
530
+ color="positive"
531
+ emphasis="secondary"
532
+ leftIcon={
533
+ <svg width="12" height="12" viewBox="0 0 16 16" fill="none">
534
+ <circle
535
+ cx="8"
536
+ cy="8"
537
+ r="7"
538
+ stroke="currentColor"
539
+ strokeWidth="2"
540
+ />
541
+ <path
542
+ d="M5 8L7 10L11 6"
543
+ stroke="currentColor"
544
+ strokeWidth="2"
545
+ strokeLinecap="round"
546
+ strokeLinejoin="round"
547
+ />
548
+ </svg>
549
+ }
550
+ >
551
+ Verified
552
+ </Tag>
553
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
554
+ custom left
555
+ </p>
556
+ </div>
557
+ <div className="space-y-2 text-center">
558
+ <Tag
559
+ variant="system"
560
+ color="info"
561
+ emphasis="secondary"
562
+ rightIcon={
563
+ <svg width="12" height="12" viewBox="0 0 16 16" fill="none">
564
+ <path
565
+ d="M8 3V13M13 8H3"
566
+ stroke="currentColor"
567
+ strokeWidth="2"
568
+ strokeLinecap="round"
569
+ />
570
+ </svg>
571
+ }
572
+ >
573
+ Add More
574
+ </Tag>
575
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm">
576
+ custom right
577
+ </p>
578
+ </div>
579
+ </div>
580
+ </div>
593
581
  </div>
594
582
  ),
583
+ parameters: {
584
+ layout: "padded",
585
+ docs: {
586
+ description: {
587
+ story:
588
+ "Icon placement options (none/left/right/both) across multiple variant × color combinations, plus custom SVG icon examples.",
589
+ },
590
+ },
591
+ },
595
592
  }
596
593
 
597
- // Showcase different icon combinations
598
- export const IconVariants: Story = {
599
- args: {
600
- ...Default.args,
601
- },
594
+ // ─── 4. Use Cases ─────────────────────────────────────────────────────────────
595
+
596
+ export const UseCases: Story = {
602
597
  render: () => (
603
- <div className="flex flex-wrap gap-2">
604
- <Tag variant="system" color="warning" leftIcon={true}>
605
- Left Icon
606
- </Tag>
607
- <Tag variant="system" color="warning" leftIcon={false} rightIcon={true}>
608
- Right Icon
609
- </Tag>
610
- <Tag variant="system" color="warning" leftIcon={true} rightIcon={true}>
611
- Both Icons
612
- </Tag>
613
- <Tag
614
- variant="system"
615
- color="warning"
616
- leftIcon={
617
- <svg
618
- width="16"
619
- height="16"
620
- viewBox="0 0 16 16"
621
- fill="none"
622
- xmlns="http://www.w3.org/2000/svg"
623
- >
624
- <circle cx="8" cy="8" r="6" stroke="currentColor" strokeWidth="2" />
625
- </svg>
626
- }
627
- >
628
- Custom Icon
629
- </Tag>
598
+ <div className="mx-auto max-w-3xl space-y-8 p-8">
599
+ {/* Genre Tags */}
600
+ <div className="space-y-4">
601
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
602
+ Genre Tags
603
+ </h4>
604
+ <div className="flex flex-wrap gap-2">
605
+ {(
606
+ [
607
+ { label: "Pop", color: "hotpink" },
608
+ { label: "Hip-Hop", color: "lemon" },
609
+ { label: "Electronic", color: "electricblue" },
610
+ { label: "Jazz", color: "emerald" },
611
+ { label: "Rock", color: "neongreen" },
612
+ { label: "Classical", color: "hotpink" },
613
+ { label: "R&B", color: "lemon" },
614
+ ] as const
615
+ ).map(({ label, color }) => (
616
+ <Tag
617
+ key={label}
618
+ variant="promotional"
619
+ color={color}
620
+ emphasis="secondary"
621
+ size="sm"
622
+ >
623
+ {label}
624
+ </Tag>
625
+ ))}
626
+ </div>
627
+ </div>
628
+
629
+ {/* Mood Tags */}
630
+ <div className="space-y-4">
631
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
632
+ Mood Tags
633
+ </h4>
634
+ <div className="flex flex-wrap gap-2">
635
+ {(
636
+ [
637
+ { label: "Chill", color: "info" },
638
+ { label: "Energetic", color: "positive" },
639
+ { label: "Melancholic", color: "negative" },
640
+ { label: "Upbeat", color: "warning" },
641
+ { label: "Focus", color: "info" },
642
+ { label: "Party", color: "warning" },
643
+ ] as const
644
+ ).map(({ label, color }) => (
645
+ <Tag
646
+ key={label}
647
+ variant="system"
648
+ color={color}
649
+ emphasis="secondary"
650
+ size="sm"
651
+ leftIcon
652
+ >
653
+ {label}
654
+ </Tag>
655
+ ))}
656
+ </div>
657
+ </div>
658
+
659
+ {/* Filter Chips */}
660
+ <div className="space-y-4">
661
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
662
+ Filter Chips
663
+ </h4>
664
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-xl border p-4">
665
+ <p className="text-fm-tertiary font-fm-text text-fm-sm leading-fm-sm mb-3">
666
+ Active filters
667
+ </p>
668
+ <div className="flex flex-wrap gap-2">
669
+ {(
670
+ [
671
+ { label: "New Releases", color: "info", emphasis: "secondary" },
672
+ {
673
+ label: "Verified Artist",
674
+ color: "positive",
675
+ emphasis: "secondary",
676
+ },
677
+ { label: "Explicit", color: "negative", emphasis: "secondary" },
678
+ { label: "HD Audio", color: "neutral", emphasis: "primary" },
679
+ ] as const
680
+ ).map(({ label, color, emphasis }) => (
681
+ <Tag
682
+ key={label}
683
+ variant="system"
684
+ color={color}
685
+ emphasis={emphasis}
686
+ size="sm"
687
+ rightIcon={
688
+ <svg width="10" height="10" viewBox="0 0 16 16" fill="none">
689
+ <path
690
+ d="M4 4L12 12M12 4L4 12"
691
+ stroke="currentColor"
692
+ strokeWidth="2"
693
+ strokeLinecap="round"
694
+ />
695
+ </svg>
696
+ }
697
+ >
698
+ {label}
699
+ </Tag>
700
+ ))}
701
+ </div>
702
+ </div>
703
+ </div>
704
+
705
+ {/* Track Metadata Row */}
706
+ <div className="space-y-4">
707
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
708
+ Track Metadata
709
+ </h4>
710
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary space-y-3 rounded-xl border p-4">
711
+ {[
712
+ {
713
+ title: "Midnight Dreams",
714
+ artist: "Luna Wave",
715
+ tags: [
716
+ {
717
+ label: "NEW",
718
+ variant: "system",
719
+ color: "info",
720
+ emphasis: "secondary",
721
+ },
722
+ {
723
+ label: "CHILL",
724
+ variant: "system",
725
+ color: "neutral",
726
+ emphasis: "primary",
727
+ },
728
+ ] as const,
729
+ },
730
+ {
731
+ title: "Electric Sunrise",
732
+ artist: "Neon Pulse",
733
+ tags: [
734
+ {
735
+ label: "TRENDING",
736
+ variant: "promotional",
737
+ color: "lemon",
738
+ emphasis: "primary",
739
+ },
740
+ {
741
+ label: "ENERGETIC",
742
+ variant: "system",
743
+ color: "positive",
744
+ emphasis: "secondary",
745
+ },
746
+ ] as const,
747
+ },
748
+ {
749
+ title: "Echoes in Rain",
750
+ artist: "Dusk & Dawn",
751
+ tags: [
752
+ {
753
+ label: "EXPLICIT",
754
+ variant: "system",
755
+ color: "negative",
756
+ emphasis: "secondary",
757
+ },
758
+ {
759
+ label: "JAZZ",
760
+ variant: "promotional",
761
+ color: "emerald",
762
+ emphasis: "secondary",
763
+ },
764
+ ] as const,
765
+ },
766
+ ].map(({ title, artist, tags }) => (
767
+ <div key={title} className="flex items-center justify-between">
768
+ <div>
769
+ <p className="text-fm-primary font-fm-text text-fm-sm leading-fm-sm font-medium">
770
+ {title}
771
+ </p>
772
+ <p className="text-fm-tertiary font-fm-text text-fm-sm leading-fm-sm">
773
+ {artist}
774
+ </p>
775
+ </div>
776
+ <div className="flex items-center gap-2">
777
+ {tags.map(({ label, variant, color, emphasis }) => (
778
+ <Tag
779
+ key={label}
780
+ variant={variant}
781
+ color={color}
782
+ emphasis={emphasis}
783
+ size="xs"
784
+ >
785
+ {label}
786
+ </Tag>
787
+ ))}
788
+ </div>
789
+ </div>
790
+ ))}
791
+ </div>
792
+ </div>
630
793
  </div>
631
794
  ),
795
+ parameters: {
796
+ layout: "fullscreen",
797
+ docs: {
798
+ description: {
799
+ story:
800
+ "Real audio-app usage: genre tags in promotional colors, mood tags with system semantic colors, active filter chips with dismiss icons, and track metadata rows combining multiple tag types.",
801
+ },
802
+ },
803
+ },
632
804
  }