@alfakit/vue 0.1.1 → 0.1.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.
- package/CHANGELOG.md +8 -0
- package/dist/components/actions/ActionButton.js.map +1 -1
- package/dist/components/actions/ActionButton.vue.d.ts.map +1 -1
- package/dist/components/actions/ActionButton.vue_vue_type_script_setup_true_lang.js +160 -159
- package/dist/components/actions/ActionButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/actions/ActionModal.js.map +1 -1
- package/dist/components/actions/ActionModal.vue.d.ts.map +1 -1
- package/dist/components/actions/ActionModal.vue_vue_type_script_setup_true_lang.js +214 -214
- package/dist/components/actions/ActionModal.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/ColorPickerField.js.map +1 -1
- package/dist/components/fields/ColorPickerField.vue.d.ts.map +1 -1
- package/dist/components/fields/ColorPickerField.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/components/fields/ColorPickerField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/ComboboxSelect.js.map +1 -1
- package/dist/components/fields/ComboboxSelect.vue.d.ts.map +1 -1
- package/dist/components/fields/ComboboxSelect.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/fields/ComboboxSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/FileUploadField.js.map +1 -1
- package/dist/components/fields/FileUploadField.vue.d.ts.map +1 -1
- package/dist/components/fields/FileUploadField.vue_vue_type_script_setup_true_lang.js +183 -183
- package/dist/components/fields/FileUploadField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/OneTimeCodeInputField.js.map +1 -1
- package/dist/components/fields/OneTimeCodeInputField.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/components/fields/OneTimeCodeInputField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/SelectField.js.map +1 -1
- package/dist/components/fields/SelectField.vue.d.ts.map +1 -1
- package/dist/components/fields/SelectField.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/fields/SelectField.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/fields/TableColumnHeaders.js.map +1 -1
- package/dist/components/fields/TableColumnHeaders.vue.d.ts.map +1 -1
- package/dist/components/fields/TableColumnHeaders.vue_vue_type_script_setup_true_lang.js +6 -3
- package/dist/components/fields/TableColumnHeaders.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/file-manager/FileManagerView.js.map +1 -1
- package/dist/components/file-manager/FileManagerView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/file-manager/FileManagerView.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/form/FormBlock.js.map +1 -1
- package/dist/components/form/FormBlock.vue.d.ts.map +1 -1
- package/dist/components/form/FormBlock.vue_vue_type_script_setup_true_lang.js +81 -77
- package/dist/components/form/FormBlock.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/form/form-context.js +25 -25
- package/dist/components/form/form-context.js.map +1 -1
- package/dist/components/layout/FusedGroupComponent.js.map +1 -1
- package/dist/components/layout/FusedGroupComponent.vue.d.ts.map +1 -1
- package/dist/components/layout/FusedGroupComponent.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/components/layout/FusedGroupComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/layout/TabsComponent.js.map +1 -1
- package/dist/components/layout/TabsComponent.vue.d.ts.map +1 -1
- package/dist/components/layout/TabsComponent.vue_vue_type_script_setup_true_lang.js +76 -55
- package/dist/components/layout/TabsComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/notifications/NotificationsMenu.js.map +1 -1
- package/dist/components/notifications/NotificationsMenu.vue.d.ts.map +1 -1
- package/dist/components/notifications/NotificationsMenu.vue_vue_type_script_setup_true_lang.js +44 -42
- package/dist/components/notifications/NotificationsMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/GlobalSearch.js.map +1 -1
- package/dist/components/panel/GlobalSearch.vue.d.ts.map +1 -1
- package/dist/components/panel/GlobalSearch.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/components/panel/GlobalSearch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/ShortcutKeys.js.map +1 -1
- package/dist/components/panel/ShortcutKeys.vue.d.ts.map +1 -1
- package/dist/components/panel/ShortcutKeys.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/panel/ShortcutKeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/panel/TenantMenu.js.map +1 -1
- package/dist/components/panel/TenantMenu.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/panel/TenantMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/GroupHeaderRow.js.map +1 -1
- package/dist/components/table/GroupHeaderRow.vue.d.ts.map +1 -1
- package/dist/components/table/GroupHeaderRow.vue_vue_type_script_setup_true_lang.js +55 -34
- package/dist/components/table/GroupHeaderRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/SelectCell.js.map +1 -1
- package/dist/components/table/SelectCell.vue.d.ts.map +1 -1
- package/dist/components/table/SelectCell.vue_vue_type_script_setup_true_lang.js +24 -19
- package/dist/components/table/SelectCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/table/TextInputCell.js.map +1 -1
- package/dist/components/table/TextInputCell.vue.d.ts.map +1 -1
- package/dist/components/table/TextInputCell.vue_vue_type_script_setup_true_lang.js +38 -33
- package/dist/components/table/TextInputCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components.css +347 -0
- package/dist/eject-manifest.json +2 -2
- package/dist/standalone/AlfakitToaster.js.map +1 -1
- package/dist/standalone/AlfakitToaster.vue.d.ts.map +1 -1
- package/dist/standalone/AlfakitToaster.vue_vue_type_script_setup_true_lang.js +23 -15
- package/dist/standalone/AlfakitToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/standalone.css +47 -0
- package/dist/starter-kit/widgets/SearchTrigger.js.map +1 -1
- package/dist/starter-kit/widgets/SearchTrigger.vue.d.ts.map +1 -1
- package/dist/starter-kit/widgets/SearchTrigger.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/starter-kit/widgets/SearchTrigger.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/starter-kit/widgets/TenantChooser.js.map +1 -1
- package/dist/starter-kit/widgets/TenantChooser.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/starter-kit/widgets/TenantChooser.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/themes.css +2 -334
- package/package.json +3 -3
- package/src/components/actions/ActionButton.vue +14 -6
- package/src/components/actions/ActionModal.vue +3 -1
- package/src/components/fields/ColorPickerField.vue +1 -0
- package/src/components/fields/ComboboxSelect.vue +1 -1
- package/src/components/fields/FileUploadField.vue +14 -11
- package/src/components/fields/OneTimeCodeInputField.vue +1 -1
- package/src/components/fields/SelectField.vue +4 -2
- package/src/components/fields/TableColumnHeaders.vue +6 -1
- package/src/components/file-manager/FileManagerView.vue +1 -1
- package/src/components/form/FormBlock.vue +24 -0
- package/src/components/form/form-context.ts +2 -2
- package/src/components/layout/FusedGroupComponent.vue +1 -0
- package/src/components/layout/TabsComponent.vue +61 -5
- package/src/components/notifications/NotificationsMenu.vue +11 -0
- package/src/components/panel/GlobalSearch.vue +1 -0
- package/src/components/panel/ShortcutKeys.vue +1 -0
- package/src/components/panel/TenantMenu.vue +2 -2
- package/src/components/table/GroupHeaderRow.vue +27 -0
- package/src/components/table/SelectCell.vue +5 -2
- package/src/components/table/TextInputCell.vue +11 -5
- package/src/standalone/AlfakitToaster.vue +12 -2
- package/src/starter-kit/widgets/SearchTrigger.vue +1 -0
- package/src/starter-kit/widgets/TenantChooser.vue +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { useActionRunner as e, useDirection as t, usePanel as n, useT as r } from "../../context.js";
|
|
2
2
|
import { cn as i } from "../../lib/utils.js";
|
|
3
|
-
import { useStore as
|
|
4
|
-
import { colorClass as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { provideForm as
|
|
10
|
-
import
|
|
11
|
-
import { showToast as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import { FormStore as
|
|
27
|
-
import { computed as
|
|
3
|
+
import { useStore as ee } from "../../composables/use-store.js";
|
|
4
|
+
import { colorClass as a, iconBackgroundColorClasses as o, outlineButtonColorClasses as s, solidButtonColorClasses as c } from "../../lib/colors.js";
|
|
5
|
+
import l from "../../lib/Icon.js";
|
|
6
|
+
import u from "../ui/Button2.js";
|
|
7
|
+
import d from "../ui/Spinner.js";
|
|
8
|
+
import f from "./ActionList.js";
|
|
9
|
+
import { provideForm as te } from "../form/form-context.js";
|
|
10
|
+
import p from "../schema/SchemaRenderer.js";
|
|
11
|
+
import { showToast as ne } from "../notifications/flash-toasts.js";
|
|
12
|
+
import m from "../panel/Slot.js";
|
|
13
|
+
import re from "../ui/Dialog.js";
|
|
14
|
+
import ie from "../ui/DialogContent.js";
|
|
15
|
+
import h from "../ui/DialogDescription.js";
|
|
16
|
+
import ae from "../ui/DialogHeader.js";
|
|
17
|
+
import oe from "../ui/DialogTitle.js";
|
|
18
|
+
import se from "../ui/Sheet.js";
|
|
19
|
+
import ce from "../ui/SheetContent.js";
|
|
20
|
+
import g from "../ui/SheetDescription.js";
|
|
21
|
+
import le from "../ui/SheetHeader.js";
|
|
22
|
+
import ue from "../ui/SheetTitle.js";
|
|
23
|
+
import de from "../ui/DialogFooter.js";
|
|
24
|
+
import fe from "../ui/SheetFooter.js";
|
|
25
|
+
import _ from "./ActionModalPassword.js";
|
|
26
|
+
import { FormStore as pe, PASSWORD_CONFIRMATION_INPUT as me, actionFormComponent as he, actionFormParams as ge, confirmModalClose as _e, formIdPrefix as ve, guardModalUnload as ye, isModalSubmitVisible as be, modalFooterAlignment as xe, nestedActionContext as Se, scheduleAutofocus as Ce, slideOverSide as we, wizardProgressStore as Te } from "@alfakit/core";
|
|
27
|
+
import { computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as w, defineComponent as T, nextTick as E, normalizeClass as D, onMounted as Ee, onScopeDispose as O, openBlock as k, ref as De, toDisplayString as A, unref as j, useId as Oe, watch as M, withCtx as N, withModifiers as P } from "vue";
|
|
28
28
|
//#region src/components/actions/ActionModal.vue?vue&type=script&setup=true&lang.ts
|
|
29
|
-
var
|
|
29
|
+
var ke = ["data-alfakit-modal"], Ae = { class: "flex flex-col gap-1.5" }, je = ["innerHTML"], Me = { class: "flex-1 overflow-y-auto p-4" }, Ne = { class: "flex flex-col gap-6" }, Pe = ["id"], Fe = ["data-alfakit-modal"], Ie = { class: "flex flex-col gap-1.5" }, Le = ["innerHTML"], Re = {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "flex flex-col gap-6"
|
|
32
|
-
},
|
|
32
|
+
}, ze = ["id"], F = /*@__PURE__*/ T({
|
|
33
33
|
__name: "ActionModal",
|
|
34
34
|
props: {
|
|
35
35
|
modal: {},
|
|
@@ -38,8 +38,8 @@ var De = ["data-alfakit-modal"], Oe = { class: "flex flex-col gap-1.5" }, ke = [
|
|
|
38
38
|
default: !1
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
-
setup(
|
|
42
|
-
let
|
|
41
|
+
setup(T) {
|
|
42
|
+
let F = {
|
|
43
43
|
"3xs": "sm:max-w-3xs",
|
|
44
44
|
"2xs": "sm:max-w-2xs",
|
|
45
45
|
xs: "sm:max-w-xs",
|
|
@@ -66,192 +66,193 @@ var De = ["data-alfakit-modal"], Oe = { class: "flex flex-col gap-1.5" }, ke = [
|
|
|
66
66
|
"screen-2xl": "sm:max-w-(--breakpoint-2xl)",
|
|
67
67
|
full: "sm:max-w-[calc(100%-2rem)]",
|
|
68
68
|
screen: "sm:max-w-[calc(100%-2rem)] h-[calc(100%-2rem)]"
|
|
69
|
-
},
|
|
69
|
+
}, Be = {
|
|
70
70
|
start: "sm:justify-start",
|
|
71
71
|
center: "sm:justify-center",
|
|
72
72
|
end: "sm:justify-end",
|
|
73
73
|
between: "sm:justify-between"
|
|
74
|
-
},
|
|
75
|
-
token:
|
|
76
|
-
component:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
}, I = T, L = e(), R = n(), Ve = t(), z = r(), B = I.modal.action, V = I.modal.context, H = v(() => I.modal.modal), U = H.value.form ? new pe(H.value.form, {
|
|
75
|
+
token: V.token,
|
|
76
|
+
component: he(B, V),
|
|
77
|
+
idPrefix: ve(he(B, V)),
|
|
78
|
+
record: V.record ?? null,
|
|
79
|
+
refreshUrl: R.value.endpoints.schemaRefresh,
|
|
80
|
+
optionsUrl: R.value.endpoints.schemaOptions,
|
|
81
|
+
validateUrl: R.value.endpoints.schemaValidate,
|
|
82
|
+
onNotifications: (e) => e.forEach((e) => ne(e)),
|
|
83
|
+
params: ge(V)
|
|
83
84
|
}) : null;
|
|
84
|
-
|
|
85
|
-
let
|
|
86
|
-
|
|
87
|
-
let
|
|
88
|
-
let { class: e, ...t } =
|
|
85
|
+
U && te(U);
|
|
86
|
+
let W = U ? ee(U.store) : null;
|
|
87
|
+
M(() => I.modal.errors, (e) => U?.setErrors(e), { immediate: !0 }), O(() => U?.destroy()), U && O(L.registerModalForm(B, V, U));
|
|
88
|
+
let G = v(() => H.value.windowAttributes?.class), He = v(() => {
|
|
89
|
+
let { class: e, ...t } = H.value.windowAttributes ?? {};
|
|
89
90
|
return t;
|
|
90
|
-
}), K =
|
|
91
|
+
}), K = Oe(), Ue = (e, t) => {
|
|
91
92
|
for (let [n, r] of Object.entries(t)) r != null && r !== !1 && (n === "class" ? e.classList.add(...String(r).split(/\s+/).filter(Boolean)) : e.setAttribute(n, r === !0 ? "" : String(r)));
|
|
92
93
|
}, We = () => {
|
|
93
|
-
if (
|
|
94
|
+
if (I.hidden || typeof document > "u") return;
|
|
94
95
|
let e = document.querySelector(`[data-alfakit-modal="${K}"]`)?.closest("[role=\"dialog\"]"), t = e?.previousElementSibling;
|
|
95
|
-
e && Ue(e, He.value), t?.getAttribute("data-slot")?.endsWith("-overlay") &&
|
|
96
|
+
e && Ue(e, He.value), t?.getAttribute("data-slot")?.endsWith("-overlay") && H.value.overlayAttributes && Ue(t, H.value.overlayAttributes);
|
|
96
97
|
};
|
|
97
|
-
|
|
98
|
-
let Ge =
|
|
99
|
-
let t =
|
|
100
|
-
...
|
|
98
|
+
Ee(() => void E(We)), M(() => I.hidden, () => void E(We), { flush: "post" });
|
|
99
|
+
let Ge = v(() => Be[xe(H.value)]), Ke = v(() => xe(H.value) === "end" ? "sm:me-auto" : void 0), qe = v(() => we(H.value.slideOverPosition, Ve.value)), Je = U ? ee(Te(U)) : null, q = v(() => be(H.value, Je?.value)), J = De(""), Ye = v(() => I.modal.errors[me]?.[0]), Xe = Se(V, B), Ze = (e) => {
|
|
100
|
+
let t = U?.state.values ?? {}, n = {
|
|
101
|
+
...H.value.passwordConfirmation ? { password: J.value } : {},
|
|
101
102
|
...e ? { createAnother: !0 } : {}
|
|
102
103
|
};
|
|
103
|
-
Object.keys(n).length > 0 ?
|
|
104
|
+
Object.keys(n).length > 0 ? L.execute(B, V, t, n) : L.execute(B, V, t);
|
|
104
105
|
}, Y = () => Ze(!1), X = () => Ze(!0);
|
|
105
|
-
|
|
106
|
-
e && e !== t &&
|
|
107
|
-
}),
|
|
108
|
-
let r =
|
|
109
|
-
e && r && n(
|
|
106
|
+
M(() => H.value.form, (e, t) => {
|
|
107
|
+
e && e !== t && U?.fill(e);
|
|
108
|
+
}), M(() => I.modal.refocus, (e, t, n) => {
|
|
109
|
+
let r = H.value.form?.components;
|
|
110
|
+
e && r && n(Ce(() => document.getElementById(`action-form-${B.name}`), r));
|
|
110
111
|
});
|
|
111
|
-
let Qe = () =>
|
|
112
|
-
|
|
112
|
+
let Qe = () => L.cancelModal(B.name), $e = z("unsaved_changes_close", {}, "You have unsaved changes. Close anyway?"), Z = () => {
|
|
113
|
+
_e(H.value, U, $e) && Qe();
|
|
113
114
|
};
|
|
114
|
-
|
|
115
|
-
let et =
|
|
116
|
-
!e && !
|
|
117
|
-
}, $ =
|
|
118
|
-
return (e, t) =>
|
|
115
|
+
O(ye(H.value, U, $e));
|
|
116
|
+
let et = v(() => H.value.cancelColor ? a(s, H.value.cancelColor) : ""), tt = v(() => H.value.createAnotherColor ? a(s, H.value.createAnotherColor) : ""), Q = v(() => H.value.heading ?? B.label ?? z("actions", {}, "Actions")), nt = (e) => {
|
|
117
|
+
!e && !I.modal.processing && Z();
|
|
118
|
+
}, $ = v(() => !!(H.value.submitLabel || H.value.cancelLabel || H.value.extraFooterActions?.length)), rt = v(() => !!(H.value.content || U || H.value.contentFooter || H.value.passwordConfirmation));
|
|
119
|
+
return (e, t) => H.value.slideOver ? (k(), y(se, {
|
|
119
120
|
key: 0,
|
|
120
|
-
open: !
|
|
121
|
-
modal: !
|
|
121
|
+
open: !I.hidden,
|
|
122
|
+
modal: !H.value.clickThrough,
|
|
122
123
|
"onUpdate:open": nt
|
|
123
124
|
}, {
|
|
124
|
-
default:
|
|
125
|
+
default: N(() => [w(ce, {
|
|
125
126
|
side: qe.value,
|
|
126
|
-
class:
|
|
127
|
-
"show-close-button":
|
|
128
|
-
onInteractOutside: t[1] ||= (e) => !
|
|
129
|
-
onEscapeKeyDown: t[2] ||= (e) => !
|
|
127
|
+
class: D(j(i)("flex w-full flex-col gap-0 p-0", F[H.value.width] ?? "sm:max-w-md", G.value)),
|
|
128
|
+
"show-close-button": H.value.closeButton,
|
|
129
|
+
onInteractOutside: t[1] ||= (e) => !H.value.closeByClickingAway && e.preventDefault(),
|
|
130
|
+
onEscapeKeyDown: t[2] ||= (e) => !H.value.closeByEscaping && e.preventDefault()
|
|
130
131
|
}, {
|
|
131
|
-
default:
|
|
132
|
-
|
|
133
|
-
"data-alfakit-modal":
|
|
132
|
+
default: N(() => [
|
|
133
|
+
S("span", {
|
|
134
|
+
"data-alfakit-modal": j(K),
|
|
134
135
|
hidden: ""
|
|
135
|
-
}, null, 8,
|
|
136
|
-
|
|
137
|
-
default:
|
|
136
|
+
}, null, 8, ke),
|
|
137
|
+
w(le, { class: "border-b" }, {
|
|
138
|
+
default: N(() => [S("div", { class: D(j(i)("flex gap-4", H.value.alignment === "center" && "flex-col items-center text-center")) }, [H.value.icon ? (k(), x("div", {
|
|
138
139
|
key: 0,
|
|
139
|
-
class:
|
|
140
|
-
}, [
|
|
141
|
-
name:
|
|
140
|
+
class: D(j(i)("flex size-10 shrink-0 items-center justify-center rounded-full", j(a)(j(o), H.value.iconColor, "primary")))
|
|
141
|
+
}, [w(j(l), {
|
|
142
|
+
name: H.value.icon,
|
|
142
143
|
class: "size-5"
|
|
143
|
-
}, null, 8, ["name"])], 2)) :
|
|
144
|
-
default:
|
|
144
|
+
}, null, 8, ["name"])], 2)) : b("", !0), S("div", Ae, [w(ue, { class: D(j(i)(!H.value.heading && "sr-only")) }, {
|
|
145
|
+
default: N(() => [C(A(Q.value), 1)]),
|
|
145
146
|
_: 1
|
|
146
|
-
}, 8, ["class"]),
|
|
147
|
-
default:
|
|
147
|
+
}, 8, ["class"]), H.value.description ? (k(), y(g, { key: 0 }, {
|
|
148
|
+
default: N(() => [S("span", { innerHTML: H.value.description }, null, 8, je)]),
|
|
148
149
|
_: 1
|
|
149
|
-
})) : (
|
|
150
|
+
})) : (k(), y(g, {
|
|
150
151
|
key: 1,
|
|
151
152
|
class: "sr-only"
|
|
152
153
|
}, {
|
|
153
|
-
default:
|
|
154
|
+
default: N(() => [C(A(Q.value), 1)]),
|
|
154
155
|
_: 1
|
|
155
156
|
}))])], 2)]),
|
|
156
157
|
_: 1
|
|
157
158
|
}),
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
S("div", Me, [S("div", Ne, [
|
|
160
|
+
H.value.content ? (k(), y(p, {
|
|
160
161
|
key: 0,
|
|
161
|
-
components:
|
|
162
|
-
}, null, 8, ["components"])) :
|
|
163
|
-
|
|
162
|
+
components: H.value.content
|
|
163
|
+
}, null, 8, ["components"])) : b("", !0),
|
|
164
|
+
j(U) && j(W) ? (k(), y(m, {
|
|
164
165
|
key: 1,
|
|
165
166
|
name: "modal.schema.before",
|
|
166
|
-
data: { action:
|
|
167
|
-
}, null, 8, ["data"])) :
|
|
168
|
-
|
|
167
|
+
data: { action: j(B).name }
|
|
168
|
+
}, null, 8, ["data"])) : b("", !0),
|
|
169
|
+
j(U) && j(W) ? (k(), x("form", {
|
|
169
170
|
key: 2,
|
|
170
|
-
id: `action-form-${
|
|
171
|
-
onSubmit:
|
|
172
|
-
}, [
|
|
173
|
-
components:
|
|
174
|
-
columns:
|
|
175
|
-
}, null, 8, ["components", "columns"])], 40,
|
|
176
|
-
|
|
171
|
+
id: `action-form-${j(B).name}`,
|
|
172
|
+
onSubmit: P(Y, ["prevent"])
|
|
173
|
+
}, [w(p, {
|
|
174
|
+
components: j(W).components,
|
|
175
|
+
columns: j(W).columns
|
|
176
|
+
}, null, 8, ["components", "columns"])], 40, Pe)) : b("", !0),
|
|
177
|
+
j(U) && j(W) ? (k(), y(m, {
|
|
177
178
|
key: 3,
|
|
178
179
|
name: "modal.schema.after",
|
|
179
|
-
data: { action:
|
|
180
|
-
}, null, 8, ["data"])) :
|
|
181
|
-
|
|
180
|
+
data: { action: j(B).name }
|
|
181
|
+
}, null, 8, ["data"])) : b("", !0),
|
|
182
|
+
H.value.contentFooter ? (k(), y(p, {
|
|
182
183
|
key: 4,
|
|
183
|
-
components:
|
|
184
|
-
}, null, 8, ["components"])) :
|
|
185
|
-
|
|
184
|
+
components: H.value.contentFooter
|
|
185
|
+
}, null, 8, ["components"])) : b("", !0),
|
|
186
|
+
H.value.passwordConfirmation ? (k(), y(_, {
|
|
186
187
|
key: 5,
|
|
187
188
|
modelValue: J.value,
|
|
188
189
|
"onUpdate:modelValue": t[0] ||= (e) => J.value = e,
|
|
189
190
|
error: Ye.value,
|
|
190
191
|
onSubmit: Y
|
|
191
|
-
}, null, 8, ["modelValue", "error"])) :
|
|
192
|
+
}, null, 8, ["modelValue", "error"])) : b("", !0)
|
|
192
193
|
])]),
|
|
193
|
-
$.value ? (
|
|
194
|
+
$.value ? (k(), y(fe, {
|
|
194
195
|
key: 0,
|
|
195
|
-
class:
|
|
196
|
+
class: D(j(i)("border-t", H.value.stickyFooter && "bg-background sticky bottom-0"))
|
|
196
197
|
}, {
|
|
197
|
-
default:
|
|
198
|
-
|
|
198
|
+
default: N(() => [S("div", { class: D(j(i)("flex w-full flex-col-reverse gap-2 sm:flex-row sm:items-center", Ge.value)) }, [
|
|
199
|
+
H.value.extraFooterActions ? (k(), y(f, {
|
|
199
200
|
key: 0,
|
|
200
|
-
actions:
|
|
201
|
-
context:
|
|
202
|
-
class:
|
|
201
|
+
actions: H.value.extraFooterActions,
|
|
202
|
+
context: j(Xe),
|
|
203
|
+
class: D(Ke.value)
|
|
203
204
|
}, null, 8, [
|
|
204
205
|
"actions",
|
|
205
206
|
"context",
|
|
206
207
|
"class"
|
|
207
|
-
])) :
|
|
208
|
-
|
|
208
|
+
])) : b("", !0),
|
|
209
|
+
H.value.cancelLabel ? (k(), y(u, {
|
|
209
210
|
key: 1,
|
|
210
211
|
type: "button",
|
|
211
212
|
variant: "outline",
|
|
212
|
-
class:
|
|
213
|
-
disabled:
|
|
213
|
+
class: D(et.value),
|
|
214
|
+
disabled: I.modal.processing,
|
|
214
215
|
onClick: Z
|
|
215
216
|
}, {
|
|
216
|
-
default:
|
|
217
|
+
default: N(() => [C(A(H.value.cancelLabel), 1)]),
|
|
217
218
|
_: 1
|
|
218
|
-
}, 8, ["class", "disabled"])) :
|
|
219
|
-
|
|
219
|
+
}, 8, ["class", "disabled"])) : b("", !0),
|
|
220
|
+
H.value.createAnotherLabel && H.value.submitLabel && q.value ? (k(), y(u, {
|
|
220
221
|
key: 2,
|
|
221
222
|
type: "button",
|
|
222
223
|
variant: "outline",
|
|
223
224
|
"data-slot": "create-another",
|
|
224
|
-
class:
|
|
225
|
-
disabled:
|
|
225
|
+
class: D(tt.value),
|
|
226
|
+
disabled: I.modal.processing,
|
|
226
227
|
onClick: X
|
|
227
228
|
}, {
|
|
228
|
-
default:
|
|
229
|
+
default: N(() => [H.value.createAnotherIcon ? (k(), y(j(l), {
|
|
229
230
|
key: 0,
|
|
230
|
-
name:
|
|
231
|
-
}, null, 8, ["name"])) :
|
|
231
|
+
name: H.value.createAnotherIcon
|
|
232
|
+
}, null, 8, ["name"])) : b("", !0), C(A(H.value.createAnotherLabel), 1)]),
|
|
232
233
|
_: 1
|
|
233
|
-
}, 8, ["class", "disabled"])) :
|
|
234
|
-
|
|
234
|
+
}, 8, ["class", "disabled"])) : b("", !0),
|
|
235
|
+
H.value.submitLabel && q.value ? (k(), y(u, {
|
|
235
236
|
key: 3,
|
|
236
237
|
type: "button",
|
|
237
|
-
class:
|
|
238
|
-
disabled:
|
|
239
|
-
autofocus:
|
|
238
|
+
class: D(j(a)(j(c), H.value.submitColor, "primary")),
|
|
239
|
+
disabled: I.modal.processing,
|
|
240
|
+
autofocus: H.value.autofocus && !j(U),
|
|
240
241
|
onClick: Y
|
|
241
242
|
}, {
|
|
242
|
-
default:
|
|
243
|
+
default: N(() => [I.modal.processing ? (k(), y(d, { key: 0 })) : H.value.submitIcon ? (k(), y(j(l), {
|
|
243
244
|
key: 1,
|
|
244
|
-
name:
|
|
245
|
-
}, null, 8, ["name"])) :
|
|
245
|
+
name: H.value.submitIcon
|
|
246
|
+
}, null, 8, ["name"])) : b("", !0), C(" " + A(H.value.submitLabel), 1)]),
|
|
246
247
|
_: 1
|
|
247
248
|
}, 8, [
|
|
248
249
|
"class",
|
|
249
250
|
"disabled",
|
|
250
251
|
"autofocus"
|
|
251
|
-
])) :
|
|
252
|
+
])) : b("", !0)
|
|
252
253
|
], 2)]),
|
|
253
254
|
_: 1
|
|
254
|
-
}, 8, ["class"])) :
|
|
255
|
+
}, 8, ["class"])) : b("", !0)
|
|
255
256
|
]),
|
|
256
257
|
_: 1
|
|
257
258
|
}, 8, [
|
|
@@ -260,143 +261,142 @@ var De = ["data-alfakit-modal"], Oe = { class: "flex flex-col gap-1.5" }, ke = [
|
|
|
260
261
|
"show-close-button"
|
|
261
262
|
])]),
|
|
262
263
|
_: 1
|
|
263
|
-
}, 8, ["open", "modal"])) : (
|
|
264
|
+
}, 8, ["open", "modal"])) : (k(), y(re, {
|
|
264
265
|
key: 1,
|
|
265
|
-
open: !
|
|
266
|
-
modal: !
|
|
266
|
+
open: !I.hidden,
|
|
267
|
+
modal: !H.value.clickThrough,
|
|
267
268
|
"onUpdate:open": nt
|
|
268
269
|
}, {
|
|
269
|
-
default:
|
|
270
|
-
class:
|
|
271
|
-
"show-close-button":
|
|
272
|
-
onInteractOutside: t[4] ||= (e) => !
|
|
273
|
-
onEscapeKeyDown: t[5] ||= (e) => !
|
|
270
|
+
default: N(() => [w(ie, {
|
|
271
|
+
class: D(j(i)("max-h-[calc(100vh-2rem)] overflow-y-auto", F[H.value.width] ?? "sm:max-w-lg", G.value)),
|
|
272
|
+
"show-close-button": H.value.closeButton,
|
|
273
|
+
onInteractOutside: t[4] ||= (e) => !H.value.closeByClickingAway && e.preventDefault(),
|
|
274
|
+
onEscapeKeyDown: t[5] ||= (e) => !H.value.closeByEscaping && e.preventDefault()
|
|
274
275
|
}, {
|
|
275
|
-
default:
|
|
276
|
-
|
|
277
|
-
"data-alfakit-modal":
|
|
276
|
+
default: N(() => [
|
|
277
|
+
S("span", {
|
|
278
|
+
"data-alfakit-modal": j(K),
|
|
278
279
|
hidden: ""
|
|
279
|
-
}, null, 8,
|
|
280
|
-
|
|
281
|
-
default:
|
|
280
|
+
}, null, 8, Fe),
|
|
281
|
+
w(ae, { class: D(j(i)(H.value.stickyHeader && "bg-background sticky -top-6 z-10 -mx-6 -mt-6 rounded-t-lg border-b px-6 pt-6 pb-4")) }, {
|
|
282
|
+
default: N(() => [S("div", { class: D(j(i)("flex gap-4", H.value.alignment === "center" && "flex-col items-center text-center")) }, [H.value.icon ? (k(), x("div", {
|
|
282
283
|
key: 0,
|
|
283
|
-
class:
|
|
284
|
-
}, [
|
|
285
|
-
name:
|
|
284
|
+
class: D(j(i)("flex size-10 shrink-0 items-center justify-center rounded-full", j(a)(j(o), H.value.iconColor, "primary")))
|
|
285
|
+
}, [w(j(l), {
|
|
286
|
+
name: H.value.icon,
|
|
286
287
|
class: "size-5"
|
|
287
|
-
}, null, 8, ["name"])], 2)) :
|
|
288
|
-
default:
|
|
288
|
+
}, null, 8, ["name"])], 2)) : b("", !0), S("div", Ie, [w(oe, { class: D(j(i)(!H.value.heading && "sr-only")) }, {
|
|
289
|
+
default: N(() => [C(A(Q.value), 1)]),
|
|
289
290
|
_: 1
|
|
290
|
-
}, 8, ["class"]),
|
|
291
|
-
default:
|
|
291
|
+
}, 8, ["class"]), H.value.description ? (k(), y(h, { key: 0 }, {
|
|
292
|
+
default: N(() => [S("span", { innerHTML: H.value.description }, null, 8, Le)]),
|
|
292
293
|
_: 1
|
|
293
|
-
})) : (
|
|
294
|
+
})) : (k(), y(h, {
|
|
294
295
|
key: 1,
|
|
295
296
|
class: "sr-only"
|
|
296
297
|
}, {
|
|
297
|
-
default:
|
|
298
|
+
default: N(() => [C(A(Q.value), 1)]),
|
|
298
299
|
_: 1
|
|
299
300
|
}))])], 2)]),
|
|
300
301
|
_: 1
|
|
301
302
|
}, 8, ["class"]),
|
|
302
|
-
rt.value ? (
|
|
303
|
-
|
|
303
|
+
rt.value ? (k(), x("div", Re, [
|
|
304
|
+
H.value.content ? (k(), y(p, {
|
|
304
305
|
key: 0,
|
|
305
|
-
components:
|
|
306
|
-
}, null, 8, ["components"])) :
|
|
307
|
-
|
|
306
|
+
components: H.value.content
|
|
307
|
+
}, null, 8, ["components"])) : b("", !0),
|
|
308
|
+
j(U) && j(W) ? (k(), y(m, {
|
|
308
309
|
key: 1,
|
|
309
310
|
name: "modal.schema.before",
|
|
310
|
-
data: { action:
|
|
311
|
-
}, null, 8, ["data"])) :
|
|
312
|
-
|
|
311
|
+
data: { action: j(B).name }
|
|
312
|
+
}, null, 8, ["data"])) : b("", !0),
|
|
313
|
+
j(U) && j(W) ? (k(), x("form", {
|
|
313
314
|
key: 2,
|
|
314
|
-
id: `action-form-${
|
|
315
|
-
onSubmit:
|
|
316
|
-
}, [
|
|
317
|
-
components:
|
|
318
|
-
columns:
|
|
319
|
-
}, null, 8, ["components", "columns"])], 40,
|
|
320
|
-
|
|
315
|
+
id: `action-form-${j(B).name}`,
|
|
316
|
+
onSubmit: P(Y, ["prevent"])
|
|
317
|
+
}, [w(p, {
|
|
318
|
+
components: j(W).components,
|
|
319
|
+
columns: j(W).columns
|
|
320
|
+
}, null, 8, ["components", "columns"])], 40, ze)) : b("", !0),
|
|
321
|
+
j(U) && j(W) ? (k(), y(m, {
|
|
321
322
|
key: 3,
|
|
322
323
|
name: "modal.schema.after",
|
|
323
|
-
data: { action:
|
|
324
|
-
}, null, 8, ["data"])) :
|
|
325
|
-
|
|
324
|
+
data: { action: j(B).name }
|
|
325
|
+
}, null, 8, ["data"])) : b("", !0),
|
|
326
|
+
H.value.contentFooter ? (k(), y(p, {
|
|
326
327
|
key: 4,
|
|
327
|
-
components:
|
|
328
|
-
}, null, 8, ["components"])) :
|
|
329
|
-
|
|
328
|
+
components: H.value.contentFooter
|
|
329
|
+
}, null, 8, ["components"])) : b("", !0),
|
|
330
|
+
H.value.passwordConfirmation ? (k(), y(_, {
|
|
330
331
|
key: 5,
|
|
331
332
|
modelValue: J.value,
|
|
332
333
|
"onUpdate:modelValue": t[3] ||= (e) => J.value = e,
|
|
333
334
|
error: Ye.value,
|
|
334
335
|
onSubmit: Y
|
|
335
|
-
}, null, 8, ["modelValue", "error"])) :
|
|
336
|
-
])) :
|
|
337
|
-
$.value ? (
|
|
336
|
+
}, null, 8, ["modelValue", "error"])) : b("", !0)
|
|
337
|
+
])) : b("", !0),
|
|
338
|
+
$.value ? (k(), y(de, {
|
|
338
339
|
key: 1,
|
|
339
|
-
class:
|
|
340
|
+
class: D(j(i)(H.value.stickyFooter && "bg-background sticky bottom-0 -mx-6 -mb-6 rounded-b-lg border-t px-6 py-4"))
|
|
340
341
|
}, {
|
|
341
|
-
default:
|
|
342
|
-
|
|
342
|
+
default: N(() => [S("div", { class: D(j(i)("flex w-full flex-col-reverse gap-2 sm:flex-row sm:items-center", Ge.value)) }, [
|
|
343
|
+
H.value.extraFooterActions ? (k(), y(f, {
|
|
343
344
|
key: 0,
|
|
344
|
-
actions:
|
|
345
|
-
context:
|
|
346
|
-
class:
|
|
345
|
+
actions: H.value.extraFooterActions,
|
|
346
|
+
context: j(Xe),
|
|
347
|
+
class: D(Ke.value)
|
|
347
348
|
}, null, 8, [
|
|
348
349
|
"actions",
|
|
349
350
|
"context",
|
|
350
351
|
"class"
|
|
351
|
-
])) :
|
|
352
|
-
|
|
352
|
+
])) : b("", !0),
|
|
353
|
+
H.value.cancelLabel ? (k(), y(u, {
|
|
353
354
|
key: 1,
|
|
354
355
|
type: "button",
|
|
355
356
|
variant: "outline",
|
|
356
|
-
class:
|
|
357
|
-
disabled:
|
|
357
|
+
class: D(et.value),
|
|
358
|
+
disabled: I.modal.processing,
|
|
358
359
|
onClick: Z
|
|
359
360
|
}, {
|
|
360
|
-
default:
|
|
361
|
+
default: N(() => [C(A(H.value.cancelLabel), 1)]),
|
|
361
362
|
_: 1
|
|
362
|
-
}, 8, ["class", "disabled"])) :
|
|
363
|
-
|
|
363
|
+
}, 8, ["class", "disabled"])) : b("", !0),
|
|
364
|
+
H.value.createAnotherLabel && H.value.submitLabel && q.value ? (k(), y(u, {
|
|
364
365
|
key: 2,
|
|
365
366
|
type: "button",
|
|
366
367
|
variant: "outline",
|
|
367
368
|
"data-slot": "create-another",
|
|
368
|
-
class:
|
|
369
|
-
disabled:
|
|
369
|
+
class: D(tt.value),
|
|
370
|
+
disabled: I.modal.processing,
|
|
370
371
|
onClick: X
|
|
371
372
|
}, {
|
|
372
|
-
default:
|
|
373
|
+
default: N(() => [H.value.createAnotherIcon ? (k(), y(j(l), {
|
|
373
374
|
key: 0,
|
|
374
|
-
name:
|
|
375
|
-
}, null, 8, ["name"])) :
|
|
375
|
+
name: H.value.createAnotherIcon
|
|
376
|
+
}, null, 8, ["name"])) : b("", !0), C(A(H.value.createAnotherLabel), 1)]),
|
|
376
377
|
_: 1
|
|
377
|
-
}, 8, ["class", "disabled"])) :
|
|
378
|
-
|
|
378
|
+
}, 8, ["class", "disabled"])) : b("", !0),
|
|
379
|
+
H.value.submitLabel && q.value ? (k(), y(u, {
|
|
379
380
|
key: 3,
|
|
380
381
|
type: "button",
|
|
381
|
-
class:
|
|
382
|
-
disabled:
|
|
383
|
-
autofocus:
|
|
382
|
+
class: D(j(a)(j(c), H.value.submitColor, "primary")),
|
|
383
|
+
disabled: I.modal.processing,
|
|
384
|
+
autofocus: H.value.autofocus && !j(U),
|
|
384
385
|
onClick: Y
|
|
385
386
|
}, {
|
|
386
|
-
default:
|
|
387
|
+
default: N(() => [I.modal.processing ? (k(), y(d, { key: 0 })) : H.value.submitIcon ? (k(), y(j(l), {
|
|
387
388
|
key: 1,
|
|
388
|
-
name:
|
|
389
|
-
}, null, 8, ["name"])) :
|
|
389
|
+
name: H.value.submitIcon
|
|
390
|
+
}, null, 8, ["name"])) : b("", !0), C(" " + A(H.value.submitLabel), 1)]),
|
|
390
391
|
_: 1
|
|
391
392
|
}, 8, [
|
|
392
393
|
"class",
|
|
393
394
|
"disabled",
|
|
394
395
|
"autofocus"
|
|
395
|
-
])) :
|
|
396
|
+
])) : b("", !0)
|
|
396
397
|
], 2)]),
|
|
397
398
|
_: 1
|
|
398
|
-
}, 8, ["class"])) :
|
|
399
|
-
C("span", Re, j(M(B)("close", {}, "Close")), 1)
|
|
399
|
+
}, 8, ["class"])) : b("", !0)
|
|
400
400
|
]),
|
|
401
401
|
_: 1
|
|
402
402
|
}, 8, ["class", "show-close-button"])]),
|
|
@@ -405,6 +405,6 @@ var De = ["data-alfakit-modal"], Oe = { class: "flex flex-col gap-1.5" }, ke = [
|
|
|
405
405
|
}
|
|
406
406
|
});
|
|
407
407
|
//#endregion
|
|
408
|
-
export {
|
|
408
|
+
export { F as default };
|
|
409
409
|
|
|
410
410
|
//# sourceMappingURL=ActionModal.vue_vue_type_script_setup_true_lang.js.map
|