vueless 0.0.513 → 0.0.515

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 (105) hide show
  1. package/package.json +1 -1
  2. package/types.ts +26 -0
  3. package/ui.button-link/types.ts +3 -1
  4. package/ui.button-link/useAttrs.ts +2 -2
  5. package/ui.container-accordion/UAccordion.vue +33 -69
  6. package/ui.container-accordion/storybook/Docs.mdx +2 -2
  7. package/ui.container-accordion/storybook/{stories.js → stories.ts} +10 -3
  8. package/ui.container-accordion/types.ts +35 -0
  9. package/ui.container-accordion/{useAttrs.js → useAttrs.ts} +14 -3
  10. package/ui.container-card/UCard.vue +43 -71
  11. package/ui.container-card/storybook/Docs.mdx +2 -2
  12. package/ui.container-card/storybook/{stories.js → stories.ts} +9 -2
  13. package/ui.container-card/types.ts +25 -0
  14. package/ui.container-card/useAttrs.ts +18 -0
  15. package/ui.container-col/UCol.vue +21 -79
  16. package/ui.container-col/storybook/Docs.mdx +2 -2
  17. package/ui.container-col/storybook/{stories.js → stories.ts} +9 -2
  18. package/ui.container-col/types.ts +54 -0
  19. package/ui.container-col/useAttrs.ts +18 -0
  20. package/ui.container-divider/UDivider.vue +22 -94
  21. package/ui.container-divider/storybook/Docs.mdx +2 -2
  22. package/ui.container-divider/storybook/{stories.js → stories.ts} +13 -5
  23. package/ui.container-divider/types.ts +55 -0
  24. package/ui.container-divider/useAttrs.ts +23 -0
  25. package/ui.container-group/UGroup.vue +31 -73
  26. package/ui.container-group/storybook/Docs.mdx +2 -2
  27. package/ui.container-group/storybook/{stories.js → stories.ts} +9 -2
  28. package/ui.container-group/types.ts +36 -0
  29. package/ui.container-group/useAttrs.ts +18 -0
  30. package/ui.container-modal/UModal.vue +122 -232
  31. package/ui.container-modal/storybook/Docs.mdx +2 -2
  32. package/ui.container-modal/storybook/{stories.js → stories.ts} +16 -6
  33. package/ui.container-modal/types.ts +82 -0
  34. package/ui.container-modal/useAttrs.ts +22 -0
  35. package/ui.container-modal-confirm/UModalConfirm.vue +82 -199
  36. package/ui.container-modal-confirm/storybook/Docs.mdx +2 -2
  37. package/ui.container-modal-confirm/storybook/{stories.js → stories.ts} +14 -3
  38. package/ui.container-modal-confirm/types.ts +106 -0
  39. package/ui.container-modal-confirm/useAttrs.ts +18 -0
  40. package/ui.container-page/UPage.vue +79 -153
  41. package/ui.container-page/storybook/Docs.mdx +2 -2
  42. package/ui.container-page/storybook/{stories.js → stories.ts} +9 -2
  43. package/ui.container-page/types.ts +57 -0
  44. package/ui.container-page/{useAttrs.js → useAttrs.ts} +14 -3
  45. package/ui.container-row/URow.vue +22 -87
  46. package/ui.container-row/storybook/Docs.mdx +2 -2
  47. package/ui.container-row/storybook/{stories.js → stories.ts} +11 -3
  48. package/ui.container-row/types.ts +59 -0
  49. package/ui.container-row/useAttrs.ts +18 -0
  50. package/ui.dropdown-badge/UDropdownBadge.vue +70 -167
  51. package/ui.dropdown-badge/storybook/Docs.mdx +2 -2
  52. package/ui.dropdown-badge/storybook/{stories.js → stories.ts} +16 -5
  53. package/ui.dropdown-badge/types.ts +93 -0
  54. package/ui.dropdown-badge/{useAttrs.js → useAttrs.ts} +13 -2
  55. package/ui.dropdown-button/UDropdownButton.vue +85 -203
  56. package/ui.dropdown-button/storybook/Docs.mdx +2 -2
  57. package/ui.dropdown-button/storybook/{stories.js → stories.ts} +25 -11
  58. package/ui.dropdown-button/types.ts +108 -0
  59. package/ui.dropdown-button/{useAttrs.js → useAttrs.ts} +14 -3
  60. package/ui.dropdown-link/UDropdownLink.vue +84 -194
  61. package/ui.dropdown-link/storybook/Docs.mdx +2 -2
  62. package/ui.dropdown-link/storybook/{stories.js → stories.ts} +20 -9
  63. package/ui.dropdown-link/types.ts +103 -0
  64. package/ui.dropdown-link/{useAttrs.js → useAttrs.ts} +14 -3
  65. package/ui.dropdown-list/UDropdownList.vue +112 -177
  66. package/ui.dropdown-list/storybook/Docs.mdx +2 -2
  67. package/ui.dropdown-list/storybook/{stories.js → stories.ts} +23 -7
  68. package/ui.dropdown-list/types.ts +52 -0
  69. package/ui.dropdown-list/{useAttrs.js → useAttrs.ts} +6 -3
  70. package/ui.dropdown-list/usePointer.ts +111 -0
  71. package/web-types.json +298 -146
  72. package/ui.container-card/useAttrs.js +0 -15
  73. package/ui.container-col/useAttrs.js +0 -15
  74. package/ui.container-divider/useAttrs.js +0 -20
  75. package/ui.container-group/useAttrs.js +0 -15
  76. package/ui.container-modal/useAttrs.js +0 -19
  77. package/ui.container-modal-confirm/useAttrs.js +0 -15
  78. package/ui.container-row/useAttrs.js +0 -15
  79. package/ui.dropdown-list/usePointer.js +0 -86
  80. /package/ui.container-accordion/{config.js → config.ts} +0 -0
  81. /package/ui.container-accordion/{constants.js → constants.ts} +0 -0
  82. /package/ui.container-card/{config.js → config.ts} +0 -0
  83. /package/ui.container-card/{constants.js → constants.ts} +0 -0
  84. /package/ui.container-col/{config.js → config.ts} +0 -0
  85. /package/ui.container-col/{constants.js → constants.ts} +0 -0
  86. /package/ui.container-divider/{config.js → config.ts} +0 -0
  87. /package/ui.container-divider/{constants.js → constants.ts} +0 -0
  88. /package/ui.container-group/{config.js → config.ts} +0 -0
  89. /package/ui.container-group/{constants.js → constants.ts} +0 -0
  90. /package/ui.container-modal/{config.js → config.ts} +0 -0
  91. /package/ui.container-modal/{constants.js → constants.ts} +0 -0
  92. /package/ui.container-modal-confirm/{config.js → config.ts} +0 -0
  93. /package/ui.container-modal-confirm/{constants.js → constants.ts} +0 -0
  94. /package/ui.container-page/{config.js → config.ts} +0 -0
  95. /package/ui.container-page/{constants.js → constants.ts} +0 -0
  96. /package/ui.container-row/{config.js → config.ts} +0 -0
  97. /package/ui.container-row/{constants.js → constants.ts} +0 -0
  98. /package/ui.dropdown-badge/{config.js → config.ts} +0 -0
  99. /package/ui.dropdown-badge/{constants.js → constants.ts} +0 -0
  100. /package/ui.dropdown-button/{config.js → config.ts} +0 -0
  101. /package/ui.dropdown-button/{constants.js → constants.ts} +0 -0
  102. /package/ui.dropdown-link/{config.js → config.ts} +0 -0
  103. /package/ui.dropdown-link/{constants.js → constants.ts} +0 -0
  104. /package/ui.dropdown-list/{config.js → config.ts} +0 -0
  105. /package/ui.dropdown-list/{constants.js → constants.ts} +0 -0
@@ -1,15 +0,0 @@
1
- import useUI from "../composables/useUI.ts";
2
-
3
- import defaultConfig from "./config.js";
4
-
5
- export default function useAttrs(props) {
6
- const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
7
-
8
- const keysAttrs = getKeysAttrs();
9
-
10
- return {
11
- config,
12
- ...keysAttrs,
13
- hasSlotContent,
14
- };
15
- }
@@ -1,15 +0,0 @@
1
- import useUI from "../composables/useUI.ts";
2
-
3
- import defaultConfig from "./config.js";
4
-
5
- export default function useAttrs(props) {
6
- const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
7
-
8
- const keysAttrs = getKeysAttrs();
9
-
10
- return {
11
- config,
12
- ...keysAttrs,
13
- hasSlotContent,
14
- };
15
- }
@@ -1,20 +0,0 @@
1
- import { computed } from "vue";
2
- import useUI from "../composables/useUI.ts";
3
-
4
- import defaultConfig from "./config.js";
5
-
6
- export default function useAttrs(props) {
7
- const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
8
-
9
- const mutatedProps = computed(() => ({
10
- label: Boolean(props.label),
11
- }));
12
-
13
- const keysAttrs = getKeysAttrs(mutatedProps);
14
-
15
- return {
16
- config,
17
- ...keysAttrs,
18
- hasSlotContent,
19
- };
20
- }
@@ -1,15 +0,0 @@
1
- import useUI from "../composables/useUI.ts";
2
-
3
- import defaultConfig from "./config.js";
4
-
5
- export default function useAttrs(props) {
6
- const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
7
-
8
- const keysAttrs = getKeysAttrs();
9
-
10
- return {
11
- config,
12
- ...keysAttrs,
13
- hasSlotContent,
14
- };
15
- }
@@ -1,19 +0,0 @@
1
- import useUI from "../composables/useUI.ts";
2
-
3
- import defaultConfig from "./config.js";
4
-
5
- export default function useAttrs(props) {
6
- const { config, getKeysAttrs, hasSlotContent } = useUI(
7
- defaultConfig,
8
- () => props.config,
9
- "wrapper",
10
- );
11
-
12
- const keysAttrs = getKeysAttrs();
13
-
14
- return {
15
- config,
16
- ...keysAttrs,
17
- hasSlotContent,
18
- };
19
- }
@@ -1,15 +0,0 @@
1
- import useUI from "../composables/useUI.ts";
2
-
3
- import defaultConfig from "./config.js";
4
-
5
- export default function useAttrs(props) {
6
- const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
7
-
8
- const keysAttrs = getKeysAttrs();
9
-
10
- return {
11
- config,
12
- ...keysAttrs,
13
- hasSlotContent,
14
- };
15
- }
@@ -1,15 +0,0 @@
1
- import useUI from "../composables/useUI.ts";
2
-
3
- import defaultConfig from "./config.js";
4
-
5
- export default function useAttrs(props) {
6
- const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
7
-
8
- const keysAttrs = getKeysAttrs();
9
-
10
- return {
11
- config,
12
- ...keysAttrs,
13
- hasSlotContent,
14
- };
15
- }
@@ -1,86 +0,0 @@
1
- import { ref, computed, toValue } from "vue";
2
-
3
- export default function usePointer(options, optionElements, listWrapperElement) {
4
- const pointer = ref(null);
5
- const pointerDirty = ref(false);
6
-
7
- const activeElementHeight = computed(() => {
8
- const isGroupLabel = toValue(optionElements).at(pointer.value).dataset.groupLabel;
9
- const groupIndex = 2;
10
-
11
- if (isGroupLabel) {
12
- return toValue(optionElements)
13
- .at(pointer.value - groupIndex)
14
- .getBoundingClientRect().height;
15
- }
16
-
17
- return toValue(optionElements).at(pointer.value).getBoundingClientRect().height;
18
- });
19
-
20
- const pointerPosition = computed(() => {
21
- return pointer.value * activeElementHeight.value || 0;
22
- });
23
-
24
- function scrollWrapperToElement() {
25
- const visibleElements =
26
- listWrapperElement.value.getBoundingClientRect().height / activeElementHeight.value;
27
- const currentElement = visibleElements - 1;
28
- const currentPointerPosition =
29
- pointerPosition.value - currentElement * activeElementHeight.value;
30
-
31
- if (listWrapperElement.value.scrollTop <= currentPointerPosition) {
32
- listWrapperElement.value.scrollTop = currentPointerPosition;
33
- }
34
- }
35
-
36
- function pointerForward() {
37
- if (pointer.value < options.length - 1) {
38
- pointer.value++;
39
-
40
- const isGroup = options[pointer.value].isSubGroup || options[pointer.value].groupLabel;
41
-
42
- if (listWrapperElement) scrollWrapperToElement();
43
-
44
- if (options[pointer.value] && isGroup) {
45
- pointerForward();
46
- }
47
- }
48
-
49
- pointerDirty.value = true;
50
- }
51
-
52
- function pointerBackward() {
53
- if (pointer.value > 0) {
54
- pointer.value--;
55
-
56
- const isGroup = options[pointer.value].isSubGroup || options[pointer.value].groupLabel;
57
-
58
- if (listWrapperElement && listWrapperElement.value.scrollTop >= pointerPosition.value) {
59
- listWrapperElement.value.scrollTop = pointerPosition.value;
60
- }
61
-
62
- if (options[pointer.value] && isGroup) {
63
- pointerBackward();
64
- }
65
- } else {
66
- if (options[pointer.value] && options[0].groupLabel) {
67
- pointerForward();
68
- }
69
- }
70
-
71
- pointerDirty.value = true;
72
- }
73
-
74
- function pointerSet(index) {
75
- pointer.value = index;
76
- pointerDirty.value = true;
77
- }
78
-
79
- function pointerReset() {
80
- pointer.value = 0;
81
-
82
- if (listWrapperElement) listWrapperElement.value.scrollTop = 0;
83
- }
84
-
85
- return { pointer, pointerDirty, pointerSet, pointerReset, pointerBackward, pointerForward };
86
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes