aural-ui 3.0.7 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1199
  2. package/dist/components/avatar/Avatar.stories.tsx +235 -237
  3. package/dist/components/badge/Badge.stories.tsx +379 -116
  4. package/dist/components/banner/Banner.stories.tsx +445 -391
  5. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  6. package/dist/components/button/Button.stories.tsx +585 -230
  7. package/dist/components/button/index.tsx +7 -7
  8. package/dist/components/card/Card.stories.tsx +619 -301
  9. package/dist/components/char-count/CharCount.stories.tsx +350 -248
  10. package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
  11. package/dist/components/chip/Chip.stories.tsx +362 -168
  12. package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -620
  13. package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
  14. package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
  15. package/dist/components/command/Command.stories.tsx +533 -856
  16. package/dist/components/dialog/Dialog.stories.tsx +505 -949
  17. package/dist/components/divider/Divider.stories.tsx +265 -502
  18. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  19. package/dist/components/drawer/Drawer.stories.tsx +659 -993
  20. package/dist/components/drawer/index.tsx +3 -3
  21. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
  22. package/dist/components/form/Form.stories.tsx +560 -274
  23. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  24. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1221
  25. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  26. package/dist/components/if-else/if-else.stories.tsx +370 -83
  27. package/dist/components/input/Input.stories.tsx +436 -368
  28. package/dist/components/label/Label.stories.tsx +156 -154
  29. package/dist/components/list/List.stories.tsx +485 -822
  30. package/dist/components/marquee/Marquee.stories.tsx +356 -694
  31. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
  32. package/dist/components/overlay/Overlay.stories.tsx +452 -818
  33. package/dist/components/overlay/index.tsx +4 -4
  34. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  35. package/dist/components/popover/Popover.stories.tsx +484 -873
  36. package/dist/components/radio/Radio.stories.tsx +432 -124
  37. package/dist/components/resizable/Resizable.stories.tsx +496 -752
  38. package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
  39. package/dist/components/search/Search.stories.tsx +314 -575
  40. package/dist/components/select/Select.stories.tsx +684 -787
  41. package/dist/components/sheet/Sheet.stories.tsx +671 -936
  42. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  43. package/dist/components/slider/Slider.stories.tsx +384 -737
  44. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  45. package/dist/components/switch/Switch.stories.tsx +461 -208
  46. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  47. package/dist/components/table/Table.stories.tsx +770 -914
  48. package/dist/components/tabs/Tabs.stories.tsx +459 -1400
  49. package/dist/components/tag/Tag.stories.tsx +714 -542
  50. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  51. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -148
  52. package/dist/components/toast/Toast.stories.tsx +452 -1333
  53. package/dist/components/toggle/Toggle.stories.tsx +488 -909
  54. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
  55. package/dist/components/typography/Typography.stories.tsx +406 -89
  56. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  57. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  58. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  59. package/dist/icons/Icons.stories.tsx +0 -12
  60. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +226 -1013
  61. package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
  62. package/dist/icons/all-icons.tsx +124 -87
  63. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
  64. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
  65. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
  66. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
  67. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
  68. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
  69. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
  70. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
  71. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
  72. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
  73. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
  74. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
  75. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
  76. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
  77. package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
  78. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
  79. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
  80. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
  81. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
  82. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
  83. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
  84. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
  85. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
  86. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
  87. package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
  88. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
  89. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
  90. package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
  91. package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
  92. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
  93. package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
  94. package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
  95. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
  96. package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
  97. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
  98. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
  99. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
  100. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
  101. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
  102. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
  103. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
  104. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
  105. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
  106. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
  107. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
  108. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
  109. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
  110. package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
  111. package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
  112. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
  113. package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
  114. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
  115. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
  116. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
  117. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
  118. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
  119. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
  120. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
  121. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
  122. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
  123. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
  124. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
  125. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
  126. package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
  127. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
  128. package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
  129. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
  130. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
  131. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
  132. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
  133. package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
  134. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
  135. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
  136. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
  137. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
  138. package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
  139. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
  140. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
  141. package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
  142. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
  143. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
  144. package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
  145. package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
  146. package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
  147. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
  148. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
  149. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
  150. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
  151. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
  152. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
  153. package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
  154. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
  155. package/dist/icons/spinner-solid-icon/index.tsx +6 -1
  156. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
  157. package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
  158. package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
  159. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
  160. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
  161. package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
  162. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
  163. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
  164. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
  165. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
  166. package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
  167. package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
  168. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
  169. package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
  170. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
  171. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
  172. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
  173. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
  174. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
  175. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
  176. package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
  177. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
  178. package/dist/index.cjs +84 -84
  179. package/dist/index.js +84 -84
  180. package/dist/styles/aural-all-theme.css +1222 -0
  181. package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
  182. package/dist/styles/aural-light-theme.css +1047 -0
  183. package/package.json +1 -1
@@ -1,6 +1,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 { Banner } from "."
5
7
 
6
8
  const meta: Meta<typeof Banner> = {
@@ -8,12 +10,29 @@ const meta: Meta<typeof Banner> = {
8
10
  component: Banner,
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 full-width notification strip for surfacing contextual feedback — positive, negative, warning, or info — in filled or outlined appearance. Supports optional icons, interactive click behaviour, and heading-only layouts.",
17
+ },
18
+ page: () => (
19
+ <AuralComponentDocsPage
20
+ features={[
21
+ {
22
+ title: "4 Semantic Variants",
23
+ description: "Positive to negative",
24
+ },
25
+ {
26
+ title: "Filled & Outlined",
27
+ description: "Two appearance styles",
28
+ },
29
+ {
30
+ title: "Interactive Support",
31
+ description: "onClick for CTAs",
32
+ },
33
+ ]}
34
+ />
35
+ ),
17
36
  },
18
37
  },
19
38
  tags: ["autodocs"],
@@ -54,84 +73,18 @@ const meta: Meta<typeof Banner> = {
54
73
  export default meta
55
74
  type Story = StoryObj<typeof Banner>
56
75
 
57
- export const Default: Story = {
58
- args: {
59
- heading: "Heading",
60
- paragraph: "Paragraph",
61
- variant: "info",
62
- appearance: "filled",
63
- leftIcon: true,
64
- rightIcon: true,
65
- },
76
+ // Filled-variant overrides: the component uses vivid surface tokens (green/blue/yellow-500)
77
+ // which fail contrast in light mode. Override with -sec surfaces paired with their text tokens.
78
+ const filledClassOverride: Record<string, string> = {
79
+ positive: "bg-fm-surface-positive-sec text-fm-positive-sec",
80
+ info: "bg-fm-surface-info-sec text-fm-info-sec",
81
+ warning: "bg-fm-yellow-200 text-fm-yellow-900",
82
+ negative: "", // red-1000 text on red-400 bg reads well in both themes
66
83
  }
67
84
 
68
- export const Positive: Story = {
69
- args: {
70
- heading: "Heading",
71
- paragraph: "Paragraph",
72
- variant: "positive",
73
- appearance: "filled",
74
- leftIcon: true,
75
- rightIcon: true,
76
- },
77
- }
85
+ // ─── 1. Playground ────────────────────────────────────────────────────────────
78
86
 
79
- export const PositiveOutlined: Story = {
80
- args: {
81
- heading: "Heading",
82
- paragraph: "Paragraph",
83
- variant: "positive",
84
- appearance: "outlined",
85
- leftIcon: true,
86
- rightIcon: true,
87
- },
88
- }
89
-
90
- export const Negative: Story = {
91
- args: {
92
- heading: "Heading",
93
- paragraph: "Paragraph",
94
- variant: "negative",
95
- appearance: "filled",
96
- leftIcon: true,
97
- rightIcon: true,
98
- },
99
- }
100
-
101
- export const NegativeOutlined: Story = {
102
- args: {
103
- heading: "Heading",
104
- paragraph: "Paragraph",
105
- variant: "negative",
106
- appearance: "outlined",
107
- leftIcon: true,
108
- rightIcon: true,
109
- },
110
- }
111
-
112
- export const Warning: Story = {
113
- args: {
114
- heading: "Heading",
115
- paragraph: "Paragraph",
116
- variant: "warning",
117
- appearance: "filled",
118
- leftIcon: true,
119
- rightIcon: true,
120
- },
121
- }
122
-
123
- export const WarningOutlined: Story = {
124
- args: {
125
- heading: "Heading",
126
- paragraph: "Paragraph",
127
- variant: "warning",
128
- appearance: "outlined",
129
- leftIcon: true,
130
- rightIcon: true,
131
- },
132
- }
133
-
134
- export const Info: Story = {
87
+ export const Playground: Story = {
135
88
  args: {
136
89
  heading: "Heading",
137
90
  paragraph: "Paragraph",
@@ -140,343 +93,444 @@ export const Info: Story = {
140
93
  leftIcon: true,
141
94
  rightIcon: true,
142
95
  },
143
- }
144
-
145
- export const InfoOutlined: Story = {
146
- args: {
147
- heading: "Heading",
148
- paragraph: "Paragraph",
149
- variant: "info",
150
- appearance: "outlined",
151
- leftIcon: true,
152
- rightIcon: true,
96
+ render: (args) => {
97
+ const override =
98
+ args.appearance === "filled"
99
+ ? filledClassOverride[args.variant ?? "info"]
100
+ : ""
101
+ return (
102
+ <div className="w-full max-w-2xl space-y-4">
103
+ <Banner {...args} className={override} />
104
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border px-4 py-3">
105
+ <code className="text-fm-secondary text-fm-md leading-fm-md font-(--font-fm-mono)">{`<Banner variant="${args.variant}" appearance="${args.appearance}" heading="${args.heading}" leftIcon={${args.leftIcon}} rightIcon={${args.rightIcon}} />`}</code>
106
+ </div>
107
+ </div>
108
+ )
153
109
  },
154
- }
155
-
156
- export const NoLeftIcon: Story = {
157
- args: {
158
- heading: "Heading",
159
- paragraph: "Paragraph",
160
- variant: "info",
161
- appearance: "filled",
162
- leftIcon: false,
110
+ parameters: {
111
+ docs: {
112
+ description: {
113
+ story:
114
+ "Adjust variant, appearance, heading, paragraph, and icon visibility using the controls panel in the sidebar.",
115
+ },
116
+ },
163
117
  },
164
118
  }
165
119
 
166
- export const NoRightIcon: Story = {
167
- args: {
168
- heading: "Heading",
169
- paragraph: "Paragraph",
170
- variant: "info",
171
- appearance: "filled",
172
- rightIcon: false,
173
- },
174
- }
120
+ // ─── 2. All Variants ──────────────────────────────────────────────────────────
175
121
 
176
- export const Clickable: Story = {
177
- args: {
178
- heading: "Heading",
179
- paragraph: "Paragraph",
180
- variant: "positive",
181
- appearance: "filled",
182
- onClick: () => alert("Banner clicked!"),
183
- },
184
- }
122
+ export const AllVariants: Story = {
123
+ render: () => (
124
+ <div className="space-y-8">
125
+ <div className="space-y-4">
126
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
127
+ Filled
128
+ </h4>
129
+ <div className="flex w-full max-w-2xl flex-col gap-3">
130
+ <div className="space-y-2">
131
+ <Banner
132
+ variant="positive"
133
+ appearance="filled"
134
+ heading="Heading"
135
+ paragraph="Paragraph"
136
+ leftIcon
137
+ rightIcon
138
+ className="bg-fm-surface-positive-sec text-fm-positive-sec"
139
+ />
140
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
141
+ Positive
142
+ </p>
143
+ </div>
144
+ <div className="space-y-2">
145
+ <Banner
146
+ variant="negative"
147
+ appearance="filled"
148
+ heading="Heading"
149
+ paragraph="Paragraph"
150
+ leftIcon
151
+ rightIcon
152
+ />
153
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
154
+ Negative
155
+ </p>
156
+ </div>
157
+ <div className="space-y-2">
158
+ <Banner
159
+ variant="warning"
160
+ appearance="filled"
161
+ heading="Heading"
162
+ paragraph="Paragraph"
163
+ leftIcon
164
+ rightIcon
165
+ className="bg-fm-yellow-200 text-fm-yellow-900"
166
+ />
167
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
168
+ Warning
169
+ </p>
170
+ </div>
171
+ <div className="space-y-2">
172
+ <Banner
173
+ variant="info"
174
+ appearance="filled"
175
+ heading="Heading"
176
+ paragraph="Paragraph"
177
+ leftIcon
178
+ rightIcon
179
+ className="bg-fm-surface-info-sec text-fm-info-sec"
180
+ />
181
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
182
+ Info
183
+ </p>
184
+ </div>
185
+ </div>
186
+ </div>
185
187
 
186
- export const HeadingOnly: Story = {
187
- args: {
188
- heading: "Heading",
189
- variant: "info",
190
- appearance: "filled",
191
- leftIcon: true,
192
- rightIcon: true,
188
+ <div className="space-y-4">
189
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
190
+ Outlined
191
+ </h4>
192
+ <div className="flex w-full max-w-2xl flex-col gap-3">
193
+ <div className="space-y-2">
194
+ <Banner
195
+ variant="positive"
196
+ appearance="outlined"
197
+ heading="Heading"
198
+ paragraph="Paragraph"
199
+ leftIcon
200
+ rightIcon
201
+ />
202
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
203
+ Positive
204
+ </p>
205
+ </div>
206
+ <div className="space-y-2">
207
+ <Banner
208
+ variant="negative"
209
+ appearance="outlined"
210
+ heading="Heading"
211
+ paragraph="Paragraph"
212
+ leftIcon
213
+ rightIcon
214
+ />
215
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
216
+ Negative
217
+ </p>
218
+ </div>
219
+ <div className="space-y-2">
220
+ <Banner
221
+ variant="warning"
222
+ appearance="outlined"
223
+ heading="Heading"
224
+ paragraph="Paragraph"
225
+ leftIcon
226
+ rightIcon
227
+ />
228
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
229
+ Warning
230
+ </p>
231
+ </div>
232
+ <div className="space-y-2">
233
+ <Banner
234
+ variant="info"
235
+ appearance="outlined"
236
+ heading="Heading"
237
+ paragraph="Paragraph"
238
+ leftIcon
239
+ rightIcon
240
+ />
241
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
242
+ Info
243
+ </p>
244
+ </div>
245
+ </div>
246
+ </div>
247
+ </div>
248
+ ),
249
+ parameters: {
250
+ docs: {
251
+ description: {
252
+ story:
253
+ "All four variants (positive, negative, warning, info) in both filled and outlined appearances.",
254
+ },
255
+ },
193
256
  },
194
257
  }
195
258
 
196
- export const WithBothIcons: Story = {
197
- args: {
198
- heading: "Heading",
199
- paragraph: "Paragraph",
200
- variant: "info",
201
- appearance: "filled",
202
- leftIcon: true,
203
- rightIcon: true,
204
- },
205
- }
259
+ // ─── 3. Configurations ────────────────────────────────────────────────────────
206
260
 
207
- export const WithCustomIcons: Story = {
261
+ export const Configurations: Story = {
208
262
  render: () => (
209
- <Banner
210
- heading="Custom Icons"
211
- paragraph="This banner has custom icons on both sides"
212
- variant="positive"
213
- appearance="filled"
214
- leftIcon={<span className="mr-4 text-xl">🚀</span>}
215
- rightIcon={<span className="ml-4 text-xl">✨</span>}
216
- />
217
- ),
218
- }
263
+ <div className="space-y-8">
264
+ <div className="space-y-4">
265
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
266
+ Icon Placement
267
+ </h4>
268
+ <div className="flex w-full max-w-2xl flex-col gap-3">
269
+ <div className="space-y-2">
270
+ <Banner
271
+ variant="info"
272
+ appearance="outlined"
273
+ heading="Both Icons"
274
+ paragraph="Left feature icon and right arrow icon"
275
+ leftIcon
276
+ rightIcon
277
+ />
278
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
279
+ Both icons
280
+ </p>
281
+ </div>
282
+ <div className="space-y-2">
283
+ <Banner
284
+ variant="info"
285
+ appearance="outlined"
286
+ heading="Left Icon Only"
287
+ paragraph="Feature icon on the left, no right arrow"
288
+ leftIcon
289
+ rightIcon={false}
290
+ />
291
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
292
+ Left icon only
293
+ </p>
294
+ </div>
295
+ <div className="space-y-2">
296
+ <Banner
297
+ variant="info"
298
+ appearance="outlined"
299
+ heading="Right Icon Only"
300
+ paragraph="No left icon, arrow on the right"
301
+ leftIcon={false}
302
+ rightIcon
303
+ />
304
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
305
+ Right icon only
306
+ </p>
307
+ </div>
308
+ <div className="space-y-2">
309
+ <Banner
310
+ variant="info"
311
+ appearance="outlined"
312
+ heading="No Icons"
313
+ paragraph="Clean layout with no icons on either side"
314
+ leftIcon={false}
315
+ rightIcon={false}
316
+ />
317
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
318
+ No icons
319
+ </p>
320
+ </div>
321
+ </div>
322
+ </div>
219
323
 
220
- export const ReactNodeContent: Story = {
221
- render: () => (
222
- <Banner
223
- heading={
224
- <span className="font-bold text-[#ffffff]">Rich Text Heading</span>
225
- }
226
- paragraph={
227
- <div className="flex items-center gap-2">
228
- <span className="text-[#ffffff]">Rich content</span>
229
- <span className="inline-block h-2 w-2 rounded-full bg-[#ffffff]"></span>
230
- <span className="text-[#ffffff]">with components</span>
324
+ <div className="space-y-4">
325
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
326
+ Content Layout
327
+ </h4>
328
+ <div className="flex w-full max-w-2xl flex-col gap-3">
329
+ <div className="space-y-2">
330
+ <Banner
331
+ variant="positive"
332
+ appearance="outlined"
333
+ heading="Heading and Paragraph"
334
+ paragraph="Both heading and supporting paragraph shown together"
335
+ leftIcon
336
+ rightIcon
337
+ />
338
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
339
+ Heading + paragraph
340
+ </p>
341
+ </div>
342
+ <div className="space-y-2">
343
+ <Banner
344
+ variant="positive"
345
+ appearance="outlined"
346
+ heading="Heading Only"
347
+ leftIcon
348
+ />
349
+ <p className="text-fm-secondary font-fm-text text-fm-sm leading-fm-sm text-center">
350
+ Heading only
351
+ </p>
352
+ </div>
231
353
  </div>
232
- }
233
- variant="info"
234
- appearance="filled"
235
- leftIcon={true}
236
- />
354
+ </div>
355
+ </div>
237
356
  ),
357
+ parameters: {
358
+ docs: {
359
+ description: {
360
+ story:
361
+ "Icon placement configurations (both, left-only, right-only, none) and content layout variations (heading + paragraph vs heading only).",
362
+ },
363
+ },
364
+ },
238
365
  }
239
366
 
240
- export const AllBanners = () => {
241
- return (
242
- <div className="flex w-full max-w-2xl flex-col gap-4">
243
- <h2 className="text-fm-primary text-xl font-bold uppercase">POSITIVE</h2>
244
- <Banner
245
- variant="positive"
246
- appearance="filled"
247
- heading="Heading"
248
- paragraph="Paragraph"
249
- leftIcon={true}
250
- rightIcon={true}
251
- />
252
- <Banner
253
- variant="positive"
254
- appearance="outlined"
255
- heading="Heading"
256
- paragraph="Paragraph"
257
- leftIcon={true}
258
- rightIcon={true}
259
- />
260
-
261
- <h2 className="text-fm-primary mt-4 text-xl font-bold uppercase">
262
- NEGATIVE
263
- </h2>
264
- <Banner
265
- variant="negative"
266
- appearance="filled"
267
- heading="Heading"
268
- paragraph="Paragraph"
269
- leftIcon={true}
270
- rightIcon={true}
271
- />
272
- <Banner
273
- variant="negative"
274
- appearance="outlined"
275
- heading="Heading"
276
- paragraph="Paragraph"
277
- leftIcon={true}
278
- rightIcon={true}
279
- />
280
-
281
- <h2 className="text-fm-primary mt-4 text-xl font-bold uppercase">INFO</h2>
282
- <Banner
283
- variant="info"
284
- appearance="filled"
285
- heading="Heading"
286
- paragraph="Paragraph"
287
- leftIcon={true}
288
- rightIcon={true}
289
- />
290
- <Banner
291
- variant="info"
292
- appearance="outlined"
293
- heading="Heading"
294
- paragraph="Paragraph"
295
- leftIcon={true}
296
- rightIcon={true}
297
- />
367
+ // ─── 4. Interactive ───────────────────────────────────────────────────────────
298
368
 
299
- <h2 className="text-fm-primary mt-4 text-xl font-bold uppercase">
300
- WARNING
301
- </h2>
302
- <Banner
303
- variant="warning"
304
- appearance="filled"
305
- heading="Heading"
306
- paragraph="Paragraph"
307
- leftIcon={true}
308
- rightIcon={true}
309
- />
310
- <Banner
311
- variant="warning"
312
- appearance="outlined"
313
- heading="Heading"
314
- paragraph="Paragraph"
315
- leftIcon={true}
316
- rightIcon={true}
317
- />
369
+ type BannerVariant = "positive" | "negative" | "warning" | "info"
318
370
 
319
- <h2 className="text-fm-primary mt-8 text-xl font-bold uppercase">
320
- INTERACTIVE EXAMPLES
321
- </h2>
322
- <Banner
323
- variant="positive"
324
- appearance="filled"
325
- heading="Click me"
326
- paragraph="This banner is clickable"
327
- leftIcon={true}
328
- rightIcon={true}
329
- onClick={() => alert("Banner clicked!")}
330
- />
331
-
332
- <h2 className="text-fm-primary mt-8 text-xl font-bold uppercase">
333
- CUSTOM ICON EXAMPLES
334
- </h2>
335
- <Banner
336
- variant="info"
337
- appearance="filled"
338
- heading="Custom left icon"
339
- paragraph="This banner has a custom left icon"
340
- leftIcon={<span className="mr-4 text-xl">🔔</span>}
341
- rightIcon={true}
342
- />
343
- <Banner
344
- variant="warning"
345
- appearance="outlined"
346
- heading="Custom right icon"
347
- paragraph="This banner has a custom right icon"
348
- leftIcon={true}
349
- rightIcon={<span className="ml-4 text-xl">👉</span>}
350
- />
351
- </div>
371
+ const InteractiveStory = () => {
372
+ const [variant, setVariant] = React.useState<BannerVariant>("positive")
373
+ const [appearance, setAppearance] = React.useState<"filled" | "outlined">(
374
+ "outlined"
352
375
  )
353
- }
376
+ const [triggered, setTriggered] = React.useState(false)
354
377
 
355
- export const IconVariants = () => {
356
- return (
357
- <div className="flex w-full max-w-2xl flex-col gap-4">
358
- <h2 className="text-fm-primary text-xl font-bold uppercase">
359
- WITH ICONS
360
- </h2>
361
- <Banner
362
- variant="info"
363
- appearance="filled"
364
- heading="Both icons"
365
- paragraph="This banner has both left and right icons"
366
- leftIcon={true}
367
- rightIcon={true}
368
- />
369
- <Banner
370
- variant="info"
371
- appearance="filled"
372
- heading="Left icon only"
373
- paragraph="This banner has only a left icon"
374
- leftIcon={true}
375
- rightIcon={false}
376
- />
377
- <Banner
378
- variant="info"
379
- appearance="filled"
380
- heading="Right icon only"
381
- paragraph="This banner has only a right icon"
382
- leftIcon={false}
383
- rightIcon={true}
384
- />
385
- <Banner
386
- variant="info"
387
- appearance="filled"
388
- heading="No icons"
389
- paragraph="This banner has no icons"
390
- leftIcon={false}
391
- rightIcon={false}
392
- />
393
- </div>
394
- )
395
- }
378
+ const variants: BannerVariant[] = ["positive", "negative", "warning", "info"]
379
+ const override = appearance === "filled" ? filledClassOverride[variant] : ""
396
380
 
397
- export const ContentVariants = () => {
398
381
  return (
399
- <div className="flex w-full max-w-2xl flex-col gap-4">
400
- <h2 className="text-fm-primary text-xl font-bold uppercase">
401
- CONTENT VARIATIONS
402
- </h2>
403
- <Banner
404
- variant="positive"
405
- appearance="filled"
406
- heading="Heading only"
407
- leftIcon={true}
408
- />
409
- <Banner
410
- variant="negative"
411
- appearance="filled"
412
- paragraph="Paragraph only (no heading)"
413
- leftIcon={true}
414
- />
415
- <Banner
416
- variant="warning"
417
- appearance="filled"
418
- heading={
419
- <div className="flex items-center gap-2">
420
- <span>Heading with </span>
421
- <span className="bg-fm-surface-warning text-fm-neutral-100 rounded px-2 py-1">
422
- Component
423
- </span>
382
+ <div className="w-full p-8">
383
+ <div className="mx-auto max-w-3xl space-y-6">
384
+ <div className="grid grid-cols-1 gap-6 lg:grid-cols-3">
385
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary space-y-5 rounded-xl border p-5">
386
+ <p className="text-fm-primary font-fm-brand text-fm-sm leading-fm-sm font-semibold tracking-widest uppercase">
387
+ Variant
388
+ </p>
389
+ <div className="flex flex-col gap-2">
390
+ {variants.map((v) => (
391
+ <button
392
+ key={v}
393
+ onClick={() => {
394
+ setVariant(v)
395
+ setTriggered(false)
396
+ }}
397
+ className={`font-fm-text text-fm-sm leading-fm-sm rounded-lg px-3 py-2 text-left capitalize transition-colors outline-none ${
398
+ variant === v
399
+ ? "bg-fm-surface-contrast text-fm-contrast"
400
+ : "bg-fm-surface-primary text-fm-secondary hover:text-fm-primary"
401
+ }`}
402
+ >
403
+ {v}
404
+ </button>
405
+ ))}
406
+ </div>
407
+ <div className="border-fm-divider-secondary border-t pt-4" />
408
+ <p className="text-fm-primary font-fm-brand text-fm-sm leading-fm-sm font-semibold tracking-widest uppercase">
409
+ Appearance
410
+ </p>
411
+ <div className="flex flex-col gap-2">
412
+ {(["filled", "outlined"] as const).map((a) => (
413
+ <button
414
+ key={a}
415
+ onClick={() => setAppearance(a)}
416
+ className={`font-fm-text text-fm-sm leading-fm-sm rounded-lg px-3 py-2 text-left capitalize transition-colors outline-none ${
417
+ appearance === a
418
+ ? "bg-fm-surface-contrast text-fm-contrast"
419
+ : "bg-fm-surface-primary text-fm-secondary hover:text-fm-primary"
420
+ }`}
421
+ >
422
+ {a}
423
+ </button>
424
+ ))}
425
+ </div>
424
426
  </div>
425
- }
426
- paragraph="Normal paragraph"
427
- leftIcon={true}
428
- />
429
- <Banner
430
- variant="info"
431
- appearance="filled"
432
- heading="Normal heading"
433
- paragraph={
434
- <div className="flex items-center gap-2">
435
- <span>Paragraph with </span>
436
- <span className="bg-fm-surface-info text-fm-neutral-100 rounded px-2 py-1">
437
- Component
438
- </span>
427
+
428
+ <div className="flex flex-col gap-3 lg:col-span-2">
429
+ <Banner
430
+ variant={variant}
431
+ appearance={appearance}
432
+ heading={triggered ? "Banner clicked!" : "Click this banner"}
433
+ paragraph={
434
+ triggered
435
+ ? "Action triggered successfully"
436
+ : "This banner is interactive — try clicking it"
437
+ }
438
+ leftIcon
439
+ rightIcon
440
+ onClick={() => setTriggered((prev) => !prev)}
441
+ className={override}
442
+ />
443
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border px-4 py-3">
444
+ <code className="text-fm-secondary text-fm-md leading-fm-md font-(--font-fm-mono)">{`<Banner variant="${variant}" appearance="${appearance}" onClick={handler} />`}</code>
445
+ </div>
439
446
  </div>
440
- }
441
- leftIcon={true}
442
- />
447
+ </div>
448
+ </div>
443
449
  </div>
444
450
  )
445
451
  }
446
452
 
447
- export const InteractiveVariants = () => {
448
- return (
449
- <div className="flex w-full max-w-2xl flex-col gap-4">
450
- <h2 className="text-fm-primary text-xl font-bold uppercase">
451
- INTERACTIVE BANNERS
452
- </h2>
453
- <Banner
454
- variant="positive"
455
- appearance="filled"
456
- heading="Clickable banner"
457
- paragraph="Click me to trigger an action"
458
- leftIcon={true}
459
- rightIcon={true}
460
- onClick={() => alert("Positive banner clicked!")}
461
- />
462
- <Banner
463
- variant="negative"
464
- appearance="outlined"
465
- heading="Clickable outlined banner"
466
- paragraph="Click me to trigger an action"
467
- leftIcon={true}
468
- rightIcon={true}
469
- onClick={() => alert("Negative banner clicked!")}
470
- />
471
- <Banner
472
- variant="info"
473
- appearance="filled"
474
- heading="No right arrow"
475
- paragraph="This banner is clickable but has no right arrow"
476
- leftIcon={true}
477
- rightIcon={false}
478
- onClick={() => alert("Info banner clicked!")}
479
- />
453
+ export const Interactive: Story = {
454
+ render: () => <InteractiveStory />,
455
+ parameters: {
456
+ layout: "fullscreen",
457
+ docs: {
458
+ description: {
459
+ story:
460
+ "Clickable banner with an onClick handler. Select a variant and appearance to preview interactive behaviour.",
461
+ },
462
+ },
463
+ },
464
+ }
465
+
466
+ // ─── 5. Use Cases ─────────────────────────────────────────────────────────────
467
+
468
+ export const UseCases: Story = {
469
+ render: () => (
470
+ <div className="mx-auto max-w-3xl space-y-8 p-8">
471
+ <div className="space-y-4">
472
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
473
+ Upload & Processing Feedback
474
+ </h4>
475
+ <div className="mx-auto max-w-2xl space-y-3">
476
+ <Banner
477
+ variant="positive"
478
+ appearance="outlined"
479
+ heading="Track uploaded successfully"
480
+ paragraph="Your track is now being processed and will be live shortly"
481
+ leftIcon
482
+ rightIcon
483
+ />
484
+ <Banner
485
+ variant="warning"
486
+ appearance="outlined"
487
+ heading="Audio quality is low"
488
+ paragraph="Consider re-uploading at 320 kbps or higher for best results"
489
+ leftIcon
490
+ rightIcon
491
+ />
492
+ <Banner
493
+ variant="negative"
494
+ appearance="outlined"
495
+ heading="Upload failed"
496
+ paragraph="File format not supported. Please use MP3, WAV, or FLAC"
497
+ leftIcon
498
+ rightIcon
499
+ />
500
+ </div>
501
+ </div>
502
+
503
+ <div className="space-y-4">
504
+ <h4 className="text-fm-secondary font-fm-text text-fm-md leading-fm-md font-medium">
505
+ Account & Subscription
506
+ </h4>
507
+ <div className="mx-auto max-w-2xl space-y-3">
508
+ <Banner
509
+ variant="info"
510
+ appearance="outlined"
511
+ heading="Your trial ends in 3 days"
512
+ paragraph="Upgrade to keep access to all features"
513
+ leftIcon
514
+ rightIcon
515
+ />
516
+ <Banner
517
+ variant="positive"
518
+ appearance="outlined"
519
+ heading="Subscription renewed"
520
+ paragraph="Your Pro plan has been renewed for another 12 months"
521
+ leftIcon
522
+ />
523
+ </div>
524
+ </div>
480
525
  </div>
481
- )
526
+ ),
527
+ parameters: {
528
+ layout: "fullscreen",
529
+ docs: {
530
+ description: {
531
+ story:
532
+ "Real-world usage: upload and processing status feedback, and account subscription notification banners.",
533
+ },
534
+ },
535
+ },
482
536
  }