iryx-ui 0.10.1 → 0.10.2
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.
|
@@ -2,10 +2,10 @@ import { Cancel01Icon as e } from "../node_modules/.pnpm/@hugeicons_core-free-ic
|
|
|
2
2
|
import { useIryxUiConfig as t } from "../config.js";
|
|
3
3
|
import n from "./Icon.js";
|
|
4
4
|
import { dialogTheme as r } from "../theme/dialog.js";
|
|
5
|
-
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f,
|
|
6
|
-
import { DialogContent as
|
|
5
|
+
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, normalizeClass as m, openBlock as h, renderSlot as g, toDisplayString as _, unref as v, useModel as y, useSlots as b, withCtx as x } from "vue";
|
|
6
|
+
import { DialogContent as S, DialogDescription as C, DialogOverlay as w, DialogPortal as T, DialogRoot as E, DialogTitle as D, DialogTrigger as O, VisuallyHidden as k } from "reka-ui";
|
|
7
7
|
//#region src/components/Dialog.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var A = ["aria-label"], j = /*@__PURE__*/ d({
|
|
9
9
|
__name: "Dialog",
|
|
10
10
|
props: /*@__PURE__*/ f({
|
|
11
11
|
title: {},
|
|
@@ -35,63 +35,60 @@ var k = ["aria-label"], A = /*@__PURE__*/ d({
|
|
|
35
35
|
}),
|
|
36
36
|
emits: ["update:open"],
|
|
37
37
|
setup(d) {
|
|
38
|
-
let f = d,
|
|
39
|
-
function
|
|
40
|
-
!e && !f.dismissible || (
|
|
38
|
+
let f = d, j = y(d, "open"), M = t(), N = i(() => f.unstyled ?? M.unstyled), P = i(() => r({ size: f.size })), F = i(() => N.value ? f.ui?.overlay : P.value.overlay({ class: f.ui?.overlay })), I = i(() => N.value ? [f.ui?.content, f.class] : P.value.content({ class: [f.ui?.content, f.class] })), L = i(() => N.value ? f.ui?.header : P.value.header({ class: f.ui?.header })), R = i(() => N.value ? f.ui?.title : P.value.title({ class: f.ui?.title })), z = i(() => N.value ? f.ui?.description : P.value.description({ class: f.ui?.description })), B = b(), V = i(() => f.description || B.description ? {} : { "aria-describedby": void 0 }), H = i(() => N.value ? f.ui?.body : P.value.body({ class: f.ui?.body })), U = i(() => N.value ? f.ui?.footer : P.value.footer({ class: f.ui?.footer })), W = i(() => N.value ? f.ui?.close : P.value.close({ class: f.ui?.close }));
|
|
39
|
+
function G(e) {
|
|
40
|
+
!e && !f.dismissible || (j.value = e);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
42
|
+
function K() {
|
|
43
|
+
j.value = !1;
|
|
44
44
|
}
|
|
45
|
-
return (t, r) => (
|
|
46
|
-
open:
|
|
47
|
-
"onUpdate:open":
|
|
45
|
+
return (t, r) => (h(), a(v(E), {
|
|
46
|
+
open: j.value,
|
|
47
|
+
"onUpdate:open": G
|
|
48
48
|
}, {
|
|
49
|
-
default:
|
|
49
|
+
default: x(() => [t.$slots.trigger ? (h(), a(v(O), {
|
|
50
50
|
key: 0,
|
|
51
51
|
"as-child": ""
|
|
52
52
|
}, {
|
|
53
|
-
default:
|
|
53
|
+
default: x(() => [g(t.$slots, "trigger")]),
|
|
54
54
|
_: 3
|
|
55
|
-
})) : o("", !0), u(
|
|
56
|
-
default:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, {
|
|
60
|
-
default: b(() => [
|
|
61
|
-
f.title || f.description || t.$slots.header ? (m(), s("div", {
|
|
55
|
+
})) : o("", !0), u(v(T), null, {
|
|
56
|
+
default: x(() => [u(v(w), { class: m(F.value) }, null, 8, ["class"]), u(v(S), p({ class: I.value }, V.value), {
|
|
57
|
+
default: x(() => [
|
|
58
|
+
f.title || f.description || t.$slots.header ? (h(), s("div", {
|
|
62
59
|
key: 0,
|
|
63
|
-
class:
|
|
64
|
-
}, [
|
|
65
|
-
default:
|
|
60
|
+
class: m(L.value)
|
|
61
|
+
}, [g(t.$slots, "header", {}, () => [u(v(D), { class: m(R.value) }, {
|
|
62
|
+
default: x(() => [g(t.$slots, "title", {}, () => [l(_(f.title), 1)])]),
|
|
66
63
|
_: 3
|
|
67
|
-
}, 8, ["class"]), f.description || t.$slots.description ? (
|
|
64
|
+
}, 8, ["class"]), f.description || t.$slots.description ? (h(), a(v(C), {
|
|
68
65
|
key: 0,
|
|
69
|
-
class:
|
|
66
|
+
class: m(z.value)
|
|
70
67
|
}, {
|
|
71
|
-
default:
|
|
68
|
+
default: x(() => [g(t.$slots, "description", {}, () => [l(_(f.description), 1)])]),
|
|
72
69
|
_: 3
|
|
73
|
-
}, 8, ["class"])) : o("", !0)])], 2)) : (
|
|
74
|
-
default:
|
|
75
|
-
default:
|
|
70
|
+
}, 8, ["class"])) : o("", !0)])], 2)) : (h(), a(v(k), { key: 1 }, {
|
|
71
|
+
default: x(() => [u(v(D), null, {
|
|
72
|
+
default: x(() => [l(_(f.closeLabel), 1)]),
|
|
76
73
|
_: 1
|
|
77
74
|
})]),
|
|
78
75
|
_: 1
|
|
79
76
|
})),
|
|
80
|
-
c("div", { class:
|
|
81
|
-
t.$slots.footer ? (
|
|
77
|
+
c("div", { class: m(H.value) }, [g(t.$slots, "default")], 2),
|
|
78
|
+
t.$slots.footer ? (h(), s("div", {
|
|
82
79
|
key: 2,
|
|
83
|
-
class:
|
|
84
|
-
}, [
|
|
85
|
-
f.showClose ? (
|
|
80
|
+
class: m(U.value)
|
|
81
|
+
}, [g(t.$slots, "footer", { close: K })], 2)) : o("", !0),
|
|
82
|
+
f.showClose ? (h(), s("button", {
|
|
86
83
|
key: 3,
|
|
87
84
|
type: "button",
|
|
88
85
|
"aria-label": f.closeLabel,
|
|
89
|
-
class:
|
|
90
|
-
onClick:
|
|
91
|
-
}, [u(n, { icon:
|
|
86
|
+
class: m(W.value),
|
|
87
|
+
onClick: K
|
|
88
|
+
}, [u(n, { icon: v(e) }, null, 8, ["icon"])], 10, A)) : o("", !0)
|
|
92
89
|
]),
|
|
93
90
|
_: 3
|
|
94
|
-
},
|
|
91
|
+
}, 16, ["class"])]),
|
|
95
92
|
_: 3
|
|
96
93
|
})]),
|
|
97
94
|
_: 3
|
|
@@ -99,4 +96,4 @@ var k = ["aria-label"], A = /*@__PURE__*/ d({
|
|
|
99
96
|
}
|
|
100
97
|
});
|
|
101
98
|
//#endregion
|
|
102
|
-
export {
|
|
99
|
+
export { j as default };
|