@citizenplane/pimp 16.0.2 → 16.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 (62) hide show
  1. package/dist/pimp.es.js +343 -311
  2. package/dist/pimp.umd.js +21 -21
  3. package/dist/style.css +1 -1
  4. package/package.json +2 -1
  5. package/src/components/CpAlert.vue +38 -30
  6. package/src/components/CpHeading.vue +4 -5
  7. package/src/components/CpText.vue +141 -0
  8. package/src/components/index.ts +2 -0
  9. package/src/stories/BaseInputLabel.stories.ts +36 -9
  10. package/src/stories/Colors.mdx +9 -0
  11. package/src/stories/Colors.stories.ts +177 -0
  12. package/src/stories/CpAccordion.stories.ts +187 -158
  13. package/src/stories/CpAccordionGroup.stories.ts +50 -94
  14. package/src/stories/CpAirlineLogo.stories.ts +49 -28
  15. package/src/stories/CpAlert.stories.ts +194 -157
  16. package/src/stories/CpBadge.stories.ts +259 -193
  17. package/src/stories/CpButton.stories.ts +257 -426
  18. package/src/stories/CpCheckbox.stories.ts +101 -29
  19. package/src/stories/CpContextualMenu.stories.ts +9 -8
  20. package/src/stories/CpDate.stories.ts +52 -25
  21. package/src/stories/CpDatepicker.stories.ts +57 -88
  22. package/src/stories/CpDialog.stories.ts +22 -1
  23. package/src/stories/CpHeading.stories.ts +59 -20
  24. package/src/stories/CpIcon.stories.ts +98 -31
  25. package/src/stories/CpInput.stories.ts +142 -67
  26. package/src/stories/CpItemActions.stories.ts +22 -27
  27. package/src/stories/CpLoader.stories.ts +54 -6
  28. package/src/stories/CpMenuItem.stories.ts +52 -26
  29. package/src/stories/CpMultiselect.stories.ts +52 -71
  30. package/src/stories/CpPartnerBadge.stories.ts +53 -74
  31. package/src/stories/CpRadio.stories.ts +44 -48
  32. package/src/stories/CpRadioGroup.stories.ts +46 -39
  33. package/src/stories/CpSelect.stories.ts +98 -39
  34. package/src/stories/CpSelectMenu.stories.ts +49 -57
  35. package/src/stories/CpSelectableButton.stories.ts +170 -81
  36. package/src/stories/CpSwitch.stories.ts +135 -133
  37. package/src/stories/CpTable.stories.ts +54 -1
  38. package/src/stories/CpTableEmptyState.stories.ts +11 -7
  39. package/src/stories/CpTabs.stories.ts +22 -4
  40. package/src/stories/CpTelInput.stories.ts +25 -23
  41. package/src/stories/CpText.stories.ts +131 -0
  42. package/src/stories/CpTextarea.stories.ts +59 -23
  43. package/src/stories/CpToast.stories.ts +53 -103
  44. package/src/stories/CpTooltip.stories.ts +82 -77
  45. package/src/stories/CpTransitionCounter.stories.ts +4 -0
  46. package/src/stories/CpTransitionExpand.stories.ts +11 -6
  47. package/src/stories/CpTransitionListItems.stories.ts +5 -0
  48. package/src/stories/CpTransitionSize.stories.ts +8 -0
  49. package/src/stories/CpTransitionSlide.stories.ts +4 -0
  50. package/src/stories/CpTransitionTabContent.stories.ts +4 -0
  51. package/src/stories/Dimensions.mdx +9 -0
  52. package/src/stories/Dimensions.stories.ts +119 -0
  53. package/src/stories/Easings.mdx +9 -0
  54. package/src/stories/Easings.stories.ts +101 -0
  55. package/src/stories/FocusRings.mdx +9 -0
  56. package/src/stories/FocusRings.stories.ts +74 -0
  57. package/src/stories/Shadows.mdx +9 -0
  58. package/src/stories/Shadows.stories.ts +100 -0
  59. package/src/stories/Typography.mdx +9 -0
  60. package/src/stories/Typography.stories.ts +181 -0
  61. package/src/stories/documentationStyles.ts +2 -10
  62. package/src/stories/tokenUtils.ts +259 -0
@@ -1,22 +1,26 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Args, Meta, StoryObj } from '@storybook/vue3'
2
2
 
3
3
  import CpAirlineLogo from '@/components/CpAirlineLogo.vue'
4
4
 
5
+ import { docCellStyle, docLabelStyle, docRowWrapStyle } from '@/stories/documentationStyles'
6
+
7
+ const airlineSizes = [16, 24, 32, 48] as const
8
+
5
9
  const meta = {
6
- title: 'Visual/CpAirlineLogo',
10
+ title: 'Atoms/CpAirlineLogo',
7
11
  component: CpAirlineLogo,
8
12
  parameters: {
9
13
  docs: {
10
14
  description: {
11
15
  component:
12
- 'A component that displays airline logos using IATA codes. Fetches logos from Kiwi.com CDN and displays them with customizable sizes.',
16
+ 'Displays an airline logo fetched from the Kiwi.com CDN using its IATA code. Falls back to a placeholder when the code is unknown.',
13
17
  },
14
18
  },
15
19
  },
16
20
  argTypes: {
17
21
  iataCode: {
18
22
  control: 'text',
19
- description: 'The IATA airline code (e.g., "LH" for Lufthansa, "BA" for British Airways)',
23
+ description: 'The IATA airline code (e.g. "LH" for Lufthansa, "BA" for British Airways)',
20
24
  table: {
21
25
  type: { summary: 'string' },
22
26
  defaultValue: { summary: '1L' },
@@ -31,21 +35,23 @@ const meta = {
31
35
  },
32
36
  },
33
37
  },
34
- tags: ['autodocs'],
35
38
  } satisfies Meta<typeof CpAirlineLogo>
36
39
 
37
40
  export default meta
38
41
  type Story = StoryObj<typeof meta>
39
42
 
40
- const defaultTemplate = '<CpAirlineLogo v-bind="args" />'
41
- const defaultRender = (args) => ({
43
+ const defaultRender = (args: Args) => ({
42
44
  components: { CpAirlineLogo },
43
45
  setup() {
44
46
  return { args }
45
47
  },
46
- template: defaultTemplate,
48
+ template: '<CpAirlineLogo v-bind="args" />',
47
49
  })
48
50
 
51
+ /**
52
+ * Default airline logo. Use the controls to experiment with each prop in
53
+ * isolation.
54
+ */
49
55
  export const Default: Story = {
50
56
  args: {
51
57
  iataCode: 'AF',
@@ -54,40 +60,55 @@ export const Default: Story = {
54
60
  render: defaultRender,
55
61
  }
56
62
 
63
+ /**
64
+ * Logo rendered at the sizes most commonly used across the design system.
65
+ */
66
+ export const Sizes: Story = {
67
+ parameters: { controls: { disable: true } },
68
+ render: () => ({
69
+ components: { CpAirlineLogo },
70
+ setup() {
71
+ return { airlineSizes, docCellStyle, docLabelStyle, docRowWrapStyle }
72
+ },
73
+ template: `
74
+ <div :style="docRowWrapStyle">
75
+ <div v-for="size in airlineSizes" :key="size" :style="docCellStyle">
76
+ <span :style="docLabelStyle">{{ size }}px</span>
77
+ <CpAirlineLogo iata-code="AF" :size="size" />
78
+ </div>
79
+ </div>
80
+ `,
81
+ }),
82
+ }
83
+
84
+ /**
85
+ * A sample of common airline logos displayed side by side.
86
+ */
57
87
  export const MultipleAirlines: Story = {
88
+ parameters: { controls: { disable: true } },
58
89
  render: () => ({
59
90
  components: { CpAirlineLogo },
60
91
  template: `
61
92
  <div style="display: flex; gap: 16px; align-items: center; flex-wrap: wrap;">
62
- <CpAirlineLogo iataCode="1L" :size="32" />
63
- <CpAirlineLogo iataCode="BA" :size="32" />
64
- <CpAirlineLogo iataCode="EK" :size="32" />
65
- <CpAirlineLogo iataCode="AA" :size="32" />
66
- <CpAirlineLogo iataCode="AF" :size="32" />
67
- <CpAirlineLogo iataCode="KL" :size="32" />
93
+ <CpAirlineLogo iata-code="1L" :size="32" />
94
+ <CpAirlineLogo iata-code="BA" :size="32" />
95
+ <CpAirlineLogo iata-code="EK" :size="32" />
96
+ <CpAirlineLogo iata-code="AA" :size="32" />
97
+ <CpAirlineLogo iata-code="AF" :size="32" />
98
+ <CpAirlineLogo iata-code="KL" :size="32" />
68
99
  </div>
69
100
  `,
70
101
  }),
71
- parameters: {
72
- docs: {
73
- description: {
74
- story: 'Multiple airline logos displayed together.',
75
- },
76
- },
77
- },
78
102
  }
79
103
 
104
+ /**
105
+ * With an empty `iataCode`, the component falls back to a neutral
106
+ * placeholder.
107
+ */
80
108
  export const EmptyIATACode: Story = {
81
109
  args: {
82
110
  iataCode: '',
83
111
  size: 32,
84
112
  },
85
113
  render: defaultRender,
86
- parameters: {
87
- docs: {
88
- description: {
89
- story: 'Shows the component with an empty IATA code.',
90
- },
91
- },
92
- },
93
114
  }
@@ -2,28 +2,26 @@ import type { Args, Meta, StoryObj } from '@storybook/vue3'
2
2
 
3
3
  import CpAlert from '@/components/CpAlert.vue'
4
4
 
5
- import {
6
- docCellStyle,
7
- docLabelStyle,
8
- docPageStyle,
9
- docRowColumnStyle,
10
- docSectionStyle,
11
- docTitleStyle,
12
- } from '@/stories/documentationStyles'
5
+ import { docCellStyle, docLabelStyle, docRowColumnStyle } from '@/stories/documentationStyles'
6
+
7
+ const alertColors = ['neutral', 'accent', 'success', 'warning', 'error'] as const
8
+ const alertTypes = ['expanded', 'inline'] as const
9
+
10
+ const alertStackStyle = `${docCellStyle} width: 100%; min-width: 420px;`
13
11
 
14
12
  const meta = {
15
- title: 'Feedback/CpAlert',
13
+ title: 'Molecules/CpAlert',
16
14
  component: CpAlert,
17
15
  argTypes: {
18
16
  color: {
19
17
  control: 'select',
20
- options: ['neutral', 'accent', 'success', 'warning', 'error'],
18
+ options: alertColors,
21
19
  description: 'The color variant of the alert',
22
20
  },
23
21
  type: {
24
22
  control: 'select',
25
- options: ['expanded', 'inline'],
26
- description: 'The type of the alert',
23
+ options: alertTypes,
24
+ description: 'The layout type of the alert',
27
25
  },
28
26
  title: {
29
27
  control: 'text',
@@ -31,16 +29,16 @@ const meta = {
31
29
  },
32
30
  content: {
33
31
  control: 'text',
34
- description: 'The text content of the alert',
32
+ description: 'The text content of the alert (expanded type only)',
35
33
  },
36
34
  icon: {
37
35
  control: 'select',
38
36
  options: ['', 'info', 'check', 'alert-triangle', 'x-octagon', 'bell', 'star'],
39
- description: 'Custom icon override',
37
+ description: 'Custom icon override. Defaults to the color-specific icon when empty.',
40
38
  },
41
39
  isClosable: {
42
40
  control: 'boolean',
43
- description: 'Whether the alert can be closed',
41
+ description: 'Whether the alert shows a close button',
44
42
  },
45
43
  primaryActionLabel: {
46
44
  control: 'text',
@@ -66,169 +64,208 @@ const defaultRender = (args: Args) => ({
66
64
  template: defaultTemplate,
67
65
  })
68
66
 
69
- export const Documentation: Story = {
70
- args: {},
67
+ /**
68
+ * Default alert with a neutral color, expanded layout, a title and a content
69
+ * message. Use the controls to experiment with each prop in isolation.
70
+ */
71
+ export const Default: Story = {
72
+ args: {
73
+ color: 'neutral',
74
+ type: 'expanded',
75
+ title: 'Alert title',
76
+ content: 'This is an informational alert message.',
77
+ isClosable: false,
78
+ icon: undefined,
79
+ primaryActionLabel: undefined,
80
+ secondaryActionLabel: undefined,
81
+ },
82
+ render: defaultRender,
83
+ }
84
+
85
+ /* -------------------------------------------------------------------------- */
86
+ /* Colors */
87
+ /* -------------------------------------------------------------------------- */
88
+
89
+ /**
90
+ * Every semantic color available for the alert, stacked vertically.
91
+ */
92
+ export const Colors: Story = {
93
+ parameters: { controls: { disable: true } },
71
94
  render: () => ({
72
95
  components: { CpAlert },
73
- setup: () => ({}),
96
+ setup() {
97
+ return { alertColors, docRowColumnStyle, alertStackStyle, docLabelStyle }
98
+ },
74
99
  template: `
75
- <div>
76
- <div style="${docPageStyle}">
77
- <h1 style="margin: 0 0 32px 0; font-size: 28px; font-weight: 700; color: #111;">CpAlert</h1>
100
+ <div :style="docRowColumnStyle">
101
+ <div v-for="color in alertColors" :key="color" :style="alertStackStyle">
102
+ <span :style="docLabelStyle">{{ color }}</span>
103
+ <CpAlert
104
+ :color="color"
105
+ :title="color.charAt(0).toUpperCase() + color.slice(1) + ' alert'"
106
+ content="This is an informational alert message."
107
+ />
108
+ </div>
109
+ </div>
110
+ `,
111
+ }),
112
+ }
78
113
 
79
- <section style="${docSectionStyle}">
80
- <h2 style="${docTitleStyle}">Color</h2>
81
- <div style="${docRowColumnStyle}">
82
- <div style="${docCellStyle}">
83
- <span style="${docLabelStyle}">neutral</span>
84
- <CpAlert color="neutral" title="Neutral alert" content="This is a neutral informational message." is-closable />
85
- </div>
86
- <div style="${docCellStyle}">
87
- <span style="${docLabelStyle}">accent</span>
88
- <CpAlert color="accent" title="Accent alert" content="This is an accent informational message." is-closable />
89
- </div>
90
- <div style="${docCellStyle}">
91
- <span style="${docLabelStyle}">success</span>
92
- <CpAlert color="success" title="Success alert" content="The operation completed successfully." is-closable />
93
- </div>
94
- <div style="${docCellStyle}">
95
- <span style="${docLabelStyle}">warning</span>
96
- <CpAlert color="warning" title="Warning alert" content="Please review before proceeding." is-closable />
97
- </div>
98
- <div style="${docCellStyle}">
99
- <span style="${docLabelStyle}">error</span>
100
- <CpAlert color="error" title="Error alert" content="Something went wrong. Please try again." is-closable />
101
- </div>
102
- </div>
103
- </section>
114
+ /* -------------------------------------------------------------------------- */
115
+ /* Layout types */
116
+ /* -------------------------------------------------------------------------- */
104
117
 
105
- <section style="${docSectionStyle}">
106
- <h2 style="${docTitleStyle}">Type</h2>
107
- <div style="${docRowColumnStyle}">
108
- <div style="${docCellStyle}">
109
- <span style="${docLabelStyle}">Expanded (default)</span>
110
- <CpAlert color="neutral" title="Neutral alert" content="This is a neutral informational message." is-closable />
111
- </div>
112
- <div style="${docCellStyle}">
113
- <CpAlert color="accent" title="Accent alert" content="This is an accent informational message." is-closable />
114
- </div>
115
- <div style="${docCellStyle}">
116
- <CpAlert color="success" title="Success alert" content="The operation completed successfully." is-closable />
117
- </div>
118
- <div style="${docCellStyle}">
119
- <CpAlert color="warning" title="Warning alert" content="Please review before proceeding." is-closable />
120
- </div>
121
- <div style="${docCellStyle}">
122
- <CpAlert color="error" title="Error alert" content="Something went wrong. Please try again." is-closable />
123
- </div>
124
- <div style="${docCellStyle}">
125
- <span style="${docLabelStyle}">inline</span>
126
- <CpAlert color="neutral" type="inline" title="Neutral alert" is-closable />
127
- </div>
128
- <div style="${docCellStyle}">
129
- <CpAlert color="accent" type="inline" title="Accent alert" is-closable />
130
- </div>
131
- <div style="${docCellStyle}">
132
- <CpAlert color="success" type="inline" title="Success alert" is-closable />
133
- </div>
134
- <div style="${docCellStyle}">
135
- <CpAlert color="warning" type="inline" title="Warning alert" is-closable />
136
- </div>
137
- <div style="${docCellStyle}">
138
- <CpAlert color="error" type="inline" title="Error alert" is-closable />
139
- </div>
140
- </div>
141
- </section>
118
+ /**
119
+ * `expanded` stacks the title, content and actions vertically. `inline` keeps
120
+ * them on a single line and hides the content area — best for short messages.
121
+ */
122
+ export const Types: Story = {
123
+ parameters: { controls: { disable: true } },
124
+ render: () => ({
125
+ components: { CpAlert },
126
+ setup() {
127
+ return { alertTypes, docRowColumnStyle, alertStackStyle, docLabelStyle }
128
+ },
129
+ template: `
130
+ <div :style="docRowColumnStyle">
131
+ <div v-for="type in alertTypes" :key="type" :style="alertStackStyle">
132
+ <span :style="docLabelStyle">{{ type }}</span>
133
+ <CpAlert
134
+ color="accent"
135
+ :type="type"
136
+ title="Alert title"
137
+ content="This is an informational alert message."
138
+ primary-action-label="Action"
139
+ />
140
+ </div>
141
+ </div>
142
+ `,
143
+ }),
144
+ }
142
145
 
143
- <section style="${docSectionStyle}">
144
- <h2 style="${docTitleStyle}">Text only</h2>
145
- <div style="${docRowColumnStyle}">
146
- <div style="${docCellStyle}">
147
- <CpAlert color="accent" content="This is an accent informational message." is-closable />
148
- </div>
149
- </div>
150
- </section>
146
+ /* -------------------------------------------------------------------------- */
147
+ /* Content combinations */
148
+ /* -------------------------------------------------------------------------- */
151
149
 
152
- <section style="${docSectionStyle}">
153
- <h2 style="${docTitleStyle}">is-closable</h2>
154
- <div style="${docRowColumnStyle}">
155
- <div style="${docCellStyle}">
156
- <span style="${docLabelStyle}">false</span>
157
- <CpAlert color="accent" title="Not closable" content="This alert cannot be dismissed." @on-close="console.log('alert closed')" />
158
- </div>
159
- <div style="${docCellStyle}">
160
- <span style="${docLabelStyle}">true on expanded</span>
161
- <CpAlert color="accent" title="Closable" content="This alert can be dismissed with the close button." :is-closable="true" @on-close="console.log('alert closed')" />
162
- </div>
163
- <div style="${docCellStyle}">
164
- <span style="${docLabelStyle}">true on inline</span>
165
- <CpAlert color="accent" type="inline" title="Closable" :is-closable="true" @on-close="console.log('alert closed')" />
166
- </div>
167
- </div>
168
- </section>
150
+ /**
151
+ * The three supported content combinations: title only, content only, and
152
+ * both title and content.
153
+ */
154
+ export const ContentLayouts: Story = {
155
+ parameters: { controls: { disable: true } },
156
+ render: () => ({
157
+ components: { CpAlert },
158
+ setup() {
159
+ return { docRowColumnStyle, alertStackStyle, docLabelStyle }
160
+ },
161
+ template: `
162
+ <div :style="docRowColumnStyle">
163
+ <div :style="alertStackStyle">
164
+ <span :style="docLabelStyle">Title only</span>
165
+ <CpAlert color="accent" title="Title only" />
166
+ </div>
167
+ <div :style="alertStackStyle">
168
+ <span :style="docLabelStyle">Content only</span>
169
+ <CpAlert color="accent" content="Only a description, without a title on top." />
170
+ </div>
171
+ <div :style="alertStackStyle">
172
+ <span :style="docLabelStyle">Title and content</span>
173
+ <CpAlert
174
+ color="accent"
175
+ title="Title and content"
176
+ content="The full layout with both title and description."
177
+ />
178
+ </div>
179
+ </div>
180
+ `,
181
+ }),
182
+ }
169
183
 
170
- <section style="${docSectionStyle}">
171
- <h2 style="${docTitleStyle}">Actions</h2>
172
- <div style="${docRowColumnStyle}">
173
- <div style="${docCellStyle}">
174
- <span style="${docLabelStyle}">without actions</span>
175
- <CpAlert color="accent" title="Without actions" />
176
- </div>
177
- <div style="${docCellStyle}">
178
- <span style="${docLabelStyle}">primary only</span>
179
- <CpAlert color="accent" title="With primary action" content="This alert has a primary action button." primary-action-label="Confirm" is-closable @primary-action-click="console.log('primary action clicked')" />
180
- </div>
181
- <div style="${docCellStyle}">
182
- <CpAlert color="accent" title="With primary action" type="inline" primary-action-label="Confirm" is-closable @primary-action-click="console.log('primary action clicked')" />
183
- </div>
184
- <div style="${docCellStyle}">
185
- <span style="${docLabelStyle}">primary + secondary</span>
186
- <CpAlert color="accent" title="With both actions" content="This alert has primary and secondary action buttons." primary-action-label="Confirm" secondary-action-label="Cancel" is-closable @primary-action-click="console.log('primary action clicked')" @secondary-action-click="console.log('secondary action clicked')" />
187
- </div>
188
- </div>
189
- </section>
184
+ /* -------------------------------------------------------------------------- */
185
+ /* Dismiss & actions */
186
+ /* -------------------------------------------------------------------------- */
190
187
 
191
- <section style="${docSectionStyle}">
192
- <h2 style="${docTitleStyle}">Custom icon</h2>
193
- <div style="${docRowColumnStyle}">
194
- <div style="${docCellStyle}">
195
- <span style="${docLabelStyle}">default icon (auto from color)</span>
196
- <CpAlert color="success" title="Default icon" content="Icon is derived from the color prop." />
197
- </div>
198
- <div style="${docCellStyle}">
199
- <span style="${docLabelStyle}">custom icon override</span>
200
- <CpAlert color="success" icon="star" title="Custom icon" content="Icon is overridden with a star." />
201
- </div>
202
- </div>
203
- </section>
188
+ /**
189
+ * All dismiss and action affordances shown side by side: closable, primary
190
+ * action, secondary action, and both actions together.
191
+ */
192
+ export const Actions: Story = {
193
+ parameters: { controls: { disable: true } },
194
+ render: () => ({
195
+ components: { CpAlert },
196
+ setup() {
197
+ return { docRowColumnStyle, alertStackStyle, docLabelStyle }
198
+ },
199
+ template: `
200
+ <div :style="docRowColumnStyle">
201
+ <div :style="alertStackStyle">
202
+ <span :style="docLabelStyle">Closable</span>
203
+ <CpAlert
204
+ color="accent"
205
+ title="Closable alert"
206
+ content="Click the × to dismiss."
207
+ :is-closable="true"
208
+ />
209
+ </div>
210
+ <div :style="alertStackStyle">
211
+ <span :style="docLabelStyle">Primary action</span>
212
+ <CpAlert
213
+ color="accent"
214
+ title="Action required"
215
+ content="Use the primary action to move forward."
216
+ primary-action-label="Confirm"
217
+ />
218
+ </div>
219
+ <div :style="alertStackStyle">
220
+ <span :style="docLabelStyle">Secondary action</span>
221
+ <CpAlert
222
+ color="accent"
223
+ title="Optional action"
224
+ content="The secondary action is visually less prominent."
225
+ secondary-action-label="Learn more"
226
+ />
227
+ </div>
228
+ <div :style="alertStackStyle">
229
+ <span :style="docLabelStyle">Both actions</span>
230
+ <CpAlert
231
+ color="accent"
232
+ title="Choose what to do"
233
+ content="Two actions are shown side by side."
234
+ primary-action-label="Confirm"
235
+ secondary-action-label="Cancel"
236
+ />
204
237
  </div>
205
238
  </div>
206
239
  `,
207
240
  }),
208
- parameters: {
209
- controls: { disable: true },
210
- docs: {
211
- source: {
212
- code: null,
213
- },
214
- },
215
- },
216
241
  }
217
242
 
218
- export const Default: Story = {
243
+ /* -------------------------------------------------------------------------- */
244
+ /* Icon */
245
+ /* -------------------------------------------------------------------------- */
246
+
247
+ /**
248
+ * Override the default color-specific icon with any icon name.
249
+ */
250
+ export const CustomIcon: Story = {
219
251
  args: {
252
+ ...Default.args,
220
253
  color: 'accent',
221
- type: 'expanded',
222
- title: 'Alert title',
223
- content: 'This is an informational alert message.',
224
- isClosable: true,
225
- icon: undefined,
226
- primaryActionLabel: undefined,
227
- secondaryActionLabel: undefined,
254
+ title: 'Custom icon',
255
+ content: 'Any icon from the design system can replace the default one.',
256
+ icon: 'bell',
228
257
  },
229
258
  render: defaultRender,
230
259
  }
231
260
 
261
+ /* -------------------------------------------------------------------------- */
262
+ /* Slots */
263
+ /* -------------------------------------------------------------------------- */
264
+
265
+ /**
266
+ * Customize every part of the alert using slots: `icon`, `title`, default
267
+ * (content), `primary-action` and `secondary-action`.
268
+ */
232
269
  export const WithSlots: Story = {
233
270
  args: {
234
271
  color: 'accent',