vueless 1.4.7-beta.1 → 1.4.7-beta.2
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/icons/storybook/cloud_sync.svg +1 -0
- package/icons/storybook/date_range.svg +1 -0
- package/icons/storybook/event.svg +1 -0
- package/icons/storybook/folder.svg +1 -0
- package/icons/storybook/format_quote.svg +1 -0
- package/icons/storybook/local_shipping.svg +1 -0
- package/icons/storybook/location_city.svg +1 -0
- package/icons/storybook/mark_email_unread.svg +1 -0
- package/icons/storybook/notifications.svg +1 -0
- package/icons/storybook/shield.svg +1 -0
- package/icons/storybook/workspace_premium.svg +1 -0
- package/package.json +1 -1
- package/ui.form-checkbox/UCheckbox.vue +0 -5
- package/ui.form-checkbox/storybook/stories.ts +56 -18
- package/ui.form-checkbox/tests/UCheckbox.test.ts +0 -17
- package/ui.form-checkbox-group/storybook/stories.ts +61 -0
- package/ui.form-date-picker/storybook/stories.ts +85 -37
- package/ui.form-date-picker-range/storybook/stories.ts +97 -38
- package/ui.form-input/storybook/stories.ts +75 -37
- package/ui.form-input-file/storybook/stories.ts +44 -5
- package/ui.form-input-number/storybook/stories.ts +66 -28
- package/ui.form-input-password/storybook/stories.ts +94 -50
- package/ui.form-input-search/storybook/stories.ts +40 -4
- package/ui.form-label/ULabel.vue +0 -6
- package/ui.form-label/storybook/stories.ts +46 -24
- package/ui.form-label/tests/ULabel.test.ts +0 -12
- package/ui.form-radio/URadio.vue +0 -5
- package/ui.form-radio/storybook/stories.ts +65 -25
- package/ui.form-radio/tests/URadio.test.ts +0 -17
- package/ui.form-radio-group/storybook/stories.ts +67 -0
- package/ui.form-select/storybook/stories.ts +99 -44
- package/ui.form-switch/storybook/stories.ts +35 -11
- package/ui.form-textarea/storybook/stories.ts +61 -20
- package/ui.text-files/storybook/stories.ts +30 -13
|
@@ -13,6 +13,7 @@ import URow from "../../ui.container-row/URow.vue";
|
|
|
13
13
|
import UDropdownButton from "../../ui.dropdown-button/UDropdownButton.vue";
|
|
14
14
|
import UText from "../../ui.text-block/UText.vue";
|
|
15
15
|
import UChip from "../../ui.other-chip/UChip.vue";
|
|
16
|
+
import ULink from "../../ui.button-link/ULink.vue";
|
|
16
17
|
|
|
17
18
|
import type { Meta, StoryFn } from "@storybook/vue3-vite";
|
|
18
19
|
import type { Props } from "../types";
|
|
@@ -190,7 +191,7 @@ export const IconProps: StoryFn<UInputArgs> = (args) => ({
|
|
|
190
191
|
});
|
|
191
192
|
|
|
192
193
|
export const Slots: StoryFn<UInputArgs> = (args) => ({
|
|
193
|
-
components: { UInput, URow, UDropdownButton, UText, UChip },
|
|
194
|
+
components: { UInput, URow, UCol, UDropdownButton, UText, UChip, ULink, UIcon },
|
|
194
195
|
setup() {
|
|
195
196
|
const countryCodes = [
|
|
196
197
|
{ label: "+33", value: "+33" },
|
|
@@ -199,50 +200,87 @@ export const Slots: StoryFn<UInputArgs> = (args) => ({
|
|
|
199
200
|
];
|
|
200
201
|
|
|
201
202
|
const countryCode = ref("+33");
|
|
203
|
+
const descriptionSlotValue = ref("");
|
|
204
|
+
const errorSlotValue = ref("");
|
|
202
205
|
|
|
203
|
-
return { args, countryCode, countryCodes };
|
|
206
|
+
return { args, countryCode, countryCodes, descriptionSlotValue, errorSlotValue };
|
|
204
207
|
},
|
|
205
208
|
template: `
|
|
206
|
-
<
|
|
207
|
-
<
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
{
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
<
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
<
|
|
231
|
-
{
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
<
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
209
|
+
<UCol gap="3xl">
|
|
210
|
+
<URow block>
|
|
211
|
+
<UInput
|
|
212
|
+
label="Phone Number"
|
|
213
|
+
placeholder="Enter your phone number"
|
|
214
|
+
:config="{ wrapper: 'pl-0' }"
|
|
215
|
+
>
|
|
216
|
+
<template #label="{ label }">
|
|
217
|
+
{{ label }}
|
|
218
|
+
<span class="text-red-500">*</span>
|
|
219
|
+
</template>
|
|
220
|
+
|
|
221
|
+
<template #left>
|
|
222
|
+
<UDropdownButton
|
|
223
|
+
v-model="countryCode"
|
|
224
|
+
:options="countryCodes"
|
|
225
|
+
square
|
|
226
|
+
size="sm"
|
|
227
|
+
variant="soft"
|
|
228
|
+
class="rounded-r-none h-[49px]"
|
|
229
|
+
/>
|
|
230
|
+
</template>
|
|
231
|
+
</UInput>
|
|
232
|
+
|
|
233
|
+
<UInput label="Website" placeholder="Enter your website">
|
|
234
|
+
<template #label="{ label }">
|
|
235
|
+
{{ label }}
|
|
236
|
+
<span class="text-red-500">*</span>
|
|
237
|
+
</template>
|
|
238
|
+
|
|
239
|
+
<template #right>
|
|
240
|
+
<UText label=".com" variant="lifted" :wrap="false" />
|
|
241
|
+
</template>
|
|
242
|
+
</UInput>
|
|
243
|
+
</URow>
|
|
244
|
+
|
|
245
|
+
<URow block>
|
|
246
|
+
<UInput v-model="descriptionSlotValue" label="Display name">
|
|
247
|
+
<template #description>
|
|
248
|
+
<URow align="center" gap="2xs" class="text-neutral">
|
|
249
|
+
<UIcon name="info" size="xs" color="primary" />
|
|
250
|
+
<UText size="sm">
|
|
251
|
+
Shown on your public profile. Read the
|
|
252
|
+
<ULink label="naming policy" underlined size="sm" />.
|
|
253
|
+
</UText>
|
|
254
|
+
</URow>
|
|
255
|
+
</template>
|
|
256
|
+
</UInput>
|
|
257
|
+
|
|
258
|
+
<UInput
|
|
259
|
+
v-model="errorSlotValue"
|
|
260
|
+
label="Name"
|
|
261
|
+
:error="true"
|
|
262
|
+
>
|
|
263
|
+
<template #error>
|
|
264
|
+
<URow align="center" gap="2xs">
|
|
265
|
+
<UIcon name="error" size="xs" color="error" />
|
|
266
|
+
<UText size="sm" color="error">
|
|
267
|
+
<ul>
|
|
268
|
+
<li>This field failed validation</li>
|
|
269
|
+
<li>Check minimum and maximum length rules</li>
|
|
270
|
+
<li>Only allowed characters may be used</li>
|
|
271
|
+
</ul>
|
|
272
|
+
</UText>
|
|
273
|
+
</URow>
|
|
274
|
+
</template>
|
|
275
|
+
</UInput>
|
|
276
|
+
</URow>
|
|
277
|
+
</UCol>
|
|
240
278
|
`,
|
|
241
279
|
});
|
|
242
280
|
Slots.parameters = {
|
|
243
281
|
docs: {
|
|
244
282
|
story: {
|
|
245
|
-
height: "
|
|
283
|
+
height: "300px",
|
|
246
284
|
},
|
|
247
285
|
},
|
|
248
286
|
};
|
|
@@ -14,6 +14,7 @@ import UBadge from "../../ui.text-badge/UBadge.vue";
|
|
|
14
14
|
import UIcon from "../../ui.image-icon/UIcon.vue";
|
|
15
15
|
import URow from "../../ui.container-row/URow.vue";
|
|
16
16
|
import UText from "../../ui.text-block/UText.vue";
|
|
17
|
+
import ULink from "../../ui.button-link/ULink.vue";
|
|
17
18
|
|
|
18
19
|
import type { Meta, StoryFn } from "@storybook/vue3-vite";
|
|
19
20
|
import type { Props } from "../types";
|
|
@@ -109,15 +110,17 @@ LabelSlot.args = {
|
|
|
109
110
|
};
|
|
110
111
|
|
|
111
112
|
export const Slots: StoryFn<UInputFileArgs> = (args) => ({
|
|
112
|
-
components: { UInputFile, UCol, UBadge, UIcon, URow, UText },
|
|
113
|
+
components: { UInputFile, UCol, UBadge, UIcon, URow, UText, ULink },
|
|
113
114
|
setup() {
|
|
114
|
-
|
|
115
|
+
const files = ref<File[]>([]);
|
|
116
|
+
|
|
117
|
+
return { args, files };
|
|
115
118
|
},
|
|
116
119
|
template: `
|
|
117
120
|
<UCol gap="xl">
|
|
118
121
|
<UInputFile
|
|
119
122
|
v-bind="args"
|
|
120
|
-
v-model="
|
|
123
|
+
v-model="files"
|
|
121
124
|
label="Top Slot"
|
|
122
125
|
:allowedFileTypes="['.jpeg', '.png']"
|
|
123
126
|
:maxFileSize="2"
|
|
@@ -132,7 +135,7 @@ export const Slots: StoryFn<UInputFileArgs> = (args) => ({
|
|
|
132
135
|
|
|
133
136
|
<UInputFile
|
|
134
137
|
v-bind="args"
|
|
135
|
-
v-model="
|
|
138
|
+
v-model="files"
|
|
136
139
|
label="Left Slot"
|
|
137
140
|
:allowedFileTypes="['.pdf', '.doc', '.docx']"
|
|
138
141
|
>
|
|
@@ -146,7 +149,7 @@ export const Slots: StoryFn<UInputFileArgs> = (args) => ({
|
|
|
146
149
|
|
|
147
150
|
<UInputFile
|
|
148
151
|
v-bind="args"
|
|
149
|
-
v-model="
|
|
152
|
+
v-model="files"
|
|
150
153
|
label="Bottom Slot"
|
|
151
154
|
multiple
|
|
152
155
|
:allowedFileTypes="['.png', '.jpeg']"
|
|
@@ -158,6 +161,42 @@ export const Slots: StoryFn<UInputFileArgs> = (args) => ({
|
|
|
158
161
|
</URow>
|
|
159
162
|
</template>
|
|
160
163
|
</UInputFile>
|
|
164
|
+
|
|
165
|
+
<UInputFile
|
|
166
|
+
v-bind="args"
|
|
167
|
+
v-model="files"
|
|
168
|
+
label="Upload document"
|
|
169
|
+
>
|
|
170
|
+
<template #description>
|
|
171
|
+
<URow align="center" gap="2xs">
|
|
172
|
+
<UIcon name="description" size="xs" color="primary" />
|
|
173
|
+
<UText size="sm">
|
|
174
|
+
PDF or image, max 5MB.
|
|
175
|
+
<ULink label="See requirements" underlined size="sm" />.
|
|
176
|
+
</UText>
|
|
177
|
+
</URow>
|
|
178
|
+
</template>
|
|
179
|
+
</UInputFile>
|
|
180
|
+
|
|
181
|
+
<UInputFile
|
|
182
|
+
v-bind="args"
|
|
183
|
+
v-model="files"
|
|
184
|
+
label="Upload document"
|
|
185
|
+
:error="true"
|
|
186
|
+
>
|
|
187
|
+
<template #error>
|
|
188
|
+
<URow align="center" gap="2xs">
|
|
189
|
+
<UIcon name="error" size="xs" color="error" />
|
|
190
|
+
<UText size="sm" color="error">
|
|
191
|
+
<ul>
|
|
192
|
+
<li>File type is not accepted for this field</li>
|
|
193
|
+
<li>Maximum file size has been exceeded</li>
|
|
194
|
+
<li>Choose another file and upload again</li>
|
|
195
|
+
</ul>
|
|
196
|
+
</UText>
|
|
197
|
+
</URow>
|
|
198
|
+
</template>
|
|
199
|
+
</UInputFile>
|
|
161
200
|
</UCol>
|
|
162
201
|
`,
|
|
163
202
|
});
|
|
@@ -14,6 +14,7 @@ import UButton from "../../ui.button/UButton.vue";
|
|
|
14
14
|
import URow from "../../ui.container-row/URow.vue";
|
|
15
15
|
import UDropdownButton from "../../ui.dropdown-button/UDropdownButton.vue";
|
|
16
16
|
import UText from "../../ui.text-block/UText.vue";
|
|
17
|
+
import ULink from "../../ui.button-link/ULink.vue";
|
|
17
18
|
|
|
18
19
|
import type { Meta, StoryFn } from "@storybook/vue3-vite";
|
|
19
20
|
import type { Props } from "../types";
|
|
@@ -200,7 +201,7 @@ export const IconProps: StoryFn<UInputNumberArgs> = (args) => ({
|
|
|
200
201
|
});
|
|
201
202
|
|
|
202
203
|
export const Slots: StoryFn<UInputNumberArgs> = (args) => ({
|
|
203
|
-
components: { UInputNumber, URow, UButton, UDropdownButton, UText },
|
|
204
|
+
components: { UInputNumber, URow, UCol, UButton, UDropdownButton, UText, ULink, UIcon },
|
|
204
205
|
setup() {
|
|
205
206
|
const currencies = [
|
|
206
207
|
{ label: "USD", value: "usd" },
|
|
@@ -209,42 +210,79 @@ export const Slots: StoryFn<UInputNumberArgs> = (args) => ({
|
|
|
209
210
|
];
|
|
210
211
|
|
|
211
212
|
const currency = ref("usd");
|
|
213
|
+
const descriptionSlotValue = ref(0);
|
|
214
|
+
const errorSlotValue = ref(null);
|
|
212
215
|
|
|
213
|
-
return { args, currency, currencies };
|
|
216
|
+
return { args, currency, currencies, descriptionSlotValue, errorSlotValue };
|
|
214
217
|
},
|
|
215
218
|
template: `
|
|
216
|
-
<
|
|
217
|
-
<
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
<
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
219
|
+
<UCol gap="3xl">
|
|
220
|
+
<URow block>
|
|
221
|
+
<UInputNumber
|
|
222
|
+
label="Left slot"
|
|
223
|
+
placeholder="Enter discount amount"
|
|
224
|
+
:config="{ numberInput: { wrapper: 'pl-0' } }"
|
|
225
|
+
>
|
|
226
|
+
<template #left>
|
|
227
|
+
<UDropdownButton
|
|
228
|
+
v-model="currency"
|
|
229
|
+
:options="currencies"
|
|
230
|
+
size="sm"
|
|
231
|
+
variant="soft"
|
|
232
|
+
class="rounded-r-none h-[49px]"
|
|
233
|
+
/>
|
|
234
|
+
</template>
|
|
235
|
+
</UInputNumber>
|
|
232
236
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
237
|
+
<UInputNumber
|
|
238
|
+
label="Right slot"
|
|
239
|
+
placeholder="Enter your annual payment"
|
|
240
|
+
>
|
|
241
|
+
<template #right>
|
|
242
|
+
<UText label="%, per year" variant="lifted" size="sm" :wrap="false" />
|
|
243
|
+
</template>
|
|
244
|
+
</UInputNumber>
|
|
245
|
+
</URow>
|
|
246
|
+
|
|
247
|
+
<URow block>
|
|
248
|
+
<UInputNumber v-model="descriptionSlotValue" label="Amount">
|
|
249
|
+
<template #description>
|
|
250
|
+
<URow align="center" gap="2xs" class="text-neutral">
|
|
251
|
+
<UIcon name="payments" size="xs" color="primary" />
|
|
252
|
+
<UText size="sm">
|
|
253
|
+
Net amount in
|
|
254
|
+
<ULink label="account currency" underlined size="sm" />.
|
|
255
|
+
</UText>
|
|
256
|
+
</URow>
|
|
257
|
+
</template>
|
|
258
|
+
</UInputNumber>
|
|
259
|
+
|
|
260
|
+
<UInputNumber
|
|
261
|
+
v-model="errorSlotValue"
|
|
262
|
+
label="Amount"
|
|
263
|
+
:error="true"
|
|
264
|
+
>
|
|
265
|
+
<template #error>
|
|
266
|
+
<URow align="center" gap="2xs">
|
|
267
|
+
<UIcon name="error" size="xs" color="error" />
|
|
268
|
+
<UText size="sm" color="error">
|
|
269
|
+
<ul>
|
|
270
|
+
<li>Value is outside the allowed range</li>
|
|
271
|
+
<li>Use up to two decimal places for this currency</li>
|
|
272
|
+
<li>Enter a number greater than zero</li>
|
|
273
|
+
</ul>
|
|
274
|
+
</UText>
|
|
275
|
+
</URow>
|
|
276
|
+
</template>
|
|
277
|
+
</UInputNumber>
|
|
278
|
+
</URow>
|
|
279
|
+
</UCol>
|
|
242
280
|
`,
|
|
243
281
|
});
|
|
244
282
|
Slots.parameters = {
|
|
245
283
|
docs: {
|
|
246
284
|
story: {
|
|
247
|
-
height: "
|
|
285
|
+
height: "300px",
|
|
248
286
|
},
|
|
249
287
|
},
|
|
250
288
|
};
|
|
@@ -10,6 +10,9 @@ import {
|
|
|
10
10
|
|
|
11
11
|
import UInputPassword from "../UInputPassword.vue";
|
|
12
12
|
import UCol from "../../ui.container-col/UCol.vue";
|
|
13
|
+
import UText from "../../ui.text-block/UText.vue";
|
|
14
|
+
import ULink from "../../ui.button-link/ULink.vue";
|
|
15
|
+
import UIcon from "../../ui.image-icon/UIcon.vue";
|
|
13
16
|
import URow from "../../ui.container-row/URow.vue";
|
|
14
17
|
import UButton from "../../ui.button/UButton.vue";
|
|
15
18
|
import UDropdownButton from "../../ui.dropdown-button/UDropdownButton.vue";
|
|
@@ -139,69 +142,110 @@ export const IconProps: StoryFn<UInputPasswordArgs> = (args) => ({
|
|
|
139
142
|
});
|
|
140
143
|
|
|
141
144
|
export const Slots: StoryFn<UInputPasswordArgs> = (args) => ({
|
|
142
|
-
components: { UInputPassword, URow, UButton, UDropdownButton },
|
|
145
|
+
components: { UInputPassword, URow, UCol, UButton, UDropdownButton, UText, ULink, UIcon },
|
|
143
146
|
setup() {
|
|
144
147
|
const wifiTypes = [
|
|
145
148
|
{ label: "WPA2", value: "wpa2" },
|
|
146
149
|
{ label: "WPA3", value: "wpa3" },
|
|
147
150
|
];
|
|
148
151
|
|
|
149
|
-
|
|
152
|
+
const descriptionSlotValue = ref("");
|
|
153
|
+
const errorSlotValue = ref("");
|
|
154
|
+
|
|
155
|
+
return { args, wifiTypes, descriptionSlotValue, errorSlotValue };
|
|
150
156
|
},
|
|
151
157
|
template: `
|
|
152
|
-
<
|
|
153
|
-
<
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
{
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
158
|
+
<UCol gap="3xl">
|
|
159
|
+
<URow block>
|
|
160
|
+
<UInputPassword
|
|
161
|
+
v-bind="args"
|
|
162
|
+
v-model="args.modelValue"
|
|
163
|
+
label="Enter your password"
|
|
164
|
+
:config="{ passwordInput: { wrapper: 'pl-0' } }"
|
|
165
|
+
>
|
|
166
|
+
<template #label="{ label }">
|
|
167
|
+
{{ label }}
|
|
168
|
+
<span class="text-red-500">*</span>
|
|
169
|
+
</template>
|
|
170
|
+
|
|
171
|
+
<template #left>
|
|
172
|
+
<UDropdownButton
|
|
173
|
+
v-model="args.wifiType"
|
|
174
|
+
:options="wifiTypes"
|
|
175
|
+
label="Wifi type"
|
|
176
|
+
size="sm"
|
|
177
|
+
variant="soft"
|
|
178
|
+
class="rounded-r-none h-[49px]"
|
|
179
|
+
/>
|
|
180
|
+
</template>
|
|
181
|
+
</UInputPassword>
|
|
182
|
+
|
|
183
|
+
<UInputPassword
|
|
184
|
+
v-bind="args"
|
|
185
|
+
v-model="args.modelValue"
|
|
186
|
+
label="Enter your password"
|
|
187
|
+
:config="{ passwordInput: { wrapper: 'pr-0' } }"
|
|
188
|
+
>
|
|
189
|
+
<template #label="{ label }">
|
|
190
|
+
{{ label }}
|
|
191
|
+
<span class="text-red-500">*</span>
|
|
192
|
+
</template>
|
|
193
|
+
|
|
194
|
+
<template #right="{ visible, toggle }">
|
|
195
|
+
<UButton
|
|
196
|
+
:label="visible ? 'Hide' : 'Show'"
|
|
197
|
+
color="neutral"
|
|
198
|
+
variant="ghost"
|
|
199
|
+
size="sm"
|
|
200
|
+
class="rounded-l-none h-[49px] min-w-[69px]"
|
|
201
|
+
@click="toggle"
|
|
202
|
+
/>
|
|
203
|
+
</template>
|
|
204
|
+
</UInputPassword>
|
|
205
|
+
</URow>
|
|
206
|
+
|
|
207
|
+
<URow block>
|
|
208
|
+
<UInputPassword
|
|
209
|
+
v-model="descriptionSlotValue"
|
|
210
|
+
label="Password"
|
|
211
|
+
>
|
|
212
|
+
<template #description>
|
|
213
|
+
<URow align="center" gap="2xs" class="text-neutral">
|
|
214
|
+
<UIcon name="shield" size="xs" color="primary" />
|
|
215
|
+
<UText size="sm">
|
|
216
|
+
Minimum 8 characters.
|
|
217
|
+
<ULink label="Password rules" underlined size="sm" />.
|
|
218
|
+
</UText>
|
|
219
|
+
</URow>
|
|
220
|
+
</template>
|
|
221
|
+
</UInputPassword>
|
|
222
|
+
|
|
223
|
+
<UInputPassword
|
|
224
|
+
v-model="errorSlotValue"
|
|
225
|
+
label="Password"
|
|
226
|
+
:error="true"
|
|
227
|
+
>
|
|
228
|
+
<template #error>
|
|
229
|
+
<URow align="center" gap="2xs">
|
|
230
|
+
<UIcon name="error" size="xs" color="error" />
|
|
231
|
+
<UText size="sm" color="error">
|
|
232
|
+
<ul>
|
|
233
|
+
<li>Password does not meet strength requirements</li>
|
|
234
|
+
<li>Use at least 8 characters with mixed case and numbers</li>
|
|
235
|
+
<li>Avoid common words and repeated characters</li>
|
|
236
|
+
</ul>
|
|
237
|
+
</UText>
|
|
238
|
+
</URow>
|
|
239
|
+
</template>
|
|
240
|
+
</UInputPassword>
|
|
241
|
+
</URow>
|
|
242
|
+
</UCol>
|
|
199
243
|
`,
|
|
200
244
|
});
|
|
201
245
|
Slots.parameters = {
|
|
202
246
|
docs: {
|
|
203
247
|
story: {
|
|
204
|
-
height: "
|
|
248
|
+
height: "300px",
|
|
205
249
|
},
|
|
206
250
|
},
|
|
207
251
|
};
|
|
@@ -14,6 +14,7 @@ import UCol from "../../ui.container-col/UCol.vue";
|
|
|
14
14
|
import URow from "../../ui.container-row/URow.vue";
|
|
15
15
|
import UDropdownButton from "../../ui.dropdown-button/UDropdownButton.vue";
|
|
16
16
|
import UText from "../../ui.text-block/UText.vue";
|
|
17
|
+
import ULink from "../../ui.button-link/ULink.vue";
|
|
17
18
|
|
|
18
19
|
import type { Meta, StoryFn } from "@storybook/vue3-vite";
|
|
19
20
|
import type { Props } from "../types";
|
|
@@ -152,7 +153,7 @@ export const IconProps: StoryFn<UInputSearchArgs> = (args) => ({
|
|
|
152
153
|
});
|
|
153
154
|
|
|
154
155
|
export const Slots: StoryFn<UInputSearchArgs> = (args) => ({
|
|
155
|
-
components: { UInputSearch, UCol, URow, UIcon, UDropdownButton, UText },
|
|
156
|
+
components: { UInputSearch, UCol, URow, UIcon, UDropdownButton, UText, ULink },
|
|
156
157
|
setup() {
|
|
157
158
|
const aiVersions = [
|
|
158
159
|
{ label: "GPT-4o", value: "gpt-4o" },
|
|
@@ -160,10 +161,13 @@ export const Slots: StoryFn<UInputSearchArgs> = (args) => ({
|
|
|
160
161
|
{ label: "GPT-4", value: "gpt-4" },
|
|
161
162
|
];
|
|
162
163
|
|
|
163
|
-
|
|
164
|
+
const descriptionSlotValue = ref("");
|
|
165
|
+
const errorSlotValue = ref("");
|
|
166
|
+
|
|
167
|
+
return { args, aiVersions, descriptionSlotValue, errorSlotValue };
|
|
164
168
|
},
|
|
165
169
|
template: `
|
|
166
|
-
<UCol>
|
|
170
|
+
<UCol gap="3xl">
|
|
167
171
|
<UInputSearch placeholder="Search by rental district...">
|
|
168
172
|
<template #right>
|
|
169
173
|
<URow align="center" gap="xs">
|
|
@@ -188,13 +192,45 @@ export const Slots: StoryFn<UInputSearchArgs> = (args) => ({
|
|
|
188
192
|
/>
|
|
189
193
|
</template>
|
|
190
194
|
</UInputSearch>
|
|
195
|
+
|
|
196
|
+
<UInputSearch v-model="descriptionSlotValue" label="Search products">
|
|
197
|
+
<template #description>
|
|
198
|
+
<URow align="center" gap="2xs" class="text-neutral">
|
|
199
|
+
<UIcon name="travel_explore" size="xs" color="primary" />
|
|
200
|
+
<UText size="sm">
|
|
201
|
+
Tip: use
|
|
202
|
+
<ULink label="filters" underlined size="sm" />
|
|
203
|
+
for exact matches.
|
|
204
|
+
</UText>
|
|
205
|
+
</URow>
|
|
206
|
+
</template>
|
|
207
|
+
</UInputSearch>
|
|
208
|
+
|
|
209
|
+
<UInputSearch
|
|
210
|
+
v-model="errorSlotValue"
|
|
211
|
+
label="Search"
|
|
212
|
+
:error="true"
|
|
213
|
+
>
|
|
214
|
+
<template #error>
|
|
215
|
+
<URow align="center" gap="2xs">
|
|
216
|
+
<UIcon name="error" size="xs" color="error" />
|
|
217
|
+
<UText size="sm" color="error">
|
|
218
|
+
<ul>
|
|
219
|
+
<li>Search query is too short</li>
|
|
220
|
+
<li>Remove unsupported symbols from your search</li>
|
|
221
|
+
<li>Try different keywords and search again</li>
|
|
222
|
+
</ul>
|
|
223
|
+
</UText>
|
|
224
|
+
</URow>
|
|
225
|
+
</template>
|
|
226
|
+
</UInputSearch>
|
|
191
227
|
</UCol>
|
|
192
228
|
`,
|
|
193
229
|
});
|
|
194
230
|
Slots.parameters = {
|
|
195
231
|
docs: {
|
|
196
232
|
story: {
|
|
197
|
-
height: "
|
|
233
|
+
height: "500px",
|
|
198
234
|
},
|
|
199
235
|
},
|
|
200
236
|
};
|
package/ui.form-label/ULabel.vue
CHANGED
|
@@ -170,9 +170,6 @@ const { getDataTest, wrapperAttrs, contentAttrs, labelAttrs, descriptionAttrs, e
|
|
|
170
170
|
{{ description }}
|
|
171
171
|
</slot>
|
|
172
172
|
</div>
|
|
173
|
-
|
|
174
|
-
<!-- @slot Use it to add something below the label content. -->
|
|
175
|
-
<slot name="bottom" />
|
|
176
173
|
</div>
|
|
177
174
|
</div>
|
|
178
175
|
|
|
@@ -226,8 +223,5 @@ const { getDataTest, wrapperAttrs, contentAttrs, labelAttrs, descriptionAttrs, e
|
|
|
226
223
|
{{ description }}
|
|
227
224
|
</slot>
|
|
228
225
|
</div>
|
|
229
|
-
|
|
230
|
-
<!-- @slot Use it to add something below the label content. -->
|
|
231
|
-
<slot name="bottom" />
|
|
232
226
|
</div>
|
|
233
227
|
</template>
|