vueless 0.0.192 → 0.0.193
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/package.json +3 -3
- package/service.storybook/index.js +42 -8
- package/ui.button-toggle-item/index.vue +1 -3
- package/ui.dropdown-item/index.vue +1 -1
- package/ui.form-checkbox/index.vue +6 -8
- package/ui.form-input-rating/composables/attrs.composable.js +24 -22
- package/ui.form-input-rating/configs/default.config.js +28 -13
- package/ui.form-input-rating/index.stories.js +26 -21
- package/ui.form-input-rating/index.vue +99 -68
- package/ui.form-radio/index.vue +7 -8
- package/ui.navigation-tab/index.vue +3 -3
- package/web-types.json +310 -60
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.193",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless Component Framework.",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
39
39
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
40
40
|
"@vueless/plugin-vite": "^0.0.34",
|
|
41
|
-
"@vueless/storybook": "^0.0.
|
|
42
|
-
"@vueless/web-types": "^0.0.
|
|
41
|
+
"@vueless/storybook": "^0.0.33",
|
|
42
|
+
"@vueless/web-types": "^0.0.13",
|
|
43
43
|
"autoprefixer": "^10.4.19",
|
|
44
44
|
"cssnano": "^6.1.2",
|
|
45
45
|
"eslint": "^8.55.0",
|
|
@@ -18,10 +18,6 @@ export function getArgTypes(componentName) {
|
|
|
18
18
|
|
|
19
19
|
const types = {};
|
|
20
20
|
|
|
21
|
-
getSlotNames(componentName)?.forEach((slotName) => {
|
|
22
|
-
types[slotName] = { control: "text" };
|
|
23
|
-
});
|
|
24
|
-
|
|
25
21
|
component.attributes?.forEach((attribute) => {
|
|
26
22
|
const type = attribute.value.type;
|
|
27
23
|
|
|
@@ -84,16 +80,48 @@ export function getArgTypes(componentName) {
|
|
|
84
80
|
}
|
|
85
81
|
});
|
|
86
82
|
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
component.slots?.forEach((slot) => {
|
|
84
|
+
const bindings = [];
|
|
85
|
+
|
|
86
|
+
slot.bindings?.forEach((binding) => {
|
|
87
|
+
const description = binding.description ? ` (${binding.description})` : "";
|
|
88
|
+
|
|
89
|
+
bindings.push(`${binding.name}: ${binding.type}${description}`);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
types[`${slot.name}Slot`] = {
|
|
93
|
+
name: slot.name,
|
|
94
|
+
description: slot.description,
|
|
95
|
+
type: slot.bindings ? `{ ${bindings.join(", ")} }` : null,
|
|
96
|
+
control: "text",
|
|
97
|
+
table: { category: "slots" },
|
|
98
|
+
};
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
component.events?.forEach((event) => {
|
|
102
|
+
const properties = [];
|
|
103
|
+
|
|
104
|
+
event.properties?.forEach((property) => {
|
|
105
|
+
const description = property.description ? ` (${property.description})` : "";
|
|
106
|
+
|
|
107
|
+
properties.push(`${property.name}: ${property.type}${description}`);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
types[event.name] = {
|
|
111
|
+
type: event.properties ? `{ ${properties.join(", ")} }` : null,
|
|
112
|
+
name: event.name,
|
|
113
|
+
description: event.description,
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
if (import.meta.env.STORYBOOK_FULL) {
|
|
89
117
|
const eventName = "on" + event.name.charAt(0).toUpperCase() + event.name.slice(1);
|
|
90
118
|
|
|
91
119
|
types[eventName] = {
|
|
92
120
|
action: event.name,
|
|
93
121
|
table: { category: "Storybook Events" },
|
|
94
122
|
};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
123
|
+
}
|
|
124
|
+
});
|
|
97
125
|
|
|
98
126
|
return types;
|
|
99
127
|
}
|
|
@@ -101,3 +129,9 @@ export function getArgTypes(componentName) {
|
|
|
101
129
|
export function getSource(defaultCnfig) {
|
|
102
130
|
return defaultCnfig.replace("export default /*tw*/ ", "").replace(";", "");
|
|
103
131
|
}
|
|
132
|
+
|
|
133
|
+
export const allSlotsFragment = `
|
|
134
|
+
<template v-for="(slot, index) of slots" :key="index" v-slot:[slot]>
|
|
135
|
+
<template v-if="args[slot + 'Slot']">{{ args[slot + 'Slot'] }}</template>
|
|
136
|
+
</template>
|
|
137
|
+
`;
|
|
@@ -146,9 +146,7 @@ function onClickSetValue() {
|
|
|
146
146
|
selectedItem.value = props.value;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
updateSelectedValue(props.value, !selectedItem.value);
|
|
151
|
-
}
|
|
149
|
+
updateSelectedValue && updateSelectedValue(props.value, !selectedItem.value);
|
|
152
150
|
|
|
153
151
|
emit("update:modelValue", props.value);
|
|
154
152
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script setup>
|
|
42
|
-
import { inject, ref, onMounted, computed, watchEffect } from "vue";
|
|
42
|
+
import { inject, ref, onMounted, computed, watchEffect, toValue } from "vue";
|
|
43
43
|
import { isEqual } from "lodash-es";
|
|
44
44
|
|
|
45
45
|
import UIcon from "../ui.image-icon";
|
|
@@ -210,7 +210,7 @@ const iconSize = computed(() => {
|
|
|
210
210
|
});
|
|
211
211
|
|
|
212
212
|
const isBinary = computed(() => !Array.isArray(props.modelValue));
|
|
213
|
-
const isCheckboxInGroup = computed(() => Boolean(getCheckboxGroupName
|
|
213
|
+
const isCheckboxInGroup = computed(() => Boolean(toValue(getCheckboxGroupName)));
|
|
214
214
|
|
|
215
215
|
const isChecked = computed(() => {
|
|
216
216
|
return isBinary.value && !isCheckboxInGroup.value
|
|
@@ -223,17 +223,15 @@ const checkboxValue = computed(() => {
|
|
|
223
223
|
});
|
|
224
224
|
|
|
225
225
|
const currentValue = computed(() => {
|
|
226
|
-
return isCheckboxInGroup.value ? getCheckboxGroupCheckedItems
|
|
226
|
+
return isCheckboxInGroup.value ? toValue(getCheckboxGroupCheckedItems) : props.modelValue;
|
|
227
227
|
});
|
|
228
228
|
|
|
229
229
|
onMounted(() => {
|
|
230
|
-
checkboxName.value = isCheckboxInGroup.value ? getCheckboxGroupName
|
|
230
|
+
checkboxName.value = isCheckboxInGroup.value ? toValue(getCheckboxGroupName) : props.name;
|
|
231
231
|
});
|
|
232
232
|
|
|
233
|
-
watchEffect(
|
|
234
|
-
|
|
235
|
-
);
|
|
236
|
-
watchEffect(() => (checkboxSize.value = getCheckboxSize ? getCheckboxSize() : props.size));
|
|
233
|
+
watchEffect(() => (checkboxColor.value = toValue(getCheckboxGroupColor) || props.color));
|
|
234
|
+
watchEffect(() => (checkboxSize.value = toValue(getCheckboxSize) || props.size));
|
|
237
235
|
|
|
238
236
|
function onChange() {
|
|
239
237
|
let newModelValue;
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
1
2
|
import useUI from "../../composable.ui";
|
|
2
3
|
import { cva } from "../../service.ui";
|
|
3
|
-
|
|
4
4
|
import defaultConfig from "../configs/default.config";
|
|
5
|
-
import { computed } from "vue";
|
|
6
5
|
|
|
7
6
|
export function useAttrs(props) {
|
|
8
|
-
const { config, getAttrs } = useUI(
|
|
9
|
-
|
|
7
|
+
const { config, getAttrs, hasSlotContent, isSystemKey } = useUI(
|
|
8
|
+
defaultConfig,
|
|
9
|
+
() => props.config,
|
|
10
|
+
);
|
|
11
|
+
const attrs = {};
|
|
12
|
+
|
|
13
|
+
for (const key in defaultConfig) {
|
|
14
|
+
if (isSystemKey(key)) continue;
|
|
15
|
+
|
|
16
|
+
let classes = "";
|
|
17
|
+
let value = config.value[key];
|
|
10
18
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
variants: counter.variants,
|
|
14
|
-
compoundVariants: counter.compoundVariants,
|
|
15
|
-
});
|
|
19
|
+
if (value.variants || value.compoundVariants) {
|
|
20
|
+
const getCVA = cva(value);
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
classes = computed(() =>
|
|
23
|
+
getCVA({
|
|
24
|
+
...props,
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
27
|
+
}
|
|
18
28
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const wrapperAttrs = getAttrs("wrapper");
|
|
22
|
-
const iconAttrs = getAttrs("icon", { isComponent: true });
|
|
23
|
-
const iconWrapperAttrs = getAttrs("iconWrapper");
|
|
24
|
-
const labelAttrs = getAttrs("label", { isComponent: true });
|
|
29
|
+
attrs[`${key}Attrs`] = getAttrs(key, { classes });
|
|
30
|
+
}
|
|
25
31
|
|
|
26
32
|
return {
|
|
33
|
+
...attrs,
|
|
27
34
|
config,
|
|
28
|
-
|
|
29
|
-
ratingAttrs,
|
|
30
|
-
wrapperAttrs,
|
|
31
|
-
iconAttrs,
|
|
32
|
-
iconWrapperAttrs,
|
|
33
|
-
labelAttrs,
|
|
35
|
+
hasSlotContent,
|
|
34
36
|
};
|
|
35
37
|
}
|
|
@@ -1,27 +1,42 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
label: "{ULabel}",
|
|
3
|
+
wrapper: {
|
|
4
|
+
base: "flex items-center text-gray-500 !leading-none",
|
|
5
|
+
variants: {
|
|
6
|
+
size: {
|
|
7
|
+
sm: "gap-1.5",
|
|
8
|
+
md: "gap-2",
|
|
9
|
+
lg: "gap-2.5",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
stars: "flex",
|
|
14
|
+
star: "{UIcon}",
|
|
7
15
|
selectedIconName: "star-fill",
|
|
8
16
|
unselectedIconName: "star",
|
|
9
17
|
counter: {
|
|
10
|
-
base: "leading-none",
|
|
11
18
|
variants: {
|
|
12
19
|
size: {
|
|
13
|
-
sm: "text-
|
|
14
|
-
md: "text-
|
|
15
|
-
lg: "text-
|
|
20
|
+
sm: "text-base",
|
|
21
|
+
md: "text-xl",
|
|
22
|
+
lg: "text-2xl",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
total: {
|
|
27
|
+
variants: {
|
|
28
|
+
size: {
|
|
29
|
+
sm: "text-sm",
|
|
30
|
+
md: "text-base",
|
|
31
|
+
lg: "text-xl",
|
|
16
32
|
},
|
|
17
33
|
},
|
|
18
34
|
},
|
|
19
35
|
defaultVariants: {
|
|
36
|
+
labelAlign: "top",
|
|
20
37
|
size: "md",
|
|
21
|
-
|
|
22
|
-
|
|
38
|
+
stars: 5,
|
|
39
|
+
counter: false,
|
|
23
40
|
selectable: false,
|
|
24
|
-
noCounter: false,
|
|
25
|
-
labelAlign: "topInside",
|
|
26
41
|
},
|
|
27
42
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getArgTypes, getSlotNames } from "../service.storybook";
|
|
1
|
+
import { getArgTypes, getSlotNames, allSlotsFragment } from "../service.storybook";
|
|
2
2
|
|
|
3
3
|
import UInputRating from "../ui.form-input-rating";
|
|
4
4
|
import URow from "../ui.container-row";
|
|
@@ -11,8 +11,8 @@ export default {
|
|
|
11
11
|
title: "Form Inputs & Controls / Input Rating",
|
|
12
12
|
component: UInputRating,
|
|
13
13
|
args: {
|
|
14
|
+
modelValue: 2,
|
|
14
15
|
label: "Label",
|
|
15
|
-
value: 2,
|
|
16
16
|
},
|
|
17
17
|
argTypes: {
|
|
18
18
|
...getArgTypes(UInputRating.name),
|
|
@@ -29,12 +29,9 @@ const DefaultTemplate = (args) => ({
|
|
|
29
29
|
template: `
|
|
30
30
|
<UInputRating
|
|
31
31
|
v-bind="args"
|
|
32
|
-
v-model="args.
|
|
32
|
+
v-model="args.modelValue"
|
|
33
33
|
>
|
|
34
|
-
|
|
35
|
-
<template v-if="args[slot]">{{ args[slot] }}</template>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
34
|
+
${allSlotsFragment}
|
|
38
35
|
</UInputRating>
|
|
39
36
|
`,
|
|
40
37
|
});
|
|
@@ -47,7 +44,7 @@ const SlotTemplate = (args) => ({
|
|
|
47
44
|
template: `
|
|
48
45
|
<UInputRating
|
|
49
46
|
v-bind="args"
|
|
50
|
-
v-model="args.
|
|
47
|
+
v-model="args.modelValue"
|
|
51
48
|
>
|
|
52
49
|
${args.slotTemplate}
|
|
53
50
|
</UInputRating>
|
|
@@ -63,12 +60,13 @@ const SizesTemplate = (args, { argTypes } = {}) => ({
|
|
|
63
60
|
};
|
|
64
61
|
},
|
|
65
62
|
template: `
|
|
66
|
-
<URow>
|
|
63
|
+
<URow gap="2xl">
|
|
67
64
|
<UInputRating
|
|
68
65
|
v-for="(size, index) in sizes"
|
|
66
|
+
:key="index"
|
|
69
67
|
v-bind="args"
|
|
68
|
+
v-model="args.modelValue"
|
|
70
69
|
:size="size"
|
|
71
|
-
:key="index"
|
|
72
70
|
/>
|
|
73
71
|
</URow>
|
|
74
72
|
`,
|
|
@@ -80,32 +78,39 @@ Default.args = {};
|
|
|
80
78
|
export const sizes = SizesTemplate.bind({});
|
|
81
79
|
sizes.args = {};
|
|
82
80
|
|
|
81
|
+
export const starAmount = DefaultTemplate.bind({});
|
|
82
|
+
starAmount.args = { value: 4, stars: 7 };
|
|
83
|
+
|
|
83
84
|
export const selectable = DefaultTemplate.bind({});
|
|
84
85
|
selectable.args = { selectable: true };
|
|
85
86
|
|
|
86
|
-
export const
|
|
87
|
-
|
|
87
|
+
export const description = DefaultTemplate.bind({});
|
|
88
|
+
description.args = { description: "Some description" };
|
|
88
89
|
|
|
89
90
|
export const error = DefaultTemplate.bind({});
|
|
90
|
-
error.args = { error: "
|
|
91
|
+
error.args = { error: "Some error" };
|
|
92
|
+
|
|
93
|
+
export const withCounter = DefaultTemplate.bind({});
|
|
94
|
+
withCounter.args = { counter: true };
|
|
91
95
|
|
|
92
|
-
export const
|
|
93
|
-
|
|
96
|
+
export const withTotal = DefaultTemplate.bind({});
|
|
97
|
+
withTotal.args = { total: 250 };
|
|
94
98
|
|
|
95
99
|
export const slotCounter = SlotTemplate.bind({});
|
|
96
100
|
slotCounter.args = {
|
|
97
101
|
slotTemplate: `
|
|
98
|
-
<template #counter>
|
|
99
|
-
|
|
102
|
+
<template #counter="{counter}">
|
|
103
|
+
Rating: {{counter}}
|
|
100
104
|
</template>
|
|
101
105
|
`,
|
|
102
106
|
};
|
|
103
107
|
|
|
104
|
-
export const
|
|
105
|
-
|
|
108
|
+
export const slotTotal = SlotTemplate.bind({});
|
|
109
|
+
slotTotal.args = {
|
|
110
|
+
total: 250,
|
|
106
111
|
slotTemplate: `
|
|
107
|
-
<template #
|
|
108
|
-
|
|
112
|
+
<template #total="{total}">
|
|
113
|
+
({{total}}) reviews
|
|
109
114
|
</template>
|
|
110
115
|
`,
|
|
111
116
|
};
|
|
@@ -1,43 +1,52 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
v-for="star in starsNumber"
|
|
22
|
-
:key="star"
|
|
23
|
-
internal
|
|
24
|
-
color="yellow"
|
|
25
|
-
:size="iconSize"
|
|
26
|
-
:interactive="selectable"
|
|
27
|
-
:data-cy="`${dataCy}-rating-star-${star}`"
|
|
28
|
-
:name="star <= ratingCounter ? config.selectedIconName : config.unselectedIconName"
|
|
29
|
-
v-bind="iconAttrs"
|
|
30
|
-
@mouseover="onMouseHover(star)"
|
|
31
|
-
@mouseleave="onMouseHover()"
|
|
32
|
-
@click="onClickStar(star)"
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<!-- @slot Use it to add something right. -->
|
|
37
|
-
<slot name="right" />
|
|
2
|
+
<ULabel
|
|
3
|
+
:label="label"
|
|
4
|
+
:error="error"
|
|
5
|
+
:size="size"
|
|
6
|
+
:align="labelAlign"
|
|
7
|
+
:description="description"
|
|
8
|
+
v-bind="labelAttrs"
|
|
9
|
+
:data-cy="dataCy"
|
|
10
|
+
>
|
|
11
|
+
<div v-bind="wrapperAttrs">
|
|
12
|
+
<div v-if="counter || hasSlotContent($slots['counter'])" v-bind="counterAttrs">
|
|
13
|
+
<!--
|
|
14
|
+
@slot Use it to customise counter.
|
|
15
|
+
@binding {number} counter
|
|
16
|
+
@binding {number} total
|
|
17
|
+
-->
|
|
18
|
+
<slot name="counter" :counter="counterValue" :total="total">
|
|
19
|
+
{{ counterValue }}
|
|
20
|
+
</slot>
|
|
38
21
|
</div>
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
|
|
23
|
+
<div v-bind="starsAttrs">
|
|
24
|
+
<UIcon
|
|
25
|
+
v-for="star in stars"
|
|
26
|
+
:key="star"
|
|
27
|
+
internal
|
|
28
|
+
color="yellow"
|
|
29
|
+
:size="iconSize"
|
|
30
|
+
:interactive="selectable"
|
|
31
|
+
:name="star <= counterValue ? config.selectedIconName : config.unselectedIconName"
|
|
32
|
+
v-bind="starAttrs"
|
|
33
|
+
:data-cy="`${dataCy}-rating-star-${star}`"
|
|
34
|
+
@click="onClickStar(star)"
|
|
35
|
+
@mouseleave="onMouseHover()"
|
|
36
|
+
@mouseover="onMouseHover(star)"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div v-if="total || hasSlotContent($slots['total'])" v-bind="totalAttrs">
|
|
41
|
+
<!--
|
|
42
|
+
@slot Use it to customise total.
|
|
43
|
+
@binding {number} counter
|
|
44
|
+
@binding {number} total
|
|
45
|
+
-->
|
|
46
|
+
<slot name="total" :counter="counter" :total="total">({{ total }})</slot>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</ULabel>
|
|
41
50
|
</template>
|
|
42
51
|
|
|
43
52
|
<script setup>
|
|
@@ -56,31 +65,23 @@ defineOptions({ name: "UInputRating", inheritAttrs: false });
|
|
|
56
65
|
|
|
57
66
|
const props = defineProps({
|
|
58
67
|
/**
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
|
-
label: {
|
|
62
|
-
type: String,
|
|
63
|
-
default: "",
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Set input rating value.
|
|
68
|
+
* Rating value.
|
|
68
69
|
*/
|
|
69
70
|
modelValue: {
|
|
70
71
|
type: Number,
|
|
71
|
-
default:
|
|
72
|
+
default: 0,
|
|
72
73
|
},
|
|
73
74
|
|
|
74
75
|
/**
|
|
75
|
-
*
|
|
76
|
+
* Rating number of stars.
|
|
76
77
|
*/
|
|
77
|
-
|
|
78
|
+
stars: {
|
|
78
79
|
type: Number,
|
|
79
|
-
default: UIService.get(defaultConfig, UInputRating).default.
|
|
80
|
+
default: UIService.get(defaultConfig, UInputRating).default.stars,
|
|
80
81
|
},
|
|
81
82
|
|
|
82
83
|
/**
|
|
83
|
-
*
|
|
84
|
+
* Rating size.
|
|
84
85
|
* @values sm, md, lg
|
|
85
86
|
*/
|
|
86
87
|
size: {
|
|
@@ -89,15 +90,15 @@ const props = defineProps({
|
|
|
89
90
|
},
|
|
90
91
|
|
|
91
92
|
/**
|
|
92
|
-
*
|
|
93
|
+
* Rating label.
|
|
93
94
|
*/
|
|
94
|
-
|
|
95
|
-
type:
|
|
96
|
-
default:
|
|
95
|
+
label: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: "",
|
|
97
98
|
},
|
|
98
99
|
|
|
99
100
|
/**
|
|
100
|
-
*
|
|
101
|
+
* Rating label placement.
|
|
101
102
|
* @values top, topInside, topWithDesc, bottom, left, right
|
|
102
103
|
*/
|
|
103
104
|
labelAlign: {
|
|
@@ -106,7 +107,7 @@ const props = defineProps({
|
|
|
106
107
|
},
|
|
107
108
|
|
|
108
109
|
/**
|
|
109
|
-
*
|
|
110
|
+
* Rating error message.
|
|
110
111
|
*/
|
|
111
112
|
error: {
|
|
112
113
|
type: String,
|
|
@@ -114,7 +115,7 @@ const props = defineProps({
|
|
|
114
115
|
},
|
|
115
116
|
|
|
116
117
|
/**
|
|
117
|
-
*
|
|
118
|
+
* Rating description.
|
|
118
119
|
*/
|
|
119
120
|
description: {
|
|
120
121
|
type: String,
|
|
@@ -122,15 +123,31 @@ const props = defineProps({
|
|
|
122
123
|
},
|
|
123
124
|
|
|
124
125
|
/**
|
|
125
|
-
*
|
|
126
|
+
* Rating total.
|
|
127
|
+
*/
|
|
128
|
+
total: {
|
|
129
|
+
type: Number,
|
|
130
|
+
default: 0,
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Show rating counter.
|
|
126
135
|
*/
|
|
127
|
-
|
|
136
|
+
counter: {
|
|
128
137
|
type: Boolean,
|
|
129
|
-
default: UIService.get(defaultConfig, UInputRating).default.
|
|
138
|
+
default: UIService.get(defaultConfig, UInputRating).default.counter,
|
|
130
139
|
},
|
|
131
140
|
|
|
132
141
|
/**
|
|
133
|
-
*
|
|
142
|
+
* Make rating selectable.
|
|
143
|
+
*/
|
|
144
|
+
selectable: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
default: UIService.get(defaultConfig, UInputRating).default.selectable,
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Component ui config object.
|
|
134
151
|
*/
|
|
135
152
|
config: {
|
|
136
153
|
type: Object,
|
|
@@ -138,7 +155,7 @@ const props = defineProps({
|
|
|
138
155
|
},
|
|
139
156
|
|
|
140
157
|
/**
|
|
141
|
-
*
|
|
158
|
+
* Data-cy attribute for automated testing.
|
|
142
159
|
*/
|
|
143
160
|
dataCy: {
|
|
144
161
|
type: String,
|
|
@@ -146,12 +163,26 @@ const props = defineProps({
|
|
|
146
163
|
},
|
|
147
164
|
});
|
|
148
165
|
|
|
149
|
-
const emit = defineEmits([
|
|
166
|
+
const emit = defineEmits([
|
|
167
|
+
/**
|
|
168
|
+
* Triggers when the rating is changes.
|
|
169
|
+
* @property {number} modelValue
|
|
170
|
+
*/
|
|
171
|
+
"update:modelValue",
|
|
172
|
+
]);
|
|
150
173
|
|
|
151
174
|
const hovered = ref(null);
|
|
152
175
|
|
|
153
|
-
const {
|
|
154
|
-
|
|
176
|
+
const {
|
|
177
|
+
config,
|
|
178
|
+
labelAttrs,
|
|
179
|
+
wrapperAttrs,
|
|
180
|
+
counterAttrs,
|
|
181
|
+
totalAttrs,
|
|
182
|
+
starsAttrs,
|
|
183
|
+
starAttrs,
|
|
184
|
+
hasSlotContent,
|
|
185
|
+
} = useAttrs(props);
|
|
155
186
|
|
|
156
187
|
const iconSize = computed(() => {
|
|
157
188
|
const sizes = {
|
|
@@ -163,7 +194,7 @@ const iconSize = computed(() => {
|
|
|
163
194
|
return sizes[props.size];
|
|
164
195
|
});
|
|
165
196
|
|
|
166
|
-
const
|
|
197
|
+
const counterValue = computed(() => {
|
|
167
198
|
return hovered.value || props.modelValue;
|
|
168
199
|
});
|
|
169
200
|
|
package/ui.form-radio/index.vue
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script setup>
|
|
33
|
-
import { computed, inject, onMounted, ref, watchEffect } from "vue";
|
|
33
|
+
import { computed, inject, onMounted, ref, watchEffect, toValue } from "vue";
|
|
34
34
|
|
|
35
35
|
import ULabel from "../ui.form-label";
|
|
36
36
|
import UIService, { getRandomId } from "../service.ui";
|
|
@@ -162,8 +162,8 @@ const emit = defineEmits(["update:modelValue"]);
|
|
|
162
162
|
|
|
163
163
|
const localValue = ref("");
|
|
164
164
|
const radioName = ref(null);
|
|
165
|
-
const radioColor = ref(getRadioGroupColor
|
|
166
|
-
const radioSize = ref(getRadioGroupSize
|
|
165
|
+
const radioColor = ref(toValue(getRadioGroupColor) || props.color);
|
|
166
|
+
const radioSize = ref(toValue(getRadioGroupSize) || props.size);
|
|
167
167
|
|
|
168
168
|
const isChecked = computed(() => {
|
|
169
169
|
const currentValue = props.modelValue ?? localValue.value;
|
|
@@ -182,14 +182,13 @@ const radioValue = computed(() => {
|
|
|
182
182
|
});
|
|
183
183
|
|
|
184
184
|
onMounted(() => {
|
|
185
|
-
radioName.value = props.name || getRadioGroupName
|
|
185
|
+
radioName.value = props.name || toValue(getRadioGroupName);
|
|
186
186
|
});
|
|
187
187
|
|
|
188
|
-
watchEffect(() => (radioColor.value = getRadioGroupColor
|
|
189
|
-
watchEffect(() => (radioSize.value = getRadioGroupSize
|
|
188
|
+
watchEffect(() => (radioColor.value = toValue(getRadioGroupColor) || props.color));
|
|
189
|
+
watchEffect(() => (radioSize.value = toValue(getRadioGroupSize) || props.size));
|
|
190
190
|
watchEffect(() => {
|
|
191
|
-
localValue.value = getRadioGroupSelectedItem
|
|
192
|
-
|
|
191
|
+
localValue.value = toValue(getRadioGroupSelectedItem) || null;
|
|
193
192
|
emit("update:modelValue", props.value);
|
|
194
193
|
});
|
|
195
194
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script setup>
|
|
11
|
-
import { computed, inject } from "vue";
|
|
11
|
+
import { computed, inject, toValue } from "vue";
|
|
12
12
|
|
|
13
13
|
import UIService from "../service.ui";
|
|
14
14
|
|
|
@@ -68,11 +68,11 @@ const props = defineProps({
|
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
const selected = computed(() => {
|
|
71
|
-
return getUTabsSelectedItem
|
|
71
|
+
return toValue(getUTabsSelectedItem) === props.value && !props.disabled;
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
const size = computed(() => {
|
|
75
|
-
return getUTabsSize
|
|
75
|
+
return toValue(getUTabsSize) || UIService.get(defaultConfig, UTab).default.size;
|
|
76
76
|
});
|
|
77
77
|
|
|
78
78
|
const { wrapperAttrs } = useAttrs(props, { selected, size });
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.193",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -260,7 +260,19 @@
|
|
|
260
260
|
],
|
|
261
261
|
"slots": [
|
|
262
262
|
{
|
|
263
|
-
"name": "`cell-${key}`"
|
|
263
|
+
"name": "`cell-${key}`",
|
|
264
|
+
"scoped": true,
|
|
265
|
+
"bindings": [
|
|
266
|
+
{
|
|
267
|
+
"name": "name"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"name": "value"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"name": "row"
|
|
274
|
+
}
|
|
275
|
+
]
|
|
264
276
|
}
|
|
265
277
|
],
|
|
266
278
|
"source": {
|
|
@@ -451,11 +463,23 @@
|
|
|
451
463
|
"description": "Use it to add something above text."
|
|
452
464
|
},
|
|
453
465
|
{
|
|
454
|
-
"name": "title"
|
|
466
|
+
"name": "title",
|
|
467
|
+
"scoped": true,
|
|
468
|
+
"bindings": [
|
|
469
|
+
{
|
|
470
|
+
"name": "title"
|
|
471
|
+
}
|
|
472
|
+
]
|
|
455
473
|
},
|
|
456
474
|
{
|
|
457
475
|
"name": "description",
|
|
458
|
-
"
|
|
476
|
+
"scoped": true,
|
|
477
|
+
"description": "Use it to add something instead of the description.",
|
|
478
|
+
"bindings": [
|
|
479
|
+
{
|
|
480
|
+
"name": "description"
|
|
481
|
+
}
|
|
482
|
+
]
|
|
459
483
|
},
|
|
460
484
|
{
|
|
461
485
|
"name": "left",
|
|
@@ -1681,11 +1705,23 @@
|
|
|
1681
1705
|
"slots": [
|
|
1682
1706
|
{
|
|
1683
1707
|
"name": "label",
|
|
1684
|
-
"
|
|
1708
|
+
"scoped": true,
|
|
1709
|
+
"description": "Use it to modify label.",
|
|
1710
|
+
"bindings": [
|
|
1711
|
+
{
|
|
1712
|
+
"name": "item"
|
|
1713
|
+
}
|
|
1714
|
+
]
|
|
1685
1715
|
},
|
|
1686
1716
|
{
|
|
1687
1717
|
"name": "actions",
|
|
1688
|
-
"
|
|
1718
|
+
"scoped": true,
|
|
1719
|
+
"description": "Use it to add custom actions.",
|
|
1720
|
+
"bindings": [
|
|
1721
|
+
{
|
|
1722
|
+
"name": "item"
|
|
1723
|
+
}
|
|
1724
|
+
]
|
|
1689
1725
|
}
|
|
1690
1726
|
],
|
|
1691
1727
|
"source": {
|
|
@@ -2885,18 +2921,45 @@
|
|
|
2885
2921
|
"slots": [
|
|
2886
2922
|
{
|
|
2887
2923
|
"name": "before-option",
|
|
2888
|
-
"
|
|
2924
|
+
"scoped": true,
|
|
2925
|
+
"description": "Use it to add something before option.",
|
|
2926
|
+
"bindings": [
|
|
2927
|
+
{
|
|
2928
|
+
"name": "option"
|
|
2929
|
+
}
|
|
2930
|
+
]
|
|
2889
2931
|
},
|
|
2890
2932
|
{
|
|
2891
2933
|
"name": "option",
|
|
2892
|
-
"
|
|
2934
|
+
"scoped": true,
|
|
2935
|
+
"description": "Use it to add something before option.",
|
|
2936
|
+
"bindings": [
|
|
2937
|
+
{
|
|
2938
|
+
"name": "option"
|
|
2939
|
+
},
|
|
2940
|
+
{
|
|
2941
|
+
"name": "index"
|
|
2942
|
+
}
|
|
2943
|
+
]
|
|
2893
2944
|
},
|
|
2894
2945
|
{
|
|
2895
2946
|
"name": "after-option",
|
|
2896
|
-
"
|
|
2947
|
+
"scoped": true,
|
|
2948
|
+
"description": "Use it to add something after option.",
|
|
2949
|
+
"bindings": [
|
|
2950
|
+
{
|
|
2951
|
+
"name": "option"
|
|
2952
|
+
}
|
|
2953
|
+
]
|
|
2897
2954
|
},
|
|
2898
2955
|
{
|
|
2899
|
-
"name": "empty"
|
|
2956
|
+
"name": "empty",
|
|
2957
|
+
"scoped": true,
|
|
2958
|
+
"bindings": [
|
|
2959
|
+
{
|
|
2960
|
+
"name": "empty-styles"
|
|
2961
|
+
}
|
|
2962
|
+
]
|
|
2900
2963
|
}
|
|
2901
2964
|
],
|
|
2902
2965
|
"source": {
|
|
@@ -3034,10 +3097,22 @@
|
|
|
3034
3097
|
],
|
|
3035
3098
|
"slots": [
|
|
3036
3099
|
{
|
|
3037
|
-
"name": "left"
|
|
3100
|
+
"name": "left",
|
|
3101
|
+
"scoped": true,
|
|
3102
|
+
"bindings": [
|
|
3103
|
+
{
|
|
3104
|
+
"name": "file"
|
|
3105
|
+
}
|
|
3106
|
+
]
|
|
3038
3107
|
},
|
|
3039
3108
|
{
|
|
3040
|
-
"name": "right"
|
|
3109
|
+
"name": "right",
|
|
3110
|
+
"scoped": true,
|
|
3111
|
+
"bindings": [
|
|
3112
|
+
{
|
|
3113
|
+
"name": "file"
|
|
3114
|
+
}
|
|
3115
|
+
]
|
|
3041
3116
|
}
|
|
3042
3117
|
],
|
|
3043
3118
|
"source": {
|
|
@@ -3110,11 +3185,23 @@
|
|
|
3110
3185
|
},
|
|
3111
3186
|
{
|
|
3112
3187
|
"name": "left",
|
|
3113
|
-
"
|
|
3188
|
+
"scoped": true,
|
|
3189
|
+
"description": "Use it to add something left.",
|
|
3190
|
+
"bindings": [
|
|
3191
|
+
{
|
|
3192
|
+
"name": "file"
|
|
3193
|
+
}
|
|
3194
|
+
]
|
|
3114
3195
|
},
|
|
3115
3196
|
{
|
|
3116
3197
|
"name": "right",
|
|
3117
|
-
"
|
|
3198
|
+
"scoped": true,
|
|
3199
|
+
"description": "Use it to add something right.",
|
|
3200
|
+
"bindings": [
|
|
3201
|
+
{
|
|
3202
|
+
"name": "file"
|
|
3203
|
+
}
|
|
3204
|
+
]
|
|
3118
3205
|
}
|
|
3119
3206
|
],
|
|
3120
3207
|
"source": {
|
|
@@ -4130,18 +4217,9 @@
|
|
|
4130
4217
|
"name": "UInputRating",
|
|
4131
4218
|
"description": "",
|
|
4132
4219
|
"attributes": [
|
|
4133
|
-
{
|
|
4134
|
-
"name": "label",
|
|
4135
|
-
"description": "Set input rating label.",
|
|
4136
|
-
"value": {
|
|
4137
|
-
"kind": "expression",
|
|
4138
|
-
"type": "string"
|
|
4139
|
-
},
|
|
4140
|
-
"default": "\"\""
|
|
4141
|
-
},
|
|
4142
4220
|
{
|
|
4143
4221
|
"name": "modelValue",
|
|
4144
|
-
"description": "
|
|
4222
|
+
"description": "Rating value.",
|
|
4145
4223
|
"value": {
|
|
4146
4224
|
"kind": "expression",
|
|
4147
4225
|
"type": "number"
|
|
@@ -4149,8 +4227,8 @@
|
|
|
4149
4227
|
"default": "0"
|
|
4150
4228
|
},
|
|
4151
4229
|
{
|
|
4152
|
-
"name": "
|
|
4153
|
-
"description": "
|
|
4230
|
+
"name": "stars",
|
|
4231
|
+
"description": "Rating number of stars.",
|
|
4154
4232
|
"value": {
|
|
4155
4233
|
"kind": "expression",
|
|
4156
4234
|
"type": "number"
|
|
@@ -4159,7 +4237,7 @@
|
|
|
4159
4237
|
},
|
|
4160
4238
|
{
|
|
4161
4239
|
"name": "size",
|
|
4162
|
-
"description": "
|
|
4240
|
+
"description": "Rating size.",
|
|
4163
4241
|
"value": {
|
|
4164
4242
|
"kind": "expression",
|
|
4165
4243
|
"type": "'sm' | 'md' | 'lg'"
|
|
@@ -4167,26 +4245,26 @@
|
|
|
4167
4245
|
"default": "md"
|
|
4168
4246
|
},
|
|
4169
4247
|
{
|
|
4170
|
-
"name": "
|
|
4171
|
-
"description": "
|
|
4248
|
+
"name": "label",
|
|
4249
|
+
"description": "Rating label.",
|
|
4172
4250
|
"value": {
|
|
4173
4251
|
"kind": "expression",
|
|
4174
|
-
"type": "
|
|
4252
|
+
"type": "string"
|
|
4175
4253
|
},
|
|
4176
|
-
"default": "
|
|
4254
|
+
"default": "\"\""
|
|
4177
4255
|
},
|
|
4178
4256
|
{
|
|
4179
4257
|
"name": "labelAlign",
|
|
4180
|
-
"description": "
|
|
4258
|
+
"description": "Rating label placement.",
|
|
4181
4259
|
"value": {
|
|
4182
4260
|
"kind": "expression",
|
|
4183
4261
|
"type": "'top' | 'topInside' | 'topWithDesc' | 'bottom' | 'left' | 'right'"
|
|
4184
4262
|
},
|
|
4185
|
-
"default": "
|
|
4263
|
+
"default": "top"
|
|
4186
4264
|
},
|
|
4187
4265
|
{
|
|
4188
4266
|
"name": "error",
|
|
4189
|
-
"description": "
|
|
4267
|
+
"description": "Rating error message.",
|
|
4190
4268
|
"value": {
|
|
4191
4269
|
"kind": "expression",
|
|
4192
4270
|
"type": "string"
|
|
@@ -4195,7 +4273,7 @@
|
|
|
4195
4273
|
},
|
|
4196
4274
|
{
|
|
4197
4275
|
"name": "description",
|
|
4198
|
-
"description": "
|
|
4276
|
+
"description": "Rating description.",
|
|
4199
4277
|
"value": {
|
|
4200
4278
|
"kind": "expression",
|
|
4201
4279
|
"type": "string"
|
|
@@ -4203,8 +4281,26 @@
|
|
|
4203
4281
|
"default": "\"\""
|
|
4204
4282
|
},
|
|
4205
4283
|
{
|
|
4206
|
-
"name": "
|
|
4207
|
-
"description": "
|
|
4284
|
+
"name": "total",
|
|
4285
|
+
"description": "Rating total.",
|
|
4286
|
+
"value": {
|
|
4287
|
+
"kind": "expression",
|
|
4288
|
+
"type": "number"
|
|
4289
|
+
},
|
|
4290
|
+
"default": "0"
|
|
4291
|
+
},
|
|
4292
|
+
{
|
|
4293
|
+
"name": "counter",
|
|
4294
|
+
"description": "Show rating counter.",
|
|
4295
|
+
"value": {
|
|
4296
|
+
"kind": "expression",
|
|
4297
|
+
"type": "boolean"
|
|
4298
|
+
},
|
|
4299
|
+
"default": "false"
|
|
4300
|
+
},
|
|
4301
|
+
{
|
|
4302
|
+
"name": "selectable",
|
|
4303
|
+
"description": "Make rating selectable.",
|
|
4208
4304
|
"value": {
|
|
4209
4305
|
"kind": "expression",
|
|
4210
4306
|
"type": "boolean"
|
|
@@ -4213,7 +4309,7 @@
|
|
|
4213
4309
|
},
|
|
4214
4310
|
{
|
|
4215
4311
|
"name": "config",
|
|
4216
|
-
"description": "
|
|
4312
|
+
"description": "Component ui config object.",
|
|
4217
4313
|
"value": {
|
|
4218
4314
|
"kind": "expression",
|
|
4219
4315
|
"type": "object"
|
|
@@ -4222,7 +4318,7 @@
|
|
|
4222
4318
|
},
|
|
4223
4319
|
{
|
|
4224
4320
|
"name": "dataCy",
|
|
4225
|
-
"description": "
|
|
4321
|
+
"description": "Data-cy attribute for automated testing.",
|
|
4226
4322
|
"value": {
|
|
4227
4323
|
"kind": "expression",
|
|
4228
4324
|
"type": "string"
|
|
@@ -4232,17 +4328,48 @@
|
|
|
4232
4328
|
],
|
|
4233
4329
|
"events": [
|
|
4234
4330
|
{
|
|
4235
|
-
"name": "update:modelValue"
|
|
4331
|
+
"name": "update:modelValue",
|
|
4332
|
+
"description": "Triggers when the rating is changes.",
|
|
4333
|
+
"properties": [
|
|
4334
|
+
{
|
|
4335
|
+
"type": [
|
|
4336
|
+
"number"
|
|
4337
|
+
],
|
|
4338
|
+
"name": "modelValue"
|
|
4339
|
+
}
|
|
4340
|
+
]
|
|
4236
4341
|
}
|
|
4237
4342
|
],
|
|
4238
4343
|
"slots": [
|
|
4239
4344
|
{
|
|
4240
4345
|
"name": "counter",
|
|
4241
|
-
"
|
|
4346
|
+
"scoped": true,
|
|
4347
|
+
"description": "Use it to customise counter.",
|
|
4348
|
+
"bindings": [
|
|
4349
|
+
{
|
|
4350
|
+
"type": "number",
|
|
4351
|
+
"name": "counter"
|
|
4352
|
+
},
|
|
4353
|
+
{
|
|
4354
|
+
"type": "number",
|
|
4355
|
+
"name": "total"
|
|
4356
|
+
}
|
|
4357
|
+
]
|
|
4242
4358
|
},
|
|
4243
4359
|
{
|
|
4244
|
-
"name": "
|
|
4245
|
-
"
|
|
4360
|
+
"name": "total",
|
|
4361
|
+
"scoped": true,
|
|
4362
|
+
"description": "Use it to customise total.",
|
|
4363
|
+
"bindings": [
|
|
4364
|
+
{
|
|
4365
|
+
"type": "number",
|
|
4366
|
+
"name": "counter"
|
|
4367
|
+
},
|
|
4368
|
+
{
|
|
4369
|
+
"type": "number",
|
|
4370
|
+
"name": "total"
|
|
4371
|
+
}
|
|
4372
|
+
]
|
|
4246
4373
|
}
|
|
4247
4374
|
],
|
|
4248
4375
|
"source": {
|
|
@@ -5767,10 +5894,37 @@
|
|
|
5767
5894
|
],
|
|
5768
5895
|
"slots": [
|
|
5769
5896
|
{
|
|
5770
|
-
"name": "indicator"
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5897
|
+
"name": "indicator",
|
|
5898
|
+
"scoped": true,
|
|
5899
|
+
"bindings": [
|
|
5900
|
+
{
|
|
5901
|
+
"name": "percent"
|
|
5902
|
+
},
|
|
5903
|
+
{
|
|
5904
|
+
"name": "value"
|
|
5905
|
+
},
|
|
5906
|
+
{
|
|
5907
|
+
"name": "max"
|
|
5908
|
+
}
|
|
5909
|
+
]
|
|
5910
|
+
},
|
|
5911
|
+
{
|
|
5912
|
+
"name": "`step-${index}`",
|
|
5913
|
+
"scoped": true,
|
|
5914
|
+
"bindings": [
|
|
5915
|
+
{
|
|
5916
|
+
"name": "name"
|
|
5917
|
+
},
|
|
5918
|
+
{
|
|
5919
|
+
"name": "step"
|
|
5920
|
+
},
|
|
5921
|
+
{
|
|
5922
|
+
"name": "value"
|
|
5923
|
+
},
|
|
5924
|
+
{
|
|
5925
|
+
"name": "max"
|
|
5926
|
+
}
|
|
5927
|
+
]
|
|
5774
5928
|
}
|
|
5775
5929
|
],
|
|
5776
5930
|
"source": {
|
|
@@ -6339,19 +6493,46 @@
|
|
|
6339
6493
|
"slots": [
|
|
6340
6494
|
{
|
|
6341
6495
|
"name": "after-caret",
|
|
6342
|
-
"
|
|
6496
|
+
"scoped": true,
|
|
6497
|
+
"description": "Use it to add something after caret.",
|
|
6498
|
+
"bindings": [
|
|
6499
|
+
{
|
|
6500
|
+
"name": "scope-props"
|
|
6501
|
+
}
|
|
6502
|
+
]
|
|
6343
6503
|
},
|
|
6344
6504
|
{
|
|
6345
6505
|
"name": "before-caret",
|
|
6346
|
-
"
|
|
6506
|
+
"scoped": true,
|
|
6507
|
+
"description": "Use it to add something after caret.",
|
|
6508
|
+
"bindings": [
|
|
6509
|
+
{
|
|
6510
|
+
"name": "scope-props"
|
|
6511
|
+
}
|
|
6512
|
+
]
|
|
6347
6513
|
},
|
|
6348
6514
|
{
|
|
6349
6515
|
"name": "selected-label",
|
|
6350
|
-
"
|
|
6516
|
+
"scoped": true,
|
|
6517
|
+
"description": "Use it to add selected value label.",
|
|
6518
|
+
"bindings": [
|
|
6519
|
+
{
|
|
6520
|
+
"name": "selected-label"
|
|
6521
|
+
},
|
|
6522
|
+
{
|
|
6523
|
+
"name": "value"
|
|
6524
|
+
}
|
|
6525
|
+
]
|
|
6351
6526
|
},
|
|
6352
6527
|
{
|
|
6353
6528
|
"name": "selected-label-after",
|
|
6354
|
-
"
|
|
6529
|
+
"scoped": true,
|
|
6530
|
+
"description": "Use it to add selected value label.",
|
|
6531
|
+
"bindings": [
|
|
6532
|
+
{
|
|
6533
|
+
"name": "scope-props"
|
|
6534
|
+
}
|
|
6535
|
+
]
|
|
6355
6536
|
},
|
|
6356
6537
|
{
|
|
6357
6538
|
"name": "left",
|
|
@@ -6359,14 +6540,35 @@
|
|
|
6359
6540
|
},
|
|
6360
6541
|
{
|
|
6361
6542
|
"name": "before-option",
|
|
6362
|
-
"
|
|
6543
|
+
"scoped": true,
|
|
6544
|
+
"description": "Use it to add something before option.",
|
|
6545
|
+
"bindings": [
|
|
6546
|
+
{
|
|
6547
|
+
"name": "option"
|
|
6548
|
+
}
|
|
6549
|
+
]
|
|
6363
6550
|
},
|
|
6364
6551
|
{
|
|
6365
|
-
"name": "option"
|
|
6552
|
+
"name": "option",
|
|
6553
|
+
"scoped": true,
|
|
6554
|
+
"bindings": [
|
|
6555
|
+
{
|
|
6556
|
+
"name": "option"
|
|
6557
|
+
},
|
|
6558
|
+
{
|
|
6559
|
+
"name": "index"
|
|
6560
|
+
}
|
|
6561
|
+
]
|
|
6366
6562
|
},
|
|
6367
6563
|
{
|
|
6368
6564
|
"name": "after-option",
|
|
6369
|
-
"
|
|
6565
|
+
"scoped": true,
|
|
6566
|
+
"description": "Use it to add something after option.",
|
|
6567
|
+
"bindings": [
|
|
6568
|
+
{
|
|
6569
|
+
"name": "option"
|
|
6570
|
+
}
|
|
6571
|
+
]
|
|
6370
6572
|
}
|
|
6371
6573
|
],
|
|
6372
6574
|
"source": {
|
|
@@ -6728,26 +6930,68 @@
|
|
|
6728
6930
|
"slots": [
|
|
6729
6931
|
{
|
|
6730
6932
|
"name": "header-actions",
|
|
6731
|
-
"
|
|
6933
|
+
"scoped": true,
|
|
6934
|
+
"description": "Use it to add action buttons instead of table row when some rows are selected.",
|
|
6935
|
+
"bindings": [
|
|
6936
|
+
{
|
|
6937
|
+
"name": "selected-rows"
|
|
6938
|
+
}
|
|
6939
|
+
]
|
|
6732
6940
|
},
|
|
6733
6941
|
{
|
|
6734
6942
|
"name": "`header-${column.key}`",
|
|
6735
|
-
"
|
|
6943
|
+
"scoped": true,
|
|
6944
|
+
"description": "Use it to customise table column.",
|
|
6945
|
+
"bindings": [
|
|
6946
|
+
{
|
|
6947
|
+
"name": "name"
|
|
6948
|
+
},
|
|
6949
|
+
{
|
|
6950
|
+
"name": "column"
|
|
6951
|
+
}
|
|
6952
|
+
]
|
|
6736
6953
|
},
|
|
6737
6954
|
{
|
|
6738
6955
|
"name": "`header-${column.key}-after`",
|
|
6739
|
-
"
|
|
6956
|
+
"scoped": true,
|
|
6957
|
+
"description": "Use it to add content after table column.",
|
|
6958
|
+
"bindings": [
|
|
6959
|
+
{
|
|
6960
|
+
"name": "name"
|
|
6961
|
+
},
|
|
6962
|
+
{
|
|
6963
|
+
"name": "column"
|
|
6964
|
+
}
|
|
6965
|
+
]
|
|
6740
6966
|
},
|
|
6741
6967
|
{
|
|
6742
6968
|
"name": "before-header",
|
|
6743
|
-
"
|
|
6969
|
+
"scoped": true,
|
|
6970
|
+
"description": "Use it to add something before header row.",
|
|
6971
|
+
"bindings": [
|
|
6972
|
+
{
|
|
6973
|
+
"name": "cols-count"
|
|
6974
|
+
}
|
|
6975
|
+
]
|
|
6744
6976
|
},
|
|
6745
6977
|
{
|
|
6746
6978
|
"name": "before-first-row",
|
|
6747
6979
|
"description": "Use it to add something before first row."
|
|
6748
6980
|
},
|
|
6749
6981
|
{
|
|
6750
|
-
"name": "`cell-${key}`"
|
|
6982
|
+
"name": "`cell-${key}`",
|
|
6983
|
+
"scoped": true,
|
|
6984
|
+
"bindings": [
|
|
6985
|
+
{
|
|
6986
|
+
"name": "name"
|
|
6987
|
+
},
|
|
6988
|
+
{
|
|
6989
|
+
"name": "value"
|
|
6990
|
+
},
|
|
6991
|
+
{
|
|
6992
|
+
"name": "row"
|
|
6993
|
+
}
|
|
6994
|
+
]
|
|
6751
6995
|
},
|
|
6752
6996
|
{
|
|
6753
6997
|
"name": "after-last-row",
|
|
@@ -6759,7 +7003,13 @@
|
|
|
6759
7003
|
},
|
|
6760
7004
|
{
|
|
6761
7005
|
"name": "footer",
|
|
6762
|
-
"
|
|
7006
|
+
"scoped": true,
|
|
7007
|
+
"description": "Use it to add something in table footer.",
|
|
7008
|
+
"bindings": [
|
|
7009
|
+
{
|
|
7010
|
+
"name": "cols-count"
|
|
7011
|
+
}
|
|
7012
|
+
]
|
|
6763
7013
|
}
|
|
6764
7014
|
],
|
|
6765
7015
|
"source": {
|