@wikicasa-dev/components 2.1.24-alpha.4 → 2.1.24-alpha.5
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.
- package/dist/UIKit/BaseSnackbar.d.ts +1 -0
- package/dist/lazyModules/Swiper/autoplay.js +1 -1
- package/dist/lazyModules/Swiper/controller.js +1 -1
- package/dist/lazyModules/Swiper/keyboard.js +1 -1
- package/dist/lazyModules/Swiper/thumbs.js +1 -1
- package/dist/lib/UIKit/BaseSnackbar.vue.js +31 -28
- package/package.json +1 -1
- /package/dist/assets/node_modules/swiper/modules/{thumbs.css → keyboard.css} +0 -0
|
@@ -11,6 +11,7 @@ export type SnackbarProps = {
|
|
|
11
11
|
* @see https://vuejs.org/guide/built-ins/teleport.html#basic-usage
|
|
12
12
|
*/
|
|
13
13
|
to?: ToastPortalProps["to"];
|
|
14
|
+
dataCy?: string;
|
|
14
15
|
};
|
|
15
16
|
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
16
17
|
open?: Optional<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as e } from "../../node_modules/swiper/modules/controller.js";
|
|
2
|
-
import '../../assets/node_modules/swiper/modules/
|
|
2
|
+
import '../../assets/node_modules/swiper/modules/keyboard.css';/* empty css */
|
|
3
3
|
export {
|
|
4
4
|
e as Controller
|
|
5
5
|
};
|
|
@@ -1,71 +1,74 @@
|
|
|
1
|
-
import { defineComponent as T, mergeModels as g, useModel as
|
|
1
|
+
import { defineComponent as T, mergeModels as g, useModel as h, ref as w, watch as x, nextTick as y, createBlock as f, openBlock as m, unref as t, withCtx as a, renderSlot as n, createVNode as i, normalizeClass as C, createCommentVNode as b, normalizeStyle as I } from "vue";
|
|
2
2
|
import { CloseIcon as V } from "../../node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js";
|
|
3
3
|
import "../../node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js";
|
|
4
|
-
import { ToastProvider as $, ToastRoot as P, ToastTitle as z, ToastDescription as B, ToastClose as D, ToastAction as M, ProgressRoot as S, ProgressIndicator as j, ToastPortal as
|
|
4
|
+
import { ToastProvider as $, ToastRoot as P, ToastTitle as z, ToastDescription as B, ToastClose as D, ToastAction as M, ProgressRoot as S, ProgressIndicator as j, ToastPortal as A, ToastViewport as N } from "reka-ui";
|
|
5
5
|
const q = /* @__PURE__ */ T({
|
|
6
|
+
inheritAttrs: !1,
|
|
6
7
|
__name: "BaseSnackbar",
|
|
7
8
|
props: /* @__PURE__ */ g({
|
|
8
9
|
alertClass: { default: "primary" },
|
|
9
10
|
duration: { default: 3e3 },
|
|
10
|
-
to: { default: "body" }
|
|
11
|
+
to: { default: "body" },
|
|
12
|
+
dataCy: { default: "" }
|
|
11
13
|
}, {
|
|
12
14
|
open: { type: Boolean, default: !1 },
|
|
13
15
|
openModifiers: {}
|
|
14
16
|
}),
|
|
15
17
|
emits: ["update:open"],
|
|
16
|
-
setup(
|
|
17
|
-
const r =
|
|
18
|
+
setup(o) {
|
|
19
|
+
const r = h(o, "open"), l = w(0);
|
|
18
20
|
let d, k;
|
|
19
21
|
const c = (e = 3e3) => {
|
|
20
|
-
|
|
22
|
+
l.value = 0;
|
|
21
23
|
const u = Date.now();
|
|
22
24
|
k = setInterval(() => {
|
|
23
25
|
const v = Date.now() - u;
|
|
24
|
-
|
|
26
|
+
l.value = Math.min(100, v / e * 100), l.value >= 100 && clearInterval(k);
|
|
25
27
|
}, 30);
|
|
26
28
|
}, p = () => {
|
|
27
29
|
clearTimeout(d), d = setTimeout(() => {
|
|
28
30
|
r.value = !1;
|
|
29
|
-
},
|
|
31
|
+
}, o.duration), c(o.duration);
|
|
30
32
|
};
|
|
31
|
-
return
|
|
33
|
+
return x(
|
|
32
34
|
r,
|
|
33
35
|
(e) => {
|
|
34
|
-
|
|
36
|
+
y(() => {
|
|
35
37
|
if (e) {
|
|
36
38
|
p();
|
|
37
39
|
return;
|
|
38
40
|
}
|
|
39
|
-
clearInterval(k), clearTimeout(d),
|
|
41
|
+
clearInterval(k), clearTimeout(d), l.value = 0;
|
|
40
42
|
});
|
|
41
43
|
},
|
|
42
44
|
{ immediate: !0 }
|
|
43
45
|
), (e, u) => (m(), f(t($), null, {
|
|
44
|
-
default:
|
|
46
|
+
default: a(() => [
|
|
45
47
|
n(e.$slots, "trigger", {
|
|
46
48
|
open: () => r.value = !0
|
|
47
49
|
}),
|
|
48
50
|
i(t(P), {
|
|
49
51
|
open: r.value,
|
|
50
52
|
"onUpdate:open": u[1] || (u[1] = (s) => r.value = s),
|
|
51
|
-
duration:
|
|
52
|
-
class:
|
|
53
|
+
duration: o.duration,
|
|
54
|
+
class: C(["toast-root uikit-shadow-surface uikit-relative uikit-flex uikit-gap-[8px] uikit-overflow-hidden uikit-rounded-[4px] uikit-p-[16px] uikit-text-16 uikit-font-medium sm:uikit-max-w-[460px]", ["uikit-alert", `uikit-alert-w-${o.alertClass}`]]),
|
|
55
|
+
"data-cy": o.dataCy
|
|
53
56
|
}, {
|
|
54
|
-
default:
|
|
57
|
+
default: a(() => [
|
|
55
58
|
e.$slots.title ? (m(), f(t(z), {
|
|
56
59
|
key: 0,
|
|
57
60
|
"as-child": ""
|
|
58
61
|
}, {
|
|
59
|
-
default:
|
|
62
|
+
default: a(() => [
|
|
60
63
|
n(e.$slots, "title")
|
|
61
64
|
]),
|
|
62
65
|
_: 3
|
|
63
|
-
})) :
|
|
66
|
+
})) : b("", !0),
|
|
64
67
|
i(t(B), { "as-child": "" }, {
|
|
65
|
-
default:
|
|
68
|
+
default: a(() => [
|
|
66
69
|
n(e.$slots, "default"),
|
|
67
70
|
i(t(D), { class: "uikit-ml-[16px] uikit-flex uikit-size-[24px] uikit-shrink-0 uikit-cursor-pointer uikit-appearance-none uikit-items-center uikit-justify-center uikit-rounded-full uikit-bg-[#C1C8D5]" }, {
|
|
68
|
-
default:
|
|
71
|
+
default: a(() => [
|
|
69
72
|
i(t(V), {
|
|
70
73
|
width: 12,
|
|
71
74
|
height: 12,
|
|
@@ -82,30 +85,30 @@ const q = /* @__PURE__ */ T({
|
|
|
82
85
|
"as-child": "",
|
|
83
86
|
"alt-text": "Goto schedule to undo"
|
|
84
87
|
}, {
|
|
85
|
-
default:
|
|
88
|
+
default: a(() => [
|
|
86
89
|
n(e.$slots, "toast-action")
|
|
87
90
|
]),
|
|
88
91
|
_: 3
|
|
89
92
|
}),
|
|
90
93
|
i(t(S), {
|
|
91
|
-
modelValue:
|
|
92
|
-
"onUpdate:modelValue": u[0] || (u[0] = (s) =>
|
|
94
|
+
modelValue: l.value,
|
|
95
|
+
"onUpdate:modelValue": u[0] || (u[0] = (s) => l.value = s),
|
|
93
96
|
class: "uikit-absolute uikit-bottom-0 uikit-left-0 uikit-h-[4px] uikit-w-full uikit-overflow-hidden"
|
|
94
97
|
}, {
|
|
95
|
-
default:
|
|
98
|
+
default: a(() => [
|
|
96
99
|
i(t(j), {
|
|
97
100
|
class: "uikit-relative uikit-block uikit-size-full uikit-bg-[#2b5dff] uikit-transition-transform uikit-duration-75 uikit-will-change-transform",
|
|
98
|
-
style: I(`transform: translateX(-${100 -
|
|
101
|
+
style: I(`transform: translateX(-${100 - l.value}%)`)
|
|
99
102
|
}, null, 8, ["style"])
|
|
100
103
|
]),
|
|
101
104
|
_: 1
|
|
102
105
|
}, 8, ["modelValue"])
|
|
103
106
|
]),
|
|
104
107
|
_: 3
|
|
105
|
-
}, 8, ["open", "duration", "class"]),
|
|
106
|
-
i(t(
|
|
107
|
-
default:
|
|
108
|
-
i(t(
|
|
108
|
+
}, 8, ["open", "duration", "class", "data-cy"]),
|
|
109
|
+
i(t(A), { to: o.to }, {
|
|
110
|
+
default: a(() => [
|
|
111
|
+
i(t(N), { class: "uikit-alert-viewport uikit-fixed uikit-bottom-0 uikit-right-0 uikit-m-0 uikit-flex uikit-w-full uikit-list-none uikit-flex-col uikit-items-end uikit-justify-end uikit-gap-[8px]" })
|
|
109
112
|
]),
|
|
110
113
|
_: 1
|
|
111
114
|
}, 8, ["to"])
|
package/package.json
CHANGED
|
File without changes
|