@cocoar/vue-ui 1.13.1 → 1.15.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/dist/components/sidebar/CoarSidebar.vue.d.ts +5 -1
- package/dist/components/sidebar/CoarSidebar.vue.d.ts.map +1 -1
- package/dist/components/sidebar/CoarSidebarGroup.vue.d.ts.map +1 -1
- package/dist/components/sidebar/CoarSidebarItem.vue.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar-context.d.ts +5 -0
- package/dist/components/sidebar/sidebar-context.d.ts.map +1 -1
- package/dist/components/tooltip/vTooltip.d.ts +8 -1
- package/dist/components/tooltip/vTooltip.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +400 -340
- package/package.json +2 -2
- package/styles/tokens/sidebar.css +12 -2
package/dist/index.js
CHANGED
|
@@ -5513,7 +5513,10 @@ var Ls = ["id", "aria-label"], Rs = {
|
|
|
5513
5513
|
}), [["__scopeId", "data-v-0004a2f2"]]), Qs = null, $s = 0;
|
|
5514
5514
|
function ec(e) {
|
|
5515
5515
|
let t = e.value;
|
|
5516
|
-
return typeof t == "string" ? { content: t } : t
|
|
5516
|
+
return t ? typeof t == "string" ? { content: t } : t : {
|
|
5517
|
+
content: "",
|
|
5518
|
+
disabled: !0
|
|
5519
|
+
};
|
|
5517
5520
|
}
|
|
5518
5521
|
function tc(e = "top") {
|
|
5519
5522
|
return e === "auto" ? [
|
|
@@ -9016,16 +9019,23 @@ var Gu = /* @__PURE__ */ d({
|
|
|
9016
9019
|
})], 8, fd)) : a("", !0)
|
|
9017
9020
|
])], 10, ad));
|
|
9018
9021
|
}
|
|
9019
|
-
}), [["__scopeId", "data-v-9e40bd44"]])
|
|
9022
|
+
}), [["__scopeId", "data-v-9e40bd44"]]);
|
|
9023
|
+
//#endregion
|
|
9024
|
+
//#region src/components/sidebar/sidebar-context.ts
|
|
9025
|
+
function md(e) {
|
|
9026
|
+
return e === "top" || e === "bottom" ? "horizontal" : "vertical";
|
|
9027
|
+
}
|
|
9028
|
+
var hd = Symbol("sidebar-collapsed"), gd = Symbol("sidebar-icon-size"), _d = Symbol("sidebar-side"), vd = Symbol("sidebar-flyout-icon-only"), yd = Symbol("sidebar-flyout-parent"), bd = ["aria-label"], xd = {
|
|
9020
9029
|
key: 0,
|
|
9021
9030
|
class: "coar-sidebar__header"
|
|
9022
|
-
},
|
|
9031
|
+
}, Sd = { class: "coar-sidebar__content" }, Cd = {
|
|
9023
9032
|
key: 1,
|
|
9024
9033
|
class: "coar-sidebar__footer"
|
|
9025
|
-
},
|
|
9034
|
+
}, wd = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
9026
9035
|
__name: "CoarSidebar",
|
|
9027
9036
|
props: {
|
|
9028
|
-
|
|
9037
|
+
side: { default: void 0 },
|
|
9038
|
+
position: { default: void 0 },
|
|
9029
9039
|
collapsed: {
|
|
9030
9040
|
type: Boolean,
|
|
9031
9041
|
default: !1
|
|
@@ -9044,38 +9054,44 @@ var Gu = /* @__PURE__ */ d({
|
|
|
9044
9054
|
},
|
|
9045
9055
|
emits: ["update:collapsed"],
|
|
9046
9056
|
setup(e) {
|
|
9047
|
-
let t = e, n = F(t, "collapsed"),
|
|
9048
|
-
T(
|
|
9049
|
-
let
|
|
9057
|
+
let t = e, n = r(() => t.side ?? t.position ?? "left"), i = r(() => md(n.value)), s = F(t, "collapsed"), c = F(t, "size");
|
|
9058
|
+
T(hd, s), T(gd, c), T(_d, n);
|
|
9059
|
+
let l = r(() => ({
|
|
9050
9060
|
"coar-sidebar": !0,
|
|
9051
9061
|
[`coar-sidebar--${t.variant}`]: !0,
|
|
9062
|
+
[`coar-sidebar--side-${n.value}`]: !0,
|
|
9063
|
+
[`coar-sidebar--${i.value}`]: !0,
|
|
9064
|
+
[`coar-sidebar--size-${t.size}`]: !0,
|
|
9052
9065
|
"coar-sidebar--collapsed": t.collapsed,
|
|
9053
|
-
"coar-sidebar--position-right": t.position === "right",
|
|
9054
9066
|
"coar-sidebar--elevated": t.elevated,
|
|
9055
9067
|
"coar-sidebar--borderless": t.borderless
|
|
9056
|
-
}))
|
|
9068
|
+
})), u = r(() => i.value === "vertical" ? {
|
|
9069
|
+
overflowX: "hidden",
|
|
9070
|
+
autoHide: "leave",
|
|
9071
|
+
defer: !1
|
|
9072
|
+
} : {
|
|
9073
|
+
overflowY: "hidden",
|
|
9074
|
+
autoHide: "leave",
|
|
9075
|
+
defer: !1
|
|
9076
|
+
});
|
|
9057
9077
|
return (n, r) => (w(), o("aside", {
|
|
9058
9078
|
role: "navigation",
|
|
9059
9079
|
"aria-label": e.ariaLabel || "Sidebar",
|
|
9060
|
-
class: y(
|
|
9080
|
+
class: y(l.value)
|
|
9061
9081
|
}, [
|
|
9062
|
-
n.$slots.header ? (w(), o("div",
|
|
9063
|
-
K((w(), o("div",
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
defer: !1
|
|
9067
|
-
}]]),
|
|
9068
|
-
n.$slots.footer ? (w(), o("div", xd, [A(n.$slots, "footer", { collapsed: t.collapsed }, void 0, !0)])) : a("", !0)
|
|
9069
|
-
], 10, vd));
|
|
9082
|
+
n.$slots.header ? (w(), o("div", xd, [A(n.$slots, "header", { collapsed: t.collapsed }, void 0, !0)])) : a("", !0),
|
|
9083
|
+
K((w(), o("div", Sd, [A(n.$slots, "default", { collapsed: t.collapsed }, void 0, !0)])), [[L(Fs), u.value]]),
|
|
9084
|
+
n.$slots.footer ? (w(), o("div", Cd, [A(n.$slots, "footer", { collapsed: t.collapsed }, void 0, !0)])) : a("", !0)
|
|
9085
|
+
], 10, bd));
|
|
9070
9086
|
}
|
|
9071
|
-
}), [["__scopeId", "data-v-
|
|
9087
|
+
}), [["__scopeId", "data-v-656c121e"]]), Td = [
|
|
9072
9088
|
"aria-disabled",
|
|
9073
9089
|
"aria-current",
|
|
9074
9090
|
"tabindex"
|
|
9075
|
-
],
|
|
9091
|
+
], Ed = {
|
|
9076
9092
|
class: "coar-sidebar-item__icon",
|
|
9077
9093
|
"aria-hidden": "true"
|
|
9078
|
-
},
|
|
9094
|
+
}, Dd = { class: "coar-sidebar-item__label" }, Od = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
9079
9095
|
__name: "CoarSidebarItem",
|
|
9080
9096
|
props: {
|
|
9081
9097
|
label: {},
|
|
@@ -9091,43 +9107,54 @@ var Gu = /* @__PURE__ */ d({
|
|
|
9091
9107
|
},
|
|
9092
9108
|
emits: ["click"],
|
|
9093
9109
|
setup(e, { emit: t }) {
|
|
9094
|
-
let n = e, i = t, a = m(
|
|
9110
|
+
let n = e, i = t, a = m(hd, O(!1)), c = m(gd, O("m")), l = m(_d, O("left")), d = m(vd, O(!1)), f = r(() => {
|
|
9111
|
+
switch (l.value) {
|
|
9112
|
+
case "right": return "left";
|
|
9113
|
+
case "top": return "bottom";
|
|
9114
|
+
case "bottom": return "top";
|
|
9115
|
+
default: return "right";
|
|
9116
|
+
}
|
|
9117
|
+
}), p = r(() => d.value ? {
|
|
9095
9118
|
content: n.label,
|
|
9096
|
-
placement:
|
|
9119
|
+
placement: f.value,
|
|
9097
9120
|
openDelay: 100
|
|
9098
9121
|
} : a.value ? {
|
|
9099
9122
|
content: n.label,
|
|
9100
|
-
placement:
|
|
9123
|
+
placement: f.value,
|
|
9101
9124
|
openDelay: 200
|
|
9102
|
-
} : !1);
|
|
9103
|
-
function
|
|
9125
|
+
} : !1), h = r(() => md(l.value));
|
|
9126
|
+
function g(e) {
|
|
9104
9127
|
if (n.disabled) {
|
|
9105
9128
|
e.preventDefault();
|
|
9106
9129
|
return;
|
|
9107
9130
|
}
|
|
9108
9131
|
i("click", e);
|
|
9109
9132
|
}
|
|
9110
|
-
function
|
|
9133
|
+
function _(e) {
|
|
9111
9134
|
e.key !== "Enter" && e.key !== " " || n.disabled || (e.preventDefault(), i("click", new MouseEvent("click")));
|
|
9112
9135
|
}
|
|
9113
9136
|
return (e, t) => K((w(), o("div", {
|
|
9114
9137
|
role: "menuitem",
|
|
9115
|
-
class: y(["coar-sidebar-item",
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9138
|
+
class: y(["coar-sidebar-item", [
|
|
9139
|
+
`coar-sidebar-item--side-${L(l)}`,
|
|
9140
|
+
`coar-sidebar-item--${h.value}`,
|
|
9141
|
+
{
|
|
9142
|
+
"coar-sidebar-item--active": n.active,
|
|
9143
|
+
"coar-sidebar-item--disabled": n.disabled,
|
|
9144
|
+
"coar-sidebar-item--collapsed": L(a)
|
|
9145
|
+
}
|
|
9146
|
+
]]),
|
|
9120
9147
|
"aria-disabled": n.disabled || void 0,
|
|
9121
9148
|
"aria-current": n.active ? "page" : void 0,
|
|
9122
9149
|
tabindex: n.disabled ? -1 : 0,
|
|
9123
|
-
onClick:
|
|
9124
|
-
onKeydown:
|
|
9125
|
-
}, [s("span",
|
|
9150
|
+
onClick: g,
|
|
9151
|
+
onKeydown: _
|
|
9152
|
+
}, [s("span", Ed, [u(Z, {
|
|
9126
9153
|
name: n.icon || "square-dashed",
|
|
9127
9154
|
size: L(c)
|
|
9128
|
-
}, null, 8, ["name", "size"])]), s("span",
|
|
9155
|
+
}, null, 8, ["name", "size"])]), s("span", Dd, P(n.label), 1)], 42, Td)), [[L(uc), p.value]]);
|
|
9129
9156
|
}
|
|
9130
|
-
}), [["__scopeId", "data-v-
|
|
9157
|
+
}), [["__scopeId", "data-v-33cbb961"]]), kd = /* @__PURE__ */ d({
|
|
9131
9158
|
__name: "SidebarFlyoutProvider",
|
|
9132
9159
|
props: {
|
|
9133
9160
|
iconOnly: { type: Boolean },
|
|
@@ -9135,12 +9162,12 @@ var Gu = /* @__PURE__ */ d({
|
|
|
9135
9162
|
},
|
|
9136
9163
|
setup(e) {
|
|
9137
9164
|
let t = e;
|
|
9138
|
-
return T(
|
|
9165
|
+
return T(vd, F(t, "iconOnly")), T(yd, t.parentControl), (e, t) => A(e.$slots, "default");
|
|
9139
9166
|
}
|
|
9140
|
-
}),
|
|
9167
|
+
}), Ad = ["id"], jd = {
|
|
9141
9168
|
key: 0,
|
|
9142
9169
|
class: "coar-sidebar-flyout__header"
|
|
9143
|
-
},
|
|
9170
|
+
}, Md = { class: "coar-sidebar-flyout__items" }, Nd = /* @__PURE__ */ d({
|
|
9144
9171
|
__name: "CoarSidebarFlyoutPanel",
|
|
9145
9172
|
props: {
|
|
9146
9173
|
id: {
|
|
@@ -9166,7 +9193,7 @@ var Gu = /* @__PURE__ */ d({
|
|
|
9166
9193
|
},
|
|
9167
9194
|
emits: ["flyoutEnter", "flyoutLeave"],
|
|
9168
9195
|
setup(e) {
|
|
9169
|
-
return (t, n) => (w(), i(
|
|
9196
|
+
return (t, n) => (w(), i(kd, {
|
|
9170
9197
|
"icon-only": e.iconOnly,
|
|
9171
9198
|
"parent-control": e.parentControl
|
|
9172
9199
|
}, {
|
|
@@ -9176,19 +9203,19 @@ var Gu = /* @__PURE__ */ d({
|
|
|
9176
9203
|
role: "menu",
|
|
9177
9204
|
onMouseenter: n[0] ||= (e) => t.$emit("flyoutEnter"),
|
|
9178
9205
|
onMouseleave: n[1] ||= (e) => t.$emit("flyoutLeave")
|
|
9179
|
-
}, [e.iconOnly ? a("", !0) : (w(), o("div",
|
|
9206
|
+
}, [e.iconOnly ? a("", !0) : (w(), o("div", jd, P(e.label), 1)), s("div", Md, [(w(), i(j({ render: e.renderContent })))])], 42, Ad)]),
|
|
9180
9207
|
_: 1
|
|
9181
9208
|
}, 8, ["icon-only", "parent-control"]));
|
|
9182
9209
|
}
|
|
9183
|
-
}),
|
|
9210
|
+
}), Pd = [
|
|
9184
9211
|
"aria-expanded",
|
|
9185
9212
|
"aria-disabled",
|
|
9186
9213
|
"tabindex",
|
|
9187
9214
|
"onKeydown"
|
|
9188
|
-
],
|
|
9215
|
+
], Fd = {
|
|
9189
9216
|
class: "coar-sidebar-group__icon",
|
|
9190
9217
|
"aria-hidden": "true"
|
|
9191
|
-
},
|
|
9218
|
+
}, Id = { class: "coar-sidebar-group__caret" }, Ld = { class: "coar-sidebar-group__label" }, Rd = ["aria-hidden"], zd = { class: "coar-sidebar-group__panel-inner" }, Bd = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
9192
9219
|
__name: "CoarSidebarGroup",
|
|
9193
9220
|
props: /* @__PURE__ */ g({
|
|
9194
9221
|
label: {},
|
|
@@ -9215,41 +9242,74 @@ var Gu = /* @__PURE__ */ d({
|
|
|
9215
9242
|
}),
|
|
9216
9243
|
emits: ["update:open"],
|
|
9217
9244
|
setup(e) {
|
|
9218
|
-
let t = `coar-sidebar-group-${R()}`, n = e, i = z(e, "open"), c = m(
|
|
9245
|
+
let t = `coar-sidebar-group-${R()}`, n = e, i = z(e, "open"), c = m(hd, O(!1)), l = m(gd, O("m")), d = m(_d, O("left")), f = r(() => md(d.value)), p = m(vd, O(!1)), g = r(() => n.iconOnly ?? p.value), _ = r(() => i.value), v = r(() => n.mode === "flyout"), b = B(), x = O(!1), C = O(null), T = null, E = null, D = null, k = m(yd, null), j = {
|
|
9219
9246
|
cancelClose: () => {
|
|
9220
|
-
|
|
9247
|
+
ae(), k?.cancelClose();
|
|
9221
9248
|
},
|
|
9222
9249
|
scheduleClose: () => {
|
|
9223
|
-
|
|
9250
|
+
ie(), k?.scheduleClose();
|
|
9224
9251
|
}
|
|
9225
|
-
},
|
|
9252
|
+
}, M = r(() => p.value && !c.value), N = r(() => {
|
|
9253
|
+
switch (d.value) {
|
|
9254
|
+
case "right": return "left";
|
|
9255
|
+
case "top": return "bottom";
|
|
9256
|
+
case "bottom": return "top";
|
|
9257
|
+
default: return "right";
|
|
9258
|
+
}
|
|
9259
|
+
}), F = r(() => M.value ? v.value && x.value || !v.value && _.value ? !1 : {
|
|
9226
9260
|
content: n.label,
|
|
9227
|
-
placement:
|
|
9261
|
+
placement: N.value,
|
|
9228
9262
|
openDelay: 100
|
|
9229
|
-
} : !c.value ||
|
|
9263
|
+
} : !c.value || v.value && x.value ? !1 : {
|
|
9230
9264
|
content: n.label,
|
|
9231
|
-
placement:
|
|
9265
|
+
placement: N.value,
|
|
9232
9266
|
openDelay: 200
|
|
9233
|
-
})
|
|
9234
|
-
|
|
9267
|
+
}), I = r(() => {
|
|
9268
|
+
switch (d.value) {
|
|
9269
|
+
case "right": return "chevron-left";
|
|
9270
|
+
case "top": return "chevron-down";
|
|
9271
|
+
case "bottom": return "chevron-up";
|
|
9272
|
+
default: return "chevron-right";
|
|
9273
|
+
}
|
|
9274
|
+
}), V = r(() => f.value === "horizontal" && d.value === "top" ? "chevron-up" : "chevron-down");
|
|
9275
|
+
function H(e) {
|
|
9235
9276
|
if (n.disabled) {
|
|
9236
9277
|
e.preventDefault(), e.stopPropagation();
|
|
9237
9278
|
return;
|
|
9238
9279
|
}
|
|
9239
|
-
if (
|
|
9240
|
-
|
|
9280
|
+
if (v.value) {
|
|
9281
|
+
x.value ? re() : ne();
|
|
9241
9282
|
return;
|
|
9242
9283
|
}
|
|
9243
9284
|
i.value = !i.value;
|
|
9244
9285
|
}
|
|
9245
|
-
let
|
|
9246
|
-
function
|
|
9247
|
-
return
|
|
9286
|
+
let W = rr();
|
|
9287
|
+
function G() {
|
|
9288
|
+
return b.default?.();
|
|
9289
|
+
}
|
|
9290
|
+
let q = r(() => {
|
|
9291
|
+
switch (d.value) {
|
|
9292
|
+
case "right": return ["left-start", "right-start"];
|
|
9293
|
+
case "top": return ["bottom-start", "top-start"];
|
|
9294
|
+
case "bottom": return ["top-start", "bottom-start"];
|
|
9295
|
+
default: return ["right-start", "left-start"];
|
|
9296
|
+
}
|
|
9297
|
+
});
|
|
9298
|
+
function J(e) {
|
|
9299
|
+
let t = e.getBoundingClientRect(), n = e.closest(".coar-sidebar") ?? e.closest(".coar-sidebar-flyout");
|
|
9300
|
+
if (!n) return 0;
|
|
9301
|
+
let r = n.getBoundingClientRect();
|
|
9302
|
+
switch (d.value) {
|
|
9303
|
+
case "right": return t.left - r.left;
|
|
9304
|
+
case "top": return r.bottom - t.bottom;
|
|
9305
|
+
case "bottom": return t.top - r.top;
|
|
9306
|
+
default: return r.right - t.right;
|
|
9307
|
+
}
|
|
9248
9308
|
}
|
|
9249
|
-
function
|
|
9250
|
-
if (!
|
|
9251
|
-
|
|
9252
|
-
let e =
|
|
9309
|
+
function ne() {
|
|
9310
|
+
if (!C.value || D) return;
|
|
9311
|
+
ae(), k?.cancelClose(), x.value = !0;
|
|
9312
|
+
let e = C.value, r = J(e), i = ar().open({
|
|
9253
9313
|
spec: {
|
|
9254
9314
|
...gr,
|
|
9255
9315
|
anchor: {
|
|
@@ -9257,127 +9317,127 @@ var Gu = /* @__PURE__ */ d({
|
|
|
9257
9317
|
element: e
|
|
9258
9318
|
},
|
|
9259
9319
|
position: {
|
|
9260
|
-
placement:
|
|
9261
|
-
offset: -4 +
|
|
9320
|
+
placement: q.value,
|
|
9321
|
+
offset: -4 + r,
|
|
9262
9322
|
flip: !0,
|
|
9263
9323
|
shift: !0
|
|
9264
9324
|
}
|
|
9265
9325
|
},
|
|
9266
9326
|
content: {
|
|
9267
9327
|
kind: "component",
|
|
9268
|
-
component: h(
|
|
9328
|
+
component: h(Nd)
|
|
9269
9329
|
},
|
|
9270
9330
|
inputs: {
|
|
9271
9331
|
id: t,
|
|
9272
9332
|
label: n.label,
|
|
9273
|
-
iconOnly:
|
|
9274
|
-
parentControl:
|
|
9275
|
-
renderContent:
|
|
9333
|
+
iconOnly: g.value,
|
|
9334
|
+
parentControl: j,
|
|
9335
|
+
renderContent: G,
|
|
9276
9336
|
onFlyoutEnter: () => {
|
|
9277
|
-
|
|
9337
|
+
ae(), k?.cancelClose();
|
|
9278
9338
|
},
|
|
9279
|
-
onFlyoutLeave: () =>
|
|
9339
|
+
onFlyoutLeave: () => ie()
|
|
9280
9340
|
},
|
|
9281
|
-
parent:
|
|
9341
|
+
parent: W
|
|
9282
9342
|
});
|
|
9283
|
-
|
|
9284
|
-
|
|
9343
|
+
D = i, i.afterClosed.then(() => {
|
|
9344
|
+
D === i && (D = null, x.value = !1, ae(), se());
|
|
9285
9345
|
});
|
|
9286
9346
|
}
|
|
9287
|
-
function
|
|
9288
|
-
|
|
9289
|
-
let e =
|
|
9290
|
-
|
|
9347
|
+
function re() {
|
|
9348
|
+
ae(), x.value = !1;
|
|
9349
|
+
let e = D;
|
|
9350
|
+
D = null, e && !e.isClosed && e.close();
|
|
9291
9351
|
}
|
|
9292
|
-
function
|
|
9293
|
-
|
|
9352
|
+
function ie() {
|
|
9353
|
+
ae(), T = setTimeout(() => re(), 300);
|
|
9294
9354
|
}
|
|
9295
|
-
function
|
|
9296
|
-
|
|
9355
|
+
function ae() {
|
|
9356
|
+
T &&= (clearTimeout(T), null);
|
|
9297
9357
|
}
|
|
9298
|
-
function
|
|
9299
|
-
|
|
9358
|
+
function oe() {
|
|
9359
|
+
se(), E = setTimeout(() => ne(), 200);
|
|
9300
9360
|
}
|
|
9301
|
-
function
|
|
9302
|
-
|
|
9361
|
+
function se() {
|
|
9362
|
+
E &&= (clearTimeout(E), null);
|
|
9303
9363
|
}
|
|
9304
|
-
function
|
|
9305
|
-
|
|
9364
|
+
function Y() {
|
|
9365
|
+
x.value ? ae() : v.value && n.openOnHover && oe(), k?.cancelClose();
|
|
9306
9366
|
}
|
|
9307
|
-
function
|
|
9308
|
-
|
|
9367
|
+
function ce() {
|
|
9368
|
+
se(), x.value && ie();
|
|
9309
9369
|
}
|
|
9310
9370
|
return U(c, () => {
|
|
9311
|
-
|
|
9371
|
+
x.value && re();
|
|
9312
9372
|
}), S(() => {
|
|
9313
|
-
|
|
9314
|
-
}), (e, r) => (w(), o("div", { class: y(["coar-sidebar-group", {
|
|
9373
|
+
ae(), se(), D && !D.isClosed && D.close(), D = null;
|
|
9374
|
+
}), (e, r) => (w(), o("div", { class: y(["coar-sidebar-group", [`coar-sidebar-group--${f.value}`, {
|
|
9315
9375
|
"coar-sidebar-group--collapsed": L(c),
|
|
9316
|
-
"coar-sidebar-group--icon-only":
|
|
9317
|
-
}]) }, [K((w(), o("div", {
|
|
9376
|
+
"coar-sidebar-group--icon-only": M.value
|
|
9377
|
+
}]]) }, [K((w(), o("div", {
|
|
9318
9378
|
ref_key: "triggerRef",
|
|
9319
|
-
ref:
|
|
9379
|
+
ref: C,
|
|
9320
9380
|
class: y(["coar-sidebar-group__trigger", {
|
|
9321
9381
|
"coar-sidebar-group__trigger--disabled": n.disabled,
|
|
9322
|
-
"coar-sidebar-group__trigger--open":
|
|
9382
|
+
"coar-sidebar-group__trigger--open": v.value ? x.value : _.value
|
|
9323
9383
|
}]),
|
|
9324
9384
|
role: "menuitem",
|
|
9325
9385
|
"aria-haspopup": "menu",
|
|
9326
|
-
"aria-expanded":
|
|
9386
|
+
"aria-expanded": v.value ? x.value : _.value,
|
|
9327
9387
|
"aria-controls": t,
|
|
9328
9388
|
"aria-disabled": n.disabled || void 0,
|
|
9329
9389
|
tabindex: n.disabled ? -1 : 0,
|
|
9330
|
-
onClick:
|
|
9331
|
-
onKeydown: [ee(
|
|
9332
|
-
onMouseenter:
|
|
9333
|
-
onMouseleave:
|
|
9390
|
+
onClick: H,
|
|
9391
|
+
onKeydown: [ee(H, ["enter"]), ee(te(H, ["prevent"]), ["space"])],
|
|
9392
|
+
onMouseenter: Y,
|
|
9393
|
+
onMouseleave: ce
|
|
9334
9394
|
}, [
|
|
9335
|
-
s("span",
|
|
9395
|
+
s("span", Fd, [u(Z, {
|
|
9336
9396
|
name: n.icon || "square-dashed",
|
|
9337
9397
|
size: L(l)
|
|
9338
|
-
}, null, 8, ["name", "size"]), s("span",
|
|
9339
|
-
name:
|
|
9398
|
+
}, null, 8, ["name", "size"]), s("span", Id, [u(Z, {
|
|
9399
|
+
name: v.value ? x.value ? V.value : I.value : _.value ? "minus" : "plus",
|
|
9340
9400
|
size: "xs"
|
|
9341
9401
|
}, null, 8, ["name"])])]),
|
|
9342
|
-
s("span",
|
|
9402
|
+
s("span", Ld, P(n.label), 1),
|
|
9343
9403
|
u(Z, {
|
|
9344
|
-
name:
|
|
9404
|
+
name: v.value ? x.value ? V.value : I.value : _.value ? "minus" : "plus",
|
|
9345
9405
|
size: "xs",
|
|
9346
9406
|
class: "coar-sidebar-group__chevron",
|
|
9347
9407
|
"aria-hidden": "true"
|
|
9348
9408
|
}, null, 8, ["name"])
|
|
9349
|
-
], 42,
|
|
9409
|
+
], 42, Pd)), [[L(uc), F.value]]), v.value ? a("", !0) : (w(), o("div", {
|
|
9350
9410
|
key: 0,
|
|
9351
9411
|
id: t,
|
|
9352
|
-
class: y(["coar-sidebar-group__panel", { "coar-sidebar-group__panel--open":
|
|
9353
|
-
"aria-hidden": !
|
|
9412
|
+
class: y(["coar-sidebar-group__panel", { "coar-sidebar-group__panel--open": _.value }]),
|
|
9413
|
+
"aria-hidden": !_.value || void 0,
|
|
9354
9414
|
role: "group"
|
|
9355
|
-
}, [s("div",
|
|
9415
|
+
}, [s("div", zd, [A(e.$slots, "default", {}, void 0, !0)])], 10, Rd))], 2));
|
|
9356
9416
|
}
|
|
9357
|
-
}), [["__scopeId", "data-v-
|
|
9417
|
+
}), [["__scopeId", "data-v-fc4f23cf"]]), Vd = {
|
|
9358
9418
|
key: 0,
|
|
9359
9419
|
class: "coar-sidebar-heading__text"
|
|
9360
|
-
},
|
|
9420
|
+
}, Hd = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
9361
9421
|
__name: "CoarSidebarHeading",
|
|
9362
9422
|
props: { label: {} },
|
|
9363
9423
|
setup(e) {
|
|
9364
|
-
let t = e, n = m(
|
|
9424
|
+
let t = e, n = m(hd, O(!1));
|
|
9365
9425
|
return (e, r) => (w(), o("div", {
|
|
9366
9426
|
class: y(["coar-sidebar-heading", { "coar-sidebar-heading--collapsed": L(n) }]),
|
|
9367
9427
|
role: "heading",
|
|
9368
9428
|
"aria-level": "3"
|
|
9369
|
-
}, [L(n) ? a("", !0) : (w(), o("span",
|
|
9429
|
+
}, [L(n) ? a("", !0) : (w(), o("span", Vd, P(t.label), 1))], 2));
|
|
9370
9430
|
}
|
|
9371
|
-
}), [["__scopeId", "data-v-99fb2c2f"]]),
|
|
9431
|
+
}), [["__scopeId", "data-v-99fb2c2f"]]), Ud = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
9372
9432
|
__name: "CoarSidebarDivider",
|
|
9373
9433
|
setup(e) {
|
|
9374
|
-
let t = m(
|
|
9434
|
+
let t = m(hd, O(!1));
|
|
9375
9435
|
return (e, n) => (w(), o("div", {
|
|
9376
9436
|
class: y(["coar-sidebar-divider", { "coar-sidebar-divider--collapsed": L(t) }]),
|
|
9377
9437
|
role: "separator"
|
|
9378
9438
|
}, null, 2));
|
|
9379
9439
|
}
|
|
9380
|
-
}), [["__scopeId", "data-v-c70a1b23"]]),
|
|
9440
|
+
}), [["__scopeId", "data-v-c70a1b23"]]), Wd = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
9381
9441
|
__name: "CoarSidebarSpacer",
|
|
9382
9442
|
props: {
|
|
9383
9443
|
height: { default: void 0 },
|
|
@@ -9394,16 +9454,16 @@ var Gu = /* @__PURE__ */ d({
|
|
|
9394
9454
|
"aria-hidden": "true"
|
|
9395
9455
|
}, null, 6));
|
|
9396
9456
|
}
|
|
9397
|
-
}), [["__scopeId", "data-v-502139f5"]]),
|
|
9457
|
+
}), [["__scopeId", "data-v-502139f5"]]), Gd = {
|
|
9398
9458
|
key: 0,
|
|
9399
9459
|
class: "coar-navbar__start"
|
|
9400
|
-
},
|
|
9460
|
+
}, Kd = {
|
|
9401
9461
|
key: 1,
|
|
9402
9462
|
class: "coar-navbar__center"
|
|
9403
|
-
},
|
|
9463
|
+
}, qd = {
|
|
9404
9464
|
key: 2,
|
|
9405
9465
|
class: "coar-navbar__end"
|
|
9406
|
-
},
|
|
9466
|
+
}, Jd = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
9407
9467
|
__name: "CoarNavbar",
|
|
9408
9468
|
props: {
|
|
9409
9469
|
elevated: {
|
|
@@ -9423,17 +9483,17 @@ var Gu = /* @__PURE__ */ d({
|
|
|
9423
9483
|
}]),
|
|
9424
9484
|
role: "banner"
|
|
9425
9485
|
}, [
|
|
9426
|
-
t.$slots.start ? (w(), o("div",
|
|
9486
|
+
t.$slots.start ? (w(), o("div", Gd, [A(t.$slots, "start", {}, void 0, !0)])) : a("", !0),
|
|
9427
9487
|
n[0] ||= s("div", { class: "coar-navbar__spacer" }, null, -1),
|
|
9428
|
-
t.$slots.center ? (w(), o("div",
|
|
9488
|
+
t.$slots.center ? (w(), o("div", Kd, [A(t.$slots, "center", {}, void 0, !0)])) : a("", !0),
|
|
9429
9489
|
n[1] ||= s("div", { class: "coar-navbar__spacer" }, null, -1),
|
|
9430
|
-
t.$slots.end ? (w(), o("div",
|
|
9490
|
+
t.$slots.end ? (w(), o("div", qd, [A(t.$slots, "end", {}, void 0, !0)])) : a("", !0)
|
|
9431
9491
|
], 2));
|
|
9432
9492
|
}
|
|
9433
9493
|
}), [["__scopeId", "data-v-c7eb4106"]]);
|
|
9434
9494
|
//#endregion
|
|
9435
9495
|
//#region src/components/date-time/_shared/time-helpers.ts
|
|
9436
|
-
function
|
|
9496
|
+
function Yd(e) {
|
|
9437
9497
|
try {
|
|
9438
9498
|
return new Intl.DateTimeFormat(e, {
|
|
9439
9499
|
hour: "numeric",
|
|
@@ -9443,13 +9503,13 @@ function qd(e) {
|
|
|
9443
9503
|
return !1;
|
|
9444
9504
|
}
|
|
9445
9505
|
}
|
|
9446
|
-
function
|
|
9506
|
+
function Xd(e, t, n) {
|
|
9447
9507
|
let r = String(t).padStart(2, "0");
|
|
9448
9508
|
if (n) return `${String(e).padStart(2, "0")}:${r}`;
|
|
9449
9509
|
let i = e >= 12 ? "PM" : "AM", a = e % 12;
|
|
9450
9510
|
return a === 0 && (a = 12), `${a}:${r} ${i}`;
|
|
9451
9511
|
}
|
|
9452
|
-
function
|
|
9512
|
+
function Zd(e) {
|
|
9453
9513
|
if (!e || typeof e != "string") return null;
|
|
9454
9514
|
let t = e.trim().toUpperCase(), n = t.match(/^(\d{1,2}):(\d{2})\s*(AM|PM)$/);
|
|
9455
9515
|
if (n) {
|
|
@@ -9469,41 +9529,41 @@ function Yd(e) {
|
|
|
9469
9529
|
}
|
|
9470
9530
|
return null;
|
|
9471
9531
|
}
|
|
9472
|
-
function
|
|
9532
|
+
function Qd(e) {
|
|
9473
9533
|
let t = e >= 12 ? "PM" : "AM", n = e % 12;
|
|
9474
9534
|
return n === 0 && (n = 12), {
|
|
9475
9535
|
hours: n,
|
|
9476
9536
|
period: t
|
|
9477
9537
|
};
|
|
9478
9538
|
}
|
|
9479
|
-
function
|
|
9539
|
+
function $d(e, t) {
|
|
9480
9540
|
return t === "AM" ? e === 12 ? 0 : e : e === 12 ? 12 : e + 12;
|
|
9481
9541
|
}
|
|
9482
|
-
function
|
|
9542
|
+
function ef(e, t) {
|
|
9483
9543
|
let n = (e + t) % 24;
|
|
9484
9544
|
return n < 0 ? n + 24 : n;
|
|
9485
9545
|
}
|
|
9486
|
-
function
|
|
9546
|
+
function tf(e, t, n = 1) {
|
|
9487
9547
|
let r = e + t * n, i = 0, a = r;
|
|
9488
9548
|
return r >= 60 ? (i = Math.floor(r / 60), a = r % 60) : r < 0 && (i = Math.floor(r / 60), a = (r % 60 + 60) % 60), {
|
|
9489
9549
|
minutes: a,
|
|
9490
9550
|
hourDelta: i
|
|
9491
9551
|
};
|
|
9492
9552
|
}
|
|
9493
|
-
function
|
|
9553
|
+
function nf(e, t) {
|
|
9494
9554
|
return Math.round(e / t) * t;
|
|
9495
9555
|
}
|
|
9496
9556
|
//#endregion
|
|
9497
9557
|
//#region src/components/date-time/time-picker/CoarTimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
9498
|
-
var
|
|
9558
|
+
var rf = ["aria-label"], af = { class: "coar-time-picker__spinner coar-time-picker__hours" }, of = ["disabled", "aria-label"], sf = [
|
|
9499
9559
|
"aria-valuenow",
|
|
9500
9560
|
"aria-valuemin",
|
|
9501
9561
|
"aria-valuemax",
|
|
9502
9562
|
"aria-label"
|
|
9503
|
-
],
|
|
9563
|
+
], cf = ["disabled", "aria-label"], lf = { class: "coar-time-picker__spinner coar-time-picker__minutes" }, uf = ["disabled", "aria-label"], df = ["aria-valuenow", "aria-label"], ff = ["disabled", "aria-label"], pf = {
|
|
9504
9564
|
key: 0,
|
|
9505
9565
|
class: "coar-time-picker__spinner coar-time-picker__period"
|
|
9506
|
-
},
|
|
9566
|
+
}, mf = ["disabled"], hf = ["aria-valuenow", "aria-valuetext"], gf = ["disabled"], _f = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
9507
9567
|
__name: "CoarTimePicker",
|
|
9508
9568
|
props: /* @__PURE__ */ g({
|
|
9509
9569
|
size: { default: "m" },
|
|
@@ -9532,9 +9592,9 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9532
9592
|
setup(e) {
|
|
9533
9593
|
let t = e, n = z(e, "modelValue"), { t: i } = q(), c = J(), l = r(() => t.locale ?? c?.language.value ?? navigator.language), d = O(9), f = O(0), p = O("AM");
|
|
9534
9594
|
U(n, (e) => {
|
|
9535
|
-
e && (d.value = e.hours, f.value =
|
|
9595
|
+
e && (d.value = e.hours, f.value = nf(e.minutes, t.minuteStep), p.value = e.hours >= 12 ? "PM" : "AM");
|
|
9536
9596
|
}, { immediate: !0 });
|
|
9537
|
-
let m = r(() => t.use24Hour === !0 ? !1 : t.use24Hour === !1 ? !0 :
|
|
9597
|
+
let m = r(() => t.use24Hour === !0 ? !1 : t.use24Hour === !1 ? !0 : Yd(l.value)), h = r(() => m.value ? Qd(d.value).hours : d.value), g = r(() => f.value), _ = r(() => +!!m.value), v = r(() => m.value ? 12 : 23), b = r(() => t.size === "xs" ? "xs" : "s");
|
|
9538
9598
|
function x(e) {
|
|
9539
9599
|
return e.hours * 60 + e.minutes;
|
|
9540
9600
|
}
|
|
@@ -9569,11 +9629,11 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9569
9629
|
if (!(t.disabled || t.readonly || S.value)) {
|
|
9570
9630
|
if (m.value) {
|
|
9571
9631
|
let e = h.value, t = e + 1;
|
|
9572
|
-
if (t > 12 && (t = 1), d.value =
|
|
9632
|
+
if (t > 12 && (t = 1), d.value = $d(t, p.value), e === 11) {
|
|
9573
9633
|
I();
|
|
9574
9634
|
return;
|
|
9575
9635
|
}
|
|
9576
|
-
} else d.value =
|
|
9636
|
+
} else d.value = ef(d.value, 1);
|
|
9577
9637
|
A();
|
|
9578
9638
|
}
|
|
9579
9639
|
}
|
|
@@ -9581,28 +9641,28 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9581
9641
|
if (!(t.disabled || t.readonly || C.value)) {
|
|
9582
9642
|
if (m.value) {
|
|
9583
9643
|
let e = h.value, t = e - 1;
|
|
9584
|
-
if (t < 1 && (t = 12), d.value =
|
|
9644
|
+
if (t < 1 && (t = 12), d.value = $d(t, p.value), e === 12) {
|
|
9585
9645
|
I();
|
|
9586
9646
|
return;
|
|
9587
9647
|
}
|
|
9588
|
-
} else d.value =
|
|
9648
|
+
} else d.value = ef(d.value, -1);
|
|
9589
9649
|
A();
|
|
9590
9650
|
}
|
|
9591
9651
|
}
|
|
9592
9652
|
function N() {
|
|
9593
9653
|
if (t.disabled || t.readonly || T.value) return;
|
|
9594
|
-
let { minutes: e, hourDelta: n } =
|
|
9595
|
-
f.value = e, n !== 0 && (d.value =
|
|
9654
|
+
let { minutes: e, hourDelta: n } = tf(f.value, 1, t.minuteStep);
|
|
9655
|
+
f.value = e, n !== 0 && (d.value = ef(d.value, n), p.value = d.value >= 12 ? "PM" : "AM"), A();
|
|
9596
9656
|
}
|
|
9597
9657
|
function F() {
|
|
9598
9658
|
if (t.disabled || t.readonly || E.value) return;
|
|
9599
|
-
let { minutes: e, hourDelta: n } =
|
|
9600
|
-
f.value = e, n !== 0 && (d.value =
|
|
9659
|
+
let { minutes: e, hourDelta: n } = tf(f.value, -1, t.minuteStep);
|
|
9660
|
+
f.value = e, n !== 0 && (d.value = ef(d.value, n), p.value = d.value >= 12 ? "PM" : "AM"), A();
|
|
9601
9661
|
}
|
|
9602
9662
|
function I() {
|
|
9603
9663
|
if (t.disabled || t.readonly || !m.value) return;
|
|
9604
9664
|
let e = p.value === "AM" ? "PM" : "AM";
|
|
9605
|
-
e === "AM" && D.value || e === "PM" && k.value || (p.value = e, d.value =
|
|
9665
|
+
e === "AM" && D.value || e === "PM" && k.value || (p.value = e, d.value = $d(h.value, e), A());
|
|
9606
9666
|
}
|
|
9607
9667
|
function R(e) {
|
|
9608
9668
|
t.disabled || t.readonly || (e.key === "ArrowUp" ? (e.preventDefault(), j()) : e.key === "ArrowDown" && (e.preventDefault(), M()));
|
|
@@ -9626,7 +9686,7 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9626
9686
|
role: "group",
|
|
9627
9687
|
"aria-label": e.ariaLabel
|
|
9628
9688
|
}, [
|
|
9629
|
-
s("div",
|
|
9689
|
+
s("div", af, [
|
|
9630
9690
|
s("button", {
|
|
9631
9691
|
type: "button",
|
|
9632
9692
|
class: "coar-time-picker__btn coar-time-picker__btn--up",
|
|
@@ -9637,7 +9697,7 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9637
9697
|
}, [u(Z, {
|
|
9638
9698
|
name: "chevron-up",
|
|
9639
9699
|
size: b.value
|
|
9640
|
-
}, null, 8, ["size"])], 8,
|
|
9700
|
+
}, null, 8, ["size"])], 8, of),
|
|
9641
9701
|
s("div", {
|
|
9642
9702
|
class: "coar-time-picker__value",
|
|
9643
9703
|
role: "spinbutton",
|
|
@@ -9647,7 +9707,7 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9647
9707
|
"aria-valuemax": v.value,
|
|
9648
9708
|
"aria-label": L(i)("coar.ui.timePicker.hours", void 0, "Hours"),
|
|
9649
9709
|
onKeydown: R
|
|
9650
|
-
}, P(h.value.toString().padStart(2, "0")), 41,
|
|
9710
|
+
}, P(h.value.toString().padStart(2, "0")), 41, sf),
|
|
9651
9711
|
s("button", {
|
|
9652
9712
|
type: "button",
|
|
9653
9713
|
class: "coar-time-picker__btn coar-time-picker__btn--down",
|
|
@@ -9658,13 +9718,13 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9658
9718
|
}, [u(Z, {
|
|
9659
9719
|
name: "chevron-down",
|
|
9660
9720
|
size: b.value
|
|
9661
|
-
}, null, 8, ["size"])], 8,
|
|
9721
|
+
}, null, 8, ["size"])], 8, cf)
|
|
9662
9722
|
]),
|
|
9663
9723
|
n[0] ||= s("span", {
|
|
9664
9724
|
class: "coar-time-picker__separator",
|
|
9665
9725
|
"aria-hidden": "true"
|
|
9666
9726
|
}, ":", -1),
|
|
9667
|
-
s("div",
|
|
9727
|
+
s("div", lf, [
|
|
9668
9728
|
s("button", {
|
|
9669
9729
|
type: "button",
|
|
9670
9730
|
class: "coar-time-picker__btn coar-time-picker__btn--up",
|
|
@@ -9675,7 +9735,7 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9675
9735
|
}, [u(Z, {
|
|
9676
9736
|
name: "chevron-up",
|
|
9677
9737
|
size: b.value
|
|
9678
|
-
}, null, 8, ["size"])], 8,
|
|
9738
|
+
}, null, 8, ["size"])], 8, uf),
|
|
9679
9739
|
s("div", {
|
|
9680
9740
|
class: "coar-time-picker__value",
|
|
9681
9741
|
role: "spinbutton",
|
|
@@ -9685,7 +9745,7 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9685
9745
|
"aria-valuemax": "59",
|
|
9686
9746
|
"aria-label": L(i)("coar.ui.timePicker.minutes", void 0, "Minutes"),
|
|
9687
9747
|
onKeydown: B
|
|
9688
|
-
}, P(g.value.toString().padStart(2, "0")), 41,
|
|
9748
|
+
}, P(g.value.toString().padStart(2, "0")), 41, df),
|
|
9689
9749
|
s("button", {
|
|
9690
9750
|
type: "button",
|
|
9691
9751
|
class: "coar-time-picker__btn coar-time-picker__btn--down",
|
|
@@ -9696,9 +9756,9 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9696
9756
|
}, [u(Z, {
|
|
9697
9757
|
name: "chevron-down",
|
|
9698
9758
|
size: b.value
|
|
9699
|
-
}, null, 8, ["size"])], 8,
|
|
9759
|
+
}, null, 8, ["size"])], 8, ff)
|
|
9700
9760
|
]),
|
|
9701
|
-
m.value ? (w(), o("div",
|
|
9761
|
+
m.value ? (w(), o("div", pf, [
|
|
9702
9762
|
s("button", {
|
|
9703
9763
|
type: "button",
|
|
9704
9764
|
class: "coar-time-picker__btn coar-time-picker__btn--up",
|
|
@@ -9709,7 +9769,7 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9709
9769
|
}, [u(Z, {
|
|
9710
9770
|
name: "chevron-up",
|
|
9711
9771
|
size: b.value
|
|
9712
|
-
}, null, 8, ["size"])], 8,
|
|
9772
|
+
}, null, 8, ["size"])], 8, mf),
|
|
9713
9773
|
s("div", {
|
|
9714
9774
|
class: "coar-time-picker__value coar-time-picker__period-value",
|
|
9715
9775
|
role: "spinbutton",
|
|
@@ -9720,7 +9780,7 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9720
9780
|
"aria-valuetext": p.value,
|
|
9721
9781
|
"aria-label": "AM/PM",
|
|
9722
9782
|
onKeydown: V
|
|
9723
|
-
}, P(p.value), 41,
|
|
9783
|
+
}, P(p.value), 41, hf),
|
|
9724
9784
|
s("button", {
|
|
9725
9785
|
type: "button",
|
|
9726
9786
|
class: "coar-time-picker__btn coar-time-picker__btn--down",
|
|
@@ -9731,14 +9791,14 @@ var tf = ["aria-label"], nf = { class: "coar-time-picker__spinner coar-time-pick
|
|
|
9731
9791
|
}, [u(Z, {
|
|
9732
9792
|
name: "chevron-down",
|
|
9733
9793
|
size: b.value
|
|
9734
|
-
}, null, 8, ["size"])], 8,
|
|
9794
|
+
}, null, 8, ["size"])], 8, gf)
|
|
9735
9795
|
])) : a("", !0)
|
|
9736
|
-
], 8,
|
|
9796
|
+
], 8, rf)], 2));
|
|
9737
9797
|
}
|
|
9738
9798
|
}), [["__scopeId", "data-v-50fceac2"]]);
|
|
9739
9799
|
//#endregion
|
|
9740
9800
|
//#region src/components/date-time/_shared/date-helpers.ts
|
|
9741
|
-
function
|
|
9801
|
+
function vf(e) {
|
|
9742
9802
|
try {
|
|
9743
9803
|
let t = new Intl.DateTimeFormat(e).formatToParts(new Date(2024, 0, 15)), n = t.findIndex((e) => e.type === "day"), r = t.findIndex((e) => e.type === "month"), i = t.findIndex((e) => e.type === "year");
|
|
9744
9804
|
return n === -1 || r === -1 || i === -1 ? null : n < r && r < i ? "dd.mm.yyyy" : r < n && n < i ? "mm/dd/yyyy" : i < r && r < n ? "yyyy-mm-dd" : null;
|
|
@@ -9746,7 +9806,7 @@ function gf(e) {
|
|
|
9746
9806
|
return null;
|
|
9747
9807
|
}
|
|
9748
9808
|
}
|
|
9749
|
-
function
|
|
9809
|
+
function yf(e) {
|
|
9750
9810
|
try {
|
|
9751
9811
|
let t = new Intl.Locale(e);
|
|
9752
9812
|
return (t.getWeekInfo?.() ?? t.weekInfo)?.firstDay === 7 ? 7 : 1;
|
|
@@ -9754,10 +9814,10 @@ function _f(e) {
|
|
|
9754
9814
|
return 1;
|
|
9755
9815
|
}
|
|
9756
9816
|
}
|
|
9757
|
-
function
|
|
9817
|
+
function bf(e) {
|
|
9758
9818
|
return e.includes(".") ? "." : e.includes("/") ? "/" : "-";
|
|
9759
9819
|
}
|
|
9760
|
-
function
|
|
9820
|
+
function xf(e, t) {
|
|
9761
9821
|
let n = new Intl.DateTimeFormat(e, { weekday: "short" }), r = [];
|
|
9762
9822
|
for (let e = 0; e < 7; e++) {
|
|
9763
9823
|
let t = new Date(2024, 0, 1 + e);
|
|
@@ -9769,8 +9829,8 @@ function yf(e, t) {
|
|
|
9769
9829
|
}
|
|
9770
9830
|
return r;
|
|
9771
9831
|
}
|
|
9772
|
-
function
|
|
9773
|
-
let n =
|
|
9832
|
+
function Sf(e, t) {
|
|
9833
|
+
let n = bf(t), r = String(e.day).padStart(2, "0"), i = String(e.month).padStart(2, "0"), a = String(e.year);
|
|
9774
9834
|
switch (t) {
|
|
9775
9835
|
case "dd.mm.yyyy":
|
|
9776
9836
|
case "dd/mm/yyyy": return `${r}${n}${i}${n}${a}`;
|
|
@@ -9779,9 +9839,9 @@ function bf(e, t) {
|
|
|
9779
9839
|
default: return `${r}${n}${i}${n}${a}`;
|
|
9780
9840
|
}
|
|
9781
9841
|
}
|
|
9782
|
-
function
|
|
9842
|
+
function Cf(e, t, n) {
|
|
9783
9843
|
if (!e) return null;
|
|
9784
|
-
let r =
|
|
9844
|
+
let r = bf(t), i = e.split(r);
|
|
9785
9845
|
if (i.length !== 3 || i.some((e) => e.length === 0 || !/^\d+$/.test(e))) return null;
|
|
9786
9846
|
let a, o, s;
|
|
9787
9847
|
try {
|
|
@@ -9809,19 +9869,19 @@ function xf(e, t, n) {
|
|
|
9809
9869
|
return null;
|
|
9810
9870
|
}
|
|
9811
9871
|
}
|
|
9812
|
-
function
|
|
9872
|
+
function wf(e) {
|
|
9813
9873
|
return new Date(e.year, e.month - 1, e.day);
|
|
9814
9874
|
}
|
|
9815
|
-
function
|
|
9816
|
-
let t =
|
|
9875
|
+
function Tf(e) {
|
|
9876
|
+
let t = wf(e), n = t.getDay() || 7;
|
|
9817
9877
|
t.setDate(t.getDate() + 4 - n);
|
|
9818
9878
|
let r = new Date(t.getFullYear(), 0, 1);
|
|
9819
9879
|
return Math.ceil(((t.getTime() - r.getTime()) / 864e5 + 1) / 7);
|
|
9820
9880
|
}
|
|
9821
|
-
function
|
|
9881
|
+
function Ef(e, t) {
|
|
9822
9882
|
return t?.min && Y.PlainDate.compare(e, t.min) < 0 ? t.min : t?.max && Y.PlainDate.compare(e, t.max) > 0 ? t.max : e;
|
|
9823
9883
|
}
|
|
9824
|
-
function
|
|
9884
|
+
function Df(e, t) {
|
|
9825
9885
|
let n = e.toPlainDate({ day: 1 }), r = e.daysInMonth, i = n.dayOfWeek, a;
|
|
9826
9886
|
a = t === 1 ? (i - 1 + 7) % 7 : i % 7;
|
|
9827
9887
|
let o = [];
|
|
@@ -9845,20 +9905,20 @@ function Tf(e, t) {
|
|
|
9845
9905
|
}
|
|
9846
9906
|
//#endregion
|
|
9847
9907
|
//#region src/components/date-time/scrollable-calendar/CoarScrollableCalendar.vue?vue&type=script&setup=true&lang.ts
|
|
9848
|
-
var
|
|
9908
|
+
var Of = {
|
|
9849
9909
|
key: 0,
|
|
9850
9910
|
class: "coar-scrollable-calendar__week-spacer"
|
|
9851
|
-
},
|
|
9911
|
+
}, kf = ["id", "data-year-month"], Af = { class: "coar-scrollable-calendar__month-name" }, jf = { class: "coar-scrollable-calendar__month-year" }, Mf = {
|
|
9852
9912
|
key: 0,
|
|
9853
9913
|
class: "coar-scrollable-calendar__week-number"
|
|
9854
|
-
},
|
|
9914
|
+
}, Nf = [
|
|
9855
9915
|
"disabled",
|
|
9856
9916
|
"tabindex",
|
|
9857
9917
|
"data-date",
|
|
9858
9918
|
"aria-selected",
|
|
9859
9919
|
"aria-current",
|
|
9860
9920
|
"onClick"
|
|
9861
|
-
],
|
|
9921
|
+
], Pf = 12, Ff = 12, If = 6, Lf = 25, Rf = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
9862
9922
|
__name: "CoarScrollableCalendar",
|
|
9863
9923
|
props: /* @__PURE__ */ g({
|
|
9864
9924
|
min: { default: null },
|
|
@@ -9884,13 +9944,13 @@ var Ef = {
|
|
|
9884
9944
|
setup(t, { emit: n }) {
|
|
9885
9945
|
let i = t, c = z(t, "modelValue"), l = z(t, "activeMonth"), u = n, d = J(), f = r(() => i.locale ?? d?.language.value ?? navigator.language), p = r(() => {
|
|
9886
9946
|
if (i.dateFormatConfig) return i.dateFormatConfig;
|
|
9887
|
-
let e =
|
|
9947
|
+
let e = vf(f.value), t = yf(f.value);
|
|
9888
9948
|
return {
|
|
9889
9949
|
pattern: e ?? "dd.mm.yyyy",
|
|
9890
9950
|
firstDayOfWeek: t
|
|
9891
9951
|
};
|
|
9892
9952
|
}), m = r(() => p.value.firstDayOfWeek), h = r(() => Y.Now.plainDateISO()), g = r(() => {
|
|
9893
|
-
let e =
|
|
9953
|
+
let e = xf(f.value, m.value), t = m.value;
|
|
9894
9954
|
return e.map((e, n) => {
|
|
9895
9955
|
let r;
|
|
9896
9956
|
return r = t === 1 ? n + 1 : n === 0 ? 7 : n, {
|
|
@@ -9898,7 +9958,7 @@ var Ef = {
|
|
|
9898
9958
|
isWeekend: r === 6 || r === 7
|
|
9899
9959
|
};
|
|
9900
9960
|
});
|
|
9901
|
-
}), _ = O(Y.Now.plainDateISO().toPlainYearMonth().subtract({ months:
|
|
9961
|
+
}), _ = O(Y.Now.plainDateISO().toPlainYearMonth().subtract({ months: Pf })), b = O(Y.Now.plainDateISO().toPlainYearMonth().add({ months: Ff })), x = O(null), T = O(null), E = O(!1), D = !1, A = !1, j = !1;
|
|
9902
9962
|
function M() {
|
|
9903
9963
|
let e = T.value;
|
|
9904
9964
|
return e ? e.querySelector("[data-overlayscrollbars-viewport]") ?? e : null;
|
|
@@ -9925,8 +9985,8 @@ var Ef = {
|
|
|
9925
9985
|
};
|
|
9926
9986
|
}
|
|
9927
9987
|
function I(e) {
|
|
9928
|
-
let t = f.value, n = new Intl.DateTimeFormat(t, { month: "long" }).format(new Date(e.year, e.month - 1, 1)), r =
|
|
9929
|
-
for (let e = 0; e < 6; e++) a.push(
|
|
9988
|
+
let t = f.value, n = new Intl.DateTimeFormat(t, { month: "long" }).format(new Date(e.year, e.month - 1, 1)), r = Df(e, m.value), i = r.map((e) => F(e.date, e.isOutsideMonth)), a = [];
|
|
9989
|
+
for (let e = 0; e < 6; e++) a.push(Tf(r[e * 7].date));
|
|
9930
9990
|
return {
|
|
9931
9991
|
yearMonth: e,
|
|
9932
9992
|
monthName: n,
|
|
@@ -10017,7 +10077,7 @@ var Ef = {
|
|
|
10017
10077
|
if (j) return;
|
|
10018
10078
|
j = !0;
|
|
10019
10079
|
let e = M(), t = e?.scrollHeight ?? 0, n = i.min?.toPlainYearMonth() ?? null, r = _.value, a = [];
|
|
10020
|
-
for (let e = 0; e <
|
|
10080
|
+
for (let e = 0; e < If; e++) {
|
|
10021
10081
|
let e = r.subtract({ months: 1 });
|
|
10022
10082
|
if (n && Y.PlainYearMonth.compare(e, n) < 0) break;
|
|
10023
10083
|
r = e, a.unshift(I(r));
|
|
@@ -10038,7 +10098,7 @@ var Ef = {
|
|
|
10038
10098
|
if (j) return;
|
|
10039
10099
|
j = !0;
|
|
10040
10100
|
let e = i.max?.toPlainYearMonth() ?? null, t = b.value, n = [];
|
|
10041
|
-
for (let r = 0; r <
|
|
10101
|
+
for (let r = 0; r < If; r++) {
|
|
10042
10102
|
let r = t.add({ months: 1 });
|
|
10043
10103
|
if (e && Y.PlainYearMonth.compare(r, e) > 0) break;
|
|
10044
10104
|
t = r, n.push(I(t));
|
|
@@ -10053,14 +10113,14 @@ var Ef = {
|
|
|
10053
10113
|
}
|
|
10054
10114
|
function re() {
|
|
10055
10115
|
let e = B.value;
|
|
10056
|
-
if (e.length <=
|
|
10057
|
-
let t = e.slice(0,
|
|
10116
|
+
if (e.length <= Lf) return;
|
|
10117
|
+
let t = e.slice(0, Lf);
|
|
10058
10118
|
B.value = t, b.value = t[t.length - 1].yearMonth;
|
|
10059
10119
|
}
|
|
10060
10120
|
function ie() {
|
|
10061
10121
|
let e = B.value;
|
|
10062
|
-
if (e.length <=
|
|
10063
|
-
let t = e.length -
|
|
10122
|
+
if (e.length <= Lf) return;
|
|
10123
|
+
let t = e.length - Lf, n = e.slice(t);
|
|
10064
10124
|
B.value = n, _.value = n[0].yearMonth;
|
|
10065
10125
|
}
|
|
10066
10126
|
function ae(e) {
|
|
@@ -10079,7 +10139,7 @@ var Ef = {
|
|
|
10079
10139
|
r = n.add({ years: e });
|
|
10080
10140
|
break;
|
|
10081
10141
|
}
|
|
10082
|
-
r =
|
|
10142
|
+
r = Ef(r, {
|
|
10083
10143
|
min: i.min,
|
|
10084
10144
|
max: i.max
|
|
10085
10145
|
}), x.value = r;
|
|
@@ -10143,7 +10203,7 @@ var Ef = {
|
|
|
10143
10203
|
}), (n, r) => (w(), o("div", {
|
|
10144
10204
|
class: "coar-scrollable-calendar",
|
|
10145
10205
|
onKeydown: se
|
|
10146
|
-
}, [s("div", { class: y(["coar-scrollable-calendar__weekdays", { "coar-scrollable-calendar__weekdays--with-weeks": t.showWeekNumbers }]) }, [t.showWeekNumbers ? (w(), o("span",
|
|
10206
|
+
}, [s("div", { class: y(["coar-scrollable-calendar__weekdays", { "coar-scrollable-calendar__weekdays--with-weeks": t.showWeekNumbers }]) }, [t.showWeekNumbers ? (w(), o("span", Of)) : a("", !0), (w(!0), o(e, null, k(g.value, (e) => (w(), o("span", {
|
|
10147
10207
|
key: e.name,
|
|
10148
10208
|
class: y(["coar-scrollable-calendar__weekday", { "coar-scrollable-calendar__weekday--weekend": t.highlightWeekends && e.isWeekend }])
|
|
10149
10209
|
}, P(e.name), 3))), 128))], 2), s("div", { class: y(["coar-scrollable-calendar__months-wrapper", { "coar-scrollable-calendar__months-wrapper--ready": E.value }]) }, [K((w(), o("div", {
|
|
@@ -10155,10 +10215,10 @@ var Ef = {
|
|
|
10155
10215
|
key: n.yearMonth.toString(),
|
|
10156
10216
|
"data-year-month": n.yearMonth.toString(),
|
|
10157
10217
|
class: "coar-scrollable-calendar__month"
|
|
10158
|
-
}, [s("div", { class: y(["coar-scrollable-calendar__month-header", { "coar-scrollable-calendar__month-header--with-weeks": t.showWeekNumbers }]) }, [s("span",
|
|
10218
|
+
}, [s("div", { class: y(["coar-scrollable-calendar__month-header", { "coar-scrollable-calendar__month-header--with-weeks": t.showWeekNumbers }]) }, [s("span", Af, P(n.monthName), 1), s("span", jf, P(n.year), 1)], 2), s("div", {
|
|
10159
10219
|
class: y(["coar-scrollable-calendar__grid", { "coar-scrollable-calendar__grid--with-weeks": t.showWeekNumbers }]),
|
|
10160
10220
|
role: "grid"
|
|
10161
|
-
}, [(w(!0), o(e, null, k(n.days, (r, i) => (w(), o(e, { key: r.date.toString() }, [t.showWeekNumbers && i % 7 == 0 ? (w(), o("span",
|
|
10221
|
+
}, [(w(!0), o(e, null, k(n.days, (r, i) => (w(), o(e, { key: r.date.toString() }, [t.showWeekNumbers && i % 7 == 0 ? (w(), o("span", Mf, P(n.weekNumbers[i / 7]), 1)) : a("", !0), s("button", {
|
|
10162
10222
|
type: "button",
|
|
10163
10223
|
class: y(["coar-scrollable-calendar__day", [r.markerCssClass, {
|
|
10164
10224
|
"coar-scrollable-calendar__day--outside": r.isOutsideMonth,
|
|
@@ -10175,12 +10235,12 @@ var Ef = {
|
|
|
10175
10235
|
"aria-selected": r.isSelected,
|
|
10176
10236
|
"aria-current": r.isToday ? "date" : void 0,
|
|
10177
10237
|
onClick: (e) => ae(r.date)
|
|
10178
|
-
}, P(r.day), 11,
|
|
10238
|
+
}, P(r.day), 11, Nf)], 64))), 128))], 2)], 8, kf))), 128))])), [[L(Fs), {
|
|
10179
10239
|
overflowX: "hidden",
|
|
10180
10240
|
autoHide: "leave"
|
|
10181
10241
|
}]])], 2)], 32));
|
|
10182
10242
|
}
|
|
10183
|
-
}), [["__scopeId", "data-v-e9dd37f6"]]),
|
|
10243
|
+
}), [["__scopeId", "data-v-e9dd37f6"]]), zf = { class: "coar-month-list-host" }, Bf = { class: "coar-month-list" }, Vf = { class: "coar-month-list__year-stepper" }, Hf = ["disabled", "aria-label"], Uf = { class: "coar-month-list__year" }, Wf = ["disabled", "aria-label"], Gf = ["aria-label"], Kf = ["aria-selected", "onClick"], qf = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
10184
10244
|
__name: "CoarMonthList",
|
|
10185
10245
|
props: /* @__PURE__ */ g({
|
|
10186
10246
|
locale: { default: void 0 },
|
|
@@ -10237,7 +10297,7 @@ var Ef = {
|
|
|
10237
10297
|
v(() => E());
|
|
10238
10298
|
}), C(() => {
|
|
10239
10299
|
setTimeout(() => E(), 50);
|
|
10240
|
-
}), (t, n) => (w(), o("div",
|
|
10300
|
+
}), (t, n) => (w(), o("div", zf, [s("div", Bf, [s("div", Vf, [
|
|
10241
10301
|
s("button", {
|
|
10242
10302
|
type: "button",
|
|
10243
10303
|
class: "coar-month-list__year-btn",
|
|
@@ -10247,8 +10307,8 @@ var Ef = {
|
|
|
10247
10307
|
}, [u(Z, {
|
|
10248
10308
|
name: "chevron-left",
|
|
10249
10309
|
size: "s"
|
|
10250
|
-
})], 8,
|
|
10251
|
-
s("span",
|
|
10310
|
+
})], 8, Hf),
|
|
10311
|
+
s("span", Uf, P(p.value), 1),
|
|
10252
10312
|
s("button", {
|
|
10253
10313
|
type: "button",
|
|
10254
10314
|
class: "coar-month-list__year-btn",
|
|
@@ -10258,7 +10318,7 @@ var Ef = {
|
|
|
10258
10318
|
}, [u(Z, {
|
|
10259
10319
|
name: "chevron-right",
|
|
10260
10320
|
size: "s"
|
|
10261
|
-
})], 8,
|
|
10321
|
+
})], 8, Wf)
|
|
10262
10322
|
]), K((w(), o("div", {
|
|
10263
10323
|
ref_key: "monthsContainerRef",
|
|
10264
10324
|
ref: T,
|
|
@@ -10272,16 +10332,16 @@ var Ef = {
|
|
|
10272
10332
|
role: "option",
|
|
10273
10333
|
"aria-selected": e.isActive,
|
|
10274
10334
|
onClick: (t) => S(e.yearMonth)
|
|
10275
|
-
}, P(e.name), 11,
|
|
10335
|
+
}, P(e.name), 11, Kf))), 128))], 8, Gf)), [[L(Fs), {
|
|
10276
10336
|
overflowX: "hidden",
|
|
10277
10337
|
autoHide: "leave"
|
|
10278
10338
|
}]])])]));
|
|
10279
10339
|
}
|
|
10280
|
-
}), [["__scopeId", "data-v-11c8cf34"]]),
|
|
10340
|
+
}), [["__scopeId", "data-v-11c8cf34"]]), Jf = {
|
|
10281
10341
|
pattern: "dd.mm.yyyy",
|
|
10282
10342
|
firstDayOfWeek: 1
|
|
10283
10343
|
};
|
|
10284
|
-
function
|
|
10344
|
+
function Yf(e) {
|
|
10285
10345
|
let t = J(), n = ne(), i = r(() => e.locale?.value ? e.locale.value : t.language.value || navigator.language || "en"), a = r(() => {
|
|
10286
10346
|
if (e.dateFormat?.value) return e.dateFormat.value;
|
|
10287
10347
|
let n = t.localeData.value;
|
|
@@ -10289,12 +10349,12 @@ function qf(e) {
|
|
|
10289
10349
|
pattern: n.date.pattern,
|
|
10290
10350
|
firstDayOfWeek: n.date.firstDayOfWeek === 0 ? 7 : n.date.firstDayOfWeek
|
|
10291
10351
|
};
|
|
10292
|
-
let r =
|
|
10352
|
+
let r = vf(i.value), a = yf(i.value);
|
|
10293
10353
|
return r ? {
|
|
10294
10354
|
pattern: r,
|
|
10295
10355
|
firstDayOfWeek: a
|
|
10296
10356
|
} : {
|
|
10297
|
-
...
|
|
10357
|
+
...Jf,
|
|
10298
10358
|
firstDayOfWeek: a
|
|
10299
10359
|
};
|
|
10300
10360
|
}), o = r(() => {
|
|
@@ -10323,10 +10383,10 @@ function qf(e) {
|
|
|
10323
10383
|
}
|
|
10324
10384
|
//#endregion
|
|
10325
10385
|
//#region src/components/date-time/_shared/types.ts
|
|
10326
|
-
var
|
|
10386
|
+
var Xf = {
|
|
10327
10387
|
use24Hour: "auto",
|
|
10328
10388
|
minuteStep: 5
|
|
10329
|
-
},
|
|
10389
|
+
}, Zf = {
|
|
10330
10390
|
"dd.mm.yyyy": "dd/mm/yyyy",
|
|
10331
10391
|
"dd/mm/yyyy": "dd/mm/yyyy",
|
|
10332
10392
|
"mm/dd/yyyy": "mm/dd/yyyy",
|
|
@@ -10334,28 +10394,28 @@ var Jf = {
|
|
|
10334
10394
|
};
|
|
10335
10395
|
//#endregion
|
|
10336
10396
|
//#region src/components/date-time/_shared/maskito-config.ts
|
|
10337
|
-
function
|
|
10397
|
+
function Qf(e) {
|
|
10338
10398
|
return ae({
|
|
10339
|
-
mode:
|
|
10340
|
-
separator:
|
|
10399
|
+
mode: Zf[e],
|
|
10400
|
+
separator: bf(e)
|
|
10341
10401
|
});
|
|
10342
10402
|
}
|
|
10343
|
-
function
|
|
10403
|
+
function $f(e, t) {
|
|
10344
10404
|
return oe({
|
|
10345
|
-
dateMode:
|
|
10346
|
-
dateSeparator:
|
|
10405
|
+
dateMode: Zf[e],
|
|
10406
|
+
dateSeparator: bf(e),
|
|
10347
10407
|
timeMode: t ? "HH:MM AA" : "HH:MM"
|
|
10348
10408
|
});
|
|
10349
10409
|
}
|
|
10350
10410
|
//#endregion
|
|
10351
10411
|
//#region src/components/date-time/plain-date-picker/CoarPlainDatePickerPanel.vue?vue&type=script&setup=true&lang.ts
|
|
10352
|
-
var
|
|
10412
|
+
var ep = { class: "coar-plain-date-picker-calendar-column" }, tp = ["aria-label"], np = { class: "coar-plain-date-picker-side-column" }, rp = { class: "coar-plain-date-picker-year-stepper" }, ip = ["disabled", "aria-label"], ap = { class: "coar-plain-date-picker-year" }, op = ["disabled", "aria-label"], sp = { class: "coar-plain-date-picker-month-list-wrapper" }, cp = ["aria-label"], lp = { class: "coar-plain-date-picker-month-list-content" }, up = ["aria-selected", "onClick"], dp = {
|
|
10353
10413
|
key: 0,
|
|
10354
10414
|
class: "coar-plain-date-picker-events"
|
|
10355
|
-
},
|
|
10415
|
+
}, fp = { class: "coar-plain-date-picker-events-list" }, pp = { class: "coar-plain-date-picker-events-content" }, mp = { class: "coar-plain-date-picker-event-details" }, hp = { class: "coar-plain-date-picker-event-text" }, gp = {
|
|
10356
10416
|
key: 0,
|
|
10357
10417
|
class: "coar-plain-date-picker-event-dates"
|
|
10358
|
-
},
|
|
10418
|
+
}, _p = /* @__PURE__ */ d({
|
|
10359
10419
|
__name: "CoarPlainDatePickerPanel",
|
|
10360
10420
|
props: {
|
|
10361
10421
|
modelValue: {},
|
|
@@ -10398,7 +10458,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10398
10458
|
return n && r;
|
|
10399
10459
|
}) : [];
|
|
10400
10460
|
});
|
|
10401
|
-
return (n, r) => (w(), o("div", { class: y(["coar-plain-date-picker-panel", { "coar-plain-date-picker-panel--with-weeks": t.showWeekNumbers }]) }, [s("div",
|
|
10461
|
+
return (n, r) => (w(), o("div", { class: y(["coar-plain-date-picker-panel", { "coar-plain-date-picker-panel--with-weeks": t.showWeekNumbers }]) }, [s("div", ep, [u(Rf, {
|
|
10402
10462
|
"model-value": t.modelValue,
|
|
10403
10463
|
"active-month": t.activeMonth,
|
|
10404
10464
|
min: t.min ?? void 0,
|
|
@@ -10431,8 +10491,8 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10431
10491
|
}, [u(Z, {
|
|
10432
10492
|
name: h.value === "up" ? "chevron-up" : "chevron-down",
|
|
10433
10493
|
size: "xs"
|
|
10434
|
-
}, null, 8, ["name"])], 8,
|
|
10435
|
-
s("div",
|
|
10494
|
+
}, null, 8, ["name"])], 8, tp)) : a("", !0)]), s("div", np, [
|
|
10495
|
+
s("div", rp, [
|
|
10436
10496
|
s("button", {
|
|
10437
10497
|
type: "button",
|
|
10438
10498
|
class: "coar-plain-date-picker-year-btn",
|
|
@@ -10442,8 +10502,8 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10442
10502
|
}, [u(Z, {
|
|
10443
10503
|
name: "chevron-left",
|
|
10444
10504
|
size: "s"
|
|
10445
|
-
})], 8,
|
|
10446
|
-
s("span",
|
|
10505
|
+
})], 8, ip),
|
|
10506
|
+
s("span", ap, P(c.value), 1),
|
|
10447
10507
|
s("button", {
|
|
10448
10508
|
type: "button",
|
|
10449
10509
|
class: "coar-plain-date-picker-year-btn",
|
|
@@ -10453,31 +10513,31 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10453
10513
|
}, [u(Z, {
|
|
10454
10514
|
name: "chevron-right",
|
|
10455
10515
|
size: "s"
|
|
10456
|
-
})], 8,
|
|
10516
|
+
})], 8, op)
|
|
10457
10517
|
]),
|
|
10458
|
-
s("div",
|
|
10518
|
+
s("div", sp, [s("div", {
|
|
10459
10519
|
class: "coar-plain-date-picker-month-list",
|
|
10460
10520
|
role: "listbox",
|
|
10461
10521
|
"aria-label": L(i)("coar.ui.datePicker.months", void 0, "Months")
|
|
10462
|
-
}, [s("div",
|
|
10522
|
+
}, [s("div", lp, [(w(!0), o(e, null, k(p.value, (e) => (w(), o("button", {
|
|
10463
10523
|
key: e.month,
|
|
10464
10524
|
type: "button",
|
|
10465
10525
|
class: y(["coar-plain-date-picker-month-item", { "coar-plain-date-picker-month-item--active": e.isActive }]),
|
|
10466
10526
|
role: "option",
|
|
10467
10527
|
"aria-selected": e.isActive,
|
|
10468
10528
|
onClick: (n) => t.onSelectMonth(e.yearMonth)
|
|
10469
|
-
}, P(e.name), 11,
|
|
10470
|
-
_.value.length > 0 ? (w(), o("div",
|
|
10529
|
+
}, P(e.name), 11, up))), 128))])], 8, cp)]),
|
|
10530
|
+
_.value.length > 0 ? (w(), o("div", dp, [s("div", fp, [s("div", pp, [(w(!0), o(e, null, k(_.value, (e) => (w(), o("div", {
|
|
10471
10531
|
key: e.description,
|
|
10472
10532
|
class: "coar-plain-date-picker-event-item"
|
|
10473
|
-
}, [r[3] ||= s("span", { class: "coar-plain-date-picker-event-dot" }, null, -1), s("div",
|
|
10533
|
+
}, [r[3] ||= s("span", { class: "coar-plain-date-picker-event-dot" }, null, -1), s("div", mp, [s("span", hp, P(e.description), 1), e.endDate && !e.startDate.equals(e.endDate) ? (w(), o("span", gp, P(e.startDate.day) + "/" + P(e.startDate.month) + " – " + P(e.endDate.day) + "/" + P(e.endDate.month), 1)) : a("", !0)])]))), 128))])])])) : a("", !0)
|
|
10474
10534
|
])], 2));
|
|
10475
10535
|
}
|
|
10476
|
-
}),
|
|
10536
|
+
}), vp = {
|
|
10477
10537
|
key: 0,
|
|
10478
10538
|
class: "coar-plain-date-picker-required",
|
|
10479
10539
|
"aria-hidden": "true"
|
|
10480
|
-
},
|
|
10540
|
+
}, yp = ["aria-expanded", "aria-controls"], bp = ["aria-label"], xp = [
|
|
10481
10541
|
"value",
|
|
10482
10542
|
"placeholder",
|
|
10483
10543
|
"disabled",
|
|
@@ -10485,7 +10545,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10485
10545
|
"aria-labelledby",
|
|
10486
10546
|
"aria-invalid",
|
|
10487
10547
|
"aria-describedby"
|
|
10488
|
-
],
|
|
10548
|
+
], Sp = ["aria-label", "disabled"], Cp = ["title"], wp = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
10489
10549
|
__name: "CoarPlainDatePicker",
|
|
10490
10550
|
props: /* @__PURE__ */ g({
|
|
10491
10551
|
label: { default: "" },
|
|
@@ -10536,17 +10596,17 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10536
10596
|
}),
|
|
10537
10597
|
emits: /* @__PURE__ */ g(["opened", "closed"], ["update:modelValue"]),
|
|
10538
10598
|
setup(e, { emit: t }) {
|
|
10539
|
-
let n = e, i = z(e, "modelValue"), c = t, { t: d } = q(), f =
|
|
10599
|
+
let n = e, i = z(e, "modelValue"), c = t, { t: d } = q(), f = Yf({
|
|
10540
10600
|
locale: r(() => n.locale),
|
|
10541
10601
|
dateFormat: r(() => n.dateFormat)
|
|
10542
10602
|
}), p = O(i.value?.toPlainYearMonth() ?? Y.Now.plainDateISO().toPlainYearMonth()), m = `coar-plain-date-picker-${crypto.randomUUID?.() ?? Date.now().toString(16)}`, g = `${m}-label`, _ = `${m}-input`, b = `${m}-panel`, x = `${m}-message`, T = O(null), D = O(null), k = null, A = O(""), j;
|
|
10543
10603
|
function M() {
|
|
10544
10604
|
if (j?.destroy(), !D.value) return;
|
|
10545
|
-
let e =
|
|
10605
|
+
let e = Qf(f.effectiveDateFormat.value.pattern);
|
|
10546
10606
|
j = new ie(D.value, e);
|
|
10547
10607
|
}
|
|
10548
10608
|
U(i, (e) => {
|
|
10549
|
-
e ? A.value =
|
|
10609
|
+
e ? A.value = Sf(e, f.effectiveDateFormat.value.pattern) : A.value = "";
|
|
10550
10610
|
}, { immediate: !0 }), U([D, () => f.effectiveDateFormat.value], () => {
|
|
10551
10611
|
v(() => M());
|
|
10552
10612
|
}), S(() => {
|
|
@@ -10622,7 +10682,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10622
10682
|
},
|
|
10623
10683
|
content: {
|
|
10624
10684
|
kind: "component",
|
|
10625
|
-
component: h(
|
|
10685
|
+
component: h(_p)
|
|
10626
10686
|
},
|
|
10627
10687
|
inputs: t
|
|
10628
10688
|
}), f.open(), c("opened"), k.afterClosed.then(() => {
|
|
@@ -10647,7 +10707,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10647
10707
|
function ne(e) {
|
|
10648
10708
|
let t = e.target;
|
|
10649
10709
|
A.value = t.value;
|
|
10650
|
-
let r =
|
|
10710
|
+
let r = Cf(t.value, f.effectiveDateFormat.value.pattern, {
|
|
10651
10711
|
min: n.min,
|
|
10652
10712
|
max: n.max
|
|
10653
10713
|
});
|
|
@@ -10655,10 +10715,10 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10655
10715
|
}
|
|
10656
10716
|
function re() {
|
|
10657
10717
|
let e = A.value;
|
|
10658
|
-
!
|
|
10718
|
+
!Cf(e, f.effectiveDateFormat.value.pattern, {
|
|
10659
10719
|
min: n.min,
|
|
10660
10720
|
max: n.max
|
|
10661
|
-
}) && e.length > 0 && (i.value ? A.value =
|
|
10721
|
+
}) && e.length > 0 && (i.value ? A.value = Sf(i.value, f.effectiveDateFormat.value.pattern) : A.value = "");
|
|
10662
10722
|
}
|
|
10663
10723
|
return (t, n) => (w(), o("div", { class: y(["coar-plain-date-picker-wrapper", [`coar-plain-date-picker--${e.size}`, {
|
|
10664
10724
|
"coar-plain-date-picker--disabled": I.value,
|
|
@@ -10670,7 +10730,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10670
10730
|
key: 0,
|
|
10671
10731
|
id: g,
|
|
10672
10732
|
class: "coar-plain-date-picker-label"
|
|
10673
|
-
}, [l(P(e.label) + " ", 1), e.required ? (w(), o("span",
|
|
10733
|
+
}, [l(P(e.label) + " ", 1), e.required ? (w(), o("span", vp, "*")) : a("", !0)])) : a("", !0),
|
|
10674
10734
|
s("div", {
|
|
10675
10735
|
ref_key: "triggerRef",
|
|
10676
10736
|
ref: T,
|
|
@@ -10694,7 +10754,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10694
10754
|
}, [u(Z, {
|
|
10695
10755
|
name: "x",
|
|
10696
10756
|
size: "auto"
|
|
10697
|
-
})], 10,
|
|
10757
|
+
})], 10, bp),
|
|
10698
10758
|
s("input", {
|
|
10699
10759
|
id: _,
|
|
10700
10760
|
ref_key: "dateInputRef",
|
|
@@ -10712,7 +10772,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10712
10772
|
onInput: ne,
|
|
10713
10773
|
onBlur: re,
|
|
10714
10774
|
onKeydown: te
|
|
10715
|
-
}, null, 40,
|
|
10775
|
+
}, null, 40, xp),
|
|
10716
10776
|
s("button", {
|
|
10717
10777
|
type: "button",
|
|
10718
10778
|
class: "coar-plain-date-picker-btn",
|
|
@@ -10723,23 +10783,23 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10723
10783
|
}, [u(Z, {
|
|
10724
10784
|
name: "calendar",
|
|
10725
10785
|
size: "s"
|
|
10726
|
-
})], 8,
|
|
10727
|
-
], 10,
|
|
10786
|
+
})], 8, Sp)
|
|
10787
|
+
], 10, yp),
|
|
10728
10788
|
F.value ? (w(), o("div", {
|
|
10729
10789
|
key: 1,
|
|
10730
10790
|
id: x,
|
|
10731
10791
|
class: y(["coar-form-field-message", { "coar-form-field-message--error": N.value }]),
|
|
10732
10792
|
title: F.value
|
|
10733
|
-
}, P(F.value), 11,
|
|
10793
|
+
}, P(F.value), 11, Cp)) : a("", !0)
|
|
10734
10794
|
], 2));
|
|
10735
10795
|
}
|
|
10736
|
-
}), [["__scopeId", "data-v-49bcfd20"]]),
|
|
10796
|
+
}), [["__scopeId", "data-v-49bcfd20"]]), Tp = { class: "coar-pdtp-calendar-column" }, Ep = ["aria-label"], Dp = { class: "coar-pdtp-side-column" }, Op = { class: "coar-pdtp-year-stepper" }, kp = ["disabled", "aria-label"], Ap = { class: "coar-pdtp-year" }, jp = ["disabled", "aria-label"], Mp = { class: "coar-pdtp-month-list-wrapper" }, Np = ["aria-label"], Pp = { class: "coar-pdtp-month-list-content" }, Fp = ["aria-selected", "onClick"], Ip = { class: "coar-pdtp-time-section" }, Lp = {
|
|
10737
10797
|
key: 0,
|
|
10738
10798
|
class: "coar-pdtp-events"
|
|
10739
|
-
},
|
|
10799
|
+
}, Rp = { class: "coar-pdtp-events-list" }, zp = { class: "coar-pdtp-events-content" }, Bp = { class: "coar-pdtp-event-details" }, Vp = { class: "coar-pdtp-event-text" }, Hp = {
|
|
10740
10800
|
key: 0,
|
|
10741
10801
|
class: "coar-pdtp-event-dates"
|
|
10742
|
-
},
|
|
10802
|
+
}, Up = /* @__PURE__ */ d({
|
|
10743
10803
|
__name: "CoarPlainDateTimePickerPanel",
|
|
10744
10804
|
props: {
|
|
10745
10805
|
modelValue: {},
|
|
@@ -10790,7 +10850,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10790
10850
|
return n && r;
|
|
10791
10851
|
}) : [];
|
|
10792
10852
|
});
|
|
10793
|
-
return (n, r) => (w(), o("div", { class: y(["coar-pdtp-panel", { "coar-pdtp-panel--with-weeks": t.showWeekNumbers }]) }, [s("div",
|
|
10853
|
+
return (n, r) => (w(), o("div", { class: y(["coar-pdtp-panel", { "coar-pdtp-panel--with-weeks": t.showWeekNumbers }]) }, [s("div", Tp, [u(Rf, {
|
|
10794
10854
|
"model-value": t.modelValue,
|
|
10795
10855
|
"active-month": t.activeMonth,
|
|
10796
10856
|
min: t.min ?? void 0,
|
|
@@ -10823,8 +10883,8 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10823
10883
|
}, [u(Z, {
|
|
10824
10884
|
name: h.value === "up" ? "chevron-up" : "chevron-down",
|
|
10825
10885
|
size: "xs"
|
|
10826
|
-
}, null, 8, ["name"])], 8,
|
|
10827
|
-
s("div",
|
|
10886
|
+
}, null, 8, ["name"])], 8, Ep)) : a("", !0)]), s("div", Dp, [
|
|
10887
|
+
s("div", Op, [
|
|
10828
10888
|
s("button", {
|
|
10829
10889
|
type: "button",
|
|
10830
10890
|
class: "coar-pdtp-year-btn",
|
|
@@ -10834,8 +10894,8 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10834
10894
|
}, [u(Z, {
|
|
10835
10895
|
name: "chevron-left",
|
|
10836
10896
|
size: "s"
|
|
10837
|
-
})], 8,
|
|
10838
|
-
s("span",
|
|
10897
|
+
})], 8, kp),
|
|
10898
|
+
s("span", Ap, P(c.value), 1),
|
|
10839
10899
|
s("button", {
|
|
10840
10900
|
type: "button",
|
|
10841
10901
|
class: "coar-pdtp-year-btn",
|
|
@@ -10845,21 +10905,21 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10845
10905
|
}, [u(Z, {
|
|
10846
10906
|
name: "chevron-right",
|
|
10847
10907
|
size: "s"
|
|
10848
|
-
})], 8,
|
|
10908
|
+
})], 8, jp)
|
|
10849
10909
|
]),
|
|
10850
|
-
s("div",
|
|
10910
|
+
s("div", Mp, [s("div", {
|
|
10851
10911
|
class: "coar-pdtp-month-list",
|
|
10852
10912
|
role: "listbox",
|
|
10853
10913
|
"aria-label": L(i)("coar.ui.datePicker.months", void 0, "Months")
|
|
10854
|
-
}, [s("div",
|
|
10914
|
+
}, [s("div", Pp, [(w(!0), o(e, null, k(p.value, (e) => (w(), o("button", {
|
|
10855
10915
|
key: e.month,
|
|
10856
10916
|
type: "button",
|
|
10857
10917
|
class: y(["coar-pdtp-month-item", { "coar-pdtp-month-item--active": e.isActive }]),
|
|
10858
10918
|
role: "option",
|
|
10859
10919
|
"aria-selected": e.isActive,
|
|
10860
10920
|
onClick: (n) => t.onSelectMonth(e.yearMonth)
|
|
10861
|
-
}, P(e.name), 11,
|
|
10862
|
-
s("div",
|
|
10921
|
+
}, P(e.name), 11, Fp))), 128))])], 8, Np)]),
|
|
10922
|
+
s("div", Ip, [u(_f, {
|
|
10863
10923
|
"model-value": t.selectedTime,
|
|
10864
10924
|
"use24-hour": t.use24Hour,
|
|
10865
10925
|
"minute-step": t.minuteStep,
|
|
@@ -10881,17 +10941,17 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10881
10941
|
"max-time",
|
|
10882
10942
|
"onUpdate:modelValue"
|
|
10883
10943
|
])]),
|
|
10884
|
-
_.value.length > 0 ? (w(), o("div",
|
|
10944
|
+
_.value.length > 0 ? (w(), o("div", Lp, [s("div", Rp, [s("div", zp, [(w(!0), o(e, null, k(_.value, (e) => (w(), o("div", {
|
|
10885
10945
|
key: e.description,
|
|
10886
10946
|
class: "coar-pdtp-event-item"
|
|
10887
|
-
}, [r[3] ||= s("span", { class: "coar-pdtp-event-dot" }, null, -1), s("div",
|
|
10947
|
+
}, [r[3] ||= s("span", { class: "coar-pdtp-event-dot" }, null, -1), s("div", Bp, [s("span", Vp, P(e.description), 1), e.endDate && !e.startDate.equals(e.endDate) ? (w(), o("span", Hp, P(e.startDate.day) + "/" + P(e.startDate.month) + " – " + P(e.endDate.day) + "/" + P(e.endDate.month), 1)) : a("", !0)])]))), 128))])])])) : a("", !0)
|
|
10888
10948
|
])], 2));
|
|
10889
10949
|
}
|
|
10890
|
-
}),
|
|
10950
|
+
}), Wp = {
|
|
10891
10951
|
key: 0,
|
|
10892
10952
|
class: "coar-pdtp-required",
|
|
10893
10953
|
"aria-hidden": "true"
|
|
10894
|
-
},
|
|
10954
|
+
}, Gp = ["aria-expanded", "aria-controls"], Kp = ["aria-label"], qp = [
|
|
10895
10955
|
"value",
|
|
10896
10956
|
"placeholder",
|
|
10897
10957
|
"disabled",
|
|
@@ -10899,7 +10959,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10899
10959
|
"aria-labelledby",
|
|
10900
10960
|
"aria-invalid",
|
|
10901
10961
|
"aria-describedby"
|
|
10902
|
-
],
|
|
10962
|
+
], Jp = ["aria-label", "disabled"], Yp = ["title"], Xp = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
10903
10963
|
__name: "CoarPlainDateTimePicker",
|
|
10904
10964
|
props: /* @__PURE__ */ g({
|
|
10905
10965
|
label: { default: "" },
|
|
@@ -10955,17 +11015,17 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
10955
11015
|
}),
|
|
10956
11016
|
emits: /* @__PURE__ */ g(["opened", "closed"], ["update:modelValue"]),
|
|
10957
11017
|
setup(e, { emit: t }) {
|
|
10958
|
-
let n = e, i = z(e, "modelValue"), c = t, { t: d } = q(), f =
|
|
11018
|
+
let n = e, i = z(e, "modelValue"), c = t, { t: d } = q(), f = Yf({
|
|
10959
11019
|
locale: r(() => n.locale),
|
|
10960
11020
|
dateFormat: r(() => n.dateFormat)
|
|
10961
|
-
}), p = O(i.value?.toPlainDate().toPlainYearMonth() ?? Y.Now.plainDateISO().toPlainYearMonth()), m = O(null), g = `coar-plain-dt-picker-${crypto.randomUUID?.() ?? Date.now().toString(16)}`, _ = `${g}-label`, b = `${g}-input`, x = `${g}-panel`, T = `${g}-message`, D = O(null), k = O(null), A = null, j = O(""), M = r(() => n.use24Hour === !0 ? !0 : n.use24Hour === !1 ? !1 : !
|
|
11021
|
+
}), p = O(i.value?.toPlainDate().toPlainYearMonth() ?? Y.Now.plainDateISO().toPlainYearMonth()), m = O(null), g = `coar-plain-dt-picker-${crypto.randomUUID?.() ?? Date.now().toString(16)}`, _ = `${g}-label`, b = `${g}-input`, x = `${g}-panel`, T = `${g}-message`, D = O(null), k = O(null), A = null, j = O(""), M = r(() => n.use24Hour === !0 ? !0 : n.use24Hour === !1 ? !1 : !Yd(f.effectiveLocale.value)), N;
|
|
10962
11022
|
function F() {
|
|
10963
11023
|
if (N?.destroy(), !k.value) return;
|
|
10964
|
-
let e =
|
|
11024
|
+
let e = $f(f.effectiveDateFormat.value.pattern, !M.value);
|
|
10965
11025
|
N = new ie(k.value, e);
|
|
10966
11026
|
}
|
|
10967
11027
|
function I(e) {
|
|
10968
|
-
return `${
|
|
11028
|
+
return `${Sf(e.toPlainDate(), f.effectiveDateFormat.value.pattern)} ${Xd(e.hour, e.minute, M.value)}`;
|
|
10969
11029
|
}
|
|
10970
11030
|
U(i, (e) => {
|
|
10971
11031
|
j.value = e ? I(e) : "";
|
|
@@ -11017,7 +11077,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
11017
11077
|
onDateSelected: (e) => {
|
|
11018
11078
|
let t = K.value ?? n.defaultTime, r = e.toPlainDateTime({
|
|
11019
11079
|
hour: t.hours,
|
|
11020
|
-
minute:
|
|
11080
|
+
minute: nf(t.minutes, n.minuteStep)
|
|
11021
11081
|
});
|
|
11022
11082
|
r = se(r), i.value = r;
|
|
11023
11083
|
},
|
|
@@ -11094,7 +11154,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
11094
11154
|
},
|
|
11095
11155
|
content: {
|
|
11096
11156
|
kind: "component",
|
|
11097
|
-
component: h(
|
|
11157
|
+
component: h(Up)
|
|
11098
11158
|
},
|
|
11099
11159
|
inputs: t
|
|
11100
11160
|
}), f.open(), c("opened"), A.afterClosed.then(() => {
|
|
@@ -11130,12 +11190,12 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
11130
11190
|
if (!e) return null;
|
|
11131
11191
|
let t = e.split(" ");
|
|
11132
11192
|
if (t.length < 2) return null;
|
|
11133
|
-
let n =
|
|
11193
|
+
let n = Cf(t[0], f.effectiveDateFormat.value.pattern, {
|
|
11134
11194
|
min: ee.value,
|
|
11135
11195
|
max: te.value
|
|
11136
11196
|
});
|
|
11137
11197
|
if (!n) return null;
|
|
11138
|
-
let r =
|
|
11198
|
+
let r = Zd(t.slice(1).join(" "));
|
|
11139
11199
|
return r ? n.toPlainDateTime({
|
|
11140
11200
|
hour: r.hours,
|
|
11141
11201
|
minute: r.minutes
|
|
@@ -11151,7 +11211,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
11151
11211
|
key: 0,
|
|
11152
11212
|
id: _,
|
|
11153
11213
|
class: "coar-pdtp-label"
|
|
11154
|
-
}, [l(P(e.label) + " ", 1), e.required ? (w(), o("span",
|
|
11214
|
+
}, [l(P(e.label) + " ", 1), e.required ? (w(), o("span", Wp, "*")) : a("", !0)])) : a("", !0),
|
|
11155
11215
|
s("div", {
|
|
11156
11216
|
ref_key: "triggerRef",
|
|
11157
11217
|
ref: D,
|
|
@@ -11175,7 +11235,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
11175
11235
|
}, [u(Z, {
|
|
11176
11236
|
name: "x",
|
|
11177
11237
|
size: "auto"
|
|
11178
|
-
})], 10,
|
|
11238
|
+
})], 10, Kp),
|
|
11179
11239
|
s("input", {
|
|
11180
11240
|
id: b,
|
|
11181
11241
|
ref_key: "dateInputRef",
|
|
@@ -11193,7 +11253,7 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
11193
11253
|
onInput: pe,
|
|
11194
11254
|
onBlur: me,
|
|
11195
11255
|
onKeydown: de
|
|
11196
|
-
}, null, 40,
|
|
11256
|
+
}, null, 40, qp),
|
|
11197
11257
|
s("button", {
|
|
11198
11258
|
type: "button",
|
|
11199
11259
|
class: "coar-pdtp-btn",
|
|
@@ -11204,32 +11264,32 @@ var Qf = { class: "coar-plain-date-picker-calendar-column" }, $f = ["aria-label"
|
|
|
11204
11264
|
}, [u(Z, {
|
|
11205
11265
|
name: "calendar",
|
|
11206
11266
|
size: "s"
|
|
11207
|
-
})], 8,
|
|
11208
|
-
], 10,
|
|
11267
|
+
})], 8, Jp)
|
|
11268
|
+
], 10, Gp),
|
|
11209
11269
|
B.value ? (w(), o("div", {
|
|
11210
11270
|
key: 1,
|
|
11211
11271
|
id: T,
|
|
11212
11272
|
class: y(["coar-form-field-message", { "coar-form-field-message--error": R.value }]),
|
|
11213
11273
|
title: B.value
|
|
11214
|
-
}, P(B.value), 11,
|
|
11274
|
+
}, P(B.value), 11, Yp)) : a("", !0)
|
|
11215
11275
|
], 2));
|
|
11216
11276
|
}
|
|
11217
11277
|
}), [["__scopeId", "data-v-a4951fe2"]]);
|
|
11218
11278
|
//#endregion
|
|
11219
11279
|
//#region src/components/date-time/_shared/timezone-helpers.ts
|
|
11220
|
-
function
|
|
11280
|
+
function Zp() {
|
|
11221
11281
|
try {
|
|
11222
11282
|
return ["UTC", ...Intl.supportedValuesOf("timeZone")];
|
|
11223
11283
|
} catch {
|
|
11224
11284
|
return ["UTC"];
|
|
11225
11285
|
}
|
|
11226
11286
|
}
|
|
11227
|
-
function
|
|
11287
|
+
function Qp(e, t) {
|
|
11228
11288
|
let n = t ?? Y.Now.instant();
|
|
11229
11289
|
try {
|
|
11230
11290
|
let t = n.toZonedDateTimeISO(e).offsetNanoseconds, r = Math.round(t / 6e10);
|
|
11231
11291
|
return {
|
|
11232
|
-
offset:
|
|
11292
|
+
offset: $p(r),
|
|
11233
11293
|
offsetMinutes: r
|
|
11234
11294
|
};
|
|
11235
11295
|
} catch {
|
|
@@ -11239,21 +11299,21 @@ function Xp(e, t) {
|
|
|
11239
11299
|
};
|
|
11240
11300
|
}
|
|
11241
11301
|
}
|
|
11242
|
-
function
|
|
11302
|
+
function $p(e) {
|
|
11243
11303
|
if (e === 0) return "UTC";
|
|
11244
11304
|
let t = e >= 0 ? "+" : "-", n = Math.abs(e), r = Math.floor(n / 60), i = n % 60;
|
|
11245
11305
|
return i === 0 ? `UTC${t}${r}` : `UTC${t}${r}:${String(i).padStart(2, "0")}`;
|
|
11246
11306
|
}
|
|
11247
|
-
function
|
|
11307
|
+
function em(e) {
|
|
11248
11308
|
if (e === "UTC") return "UTC";
|
|
11249
11309
|
let t = e.split("/");
|
|
11250
11310
|
return t[t.length - 1].replace(/_/g, " ");
|
|
11251
11311
|
}
|
|
11252
|
-
function
|
|
11253
|
-
let n =
|
|
11312
|
+
function tm(e, t) {
|
|
11313
|
+
let n = em(e), { offset: r } = Qp(e, t);
|
|
11254
11314
|
return `${n} (${r})`;
|
|
11255
11315
|
}
|
|
11256
|
-
function
|
|
11316
|
+
function nm(e, t) {
|
|
11257
11317
|
if (!t || t.length === 0) return e;
|
|
11258
11318
|
let n = t.map((e) => {
|
|
11259
11319
|
let t = e.replace(/[.+?^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*");
|
|
@@ -11261,19 +11321,19 @@ function em(e, t) {
|
|
|
11261
11321
|
});
|
|
11262
11322
|
return e.filter((e) => n.some((t) => t.test(e)));
|
|
11263
11323
|
}
|
|
11264
|
-
function
|
|
11265
|
-
let { offset: n, offsetMinutes: r } =
|
|
11324
|
+
function rm(e, t) {
|
|
11325
|
+
let { offset: n, offsetMinutes: r } = Qp(e, t);
|
|
11266
11326
|
return {
|
|
11267
11327
|
id: e,
|
|
11268
|
-
city:
|
|
11328
|
+
city: em(e),
|
|
11269
11329
|
offset: n,
|
|
11270
11330
|
offsetMinutes: r
|
|
11271
11331
|
};
|
|
11272
11332
|
}
|
|
11273
|
-
function
|
|
11333
|
+
function im(e, t, n) {
|
|
11274
11334
|
let r = t?.trim().toLowerCase(), i = /* @__PURE__ */ new Map();
|
|
11275
11335
|
for (let t of e) {
|
|
11276
|
-
let e =
|
|
11336
|
+
let e = rm(t, n);
|
|
11277
11337
|
if (r && r.length > 0) {
|
|
11278
11338
|
let n = e.city.toLowerCase().includes(r), i = t.toLowerCase().includes(r);
|
|
11279
11339
|
if (!n && !i) continue;
|
|
@@ -11293,25 +11353,25 @@ function nm(e, t, n) {
|
|
|
11293
11353
|
}
|
|
11294
11354
|
//#endregion
|
|
11295
11355
|
//#region src/components/date-time/zoned-date-time-picker/CoarZonedDateTimePickerPanel.vue?vue&type=script&setup=true&lang.ts
|
|
11296
|
-
var
|
|
11356
|
+
var am = { class: "coar-zdtp-body" }, om = { class: "coar-zdtp-calendar-column" }, sm = ["aria-label"], cm = { class: "coar-zdtp-side-column" }, lm = {
|
|
11297
11357
|
key: 0,
|
|
11298
11358
|
class: "coar-zdtp-side-header"
|
|
11299
|
-
},
|
|
11359
|
+
}, um = ["disabled", "aria-label"], dm = { class: "coar-zdtp-year" }, fm = ["disabled", "aria-label"], pm = {
|
|
11300
11360
|
key: 1,
|
|
11301
11361
|
class: "coar-zdtp-side-header coar-zdtp-side-header--search"
|
|
11302
|
-
},
|
|
11362
|
+
}, mm = ["placeholder", "onKeydown"], hm = ["aria-label"], gm = { class: "coar-zdtp-tz-group-header" }, _m = ["onClick"], vm = { class: "coar-zdtp-tz-picker-item-city" }, ym = { class: "coar-zdtp-tz-picker-item-offset" }, bm = ["aria-label"], xm = ["aria-selected", "onClick"], Sm = { class: "coar-zdtp-time-section" }, Cm = { class: "coar-zdtp-display-tz-label" }, wm = { class: "coar-zdtp-display-tz-btn-label" }, Tm = {
|
|
11303
11363
|
key: 0,
|
|
11304
11364
|
class: "coar-zdtp-events"
|
|
11305
|
-
},
|
|
11365
|
+
}, Em = {
|
|
11306
11366
|
key: 0,
|
|
11307
11367
|
class: "coar-zdtp-footer-placeholder"
|
|
11308
|
-
},
|
|
11368
|
+
}, Dm = {
|
|
11309
11369
|
key: 1,
|
|
11310
11370
|
class: "coar-zdtp-footer-edit"
|
|
11311
|
-
},
|
|
11371
|
+
}, Om = ["aria-label"], km = {
|
|
11312
11372
|
key: 2,
|
|
11313
11373
|
class: "coar-zdtp-footer-display"
|
|
11314
|
-
},
|
|
11374
|
+
}, Am = { class: "coar-zdtp-footer-tz-name" }, jm = { class: "coar-zdtp-footer-tz-value" }, Mm = ["aria-label"], Nm = /* @__PURE__ */ d({
|
|
11315
11375
|
__name: "CoarZonedDateTimePickerPanel",
|
|
11316
11376
|
props: {
|
|
11317
11377
|
modelValue: {},
|
|
@@ -11369,9 +11429,9 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11369
11429
|
let n = Y.PlainDate.compare(e, t.startDate) >= 0, r = t.endDate ? Y.PlainDate.compare(e, t.endDate) <= 0 : Y.PlainDate.compare(e, t.startDate) === 0;
|
|
11370
11430
|
return n && r;
|
|
11371
11431
|
}) : [];
|
|
11372
|
-
}), E = r(() =>
|
|
11432
|
+
}), E = r(() => nm(n.allTimezones, n.timezoneFilter)), D = r(() => im(E.value, d.value)), A = r(() => E.value.map((e) => ({
|
|
11373
11433
|
value: e,
|
|
11374
|
-
label:
|
|
11434
|
+
label: tm(e)
|
|
11375
11435
|
})));
|
|
11376
11436
|
function j() {
|
|
11377
11437
|
c.value = !0, d.value = "", v(() => {
|
|
@@ -11398,7 +11458,7 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11398
11458
|
function R() {
|
|
11399
11459
|
l.value = !1;
|
|
11400
11460
|
}
|
|
11401
|
-
return (n, r) => (w(), o("div", { class: y(["coar-zdtp-panel", { "coar-zdtp-panel--with-weeks": t.showWeekNumbers }]) }, [s("div",
|
|
11461
|
+
return (n, r) => (w(), o("div", { class: y(["coar-zdtp-panel", { "coar-zdtp-panel--with-weeks": t.showWeekNumbers }]) }, [s("div", am, [s("div", om, [u(Rf, {
|
|
11402
11462
|
"model-value": t.modelValue,
|
|
11403
11463
|
"active-month": t.activeMonth,
|
|
11404
11464
|
min: t.min ?? void 0,
|
|
@@ -11431,8 +11491,8 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11431
11491
|
}, [u(Z, {
|
|
11432
11492
|
name: S.value === "up" ? "chevron-up" : "chevron-down",
|
|
11433
11493
|
size: "xs"
|
|
11434
|
-
}, null, 8, ["name"])], 8,
|
|
11435
|
-
c.value ? (w(), o("div",
|
|
11494
|
+
}, null, 8, ["name"])], 8, sm)) : a("", !0)]), s("div", cm, [
|
|
11495
|
+
c.value ? (w(), o("div", pm, [K(s("input", {
|
|
11436
11496
|
ref_key: "tzSearchInputRef",
|
|
11437
11497
|
ref: f,
|
|
11438
11498
|
"onUpdate:modelValue": r[3] ||= (e) => d.value = e,
|
|
@@ -11440,7 +11500,7 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11440
11500
|
class: "coar-zdtp-tz-search-input",
|
|
11441
11501
|
placeholder: L(i)("coar.ui.zonedDateTimePicker.searchTimezone", void 0, "Search timezone..."),
|
|
11442
11502
|
onKeydown: ee(te(M, ["stop"]), ["escape"])
|
|
11443
|
-
}, null, 40,
|
|
11503
|
+
}, null, 40, mm), [[H, d.value]]), s("button", {
|
|
11444
11504
|
type: "button",
|
|
11445
11505
|
class: "coar-zdtp-tz-search-close",
|
|
11446
11506
|
"aria-label": L(i)("coar.ui.zonedDateTimePicker.closeTimezoneSearch", void 0, "Close timezone search"),
|
|
@@ -11448,7 +11508,7 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11448
11508
|
}, [u(Z, {
|
|
11449
11509
|
name: "x",
|
|
11450
11510
|
size: "xs"
|
|
11451
|
-
})], 8,
|
|
11511
|
+
})], 8, hm)])) : (w(), o("div", lm, [
|
|
11452
11512
|
s("button", {
|
|
11453
11513
|
type: "button",
|
|
11454
11514
|
class: "coar-zdtp-year-btn",
|
|
@@ -11458,8 +11518,8 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11458
11518
|
}, [u(Z, {
|
|
11459
11519
|
name: "chevron-left",
|
|
11460
11520
|
size: "s"
|
|
11461
|
-
})], 8,
|
|
11462
|
-
s("span",
|
|
11521
|
+
})], 8, um),
|
|
11522
|
+
s("span", dm, P(m.value), 1),
|
|
11463
11523
|
s("button", {
|
|
11464
11524
|
type: "button",
|
|
11465
11525
|
class: "coar-zdtp-year-btn",
|
|
@@ -11469,7 +11529,7 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11469
11529
|
}, [u(Z, {
|
|
11470
11530
|
name: "chevron-right",
|
|
11471
11531
|
size: "s"
|
|
11472
|
-
})], 8,
|
|
11532
|
+
})], 8, fm)
|
|
11473
11533
|
])),
|
|
11474
11534
|
c.value ? K((w(), o("div", {
|
|
11475
11535
|
key: 2,
|
|
@@ -11479,12 +11539,12 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11479
11539
|
}, [(w(!0), o(e, null, k(D.value, (n) => (w(), o("div", {
|
|
11480
11540
|
key: n.name,
|
|
11481
11541
|
class: "coar-zdtp-tz-group"
|
|
11482
|
-
}, [s("div",
|
|
11542
|
+
}, [s("div", gm, P(n.name), 1), (w(!0), o(e, null, k(n.items, (e) => (w(), o("button", {
|
|
11483
11543
|
key: e.id,
|
|
11484
11544
|
type: "button",
|
|
11485
11545
|
class: y(["coar-zdtp-tz-picker-item", { "coar-zdtp-tz-picker-item--active": e.id === t.effectiveDisplayTimeZone }]),
|
|
11486
11546
|
onClick: (t) => N(e.id)
|
|
11487
|
-
}, [s("span",
|
|
11547
|
+
}, [s("span", vm, P(e.city), 1), s("span", ym, P(e.offset), 1)], 10, _m))), 128))]))), 128))])), [[L(Fs), {
|
|
11488
11548
|
overflowX: "hidden",
|
|
11489
11549
|
autoHide: "leave"
|
|
11490
11550
|
}]]) : a("", !0),
|
|
@@ -11500,8 +11560,8 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11500
11560
|
role: "option",
|
|
11501
11561
|
"aria-selected": e.isActive,
|
|
11502
11562
|
onClick: (n) => t.onSelectMonth(e.yearMonth)
|
|
11503
|
-
}, P(e.name), 11,
|
|
11504
|
-
s("div",
|
|
11563
|
+
}, P(e.name), 11, xm))), 128))], 8, bm),
|
|
11564
|
+
s("div", Sm, [u(_f, {
|
|
11505
11565
|
"model-value": t.selectedTime ?? void 0,
|
|
11506
11566
|
"use24-hour": t.use24Hour,
|
|
11507
11567
|
"minute-step": t.minuteStep,
|
|
@@ -11517,16 +11577,16 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11517
11577
|
"max",
|
|
11518
11578
|
"onUpdate:modelValue"
|
|
11519
11579
|
])]),
|
|
11520
|
-
s("div",
|
|
11580
|
+
s("div", Cm, P(L(i)("coar.ui.zonedDateTimePicker.displayTimezone", void 0, "Display Timezone")), 1),
|
|
11521
11581
|
s("button", {
|
|
11522
11582
|
type: "button",
|
|
11523
11583
|
class: "coar-zdtp-display-tz-btn",
|
|
11524
11584
|
onClick: j
|
|
11525
|
-
}, [s("span",
|
|
11585
|
+
}, [s("span", wm, P(L(tm)(t.effectiveDisplayTimeZone)), 1), u(Z, {
|
|
11526
11586
|
name: "chevron-down",
|
|
11527
11587
|
size: "xs"
|
|
11528
11588
|
})]),
|
|
11529
|
-
T.value.length > 0 ? K((w(), o("div",
|
|
11589
|
+
T.value.length > 0 ? K((w(), o("div", Tm, [(w(!0), o(e, null, k(T.value, (e, t) => (w(), o("div", {
|
|
11530
11590
|
key: t,
|
|
11531
11591
|
class: y(["coar-zdtp-event-item", e.cssClass])
|
|
11532
11592
|
}, P(e.description), 3))), 128))])), [[L(Fs), {
|
|
@@ -11534,7 +11594,7 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11534
11594
|
autoHide: "leave"
|
|
11535
11595
|
}]]) : a("", !0)
|
|
11536
11596
|
], 64))
|
|
11537
|
-
])]), s("div", { class: y(["coar-zdtp-footer", { "coar-zdtp-footer--differs": t.timeZonesDiffer }]) }, [t.hasValue ? l.value ? (w(), o("div",
|
|
11597
|
+
])]), s("div", { class: y(["coar-zdtp-footer", { "coar-zdtp-footer--differs": t.timeZonesDiffer }]) }, [t.hasValue ? l.value ? (w(), o("div", Dm, [u(Js, {
|
|
11538
11598
|
"model-value": t.valueTimeZone,
|
|
11539
11599
|
options: A.value,
|
|
11540
11600
|
appearance: "inline",
|
|
@@ -11555,14 +11615,14 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11555
11615
|
}, [u(Z, {
|
|
11556
11616
|
name: "x",
|
|
11557
11617
|
size: "xs"
|
|
11558
|
-
})], 8,
|
|
11618
|
+
})], 8, Om)])) : (w(), o("div", km, [
|
|
11559
11619
|
u(Z, {
|
|
11560
11620
|
name: "map-pin",
|
|
11561
11621
|
size: "xs",
|
|
11562
11622
|
class: "coar-zdtp-footer-icon"
|
|
11563
11623
|
}),
|
|
11564
|
-
s("span",
|
|
11565
|
-
s("span",
|
|
11624
|
+
s("span", Am, P(t.valueTimeZoneLabel), 1),
|
|
11625
|
+
s("span", jm, P(t.formatValueInValueTz), 1),
|
|
11566
11626
|
s("button", {
|
|
11567
11627
|
type: "button",
|
|
11568
11628
|
class: "coar-zdtp-footer-lock",
|
|
@@ -11571,28 +11631,28 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11571
11631
|
}, [u(Z, {
|
|
11572
11632
|
name: "settings",
|
|
11573
11633
|
size: "xs"
|
|
11574
|
-
})], 8,
|
|
11575
|
-
])) : (w(), o("span",
|
|
11634
|
+
})], 8, Mm)
|
|
11635
|
+
])) : (w(), o("span", Em, [u(Z, {
|
|
11576
11636
|
name: "map-pin",
|
|
11577
11637
|
size: "xs"
|
|
11578
11638
|
}), s("span", null, P(L(i)("coar.ui.zonedDateTimePicker.eventTimezone", void 0, "Event timezone")), 1)]))], 2)], 2));
|
|
11579
11639
|
}
|
|
11580
|
-
}),
|
|
11640
|
+
}), Pm = {
|
|
11581
11641
|
key: 0,
|
|
11582
11642
|
class: "coar-zdtp-required",
|
|
11583
11643
|
"aria-hidden": "true"
|
|
11584
|
-
},
|
|
11644
|
+
}, Fm = [
|
|
11585
11645
|
"aria-expanded",
|
|
11586
11646
|
"aria-controls",
|
|
11587
11647
|
"aria-labelledby",
|
|
11588
11648
|
"aria-invalid"
|
|
11589
|
-
],
|
|
11649
|
+
], Im = ["aria-label", "disabled"], Lm = [
|
|
11590
11650
|
"placeholder",
|
|
11591
11651
|
"value",
|
|
11592
11652
|
"disabled",
|
|
11593
11653
|
"readonly",
|
|
11594
11654
|
"aria-describedby"
|
|
11595
|
-
],
|
|
11655
|
+
], Rm = ["title"], zm = ["aria-label", "disabled"], Bm = ["disabled", "aria-label"], Vm = /* @__PURE__ */ X(/* @__PURE__ */ d({
|
|
11596
11656
|
__name: "CoarZonedDateTimePicker",
|
|
11597
11657
|
props: /* @__PURE__ */ g({
|
|
11598
11658
|
label: { default: "" },
|
|
@@ -11650,34 +11710,34 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11650
11710
|
}),
|
|
11651
11711
|
emits: /* @__PURE__ */ g(["opened", "closed"], ["update:modelValue"]),
|
|
11652
11712
|
setup(e, { emit: t }) {
|
|
11653
|
-
let n = e, i = z(e, "modelValue"), c = t, { t: d } = q(), f =
|
|
11713
|
+
let n = e, i = z(e, "modelValue"), c = t, { t: d } = q(), f = Yf({
|
|
11654
11714
|
locale: r(() => n.locale),
|
|
11655
11715
|
dateFormat: r(() => n.dateFormat)
|
|
11656
11716
|
}), p = O(i.value?.toPlainDateTime().toPlainDate().toPlainYearMonth() ?? Y.Now.plainDateISO().toPlainYearMonth()), m = O(null), g = O(null), _ = `coar-zdtp-${crypto.randomUUID?.() ?? Date.now().toString(16)}`, b = `${_}-label`, x = `${_}-input`, T = `${_}-panel`, D = `${_}-message`, k = O(null), A = O(null), j = null, M = O(""), N = r(() => f.timezone.value || Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC"), F = r(() => i.value?.timeZoneId ?? null), I = r(() => g.value ?? N.value), R = r(() => n.timeZone ?? N.value), B = r(() => F.value != null && F.value !== N.value), V = r(() => F.value != null && I.value !== F.value), H = r(() => {
|
|
11657
11717
|
let e = I.value, t = N.value, n = F.value;
|
|
11658
11718
|
return e === t ? "home" : n && e === n ? "location" : "world";
|
|
11659
|
-
}), W = r(() => B.value || H.value !== "home"), G = r(() =>
|
|
11719
|
+
}), W = r(() => B.value || H.value !== "home"), G = r(() => tm(I.value)), K = r(() => {
|
|
11660
11720
|
let e = F.value;
|
|
11661
|
-
return e ?
|
|
11662
|
-
}), ee =
|
|
11721
|
+
return e ? tm(e) : "";
|
|
11722
|
+
}), ee = Zp(), J = r(() => n.use24Hour === !0 ? !0 : n.use24Hour === !1 ? !1 : !Yd(f.effectiveLocale.value)), ne;
|
|
11663
11723
|
function re() {
|
|
11664
11724
|
if (ne?.destroy(), !A.value) return;
|
|
11665
|
-
let e =
|
|
11725
|
+
let e = $f(f.effectiveDateFormat.value.pattern, !J.value);
|
|
11666
11726
|
ne = new ie(A.value, e);
|
|
11667
11727
|
}
|
|
11668
11728
|
function ae(e) {
|
|
11669
11729
|
let t = I.value, n = e.withTimeZone(t);
|
|
11670
|
-
return `${
|
|
11730
|
+
return `${Sf(n.toPlainDate(), f.effectiveDateFormat.value.pattern)} ${Xd(n.hour, n.minute, J.value)}`;
|
|
11671
11731
|
}
|
|
11672
11732
|
function oe() {
|
|
11673
|
-
return i.value ? `${
|
|
11733
|
+
return i.value ? `${Sf(i.value.toPlainDate(), f.effectiveDateFormat.value.pattern)} ${Xd(i.value.hour, i.value.minute, J.value)}` : "";
|
|
11674
11734
|
}
|
|
11675
11735
|
function se(e) {
|
|
11676
11736
|
let t = e.trim().split(/\s+/);
|
|
11677
11737
|
if (t.length < 2) return null;
|
|
11678
|
-
let n = t[0], r = t.slice(1).join(" "), i =
|
|
11738
|
+
let n = t[0], r = t.slice(1).join(" "), i = Cf(n, f.effectiveDateFormat.value.pattern);
|
|
11679
11739
|
if (!i) return null;
|
|
11680
|
-
let a =
|
|
11740
|
+
let a = Zd(r);
|
|
11681
11741
|
if (!a) return null;
|
|
11682
11742
|
let o = i.toPlainDateTime({
|
|
11683
11743
|
hour: a.hours,
|
|
@@ -11753,7 +11813,7 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11753
11813
|
onDateSelected: (e) => {
|
|
11754
11814
|
let t = ge.value ?? n.defaultTime, r = e.toPlainDateTime({
|
|
11755
11815
|
hour: t.hours,
|
|
11756
|
-
minute:
|
|
11816
|
+
minute: nf(t.minutes, n.minuteStep)
|
|
11757
11817
|
}), a = F.value ?? R.value, o;
|
|
11758
11818
|
o = pe.value === a ? r.toZonedDateTime(a) : r.toZonedDateTime(pe.value).withTimeZone(a), o = we(o), i.value = o;
|
|
11759
11819
|
},
|
|
@@ -11844,7 +11904,7 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11844
11904
|
},
|
|
11845
11905
|
content: {
|
|
11846
11906
|
kind: "component",
|
|
11847
|
-
component: h(
|
|
11907
|
+
component: h(Nm)
|
|
11848
11908
|
},
|
|
11849
11909
|
inputs: t
|
|
11850
11910
|
}), f.open(), c("opened"), j.afterClosed.then(() => {
|
|
@@ -11893,7 +11953,7 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11893
11953
|
id: b,
|
|
11894
11954
|
class: "coar-zdtp-label",
|
|
11895
11955
|
for: x
|
|
11896
|
-
}, [l(P(e.label) + " ", 1), e.required ? (w(), o("span",
|
|
11956
|
+
}, [l(P(e.label) + " ", 1), e.required ? (w(), o("span", Pm, "*")) : a("", !0)])) : a("", !0),
|
|
11897
11957
|
s("div", {
|
|
11898
11958
|
ref_key: "triggerRef",
|
|
11899
11959
|
ref: k,
|
|
@@ -11921,7 +11981,7 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11921
11981
|
}, [u(Z, {
|
|
11922
11982
|
name: "x",
|
|
11923
11983
|
size: "xs"
|
|
11924
|
-
})], 10,
|
|
11984
|
+
})], 10, Im),
|
|
11925
11985
|
s("input", {
|
|
11926
11986
|
id: x,
|
|
11927
11987
|
ref_key: "dateInputRef",
|
|
@@ -11936,12 +11996,12 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11936
11996
|
autocomplete: "off",
|
|
11937
11997
|
onInput: ke,
|
|
11938
11998
|
onBlur: Ae
|
|
11939
|
-
}, null, 40,
|
|
11999
|
+
}, null, 40, Lm),
|
|
11940
12000
|
i.value ? (w(), o("span", {
|
|
11941
12001
|
key: 0,
|
|
11942
12002
|
class: "coar-zdtp-tz-inline",
|
|
11943
12003
|
title: G.value
|
|
11944
|
-
}, P(G.value), 9,
|
|
12004
|
+
}, P(G.value), 9, Rm)) : a("", !0),
|
|
11945
12005
|
s("button", {
|
|
11946
12006
|
type: "button",
|
|
11947
12007
|
class: y(["coar-zdtp-tz-indicator", {
|
|
@@ -11955,7 +12015,7 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11955
12015
|
}, [u(Z, {
|
|
11956
12016
|
name: Me.value,
|
|
11957
12017
|
size: "xs"
|
|
11958
|
-
}, null, 8, ["name"])], 10,
|
|
12018
|
+
}, null, 8, ["name"])], 10, zm),
|
|
11959
12019
|
s("button", {
|
|
11960
12020
|
type: "button",
|
|
11961
12021
|
class: "coar-zdtp-btn",
|
|
@@ -11966,8 +12026,8 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11966
12026
|
}, [u(Z, {
|
|
11967
12027
|
name: "calendar",
|
|
11968
12028
|
size: "s"
|
|
11969
|
-
})], 8,
|
|
11970
|
-
], 42,
|
|
12029
|
+
})], 8, Bm)
|
|
12030
|
+
], 42, Fm),
|
|
11971
12031
|
le.value ? (w(), o("div", {
|
|
11972
12032
|
key: 1,
|
|
11973
12033
|
id: D,
|
|
@@ -11978,4 +12038,4 @@ var rm = { class: "coar-zdtp-body" }, im = { class: "coar-zdtp-calendar-column"
|
|
|
11978
12038
|
}
|
|
11979
12039
|
}), [["__scopeId", "data-v-1605cce9"]]);
|
|
11980
12040
|
//#endregion
|
|
11981
|
-
export { Fe as COAR_BUILTIN_ICON_SOURCE_KEY,
|
|
12041
|
+
export { Fe as COAR_BUILTIN_ICON_SOURCE_KEY, Zf as COAR_DATE_FORMAT_TO_MASKITO_MODE, Xf as COAR_DEFAULT_TIME_FORMAT, Pe as COAR_ICON_SERVICE_KEY, ze as CORE_ICONS, Bt as CoarAvatar, ct as CoarBadge, nd as CoarBreadcrumb, id as CoarBreadcrumbItem, $e as CoarButton, _t as CoarCard, gn as CoarCheckbox, jt as CoarCodeBlock, Me as CoarCollapse, Uu as CoarContextMenu, Ql as CoarDialogShell, rt as CoarDivider, cl as CoarDualListbox, ke as CoarFade, Oe as CoarFormField, Le as CoarHttpIconSource, Z as CoarIcon, Ie as CoarIconMapSource, tt as CoarIconPlugin, Re as CoarIconService, nl as CoarListbox, yu as CoarMenu, Du as CoarMenuDivider, Ou as CoarMenuHeading, Cu as CoarMenuItem, qf as CoarMonthList, Oc as CoarMultiSelect, Jd as CoarNavbar, lt as CoarNote, un as CoarNumberInput, wl as CoarOverlayHost, dl as CoarOverlayOutlet, or as CoarOverlayPlugin, pd as CoarPagination, en as CoarPasswordInput, wp as CoarPlainDatePicker, Xp as CoarPlainDateTimePicker, jl as CoarPopconfirm, Al as CoarPopconfirmPanel, Wl as CoarPopover, pt as CoarProgressBar, wn as CoarRadioButton, bn as CoarRadioGroup, je as CoarScale, Rf as CoarScrollableCalendar, Js as CoarSelect, wd as CoarSidebar, Ud as CoarSidebarDivider, Bd as CoarSidebarGroup, Hd as CoarSidebarHeading, Od as CoarSidebarItem, Wd as CoarSidebarSpacer, Ae as CoarSlide, at as CoarSpinner, Fu as CoarSubExpand, Vu as CoarSubFlyout, Vu as CoarSubmenuItem, On as CoarSwitch, Gu as CoarTab, $u as CoarTabGroup, Vt as CoarTable, Pt as CoarTag, zc as CoarTagSelect, Yt as CoarTextInput, _f as CoarTimePicker, Cl as CoarToastContainer, xl as CoarToastItem, Vm as CoarZonedDateTimePicker, Ce as FORM_FIELD_INJECTION_KEY, cu as MenuCascade, An as OVERLAY_DEFAULTS, nr as OVERLAY_PARENT_KEY, tr as OVERLAY_SERVICE_KEY, Ne as PRESET_SIZES, _n as RADIO_GROUP_INJECTION_KEY, hd as SIDEBAR_COLLAPSED_KEY, gd as SIDEBAR_ICON_SIZE_KEY, Yn as TOAST_SERVICE_KEY, zn as computeOverlayCoordinates, et as createCoarIconService, Kn as createOverlayService, Qn as createToastService, pr as dialogPreset, Fn as getAnchorRect, Nn as getContainerRect, ar as getOverlayService, Rn as getScrollParents, Is as getScrollbarInstance, er as getToastService, Mn as getViewportRect, fr as hoverMenuPreset, ur as menuPreset, lr as modalPreset, yr as popconfirmPreset, fu as provideMenuCascade, mu as provideMenuClose, jn as resolveOverlaySpec, dr as selectPreset, be as setCoarDragImageFromElement, xe as setCoarDragImageFromHtml, cr as tooltipPreset, Wu as useContextMenu, ru as useDialog, ve as useDragDrop, pu as useMenuCascade, hu as useMenuClose, sr as useOverlay, rr as useOverlayParent, Rl as useToast, le as useVirtualList, Fs as vScrollbar, uc as vTooltip };
|