vueless 1.4.7-beta.4 → 1.4.7-beta.6
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 +2 -2
- package/ui.container-accordion/storybook/stories.ts +1 -1
- package/ui.container-accordion-item/storybook/stories.ts +1 -1
- package/ui.container-card/storybook/stories.ts +40 -39
- package/ui.container-modal/storybook/stories.ts +2 -2
- package/ui.container-modal-confirm/storybook/stories.ts +17 -2
- package/ui.container-page/storybook/stories.ts +6 -1
- package/ui.data-table/storybook/stories.ts +1 -1
- package/ui.form-checkbox/storybook/stories.ts +11 -17
- package/ui.form-checkbox-group/storybook/stories.ts +3 -3
- package/ui.form-date-picker/storybook/stories.ts +19 -17
- package/ui.form-date-picker-range/storybook/stories.ts +11 -17
- package/ui.form-input/storybook/stories.ts +4 -8
- package/ui.form-input-file/storybook/stories.ts +11 -17
- package/ui.form-input-number/storybook/stories.ts +11 -17
- package/ui.form-input-password/storybook/stories.ts +11 -17
- package/ui.form-input-rating/UInputRating.vue +8 -3
- package/ui.form-input-search/storybook/stories.ts +12 -18
- package/ui.form-label/storybook/stories.ts +12 -18
- package/ui.form-listbox/UListbox.vue +72 -71
- package/ui.form-listbox/tests/UListbox.test.ts +37 -3
- package/ui.form-radio/storybook/stories.ts +12 -17
- package/ui.form-radio-group/storybook/stories.ts +11 -17
- package/ui.form-select/config.ts +4 -1
- package/ui.form-select/storybook/stories.ts +27 -19
- package/ui.form-switch/storybook/stories.ts +3 -3
- package/ui.form-textarea/storybook/stories.ts +11 -17
- package/ui.text-files/storybook/stories.ts +3 -3
- package/icons/storybook/date_range.svg +0 -1
- package/icons/storybook/event.svg +0 -1
- package/icons/storybook/format_quote.svg +0 -1
- package/icons/storybook/location_city.svg +0 -1
- package/icons/storybook/mark_email_unread.svg +0 -1
- package/icons/storybook/shield.svg +0 -1
- package/icons/storybook/workspace_premium.svg +0 -1
|
@@ -195,14 +195,11 @@ export const Slots: StoryFn<UInputSearchArgs> = (args) => ({
|
|
|
195
195
|
|
|
196
196
|
<UInputSearch v-model="descriptionSlotValue" label="Search products">
|
|
197
197
|
<template #description>
|
|
198
|
-
<
|
|
199
|
-
|
|
200
|
-
<
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
for exact matches.
|
|
204
|
-
</UText>
|
|
205
|
-
</URow>
|
|
198
|
+
<UText size="sm" variant="lifted">
|
|
199
|
+
Tip: use
|
|
200
|
+
<ULink label="filters" underlined size="sm" />
|
|
201
|
+
for exact matches.
|
|
202
|
+
</UText>
|
|
206
203
|
</template>
|
|
207
204
|
</UInputSearch>
|
|
208
205
|
|
|
@@ -212,16 +209,13 @@ export const Slots: StoryFn<UInputSearchArgs> = (args) => ({
|
|
|
212
209
|
:error="true"
|
|
213
210
|
>
|
|
214
211
|
<template #error>
|
|
215
|
-
<
|
|
216
|
-
<
|
|
217
|
-
|
|
218
|
-
<
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
</ul>
|
|
223
|
-
</UText>
|
|
224
|
-
</URow>
|
|
212
|
+
<UText size="sm" color="error">
|
|
213
|
+
<ul>
|
|
214
|
+
<li>Search query is too short</li>
|
|
215
|
+
<li>Remove unsupported symbols from your search</li>
|
|
216
|
+
<li>Try different keywords and search again</li>
|
|
217
|
+
</ul>
|
|
218
|
+
</UText>
|
|
225
219
|
</template>
|
|
226
220
|
</UInputSearch>
|
|
227
221
|
</UCol>
|
|
@@ -133,30 +133,24 @@ export const Slots: StoryFn<ULabelArgs> = () => ({
|
|
|
133
133
|
<ULabel label="Work email">
|
|
134
134
|
<UText label="johndoe@example.com" />
|
|
135
135
|
<template #description>
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
<
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
to this address.
|
|
142
|
-
</UText>
|
|
143
|
-
</URow>
|
|
136
|
+
<UText size="sm" variant="lifted">
|
|
137
|
+
We will send a
|
|
138
|
+
<ULink label="confirmation link" underlined size="sm" />
|
|
139
|
+
to this address.
|
|
140
|
+
</UText>
|
|
144
141
|
</template>
|
|
145
142
|
</ULabel>
|
|
146
143
|
|
|
147
144
|
<ULabel label="Email" :error="true">
|
|
148
145
|
<UText label="not-an-email" />
|
|
149
146
|
<template #error>
|
|
150
|
-
<
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
<
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
</ul>
|
|
158
|
-
</UText>
|
|
159
|
-
</URow>
|
|
147
|
+
<UText size="sm" color="error">
|
|
148
|
+
<ul>
|
|
149
|
+
<li>Email address format is invalid</li>
|
|
150
|
+
<li>Use a name@domain.com style address</li>
|
|
151
|
+
<li>Remove spaces and special characters from the local part</li>
|
|
152
|
+
</ul>
|
|
153
|
+
</UText>
|
|
160
154
|
</template>
|
|
161
155
|
</ULabel>
|
|
162
156
|
</UCol>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { watch, computed, useId, ref, useTemplateRef } from "vue";
|
|
2
|
+
import { watch, computed, useId, ref, useTemplateRef, nextTick } from "vue";
|
|
3
3
|
import { isEqual } from "lodash-es";
|
|
4
4
|
|
|
5
5
|
import { useUI } from "../composables/useUI";
|
|
@@ -144,77 +144,78 @@ const filteredOptions = computed(() => {
|
|
|
144
144
|
watch(
|
|
145
145
|
() => [props.options, props.size, props.visibleOptions, props.searchable, searchModel.value],
|
|
146
146
|
() => {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
147
|
+
nextTick(() => {
|
|
148
|
+
const options = [
|
|
149
|
+
...(optionsRef.value || []),
|
|
150
|
+
...(addOptionRef.value ? [addOptionRef.value] : []),
|
|
151
|
+
...(emptyOptionRef.value ? [emptyOptionRef.value] : []),
|
|
152
|
+
];
|
|
153
|
+
|
|
154
|
+
if (props.visibleOptions) {
|
|
155
|
+
options.slice(0, props.visibleOptions);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const maxHeight = options
|
|
159
|
+
.slice(0, props.visibleOptions)
|
|
160
|
+
.map((el) => {
|
|
161
|
+
const styles = window.getComputedStyle(el);
|
|
162
|
+
const height = parseFloat(styles.height || "0");
|
|
163
|
+
const marginTop = parseFloat(styles.marginTop || "0");
|
|
164
|
+
const marginBottom = parseFloat(styles.marginBottom || "0");
|
|
165
|
+
|
|
166
|
+
return height + marginTop + marginBottom;
|
|
167
|
+
})
|
|
168
|
+
.reduce((acc, cur) => acc + cur, 0);
|
|
169
|
+
|
|
170
|
+
const wrapperStyle = getComputedStyle(wrapperRef.value as Element);
|
|
171
|
+
const wrapperPaddingTop = parseFloat(wrapperStyle.paddingTop || "0");
|
|
172
|
+
const wrapperPaddingBottom = parseFloat(wrapperStyle.paddingBottom || "0");
|
|
173
|
+
const wrapperBorderTop = parseFloat(wrapperStyle.borderTopWidth || "0");
|
|
174
|
+
const wrapperBorderBottom = parseFloat(wrapperStyle.borderBottomWidth || "0");
|
|
175
|
+
const wrapperGap = parseFloat(wrapperStyle.gap || "0");
|
|
176
|
+
|
|
177
|
+
const addOptionHeight = addOptionRef.value?.getBoundingClientRect().height || 0;
|
|
178
|
+
|
|
179
|
+
const inputEl = listboxInputRef.value?.input as HTMLInputElement | undefined;
|
|
180
|
+
let listboxInputHeight = 0;
|
|
181
|
+
|
|
182
|
+
let listboxInputWrapperPaddingTop = 0;
|
|
183
|
+
let listboxInputBorderTop = 0;
|
|
184
|
+
let listboxInputBorderBottom = 0;
|
|
185
|
+
|
|
186
|
+
if (inputEl) {
|
|
187
|
+
const listboxInputStyle = getComputedStyle(inputEl);
|
|
188
|
+
const listboxInputLabelStyle = inputEl.parentElement
|
|
189
|
+
? getComputedStyle(inputEl.parentElement)
|
|
190
|
+
: undefined;
|
|
191
|
+
const listboxInputWrapperStyle = getComputedStyle(
|
|
192
|
+
inputEl.parentElement?.parentElement?.parentElement as Element,
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
listboxInputHeight = parseFloat(listboxInputStyle.height || "0");
|
|
196
|
+
|
|
197
|
+
listboxInputWrapperPaddingTop = parseFloat(listboxInputWrapperStyle.paddingTop || "0");
|
|
198
|
+
|
|
199
|
+
listboxInputBorderTop = parseFloat(listboxInputLabelStyle?.borderTop || "0");
|
|
200
|
+
listboxInputBorderBottom = parseFloat(listboxInputLabelStyle?.borderBottom || "0");
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
wrapperMaxHeight.value = `${
|
|
204
|
+
maxHeight +
|
|
205
|
+
addOptionHeight +
|
|
206
|
+
(props.searchable ? wrapperGap : 0) +
|
|
207
|
+
wrapperPaddingTop +
|
|
208
|
+
wrapperPaddingBottom +
|
|
209
|
+
wrapperBorderTop +
|
|
210
|
+
wrapperBorderBottom +
|
|
211
|
+
listboxInputHeight +
|
|
212
|
+
listboxInputBorderTop +
|
|
213
|
+
listboxInputBorderBottom +
|
|
214
|
+
listboxInputWrapperPaddingTop
|
|
215
|
+
}px`;
|
|
216
|
+
});
|
|
216
217
|
},
|
|
217
|
-
{ immediate: true
|
|
218
|
+
{ immediate: true },
|
|
218
219
|
);
|
|
219
220
|
|
|
220
221
|
watch(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { nextTick } from "vue";
|
|
1
2
|
import { flushPromises, mount } from "@vue/test-utils";
|
|
2
|
-
import { describe, it, expect } from "vitest";
|
|
3
|
+
import { describe, it, expect, vi } from "vitest";
|
|
3
4
|
|
|
4
5
|
import UListbox from "../UListbox.vue";
|
|
5
6
|
import UIcon from "../../ui.image-icon/UIcon.vue";
|
|
@@ -399,7 +400,37 @@ describe("UListbox.vue", () => {
|
|
|
399
400
|
id: `option-${i}`,
|
|
400
401
|
}));
|
|
401
402
|
|
|
402
|
-
|
|
403
|
+
// Mock getComputedStyle to return non-zero heights for option elements
|
|
404
|
+
const originalGetComputedStyle = window.getComputedStyle;
|
|
405
|
+
|
|
406
|
+
vi.spyOn(window, "getComputedStyle").mockImplementation((el) => {
|
|
407
|
+
const real = originalGetComputedStyle(el);
|
|
408
|
+
|
|
409
|
+
return {
|
|
410
|
+
...real,
|
|
411
|
+
height: "40px",
|
|
412
|
+
marginTop: "0px",
|
|
413
|
+
marginBottom: "4px",
|
|
414
|
+
paddingTop: "4px",
|
|
415
|
+
paddingBottom: "4px",
|
|
416
|
+
borderTopWidth: "1px",
|
|
417
|
+
borderBottomWidth: "1px",
|
|
418
|
+
gap: "4px",
|
|
419
|
+
} as CSSStyleDeclaration;
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
// Mock getBoundingClientRect for option elements
|
|
423
|
+
vi.spyOn(HTMLElement.prototype, "getBoundingClientRect").mockReturnValue({
|
|
424
|
+
height: 40,
|
|
425
|
+
width: 100,
|
|
426
|
+
top: 0,
|
|
427
|
+
left: 0,
|
|
428
|
+
bottom: 40,
|
|
429
|
+
right: 100,
|
|
430
|
+
x: 0,
|
|
431
|
+
y: 0,
|
|
432
|
+
toJSON: () => {},
|
|
433
|
+
});
|
|
403
434
|
|
|
404
435
|
const component = mount(UListbox, {
|
|
405
436
|
props: {
|
|
@@ -409,12 +440,15 @@ describe("UListbox.vue", () => {
|
|
|
409
440
|
});
|
|
410
441
|
|
|
411
442
|
await flushPromises();
|
|
443
|
+
await nextTick();
|
|
412
444
|
|
|
413
445
|
const wrapper = component.find('[vl-key="wrapper"]');
|
|
414
446
|
const styleAttr = wrapper.attributes("style");
|
|
415
447
|
const inlineMaxHeight = (wrapper.element as HTMLElement).style.maxHeight;
|
|
416
448
|
|
|
417
|
-
expect(styleAttr ?? inlineMaxHeight).toContain(
|
|
449
|
+
expect(styleAttr ?? inlineMaxHeight).toContain("max-height:");
|
|
450
|
+
|
|
451
|
+
vi.restoreAllMocks();
|
|
418
452
|
});
|
|
419
453
|
});
|
|
420
454
|
|
|
@@ -140,13 +140,11 @@ export const Slots: StoryFn<URadioArgs> = (args) => ({
|
|
|
140
140
|
value="pro"
|
|
141
141
|
>
|
|
142
142
|
<template #description>
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
</UText>
|
|
149
|
-
</URow>
|
|
143
|
+
<UText size="sm" variant="lifted">
|
|
144
|
+
Includes all core features,
|
|
145
|
+
<ULink label="compare plans" underlined size="sm" />
|
|
146
|
+
for upgrades.
|
|
147
|
+
</UText>
|
|
150
148
|
</template>
|
|
151
149
|
</URadio>
|
|
152
150
|
|
|
@@ -159,16 +157,13 @@ export const Slots: StoryFn<URadioArgs> = (args) => ({
|
|
|
159
157
|
:error="true"
|
|
160
158
|
>
|
|
161
159
|
<template #error>
|
|
162
|
-
<
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
<
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
</ul>
|
|
170
|
-
</UText>
|
|
171
|
-
</URow>
|
|
160
|
+
<UText size="sm" color="error">
|
|
161
|
+
<ul>
|
|
162
|
+
<li>You must select one of the available options</li>
|
|
163
|
+
<li>This field is required to proceed</li>
|
|
164
|
+
<li>Choose an option above to clear this error</li>
|
|
165
|
+
</ul>
|
|
166
|
+
</UText>
|
|
172
167
|
</template>
|
|
173
168
|
</URadio>
|
|
174
169
|
</UCol>
|
|
@@ -204,13 +204,10 @@ export const Slots: StoryFn<URadioGroupArgs> = (args) => ({
|
|
|
204
204
|
label="Delivery"
|
|
205
205
|
>
|
|
206
206
|
<template #description>
|
|
207
|
-
<
|
|
208
|
-
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
<ULink label="Full policy" underlined size="sm" />.
|
|
212
|
-
</UText>
|
|
213
|
-
</URow>
|
|
207
|
+
<UText size="sm" variant="lifted">
|
|
208
|
+
Shipping times are estimates, see the
|
|
209
|
+
<ULink label="full policy" underlined size="sm" />.
|
|
210
|
+
</UText>
|
|
214
211
|
</template>
|
|
215
212
|
</URadioGroup>
|
|
216
213
|
|
|
@@ -222,16 +219,13 @@ export const Slots: StoryFn<URadioGroupArgs> = (args) => ({
|
|
|
222
219
|
:error="true"
|
|
223
220
|
>
|
|
224
221
|
<template #error>
|
|
225
|
-
<
|
|
226
|
-
<
|
|
227
|
-
|
|
228
|
-
<
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
</ul>
|
|
233
|
-
</UText>
|
|
234
|
-
</URow>
|
|
222
|
+
<UText size="sm" color="error">
|
|
223
|
+
<ul>
|
|
224
|
+
<li>Please choose one option from the group</li>
|
|
225
|
+
<li>At least one selection is required</li>
|
|
226
|
+
<li>Review the labels and pick a valid answer</li>
|
|
227
|
+
</ul>
|
|
228
|
+
</UText>
|
|
235
229
|
</template>
|
|
236
230
|
</URadioGroup>
|
|
237
231
|
</UCol>
|
package/ui.form-select/config.ts
CHANGED
|
@@ -117,7 +117,10 @@ export default /*tw*/ {
|
|
|
117
117
|
],
|
|
118
118
|
},
|
|
119
119
|
toggleWrapper: "{>toggle} mr-3",
|
|
120
|
-
toggleIcon:
|
|
120
|
+
toggleIcon: {
|
|
121
|
+
base: "{UIcon} {>selectIcon} -mr-1 transition duration-300",
|
|
122
|
+
compoundVariants: [{ opened: true, class: "rotate-180" }],
|
|
123
|
+
},
|
|
121
124
|
leftIcon: "{UIcon} {>selectIcon}",
|
|
122
125
|
rightIcon: "{UIcon} {>selectIcon}",
|
|
123
126
|
leftSlot: "{>toggle} pl-2.5",
|
|
@@ -148,6 +148,13 @@ NotClearable.args = { clearable: false };
|
|
|
148
148
|
|
|
149
149
|
export const Searchable = DefaultTemplate.bind({});
|
|
150
150
|
Searchable.args = { searchable: true };
|
|
151
|
+
Searchable.parameters = {
|
|
152
|
+
docs: {
|
|
153
|
+
story: {
|
|
154
|
+
height: "350px",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
};
|
|
151
158
|
|
|
152
159
|
export const SearchModelValue = DefaultTemplate.bind({});
|
|
153
160
|
SearchModelValue.args = { search: "New York", searchable: true };
|
|
@@ -163,10 +170,10 @@ export const NoCloseOnSelect = DefaultTemplate.bind({});
|
|
|
163
170
|
NoCloseOnSelect.args = { modelValue: 3, closeOnSelect: false };
|
|
164
171
|
|
|
165
172
|
export const Readonly = DefaultTemplate.bind({});
|
|
166
|
-
Readonly.args = { readonly: true, modelValue:
|
|
173
|
+
Readonly.args = { readonly: true, modelValue: 1, clearable: false };
|
|
167
174
|
|
|
168
175
|
export const Disabled = DefaultTemplate.bind({});
|
|
169
|
-
Disabled.args = { disabled: true, modelValue:
|
|
176
|
+
Disabled.args = { disabled: true, modelValue: 2, clearable: false };
|
|
170
177
|
|
|
171
178
|
export const LabelAlign = EnumTemplate.bind({});
|
|
172
179
|
LabelAlign.args = {
|
|
@@ -184,6 +191,13 @@ LargeItemList.args = {
|
|
|
184
191
|
return { value: index + 1, label: `value ${index + 1}`, badge: "badge" };
|
|
185
192
|
}),
|
|
186
193
|
};
|
|
194
|
+
LargeItemList.parameters = {
|
|
195
|
+
docs: {
|
|
196
|
+
story: {
|
|
197
|
+
height: "400px",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
};
|
|
187
201
|
|
|
188
202
|
export const Multiple = DefaultTemplate.bind({});
|
|
189
203
|
Multiple.args = { multiple: true, modelValue: [] };
|
|
@@ -396,13 +410,10 @@ export const Slots: StoryFn<USelectArgs> = (args) => ({
|
|
|
396
410
|
:options="args.options"
|
|
397
411
|
>
|
|
398
412
|
<template #description>
|
|
399
|
-
<
|
|
400
|
-
|
|
401
|
-
<
|
|
402
|
-
|
|
403
|
-
<ULink label="Shipping zones" underlined size="sm" />.
|
|
404
|
-
</UText>
|
|
405
|
-
</URow>
|
|
413
|
+
<UText size="sm" variant="lifted">
|
|
414
|
+
Only cities we ship to, see
|
|
415
|
+
<ULink label="shipping zones" underlined size="sm" />.
|
|
416
|
+
</UText>
|
|
406
417
|
</template>
|
|
407
418
|
</USelect>
|
|
408
419
|
|
|
@@ -414,16 +425,13 @@ export const Slots: StoryFn<USelectArgs> = (args) => ({
|
|
|
414
425
|
:error="true"
|
|
415
426
|
>
|
|
416
427
|
<template #error>
|
|
417
|
-
<
|
|
418
|
-
<
|
|
419
|
-
|
|
420
|
-
<
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
</ul>
|
|
425
|
-
</UText>
|
|
426
|
-
</URow>
|
|
428
|
+
<UText size="sm" color="error">
|
|
429
|
+
<ul>
|
|
430
|
+
<li>Please select an option from the list</li>
|
|
431
|
+
<li>The current value is not available anymore</li>
|
|
432
|
+
<li>Pick a valid choice to continue</li>
|
|
433
|
+
</ul>
|
|
434
|
+
</UText>
|
|
427
435
|
</template>
|
|
428
436
|
</USelect>
|
|
429
437
|
</URow>
|
|
@@ -115,9 +115,9 @@ export const Slots: StoryFn<USwitchArgs> = (args) => ({
|
|
|
115
115
|
<template #description>
|
|
116
116
|
<URow align="center" gap="2xs" class="text-neutral">
|
|
117
117
|
<UIcon name="cloud_sync" size="xs" class="mt-0.5" color="primary" />
|
|
118
|
-
<UText size="sm">
|
|
119
|
-
Drafts sync across devices
|
|
120
|
-
<ULink label="
|
|
118
|
+
<UText size="sm" variant="lifted">
|
|
119
|
+
Drafts sync across devices,
|
|
120
|
+
<ULink label="learn more" underlined size="sm" />.
|
|
121
121
|
</UText>
|
|
122
122
|
</URow>
|
|
123
123
|
</template>
|
|
@@ -171,13 +171,10 @@ export const Slots: StoryFn<UTextareaArgs> = (args) => ({
|
|
|
171
171
|
<URow block>
|
|
172
172
|
<UTextarea v-model="descriptionSlotValue" label="Feedback">
|
|
173
173
|
<template #description>
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
<ULink label="content guidelines" underlined size="sm" />.
|
|
179
|
-
</UText>
|
|
180
|
-
</URow>
|
|
174
|
+
<UText size="sm" variant="lifted">
|
|
175
|
+
Markdown is not supported, see
|
|
176
|
+
<ULink label="content guidelines" underlined size="sm" />.
|
|
177
|
+
</UText>
|
|
181
178
|
</template>
|
|
182
179
|
</UTextarea>
|
|
183
180
|
|
|
@@ -187,16 +184,13 @@ export const Slots: StoryFn<UTextareaArgs> = (args) => ({
|
|
|
187
184
|
:error="true"
|
|
188
185
|
>
|
|
189
186
|
<template #error>
|
|
190
|
-
<
|
|
191
|
-
<
|
|
192
|
-
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
</ul>
|
|
198
|
-
</UText>
|
|
199
|
-
</URow>
|
|
187
|
+
<UText size="sm" color="error">
|
|
188
|
+
<ul>
|
|
189
|
+
<li>Message is too short (minimum 10 characters)</li>
|
|
190
|
+
<li>Remove disallowed characters from your text</li>
|
|
191
|
+
<li>Try again after fixing the issues above</li>
|
|
192
|
+
</ul>
|
|
193
|
+
</UText>
|
|
200
194
|
</template>
|
|
201
195
|
</UTextarea>
|
|
202
196
|
</URow>
|
|
@@ -109,9 +109,9 @@ export const Slots: StoryFn<UFilesArgs> = (args) => ({
|
|
|
109
109
|
<template #description>
|
|
110
110
|
<URow align="center" gap="2xs" class="text-neutral">
|
|
111
111
|
<UIcon name="folder" size="xs" class="mt-0.5" color="primary" />
|
|
112
|
-
<UText size="sm">
|
|
113
|
-
Files are read-only here
|
|
114
|
-
<ULink label="
|
|
112
|
+
<UText size="sm" variant="lifted">
|
|
113
|
+
Files are read-only here,
|
|
114
|
+
<ULink label="manage in storage" underlined size="sm" />.
|
|
115
115
|
</UText>
|
|
116
116
|
</URow>
|
|
117
117
|
</template>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M273.08-406.68q-12.1-12.2-12.1-30.06 0-17.85 12.13-30.07 12.12-12.21 30.05-12.21t30.02 12.21q12.1 12.22 12.1 30.07 0 17.86-12.12 30.06-12.13 12.2-30.06 12.2t-30.02-12.2Zm179.87 0q-12.1-12.2-12.1-30.06 0-17.85 12.12-30.07 12.13-12.21 30.06-12.21t30.02 12.21q12.1 12.22 12.1 30.07 0 17.86-12.12 30.06-12.13 12.2-30.06 12.2t-30.02-12.2Zm172.87 0q-12.1-12.2-12.1-30.06 0-17.85 12.12-30.07 12.13-12.21 30.06-12.21t30.02 12.21q12.1 12.22 12.1 30.07 0 17.86-12.13 30.06-12.12 12.2-30.05 12.2t-30.02-12.2ZM182.15-74.02q-27.6 0-47.86-20.27-20.27-20.26-20.27-47.86v-615.7q0-27.7 20.27-48.03 20.26-20.34 47.86-20.34H245v-60h69.07v60h331.86v-60H715v60h62.85q27.7 0 48.03 20.34 20.34 20.33 20.34 48.03v615.7q0 27.6-20.34 47.86-20.33 20.27-48.03 20.27h-595.7Zm0-68.13h595.7V-570h-595.7v427.85Zm0-487.85h595.7v-127.85h-595.7V-630Zm0 0v-127.85V-630Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M528-248.18q-28-28.19-28-69Q500-358 528.18-386q28.19-28 69-28Q638-414 666-385.82q28 28.19 28 69Q694-276 665.82-248q-28.19 28-69 28Q556-220 528-248.18ZM182.15-74.02q-27.6 0-47.86-20.27-20.27-20.26-20.27-47.86v-615.7q0-27.7 20.27-48.03 20.26-20.34 47.86-20.34H245v-60h69.07v60h331.86v-60H715v60h62.85q27.7 0 48.03 20.34 20.34 20.33 20.34 48.03v615.7q0 27.6-20.34 47.86-20.33 20.27-48.03 20.27h-595.7Zm0-68.13h595.7V-570h-595.7v427.85Zm0-487.85h595.7v-127.85h-595.7V-630Zm0 0v-127.85V-630Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="m238.67-234.5 95.92-164.87q-5 1-11 1.5t-11 .5q-66.48-1.43-112.88-49.03Q153.3-494 153.3-560q0-67.76 47.92-115.55 47.91-47.8 115.67-47.8 67.44 0 115.27 47.8Q480-627.76 480-560q0 21.09-5.44 41.16-5.44 20.08-16.08 38.84L317.37-234.5h-78.7Zm366.7 0 95.67-164.87q-5 1-11 1.5t-11 .5q-66.47-1.43-112.76-49.03Q520-494 520-560q0-67.76 47.8-115.55 47.79-47.8 115.55-47.8 67.43 0 115.39 47.8Q846.7-627.76 846.7-560q0 21.09-5.44 41.16-5.44 20.08-16.09 38.84L683.83-234.5h-78.46ZM371.71-505.01q22.79-22.86 22.79-54.95 0-32.08-22.79-54.99-22.79-22.9-54.95-22.9-32.15 0-54.93 22.86-22.79 22.86-22.79 54.95 0 32.08 22.79 54.99 22.78 22.9 54.93 22.9 32.16 0 54.95-22.86Zm366.58 0q22.91-22.86 22.91-54.95 0-32.08-22.91-54.99-22.91-22.9-55.07-22.9-32.15 0-54.94 22.86-22.78 22.86-22.78 54.95 0 32.08 22.79 54.99 22.79 22.9 54.95 22.9 32.15 0 55.05-22.86ZM683.35-560Zm-366.46 0Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M111.87-111.87v-574.5h247v-86.26L480-891l121.37 118.37v252.26h247v408.5h-736.5ZM180-180h106v-106H180v106Zm0-166h106v-106H180v106Zm0-166h106v-106H180v106Zm247 332h106v-106H427v106Zm0-166h106v-106H427v106Zm0-166h106v-106H427v106Zm0-166h106v-106H427v106Zm247 498h106v-106H674v106Zm0-166h106v-106H674v106Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M142.15-154.02q-27.6 0-47.86-20.27-20.27-20.26-20.27-47.86v-515.7q0-27.7 20.27-48.03 20.26-20.34 47.86-20.34h429.46q-4.44 17.15-5.68 34.19-1.23 17.03 1.24 34.18H147.15l332.85 218 148.37-97.04q10.96 9.96 23.39 18.11 12.44 8.15 25.87 13.8L480-454.35l-337.85-223v455.2h675.7v-353.31q19.18-5.02 36.07-14.7 16.88-9.67 32.3-22.6v390.61q0 27.6-20.34 47.86-20.33 20.27-48.03 20.27h-675.7Zm0-583.83v515.7-515.7Zm536.98 58.6q-33.2-33.31-33.2-80.87 0-47.55 33.32-80.75 33.31-33.2 80.87-33.2 47.55 0 80.75 33.32 33.2 33.31 33.2 80.87 0 47.55-33.32 80.75-33.31 33.2-80.87 33.2-47.55 0-80.75-33.32Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M479.98-74.78q-142.59-35.67-234.27-164.87-91.69-129.2-91.69-283.27v-242.26L480-887.22l326.22 122.05V-523q0 154.1-91.82 283.32-91.82 129.23-234.42 164.9Zm.02-70.13q113.8-39.2 185.83-143.62 72.02-104.43 72.02-234.4v-194.4L480-814.61l-257.85 97.4v194.17q0 130.08 72.02 234.51Q366.2-184.11 480-144.91Zm0-334.85Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="m381.89-408.89 36.96-119.31-98.59-75.43h120.31L480-728.37l38.43 124.74h121.31l-98.35 75.43 35.96 119.31L480-482.76l-98.11 73.87ZM241.37-34.5v-304.72q-46.44-47.95-66.89-105.63-20.46-57.67-20.46-116.35 0-138.39 93.8-232.18 93.79-93.79 232.18-93.79t232.3 93.79q93.92 93.79 93.92 232.18 0 58.68-20.58 116.35-20.57 57.68-67.01 105.63V-34.5L480-113.98 241.37-34.5Zm421.58-343.63q74.9-74.78 74.9-182.95 0-108.16-74.9-183.06-74.91-74.9-182.95-74.9-108.04 0-182.95 74.9-74.9 74.9-74.9 183.06 0 108.17 74.9 182.95 74.91 74.78 182.95 74.78 108.04 0 182.95-74.78ZM304-121.13l176-56.2 176 56.2V-289.5q-40.24 28.76-86.12 41.64Q524-234.98 480-234.98q-44 0-89.88-12.88-45.88-12.88-86.12-41.64v168.37Zm176-84.57Z"/></svg>
|