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.
Files changed (74) hide show
  1. package/directives/clickOutside/storybook/docs.mdx +0 -1
  2. package/directives/clickOutside/storybook/stories.ts +21 -15
  3. package/directives/tooltip/storybook/docs.mdx +0 -1
  4. package/directives/tooltip/storybook/stories.ts +20 -13
  5. package/icons/storybook/arrow_back.svg +1 -0
  6. package/icons/storybook/arrow_forward.svg +1 -0
  7. package/icons/storybook/brightness_1.svg +1 -0
  8. package/icons/storybook/keyboard_tab.svg +1 -0
  9. package/icons/storybook/keyboard_tab_rtl.svg +1 -0
  10. package/package.json +1 -1
  11. package/ui.container-modal/tests/UModal.test.ts +10 -4
  12. package/ui.form-input/UInput.vue +0 -1
  13. package/ui.form-input/tests/UInput.test.ts +606 -0
  14. package/ui.form-input-counter/UInputCounter.vue +4 -1
  15. package/ui.form-input-counter/tests/UInputCounter.test.ts +268 -0
  16. package/ui.form-input-file/UInputFile.vue +0 -1
  17. package/ui.form-input-file/tests/UInputFile.test.ts +510 -0
  18. package/ui.form-input-number/UInputNumber.vue +3 -3
  19. package/ui.form-input-number/tests/UInputNumber.test.ts +454 -0
  20. package/ui.form-input-number/useFormatNumber.ts +1 -0
  21. package/ui.form-input-password/tests/UInputPassword.test.ts +303 -0
  22. package/ui.form-input-rating/UInputRating.vue +1 -1
  23. package/ui.form-input-rating/tests/UInputRating.test.ts +272 -0
  24. package/ui.form-input-search/tests/UInputSearch.test.ts +372 -0
  25. package/ui.form-label/ULabel.vue +4 -10
  26. package/ui.form-label/config.ts +2 -5
  27. package/ui.form-label/storybook/stories.ts +11 -4
  28. package/ui.form-label/tests/ULabel.test.ts +374 -0
  29. package/ui.form-label/types.ts +0 -5
  30. package/ui.form-radio/URadio.vue +0 -1
  31. package/ui.form-select/USelect.vue +0 -1
  32. package/ui.form-switch/USwitch.vue +0 -1
  33. package/ui.form-textarea/UTextarea.vue +0 -1
  34. package/ui.form-textarea/tests/UTextarea.test.ts +574 -0
  35. package/ui.form-textarea/types.ts +8 -8
  36. package/ui.image-icon/UIcon.vue +8 -1
  37. package/ui.image-icon/config.ts +1 -0
  38. package/ui.image-icon/storybook/stories.ts +0 -4
  39. package/ui.image-icon/tests/UIcon.test.ts +76 -86
  40. package/ui.image-icon/tests/assets/add.svg +1 -0
  41. package/ui.loader/storybook/stories.ts +0 -7
  42. package/ui.loader-overlay/storybook/stories.ts +9 -3
  43. package/ui.loader-progress/storybook/stories.ts +5 -5
  44. package/ui.navigation-breadcrumbs/UBreadcrumbs.vue +15 -2
  45. package/ui.navigation-breadcrumbs/config.ts +1 -0
  46. package/ui.navigation-breadcrumbs/storybook/stories.ts +35 -33
  47. package/ui.navigation-breadcrumbs/tests/UBreadcrumbs.test.ts +27 -5
  48. package/ui.navigation-breadcrumbs/types.ts +2 -2
  49. package/ui.navigation-pagination/storybook/stories.ts +26 -42
  50. package/ui.navigation-progress/storybook/stories.ts +6 -4
  51. package/ui.navigation-tab/UTab.vue +1 -1
  52. package/ui.navigation-tab/config.ts +6 -1
  53. package/ui.navigation-tab/storybook/assets/john-doe.png +0 -0
  54. package/ui.navigation-tab/storybook/stories.ts +11 -4
  55. package/ui.navigation-tabs/storybook/stories.ts +18 -15
  56. package/ui.other-chip/config.ts +12 -1
  57. package/ui.other-chip/storybook/stories.ts +2 -2
  58. package/ui.other-chip/types.ts +1 -1
  59. package/ui.other-dot/config.ts +0 -3
  60. package/ui.other-dot/storybook/stories.ts +0 -7
  61. package/ui.other-dot/tests/UDot.test.ts +0 -3
  62. package/ui.other-dot/types.ts +1 -1
  63. package/ui.skeleton/storybook/stories.ts +6 -11
  64. package/ui.skeleton-choice/storybook/stories.ts +18 -21
  65. package/ui.skeleton-input/config.ts +6 -6
  66. package/ui.skeleton-input/storybook/stories.ts +24 -21
  67. package/ui.skeleton-text/USkeletonText.vue +2 -2
  68. package/ui.skeleton-text/config.ts +1 -1
  69. package/ui.skeleton-text/storybook/stories.ts +11 -24
  70. package/ui.text-notify/UNotify.vue +19 -6
  71. package/ui.text-notify/constants.ts +0 -1
  72. package/ui.text-notify/storybook/stories.ts +232 -10
  73. package/ui.text-notify/types.ts +13 -0
  74. package/ui.text-notify/utilNotify.ts +41 -30
@@ -6,6 +6,5 @@ import * as stories from "./stories.ts";
6
6
  <Title of={stories} />
7
7
  <Subtitle of={stories} />
8
8
  <Description of={stories} />
9
- <Primary of={stories} />
10
9
  <Controls of={stories.Default} />
11
10
  <Stories of={stories} />
@@ -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 class="mt-4" variant="outlined">
52
- <p>
53
- Click on calendar itself will trigger directive callback, use ignore option to prevent this behavior.
54
- </p>
55
- </UAlert>
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 SettingsTemplate: StoryFn<VOnClickOutsideArgs> = (args: VOnClickOutsideArgs) => ({
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="outlined">
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 Settings = SettingsTemplate.bind({});
113
- Settings.args = {};
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
  },
@@ -6,6 +6,5 @@ import * as stories from "./stories.ts";
6
6
  <Title of={stories} />
7
7
  <Subtitle of={stories} />
8
8
  <Description of={stories} />
9
- <Primary of={stories} />
10
9
  <Controls of={stories.Default} />
11
10
  <Stories of={stories} />
@@ -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 URow from "../../../ui.container-row/URow.vue";
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 SettingsTemplate: StoryFn<VTooltipArgs> = (args: VTooltipArgs) => ({
37
- components: { UIcon, URow, UAlert, ULink },
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
- <URow align="center">
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, zIndex: 42 }"
48
+ v-tooltip="{ content: '<b>Tooltip</b>', placement: 'bottom', allowHTML: true }"
53
49
  />
54
- </URow>
50
+ </UCol>
55
51
  `,
56
52
  });
57
53
 
58
54
  export const Default = DefaultTemplate.bind({});
59
55
  Default.args = {};
60
56
 
61
- export const Settings = SettingsTemplate.bind({});
62
- Settings.args = {};
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "1.0.2-beta.32",
3
+ "version": "1.0.2-beta.34",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -200,12 +200,16 @@ describe("UModal", () => {
200
200
  },
201
201
  });
202
202
 
203
- const innerWrapper = component.find("[vl-key='innerWrapper']");
203
+ const overlay = component.find('[vl-key="overlay"]');
204
204
 
205
- await innerWrapper.trigger("click");
205
+ expect(overlay.exists()).toBe(true);
206
+
207
+ await overlay.trigger("click");
206
208
  await sleep(500);
207
209
 
208
- expect(innerWrapper.exists()).toBe(!value);
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
- expect(component.exists()).toBe(!value);
233
+ const modal = component.find('[vl-key="modal"]');
234
+
235
+ expect(modal.exists()).toBe(!value);
230
236
  });
231
237
  });
232
238
 
@@ -257,7 +257,6 @@ const {
257
257
  :size="size"
258
258
  :align="labelAlign"
259
259
  centred
260
- interactive
261
260
  v-bind="inputLabelAttrs"
262
261
  >
263
262
  <template #label>