@citizenplane/pimp 16.1.0 → 16.2.1

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 (61) hide show
  1. package/dist/pimp.es.js +1569 -1572
  2. package/dist/pimp.umd.js +8 -8
  3. package/dist/style.css +1 -1
  4. package/package.json +10 -9
  5. package/src/components/CpDate.vue +3 -1
  6. package/src/components/CpMultiselect.vue +2 -5
  7. package/src/components/CpTable.vue +4 -2
  8. package/src/components/CpTableColumnEditor.vue +4 -1
  9. package/src/components/CpTelInput.vue +18 -12
  10. package/src/components/CpToast.vue +1 -1
  11. package/src/components/CpTransitionExpand.vue +23 -20
  12. package/src/libs/CoreDatepicker.vue +1 -0
  13. package/src/stories/BaseInputLabel.stories.ts +1 -1
  14. package/src/stories/Colors.stories.ts +1 -1
  15. package/src/stories/CpAccordion.stories.ts +1 -1
  16. package/src/stories/CpAccordionGroup.stories.ts +1 -1
  17. package/src/stories/CpAirlineLogo.stories.ts +5 -2
  18. package/src/stories/CpAlert.stories.ts +1 -1
  19. package/src/stories/CpBadge.stories.ts +1 -1
  20. package/src/stories/CpButton.stories.ts +1 -1
  21. package/src/stories/CpCheckbox.stories.ts +1 -1
  22. package/src/stories/CpContextualMenu.stories.ts +5 -1
  23. package/src/stories/CpDate.stories.ts +1 -1
  24. package/src/stories/CpDatepicker.stories.ts +22 -18
  25. package/src/stories/CpDialog.stories.ts +1 -1
  26. package/src/stories/CpHeading.stories.ts +2 -1
  27. package/src/stories/CpIcon.stories.ts +1 -1
  28. package/src/stories/CpInput.stories.ts +22 -6
  29. package/src/stories/CpItemActions.stories.ts +20 -4
  30. package/src/stories/CpLoader.stories.ts +1 -1
  31. package/src/stories/CpMenuItem.stories.ts +1 -1
  32. package/src/stories/CpMultiselect.stories.ts +1 -1
  33. package/src/stories/CpPartnerBadge.stories.ts +5 -2
  34. package/src/stories/CpRadio.stories.ts +1 -1
  35. package/src/stories/CpRadioGroup.stories.ts +1 -1
  36. package/src/stories/CpSelect.stories.ts +18 -3
  37. package/src/stories/CpSelectMenu.stories.ts +64 -45
  38. package/src/stories/CpSelectableButton.stories.ts +1 -1
  39. package/src/stories/CpSwitch.stories.ts +1 -1
  40. package/src/stories/CpTable.stories.ts +15 -12
  41. package/src/stories/CpTableEmptyState.stories.ts +1 -1
  42. package/src/stories/CpTabs.stories.ts +1 -1
  43. package/src/stories/CpTelInput.stories.ts +13 -6
  44. package/src/stories/CpText.stories.ts +1 -1
  45. package/src/stories/CpTextarea.stories.ts +15 -4
  46. package/src/stories/CpToast.stories.ts +22 -6
  47. package/src/stories/CpTooltip.stories.ts +1 -1
  48. package/src/stories/CpTransitionCounter.stories.ts +1 -1
  49. package/src/stories/CpTransitionExpand.stories.ts +1 -1
  50. package/src/stories/CpTransitionListItems.stories.ts +1 -1
  51. package/src/stories/CpTransitionSize.stories.ts +1 -1
  52. package/src/stories/CpTransitionSlide.stories.ts +1 -1
  53. package/src/stories/CpTransitionTabContent.stories.ts +1 -1
  54. package/src/stories/Dimensions.stories.ts +1 -1
  55. package/src/stories/Easings.stories.ts +1 -1
  56. package/src/stories/FocusRings.stories.ts +1 -1
  57. package/src/stories/Shadows.stories.ts +1 -1
  58. package/src/stories/Typography.stories.ts +1 -1
  59. package/src/types/primevue-toasteventbus.d.ts +14 -0
  60. package/tsconfig.json +1 -0
  61. package/.lintstagedrc.json +0 -4
@@ -1,6 +1,6 @@
1
1
  import { ref, toValue } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpMultiselect from '@/components/CpMultiselect.vue'
6
6
 
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
 
3
3
  import CpPartnerBadge from '@/components/CpPartnerBadge.vue'
4
4
 
@@ -42,10 +42,13 @@ const meta = {
42
42
  } satisfies Meta<typeof CpPartnerBadge>
43
43
 
44
44
  export default meta
45
+
45
46
  type Story = StoryObj<typeof meta>
46
47
 
48
+ type PartnerBadgeStoryArgs = NonNullable<Story['args']>
49
+
47
50
  const defaultTemplate = '<CpPartnerBadge v-bind="args" />'
48
- const defaultRender = (args) => ({
51
+ const defaultRender = (args: PartnerBadgeStoryArgs) => ({
49
52
  components: { CpPartnerBadge },
50
53
  setup() {
51
54
  return { args }
@@ -1,6 +1,6 @@
1
1
  import { ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpRadio from '@/components/CpRadio.vue'
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpRadioGroup from '@/components/CpRadioGroup.vue'
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpInput from '@/components/CpInput.vue'
6
6
  import CpSelect from '@/components/CpSelect.vue'
@@ -76,6 +76,7 @@ const meta = {
76
76
  } satisfies Meta<typeof CpSelect>
77
77
 
78
78
  export default meta
79
+
79
80
  type Story = StoryObj<typeof meta>
80
81
 
81
82
  const sampleOptions = [
@@ -124,7 +125,14 @@ export const Default: Story = {
124
125
  * All sizes rendered side by side, from `sm` to `lg`.
125
126
  */
126
127
  export const Sizes: Story = {
127
- parameters: { controls: { disable: true } },
128
+ parameters: {
129
+ controls: {
130
+ disable: true,
131
+ },
132
+ },
133
+ args: {
134
+ ...Default.args,
135
+ },
128
136
  render: () => ({
129
137
  components: { CpSelect },
130
138
  setup() {
@@ -156,7 +164,14 @@ export const Sizes: Story = {
156
164
  * Default, required, disabled and invalid states compared side by side.
157
165
  */
158
166
  export const States: Story = {
159
- parameters: { controls: { disable: true } },
167
+ parameters: {
168
+ controls: {
169
+ disable: true,
170
+ },
171
+ },
172
+ args: {
173
+ ...Default.args,
174
+ },
160
175
  render: () => ({
161
176
  components: { CpSelect },
162
177
  setup() {
@@ -1,9 +1,14 @@
1
1
  import { ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpSelectMenu from '@/components/CpSelectMenu.vue'
6
6
 
7
+ interface SelectValue {
8
+ label: string
9
+ value: string
10
+ }
11
+
7
12
  const meta = {
8
13
  title: 'Molecules/CpSelectMenu',
9
14
  component: CpSelectMenu,
@@ -23,8 +28,21 @@ const meta = {
23
28
  } satisfies Meta<typeof CpSelectMenu>
24
29
 
25
30
  export default meta
31
+
26
32
  type Story = StoryObj<typeof meta>
27
33
 
34
+ type SelectMenuStoryArgs = NonNullable<Story['args']>
35
+
36
+ function pickSelectMenuBindProps(args: SelectMenuStoryArgs) {
37
+ return {
38
+ closeOnSelect: args.closeOnSelect,
39
+ dropdownEmptyViewPlaceholder: args.dropdownEmptyViewPlaceholder,
40
+ dropdownFilterPlaceholder: args.dropdownFilterPlaceholder,
41
+ dropdownTitle: args.dropdownTitle,
42
+ hasFilter: args.hasFilter,
43
+ }
44
+ }
45
+
28
46
  const sampleOptions = [
29
47
  { value: '1', label: 'Apple' },
30
48
  { value: '2', label: 'Banana' },
@@ -49,70 +67,71 @@ export const Default: Story = {
49
67
  dropdownEmptyViewPlaceholder: 'No option found',
50
68
  closeOnSelect: true,
51
69
  },
52
- render: (args) => ({
70
+ render: (args: SelectMenuStoryArgs) => ({
53
71
  components: { CpSelectMenu },
54
72
  setup() {
55
- const selectedValue = ref(args.selectedValue)
56
- return { args, selectedValue }
73
+ const selectedValue = ref<SelectValue>({ ...args.selectedValue })
74
+ const values = ref<SelectValue[]>([...(args.values ?? [])])
75
+ const menuProps = pickSelectMenuBindProps(args)
76
+
77
+ const onUpdateSelectedValue = (data: SelectValue) => {
78
+ selectedValue.value = data
79
+ }
80
+
81
+ return { menuProps, onUpdateSelectedValue, selectedValue, values }
57
82
  },
58
83
  template: `
59
84
  <div style="max-width: 400px; padding: 20px;">
60
85
  <CpSelectMenu
61
86
  v-model:selectedValue="selectedValue"
62
- v-bind="args"
87
+ v-bind="menuProps"
88
+ :values="values"
63
89
  @update:selected-value="onUpdateSelectedValue"
64
90
  />
65
91
  </div>
66
92
  `,
67
- methods: {
68
- onUpdateSelectedValue(data: unknown) {
69
- args.selectedValue = data
70
- },
71
- },
72
93
  }),
73
94
  }
74
95
 
75
- /**
76
- * Enable `hasFilter` to render a search input above the list. The
77
- * `@on-filter-change` event lets the caller filter its own options list.
78
- */
79
96
  export const WithFilter: Story = {
80
97
  args: {
81
98
  ...Default.args,
82
99
  hasFilter: true,
83
100
  dropdownTitle: 'Search for a fruit',
84
101
  },
85
- render: (args) => {
86
- const searchQuery = ref('')
87
- return {
88
- components: { CpSelectMenu },
89
- setup() {
90
- const selectedValue = ref(args.selectedValue)
91
- return { args, selectedValue }
92
- },
93
- template: `
94
- <div style="max-width: 400px; padding: 20px;">
95
- <CpSelectMenu
96
- v-model:selectedValue="selectedValue"
97
- v-bind="args"
98
- @on-filter-change="onFilterChange"
99
- @update:selected-value="onUpdateSelectedValue"
100
- />
101
- </div>
102
- `,
103
- methods: {
104
- onFilterChange(data: string) {
105
- searchQuery.value = data
106
- args.values = sampleOptions.filter((option) =>
107
- option.label.toLowerCase().includes(searchQuery.value.toLowerCase()),
108
- )
109
- },
110
- onUpdateSelectedValue(data: unknown) {
111
- args.selectedValue = data
112
- },
113
- },
114
- }
115
- },
102
+ render: (args: SelectMenuStoryArgs) => ({
103
+ components: { CpSelectMenu },
104
+ setup() {
105
+ const selectedValue = ref<SelectValue>({ ...args.selectedValue })
106
+ const values = ref<SelectValue[]>([...(args.values ?? [])])
107
+ const menuProps = pickSelectMenuBindProps(args)
108
+ const searchQuery = ref('')
109
+
110
+ const onUpdateSelectedValue = (data: SelectValue) => {
111
+ selectedValue.value = data
112
+ }
113
+
114
+ const onFilterChange = (data: string) => {
115
+ searchQuery.value = data
116
+ values.value = sampleOptions.filter((option) =>
117
+ option.label.toLowerCase().includes(searchQuery.value.toLowerCase()),
118
+ )
119
+ }
120
+
121
+ return { menuProps, onFilterChange, onUpdateSelectedValue, selectedValue, values }
122
+ },
123
+ template: `
124
+ <div style="max-width: 400px; padding: 20px;">
125
+ <CpSelectMenu
126
+ v-model:selectedValue="selectedValue"
127
+ v-bind="menuProps"
128
+ :values="values"
129
+ @on-filter-change="onFilterChange"
130
+ @update:selected-value="onUpdateSelectedValue"
131
+ />
132
+ </div>
133
+ `,
134
+ }),
116
135
  }
117
136
 
118
137
  /**
@@ -1,4 +1,4 @@
1
- import type { Args, Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Args, Meta, StoryObj } from '@storybook/vue3-vite'
2
2
 
3
3
  import CpSelectableButton from '@/components/CpSelectableButton.vue'
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpSwitch from '@/components/CpSwitch.vue'
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { action } from 'storybook/actions'
2
2
  import { ref, computed } from 'vue'
3
3
 
4
- import type { Meta, StoryObj } from '@storybook/vue3'
4
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
5
5
 
6
6
  import CpTable from '@/components/CpTable.vue'
7
7
 
@@ -22,8 +22,11 @@ const meta = {
22
22
  } satisfies Meta<typeof CpTable>
23
23
 
24
24
  export default meta
25
+
25
26
  type Story = StoryObj<typeof meta>
26
27
 
28
+ type TableStoryArgs = NonNullable<Story['args']>
29
+
27
30
  const sampleColumns = ['name', 'age', 'email', 'status']
28
31
 
29
32
  const sampleData = [
@@ -57,7 +60,7 @@ export const Default: Story = {
57
60
  onOnNextClick: action('on-next-click'),
58
61
  onOnColumnsChanged: action('on-columns-changed'),
59
62
  },
60
- render: (args) => ({
63
+ render: (args: TableStoryArgs) => ({
61
64
  components: { CpTable },
62
65
  setup() {
63
66
  return { args }
@@ -156,7 +159,7 @@ export const WithGroupBy: Story = {
156
159
  },
157
160
  ],
158
161
  },
159
- render: (args) => ({
162
+ render: (args: TableStoryArgs) => ({
160
163
  components: { CpTable },
161
164
  setup() {
162
165
  return { args }
@@ -191,7 +194,7 @@ export const WithCustomRowOptions: Story = {
191
194
  enableRowOptions: true,
192
195
  enableColumnEdition: true,
193
196
  },
194
- render: (args) => ({
197
+ render: (args: TableStoryArgs) => ({
195
198
  components: { CpTable },
196
199
  setup() {
197
200
  const isEditLoading = ref(false)
@@ -209,7 +212,7 @@ export const WithCustomRowOptions: Story = {
209
212
  icon: 'edit-2',
210
213
  isAsync: true,
211
214
  isLoading: isEditLoading.value,
212
- action: async (payload) => {
215
+ action: async (payload: Record<string, unknown>) => {
213
216
  isEditLoading.value = true
214
217
  console.log('Edit', payload)
215
218
  await new Promise((resolve) => setTimeout(resolve, 2000))
@@ -221,7 +224,7 @@ export const WithCustomRowOptions: Story = {
221
224
  label: 'Disable',
222
225
  icon: 'history',
223
226
  isDisabled: true,
224
- action: (payload) => console.log('History', payload),
227
+ action: (payload: Record<string, unknown>) => console.log('History', payload),
225
228
  },
226
229
  {
227
230
  id: 'delete',
@@ -263,7 +266,7 @@ export const WithoutDefaultAction: Story = {
263
266
  quickOptionsLimit: 2,
264
267
  enableColumnEdition: true,
265
268
  },
266
- render: (args) => ({
269
+ render: (args: TableStoryArgs) => ({
267
270
  components: { CpTable },
268
271
  setup() {
269
272
  const isEditLoading = ref(false)
@@ -315,7 +318,7 @@ export const WithOnlyDefaultAction: Story = {
315
318
  enableColumnEdition: true,
316
319
  quickOptionsLimit: 0,
317
320
  },
318
- render: (args) => ({
321
+ render: (args: TableStoryArgs) => ({
319
322
  components: { CpTable },
320
323
  setup() {
321
324
  const isEditLoading = ref(false)
@@ -333,7 +336,7 @@ export const WithOnlyDefaultAction: Story = {
333
336
  icon: 'edit-2',
334
337
  isAsync: true,
335
338
  isLoading: isEditLoading.value,
336
- action: async (payload) => {
339
+ action: async (payload: Record<string, unknown>) => {
337
340
  isEditLoading.value = true
338
341
  console.log('Edit', payload)
339
342
  await new Promise((resolve) => setTimeout(resolve, 2000))
@@ -403,7 +406,7 @@ export const ScrollCue: Story = {
403
406
  },
404
407
  ],
405
408
  },
406
- render: (args) => ({
409
+ render: (args: TableStoryArgs) => ({
407
410
  components: { CpTable },
408
411
  setup() {
409
412
  return { args }
@@ -429,7 +432,7 @@ export const FullWidthRow: Story = {
429
432
  { name: 'Jane Smith', age: 25, email: 'jane@example.com', status: 'Inactive' },
430
433
  ],
431
434
  },
432
- render: (args) => ({
435
+ render: (args: TableStoryArgs) => ({
433
436
  components: { CpTable },
434
437
  setup() {
435
438
  return { args }
@@ -455,7 +458,7 @@ export const SelectedRow: Story = {
455
458
  { name: 'Bob Johnson', age: 35, email: 'bob@example.com', status: 'Active' },
456
459
  ],
457
460
  },
458
- render: (args) => ({
461
+ render: (args: TableStoryArgs) => ({
459
462
  components: { CpTable },
460
463
  setup() {
461
464
  return { args }
@@ -1,4 +1,4 @@
1
- import type { Args, Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Args, Meta, StoryObj } from '@storybook/vue3-vite'
2
2
 
3
3
  import CpTableEmptyState from '@/components/CpTableEmptyState.vue'
4
4
 
@@ -1,7 +1,7 @@
1
1
  import { action } from 'storybook/actions'
2
2
  import { ref } from 'vue'
3
3
 
4
- import type { Args, Meta, StoryObj } from '@storybook/vue3'
4
+ import type { Args, Meta, StoryObj } from '@storybook/vue3-vite'
5
5
 
6
6
  import CpTabs from '@/components/CpTabs.vue'
7
7
 
@@ -1,4 +1,4 @@
1
- import type { Args, Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
 
3
3
  import CpTelInput from '@/components/CpTelInput.vue'
4
4
 
@@ -8,7 +8,7 @@ const meta = {
8
8
  title: 'Molecules/CpTelInput',
9
9
  component: CpTelInput,
10
10
  argTypes: {
11
- telModel: {
11
+ modelValue: {
12
12
  control: 'text',
13
13
  description: 'The phone number value',
14
14
  },
@@ -21,14 +21,17 @@ const meta = {
21
21
  } satisfies Meta<typeof CpTelInput>
22
22
 
23
23
  export default meta
24
+
24
25
  type Story = StoryObj<typeof meta>
25
26
 
26
- const defaultRender = (args: Args) => ({
27
+ type TelInputStoryArgs = NonNullable<Story['args']>
28
+
29
+ const defaultRender = (args: TelInputStoryArgs) => ({
27
30
  components: { CpTelInput },
28
31
  setup() {
29
32
  return { args }
30
33
  },
31
- template: '<CpTelInput v-bind="args" />',
34
+ template: `<CpTelInput v-bind="args" />`,
32
35
  })
33
36
 
34
37
  /**
@@ -36,7 +39,9 @@ const defaultRender = (args: Args) => ({
36
39
  * experiment with each prop in isolation.
37
40
  */
38
41
  export const Default: Story = {
39
- args: { telModel: '' },
42
+ args: {
43
+ modelValue: '',
44
+ },
40
45
  render: defaultRender,
41
46
  }
42
47
 
@@ -45,6 +50,8 @@ export const Default: Story = {
45
50
  * `fr`, `gb`).
46
51
  */
47
52
  export const WithDefaultCountry: Story = {
48
- args: { defaultCountry: 'us' },
53
+ args: {
54
+ defaultCountry: 'us',
55
+ },
49
56
  render: defaultRender,
50
57
  }
@@ -1,4 +1,4 @@
1
- import type { Args, Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Args, Meta, StoryObj } from '@storybook/vue3-vite'
2
2
 
3
3
  import CpText from '@/components/CpText.vue'
4
4
  import type { CpTextSize, CpTextWeight } from '@/components/CpText.vue'
@@ -1,11 +1,19 @@
1
1
  import { ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { ComponentPropsAndSlots, Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpTextarea from '@/components/CpTextarea.vue'
6
6
 
7
7
  import { docCellStyle, docLabelStyle, docRowColumnStyle } from '@/stories/documentationStyles'
8
8
 
9
+ /** Native `<textarea>` attributes not declared as Vue props (see `CpTextarea` template). */
10
+ type CpTextareaPassthroughAttrs = {
11
+ maxLength?: number
12
+ rows?: number
13
+ }
14
+
15
+ type CpTextareaStoryArgs = ComponentPropsAndSlots<typeof CpTextarea> & CpTextareaPassthroughAttrs
16
+
9
17
  const textareaStackStyle = `${docCellStyle} width: 100%; max-width: 360px;`
10
18
 
11
19
  const meta = {
@@ -49,10 +57,13 @@ const meta = {
49
57
  description: 'Maximum number of characters allowed',
50
58
  },
51
59
  },
52
- } satisfies Meta<typeof CpTextarea>
60
+ } satisfies Meta<CpTextareaStoryArgs>
53
61
 
54
62
  export default meta
55
- type Story = StoryObj<typeof meta>
63
+
64
+ type Story = StoryObj<CpTextareaStoryArgs>
65
+
66
+ type TextareaStoryArgs = Partial<CpTextareaStoryArgs>
56
67
 
57
68
  /**
58
69
  * Default textarea. Use the controls to experiment with each prop in isolation.
@@ -63,7 +74,7 @@ export const Default: Story = {
63
74
  placeholder: 'Enter your message here',
64
75
  rows: 4,
65
76
  },
66
- render: (args) => ({
77
+ render: (args: TextareaStoryArgs) => ({
67
78
  components: { CpTextarea },
68
79
  setup() {
69
80
  const value = ref('')
@@ -1,12 +1,28 @@
1
1
  import { useToast } from 'primevue/usetoast'
2
2
  import { ref } from 'vue'
3
3
 
4
- import type { Meta, StoryObj } from '@storybook/vue3'
4
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
5
5
 
6
6
  import { CpToastTypes } from '@/constants/CpToastTypes'
7
7
 
8
8
  import CpToast from '@/components/CpToast.vue'
9
9
 
10
+ type CpToastPosition =
11
+ | 'bottom-center'
12
+ | 'bottom-left'
13
+ | 'bottom-right'
14
+ | 'center'
15
+ | 'top-center'
16
+ | 'top-left'
17
+ | 'top-right'
18
+
19
+ /** `CpToast` has no `defineProps`; layout props are passed through to PrimeVue `Toast`. */
20
+ type CpToastStoryArgs = {
21
+ enableHaptics?: boolean
22
+ group?: string
23
+ position?: CpToastPosition
24
+ }
25
+
10
26
  const toastPositions = [
11
27
  'center',
12
28
  'top-left',
@@ -17,7 +33,7 @@ const toastPositions = [
17
33
  'bottom-right',
18
34
  ] as const
19
35
 
20
- const meta: Meta<typeof CpToast> = {
36
+ const meta = {
21
37
  title: 'Molecules/CpToast',
22
38
  component: CpToast,
23
39
  argTypes: {
@@ -32,11 +48,11 @@ const meta: Meta<typeof CpToast> = {
32
48
  group: undefined,
33
49
  enableHaptics: false,
34
50
  },
35
- }
51
+ } satisfies Meta<CpToastStoryArgs>
36
52
 
37
53
  export default meta
38
54
 
39
- type Story = StoryObj<typeof CpToast>
55
+ type Story = StoryObj<CpToastStoryArgs>
40
56
 
41
57
  /**
42
58
  * Trigger toasts of every severity using the `useToast()` composable.
@@ -97,7 +113,7 @@ export const WithTimer: Story = {
97
113
  detail: 'This is a cpToast description.',
98
114
  life: 2500,
99
115
  showTimer: showTimer.value,
100
- })
116
+ } as never)
101
117
  }
102
118
 
103
119
  return { args, notifyWithTimer, showTimer }
@@ -140,7 +156,7 @@ export const WithActions: Story = {
140
156
  trailingIcon: 'arrow-right',
141
157
  onClick: () => console.log('Secondary action clicked'),
142
158
  },
143
- })
159
+ } as never)
144
160
  }
145
161
 
146
162
  return { args, notifyWithActions }
@@ -1,4 +1,4 @@
1
- import type { Args, Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Args, Meta, StoryObj } from '@storybook/vue3-vite'
2
2
 
3
3
  import CpTooltip from '@/components/CpTooltip.vue'
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { computed, ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpButton from '@/components/CpButton.vue'
6
6
  import CpIcon from '@/components/CpIcon.vue'
@@ -1,6 +1,6 @@
1
1
  import { ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpTransitionExpand from '@/components/CpTransitionExpand.vue'
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
  import type { MenuItem } from 'primevue/menuitem'
5
5
 
6
6
  import CpButton from '@/components/CpButton.vue'
@@ -1,6 +1,6 @@
1
1
  import { computed, ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpButton from '@/components/CpButton.vue'
6
6
  import CpTransitionSize from '@/components/CpTransitionSize.vue'
@@ -1,6 +1,6 @@
1
1
  import { ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpButton from '@/components/CpButton.vue'
6
6
  import CpTransitionSlide from '@/components/CpTransitionSlide.vue'
@@ -1,6 +1,6 @@
1
1
  import { ref } from 'vue'
2
2
 
3
- import type { Meta, StoryObj } from '@storybook/vue3'
3
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
4
4
 
5
5
  import CpTabs from '@/components/CpTabs.vue'
6
6
  import CpTransitionTabContent from '@/components/CpTransitionTabContent.vue'
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
 
3
3
  import type { Token } from '@/stories/tokenUtils'
4
4
  import {
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
 
3
3
  import { copyableClass, copyableCopiedClass, readTokens, tokenTableClass, useCopier } from '@/stories/tokenUtils'
4
4
 
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
 
3
3
  import { copyableClass, copyableCopiedClass, readTokens, tokenTableClass, useCopier } from '@/stories/tokenUtils'
4
4
 
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3'
1
+ import type { Meta, StoryObj } from '@storybook/vue3-vite'
2
2
 
3
3
  import type { Token } from '@/stories/tokenUtils'
4
4
  import {