vueless 0.0.503 → 0.0.505

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 (108) hide show
  1. package/package.json +1 -1
  2. package/plugin-vite.d.ts +43 -11
  3. package/types.ts +31 -3
  4. package/ui.button/UButton.vue +101 -240
  5. package/ui.button/storybook/Docs.mdx +2 -2
  6. package/ui.button/storybook/{stories.js → stories.ts} +25 -12
  7. package/ui.button/types.ts +121 -0
  8. package/ui.button/{useAttrs.js → useAttrs.ts} +6 -3
  9. package/ui.button-link/ULink.vue +72 -223
  10. package/ui.button-link/storybook/Docs.mdx +2 -2
  11. package/ui.button-link/storybook/{stories.js → stories.ts} +30 -17
  12. package/ui.button-link/types.ts +131 -0
  13. package/ui.button-link/{useAttrs.js → useAttrs.ts} +15 -3
  14. package/ui.button-toggle/UToggle.vue +47 -165
  15. package/ui.button-toggle/storybook/Docs.mdx +2 -2
  16. package/ui.button-toggle/storybook/{stories.js → stories.ts} +13 -5
  17. package/ui.button-toggle/types.ts +85 -0
  18. package/ui.button-toggle/useAttrs.ts +18 -0
  19. package/ui.button-toggle-item/UToggleItem.vue +59 -110
  20. package/ui.button-toggle-item/storybook/Docs.mdx +2 -2
  21. package/ui.button-toggle-item/storybook/{stories.js → stories.ts} +10 -3
  22. package/ui.button-toggle-item/types.ts +40 -0
  23. package/ui.button-toggle-item/{useAttrs.js → useAttrs.ts} +16 -4
  24. package/ui.other-dot/UDot.vue +14 -42
  25. package/ui.other-dot/storybook/Docs.mdx +2 -2
  26. package/ui.other-dot/storybook/{stories.js → stories.ts} +13 -5
  27. package/ui.other-dot/types.ts +46 -0
  28. package/ui.other-dot/useAttrs.ts +18 -0
  29. package/ui.text-alert/UAlert.vue +85 -157
  30. package/ui.text-alert/storybook/Docs.mdx +2 -2
  31. package/ui.text-alert/storybook/{stories.js → stories.ts} +17 -9
  32. package/ui.text-alert/types.ts +76 -0
  33. package/ui.text-alert/useAttrs.ts +18 -0
  34. package/ui.text-badge/UBadge.vue +1 -0
  35. package/ui.text-badge/storybook/stories.ts +1 -8
  36. package/ui.text-badge/types.ts +2 -0
  37. package/ui.text-badge/useAttrs.ts +1 -3
  38. package/ui.text-block/UText.vue +1 -0
  39. package/ui.text-block/storybook/stories.ts +1 -1
  40. package/ui.text-block/types.ts +2 -0
  41. package/ui.text-block/useAttrs.ts +1 -1
  42. package/ui.text-empty/UEmpty.vue +39 -75
  43. package/ui.text-empty/storybook/Docs.mdx +2 -2
  44. package/ui.text-empty/storybook/{stories.js → stories.ts} +14 -6
  45. package/ui.text-empty/types.ts +30 -0
  46. package/ui.text-empty/useAttrs.ts +18 -0
  47. package/ui.text-file/UFile.vue +49 -109
  48. package/ui.text-file/storybook/Docs.mdx +2 -2
  49. package/ui.text-file/storybook/{stories.js → stories.ts} +10 -3
  50. package/ui.text-file/types.ts +45 -0
  51. package/ui.text-file/useAttrs.ts +18 -0
  52. package/ui.text-files/UFiles.vue +46 -106
  53. package/ui.text-files/storybook/Docs.mdx +2 -2
  54. package/ui.text-files/storybook/{stories.js → stories.ts} +10 -3
  55. package/ui.text-files/types.ts +45 -0
  56. package/ui.text-files/useAttrs.ts +18 -0
  57. package/ui.text-header/UHeader.vue +19 -76
  58. package/ui.text-header/storybook/Docs.mdx +2 -2
  59. package/ui.text-header/storybook/{stories.js → stories.ts} +13 -5
  60. package/ui.text-header/types.ts +66 -0
  61. package/ui.text-header/useAttrs.ts +18 -0
  62. package/ui.text-money/UMoney.vue +58 -168
  63. package/ui.text-money/storybook/Docs.mdx +2 -2
  64. package/ui.text-money/storybook/{stories.js → stories.ts} +13 -5
  65. package/ui.text-money/types.ts +101 -0
  66. package/ui.text-money/useAttrs.ts +18 -0
  67. package/ui.text-money/{utilMoney.js → utilMoney.ts} +1 -1
  68. package/ui.text-notify/UNotify.vue +89 -116
  69. package/ui.text-notify/storybook/Docs.mdx +2 -2
  70. package/ui.text-notify/storybook/{stories.js → stories.ts} +12 -5
  71. package/ui.text-notify/types.ts +25 -0
  72. package/ui.text-notify/useAttrs.ts +18 -0
  73. package/ui.text-notify/utilNotify.ts +140 -0
  74. package/web-types.json +285 -135
  75. package/ui.button-toggle/useAttrs.js +0 -15
  76. package/ui.other-dot/useAttrs.js +0 -15
  77. package/ui.text-alert/useAttrs.js +0 -15
  78. package/ui.text-empty/useAttrs.js +0 -15
  79. package/ui.text-file/useAttrs.js +0 -15
  80. package/ui.text-files/useAttrs.js +0 -15
  81. package/ui.text-header/useAttrs.js +0 -15
  82. package/ui.text-money/useAttrs.js +0 -15
  83. package/ui.text-notify/useAttrs.js +0 -15
  84. package/ui.text-notify/utilNotify.js +0 -86
  85. /package/ui.button/{config.js → config.ts} +0 -0
  86. /package/ui.button/{constants.js → constants.ts} +0 -0
  87. /package/ui.button-link/{config.js → config.ts} +0 -0
  88. /package/ui.button-link/{constants.js → constants.ts} +0 -0
  89. /package/ui.button-toggle/{config.js → config.ts} +0 -0
  90. /package/ui.button-toggle/{constants.js → constants.ts} +0 -0
  91. /package/ui.button-toggle-item/{config.js → config.ts} +0 -0
  92. /package/ui.button-toggle-item/{constants.js → constants.ts} +0 -0
  93. /package/ui.other-dot/{config.js → config.ts} +0 -0
  94. /package/ui.other-dot/{constants.js → constants.ts} +0 -0
  95. /package/ui.text-alert/{config.js → config.ts} +0 -0
  96. /package/ui.text-alert/{constants.js → constants.ts} +0 -0
  97. /package/ui.text-empty/{config.js → config.ts} +0 -0
  98. /package/ui.text-empty/{constants.js → constants.ts} +0 -0
  99. /package/ui.text-file/{config.js → config.ts} +0 -0
  100. /package/ui.text-file/{constants.js → constants.ts} +0 -0
  101. /package/ui.text-files/{config.js → config.ts} +0 -0
  102. /package/ui.text-files/{constants.js → constants.ts} +0 -0
  103. /package/ui.text-header/{config.js → config.ts} +0 -0
  104. /package/ui.text-header/{constants.js → constants.ts} +0 -0
  105. /package/ui.text-money/{config.js → config.ts} +0 -0
  106. /package/ui.text-money/{constants.js → constants.ts} +0 -0
  107. /package/ui.text-notify/{config.js → config.ts} +0 -0
  108. /package/ui.text-notify/{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,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,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,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 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 { getRandomId, vuelessConfig } from "../utils/ui.ts";
2
- import { DELAY_BETWEEN_CLONES, DURATION, LOCAL_STORAGE_ID, NOTIFY_TYPE } from "./constants.js";
3
-
4
- const globalNotifyDuration = vuelessConfig.component?.UNotify?.duration;
5
- const notifyClearAllEvent = new Event("notifyClearAll");
6
-
7
- let lastMessageTime = undefined;
8
- let lastMessage = undefined;
9
-
10
- export function notify({ type, label, description, duration, ignoreDuplicates } = {}) {
11
- const notifyDuration = duration || globalNotifyDuration?.short || DURATION.short;
12
-
13
- const isSameMessage =
14
- lastMessage === description && new Date() - lastMessageTime < DELAY_BETWEEN_CLONES;
15
-
16
- if ((isSameMessage || !description) && ignoreDuplicates) {
17
- return;
18
- }
19
-
20
- lastMessageTime = new Date();
21
- lastMessage = description;
22
-
23
- const eventDetail = {
24
- type,
25
- id: getRandomId(),
26
- label: label || "",
27
- description: description || "",
28
- duration: notifyDuration,
29
- };
30
-
31
- const notifyStart = new CustomEvent("notifyStart", { detail: eventDetail });
32
- const notifyEnd = new CustomEvent("notifyEnd", { detail: eventDetail });
33
-
34
- window.dispatchEvent(notifyStart);
35
-
36
- setTimeout(() => window.dispatchEvent(notifyEnd), notifyDuration);
37
- }
38
-
39
- export function notifySuccess({ label, description, duration, ignoreDuplicates } = {}) {
40
- notify({
41
- label,
42
- description,
43
- ignoreDuplicates,
44
- type: NOTIFY_TYPE.success,
45
- duration: duration || globalNotifyDuration?.short || DURATION.short,
46
- });
47
- }
48
-
49
- export function notifyWarning({ label, description, duration, ignoreDuplicates } = {}) {
50
- notify({
51
- label,
52
- description,
53
- ignoreDuplicates,
54
- type: NOTIFY_TYPE.warning,
55
- duration: duration || globalNotifyDuration?.medium || DURATION.medium,
56
- });
57
- }
58
-
59
- export function notifyError({ label, description, duration, ignoreDuplicates } = {}) {
60
- notify({
61
- label,
62
- description,
63
- ignoreDuplicates,
64
- type: NOTIFY_TYPE.error,
65
- duration: duration || globalNotifyDuration?.long || DURATION.long,
66
- });
67
- }
68
-
69
- export function clearNotifications() {
70
- window.dispatchEvent(notifyClearAllEvent);
71
- }
72
-
73
- export function setDelayedNotify(settings) {
74
- localStorage.setItem(LOCAL_STORAGE_ID, JSON.stringify(settings));
75
- }
76
-
77
- export function getDelayedNotify() {
78
- const notifyData = JSON.parse(localStorage.getItem(LOCAL_STORAGE_ID));
79
-
80
- clearNotifications();
81
-
82
- if (notifyData) {
83
- notify(notifyData);
84
- localStorage.removeItem(LOCAL_STORAGE_ID);
85
- }
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes