@witchcraft/ui 0.3.1 → 0.3.3

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 (96) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/assets/animations.css +1 -0
  3. package/dist/runtime/assets/base.css +1 -1
  4. package/dist/runtime/assets/tailwind.css +1 -1
  5. package/dist/runtime/components/LibButton/LibButton.d.vue.ts +1 -1
  6. package/dist/runtime/components/LibButton/LibButton.vue.d.ts +1 -1
  7. package/dist/runtime/components/LibCheckbox/LibCheckbox.d.vue.ts +1 -1
  8. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue.d.ts +1 -1
  9. package/dist/runtime/components/LibColorInput/LibColorInput.d.vue.ts +2 -2
  10. package/dist/runtime/components/LibColorInput/LibColorInput.vue.d.ts +2 -2
  11. package/dist/runtime/components/LibColorPicker/LibColorPicker.d.vue.ts +2 -2
  12. package/dist/runtime/components/LibColorPicker/LibColorPicker.vue.d.ts +2 -2
  13. package/dist/runtime/components/LibColorPicker/utils/safeConvertToHsva.d.ts +1 -1
  14. package/dist/runtime/components/LibColorPicker/utils/safeConvertToRgba.d.ts +1 -1
  15. package/dist/runtime/components/LibColorPicker/utils/toLowPrecisionRgbaString.d.ts +1 -1
  16. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.d.vue.ts +1 -1
  17. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue.d.ts +1 -1
  18. package/dist/runtime/components/LibDatePicker/LibDatePicker.d.vue.ts +1 -1
  19. package/dist/runtime/components/LibDatePicker/LibDatePicker.vue.d.ts +1 -1
  20. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.d.vue.ts +1 -1
  21. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue.d.ts +1 -1
  22. package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.d.vue.ts +1 -1
  23. package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue.d.ts +1 -1
  24. package/dist/runtime/components/LibFileInput/LibFileInput.d.vue.ts +2 -2
  25. package/dist/runtime/components/LibFileInput/LibFileInput.vue.d.ts +2 -2
  26. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.d.vue.ts +1 -1
  27. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue.d.ts +1 -1
  28. package/dist/runtime/components/LibLabel/LibLabel.d.vue.ts +1 -1
  29. package/dist/runtime/components/LibLabel/LibLabel.vue.d.ts +1 -1
  30. package/dist/runtime/components/LibMultiValues/LibMultiValues.d.vue.ts +1 -1
  31. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue.d.ts +1 -1
  32. package/dist/runtime/components/LibNotifications/LibNotification.d.vue.ts +17 -4
  33. package/dist/runtime/components/LibNotifications/LibNotification.vue +84 -25
  34. package/dist/runtime/components/LibNotifications/LibNotification.vue.d.ts +17 -4
  35. package/dist/runtime/components/LibNotifications/LibNotifications.d.vue.ts +2 -2
  36. package/dist/runtime/components/LibNotifications/LibNotifications.vue +110 -87
  37. package/dist/runtime/components/LibNotifications/LibNotifications.vue.d.ts +2 -2
  38. package/dist/runtime/components/LibPagination/LibPagination.d.vue.ts +1 -1
  39. package/dist/runtime/components/LibPagination/LibPagination.vue.d.ts +1 -1
  40. package/dist/runtime/components/LibPalette/LibPalette.d.vue.ts +1 -1
  41. package/dist/runtime/components/LibPalette/LibPalette.vue.d.ts +1 -1
  42. package/dist/runtime/components/LibPopup/LibPopup.d.vue.ts +4 -4
  43. package/dist/runtime/components/LibPopup/LibPopup.vue +2 -6
  44. package/dist/runtime/components/LibPopup/LibPopup.vue.d.ts +4 -4
  45. package/dist/runtime/components/LibProgressBar/LibProgressBar.d.vue.ts +2 -1
  46. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue +1 -1
  47. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue.d.ts +2 -1
  48. package/dist/runtime/components/LibRecorder/LibRecorder.d.vue.ts +1 -1
  49. package/dist/runtime/components/LibRecorder/LibRecorder.vue +1 -1
  50. package/dist/runtime/components/LibRecorder/LibRecorder.vue.d.ts +1 -1
  51. package/dist/runtime/components/LibRoot/LibRoot.d.vue.ts +2 -2
  52. package/dist/runtime/components/LibRoot/LibRoot.vue.d.ts +2 -2
  53. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.d.vue.ts +1 -1
  54. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue.d.ts +1 -1
  55. package/dist/runtime/components/LibSuggestions/LibSuggestions.d.vue.ts +1 -1
  56. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue.d.ts +1 -1
  57. package/dist/runtime/components/LibTable/LibTable.d.vue.ts +2 -2
  58. package/dist/runtime/components/LibTable/LibTable.vue.d.ts +2 -2
  59. package/dist/runtime/components/Template/TemplateStory.d.ts +1 -1
  60. package/dist/runtime/components/index.d.ts +20 -20
  61. package/dist/runtime/components/shared/props.d.ts +1 -1
  62. package/dist/runtime/composables/index.d.ts +17 -15
  63. package/dist/runtime/composables/index.js +2 -0
  64. package/dist/runtime/composables/useDragWithThreshold.d.ts +1 -1
  65. package/dist/runtime/composables/useInjectedDarkMode.d.ts +1 -1
  66. package/dist/runtime/composables/useInjectedI18n.d.ts +1 -1
  67. package/dist/runtime/composables/useInjectedLocale.d.ts +1 -1
  68. package/dist/runtime/composables/useNotificationHandler.d.ts +1 -1
  69. package/dist/runtime/composables/useScrollNearContainerEdges.d.ts +1 -1
  70. package/dist/runtime/composables/useSetupDarkMode.d.ts +1 -1
  71. package/dist/runtime/composables/useSlotVars.d.ts +32 -0
  72. package/dist/runtime/composables/useSlotVars.js +12 -0
  73. package/dist/runtime/composables/useSuggestions.d.ts +1 -1
  74. package/dist/runtime/directives/index.d.ts +4 -4
  75. package/dist/runtime/globalResizeObserver.d.ts +1 -1
  76. package/dist/runtime/helpers/NotificationHandler.d.ts +11 -4
  77. package/dist/runtime/helpers/NotificationHandler.js +34 -16
  78. package/dist/runtime/helpers/index.d.ts +10 -10
  79. package/dist/runtime/helpers/resizeObserverWrapper.d.ts +1 -1
  80. package/dist/runtime/injectionKeys.d.ts +2 -2
  81. package/dist/runtime/main.lib.d.ts +10 -10
  82. package/dist/runtime/tailwind/index.d.ts +1 -1
  83. package/package.json +2 -2
  84. package/src/runtime/assets/animations.css +75 -0
  85. package/src/runtime/assets/base.css +0 -27
  86. package/src/runtime/assets/tailwind.css +1 -0
  87. package/src/runtime/components/LibColorPicker/LibColorPicker.stories.ts +1 -1
  88. package/src/runtime/components/LibNotifications/LibNotification.vue +86 -25
  89. package/src/runtime/components/LibNotifications/LibNotifications.stories.ts +4 -4
  90. package/src/runtime/components/LibNotifications/LibNotifications.vue +112 -90
  91. package/src/runtime/components/LibPopup/LibPopup.vue +2 -6
  92. package/src/runtime/components/LibProgressBar/LibProgressBar.vue +2 -1
  93. package/src/runtime/components/LibRecorder/LibRecorder.vue +1 -1
  94. package/src/runtime/composables/index.ts +2 -0
  95. package/src/runtime/composables/useSlotVars.ts +41 -0
  96. package/src/runtime/helpers/NotificationHandler.ts +44 -22
@@ -1,67 +1,129 @@
1
1
  <template>
2
+ <!-- using custom toasts, reka-ui toasts still have issues, like like of control over pause, and I can't get the leave event to animate or transition with vue transitions to work -->
2
3
  <TransitionGroup
3
4
  name="list"
4
5
  tag="div"
5
- :class="twMerge(`notifications
6
- absolute
7
- z-50
8
- inset-y-0 right-0
9
- w-1/3
10
- min-w-[300px]
11
- pointer-events-none
12
- overflow-hidden
13
- flex flex-col
14
- `, $attrs.class)"
6
+ :class="twMerge(`
7
+ notifications
8
+ [--notification-width:300px]
9
+ fixed
10
+ top-0
11
+ z-50
12
+ right-[calc(var(--notification-width)*-1)]
13
+ py-2
14
+ w-[calc(var(--spacing)*2+var(--notification-width)*2)]
15
+ [&_.notification]:w-[var(--notification-width)]
16
+ max-h-[100dvh]
17
+ flex
18
+ flex-col
19
+ [&_.notification]:shrink-0
20
+ gap-1
21
+ list-none
22
+ outline-none
23
+ overflow-y-auto
24
+ overflow-x-clip
25
+ scrollbar-hidden
26
+ `, $attrs.class)"
15
27
  v-bind="{ ...$attrs, class: void 0 }"
16
28
  >
17
29
  <lib-notification
18
- class="pointer-events-auto"
19
30
  :handler="handler"
20
31
  tabindex="0"
21
32
  :notification="notification"
33
+ class="overflow-hidden"
22
34
  v-for="notification of notifications"
23
35
  :key="notification.id"
24
- />
25
- </TransitionGroup>
26
- <Transition>
27
- <div
28
- v-show="topNotifications.length > 0"
29
- :class="twMerge(`notifications--none`, $attrs.class)"
30
- />
31
- </Transition>
32
- <Transition>
33
- <dialog
34
- v-show="topNotifications.length > 0"
35
- :id="id"
36
- :class="twMerge(`notifications-modal
37
- bg-transparent
38
- p-0
39
- backdrop:bg-black/50
40
- backdrop:p-5
41
- `, $attrs.class)"
42
- ref="dialogEl"
43
- @click.self.prevent="topNotifications[0] && NotificationHandler.dismiss(topNotifications[0])"
36
+ @pointerenter="notification.timeout && !notification.isPaused && handler.pause(notification)"
37
+ @blur="notification.timeout && notification.isPaused && handler.resume(notification)"
44
38
  >
45
- <form>
39
+ <template #top>
40
+ <LibProgressBar
41
+ v-if="notification.timeout !== void 0"
42
+ class="
43
+ w-full
44
+ h-1
45
+ before:duration-[10ms]
46
+ -mt-1
47
+ -mx-[calc(var(--spacing)*2+2px)]
48
+ rounded-none
49
+ "
50
+ :progress="100 - (notification.isPaused ? notification._timer.elapsedBeforePause : notification._timer.elapsedBeforePause + (time - notification.startTime)) / notification.timeout * 100"
51
+ />
52
+ </template>
53
+ </lib-notification>
54
+ </TransitionGroup>
55
+ <!-- we don't need to worry about the user accidentally closing a non-closable dialog as keeping open=true (which the handler handles when the component tries to close) is enough to keep it open without issues -->
56
+ <AlertDialogRoot
57
+ :open="topNotifications.length > 0 && topNotifications[0] !== void 0"
58
+ @update:open="topNotifications[0] && NotificationHandler.dismiss(topNotifications[0])"
59
+ >
60
+ <AlertDialogPortal :to="'#root'">
61
+ <AlertDialogOverlay
62
+ class="
63
+ fixed inset-0 z-30
64
+ bg-neutral-950/20
65
+ data-[state=open]:animate-overlayShow
66
+ "
67
+ />
68
+ <AlertDialogContent
69
+ class="
70
+ data-[state=open]:animate-contentShow
71
+ fixed
72
+ top-[50%]
73
+ left-[50%]
74
+ translate-x-[-50%]
75
+ translate-y-[-50%]
76
+ max-h-[80dvh]
77
+ max-w-[700px]
78
+ z-100
79
+ "
80
+ >
46
81
  <lib-notification
47
- v-if="topNotifications.length > 0 && topNotifications[0]"
82
+ class="
83
+ top-notification
84
+ text-md
85
+ gap-2
86
+ p-2
87
+ [&_.notification--button]:p-2
88
+ [&_.notification--button]:py-1
89
+ [&_.notification--header]:text-lg
90
+ [&_.notification--message]:py-3
91
+ "
48
92
  :handler="handler"
49
- class="top-notification"
50
93
  :notification="topNotifications[0]"
51
94
  ref="topNotificationComp"
52
- />
53
- </form>
54
- </dialog>
55
- </Transition>
95
+ >
96
+ <template #title="slotProps">
97
+ <AlertDialogTitle v-bind="slotProps">
98
+ {{ slotProps.title }}
99
+ </AlertDialogTitle>
100
+ </template>
101
+ <template #message="slotProps">
102
+ <AlertDialogDescription v-bind="slotProps">
103
+ {{ slotProps.message }}
104
+ </AlertDialogDescription>
105
+ </template>
106
+ </lib-notification>
107
+ </AlertDialogContent>
108
+ </AlertDialogPortal>
109
+ </AlertDialogRoot>
56
110
  </template>
57
111
 
58
112
  <script setup>
59
- import { removeIfIn } from "@alanscodelog/utils/removeIfIn";
60
- import { nextTick, onBeforeUnmount, ref, shallowReactive } from "vue";
113
+ import {
114
+ AlertDialogContent,
115
+ AlertDialogDescription,
116
+ AlertDialogOverlay,
117
+ AlertDialogPortal,
118
+ AlertDialogRoot,
119
+ AlertDialogTitle
120
+ } from "reka-ui";
121
+ import { computed, ref } from "vue";
61
122
  import LibNotification from "./LibNotification.vue";
62
123
  import { useNotificationHandler } from "../../composables/useNotificationHandler.js";
63
124
  import { NotificationHandler } from "../../helpers/NotificationHandler.js";
64
125
  import { twMerge } from "../../utils/twMerge.js";
126
+ import LibProgressBar from "../LibProgressBar/LibProgressBar.vue";
65
127
  defineOptions({
66
128
  name: "LibNotifications",
67
129
  inheritAttrs: false
@@ -70,54 +132,15 @@ const props = defineProps({
70
132
  id: { type: String, required: false },
71
133
  handler: { type: Object, required: false }
72
134
  });
73
- const dialogEl = ref(null);
74
- const isOpen = ref(false);
75
- const notifications = shallowReactive([]);
76
- const topNotifications = shallowReactive([]);
77
- const open = () => {
78
- if (!isOpen.value) {
79
- void nextTick(() => {
80
- dialogEl.value.showModal();
81
- isOpen.value = true;
82
- });
83
- }
84
- };
85
- const close = () => {
86
- if (isOpen.value && topNotifications.length === 0) {
87
- dialogEl.value.close();
88
- isOpen.value = false;
89
- }
90
- };
91
- const addNotification = (entry) => {
92
- if (entry.resolution === void 0) {
93
- if (entry.requiresAction) {
94
- topNotifications.push(entry);
95
- open();
96
- entry.promise.then(() => {
97
- removeIfIn(topNotifications, entry);
98
- close();
99
- });
100
- } else {
101
- notifications.splice(0, 0, entry);
102
- entry.promise.then(() => {
103
- removeIfIn(notifications, entry);
104
- });
105
- }
106
- }
107
- };
108
- const notificationListener = (entry, type) => {
109
- if (type === "added") {
110
- addNotification(entry);
111
- }
112
- };
135
+ const topNotifications = computed(() => handler.queue.filter((entry) => entry.requiresAction).reverse());
136
+ const notifications = computed(() => handler.queue.filter((entry) => !entry.requiresAction));
137
+ const time = ref(Date.now());
138
+ setInterval(() => {
139
+ requestAnimationFrame(() => {
140
+ time.value = Date.now();
141
+ });
142
+ }, 50);
113
143
  const handler = props.handler ?? useNotificationHandler();
114
- handler.addNotificationListener(notificationListener);
115
- for (const entry of handler.queue) {
116
- addNotification(entry);
117
- }
118
- onBeforeUnmount(() => {
119
- handler.removeNotificationListener(notificationListener);
120
- });
121
144
  </script>
122
145
 
123
146
  <script>
@@ -1,5 +1,5 @@
1
- import { NotificationHandler } from "../../helpers/NotificationHandler.js.js";
2
- import type { LinkableByIdProps, TailwindClassProp } from "../shared/props.js.js";
1
+ import { NotificationHandler } from "../../helpers/NotificationHandler.js";
2
+ import type { LinkableByIdProps, TailwindClassProp } from "../shared/props.js";
3
3
  import type { HTMLAttributes } from "vue";
4
4
  type RealProps = LinkableByIdProps & {
5
5
  /** If not provided, uses the global handler (this requires useNotificationHandler be called and configured). */
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from "vue";
2
- import type { TailwindClassProp } from "../shared/props.js.js";
2
+ import type { TailwindClassProp } from "../shared/props.js";
3
3
  /**
4
4
  * Pagination component.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from "vue";
2
- import type { TailwindClassProp } from "../shared/props.js.js";
2
+ import type { TailwindClassProp } from "../shared/props.js";
3
3
  /**
4
4
  * Pagination component.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import type { Theme } from "metamorphosis";
2
- import type { BaseInteractiveProps, LinkableByIdProps } from "../shared/props.js.js";
2
+ import type { BaseInteractiveProps, LinkableByIdProps } from "../shared/props.js";
3
3
  declare const _default: import("vue").DefineComponent<LinkableByIdProps & BaseInteractiveProps & {
4
4
  theme?: Theme;
5
5
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkableByIdProps & BaseInteractiveProps & {
@@ -1,5 +1,5 @@
1
1
  import type { Theme } from "metamorphosis";
2
- import type { BaseInteractiveProps, LinkableByIdProps } from "../shared/props.js.js";
2
+ import type { BaseInteractiveProps, LinkableByIdProps } from "../shared/props.js";
3
3
  declare const _default: import("vue").DefineComponent<LinkableByIdProps & BaseInteractiveProps & {
4
4
  theme?: Theme;
5
5
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkableByIdProps & BaseInteractiveProps & {
@@ -1,6 +1,6 @@
1
1
  import { type HTMLAttributes } from "vue";
2
- import { type LinkableByIdProps, type TailwindClassProp, type PopupProps } from "../shared/props.js.js";
3
- import type { IPopupReference } from "../../types/index.js.js";
2
+ import { type LinkableByIdProps, type TailwindClassProp, type PopupProps } from "../shared/props.js";
3
+ import type { IPopupReference } from "../../types/index.js";
4
4
  type RealProps = LinkableByIdProps & PopupProps;
5
5
  interface Props extends
6
6
  /** @vue-ignore */
@@ -25,8 +25,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props & {
25
25
  canClose: boolean;
26
26
  useDialogForBackdrop: false;
27
27
  useBackdrop: boolean;
28
- preferredHorizontal: ("center" | "right" | "left" | "either" | "center-screen" | "right-most" | "left-most" | "center-most")[] | import("../../main.lib.js.js").PopupPositioner;
29
- preferredVertical: ("top" | "bottom" | "center" | "either" | "center-screen" | "top-most" | "bottom-most" | "center-most")[] | import("../../main.lib.js.js").PopupPositioner;
28
+ preferredHorizontal: ("center" | "right" | "left" | "either" | "center-screen" | "right-most" | "left-most" | "center-most")[] | import("../../main.lib.js").PopupPositioner;
29
+ preferredVertical: ("top" | "bottom" | "center" | "either" | "center-screen" | "top-most" | "bottom-most" | "center-most")[] | import("../../main.lib.js").PopupPositioner;
30
30
  avoidRepositioning: boolean;
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
32
32
  button?: (props: {
@@ -76,7 +76,7 @@ const buttonEl = ref(null);
76
76
  const backgroundEl = ref(null);
77
77
  const pos = ref({});
78
78
  const modelValue = defineModel({ type: Boolean, ...{ default: false } });
79
- let isOpen = false;
79
+ let isOpen = modelValue.value;
80
80
  const getDialogBoundingRect = () => ({
81
81
  x: 0,
82
82
  y: 0,
@@ -324,10 +324,6 @@ const close = () => {
324
324
  if (props.useBackdrop && props.useDialogForBackdrop) dialogEl.value?.close();
325
325
  }
326
326
  };
327
- const toggle = () => {
328
- if (!isOpen) show();
329
- else close();
330
- };
331
327
  const recomputeListener = () => recompute();
332
328
  const bindListeners = () => {
333
329
  window.addEventListener("resize", recomputeListener);
@@ -348,7 +344,7 @@ watch([modelValue, popupEl], () => {
348
344
  });
349
345
  const handleMouseup = ($event) => {
350
346
  $event.preventDefault();
351
- toggle();
347
+ close();
352
348
  };
353
349
  onMounted(() => {
354
350
  recompute();
@@ -1,6 +1,6 @@
1
1
  import { type HTMLAttributes } from "vue";
2
- import { type LinkableByIdProps, type TailwindClassProp, type PopupProps } from "../shared/props.js.js";
3
- import type { IPopupReference } from "../../types/index.js.js";
2
+ import { type LinkableByIdProps, type TailwindClassProp, type PopupProps } from "../shared/props.js";
3
+ import type { IPopupReference } from "../../types/index.js";
4
4
  type RealProps = LinkableByIdProps & PopupProps;
5
5
  interface Props extends
6
6
  /** @vue-ignore */
@@ -25,8 +25,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props & {
25
25
  canClose: boolean;
26
26
  useDialogForBackdrop: false;
27
27
  useBackdrop: boolean;
28
- preferredHorizontal: ("center" | "right" | "left" | "either" | "center-screen" | "right-most" | "left-most" | "center-most")[] | import("../../main.lib.js.js").PopupPositioner;
29
- preferredVertical: ("top" | "bottom" | "center" | "either" | "center-screen" | "top-most" | "bottom-most" | "center-most")[] | import("../../main.lib.js.js").PopupPositioner;
28
+ preferredHorizontal: ("center" | "right" | "left" | "either" | "center-screen" | "right-most" | "left-most" | "center-most")[] | import("../../main.lib.js").PopupPositioner;
29
+ preferredVertical: ("top" | "bottom" | "center" | "either" | "center-screen" | "top-most" | "bottom-most" | "center-most")[] | import("../../main.lib.js").PopupPositioner;
30
30
  avoidRepositioning: boolean;
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
32
32
  button?: (props: {
@@ -1,6 +1,7 @@
1
- import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js.js";
1
+ import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js";
2
2
  import type { HTMLAttributes } from "vue";
3
3
  type RealProps = LinkableByIdProps & BaseInteractiveProps & LabelProps & {
4
+ /** A number from 0-100. It is auto-clamped. */
4
5
  progress: number;
5
6
  /** Will auto hide after this given time if progress is 100% or more or less than 0% until progress is set to something else. Disabled (-1) by default. */
6
7
  autohideOnComplete?: number;
@@ -28,7 +28,7 @@
28
28
  before:shadow-black/50
29
29
  before:rounded-sm
30
30
  before:bg-bars-gradient
31
- before:animate-[slide_10s_linear_infinite]
31
+ before:animate-slideBgInf
32
32
  before:[background-size:15px_15px]
33
33
  before:absolute
34
34
  before:w-[var(--progress)]
@@ -1,6 +1,7 @@
1
- import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js.js";
1
+ import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js";
2
2
  import type { HTMLAttributes } from "vue";
3
3
  type RealProps = LinkableByIdProps & BaseInteractiveProps & LabelProps & {
4
+ /** A number from 0-100. It is auto-clamped. */
4
5
  progress: number;
5
6
  /** Will auto hide after this given time if progress is 100% or more or less than 0% until progress is set to something else. Disabled (-1) by default. */
6
7
  autohideOnComplete?: number;
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from "vue";
2
- import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js.js";
2
+ import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js";
3
3
  type RealProps = LinkableByIdProps & BaseInteractiveProps & LabelProps & {
4
4
  border?: boolean;
5
5
  /** A value to display while recording, if none given the i18n `recorder.recording` key is used. */
@@ -55,7 +55,7 @@
55
55
  hover:bg-red-500
56
56
  `,
57
57
  recording && `
58
- animate-[blink_1s_infinite]
58
+ animate-blinkInf
59
59
  bg-red-500
60
60
  `,
61
61
  (disabled || readonly) && `
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from "vue";
2
- import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js.js";
2
+ import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js";
3
3
  type RealProps = LinkableByIdProps & BaseInteractiveProps & LabelProps & {
4
4
  border?: boolean;
5
5
  /** A value to display while recording, if none given the i18n `recorder.recording` key is used. */
@@ -1,5 +1,5 @@
1
1
  import type { Theme } from "metamorphosis";
2
- import { NotificationHandler } from "../../helpers/NotificationHandler.js.js";
2
+ import { NotificationHandler } from "../../helpers/NotificationHandler.js";
3
3
  type __VLS_Props = {
4
4
  theme?: Theme;
5
5
  outline?: boolean;
@@ -19,7 +19,7 @@ type __VLS_Slots = {} & {
19
19
  default?: (props: typeof __VLS_9) => any;
20
20
  };
21
21
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
22
- darkMode: import("../../composables/useDarkMode.js.js").DarkModeState & import("../../composables/useDarkMode.js.js").DarkModeCommands;
22
+ darkMode: import("../../composables/useDarkMode.js").DarkModeState & import("../../composables/useDarkMode.js").DarkModeCommands;
23
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
24
24
  theme: Theme;
25
25
  id: string;
@@ -1,5 +1,5 @@
1
1
  import type { Theme } from "metamorphosis";
2
- import { NotificationHandler } from "../../helpers/NotificationHandler.js.js";
2
+ import { NotificationHandler } from "../../helpers/NotificationHandler.js";
3
3
  type __VLS_Props = {
4
4
  theme?: Theme;
5
5
  outline?: boolean;
@@ -19,7 +19,7 @@ type __VLS_Slots = {} & {
19
19
  default?: (props: typeof __VLS_9) => any;
20
20
  };
21
21
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {
22
- darkMode: import("../../composables/useDarkMode.js.js").DarkModeState & import("../../composables/useDarkMode.js.js").DarkModeCommands;
22
+ darkMode: import("../../composables/useDarkMode.js").DarkModeState & import("../../composables/useDarkMode.js").DarkModeCommands;
23
23
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
24
24
  theme: Theme;
25
25
  id: string;
@@ -1,5 +1,5 @@
1
1
  import { type InputHTMLAttributes } from "vue";
2
- import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js.js";
2
+ import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js";
3
3
  type RealProps = LinkableByIdProps & LabelProps & BaseInteractiveProps & {
4
4
  placeholder?: InputHTMLAttributes["placeholder"];
5
5
  disabled?: InputHTMLAttributes["disabled"];
@@ -1,5 +1,5 @@
1
1
  import { type InputHTMLAttributes } from "vue";
2
- import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js.js";
2
+ import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js";
3
3
  type RealProps = LinkableByIdProps & LabelProps & BaseInteractiveProps & {
4
4
  placeholder?: InputHTMLAttributes["placeholder"];
5
5
  disabled?: InputHTMLAttributes["disabled"];
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from "vue";
2
- import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type SuggestionsEmits, type SuggestionsProps, type WrapperProps } from "../shared/props.js.js";
2
+ import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type SuggestionsEmits, type SuggestionsProps, type WrapperProps } from "../shared/props.js";
3
3
  type WrapperTypes = Partial<WrapperProps<"item", HTMLAttributes, {
4
4
  /** Tailwind classes. */
5
5
  class?: string;
@@ -1,5 +1,5 @@
1
1
  import { type HTMLAttributes } from "vue";
2
- import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type SuggestionsEmits, type SuggestionsProps, type WrapperProps } from "../shared/props.js.js";
2
+ import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type SuggestionsEmits, type SuggestionsProps, type WrapperProps } from "../shared/props.js";
3
3
  type WrapperTypes = Partial<WrapperProps<"item", HTMLAttributes, {
4
4
  /** Tailwind classes. */
5
5
  class?: string;
@@ -1,6 +1,6 @@
1
1
  import { type TableHTMLAttributes } from "vue";
2
- import type { ResizableOptions, TableColConfig } from "../../types/index.js.js";
3
- import type { TailwindClassProp } from "../shared/props.js.js";
2
+ import type { ResizableOptions, TableColConfig } from "../../types/index.js";
3
+ import type { TailwindClassProp } from "../shared/props.js";
4
4
  type T = any;
5
5
  type RealProps = {
6
6
  resizable?: Partial<ResizableOptions>;
@@ -1,6 +1,6 @@
1
1
  import { type TableHTMLAttributes } from "vue";
2
- import type { ResizableOptions, TableColConfig } from "../../types/index.js.js";
3
- import type { TailwindClassProp } from "../shared/props.js.js";
2
+ import type { ResizableOptions, TableColConfig } from "../../types/index.js";
3
+ import type { TailwindClassProp } from "../shared/props.js";
4
4
  type T = any;
5
5
  type RealProps = {
6
6
  resizable?: Partial<ResizableOptions>;
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from "@storybook/vue3";
2
- import NAME from "./NAME.vue.js";
2
+ import NAME from "./NAME.vue";
3
3
  declare const meta: Meta<typeof NAME>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof NAME>;
@@ -1,20 +1,20 @@
1
- export { default as aria } from "./Aria/Aria.vue.js";
2
- export { default as LibButton } from "./LibButton/LibButton.vue.js";
3
- export { default as LibCheckbox } from "./LibCheckbox/LibCheckbox.vue.js";
4
- export { default as LibColorInput } from "./LibColorInput/LibColorInput.vue.js";
5
- export { default as LibColorPicker } from "./LibColorPicker/LibColorPicker.vue.js";
6
- export { default as LibDarkModeSwitcher } from "./LibDarkModeSwitcher/LibDarkModeSwitcher.vue.js";
7
- export { default as LibDatePicker } from "./LibDatePicker/LibDatePicker.vue.js";
8
- export { default as LibDebug } from "./LibDebug/LibDebug.vue.js";
9
- export { default as LibFileInput } from "./LibFileInput/LibFileInput.vue.js";
10
- export { default as LibInputDeprecated } from "./LibInputDeprecated/LibInputDeprecated.vue.js";
11
- export { default as LibLabel } from "./LibLabel/LibLabel.vue.js";
12
- export { default as LibNotifications } from "./LibNotifications/LibNotifications.vue.js";
13
- export { default as LibPagination } from "./LibPagination/LibPagination.vue.js";
14
- export { default as LibPopup } from "./LibPopup/LibPopup.vue.js";
15
- export { default as LibProgressBar } from "./LibProgressBar/LibProgressBar.vue.js";
16
- export { default as LibRecorder } from "./LibRecorder/LibRecorder.vue.js";
17
- export { default as LibRoot } from "./LibRoot/LibRoot.vue.js";
18
- export { default as LibSimpleInput } from "./LibSimpleInput/LibSimpleInput.vue.js";
19
- export { default as LibTable } from "./LibTable/LibTable.vue.js";
20
- export { default as LibTimeZonePicker } from "./LibDatePicker/LibTimeZonePicker.vue.js";
1
+ export { default as aria } from "./Aria/Aria.vue";
2
+ export { default as LibButton } from "./LibButton/LibButton.vue";
3
+ export { default as LibCheckbox } from "./LibCheckbox/LibCheckbox.vue";
4
+ export { default as LibColorInput } from "./LibColorInput/LibColorInput.vue";
5
+ export { default as LibColorPicker } from "./LibColorPicker/LibColorPicker.vue";
6
+ export { default as LibDarkModeSwitcher } from "./LibDarkModeSwitcher/LibDarkModeSwitcher.vue";
7
+ export { default as LibDatePicker } from "./LibDatePicker/LibDatePicker.vue";
8
+ export { default as LibDebug } from "./LibDebug/LibDebug.vue";
9
+ export { default as LibFileInput } from "./LibFileInput/LibFileInput.vue";
10
+ export { default as LibInputDeprecated } from "./LibInputDeprecated/LibInputDeprecated.vue";
11
+ export { default as LibLabel } from "./LibLabel/LibLabel.vue";
12
+ export { default as LibNotifications } from "./LibNotifications/LibNotifications.vue";
13
+ export { default as LibPagination } from "./LibPagination/LibPagination.vue";
14
+ export { default as LibPopup } from "./LibPopup/LibPopup.vue";
15
+ export { default as LibProgressBar } from "./LibProgressBar/LibProgressBar.vue";
16
+ export { default as LibRecorder } from "./LibRecorder/LibRecorder.vue";
17
+ export { default as LibRoot } from "./LibRoot/LibRoot.vue";
18
+ export { default as LibSimpleInput } from "./LibSimpleInput/LibSimpleInput.vue";
19
+ export { default as LibTable } from "./LibTable/LibTable.vue";
20
+ export { default as LibTimeZonePicker } from "./LibDatePicker/LibTimeZonePicker.vue";
@@ -1,4 +1,4 @@
1
- import type { PopupPositioner, PopupPositionModifier } from "../../types/index.js";
1
+ import type { PopupPositioner, PopupPositionModifier } from "../../types";
2
2
  export interface LinkableByIdProps {
3
3
  /**
4
4
  * The id for the input. Uses vue's useId if none provided.
@@ -1,15 +1,17 @@
1
- export { useAccesibilityOutline } from "./useAccesibilityOutline.js.js";
2
- export { useAriaLabel } from "./useAriaLabel.js.js";
3
- export { useDarkMode } from "./useDarkMode.js.js";
4
- export { useDivideAttrs } from "./useDivideAttrs.js.js";
5
- export { useDragWithThreshold } from "./useDragWithThreshold.js.js";
6
- export { useGlobalResizeObserver } from "./useGlobalResizeObserver.js.js";
7
- export { useInjectedDarkMode } from "./useInjectedDarkMode.js.js";
8
- export { useInjectedI18n } from "./useInjectedI18n.js.js";
9
- export { useInjectedLocale } from "./useInjectedLocale.js.js";
10
- export { useNotificationHandler } from "./useNotificationHandler.js.js";
11
- export { usePreHydrationValue } from "./usePreHydrationValue.js.js";
12
- export { useScrollNearContainerEdges } from "./useScrollNearContainerEdges.js.js";
13
- export { useSetupDarkMode } from "./useSetupDarkMode.js.js";
14
- export { useShowDevOnlyKey } from "./useShowDevOnlyKey.js.js";
15
- export { useSuggestions } from "./useSuggestions.js.js";
1
+ export { useAccesibilityOutline } from "./useAccesibilityOutline.js";
2
+ export { useAriaLabel } from "./useAriaLabel.js";
3
+ export { useDarkMode } from "./useDarkMode.js";
4
+ export { useDivideAttrs } from "./useDivideAttrs.js";
5
+ export { useDragWithThreshold } from "./useDragWithThreshold.js";
6
+ export { useGlobalResizeObserver } from "./useGlobalResizeObserver.js";
7
+ export { useInjectedDarkMode } from "./useInjectedDarkMode.js";
8
+ export { useInjectedI18n } from "./useInjectedI18n.js";
9
+ export { useInjectedLocale } from "./useInjectedLocale.js";
10
+ export { useNotificationHandler } from "./useNotificationHandler.js";
11
+ export { usePreHydrationValue } from "./usePreHydrationValue.js";
12
+ export { useScrollNearContainerEdges } from "./useScrollNearContainerEdges.js";
13
+ export { useSetupDarkMode } from "./useSetupDarkMode.js";
14
+ export { useSetupLocale } from "./useSetupLocale.js";
15
+ export { useShowDevOnlyKey } from "./useShowDevOnlyKey.js";
16
+ export { useSlotVars } from "./useSlotVars.js";
17
+ export { useSuggestions } from "./useSuggestions.js";
@@ -11,5 +11,7 @@ export { useNotificationHandler } from "./useNotificationHandler.js";
11
11
  export { usePreHydrationValue } from "./usePreHydrationValue.js";
12
12
  export { useScrollNearContainerEdges } from "./useScrollNearContainerEdges.js";
13
13
  export { useSetupDarkMode } from "./useSetupDarkMode.js";
14
+ export { useSetupLocale } from "./useSetupLocale.js";
14
15
  export { useShowDevOnlyKey } from "./useShowDevOnlyKey.js";
16
+ export { useSlotVars } from "./useSlotVars.js";
15
17
  export { useSuggestions } from "./useSuggestions.js";
@@ -1,5 +1,5 @@
1
1
  import { type Ref } from "vue";
2
- import type { Point } from "../types/index.js.js";
2
+ import type { Point } from "../types/index.js";
3
3
  /**
4
4
  * A composable for dragging items only after a certain threshold of movement has been reached.
5
5
  *
@@ -1,2 +1,2 @@
1
- import type { DarkModeCommands, DarkModeState } from "./useDarkMode.js.js";
1
+ import type { DarkModeCommands, DarkModeState } from "./useDarkMode.js";
2
2
  export declare function useInjectedDarkMode(): DarkModeState & DarkModeCommands;
@@ -1,2 +1,2 @@
1
- import type { TranslationFunction } from "./useSetupI18n.js.js";
1
+ import type { TranslationFunction } from "./useSetupI18n.js";
2
2
  export declare function useInjectedI18n(): TranslationFunction;
@@ -1,2 +1,2 @@
1
- import type { useSetupLocale } from "./useSetupLocale.js.js";
1
+ import type { useSetupLocale } from "./useSetupLocale.js";
2
2
  export declare function useInjectedLocale(): ReturnType<typeof useSetupLocale>;
@@ -1,4 +1,4 @@
1
- import type { NotificationHandler } from "../helpers/NotificationHandler.js.js";
1
+ import type { NotificationHandler } from "../helpers/NotificationHandler.js";
2
2
  export declare const useNotificationHandler: (handler?: NotificationHandler,
3
3
  /** True by default, should be passed import.meta.client if using nuxt, or false when running server side. */
4
4
  isClientSide?: boolean) => NotificationHandler;