vueless 0.0.675 → 0.0.677
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/composables/useUI.ts +12 -1
- package/constants.js +1 -0
- package/package.json +1 -1
- package/types.ts +1 -1
- package/ui.boilerplate/types.ts +1 -1
- package/ui.button/UButton.vue +9 -6
- package/ui.button/types.ts +1 -1
- package/ui.button-link/ULink.vue +37 -62
- package/ui.button-link/config.ts +8 -35
- package/ui.button-link/storybook/stories.ts +0 -22
- package/ui.button-link/types.ts +1 -11
- package/ui.button-toggle/types.ts +1 -1
- package/ui.button-toggle-item/types.ts +1 -1
- package/ui.container-accordion/types.ts +1 -1
- package/ui.container-card/types.ts +1 -1
- package/ui.container-col/types.ts +1 -1
- package/ui.container-divider/types.ts +1 -1
- package/ui.container-group/types.ts +1 -1
- package/ui.container-groups/types.ts +1 -1
- package/ui.container-modal/UModal.vue +21 -20
- package/ui.container-modal/config.ts +3 -2
- package/ui.container-modal/types.ts +1 -1
- package/ui.container-modal-confirm/types.ts +1 -1
- package/ui.container-page/UPage.vue +31 -19
- package/ui.container-page/config.ts +1 -0
- package/ui.container-page/types.ts +1 -1
- package/ui.container-row/types.ts +1 -1
- package/ui.data-list/types.ts +1 -1
- package/ui.data-table/types.ts +1 -1
- package/ui.dropdown-badge/types.ts +1 -1
- package/ui.dropdown-button/types.ts +1 -1
- package/ui.dropdown-link/UDropdownLink.vue +29 -33
- package/ui.dropdown-link/config.ts +3 -3
- package/ui.dropdown-link/types.ts +1 -1
- package/ui.dropdown-list/types.ts +1 -1
- package/ui.form-calendar/types.ts +1 -1
- package/ui.form-checkbox/types.ts +1 -1
- package/ui.form-checkbox-group/types.ts +1 -1
- package/ui.form-checkbox-multi-state/types.ts +1 -1
- package/ui.form-color-picker/UColorPicker.vue +68 -0
- package/ui.form-color-picker/config.ts +29 -0
- package/ui.form-color-picker/constants.ts +5 -0
- package/ui.form-color-picker/storybook/docs.mdx +16 -0
- package/ui.form-color-picker/storybook/stories.ts +97 -0
- package/ui.form-color-picker/types.ts +42 -0
- package/ui.form-date-picker/types.ts +1 -1
- package/ui.form-date-picker-range/types.ts +1 -1
- package/ui.form-input/types.ts +1 -1
- package/ui.form-input-file/storybook/stories.ts +1 -1
- package/ui.form-input-file/types.ts +1 -1
- package/ui.form-input-money/types.ts +1 -1
- package/ui.form-input-number/types.ts +1 -1
- package/ui.form-input-rating/types.ts +1 -1
- package/ui.form-input-search/types.ts +1 -1
- package/ui.form-label/storybook/stories.ts +1 -1
- package/ui.form-label/types.ts +1 -1
- package/ui.form-radio/types.ts +1 -1
- package/ui.form-radio-group/types.ts +1 -1
- package/ui.form-select/USelect.vue +8 -6
- package/ui.form-select/types.ts +1 -1
- package/ui.form-switch/types.ts +1 -1
- package/ui.form-textarea/types.ts +1 -1
- package/ui.image-avatar/types.ts +1 -1
- package/ui.image-icon/UIcon.vue +2 -18
- package/ui.image-icon/storybook/stories.ts +0 -3
- package/ui.image-icon/types.ts +1 -13
- package/ui.loader/types.ts +1 -1
- package/ui.loader-overlay/types.ts +1 -1
- package/ui.loader-progress/types.ts +1 -1
- package/ui.navigation-pagination/types.ts +1 -1
- package/ui.navigation-progress/types.ts +2 -2
- package/ui.navigation-tab/types.ts +1 -1
- package/ui.navigation-tabs/types.ts +1 -1
- package/ui.other-dot/types.ts +1 -1
- package/ui.other-theme-color-toggle/UThemeColorToggle.vue +44 -70
- package/ui.other-theme-color-toggle/config.ts +2 -23
- package/ui.other-theme-color-toggle/storybook/stories.ts +6 -5
- package/ui.other-theme-color-toggle/types.ts +8 -3
- package/ui.text-alert/types.ts +1 -1
- package/ui.text-badge/types.ts +1 -1
- package/ui.text-block/types.ts +1 -1
- package/ui.text-empty/types.ts +1 -1
- package/ui.text-file/types.ts +1 -1
- package/ui.text-files/types.ts +1 -1
- package/ui.text-header/types.ts +1 -1
- package/ui.text-money/types.ts +1 -1
- package/ui.text-notify/types.ts +1 -1
- package/ui.text-number/types.ts +1 -1
- package/utils/theme.ts +8 -4
|
@@ -68,12 +68,18 @@ const mutatedProps = computed(() => ({
|
|
|
68
68
|
opened: isShownOptions.value,
|
|
69
69
|
}));
|
|
70
70
|
|
|
71
|
-
const { config, wrapperAttrs, dropdownLinkAttrs, dropdownListAttrs,
|
|
71
|
+
const { config, getDataTest, wrapperAttrs, dropdownLinkAttrs, dropdownListAttrs, toggleIconAttrs } =
|
|
72
72
|
useUI<Config>(defaultConfig, mutatedProps);
|
|
73
73
|
</script>
|
|
74
74
|
|
|
75
75
|
<template>
|
|
76
76
|
<div v-click-outside="hideOptions" v-bind="wrapperAttrs">
|
|
77
|
+
<!--
|
|
78
|
+
@slot Use it to add something before the label.
|
|
79
|
+
@binding {boolean} opened
|
|
80
|
+
-->
|
|
81
|
+
<slot name="left" :opened="isShownOptions" />
|
|
82
|
+
|
|
77
83
|
<ULink
|
|
78
84
|
:id="elementId"
|
|
79
85
|
:ring="ring"
|
|
@@ -84,48 +90,38 @@ const { config, wrapperAttrs, dropdownLinkAttrs, dropdownListAttrs, dropdownIcon
|
|
|
84
90
|
:disabled="disabled"
|
|
85
91
|
:underlined="underlined"
|
|
86
92
|
v-bind="dropdownLinkAttrs"
|
|
87
|
-
:data-test="
|
|
93
|
+
:data-test="getDataTest()"
|
|
88
94
|
@click="onClickLink"
|
|
89
95
|
@keydown.enter="onClickLink"
|
|
90
96
|
@keydown.space.prevent="onClickLink"
|
|
91
97
|
>
|
|
92
|
-
<template #
|
|
98
|
+
<template #default>
|
|
93
99
|
<!--
|
|
94
|
-
@slot Use it to add something
|
|
100
|
+
@slot Use it to add something instead of the default label.
|
|
101
|
+
@binding {string} label
|
|
95
102
|
@binding {boolean} opened
|
|
96
103
|
-->
|
|
97
|
-
<slot name="left" :opened="isShownOptions" />
|
|
98
|
-
</template>
|
|
99
|
-
|
|
100
|
-
<template #default>
|
|
101
|
-
<!--
|
|
102
|
-
@slot Use it to add something instead of the default label.
|
|
103
|
-
@binding {string} label
|
|
104
|
-
@binding {boolean} opened
|
|
105
|
-
-->
|
|
106
104
|
<slot :label="label" :opened="isShownOptions" />
|
|
107
105
|
</template>
|
|
108
|
-
|
|
109
|
-
<template #right>
|
|
110
|
-
<!--
|
|
111
|
-
@slot Use it to add something after the label.
|
|
112
|
-
@binding {boolean} opened
|
|
113
|
-
-->
|
|
114
|
-
<slot name="right" :opened="isShownOptions">
|
|
115
|
-
<UIcon
|
|
116
|
-
v-if="!noIcon"
|
|
117
|
-
internal
|
|
118
|
-
interactive
|
|
119
|
-
:color="color"
|
|
120
|
-
:name="config.defaults.dropdownIcon"
|
|
121
|
-
v-bind="dropdownIconAttrs"
|
|
122
|
-
:data-test="`${dataTest}-dropdown`"
|
|
123
|
-
@click="onClickLink"
|
|
124
|
-
/>
|
|
125
|
-
</slot>
|
|
126
|
-
</template>
|
|
127
106
|
</ULink>
|
|
128
107
|
|
|
108
|
+
<!--
|
|
109
|
+
@slot Use it to add something after the label.
|
|
110
|
+
@binding {boolean} opened
|
|
111
|
+
-->
|
|
112
|
+
<slot name="right" :opened="isShownOptions">
|
|
113
|
+
<UIcon
|
|
114
|
+
v-if="!noIcon"
|
|
115
|
+
internal
|
|
116
|
+
interactive
|
|
117
|
+
:color="color"
|
|
118
|
+
:name="config.defaults.toggleIcon"
|
|
119
|
+
v-bind="toggleIconAttrs"
|
|
120
|
+
:data-test="getDataTest('toggle')"
|
|
121
|
+
@click="onClickLink"
|
|
122
|
+
/>
|
|
123
|
+
</slot>
|
|
124
|
+
|
|
129
125
|
<UDropdownList
|
|
130
126
|
v-if="isShownOptions"
|
|
131
127
|
ref="dropdown-list"
|
|
@@ -133,7 +129,7 @@ const { config, wrapperAttrs, dropdownLinkAttrs, dropdownListAttrs, dropdownIcon
|
|
|
133
129
|
:options="options"
|
|
134
130
|
:label-key="labelKey"
|
|
135
131
|
v-bind="dropdownListAttrs"
|
|
136
|
-
:data-test="
|
|
132
|
+
:data-test="getDataTest('list')"
|
|
137
133
|
@click-option="onClickOption"
|
|
138
134
|
/>
|
|
139
135
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
2
|
wrapper: {
|
|
3
|
-
base: "relative inline-
|
|
3
|
+
base: "relative inline-flex",
|
|
4
4
|
variants: {
|
|
5
5
|
opened: {
|
|
6
6
|
true: "group",
|
|
@@ -8,7 +8,7 @@ export default /*tw*/ {
|
|
|
8
8
|
},
|
|
9
9
|
},
|
|
10
10
|
dropdownLink: "{ULink}",
|
|
11
|
-
|
|
11
|
+
toggleIcon: {
|
|
12
12
|
base: "{UIcon} block transition duration-300 group-[]:rotate-180",
|
|
13
13
|
defaults: {
|
|
14
14
|
size: {
|
|
@@ -43,6 +43,6 @@ export default /*tw*/ {
|
|
|
43
43
|
noIcon: false,
|
|
44
44
|
disabled: false,
|
|
45
45
|
/* icons */
|
|
46
|
-
|
|
46
|
+
toggleIcon: "keyboard_arrow_down",
|
|
47
47
|
},
|
|
48
48
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, useId } from "vue";
|
|
3
|
+
|
|
4
|
+
import { vTooltip } from "../directives";
|
|
5
|
+
import useUI from "../composables/useUI.ts";
|
|
6
|
+
import { getDefaults } from "../utils/ui.ts";
|
|
7
|
+
|
|
8
|
+
import UButton from "../ui.button/UButton.vue";
|
|
9
|
+
|
|
10
|
+
import { COMPONENT_NAME } from "./constants.ts";
|
|
11
|
+
import defaultConfig from "./config.ts";
|
|
12
|
+
|
|
13
|
+
import type { Props, Config } from "./types.ts";
|
|
14
|
+
|
|
15
|
+
defineOptions({ inheritAttrs: false });
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
18
|
+
...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
|
|
19
|
+
modelValue: "",
|
|
20
|
+
colors: () => ({}),
|
|
21
|
+
labels: () => ({}),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const emit = defineEmits([
|
|
25
|
+
/**
|
|
26
|
+
* Triggers when color value changes.
|
|
27
|
+
* @property {string} value
|
|
28
|
+
*/
|
|
29
|
+
"update:modelValue",
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
const elementId = props.id || useId();
|
|
33
|
+
|
|
34
|
+
const selectedItem = computed({
|
|
35
|
+
get: () => props.modelValue,
|
|
36
|
+
set: (value) => emit("update:modelValue", value),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
function onClickColor(color: string) {
|
|
40
|
+
selectedItem.value = color;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get element / nested component attributes for each config token ✨
|
|
45
|
+
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
46
|
+
*/
|
|
47
|
+
const { listAttrs, colorButtonAttrs, circleAttrs } = useUI<Config>(defaultConfig);
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<template>
|
|
51
|
+
<div :id="elementId" v-bind="listAttrs">
|
|
52
|
+
<UButton
|
|
53
|
+
v-for="(colorClass, color) in colors"
|
|
54
|
+
:key="color"
|
|
55
|
+
v-tooltip="labels?.[color] || color"
|
|
56
|
+
square
|
|
57
|
+
size="xs"
|
|
58
|
+
:ring="false"
|
|
59
|
+
color="grayscale"
|
|
60
|
+
variant="thirdary"
|
|
61
|
+
:filled="selectedItem === color"
|
|
62
|
+
v-bind="colorButtonAttrs"
|
|
63
|
+
@click="onClickColor(color)"
|
|
64
|
+
>
|
|
65
|
+
<div :class="colorClass" v-bind="circleAttrs" />
|
|
66
|
+
</UButton>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export default /*tw*/ {
|
|
2
|
+
list: "flex flex-wrap gap-0.5",
|
|
3
|
+
colorButton: {
|
|
4
|
+
base: "{UButton}",
|
|
5
|
+
button: {
|
|
6
|
+
compoundVariants: [
|
|
7
|
+
{
|
|
8
|
+
filled: true,
|
|
9
|
+
variant: "thirdary",
|
|
10
|
+
color: "grayscale",
|
|
11
|
+
class: "focus:bg-gray-800/10 bg-gray-800/10 dark:focus:bg-gray-200/10 dark:bg-gray-200/10",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
circle: {
|
|
17
|
+
base: "rounded-full",
|
|
18
|
+
variants: {
|
|
19
|
+
size: {
|
|
20
|
+
sm: "size-4",
|
|
21
|
+
md: "size-5",
|
|
22
|
+
lg: "size-6",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaults: {
|
|
27
|
+
size: "md",
|
|
28
|
+
},
|
|
29
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Source } from "@storybook/blocks";
|
|
2
|
+
import { getSource } from "../../utils/storybook.ts";
|
|
3
|
+
|
|
4
|
+
import * as stories from "./stories.ts";
|
|
5
|
+
import defaultConfig from "../config.ts?raw"
|
|
6
|
+
|
|
7
|
+
<Meta of={stories} />
|
|
8
|
+
<Title of={stories} />
|
|
9
|
+
<Subtitle of={stories} />
|
|
10
|
+
<Description of={stories} />
|
|
11
|
+
<Primary of={stories} />
|
|
12
|
+
<Controls of={stories.Default} />
|
|
13
|
+
<Stories of={stories} />
|
|
14
|
+
|
|
15
|
+
## Default config
|
|
16
|
+
<Source code={getSource(defaultConfig)} language="jsx" dark />
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getArgTypes,
|
|
3
|
+
getSlotNames,
|
|
4
|
+
getSlotsFragment,
|
|
5
|
+
getDocsDescription,
|
|
6
|
+
} from "../../utils/storybook.ts";
|
|
7
|
+
|
|
8
|
+
import UColorPicker from "../UColorPicker.vue";
|
|
9
|
+
import UCol from "../../ui.container-col/UCol.vue";
|
|
10
|
+
import UButton from "../../ui.button/UButton.vue";
|
|
11
|
+
|
|
12
|
+
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
13
|
+
import type { Props } from "../types.ts";
|
|
14
|
+
|
|
15
|
+
interface UColorPickerArgs extends Props {
|
|
16
|
+
slotTemplate?: string;
|
|
17
|
+
enum: "size";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
id: "3190",
|
|
22
|
+
title: "Form Inputs & Controls / Color Picker",
|
|
23
|
+
component: UColorPicker,
|
|
24
|
+
args: {
|
|
25
|
+
modelValue: "",
|
|
26
|
+
colors: {
|
|
27
|
+
grayscale: "bg-gray-900",
|
|
28
|
+
gray: "bg-gray-600",
|
|
29
|
+
red: "bg-red-600",
|
|
30
|
+
orange: "bg-orange-600",
|
|
31
|
+
amber: "bg-amber-600",
|
|
32
|
+
yellow: "bg-yellow-600",
|
|
33
|
+
lime: "bg-lime-600",
|
|
34
|
+
green: "bg-green-600",
|
|
35
|
+
emerald: "bg-emerald-600",
|
|
36
|
+
teal: "bg-teal-600",
|
|
37
|
+
cyan: "bg-cyan-600",
|
|
38
|
+
sky: "bg-sky-600",
|
|
39
|
+
blue: "bg-blue-600",
|
|
40
|
+
indigo: "bg-indigo-600",
|
|
41
|
+
violet: "bg-violet-600",
|
|
42
|
+
purple: "bg-purple-600",
|
|
43
|
+
fuchsia: "bg-fuchsia-600",
|
|
44
|
+
pink: "bg-pink-600",
|
|
45
|
+
rose: "bg-rose-600",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
argTypes: {
|
|
49
|
+
...getArgTypes(UColorPicker.__name),
|
|
50
|
+
},
|
|
51
|
+
parameters: {
|
|
52
|
+
docs: {
|
|
53
|
+
...getDocsDescription(UColorPicker.__name),
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
} as Meta;
|
|
57
|
+
|
|
58
|
+
const DefaultTemplate: StoryFn<UColorPickerArgs> = (args: UColorPickerArgs) => ({
|
|
59
|
+
components: { UColorPicker, UButton, UCol },
|
|
60
|
+
setup() {
|
|
61
|
+
const slots = getSlotNames(UColorPicker.__name);
|
|
62
|
+
|
|
63
|
+
return { args, slots };
|
|
64
|
+
},
|
|
65
|
+
template: `
|
|
66
|
+
<UColorPicker v-bind="args" v-model="args.modelValue">
|
|
67
|
+
${args.slotTemplate || getSlotsFragment("")}
|
|
68
|
+
</UColorPicker>
|
|
69
|
+
`,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const EnumVariantTemplate: StoryFn<UColorPickerArgs> = (args: UColorPickerArgs, { argTypes }) => ({
|
|
73
|
+
components: { UCol, UColorPicker },
|
|
74
|
+
setup() {
|
|
75
|
+
return {
|
|
76
|
+
args,
|
|
77
|
+
options: argTypes?.[args.enum]?.options,
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
template: `
|
|
81
|
+
<UCol>
|
|
82
|
+
<UColorPicker
|
|
83
|
+
v-for="(option, index) in options"
|
|
84
|
+
:key="index"
|
|
85
|
+
v-bind="args"
|
|
86
|
+
v-model="args.modelValue"
|
|
87
|
+
:[args.enum]="option"
|
|
88
|
+
/>
|
|
89
|
+
</UCol>
|
|
90
|
+
`,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export const Default = DefaultTemplate.bind({});
|
|
94
|
+
Default.args = {};
|
|
95
|
+
|
|
96
|
+
export const Sizes = EnumVariantTemplate.bind({});
|
|
97
|
+
Sizes.args = { enum: "size" };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import defaultConfig from "./config.ts";
|
|
2
|
+
|
|
3
|
+
import type { BrandColors, GrayColors, ComponentConfig } from "../types.ts";
|
|
4
|
+
|
|
5
|
+
export type Config = typeof defaultConfig;
|
|
6
|
+
|
|
7
|
+
export interface Props {
|
|
8
|
+
/**
|
|
9
|
+
* Selected values.
|
|
10
|
+
*/
|
|
11
|
+
modelValue: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Component size.
|
|
15
|
+
*/
|
|
16
|
+
size?: "sm" | "md" | "lg";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Color list.
|
|
20
|
+
*/
|
|
21
|
+
colors?: Record<BrandColors, string>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Color labels.
|
|
25
|
+
*/
|
|
26
|
+
labels?: Record<GrayColors, string>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Unique element id.
|
|
30
|
+
*/
|
|
31
|
+
id?: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Component config object.
|
|
35
|
+
*/
|
|
36
|
+
config?: ComponentConfig<Config>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Data-test attribute for automated testing.
|
|
40
|
+
*/
|
|
41
|
+
dataTest?: string | null;
|
|
42
|
+
}
|
package/ui.form-input/types.ts
CHANGED
package/ui.form-label/types.ts
CHANGED
package/ui.form-radio/types.ts
CHANGED
|
@@ -416,6 +416,7 @@ const mutatedProps = computed(() => ({
|
|
|
416
416
|
|
|
417
417
|
const {
|
|
418
418
|
config,
|
|
419
|
+
getDataTest,
|
|
419
420
|
selectLabelAttrs,
|
|
420
421
|
wrapperAttrs,
|
|
421
422
|
innerWrapperAttrs,
|
|
@@ -453,7 +454,7 @@ const {
|
|
|
453
454
|
centred
|
|
454
455
|
interactive
|
|
455
456
|
v-bind="selectLabelAttrs"
|
|
456
|
-
:data-test="
|
|
457
|
+
:data-test="getDataTest()"
|
|
457
458
|
:tabindex="-1"
|
|
458
459
|
>
|
|
459
460
|
<template #label>
|
|
@@ -503,6 +504,7 @@ const {
|
|
|
503
504
|
v-show="!multiple || (!isLocalValue && multiple)"
|
|
504
505
|
v-bind="toggleWrapperAttrs"
|
|
505
506
|
:tabindex="-1"
|
|
507
|
+
:data-test="getDataTest('toggle')"
|
|
506
508
|
@mousedown.prevent.stop="toggle"
|
|
507
509
|
>
|
|
508
510
|
<!--
|
|
@@ -517,7 +519,6 @@ const {
|
|
|
517
519
|
color="gray"
|
|
518
520
|
:name="config.defaults.dropdownIcon"
|
|
519
521
|
v-bind="toggleIconAttrs"
|
|
520
|
-
:data-test="`${dataTest}-toggle`"
|
|
521
522
|
:tabindex="-1"
|
|
522
523
|
/>
|
|
523
524
|
</slot>
|
|
@@ -526,6 +527,7 @@ const {
|
|
|
526
527
|
<div
|
|
527
528
|
v-if="isLocalValue && clearable && !disabled && !multiple"
|
|
528
529
|
v-bind="clearAttrs"
|
|
530
|
+
:data-test="getDataTest('clear')"
|
|
529
531
|
@mousedown="onMouseDownClear"
|
|
530
532
|
>
|
|
531
533
|
<!--
|
|
@@ -539,7 +541,6 @@ const {
|
|
|
539
541
|
color="gray"
|
|
540
542
|
:name="config.defaults.clearIcon"
|
|
541
543
|
v-bind="clearIconAttrs"
|
|
542
|
-
:data-test="`${dataTest}-clear`"
|
|
543
544
|
/>
|
|
544
545
|
</slot>
|
|
545
546
|
</div>
|
|
@@ -599,6 +600,7 @@ const {
|
|
|
599
600
|
<div
|
|
600
601
|
v-if="!disabled"
|
|
601
602
|
v-bind="clearMultipleAttrs"
|
|
603
|
+
:data-test="getDataTest('clear-item')"
|
|
602
604
|
@mousedown.prevent.capture
|
|
603
605
|
@click.prevent.capture
|
|
604
606
|
@mousedown="onMouseDownClearItem($event, item)"
|
|
@@ -614,7 +616,6 @@ const {
|
|
|
614
616
|
color="gray"
|
|
615
617
|
:name="config.defaults.clearMultipleIcon"
|
|
616
618
|
v-bind="clearMultipleIconAttrs"
|
|
617
|
-
:data-test="`${dataTest}-clear-all`"
|
|
618
619
|
/>
|
|
619
620
|
</slot>
|
|
620
621
|
</div>
|
|
@@ -634,7 +635,7 @@ const {
|
|
|
634
635
|
:disabled="disabled"
|
|
635
636
|
:aria-controls="'listbox-' + elementId"
|
|
636
637
|
v-bind="searchInputAttrs"
|
|
637
|
-
:data-test="
|
|
638
|
+
:data-test="getDataTest('search')"
|
|
638
639
|
@focus="activate"
|
|
639
640
|
@blur.prevent="deactivate"
|
|
640
641
|
@keyup.esc="deactivate"
|
|
@@ -674,6 +675,7 @@ const {
|
|
|
674
675
|
<div
|
|
675
676
|
v-if="isLocalValue && clearable && !disabled && multiple"
|
|
676
677
|
v-bind="clearMultipleTextAttrs"
|
|
678
|
+
:data-test="getDataTest('clear-all')"
|
|
677
679
|
@mousedown.prevent.capture="onMouseDownClear"
|
|
678
680
|
@click.prevent.capture
|
|
679
681
|
v-text="currentLocale.clear"
|
|
@@ -693,7 +695,7 @@ const {
|
|
|
693
695
|
:add-option="addOption"
|
|
694
696
|
tabindex="-1"
|
|
695
697
|
v-bind="dropdownListAttrs as KeyAttrsWithConfig<UDropdownListConfig>"
|
|
696
|
-
:data-test="
|
|
698
|
+
:data-test="getDataTest()"
|
|
697
699
|
@add="onAddOption"
|
|
698
700
|
@focus="activate"
|
|
699
701
|
@mousedown.prevent.capture
|
package/ui.form-select/types.ts
CHANGED
package/ui.form-switch/types.ts
CHANGED
package/ui.image-avatar/types.ts
CHANGED