@wssto2/vue-core 0.4.15 → 0.4.16
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/dist/{ActionRow.vue_vue_type_script_setup_true_lang-CkvS5W6K.js → ActionRow.vue_vue_type_script_setup_true_lang-DOjn7fqy.js} +1 -1
- package/dist/{Activity-4q26REYj.js → Activity-CVO3sJwy.js} +4 -4
- package/dist/{Changes-CKIuGF8O.js → Changes-Bzvl3cEx.js} +3 -3
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-B17cUOzj.js → CollectionPage.vue_vue_type_script_setup_true_lang-CD5zZ29o.js} +2 -2
- package/dist/DateField.vue_vue_type_script_setup_true_lang-BufoFwVQ.js +278 -0
- package/dist/{DeadLetters-DPGcQOz1.js → DeadLetters-DmwUtgf9.js} +2 -2
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-noYI9QMk.js → FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-BcIbTMHN.js → FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js} +1 -1
- package/dist/{General-CUA9b3ML.js → General-CUEjJBD4.js} +6 -6
- package/dist/{NewRolePage-DBfCvDWA.js → NewRolePage-Cyn-oV6r.js} +2 -2
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-a8kN3A7k.js +150 -0
- package/dist/{ProfilePage-On-eAiJ-.js → ProfilePage-I74SQBFO.js} +4 -4
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-fvAf3rQm.js → RoleEditor.vue_vue_type_script_setup_true_lang-Ce6wjptT.js} +7 -7
- package/dist/{RolePage-B8oul55j.js → RolePage-DWQP3qQl.js} +5 -5
- package/dist/{RolesPage-DsXVivdj.js → RolesPage-BeEsHIQ2.js} +4 -4
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BMBkEmxr.js +81 -0
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-DedKLLQK.js → SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js} +161 -139
- package/dist/{SessionList.vue_vue_type_script_setup_true_lang-CirlMdHb.js → SessionList.vue_vue_type_script_setup_true_lang-DoUo68xE.js} +2 -2
- package/dist/{Sessions-BTyXDEuY.js → Sessions-D8IXcb5M.js} +2 -2
- package/dist/{SettingsPage-DHTmMgif.js → SettingsPage-DRQP2nrH.js} +6 -6
- package/dist/{SignIn-DU4DE2wj.js → SignIn-CAZkovhb.js} +4 -4
- package/dist/{SignInPage-BA22kyOp.js → SignInPage-D-49oLY3.js} +3 -3
- package/dist/{SignIns-C8QAZBaL.js → SignIns-BtNfgMLc.js} +1 -1
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-0weBvsJf.js +87 -0
- package/dist/TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js +292 -0
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-4wC3c0BM.js +91 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-pAdLPYXA.js +187 -0
- package/dist/{UserRecord-D1BNmYp9.js → UserRecord-BSbNuRFi.js} +5 -5
- package/dist/{UsersList-ltx3G23-.js → UsersList-DPHxcaDm.js} +6 -6
- package/dist/access/index.js +1 -1
- package/dist/app/application.d.ts +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/{control-CX9BG2UB.js → control-B_Nwtmag.js} +96 -82
- package/dist/form/CardSelectField.vue.d.ts +2 -2
- package/dist/form/ChoiceChips.vue.d.ts +2 -2
- package/dist/form/ComboField.vue.d.ts +2 -2
- package/dist/form/DateField.vue.d.ts +9 -2
- package/dist/form/DateTimeField.vue.d.ts +9 -2
- package/dist/form/Field.vue.d.ts +1 -1
- package/dist/form/FileField.vue.d.ts +9 -2
- package/dist/form/I18nField.vue.d.ts +9 -2
- package/dist/form/MoneyField.vue.d.ts +9 -2
- package/dist/form/MonthYearField.vue.d.ts +9 -2
- package/dist/form/MultiSelectField.vue.d.ts +2 -2
- package/dist/form/NumberField.vue.d.ts +20 -2
- package/dist/form/PhotoField.vue.d.ts +9 -2
- package/dist/form/SegmentedField.vue.d.ts +2 -2
- package/dist/form/SelectField.vue.d.ts +2 -2
- package/dist/form/SwitchField.vue.d.ts +2 -2
- package/dist/form/TextField.vue.d.ts +9 -2
- package/dist/form/TextareaField.vue.d.ts +9 -2
- package/dist/form/TimeField.vue.d.ts +9 -2
- package/dist/form/field.d.ts +9 -0
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.js +1079 -881
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.js +31 -28
- package/dist/identity/index.js +1 -1
- package/dist/{index-DwdVrW6q.js → index-Bq96L43f.js} +12 -12
- package/dist/{index-BCw_Ki6z.js → index-CWeNiBX6.js} +2 -2
- package/dist/{index-Chh4z9xW.js → index-yKIOaisE.js} +7 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/phone/index.js +1 -1
- package/dist/{status-cWCAMAmW.js → status-DzmySsWw.js} +1 -1
- package/package.json +1 -1
- package/dist/DateField.vue_vue_type_script_setup_true_lang-DehwWm78.js +0 -256
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-Dm6FfJ2T.js +0 -126
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-B2d55hrh.js +0 -59
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-B2Z2hy_h.js +0 -65
- package/dist/TextField.vue_vue_type_script_setup_true_lang-nqnGG7Zc.js +0 -270
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-BgIQyYtf.js +0 -69
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-Dr0h-V_8.js +0 -165
package/dist/identity/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as t, h as n, j as a, i, k as o, d as r, l as d, m as u, n as y, r as l, o as I, s as f, q as p, t as A, f as c } from "../index-
|
|
1
|
+
import { _ as t, h as n, j as a, i, k as o, d as r, l as d, m as u, n as y, r as l, o as I, s as f, q as p, t as A, f as c } from "../index-Bq96L43f.js";
|
|
2
2
|
export {
|
|
3
3
|
t as SignInAsButton,
|
|
4
4
|
n as identityFeature,
|
|
@@ -14,8 +14,8 @@ import { useRouter as J, useRoute as de } from "vue-router";
|
|
|
14
14
|
import { _ as Q } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
15
15
|
import { _ as L } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
16
16
|
import { u as fe } from "./leaveGuard-Cc8yeLxM.js";
|
|
17
|
-
import { _ as he } from "./FormView.vue_vue_type_script_setup_true_lang-
|
|
18
|
-
import { _ as ye } from "./TextField.vue_vue_type_script_setup_true_lang-
|
|
17
|
+
import { _ as he } from "./FormView.vue_vue_type_script_setup_true_lang-Dz5TZt92.js";
|
|
18
|
+
import { _ as ye } from "./TextField.vue_vue_type_script_setup_true_lang-D3-R5XXG.js";
|
|
19
19
|
import { u as ge } from "./mediaQuery-CygcXmFW.js";
|
|
20
20
|
import { u as ve } from "./useDialog-CXR3hN0G.js";
|
|
21
21
|
import { c as _e } from "./closeOverlays-CjVsIrpL.js";
|
|
@@ -315,7 +315,7 @@ function Cs(e) {
|
|
|
315
315
|
const Ye = async (e) => {
|
|
316
316
|
await B(e.http);
|
|
317
317
|
}, Je = z({
|
|
318
|
-
login: { name: "login", path: "/login", component: () => import("./SignInPage-
|
|
318
|
+
login: { name: "login", path: "/login", component: () => import("./SignInPage-D-49oLY3.js"), meta: { public: !0, titleKey: "core.identity.signin.title" } }
|
|
319
319
|
});
|
|
320
320
|
function Os(e = {}) {
|
|
321
321
|
return H({
|
|
@@ -334,7 +334,7 @@ function Os(e = {}) {
|
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
const Z = z({
|
|
337
|
-
index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-
|
|
337
|
+
index: { name: "profile", path: "/profile", component: () => import("./ProfilePage-I74SQBFO.js"), meta: { titleKey: "core.profile.title" } }
|
|
338
338
|
}), Qe = /* @__PURE__ */ E({
|
|
339
339
|
__name: "ProfileMenuItem",
|
|
340
340
|
setup(e) {
|
|
@@ -358,19 +358,19 @@ function es(e) {
|
|
|
358
358
|
return { name: `users.record.${e.path}`, path: e.path, component: s, meta: { ...e.meta } };
|
|
359
359
|
}
|
|
360
360
|
const W = "iam.user:view", qs = "iam.user:manage", ss = "iam.user.activity:view", ee = z({
|
|
361
|
-
index: { name: "users.index", path: "/users", component: () => import("./UsersList-
|
|
361
|
+
index: { name: "users.index", path: "/users", component: () => import("./UsersList-DPHxcaDm.js"), meta: { access: W, titleKey: "core.users.title" } },
|
|
362
362
|
record: {
|
|
363
363
|
name: "users.record",
|
|
364
364
|
path: "/users/:id",
|
|
365
|
-
component: () => import("./UserRecord-
|
|
365
|
+
component: () => import("./UserRecord-BSbNuRFi.js"),
|
|
366
366
|
meta: { access: W, titleKey: "core.users.title", remountOnParam: "id" },
|
|
367
367
|
children: [
|
|
368
|
-
{ name: "users.record.general", path: "general", component: () => import("./General-
|
|
369
|
-
{ name: "users.record.signin", path: "signin", component: () => import("./SignIn-
|
|
370
|
-
{ name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-
|
|
371
|
-
{ name: "users.record.signins", path: "signins", component: () => import("./SignIns-
|
|
372
|
-
{ name: "users.record.changes", path: "changes", component: () => import("./Changes-
|
|
373
|
-
{ name: "users.record.activity", path: "activity", component: () => import("./Activity-
|
|
368
|
+
{ name: "users.record.general", path: "general", component: () => import("./General-CUEjJBD4.js"), meta: { section: { labelKey: "core.users.sections.general", icon: "user3Line", groupKey: "core.users.section_groups.person" } } },
|
|
369
|
+
{ name: "users.record.signin", path: "signin", component: () => import("./SignIn-CAZkovhb.js"), meta: { section: { labelKey: "core.users.sections.signin", icon: "key2Line", groupKey: "core.users.section_groups.access" } } },
|
|
370
|
+
{ name: "users.record.sessions", path: "sessions", component: () => import("./Sessions-D8IXcb5M.js"), meta: { section: { labelKey: "core.users.sections.sessions", icon: "deviceLine", groupKey: "core.users.section_groups.access" } } },
|
|
371
|
+
{ name: "users.record.signins", path: "signins", component: () => import("./SignIns-BtNfgMLc.js"), meta: { section: { labelKey: "core.users.sections.signins", icon: "timeFill", groupKey: "core.users.section_groups.activity" } } },
|
|
372
|
+
{ name: "users.record.changes", path: "changes", component: () => import("./Changes-Bzvl3cEx.js"), meta: { section: { labelKey: "core.users.sections.changes", icon: "edit", groupKey: "core.users.section_groups.activity" } } },
|
|
373
|
+
{ name: "users.record.activity", path: "activity", component: () => import("./Activity-CVO3sJwy.js"), meta: { access: ss, section: { labelKey: "core.users.sections.activity", icon: "listCheck", groupKey: "core.users.section_groups.activity" } } }
|
|
374
374
|
]
|
|
375
375
|
}
|
|
376
376
|
});
|
|
@@ -31,9 +31,9 @@ const M = {
|
|
|
31
31
|
deadLettersRetryAll: y("POST", "/v1/events/dead-letters/retry", { permission: "events.deadletter:retry" }),
|
|
32
32
|
consumers: y("GET", "/v1/events/consumers", { permission: "events.deadletter:view" })
|
|
33
33
|
}, [ke, ee] = fe("vue-core.notifications"), we = "events.deadletter:view", bt = "events.deadletter:retry", J = Z({
|
|
34
|
-
index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-
|
|
34
|
+
index: { name: "events.deadletters", path: "/events/dead-letters", component: () => import("./DeadLetters-DmwUtgf9.js"), meta: { access: we, titleKey: "core.notifications.dead_letters.title" } }
|
|
35
35
|
}), j = Z({
|
|
36
|
-
index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-
|
|
36
|
+
index: { name: "notifications.settings", path: "/profile/notifications", component: () => import("./SettingsPage-DRQP2nrH.js"), meta: { titleKey: "core.notifications.settings.title" } }
|
|
37
37
|
}), Te = /* @__PURE__ */ z({
|
|
38
38
|
__name: "SettingsMenuItem",
|
|
39
39
|
setup(o) {
|
|
@@ -7,15 +7,15 @@ import { a as Ne } from "./error-CD7x0Jrz.js";
|
|
|
7
7
|
import { u as ve } from "./describeError-B-NMa--w.js";
|
|
8
8
|
import { defineComponent as Y, ref as D, computed as j, watch as le, openBlock as f, createBlock as S, unref as t, withCtx as h, createElementVNode as N, createElementBlock as g, toDisplayString as k, createCommentVNode as O, createVNode as $, Fragment as K, renderList as P, createSlots as be, renderSlot as Se, createTextVNode as M, useTemplateRef as ne } from "vue";
|
|
9
9
|
import { _ as I } from "./Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js";
|
|
10
|
-
import { _ as V } from "./FormGroup.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { e as U } from "./control-
|
|
10
|
+
import { _ as V } from "./FormGroup.vue_vue_type_script_setup_true_lang-BokxZ7LU.js";
|
|
11
|
+
import { e as U } from "./control-B_Nwtmag.js";
|
|
12
12
|
import { _ as Te } from "./AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js";
|
|
13
13
|
import { t as ee } from "./toast-CqSDTWRX.js";
|
|
14
14
|
import { _ as ce } from "./AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js";
|
|
15
15
|
import { _ as Oe } from "./AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js";
|
|
16
16
|
import { u as Ae } from "./useLoad-M7V-AVwR.js";
|
|
17
|
-
import { _ as De, a as Ke } from "./SelectField.vue_vue_type_script_setup_true_lang-
|
|
18
|
-
import { _ as Be } from "./SegmentedField.vue_vue_type_script_setup_true_lang-
|
|
17
|
+
import { _ as De, a as Ke } from "./SelectField.vue_vue_type_script_setup_true_lang-C1Flb1hA.js";
|
|
18
|
+
import { _ as Be } from "./SegmentedField.vue_vue_type_script_setup_true_lang-BMBkEmxr.js";
|
|
19
19
|
import { u as Pe, _ as Ue } from "./useCommand-B-N6HJOz.js";
|
|
20
20
|
import { u as Fe } from "./platform-q3cjODLx.js";
|
|
21
21
|
import { _ as Ge } from "./IconTile.vue_vue_type_script_setup_true_lang-_FXvaj93.js";
|
|
@@ -43,12 +43,12 @@ const C = {
|
|
|
43
43
|
viewAccess: "iam.user:view",
|
|
44
44
|
manageBindings: "iam.user:manage"
|
|
45
45
|
}, re = Ee({
|
|
46
|
-
roles: { name: "access.roles", path: "/iam/roles", component: () => import("./RolesPage-
|
|
47
|
-
newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("./NewRolePage-
|
|
46
|
+
roles: { name: "access.roles", path: "/iam/roles", component: () => import("./RolesPage-BeEsHIQ2.js"), meta: { access: F.viewRoles, titleKey: "core.access.title" } },
|
|
47
|
+
newRole: { name: "access.roles.new", path: "/iam/roles/new", component: () => import("./NewRolePage-Cyn-oV6r.js"), meta: { access: F.manageRoles, titleKey: "core.access.new_title" } },
|
|
48
48
|
role: {
|
|
49
49
|
name: "access.role",
|
|
50
50
|
path: "/iam/roles/:ref",
|
|
51
|
-
component: () => import("./RolePage-
|
|
51
|
+
component: () => import("./RolePage-DWQP3qQl.js"),
|
|
52
52
|
// A role's ref (its key, or the id of a custom one) swaps in place when a link leads to another role.
|
|
53
53
|
meta: { access: F.viewRoles, titleKey: "core.access.title", remountOnParam: "ref" }
|
|
54
54
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The version of @wssto2/vue-core (kept equal to package.json by index.test.ts). */
|
|
2
|
-
export declare const version = "0.4.
|
|
2
|
+
export declare const version = "0.4.16";
|
package/dist/index.js
CHANGED
package/dist/phone/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as fe, useModel as me, useTemplateRef as F, ref as E, computed as g, watch as ne, nextTick as A, openBlock as w, createElementBlock as $, createElementVNode as f, normalizeClass as P, unref as i, createVNode as M, toDisplayString as T, normalizeStyle as ge, Fragment as ee, renderList as le, createCommentVNode as J, withModifiers as xe, withDirectives as we, vModelText as _e, mergeModels as ae, inject as ke, shallowRef as Ce, onBeforeUnmount as $e, createBlock as De, mergeProps as Me, createSlots as Te, withCtx as se, createTextVNode as Se, renderSlot as Ne, mergeDefaults as Ie } from "vue";
|
|
2
2
|
import { useI18n as pe } from "vue-i18n";
|
|
3
3
|
import { b as Pe } from "../controlSurface-t7OEFESJ.js";
|
|
4
|
-
import { a as Ve, c as Oe, _ as Re, f as Be, b as Ee } from "../control-
|
|
4
|
+
import { a as Ve, c as Oe, _ as Re, f as Be, b as Ee } from "../control-B_Nwtmag.js";
|
|
5
5
|
import { _ as q } from "../Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
6
|
import { _ as ie } from "../CountryFlag.vue_vue_type_script_setup_true_lang-Kry_vPPZ.js";
|
|
7
7
|
import { u as ze } from "../anchored-Cj4--8dT.js";
|
package/package.json
CHANGED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import { computed as f, defineComponent as X, useModel as Z, useTemplateRef as $, openBlock as y, createBlock as A, mergeProps as V, unref as l, withCtx as N, createElementBlock as C, Fragment as I, createVNode as w, createTextVNode as ee, toDisplayString as Q, createCommentVNode as B, createElementVNode as O, normalizeClass as te, mergeModels as re, mergeDefaults as oe, nextTick as Y } from "vue";
|
|
2
|
-
import { useI18n as j } from "vue-i18n";
|
|
3
|
-
import { _ as ae } from "./DateButton.vue_vue_type_script_setup_true_lang-EcqrfWKz.js";
|
|
4
|
-
import { u as H } from "./format-B8mJm946.js";
|
|
5
|
-
import { _ as ne } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
|
-
import { u as le } from "./mediaQuery-CygcXmFW.js";
|
|
7
|
-
import { _ as se } from "./Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js";
|
|
8
|
-
import { c as ie, _ as de, f as ue, b as ce } from "./control-CX9BG2UB.js";
|
|
9
|
-
import { e as T, f as E, m as K, g as G, h as me, j as fe, u as pe, k as be, _ as ve, l as ye, c as xe } from "./useTypedEntry-aTfPBAhw.js";
|
|
10
|
-
const ke = ["d", "m", "y"];
|
|
11
|
-
function he(o) {
|
|
12
|
-
const r = o("2033-11-22"), e = { y: r.indexOf("2033") >= 0 ? r.indexOf("2033") : r.indexOf("33"), m: r.indexOf("11"), d: r.indexOf("22") };
|
|
13
|
-
return e.y < 0 || e.m < 0 || e.d < 0 ? ke : ["d", "m", "y"].sort((t, a) => e[t] - e[a]);
|
|
14
|
-
}
|
|
15
|
-
const ge = (o) => o.trim().toLowerCase().replace(/\.+$/, "");
|
|
16
|
-
function _e(o, r) {
|
|
17
|
-
if (o.length === 4) return Number(o);
|
|
18
|
-
if (o.length > 2) return null;
|
|
19
|
-
const e = 2e3 + Number(o);
|
|
20
|
-
return e > Number(r.slice(0, 4)) + 30 ? e - 100 : e;
|
|
21
|
-
}
|
|
22
|
-
function x(o, r) {
|
|
23
|
-
const e = o.y === void 0 ? Number(r.slice(0, 4)) : _e(o.y, r), t = o.m === void 0 ? Number(r.slice(5, 7)) : Number(o.m);
|
|
24
|
-
return e === null || o.d === void 0 ? null : K(e, t, Number(o.d));
|
|
25
|
-
}
|
|
26
|
-
function we(o, r) {
|
|
27
|
-
const e = r.today ?? T(), t = ge(o);
|
|
28
|
-
if (t === "") return null;
|
|
29
|
-
const { words: a } = r;
|
|
30
|
-
if (a.today.includes(t)) return e;
|
|
31
|
-
if (a.tomorrow.includes(t)) return E(e, 1);
|
|
32
|
-
if (a.yesterday.includes(t)) return E(e, -1);
|
|
33
|
-
const d = /^([+-])\s*(\d{1,4})$/.exec(t);
|
|
34
|
-
if (d) return E(e, Number(d[2]) * (d[1] === "-" ? -1 : 1));
|
|
35
|
-
const i = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(t);
|
|
36
|
-
if (i) return K(Number(i[1]), Number(i[2]), Number(i[3]));
|
|
37
|
-
if (!/^[\d\s./-]+$/.test(t)) return null;
|
|
38
|
-
const n = r.order, p = n.filter((v) => v !== "y");
|
|
39
|
-
if (/^\d+$/.test(t)) {
|
|
40
|
-
if (t.length <= 2) return x({ d: t }, e);
|
|
41
|
-
if (t.length === 4) return x(M(p, [t.slice(0, 2), t.slice(2)]), e);
|
|
42
|
-
if (t.length === 6 || t.length === 8) {
|
|
43
|
-
const v = n.map((u) => u === "y" ? t.length - 4 : 2);
|
|
44
|
-
let k = 0;
|
|
45
|
-
const b = n.map((u, h) => [u, t.slice(k, k += v[h])]);
|
|
46
|
-
return x(Object.fromEntries(b), e);
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
const m = t.split(/[^\d]+/).filter(Boolean);
|
|
51
|
-
return m.length === 3 ? x(M(n, m), e) : m.length === 2 ? x(M(p, m), e) : m.length === 1 ? x({ d: m[0] }, e) : null;
|
|
52
|
-
}
|
|
53
|
-
function M(o, r) {
|
|
54
|
-
return Object.fromEntries(o.map((e, t) => [e, r[t]]));
|
|
55
|
-
}
|
|
56
|
-
function Ue(o) {
|
|
57
|
-
const r = o.trim().replace(/^(\d{4}-\d{2}-\d{2})T/, "$1 ").split(/\s+/).filter(Boolean), e = r[r.length - 1];
|
|
58
|
-
if (e === void 0) return { date: null, time: null };
|
|
59
|
-
if (!(e.includes(":") || r.length > 1 && /^\d{1,2}\.\d{2}$/.test(e))) return { date: r.join(" "), time: null };
|
|
60
|
-
const a = r.slice(0, -1).join(" ");
|
|
61
|
-
return { date: a === "" ? null : a, time: e };
|
|
62
|
-
}
|
|
63
|
-
function De(o, r, e) {
|
|
64
|
-
const t = o(e), a = /\D+/.exec(t)?.[0].trim() ?? ".", d = /\D+$/.test(t) ? a : "", i = { d: String(Number(e.slice(8))), m: String(Number(e.slice(5, 7))), y: "" };
|
|
65
|
-
return r.filter((n) => n !== "y").map((n) => i[n]).join(a) + d;
|
|
66
|
-
}
|
|
67
|
-
function $e(o) {
|
|
68
|
-
const { t: r } = j(), e = H(), t = (n) => e.date(n), a = f(() => he(t)), d = f(() => ({
|
|
69
|
-
today: [r("core.form.date.words.today").toLowerCase(), "today"],
|
|
70
|
-
tomorrow: [r("core.form.date.words.tomorrow").toLowerCase(), "tomorrow"],
|
|
71
|
-
yesterday: [r("core.form.date.words.yesterday").toLowerCase(), "yesterday"]
|
|
72
|
-
}));
|
|
73
|
-
return {
|
|
74
|
-
placeholder: f(() => r("core.form.date.placeholder", { example: De(t, a.value, T()) })),
|
|
75
|
-
/** The day a text means, or null. */
|
|
76
|
-
parse: (n) => we(n, { order: a.value, words: d.value }),
|
|
77
|
-
available: (n) => !G(n, o()),
|
|
78
|
-
invalidMessage: () => r("core.form.date.invalid", { example: t(T()) }),
|
|
79
|
-
unavailableMessage: () => r("core.form.date.unavailable")
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
function Ne(o, r, e) {
|
|
83
|
-
const { t } = j();
|
|
84
|
-
return f(() => {
|
|
85
|
-
const a = T();
|
|
86
|
-
return (o() ?? me(r())).map((d) => {
|
|
87
|
-
const i = fe(d, (n) => t(`core.form.date.${n.replace(/-/g, "_")}`), a);
|
|
88
|
-
return { ...i, disabled: G(i.value, e()) };
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
const Ce = ["id", "name", "value", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], Oe = ["aria-label", "onClick"], Te = { class: "flex flex-col gap-2.5" }, qe = {
|
|
93
|
-
key: 0,
|
|
94
|
-
class: "border-t border-border-separator pt-2.5"
|
|
95
|
-
}, Pe = { class: "text-footnote text-content-muted" }, Re = /* @__PURE__ */ X({
|
|
96
|
-
__name: "DateField",
|
|
97
|
-
props: /* @__PURE__ */ re(/* @__PURE__ */ oe({
|
|
98
|
-
label: {},
|
|
99
|
-
labelHidden: { type: Boolean },
|
|
100
|
-
hint: {},
|
|
101
|
-
error: {},
|
|
102
|
-
required: { type: Boolean },
|
|
103
|
-
editable: { type: Boolean },
|
|
104
|
-
disabled: { type: Boolean },
|
|
105
|
-
lockedReason: {},
|
|
106
|
-
presentation: {},
|
|
107
|
-
name: {},
|
|
108
|
-
min: {},
|
|
109
|
-
max: {},
|
|
110
|
-
disabledDates: { type: [Array, Function] },
|
|
111
|
-
openOn: {},
|
|
112
|
-
quickPicks: {}
|
|
113
|
-
}, { ...ce, min: void 0, max: void 0, disabledDates: void 0, openOn: void 0, quickPicks: void 0 }), {
|
|
114
|
-
modelValue: { default: null },
|
|
115
|
-
modelModifiers: {}
|
|
116
|
-
}),
|
|
117
|
-
emits: ["update:modelValue"],
|
|
118
|
-
setup(o, { expose: r }) {
|
|
119
|
-
const e = o, t = Z(o, "modelValue"), { t: a } = j(), d = H(), i = le(), n = $("input"), p = $("popover"), m = $("calendar"), v = $("sheet"), k = f(() => ({ min: e.min, max: e.max, disabled: e.disabledDates })), b = $e(() => k.value), u = pe({
|
|
120
|
-
model: t,
|
|
121
|
-
display: (c) => d.date(c),
|
|
122
|
-
parse: (c) => {
|
|
123
|
-
const s = b.parse(c);
|
|
124
|
-
return s ? b.available(s) ? { value: s } : { error: b.unavailableMessage() } : { error: b.invalidMessage() };
|
|
125
|
-
}
|
|
126
|
-
}), h = Ne(() => e.quickPicks, () => i.value, () => k.value), L = f(() => e.error || u.message.value), q = f(() => t.value ? d.date(t.value) : null), J = ie("date", () => L.value ? "error" : e.disabled ? "locked" : "rest"), z = f(() => u.typed.value ?? (be(t.value) ? t.value : null));
|
|
127
|
-
async function P(c) {
|
|
128
|
-
e.disabled || (p.value?.present(), c && (await Y(), await Y(), m.value?.focus()));
|
|
129
|
-
}
|
|
130
|
-
function W(c) {
|
|
131
|
-
c.key === "Enter" ? (u.commit(), p.value?.dismiss()) : c.key === "ArrowDown" && (c.preventDefault(), P(!0));
|
|
132
|
-
}
|
|
133
|
-
function F(c, s) {
|
|
134
|
-
u.set(c), s();
|
|
135
|
-
}
|
|
136
|
-
return r({ focus: () => n.value?.focus() }), (c, s) => (y(), A(de, V({ ...l(ue)(e), error: L.value }, {
|
|
137
|
-
value: q.value,
|
|
138
|
-
"value-style": "numeric"
|
|
139
|
-
}), {
|
|
140
|
-
default: N(({ id: S, describedby: U, invalid: R }) => [
|
|
141
|
-
l(i) ? (y(), C(I, { key: 0 }, [
|
|
142
|
-
w(ae, V({ id: S, "aria-describedby": U }, {
|
|
143
|
-
disabled: e.disabled,
|
|
144
|
-
invalid: R,
|
|
145
|
-
placeholder: l(a)("core.form.select.choose"),
|
|
146
|
-
onClick: s[0] || (s[0] = (g) => v.value?.present())
|
|
147
|
-
}), {
|
|
148
|
-
default: N(() => [
|
|
149
|
-
q.value ? (y(), C(I, { key: 0 }, [
|
|
150
|
-
ee(Q(q.value), 1)
|
|
151
|
-
], 64)) : B("", !0)
|
|
152
|
-
]),
|
|
153
|
-
_: 1
|
|
154
|
-
}, 16, ["disabled", "invalid", "placeholder"]),
|
|
155
|
-
w(ve, {
|
|
156
|
-
ref_key: "sheet",
|
|
157
|
-
ref: v,
|
|
158
|
-
title: e.label ?? l(a)("core.form.date.calendar"),
|
|
159
|
-
mode: "date",
|
|
160
|
-
"model-value": t.value,
|
|
161
|
-
min: e.min,
|
|
162
|
-
max: e.max,
|
|
163
|
-
"disabled-dates": e.disabledDates,
|
|
164
|
-
"open-on": e.openOn,
|
|
165
|
-
shortcuts: l(h),
|
|
166
|
-
clearable: !e.required,
|
|
167
|
-
"onUpdate:modelValue": l(u).set
|
|
168
|
-
}, null, 8, ["title", "model-value", "min", "max", "disabled-dates", "open-on", "shortcuts", "clearable", "onUpdate:modelValue"])
|
|
169
|
-
], 64)) : (y(), A(se, {
|
|
170
|
-
key: 1,
|
|
171
|
-
ref_key: "popover",
|
|
172
|
-
ref: p,
|
|
173
|
-
label: e.label ?? l(a)("core.form.date.calendar"),
|
|
174
|
-
width: "lg",
|
|
175
|
-
placement: "bottom-start",
|
|
176
|
-
arrow: !1,
|
|
177
|
-
autofocus: !1
|
|
178
|
-
}, {
|
|
179
|
-
trigger: N(({ attrs: g, presented: _ }) => [
|
|
180
|
-
O("div", {
|
|
181
|
-
class: te(["inline-flex max-w-full items-center gap-2", l(J)])
|
|
182
|
-
}, [
|
|
183
|
-
O("input", V({
|
|
184
|
-
id: S,
|
|
185
|
-
ref_key: "input",
|
|
186
|
-
ref: n
|
|
187
|
-
}, g, {
|
|
188
|
-
type: "text",
|
|
189
|
-
role: "combobox",
|
|
190
|
-
autocomplete: "off",
|
|
191
|
-
size: "16",
|
|
192
|
-
name: e.name,
|
|
193
|
-
value: l(u).text.value,
|
|
194
|
-
placeholder: l(b).placeholder.value,
|
|
195
|
-
disabled: e.disabled,
|
|
196
|
-
required: e.required,
|
|
197
|
-
"aria-required": e.required || void 0,
|
|
198
|
-
"aria-invalid": R || void 0,
|
|
199
|
-
"aria-describedby": U,
|
|
200
|
-
class: "block min-h-7 min-w-0 border-0 bg-transparent py-1 pl-2.5 text-body tabular-nums text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
201
|
-
onInput: s[1] || (s[1] = (D) => l(u).input(D.target.value)),
|
|
202
|
-
onBlur: s[2] || (s[2] = (D) => l(u).commit()),
|
|
203
|
-
onKeydown: W,
|
|
204
|
-
onClick: s[3] || (s[3] = (D) => P(!1))
|
|
205
|
-
}), null, 16, Ce),
|
|
206
|
-
e.disabled ? B("", !0) : (y(), C("button", {
|
|
207
|
-
key: 0,
|
|
208
|
-
type: "button",
|
|
209
|
-
tabindex: "-1",
|
|
210
|
-
"aria-label": l(a)("core.form.date.open"),
|
|
211
|
-
class: "mr-2 flex shrink-0 cursor-pointer items-center text-content-link",
|
|
212
|
-
onClick: (D) => _ ? p.value?.dismiss() : P(!0)
|
|
213
|
-
}, [
|
|
214
|
-
w(l(ne), {
|
|
215
|
-
name: "calendarLine",
|
|
216
|
-
size: 18
|
|
217
|
-
})
|
|
218
|
-
], 8, Oe))
|
|
219
|
-
], 2)
|
|
220
|
-
]),
|
|
221
|
-
default: N(({ dismiss: g }) => [
|
|
222
|
-
O("div", Te, [
|
|
223
|
-
w(ye, {
|
|
224
|
-
ref_key: "calendar",
|
|
225
|
-
ref: m,
|
|
226
|
-
"model-value": z.value,
|
|
227
|
-
min: e.min,
|
|
228
|
-
max: e.max,
|
|
229
|
-
"disabled-dates": e.disabledDates,
|
|
230
|
-
"open-on": e.openOn,
|
|
231
|
-
"month-picker": "",
|
|
232
|
-
"onUpdate:modelValue": (_) => F(_, g)
|
|
233
|
-
}, null, 8, ["model-value", "min", "max", "disabled-dates", "open-on", "onUpdate:modelValue"]),
|
|
234
|
-
l(h).length > 0 ? (y(), C("div", qe, [
|
|
235
|
-
w(xe, {
|
|
236
|
-
items: l(h),
|
|
237
|
-
selected: z.value,
|
|
238
|
-
onPick: (_) => F(_, g)
|
|
239
|
-
}, null, 8, ["items", "selected", "onPick"])
|
|
240
|
-
])) : B("", !0),
|
|
241
|
-
O("p", Pe, Q(l(a)("core.form.date.keys")), 1)
|
|
242
|
-
])
|
|
243
|
-
]),
|
|
244
|
-
_: 2
|
|
245
|
-
}, 1032, ["label"]))
|
|
246
|
-
]),
|
|
247
|
-
_: 1
|
|
248
|
-
}, 16, ["value"]));
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
export {
|
|
252
|
-
Re as _,
|
|
253
|
-
Ne as a,
|
|
254
|
-
Ue as s,
|
|
255
|
-
$e as u
|
|
256
|
-
};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { defineComponent as G, useModel as I, useTemplateRef as W, computed as w, ref as B, watch as F, openBlock as D, createBlock as $, mergeProps as A, unref as q, withCtx as E, createElementVNode as M, normalizeClass as O, createElementBlock as N, toDisplayString as C, createCommentVNode as S, mergeModels as P, mergeDefaults as j } from "vue";
|
|
2
|
-
import { b as z } from "./controlSurface-t7OEFESJ.js";
|
|
3
|
-
import { u as H } from "./format-B8mJm946.js";
|
|
4
|
-
import { a as T, c as J, _ as K, f as L, b as Q } from "./control-CX9BG2UB.js";
|
|
5
|
-
function U(r) {
|
|
6
|
-
const n = r.number(1234.5, { minimumFractionDigits: 1, maximumFractionDigits: 1, useGrouping: !0 }), e = /^\d(\D)\d/.exec(n)?.[1] ?? "";
|
|
7
|
-
return { decimal: n.charAt(n.length - 2) || ".", group: e === "." || e === "," ? e : "" };
|
|
8
|
-
}
|
|
9
|
-
function X(r, n) {
|
|
10
|
-
const e = r.trim().startsWith("-"), t = r.replace(/[^\d.,]/g, "");
|
|
11
|
-
if (t === "") return e ? void 0 : null;
|
|
12
|
-
const d = [...t].filter((a) => a === "." || a === ",");
|
|
13
|
-
let m = t, g = "";
|
|
14
|
-
if (n.decimals > 0 && d.length > 0) {
|
|
15
|
-
const a = Math.max(t.lastIndexOf("."), t.lastIndexOf(",")), f = t.charAt(a), p = t.slice(a + 1), s = t.includes(".") && t.includes(","), o = d.filter((y) => y === f).length > 1, k = !s && f === n.group && p.length === 3;
|
|
16
|
-
(s || !o && !k) && (m = t.slice(0, a), g = p);
|
|
17
|
-
}
|
|
18
|
-
const v = (a) => a.replace(/\D/g, ""), x = +`${v(m) || "0"}.${v(g) || "0"}`;
|
|
19
|
-
if (!Number.isFinite(x)) return;
|
|
20
|
-
const c = Number(x.toFixed(n.decimals));
|
|
21
|
-
return e ? -c || 0 : c;
|
|
22
|
-
}
|
|
23
|
-
const Y = {
|
|
24
|
-
key: 0,
|
|
25
|
-
class: "shrink-0 text-footnote text-content-muted"
|
|
26
|
-
}, Z = ["id", "value", "name", "placeholder", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"], ee = {
|
|
27
|
-
key: 1,
|
|
28
|
-
class: "shrink-0 text-footnote text-content-muted"
|
|
29
|
-
}, oe = /* @__PURE__ */ G({
|
|
30
|
-
__name: "NumberField",
|
|
31
|
-
props: /* @__PURE__ */ P(/* @__PURE__ */ j({
|
|
32
|
-
label: {},
|
|
33
|
-
labelHidden: { type: Boolean },
|
|
34
|
-
hint: {},
|
|
35
|
-
error: {},
|
|
36
|
-
required: { type: Boolean },
|
|
37
|
-
editable: { type: Boolean },
|
|
38
|
-
disabled: { type: Boolean },
|
|
39
|
-
lockedReason: {},
|
|
40
|
-
presentation: {},
|
|
41
|
-
name: {},
|
|
42
|
-
decimals: {},
|
|
43
|
-
negative: { type: Boolean },
|
|
44
|
-
grouping: { type: Boolean },
|
|
45
|
-
maxDigits: {},
|
|
46
|
-
placeholder: {},
|
|
47
|
-
prefix: {},
|
|
48
|
-
suffix: {},
|
|
49
|
-
width: {}
|
|
50
|
-
}, { ...Q, decimals: 0, negative: !1, grouping: !0, maxDigits: void 0, placeholder: void 0, prefix: void 0, suffix: void 0, width: "sm" }), {
|
|
51
|
-
modelValue: { default: null },
|
|
52
|
-
modelModifiers: {}
|
|
53
|
-
}),
|
|
54
|
-
emits: ["update:modelValue"],
|
|
55
|
-
setup(r, { expose: n }) {
|
|
56
|
-
const e = r, t = I(r, "modelValue"), d = H(), m = W("input"), g = !!T(), v = J("text", () => e.error ? "error" : e.disabled ? "locked" : "rest"), x = w(() => g ? z(e.width) : "w-full"), c = w(() => U(d)), a = (l) => l === null ? "" : d.number(l, { minimumFractionDigits: e.decimals, maximumFractionDigits: e.decimals, useGrouping: e.grouping }), f = (l) => l === null ? "" : String(l).replace(".", c.value.decimal), p = (l) => X(l, { decimals: e.decimals, group: e.grouping ? c.value.group : "" }), s = B(!1), o = B(a(t.value));
|
|
57
|
-
F(t, (l) => {
|
|
58
|
-
s.value ? p(o.value) !== l && (o.value = f(l)) : o.value = a(l);
|
|
59
|
-
}), F(() => [e.decimals, e.grouping, c.value.decimal], () => {
|
|
60
|
-
s.value || (o.value = a(t.value));
|
|
61
|
-
});
|
|
62
|
-
function k(l) {
|
|
63
|
-
const u = l.target;
|
|
64
|
-
let i = u.value.replace(/[^\d.,\-\s]/g, "");
|
|
65
|
-
e.negative ? i = i.replace(/(?!^)-/g, "") : i = i.replace(/-/g, "");
|
|
66
|
-
const _ = i.replace(/\D/g, "").length;
|
|
67
|
-
if (e.maxDigits !== void 0 && _ > e.maxDigits) {
|
|
68
|
-
if (i.length === o.value.length + 1) {
|
|
69
|
-
const b = Math.max(0, (u.selectionStart ?? i.length) - 1);
|
|
70
|
-
u.value = o.value, u.setSelectionRange(b, b);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
let R = 0;
|
|
74
|
-
i = [...i].filter((b) => !/\d/.test(b) || ++R <= e.maxDigits).join("");
|
|
75
|
-
}
|
|
76
|
-
i !== u.value && (u.value = i), o.value = i;
|
|
77
|
-
const h = p(i);
|
|
78
|
-
h !== void 0 ? t.value = h : t.value = null;
|
|
79
|
-
}
|
|
80
|
-
function y() {
|
|
81
|
-
s.value = !0, o.value = f(t.value);
|
|
82
|
-
}
|
|
83
|
-
function V() {
|
|
84
|
-
s.value = !1, o.value = a(t.value);
|
|
85
|
-
}
|
|
86
|
-
return n({ focus: () => m.value?.focus() }), (l, u) => (D(), $(K, A(q(L)(e), {
|
|
87
|
-
value: t.value === null ? null : a(t.value),
|
|
88
|
-
prefix: e.prefix,
|
|
89
|
-
suffix: e.suffix,
|
|
90
|
-
"value-style": "numeric"
|
|
91
|
-
}), {
|
|
92
|
-
default: E(({ id: i, describedby: _, invalid: h }) => [
|
|
93
|
-
M("div", {
|
|
94
|
-
class: O(["flex items-center gap-1.5", [q(v), x.value]])
|
|
95
|
-
}, [
|
|
96
|
-
e.prefix ? (D(), N("span", Y, C(e.prefix), 1)) : S("", !0),
|
|
97
|
-
M("input", {
|
|
98
|
-
id: i,
|
|
99
|
-
ref_key: "input",
|
|
100
|
-
ref: m,
|
|
101
|
-
value: o.value,
|
|
102
|
-
type: "text",
|
|
103
|
-
inputmode: "decimal",
|
|
104
|
-
autocomplete: "off",
|
|
105
|
-
name: e.name,
|
|
106
|
-
placeholder: e.placeholder,
|
|
107
|
-
disabled: e.disabled,
|
|
108
|
-
required: e.required,
|
|
109
|
-
"aria-required": e.required || void 0,
|
|
110
|
-
"aria-invalid": h || void 0,
|
|
111
|
-
"aria-describedby": _,
|
|
112
|
-
class: "block w-full min-w-0 border-0 bg-transparent px-0 py-1 text-right text-body tabular-nums text-content-strong placeholder:text-content-disabled focus:outline-none focus:ring-0 disabled:cursor-not-allowed",
|
|
113
|
-
onInput: k,
|
|
114
|
-
onFocus: y,
|
|
115
|
-
onBlur: V
|
|
116
|
-
}, null, 40, Z),
|
|
117
|
-
e.suffix ? (D(), N("span", ee, C(e.suffix), 1)) : S("", !0)
|
|
118
|
-
], 2)
|
|
119
|
-
]),
|
|
120
|
-
_: 1
|
|
121
|
-
}, 16, ["value", "prefix", "suffix"]));
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
export {
|
|
125
|
-
oe as _
|
|
126
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, openBlock as l, createBlock as y, mergeProps as g, unref as s, withCtx as w, createElementVNode as _, normalizeClass as o, createElementBlock as a, Fragment as V, renderList as k, createTextVNode as h, toDisplayString as i, createCommentVNode as B, mergeDefaults as C } from "vue";
|
|
2
|
-
import { u as L, a as F, _ as D, f as N, b as E } from "./control-CX9BG2UB.js";
|
|
3
|
-
const P = ["id", "aria-label", "aria-describedby", "aria-invalid"], R = ["disabled", "aria-pressed", "onClick"], G = /* @__PURE__ */ x({
|
|
4
|
-
__name: "SegmentedField",
|
|
5
|
-
props: /* @__PURE__ */ C({
|
|
6
|
-
label: {},
|
|
7
|
-
labelHidden: { type: Boolean },
|
|
8
|
-
hint: {},
|
|
9
|
-
error: {},
|
|
10
|
-
required: { type: Boolean },
|
|
11
|
-
editable: { type: Boolean },
|
|
12
|
-
disabled: { type: Boolean },
|
|
13
|
-
lockedReason: {},
|
|
14
|
-
presentation: {},
|
|
15
|
-
name: {},
|
|
16
|
-
modelValue: {},
|
|
17
|
-
options: {},
|
|
18
|
-
rowLayout: {}
|
|
19
|
-
}, { ...E, modelValue: null, rowLayout: "setting" }),
|
|
20
|
-
emits: ["update:modelValue"],
|
|
21
|
-
setup(r, { emit: d }) {
|
|
22
|
-
const e = r, u = d, { editable: c } = L(e), m = !!F(), f = () => e.options.find((n) => n.value === e.modelValue)?.label ?? null;
|
|
23
|
-
return (n, S) => (l(), y(D, g(s(N)(e), {
|
|
24
|
-
value: f(),
|
|
25
|
-
"row-layout": e.rowLayout
|
|
26
|
-
}), {
|
|
27
|
-
default: w(({ id: b, describedby: p, invalid: v }) => [
|
|
28
|
-
_("div", {
|
|
29
|
-
id: b,
|
|
30
|
-
role: "group",
|
|
31
|
-
"aria-label": e.label,
|
|
32
|
-
"aria-describedby": p,
|
|
33
|
-
"aria-invalid": v || void 0,
|
|
34
|
-
"data-test": "segmented",
|
|
35
|
-
class: o(["max-w-full flex-wrap rounded-control bg-fill p-0.5", [m && e.rowLayout === "stacked" ? "flex w-full" : "inline-flex", e.disabled ? "opacity-45" : ""]])
|
|
36
|
-
}, [
|
|
37
|
-
(l(!0), a(V, null, k(e.options, (t) => (l(), a("button", {
|
|
38
|
-
key: t.value,
|
|
39
|
-
type: "button",
|
|
40
|
-
disabled: e.disabled || !s(c) || t.disabled,
|
|
41
|
-
"aria-pressed": t.value === e.modelValue,
|
|
42
|
-
class: o(["relative min-h-7 min-w-fit flex-1 whitespace-nowrap rounded-control px-3.5 py-1 text-sm transition-colors duration-motion-fast ease-motion-standard focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", t.value === e.modelValue ? "bg-segment-selected font-semibold text-content-strong shadow-sm" : "cursor-pointer font-medium text-content hover:text-content-strong"]),
|
|
43
|
-
onClick: ($) => u("update:modelValue", t.value)
|
|
44
|
-
}, [
|
|
45
|
-
h(i(t.label) + " ", 1),
|
|
46
|
-
t.count !== void 0 ? (l(), a("span", {
|
|
47
|
-
key: 0,
|
|
48
|
-
class: o(["ml-1.5 rounded-full px-1.5 text-caption font-semibold tabular-nums", t.value === e.modelValue ? "bg-tint-soft text-content-link" : "bg-fill-strong text-content-muted"])
|
|
49
|
-
}, i(t.count), 3)) : B("", !0)
|
|
50
|
-
], 10, R))), 128))
|
|
51
|
-
], 10, P)
|
|
52
|
-
]),
|
|
53
|
-
_: 1
|
|
54
|
-
}, 16, ["value", "row-layout"]));
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
export {
|
|
58
|
-
G as _
|
|
59
|
-
};
|