design-system-next 2.13.2 → 2.13.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 +2174 -2157
- 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/App.vue +79 -1
- package/src/components/dropdown/dropdown.ts +19 -0
- package/src/components/dropdown/dropdown.vue +4 -4
- package/src/components/modal/modal.ts +1 -1
- package/src/components/modal/use-modal.ts +1 -0
- package/src/components/sidenav/sidenav-menu-links.vue +2 -2
- package/src/components/table/table-pagination/table-pagination.vue +1 -1
- package/src/components/table/table-pagination/use-table-pagination.ts +7 -3
|
@@ -24,6 +24,7 @@ export const PLACEMENTS_TYPES = [
|
|
|
24
24
|
] as const;
|
|
25
25
|
|
|
26
26
|
const POPPER_STRATEGY_TYPES = ['fixed', 'absolute'] as const;
|
|
27
|
+
const TRIGGER_EVENTS = ['click', 'hover', 'focus', 'touch'] as const;
|
|
27
28
|
|
|
28
29
|
export const dropdownPropTypes = {
|
|
29
30
|
id: {
|
|
@@ -115,6 +116,24 @@ export const dropdownPropTypes = {
|
|
|
115
116
|
lozenge: {
|
|
116
117
|
type: Boolean,
|
|
117
118
|
default: false,
|
|
119
|
+
},
|
|
120
|
+
triggers: {
|
|
121
|
+
type: Array as PropType<(typeof TRIGGER_EVENTS)[number][]>,
|
|
122
|
+
validator: (value: (typeof TRIGGER_EVENTS)[number][]) => {
|
|
123
|
+
return value.every((val) => TRIGGER_EVENTS.includes(val));
|
|
124
|
+
},
|
|
125
|
+
default: () => ['click'],
|
|
126
|
+
},
|
|
127
|
+
popperTriggers: {
|
|
128
|
+
type: Array as PropType<(typeof TRIGGER_EVENTS)[number][]>,
|
|
129
|
+
validator: (value: (typeof TRIGGER_EVENTS)[number][]) => {
|
|
130
|
+
return value.every((val) => TRIGGER_EVENTS.includes(val));
|
|
131
|
+
},
|
|
132
|
+
default: () => [],
|
|
133
|
+
},
|
|
134
|
+
autoHide: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
default: true,
|
|
118
137
|
}
|
|
119
138
|
};
|
|
120
139
|
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
aria-id="dropdown-wrapper"
|
|
5
5
|
distance="4"
|
|
6
6
|
:placement="props.placement"
|
|
7
|
-
:triggers="
|
|
8
|
-
:popper-
|
|
9
|
-
:auto-hide="
|
|
7
|
+
:triggers="props.triggers"
|
|
8
|
+
:popper-triggers="props.popperTriggers"
|
|
9
|
+
:auto-hide="props.autoHide"
|
|
10
10
|
:disabled="isDropdownPopperDisabled"
|
|
11
11
|
:container="`#${props.id}`"
|
|
12
12
|
:strategy="
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
width: props.width,
|
|
19
19
|
}"
|
|
20
20
|
>
|
|
21
|
-
<div
|
|
21
|
+
<div class="dropdown-slot">
|
|
22
22
|
<slot />
|
|
23
23
|
</div>
|
|
24
24
|
|
|
@@ -2,7 +2,7 @@ import type { PropType, ExtractPropTypes } from 'vue';
|
|
|
2
2
|
|
|
3
3
|
export const definePropType = <T>(val: unknown): PropType<T> => val as PropType<T>;
|
|
4
4
|
|
|
5
|
-
const MODAL_SIZE = ['sm', 'md', 'lg', 'xl'] as const;
|
|
5
|
+
const MODAL_SIZE = ['sm', 'md', 'lg', 'xl', 'xxl'] as const;
|
|
6
6
|
|
|
7
7
|
export const modalPropTypes = {
|
|
8
8
|
modelValue: {
|
|
@@ -32,6 +32,7 @@ export const useModal = (props: ModalPropTypes, emit: SetupContext<ModalEmitType
|
|
|
32
32
|
'spr-w-[480px] spr-max-w-[720px]': size.value === 'md',
|
|
33
33
|
'spr-w-[720px] spr-max-w-[960px]': size.value === 'lg',
|
|
34
34
|
'spr-w-[900px] spr-max-w-[1200px]': size.value === 'xl',
|
|
35
|
+
'spr-w-[1200px] spr-max-w-[1400px]': size.value === 'xxl',
|
|
35
36
|
},
|
|
36
37
|
{ 'bounce-animation': staticBackdropClicked.value },
|
|
37
38
|
);
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
v-if="menuLink.menuHeading"
|
|
66
66
|
:class="{
|
|
67
67
|
'spr-label-xs-medium spr-text-color-supporting spr-m-0 spr-p-2': true,
|
|
68
|
-
'spr-
|
|
68
|
+
'spr-pt-2': menuLinkIndex !== 0,
|
|
69
69
|
}"
|
|
70
70
|
>
|
|
71
71
|
{{ menuLink.menuHeading }}
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
v-if="submenuLink.subMenuHeading"
|
|
139
139
|
:class="{
|
|
140
140
|
'spr-label-xs-medium spr-text-color-supporting spr-m-0 spr-p-2': true,
|
|
141
|
-
'spr-
|
|
141
|
+
'spr-pt-2': submenuLinkIndex !== 0,
|
|
142
142
|
}"
|
|
143
143
|
>
|
|
144
144
|
{{ submenuLink.subMenuHeading }}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
>
|
|
11
11
|
<spr-input v-model="computeSelectedRowCount" :class="paginationClasses.dropdownInputFieldClass" :readonly="true">
|
|
12
12
|
<template #icon>
|
|
13
|
-
<Icon icon="ph:caret-down-bold" :class="paginationClasses.inputFieldIconClass" />
|
|
13
|
+
<Icon icon="ph:caret-down-bold" :class="paginationClasses.inputFieldIconClass" width="12px" height="12px"/>
|
|
14
14
|
</template>
|
|
15
15
|
</spr-input>
|
|
16
16
|
</spr-dropdown>
|
|
@@ -31,8 +31,13 @@ export const useTablePagination = (
|
|
|
31
31
|
'spr-border spr-border-solid spr-border-color-weak': bordered.value,
|
|
32
32
|
'spr-border-x-0 spr-border-t spr-border-b-0 spr-border-solid spr-border-color-weak': !bordered.value,
|
|
33
33
|
});
|
|
34
|
-
|
|
35
|
-
const
|
|
34
|
+
|
|
35
|
+
const dropdownClass = classNames(
|
|
36
|
+
'!spr-w-max [&_.dropdown-slot_div_div]:spr-border-color-base [&_.dropdown-slot_div_div]:spr-p-0'
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const dropdownInputFieldClass = classNames('spr-max-w-[120px] spr-min-w-[48px] spr-h-full spr-font-semibold [&_input]:spr-py-size-spacing-3xs [&_input]:spr-pr-size-spacing-5xs');
|
|
40
|
+
const inputFieldIconClass = classNames('spr-text-mushroom-950 spr-pr-size-spacing-3xs spr-box-content');
|
|
36
41
|
const rightSideClass = classNames(
|
|
37
42
|
'spr-flex spr-justify-between spr-items-center',
|
|
38
43
|
{
|
|
@@ -49,7 +54,6 @@ export const useTablePagination = (
|
|
|
49
54
|
}
|
|
50
55
|
);
|
|
51
56
|
const navigationButtonClass = classNames('spr-rounded-border-radius-md');
|
|
52
|
-
const dropdownClass = classNames('!spr-w-max');
|
|
53
57
|
return {
|
|
54
58
|
baseClass,
|
|
55
59
|
dropdownInputFieldClass,
|