@indielayer/ui 1.14.2 → 1.14.4
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/docs/pages/component/modal/usage.vue +1 -1
- package/lib/components/badge/Badge.vue.js +8 -8
- package/lib/components/checkbox/Checkbox.vue2.js +66 -65
- package/lib/components/checkbox/theme/Checkbox.base.theme.js +8 -8
- package/lib/components/modal/Modal.vue.js +38 -34
- package/lib/components/notifications/Notifications.vue.d.ts +13 -0
- package/lib/components/notifications/Notifications.vue.js +71 -64
- package/lib/components/select/Select.vue.js +22 -22
- package/lib/components/tab/theme/Tab.base.theme.js +1 -1
- package/lib/composables/useFocusTrap.js +19 -15
- package/lib/index.umd.js +4 -4
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/components/badge/Badge.vue +1 -1
- package/src/components/checkbox/Checkbox.vue +9 -3
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +4 -1
- package/src/components/modal/Modal.vue +8 -5
- package/src/components/notifications/Notifications.vue +10 -1
- package/src/components/select/Select.vue +1 -1
- package/src/components/tab/theme/Tab.base.theme.ts +1 -1
- package/src/composables/useFocusTrap.ts +7 -1
- package/src/version.ts +1 -1
|
@@ -24,7 +24,7 @@ const show3 = ref(false)
|
|
|
24
24
|
|
|
25
25
|
<template #actions>
|
|
26
26
|
<div class="text-right space-x-4">
|
|
27
|
-
<x-button @click="show = false">Cancel</x-button>
|
|
27
|
+
<x-button tabindex="-1" @click="show = false">Cancel</x-button>
|
|
28
28
|
<x-button color="success">Confirm</x-button>
|
|
29
29
|
</div>
|
|
30
30
|
</template>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v, useSlots as z, computed as
|
|
1
|
+
import { defineComponent as v, useSlots as z, computed as i, openBlock as o, createBlock as S, resolveDynamicComponent as B, normalizeStyle as l, unref as s, normalizeClass as n, withCtx as w, createElementVNode as r, renderSlot as a, createElementBlock as p, createCommentVNode as f } from "vue";
|
|
2
2
|
import { useTheme as C } from "../../composables/useTheme.js";
|
|
3
3
|
import { useCommon as d } from "../../composables/useCommon.js";
|
|
4
4
|
import { useColors as k } from "../../composables/useColors.js";
|
|
@@ -40,16 +40,16 @@ const N = { class: "relative inline-block" }, X = {
|
|
|
40
40
|
...E,
|
|
41
41
|
props: $,
|
|
42
42
|
setup(m) {
|
|
43
|
-
const t = m, u = z(), g =
|
|
43
|
+
const t = m, u = z(), g = i(() => {
|
|
44
44
|
const e = [];
|
|
45
45
|
return t.position === "top" && e.push("top-0"), t.position === "bottom" && e.push("bottom-0"), t.align === "left" && e.push("left-0"), t.align === "right" && e.push("right-0"), u.content ? e.push("-m-[7.5%]") : t.outlined ? e.push("-m-[5%]") : e.push("-m-[3.5%]"), e;
|
|
46
|
-
}), c =
|
|
46
|
+
}), c = i(() => {
|
|
47
47
|
const e = {};
|
|
48
48
|
return t.offsetX && (e[t.align === "left" ? "marginLeft" : "marginRight"] = t.offsetX + "px"), t.offsetY && (e[t.position === "top" ? "marginTop" : "marginBottom"] = t.offsetY + "px"), e;
|
|
49
49
|
}), { styles: h, classes: b, className: y } = C("Badge", {}, t);
|
|
50
50
|
return (e, P) => (o(), S(B(e.tag), {
|
|
51
|
-
style:
|
|
52
|
-
class:
|
|
51
|
+
style: l(s(h)),
|
|
52
|
+
class: n([
|
|
53
53
|
s(y),
|
|
54
54
|
s(b).wrapper
|
|
55
55
|
])
|
|
@@ -59,17 +59,17 @@ const N = { class: "relative inline-block" }, X = {
|
|
|
59
59
|
a(e.$slots, "default"),
|
|
60
60
|
e.show ? (o(), p("div", {
|
|
61
61
|
key: 0,
|
|
62
|
-
class:
|
|
62
|
+
class: n(["absolute rounded-full z-10 bg-[color:var(--x-badge-bg)] pointer-events-none", [
|
|
63
63
|
g.value,
|
|
64
64
|
{
|
|
65
65
|
"border-2 border-secondary-50 dark:border-secondary-900": e.outlined
|
|
66
66
|
}
|
|
67
67
|
]]),
|
|
68
|
-
style:
|
|
68
|
+
style: l(c.value)
|
|
69
69
|
}, [
|
|
70
70
|
e.animated ? (o(), p("div", X)) : f("", !0),
|
|
71
71
|
r("div", {
|
|
72
|
-
class:
|
|
72
|
+
class: n(["text-xs text-white overflow-hidden", [
|
|
73
73
|
e.$slots.content ? "flex items-center justify-center min-w-[1.25rem] h-5 px-1.5" : {
|
|
74
74
|
"p-1": e.size === "xs",
|
|
75
75
|
"p-[0.312rem]": e.size === "sm",
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as T, ref as w, watch as m, unref as r, openBlock as o, createElementBlock as d, normalizeStyle as H, normalizeClass as t, createElementVNode as p, withKeys as O, withModifiers as U, withDirectives as X, mergeProps as j, toHandlers as J, vModelCheckbox as Q, createBlock as V, renderSlot as C, toDisplayString as W, createCommentVNode as I } from "vue";
|
|
2
2
|
import { useColors as Y } from "../../composables/useColors.js";
|
|
3
|
-
import { useCommon as
|
|
3
|
+
import { useCommon as z } from "../../composables/useCommon.js";
|
|
4
4
|
import { useInputtable as f } from "../../composables/useInputtable.js";
|
|
5
|
-
import { useInteractive as
|
|
5
|
+
import { useInteractive as A } from "../../composables/useInteractive.js";
|
|
6
6
|
import { useTheme as Z } from "../../composables/useTheme.js";
|
|
7
7
|
import x from "../inputFooter/InputFooter.vue.js";
|
|
8
8
|
import _ from "../spinner/Spinner.vue.js";
|
|
9
|
-
const ee = ["onKeypress"],
|
|
10
|
-
key: 1,
|
|
11
|
-
name: "check-icon",
|
|
12
|
-
class: "w-2/3 h-[2px] bg-white dark:bg-secondary-900"
|
|
13
|
-
}, ae = ["textContent"], oe = {
|
|
14
|
-
...I.props(),
|
|
15
|
-
...Y.props("primary"),
|
|
9
|
+
const ee = ["onKeypress"], le = ["id", "name", "aria-checked", "aria-disabled", "disabled", "required"], se = ["textContent"], ae = {
|
|
16
10
|
...z.props(),
|
|
11
|
+
...Y.props("primary"),
|
|
12
|
+
...A.props(),
|
|
17
13
|
...f.props(),
|
|
18
14
|
value: [String, Number],
|
|
19
15
|
indeterminate: Boolean,
|
|
@@ -21,122 +17,127 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
21
17
|
}, re = {
|
|
22
18
|
name: "XCheckbox",
|
|
23
19
|
validators: {
|
|
24
|
-
...
|
|
20
|
+
...z.validators()
|
|
25
21
|
}
|
|
26
|
-
},
|
|
22
|
+
}, ce = /* @__PURE__ */ T({
|
|
27
23
|
...re,
|
|
28
|
-
props:
|
|
24
|
+
props: ae,
|
|
29
25
|
emits: f.emits(!1),
|
|
30
|
-
setup(
|
|
31
|
-
const l =
|
|
26
|
+
setup(B, { expose: $, emit: F }) {
|
|
27
|
+
const l = B, v = F, b = w(null), a = w(!1);
|
|
32
28
|
function y() {
|
|
33
|
-
a.value = !a.value;
|
|
29
|
+
l.disabled || l.loading || l.readonly || (a.value = !a.value);
|
|
34
30
|
}
|
|
35
|
-
const { focus: h, blur:
|
|
36
|
-
errorInternal:
|
|
37
|
-
hideFooterInternal:
|
|
38
|
-
isInsideForm:
|
|
31
|
+
const { focus: h, blur: G } = A(b), {
|
|
32
|
+
errorInternal: N,
|
|
33
|
+
hideFooterInternal: S,
|
|
34
|
+
isInsideForm: q,
|
|
39
35
|
isInsideFormGroup: c,
|
|
40
|
-
isFirstValidation:
|
|
41
|
-
formGroup:
|
|
42
|
-
reset:
|
|
36
|
+
isFirstValidation: E,
|
|
37
|
+
formGroup: i,
|
|
38
|
+
reset: K,
|
|
43
39
|
validate: k,
|
|
44
|
-
setError:
|
|
40
|
+
setError: L
|
|
45
41
|
} = f(l, { focus: h, emit: v, withListeners: !1 });
|
|
46
|
-
c ? (m(() =>
|
|
47
|
-
const e =
|
|
42
|
+
c ? (m(() => i.value, () => {
|
|
43
|
+
const e = r(i.value);
|
|
48
44
|
e && Array.isArray(e) && e.includes(l.value) ? a.value = !0 : a.value = !1;
|
|
49
45
|
}, { immediate: !0, deep: !0 }), m(() => a.value, (e) => {
|
|
50
46
|
if (!l.value)
|
|
51
47
|
return;
|
|
52
|
-
const s =
|
|
48
|
+
const s = r(i.value);
|
|
53
49
|
if (e)
|
|
54
50
|
if (s && Array.isArray(s)) {
|
|
55
51
|
if (!s.includes(l.value)) {
|
|
56
|
-
const
|
|
57
|
-
|
|
52
|
+
const u = [...s, l.value];
|
|
53
|
+
i.setValue(u);
|
|
58
54
|
}
|
|
59
55
|
} else
|
|
60
|
-
|
|
56
|
+
i.setValue([l.value]);
|
|
61
57
|
else if (s && Array.isArray(s) && s.includes(l.value)) {
|
|
62
|
-
const
|
|
63
|
-
g.splice(
|
|
58
|
+
const u = s.findIndex((R) => R === l.value), g = [...s];
|
|
59
|
+
g.splice(u, 1), i.setValue(g);
|
|
64
60
|
}
|
|
65
61
|
})) : (m(() => l.modelValue, (e) => {
|
|
66
62
|
a.value = !!e;
|
|
67
63
|
}, { immediate: !0 }), m(() => a.value, (e) => {
|
|
68
64
|
v("update:modelValue", e);
|
|
69
65
|
}));
|
|
70
|
-
const
|
|
66
|
+
const M = {
|
|
71
67
|
input: () => {
|
|
72
68
|
c || setTimeout(() => {
|
|
73
|
-
l.validateOnInput && !
|
|
69
|
+
l.validateOnInput && !E.value && k(l.modelValue);
|
|
74
70
|
}, 0);
|
|
75
71
|
}
|
|
76
|
-
}, { styles:
|
|
77
|
-
return
|
|
78
|
-
style:
|
|
79
|
-
class:
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
}, { styles: D, classes: n, className: P } = Z("Checkbox", {}, l, { checked: a, isInsideForm: q, isInsideFormGroup: c });
|
|
73
|
+
return $({ focus: h, blur: G, toggle: y, reset: K, validate: k, setError: L }), (e, s) => (o(), d("label", {
|
|
74
|
+
style: H(r(D)),
|
|
75
|
+
class: t([
|
|
76
|
+
r(P),
|
|
77
|
+
r(n).wrapper
|
|
82
78
|
])
|
|
83
79
|
}, [
|
|
84
|
-
|
|
80
|
+
p("div", {
|
|
85
81
|
ref_key: "elRef",
|
|
86
82
|
ref: b,
|
|
87
|
-
class:
|
|
83
|
+
class: t(r(n).content),
|
|
88
84
|
tabindex: "0",
|
|
89
|
-
onKeypress:
|
|
85
|
+
onKeypress: O(U(y, ["prevent", "stop"]), ["space"])
|
|
90
86
|
}, [
|
|
91
|
-
|
|
87
|
+
X(p("input", j({
|
|
92
88
|
id: e.id,
|
|
93
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
89
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => a.value = u),
|
|
94
90
|
name: e.name,
|
|
95
91
|
"aria-checked": e.indeterminate ? "mixed" : a.value ? "true" : "false",
|
|
96
92
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
97
93
|
type: "checkbox",
|
|
98
94
|
class: "invisible absolute",
|
|
99
|
-
disabled: e.disabled || e.loading,
|
|
95
|
+
disabled: e.disabled || e.loading || e.readonly,
|
|
100
96
|
required: e.required
|
|
101
|
-
},
|
|
102
|
-
[
|
|
97
|
+
}, J(M, !0)), null, 16, le), [
|
|
98
|
+
[Q, a.value]
|
|
103
99
|
]),
|
|
104
|
-
|
|
105
|
-
class:
|
|
106
|
-
|
|
100
|
+
p("div", {
|
|
101
|
+
class: t([
|
|
102
|
+
r(n).box,
|
|
107
103
|
[e.glow && !e.disabled && !e.loading ? e.$style["checkbox--glow"] : ""]
|
|
108
104
|
])
|
|
109
105
|
}, [
|
|
110
|
-
e.loading ? (
|
|
106
|
+
e.loading ? (o(), V(_, {
|
|
111
107
|
key: 0,
|
|
112
108
|
size: e.size,
|
|
113
109
|
class: "absolute"
|
|
114
|
-
}, null, 8, ["size"])) : e.indeterminate ? (
|
|
115
|
-
|
|
110
|
+
}, null, 8, ["size"])) : e.indeterminate ? (o(), d("span", {
|
|
111
|
+
key: 1,
|
|
112
|
+
name: "check-icon",
|
|
113
|
+
class: t(["w-2/3 h-[1.5px]", [e.disabled ? "bg-secondary-400 dark:bg-secondary-500" : "bg-white"]])
|
|
114
|
+
}, null, 2)) : C(e.$slots, "icon", { key: 2 }, () => [
|
|
115
|
+
(o(), d("svg", {
|
|
116
116
|
viewBox: "0 0 20 20",
|
|
117
|
-
class:
|
|
117
|
+
class: t([r(n).icon, { "opacity-0": !a.value }])
|
|
118
118
|
}, s[1] || (s[1] = [
|
|
119
|
-
|
|
119
|
+
p("path", { d: "M0 11l2-2 5 5L18 3l2 2L7 18z" }, null, -1)
|
|
120
120
|
]), 2))
|
|
121
121
|
])
|
|
122
122
|
], 2),
|
|
123
|
-
d("div", {
|
|
124
|
-
|
|
123
|
+
e.label || e.$slots.default ? (o(), d("div", {
|
|
124
|
+
key: 0,
|
|
125
|
+
class: t(r(n).label)
|
|
125
126
|
}, [
|
|
126
|
-
e.label ? (
|
|
127
|
+
e.label ? (o(), d("span", {
|
|
127
128
|
key: 0,
|
|
128
|
-
textContent:
|
|
129
|
-
}, null, 8,
|
|
130
|
-
], 2)
|
|
129
|
+
textContent: W(e.label)
|
|
130
|
+
}, null, 8, se)) : C(e.$slots, "default", { key: 1 })
|
|
131
|
+
], 2)) : I("", !0)
|
|
131
132
|
], 42, ee),
|
|
132
|
-
|
|
133
|
+
r(S) ? I("", !0) : (o(), V(x, {
|
|
133
134
|
key: 0,
|
|
134
|
-
error:
|
|
135
|
+
error: r(N),
|
|
135
136
|
helper: e.helper
|
|
136
137
|
}, null, 8, ["error", "helper"]))
|
|
137
138
|
], 6));
|
|
138
139
|
}
|
|
139
140
|
});
|
|
140
141
|
export {
|
|
141
|
-
|
|
142
|
+
ce as default
|
|
142
143
|
};
|
|
@@ -13,16 +13,16 @@ const i = {
|
|
|
13
13
|
return e.disabled && r.push("cursor-not-allowed"), r;
|
|
14
14
|
},
|
|
15
15
|
icon: ({ props: e }) => {
|
|
16
|
-
const r = ["fill-current
|
|
17
|
-
return e.size === "lg" ? r.push("h-3 w-3") : e.size === "xl" ? r.push("h-4 w-4") : r.push("h-2.5 w-2.5"), r;
|
|
16
|
+
const r = ["fill-current"];
|
|
17
|
+
return e.disabled ? r.push("text-secondary-400 dark:text-secondary-500") : r.push("text-white"), e.size === "lg" ? r.push("h-3 w-3") : e.size === "xl" ? r.push("h-4 w-4") : r.push("h-2.5 w-2.5"), r;
|
|
18
18
|
},
|
|
19
19
|
label: ({ props: e, data: r }) => {
|
|
20
20
|
const s = ["inline-block text-secondary-800 dark:text-secondary-200 pl-2"];
|
|
21
21
|
return s.push(r.isInsideFormGroup ? "font-normal" : "font-medium"), e.size === "xs" ? s.push("text-xs") : e.size === "sm" ? s.push("text-sm") : e.size === "lg" ? s.push("text-lg") : e.size === "xl" && s.push("text-xl"), s;
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
styles({ props: e, colors: r, css: s, data:
|
|
25
|
-
const t = r.getPalette("gray"), l = r.getPalette(e.color),
|
|
24
|
+
styles({ props: e, colors: r, css: s, data: o }) {
|
|
25
|
+
const t = r.getPalette("gray"), l = r.getPalette(e.color), a = [];
|
|
26
26
|
return e.loading ? s.variables({
|
|
27
27
|
bg: "transparent",
|
|
28
28
|
border: "transparent",
|
|
@@ -30,28 +30,28 @@ const i = {
|
|
|
30
30
|
bg: "transparent",
|
|
31
31
|
border: "transparent"
|
|
32
32
|
}
|
|
33
|
-
}) : (e.disabled ?
|
|
33
|
+
}) : (e.disabled ? a.push(s.variables({
|
|
34
34
|
bg: t[100],
|
|
35
35
|
border: t[200],
|
|
36
36
|
dark: {
|
|
37
37
|
bg: t[800],
|
|
38
38
|
border: t[700]
|
|
39
39
|
}
|
|
40
|
-
})) : (
|
|
40
|
+
})) : (o.checked ? a.push(s.variables({
|
|
41
41
|
bg: l[500],
|
|
42
42
|
border: l[500],
|
|
43
43
|
dark: {
|
|
44
44
|
bg: l[500],
|
|
45
45
|
border: l[500]
|
|
46
46
|
}
|
|
47
|
-
})) :
|
|
47
|
+
})) : a.push(s.variables({
|
|
48
48
|
bg: "#fff",
|
|
49
49
|
border: e.glow ? l[300] : t[300],
|
|
50
50
|
dark: {
|
|
51
51
|
bg: t[900],
|
|
52
52
|
border: e.glow ? l[300] : t[400]
|
|
53
53
|
}
|
|
54
|
-
})), e.glow &&
|
|
54
|
+
})), e.glow && a.push(s.get("glow", r.getColorOpacity(l[500], 0.5)))), a);
|
|
55
55
|
}
|
|
56
56
|
}, n = i;
|
|
57
57
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as X, ref as y, watch as
|
|
2
|
-
import { onClickOutside as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { useFocusTrap as
|
|
5
|
-
import { closeIcon as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as X, ref as y, watch as S, nextTick as H, useSlots as M, computed as j, openBlock as t, createBlock as v, Teleport as q, createElementBlock as r, normalizeStyle as K, unref as o, normalizeClass as l, createCommentVNode as a, createElementVNode as B, resolveDynamicComponent as L, withCtx as T, renderSlot as i, toDisplayString as h } from "vue";
|
|
2
|
+
import { onClickOutside as G, useEventListener as J } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
|
|
3
|
+
import { useTheme as Q } from "../../composables/useTheme.js";
|
|
4
|
+
import { useFocusTrap as U } from "../../composables/useFocusTrap.js";
|
|
5
|
+
import { closeIcon as Y } from "../../common/icons.js";
|
|
6
|
+
import Z from "../button/Button.vue.js";
|
|
7
|
+
import _ from "../scroll/Scroll.vue.js";
|
|
8
|
+
import x from "../form/Form.vue.js";
|
|
9
|
+
const ee = { key: 0 }, oe = ["xs", "sm", "md", "lg", "xl", "full"], te = ["top", "center", "bottom"], le = {
|
|
10
10
|
size: {
|
|
11
11
|
type: String,
|
|
12
12
|
default: "lg"
|
|
@@ -49,35 +49,39 @@ const x = { key: 0 }, ee = ["xs", "sm", "md", "lg", "xl", "full"], oe = ["top",
|
|
|
49
49
|
default: () => []
|
|
50
50
|
},
|
|
51
51
|
persistent: Boolean
|
|
52
|
-
},
|
|
52
|
+
}, se = {
|
|
53
53
|
name: "XModal",
|
|
54
54
|
validators: {
|
|
55
|
-
size:
|
|
56
|
-
position:
|
|
55
|
+
size: oe,
|
|
56
|
+
position: te
|
|
57
57
|
}
|
|
58
|
-
},
|
|
59
|
-
...
|
|
60
|
-
props:
|
|
58
|
+
}, pe = /* @__PURE__ */ X({
|
|
59
|
+
...se,
|
|
60
|
+
props: le,
|
|
61
61
|
emits: ["update:modelValue", "submit"],
|
|
62
|
-
setup(
|
|
63
|
-
const d =
|
|
62
|
+
setup($, { expose: V, emit: C }) {
|
|
63
|
+
const d = $, k = C, c = y(d.modelValue), u = y(!1), b = y(null), E = y(null), { initFocusTrap: z, clearFocusTrap: A } = U();
|
|
64
64
|
let m;
|
|
65
|
-
|
|
65
|
+
S(c, (e) => {
|
|
66
66
|
m && (m(), m = void 0), e && setTimeout(() => {
|
|
67
|
-
m =
|
|
67
|
+
m = G(b, F, {
|
|
68
68
|
ignore: [".v-popper__popper"]
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
|
-
})
|
|
71
|
+
});
|
|
72
|
+
let g;
|
|
73
|
+
S(() => d.modelValue, D, { immediate: !0 });
|
|
72
74
|
async function D() {
|
|
73
75
|
const e = d.modelValue;
|
|
74
76
|
if (e) {
|
|
75
77
|
const n = window.innerWidth - document.documentElement.clientWidth;
|
|
76
|
-
c.value = e, await
|
|
78
|
+
c.value = e, await H(), u.value = e, g = setTimeout(() => {
|
|
79
|
+
z(b);
|
|
80
|
+
}, 100), document.body.style.paddingRight = `${n}px`, document.body.style.overflow = "hidden";
|
|
77
81
|
} else
|
|
78
|
-
u.value = e, c.value = e, A(), document.body.style.paddingRight = "", document.body.style.overflow = "auto";
|
|
82
|
+
u.value = e, c.value = e, clearTimeout(g), A(), document.body.style.paddingRight = "", document.body.style.overflow = "auto";
|
|
79
83
|
}
|
|
80
|
-
typeof window < "u" &&
|
|
84
|
+
typeof window < "u" && J(document, "keydown", W);
|
|
81
85
|
const R = (e) => [".v-popper__popper", ".x-datepicker"].some((n) => typeof n == "string" ? Array.from(window.document.querySelectorAll(n)).some((f) => f === e.target || e.composedPath().includes(f)) : !1);
|
|
82
86
|
function W(e) {
|
|
83
87
|
e.key === "Escape" && !R(e) && c.value && !d.persistent && p();
|
|
@@ -93,15 +97,15 @@ const x = { key: 0 }, ee = ["xs", "sm", "md", "lg", "xl", "full"], oe = ["top",
|
|
|
93
97
|
function O() {
|
|
94
98
|
k("update:modelValue", !0), u.value = !0;
|
|
95
99
|
}
|
|
96
|
-
const
|
|
100
|
+
const w = M(), P = j(() => !!(w["tertiary-action"] || w["cancel-action"])), { styles: I, classes: s, className: N } = Q("Modal", {}, d, {
|
|
97
101
|
visible: u
|
|
98
102
|
});
|
|
99
|
-
return
|
|
103
|
+
return V({ open: O, close: p }), (e, n) => (t(), v(q, { to: "body" }, [
|
|
100
104
|
c.value ? (t(), r("div", {
|
|
101
105
|
key: 0,
|
|
102
106
|
ref_key: "modalWrapperRef",
|
|
103
107
|
ref: E,
|
|
104
|
-
style:
|
|
108
|
+
style: K(o(I)),
|
|
105
109
|
class: l([
|
|
106
110
|
o(N),
|
|
107
111
|
o(s).wrapper,
|
|
@@ -115,7 +119,7 @@ const x = { key: 0 }, ee = ["xs", "sm", "md", "lg", "xl", "full"], oe = ["top",
|
|
|
115
119
|
B("div", {
|
|
116
120
|
class: l(o(s).modalWrapper)
|
|
117
121
|
}, [
|
|
118
|
-
(t(), v(
|
|
122
|
+
(t(), v(L(e.isForm ? x : "div"), {
|
|
119
123
|
ref_key: "modalRef",
|
|
120
124
|
ref: b,
|
|
121
125
|
class: l(["max-h-full", o(s).modal]),
|
|
@@ -131,7 +135,7 @@ const x = { key: 0 }, ee = ["xs", "sm", "md", "lg", "xl", "full"], oe = ["top",
|
|
|
131
135
|
"aria-labelledby": "modal-headline",
|
|
132
136
|
onSubmit: n[0] || (n[0] = (f) => e.$emit("submit", f))
|
|
133
137
|
}, {
|
|
134
|
-
default:
|
|
138
|
+
default: T(() => [
|
|
135
139
|
i(e.$slots, "image"),
|
|
136
140
|
i(e.$slots, "header", {}, () => [
|
|
137
141
|
e.hasHeader ? (t(), r("div", {
|
|
@@ -150,7 +154,7 @@ const x = { key: 0 }, ee = ["xs", "sm", "md", "lg", "xl", "full"], oe = ["top",
|
|
|
150
154
|
])
|
|
151
155
|
], 2)) : a("", !0)
|
|
152
156
|
]),
|
|
153
|
-
e.$slots.default ? (t(), v(
|
|
157
|
+
e.$slots.default ? (t(), v(_, {
|
|
154
158
|
key: 0,
|
|
155
159
|
scrollbar: !1,
|
|
156
160
|
class: l({
|
|
@@ -158,7 +162,7 @@ const x = { key: 0 }, ee = ["xs", "sm", "md", "lg", "xl", "full"], oe = ["top",
|
|
|
158
162
|
}),
|
|
159
163
|
vertical: ""
|
|
160
164
|
}, {
|
|
161
|
-
default:
|
|
165
|
+
default: T(() => [
|
|
162
166
|
B("div", {
|
|
163
167
|
class: l(o(s).content)
|
|
164
168
|
}, [
|
|
@@ -171,12 +175,12 @@ const x = { key: 0 }, ee = ["xs", "sm", "md", "lg", "xl", "full"], oe = ["top",
|
|
|
171
175
|
]),
|
|
172
176
|
_: 3
|
|
173
177
|
}, 8, ["class"])) : a("", !0),
|
|
174
|
-
e.showClose ? (t(), v(
|
|
178
|
+
e.showClose ? (t(), v(Z, {
|
|
175
179
|
key: 1,
|
|
176
180
|
ghost: "",
|
|
177
181
|
size: "sm",
|
|
178
182
|
tabindex: "-1",
|
|
179
|
-
icon: o(
|
|
183
|
+
icon: o(Y),
|
|
180
184
|
class: l(o(s).closeIcon),
|
|
181
185
|
onClick: p
|
|
182
186
|
}, null, 8, ["icon", "class"])) : a("", !0),
|
|
@@ -187,7 +191,7 @@ const x = { key: 0 }, ee = ["xs", "sm", "md", "lg", "xl", "full"], oe = ["top",
|
|
|
187
191
|
}, [
|
|
188
192
|
i(e.$slots, "actions", {}, () => [
|
|
189
193
|
i(e.$slots, "cancel-action"),
|
|
190
|
-
P.value ? (t(), r("div",
|
|
194
|
+
P.value ? (t(), r("div", ee)) : a("", !0),
|
|
191
195
|
i(e.$slots, "tertiary-action"),
|
|
192
196
|
i(e.$slots, "secondary-action"),
|
|
193
197
|
i(e.$slots, "primary-action")
|
|
@@ -203,5 +207,5 @@ const x = { key: 0 }, ee = ["xs", "sm", "md", "lg", "xl", "full"], oe = ["top",
|
|
|
203
207
|
}
|
|
204
208
|
});
|
|
205
209
|
export {
|
|
206
|
-
|
|
210
|
+
pe as default
|
|
207
211
|
};
|
|
@@ -27,6 +27,10 @@ declare const notificationsProps: {
|
|
|
27
27
|
type: (SymbolConstructor | StringConstructor)[];
|
|
28
28
|
default: import("vue").InjectionKey<NotificationInjection>;
|
|
29
29
|
};
|
|
30
|
+
offset: {
|
|
31
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
30
34
|
color: {
|
|
31
35
|
readonly type: StringConstructor;
|
|
32
36
|
readonly default: string | undefined;
|
|
@@ -97,6 +101,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
97
101
|
type: (SymbolConstructor | StringConstructor)[];
|
|
98
102
|
default: import("vue").InjectionKey<NotificationInjection>;
|
|
99
103
|
};
|
|
104
|
+
offset: {
|
|
105
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
106
|
+
default: number;
|
|
107
|
+
};
|
|
100
108
|
color: {
|
|
101
109
|
readonly type: StringConstructor;
|
|
102
110
|
readonly default: string | undefined;
|
|
@@ -135,6 +143,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
135
143
|
type: (SymbolConstructor | StringConstructor)[];
|
|
136
144
|
default: import("vue").InjectionKey<NotificationInjection>;
|
|
137
145
|
};
|
|
146
|
+
offset: {
|
|
147
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
148
|
+
default: number;
|
|
149
|
+
};
|
|
138
150
|
color: {
|
|
139
151
|
readonly type: StringConstructor;
|
|
140
152
|
readonly default: string | undefined;
|
|
@@ -144,6 +156,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<im
|
|
|
144
156
|
color: string;
|
|
145
157
|
position: "top" | "bottom";
|
|
146
158
|
align: "left" | "right";
|
|
159
|
+
offset: string | number;
|
|
147
160
|
timeout: number;
|
|
148
161
|
pauseOnHover: boolean;
|
|
149
162
|
injectKey: string | symbol;
|