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