bitboss-ui 3.0.0-beta.75 → 3.0.0-beta.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/bin/cli.mjs +16 -10
- package/dist/ai/BbAlert.md +1 -1
- package/dist/ai/BbBreadcrumbs.md +1 -1
- package/dist/ai/BbButton.md +2 -2
- package/dist/ai/BbColorInput.md +1 -1
- package/dist/ai/BbColorPalette.md +1 -1
- package/dist/ai/BbConfirm.md +1 -1
- package/dist/ai/BbDatePicker.md +1 -1
- package/dist/ai/BbDatePickerInput.md +1 -1
- package/dist/ai/BbDialog.md +3 -2
- package/dist/ai/BbDropdown.md +23 -21
- package/dist/ai/BbDropdownButton.md +13 -11
- package/dist/ai/BbGallery.md +3 -2
- package/dist/ai/BbIcon.md +10 -10
- package/dist/ai/BbOffCanvas.md +3 -2
- package/dist/ai/BbPopover.md +1 -1
- package/dist/ai/BbSelect.md +153 -43
- package/dist/ai/BbSelectPopover.md +115 -9
- package/dist/ai/BbTable.md +1 -1
- package/dist/ai/BbTimePicker.md +1 -1
- package/dist/ai/BbTimePickerInput.md +1 -1
- package/dist/ai/GroupedListBox.md +2 -2
- package/dist/ai/ListBox.md +3 -2
- package/dist/ai/changelog.json +153 -7
- package/dist/ai/components.json +12 -12
- package/dist/ai/guides/agent-contract.md +1 -1
- package/dist/ai/guides/calendars-and-digits.md +1 -1
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/icons-policy.md +32 -11
- package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
- package/dist/ai/guides/migration/adoption-checklist.md +1 -1
- package/dist/ai/guides/migration/components/bb-icon.md +4 -4
- package/dist/ai/guides/migration/v2-to-v3.md +48 -19
- package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
- package/dist/ai/guides/passthrough.md +58 -58
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/manifest/components/BbDialog.tree.json +1 -1
- package/dist/ai/manifest/components/BbDropdown.json +19 -17
- package/dist/ai/manifest/components/BbDropdown.tree.json +9 -9
- package/dist/ai/manifest/components/BbDropdownButton.json +12 -10
- package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
- package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
- package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
- package/dist/ai/manifest/components/BbSelect.json +44 -40
- package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +10 -6
- package/dist/ai/manifest/components/BbSelectPopover.tree.json +4 -1
- package/dist/ai/manifest/components/BbTable.tree.json +5 -1
- package/dist/ai/manifest/components/GroupedListBox.json +1 -1
- package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
- package/dist/ai/manifest/components/ListBox.json +1 -1
- package/dist/ai/manifest/components/ListBox.tree.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/inertia/onboarding.md +1 -1
- package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/nuxt/onboarding.md +1 -1
- package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
- package/dist/ai/recipes/vue/onboarding.md +2 -2
- package/dist/ai/source/BbAccordion.md +4 -5
- package/dist/ai/source/BbAvatar.md +9 -2
- package/dist/ai/source/BbBadge.md +6 -2
- package/dist/ai/source/BbBreadcrumbs.md +5 -2
- package/dist/ai/source/BbCalendar.md +8 -6
- package/dist/ai/source/BbCarousel.md +10 -6
- package/dist/ai/source/BbColorPalette.md +5 -2
- package/dist/ai/source/BbDatePickerInput.md +7 -2
- package/dist/ai/source/BbDropdown.md +91 -66
- package/dist/ai/source/BbDropdownButton.md +36 -19
- package/dist/ai/source/BbDropdownGroup.md +91 -66
- package/dist/ai/source/BbGallery.md +6 -5
- package/dist/ai/source/BbPagination.md +12 -28
- package/dist/ai/source/BbRating.md +4 -4
- package/dist/ai/source/BbSelect.md +130 -106
- package/dist/ai/source/BbSelectPopover.md +128 -21
- package/dist/ai/source/BbTable.md +42 -9
- package/dist/ai/source/BbTimePickerInput.md +6 -2
- package/dist/ai/source/ClearableButton.md +4 -2
- package/dist/ai/source/ErrorIcon.md +4 -3
- package/dist/ai/source/FlatListBox.md +7 -2
- package/dist/ai/source/GroupedListBox.md +22 -3
- package/dist/ai/source/ListBox.md +7 -1
- package/dist/ai/source/WarningIcon.md +4 -3
- package/dist/assets/svgs/close.svg_raw.js +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
- package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
- package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +48 -47
- package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -59
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +128 -127
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
- package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +500 -499
- package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +175 -174
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +263 -262
- package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +81 -80
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +318 -312
- package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +47 -46
- package/dist/components/BbDropdown/ptKeys.generated.d.ts +36 -20
- package/dist/components/BbDropdown/types.d.ts +51 -53
- package/dist/components/BbDropdown/types.js +2 -0
- package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +1 -1
- package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +74 -59
- package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +111 -63
- package/dist/components/BbDropdownButton/types.d.ts +12 -10
- package/dist/components/BbDropdownButton/types.js +2 -0
- package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
- package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +204 -203
- package/dist/components/BbIcon/iconCache.js +1 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
- package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
- package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
- package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
- package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
- package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
- package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
- package/dist/components/BbSelect/BbSelect.vue.d.ts +30 -20
- package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +201 -184
- package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
- package/dist/components/BbSelect/types.d.ts +101 -105
- package/dist/components/BbSelect/types.js +1 -27
- package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +6 -3
- package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +617 -585
- package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
- package/dist/components/BbSelectPopover/types.d.ts +22 -13
- package/dist/components/BbSelectPopover/types.js +3 -1
- package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue.d.ts +1 -1
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1092 -1090
- package/dist/components/BbTable/BbTableDataRow.js +97 -90
- package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +225 -224
- package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +76 -75
- package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
- package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +69 -68
- package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +166 -165
- package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
- package/dist/composables/useInternalIcon.js +25 -0
- package/dist/icon-scan.d.ts +1 -1
- package/dist/llms-full.txt +477 -187
- package/dist/llms-medium.txt +25 -24
- package/dist/llms.txt +1 -1
- package/dist/nuxt.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/types/Config.d.ts +8 -1
- package/dist/types/ConfigDefaults.d.ts +10 -2
- package/dist/types/internalIcons.d.ts +89 -0
- package/dist/types/internalIcons.js +158 -0
- package/dist/types/ptComponentMap.d.ts +4 -4
- package/dist/utils/configDefaults.js +75 -64
- package/dist/utils/iconsOption.js +48 -0
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +10 -16
- package/dist/vite.js +319 -306
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/scripts/lib/adoption-checklist.json +1 -1
- package/scripts/lib/update-install.mjs +48 -0
- package/scripts/lib/validate-bb-markup.mjs +73 -12
- package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -33,14 +33,15 @@ import { useMeridiem as Ie } from "../CommonTimeSelector/useMeridiem.js";
|
|
|
33
33
|
import { BB_DATE_PICKER_INPUT_PT as Le } from "./types.js";
|
|
34
34
|
import { dateLayoutFromHint as Re, dateReadsRtl as ze, monthLayoutFromHint as Be } from "./dateFieldLayout.js";
|
|
35
35
|
import { calendarFieldSpecs as Ve, calendarFieldsOf as He, eraHint as Ue, matchEra as We } from "./calendarFields.js";
|
|
36
|
-
import {
|
|
36
|
+
import { useInternalIcon as Ge } from "../../composables/useInternalIcon.js";
|
|
37
|
+
import { Fragment as Ke, computed as m, createBlock as qe, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as Je, createVNode as Ye, defineComponent as Xe, guardReactiveProps as Ze, mergeProps as v, normalizeClass as Qe, normalizeProps as $e, normalizeStyle as et, onBeforeUnmount as tt, onDeactivated as nt, openBlock as y, ref as b, renderList as rt, renderSlot as x, toDisplayString as it, toRaw as at, unref as S, useAttrs as ot, useSlots as st, watch as ct, withCtx as C, withDirectives as lt } from "vue";
|
|
37
38
|
import w from "dayjs";
|
|
38
|
-
import
|
|
39
|
-
import { formatCalendarDate as T, formatDigits as
|
|
40
|
-
import
|
|
41
|
-
import
|
|
39
|
+
import ut from "dayjs/plugin/customParseFormat";
|
|
40
|
+
import { formatCalendarDate as T, formatDigits as dt } from "virtual:bitboss-ui/calendars";
|
|
41
|
+
import ft from "dayjs/plugin/isSameOrAfter";
|
|
42
|
+
import pt from "dayjs/plugin/isSameOrBefore";
|
|
42
43
|
// src/components/BbDatePickerInput/BbDatePickerInput.vue?vue&type=script&setup=true&lang.ts
|
|
43
|
-
var
|
|
44
|
+
var mt = ["dir"], ht = ["onClick"], gt = ["data-value"], _t = [
|
|
44
45
|
"id",
|
|
45
46
|
"aria-describedby",
|
|
46
47
|
"aria-disabled",
|
|
@@ -63,7 +64,7 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
63
64
|
"onInput",
|
|
64
65
|
"onKeydown",
|
|
65
66
|
"onPaste"
|
|
66
|
-
],
|
|
67
|
+
], vt = ["onClick"], yt = ["onClick"], bt = ["aria-disabled", "disabled"], xt = ["id"], E = "YYYY-MM-DD", St = "YYYY-MM-DDTHH:mm", Ct = /*@__PURE__*/ Xe({
|
|
67
68
|
mixins: [d(Le)],
|
|
68
69
|
inheritAttrs: !1,
|
|
69
70
|
__name: "BbDatePickerInput",
|
|
@@ -442,83 +443,83 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
442
443
|
"update:modelValue",
|
|
443
444
|
"update:time"
|
|
444
445
|
],
|
|
445
|
-
setup(d, { emit:
|
|
446
|
-
let
|
|
446
|
+
setup(d, { emit: Xe }) {
|
|
447
|
+
let Ct = d, wt = Xe, Tt = st(), Et = Ge("calendar", ye), { props: D, emit: O, showAsterisk: Dt, errors: Ot, required: kt, ariaRequired: At, model: jt, readonly: Mt, locked: Nt } = r(Ct, wt, {
|
|
447
448
|
componentName: "BbDatePickerInput",
|
|
448
|
-
identifierFallback: () =>
|
|
449
|
+
identifierFallback: () => Ct.label,
|
|
449
450
|
leaveOn: "inactive",
|
|
450
451
|
emptyValue: () => null
|
|
451
|
-
}),
|
|
452
|
+
}), Pt = /^\d{4}-\d{2}-\d{2}(:append)?$/, Ft = () => Object.keys(Tt).filter((e) => Pt.test(e)), k = t();
|
|
452
453
|
process.env.NODE_ENV !== "production" && ve("BbDatePickerInput", te("BbDatePickerInput"), { fixedSlots: ["append:outer"] });
|
|
453
|
-
let
|
|
454
|
-
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
}, { model:
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}),
|
|
463
|
-
let
|
|
454
|
+
let It = b(!1), Lt = b(!1), Rt = () => {
|
|
455
|
+
Lt.value = !1;
|
|
456
|
+
}, zt = b(!1), Bt = () => {
|
|
457
|
+
zt.value = !0, O("show");
|
|
458
|
+
}, Vt = () => {
|
|
459
|
+
zt.value = !1, O("hide");
|
|
460
|
+
}, { model: Ht, set: Ut } = a(Ct, wt);
|
|
461
|
+
nt(() => {
|
|
462
|
+
It.value ? yn() : Rt();
|
|
463
|
+
}), tt(Rt);
|
|
464
|
+
let Wt = m(() => D.persistentHint || Lt.value), Gt = m(() => me(D.modelValue)), A = n("BbDatePickerInput", D, {
|
|
464
465
|
labelMode: "outside",
|
|
465
466
|
autocomplete: "off",
|
|
466
467
|
compact: !1,
|
|
467
468
|
reverse: !1,
|
|
468
469
|
floating: !1
|
|
469
|
-
}),
|
|
470
|
+
}), Kt = m(() => A.labelMode), qt = [
|
|
470
471
|
"panel",
|
|
471
472
|
"sheet",
|
|
472
473
|
...Me
|
|
473
474
|
], j = u({
|
|
474
475
|
component: "BbDatePickerInput",
|
|
475
|
-
attrs:
|
|
476
|
+
attrs: ot(),
|
|
476
477
|
controlAttrs: c,
|
|
477
478
|
props: D,
|
|
478
479
|
parts: Le.parts,
|
|
479
480
|
states: Le.states,
|
|
480
481
|
active: {
|
|
481
|
-
...l(D, () =>
|
|
482
|
-
open: () =>
|
|
482
|
+
...l(D, () => Gt.value),
|
|
483
|
+
open: () => zt.value
|
|
483
484
|
},
|
|
484
485
|
variant: {
|
|
485
486
|
...Le.variant,
|
|
486
487
|
current: () => D.variant ?? "outline"
|
|
487
488
|
}
|
|
488
|
-
}), M = m(() => D.type === "datetime"), N = m(() => re(D.type)),
|
|
489
|
+
}), M = m(() => D.type === "datetime"), N = m(() => re(D.type)), Jt = m(() => A.floating || ie(D.type)), P = m(() => D.type === "week"), Yt = m(() => ae(D.type)), F = T ? m(() => {
|
|
489
490
|
let { calendar: e } = xe(k.locale);
|
|
490
491
|
return e === "gregory" ? void 0 : be[e];
|
|
491
|
-
}) : null,
|
|
492
|
-
w.extend(
|
|
493
|
-
let { t: I } = i(),
|
|
494
|
-
let n = [e,
|
|
492
|
+
}) : null, Xt = m(() => ne(D.type, F?.value));
|
|
493
|
+
w.extend(ut), w.extend(ft), w.extend(pt), De();
|
|
494
|
+
let { t: I } = i(), Zt = o(), L = b(null), Qt = (e) => `bdpi-description_${e}`, $t = (e, t) => {
|
|
495
|
+
let n = [e, Qt(t)].filter((e) => !!e?.trim()).flatMap((e) => e.split(/\s+/)).filter(Boolean);
|
|
495
496
|
return Array.from(new Set(n)).join(" ");
|
|
496
|
-
}, { isMobile:
|
|
497
|
-
|
|
498
|
-
},
|
|
497
|
+
}, { isMobile: en } = s(), tn = m(() => D.disableWriting === "mobile" ? !en.value : D.disableWriting === "desktop" ? en.value : !D.disableWriting), nn = m(() => !tn.value && !cn.value && !D.disabled && !D.readonly), rn = () => {
|
|
498
|
+
nn.value && !zt.value && (L.value?.$el)?.querySelector(".bb-segmented-field__activator")?.click();
|
|
499
|
+
}, an = (e) => {
|
|
499
500
|
let t = e.target;
|
|
500
|
-
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-date-picker__panel, [role=\"dialog\"]") ||
|
|
501
|
-
},
|
|
502
|
-
if (
|
|
503
|
-
else if (D.readonly &&
|
|
501
|
+
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-date-picker__panel, [role=\"dialog\"]") || rn());
|
|
502
|
+
}, on = (e) => e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "Backspace" || e.key === "Delete" || e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey, sn = (e, t) => {
|
|
503
|
+
if (nn.value && (t.key === "Enter" || t.key === " ")) t.preventDefault(), rn();
|
|
504
|
+
else if (D.readonly && on(t)) t.preventDefault();
|
|
504
505
|
else if (T && V.value?.eras.length && e.field === "year" && (t.key === "ArrowUp" || t.key === "ArrowDown")) {
|
|
505
506
|
t.preventDefault();
|
|
506
507
|
let n = J.value[e.segment], r = V.value.lastYearOf(n.era), i = n.year ? parseInt(n.year, 10) : 0, a = n.year ? Math.min(Math.max(i + (t.key === "ArrowUp" ? 1 : -1), 1), r) : 1;
|
|
507
|
-
a !== i && (n.year = String(a), X(), $({ finalize: !1 })), t.target.value =
|
|
508
|
-
} else
|
|
509
|
-
},
|
|
508
|
+
a !== i && (n.year = String(a), X(), $({ finalize: !1 })), t.target.value = rr(n.year);
|
|
509
|
+
} else dr(e, t);
|
|
510
|
+
}, cn = m(() => D.disableCalendar === "mobile" ? en.value : D.disableCalendar === "desktop" ? !en.value : !!D.disableCalendar), ln = m(() => !!D.readonly || !tn.value), un = (e) => tn.value ? Wn.value[e].kind === "enum" ? "none" : "numeric" : "none", dn = (e) => e.includes("T"), R = (e) => {
|
|
510
511
|
if (P.value) return w(le(e, "min"), E, !0);
|
|
511
512
|
if (N.value) {
|
|
512
|
-
let t = w(e,
|
|
513
|
+
let t = w(e, Xt.value, !0);
|
|
513
514
|
return t.isValid() ? t : w(e);
|
|
514
515
|
}
|
|
515
|
-
return
|
|
516
|
-
}, z = m(() => ge(D.min, D.type, "min", (e) =>
|
|
517
|
-
for (let [e, t] of [["min", D.min], ["max", D.max]]) t && (R(t).isValid() ||
|
|
518
|
-
let
|
|
519
|
-
!
|
|
520
|
-
let
|
|
521
|
-
floating:
|
|
516
|
+
return dn(e) ? w(e, St, !0) : w(e, E, !0);
|
|
517
|
+
}, z = m(() => ge(D.min, D.type, "min", (e) => Zt.warn(`BbDatePickerInput: ${e}`), F?.value)), B = m(() => ge(D.max, D.type, "max", (e) => Zt.warn(`BbDatePickerInput: ${e}`), F?.value));
|
|
518
|
+
for (let [e, t] of [["min", D.min], ["max", D.max]]) t && (R(t).isValid() || Zt.throw(P.value ? `BbDatePickerInput: ${e} must be a week (YYYY-Www) or a date (YYYY-MM-DD) with type="week"` : N.value ? `BbDatePickerInput: ${e} must be a ${Xt.value} value (a longer date is accepted and rounded to the ${Yt.value}) with type="${D.type}"` : `BbDatePickerInput: ${e} must be in the format YYYY-MM-DD or YYYY-MM-DDTHH:mm`), (N.value || P.value) && (e === "min" ? z.value : B.value));
|
|
519
|
+
let fn = D.disableWriting !== !0 && D.disableWriting !== "desktop", pn = D.disableCalendar !== !0 && D.disableCalendar !== "desktop", mn = D.disableWriting !== !0 && D.disableWriting !== "mobile", hn = D.disableCalendar !== !0 && D.disableCalendar !== "mobile";
|
|
520
|
+
!fn && !pn && Zt.throw("BbDatePickerInput: desktop users would have no interaction method — disableWriting:true (or \"desktop\") and disableCalendar:true (or \"desktop\") cannot be combined."), !mn && !hn && Zt.throw("BbDatePickerInput: mobile users would have no interaction method — combine disableWriting:\"mobile\" with disableCalendar:\"desktop\" to keep calendar interaction on mobile while staying keyboard-first on desktop.");
|
|
521
|
+
let gn = m(() => ({
|
|
522
|
+
floating: Jt.value,
|
|
522
523
|
utc: D.utc,
|
|
523
524
|
type: D.type,
|
|
524
525
|
calendar: F?.value
|
|
@@ -527,48 +528,48 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
527
528
|
if (e === "gregory" || D.type === "week") return null;
|
|
528
529
|
let n = be[e];
|
|
529
530
|
return n ? He(n, t, (e, t) => Ce(e, k.locale, t)) : null;
|
|
530
|
-
}) : null, H = (e) => de(e,
|
|
531
|
-
|
|
531
|
+
}) : null, H = (e) => de(e, gn.value), _n = (e) => ue(e, gn.value), vn = () => {
|
|
532
|
+
It.value || (Lt.value = !0, O("active"), It.value = !0, document.addEventListener("focusin", U), document.addEventListener("click", U, !0));
|
|
532
533
|
}, U = (e) => {
|
|
533
534
|
let t = e.target;
|
|
534
|
-
t instanceof HTMLElement && L.value?.$el && (e.type === "focusin" && t.contains(L.value.$el) || L.value.$el.contains(t) ||
|
|
535
|
-
},
|
|
536
|
-
$({ finalize: !0 }),
|
|
537
|
-
},
|
|
538
|
-
let n =
|
|
535
|
+
t instanceof HTMLElement && L.value?.$el && (e.type === "focusin" && t.contains(L.value.$el) || L.value.$el.contains(t) || yn());
|
|
536
|
+
}, yn = () => {
|
|
537
|
+
$({ finalize: !0 }), Rr() && (Ir(), X()), It.value = !1, Rt(), O("inactive"), document.removeEventListener("focusin", U), document.removeEventListener("click", U, !0);
|
|
538
|
+
}, bn = (e, t) => {
|
|
539
|
+
let n = _n(t);
|
|
539
540
|
if (!n.isValid()) return;
|
|
540
541
|
let r = J.value[e];
|
|
541
|
-
T && V.value ?
|
|
542
|
-
},
|
|
542
|
+
T && V.value ? Yn(r, n) : (r.day = n.format("DD"), r.month = n.format("MM"), r.year = n.format("YYYY"));
|
|
543
|
+
}, xn = (e) => {
|
|
543
544
|
let { week: t, year: n } = oe(e);
|
|
544
545
|
return {
|
|
545
546
|
week: String(t).padStart(2, "0"),
|
|
546
547
|
year: String(n).padStart(4, "0")
|
|
547
548
|
};
|
|
548
|
-
},
|
|
549
|
+
}, Sn = { "onUpdate:modelValue": (e) => {
|
|
549
550
|
if (e === null && D.range && (e = []), !M.value) O("update:modelValue", e);
|
|
550
551
|
else if (e === null || Array.isArray(e) && !e.length) J.value.start = Y(), J.value.end = Y(), X(), Q(D.range ? [] : null);
|
|
551
552
|
else if (Array.isArray(e)) {
|
|
552
553
|
let [t, n] = e;
|
|
553
|
-
t ?
|
|
554
|
-
} else
|
|
555
|
-
} },
|
|
554
|
+
t ? bn("start", t) : J.value.start = Y(), n ? bn("end", n) : J.value.end = Y(), X(), $({ finalize: !1 });
|
|
555
|
+
} else bn("start", e), X(), $({ finalize: !1 });
|
|
556
|
+
} }, Cn = (e) => {
|
|
556
557
|
let t = J.value[e];
|
|
557
|
-
return P.value ? !!(t.week && t.year && t.year.length === 4) : !!(t.day && t.month && (T ?
|
|
558
|
-
},
|
|
558
|
+
return P.value ? !!(t.week && t.year && t.year.length === 4) : !!(t.day && t.month && (T ? wn(t) : t.year.length === 4));
|
|
559
|
+
}, wn = (e) => {
|
|
559
560
|
let t = V.value;
|
|
560
561
|
return t ? t.eras.length && !e.era ? !1 : t.yearFullLength ? e.year.length === t.yearDigits : !!e.year : e.year.length === 4;
|
|
561
|
-
},
|
|
562
|
-
|
|
563
|
-
},
|
|
564
|
-
let n = J.value[
|
|
565
|
-
e === "hour" ?
|
|
566
|
-
},
|
|
562
|
+
}, Tn = b("start"), En = (e, t) => {
|
|
563
|
+
Tn.value = e.segment, fr(e, t), O("focus", t);
|
|
564
|
+
}, Dn = m(() => D.range ? Cn(Tn.value) ? Tn.value : Cn("end") ? "end" : "start" : "start"), On = ({ unit: e, value: t }) => {
|
|
565
|
+
let n = J.value[Dn.value];
|
|
566
|
+
e === "hour" ? xr(n, parseInt(t, 10)) : e === "meridiem" ? n.meridiem = G.label(t === "PM" ? "PM" : "AM") : n[e] = t, n.hour ||= D.ampm ? "12" : "00", D.ampm && !n.meridiem && (n.meridiem = G.am.value), n.minute ||= "00", D.seconds && !n.second && (n.second = "00"), X(), $({ finalize: !1 });
|
|
567
|
+
}, kn = m(() => Ee(D.type)), { isHydrated: An } = ke(), jn = (e) => {
|
|
567
568
|
if (P.value) return I("datePicker.weekSpan", String(oe(e).week), Oe(p(e), k.locale)).value;
|
|
568
|
-
let t = Ce(e, k.locale,
|
|
569
|
-
return M.value ? `${t} ${Te(e, k.locale, !!D.ampm, !!D.seconds,
|
|
570
|
-
},
|
|
571
|
-
if (
|
|
569
|
+
let t = Ce(e, k.locale, kn.value);
|
|
570
|
+
return M.value ? `${t} ${Te(e, k.locale, !!D.ampm, !!D.seconds, An.value)}` : t;
|
|
571
|
+
}, Mn = (e) => {
|
|
572
|
+
if (lr(e) !== "complete") return null;
|
|
572
573
|
let t = J.value[e];
|
|
573
574
|
if (P.value) {
|
|
574
575
|
let e = se(parseInt(t.year, 10), parseInt(t.week, 10));
|
|
@@ -576,20 +577,20 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
576
577
|
}
|
|
577
578
|
let n = K.value;
|
|
578
579
|
if (T && V.value) {
|
|
579
|
-
let e = V.value.dateOf(
|
|
580
|
+
let e = V.value.dateOf(qn(t), n), r = M.value ? Br(t) : null;
|
|
580
581
|
return !e || M.value && !r ? null : r ? e.hour(+r.hour).minute(+r.minute).second(+r.second) : e;
|
|
581
582
|
}
|
|
582
583
|
let r = n.has("day") ? t.day.padStart(2, "0") : "01", i = n.has("month") ? t.month.padStart(2, "0") : "01", a = `${t.year.padStart(4, "0")}-${i}-${r}`, o = E;
|
|
583
|
-
M.value && (a += `T${
|
|
584
|
+
M.value && (a += `T${Ur(e)}`, o += D.seconds ? "THH:mm:ss" : "THH:mm");
|
|
584
585
|
let s = w(a, o, !0);
|
|
585
586
|
return s.isValid() ? s : null;
|
|
586
|
-
},
|
|
587
|
+
}, Nn = m(() => {
|
|
587
588
|
if (D.range) {
|
|
588
|
-
let e =
|
|
589
|
-
return !e || !t ? I("datePickerInput.emptyRange").value : I("datePickerInput.changeSelectionRange",
|
|
589
|
+
let e = Mn("start"), t = Mn("end");
|
|
590
|
+
return !e || !t ? I("datePickerInput.emptyRange").value : I("datePickerInput.changeSelectionRange", jn(e), jn(t)).value;
|
|
590
591
|
}
|
|
591
|
-
let e =
|
|
592
|
-
return e ? I("datePickerInput.changeSelection",
|
|
592
|
+
let e = Mn("start");
|
|
593
|
+
return e ? I("datePickerInput.changeSelection", jn(e)).value : I("datePickerInput.emptySelection").value;
|
|
593
594
|
}), W = (e) => {
|
|
594
595
|
if (!e.isValid()) return !0;
|
|
595
596
|
if (P.value) {
|
|
@@ -604,27 +605,27 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
604
605
|
type: D.type,
|
|
605
606
|
calendar: F.value
|
|
606
607
|
});
|
|
607
|
-
let n = (e) => N.value ?
|
|
608
|
+
let n = (e) => N.value ? Yt.value : M.value && dn(e) ? "minute" : "day", r = z.value, i = B.value;
|
|
608
609
|
return r && (t &&= e.isSameOrAfter(R(r), n(r))), i && (t &&= e.isSameOrBefore(R(i), n(i))), typeof D.selectable == "function" && (t &&= D.selectable(H(e))), !t;
|
|
609
|
-
},
|
|
610
|
-
let e =
|
|
611
|
-
if (!t.some(W)) return
|
|
610
|
+
}, Pn = m(() => {
|
|
611
|
+
let e = Mn("start"), t = [e, e && D.range ? Mn("end") : null].filter(he);
|
|
612
|
+
if (!t.some(W)) return jt.value;
|
|
612
613
|
let n = t.map(H);
|
|
613
614
|
return D.range ? n : n[0];
|
|
614
|
-
}),
|
|
615
|
-
D.range ? (O("update:modelValue", []), M.value && (
|
|
616
|
-
},
|
|
615
|
+
}), Fn = () => {
|
|
616
|
+
D.range ? (O("update:modelValue", []), M.value && (Wr.value = [], O("update:time", []))) : (O("update:modelValue", null), M.value && (Wr.value = null, O("update:time", null)));
|
|
617
|
+
}, In = /* @__PURE__ */ new Set([
|
|
617
618
|
"hour",
|
|
618
619
|
"minute",
|
|
619
620
|
"second",
|
|
620
621
|
"meridiem"
|
|
621
|
-
]), G = Ie(),
|
|
622
|
+
]), G = Ie(), Ln = (e, t) => G.isPm(t) ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e, Rn = (e) => {
|
|
622
623
|
let t = e >= 12 ? "PM" : "AM", n = e % 12;
|
|
623
624
|
return n === 0 && (n = 12), {
|
|
624
625
|
hour: String(n).padStart(2, "0"),
|
|
625
626
|
meridiem: t
|
|
626
627
|
};
|
|
627
|
-
},
|
|
628
|
+
}, zn = m(() => {
|
|
628
629
|
if (D.type === "year") return {
|
|
629
630
|
order: ["year"],
|
|
630
631
|
separator: "/"
|
|
@@ -647,8 +648,8 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
647
648
|
],
|
|
648
649
|
separator: "/"
|
|
649
650
|
};
|
|
650
|
-
}),
|
|
651
|
-
let e =
|
|
651
|
+
}), Bn = m(() => {
|
|
652
|
+
let e = zn.value.order;
|
|
652
653
|
if (!T || !V.value?.eras.length) return e;
|
|
653
654
|
let t = e.indexOf("year") + +!V.value.eraFirst;
|
|
654
655
|
return [
|
|
@@ -656,12 +657,12 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
656
657
|
"era",
|
|
657
658
|
...e.slice(t)
|
|
658
659
|
];
|
|
659
|
-
}), K = m(() => new Set(
|
|
660
|
+
}), K = m(() => new Set(Bn.value)), Vn = m(() => {
|
|
660
661
|
if (!M.value) return [];
|
|
661
662
|
let e = ["hour", "minute"];
|
|
662
663
|
return D.seconds && e.push("second"), D.ampm && e.push("meridiem"), e;
|
|
663
664
|
}), q = m(() => {
|
|
664
|
-
let e = [...
|
|
665
|
+
let e = [...Bn.value, ...Vn.value], t = e.map((e) => ({
|
|
665
666
|
segment: "start",
|
|
666
667
|
field: e
|
|
667
668
|
}));
|
|
@@ -671,12 +672,12 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
671
672
|
field: e
|
|
672
673
|
}));
|
|
673
674
|
return [...t, ...n];
|
|
674
|
-
}),
|
|
675
|
+
}), Hn = m(() => {
|
|
675
676
|
let e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
|
|
676
677
|
return q.value.forEach((n, r) => {
|
|
677
678
|
e.has(n.segment) || (e.add(n.segment), t.add(r));
|
|
678
679
|
}), t;
|
|
679
|
-
}),
|
|
680
|
+
}), Un = (e) => Hn.value.has(e), Wn = m(() => ({
|
|
680
681
|
era: {
|
|
681
682
|
kind: "enum",
|
|
682
683
|
maxLength: 0
|
|
@@ -747,24 +748,24 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
747
748
|
label: "Second"
|
|
748
749
|
},
|
|
749
750
|
meridiem: G.fieldSpec.value,
|
|
750
|
-
...
|
|
751
|
-
})),
|
|
751
|
+
...Kn?.value
|
|
752
|
+
})), Gn = (e) => Wn.value[e].kind === "numeric" ? void 0 : Wn.value[e].maxLength, Kn = T ? m(() => V.value ? Ve(V.value) : null) : null, qn = (e) => ({
|
|
752
753
|
era: e.era,
|
|
753
754
|
year: e.year,
|
|
754
755
|
month: e.month,
|
|
755
756
|
day: e.day
|
|
756
|
-
}),
|
|
757
|
-
|
|
757
|
+
}), Jn = /* @__PURE__ */ new WeakMap(), Yn = (e, t) => {
|
|
758
|
+
Jn.set(at(e), t);
|
|
758
759
|
let n = V.value.fieldsOf(t);
|
|
759
760
|
e.era = n.era, e.year = n.year, K.value.has("month") && (e.month = n.month), K.value.has("day") && (e.day = n.day);
|
|
760
|
-
},
|
|
761
|
+
}, Xn = m(() => f(q.value, (e) => e === "meridiem" ? "meridiem" : In.has(e) ? "time" : "date")), Zn = (e) => e.items.at(-1).index, Qn = m(() => ze(we(k.locale))), $n = (e) => e.kind === "meridiem" || e.kind === "date" && Qn.value ? void 0 : "ltr", er = (e, t) => {
|
|
761
762
|
if (e.segment !== t.segment) return "–";
|
|
762
763
|
if (t.field === "meridiem") return "\xA0";
|
|
763
|
-
let n =
|
|
764
|
-
return n && r ? ":" : !n && r ? "\xA0" : T && (e.field === "era" && t.field === "year" || e.field === "year" && t.field === "era") ? V.value?.eraSeparator ?? " " :
|
|
765
|
-
}, { fields: J, fieldRefs:
|
|
764
|
+
let n = In.has(e.field), r = In.has(t.field);
|
|
765
|
+
return n && r ? ":" : !n && r ? "\xA0" : T && (e.field === "era" && t.field === "year" || e.field === "year" && t.field === "era") ? V.value?.eraSeparator ?? " " : dt && Qn.value ? `\u200F${zn.value.separator}` : zn.value.separator;
|
|
766
|
+
}, { fields: J, fieldRefs: tr, descriptorKey: nr, displayOf: rr, emptyFieldGroup: Y, getSizedValue: ir, minChars: ar, updateAllSizedValues: X, isOwnField: or, focusField: sr, focusFirstField: cr, segmentStatus: lr, onFieldInput: ur, onFieldKeydown: dr, onFieldFocus: fr, onFieldBlur: pr, onFieldPaste: mr } = ee({
|
|
766
767
|
fieldOrder: q,
|
|
767
|
-
specs:
|
|
768
|
+
specs: Wn,
|
|
768
769
|
segments: ["start", "end"],
|
|
769
770
|
fieldKeys: [
|
|
770
771
|
"era",
|
|
@@ -789,13 +790,13 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
789
790
|
" "
|
|
790
791
|
],
|
|
791
792
|
onDirty: () => $({ finalize: !1 }),
|
|
792
|
-
numberingSystem:
|
|
793
|
-
}),
|
|
793
|
+
numberingSystem: dt ? () => xe(k.locale).numberingSystem : void 0
|
|
794
|
+
}), hr = (e, t) => {
|
|
794
795
|
if (T && e.field === "era" && V.value) {
|
|
795
796
|
let n = J.value[e.segment], r = t.target, i = Se(r.value), a = We(V.value, i, n.era), o = i.replace(/\D/g, "");
|
|
796
797
|
if (a && a !== n.era) n.era = a, $({ finalize: !1 });
|
|
797
798
|
else if (o && V.value.eraFirst) {
|
|
798
|
-
n.era ||= V.value.fieldsOf(
|
|
799
|
+
n.era ||= V.value.fieldsOf(gr()).era, n.year = o.slice(0, Wn.value.year.maxLength), r.value = n.era, X(), sr({
|
|
799
800
|
segment: e.segment,
|
|
800
801
|
field: "year"
|
|
801
802
|
}, { caretToEnd: !0 }), $({ finalize: !1 });
|
|
@@ -806,18 +807,18 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
806
807
|
let n = J.value[e.segment], r = G.match(t.target.value, n.meridiem);
|
|
807
808
|
r && r !== n.meridiem && (n.meridiem = r, $({ finalize: !1 }));
|
|
808
809
|
}
|
|
809
|
-
|
|
810
|
+
ur(e, t);
|
|
810
811
|
};
|
|
811
812
|
G.onRelabel((e, t) => {
|
|
812
813
|
for (let n of Object.values(J.value)) n.meridiem === e && (n.meridiem = t);
|
|
813
814
|
X();
|
|
814
815
|
});
|
|
815
|
-
let
|
|
816
|
+
let gr = () => {
|
|
816
817
|
let { min: e, max: t } = V.value.system.range, n = w().format(E);
|
|
817
818
|
return w(n < e ? e : n > t ? t : n);
|
|
818
|
-
},
|
|
819
|
+
}, _r = (e, t) => D.range ? `${t}-${e.segment}-${e.field}` : `${t}-${e.field}`, vr = (e) => {
|
|
819
820
|
if (D.name) return D.range ? `${D.name}-${e.segment}-${e.field}` : `${D.name}-${e.field}`;
|
|
820
|
-
},
|
|
821
|
+
}, yr = {
|
|
821
822
|
era: "datePickerInput.eraField",
|
|
822
823
|
week: "datePickerInput.weekField",
|
|
823
824
|
day: "datePickerInput.dayField",
|
|
@@ -827,23 +828,23 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
827
828
|
minute: "datePickerInput.minuteField",
|
|
828
829
|
second: "datePickerInput.secondField",
|
|
829
830
|
meridiem: "datePickerInput.meridiemField"
|
|
830
|
-
},
|
|
831
|
-
let t = I(
|
|
831
|
+
}, br = (e) => {
|
|
832
|
+
let t = I(yr[e.field]).value;
|
|
832
833
|
return D.range ? I(e.segment === "start" ? "datePickerInput.startFieldLabel" : "datePickerInput.endFieldLabel", t).value : t;
|
|
833
|
-
},
|
|
834
|
+
}, xr = (e, t) => {
|
|
834
835
|
if (!D.ampm) {
|
|
835
836
|
e.hour = String(t).padStart(2, "0");
|
|
836
837
|
return;
|
|
837
838
|
}
|
|
838
|
-
let n =
|
|
839
|
+
let n = Rn(t);
|
|
839
840
|
e.hour = n.hour, e.meridiem = G.label(n.meridiem);
|
|
840
|
-
},
|
|
841
|
+
}, Sr = (e) => {
|
|
841
842
|
if (!e.hour) return 0;
|
|
842
843
|
let t = parseInt(e.hour, 10);
|
|
843
|
-
return D.ampm ?
|
|
844
|
-
},
|
|
844
|
+
return D.ampm ? Ln(t, e.meridiem || "AM") : t;
|
|
845
|
+
}, Cr = m(() => D.seconds ? "HH:mm:ss" : "HH:mm"), wr = (e) => e.format(Cr.value), Tr = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, Er = (e) => {
|
|
845
846
|
if (!e) return null;
|
|
846
|
-
let t =
|
|
847
|
+
let t = Tr.exec(e);
|
|
847
848
|
if (!t) return null;
|
|
848
849
|
let [, n, r, i] = t;
|
|
849
850
|
return parseInt(n, 10) > 23 || parseInt(r, 10) > 59 || i && parseInt(i, 10) > 59 ? null : {
|
|
@@ -851,28 +852,28 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
851
852
|
minute: r.padStart(2, "0"),
|
|
852
853
|
second: (i ?? "").padStart(i ? 2 : 0, "0")
|
|
853
854
|
};
|
|
854
|
-
},
|
|
855
|
+
}, Dr = (e, t) => {
|
|
855
856
|
if (!M.value) return;
|
|
856
|
-
let n =
|
|
857
|
-
n ? (
|
|
858
|
-
},
|
|
857
|
+
let n = Er(t);
|
|
858
|
+
n ? (xr(e, parseInt(n.hour, 10)), e.minute = n.minute, e.second = D.seconds ? n.second : "") : (e.hour = "", e.minute = "", e.second = "", e.meridiem = "");
|
|
859
|
+
}, Or = m(() => D.seconds ? "datePickerInput.timeFormatSeconds" : "datePickerInput.timeFormat"), kr = m(() => T && V.value?.eras.length ? Ue(V.value, Ar.value, I("datePickerInput.dateFormatSingle").value, I("datePickerInput.eraField").value) : Ar.value), Ar = m(() => {
|
|
859
860
|
if (D.type === "week" || D.type === "month" || D.type === "year") {
|
|
860
861
|
let e = D.type;
|
|
861
862
|
return I(D.range ? `datePickerInput.${e}FormatRange` : `datePickerInput.${e}FormatSingle`).value;
|
|
862
863
|
}
|
|
863
864
|
if (!M.value) return I(D.range ? "datePickerInput.dateFormatRange" : "datePickerInput.dateFormatSingle").value;
|
|
864
|
-
let e = `${I("datePickerInput.dateFormatSingle").value} ${I(
|
|
865
|
+
let e = `${I("datePickerInput.dateFormatSingle").value} ${I(Or.value).value}`;
|
|
865
866
|
return D.range ? `${e} – ${e}` : e;
|
|
866
|
-
}),
|
|
867
|
+
}), jr = m(() => D.placeholder || kr.value), Mr = m(() => q.value.every((e) => !J.value[e.segment][e.field])), Nr = (e) => {
|
|
867
868
|
if (!e) return Y();
|
|
868
|
-
let t =
|
|
869
|
+
let t = _n(e);
|
|
869
870
|
if (!t.isValid()) return Y();
|
|
870
871
|
let n = Y();
|
|
871
872
|
return P.value ? {
|
|
872
873
|
...n,
|
|
873
|
-
...
|
|
874
|
-
} : (T && V.value ?
|
|
875
|
-
},
|
|
874
|
+
...xn(t)
|
|
875
|
+
} : (T && V.value ? Yn(n, t) : (K.value.has("day") && (n.day = t.format("DD")), K.value.has("month") && (n.month = t.format("MM")), n.year = t.format("YYYY")), M.value && !A.floating && (xr(n, t.hour()), n.minute = t.format("mm"), n.second = D.seconds ? t.format("ss") : ""), n);
|
|
876
|
+
}, Pr = (e) => Array.isArray(D.time) ? D.time[e === "start" ? 0 : 1] : e === "start" ? D.time : void 0, Fr = (e) => {
|
|
876
877
|
if (!e) J.value = {
|
|
877
878
|
start: Y(),
|
|
878
879
|
end: Y()
|
|
@@ -881,52 +882,52 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
881
882
|
if (D.range) {
|
|
882
883
|
let [t, n] = Array.isArray(e) ? e : [];
|
|
883
884
|
J.value = {
|
|
884
|
-
start:
|
|
885
|
-
end:
|
|
885
|
+
start: Nr(t),
|
|
886
|
+
end: Nr(n)
|
|
886
887
|
};
|
|
887
888
|
} else Array.isArray(e) ? J.value = {
|
|
888
889
|
start: Y(),
|
|
889
890
|
end: Y()
|
|
890
891
|
} : J.value = {
|
|
891
|
-
start:
|
|
892
|
+
start: Nr(e),
|
|
892
893
|
end: Y()
|
|
893
894
|
};
|
|
894
895
|
if (M.value && A.floating) for (let e of ["start", "end"]) {
|
|
895
896
|
let t = J.value[e];
|
|
896
|
-
t.day &&
|
|
897
|
+
t.day && Dr(t, Pr(e));
|
|
897
898
|
}
|
|
898
899
|
}
|
|
899
|
-
},
|
|
900
|
-
|
|
900
|
+
}, Ir = () => {
|
|
901
|
+
Fr(D.modelValue);
|
|
901
902
|
};
|
|
902
|
-
|
|
903
|
-
|
|
903
|
+
Fr(D.modelValue), X(), T && ct(V, () => {
|
|
904
|
+
Fr(D.modelValue), X();
|
|
904
905
|
});
|
|
905
|
-
let
|
|
906
|
+
let Lr = (e) => {
|
|
906
907
|
if (!M.value || A.floating) return;
|
|
907
908
|
let t;
|
|
908
|
-
t = e ? Array.isArray(e) ? e.map((e) =>
|
|
909
|
+
t = e ? Array.isArray(e) ? e.map((e) => wr(_n(e))) : wr(_n(e)) : null, Wr.value = t, O("update:time", t);
|
|
909
910
|
};
|
|
910
|
-
|
|
911
|
+
ct(() => D.modelValue, (e) => {
|
|
911
912
|
if (e === null || Array.isArray(e) && e.length === 0) {
|
|
912
|
-
|
|
913
|
+
Fr(e), X(), Lr(e);
|
|
913
914
|
return;
|
|
914
915
|
}
|
|
915
916
|
let t = document.activeElement;
|
|
916
|
-
t &&
|
|
917
|
-
}),
|
|
918
|
-
if (!M.value || pe(e ?? null) === pe(
|
|
917
|
+
t && or(t) || (Fr(e), X(), Lr(e));
|
|
918
|
+
}), ct(() => D.time, (e) => {
|
|
919
|
+
if (!M.value || pe(e ?? null) === pe(Wr.value ?? null)) return;
|
|
919
920
|
let t = document.activeElement;
|
|
920
|
-
if (!(t &&
|
|
921
|
+
if (!(t && or(t))) {
|
|
921
922
|
for (let e of ["start", "end"]) {
|
|
922
923
|
if (e === "end" && !D.range) break;
|
|
923
|
-
let t =
|
|
924
|
-
t !== void 0 &&
|
|
924
|
+
let t = Pr(e), n = J.value[e];
|
|
925
|
+
t !== void 0 && Dr(n, t);
|
|
925
926
|
}
|
|
926
927
|
X(), $({ finalize: !1 });
|
|
927
928
|
}
|
|
928
929
|
});
|
|
929
|
-
let
|
|
930
|
+
let Rr = () => lr("start") === "partial" ? !0 : D.range ? lr("end") === "partial" : !1, zr = (e) => {
|
|
930
931
|
let t = J.value[e], n = K.value;
|
|
931
932
|
if (P.value) {
|
|
932
933
|
if (!t.week || !t.year) return null;
|
|
@@ -939,9 +940,9 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
939
940
|
}
|
|
940
941
|
if (n.has("day") && !t.day || n.has("month") && !t.month || !t.year) return null;
|
|
941
942
|
if (T && V.value) {
|
|
942
|
-
let r = M.value ?
|
|
943
|
+
let r = M.value ? Br(t) : null;
|
|
943
944
|
if (M.value && !r) return null;
|
|
944
|
-
let i =
|
|
945
|
+
let i = qn(t), a = Jn.get(at(J.value[e]));
|
|
945
946
|
if (a && !V.value.eras.length && n.has("month")) {
|
|
946
947
|
let e = V.value.fieldsOf(a), n = parseInt(t.year, 10) - parseInt(e.year, 10);
|
|
947
948
|
n && parseInt(t.month, 10) === parseInt(e.month, 10) && (i = {
|
|
@@ -951,7 +952,7 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
951
952
|
}
|
|
952
953
|
let o = V.value.nearest(i, n);
|
|
953
954
|
if (!o) return null;
|
|
954
|
-
|
|
955
|
+
Jn.set(at(J.value[e]), o);
|
|
955
956
|
let s = V.value.fieldsOf(o);
|
|
956
957
|
for (let r of [
|
|
957
958
|
"era",
|
|
@@ -965,7 +966,7 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
965
966
|
if (r < 1 || r > 31 || i < 1 || i > 12 || a < 1e3 || a > 9999) return null;
|
|
966
967
|
let o = t.year.padStart(4, "0"), s = String(i).padStart(2, "0"), c = String(r).padStart(2, "0"), l = "", u = "";
|
|
967
968
|
if (M.value) {
|
|
968
|
-
let e =
|
|
969
|
+
let e = Br(t);
|
|
969
970
|
if (!e) return null;
|
|
970
971
|
l = `T${e.hour}:${e.minute}:${e.second}`, u = "THH:mm:ss";
|
|
971
972
|
}
|
|
@@ -975,63 +976,63 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
975
976
|
f = w(i, E + u, !0), J.value[e].day = String(n).padStart(2, "0");
|
|
976
977
|
}
|
|
977
978
|
return f.isValid() ? f : null;
|
|
978
|
-
},
|
|
979
|
+
}, Br = (e) => {
|
|
979
980
|
if (D.ampm && e.hour) {
|
|
980
981
|
let t = parseInt(e.hour, 10);
|
|
981
982
|
if (t < 1 || t > 12) return null;
|
|
982
983
|
}
|
|
983
|
-
let t = String(
|
|
984
|
+
let t = String(Sr(e)).padStart(2, "0"), n = (e.minute || "0").padStart(2, "0"), r = ((D.seconds ? e.second : "") || "0").padStart(2, "0");
|
|
984
985
|
return parseInt(t, 10) > 23 || parseInt(n, 10) > 59 || parseInt(r, 10) > 59 ? null : {
|
|
985
986
|
hour: t,
|
|
986
987
|
minute: n,
|
|
987
988
|
second: r
|
|
988
989
|
};
|
|
989
|
-
},
|
|
990
|
+
}, Vr = (e) => {
|
|
990
991
|
let t = Y();
|
|
991
992
|
return P.value ? {
|
|
992
993
|
...t,
|
|
993
|
-
...
|
|
994
|
-
} : (T && V.value ?
|
|
995
|
-
},
|
|
994
|
+
...xn(e)
|
|
995
|
+
} : (T && V.value ? Yn(t, e) : (K.value.has("day") && (t.day = e.format("DD")), K.value.has("month") && (t.month = e.format("MM")), t.year = e.format("YYYY")), M.value && (xr(t, e.hour()), t.minute = e.format("mm"), t.second = D.seconds ? e.format("ss") : ""), t);
|
|
996
|
+
}, Hr = (e) => {
|
|
996
997
|
if (P.value) {
|
|
997
998
|
let t = p(e), n = z.value ? R(z.value) : null, r = B.value ? R(B.value) : null;
|
|
998
999
|
return n && t.isBefore(n, "day") && (t = p(n), t.isBefore(n, "day") && (t = t.add(1, "week"))), r && t.add(6, "day").isAfter(r, "day") && (t = p(r), t.add(6, "day").isAfter(r, "day") && (t = t.subtract(1, "week"))), t.isSame(p(e), "day") || W(t) ? null : t;
|
|
999
1000
|
}
|
|
1000
|
-
let t = (t, n) => M.value && !n ? t.hour(e.hour()).minute(e.minute()).second(e.second()) : t, n = !!(T && F.value && N.value), r = n ? "day" :
|
|
1001
|
+
let t = (t, n) => M.value && !n ? t.hour(e.hour()).minute(e.minute()).second(e.second()) : t, n = !!(T && F.value && N.value), r = n ? "day" : Yt.value, i = N.value ? r : M.value ? "minute" : "day", a = e, o = z.value, s = B.value;
|
|
1001
1002
|
if (o) {
|
|
1002
|
-
let e =
|
|
1003
|
+
let e = dn(o), n = R(o);
|
|
1003
1004
|
a.isBefore(n, N.value ? r : M.value && e ? "minute" : "day") && (a = N.value ? n : t(n, e));
|
|
1004
1005
|
}
|
|
1005
1006
|
if (s) {
|
|
1006
|
-
let e =
|
|
1007
|
-
a.isAfter(i, N.value ? r : M.value && e ? "minute" : "day") && (a = N.value ? n ? i : i.startOf(
|
|
1007
|
+
let e = dn(s), i = R(s);
|
|
1008
|
+
a.isAfter(i, N.value ? r : M.value && e ? "minute" : "day") && (a = N.value ? n ? i : i.startOf(Yt.value) : t(i, e));
|
|
1008
1009
|
}
|
|
1009
1010
|
return a.isSame(e, i) || W(a) ? null : a;
|
|
1010
1011
|
}, Z = (e) => {
|
|
1011
1012
|
O("error", e);
|
|
1012
|
-
},
|
|
1013
|
-
let t = J.value[e], n = String(
|
|
1013
|
+
}, Ur = (e) => {
|
|
1014
|
+
let t = J.value[e], n = String(Sr(t)).padStart(2, "0"), r = (t.minute || "0").padStart(2, "0");
|
|
1014
1015
|
return D.seconds ? `${n}:${r}:${(t.second || "0").padStart(2, "0")}` : `${n}:${r}`;
|
|
1015
|
-
},
|
|
1016
|
+
}, Wr = b(void 0), Q = (e) => {
|
|
1016
1017
|
if (O("update:modelValue", e), !M.value) return;
|
|
1017
1018
|
let t;
|
|
1018
|
-
t = e === null ? null : Array.isArray(e) ? e.map((e, t) =>
|
|
1019
|
+
t = e === null ? null : Array.isArray(e) ? e.map((e, t) => Ur(t === 0 ? "start" : "end")) : Ur("start"), Wr.value = t, O("update:time", t);
|
|
1019
1020
|
}, $ = (e = {}) => {
|
|
1020
|
-
let t = !!e.finalize, n =
|
|
1021
|
+
let t = !!e.finalize, n = lr("start");
|
|
1021
1022
|
if (!D.range) {
|
|
1022
1023
|
if (n === "empty") {
|
|
1023
1024
|
Q(null);
|
|
1024
1025
|
return;
|
|
1025
1026
|
}
|
|
1026
1027
|
if (n === "partial") return;
|
|
1027
|
-
let e =
|
|
1028
|
+
let e = zr("start");
|
|
1028
1029
|
if (!e) return;
|
|
1029
1030
|
if (W(e)) {
|
|
1030
1031
|
if (!t) return;
|
|
1031
|
-
let n = H(e), r =
|
|
1032
|
+
let n = H(e), r = Hr(e);
|
|
1032
1033
|
if (r) {
|
|
1033
1034
|
let e = H(r);
|
|
1034
|
-
J.value.start =
|
|
1035
|
+
J.value.start = Vr(r), Q(e), Z({
|
|
1035
1036
|
code: "disabled_date",
|
|
1036
1037
|
original: n,
|
|
1037
1038
|
normalized: e
|
|
@@ -1046,18 +1047,18 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
1046
1047
|
Q(H(e));
|
|
1047
1048
|
return;
|
|
1048
1049
|
}
|
|
1049
|
-
let r =
|
|
1050
|
+
let r = lr("end");
|
|
1050
1051
|
if (n === "empty" && r === "empty") {
|
|
1051
1052
|
Q([]);
|
|
1052
1053
|
return;
|
|
1053
1054
|
}
|
|
1054
1055
|
if (n === "partial" || r === "partial" || n === "empty") return;
|
|
1055
|
-
let i =
|
|
1056
|
+
let i = zr("start");
|
|
1056
1057
|
if (!i) return;
|
|
1057
|
-
let a = r === "empty" ? null :
|
|
1058
|
+
let a = r === "empty" ? null : zr("end"), o = H(i), s = a ? H(a) : null, c = i, l = !1;
|
|
1058
1059
|
if (W(i)) {
|
|
1059
1060
|
if (!t) return;
|
|
1060
|
-
let e =
|
|
1061
|
+
let e = Hr(i), n = s ? [o, s] : [o];
|
|
1061
1062
|
if (!e) {
|
|
1062
1063
|
J.value.start = Y(), J.value.end = Y(), Q([]), Z({
|
|
1063
1064
|
code: "disabled_range_start",
|
|
@@ -1066,7 +1067,7 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
1066
1067
|
});
|
|
1067
1068
|
return;
|
|
1068
1069
|
}
|
|
1069
|
-
if (c = e, l = !0, J.value.start =
|
|
1070
|
+
if (c = e, l = !0, J.value.start = Vr(e), !a) {
|
|
1070
1071
|
let t = [H(e)];
|
|
1071
1072
|
Q(t), Z({
|
|
1072
1073
|
code: "disabled_range_start",
|
|
@@ -1083,7 +1084,7 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
1083
1084
|
let u = a, d = !1;
|
|
1084
1085
|
if (W(a)) {
|
|
1085
1086
|
if (!t) return;
|
|
1086
|
-
let e =
|
|
1087
|
+
let e = Hr(a), n = [o, s];
|
|
1087
1088
|
if (!e) {
|
|
1088
1089
|
let e = [H(c)];
|
|
1089
1090
|
J.value.end = Y(), Q(e), l && Z({
|
|
@@ -1097,7 +1098,7 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
1097
1098
|
});
|
|
1098
1099
|
return;
|
|
1099
1100
|
}
|
|
1100
|
-
u = e, d = !0, J.value.end =
|
|
1101
|
+
u = e, d = !0, J.value.end = Vr(e);
|
|
1101
1102
|
}
|
|
1102
1103
|
if (u.isBefore(c, M.value ? "second" : "day")) {
|
|
1103
1104
|
if (!t) return;
|
|
@@ -1128,63 +1129,63 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
1128
1129
|
normalized: f
|
|
1129
1130
|
});
|
|
1130
1131
|
};
|
|
1131
|
-
return
|
|
1132
|
+
return tt(() => {
|
|
1132
1133
|
document.removeEventListener("focusin", U), document.removeEventListener("click", U, !0);
|
|
1133
|
-
}), (t, n) => (y(),
|
|
1134
|
+
}), (t, n) => (y(), qe(Pe, v({
|
|
1134
1135
|
id: d.id,
|
|
1135
1136
|
class: "bb-date-picker-input",
|
|
1136
|
-
clearable: d.clearable &&
|
|
1137
|
+
clearable: d.clearable && Gt.value,
|
|
1137
1138
|
compact: S(A).compact,
|
|
1138
1139
|
description: d.description,
|
|
1139
1140
|
disabled: d.disabled,
|
|
1140
|
-
errors: S(
|
|
1141
|
+
errors: S(Ot),
|
|
1141
1142
|
"has-errors": d.hasErrors,
|
|
1142
|
-
"has-value":
|
|
1143
|
+
"has-value": Gt.value,
|
|
1143
1144
|
"has-warnings": d.hasWarnings,
|
|
1144
1145
|
"hide-label": d.hideLabel,
|
|
1145
1146
|
hint: d.hint,
|
|
1146
1147
|
"input-align": d.inputAlign,
|
|
1147
1148
|
label: d.label,
|
|
1148
1149
|
"label-align": d.labelAlign,
|
|
1149
|
-
"label-mode":
|
|
1150
|
+
"label-mode": Kt.value,
|
|
1150
1151
|
"label-position": d.labelPosition,
|
|
1151
1152
|
layout: S(A).layout,
|
|
1152
1153
|
loading: d.loading,
|
|
1153
1154
|
name: d.name,
|
|
1154
1155
|
passthrough: S(j),
|
|
1155
|
-
readonly: S(
|
|
1156
|
+
readonly: S(Mt),
|
|
1156
1157
|
reverse: S(A).reverse,
|
|
1157
|
-
"show-asterisk": S(
|
|
1158
|
-
"show-hint":
|
|
1158
|
+
"show-asterisk": S(Dt),
|
|
1159
|
+
"show-hint": Wt.value,
|
|
1159
1160
|
warnings: d.warnings
|
|
1160
|
-
}, S(j).forwardAttrs),
|
|
1161
|
-
label: C((e) => [x(t.$slots, "label",
|
|
1162
|
-
input: C(({ id: r, hasErrors: i, hasWarnings: a, ariaDescribedby: o }) => [
|
|
1161
|
+
}, S(j).forwardAttrs), Je({
|
|
1162
|
+
label: C((e) => [x(t.$slots, "label", $e(Ze(e)))]),
|
|
1163
|
+
input: C(({ id: r, hasErrors: i, hasWarnings: a, ariaDescribedby: o }) => [Ye(Fe, {
|
|
1163
1164
|
ref_key: "wrapper",
|
|
1164
1165
|
ref: L,
|
|
1165
|
-
active:
|
|
1166
|
+
active: It.value,
|
|
1166
1167
|
"append:icon": S(D)["append:icon"],
|
|
1167
|
-
class:
|
|
1168
|
-
clearable: d.clearable && !S(fe)(S(
|
|
1168
|
+
class: Qe(["bb-date-picker-input__field", { "bb-date-picker-input__field--range": d.range }]),
|
|
1169
|
+
clearable: d.clearable && !S(fe)(S(jt)),
|
|
1169
1170
|
compact: S(A).compact,
|
|
1170
1171
|
disabled: d.disabled,
|
|
1171
1172
|
"has-errors": i,
|
|
1172
|
-
"has-value":
|
|
1173
|
+
"has-value": Gt.value,
|
|
1173
1174
|
"has-warnings": a,
|
|
1174
1175
|
loading: d.loading,
|
|
1175
1176
|
passthrough: S(j),
|
|
1176
1177
|
"prepend:icon": S(D)["prepend:icon"],
|
|
1177
|
-
readonly: S(
|
|
1178
|
+
readonly: S(Mt),
|
|
1178
1179
|
variant: d.variant,
|
|
1179
|
-
onClick:
|
|
1180
|
-
"onClick:clear":
|
|
1181
|
-
onFocusin:
|
|
1182
|
-
},
|
|
1180
|
+
onClick: an,
|
|
1181
|
+
"onClick:clear": Fn,
|
|
1182
|
+
onFocusin: vn
|
|
1183
|
+
}, Je({
|
|
1183
1184
|
"prepend:outer": C(() => [x(t.$slots, "prepend:outer")]),
|
|
1184
1185
|
prepend: C(() => [x(t.$slots, "prepend")]),
|
|
1185
|
-
append: C(() => [
|
|
1186
|
+
append: C(() => [cn.value ? h("", !0) : (y(), qe(Ae, {
|
|
1186
1187
|
key: 0,
|
|
1187
|
-
"active-segment":
|
|
1188
|
+
"active-segment": Dn.value,
|
|
1188
1189
|
adaptive: S(A).adaptive,
|
|
1189
1190
|
ampm: d.ampm,
|
|
1190
1191
|
anchor: L.value,
|
|
@@ -1192,16 +1193,16 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
1192
1193
|
disabled: d.disabled,
|
|
1193
1194
|
"first-day-of-week": d.firstDayOfWeek,
|
|
1194
1195
|
floating: S(A).floating,
|
|
1195
|
-
label:
|
|
1196
|
+
label: Nn.value,
|
|
1196
1197
|
max: d.max,
|
|
1197
1198
|
min: d.min,
|
|
1198
|
-
"model-value":
|
|
1199
|
+
"model-value": Pn.value,
|
|
1199
1200
|
"number-of-months": d.numberOfMonths,
|
|
1200
1201
|
"off-canvas-props": d.offCanvasProps,
|
|
1201
|
-
open: S(
|
|
1202
|
-
pt: S(j).forward(
|
|
1202
|
+
open: S(Ht),
|
|
1203
|
+
pt: S(j).forward(qt, S(je).states),
|
|
1203
1204
|
range: S(D).range,
|
|
1204
|
-
readonly: S(
|
|
1205
|
+
readonly: S(Mt),
|
|
1205
1206
|
seconds: d.seconds,
|
|
1206
1207
|
selectable: d.selectable,
|
|
1207
1208
|
step: d.step,
|
|
@@ -1209,104 +1210,104 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
1209
1210
|
"transition-duration": d.transitionDuration,
|
|
1210
1211
|
type: d.type,
|
|
1211
1212
|
utc: d.utc,
|
|
1212
|
-
onGridPick:
|
|
1213
|
+
onGridPick: Sn["onUpdate:modelValue"],
|
|
1213
1214
|
onHidden: n[1] ||= (e) => S(O)("hidden"),
|
|
1214
|
-
onHide:
|
|
1215
|
-
onShow:
|
|
1215
|
+
onHide: Vt,
|
|
1216
|
+
onShow: Bt,
|
|
1216
1217
|
onShown: n[2] ||= (e) => S(O)("shown"),
|
|
1217
|
-
onTimePick:
|
|
1218
|
-
"onUpdate:open": S(
|
|
1219
|
-
},
|
|
1218
|
+
onTimePick: On,
|
|
1219
|
+
"onUpdate:open": S(Ut)
|
|
1220
|
+
}, Je({
|
|
1220
1221
|
activator: C(({ props: e }) => [_("button", v({
|
|
1221
|
-
"aria-disabled": S(
|
|
1222
|
+
"aria-disabled": S(Nt) || void 0,
|
|
1222
1223
|
class: "bb-segmented-field__activator",
|
|
1223
1224
|
disabled: d.disabled || d.readonly,
|
|
1224
1225
|
type: "button"
|
|
1225
|
-
}, v(e, S(j).activator)), [
|
|
1226
|
+
}, v(e, S(j).activator)), [Ye(Ne, {
|
|
1226
1227
|
class: "bb-segmented-field__trigger-icon",
|
|
1227
|
-
icon: S(
|
|
1228
|
-
}, null, 8, ["icon"])], 16,
|
|
1229
|
-
day: C((e) => [x(t.$slots, "day",
|
|
1230
|
-
"day:append": C((e) => [x(t.$slots, "day:append",
|
|
1228
|
+
icon: S(Et)
|
|
1229
|
+
}, null, 8, ["icon"])], 16, bt)]),
|
|
1230
|
+
day: C((e) => [x(t.$slots, "day", $e(Ze(e)))]),
|
|
1231
|
+
"day:append": C((e) => [x(t.$slots, "day:append", $e(Ze(e)))]),
|
|
1231
1232
|
_: 2
|
|
1232
|
-
}, [
|
|
1233
|
+
}, [rt(Ft(), (e) => ({
|
|
1233
1234
|
name: e,
|
|
1234
|
-
fn: C((n) => [x(t.$slots, e,
|
|
1235
|
+
fn: C((n) => [x(t.$slots, e, $e(Ze(n)))])
|
|
1235
1236
|
}))]), 1032, /* @__PURE__ */ "active-segment.adaptive.ampm.anchor.clearable.disabled.first-day-of-week.floating.label.max.min.model-value.number-of-months.off-canvas-props.open.pt.range.readonly.seconds.selectable.step.time.transition-duration.type.utc.onGridPick.onUpdate:open".split("."))), x(t.$slots, "append", {}, () => [t.$slots.suffix ? (y(), g("span", v({
|
|
1236
1237
|
key: 0,
|
|
1237
1238
|
class: "bb-field-input__suffix"
|
|
1238
1239
|
}, S(j).suffix), [x(t.$slots, "suffix")], 16)) : h("", !0)])]),
|
|
1239
1240
|
"append:outer": C(() => [x(t.$slots, "append:outer")]),
|
|
1240
1241
|
default: C(() => [_("div", {
|
|
1241
|
-
class:
|
|
1242
|
-
"bb-segmented-field__fields--empty":
|
|
1242
|
+
class: Qe(["bb-segmented-field__fields", {
|
|
1243
|
+
"bb-segmented-field__fields--empty": Mr.value,
|
|
1243
1244
|
"bb-segmented-field__fields--range": d.range
|
|
1244
1245
|
}]),
|
|
1245
|
-
style:
|
|
1246
|
-
}, [
|
|
1246
|
+
style: et({ "--fields-min-ch": S(ar) })
|
|
1247
|
+
}, [Mr.value ? (y(), g("span", {
|
|
1247
1248
|
key: 0,
|
|
1248
1249
|
"aria-hidden": "true",
|
|
1249
1250
|
class: "bb-segmented-field__placeholder",
|
|
1250
|
-
onClick: n[0] ||= (...e) => S(
|
|
1251
|
-
},
|
|
1252
|
-
class:
|
|
1253
|
-
dir:
|
|
1254
|
-
}, [(y(!0), g(
|
|
1251
|
+
onClick: n[0] ||= (...e) => S(cr) && S(cr)(...e)
|
|
1252
|
+
}, it(jr.value), 1)) : h("", !0), (y(!0), g(Ke, null, rt(Xn.value, (t, n) => (y(), g(Ke, { key: t.key }, [_("span", {
|
|
1253
|
+
class: Qe(["bb-segmented-field__run", `bb-segmented-field__run--${t.kind}`]),
|
|
1254
|
+
dir: $n(t)
|
|
1255
|
+
}, [(y(!0), g(Ke, null, rt(t.items, ({ descriptor: n, index: a }, s) => (y(), g(Ke, { key: S(nr)(n) }, [
|
|
1255
1256
|
n.field === "week" ? (y(), g("span", {
|
|
1256
1257
|
key: 0,
|
|
1257
1258
|
"aria-hidden": "true",
|
|
1258
1259
|
class: "bb-segmented-field__separator bb-segmented-field__week-prefix",
|
|
1259
|
-
onClick: (e) => S(
|
|
1260
|
-
}, "W", 8,
|
|
1260
|
+
onClick: (e) => S(sr)(n, { select: !0 })
|
|
1261
|
+
}, "W", 8, ht)) : h("", !0),
|
|
1261
1262
|
_("span", {
|
|
1262
1263
|
class: "bb-segmented-field__field-sizer",
|
|
1263
|
-
"data-value": S(
|
|
1264
|
-
}, [
|
|
1265
|
-
id: a === 0 ? r :
|
|
1264
|
+
"data-value": S(ir)(n)
|
|
1265
|
+
}, [lt(_("input", v({
|
|
1266
|
+
id: a === 0 ? r : _r(n, r),
|
|
1266
1267
|
ref_for: !0,
|
|
1267
|
-
ref: (e) => S(
|
|
1268
|
-
"aria-describedby":
|
|
1268
|
+
ref: (e) => S(tr)[S(nr)(n)] = e,
|
|
1269
|
+
"aria-describedby": $t(o, r),
|
|
1269
1270
|
"aria-disabled": d.disabled || void 0,
|
|
1270
1271
|
"aria-invalid": i ? "true" : void 0,
|
|
1271
|
-
"aria-label":
|
|
1272
|
-
"aria-readonly":
|
|
1272
|
+
"aria-label": br(n),
|
|
1273
|
+
"aria-readonly": ln.value || void 0,
|
|
1273
1274
|
autocomplete: S(A).autocomplete,
|
|
1274
1275
|
autofocus: d.autofocus && a === 0,
|
|
1275
1276
|
class: ["bb-segmented-field__input", [`bb-segmented-field__input--${n.field}`, `bb-segmented-field__input--${n.segment}`]],
|
|
1276
1277
|
disabled: d.disabled,
|
|
1277
|
-
inputmode:
|
|
1278
|
-
maxlength:
|
|
1279
|
-
name:
|
|
1280
|
-
readonly:
|
|
1281
|
-
required: S(
|
|
1282
|
-
"aria-required": S(
|
|
1283
|
-
tabindex:
|
|
1278
|
+
inputmode: un(n.field),
|
|
1279
|
+
maxlength: Gn(n.field),
|
|
1280
|
+
name: vr(n),
|
|
1281
|
+
readonly: ln.value,
|
|
1282
|
+
required: S(kt),
|
|
1283
|
+
"aria-required": S(At),
|
|
1284
|
+
tabindex: Un(a) ? 0 : -1,
|
|
1284
1285
|
type: "text",
|
|
1285
|
-
value: S(
|
|
1286
|
-
onBlur: (e) => S(
|
|
1287
|
-
onFocus: (e) =>
|
|
1288
|
-
onInput: (e) =>
|
|
1289
|
-
onKeydown: (e) =>
|
|
1290
|
-
onPaste: (e) => S(
|
|
1291
|
-
}, { ref_for: !0 }, v(S(j).controlAttrs, S(j).input)), null, 16,
|
|
1286
|
+
value: S(rr)(S(J)[n.segment][n.field]),
|
|
1287
|
+
onBlur: (e) => S(pr)(n),
|
|
1288
|
+
onFocus: (e) => En(n, e),
|
|
1289
|
+
onInput: (e) => hr(n, e),
|
|
1290
|
+
onKeydown: (e) => sn(n, e),
|
|
1291
|
+
onPaste: (e) => S(mr)(n, e)
|
|
1292
|
+
}, { ref_for: !0 }, v(S(j).controlAttrs, S(j).input)), null, 16, _t), [[S(e)]])], 8, gt),
|
|
1292
1293
|
s < t.items.length - 1 ? (y(), g("span", {
|
|
1293
1294
|
key: 1,
|
|
1294
1295
|
"aria-hidden": "true",
|
|
1295
1296
|
class: "bb-segmented-field__separator",
|
|
1296
1297
|
role: "presentation",
|
|
1297
|
-
onClick: (e) => S(
|
|
1298
|
-
},
|
|
1299
|
-
], 64))), 128))], 10,
|
|
1298
|
+
onClick: (e) => S(sr)(q.value[a + 1], { select: !0 })
|
|
1299
|
+
}, it(er(q.value[a], q.value[a + 1])), 9, vt)) : h("", !0)
|
|
1300
|
+
], 64))), 128))], 10, mt), n < Xn.value.length - 1 ? (y(), g("span", {
|
|
1300
1301
|
key: 0,
|
|
1301
1302
|
"aria-hidden": "true",
|
|
1302
|
-
class:
|
|
1303
|
+
class: Qe(["bb-segmented-field__separator", { "bb-segmented-field__separator--range": q.value[Zn(t)].segment !== q.value[Zn(t) + 1].segment }]),
|
|
1303
1304
|
role: "presentation",
|
|
1304
|
-
onClick: (e) => S(
|
|
1305
|
-
},
|
|
1306
|
-
id:
|
|
1305
|
+
onClick: (e) => S(sr)(q.value[Zn(t) + 1], { select: !0 })
|
|
1306
|
+
}, it(er(q.value[Zn(t)], q.value[Zn(t) + 1])), 11, yt)) : h("", !0)], 64))), 128))], 6), _("span", {
|
|
1307
|
+
id: Qt(r),
|
|
1307
1308
|
class: "bb-date-picker-input__accessible-description",
|
|
1308
1309
|
hidden: ""
|
|
1309
|
-
},
|
|
1310
|
+
}, it(S(I)("datePickerInput.dateFormat")) + " " + it(kr.value), 9, xt)]),
|
|
1310
1311
|
_: 2
|
|
1311
1312
|
}, [t.$slots.prefix ? {
|
|
1312
1313
|
name: "prefix",
|
|
@@ -1331,7 +1332,7 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
1331
1332
|
_: 2
|
|
1332
1333
|
}, [t.$slots.description ? {
|
|
1333
1334
|
name: "description",
|
|
1334
|
-
fn: C((e) => [x(t.$slots, "description",
|
|
1335
|
+
fn: C((e) => [x(t.$slots, "description", $e(Ze(e)))]),
|
|
1335
1336
|
key: "0"
|
|
1336
1337
|
} : void 0]), 1040, [
|
|
1337
1338
|
"id",
|
|
@@ -1362,4 +1363,4 @@ var pt = ["dir"], mt = ["onClick"], ht = ["data-value"], gt = [
|
|
|
1362
1363
|
]));
|
|
1363
1364
|
}
|
|
1364
1365
|
});
|
|
1365
|
-
export {
|
|
1366
|
+
export { Ct as default };
|