@unsource/ui 1.9.7 → 1.9.9
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/module.json +1 -1
- package/dist/runtime/components/UnCheckboxItem.d.vue.ts +1 -2
- package/dist/runtime/components/UnCheckboxItem.vue +6 -1
- package/dist/runtime/components/UnCheckboxItem.vue.d.ts +1 -2
- package/dist/runtime/components/UnSelect.d.vue.ts +2 -0
- package/dist/runtime/components/UnSelect.vue +4 -4
- package/dist/runtime/components/UnSelect.vue.d.ts +2 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { CardItem } from './UnCard.vue.js';
|
|
2
|
-
import type { CardCustomClass } from "./UnCard.vue.js";
|
|
1
|
+
import type { CardItem, CardCustomClass } from './UnCard.vue.js';
|
|
3
2
|
export type CheckboxCustomInput = Partial<Record<'box' | 'innerBox' | 'card', string>> & {
|
|
4
3
|
item?: CardCustomClass;
|
|
5
4
|
};
|
|
@@ -14,7 +14,12 @@
|
|
|
14
14
|
:class="[customClass.innerBox, customClass[selected ? 'selected' : 'notSelected']?.innerBox, selected ? '!h-10px' : '!h-1px']"
|
|
15
15
|
/>
|
|
16
16
|
</div>
|
|
17
|
-
<UnCard
|
|
17
|
+
<UnCard
|
|
18
|
+
class="!bg-transparent"
|
|
19
|
+
:class="[customClass.card, customClass[selected ? 'selected' : 'notSelected']?.card]"
|
|
20
|
+
:custom-class="_mergeWith(customClass.item, customClass[selected ? 'selected' : 'notSelected']?.item, merge)"
|
|
21
|
+
:item
|
|
22
|
+
/>
|
|
18
23
|
</div>
|
|
19
24
|
</template>
|
|
20
25
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { CardItem } from './UnCard.vue.js';
|
|
2
|
-
import type { CardCustomClass } from "./UnCard.vue.js";
|
|
1
|
+
import type { CardItem, CardCustomClass } from './UnCard.vue.js';
|
|
3
2
|
export type CheckboxCustomInput = Partial<Record<'box' | 'innerBox' | 'card', string>> & {
|
|
4
3
|
item?: CardCustomClass;
|
|
5
4
|
};
|
|
@@ -13,6 +13,8 @@ type __VLS_Props = {
|
|
|
13
13
|
customClass?: Partial<Record<'header' | 'icon' | 'label' | 'arrowIcon' | 'wrapper' | 'innerWrapper' | 'search' | 'list' | 'radio' | 'checkbox' | 'checkboxButton', unknown>> & {
|
|
14
14
|
radioItem?: RadioCustomClass;
|
|
15
15
|
checkboxItem?: CheckboxCustomClass;
|
|
16
|
+
selected: Partial<Record<'radio' | 'checkbox', string>>;
|
|
17
|
+
notSelected: Partial<Record<'radio' | 'checkbox', string>>;
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
20
|
type __VLS_ModelProps = {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<div
|
|
65
65
|
name="list"
|
|
66
66
|
:class="customClass.list"
|
|
67
|
-
class="
|
|
67
|
+
class="min-w-fit divide-(y dashed border) flex flex-col items-stretch overflow-y-auto scrollbar-width-thin !children:b-x-0"
|
|
68
68
|
>
|
|
69
69
|
<template v-if="multi">
|
|
70
70
|
<UnCheckboxItem
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
:key="Value(option)"
|
|
73
73
|
:value="Value(option)"
|
|
74
74
|
:item="Label(option)"
|
|
75
|
-
:class="customClass.checkbox"
|
|
75
|
+
:class="[customClass.checkbox, customClass[value?.includes(Value(option)) ? 'selected' : 'notSelected']?.checkbox]"
|
|
76
76
|
:custom-class="customClass.checkboxItem"
|
|
77
77
|
:selected="value?.includes(Value(option))"
|
|
78
78
|
@click="handleSelect(option)"
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
:key="Value(option)"
|
|
93
93
|
:value="Value(option)"
|
|
94
94
|
:item="Label(option)"
|
|
95
|
-
:class="customClass.radio"
|
|
95
|
+
:class="[customClass.radio, customClass[isEqual(Value(option), value) ? 'selected' : 'notSelected']?.radio]"
|
|
96
96
|
:custom-class="customClass.radioItem"
|
|
97
97
|
:selected="isEqual(Value(option), value)"
|
|
98
98
|
class="!min-w-60"
|
|
@@ -133,7 +133,7 @@ const close = () => {
|
|
|
133
133
|
show.value = false;
|
|
134
134
|
};
|
|
135
135
|
const dropdownStyles = ref({});
|
|
136
|
-
const Value = (option) => _get(option, valueKey
|
|
136
|
+
const Value = (option) => valueKey ? _get(option, valueKey, option) : option;
|
|
137
137
|
const Label = (option) => typeof option === "string" ? { title: option } : option;
|
|
138
138
|
const Selected = computed(() => items.find((o) => isEqual(Value(o), value.value)));
|
|
139
139
|
const IsSelected = (v) => items.find((o) => isEqual(Value(o), v));
|
|
@@ -13,6 +13,8 @@ type __VLS_Props = {
|
|
|
13
13
|
customClass?: Partial<Record<'header' | 'icon' | 'label' | 'arrowIcon' | 'wrapper' | 'innerWrapper' | 'search' | 'list' | 'radio' | 'checkbox' | 'checkboxButton', unknown>> & {
|
|
14
14
|
radioItem?: RadioCustomClass;
|
|
15
15
|
checkboxItem?: CheckboxCustomClass;
|
|
16
|
+
selected: Partial<Record<'radio' | 'checkbox', string>>;
|
|
17
|
+
notSelected: Partial<Record<'radio' | 'checkbox', string>>;
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
20
|
type __VLS_ModelProps = {
|