design-system-next 2.20.0 → 2.20.4

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 (79) hide show
  1. package/dist/design-system-next.es.js +7499 -7435
  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 +3 -2
  8. package/package.json +3 -2
  9. package/src/App.vue +51 -1
  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/banner/banner.ts +20 -20
  18. package/src/components/button/button.ts +72 -72
  19. package/src/components/button/button.vue +15 -15
  20. package/src/components/checkbox/checkbox.ts +45 -45
  21. package/src/components/collapsible/collapsible.ts +21 -21
  22. package/src/components/collapsible/collapsible.vue +27 -27
  23. package/src/components/dropdown/fix-multi-number.ts +92 -92
  24. package/src/components/empty-state/empty-state.ts +50 -50
  25. package/src/components/file-upload/file-upload.ts +99 -87
  26. package/src/components/file-upload/file-upload.vue +13 -6
  27. package/src/components/file-upload/use-file-upload.ts +24 -0
  28. package/src/components/floating-action/floating-action.ts +12 -12
  29. package/src/components/input/input-email/input-email.vue +17 -17
  30. package/src/components/input/input-search/input-search.vue +13 -13
  31. package/src/components/input/input-url/input-url.vue +20 -20
  32. package/src/components/input/input-username/input-username.vue +17 -17
  33. package/src/components/list/ladderized-list/ladderized-list.ts +43 -39
  34. package/src/components/list/ladderized-list/ladderized-list.vue +1 -0
  35. package/src/components/list/list-item/list-item.ts +48 -0
  36. package/src/components/list/list-item/list-item.vue +112 -0
  37. package/src/components/list/list-item/use-list-item.ts +30 -0
  38. package/src/components/list/list.vue +60 -258
  39. package/src/components/list/use-list.ts +19 -5
  40. package/src/components/logo/logo.ts +43 -43
  41. package/src/components/logo/logo.vue +14 -14
  42. package/src/components/logo/use-logo.ts +41 -41
  43. package/src/components/lozenge/lozenge.ts +4 -18
  44. package/src/components/lozenge/lozenge.vue +14 -4
  45. package/src/components/lozenge/use-lozenge.ts +6 -0
  46. package/src/components/progress-bar/progress-bar.ts +50 -39
  47. package/src/components/progress-bar/progress-bar.vue +3 -2
  48. package/src/components/progress-bar/use-progress-bar.ts +7 -0
  49. package/src/components/radio/radio.ts +42 -42
  50. package/src/components/select/select-ladderized/select-ladderized.ts +9 -1
  51. package/src/components/select/select-ladderized/select-ladderized.vue +3 -1
  52. package/src/components/select/select-multiple/select-multiple.ts +12 -2
  53. package/src/components/select/select-multiple/select-multiple.vue +3 -2
  54. package/src/components/select/select.ts +8 -0
  55. package/src/components/select/select.vue +5 -1
  56. package/src/components/sidepanel/sidepanel.vue +55 -55
  57. package/src/components/sidepanel/stacking-sidepanel/stacking-sidepanel.ts +16 -16
  58. package/src/components/sidepanel/stacking-sidepanel/stacking-sidepanel.vue +39 -39
  59. package/src/components/slider/slider.ts +38 -38
  60. package/src/components/snackbar/snack/snack.ts +71 -71
  61. package/src/components/snackbar/use-snackbar.ts +34 -34
  62. package/src/components/status/status.ts +19 -19
  63. package/src/components/status/status.vue +13 -13
  64. package/src/components/stepper/step/step.ts +47 -47
  65. package/src/components/stepper/stepper.ts +47 -47
  66. package/src/components/stepper/stepper.vue +34 -34
  67. package/src/components/switch/switch.ts +42 -42
  68. package/src/components/table/table-actions/table-actions.ts +42 -42
  69. package/src/components/table/table-actions/table-actions.vue +40 -40
  70. package/src/components/table/table-chips-title/table-chips-title.ts +27 -27
  71. package/src/components/table/table-chips-title/table-chips-title.vue +32 -32
  72. package/src/components/table/table-chips-title/use-table-chips-title.ts +22 -22
  73. package/src/components/table/table-lozenge-title/table-lozenge-title.ts +23 -23
  74. package/src/components/table/table-lozenge-title/table-lozenge-title.vue +26 -26
  75. package/src/components/table/table-lozenge-title/use-table-lozenge-title.ts +21 -21
  76. package/src/components/tabs/tabs.ts +43 -43
  77. package/src/components/time-picker/time-picker.ts +69 -69
  78. package/src/components/tooltip/use-tooltip.ts +13 -13
  79. package/src/stores/useSnackbarStore.ts +44 -44
@@ -1,47 +1,47 @@
1
- import type { ExtractPropTypes, PropType } from 'vue';
2
- import { STEPPER_TYPE } from '../stepper';
3
-
4
- export const STEP_STATES = ['pending', 'active', 'completed'] as const;
5
-
6
- export const stepPropTypes = {
7
- /**
8
- * @description Step number
9
- */
10
- number: {
11
- type: Number,
12
- required: true,
13
- },
14
- /**
15
- * @description Text label shown in step
16
- */
17
- label: {
18
- type: String,
19
- required: false,
20
- },
21
- description: {
22
- type: String,
23
- required: false,
24
- },
25
- /**
26
- * @description Step state either as 'pending', 'active', 'completed'
27
- */
28
- status: {
29
- type: String as PropType<(typeof STEP_STATES)[number]>,
30
- validator: (value: (typeof STEP_STATES)[number]) => STEP_STATES.includes(value),
31
- default: 'pending',
32
- },
33
- /**
34
- * @description Display type of stepper if displayed as compact (no solid bg color) or solid
35
- */
36
- type: {
37
- type: String as PropType<(typeof STEPPER_TYPE)[number]>,
38
- validator: (value: (typeof STEPPER_TYPE)[number]) => STEPPER_TYPE.includes(value),
39
- }
40
- };
41
-
42
- export const stepEmitTypes = {
43
- click: (evt: MouseEvent): evt is MouseEvent => evt instanceof MouseEvent,
44
- };
45
-
46
- export type StepPropTypes = ExtractPropTypes<typeof stepPropTypes>;
47
- export type StepEmitTypes = typeof stepEmitTypes;
1
+ import type { ExtractPropTypes, PropType } from 'vue';
2
+ import { STEPPER_TYPE } from '../stepper';
3
+
4
+ export const STEP_STATES = ['pending', 'active', 'completed'] as const;
5
+
6
+ export const stepPropTypes = {
7
+ /**
8
+ * @description Step number
9
+ */
10
+ number: {
11
+ type: Number,
12
+ required: true,
13
+ },
14
+ /**
15
+ * @description Text label shown in step
16
+ */
17
+ label: {
18
+ type: String,
19
+ required: false,
20
+ },
21
+ description: {
22
+ type: String,
23
+ required: false,
24
+ },
25
+ /**
26
+ * @description Step state either as 'pending', 'active', 'completed'
27
+ */
28
+ status: {
29
+ type: String as PropType<(typeof STEP_STATES)[number]>,
30
+ validator: (value: (typeof STEP_STATES)[number]) => STEP_STATES.includes(value),
31
+ default: 'pending',
32
+ },
33
+ /**
34
+ * @description Display type of stepper if displayed as compact (no solid bg color) or solid
35
+ */
36
+ type: {
37
+ type: String as PropType<(typeof STEPPER_TYPE)[number]>,
38
+ validator: (value: (typeof STEPPER_TYPE)[number]) => STEPPER_TYPE.includes(value),
39
+ }
40
+ };
41
+
42
+ export const stepEmitTypes = {
43
+ click: (evt: MouseEvent): evt is MouseEvent => evt instanceof MouseEvent,
44
+ };
45
+
46
+ export type StepPropTypes = ExtractPropTypes<typeof stepPropTypes>;
47
+ export type StepEmitTypes = typeof stepEmitTypes;
@@ -1,47 +1,47 @@
1
- import type { StepPropTypes } from '@/components/stepper/step/step';
2
- import type { ExtractPropTypes, PropType } from 'vue';
3
-
4
- export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
5
- const STEPPER_VARIANTS = ['horizontal', 'vertical'] as const;
6
- export const STEPPER_TYPE = ['compact', 'solid'];
7
- export const STEPPER_STATES = ['pending', 'active', 'completed'] as const;
8
-
9
- export const stepperPropTypes = {
10
- /**
11
- * @description Variant of the stepper
12
- */
13
- variant: {
14
- type: String as PropType<(typeof STEPPER_VARIANTS)[number]>,
15
- validator: (value: (typeof STEPPER_VARIANTS)[number]) => STEPPER_VARIANTS.includes(value),
16
- default: 'vertical',
17
- },
18
- /**
19
- * @description steps of the stepper
20
- * @type {Array<Step>}
21
- * @property {number} number - Step number
22
- * @property {string} label - Text label shown in step
23
- * @property {string} status - Step state either as 'pending', 'active', 'completed'
24
- * @property {string} description - Description shown in step
25
- */
26
- steps: {
27
- type: Array as PropType<StepPropTypes[]>,
28
- default: () => [],
29
- },
30
- /**
31
- * @description has lines between steps
32
- */
33
- hasLines: {
34
- type: Boolean,
35
- default: false,
36
- },
37
- /**
38
- * @description Display type of stepper if displayed as compact (no solid bg color) or solid
39
- */
40
- type: {
41
- type: String as PropType<(typeof STEPPER_TYPE)[number]>,
42
- validator: (value: (typeof STEPPER_TYPE)[number]) => STEPPER_TYPE.includes(value),
43
- default: 'compact',
44
- }
45
- };
46
-
47
- export type StepperPropTypes = ExtractPropTypes<typeof stepperPropTypes>;
1
+ import type { StepPropTypes } from '@/components/stepper/step/step';
2
+ import type { ExtractPropTypes, PropType } from 'vue';
3
+
4
+ export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
5
+ const STEPPER_VARIANTS = ['horizontal', 'vertical'] as const;
6
+ export const STEPPER_TYPE = ['compact', 'solid'];
7
+ export const STEPPER_STATES = ['pending', 'active', 'completed'] as const;
8
+
9
+ export const stepperPropTypes = {
10
+ /**
11
+ * @description Variant of the stepper
12
+ */
13
+ variant: {
14
+ type: String as PropType<(typeof STEPPER_VARIANTS)[number]>,
15
+ validator: (value: (typeof STEPPER_VARIANTS)[number]) => STEPPER_VARIANTS.includes(value),
16
+ default: 'vertical',
17
+ },
18
+ /**
19
+ * @description steps of the stepper
20
+ * @type {Array<Step>}
21
+ * @property {number} number - Step number
22
+ * @property {string} label - Text label shown in step
23
+ * @property {string} status - Step state either as 'pending', 'active', 'completed'
24
+ * @property {string} description - Description shown in step
25
+ */
26
+ steps: {
27
+ type: Array as PropType<StepPropTypes[]>,
28
+ default: () => [],
29
+ },
30
+ /**
31
+ * @description has lines between steps
32
+ */
33
+ hasLines: {
34
+ type: Boolean,
35
+ default: false,
36
+ },
37
+ /**
38
+ * @description Display type of stepper if displayed as compact (no solid bg color) or solid
39
+ */
40
+ type: {
41
+ type: String as PropType<(typeof STEPPER_TYPE)[number]>,
42
+ validator: (value: (typeof STEPPER_TYPE)[number]) => STEPPER_TYPE.includes(value),
43
+ default: 'compact',
44
+ }
45
+ };
46
+
47
+ export type StepperPropTypes = ExtractPropTypes<typeof stepperPropTypes>;
@@ -1,34 +1,34 @@
1
- <template>
2
- <div :class="stepperClasses.baseClass">
3
- <div v-for="(step, index) in props.steps" :key="index" :class="stepperClasses.stepClass">
4
- <!-- STEP NUMBER -->
5
- <spr-step
6
- :number="step.number"
7
- :label="step.label"
8
- :status="step.status"
9
- :description="step.description"
10
- :type="props.type"
11
- />
12
-
13
- <!-- LINES -->
14
- <!-- Line container -->
15
- <div
16
- v-if="props.hasLines && index < props.steps.length - 1"
17
- :class="stepperClasses.lineContainerClass"
18
- >
19
- <!-- Actual line -->
20
- <div :class="[stepperClasses.linesClass, getLineColorClass(step)]"/>
21
- </div>
22
- </div>
23
- </div>
24
- </template>
25
-
26
- <script setup lang="ts">
27
- import SprStep from '@/components/stepper/step/step.vue';
28
- import { stepperPropTypes } from '@/components/stepper/stepper';
29
- import { useStepper } from '@/components/stepper/use-stepper';
30
-
31
- const props = defineProps(stepperPropTypes);
32
-
33
- const { stepperClasses, getLineColorClass} = useStepper(props);
34
- </script>
1
+ <template>
2
+ <div :class="stepperClasses.baseClass">
3
+ <div v-for="(step, index) in props.steps" :key="index" :class="stepperClasses.stepClass">
4
+ <!-- STEP NUMBER -->
5
+ <spr-step
6
+ :number="step.number"
7
+ :label="step.label"
8
+ :status="step.status"
9
+ :description="step.description"
10
+ :type="props.type"
11
+ />
12
+
13
+ <!-- LINES -->
14
+ <!-- Line container -->
15
+ <div
16
+ v-if="props.hasLines && index < props.steps.length - 1"
17
+ :class="stepperClasses.lineContainerClass"
18
+ >
19
+ <!-- Actual line -->
20
+ <div :class="[stepperClasses.linesClass, getLineColorClass(step)]"/>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </template>
25
+
26
+ <script setup lang="ts">
27
+ import SprStep from '@/components/stepper/step/step.vue';
28
+ import { stepperPropTypes } from '@/components/stepper/stepper';
29
+ import { useStepper } from '@/components/stepper/use-stepper';
30
+
31
+ const props = defineProps(stepperPropTypes);
32
+
33
+ const { stepperClasses, getLineColorClass} = useStepper(props);
34
+ </script>
@@ -1,42 +1,42 @@
1
- import type { PropType, ExtractPropTypes } from 'vue';
2
-
3
- export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
- const SWITCH_STATES = ['default', 'hover', 'pressed', 'disabled'] as const;
5
-
6
- export const switchPropTypes = {
7
- /**
8
- * @description Switch UI state when hovered, pressed, disabled
9
- */
10
- state: {
11
- type: String as PropType<(typeof SWITCH_STATES)[number]>,
12
- validator: (value: (typeof SWITCH_STATES)[number]) => SWITCH_STATES.includes(value),
13
- default: 'default',
14
- },
15
- /**
16
- * @description Switch input state when disabled
17
- */
18
- disabled: {
19
- type: Boolean,
20
- default: false,
21
- },
22
- /**
23
- * @description Required prop value for v-model
24
- */
25
- modelValue: {
26
- type: Boolean,
27
- required: true,
28
- default: false,
29
- },
30
- /**
31
- * @description Switch id
32
- */
33
- id: {
34
- type: String,
35
- default: '',
36
- },
37
- };
38
-
39
- export const switchEmitTypes = ['update:modelValue'];
40
-
41
- export type SwitchPropTypes = ExtractPropTypes<typeof switchPropTypes>;
42
- export type SwitchEmitTypes = typeof switchEmitTypes;
1
+ import type { PropType, ExtractPropTypes } from 'vue';
2
+
3
+ export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
+ const SWITCH_STATES = ['default', 'hover', 'pressed', 'disabled'] as const;
5
+
6
+ export const switchPropTypes = {
7
+ /**
8
+ * @description Switch UI state when hovered, pressed, disabled
9
+ */
10
+ state: {
11
+ type: String as PropType<(typeof SWITCH_STATES)[number]>,
12
+ validator: (value: (typeof SWITCH_STATES)[number]) => SWITCH_STATES.includes(value),
13
+ default: 'default',
14
+ },
15
+ /**
16
+ * @description Switch input state when disabled
17
+ */
18
+ disabled: {
19
+ type: Boolean,
20
+ default: false,
21
+ },
22
+ /**
23
+ * @description Required prop value for v-model
24
+ */
25
+ modelValue: {
26
+ type: Boolean,
27
+ required: true,
28
+ default: false,
29
+ },
30
+ /**
31
+ * @description Switch id
32
+ */
33
+ id: {
34
+ type: String,
35
+ default: '',
36
+ },
37
+ };
38
+
39
+ export const switchEmitTypes = ['update:modelValue'];
40
+
41
+ export type SwitchPropTypes = ExtractPropTypes<typeof switchPropTypes>;
42
+ export type SwitchEmitTypes = typeof switchEmitTypes;
@@ -1,42 +1,42 @@
1
- import type { PropType, ExtractPropTypes } from 'vue';
2
-
3
- export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
-
5
-
6
- export const tableActionPropTypes = {
7
- /**
8
- * @description Toggle Search field,
9
- */
10
- toggleSearch: {
11
- type: Boolean as PropType<boolean>,
12
- default: false,
13
- },
14
- /**
15
- * @description Toggle Option button
16
- */
17
- toggleOption: {
18
- type: Boolean as PropType<boolean>,
19
- default: false,
20
- },
21
- /**
22
- * @description Toggle Filter Button
23
- */
24
- toggleFilter: {
25
- type: Boolean as PropType<boolean>,
26
- default: false,
27
- },
28
- /**
29
- * @description Search variable
30
- */
31
- searchModel: {
32
- type: String as PropType<string>,
33
- default: '',
34
- },
35
- };
36
-
37
- export const tableActionEmitTypes = {
38
- 'update:searchModel': (value: string): value is string => typeof value === 'string',
39
- };
40
-
41
- export type TableActionEmitTypes = { 'update:searchModel': typeof tableActionEmitTypes };
42
- export type TableActionPropTypes = ExtractPropTypes<typeof tableActionPropTypes>;
1
+ import type { PropType, ExtractPropTypes } from 'vue';
2
+
3
+ export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
4
+
5
+
6
+ export const tableActionPropTypes = {
7
+ /**
8
+ * @description Toggle Search field,
9
+ */
10
+ toggleSearch: {
11
+ type: Boolean as PropType<boolean>,
12
+ default: false,
13
+ },
14
+ /**
15
+ * @description Toggle Option button
16
+ */
17
+ toggleOption: {
18
+ type: Boolean as PropType<boolean>,
19
+ default: false,
20
+ },
21
+ /**
22
+ * @description Toggle Filter Button
23
+ */
24
+ toggleFilter: {
25
+ type: Boolean as PropType<boolean>,
26
+ default: false,
27
+ },
28
+ /**
29
+ * @description Search variable
30
+ */
31
+ searchModel: {
32
+ type: String as PropType<string>,
33
+ default: '',
34
+ },
35
+ };
36
+
37
+ export const tableActionEmitTypes = {
38
+ 'update:searchModel': (value: string): value is string => typeof value === 'string',
39
+ };
40
+
41
+ export type TableActionEmitTypes = { 'update:searchModel': typeof tableActionEmitTypes };
42
+ export type TableActionPropTypes = ExtractPropTypes<typeof tableActionPropTypes>;
@@ -1,40 +1,40 @@
1
- <template>
2
- <div :class="tableActionsBaseClasses">
3
- <slot name="tableActionSection">
4
- <div :class="searchFilterClasses">
5
- <spr-input-search
6
- v-if="props.toggleSearch"
7
- :model-value="props.searchModel"
8
- :class="inputSearchClasses"
9
- placeholder="Search"
10
- @update:model-value="updateSearchField"
11
- />
12
- <spr-button v-if="props.toggleFilter" variant="secondary" has-icon>
13
- <Icon icon="ph:sliders-horizontal"/>
14
- </spr-button>
15
- </div>
16
- <spr-button v-if="props.toggleOption" >
17
- <Icon icon="ph:dots-three-vertical"/>
18
- </spr-button>
19
- </slot>
20
- </div>
21
- </template>
22
-
23
- <script setup lang="ts">
24
- import { useTableActions } from './use-table-actions';
25
- import SprInputSearch from '@/components/input/input-search/input-search.vue';
26
- import SprButton from '@/components/button/button.vue';
27
- import { Icon } from '@iconify/vue';
28
- import { tableActionEmitTypes, tableActionPropTypes } from './table-actions';
29
-
30
- const emit = defineEmits(tableActionEmitTypes);
31
-
32
- const props = defineProps(tableActionPropTypes);
33
-
34
- const {
35
- tableActionsBaseClasses,
36
- inputSearchClasses,
37
- searchFilterClasses,
38
- updateSearchField
39
- } = useTableActions(emit);
40
- </script>
1
+ <template>
2
+ <div :class="tableActionsBaseClasses">
3
+ <slot name="tableActionSection">
4
+ <div :class="searchFilterClasses">
5
+ <spr-input-search
6
+ v-if="props.toggleSearch"
7
+ :model-value="props.searchModel"
8
+ :class="inputSearchClasses"
9
+ placeholder="Search"
10
+ @update:model-value="updateSearchField"
11
+ />
12
+ <spr-button v-if="props.toggleFilter" variant="secondary" has-icon>
13
+ <Icon icon="ph:sliders-horizontal"/>
14
+ </spr-button>
15
+ </div>
16
+ <spr-button v-if="props.toggleOption" >
17
+ <Icon icon="ph:dots-three-vertical"/>
18
+ </spr-button>
19
+ </slot>
20
+ </div>
21
+ </template>
22
+
23
+ <script setup lang="ts">
24
+ import { useTableActions } from './use-table-actions';
25
+ import SprInputSearch from '@/components/input/input-search/input-search.vue';
26
+ import SprButton from '@/components/button/button.vue';
27
+ import { Icon } from '@iconify/vue';
28
+ import { tableActionEmitTypes, tableActionPropTypes } from './table-actions';
29
+
30
+ const emit = defineEmits(tableActionEmitTypes);
31
+
32
+ const props = defineProps(tableActionPropTypes);
33
+
34
+ const {
35
+ tableActionsBaseClasses,
36
+ inputSearchClasses,
37
+ searchFilterClasses,
38
+ updateSearchField
39
+ } = useTableActions(emit);
40
+ </script>
@@ -1,27 +1,27 @@
1
- import type { PropType, ExtractPropTypes } from 'vue';
2
- import type { AVATAR_VARIANT } from '@/components/avatar/avatar';
3
- import type { ICON_WEIGHTS } from '@/components/chips/chips';
4
- export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
5
-
6
- export interface ChipTitle {
7
- title: string;
8
- icon: string;
9
- iconWeight: (typeof ICON_WEIGHTS)[number];
10
- badge: boolean;
11
- badgeText: string;
12
- badgeVariant: string;
13
- avatarUrl: string;
14
- avatarVariant: (typeof AVATAR_VARIANT)[number];
15
- }
16
-
17
- export const tableChipsTitlePropTypes = {
18
- /**
19
- * @description Cell Content,
20
- */
21
- cell: {
22
- type: definePropType<ChipTitle>(Object),
23
- required: true,
24
- },
25
- };
26
-
27
- export type TableChipsTitlePropTypes = ExtractPropTypes<typeof tableChipsTitlePropTypes>;
1
+ import type { PropType, ExtractPropTypes } from 'vue';
2
+ import type { AVATAR_VARIANT } from '@/components/avatar/avatar';
3
+ import type { ICON_WEIGHTS } from '@/components/chips/chips';
4
+ export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
5
+
6
+ export interface ChipTitle {
7
+ title: string;
8
+ icon: string;
9
+ iconWeight: (typeof ICON_WEIGHTS)[number];
10
+ badge: boolean;
11
+ badgeText: string;
12
+ badgeVariant: string;
13
+ avatarUrl: string;
14
+ avatarVariant: (typeof AVATAR_VARIANT)[number];
15
+ }
16
+
17
+ export const tableChipsTitlePropTypes = {
18
+ /**
19
+ * @description Cell Content,
20
+ */
21
+ cell: {
22
+ type: definePropType<ChipTitle>(Object),
23
+ required: true,
24
+ },
25
+ };
26
+
27
+ export type TableChipsTitlePropTypes = ExtractPropTypes<typeof tableChipsTitlePropTypes>;
@@ -1,32 +1,32 @@
1
- <template>
2
- <spr-chips
3
- :label="props.cell?.title"
4
- :icon="computeIcon"
5
- :icon-weight="computeIconWeight"
6
- :badge="computeBadge"
7
- :badge-text="computeBadgeText"
8
- :badge-variant="computeBadgeVariant"
9
- :avatar-url="computeAvatarUrl"
10
- :avatar-variant="computeAvatarVariant"
11
- />
12
- </template>
13
-
14
-
15
- <script lang="ts" setup>
16
- import SprChips from '@/components/chips/chips.vue';
17
-
18
- import { tableChipsTitlePropTypes } from '@/components/table/table-chips-title/table-chips-title';
19
- import { useTableChipsTitle } from './use-table-chips-title';
20
-
21
- const props = defineProps(tableChipsTitlePropTypes);
22
-
23
- const {
24
- computeIcon,
25
- computeIconWeight,
26
- computeBadge,
27
- computeBadgeText,
28
- computeBadgeVariant,
29
- computeAvatarUrl,
30
- computeAvatarVariant
31
- } = useTableChipsTitle(props);
32
- </script>
1
+ <template>
2
+ <spr-chips
3
+ :label="props.cell?.title"
4
+ :icon="computeIcon"
5
+ :icon-weight="computeIconWeight"
6
+ :badge="computeBadge"
7
+ :badge-text="computeBadgeText"
8
+ :badge-variant="computeBadgeVariant"
9
+ :avatar-url="computeAvatarUrl"
10
+ :avatar-variant="computeAvatarVariant"
11
+ />
12
+ </template>
13
+
14
+
15
+ <script lang="ts" setup>
16
+ import SprChips from '@/components/chips/chips.vue';
17
+
18
+ import { tableChipsTitlePropTypes } from '@/components/table/table-chips-title/table-chips-title';
19
+ import { useTableChipsTitle } from './use-table-chips-title';
20
+
21
+ const props = defineProps(tableChipsTitlePropTypes);
22
+
23
+ const {
24
+ computeIcon,
25
+ computeIconWeight,
26
+ computeBadge,
27
+ computeBadgeText,
28
+ computeBadgeVariant,
29
+ computeAvatarUrl,
30
+ computeAvatarVariant
31
+ } = useTableChipsTitle(props);
32
+ </script>