vueless 0.0.747 → 0.0.748
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 +1 -1
- package/ui.button-toggle/UToggle.vue +3 -6
- package/ui.button-toggle/storybook/stories.ts +5 -5
- package/ui.container-accordion/UAccordion.vue +2 -1
- package/ui.container-card/UCard.vue +2 -1
- package/ui.container-col/UCol.vue +2 -2
- package/ui.container-divider/UDivider.vue +5 -2
- package/ui.container-group/UGroup.vue +2 -1
- package/ui.container-groups/UGroups.vue +2 -2
- package/ui.container-modal/UModal.vue +3 -2
- package/ui.container-modal-confirm/UModalConfirm.vue +10 -5
- package/ui.container-page/UPage.vue +2 -1
- package/ui.container-row/URow.vue +2 -2
- package/ui.data-list/UDataList.vue +7 -6
- package/ui.data-table/UTable.vue +8 -7
- package/ui.data-table/UTableRow.vue +11 -5
- package/ui.dropdown-badge/UDropdownBadge.vue +11 -5
- package/ui.dropdown-button/UDropdownButton.vue +11 -5
- package/ui.dropdown-list/UDropdownList.vue +5 -4
- package/ui.form-checkbox/UCheckbox.vue +10 -4
- package/ui.form-checkbox-group/UCheckboxGroup.vue +4 -3
- package/ui.form-input/UInput.vue +3 -2
- package/ui.form-input-file/UInputFile.vue +3 -2
- package/ui.form-input-money/UInputMoney.vue +2 -2
- package/ui.form-input-number/UInputNumber.vue +4 -3
- package/ui.form-input-rating/UInputRating.vue +3 -3
- package/ui.form-input-search/UInputSearch.vue +5 -4
- package/ui.form-label/ULabel.vue +15 -10
- package/ui.form-radio/URadio.vue +3 -3
- package/ui.form-radio-group/URadioGroup.vue +3 -3
- package/ui.form-switch/USwitch.vue +2 -1
- package/ui.form-textarea/UTextarea.vue +10 -4
- package/ui.image-avatar/UAvatar.vue +2 -2
- package/ui.loader/ULoader.vue +2 -2
- package/ui.loader-overlay/ULoaderOverlay.vue +2 -2
- package/ui.loader-progress/ULoaderProgress.vue +2 -2
- package/ui.navigation-breadcrumbs/UBreadcrumbs.vue +9 -3
- package/ui.navigation-pagination/UPagination.vue +7 -6
- package/ui.navigation-progress/UProgress.vue +10 -3
- package/ui.navigation-tab/UTab.vue +5 -2
- package/ui.navigation-tabs/UTabs.vue +3 -2
- package/ui.other-dot/UDot.vue +2 -2
- package/ui.text-alert/UAlert.vue +3 -2
- package/ui.text-badge/UBadge.vue +3 -5
- package/ui.text-block/UText.vue +2 -2
- package/ui.text-empty/UEmpty.vue +2 -1
- package/ui.text-file/UFile.vue +3 -2
- package/ui.text-files/UFiles.vue +2 -2
- package/ui.text-header/UHeader.vue +2 -2
- package/ui.text-money/UMoney.vue +2 -2
- package/ui.text-notify/UNotify.vue +3 -2
- package/ui.text-number/UNumber.vue +2 -2
package/ui.form-input/UInput.vue
CHANGED
|
@@ -237,6 +237,7 @@ const mutatedProps = computed(() => ({
|
|
|
237
237
|
}));
|
|
238
238
|
|
|
239
239
|
const {
|
|
240
|
+
getDataTest,
|
|
240
241
|
config,
|
|
241
242
|
inputAttrs,
|
|
242
243
|
wrapperAttrs,
|
|
@@ -298,7 +299,7 @@ const {
|
|
|
298
299
|
:maxlength="maxLength"
|
|
299
300
|
:inputmode="inputmode"
|
|
300
301
|
v-bind="inputAttrs"
|
|
301
|
-
:data-test="
|
|
302
|
+
:data-test="getDataTest()"
|
|
302
303
|
@focus="onFocus"
|
|
303
304
|
@blur="onBlur"
|
|
304
305
|
@input="onInput"
|
|
@@ -317,7 +318,7 @@ const {
|
|
|
317
318
|
interactive
|
|
318
319
|
internal
|
|
319
320
|
v-bind="passwordIconAttrs"
|
|
320
|
-
:data-test="
|
|
321
|
+
:data-test="getDataTest('password-icon')"
|
|
321
322
|
@click="onClickShowPassword"
|
|
322
323
|
/>
|
|
323
324
|
</label>
|
|
@@ -247,6 +247,7 @@ const mutatedProps = computed(() => ({
|
|
|
247
247
|
}));
|
|
248
248
|
|
|
249
249
|
const {
|
|
250
|
+
getDataTest,
|
|
250
251
|
config,
|
|
251
252
|
inputLabelAttrs,
|
|
252
253
|
chooseFileButtonAttrs,
|
|
@@ -320,7 +321,7 @@ const {
|
|
|
320
321
|
:label="currentLocale.uploadFile"
|
|
321
322
|
:disabled="disabled"
|
|
322
323
|
v-bind="chooseFileButtonAttrs"
|
|
323
|
-
:data-test="
|
|
324
|
+
:data-test="getDataTest('upload')"
|
|
324
325
|
/>
|
|
325
326
|
|
|
326
327
|
<input
|
|
@@ -345,7 +346,7 @@ const {
|
|
|
345
346
|
:color="error ? 'red' : 'brand'"
|
|
346
347
|
:left-icon="config.defaults.clearIcon"
|
|
347
348
|
v-bind="clearButtonAttrs"
|
|
348
|
-
:data-test="
|
|
349
|
+
:data-test="getDataTest('clear')"
|
|
349
350
|
@click="onClickResetFiles"
|
|
350
351
|
/>
|
|
351
352
|
</div>
|
|
@@ -105,7 +105,7 @@ defineExpose({
|
|
|
105
105
|
* Get element / nested component attributes for each config token ✨
|
|
106
106
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
107
107
|
*/
|
|
108
|
-
const { moneyInputAttrs } = useUI<Config>(defaultConfig);
|
|
108
|
+
const { getDataTest, moneyInputAttrs } = useUI<Config>(defaultConfig);
|
|
109
109
|
</script>
|
|
110
110
|
|
|
111
111
|
<template>
|
|
@@ -125,7 +125,7 @@ const { moneyInputAttrs } = useUI<Config>(defaultConfig);
|
|
|
125
125
|
:left-icon="leftIcon"
|
|
126
126
|
:right-icon="rightIcon"
|
|
127
127
|
v-bind="moneyInputAttrs"
|
|
128
|
-
:data-test="
|
|
128
|
+
:data-test="getDataTest('base-currency')"
|
|
129
129
|
@keyup="onKeyup"
|
|
130
130
|
@blur="onBlur"
|
|
131
131
|
@input="onInput"
|
|
@@ -53,6 +53,7 @@ function onClickAdd() {
|
|
|
53
53
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
54
54
|
*/
|
|
55
55
|
const {
|
|
56
|
+
getDataTest,
|
|
56
57
|
config,
|
|
57
58
|
valueAttrs,
|
|
58
59
|
labelAttrs,
|
|
@@ -74,7 +75,7 @@ const {
|
|
|
74
75
|
:align="labelAlign"
|
|
75
76
|
centred
|
|
76
77
|
v-bind="labelAttrs"
|
|
77
|
-
:data-test="
|
|
78
|
+
:data-test="getDataTest()"
|
|
78
79
|
>
|
|
79
80
|
<template #label>
|
|
80
81
|
<!--
|
|
@@ -92,7 +93,7 @@ const {
|
|
|
92
93
|
round
|
|
93
94
|
:disabled="isRemoveButtonDisabled || disabled"
|
|
94
95
|
v-bind="removeButtonAttrs"
|
|
95
|
-
:data-test="
|
|
96
|
+
:data-test="getDataTest('remove')"
|
|
96
97
|
@click="onClickRemove"
|
|
97
98
|
>
|
|
98
99
|
<UIcon
|
|
@@ -116,7 +117,7 @@ const {
|
|
|
116
117
|
round
|
|
117
118
|
:disabled="isAddButtonDisabled || disabled"
|
|
118
119
|
v-bind="addButtonAttrs"
|
|
119
|
-
:data-test="
|
|
120
|
+
:data-test="getDataTest('add')"
|
|
120
121
|
@click="onClickAdd"
|
|
121
122
|
>
|
|
122
123
|
<UIcon
|
|
@@ -59,7 +59,7 @@ function onMouseHover(overStar: number | null = null) {
|
|
|
59
59
|
* Get element / nested component attributes for each config token ✨
|
|
60
60
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
61
61
|
*/
|
|
62
|
-
const { config, containerAttrs, counterAttrs, totalAttrs, starsAttrs, starAttrs } =
|
|
62
|
+
const { getDataTest, config, containerAttrs, counterAttrs, totalAttrs, starsAttrs, starAttrs } =
|
|
63
63
|
useUI<Config>(defaultConfig);
|
|
64
64
|
</script>
|
|
65
65
|
|
|
@@ -81,11 +81,11 @@ const { config, containerAttrs, counterAttrs, totalAttrs, starsAttrs, starAttrs
|
|
|
81
81
|
v-for="star in stars"
|
|
82
82
|
:key="star"
|
|
83
83
|
internal
|
|
84
|
-
|
|
84
|
+
color="inherit"
|
|
85
85
|
:interactive="selectable"
|
|
86
86
|
:name="starIcon(star)"
|
|
87
87
|
v-bind="starAttrs"
|
|
88
|
-
:data-test="
|
|
88
|
+
:data-test="getDataTest(`star-${star}`)"
|
|
89
89
|
@click="onClickStar(star)"
|
|
90
90
|
@mouseleave="onMouseHover()"
|
|
91
91
|
@mouseover="onMouseHover(star)"
|
|
@@ -109,6 +109,7 @@ defineExpose({
|
|
|
109
109
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
110
110
|
*/
|
|
111
111
|
const {
|
|
112
|
+
getDataTest,
|
|
112
113
|
config,
|
|
113
114
|
searchInputAttrs,
|
|
114
115
|
searchInputWithButtonAttrs,
|
|
@@ -134,7 +135,7 @@ const {
|
|
|
134
135
|
inputmode="search"
|
|
135
136
|
:left-icon="leftIcon"
|
|
136
137
|
v-bind="searchButtonLabel ? searchInputWithButtonAttrs : searchInputAttrs"
|
|
137
|
-
:data-test="
|
|
138
|
+
:data-test="getDataTest()"
|
|
138
139
|
@update:model-value="onUpdateValue"
|
|
139
140
|
@keyup.enter="onKeyupEnter"
|
|
140
141
|
>
|
|
@@ -151,7 +152,7 @@ const {
|
|
|
151
152
|
color="gray"
|
|
152
153
|
:name="config.defaults.clearIcon"
|
|
153
154
|
v-bind="clearIconAttrs"
|
|
154
|
-
:data-test="
|
|
155
|
+
:data-test="getDataTest('clear')"
|
|
155
156
|
@click="onClickClear"
|
|
156
157
|
/>
|
|
157
158
|
|
|
@@ -171,7 +172,7 @@ const {
|
|
|
171
172
|
color="gray"
|
|
172
173
|
:name="rightIcon || config.defaults.searchIcon"
|
|
173
174
|
v-bind="searchIconAttrs"
|
|
174
|
-
:data-test="
|
|
175
|
+
:data-test="getDataTest('search-icon')"
|
|
175
176
|
@click="onClickSearch"
|
|
176
177
|
/>
|
|
177
178
|
|
|
@@ -179,7 +180,7 @@ const {
|
|
|
179
180
|
v-if="searchButtonLabel"
|
|
180
181
|
:label="searchButtonLabel"
|
|
181
182
|
v-bind="searchButtonAttrs"
|
|
182
|
-
:data-test="
|
|
183
|
+
:data-test="getDataTest('search-button')"
|
|
183
184
|
@click="onClickSearch"
|
|
184
185
|
/>
|
|
185
186
|
</slot>
|
package/ui.form-label/ULabel.vue
CHANGED
|
@@ -69,7 +69,7 @@ const mutatedProps = computed(() => ({
|
|
|
69
69
|
error: Boolean(props.error),
|
|
70
70
|
}));
|
|
71
71
|
|
|
72
|
-
const { wrapperAttrs, contentAttrs, labelAttrs, descriptionAttrs } = useUI<Config>(
|
|
72
|
+
const { getDataTest, wrapperAttrs, contentAttrs, labelAttrs, descriptionAttrs } = useUI<Config>(
|
|
73
73
|
defaultConfig,
|
|
74
74
|
mutatedProps,
|
|
75
75
|
);
|
|
@@ -80,10 +80,10 @@ const { wrapperAttrs, contentAttrs, labelAttrs, descriptionAttrs } = useUI<Confi
|
|
|
80
80
|
v-if="isHorizontalPlacement || isTopWithDescPlacement"
|
|
81
81
|
ref="wrapperRef"
|
|
82
82
|
v-bind="wrapperAttrs"
|
|
83
|
-
:data-test="
|
|
83
|
+
:data-test="getDataTest()"
|
|
84
84
|
@click="onClick"
|
|
85
85
|
>
|
|
86
|
-
<div v-bind="contentAttrs" :data-test="
|
|
86
|
+
<div v-bind="contentAttrs" :data-test="getDataTest('content')">
|
|
87
87
|
<!-- @slot Use it to add label content. -->
|
|
88
88
|
<slot />
|
|
89
89
|
</div>
|
|
@@ -95,7 +95,7 @@ const { wrapperAttrs, contentAttrs, labelAttrs, descriptionAttrs } = useUI<Confi
|
|
|
95
95
|
ref="labelRef"
|
|
96
96
|
:for="props.for"
|
|
97
97
|
v-bind="labelAttrs"
|
|
98
|
-
:data-test="
|
|
98
|
+
:data-test="getDataTest('label')"
|
|
99
99
|
>
|
|
100
100
|
<!--
|
|
101
101
|
@slot Use this to add custom content instead of the label.
|
|
@@ -106,12 +106,17 @@ const { wrapperAttrs, contentAttrs, labelAttrs, descriptionAttrs } = useUI<Confi
|
|
|
106
106
|
</slot>
|
|
107
107
|
</label>
|
|
108
108
|
|
|
109
|
-
<div
|
|
109
|
+
<div
|
|
110
|
+
v-if="error"
|
|
111
|
+
v-bind="descriptionAttrs"
|
|
112
|
+
:data-test="getDataTest('error')"
|
|
113
|
+
v-text="error"
|
|
114
|
+
/>
|
|
110
115
|
|
|
111
116
|
<div
|
|
112
117
|
v-if="description && !error"
|
|
113
118
|
v-bind="descriptionAttrs"
|
|
114
|
-
:data-test="
|
|
119
|
+
:data-test="getDataTest('description')"
|
|
115
120
|
v-text="description"
|
|
116
121
|
/>
|
|
117
122
|
|
|
@@ -126,7 +131,7 @@ const { wrapperAttrs, contentAttrs, labelAttrs, descriptionAttrs } = useUI<Confi
|
|
|
126
131
|
v-bind="labelAttrs"
|
|
127
132
|
ref="labelRef"
|
|
128
133
|
:for="props.for"
|
|
129
|
-
:data-test="
|
|
134
|
+
:data-test="getDataTest('label')"
|
|
130
135
|
>
|
|
131
136
|
<!--
|
|
132
137
|
@slot Use this to add custom content instead of the label.
|
|
@@ -137,17 +142,17 @@ const { wrapperAttrs, contentAttrs, labelAttrs, descriptionAttrs } = useUI<Confi
|
|
|
137
142
|
</slot>
|
|
138
143
|
</label>
|
|
139
144
|
|
|
140
|
-
<div v-bind="contentAttrs" :data-test="
|
|
145
|
+
<div v-bind="contentAttrs" :data-test="getDataTest('content')">
|
|
141
146
|
<!-- @slot Use it to add label content. -->
|
|
142
147
|
<slot />
|
|
143
148
|
</div>
|
|
144
149
|
|
|
145
|
-
<div v-if="error" v-bind="descriptionAttrs" :data-test="
|
|
150
|
+
<div v-if="error" v-bind="descriptionAttrs" :data-test="getDataTest('error')" v-text="error" />
|
|
146
151
|
|
|
147
152
|
<div
|
|
148
153
|
v-if="description && !error"
|
|
149
154
|
v-bind="descriptionAttrs"
|
|
150
|
-
:data-test="
|
|
155
|
+
:data-test="getDataTest('description')"
|
|
151
156
|
v-text="description"
|
|
152
157
|
/>
|
|
153
158
|
|
package/ui.form-radio/URadio.vue
CHANGED
|
@@ -94,7 +94,7 @@ const mutatedProps = computed(() => ({
|
|
|
94
94
|
error: Boolean(props.error),
|
|
95
95
|
}));
|
|
96
96
|
|
|
97
|
-
const { radioAttrs, radioLabelAttrs } = useUI<Config>(defaultConfig, mutatedProps);
|
|
97
|
+
const { getDataTest, radioAttrs, radioLabelAttrs } = useUI<Config>(defaultConfig, mutatedProps);
|
|
98
98
|
</script>
|
|
99
99
|
|
|
100
100
|
<template>
|
|
@@ -108,7 +108,7 @@ const { radioAttrs, radioLabelAttrs } = useUI<Config>(defaultConfig, mutatedProp
|
|
|
108
108
|
:description="description"
|
|
109
109
|
interactive
|
|
110
110
|
v-bind="radioLabelAttrs"
|
|
111
|
-
:data-test="
|
|
111
|
+
:data-test="getDataTest('label')"
|
|
112
112
|
>
|
|
113
113
|
<template #label>
|
|
114
114
|
<!--
|
|
@@ -126,7 +126,7 @@ const { radioAttrs, radioLabelAttrs } = useUI<Config>(defaultConfig, mutatedProp
|
|
|
126
126
|
:checked="checked || isChecked"
|
|
127
127
|
:disabled="radioDisabled"
|
|
128
128
|
v-bind="radioAttrs"
|
|
129
|
-
:data-test="
|
|
129
|
+
:data-test="getDataTest()"
|
|
130
130
|
@change="onChange"
|
|
131
131
|
/>
|
|
132
132
|
|
|
@@ -47,7 +47,7 @@ provide("getRadioGroupDisabled", () => props.disabled);
|
|
|
47
47
|
* Get element / nested component attributes for each config token ✨
|
|
48
48
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
49
49
|
*/
|
|
50
|
-
const { groupLabelAttrs, listAttrs, groupRadioAttrs } = useUI<Config>(defaultConfig);
|
|
50
|
+
const { getDataTest, groupLabelAttrs, listAttrs, groupRadioAttrs } = useUI<Config>(defaultConfig);
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<template>
|
|
@@ -59,7 +59,7 @@ const { groupLabelAttrs, listAttrs, groupRadioAttrs } = useUI<Config>(defaultCon
|
|
|
59
59
|
:disabled="disabled"
|
|
60
60
|
align="topWithDesc"
|
|
61
61
|
v-bind="groupLabelAttrs"
|
|
62
|
-
:data-test="
|
|
62
|
+
:data-test="getDataTest()"
|
|
63
63
|
>
|
|
64
64
|
<template #label>
|
|
65
65
|
<!--
|
|
@@ -81,7 +81,7 @@ const { groupLabelAttrs, listAttrs, groupRadioAttrs } = useUI<Config>(defaultCon
|
|
|
81
81
|
:description="option.description"
|
|
82
82
|
:disabled="disabled"
|
|
83
83
|
v-bind="groupRadioAttrs"
|
|
84
|
-
:data-test="
|
|
84
|
+
:data-test="getDataTest(`item-${index}`)"
|
|
85
85
|
/>
|
|
86
86
|
</slot>
|
|
87
87
|
</div>
|
|
@@ -77,6 +77,7 @@ const mutatedProps = computed(() => ({
|
|
|
77
77
|
}));
|
|
78
78
|
|
|
79
79
|
const {
|
|
80
|
+
getDataTest,
|
|
80
81
|
config,
|
|
81
82
|
toggleIconAttrs,
|
|
82
83
|
switchLabelAttrs,
|
|
@@ -97,7 +98,7 @@ const {
|
|
|
97
98
|
:disabled="disabled"
|
|
98
99
|
interactive
|
|
99
100
|
v-bind="switchLabelAttrs"
|
|
100
|
-
:data-test="
|
|
101
|
+
:data-test="getDataTest()"
|
|
101
102
|
@click="onClickToggle"
|
|
102
103
|
>
|
|
103
104
|
<template #label>
|
|
@@ -190,8 +190,14 @@ const mutatedProps = computed(() => ({
|
|
|
190
190
|
label: Boolean(props.label),
|
|
191
191
|
}));
|
|
192
192
|
|
|
193
|
-
const {
|
|
194
|
-
|
|
193
|
+
const {
|
|
194
|
+
getDataTest,
|
|
195
|
+
textareaAttrs,
|
|
196
|
+
textareaLabelAttrs,
|
|
197
|
+
wrapperAttrs,
|
|
198
|
+
leftSlotAttrs,
|
|
199
|
+
rightSlotAttrs,
|
|
200
|
+
} = useUI<Config>(defaultConfig, mutatedProps);
|
|
195
201
|
</script>
|
|
196
202
|
|
|
197
203
|
<template>
|
|
@@ -206,7 +212,7 @@ const { textareaAttrs, textareaLabelAttrs, wrapperAttrs, leftSlotAttrs, rightSlo
|
|
|
206
212
|
:align="labelAlign"
|
|
207
213
|
interactive
|
|
208
214
|
v-bind="textareaLabelAttrs"
|
|
209
|
-
:data-test="
|
|
215
|
+
:data-test="getDataTest('label')"
|
|
210
216
|
>
|
|
211
217
|
<template #label>
|
|
212
218
|
<!--
|
|
@@ -237,7 +243,7 @@ const { textareaAttrs, textareaLabelAttrs, wrapperAttrs, leftSlotAttrs, rightSlo
|
|
|
237
243
|
:rows="currentRows"
|
|
238
244
|
:inputmode="inputmode"
|
|
239
245
|
v-bind="textareaAttrs"
|
|
240
|
-
:data-test="
|
|
246
|
+
:data-test="getDataTest()"
|
|
241
247
|
@focus="onFocus"
|
|
242
248
|
@blur="onBlur"
|
|
243
249
|
@change="onChange"
|
|
@@ -55,7 +55,7 @@ function onClick(event: MouseEvent) {
|
|
|
55
55
|
* Get element / nested component attributes for each config token ✨
|
|
56
56
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
57
57
|
*/
|
|
58
|
-
const { config, avatarAttrs, placeholderIconAttrs } = useUI<Config>(defaultConfig);
|
|
58
|
+
const { getDataTest, config, avatarAttrs, placeholderIconAttrs } = useUI<Config>(defaultConfig);
|
|
59
59
|
</script>
|
|
60
60
|
|
|
61
61
|
<template>
|
|
@@ -63,7 +63,7 @@ const { config, avatarAttrs, placeholderIconAttrs } = useUI<Config>(defaultConfi
|
|
|
63
63
|
:title="label"
|
|
64
64
|
:style="backgroundImage"
|
|
65
65
|
v-bind="avatarAttrs"
|
|
66
|
-
:data-test="
|
|
66
|
+
:data-test="getDataTest()"
|
|
67
67
|
@click="onClick"
|
|
68
68
|
>
|
|
69
69
|
<template v-if="!backgroundImage">
|
package/ui.loader/ULoader.vue
CHANGED
|
@@ -17,12 +17,12 @@ withDefaults(defineProps<Props>(), {
|
|
|
17
17
|
* Get element / nested component attributes for each config token ✨
|
|
18
18
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
19
19
|
*/
|
|
20
|
-
const { config, loaderAttrs, ellipseAttrs } = useUI<Config>(defaultConfig);
|
|
20
|
+
const { getDataTest, config, loaderAttrs, ellipseAttrs } = useUI<Config>(defaultConfig);
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<template>
|
|
24
24
|
<Transition v-bind="config.transition">
|
|
25
|
-
<div v-if="loading" v-bind="loaderAttrs" :data-test="
|
|
25
|
+
<div v-if="loading" v-bind="loaderAttrs" :data-test="getDataTest()">
|
|
26
26
|
<!-- @slot Use it to add something instead of the default loader. -->
|
|
27
27
|
<slot>
|
|
28
28
|
<div v-for="ellipse in ELLIPSES_AMOUNT" :key="ellipse" v-bind="ellipseAttrs" />
|
|
@@ -47,12 +47,12 @@ const showLoader = computed(() => {
|
|
|
47
47
|
* Get element / nested component attributes for each config token ✨
|
|
48
48
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
49
49
|
*/
|
|
50
|
-
const { config, overlayAttrs, nestedLoaderAttrs } = useUI<Config>(defaultConfig);
|
|
50
|
+
const { getDataTest, config, overlayAttrs, nestedLoaderAttrs } = useUI<Config>(defaultConfig);
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<template>
|
|
54
54
|
<Transition v-bind="config.transition">
|
|
55
|
-
<div v-if="showLoader" v-bind="overlayAttrs" :data-test="
|
|
55
|
+
<div v-if="showLoader" v-bind="overlayAttrs" :data-test="getDataTest()">
|
|
56
56
|
<!-- @slot Use it to add something instead of the default loader. -->
|
|
57
57
|
<slot>
|
|
58
58
|
<ULoader :loading="showLoader" size="lg" :color="loaderColor" v-bind="nestedLoaderAttrs" />
|
|
@@ -191,11 +191,11 @@ defineExpose({
|
|
|
191
191
|
* Get element / nested component attributes for each config token ✨
|
|
192
192
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
193
193
|
*/
|
|
194
|
-
const { stripeAttrs } = useUI<Config>(defaultConfig);
|
|
194
|
+
const { getDataTest, stripeAttrs } = useUI<Config>(defaultConfig);
|
|
195
195
|
</script>
|
|
196
196
|
|
|
197
197
|
<template>
|
|
198
198
|
<Transition :css="false" @before-enter="beforeEnter" @enter="enter" @after-enter="afterEnter">
|
|
199
|
-
<div v-if="show" v-bind="stripeAttrs" :data-test="
|
|
199
|
+
<div v-if="show" v-bind="stripeAttrs" :data-test="getDataTest()" :style="barStyle" />
|
|
200
200
|
</Transition>
|
|
201
201
|
</template>
|
|
@@ -40,8 +40,14 @@ function onClickLink(link: UBreadcrumb) {
|
|
|
40
40
|
* Get element / nested component attributes for each config token ✨
|
|
41
41
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
42
42
|
*/
|
|
43
|
-
const {
|
|
44
|
-
|
|
43
|
+
const {
|
|
44
|
+
getDataTest,
|
|
45
|
+
config,
|
|
46
|
+
breadcrumbsAttrs,
|
|
47
|
+
breadcrumbLinkAttrs,
|
|
48
|
+
breadcrumbIconAttrs,
|
|
49
|
+
dividerIconAttrs,
|
|
50
|
+
} = useUI<Config>(defaultConfig);
|
|
45
51
|
</script>
|
|
46
52
|
|
|
47
53
|
<template>
|
|
@@ -77,7 +83,7 @@ const { config, breadcrumbsAttrs, breadcrumbLinkAttrs, breadcrumbIconAttrs, divi
|
|
|
77
83
|
:dashed="dashed"
|
|
78
84
|
:disabled="link.disabled || (!link.to && !link.href)"
|
|
79
85
|
v-bind="breadcrumbLinkAttrs"
|
|
80
|
-
:data-test="
|
|
86
|
+
:data-test="getDataTest()"
|
|
81
87
|
@click="onClickLink(link)"
|
|
82
88
|
>
|
|
83
89
|
<template #default="slotProps">
|
|
@@ -105,6 +105,7 @@ function goToLastPage() {
|
|
|
105
105
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
106
106
|
*/
|
|
107
107
|
const {
|
|
108
|
+
getDataTest,
|
|
108
109
|
config,
|
|
109
110
|
paginationAttrs,
|
|
110
111
|
firstButtonAttrs,
|
|
@@ -129,7 +130,7 @@ const {
|
|
|
129
130
|
:square="!firstLabel"
|
|
130
131
|
:disabled="prevIsDisabled"
|
|
131
132
|
v-bind="firstButtonAttrs"
|
|
132
|
-
:data-test="
|
|
133
|
+
:data-test="getDataTest('first')"
|
|
133
134
|
@click="goToFirstPage"
|
|
134
135
|
>
|
|
135
136
|
<!-- @slot Use it to add something instead of the "first" label. -->
|
|
@@ -150,7 +151,7 @@ const {
|
|
|
150
151
|
:square="!prevLabel"
|
|
151
152
|
:disabled="prevIsDisabled"
|
|
152
153
|
v-bind="prevButtonAttrs"
|
|
153
|
-
:data-test="
|
|
154
|
+
:data-test="getDataTest('prev')"
|
|
154
155
|
@click="goToPrevPage"
|
|
155
156
|
>
|
|
156
157
|
<!-- @slot Use it to add something instead of the "prev" label. -->
|
|
@@ -184,7 +185,7 @@ const {
|
|
|
184
185
|
:label="String(page.number)"
|
|
185
186
|
:disabled="disabled"
|
|
186
187
|
v-bind="activeButtonAttrs"
|
|
187
|
-
:data-test="
|
|
188
|
+
:data-test="getDataTest('active')"
|
|
188
189
|
/>
|
|
189
190
|
|
|
190
191
|
<UButton
|
|
@@ -193,7 +194,7 @@ const {
|
|
|
193
194
|
:label="String(page.number)"
|
|
194
195
|
:disabled="disabled"
|
|
195
196
|
v-bind="inactiveButtonAttrs"
|
|
196
|
-
:data-test="
|
|
197
|
+
:data-test="getDataTest('inactive')"
|
|
197
198
|
@click="selectPage(page.number)"
|
|
198
199
|
/>
|
|
199
200
|
</template>
|
|
@@ -204,7 +205,7 @@ const {
|
|
|
204
205
|
:square="!nextLabel"
|
|
205
206
|
:disabled="nextIsDisabled"
|
|
206
207
|
v-bind="nextButtonAttrs"
|
|
207
|
-
:data-test="
|
|
208
|
+
:data-test="getDataTest('next')"
|
|
208
209
|
@click="goToNextPage"
|
|
209
210
|
>
|
|
210
211
|
<!-- @slot Use it to add something instead of the "next" label. -->
|
|
@@ -226,7 +227,7 @@ const {
|
|
|
226
227
|
:square="!lastLabel"
|
|
227
228
|
:disabled="nextIsDisabled"
|
|
228
229
|
v-bind="lastButtonAttrs"
|
|
229
|
-
:data-test="
|
|
230
|
+
:data-test="getDataTest('last')"
|
|
230
231
|
@click="goToLastPage"
|
|
231
232
|
>
|
|
232
233
|
<!-- @slot Use it to add something instead of the "last" label. -->
|
|
@@ -53,8 +53,15 @@ function isActiveStep(index: number | string) {
|
|
|
53
53
|
* Get element / nested component attributes for each config token ✨
|
|
54
54
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
55
55
|
*/
|
|
56
|
-
const {
|
|
57
|
-
|
|
56
|
+
const {
|
|
57
|
+
getDataTest,
|
|
58
|
+
progressAttrs,
|
|
59
|
+
wrapperAttrs,
|
|
60
|
+
indicatorAttrs,
|
|
61
|
+
stepAttrs,
|
|
62
|
+
stepperAttrs,
|
|
63
|
+
headerAttrs,
|
|
64
|
+
} = useUI<Config>(defaultConfig);
|
|
58
65
|
</script>
|
|
59
66
|
|
|
60
67
|
<template>
|
|
@@ -102,7 +109,7 @@ const { progressAttrs, wrapperAttrs, indicatorAttrs, stepAttrs, stepperAttrs, he
|
|
|
102
109
|
v-bind="stepperAttrs"
|
|
103
110
|
:color="color"
|
|
104
111
|
:value="value"
|
|
105
|
-
:data-test="
|
|
112
|
+
:data-test="getDataTest()"
|
|
106
113
|
:progress-percent="progressPercent"
|
|
107
114
|
/>
|
|
108
115
|
</div>
|
|
@@ -49,7 +49,10 @@ const mutatedProps = computed(() => ({
|
|
|
49
49
|
active: isActive.value,
|
|
50
50
|
}));
|
|
51
51
|
|
|
52
|
-
const { tabButtonAttrs, tabButtonActiveAttrs } = useUI<Config>(
|
|
52
|
+
const { getDataTest, tabButtonAttrs, tabButtonActiveAttrs } = useUI<Config>(
|
|
53
|
+
defaultConfig,
|
|
54
|
+
mutatedProps,
|
|
55
|
+
);
|
|
53
56
|
</script>
|
|
54
57
|
|
|
55
58
|
<template>
|
|
@@ -64,7 +67,7 @@ const { tabButtonAttrs, tabButtonActiveAttrs } = useUI<Config>(defaultConfig, mu
|
|
|
64
67
|
:square="square"
|
|
65
68
|
:disabled="disabled"
|
|
66
69
|
v-bind="isActive ? tabButtonActiveAttrs : tabButtonAttrs"
|
|
67
|
-
:data-test="
|
|
70
|
+
:data-test="getDataTest()"
|
|
68
71
|
@click="onClickSetValue"
|
|
69
72
|
>
|
|
70
73
|
<template #left="{ iconName }">
|
|
@@ -84,6 +84,7 @@ provide("setUTabsSelectedItem", (value: string) => (selectedItem.value = value))
|
|
|
84
84
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
85
85
|
*/
|
|
86
86
|
const {
|
|
87
|
+
getDataTest,
|
|
87
88
|
config,
|
|
88
89
|
wrapperAttrs,
|
|
89
90
|
tabsAttrs,
|
|
@@ -107,7 +108,7 @@ const {
|
|
|
107
108
|
</slot>
|
|
108
109
|
</div>
|
|
109
110
|
|
|
110
|
-
<div ref="scroll-container" v-bind="tabsAttrs" :data-test="
|
|
111
|
+
<div ref="scroll-container" v-bind="tabsAttrs" :data-test="getDataTest()" @scroll="checkScroll">
|
|
111
112
|
<!-- @slot Use it to add the UTab component. -->
|
|
112
113
|
<slot>
|
|
113
114
|
<UTab
|
|
@@ -118,7 +119,7 @@ const {
|
|
|
118
119
|
:disabled="item.disabled"
|
|
119
120
|
:size="size"
|
|
120
121
|
v-bind="tabAttrs"
|
|
121
|
-
:data-test="
|
|
122
|
+
:data-test="getDataTest(`item-${index}`)"
|
|
122
123
|
/>
|
|
123
124
|
</slot>
|
|
124
125
|
</div>
|
package/ui.other-dot/UDot.vue
CHANGED
|
@@ -17,9 +17,9 @@ withDefaults(defineProps<Props>(), {
|
|
|
17
17
|
* Get element / nested component attributes for each config token ✨
|
|
18
18
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
19
19
|
*/
|
|
20
|
-
const { dotAttrs } = useUI<Config>(defaultConfig);
|
|
20
|
+
const { getDataTest, dotAttrs } = useUI<Config>(defaultConfig);
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<template>
|
|
24
|
-
<div v-bind="dotAttrs" :data-test="
|
|
24
|
+
<div v-bind="dotAttrs" :data-test="getDataTest()" />
|
|
25
25
|
</template>
|
package/ui.text-alert/UAlert.vue
CHANGED
|
@@ -53,6 +53,7 @@ const closeButtonColor = computed(() => {
|
|
|
53
53
|
* Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
|
|
54
54
|
*/
|
|
55
55
|
const {
|
|
56
|
+
getDataTest,
|
|
56
57
|
config,
|
|
57
58
|
wrapperAttrs,
|
|
58
59
|
bodyAttrs,
|
|
@@ -67,7 +68,7 @@ const {
|
|
|
67
68
|
</script>
|
|
68
69
|
|
|
69
70
|
<template>
|
|
70
|
-
<div v-if="isShownAlert" v-bind="wrapperAttrs" :data-test="
|
|
71
|
+
<div v-if="isShownAlert" v-bind="wrapperAttrs" :data-test="getDataTest()">
|
|
71
72
|
<!-- @slot Use it to add something above the text. -->
|
|
72
73
|
<slot name="top" />
|
|
73
74
|
|
|
@@ -126,7 +127,7 @@ const {
|
|
|
126
127
|
:color="closeButtonColor"
|
|
127
128
|
:name="config.defaults.closeIcon"
|
|
128
129
|
v-bind="closeIconAttrs"
|
|
129
|
-
:data-test="
|
|
130
|
+
:data-test="getDataTest('button')"
|
|
130
131
|
/>
|
|
131
132
|
</slot>
|
|
132
133
|
</UButton>
|
package/ui.text-badge/UBadge.vue
CHANGED
|
@@ -79,17 +79,15 @@ const mutatedProps = computed(() => ({
|
|
|
79
79
|
rightIcon: Boolean(props.rightIcon) || hasSlotContent(slots["right"]),
|
|
80
80
|
}));
|
|
81
81
|
|
|
82
|
-
const { badgeAttrs, bodyAttrs, leftIconAttrs, centerIconAttrs, rightIconAttrs } =
|
|
83
|
-
defaultConfig,
|
|
84
|
-
mutatedProps,
|
|
85
|
-
);
|
|
82
|
+
const { getDataTest, badgeAttrs, bodyAttrs, leftIconAttrs, centerIconAttrs, rightIconAttrs } =
|
|
83
|
+
useUI<Config>(defaultConfig, mutatedProps);
|
|
86
84
|
</script>
|
|
87
85
|
|
|
88
86
|
<template>
|
|
89
87
|
<div
|
|
90
88
|
ref="wrapper"
|
|
91
89
|
v-bind="badgeAttrs"
|
|
92
|
-
:data-test="
|
|
90
|
+
:data-test="getDataTest()"
|
|
93
91
|
:tabindex="tabindex"
|
|
94
92
|
@blur="onBlur"
|
|
95
93
|
@focus="onFocus"
|