vueless 1.4.12-beta.2 → 1.4.12-beta.21

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 (109) hide show
  1. package/README.md +1 -1
  2. package/composables/useUI.ts +19 -1
  3. package/index.d.ts +128 -0
  4. package/index.ts +128 -0
  5. package/package.json +10 -9
  6. package/ui.button/config.ts +1 -1
  7. package/ui.button-link/config.ts +1 -1
  8. package/ui.button-toggle/UToggle.vue +6 -4
  9. package/ui.button-toggle/storybook/stories.ts +4 -1
  10. package/ui.button-toggle/tests/UToggle.test-d.ts +48 -0
  11. package/ui.button-toggle/tests/UToggleTypes.vue +55 -0
  12. package/ui.button-toggle/types.ts +18 -6
  13. package/ui.container-accordion/types.ts +5 -2
  14. package/ui.container-collapsible/config.ts +1 -1
  15. package/ui.container-drawer/tests/UDrawer.test.ts +10 -17
  16. package/ui.container-modal/tests/UModal.test.ts +10 -17
  17. package/ui.data-list/UDataList.vue +48 -17
  18. package/ui.data-list/config.ts +2 -2
  19. package/ui.data-list/storybook/stories.ts +5 -2
  20. package/ui.data-list/tests/UDataList.test-d.ts +76 -0
  21. package/ui.data-list/tests/UDataList.test.ts +52 -3
  22. package/ui.data-list/tests/UDataListTypes.vue +110 -0
  23. package/ui.data-list/types.ts +37 -5
  24. package/ui.data-table/UTable.vue +202 -24
  25. package/ui.data-table/UTableRow.vue +4 -3
  26. package/ui.data-table/config.ts +11 -2
  27. package/ui.data-table/storybook/stories.ts +34 -1
  28. package/ui.data-table/tests/UTable.test-d.ts +179 -0
  29. package/ui.data-table/tests/UTable.test.ts +85 -7
  30. package/ui.data-table/tests/UTableEmptyColumnsTypes.vue +27 -0
  31. package/ui.data-table/tests/UTableTypes.vue +193 -0
  32. package/ui.data-table/types.ts +106 -9
  33. package/ui.data-table/utilTable.ts +1 -1
  34. package/ui.dropdown/UDropdown.vue +19 -8
  35. package/ui.dropdown/storybook/stories.ts +4 -1
  36. package/ui.dropdown/tests/UDropdown.test-d.ts +61 -0
  37. package/ui.dropdown/tests/UDropdown.test.ts +8 -1
  38. package/ui.dropdown/tests/UDropdownTypes.vue +111 -0
  39. package/ui.dropdown/types.ts +27 -3
  40. package/ui.dropdown-badge/UDropdownBadge.vue +9 -4
  41. package/ui.dropdown-badge/storybook/stories.ts +6 -1
  42. package/ui.dropdown-badge/tests/UDropdownBadge.test-d.ts +55 -0
  43. package/ui.dropdown-badge/tests/UDropdownBadge.test.ts +8 -1
  44. package/ui.dropdown-badge/tests/UDropdownBadgeTypes.vue +107 -0
  45. package/ui.dropdown-badge/types.ts +17 -3
  46. package/ui.dropdown-button/UDropdownButton.vue +9 -4
  47. package/ui.dropdown-button/storybook/stories.ts +6 -1
  48. package/ui.dropdown-button/tests/UDropdownButton.test-d.ts +57 -0
  49. package/ui.dropdown-button/tests/UDropdownButton.test.ts +8 -1
  50. package/ui.dropdown-button/tests/UDropdownButtonTypes.vue +107 -0
  51. package/ui.dropdown-button/types.ts +17 -3
  52. package/ui.dropdown-link/UDropdownLink.vue +9 -4
  53. package/ui.dropdown-link/config.ts +1 -1
  54. package/ui.dropdown-link/storybook/stories.ts +4 -1
  55. package/ui.dropdown-link/tests/UDropdownLink.test-d.ts +55 -0
  56. package/ui.dropdown-link/tests/UDropdownLink.test.ts +8 -1
  57. package/ui.dropdown-link/tests/UDropdownLinkTypes.vue +107 -0
  58. package/ui.dropdown-link/types.ts +17 -3
  59. package/ui.form-calendar/config.ts +1 -1
  60. package/ui.form-checkbox/config.ts +1 -1
  61. package/ui.form-checkbox/tests/UCheckbox.test.ts +4 -4
  62. package/ui.form-checkbox/types.ts +4 -2
  63. package/ui.form-checkbox-group/UCheckboxGroup.vue +8 -2
  64. package/ui.form-date-picker/UDatePicker.vue +11 -1
  65. package/ui.form-date-picker/tests/UDatePicker.test.ts +47 -0
  66. package/ui.form-input/UInput.vue +1 -0
  67. package/ui.form-input/config.ts +1 -1
  68. package/ui.form-input/tests/UInput.test.ts +16 -0
  69. package/ui.form-input-file/config.ts +1 -1
  70. package/ui.form-listbox/UListbox.vue +29 -12
  71. package/ui.form-listbox/config.ts +1 -1
  72. package/ui.form-listbox/storybook/stories.ts +4 -1
  73. package/ui.form-listbox/tests/UListbox.test-d.ts +63 -0
  74. package/ui.form-listbox/tests/UListboxTypes.vue +107 -0
  75. package/ui.form-listbox/types.ts +34 -2
  76. package/ui.form-radio/config.ts +1 -1
  77. package/ui.form-radio-group/URadioGroup.vue +15 -3
  78. package/ui.form-radio-group/config.ts +8 -3
  79. package/ui.form-radio-group/types.ts +2 -3
  80. package/ui.form-select/USelect.vue +49 -17
  81. package/ui.form-select/config.ts +4 -4
  82. package/ui.form-select/storybook/stories.ts +4 -1
  83. package/ui.form-select/tests/USelect.test-d.ts +76 -0
  84. package/ui.form-select/tests/USelect.test.ts +65 -1
  85. package/ui.form-select/tests/USelectTypes.vue +113 -0
  86. package/ui.form-select/types.ts +55 -4
  87. package/ui.form-switch/USwitch.vue +13 -12
  88. package/ui.form-switch/config.ts +2 -1
  89. package/ui.form-switch/tests/USwitch.test.ts +151 -0
  90. package/ui.form-textarea/config.ts +1 -1
  91. package/ui.image-avatar/types.ts +5 -2
  92. package/ui.image-avatar-group/types.ts +5 -2
  93. package/ui.image-icon/UIcon.vue +3 -2
  94. package/ui.image-icon/types.ts +2 -2
  95. package/ui.navigation-breadcrumbs/types.ts +5 -2
  96. package/ui.navigation-tab/UTab.vue +14 -9
  97. package/ui.navigation-tab/tests/UTab.test.ts +14 -0
  98. package/ui.navigation-tabs/UTabs.vue +158 -6
  99. package/ui.navigation-tabs/config.ts +2 -1
  100. package/ui.navigation-tabs/constants.ts +2 -0
  101. package/ui.navigation-tabs/storybook/stories.ts +12 -1
  102. package/ui.navigation-tabs/tests/UTabs.test-d.ts +50 -0
  103. package/ui.navigation-tabs/tests/UTabs.test.ts +213 -1
  104. package/ui.navigation-tabs/tests/UTabsTypes.vue +65 -0
  105. package/ui.navigation-tabs/types.ts +26 -4
  106. package/ui.skeleton-text/constants.ts +1 -1
  107. package/ui.text-badge/config.ts +1 -1
  108. package/utils/node/loaderIcon.js +1 -1
  109. package/v.tooltip/vTooltip.ts +1 -1
@@ -6,7 +6,7 @@ import {
6
6
  getDocsDescription,
7
7
  } from "../../utils/storybook";
8
8
 
9
- import UTabs from "../../ui.navigation-tabs/UTabs.vue";
9
+ import UTabsComponent from "../../ui.navigation-tabs/UTabs.vue";
10
10
  import URow from "../../ui.container-row/URow.vue";
11
11
  import ULabel from "../../ui.form-label/ULabel.vue";
12
12
  import UTab from "../../ui.navigation-tab/UTab.vue";
@@ -20,6 +20,9 @@ import johnDoe from "../../ui.navigation-tab/storybook/assets/john-doe.png";
20
20
  import type { Meta, StoryFn } from "@storybook/vue3-vite";
21
21
  import type { Props } from "../types";
22
22
 
23
+ /* Generic SFCs are typed as a function, which drops the compiler-generated `__name`. */
24
+ const UTabs = UTabsComponent as typeof UTabsComponent & { __name: string };
25
+
23
26
  interface UTabsArgs extends Props {
24
27
  slotTemplate?: string;
25
28
  enum: "size";
@@ -89,6 +92,14 @@ Scrollable.args = {
89
92
  options: getOptionsArray(),
90
93
  scrollable: true,
91
94
  };
95
+ Scrollable.parameters = {
96
+ docs: {
97
+ description: {
98
+ story:
99
+ "Scroll overflowing tabs with the arrow buttons, by dragging the tab list, or with horizontal wheel.",
100
+ },
101
+ },
102
+ };
92
103
 
93
104
  export const Block = DefaultTemplate.bind({});
94
105
  Block.args = { block: true };
@@ -0,0 +1,50 @@
1
+ import { describe, it, expectTypeOf } from "vitest";
2
+
3
+ import type { Props, UTabsOption, UTabsSlots } from "../types";
4
+
5
+ interface CountedTab {
6
+ value: string;
7
+ label: string;
8
+ count: number;
9
+ }
10
+
11
+ type LabelProps = Parameters<NonNullable<UTabsSlots<CountedTab>["label"]>>[0];
12
+
13
+ describe("UTabs types", () => {
14
+ it("infers the caller's option shape in a slot", () => {
15
+ expectTypeOf<LabelProps["item"]>().toEqualTypeOf<CountedTab>();
16
+ expectTypeOf<LabelProps["item"]["count"]>().toEqualTypeOf<number>();
17
+ expectTypeOf<LabelProps["index"]>().toEqualTypeOf<number>();
18
+ expectTypeOf<LabelProps["label"]>().toEqualTypeOf<string>();
19
+ expectTypeOf<LabelProps["active"]>().toEqualTypeOf<boolean>();
20
+ });
21
+
22
+ it("promises the caller's members — options reach slots untransformed", () => {
23
+ /* Unlike UTable, `UTabs` iterates `props.options` directly: no flattening, filtering
24
+ * or synthetic entries, so the members are guaranteed rather than optional. */
25
+ expectTypeOf<LabelProps["item"]["label"]>().toEqualTypeOf<string>();
26
+ expectTypeOf<undefined>().not.toExtend<LabelProps["item"]["count"]>();
27
+ });
28
+
29
+ it("does not expose undeclared option properties to a slot", () => {
30
+ type HasIndexSignature = string extends keyof LabelProps["item"] ? true : false;
31
+
32
+ expectTypeOf<HasIndexSignature>().toEqualTypeOf<false>();
33
+ expectTypeOf<keyof LabelProps["item"]>().not.toEqualTypeOf<string>();
34
+ });
35
+
36
+ it("types the remaining slots", () => {
37
+ type Left = Parameters<NonNullable<UTabsSlots<CountedTab>["left"]>>[0];
38
+ type Right = Parameters<NonNullable<UTabsSlots<CountedTab>["right"]>>[0];
39
+ type Prev = Parameters<NonNullable<UTabsSlots["prev"]>>[0];
40
+
41
+ expectTypeOf<Left["item"]>().toEqualTypeOf<CountedTab>();
42
+ expectTypeOf<Right["item"]>().toEqualTypeOf<CountedTab>();
43
+ expectTypeOf<Prev["iconName"]>().toEqualTypeOf<string>();
44
+ });
45
+
46
+ it("resolves Props with no type argument", () => {
47
+ expectTypeOf<Props>().toEqualTypeOf<Props<UTabsOption>>();
48
+ expectTypeOf<Props<CountedTab>["options"]>().toEqualTypeOf<CountedTab[] | undefined>();
49
+ });
50
+ });
@@ -1,3 +1,4 @@
1
+ import { nextTick } from "vue";
1
2
  import { mount } from "@vue/test-utils";
2
3
  import { describe, it, expect } from "vitest";
3
4
 
@@ -7,6 +8,25 @@ import UButton from "../../ui.button/UButton.vue";
7
8
 
8
9
  import type { Props, UTabsOption } from "../types";
9
10
 
11
+ function dispatchPointer(
12
+ target: EventTarget,
13
+ type: "pointerdown" | "pointermove" | "pointerup",
14
+ clientX: number,
15
+ extra: PointerEventInit = {},
16
+ ) {
17
+ target.dispatchEvent(
18
+ new PointerEvent(type, {
19
+ bubbles: true,
20
+ cancelable: true,
21
+ clientX,
22
+ clientY: 0,
23
+ pointerId: 1,
24
+ pointerType: "mouse",
25
+ ...extra,
26
+ }),
27
+ );
28
+ }
29
+
10
30
  describe("UTabs.vue", () => {
11
31
  // Global options definition
12
32
  const options: UTabsOption[] = [
@@ -94,7 +114,7 @@ describe("UTabs.vue", () => {
94
114
  const tabsContainer = component.find(`[vl-key="tabs"]`);
95
115
 
96
116
  // Check that the container has the scrollable class
97
- expect(tabsContainer.classes()).toContain("scroll-smooth");
117
+ expect(tabsContainer.classes()).toContain("overflow-hidden");
98
118
  });
99
119
 
100
120
  it("Scroll – shows scroll buttons when scrollable and content overflows", async () => {
@@ -134,6 +154,198 @@ describe("UTabs.vue", () => {
134
154
  expect(nextButton).toBeDefined();
135
155
  });
136
156
 
157
+ it("Scrollable – scrolls the tab list on pointer drag", async () => {
158
+ const manyOptions: UTabsOption[] = Array.from({ length: 10 }, (_, i) => ({
159
+ value: `tab${i}`,
160
+ label: `Tab ${i}`,
161
+ }));
162
+
163
+ const component = mount(UTabs, {
164
+ props: {
165
+ options: manyOptions,
166
+ scrollable: true,
167
+ },
168
+ });
169
+
170
+ const tabsContainer = component.find(`[vl-key="tabs"]`);
171
+ const element = tabsContainer.element;
172
+
173
+ let scrollLeft = 0;
174
+
175
+ Object.defineProperty(element, "scrollWidth", { configurable: true, value: 1000 });
176
+ Object.defineProperty(element, "clientWidth", { configurable: true, value: 300 });
177
+ Object.defineProperty(element, "scrollLeft", {
178
+ configurable: true,
179
+ get: () => scrollLeft,
180
+ set: (value: number) => {
181
+ scrollLeft = value;
182
+ },
183
+ });
184
+
185
+ dispatchPointer(element, "pointerdown", 200, { button: 0 });
186
+ dispatchPointer(document, "pointermove", 120, { buttons: 1 });
187
+
188
+ await nextTick();
189
+
190
+ expect(scrollLeft).toBe(80);
191
+ expect(tabsContainer.classes()).toContain("cursor-move");
192
+ expect(tabsContainer.classes()).toContain("icon-drag");
193
+
194
+ dispatchPointer(document, "pointerup", 120);
195
+ });
196
+
197
+ it("Scrollable – does not select a tab after a drag gesture", async () => {
198
+ const manyOptions: UTabsOption[] = Array.from({ length: 10 }, (_, i) => ({
199
+ value: `tab${i}`,
200
+ label: `Tab ${i}`,
201
+ }));
202
+
203
+ const component = mount(UTabs, {
204
+ props: {
205
+ options: manyOptions,
206
+ modelValue: "tab0",
207
+ scrollable: true,
208
+ },
209
+ });
210
+
211
+ const tabsContainer = component.find(`[vl-key="tabs"]`);
212
+ const element = tabsContainer.element;
213
+
214
+ Object.defineProperty(element, "scrollWidth", { configurable: true, value: 1000 });
215
+ Object.defineProperty(element, "clientWidth", { configurable: true, value: 300 });
216
+ Object.defineProperty(element, "scrollLeft", {
217
+ configurable: true,
218
+ writable: true,
219
+ value: 0,
220
+ });
221
+
222
+ dispatchPointer(element, "pointerdown", 200, { button: 0 });
223
+ dispatchPointer(document, "pointermove", 120, { buttons: 1 });
224
+ dispatchPointer(document, "pointerup", 120);
225
+
226
+ await component.findAllComponents(UTab)[1].trigger("click");
227
+
228
+ expect(component.emitted("update:modelValue")).toBeFalsy();
229
+ });
230
+
231
+ it("Scrollable – scrolls the tab list on horizontal wheel", () => {
232
+ const manyOptions: UTabsOption[] = Array.from({ length: 10 }, (_, i) => ({
233
+ value: `tab${i}`,
234
+ label: `Tab ${i}`,
235
+ }));
236
+
237
+ const component = mount(UTabs, {
238
+ props: {
239
+ options: manyOptions,
240
+ scrollable: true,
241
+ },
242
+ });
243
+
244
+ const element = component.find(`[vl-key="tabs"]`).element;
245
+
246
+ let scrollLeft = 0;
247
+
248
+ Object.defineProperty(element, "scrollWidth", { configurable: true, value: 1000 });
249
+ Object.defineProperty(element, "clientWidth", { configurable: true, value: 300 });
250
+ Object.defineProperty(element, "scrollLeft", {
251
+ configurable: true,
252
+ get: () => scrollLeft,
253
+ set: (value: number) => {
254
+ scrollLeft = value;
255
+ },
256
+ });
257
+
258
+ element.dispatchEvent(
259
+ new WheelEvent("wheel", {
260
+ deltaX: 40,
261
+ deltaY: 0,
262
+ bubbles: true,
263
+ cancelable: true,
264
+ }),
265
+ );
266
+
267
+ expect(scrollLeft).toBe(40);
268
+ });
269
+
270
+ it("Scrollable – does not scroll the tab list on vertical wheel", () => {
271
+ const manyOptions: UTabsOption[] = Array.from({ length: 10 }, (_, i) => ({
272
+ value: `tab${i}`,
273
+ label: `Tab ${i}`,
274
+ }));
275
+
276
+ const component = mount(UTabs, {
277
+ props: {
278
+ options: manyOptions,
279
+ scrollable: true,
280
+ },
281
+ });
282
+
283
+ const element = component.find(`[vl-key="tabs"]`).element;
284
+
285
+ let scrollLeft = 0;
286
+
287
+ Object.defineProperty(element, "scrollWidth", { configurable: true, value: 1000 });
288
+ Object.defineProperty(element, "clientWidth", { configurable: true, value: 300 });
289
+ Object.defineProperty(element, "scrollLeft", {
290
+ configurable: true,
291
+ get: () => scrollLeft,
292
+ set: (value: number) => {
293
+ scrollLeft = value;
294
+ },
295
+ });
296
+
297
+ element.dispatchEvent(
298
+ new WheelEvent("wheel", {
299
+ deltaX: 0,
300
+ deltaY: 40,
301
+ bubbles: true,
302
+ cancelable: true,
303
+ }),
304
+ );
305
+
306
+ expect(scrollLeft).toBe(0);
307
+ });
308
+
309
+ it("Scrollable – scrolls the tab list on shift+wheel", () => {
310
+ const manyOptions: UTabsOption[] = Array.from({ length: 10 }, (_, i) => ({
311
+ value: `tab${i}`,
312
+ label: `Tab ${i}`,
313
+ }));
314
+
315
+ const component = mount(UTabs, {
316
+ props: {
317
+ options: manyOptions,
318
+ scrollable: true,
319
+ },
320
+ });
321
+
322
+ const element = component.find(`[vl-key="tabs"]`).element;
323
+
324
+ let scrollLeft = 0;
325
+
326
+ Object.defineProperty(element, "scrollWidth", { configurable: true, value: 1000 });
327
+ Object.defineProperty(element, "clientWidth", { configurable: true, value: 300 });
328
+ Object.defineProperty(element, "scrollLeft", {
329
+ configurable: true,
330
+ get: () => scrollLeft,
331
+ set: (value: number) => {
332
+ scrollLeft = value;
333
+ },
334
+ });
335
+
336
+ element.dispatchEvent(
337
+ new WheelEvent("wheel", {
338
+ deltaX: 0,
339
+ deltaY: 40,
340
+ shiftKey: true,
341
+ bubbles: true,
342
+ cancelable: true,
343
+ }),
344
+ );
345
+
346
+ expect(scrollLeft).toBe(40);
347
+ });
348
+
137
349
  it("Block – provides block value to tabs", () => {
138
350
  const block = true;
139
351
 
@@ -0,0 +1,65 @@
1
+ <!-- Type-level fixture: checked by `npm run ts:check`, never mounted.
2
+ Proves slot props infer from the `options` prop at a real call site. -->
3
+ <template>
4
+ <!-- `UTabs` iterates `options` verbatim, so the caller's shape is guaranteed, not optional. -->
5
+ <UTabs :options="options">
6
+ <template #left="{ item, index, active, iconName }">
7
+ {{ expectString(item.label) }}
8
+ {{ expectString(item.badge) }}
9
+ {{ expectNumber(index) }}
10
+ {{ expectBoolean(active) }}
11
+ {{ expectOptionalString(iconName) }}
12
+ </template>
13
+
14
+ <template #label="{ item, index, label, active }">
15
+ {{ expectString(item.badge) }}
16
+ {{ expectString(label) }}
17
+ {{ expectNumber(index) }}
18
+ {{ expectBoolean(active) }}
19
+ </template>
20
+
21
+ <template #right="{ item }">
22
+ <!-- @vue-expect-error `nonExistent` is not a key of the inferred option. -->
23
+ {{ item.nonExistent }}
24
+ </template>
25
+
26
+ <template #prev="{ iconName }">{{ expectString(iconName) }}</template>
27
+ <template #next="{ iconName }">{{ expectString(iconName) }}</template>
28
+ </UTabs>
29
+
30
+ <!-- Options from a non-literal source still expose the declared option shape. -->
31
+ <UTabs :options="typedOptions">
32
+ <template #label="{ item }">{{ expectNumber(item.count) }}</template>
33
+ </UTabs>
34
+ </template>
35
+
36
+ <script setup lang="ts">
37
+ import { ref } from "vue";
38
+
39
+ import UTabs from "../UTabs.vue";
40
+
41
+ interface CountedTab {
42
+ value: string;
43
+ label: string;
44
+ count: number;
45
+ }
46
+
47
+ const options = [{ value: "1", label: "Dashboard", badge: "new" }];
48
+ const typedOptions = ref<CountedTab[]>([]);
49
+
50
+ function expectString(value: string) {
51
+ return value;
52
+ }
53
+
54
+ function expectNumber(value: number) {
55
+ return value;
56
+ }
57
+
58
+ function expectBoolean(value: boolean) {
59
+ return value;
60
+ }
61
+
62
+ function expectOptionalString(value: string | undefined) {
63
+ return value;
64
+ }
65
+ </script>
@@ -8,13 +8,35 @@ export type SetUTabsSelectedItem = (
8
8
  value: string | number | boolean | UnknownArray | UnknownObject,
9
9
  ) => void;
10
10
 
11
- export interface UTabsOption {
11
+ export interface BaseTabOption {
12
12
  value: string | number;
13
13
  label: string;
14
14
  disabled?: boolean;
15
15
  }
16
16
 
17
- export interface Props {
17
+ /* Any object shape is a valid option, only reserved option keys are type checked. */
18
+ export type UTabsOption = BaseTabOption & (object | UnknownObject);
19
+
20
+ /**
21
+ * Slots receive each option verbatim — `UTabs` iterates `props.options` without
22
+ * filtering, flattening or synthesising entries, so the caller's shape is guaranteed.
23
+ */
24
+ export interface UTabsSlots<TItem extends UTabsOption = UTabsOption> {
25
+ default?: () => unknown;
26
+ prev?: (props: { iconName: string }) => unknown;
27
+ next?: (props: { iconName: string }) => unknown;
28
+ left?: (props: { item: TItem; index: number; active: boolean; iconName?: string }) => unknown;
29
+ label?: (props: {
30
+ item: TItem;
31
+ index: number;
32
+ label: string;
33
+ active: boolean;
34
+ iconName?: string;
35
+ }) => unknown;
36
+ right?: (props: { item: TItem; index: number; active: boolean; iconName?: string }) => unknown;
37
+ }
38
+
39
+ export interface Props<TItem extends UTabsOption = UTabsOption> {
18
40
  /**
19
41
  * Selected tab value.
20
42
  */
@@ -23,7 +45,7 @@ export interface Props {
23
45
  /**
24
46
  * Tab options.
25
47
  */
26
- options?: UTabsOption[];
48
+ options?: TItem[];
27
49
 
28
50
  /**
29
51
  * Tabs size.
@@ -31,7 +53,7 @@ export interface Props {
31
53
  size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl";
32
54
 
33
55
  /**
34
- * Make the Tabs scrollable.
56
+ * Make the Tabs scrollable via arrow buttons, dragging, or horizontal wheel.
35
57
  */
36
58
  scrollable?: boolean;
37
59
 
@@ -2,4 +2,4 @@
2
2
  This const is needed to prevent the issue in script setup:
3
3
  `defineProps` is referencing locally declared variables. (vue/valid-define-props)
4
4
  */
5
- export const COMPONENT_NAME = "USkeletonInput";
5
+ export const COMPONENT_NAME = "USkeletonText";
@@ -2,7 +2,7 @@ export default /*tw*/ {
2
2
  badge: {
3
3
  base: `
4
4
  inline-flex items-center justify-between py-1
5
- border border-solid rounded-medium leading-none! outline-solid outline-transparent
5
+ border border-solid rounded-medium leading-none! outline-solid outline-medium outline-transparent
6
6
  `,
7
7
  variants: {
8
8
  variant: {
@@ -227,7 +227,7 @@ async function findAndCopyIcons(files, library, vuelessConfig, debug) {
227
227
  const iconPropsPattern = `\\b\\w*(name|icon)\\w*\\s*=\\s*(['"])(.*?)\\2`;
228
228
  const uComponentIconNamePattern =
229
229
  // eslint-disable-next-line vue/max-len
230
- /<UIcon\b[^>]*?\b(name)\s*[:=]\s*(['"])(.*?)\2[^>]*?>|<(?!UIcon\b)(U\w+)\b[^>]*?\b(\w*icon\w*)\s*[:=]\s*(['"])(.*?)\6[^>]*?>/;
230
+ /<UIcon\b[^>]*?\b(name)\s*[:=]\s*(['"])(.*?)\2[^>]*?>|<(?!UIcon\b)([A-Z]\w+)\b[^>]*?\b(\w*icon\w*)\s*[:=]\s*(['"])(.*?)\6[^>]*?>/;
231
231
 
232
232
  const uComponentIconNameArray = fileContents.match(new RegExp(uComponentIconNamePattern, "g"));
233
233
 
@@ -64,7 +64,7 @@ function setUpTippy(el: HTMLElement, props: string | TippyProps) {
64
64
  return;
65
65
  }
66
66
 
67
- if (typeof props !== "string" && props.content && String(props.content).length) {
67
+ if (typeof props !== "string" && props && props.content && String(props.content).length) {
68
68
  tippy(el, merge({}, settings, props || {}));
69
69
  }
70
70
  }