design-system-next 2.11.11 → 2.11.17
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.
- package/dist/design-system-next.es.js +9372 -8159
- package/dist/design-system-next.es.js.gz +0 -0
- package/dist/design-system-next.umd.js +12 -12
- package/dist/design-system-next.umd.js.gz +0 -0
- package/dist/main.css +1 -1
- package/dist/main.css.gz +0 -0
- package/dist/package.json.d.ts +1 -1
- package/package.json +1 -1
- package/src/assets/scripts/border-radius.ts +15 -15
- package/src/assets/scripts/colors.ts +134 -134
- package/src/assets/scripts/max-width.ts +11 -11
- package/src/assets/scripts/spacing.ts +23 -23
- package/src/assets/scripts/utilities.ts +15 -15
- package/src/assets/styles/tailwind.css +20 -0
- package/src/components/accordion/accordion.ts +43 -43
- package/src/components/accordion/use-accordion.ts +43 -43
- package/src/components/avatar/avatar.ts +64 -64
- package/src/components/badge/badge.ts +43 -43
- package/src/components/banner/banner.ts +20 -20
- package/src/components/button/button.ts +72 -72
- package/src/components/button/button.vue +15 -15
- package/src/components/calendar/calendar.ts +89 -89
- package/src/components/card/card.ts +52 -52
- package/src/components/checkbox/checkbox.ts +45 -45
- package/src/components/chips/chips.ts +95 -95
- package/src/components/collapsible/collapsible.ts +21 -21
- package/src/components/collapsible/collapsible.vue +27 -27
- package/src/components/date-picker/__tests__/date-picker.test.ts +112 -112
- package/src/components/date-picker/date-picker.ts +157 -157
- package/src/components/date-picker/date-range-picker/date-range-picker.ts +193 -0
- package/src/components/date-picker/date-range-picker/date-range-picker.vue +412 -0
- package/src/components/date-picker/date-range-picker/use-date-range-picker.ts +957 -0
- package/src/components/dropdown/__tests__/dropdown-fixes.spec.ts +106 -106
- package/src/components/dropdown/__tests__/dropdown-value-types.spec.ts +213 -213
- package/src/components/dropdown/fix-multi-number.ts +92 -92
- package/src/components/dropdown/use-dropdown.ts +488 -488
- package/src/components/empty-state/empty-state.ts +50 -50
- package/src/components/file-upload/file-upload.ts +87 -87
- package/src/components/floating-action/floating-action.ts +12 -12
- package/src/components/input/input-contact-number/input-contact-number.ts +83 -83
- package/src/components/input/input-email/input-email.vue +17 -17
- package/src/components/input/input-password/use-input-password.ts +19 -19
- package/src/components/input/input-search/input-search.vue +13 -13
- package/src/components/input/input-url/input-url.vue +20 -20
- package/src/components/input/input-username/input-username.vue +17 -17
- package/src/components/input/input.vue +72 -72
- package/src/components/list/ladderized-list/ladderized-list.ts +39 -39
- package/src/components/list/ladderized-list/use-ladderized-list.ts +92 -9
- package/src/components/list/list.ts +1 -1
- package/src/components/list/list.vue +95 -73
- package/src/components/list/use-list.ts +214 -77
- package/src/components/logo/logo.ts +43 -43
- package/src/components/logo/logo.vue +14 -14
- package/src/components/logo/use-logo.ts +41 -41
- package/src/components/lozenge/lozenge.ts +61 -61
- package/src/components/modal/modal.ts +45 -45
- package/src/components/progress-bar/progress-bar.ts +39 -39
- package/src/components/radio/radio.ts +42 -42
- package/src/components/select/select-ladderized/select-ladderized.ts +2 -0
- package/src/components/select/select-ladderized/select-ladderized.vue +2 -2
- package/src/components/select/select-ladderized/use-select-ladderized.ts +53 -3
- package/src/components/select/select-multiple/select-multiple.ts +1 -1
- package/src/components/select/select.ts +144 -144
- package/src/components/sidenav/sidenav.ts +173 -173
- package/src/components/sidepanel/sidepanel.ts +100 -100
- package/src/components/sidepanel/sidepanel.vue +55 -55
- package/src/components/sidepanel/stacking-sidepanel/stacking-sidepanel.ts +16 -16
- package/src/components/sidepanel/stacking-sidepanel/stacking-sidepanel.vue +39 -39
- package/src/components/slider/slider.ts +38 -38
- package/src/components/snackbar/snack/snack.ts +71 -71
- package/src/components/snackbar/use-snackbar.ts +34 -34
- package/src/components/status/status.ts +19 -19
- package/src/components/status/status.vue +13 -13
- package/src/components/stepper/step/step.ts +47 -47
- package/src/components/stepper/stepper.ts +47 -47
- package/src/components/stepper/stepper.vue +34 -34
- package/src/components/switch/switch.ts +42 -42
- package/src/components/table/table-actions/table-actions.ts +42 -42
- package/src/components/table/table-actions/table-actions.vue +40 -40
- package/src/components/table/table-chips-title/table-chips-title.ts +27 -27
- package/src/components/table/table-chips-title/table-chips-title.vue +32 -32
- package/src/components/table/table-chips-title/use-table-chips-title.ts +22 -22
- package/src/components/table/table-lozenge-title/table-lozenge-title.ts +23 -23
- package/src/components/table/table-lozenge-title/table-lozenge-title.vue +26 -26
- package/src/components/table/table-lozenge-title/use-table-lozenge-title.ts +21 -21
- package/src/components/table/table-pagination/table-pagination.ts +63 -63
- package/src/components/table/table-pagination/table-pagination.vue +72 -72
- package/src/components/table/table.ts +173 -173
- package/src/components/tabs/tabs.ts +43 -43
- package/src/components/tabs/use-tabs.ts +16 -2
- package/src/components/textarea/textarea.ts +72 -72
- package/src/components/textarea/textarea.vue +45 -45
- package/src/components/time-picker/time-picker.ts +69 -69
- package/src/components/tooltip/tooltip.ts +46 -46
- package/src/components/tooltip/use-tooltip.ts +13 -13
- package/src/examples/dropdown-number-multi-select.vue +76 -76
- package/src/stores/useSnackbarStore.ts +44 -44
- package/src/vite-env.d.ts +6 -0
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Toge Design System v3.0 - Color Scheme
|
|
3
|
-
(https://www.figma.com/design/tlGkN8uKvxVIHB1FgYRIaF/%F0%9F%8C%B1-Toge-Styles-3.0?node-id=2281-4697&node-type=section&m=dev)
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
type ColorShadesTypes = {
|
|
7
|
-
[key: number]: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
type ColorPaletteTypes = {
|
|
11
|
-
[colorName: string]: ColorShadesTypes;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const colorScheme: ColorPaletteTypes = {
|
|
15
|
-
white: {
|
|
16
|
-
50: '#FFFFFF',
|
|
17
|
-
100: '#F1F2F3',
|
|
18
|
-
200: '#DBDBDD',
|
|
19
|
-
300: '#BABCC0',
|
|
20
|
-
400: '#989898',
|
|
21
|
-
500: '#7C7C7C',
|
|
22
|
-
600: '#656565',
|
|
23
|
-
700: '#525252',
|
|
24
|
-
800: '#464646',
|
|
25
|
-
900: '#3D3D3D',
|
|
26
|
-
950: '#292929',
|
|
27
|
-
},
|
|
28
|
-
mushroom: {
|
|
29
|
-
50: '#EFF1F1',
|
|
30
|
-
100: '#E6EAEA',
|
|
31
|
-
200: '#D9DEDE',
|
|
32
|
-
300: '#B8C1C0',
|
|
33
|
-
400: '#919F9D',
|
|
34
|
-
500: '#738482',
|
|
35
|
-
600: '#5D6C6B',
|
|
36
|
-
700: '#4C5857',
|
|
37
|
-
800: '#414B4B',
|
|
38
|
-
900: '#394141',
|
|
39
|
-
950: '#262B2B',
|
|
40
|
-
},
|
|
41
|
-
tomato: {
|
|
42
|
-
50: '#FEF2F3',
|
|
43
|
-
100: '#FEE2E3',
|
|
44
|
-
200: '#FDCBCE',
|
|
45
|
-
300: '#FBA6AA',
|
|
46
|
-
400: '#F6737A',
|
|
47
|
-
500: '#EC4750',
|
|
48
|
-
600: '#DA2F38',
|
|
49
|
-
700: '#B61F27',
|
|
50
|
-
800: '#971D23',
|
|
51
|
-
900: '#7D1F24',
|
|
52
|
-
950: '#440B0E',
|
|
53
|
-
},
|
|
54
|
-
carrot: {
|
|
55
|
-
50: '#FFFAEC',
|
|
56
|
-
100: '#FFF4D3',
|
|
57
|
-
200: '#FFE5A5',
|
|
58
|
-
300: '#FFD16D',
|
|
59
|
-
400: '#FFB132',
|
|
60
|
-
500: '#FF970A',
|
|
61
|
-
600: '#FF7F00',
|
|
62
|
-
700: '#CC5C02',
|
|
63
|
-
800: '#A1470B',
|
|
64
|
-
900: '#823C0C',
|
|
65
|
-
950: '#461C04',
|
|
66
|
-
},
|
|
67
|
-
mango: {
|
|
68
|
-
50: '#FFFFEA',
|
|
69
|
-
100: '#FFFBC5',
|
|
70
|
-
200: '#FFF885',
|
|
71
|
-
300: '#FFED46',
|
|
72
|
-
400: '#FFDF1B',
|
|
73
|
-
500: '#FFBF00',
|
|
74
|
-
600: '#E29300',
|
|
75
|
-
700: '#BB6802',
|
|
76
|
-
800: '#985008',
|
|
77
|
-
900: '#7C420B',
|
|
78
|
-
950: '#482200',
|
|
79
|
-
},
|
|
80
|
-
kangkong: {
|
|
81
|
-
50: '#F0FDF4',
|
|
82
|
-
100: '#DCFCE6',
|
|
83
|
-
200: '#BBF7CE',
|
|
84
|
-
300: '#86EFA8',
|
|
85
|
-
400: '#4ADE7B',
|
|
86
|
-
500: '#22C558',
|
|
87
|
-
600: '#17AD49',
|
|
88
|
-
700: '#158039',
|
|
89
|
-
800: '#166531',
|
|
90
|
-
900: '#14532B',
|
|
91
|
-
950: '#052E15',
|
|
92
|
-
},
|
|
93
|
-
wintermelon: {
|
|
94
|
-
50: '#ECFEFF',
|
|
95
|
-
100: '#CEFBFF',
|
|
96
|
-
200: '#A3F3FE',
|
|
97
|
-
300: '#64E9FC',
|
|
98
|
-
400: '#1ED5F2',
|
|
99
|
-
500: '#02AFCE',
|
|
100
|
-
600: '#0592B5',
|
|
101
|
-
700: '#0C7492',
|
|
102
|
-
800: '#135E77',
|
|
103
|
-
900: '#154E64',
|
|
104
|
-
950: '#073345',
|
|
105
|
-
},
|
|
106
|
-
blueberry: {
|
|
107
|
-
50: '#EEF7FF',
|
|
108
|
-
100: '#D8EBFF',
|
|
109
|
-
200: '#BADCFF',
|
|
110
|
-
300: '#8BBDFF',
|
|
111
|
-
400: '#549EFF',
|
|
112
|
-
500: '#2D88FF',
|
|
113
|
-
600: '#1679FA',
|
|
114
|
-
700: '#0F6EEB',
|
|
115
|
-
800: '#1356BA',
|
|
116
|
-
900: '#164B92',
|
|
117
|
-
950: '#122E59',
|
|
118
|
-
},
|
|
119
|
-
ubas: {
|
|
120
|
-
50: '#F5F3FF',
|
|
121
|
-
100: '#EEE9FE',
|
|
122
|
-
200: '#DED6FE',
|
|
123
|
-
300: '#C6B5FD',
|
|
124
|
-
400: '#AA8BFA',
|
|
125
|
-
500: '#8952F6',
|
|
126
|
-
600: '#8139EE',
|
|
127
|
-
700: '#7227DA',
|
|
128
|
-
800: '#5F21B6',
|
|
129
|
-
900: '#501D95',
|
|
130
|
-
950: '#311065',
|
|
131
|
-
},
|
|
132
|
-
};
|
|
133
|
-
export type { ColorShadesTypes, ColorPaletteTypes };
|
|
134
|
-
export default colorScheme;
|
|
1
|
+
/*
|
|
2
|
+
Toge Design System v3.0 - Color Scheme
|
|
3
|
+
(https://www.figma.com/design/tlGkN8uKvxVIHB1FgYRIaF/%F0%9F%8C%B1-Toge-Styles-3.0?node-id=2281-4697&node-type=section&m=dev)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
type ColorShadesTypes = {
|
|
7
|
+
[key: number]: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type ColorPaletteTypes = {
|
|
11
|
+
[colorName: string]: ColorShadesTypes;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const colorScheme: ColorPaletteTypes = {
|
|
15
|
+
white: {
|
|
16
|
+
50: '#FFFFFF',
|
|
17
|
+
100: '#F1F2F3',
|
|
18
|
+
200: '#DBDBDD',
|
|
19
|
+
300: '#BABCC0',
|
|
20
|
+
400: '#989898',
|
|
21
|
+
500: '#7C7C7C',
|
|
22
|
+
600: '#656565',
|
|
23
|
+
700: '#525252',
|
|
24
|
+
800: '#464646',
|
|
25
|
+
900: '#3D3D3D',
|
|
26
|
+
950: '#292929',
|
|
27
|
+
},
|
|
28
|
+
mushroom: {
|
|
29
|
+
50: '#EFF1F1',
|
|
30
|
+
100: '#E6EAEA',
|
|
31
|
+
200: '#D9DEDE',
|
|
32
|
+
300: '#B8C1C0',
|
|
33
|
+
400: '#919F9D',
|
|
34
|
+
500: '#738482',
|
|
35
|
+
600: '#5D6C6B',
|
|
36
|
+
700: '#4C5857',
|
|
37
|
+
800: '#414B4B',
|
|
38
|
+
900: '#394141',
|
|
39
|
+
950: '#262B2B',
|
|
40
|
+
},
|
|
41
|
+
tomato: {
|
|
42
|
+
50: '#FEF2F3',
|
|
43
|
+
100: '#FEE2E3',
|
|
44
|
+
200: '#FDCBCE',
|
|
45
|
+
300: '#FBA6AA',
|
|
46
|
+
400: '#F6737A',
|
|
47
|
+
500: '#EC4750',
|
|
48
|
+
600: '#DA2F38',
|
|
49
|
+
700: '#B61F27',
|
|
50
|
+
800: '#971D23',
|
|
51
|
+
900: '#7D1F24',
|
|
52
|
+
950: '#440B0E',
|
|
53
|
+
},
|
|
54
|
+
carrot: {
|
|
55
|
+
50: '#FFFAEC',
|
|
56
|
+
100: '#FFF4D3',
|
|
57
|
+
200: '#FFE5A5',
|
|
58
|
+
300: '#FFD16D',
|
|
59
|
+
400: '#FFB132',
|
|
60
|
+
500: '#FF970A',
|
|
61
|
+
600: '#FF7F00',
|
|
62
|
+
700: '#CC5C02',
|
|
63
|
+
800: '#A1470B',
|
|
64
|
+
900: '#823C0C',
|
|
65
|
+
950: '#461C04',
|
|
66
|
+
},
|
|
67
|
+
mango: {
|
|
68
|
+
50: '#FFFFEA',
|
|
69
|
+
100: '#FFFBC5',
|
|
70
|
+
200: '#FFF885',
|
|
71
|
+
300: '#FFED46',
|
|
72
|
+
400: '#FFDF1B',
|
|
73
|
+
500: '#FFBF00',
|
|
74
|
+
600: '#E29300',
|
|
75
|
+
700: '#BB6802',
|
|
76
|
+
800: '#985008',
|
|
77
|
+
900: '#7C420B',
|
|
78
|
+
950: '#482200',
|
|
79
|
+
},
|
|
80
|
+
kangkong: {
|
|
81
|
+
50: '#F0FDF4',
|
|
82
|
+
100: '#DCFCE6',
|
|
83
|
+
200: '#BBF7CE',
|
|
84
|
+
300: '#86EFA8',
|
|
85
|
+
400: '#4ADE7B',
|
|
86
|
+
500: '#22C558',
|
|
87
|
+
600: '#17AD49',
|
|
88
|
+
700: '#158039',
|
|
89
|
+
800: '#166531',
|
|
90
|
+
900: '#14532B',
|
|
91
|
+
950: '#052E15',
|
|
92
|
+
},
|
|
93
|
+
wintermelon: {
|
|
94
|
+
50: '#ECFEFF',
|
|
95
|
+
100: '#CEFBFF',
|
|
96
|
+
200: '#A3F3FE',
|
|
97
|
+
300: '#64E9FC',
|
|
98
|
+
400: '#1ED5F2',
|
|
99
|
+
500: '#02AFCE',
|
|
100
|
+
600: '#0592B5',
|
|
101
|
+
700: '#0C7492',
|
|
102
|
+
800: '#135E77',
|
|
103
|
+
900: '#154E64',
|
|
104
|
+
950: '#073345',
|
|
105
|
+
},
|
|
106
|
+
blueberry: {
|
|
107
|
+
50: '#EEF7FF',
|
|
108
|
+
100: '#D8EBFF',
|
|
109
|
+
200: '#BADCFF',
|
|
110
|
+
300: '#8BBDFF',
|
|
111
|
+
400: '#549EFF',
|
|
112
|
+
500: '#2D88FF',
|
|
113
|
+
600: '#1679FA',
|
|
114
|
+
700: '#0F6EEB',
|
|
115
|
+
800: '#1356BA',
|
|
116
|
+
900: '#164B92',
|
|
117
|
+
950: '#122E59',
|
|
118
|
+
},
|
|
119
|
+
ubas: {
|
|
120
|
+
50: '#F5F3FF',
|
|
121
|
+
100: '#EEE9FE',
|
|
122
|
+
200: '#DED6FE',
|
|
123
|
+
300: '#C6B5FD',
|
|
124
|
+
400: '#AA8BFA',
|
|
125
|
+
500: '#8952F6',
|
|
126
|
+
600: '#8139EE',
|
|
127
|
+
700: '#7227DA',
|
|
128
|
+
800: '#5F21B6',
|
|
129
|
+
900: '#501D95',
|
|
130
|
+
950: '#311065',
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
export type { ColorShadesTypes, ColorPaletteTypes };
|
|
134
|
+
export default colorScheme;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
type MaxWidthTypes = {
|
|
2
|
-
[key: string]: string;
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
const maxWidth: MaxWidthTypes = {
|
|
6
|
-
'sm': '640px',
|
|
7
|
-
'md': '1000px',
|
|
8
|
-
'lg': '1320px',
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default maxWidth;
|
|
1
|
+
type MaxWidthTypes = {
|
|
2
|
+
[key: string]: string;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
const maxWidth: MaxWidthTypes = {
|
|
6
|
+
'sm': '640px',
|
|
7
|
+
'md': '1000px',
|
|
8
|
+
'lg': '1320px',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default maxWidth;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
type spacingTypes = {
|
|
2
|
-
[key: string]: string;
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
const spacing: spacingTypes = {
|
|
6
|
-
'size-spacing-6xs': 'var(--size-50)',
|
|
7
|
-
'size-spacing-5xs': 'var(--size-100)',
|
|
8
|
-
'size-spacing-4xs': 'var(--size-150)',
|
|
9
|
-
'size-spacing-3xs': 'var(--size-200)',
|
|
10
|
-
'size-spacing-2xs': 'var(--size-250)',
|
|
11
|
-
'size-spacing-xs': 'var(--size-300)',
|
|
12
|
-
'size-spacing-sm': 'var(--size-400)',
|
|
13
|
-
'size-spacing-md': 'var(--size-500)',
|
|
14
|
-
'size-spacing-lg': 'var(--size-600)',
|
|
15
|
-
'size-spacing-xl': 'var(--size-700)',
|
|
16
|
-
'size-spacing-2xl': 'var(--size-800)',
|
|
17
|
-
'size-spacing-3xl': 'var(--size-900)',
|
|
18
|
-
'size-spacing-4xl': 'var(--size-1000)',
|
|
19
|
-
'size-spacing-5xl': 'var(--size-1100)',
|
|
20
|
-
'size-spacing-6xl': 'var(--size-1200)',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default spacing;
|
|
1
|
+
type spacingTypes = {
|
|
2
|
+
[key: string]: string;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
const spacing: spacingTypes = {
|
|
6
|
+
'size-spacing-6xs': 'var(--size-50)',
|
|
7
|
+
'size-spacing-5xs': 'var(--size-100)',
|
|
8
|
+
'size-spacing-4xs': 'var(--size-150)',
|
|
9
|
+
'size-spacing-3xs': 'var(--size-200)',
|
|
10
|
+
'size-spacing-2xs': 'var(--size-250)',
|
|
11
|
+
'size-spacing-xs': 'var(--size-300)',
|
|
12
|
+
'size-spacing-sm': 'var(--size-400)',
|
|
13
|
+
'size-spacing-md': 'var(--size-500)',
|
|
14
|
+
'size-spacing-lg': 'var(--size-600)',
|
|
15
|
+
'size-spacing-xl': 'var(--size-700)',
|
|
16
|
+
'size-spacing-2xl': 'var(--size-800)',
|
|
17
|
+
'size-spacing-3xl': 'var(--size-900)',
|
|
18
|
+
'size-spacing-4xl': 'var(--size-1000)',
|
|
19
|
+
'size-spacing-5xl': 'var(--size-1100)',
|
|
20
|
+
'size-spacing-6xl': 'var(--size-1200)',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default spacing;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
type utilitiesTypes = {
|
|
2
|
-
[key: string]: {
|
|
3
|
-
backgroundColor?: string;
|
|
4
|
-
opacity?: string;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const utilities: utilitiesTypes = {
|
|
9
|
-
'bg-overlay': {
|
|
10
|
-
backgroundColor: '#4C5857',
|
|
11
|
-
opacity: '0.6',
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default utilities;
|
|
1
|
+
type utilitiesTypes = {
|
|
2
|
+
[key: string]: {
|
|
3
|
+
backgroundColor?: string;
|
|
4
|
+
opacity?: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const utilities: utilitiesTypes = {
|
|
9
|
+
'bg-overlay': {
|
|
10
|
+
backgroundColor: '#4C5857',
|
|
11
|
+
opacity: '0.6',
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default utilities;
|
|
@@ -234,6 +234,26 @@
|
|
|
234
234
|
}
|
|
235
235
|
/* #endregion - Date Picker */
|
|
236
236
|
|
|
237
|
+
/* #region - Date Range Picker */
|
|
238
|
+
#date-range-picker-wrapper {
|
|
239
|
+
@apply spr-z-[1000] spr-overflow-hidden spr-rounded-xl spr-shadow-drop spr-transition-opacity spr-duration-150 spr-ease-in-out;
|
|
240
|
+
|
|
241
|
+
.v-popper__wrapper {
|
|
242
|
+
.v-popper__inner {
|
|
243
|
+
@apply spr-border-color-weak spr-m-auto spr-w-[336px] spr-min-w-[336px] spr-overflow-y-auto spr-rounded-xl spr-border spr-border-solid spr-font-main spr-shadow-none sm:spr-w-[calc(100%-20px)] sm:spr-min-w-full;
|
|
244
|
+
|
|
245
|
+
&::-webkit-scrollbar-track {
|
|
246
|
+
@apply spr-rounded-br-xl spr-rounded-tr-xl;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.v-popper__arrow-container {
|
|
251
|
+
@apply spr-hidden;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/* #endregion - Date Range Picker */
|
|
256
|
+
|
|
237
257
|
/* #region - Filter, time-picker */
|
|
238
258
|
#time-picker-wrapper-full-width,
|
|
239
259
|
#time-picker-wrapper,
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
|
|
3
|
-
const ACCORDION_TRIGGER = ['header', 'button'] as const;
|
|
4
|
-
|
|
5
|
-
export interface AccordionItem {
|
|
6
|
-
title: string;
|
|
7
|
-
subtitle?: string;
|
|
8
|
-
collapseId: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Defines the prop types for the Accordion component.
|
|
13
|
-
*
|
|
14
|
-
* @property accordionItems - An array of accordion items. This property is required and defaults to an empty array.
|
|
15
|
-
* @property alwaysOpen - A boolean indicating whether multiple accordion items can be open at the same time. Defaults to `false`.
|
|
16
|
-
* @property isDefaultOpen - A boolean indicating whether the accordion is open by default. Defaults to `false`. Won't work if alwaysOpen is false.
|
|
17
|
-
*/
|
|
18
|
-
export const accordionPropTypes = {
|
|
19
|
-
accordionItems: {
|
|
20
|
-
type: Array as PropType<AccordionItem[]>,
|
|
21
|
-
required: true,
|
|
22
|
-
default: () => [],
|
|
23
|
-
},
|
|
24
|
-
alwaysOpen: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false,
|
|
27
|
-
},
|
|
28
|
-
isDefaultOpen: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: false
|
|
31
|
-
},
|
|
32
|
-
accordionTrigger: {
|
|
33
|
-
type: String,
|
|
34
|
-
validator: (value: (typeof ACCORDION_TRIGGER)[number]) => ACCORDION_TRIGGER.includes(value),
|
|
35
|
-
default: 'button'
|
|
36
|
-
},
|
|
37
|
-
bordered: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: true
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export type AccordionPropTypes = ExtractPropTypes<typeof accordionPropTypes>;
|
|
1
|
+
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
|
|
3
|
+
const ACCORDION_TRIGGER = ['header', 'button'] as const;
|
|
4
|
+
|
|
5
|
+
export interface AccordionItem {
|
|
6
|
+
title: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
collapseId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Defines the prop types for the Accordion component.
|
|
13
|
+
*
|
|
14
|
+
* @property accordionItems - An array of accordion items. This property is required and defaults to an empty array.
|
|
15
|
+
* @property alwaysOpen - A boolean indicating whether multiple accordion items can be open at the same time. Defaults to `false`.
|
|
16
|
+
* @property isDefaultOpen - A boolean indicating whether the accordion is open by default. Defaults to `false`. Won't work if alwaysOpen is false.
|
|
17
|
+
*/
|
|
18
|
+
export const accordionPropTypes = {
|
|
19
|
+
accordionItems: {
|
|
20
|
+
type: Array as PropType<AccordionItem[]>,
|
|
21
|
+
required: true,
|
|
22
|
+
default: () => [],
|
|
23
|
+
},
|
|
24
|
+
alwaysOpen: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false,
|
|
27
|
+
},
|
|
28
|
+
isDefaultOpen: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
accordionTrigger: {
|
|
33
|
+
type: String,
|
|
34
|
+
validator: (value: (typeof ACCORDION_TRIGGER)[number]) => ACCORDION_TRIGGER.includes(value),
|
|
35
|
+
default: 'button'
|
|
36
|
+
},
|
|
37
|
+
bordered: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type AccordionPropTypes = ExtractPropTypes<typeof accordionPropTypes>;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
import type { AccordionPropTypes } from './accordion';
|
|
3
|
-
import { toRefs, reactive, ref } from 'vue';
|
|
4
|
-
|
|
5
|
-
export const useAccordion = (props: AccordionPropTypes) => {
|
|
6
|
-
const { accordionItems, isDefaultOpen, alwaysOpen } = toRefs(props);
|
|
7
|
-
const clickedIndex = ref<number>()
|
|
8
|
-
|
|
9
|
-
const collapsedState = reactive(accordionItems.value.map(() => isDefaultOpen.value && alwaysOpen.value));
|
|
10
|
-
|
|
11
|
-
const toggleCollapse = (index: number) => {
|
|
12
|
-
if (index < 0 || index >= collapsedState.length) return;
|
|
13
|
-
|
|
14
|
-
collapsedState[index] = !collapsedState[index];
|
|
15
|
-
|
|
16
|
-
if (!props.alwaysOpen) {
|
|
17
|
-
collapsedState.forEach((_, i) => {
|
|
18
|
-
if (i !== index) {
|
|
19
|
-
collapsedState[i] = false;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const setClickedIndex = (index: number) => {
|
|
26
|
-
clickedIndex.value = index
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const clearIndex = () => {
|
|
30
|
-
clickedIndex.value = undefined
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
accordionItems,
|
|
35
|
-
isDefaultOpen,
|
|
36
|
-
alwaysOpen,
|
|
37
|
-
collapsedState,
|
|
38
|
-
toggleCollapse,
|
|
39
|
-
setClickedIndex,
|
|
40
|
-
clearIndex,
|
|
41
|
-
clickedIndex
|
|
42
|
-
}
|
|
43
|
-
};
|
|
1
|
+
|
|
2
|
+
import type { AccordionPropTypes } from './accordion';
|
|
3
|
+
import { toRefs, reactive, ref } from 'vue';
|
|
4
|
+
|
|
5
|
+
export const useAccordion = (props: AccordionPropTypes) => {
|
|
6
|
+
const { accordionItems, isDefaultOpen, alwaysOpen } = toRefs(props);
|
|
7
|
+
const clickedIndex = ref<number>()
|
|
8
|
+
|
|
9
|
+
const collapsedState = reactive(accordionItems.value.map(() => isDefaultOpen.value && alwaysOpen.value));
|
|
10
|
+
|
|
11
|
+
const toggleCollapse = (index: number) => {
|
|
12
|
+
if (index < 0 || index >= collapsedState.length) return;
|
|
13
|
+
|
|
14
|
+
collapsedState[index] = !collapsedState[index];
|
|
15
|
+
|
|
16
|
+
if (!props.alwaysOpen) {
|
|
17
|
+
collapsedState.forEach((_, i) => {
|
|
18
|
+
if (i !== index) {
|
|
19
|
+
collapsedState[i] = false;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const setClickedIndex = (index: number) => {
|
|
26
|
+
clickedIndex.value = index
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const clearIndex = () => {
|
|
30
|
+
clickedIndex.value = undefined
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
accordionItems,
|
|
35
|
+
isDefaultOpen,
|
|
36
|
+
alwaysOpen,
|
|
37
|
+
collapsedState,
|
|
38
|
+
toggleCollapse,
|
|
39
|
+
setClickedIndex,
|
|
40
|
+
clearIndex,
|
|
41
|
+
clickedIndex
|
|
42
|
+
}
|
|
43
|
+
};
|