@wssto2/vue-core 0.3.0 → 0.4.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/README.md +3 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-DKX3PH2n.js → AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js} +1 -1
- package/dist/{AccountMenuItem.vue_vue_type_script_setup_true_lang-DIGqTLwd.js → AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-B7Lpfkf6.js → ActionRow.vue_vue_type_script_setup_true_lang-LlfIPWsJ.js} +2 -2
- package/dist/{Activity-DviO0VQ8.js → Activity-2gGxQn7v.js} +9 -9
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CvAnzdc1.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-BoinCY93.js} +3 -3
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-CJsMUIUg.js → AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CCtthMRd.js → AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js} +4 -4
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-Cib_YYpr.js → Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-CYil8h9z.js → Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js} +1 -1
- package/dist/{Changes-DlT5mN9G.js → Changes-Bm8xvagD.js} +8 -8
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-CXILftEc.js → CollectionPage.vue_vue_type_script_setup_true_lang-DCBVw2Qd.js} +176 -172
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DSYgS9lC.js → DataTable.vue_vue_type_script_setup_true_lang-UH6f9puS.js} +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js +255 -0
- package/dist/DeadLetters-CMRtXn_N.js +104 -0
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-Cb3xJI1x.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-D1arePCZ.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-C2ZYIT9F.js → EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js} +1 -1
- package/dist/{FormErrors.vue_vue_type_script_setup_true_lang-DVgNBQ8p.js → FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js} +1 -1
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-0mfG8TkU.js → FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js} +10 -10
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-Bz2m3AtF.js → FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js} +2 -2
- package/dist/{General-BD-Hcz0a.js → General-CTqd0SLK.js} +8 -8
- package/dist/HeaderAction.vue_vue_type_script_setup_true_lang-Cgji-Jrr.js +45 -0
- package/dist/{Icon.vue_vue_type_script_lang-VvcV2Bzo.js → Icon.vue_vue_type_script_lang-D7oC-d-S.js} +33 -29
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-D7QgnUyN.js → IconTile.vue_vue_type_script_setup_true_lang-BpIjgu5E.js} +1 -1
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-C2udmeEA.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js} +1 -1
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-BNAjx9tj.js → Menu.vue_vue_type_script_setup_true_lang-DTbAcDzL.js} +30 -26
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-D7SwVPpL.js → Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js} +2 -2
- package/dist/{NewRolePage-Dla4YnMs.js → NewRolePage-DTOWIxxC.js} +4 -4
- package/dist/{NoAccess.vue_vue_type_script_setup_true_lang-8m9cNptR.js → NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js} +1 -1
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-CYRg7Kfg.js → NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.js} +1 -1
- package/dist/{PageBar.vue_vue_type_script_setup_true_lang-Cfr5xsJx.js → PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js} +1 -1
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-BCRxRK4D.js → Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js} +1 -1
- package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +46 -0
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-B3Q4dhqJ.js → PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js} +1 -1
- package/dist/ProfilePage-BlpiWH_W.js +654 -0
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-DKsaKlAq.js → RecordHeader.vue_vue_type_script_setup_true_lang-C_ymvhHU.js} +2 -2
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-CJcKa9SW.js → ResourcePage.vue_vue_type_script_setup_true_lang-CwI_sROp.js} +5 -5
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-DuEPOmjI.js → RoleEditor.vue_vue_type_script_setup_true_lang-CmwvSytD.js} +30 -29
- package/dist/{RolePage-bZzv_E4l.js → RolePage-DZk7BZOc.js} +13 -13
- package/dist/{RolesPage-BniZv0nB.js → RolesPage-DzGGCMnm.js} +9 -9
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-BKP_bge8.js → SectionList.vue_vue_type_script_setup_true_lang-BFYls8fR.js} +3 -3
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-BgGEGxSI.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DSMXEaCs.js} +5 -5
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-BZ9UdgA1.js → SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js} +1 -1
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BiGaEKBQ.js → SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js} +15 -14
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-DUQpr7gb.js → SessionList.vue_vue_type_script_setup_true_lang-D5KRitar.js} +4 -4
- package/dist/{Sessions-Co5-xdeb.js → Sessions-CWqjjTr1.js} +6 -6
- package/dist/SettingsPage-C4s0IdkW.js +255 -0
- package/dist/{Sheet.vue_vue_type_script_setup_true_lang-bHYzx7-J.js → Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js} +48 -45
- package/dist/{SignIn-BWwFbxki.js → SignIn-zzKY__df.js} +7 -7
- package/dist/{SignInPage-FnLtoi2q.js → SignInPage-Rqnus_s-.js} +6 -6
- package/dist/{SignInTable.vue_vue_type_script_setup_true_lang-Dnx3T_42.js → SignInTable.vue_vue_type_script_setup_true_lang-CEbAvZ_C.js} +1 -1
- package/dist/{SignIns-3UcI64_h.js → SignIns-Cnf9BVR0.js} +6 -6
- package/dist/{SwipeActions.vue_vue_type_script_setup_true_lang-4I8m27ol.js → SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js} +1 -1
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js +64 -0
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-BeGaydRr.js → Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-C_FMf3Vc.js → TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js} +3 -3
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js +68 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js +164 -0
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-1RJGKxbD.js → Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js} +1 -1
- package/dist/{UserRecord-Ci8HfwbX.js → UserRecord-DqigxVxH.js} +12 -12
- package/dist/{UsersList-vEJ-cgkT.js → UsersList-DNlZsI9J.js} +8 -8
- package/dist/{ViewTabs.vue_vue_type_script_setup_true_lang-ByqTU2JT.js → ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.js} +1 -1
- package/dist/access/index.js +1 -1
- package/dist/app/index.js +9 -9
- package/dist/button/index.js +1 -1
- package/dist/client/index.js +11 -19
- package/dist/{client-Bw0aM5Gu.js → client-k9euDWF4.js} +19 -19
- package/dist/collection/definition.d.ts +3 -0
- package/dist/collection/index.js +6 -6
- package/dist/collection/useCollection.d.ts +2 -0
- package/dist/content/index.js +2 -2
- package/dist/{contributions-CDDg3fKp.js → contributions-DsfmDoRD.js} +1 -1
- package/dist/control-7EP4tjYy.js +313 -0
- package/dist/controls/index.js +4 -4
- package/dist/form/index.js +987 -1134
- package/dist/{guards-Cd1V28oG.js → guards-Dve61KjR.js} +1 -1
- package/dist/{http-DGGSKWvU.js → http-CNcDHSOj.js} +9 -8
- package/dist/i18n/index.js +20 -20
- package/dist/icon/core.d.ts +4 -0
- package/dist/icon/index.js +1 -1
- package/dist/identity/index.js +1 -1
- package/dist/index-BsJ92eub.js +504 -0
- package/dist/{index-BAcl44SC.js → index-CGv-u1Ws.js} +19 -19
- package/dist/{index-B2dbYZR9.js → index-GcLnFF-z.js} +15 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modal/Sheet.vue.d.ts +2 -0
- package/dist/modal/index.js +5 -5
- package/dist/modules/events/entities.d.ts +16 -0
- package/dist/modules/events/routes.d.ts +17 -0
- package/dist/modules/events/schemas.d.ts +16 -0
- package/dist/modules/notification/entities.d.ts +46 -0
- package/dist/modules/notification/routes.d.ts +26 -0
- package/dist/modules/notification/schemas.d.ts +25 -0
- package/dist/{navigation-BPWa63ge.js → navigation-Cm3iChlR.js} +1 -1
- package/dist/{neighbors-D0WRBxXI.js → neighbors-DpaIMQAL.js} +1 -1
- package/dist/notifications/InboxPanel.vue.d.ts +16 -0
- package/dist/notifications/MarkAllRead.vue.d.ts +7 -0
- package/dist/notifications/NotificationBell.vue.d.ts +2 -0
- package/dist/notifications/SettingsLink.vue.d.ts +6 -0
- package/dist/notifications/context.d.ts +20 -0
- package/dist/notifications/deadletters/DeadLetters.vue.d.ts +2 -0
- package/dist/notifications/deadletters/access.d.ts +3 -0
- package/dist/notifications/deadletters/list.d.ts +3 -0
- package/dist/notifications/deadletters/routes.d.ts +13 -0
- package/dist/notifications/feature.d.ts +31 -0
- package/dist/notifications/inbox.d.ts +62 -0
- package/dist/notifications/index.d.ts +13 -0
- package/dist/notifications/index.js +8 -0
- package/dist/notifications/settings/EmailPanel.vue.d.ts +14 -0
- package/dist/notifications/settings/QuietHoursPanel.vue.d.ts +14 -0
- package/dist/notifications/settings/SettingsMenuItem.vue.d.ts +2 -0
- package/dist/notifications/settings/SettingsPage.vue.d.ts +2 -0
- package/dist/notifications/settings/categoryText.d.ts +9 -0
- package/dist/notifications/settings/routes.d.ts +13 -0
- package/dist/notifications/settings/settings.d.ts +18 -0
- package/dist/notifications/settings/state.d.ts +16 -0
- package/dist/notifications/state.d.ts +27 -0
- package/dist/notifications/stream.d.ts +21 -0
- package/dist/options-Ba_0uLWN.js +18 -0
- package/dist/overlay/index.js +3 -3
- package/dist/page/index.js +7 -7
- package/dist/phone/index.js +68 -67
- package/dist/platform/index.js +2 -2
- package/dist/{platform-hunMqFdB.js → platform-q3cjODLx.js} +1 -1
- package/dist/resource/index.js +1 -1
- package/dist/route-goWMxDUN.js +13 -0
- package/dist/router/index.js +4 -4
- package/dist/{rowLayout-BI7a3Kom.js → rowLayout-BqTEhEuy.js} +5 -5
- package/dist/{sections-BEqW1dOc.js → sections-CntvUTxn.js} +1 -1
- package/dist/shell/index.js +460 -496
- package/dist/state/index.js +4 -4
- package/dist/{status-C9aXR-Jb.js → status-BuP3ULjH.js} +2 -2
- package/dist/styles.css +1 -1
- package/dist/{suggestions-BJAqOj4c.js → suggestions-BxMm6MQA.js} +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/transport-BnP7WC0Y.js +4 -0
- package/dist/{useCommand-BgRwnYlV.js → useCommand-BkONMn3X.js} +2 -2
- package/dist/{useResourceForm-Bgc9jMcu.js → useResourceForm-D1hIpwW5.js} +1 -1
- package/dist/useTypedEntry-aTfPBAhw.js +857 -0
- package/package.json +6 -2
- package/dist/DateField.vue_vue_type_script_setup_true_lang-DMVjNsaM.js +0 -1099
- package/dist/ProfilePage-OJMQ8cr8.js +0 -691
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CU3KTKIJ.js +0 -127
- package/dist/options-BXkMR63B.js +0 -329
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { inject as q, ref as G, computed as r, onBeforeUnmount as C, defineComponent as F, useSlots as V, openBlock as l, createBlock as L, resolveDynamicComponent as T, unref as t, normalizeClass as y, withCtx as _, createElementBlock as a, renderSlot as f, createCommentVNode as n, createElementVNode as g, createTextVNode as x, toDisplayString as u, createVNode as D, useAttrs as K, useId as P, mergeProps as A, createSlots as M, mergeDefaults as O } from "vue";
|
|
2
|
+
import { useI18n as U } from "vue-i18n";
|
|
3
|
+
import { _ as I } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
4
|
+
import { RouterLink as Y } from "vue-router";
|
|
5
|
+
import { c as H, a as J } from "./controlSurface-t7OEFESJ.js";
|
|
6
|
+
import { u as Q } from "./mediaQuery-CygcXmFW.js";
|
|
7
|
+
const W = {
|
|
8
|
+
label: void 0,
|
|
9
|
+
hint: void 0,
|
|
10
|
+
error: void 0,
|
|
11
|
+
required: !1,
|
|
12
|
+
editable: !0,
|
|
13
|
+
disabled: !1,
|
|
14
|
+
lockedReason: void 0,
|
|
15
|
+
presentation: "control",
|
|
16
|
+
name: void 0
|
|
17
|
+
}, X = Symbol("vue-core.formGroup"), Z = Symbol("vue-core.formRowIndent"), ee = Symbol("vue-core.formEditable"), R = () => q(X, null), te = () => q(Z, 0);
|
|
18
|
+
function oe(i) {
|
|
19
|
+
const e = R(), d = q(ee, G(!0)), c = Q(), h = r(() => !!e && !!i.disabled && (c.value || i.presentation === "value")), v = r(() => (i.editable ?? !0) && d.value && !h.value), o = r(() => !!e && !!i.disabled && v.value);
|
|
20
|
+
if (e) {
|
|
21
|
+
const m = e.registerLocked(r(() => !!i.disabled && d.value && i.presentation !== "value"));
|
|
22
|
+
C(m);
|
|
23
|
+
}
|
|
24
|
+
return { editable: v, locked: o };
|
|
25
|
+
}
|
|
26
|
+
const le = ["label", "hint", "error", "required", "editable", "disabled", "lockedReason", "presentation", "name"];
|
|
27
|
+
function Re(i) {
|
|
28
|
+
return Object.fromEntries(le.map((e) => [e, i[e]]));
|
|
29
|
+
}
|
|
30
|
+
const re = {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: "flex shrink-0 items-center"
|
|
33
|
+
}, ae = { class: "row-body min-h-row min-w-0 flex-1 border-t border-border-separator py-2 pr-row-inset" }, se = {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "text-content-destructive",
|
|
36
|
+
"aria-hidden": "true"
|
|
37
|
+
}, ne = ["id"], ie = {
|
|
38
|
+
key: 0,
|
|
39
|
+
class: "break-words text-body text-content-strong"
|
|
40
|
+
}, de = ["id"], ue = /* @__PURE__ */ F({
|
|
41
|
+
__name: "FormRow",
|
|
42
|
+
props: {
|
|
43
|
+
label: { default: void 0 },
|
|
44
|
+
for: { default: void 0 },
|
|
45
|
+
sub: { default: void 0 },
|
|
46
|
+
subId: { default: void 0 },
|
|
47
|
+
required: { type: Boolean, default: !1 },
|
|
48
|
+
layout: { default: "entry" },
|
|
49
|
+
value: { default: void 0 },
|
|
50
|
+
to: { default: void 0 },
|
|
51
|
+
error: { default: void 0 },
|
|
52
|
+
errorId: { default: void 0 },
|
|
53
|
+
indent: { default: 0 },
|
|
54
|
+
labelLines: { default: void 0 },
|
|
55
|
+
labelAlign: { default: "center" }
|
|
56
|
+
},
|
|
57
|
+
setup(i) {
|
|
58
|
+
const e = i, d = V(), c = te(), h = r(() => c + e.indent), v = ["pl-row-inset", "pl-[calc(var(--app-row-inset)+1.25rem)]", "pl-[calc(var(--app-row-inset)+2.5rem)]"], o = { 1: "line-clamp-1", 2: "line-clamp-2", 3: "line-clamp-3" }, m = r(() => {
|
|
59
|
+
switch (e.layout) {
|
|
60
|
+
case "entry":
|
|
61
|
+
return "grid grid-cols-[var(--form-label-width,11rem)_minmax(0,1fr)] items-center gap-x-4 compact:grid-cols-[minmax(0,auto)_minmax(40%,1fr)]";
|
|
62
|
+
case "value":
|
|
63
|
+
return "grid grid-cols-[minmax(min-content,1fr)_minmax(0,auto)] items-center gap-x-4";
|
|
64
|
+
case "setting":
|
|
65
|
+
return "flex items-center gap-4";
|
|
66
|
+
default:
|
|
67
|
+
return "flex flex-col gap-1";
|
|
68
|
+
}
|
|
69
|
+
}), S = r(() => e.layout === "stacked" ? "text-footnote text-content-muted" : e.layout === "value" ? "text-body text-content-muted" : "text-body text-content-strong"), p = r(() => e.value !== void 0 && e.value !== null && e.value !== "");
|
|
70
|
+
return (b, w) => (l(), L(T(e.to ? t(Y) : "div"), {
|
|
71
|
+
to: e.to,
|
|
72
|
+
"data-test": "form-row",
|
|
73
|
+
"data-layout": e.layout,
|
|
74
|
+
"data-field-error": e.error ? "true" : void 0,
|
|
75
|
+
class: y(["form-row flex min-w-0 items-stretch gap-3 transition-colors duration-motion-fast first:rounded-t-group last:rounded-b-group focus-within:bg-tint-soft/50 [&:first-child>.row-body]:border-t-0", [v[Math.min(h.value, 2)], e.to ? "hover:bg-fill focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus" : ""]])
|
|
76
|
+
}, {
|
|
77
|
+
default: _(() => [
|
|
78
|
+
d.leading ? (l(), a("div", re, [
|
|
79
|
+
f(b.$slots, "leading")
|
|
80
|
+
])) : n("", !0),
|
|
81
|
+
g("div", ae, [
|
|
82
|
+
g("div", {
|
|
83
|
+
class: y(["min-w-0", m.value])
|
|
84
|
+
}, [
|
|
85
|
+
e.label || e.sub || d.sub ? (l(), a("div", {
|
|
86
|
+
key: 0,
|
|
87
|
+
class: y([e.layout === "setting" ? "min-w-min flex-1" : "min-w-0", e.labelAlign === "top" ? "self-start pt-1" : ""])
|
|
88
|
+
}, [
|
|
89
|
+
g("div", {
|
|
90
|
+
class: y(d["label-trailing"] ? "flex items-center justify-between gap-3" : "")
|
|
91
|
+
}, [
|
|
92
|
+
(l(), L(T(e.for ? "label" : "span"), {
|
|
93
|
+
for: e.for,
|
|
94
|
+
class: y(["break-words", [S.value, e.labelLines ? o[e.labelLines] : "block"]])
|
|
95
|
+
}, {
|
|
96
|
+
default: _(() => [
|
|
97
|
+
x(u(e.label), 1),
|
|
98
|
+
e.required ? (l(), a("span", se, " *")) : n("", !0)
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["for", "class"])),
|
|
102
|
+
f(b.$slots, "label-trailing")
|
|
103
|
+
], 2),
|
|
104
|
+
e.sub || d.sub ? (l(), a("small", {
|
|
105
|
+
key: 0,
|
|
106
|
+
id: e.subId,
|
|
107
|
+
class: "mt-0.5 block text-footnote text-content-muted"
|
|
108
|
+
}, [
|
|
109
|
+
f(b.$slots, "sub", {}, () => [
|
|
110
|
+
x(u(e.sub), 1)
|
|
111
|
+
])
|
|
112
|
+
], 8, ne)) : n("", !0)
|
|
113
|
+
], 2)) : n("", !0),
|
|
114
|
+
g("div", {
|
|
115
|
+
class: y(["flex min-w-0 items-center gap-2", e.layout === "value" ? "justify-end text-right" : e.layout === "setting" ? "flex-wrap justify-end text-right" : e.layout === "entry" ? "compact:justify-end" : ""])
|
|
116
|
+
}, [
|
|
117
|
+
f(b.$slots, "default", {}, () => [
|
|
118
|
+
p.value ? (l(), a("span", ie, u(e.value), 1)) : n("", !0)
|
|
119
|
+
]),
|
|
120
|
+
f(b.$slots, "trailing"),
|
|
121
|
+
e.to ? (l(), L(t(I), {
|
|
122
|
+
key: 0,
|
|
123
|
+
name: "arrowRightSLine",
|
|
124
|
+
size: 18,
|
|
125
|
+
class: "shrink-0 text-content-disabled"
|
|
126
|
+
})) : n("", !0)
|
|
127
|
+
], 2)
|
|
128
|
+
], 2),
|
|
129
|
+
e.error ? (l(), a("p", {
|
|
130
|
+
key: 0,
|
|
131
|
+
id: e.errorId,
|
|
132
|
+
class: "mt-1 flex items-start gap-1.5 text-footnote text-content-destructive",
|
|
133
|
+
role: "alert"
|
|
134
|
+
}, [
|
|
135
|
+
D(t(I), {
|
|
136
|
+
name: "alertTriangle",
|
|
137
|
+
size: 14,
|
|
138
|
+
class: "mt-px shrink-0"
|
|
139
|
+
}),
|
|
140
|
+
x(" " + u(e.error), 1)
|
|
141
|
+
], 8, de)) : n("", !0)
|
|
142
|
+
])
|
|
143
|
+
]),
|
|
144
|
+
_: 3
|
|
145
|
+
}, 8, ["to", "data-layout", "data-field-error", "class"]));
|
|
146
|
+
}
|
|
147
|
+
}), ce = ["title"], fe = {
|
|
148
|
+
key: 0,
|
|
149
|
+
class: "mr-1"
|
|
150
|
+
}, ve = {
|
|
151
|
+
key: 1,
|
|
152
|
+
class: "ml-1 text-content-muted"
|
|
153
|
+
}, me = {
|
|
154
|
+
key: 3,
|
|
155
|
+
class: "block text-body text-content-disabled"
|
|
156
|
+
}, be = {
|
|
157
|
+
key: 0,
|
|
158
|
+
class: "sr-only"
|
|
159
|
+
}, ye = ["data-field-error"], pe = {
|
|
160
|
+
key: 0,
|
|
161
|
+
class: "flex items-center justify-between gap-3"
|
|
162
|
+
}, ge = ["for"], xe = {
|
|
163
|
+
key: 0,
|
|
164
|
+
class: "text-content-destructive",
|
|
165
|
+
"aria-hidden": "true"
|
|
166
|
+
}, he = ["id"], ke = ["id"], Ee = /* @__PURE__ */ F({
|
|
167
|
+
__name: "Field",
|
|
168
|
+
props: /* @__PURE__ */ O({
|
|
169
|
+
label: {},
|
|
170
|
+
hint: {},
|
|
171
|
+
error: {},
|
|
172
|
+
required: { type: Boolean },
|
|
173
|
+
editable: { type: Boolean },
|
|
174
|
+
disabled: { type: Boolean },
|
|
175
|
+
lockedReason: {},
|
|
176
|
+
presentation: {},
|
|
177
|
+
name: {},
|
|
178
|
+
value: { type: [String, Number, Boolean, null] },
|
|
179
|
+
prefix: {},
|
|
180
|
+
suffix: {},
|
|
181
|
+
valueStyle: {},
|
|
182
|
+
rowLayout: {},
|
|
183
|
+
rowLabelAlign: {}
|
|
184
|
+
}, { ...W, value: void 0, prefix: void 0, suffix: void 0, valueStyle: void 0, rowLayout: "entry", rowLabelAlign: "center" }),
|
|
185
|
+
setup(i) {
|
|
186
|
+
const e = i, { t: d } = U(), c = V(), h = K(), v = R(), { editable: o, locked: m } = oe(e), S = P(), p = r(() => e.name ?? S), b = r(() => `${p.value}-hint`), w = r(() => `${p.value}-error`);
|
|
187
|
+
if (v?.registerField) {
|
|
188
|
+
const s = h["data-field-key"], j = v.registerField(typeof s == "string" ? s : void 0, r(() => e.disabled));
|
|
189
|
+
C(j);
|
|
190
|
+
}
|
|
191
|
+
const k = r(() => {
|
|
192
|
+
const s = e.value;
|
|
193
|
+
return s == null ? !1 : typeof s == "string" ? s.length > 0 : typeof s == "number" ? !Number.isNaN(s) : !0;
|
|
194
|
+
}), E = r(() => typeof e.value == "boolean" ? e.value ? d("core.form.yes") : d("core.form.no") : e.value), z = r(() => !!v && !o.value && v.hideEmpty.value && !k.value && !c.readonly), N = r(() => [e.hint && o.value ? b.value : null, e.error ? w.value : null].filter(Boolean).join(" ") || void 0), $ = r(() => o.value ? e.rowLayout : e.rowLayout === "stacked" ? "stacked" : "value"), B = r(
|
|
195
|
+
() => o.value && !m.value && e.required ? { "data-field-required": "true", "data-field-filled": k.value ? "true" : void 0 } : {}
|
|
196
|
+
);
|
|
197
|
+
return (s, j) => t(v) && !z.value ? (l(), L(ue, A({ key: 0 }, B.value, {
|
|
198
|
+
label: e.label,
|
|
199
|
+
for: t(o) ? p.value : void 0,
|
|
200
|
+
sub: t(o) ? e.hint : void 0,
|
|
201
|
+
"sub-id": b.value,
|
|
202
|
+
required: t(o) && !t(m) && e.required,
|
|
203
|
+
layout: $.value,
|
|
204
|
+
"label-align": $.value === "entry" ? e.rowLabelAlign : void 0,
|
|
205
|
+
error: t(o) ? e.error : void 0,
|
|
206
|
+
"error-id": w.value,
|
|
207
|
+
"data-field-locked": t(m) ? "true" : void 0
|
|
208
|
+
}), M({
|
|
209
|
+
default: _(() => [
|
|
210
|
+
g("div", {
|
|
211
|
+
class: "relative w-full min-w-0",
|
|
212
|
+
title: t(m) ? e.lockedReason : void 0
|
|
213
|
+
}, [
|
|
214
|
+
g("div", {
|
|
215
|
+
class: y(t(o) ? $.value === "setting" ? "flex min-w-0 flex-col items-end" : $.value === "stacked" ? "flex min-w-0 flex-col items-stretch" : "flex min-w-0 flex-col items-start compact:items-end" : "")
|
|
216
|
+
}, [
|
|
217
|
+
t(o) ? f(s.$slots, "default", {
|
|
218
|
+
id: p.value,
|
|
219
|
+
describedby: N.value,
|
|
220
|
+
invalid: !!e.error,
|
|
221
|
+
required: e.required,
|
|
222
|
+
disabled: e.disabled
|
|
223
|
+
}, void 0, void 0, 0) : t(c).readonly ? f(s.$slots, "readonly", {}, void 0, void 0, 1) : k.value ? (l(), a("span", {
|
|
224
|
+
key: 2,
|
|
225
|
+
class: y(["block break-words text-body text-content-strong", e.valueStyle === "mono" ? "font-mono" : e.valueStyle === "numeric" ? "tabular-nums" : ""])
|
|
226
|
+
}, [
|
|
227
|
+
e.prefix ? (l(), a("span", fe, u(e.prefix), 1)) : n("", !0),
|
|
228
|
+
x(u(E.value), 1),
|
|
229
|
+
e.suffix ? (l(), a("span", ve, u(e.suffix), 1)) : n("", !0)
|
|
230
|
+
], 2)) : (l(), a("span", me, u(t(d)("core.state.no_value")), 1))
|
|
231
|
+
], 2)
|
|
232
|
+
], 8, ce),
|
|
233
|
+
t(m) && e.lockedReason ? (l(), a("span", be, u(e.lockedReason), 1)) : n("", !0)
|
|
234
|
+
]),
|
|
235
|
+
_: 2
|
|
236
|
+
}, [
|
|
237
|
+
t(o) && t(c).trailing ? {
|
|
238
|
+
name: "trailing",
|
|
239
|
+
fn: _(() => [
|
|
240
|
+
f(s.$slots, "trailing")
|
|
241
|
+
]),
|
|
242
|
+
key: "0"
|
|
243
|
+
} : void 0,
|
|
244
|
+
t(o) && t(c).labelTrailing ? {
|
|
245
|
+
name: "label-trailing",
|
|
246
|
+
fn: _(() => [
|
|
247
|
+
f(s.$slots, "labelTrailing")
|
|
248
|
+
]),
|
|
249
|
+
key: "1"
|
|
250
|
+
} : void 0
|
|
251
|
+
]), 1040, ["label", "for", "sub", "sub-id", "required", "layout", "label-align", "error", "error-id", "data-field-locked"])) : t(v) ? n("", !0) : (l(), a("div", A({ key: 1 }, B.value, {
|
|
252
|
+
"data-field-error": e.error ? "true" : void 0,
|
|
253
|
+
class: "flex min-w-0 flex-col gap-1"
|
|
254
|
+
}), [
|
|
255
|
+
e.label || t(o) && t(c).labelTrailing ? (l(), a("div", pe, [
|
|
256
|
+
e.label ? (l(), a("label", {
|
|
257
|
+
key: 0,
|
|
258
|
+
for: t(o) ? p.value : void 0,
|
|
259
|
+
class: "text-footnote font-medium text-content-muted"
|
|
260
|
+
}, [
|
|
261
|
+
x(u(e.label), 1),
|
|
262
|
+
t(o) && e.required ? (l(), a("span", xe, " *")) : n("", !0)
|
|
263
|
+
], 8, ge)) : n("", !0),
|
|
264
|
+
t(o) ? f(s.$slots, "labelTrailing", {}, void 0, void 0, 1) : n("", !0)
|
|
265
|
+
])) : n("", !0),
|
|
266
|
+
t(o) ? f(s.$slots, "default", {
|
|
267
|
+
id: p.value,
|
|
268
|
+
describedby: N.value,
|
|
269
|
+
invalid: !!e.error,
|
|
270
|
+
required: e.required,
|
|
271
|
+
disabled: e.disabled
|
|
272
|
+
}, void 0, void 0, 1) : t(c).readonly ? f(s.$slots, "readonly", {}, void 0, void 0, 2) : (l(), a("span", {
|
|
273
|
+
key: 3,
|
|
274
|
+
class: y(["text-body", k.value ? "text-content-strong" : "text-content-disabled"])
|
|
275
|
+
}, u(k.value ? `${e.prefix ?? ""}${E.value}${e.suffix ?? ""}` : t(d)("core.state.no_value")), 3)),
|
|
276
|
+
e.hint && t(o) ? (l(), a("p", {
|
|
277
|
+
key: 4,
|
|
278
|
+
id: b.value,
|
|
279
|
+
class: "text-footnote text-content-muted"
|
|
280
|
+
}, u(e.hint), 9, he)) : n("", !0),
|
|
281
|
+
e.error ? (l(), a("p", {
|
|
282
|
+
key: 5,
|
|
283
|
+
id: w.value,
|
|
284
|
+
role: "alert",
|
|
285
|
+
class: "flex items-start gap-1.5 text-footnote text-content-destructive"
|
|
286
|
+
}, [
|
|
287
|
+
D(t(I), {
|
|
288
|
+
name: "alertTriangle",
|
|
289
|
+
size: 14,
|
|
290
|
+
class: "mt-px shrink-0"
|
|
291
|
+
}),
|
|
292
|
+
x(" " + u(e.error), 1)
|
|
293
|
+
], 8, ke)) : n("", !0)
|
|
294
|
+
], 16, ye));
|
|
295
|
+
}
|
|
296
|
+
}), _e = "rounded-control transition-[background-color,box-shadow,opacity] duration-motion-fast ease-motion-standard";
|
|
297
|
+
function Ne(i, e) {
|
|
298
|
+
const d = !!R();
|
|
299
|
+
return r(() => d ? H({ kind: i, state: e() }) : [_e, ...J(i, e()).map(([c]) => c)].join(" "));
|
|
300
|
+
}
|
|
301
|
+
export {
|
|
302
|
+
Ee as _,
|
|
303
|
+
R as a,
|
|
304
|
+
W as b,
|
|
305
|
+
Ne as c,
|
|
306
|
+
ee as d,
|
|
307
|
+
ue as e,
|
|
308
|
+
Re as f,
|
|
309
|
+
X as g,
|
|
310
|
+
Z as h,
|
|
311
|
+
te as i,
|
|
312
|
+
oe as u
|
|
313
|
+
};
|
package/dist/controls/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as A } from "../IconTile.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as A } from "../IconTile.vue_vue_type_script_setup_true_lang-BpIjgu5E.js";
|
|
2
2
|
import { defineComponent as p, useSlots as c, openBlock as r, createElementBlock as d, normalizeClass as u, createElementVNode as f, renderSlot as m, toDisplayString as b, createVNode as x, unref as h, useModel as v, useTemplateRef as _, withDirectives as y, mergeProps as g, vModelText as k, mergeModels as w } from "vue";
|
|
3
|
-
import { _ as B } from "../Icon.vue_vue_type_script_lang-
|
|
3
|
+
import { _ as B } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
4
4
|
import { _ as N } from "../DateButton.vue_vue_type_script_setup_true_lang-EcqrfWKz.js";
|
|
5
|
-
import { _ as W } from "../Tabs.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as L } from "../SwipeActions.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as W } from "../Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js";
|
|
6
|
+
import { _ as L } from "../SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js";
|
|
7
7
|
import { c as j, a as F, b as G, d as H } from "../controlSurface-t7OEFESJ.js";
|
|
8
8
|
const S = ["disabled", "aria-haspopup", "aria-expanded", "aria-invalid"], V = { class: "min-w-0 truncate" }, P = {
|
|
9
9
|
key: 1,
|