design-system-next 2.20.1 → 2.20.5
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 +6863 -6804
- 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 +3 -2
- package/package.json +3 -2
- package/src/App.vue +51 -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/components/accordion/accordion.ts +43 -43
- package/src/components/accordion/use-accordion.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/checkbox/checkbox.ts +45 -45
- package/src/components/collapsible/collapsible.ts +21 -21
- package/src/components/collapsible/collapsible.vue +27 -27
- package/src/components/dropdown/fix-multi-number.ts +92 -92
- package/src/components/empty-state/empty-state.ts +50 -50
- package/src/components/floating-action/floating-action.ts +12 -12
- package/src/components/input/input-email/input-email.vue +17 -17
- 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/list/ladderized-list/ladderized-list.ts +47 -39
- package/src/components/list/ladderized-list/ladderized-list.vue +2 -0
- package/src/components/list/list-item/list-item.ts +48 -0
- package/src/components/list/list-item/list-item.vue +108 -0
- package/src/components/list/list-item/use-list-item.ts +36 -0
- package/src/components/list/list.ts +4 -0
- package/src/components/list/list.vue +68 -254
- package/src/components/list/use-list.ts +19 -5
- 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 +4 -18
- package/src/components/lozenge/lozenge.vue +14 -4
- package/src/components/lozenge/use-lozenge.ts +6 -0
- package/src/components/radio/radio.ts +42 -42
- package/src/components/select/select-ladderized/select-ladderized.ts +13 -1
- package/src/components/select/select-ladderized/select-ladderized.vue +5 -5
- package/src/components/select/select-multiple/select-multiple.ts +16 -2
- package/src/components/select/select-multiple/select-multiple.vue +5 -6
- package/src/components/select/select.ts +12 -1
- package/src/components/select/select.vue +21 -11
- 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/tabs/tabs.ts +43 -43
- package/src/components/time-picker/time-picker.ts +69 -69
- package/src/components/tooltip/use-tooltip.ts +13 -13
- package/src/stores/useSnackbarStore.ts +44 -44
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import type { PropType, ExtractPropTypes, Component } from 'vue';
|
|
2
|
-
|
|
3
|
-
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
|
-
|
|
5
|
-
type List = {
|
|
6
|
-
label: string;
|
|
7
|
-
icon?: string;
|
|
8
|
-
iconFill?: Component;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const tabsPropTypes = {
|
|
13
|
-
/**
|
|
14
|
-
* @description Tabs List,
|
|
15
|
-
* option list: label, icon, iconFill, disabled
|
|
16
|
-
*/
|
|
17
|
-
list: {
|
|
18
|
-
type: Array<List>,
|
|
19
|
-
default: () => [],
|
|
20
|
-
},
|
|
21
|
-
/**
|
|
22
|
-
* @description Tabs Type (underlined, not underlined)
|
|
23
|
-
*/
|
|
24
|
-
underlined: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false,
|
|
27
|
-
},
|
|
28
|
-
/**
|
|
29
|
-
* @description Active Tab
|
|
30
|
-
*/
|
|
31
|
-
activeTab: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: '',
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const tabsEmitTypes = {
|
|
38
|
-
tabIndex: (index: number): index is number => typeof index === 'number',
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export type TabsPropTypes = ExtractPropTypes<typeof tabsPropTypes>;
|
|
42
|
-
|
|
43
|
-
export type TabsEmitTypes = typeof tabsEmitTypes;
|
|
1
|
+
import type { PropType, ExtractPropTypes, Component } from 'vue';
|
|
2
|
+
|
|
3
|
+
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
|
+
|
|
5
|
+
type List = {
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
iconFill?: Component;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const tabsPropTypes = {
|
|
13
|
+
/**
|
|
14
|
+
* @description Tabs List,
|
|
15
|
+
* option list: label, icon, iconFill, disabled
|
|
16
|
+
*/
|
|
17
|
+
list: {
|
|
18
|
+
type: Array<List>,
|
|
19
|
+
default: () => [],
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* @description Tabs Type (underlined, not underlined)
|
|
23
|
+
*/
|
|
24
|
+
underlined: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false,
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* @description Active Tab
|
|
30
|
+
*/
|
|
31
|
+
activeTab: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: '',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const tabsEmitTypes = {
|
|
38
|
+
tabIndex: (index: number): index is number => typeof index === 'number',
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type TabsPropTypes = ExtractPropTypes<typeof tabsPropTypes>;
|
|
42
|
+
|
|
43
|
+
export type TabsEmitTypes = typeof tabsEmitTypes;
|
|
@@ -1,69 +1,69 @@
|
|
|
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 timePickerPropTypes = {
|
|
6
|
-
modelValue: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
label: {
|
|
11
|
-
type: String,
|
|
12
|
-
default: '',
|
|
13
|
-
},
|
|
14
|
-
error: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: false,
|
|
17
|
-
},
|
|
18
|
-
disabled: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: false,
|
|
21
|
-
},
|
|
22
|
-
/**
|
|
23
|
-
* @description Interval in minutes
|
|
24
|
-
*/
|
|
25
|
-
interval: {
|
|
26
|
-
type: Number,
|
|
27
|
-
default: 30,
|
|
28
|
-
},
|
|
29
|
-
/**
|
|
30
|
-
* @description '24' for 24-hour format, '12' for 12-hour format
|
|
31
|
-
*/
|
|
32
|
-
format: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: '24',
|
|
35
|
-
},
|
|
36
|
-
/**
|
|
37
|
-
* @description disable user to type
|
|
38
|
-
*/
|
|
39
|
-
disableTyping: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: false,
|
|
42
|
-
},
|
|
43
|
-
/**
|
|
44
|
-
* @description disable user to type
|
|
45
|
-
*/
|
|
46
|
-
fullWidth: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
50
|
-
helperText: {
|
|
51
|
-
type: String,
|
|
52
|
-
default: '',
|
|
53
|
-
},
|
|
54
|
-
placeholder: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: '',
|
|
57
|
-
},
|
|
58
|
-
id: {
|
|
59
|
-
type: String,
|
|
60
|
-
default: 'time-picker',
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
export const timePickerEmitTypes = {
|
|
64
|
-
'update:modelValue': (evt: MouseEvent): evt is MouseEvent => evt instanceof MouseEvent,
|
|
65
|
-
};
|
|
66
|
-
export type TimePickerEmitTypes = {
|
|
67
|
-
'update:modelValue': string;
|
|
68
|
-
};
|
|
69
|
-
export type TimePickerPropTypes = ExtractPropTypes<typeof timePickerPropTypes>;
|
|
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 timePickerPropTypes = {
|
|
6
|
+
modelValue: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
label: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: '',
|
|
13
|
+
},
|
|
14
|
+
error: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
disabled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false,
|
|
21
|
+
},
|
|
22
|
+
/**
|
|
23
|
+
* @description Interval in minutes
|
|
24
|
+
*/
|
|
25
|
+
interval: {
|
|
26
|
+
type: Number,
|
|
27
|
+
default: 30,
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* @description '24' for 24-hour format, '12' for 12-hour format
|
|
31
|
+
*/
|
|
32
|
+
format: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '24',
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* @description disable user to type
|
|
38
|
+
*/
|
|
39
|
+
disableTyping: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* @description disable user to type
|
|
45
|
+
*/
|
|
46
|
+
fullWidth: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false,
|
|
49
|
+
},
|
|
50
|
+
helperText: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: '',
|
|
53
|
+
},
|
|
54
|
+
placeholder: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: '',
|
|
57
|
+
},
|
|
58
|
+
id: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: 'time-picker',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
export const timePickerEmitTypes = {
|
|
64
|
+
'update:modelValue': (evt: MouseEvent): evt is MouseEvent => evt instanceof MouseEvent,
|
|
65
|
+
};
|
|
66
|
+
export type TimePickerEmitTypes = {
|
|
67
|
+
'update:modelValue': string;
|
|
68
|
+
};
|
|
69
|
+
export type TimePickerPropTypes = ExtractPropTypes<typeof timePickerPropTypes>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
import { Placement } from 'floating-vue';
|
|
4
|
-
|
|
5
|
-
import { TooltipPropTypes } from './tooltip';
|
|
6
|
-
|
|
7
|
-
export const useTooltip = (props: TooltipPropTypes) => {
|
|
8
|
-
const placement = ref(props.placement as Placement);
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
placement,
|
|
12
|
-
};
|
|
13
|
-
};
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
import { Placement } from 'floating-vue';
|
|
4
|
+
|
|
5
|
+
import { TooltipPropTypes } from './tooltip';
|
|
6
|
+
|
|
7
|
+
export const useTooltip = (props: TooltipPropTypes) => {
|
|
8
|
+
const placement = ref(props.placement as Placement);
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
placement,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { defineStore } from "pinia";
|
|
2
|
-
import { SnackPropTypes } from "@/components/snackbar/snack/snack";
|
|
3
|
-
import { ref, type Ref } from "vue";
|
|
4
|
-
|
|
5
|
-
const createSnack = (payload: SnackPropTypes): SnackStoreTypes => ({
|
|
6
|
-
...payload,
|
|
7
|
-
id: Math.random() * 1000,
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export interface SnackStoreTypes extends SnackPropTypes {
|
|
11
|
-
id: number,
|
|
12
|
-
defaultAction?: () => void
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const useSnackbarStore = defineStore("snackbar-store", () => {
|
|
16
|
-
const snacks: Ref<SnackStoreTypes[]> = ref([]);
|
|
17
|
-
|
|
18
|
-
// Delete function for snacks
|
|
19
|
-
const eatSnack = (snack: SnackStoreTypes) => {
|
|
20
|
-
snacks.value = snacks.value.filter((s) => s.id !== snack.id);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const updateState = (payload: SnackPropTypes) => {
|
|
24
|
-
const snack = createSnack(payload);
|
|
25
|
-
|
|
26
|
-
// Add new snack to state array
|
|
27
|
-
snacks.value.push({...snack, defaultAction: () => eatSnack(snack)});
|
|
28
|
-
|
|
29
|
-
// At a certain duration, delete snack
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
eatSnack(snack);
|
|
32
|
-
}, payload.duration || 4000);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const message = (payload: SnackPropTypes) => {
|
|
36
|
-
updateState({ ...payload});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return {
|
|
40
|
-
snacks,
|
|
41
|
-
updateState,
|
|
42
|
-
message,
|
|
43
|
-
}
|
|
44
|
-
});
|
|
1
|
+
import { defineStore } from "pinia";
|
|
2
|
+
import { SnackPropTypes } from "@/components/snackbar/snack/snack";
|
|
3
|
+
import { ref, type Ref } from "vue";
|
|
4
|
+
|
|
5
|
+
const createSnack = (payload: SnackPropTypes): SnackStoreTypes => ({
|
|
6
|
+
...payload,
|
|
7
|
+
id: Math.random() * 1000,
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export interface SnackStoreTypes extends SnackPropTypes {
|
|
11
|
+
id: number,
|
|
12
|
+
defaultAction?: () => void
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const useSnackbarStore = defineStore("snackbar-store", () => {
|
|
16
|
+
const snacks: Ref<SnackStoreTypes[]> = ref([]);
|
|
17
|
+
|
|
18
|
+
// Delete function for snacks
|
|
19
|
+
const eatSnack = (snack: SnackStoreTypes) => {
|
|
20
|
+
snacks.value = snacks.value.filter((s) => s.id !== snack.id);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const updateState = (payload: SnackPropTypes) => {
|
|
24
|
+
const snack = createSnack(payload);
|
|
25
|
+
|
|
26
|
+
// Add new snack to state array
|
|
27
|
+
snacks.value.push({...snack, defaultAction: () => eatSnack(snack)});
|
|
28
|
+
|
|
29
|
+
// At a certain duration, delete snack
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
eatSnack(snack);
|
|
32
|
+
}, payload.duration || 4000);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const message = (payload: SnackPropTypes) => {
|
|
36
|
+
updateState({ ...payload});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
snacks,
|
|
41
|
+
updateState,
|
|
42
|
+
message,
|
|
43
|
+
}
|
|
44
|
+
});
|