vueless 1.0.2-beta.32 → 1.0.2-beta.34
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/directives/clickOutside/storybook/docs.mdx +0 -1
- package/directives/clickOutside/storybook/stories.ts +21 -15
- package/directives/tooltip/storybook/docs.mdx +0 -1
- package/directives/tooltip/storybook/stories.ts +20 -13
- package/icons/storybook/arrow_back.svg +1 -0
- package/icons/storybook/arrow_forward.svg +1 -0
- package/icons/storybook/brightness_1.svg +1 -0
- package/icons/storybook/keyboard_tab.svg +1 -0
- package/icons/storybook/keyboard_tab_rtl.svg +1 -0
- package/package.json +1 -1
- package/ui.container-modal/tests/UModal.test.ts +10 -4
- package/ui.form-input/UInput.vue +0 -1
- package/ui.form-input/tests/UInput.test.ts +606 -0
- package/ui.form-input-counter/UInputCounter.vue +4 -1
- package/ui.form-input-counter/tests/UInputCounter.test.ts +268 -0
- package/ui.form-input-file/UInputFile.vue +0 -1
- package/ui.form-input-file/tests/UInputFile.test.ts +510 -0
- package/ui.form-input-number/UInputNumber.vue +3 -3
- package/ui.form-input-number/tests/UInputNumber.test.ts +454 -0
- package/ui.form-input-number/useFormatNumber.ts +1 -0
- package/ui.form-input-password/tests/UInputPassword.test.ts +303 -0
- package/ui.form-input-rating/UInputRating.vue +1 -1
- package/ui.form-input-rating/tests/UInputRating.test.ts +272 -0
- package/ui.form-input-search/tests/UInputSearch.test.ts +372 -0
- package/ui.form-label/ULabel.vue +4 -10
- package/ui.form-label/config.ts +2 -5
- package/ui.form-label/storybook/stories.ts +11 -4
- package/ui.form-label/tests/ULabel.test.ts +374 -0
- package/ui.form-label/types.ts +0 -5
- package/ui.form-radio/URadio.vue +0 -1
- package/ui.form-select/USelect.vue +0 -1
- package/ui.form-switch/USwitch.vue +0 -1
- package/ui.form-textarea/UTextarea.vue +0 -1
- package/ui.form-textarea/tests/UTextarea.test.ts +574 -0
- package/ui.form-textarea/types.ts +8 -8
- package/ui.image-icon/UIcon.vue +8 -1
- package/ui.image-icon/config.ts +1 -0
- package/ui.image-icon/storybook/stories.ts +0 -4
- package/ui.image-icon/tests/UIcon.test.ts +76 -86
- package/ui.image-icon/tests/assets/add.svg +1 -0
- package/ui.loader/storybook/stories.ts +0 -7
- package/ui.loader-overlay/storybook/stories.ts +9 -3
- package/ui.loader-progress/storybook/stories.ts +5 -5
- package/ui.navigation-breadcrumbs/UBreadcrumbs.vue +15 -2
- package/ui.navigation-breadcrumbs/config.ts +1 -0
- package/ui.navigation-breadcrumbs/storybook/stories.ts +35 -33
- package/ui.navigation-breadcrumbs/tests/UBreadcrumbs.test.ts +27 -5
- package/ui.navigation-breadcrumbs/types.ts +2 -2
- package/ui.navigation-pagination/storybook/stories.ts +26 -42
- package/ui.navigation-progress/storybook/stories.ts +6 -4
- package/ui.navigation-tab/UTab.vue +1 -1
- package/ui.navigation-tab/config.ts +6 -1
- package/ui.navigation-tab/storybook/assets/john-doe.png +0 -0
- package/ui.navigation-tab/storybook/stories.ts +11 -4
- package/ui.navigation-tabs/storybook/stories.ts +18 -15
- package/ui.other-chip/config.ts +12 -1
- package/ui.other-chip/storybook/stories.ts +2 -2
- package/ui.other-chip/types.ts +1 -1
- package/ui.other-dot/config.ts +0 -3
- package/ui.other-dot/storybook/stories.ts +0 -7
- package/ui.other-dot/tests/UDot.test.ts +0 -3
- package/ui.other-dot/types.ts +1 -1
- package/ui.skeleton/storybook/stories.ts +6 -11
- package/ui.skeleton-choice/storybook/stories.ts +18 -21
- package/ui.skeleton-input/config.ts +6 -6
- package/ui.skeleton-input/storybook/stories.ts +24 -21
- package/ui.skeleton-text/USkeletonText.vue +2 -2
- package/ui.skeleton-text/config.ts +1 -1
- package/ui.skeleton-text/storybook/stories.ts +11 -24
- package/ui.text-notify/UNotify.vue +19 -6
- package/ui.text-notify/constants.ts +0 -1
- package/ui.text-notify/storybook/stories.ts +232 -10
- package/ui.text-notify/types.ts +13 -0
- package/ui.text-notify/utilNotify.ts +41 -30
|
@@ -48,15 +48,15 @@ const DefaultTemplate: StoryFn<VOnClickOutsideArgs> = (args: VOnClickOutsideArgs
|
|
|
48
48
|
|
|
49
49
|
<UCalendar v-model="date" v-if="isShownCalendar" class="mt-2" />
|
|
50
50
|
|
|
51
|
-
<UAlert
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
<UAlert
|
|
52
|
+
variant="soft"
|
|
53
|
+
description="Click on calendar itself will trigger directive callback."
|
|
54
|
+
class="mt-4"
|
|
55
|
+
/>
|
|
56
56
|
`,
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
const
|
|
59
|
+
const IgnoreOptionsTemplate: StoryFn<VOnClickOutsideArgs> = (args: VOnClickOutsideArgs) => ({
|
|
60
60
|
components: { UButton, UCalendar, UAlert },
|
|
61
61
|
directives: { clickOutside },
|
|
62
62
|
setup() {
|
|
@@ -98,25 +98,31 @@ const SettingsTemplate: StoryFn<VOnClickOutsideArgs> = (args: VOnClickOutsideArg
|
|
|
98
98
|
<UCalendar v-model="date" v-if="isShownCalendar" class="mt-2" />
|
|
99
99
|
</div>
|
|
100
100
|
|
|
101
|
-
<UAlert class="mt-4" variant="
|
|
102
|
-
<p>
|
|
103
|
-
Click on calendar will not trigger directive callback now.
|
|
104
|
-
</p>
|
|
105
|
-
</UAlert>
|
|
101
|
+
<UAlert class="mt-4" variant="soft" description="Click on calendar will not trigger directive callback now." />
|
|
106
102
|
`,
|
|
107
103
|
});
|
|
108
104
|
|
|
109
105
|
export const Default = DefaultTemplate.bind({});
|
|
110
106
|
Default.args = {};
|
|
111
107
|
|
|
112
|
-
export const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
Settings.parameters = {
|
|
108
|
+
export const IgnoreOptions = IgnoreOptionsTemplate.bind({});
|
|
109
|
+
IgnoreOptions.args = {};
|
|
110
|
+
IgnoreOptions.parameters = {
|
|
116
111
|
docs: {
|
|
112
|
+
description: {
|
|
113
|
+
story: `
|
|
114
|
+
This story demonstrates the \`ignore\` option of v-click-outside,
|
|
115
|
+
which prevents the callback when clicking inside specified elements (e.g., the calendar),
|
|
116
|
+
allowing it to stay open during interaction.
|
|
117
|
+
`,
|
|
118
|
+
},
|
|
117
119
|
source: {
|
|
118
120
|
code: `
|
|
119
121
|
<UButton @click="toggleCalendar" v-click-outside="[closeCalendar, { ignore: [calendarRef] }]" />
|
|
122
|
+
|
|
123
|
+
<div ref="calendar" class="w-fit">
|
|
124
|
+
<UCalendar v-model="date" v-if="isShownCalendar" class="mt-2" />
|
|
125
|
+
</div>
|
|
120
126
|
`,
|
|
121
127
|
},
|
|
122
128
|
},
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
|
|
3
3
|
import UIcon from "../../../ui.image-icon/UIcon.vue";
|
|
4
|
-
import
|
|
4
|
+
import UCol from "../../../ui.container-col/UCol.vue";
|
|
5
5
|
import UAlert from "../../../ui.text-alert/UAlert.vue";
|
|
6
6
|
import ULink from "../../../ui.button-link/ULink.vue";
|
|
7
|
+
import UText from "../../../ui.text-block/UText.vue";
|
|
7
8
|
import tooltip from "../vTooltip.ts";
|
|
8
9
|
|
|
9
10
|
import type { Props } from "tippy.js";
|
|
@@ -33,30 +34,36 @@ const DefaultTemplate: StoryFn<VTooltipArgs> = (args: VTooltipArgs) => ({
|
|
|
33
34
|
`,
|
|
34
35
|
});
|
|
35
36
|
|
|
36
|
-
const
|
|
37
|
-
components: { UIcon,
|
|
37
|
+
const TooltipSettingsTemplate: StoryFn<VTooltipArgs> = (args: VTooltipArgs) => ({
|
|
38
|
+
components: { UIcon, UCol, UAlert, ULink, UText },
|
|
38
39
|
directives: { tooltip },
|
|
39
40
|
setup() {
|
|
40
41
|
return { args };
|
|
41
42
|
},
|
|
42
43
|
template: `
|
|
43
|
-
<
|
|
44
|
-
<UAlert variant="outlined">
|
|
45
|
-
<p>
|
|
46
|
-
See all available settings in <ULink label="Tippy.js docs" href="https://atomiks.github.io/tippyjs/v6/all-props/" underlined />
|
|
47
|
-
</p>
|
|
48
|
-
</UAlert>
|
|
44
|
+
<UCol>
|
|
49
45
|
<UIcon
|
|
50
46
|
interactive
|
|
51
47
|
name="sentiment_satisfied"
|
|
52
|
-
v-tooltip="{ content: '<b>Tooltip</b>', placement: 'bottom', allowHTML: true
|
|
48
|
+
v-tooltip="{ content: '<b>Tooltip</b>', placement: 'bottom', allowHTML: true }"
|
|
53
49
|
/>
|
|
54
|
-
</
|
|
50
|
+
</UCol>
|
|
55
51
|
`,
|
|
56
52
|
});
|
|
57
53
|
|
|
58
54
|
export const Default = DefaultTemplate.bind({});
|
|
59
55
|
Default.args = {};
|
|
60
56
|
|
|
61
|
-
export const
|
|
62
|
-
|
|
57
|
+
export const TooltipSettings = TooltipSettingsTemplate.bind({});
|
|
58
|
+
TooltipSettings.args = {};
|
|
59
|
+
TooltipSettings.parameters = {
|
|
60
|
+
docs: {
|
|
61
|
+
description: {
|
|
62
|
+
story: `
|
|
63
|
+
This story demonstrates how to pass custom options to the v-tooltip directive,
|
|
64
|
+
including HTML content and tooltip placement. For more settings,
|
|
65
|
+
refer to the <a href="https://atomiks.github.io/tippyjs/v6/all-props/" target="_blank" class="!no-underline">Tippy.js documentation</a>.
|
|
66
|
+
`,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="m283.8-445.93 244.18 244.17L480-154.02 154.02-480 480-806.22l47.98 47.98L283.8-514.07h522.42v68.14H283.8Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M676.2-445.93H154.02v-68.14H676.2L432.02-758.24 480-806.22 806.22-480 480-154.02l-47.98-47.74L676.2-445.93Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M480.03-74.02q-83.46 0-157.54-31.88-74.07-31.88-129.39-87.2-55.32-55.32-87.2-129.36-31.88-74.04-31.88-157.51 0-84.46 31.88-158.54 31.88-74.07 87.16-128.9 55.28-54.84 129.34-86.82 74.06-31.99 157.55-31.99 84.48 0 158.59 31.97 74.1 31.97 128.91 86.77 54.82 54.8 86.79 128.88 31.98 74.08 31.98 158.6 0 83.5-31.99 157.57-31.98 74.07-86.82 129.36-54.83 55.29-128.87 87.17-74.04 31.88-158.51 31.88Zm-.03-68.13q141.04 0 239.45-98.75 98.4-98.76 98.4-239.1 0-141.04-98.4-239.45-98.41-98.4-239.57-98.4-140.16 0-238.95 98.4-98.78 98.41-98.78 239.57 0 140.16 98.75 238.95 98.76 98.78 239.1 98.78ZM480-480Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M817.85-235.93v-488.14h68.37v488.14h-68.37Zm-345.74 2.67L423.13-281 588.3-445.93H74.02v-68.14H588.3L424.37-679l47.74-47.74L718.85-480 472.11-233.26Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 -960 960 960"><path d="M142.15-235.93H74.02v-488.14h68.13v488.14Zm345.74 2.67L241.15-480l246.74-246.74L535.63-679 371.7-514.07h514.52v68.14H371.7L536.87-281l-48.98 47.74Z"/></svg>
|
package/package.json
CHANGED
|
@@ -200,12 +200,16 @@ describe("UModal", () => {
|
|
|
200
200
|
},
|
|
201
201
|
});
|
|
202
202
|
|
|
203
|
-
const
|
|
203
|
+
const overlay = component.find('[vl-key="overlay"]');
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
expect(overlay.exists()).toBe(true);
|
|
206
|
+
|
|
207
|
+
await overlay.trigger("click");
|
|
206
208
|
await sleep(500);
|
|
207
209
|
|
|
208
|
-
|
|
210
|
+
const modal = component.find('[vl-key="modal"]');
|
|
211
|
+
|
|
212
|
+
expect(modal.exists()).toBe(!value);
|
|
209
213
|
});
|
|
210
214
|
});
|
|
211
215
|
|
|
@@ -226,7 +230,9 @@ describe("UModal", () => {
|
|
|
226
230
|
await wrapper.trigger("keydown", { key: "Escape" });
|
|
227
231
|
await sleep(500);
|
|
228
232
|
|
|
229
|
-
|
|
233
|
+
const modal = component.find('[vl-key="modal"]');
|
|
234
|
+
|
|
235
|
+
expect(modal.exists()).toBe(!value);
|
|
230
236
|
});
|
|
231
237
|
});
|
|
232
238
|
|