vueless 0.0.503 → 0.0.504

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 (79) hide show
  1. package/package.json +1 -1
  2. package/plugin-vite.d.ts +43 -11
  3. package/types.ts +25 -3
  4. package/ui.other-dot/UDot.vue +14 -42
  5. package/ui.other-dot/storybook/Docs.mdx +2 -2
  6. package/ui.other-dot/storybook/{stories.js → stories.ts} +13 -5
  7. package/ui.other-dot/types.ts +46 -0
  8. package/ui.other-dot/useAttrs.ts +18 -0
  9. package/ui.text-alert/UAlert.vue +85 -157
  10. package/ui.text-alert/storybook/Docs.mdx +2 -2
  11. package/ui.text-alert/storybook/{stories.js → stories.ts} +17 -9
  12. package/ui.text-alert/types.ts +76 -0
  13. package/ui.text-alert/useAttrs.ts +18 -0
  14. package/ui.text-badge/UBadge.vue +1 -0
  15. package/ui.text-badge/storybook/stories.ts +1 -8
  16. package/ui.text-badge/types.ts +2 -0
  17. package/ui.text-badge/useAttrs.ts +1 -3
  18. package/ui.text-block/UText.vue +1 -0
  19. package/ui.text-block/storybook/stories.ts +1 -1
  20. package/ui.text-block/types.ts +2 -0
  21. package/ui.text-block/useAttrs.ts +1 -1
  22. package/ui.text-empty/UEmpty.vue +39 -75
  23. package/ui.text-empty/storybook/Docs.mdx +2 -2
  24. package/ui.text-empty/storybook/{stories.js → stories.ts} +14 -6
  25. package/ui.text-empty/types.ts +30 -0
  26. package/ui.text-empty/useAttrs.ts +18 -0
  27. package/ui.text-file/UFile.vue +49 -109
  28. package/ui.text-file/storybook/Docs.mdx +2 -2
  29. package/ui.text-file/storybook/{stories.js → stories.ts} +10 -3
  30. package/ui.text-file/types.ts +45 -0
  31. package/ui.text-file/useAttrs.ts +18 -0
  32. package/ui.text-files/UFiles.vue +46 -106
  33. package/ui.text-files/storybook/Docs.mdx +2 -2
  34. package/ui.text-files/storybook/{stories.js → stories.ts} +10 -3
  35. package/ui.text-files/types.ts +45 -0
  36. package/ui.text-files/useAttrs.ts +18 -0
  37. package/ui.text-header/UHeader.vue +19 -76
  38. package/ui.text-header/storybook/Docs.mdx +2 -2
  39. package/ui.text-header/storybook/{stories.js → stories.ts} +13 -5
  40. package/ui.text-header/types.ts +66 -0
  41. package/ui.text-header/useAttrs.ts +18 -0
  42. package/ui.text-money/UMoney.vue +58 -168
  43. package/ui.text-money/storybook/Docs.mdx +2 -2
  44. package/ui.text-money/storybook/{stories.js → stories.ts} +13 -5
  45. package/ui.text-money/types.ts +101 -0
  46. package/ui.text-money/useAttrs.ts +18 -0
  47. package/ui.text-money/{utilMoney.js → utilMoney.ts} +1 -1
  48. package/ui.text-notify/UNotify.vue +89 -116
  49. package/ui.text-notify/storybook/Docs.mdx +2 -2
  50. package/ui.text-notify/storybook/{stories.js → stories.ts} +12 -5
  51. package/ui.text-notify/types.ts +25 -0
  52. package/ui.text-notify/useAttrs.ts +18 -0
  53. package/ui.text-notify/utilNotify.ts +140 -0
  54. package/web-types.json +152 -77
  55. package/ui.other-dot/useAttrs.js +0 -15
  56. package/ui.text-alert/useAttrs.js +0 -15
  57. package/ui.text-empty/useAttrs.js +0 -15
  58. package/ui.text-file/useAttrs.js +0 -15
  59. package/ui.text-files/useAttrs.js +0 -15
  60. package/ui.text-header/useAttrs.js +0 -15
  61. package/ui.text-money/useAttrs.js +0 -15
  62. package/ui.text-notify/useAttrs.js +0 -15
  63. package/ui.text-notify/utilNotify.js +0 -86
  64. /package/ui.other-dot/{config.js → config.ts} +0 -0
  65. /package/ui.other-dot/{constants.js → constants.ts} +0 -0
  66. /package/ui.text-alert/{config.js → config.ts} +0 -0
  67. /package/ui.text-alert/{constants.js → constants.ts} +0 -0
  68. /package/ui.text-empty/{config.js → config.ts} +0 -0
  69. /package/ui.text-empty/{constants.js → constants.ts} +0 -0
  70. /package/ui.text-file/{config.js → config.ts} +0 -0
  71. /package/ui.text-file/{constants.js → constants.ts} +0 -0
  72. /package/ui.text-files/{config.js → config.ts} +0 -0
  73. /package/ui.text-files/{constants.js → constants.ts} +0 -0
  74. /package/ui.text-header/{config.js → config.ts} +0 -0
  75. /package/ui.text-header/{constants.js → constants.ts} +0 -0
  76. /package/ui.text-money/{config.js → config.ts} +0 -0
  77. /package/ui.text-money/{constants.js → constants.ts} +0 -0
  78. /package/ui.text-notify/{config.js → config.ts} +0 -0
  79. /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 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