design-system-next 2.11.20 → 2.12.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 (89) hide show
  1. package/dist/design-system-next.es.js +7837 -7514
  2. package/dist/design-system-next.es.js.gz +0 -0
  3. package/dist/design-system-next.umd.js +12 -12
  4. package/dist/design-system-next.umd.js.gz +0 -0
  5. package/dist/main.css +1 -1
  6. package/dist/main.css.gz +0 -0
  7. package/dist/package.json.d.ts +1 -1
  8. package/package.json +1 -1
  9. package/src/App.vue +1 -49
  10. package/src/assets/scripts/border-radius.ts +15 -15
  11. package/src/assets/scripts/colors.ts +134 -134
  12. package/src/assets/scripts/max-width.ts +11 -11
  13. package/src/assets/scripts/spacing.ts +23 -23
  14. package/src/assets/scripts/utilities.ts +15 -15
  15. package/src/components/accordion/accordion.ts +43 -43
  16. package/src/components/accordion/use-accordion.ts +43 -43
  17. package/src/components/avatar/avatar.ts +64 -64
  18. package/src/components/badge/badge.ts +43 -43
  19. package/src/components/banner/banner.ts +20 -20
  20. package/src/components/button/button.ts +72 -72
  21. package/src/components/button/button.vue +15 -15
  22. package/src/components/card/card.ts +52 -52
  23. package/src/components/checkbox/checkbox.ts +45 -45
  24. package/src/components/chips/chips.ts +95 -95
  25. package/src/components/collapsible/collapsible.ts +21 -21
  26. package/src/components/collapsible/collapsible.vue +27 -27
  27. package/src/components/date-picker/__tests__/date-picker.test.ts +112 -112
  28. package/src/components/date-picker/date-picker.ts +157 -157
  29. package/src/components/date-picker/date-picker.vue +60 -53
  30. package/src/components/date-picker/use-date-picker.ts +6 -0
  31. package/src/components/dropdown/__tests__/dropdown-fixes.spec.ts +106 -106
  32. package/src/components/dropdown/__tests__/dropdown-value-types.spec.ts +213 -213
  33. package/src/components/dropdown/fix-multi-number.ts +92 -92
  34. package/src/components/dropdown/use-dropdown.ts +488 -488
  35. package/src/components/empty-state/empty-state.ts +50 -50
  36. package/src/components/file-upload/file-upload.ts +87 -87
  37. package/src/components/floating-action/floating-action.ts +12 -12
  38. package/src/components/input/input-contact-number/input-contact-number.ts +83 -83
  39. package/src/components/input/input-email/input-email.vue +17 -17
  40. package/src/components/input/input-password/use-input-password.ts +19 -19
  41. package/src/components/input/input-search/input-search.vue +13 -13
  42. package/src/components/input/input-url/input-url.vue +20 -20
  43. package/src/components/input/input-username/input-username.vue +17 -17
  44. package/src/components/input/input.vue +72 -72
  45. package/src/components/list/ladderized-list/ladderized-list.ts +39 -39
  46. package/src/components/logo/logo.ts +43 -43
  47. package/src/components/logo/logo.vue +14 -14
  48. package/src/components/logo/use-logo.ts +41 -41
  49. package/src/components/lozenge/lozenge.ts +16 -0
  50. package/src/components/lozenge/lozenge.vue +22 -13
  51. package/src/components/lozenge/use-lozenge.ts +58 -27
  52. package/src/components/modal/modal.ts +45 -45
  53. package/src/components/progress-bar/progress-bar.ts +39 -39
  54. package/src/components/radio/radio.ts +42 -42
  55. package/src/components/select/select.ts +144 -144
  56. package/src/components/sidenav/sidenav.ts +14 -0
  57. package/src/components/sidenav/sidenav.vue +36 -6
  58. package/src/components/sidenav/use-sidenav.ts +16 -3
  59. package/src/components/sidepanel/sidepanel.vue +55 -55
  60. package/src/components/sidepanel/stacking-sidepanel/stacking-sidepanel.ts +16 -16
  61. package/src/components/sidepanel/stacking-sidepanel/stacking-sidepanel.vue +39 -39
  62. package/src/components/slider/slider.ts +38 -38
  63. package/src/components/snackbar/snack/snack.ts +71 -71
  64. package/src/components/snackbar/use-snackbar.ts +34 -34
  65. package/src/components/status/status.ts +19 -19
  66. package/src/components/status/status.vue +13 -13
  67. package/src/components/stepper/step/step.ts +47 -47
  68. package/src/components/stepper/stepper.ts +47 -47
  69. package/src/components/stepper/stepper.vue +34 -34
  70. package/src/components/switch/switch.ts +42 -42
  71. package/src/components/table/table-actions/table-actions.ts +42 -42
  72. package/src/components/table/table-actions/table-actions.vue +40 -40
  73. package/src/components/table/table-chips-title/table-chips-title.ts +27 -27
  74. package/src/components/table/table-chips-title/table-chips-title.vue +32 -32
  75. package/src/components/table/table-chips-title/use-table-chips-title.ts +22 -22
  76. package/src/components/table/table-lozenge-title/table-lozenge-title.ts +23 -23
  77. package/src/components/table/table-lozenge-title/table-lozenge-title.vue +26 -26
  78. package/src/components/table/table-lozenge-title/use-table-lozenge-title.ts +21 -21
  79. package/src/components/table/table-pagination/table-pagination.ts +63 -63
  80. package/src/components/table/table-pagination/table-pagination.vue +72 -72
  81. package/src/components/table/table.ts +173 -173
  82. package/src/components/tabs/tabs.ts +43 -43
  83. package/src/components/textarea/textarea.ts +72 -72
  84. package/src/components/textarea/textarea.vue +45 -45
  85. package/src/components/time-picker/time-picker.ts +69 -69
  86. package/src/components/tooltip/use-tooltip.ts +13 -13
  87. package/src/examples/dropdown-number-multi-select.vue +76 -76
  88. package/src/stores/useSnackbarStore.ts +44 -44
  89. package/src/vite-env.d.ts +6 -0
@@ -1,43 +1,43 @@
1
- import type { PropType, ExtractPropTypes } from 'vue';
2
-
3
- export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
-
5
- const BADGE_VARIANT = ['danger', 'disabled', 'information', 'brand'] as const;
6
- const BADGE_SIZE = ['small', 'big', 'tiny'] as const;
7
- const BADGE_POSITION = ['top', 'bottom', 'default'] as const;
8
-
9
- export const badgePropTypes = {
10
- /**
11
- * @description Badge Label
12
- */
13
- text: {
14
- type: String,
15
- default: '0',
16
- },
17
- /**
18
- * @description Badge variant
19
- */
20
- variant: {
21
- type: String,
22
- validator: (value: (typeof BADGE_VARIANT)[number]) => BADGE_VARIANT.includes(value),
23
- default: 'brand',
24
- },
25
- /**
26
- * @description Badge size
27
- */
28
- size: {
29
- type: String,
30
- validator: (value: (typeof BADGE_SIZE)[number]) => BADGE_SIZE.includes(value),
31
- default: 'small',
32
- },
33
- /**
34
- * @description Badge position (top, bottom, default)
35
- */
36
- position: {
37
- type: String,
38
- validator: (value: (typeof BADGE_POSITION)[number]) => BADGE_POSITION.includes(value),
39
- default: 'default',
40
- },
41
- };
42
-
43
- export type BadgePropTypes = ExtractPropTypes<typeof badgePropTypes>;
1
+ import type { PropType, ExtractPropTypes } from 'vue';
2
+
3
+ export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
+
5
+ const BADGE_VARIANT = ['danger', 'disabled', 'information', 'brand'] as const;
6
+ const BADGE_SIZE = ['small', 'big', 'tiny'] as const;
7
+ const BADGE_POSITION = ['top', 'bottom', 'default'] as const;
8
+
9
+ export const badgePropTypes = {
10
+ /**
11
+ * @description Badge Label
12
+ */
13
+ text: {
14
+ type: String,
15
+ default: '0',
16
+ },
17
+ /**
18
+ * @description Badge variant
19
+ */
20
+ variant: {
21
+ type: String,
22
+ validator: (value: (typeof BADGE_VARIANT)[number]) => BADGE_VARIANT.includes(value),
23
+ default: 'brand',
24
+ },
25
+ /**
26
+ * @description Badge size
27
+ */
28
+ size: {
29
+ type: String,
30
+ validator: (value: (typeof BADGE_SIZE)[number]) => BADGE_SIZE.includes(value),
31
+ default: 'small',
32
+ },
33
+ /**
34
+ * @description Badge position (top, bottom, default)
35
+ */
36
+ position: {
37
+ type: String,
38
+ validator: (value: (typeof BADGE_POSITION)[number]) => BADGE_POSITION.includes(value),
39
+ default: 'default',
40
+ },
41
+ };
42
+
43
+ export type BadgePropTypes = ExtractPropTypes<typeof badgePropTypes>;
@@ -1,20 +1,20 @@
1
- import { PropType, type ExtractPropTypes } from 'vue';
2
-
3
- export const BANNER_TYPE = ['success', 'error', 'info', 'pending', 'caution'] as const;
4
-
5
- export const bannerProps = {
6
- type: {
7
- type: String as PropType<(typeof BANNER_TYPE)[number]>,
8
- validator: (value: (typeof BANNER_TYPE)[number]) => BANNER_TYPE.includes(value),
9
- default: 'success',
10
- },
11
- showCloseButton: {
12
- type: Boolean,
13
- default: false,
14
- },
15
- message: {
16
- type: String,
17
- }
18
- };
19
-
20
- export type BannerPropTypes = ExtractPropTypes<typeof bannerProps>;
1
+ import { PropType, type ExtractPropTypes } from 'vue';
2
+
3
+ export const BANNER_TYPE = ['success', 'error', 'info', 'pending', 'caution'] as const;
4
+
5
+ export const bannerProps = {
6
+ type: {
7
+ type: String as PropType<(typeof BANNER_TYPE)[number]>,
8
+ validator: (value: (typeof BANNER_TYPE)[number]) => BANNER_TYPE.includes(value),
9
+ default: 'success',
10
+ },
11
+ showCloseButton: {
12
+ type: Boolean,
13
+ default: false,
14
+ },
15
+ message: {
16
+ type: String,
17
+ }
18
+ };
19
+
20
+ export type BannerPropTypes = ExtractPropTypes<typeof bannerProps>;
@@ -1,72 +1,72 @@
1
- import type { PropType, ExtractPropTypes } from 'vue';
2
-
3
- export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
-
5
- const BUTTON_TONES = ['neutral', 'success', 'danger'] as const;
6
- const BUTTON_SIZES = ['small', 'medium', 'large'] as const;
7
- const BUTTON_TYPES = ['button', 'submit', 'reset'] as const;
8
- const BUTTON_STATES = ['base', 'hover', 'pressed', 'focus'] as const;
9
- const BUTTON_VARIANTS = ['primary', 'secondary', 'tertiary'] as const;
10
-
11
- export const buttonPropTypes = {
12
- /**
13
- * @description Button tone
14
- */
15
- tone: {
16
- type: String as PropType<(typeof BUTTON_TONES)[number]>,
17
- validator: (value: (typeof BUTTON_TONES)[number]) => BUTTON_TONES.includes(value),
18
- default: 'neutral',
19
- },
20
- /**
21
- * @description Button size
22
- */
23
- size: {
24
- type: String as PropType<(typeof BUTTON_SIZES)[number]>,
25
- validator: (value: (typeof BUTTON_SIZES)[number]) => BUTTON_SIZES.includes(value),
26
- default: 'medium',
27
- },
28
- /**
29
- * @description Native button type
30
- */
31
- type: {
32
- type: String as PropType<(typeof BUTTON_TYPES)[number]>,
33
- validator: (value: (typeof BUTTON_TYPES)[number]) => BUTTON_TYPES.includes(value),
34
- default: 'button',
35
- },
36
- /**
37
- * @description Button state
38
- */
39
- state: {
40
- type: String as PropType<(typeof BUTTON_STATES)[number]>,
41
- validator: (value: (typeof BUTTON_STATES)[number]) => BUTTON_STATES.includes(value),
42
- default: 'base',
43
- },
44
- /**
45
- * @description Button Variant
46
- */
47
- variant: {
48
- type: String as PropType<(typeof BUTTON_VARIANTS)[number]>,
49
- validator: (value: (typeof BUTTON_VARIANTS)[number]) => BUTTON_VARIANTS.includes(value),
50
- default: 'primary',
51
- },
52
- disabled: {
53
- type: Boolean,
54
- default: false,
55
- },
56
- hasIcon: {
57
- type: Boolean,
58
- default: false,
59
- },
60
- fullwidth: {
61
- type: Boolean,
62
- default: false,
63
- },
64
- };
65
-
66
- export const buttonEmitTypes = {
67
- click: (evt: MouseEvent): evt is MouseEvent => evt instanceof MouseEvent,
68
- };
69
-
70
- export type ButtonPropTypes = ExtractPropTypes<typeof buttonPropTypes>;
71
- export type ButtonEmitTypes = typeof buttonEmitTypes;
72
- export type ButtonType = ButtonPropTypes['type'];
1
+ import type { PropType, ExtractPropTypes } from 'vue';
2
+
3
+ export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
+
5
+ const BUTTON_TONES = ['neutral', 'success', 'danger'] as const;
6
+ const BUTTON_SIZES = ['small', 'medium', 'large'] as const;
7
+ const BUTTON_TYPES = ['button', 'submit', 'reset'] as const;
8
+ const BUTTON_STATES = ['base', 'hover', 'pressed', 'focus'] as const;
9
+ const BUTTON_VARIANTS = ['primary', 'secondary', 'tertiary'] as const;
10
+
11
+ export const buttonPropTypes = {
12
+ /**
13
+ * @description Button tone
14
+ */
15
+ tone: {
16
+ type: String as PropType<(typeof BUTTON_TONES)[number]>,
17
+ validator: (value: (typeof BUTTON_TONES)[number]) => BUTTON_TONES.includes(value),
18
+ default: 'neutral',
19
+ },
20
+ /**
21
+ * @description Button size
22
+ */
23
+ size: {
24
+ type: String as PropType<(typeof BUTTON_SIZES)[number]>,
25
+ validator: (value: (typeof BUTTON_SIZES)[number]) => BUTTON_SIZES.includes(value),
26
+ default: 'medium',
27
+ },
28
+ /**
29
+ * @description Native button type
30
+ */
31
+ type: {
32
+ type: String as PropType<(typeof BUTTON_TYPES)[number]>,
33
+ validator: (value: (typeof BUTTON_TYPES)[number]) => BUTTON_TYPES.includes(value),
34
+ default: 'button',
35
+ },
36
+ /**
37
+ * @description Button state
38
+ */
39
+ state: {
40
+ type: String as PropType<(typeof BUTTON_STATES)[number]>,
41
+ validator: (value: (typeof BUTTON_STATES)[number]) => BUTTON_STATES.includes(value),
42
+ default: 'base',
43
+ },
44
+ /**
45
+ * @description Button Variant
46
+ */
47
+ variant: {
48
+ type: String as PropType<(typeof BUTTON_VARIANTS)[number]>,
49
+ validator: (value: (typeof BUTTON_VARIANTS)[number]) => BUTTON_VARIANTS.includes(value),
50
+ default: 'primary',
51
+ },
52
+ disabled: {
53
+ type: Boolean,
54
+ default: false,
55
+ },
56
+ hasIcon: {
57
+ type: Boolean,
58
+ default: false,
59
+ },
60
+ fullwidth: {
61
+ type: Boolean,
62
+ default: false,
63
+ },
64
+ };
65
+
66
+ export const buttonEmitTypes = {
67
+ click: (evt: MouseEvent): evt is MouseEvent => evt instanceof MouseEvent,
68
+ };
69
+
70
+ export type ButtonPropTypes = ExtractPropTypes<typeof buttonPropTypes>;
71
+ export type ButtonEmitTypes = typeof buttonEmitTypes;
72
+ export type ButtonType = ButtonPropTypes['type'];
@@ -1,15 +1,15 @@
1
- <template>
2
- <button ref="buttonRef" :class="buttonClassses" v-bind="buttonProps" @click="handleClick">
3
- <slot />
4
- </button>
5
- </template>
6
-
7
- <script lang="ts" setup>
8
- import { buttonEmitTypes, buttonPropTypes } from './button';
9
- import { useButton } from './use-button';
10
-
11
- const props = defineProps(buttonPropTypes);
12
- const emit = defineEmits(buttonEmitTypes);
13
-
14
- const { buttonRef, buttonClassses, buttonProps, handleClick } = useButton(props, emit);
15
- </script>
1
+ <template>
2
+ <button ref="buttonRef" :class="buttonClassses" v-bind="buttonProps" @click="handleClick">
3
+ <slot />
4
+ </button>
5
+ </template>
6
+
7
+ <script lang="ts" setup>
8
+ import { buttonEmitTypes, buttonPropTypes } from './button';
9
+ import { useButton } from './use-button';
10
+
11
+ const props = defineProps(buttonPropTypes);
12
+ const emit = defineEmits(buttonEmitTypes);
13
+
14
+ const { buttonRef, buttonClassses, buttonProps, handleClick } = useButton(props, emit);
15
+ </script>
@@ -1,52 +1,52 @@
1
- import type { PropType, ExtractPropTypes } from 'vue';
2
-
3
- export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
-
5
- const BORDER_RADIUS_SIZE = ['xl', 'lg', 'md', 'sm', 'xs', '2xs'] as const;
6
-
7
- export const cardPropTypes = {
8
- title: {
9
- type: String,
10
- default: '',
11
- },
12
- subtitle: {
13
- type: String,
14
- default: '',
15
- },
16
- headerIcon: {
17
- type: String,
18
- default: '',
19
- },
20
- showHeader: {
21
- type: Boolean,
22
- default: true,
23
- },
24
- showFooter: {
25
- type: Boolean,
26
- default: true,
27
- },
28
- borderRadiusSize: {
29
- type: String,
30
- validator: (value: (typeof BORDER_RADIUS_SIZE)[number]) => BORDER_RADIUS_SIZE.includes(value),
31
- default: 'xl',
32
- },
33
- hasCollapsible: {
34
- type: Boolean,
35
- default: false,
36
- },
37
- isCollapsibleOpen: {
38
- type: Boolean,
39
- default: false,
40
- },
41
- hasContentPadding: {
42
- type: Boolean,
43
- default: true,
44
- },
45
-
46
- flexbox: {
47
- type: Boolean,
48
- default: false,
49
- },
50
- };
51
-
52
- export type CardPropTypes = ExtractPropTypes<typeof cardPropTypes>;
1
+ import type { PropType, ExtractPropTypes } from 'vue';
2
+
3
+ export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
+
5
+ const BORDER_RADIUS_SIZE = ['xl', 'lg', 'md', 'sm', 'xs', '2xs'] as const;
6
+
7
+ export const cardPropTypes = {
8
+ title: {
9
+ type: String,
10
+ default: '',
11
+ },
12
+ subtitle: {
13
+ type: String,
14
+ default: '',
15
+ },
16
+ headerIcon: {
17
+ type: String,
18
+ default: '',
19
+ },
20
+ showHeader: {
21
+ type: Boolean,
22
+ default: true,
23
+ },
24
+ showFooter: {
25
+ type: Boolean,
26
+ default: true,
27
+ },
28
+ borderRadiusSize: {
29
+ type: String,
30
+ validator: (value: (typeof BORDER_RADIUS_SIZE)[number]) => BORDER_RADIUS_SIZE.includes(value),
31
+ default: 'xl',
32
+ },
33
+ hasCollapsible: {
34
+ type: Boolean,
35
+ default: false,
36
+ },
37
+ isCollapsibleOpen: {
38
+ type: Boolean,
39
+ default: false,
40
+ },
41
+ hasContentPadding: {
42
+ type: Boolean,
43
+ default: true,
44
+ },
45
+
46
+ flexbox: {
47
+ type: Boolean,
48
+ default: false,
49
+ },
50
+ };
51
+
52
+ export type CardPropTypes = ExtractPropTypes<typeof cardPropTypes>;
@@ -1,45 +1,45 @@
1
- import type { PropType, ExtractPropTypes } from 'vue';
2
-
3
- export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
-
5
- export const checkboxPropTypes = {
6
- modelValue: {
7
- type: Boolean,
8
- default: false,
9
- },
10
- label: {
11
- type: String,
12
- default: '',
13
- },
14
- description: {
15
- type: String,
16
- default: '',
17
- },
18
- disabled: {
19
- type: Boolean,
20
- default: false,
21
- },
22
- checked: {
23
- type: Boolean,
24
- default: false,
25
- },
26
- indeterminate: {
27
- type: Boolean,
28
- default: false,
29
- },
30
- bordered: {
31
- type: Boolean,
32
- default: false,
33
- },
34
- fullWidth: {
35
- type: Boolean,
36
- default: false,
37
- }
38
- };
39
-
40
- export const checkboxEmitTypes = {
41
- 'update:modelValue': (value: boolean) => typeof value === 'boolean',
42
- };
43
-
44
- export type CheckboxPropTypes = ExtractPropTypes<typeof checkboxPropTypes>;
45
- export type CheckboxEmitTypes = typeof checkboxEmitTypes;
1
+ import type { PropType, ExtractPropTypes } from 'vue';
2
+
3
+ export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
+
5
+ export const checkboxPropTypes = {
6
+ modelValue: {
7
+ type: Boolean,
8
+ default: false,
9
+ },
10
+ label: {
11
+ type: String,
12
+ default: '',
13
+ },
14
+ description: {
15
+ type: String,
16
+ default: '',
17
+ },
18
+ disabled: {
19
+ type: Boolean,
20
+ default: false,
21
+ },
22
+ checked: {
23
+ type: Boolean,
24
+ default: false,
25
+ },
26
+ indeterminate: {
27
+ type: Boolean,
28
+ default: false,
29
+ },
30
+ bordered: {
31
+ type: Boolean,
32
+ default: false,
33
+ },
34
+ fullWidth: {
35
+ type: Boolean,
36
+ default: false,
37
+ }
38
+ };
39
+
40
+ export const checkboxEmitTypes = {
41
+ 'update:modelValue': (value: boolean) => typeof value === 'boolean',
42
+ };
43
+
44
+ export type CheckboxPropTypes = ExtractPropTypes<typeof checkboxPropTypes>;
45
+ export type CheckboxEmitTypes = typeof checkboxEmitTypes;