@nxgt/material-vue 0.37.1 → 0.39.0
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 +101 -0
- package/README.md +1 -0
- package/dist/{Button-CurFF4Zt.js → Button-DVeAQorb.js} +1 -1
- package/dist/{DropdownMenuTrigger-BsuyNVzV.js → DropdownMenuTrigger-C7uYPf_9.js} +36 -36
- package/dist/{HoverCardTrigger-jCXl6TrX.js → HoverCardTrigger-VvXPswRz.js} +122 -120
- package/dist/{camera-CYwiFuGE.js → camera-CG6WfZNc.js} +4 -4
- package/dist/components/base-content.css +64 -4
- package/dist/components/base.css +3 -1
- package/dist/{components--v_k8diD.js → components-B2kSyBK0.js} +13277 -12751
- package/dist/components.js +8 -8
- package/dist/composables.js +2 -2
- package/dist/dnd.js +1 -1
- package/dist/{form-scope-B2oJ5fHr.js → form-scope-XhlaF5na.js} +1 -1
- package/dist/{i18n-provider-B2q6vp6H.js → i18n-provider-BBnUUGqM.js} +1 -1
- package/dist/i18n.js +4 -4
- package/dist/{icon-button-CIUc1bEp.js → icon-button-CSPfP615.js} +1 -1
- package/dist/in-dialog-Blhwwbyb.js +31 -0
- package/dist/lib/components/ui/collections/data-table/data-table-density.d.ts +15 -0
- package/dist/lib/components/ui/collections/data-table/data-table.stories.columns.d.ts +47 -0
- package/dist/lib/components/ui/collections/data-table/data-table.stories.template.d.ts +1 -0
- package/dist/lib/components/ui/collections/data-table/index.d.ts +1 -1
- package/dist/lib/components/ui/collections/data-table/types.d.ts +7 -0
- package/dist/lib/components/ui/feedback/banner/banner.vue.d.ts +1 -1
- package/dist/lib/components/ui/fields/contacts/consts.d.ts +1 -1
- package/dist/lib/components/ui/fields/index.d.ts +1 -0
- package/dist/lib/components/ui/fields/repeatable-group/index.d.ts +4 -0
- package/dist/lib/components/ui/fields/repeatable-group/partials/repeatable-group-footer.vue.d.ts +14 -0
- package/dist/lib/components/ui/fields/repeatable-group/partials/repeatable-group-row.vue.d.ts +33 -0
- package/dist/lib/components/ui/fields/repeatable-group/repeatable-group-classes.d.ts +33 -0
- package/dist/lib/components/ui/fields/repeatable-group/repeatable-group-form-field.vue.d.ts +44 -0
- package/dist/lib/components/ui/fields/repeatable-group/repeatable-group-names.d.ts +16 -0
- package/dist/lib/components/ui/fields/repeatable-group/repeatable-group.vue.d.ts +69 -0
- package/dist/lib/components/ui/fields/repeatable-group/use-repeatable-group.d.ts +39 -0
- package/dist/lib/components/ui/fields/search-field/search-field.vue.d.ts +10 -1
- package/dist/lib/components/ui/media/stx-player/stx-player-extras.vue.d.ts +1 -1
- package/dist/lib/components/ui/overlays/command/CommandItem.vue.d.ts +10 -3
- package/dist/lib/components/ui/overlays/command/CommandList.vue.d.ts +4 -2
- package/dist/lib/components/ui/overlays/dialog/in-dialog.d.ts +12 -0
- package/dist/lib/components/ui/primitives/typography/typography.variants.d.ts +1 -0
- package/dist/lib/components/ui/primitives/typography/typography.vue.d.ts +2 -0
- package/dist/lib/components/ui/selection/checkbox-group/checkbox-group.vue.d.ts +2 -0
- package/dist/lib/components/ui/selection/option-count/option-count.vue.d.ts +25 -0
- package/dist/lib/components/ui/selection/option-count/use-option-count-text.d.ts +10 -0
- package/dist/lib/components/ui/selection/radio-group/radio-group-field.vue.d.ts +2 -0
- package/dist/lib/components/ui/selection/select-chip-field/select-chip-field.vue.d.ts +11 -0
- package/dist/lib/components/ui/selection/sortable-list/sortable-list.vue.d.ts +1 -1
- package/dist/lib/components/ui/selection/transfer-list/transfer-list.vue.d.ts +1 -1
- package/dist/lib/i18n/resources/en/en.d.ts +15 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +15 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +15 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +15 -0
- package/dist/lib/i18n/resources/resources.d.ts +30 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/nuxt/component-names.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +17 -17
- package/dist/map.js +4 -4
- package/dist/material-vue.css +1 -1
- package/dist/{pdf-outline-sidebar-DJJ-ARco.js → pdf-outline-sidebar-aQ5Lhbss.js} +2 -2
- package/dist/{pdf-page-CRt6KXdJ.js → pdf-page-NCmScgMW.js} +1 -1
- package/dist/{pdf-page-list-BgCp5Asx.js → pdf-page-list-BnvE130d.js} +2 -2
- package/dist/{pdf-reader-BGxqEx8O.js → pdf-reader-CMt9dKZ-.js} +8 -8
- package/dist/{pdf-sidebar-Cvtuomgp.js → pdf-sidebar-BWzX3e0f.js} +3 -3
- package/dist/{pdf-thumbnail-sidebar-CeWPs7o7.js → pdf-thumbnail-sidebar-8nbYsI3d.js} +3 -3
- package/dist/{pdf-toolbar-BtXcyEpd.js → pdf-toolbar-DpQMG5rv.js} +5 -5
- package/dist/pdf.js +2 -2
- package/dist/{print-format.utils-keJqahvw.js → print-format.utils-oj5kle2P.js} +2 -2
- package/dist/{sortable-provider-DMu8DL2z.js → sortable-provider-2czx1jSW.js} +2 -2
- package/dist/{stored-language-dtksFoGO.js → stored-language-CKZMMJcz.js} +26 -0
- package/dist/{stx-player-nDsDyvc-.js → stx-player-CS1FYHVS.js} +5 -5
- package/dist/{translator-DqiGrSH_.js → translator-uh5FWiMq.js} +1 -1
- package/dist/{use-heading-spy-BZ7ctGZ5.js → use-heading-spy-CcJfoBA1.js} +1 -1
- package/dist/{use-material-translation-DRB6oPdF.js → use-material-translation-C6xccbic.js} +3 -3
- package/docs/components/README.md +1 -1
- package/docs/components/data-table-filter-and-lists.md +3 -1
- package/docs/components/form-fields.md +146 -0
- package/docs/components/overlays-and-menus.md +2 -0
- package/docs/components/primitives.md +3 -1
- package/docs/components/selection-and-choice.md +28 -4
- package/docs/guides/forms.md +89 -4
- package/docs/guides/i18n.md +2 -1
- package/docs/previews/form-fields-repeatablegroup.webp +0 -0
- package/docs/roadmap.md +7 -0
- package/docs/troubleshooting.md +70 -0
- package/lib/components/base-content.css +64 -4
- package/lib/components/base.css +3 -1
- package/lib/nuxt/component-names.ts +2 -0
- package/package.json +2 -2
- package/dist/use-inert-others-CtGqZKR8.js +0 -22
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as e } from "./utils-CykWQ0iJ.js";
|
|
2
|
-
import { t } from "./use-material-translation-
|
|
3
|
-
import { t as n } from "./Button-
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { computed as
|
|
7
|
-
import { X as
|
|
8
|
-
import { DialogClose as
|
|
9
|
-
import { defaultDocument as
|
|
10
|
-
import { forwardEscape as
|
|
11
|
-
import { describedBy as
|
|
12
|
-
import { layerOf as q, openerOf as
|
|
2
|
+
import { t } from "./use-material-translation-C6xccbic.js";
|
|
3
|
+
import { t as n } from "./Button-DVeAQorb.js";
|
|
4
|
+
import { r, t as i } from "./in-dialog-Blhwwbyb.js";
|
|
5
|
+
import { t as a } from "./field-name-attribute-Bl7LSVK0.js";
|
|
6
|
+
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, getCurrentInstance as m, guardReactiveProps as h, isRef as g, mergeProps as _, normalizeClass as v, normalizeProps as y, onMounted as ee, onUpdated as b, openBlock as x, renderSlot as S, toDisplayString as C, unref as w, useAttrs as T, useId as E, useTemplateRef as D, vModelText as O, withCtx as k, withDirectives as A } from "vue";
|
|
7
|
+
import { X as j } from "@lucide/vue";
|
|
8
|
+
import { DialogClose as M, DialogContent as te, DialogDescription as ne, DialogOverlay as re, DialogPortal as ie, DialogRoot as ae, DialogTitle as oe, DialogTrigger as se, HoverCardContent as N, HoverCardPortal as P, HoverCardRoot as F, HoverCardTrigger as I, Label as L, injectDialogRootContext as R, useForwardProps as z, useForwardPropsEmits as B } from "reka-ui";
|
|
9
|
+
import { defaultDocument as V, reactiveOmit as H, tryOnScopeDispose as U, unrefElement as W, useEventListener as G, useVModel as K } from "@vueuse/core";
|
|
10
|
+
import { forwardEscape as ce } from "@nxgt/material-core/escape-forward";
|
|
11
|
+
import { describedBy as le } from "@nxgt/material-core/described-by";
|
|
12
|
+
import { layerOf as q, openerOf as ue } from "@nxgt/material-core/field-blur-layers";
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region lib/components/ui/primitives/helper-text/helper-text.vue
|
|
15
|
-
var J = /* @__PURE__ */
|
|
15
|
+
var J = /* @__PURE__ */ p({
|
|
16
16
|
__name: "helper-text",
|
|
17
17
|
props: {
|
|
18
18
|
error: { type: Boolean },
|
|
@@ -26,18 +26,18 @@ var J = /* @__PURE__ */ f({
|
|
|
26
26
|
},
|
|
27
27
|
setup(t) {
|
|
28
28
|
let n = t;
|
|
29
|
-
return (r, i) => (
|
|
29
|
+
return (r, i) => (x(), l("div", {
|
|
30
30
|
"data-slot": "helper-text",
|
|
31
31
|
"data-test": "typography",
|
|
32
|
-
class:
|
|
33
|
-
}, [
|
|
32
|
+
class: v(w(e)("overflow-auto in-[[data-state=selected]]:text-primary-foreground text-[10px] text-muted-foreground flex pl-0.5 truncate text-wrap", { "text-error-text": t.error }, n.class))
|
|
33
|
+
}, [S(r.$slots, "default")], 2));
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), de = {
|
|
36
36
|
key: 0,
|
|
37
37
|
"data-slot": "label-text",
|
|
38
38
|
"data-required": "",
|
|
39
39
|
class: "inline-flex"
|
|
40
|
-
}, Y = /* @__PURE__ */
|
|
40
|
+
}, Y = /* @__PURE__ */ p({
|
|
41
41
|
__name: "Label",
|
|
42
42
|
props: {
|
|
43
43
|
for: {},
|
|
@@ -53,9 +53,9 @@ var J = /* @__PURE__ */ f({
|
|
|
53
53
|
withAsterisk: { type: Boolean }
|
|
54
54
|
},
|
|
55
55
|
setup(t) {
|
|
56
|
-
let n = t, r =
|
|
57
|
-
return (i, a) => (
|
|
58
|
-
default:
|
|
56
|
+
let n = t, r = H(n, "class", "withAsterisk");
|
|
57
|
+
return (i, a) => (x(), s(w(L), _({ "data-slot": "label" }, w(r), { class: w(e)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", n.class) }), {
|
|
58
|
+
default: k(() => [t.withAsterisk ? (x(), l("span", de, [S(i.$slots, "default"), a[0] ||= u("svg", {
|
|
59
59
|
"data-slot": "label-required-mark",
|
|
60
60
|
"aria-hidden": "true",
|
|
61
61
|
focusable: "false",
|
|
@@ -64,17 +64,17 @@ var J = /* @__PURE__ */ f({
|
|
|
64
64
|
stroke: "currentColor",
|
|
65
65
|
"stroke-width": "1.75",
|
|
66
66
|
"stroke-linecap": "round"
|
|
67
|
-
}, [
|
|
67
|
+
}, [u("path", { d: "M5 1v8M1.5 3l7 4M8.5 3l-7 4" })], -1)])) : S(i.$slots, "default", {}, void 0, void 0, 1)]),
|
|
68
68
|
_: 3
|
|
69
69
|
}, 16, ["class"]));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region lib/components/ui/overlays/dialog/use-escape-forward.ts
|
|
74
|
-
function
|
|
74
|
+
function fe(e = D("content")) {
|
|
75
75
|
return (t) => {
|
|
76
|
-
let n =
|
|
77
|
-
|
|
76
|
+
let n = W(e);
|
|
77
|
+
ce(n instanceof HTMLElement ? n : null, t);
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
@@ -82,22 +82,22 @@ function de(e = E("content")) {
|
|
|
82
82
|
function X(e) {
|
|
83
83
|
let t = e;
|
|
84
84
|
if (!t) {
|
|
85
|
-
let e =
|
|
85
|
+
let e = R();
|
|
86
86
|
t = () => e.modal.value && e.open.value;
|
|
87
87
|
}
|
|
88
|
-
let n =
|
|
88
|
+
let n = D("content");
|
|
89
89
|
return r(n, t), {
|
|
90
|
-
onEscapeKeyDown:
|
|
91
|
-
keepToaster:
|
|
90
|
+
onEscapeKeyDown: fe(n),
|
|
91
|
+
keepToaster: pe
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function pe(e) {
|
|
95
95
|
let t = e.target;
|
|
96
96
|
t instanceof Element && t.closest("[data-sonner-toaster]") && e.preventDefault();
|
|
97
97
|
}
|
|
98
98
|
//#endregion
|
|
99
99
|
//#region lib/components/ui/overlays/dialog/Dialog.vue
|
|
100
|
-
var
|
|
100
|
+
var me = /* @__PURE__ */ p({
|
|
101
101
|
__name: "Dialog",
|
|
102
102
|
props: {
|
|
103
103
|
open: { type: Boolean },
|
|
@@ -107,13 +107,13 @@ var pe = /* @__PURE__ */ f({
|
|
|
107
107
|
},
|
|
108
108
|
emits: ["update:open"],
|
|
109
109
|
setup(e, { emit: t }) {
|
|
110
|
-
let n =
|
|
111
|
-
return (e, t) => (
|
|
112
|
-
default:
|
|
110
|
+
let n = B(e, t);
|
|
111
|
+
return (e, t) => (x(), s(w(ae), _({ "data-slot": "dialog" }, w(n)), {
|
|
112
|
+
default: k((t) => [S(e.$slots, "default", y(h(t)))]),
|
|
113
113
|
_: 3
|
|
114
114
|
}, 16));
|
|
115
115
|
}
|
|
116
|
-
}), Z = /* @__PURE__ */
|
|
116
|
+
}), Z = /* @__PURE__ */ p({
|
|
117
117
|
__name: "DialogOverlay",
|
|
118
118
|
props: {
|
|
119
119
|
forceMount: { type: Boolean },
|
|
@@ -128,13 +128,13 @@ var pe = /* @__PURE__ */ f({
|
|
|
128
128
|
] }
|
|
129
129
|
},
|
|
130
130
|
setup(t) {
|
|
131
|
-
let n = t, r =
|
|
132
|
-
return (t, i) => (
|
|
133
|
-
default:
|
|
131
|
+
let n = t, r = H(n, "class");
|
|
132
|
+
return (t, i) => (x(), s(w(re), _({ "data-slot": "dialog-overlay" }, w(r), { class: w(e)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80", n.class) }), {
|
|
133
|
+
default: k(() => [S(t.$slots, "default")]),
|
|
134
134
|
_: 3
|
|
135
135
|
}, 16, ["class"]));
|
|
136
136
|
}
|
|
137
|
-
}),
|
|
137
|
+
}), he = { class: "sr-only" }, ge = /* @__PURE__ */ p({
|
|
138
138
|
inheritAttrs: !1,
|
|
139
139
|
__name: "DialogContent",
|
|
140
140
|
props: {
|
|
@@ -163,29 +163,31 @@ var pe = /* @__PURE__ */ f({
|
|
|
163
163
|
"closeAutoFocus"
|
|
164
164
|
],
|
|
165
165
|
setup(n, { emit: r }) {
|
|
166
|
-
let
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
let a = n, o = r, l = B(H(a, "class"), o), d = X();
|
|
167
|
+
i(!0);
|
|
168
|
+
let { t: p } = t();
|
|
169
|
+
return (t, r) => (x(), s(w(ie), null, {
|
|
170
|
+
default: k(() => [f(Z), f(w(te), _({
|
|
169
171
|
ref: "content",
|
|
170
172
|
"data-slot": "dialog-content"
|
|
171
173
|
}, {
|
|
172
174
|
...t.$attrs,
|
|
173
|
-
...
|
|
175
|
+
...w(l)
|
|
174
176
|
}, {
|
|
175
|
-
onEscapeKeyDown:
|
|
176
|
-
onPointerDownOutside:
|
|
177
|
-
onFocusOutside:
|
|
178
|
-
onInteractOutside:
|
|
179
|
-
class:
|
|
177
|
+
onEscapeKeyDown: w(d).onEscapeKeyDown,
|
|
178
|
+
onPointerDownOutside: w(d).keepToaster,
|
|
179
|
+
onFocusOutside: w(d).keepToaster,
|
|
180
|
+
onInteractOutside: w(d).keepToaster,
|
|
181
|
+
class: w(e)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg max-h-[calc(100dvh-2rem)] supports-[not(height:100dvh)]:max-h-[calc(100vh-2rem)] overflow-y-auto", a.class)
|
|
180
182
|
}), {
|
|
181
|
-
default:
|
|
183
|
+
default: k(() => [S(t.$slots, "default"), n.showCloseButton ? (x(), s(w(M), {
|
|
182
184
|
key: 0,
|
|
183
185
|
"data-slot": "dialog-close",
|
|
184
186
|
class: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
185
187
|
}, {
|
|
186
|
-
default:
|
|
188
|
+
default: k(() => [f(w(j)), u("span", he, C(w(p)("material.buttons.close", "Close")), 1)]),
|
|
187
189
|
_: 1
|
|
188
|
-
})) :
|
|
190
|
+
})) : c("", !0)]),
|
|
189
191
|
_: 3
|
|
190
192
|
}, 16, [
|
|
191
193
|
"onEscapeKeyDown",
|
|
@@ -197,7 +199,7 @@ var pe = /* @__PURE__ */ f({
|
|
|
197
199
|
_: 3
|
|
198
200
|
}));
|
|
199
201
|
}
|
|
200
|
-
}),
|
|
202
|
+
}), _e = /* @__PURE__ */ p({
|
|
201
203
|
__name: "DialogDescription",
|
|
202
204
|
props: {
|
|
203
205
|
asChild: { type: Boolean },
|
|
@@ -211,13 +213,13 @@ var pe = /* @__PURE__ */ f({
|
|
|
211
213
|
] }
|
|
212
214
|
},
|
|
213
215
|
setup(t) {
|
|
214
|
-
let n = t, r =
|
|
215
|
-
return (t, i) => (
|
|
216
|
-
default:
|
|
216
|
+
let n = t, r = z(H(n, "class"));
|
|
217
|
+
return (t, i) => (x(), s(w(ne), _({ "data-slot": "dialog-description" }, w(r), { class: w(e)("text-muted-foreground text-sm", n.class) }), {
|
|
218
|
+
default: k(() => [S(t.$slots, "default")]),
|
|
217
219
|
_: 3
|
|
218
220
|
}, 16, ["class"]));
|
|
219
221
|
}
|
|
220
|
-
}),
|
|
222
|
+
}), ve = /* @__PURE__ */ p({
|
|
221
223
|
__name: "DialogFooter",
|
|
222
224
|
props: {
|
|
223
225
|
class: { type: [
|
|
@@ -234,21 +236,21 @@ var pe = /* @__PURE__ */ f({
|
|
|
234
236
|
},
|
|
235
237
|
setup(r) {
|
|
236
238
|
let i = r, { t: a } = t();
|
|
237
|
-
return (t,
|
|
239
|
+
return (t, o) => (x(), l("div", {
|
|
238
240
|
"data-slot": "dialog-footer",
|
|
239
|
-
class:
|
|
240
|
-
}, [
|
|
241
|
+
class: v(w(e)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", i.class))
|
|
242
|
+
}, [S(t.$slots, "default"), r.showCloseButton ? (x(), s(w(M), {
|
|
241
243
|
key: 0,
|
|
242
244
|
"as-child": ""
|
|
243
245
|
}, {
|
|
244
|
-
default:
|
|
245
|
-
default:
|
|
246
|
+
default: k(() => [f(w(n), { variant: "outlined" }, {
|
|
247
|
+
default: k(() => [d(C(w(a)("material.buttons.close", "Close")), 1)]),
|
|
246
248
|
_: 1
|
|
247
249
|
})]),
|
|
248
250
|
_: 1
|
|
249
|
-
})) :
|
|
251
|
+
})) : c("", !0)], 2));
|
|
250
252
|
}
|
|
251
|
-
}),
|
|
253
|
+
}), ye = /* @__PURE__ */ p({
|
|
252
254
|
__name: "DialogTitle",
|
|
253
255
|
props: {
|
|
254
256
|
asChild: { type: Boolean },
|
|
@@ -262,13 +264,13 @@ var pe = /* @__PURE__ */ f({
|
|
|
262
264
|
] }
|
|
263
265
|
},
|
|
264
266
|
setup(t) {
|
|
265
|
-
let n = t, r =
|
|
266
|
-
return (t, i) => (
|
|
267
|
-
default:
|
|
267
|
+
let n = t, r = z(H(n, "class"));
|
|
268
|
+
return (t, i) => (x(), s(w(oe), _({ "data-slot": "dialog-title" }, w(r), { class: w(e)("text-lg leading-none font-semibold", n.class) }), {
|
|
269
|
+
default: k(() => [S(t.$slots, "default")]),
|
|
268
270
|
_: 3
|
|
269
271
|
}, 16, ["class"]));
|
|
270
272
|
}
|
|
271
|
-
}),
|
|
273
|
+
}), be = /* @__PURE__ */ p({
|
|
272
274
|
__name: "DialogTrigger",
|
|
273
275
|
props: {
|
|
274
276
|
asChild: { type: Boolean },
|
|
@@ -276,12 +278,12 @@ var pe = /* @__PURE__ */ f({
|
|
|
276
278
|
},
|
|
277
279
|
setup(e) {
|
|
278
280
|
let t = e;
|
|
279
|
-
return (e, n) => (
|
|
280
|
-
default:
|
|
281
|
+
return (e, n) => (x(), s(w(se), _({ "data-slot": "dialog-trigger" }, t), {
|
|
282
|
+
default: k(() => [S(e.$slots, "default")]),
|
|
281
283
|
_: 3
|
|
282
284
|
}, 16));
|
|
283
285
|
}
|
|
284
|
-
}),
|
|
286
|
+
}), xe = ["data-slot"], Q = /* @__PURE__ */ p({
|
|
285
287
|
__name: "Input",
|
|
286
288
|
props: {
|
|
287
289
|
defaultValue: {},
|
|
@@ -296,17 +298,17 @@ var pe = /* @__PURE__ */ f({
|
|
|
296
298
|
},
|
|
297
299
|
emits: ["update:modelValue"],
|
|
298
300
|
setup(t, { emit: n }) {
|
|
299
|
-
let r = t, i =
|
|
301
|
+
let r = t, i = K(r, "modelValue", n, {
|
|
300
302
|
passive: !0,
|
|
301
303
|
defaultValue: r.defaultValue
|
|
302
304
|
});
|
|
303
|
-
return (t, n) =>
|
|
304
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
305
|
+
return (t, n) => A((x(), l("input", {
|
|
306
|
+
"onUpdate:modelValue": n[0] ||= (e) => g(i) ? i.value = e : null,
|
|
305
307
|
"data-slot": t.$attrs["data-slot"] ?? "input",
|
|
306
|
-
class:
|
|
307
|
-
}, null, 10,
|
|
308
|
+
class: v(w(e)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", r.class))
|
|
309
|
+
}, null, 10, xe)), [[O, w(i)]]);
|
|
308
310
|
}
|
|
309
|
-
}),
|
|
311
|
+
}), Se = /* @__PURE__ */ p({
|
|
310
312
|
inheritAttrs: !1,
|
|
311
313
|
__name: "text-field",
|
|
312
314
|
props: {
|
|
@@ -330,25 +332,25 @@ var pe = /* @__PURE__ */ f({
|
|
|
330
332
|
},
|
|
331
333
|
emits: ["update:modelValue"],
|
|
332
334
|
setup(t, { emit: n }) {
|
|
333
|
-
let r = t, i = n,
|
|
334
|
-
return (n, a) => (
|
|
335
|
+
let r = t, i = n, a = E(), p = () => r.id ?? a, m = T(), h = E(), g = o(() => le(m["aria-describedby"], !!r.helperText && h));
|
|
336
|
+
return (n, a) => (x(), l("div", {
|
|
335
337
|
"data-slot": "text-field",
|
|
336
|
-
class:
|
|
338
|
+
class: v(w(e)("grid w-full gap-1.5", r.class))
|
|
337
339
|
}, [
|
|
338
|
-
t.label ? (
|
|
340
|
+
t.label ? (x(), s(Y, {
|
|
339
341
|
key: 0,
|
|
340
342
|
"with-asterisk": t.required,
|
|
341
343
|
for: p()
|
|
342
344
|
}, {
|
|
343
|
-
default:
|
|
345
|
+
default: k(() => [d(C(t.label), 1)]),
|
|
344
346
|
_: 1
|
|
345
|
-
}, 8, ["with-asterisk", "for"])) :
|
|
346
|
-
|
|
347
|
+
}, 8, ["with-asterisk", "for"])) : c("", !0),
|
|
348
|
+
u("div", { class: v(w(e)("relative", {
|
|
347
349
|
"*:first:size-8 *:first:absolute *:first:top-[calc(50%-16px)] *:first:left-1.5 [&_input]:pl-10 *:first:bg-muted/80 *:first:text-muted-foreground": !!n.$slots.leading,
|
|
348
350
|
"*:last:size-8 *:last:absolute *:last:top-[calc(50%-16px)] *:last:right-1.5 [&_input]:pr-10 *:last:bg-muted/80 *:last:text-muted-foreground": !!n.$slots.trailing
|
|
349
351
|
})) }, [
|
|
350
|
-
|
|
351
|
-
|
|
352
|
+
S(n.$slots, "leading"),
|
|
353
|
+
f(Q, _({ id: p() }, n.$attrs, {
|
|
352
354
|
name: t.name,
|
|
353
355
|
type: t.type,
|
|
354
356
|
placeholder: t.placeholder,
|
|
@@ -356,7 +358,7 @@ var pe = /* @__PURE__ */ f({
|
|
|
356
358
|
required: t.required,
|
|
357
359
|
"model-value": t.modelValue,
|
|
358
360
|
"aria-invalid": t.error || void 0,
|
|
359
|
-
"aria-describedby":
|
|
361
|
+
"aria-describedby": g.value,
|
|
360
362
|
class: "transition-all hover:border-primary hover:ring-[2px] hover:ring-primary/25",
|
|
361
363
|
"onUpdate:modelValue": a[0] ||= (e) => i("update:modelValue", e)
|
|
362
364
|
}), null, 16, [
|
|
@@ -370,28 +372,28 @@ var pe = /* @__PURE__ */ f({
|
|
|
370
372
|
"aria-invalid",
|
|
371
373
|
"aria-describedby"
|
|
372
374
|
]),
|
|
373
|
-
|
|
375
|
+
S(n.$slots, "trailing")
|
|
374
376
|
], 2),
|
|
375
|
-
t.helperText ? (
|
|
377
|
+
t.helperText ? (x(), s(J, {
|
|
376
378
|
key: 1,
|
|
377
|
-
id:
|
|
379
|
+
id: w(h),
|
|
378
380
|
error: t.error
|
|
379
381
|
}, {
|
|
380
|
-
default:
|
|
382
|
+
default: k(() => [d(C(t.helperText), 1)]),
|
|
381
383
|
_: 1
|
|
382
|
-
}, 8, ["id", "error"])) :
|
|
384
|
+
}, 8, ["id", "error"])) : c("", !0)
|
|
383
385
|
], 2));
|
|
384
386
|
}
|
|
385
387
|
});
|
|
386
388
|
//#endregion
|
|
387
389
|
//#region lib/components/ui/forms/use-field-blur.ts
|
|
388
|
-
function
|
|
390
|
+
function Ce(e) {
|
|
389
391
|
return e ? e instanceof Element ? e : e instanceof CharacterData ? e.nextElementSibling : null : null;
|
|
390
392
|
}
|
|
391
|
-
function
|
|
392
|
-
let n =
|
|
393
|
+
function $(e, t = "root") {
|
|
394
|
+
let n = D(t), r = !1, i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s, c = () => {
|
|
393
395
|
let e = n.value;
|
|
394
|
-
return
|
|
396
|
+
return Ce(e instanceof Node ? e : e?.$el);
|
|
395
397
|
};
|
|
396
398
|
function l(t) {
|
|
397
399
|
r = !1, e(t, !0);
|
|
@@ -400,7 +402,7 @@ function Se(e, t = "root") {
|
|
|
400
402
|
let t = c(), n = e.target;
|
|
401
403
|
if (!(!t || !(n instanceof Node))) {
|
|
402
404
|
if (clearTimeout(s), t.contains(n)) {
|
|
403
|
-
r || (
|
|
405
|
+
r || (i = new Set(t.ownerDocument.body.childNodes), o = /* @__PURE__ */ new Set()), r = !0;
|
|
404
406
|
return;
|
|
405
407
|
}
|
|
406
408
|
r && d(t, q(n)) && l(e);
|
|
@@ -409,33 +411,33 @@ function Se(e, t = "root") {
|
|
|
409
411
|
function d(e, t) {
|
|
410
412
|
if (t === q(e)) return !0;
|
|
411
413
|
if (!t || o.has(t)) return !1;
|
|
412
|
-
let n =
|
|
413
|
-
before:
|
|
414
|
+
let n = ue([e], {
|
|
415
|
+
before: i,
|
|
414
416
|
home: /* @__PURE__ */ new Set([q(e)]),
|
|
415
417
|
opened: o
|
|
416
418
|
}, t);
|
|
417
|
-
return n === "theirs" || !n &&
|
|
419
|
+
return n === "theirs" || !n && i.has(t) ? !0 : (o.add(t), !1);
|
|
418
420
|
}
|
|
419
421
|
function f(e) {
|
|
420
422
|
!r || e.relatedTarget || (clearTimeout(s), s = setTimeout(() => {
|
|
421
|
-
let t =
|
|
422
|
-
r && (!t || t ===
|
|
423
|
+
let t = V?.activeElement;
|
|
424
|
+
r && (!t || t === V?.body) && l(e);
|
|
423
425
|
}));
|
|
424
426
|
}
|
|
425
|
-
let
|
|
426
|
-
let e =
|
|
427
|
-
typeof e == "string" && c()?.setAttribute(
|
|
427
|
+
let p = m(), h = () => {
|
|
428
|
+
let e = p?.props.name;
|
|
429
|
+
typeof e == "string" && c()?.setAttribute(a, e);
|
|
428
430
|
};
|
|
429
|
-
ee(h),
|
|
431
|
+
ee(h), b(h);
|
|
430
432
|
let g = {
|
|
431
433
|
capture: !0,
|
|
432
434
|
passive: !0
|
|
433
435
|
};
|
|
434
|
-
|
|
436
|
+
G(V, "focusin", u, g), G(V, "focusout", f, g), U(() => clearTimeout(s));
|
|
435
437
|
}
|
|
436
438
|
//#endregion
|
|
437
439
|
//#region lib/components/ui/overlays/hover-card/HoverCard.vue
|
|
438
|
-
var
|
|
440
|
+
var we = /* @__PURE__ */ p({
|
|
439
441
|
__name: "HoverCard",
|
|
440
442
|
props: {
|
|
441
443
|
defaultOpen: { type: Boolean },
|
|
@@ -446,13 +448,13 @@ var Ce = /* @__PURE__ */ f({
|
|
|
446
448
|
},
|
|
447
449
|
emits: ["update:open"],
|
|
448
450
|
setup(e, { emit: t }) {
|
|
449
|
-
let n =
|
|
450
|
-
return (e, t) => (
|
|
451
|
-
default:
|
|
451
|
+
let n = B(e, t);
|
|
452
|
+
return (e, t) => (x(), s(w(F), _({ "data-slot": "hover-card" }, w(n)), {
|
|
453
|
+
default: k((t) => [S(e.$slots, "default", y(h(t)))]),
|
|
452
454
|
_: 3
|
|
453
455
|
}, 16));
|
|
454
456
|
}
|
|
455
|
-
}),
|
|
457
|
+
}), Te = /* @__PURE__ */ p({
|
|
456
458
|
inheritAttrs: !1,
|
|
457
459
|
__name: "HoverCardContent",
|
|
458
460
|
props: {
|
|
@@ -488,19 +490,19 @@ var Ce = /* @__PURE__ */ f({
|
|
|
488
490
|
] }
|
|
489
491
|
},
|
|
490
492
|
setup(t) {
|
|
491
|
-
let n = t, r =
|
|
492
|
-
return (t, i) => (
|
|
493
|
-
default:
|
|
493
|
+
let n = t, r = z(H(n, "class"));
|
|
494
|
+
return i(!1), (t, i) => (x(), s(w(P), null, {
|
|
495
|
+
default: k(() => [f(w(N), _({ "data-slot": "hover-card-content" }, {
|
|
494
496
|
...t.$attrs,
|
|
495
|
-
...
|
|
496
|
-
}, { class:
|
|
497
|
-
default:
|
|
497
|
+
...w(r)
|
|
498
|
+
}, { class: w(e)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 rounded-md border p-4 shadow-md outline-hidden", n.class) }), {
|
|
499
|
+
default: k(() => [S(t.$slots, "default")]),
|
|
498
500
|
_: 3
|
|
499
501
|
}, 16, ["class"])]),
|
|
500
502
|
_: 3
|
|
501
503
|
}));
|
|
502
504
|
}
|
|
503
|
-
}),
|
|
505
|
+
}), Ee = /* @__PURE__ */ p({
|
|
504
506
|
__name: "HoverCardTrigger",
|
|
505
507
|
props: {
|
|
506
508
|
reference: {},
|
|
@@ -509,11 +511,11 @@ var Ce = /* @__PURE__ */ f({
|
|
|
509
511
|
},
|
|
510
512
|
setup(e) {
|
|
511
513
|
let t = e;
|
|
512
|
-
return (e, n) => (
|
|
513
|
-
default:
|
|
514
|
+
return (e, n) => (x(), s(w(I), _({ "data-slot": "hover-card-trigger" }, t), {
|
|
515
|
+
default: k(() => [S(e.$slots, "default")]),
|
|
514
516
|
_: 3
|
|
515
517
|
}, 16));
|
|
516
518
|
}
|
|
517
519
|
});
|
|
518
520
|
//#endregion
|
|
519
|
-
export {
|
|
521
|
+
export { Se as a, ye as c, ge as d, Z as f, J as g, Y as h, $ as i, ve as l, X as m, Te as n, Q as o, me as p, we as r, be as s, Ee as t, _e as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./utils-CykWQ0iJ.js";
|
|
2
|
-
import { _r as t, hr as n, mr as r } from "./components
|
|
3
|
-
import { t as i } from "./use-material-translation-
|
|
4
|
-
import { t as a } from "./Button-
|
|
5
|
-
import { t as o } from "./icon-button-
|
|
2
|
+
import { _r as t, hr as n, mr as r } from "./components-B2kSyBK0.js";
|
|
3
|
+
import { t as i } from "./use-material-translation-C6xccbic.js";
|
|
4
|
+
import { t as a } from "./Button-DVeAQorb.js";
|
|
5
|
+
import { t as o } from "./icon-button-CSPfP615.js";
|
|
6
6
|
import { createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, openBlock as h, ref as g, renderSlot as _, shallowRef as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
|
|
7
7
|
import { Pause as S, Play as C } from "@lucide/vue";
|
|
8
8
|
//#region lib/components/ui/media/camera/camera-content.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
.form-grid-layout {
|
|
98
98
|
@apply relative flex flex-col gap-2 @container;
|
|
99
99
|
[data-slot="form-fields"] {
|
|
100
|
-
@apply grid @2xl:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-2 bg-background/80 p-4 place-items-start
|
|
100
|
+
@apply grid @2xl:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-2 bg-background/80 p-4 place-items-start;
|
|
101
101
|
|
|
102
102
|
[data-slot="separator"] {
|
|
103
103
|
@apply col-start-full;
|
|
@@ -125,13 +125,73 @@
|
|
|
125
125
|
@apply col-start-full;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
+
/* A focused control scrolls into view clear of the actions and a line
|
|
129
|
+
of helper text, in any scroll box (WCAG 2.4.11 Focus Not Obscured). */
|
|
130
|
+
[data-slot="form-fields"]
|
|
131
|
+
:is(
|
|
132
|
+
input,
|
|
133
|
+
textarea,
|
|
134
|
+
select,
|
|
135
|
+
button,
|
|
136
|
+
a[href],
|
|
137
|
+
summary,
|
|
138
|
+
[tabindex],
|
|
139
|
+
[contenteditable]
|
|
140
|
+
) {
|
|
141
|
+
scroll-margin-bottom: calc(
|
|
142
|
+
var(--form-actions-clearance, 6rem) +
|
|
143
|
+
var(--form-actions-fill, 0px)
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
/* Sticky at the bottom of whatever scrolls the form: in reach. */
|
|
128
147
|
[data-slot="form-actions"] {
|
|
129
|
-
@apply flex w-full justify-end gap-2
|
|
148
|
+
@apply sticky bottom-0 z-10 flex w-full justify-end gap-2 bg-background/90 p-4 backdrop-blur-sm max-sm:*:flex-1;
|
|
130
149
|
}
|
|
131
150
|
}
|
|
132
151
|
|
|
133
|
-
|
|
134
|
-
|
|
152
|
+
/* No height cap and no scroll of its own: the page (or the overlay) is
|
|
153
|
+
the one scroll. A Drawer's content does not scroll: the form does. */
|
|
154
|
+
[data-slot="drawer-content"] > .form-grid-layout {
|
|
155
|
+
@apply min-h-0 overflow-y-auto;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* In a dialog, the stuck actions sit above its bottom padding
|
|
159
|
+
(`--form-actions-fill`: p-6 by default; set it for another one). */
|
|
160
|
+
:is([data-slot="dialog-content"], [data-slot="alert-dialog-content"]) {
|
|
161
|
+
--form-actions-fill: 1.5rem;
|
|
162
|
+
&:is(.p-0, .py-0, .pb-0) {
|
|
163
|
+
--form-actions-fill: 0px;
|
|
164
|
+
}
|
|
165
|
+
&:is(.p-4, .py-4, .pb-4) {
|
|
166
|
+
--form-actions-fill: 1rem;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* ConfirmationDialog's form has no actions of its own: the dialog's
|
|
171
|
+
footer (two stacked buttons on a phone) sticks instead. */
|
|
172
|
+
:is([data-slot="dialog-content"], [data-slot="alert-dialog-content"]):has(
|
|
173
|
+
.form-grid-layout
|
|
174
|
+
):not(:has([data-slot="form-actions"])) {
|
|
175
|
+
--form-actions-clearance: 7.5rem;
|
|
176
|
+
> :is([data-slot="dialog-footer"], [data-slot="alert-dialog-footer"]) {
|
|
177
|
+
@apply sticky bottom-0 z-10 bg-background/90 backdrop-blur-sm;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* A sticky element stops at the scroll box's padding: in a dialog, an
|
|
182
|
+
`::after` as tall as that padding fills the strip below the stuck
|
|
183
|
+
actions, so no field shows there, and adds no overflow. */
|
|
184
|
+
:is([data-slot="dialog-content"], [data-slot="alert-dialog-content"])
|
|
185
|
+
.form-grid-layout
|
|
186
|
+
> [data-slot="form-actions"]::after,
|
|
187
|
+
:is([data-slot="dialog-content"], [data-slot="alert-dialog-content"]):has(
|
|
188
|
+
.form-grid-layout
|
|
189
|
+
):not(:has([data-slot="form-actions"]))
|
|
190
|
+
> :is(
|
|
191
|
+
[data-slot="dialog-footer"],
|
|
192
|
+
[data-slot="alert-dialog-footer"]
|
|
193
|
+
)::after {
|
|
194
|
+
@apply absolute inset-x-0 top-full h-(--form-actions-fill) bg-background content-[""];
|
|
135
195
|
}
|
|
136
196
|
|
|
137
197
|
/* No height cap on `DataTable` here (it nested a scroll in the page's):
|
package/dist/components/base.css
CHANGED
|
@@ -55,7 +55,9 @@
|
|
|
55
55
|
font-size: var(--text-xs);
|
|
56
56
|
font-weight: var(--font-weight-medium);
|
|
57
57
|
}
|
|
58
|
-
a:
|
|
58
|
+
/* A sidebar entry is a link styled as a menu entry: the prose link style
|
|
59
|
+
(underline, info tint on hover and focus) must not reach it (#566). */
|
|
60
|
+
a:not(:has(> button)):not([data-slot="sidebar-menu-item"]) {
|
|
59
61
|
@apply focus:underline underline-offset-4 hover:underline cursor-pointer;
|
|
60
62
|
@apply text-info [&_svg]:data-[slot=icon]:text-info hover:bg-info/10 active:bg-info/5 focus:bg-info/15;
|
|
61
63
|
}
|