@aleph-alpha/ui-library 3.1.0 → 3.3.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 (45) hide show
  1. package/README.md +41 -32
  2. package/config.js +9 -10
  3. package/dist/system/components/UiSnackbar/UiSnackbar.vue.d.ts +1 -0
  4. package/dist/system/components/UiSnackbar/UiSnackbarContent.vue.d.ts +29 -0
  5. package/dist/system/components/UiSnackbar/UiSnackbarIcon.vue.d.ts +3 -0
  6. package/dist/system/components/UiSnackbar/index.d.ts +3 -0
  7. package/dist/system/components/UiSnackbar/showSnackbar.d.ts +55 -0
  8. package/dist/system/components/UiSnackbar/types.d.ts +76 -17
  9. package/dist/system/lib.js +8218 -7978
  10. package/package.json +4 -4
  11. package/src/@types/shims-vue.d.ts +5 -0
  12. package/src/components/UiButton/UiButton.stories.ts +4 -20
  13. package/src/components/UiCheckbox/UiCheckbox.stories.ts +4 -20
  14. package/src/components/UiField/UiField.stories.ts +4 -20
  15. package/src/components/UiIcon/UiIcon.stories.ts +2 -0
  16. package/src/components/UiItem/UiItem.stories.ts +4 -19
  17. package/src/components/UiSnackbar/UiSnackbar.stories.ts +281 -255
  18. package/src/components/UiSnackbar/UiSnackbar.vue +71 -241
  19. package/src/components/UiSnackbar/UiSnackbarContent.vue +114 -0
  20. package/src/components/UiSnackbar/UiSnackbarIcon.vue +78 -0
  21. package/src/components/UiSnackbar/__tests__/UiSnackbar.test.ts +154 -1
  22. package/src/components/UiSnackbar/__tests__/showSnackbar.test.ts +258 -0
  23. package/src/components/UiSnackbar/assets/error.svg +3 -0
  24. package/src/components/UiSnackbar/assets/info.svg +3 -0
  25. package/src/components/UiSnackbar/assets/loading.svg +14 -0
  26. package/src/components/UiSnackbar/assets/success.svg +5 -0
  27. package/src/components/UiSnackbar/assets/warning.svg +3 -0
  28. package/src/components/UiSnackbar/index.ts +3 -0
  29. package/src/components/UiSnackbar/showSnackbar.ts +174 -0
  30. package/src/components/UiSnackbar/types.ts +90 -17
  31. package/src/components/core/sonner/Sonner.vue +3 -20
  32. package/src/directives/vHover.stories.ts +1 -0
  33. package/src/lib/useDevice.stories.ts +2 -1
  34. package/src/lib/useDrag.stories.ts +2 -1
  35. package/src/theme/Background.stories.ts +2 -0
  36. package/src/theme/Border.stories.ts +2 -0
  37. package/src/theme/BorderRadius.stories.ts +2 -0
  38. package/src/theme/Extended.stories.ts +2 -0
  39. package/src/theme/Flex.stories.ts +2 -0
  40. package/src/theme/Grid.stories.ts +2 -0
  41. package/src/theme/HoverLayer.stories.ts +2 -0
  42. package/src/theme/Overlay.stories.ts +2 -0
  43. package/src/theme/Shadow.stories.ts +2 -0
  44. package/src/theme/Theme.stories.ts +2 -0
  45. package/src/theme/Typography.stories.ts +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleph-alpha/ui-library",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/system/lib.js",
@@ -77,11 +77,11 @@
77
77
  "vite-plugin-checker": "0.11.0",
78
78
  "vite-plugin-css-injected-by-js": "^3.5.2",
79
79
  "vite-plugin-dts": "^4.0.0",
80
- "vitest": "^3.0.0",
80
+ "vitest": "^3.2.6",
81
81
  "vue-router": "4.6.4",
82
82
  "vue-tsc": "^2.2.12",
83
83
  "wait-on": "9.0.3",
84
- "@aleph-alpha/eslint-config-frontend": "0.6.0",
84
+ "@aleph-alpha/eslint-config-frontend": "0.7.0",
85
85
  "@aleph-alpha/prettier-config-frontend": "2.1.0",
86
86
  "@aleph-alpha/tsconfig-frontend": "0.7.0"
87
87
  },
@@ -116,7 +116,7 @@
116
116
  "shiki": "^3.0.0",
117
117
  "tailwind-merge": "^3.4.0",
118
118
  "vue-sonner": "^2.0.9",
119
- "@aleph-alpha/config-css": "1.2.0"
119
+ "@aleph-alpha/config-unocss": "0.2.0"
120
120
  },
121
121
  "scripts": {
122
122
  "build": "node scripts/prepare-build.cjs && vite build",
@@ -3,3 +3,8 @@ declare module '*.vue' {
3
3
  const component: DefineComponent<object, object, object>;
4
4
  export default component;
5
5
  }
6
+
7
+ declare module '*.svg?raw' {
8
+ const content: string;
9
+ export default content;
10
+ }
@@ -17,10 +17,6 @@ const MailIcon = {
17
17
  template: '<UiIcon name="mail" :size="16" />',
18
18
  };
19
19
 
20
- const designStoryLink = './?path=/docs/components-uibutton--design-notes';
21
- const accessibilityStoryLink =
22
- './?path=/docs/components-uibutton--accessibility';
23
-
24
20
  /**
25
21
  * Buttons are used to initiate actions within an application. Their labels clearly describe the action they trigger.
26
22
  */
@@ -79,22 +75,6 @@ const meta: Meta<typeof UiButton> = {
79
75
  disabled: false,
80
76
  loading: false,
81
77
  },
82
- parameters: {
83
- docs: {
84
- links: [
85
- {
86
- label: 'Designer docs',
87
- href: designStoryLink,
88
- icon: 'palette',
89
- },
90
- {
91
- label: 'Accessibility',
92
- href: accessibilityStoryLink,
93
- icon: 'accessibility',
94
- },
95
- ],
96
- },
97
- },
98
78
  };
99
79
 
100
80
  export default meta;
@@ -199,7 +179,9 @@ export const DesignNotes: Story = {
199
179
  </section>
200
180
  `,
201
181
  }),
182
+ tags: ['!autodocs'],
202
183
  parameters: {
184
+ a11y: { test: 'off' },
203
185
  chromatic: {
204
186
  disableSnapshot: true,
205
187
  },
@@ -295,7 +277,9 @@ export const Accessibility: Story = {
295
277
  </section>
296
278
  `,
297
279
  }),
280
+ tags: ['!autodocs'],
298
281
  parameters: {
282
+ a11y: { test: 'off' },
299
283
  chromatic: {
300
284
  disableSnapshot: true,
301
285
  },
@@ -2,10 +2,6 @@ import type { Meta, StoryObj } from '@storybook/vue3-vite';
2
2
  import UiCheckbox from './UiCheckbox.vue';
3
3
  import { ref } from 'vue';
4
4
 
5
- const designStoryLink = './?path=/docs/components-uicheckbox--design-notes';
6
- const accessibilityStoryLink =
7
- './?path=/docs/components-uicheckbox--accessibility';
8
-
9
5
  /**
10
6
  * A control that allows the user to toggle between checked and not checked.
11
7
  */
@@ -28,22 +24,6 @@ const meta: Meta<typeof UiCheckbox> = {
28
24
  disabled: false,
29
25
  required: false,
30
26
  },
31
- parameters: {
32
- docs: {
33
- links: [
34
- {
35
- label: 'Designer docs',
36
- href: designStoryLink,
37
- icon: 'palette',
38
- },
39
- {
40
- label: 'Accessibility',
41
- href: accessibilityStoryLink,
42
- icon: 'accessibility',
43
- },
44
- ],
45
- },
46
- },
47
27
  };
48
28
 
49
29
  export default meta;
@@ -129,7 +109,9 @@ export const DesignNotes: Story = {
129
109
  </section>
130
110
  `,
131
111
  }),
112
+ tags: ['!autodocs'],
132
113
  parameters: {
114
+ a11y: { test: 'off' },
133
115
  chromatic: {
134
116
  disableSnapshot: true,
135
117
  },
@@ -235,7 +217,9 @@ export const Accessibility: Story = {
235
217
  </section>
236
218
  `,
237
219
  }),
220
+ tags: ['!autodocs'],
238
221
  parameters: {
222
+ a11y: { test: 'off' },
239
223
  chromatic: {
240
224
  disableSnapshot: true,
241
225
  },
@@ -29,10 +29,6 @@ import { UiTextarea } from '../UiTextarea';
29
29
  import { UiButton } from '../UiButton';
30
30
  import { ref } from 'vue';
31
31
 
32
- const designStoryLink = './?path=/docs/components-uifield--design-notes';
33
- const accessibilityStoryLink =
34
- './?path=/docs/components-uifield--accessibility';
35
-
36
32
  /**
37
33
  * Field composes label, description, and error messaging into a consistent form-field layout. Use it to keep spacing, typography, and validation feedback consistent across inputs.
38
34
  */
@@ -64,22 +60,6 @@ const meta: Meta<typeof UiField> = {
64
60
  descriptionPlacement: 'under-input',
65
61
  descriptionCheckbox: false,
66
62
  },
67
- parameters: {
68
- docs: {
69
- links: [
70
- {
71
- label: 'Designer docs',
72
- href: designStoryLink,
73
- icon: 'palette',
74
- },
75
- {
76
- label: 'Accessibility',
77
- href: accessibilityStoryLink,
78
- icon: 'accessibility',
79
- },
80
- ],
81
- },
82
- },
83
63
  };
84
64
 
85
65
  export default meta;
@@ -243,7 +223,9 @@ export const DesignNotes: Story = {
243
223
  </section>
244
224
  `,
245
225
  }),
226
+ tags: ['!autodocs'],
246
227
  parameters: {
228
+ a11y: { test: 'off' },
247
229
  chromatic: {
248
230
  disableSnapshot: true,
249
231
  },
@@ -382,7 +364,9 @@ export const Accessibility: Story = {
382
364
  </section>
383
365
  `,
384
366
  }),
367
+ tags: ['!autodocs'],
385
368
  parameters: {
369
+ a11y: { test: 'off' },
386
370
  chromatic: {
387
371
  disableSnapshot: true,
388
372
  },
@@ -209,6 +209,8 @@ export const IconLibrary: Story = {
209
209
  `,
210
210
  }),
211
211
  parameters: {
212
+ a11y: { test: 'off' },
213
+ chromatic: { disableSnapshot: true },
212
214
  controls: { disable: true },
213
215
  },
214
216
  };
@@ -20,9 +20,6 @@ import {
20
20
  UiAvatarImage,
21
21
  } from '../UiAvatar';
22
22
 
23
- const designStoryLink = './?path=/docs/components-uiitem--design-notes';
24
- const accessibilityStoryLink = './?path=/docs/components-uiitem--accessibility';
25
-
26
23
  /**
27
24
  * A versatile component that you can use to display any content.
28
25
  */
@@ -84,22 +81,6 @@ const meta: Meta<typeof UiItem> = {
84
81
  asChild: false,
85
82
  withListSemantics: false,
86
83
  },
87
- parameters: {
88
- docs: {
89
- links: [
90
- {
91
- label: 'Designer docs',
92
- href: designStoryLink,
93
- icon: 'palette',
94
- },
95
- {
96
- label: 'Accessibility',
97
- href: accessibilityStoryLink,
98
- icon: 'accessibility',
99
- },
100
- ],
101
- },
102
- },
103
84
  };
104
85
 
105
86
  export default meta;
@@ -491,7 +472,9 @@ export const DesignNotes: Story = {
491
472
  </section>
492
473
  `,
493
474
  }),
475
+ tags: ['!autodocs'],
494
476
  parameters: {
477
+ a11y: { test: 'off' },
495
478
  chromatic: {
496
479
  disableSnapshot: true,
497
480
  },
@@ -558,7 +541,9 @@ export const Accessibility: Story = {
558
541
  </section>
559
542
  `,
560
543
  }),
544
+ tags: ['!autodocs'],
561
545
  parameters: {
546
+ a11y: { test: 'off' },
562
547
  chromatic: {
563
548
  disableSnapshot: true,
564
549
  },