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/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -29,10 +29,11 @@ import { spokenTimeOf as Se } from "../BbCalendar/useDayjsLocale.js";
|
|
|
29
29
|
import { useHydrated as Ce } from "../../composables/useHydrated.js";
|
|
30
30
|
import { localeOf as we } from "../../utilities/calendar/index.js";
|
|
31
31
|
import { BB_TIME_PICKER_INPUT_PT as l } from "./types.js";
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
32
|
+
import { useInternalIcon as Te } from "../../composables/useInternalIcon.js";
|
|
33
|
+
import { Fragment as u, computed as d, createBlock as Ee, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as De, createVNode as h, defineComponent as Oe, guardReactiveProps as ke, mergeProps as g, normalizeClass as _, normalizeProps as v, normalizeStyle as Ae, onBeforeUnmount as je, onDeactivated as Me, openBlock as y, ref as b, renderList as Ne, renderSlot as x, toDisplayString as S, unref as C, useAttrs as Pe, watch as Fe, withCtx as w, withDirectives as Ie, withModifiers as Le } from "vue";
|
|
34
|
+
import { createReusableTemplate as Re } from "@vueuse/core";
|
|
34
35
|
// src/components/BbTimePickerInput/BbTimePickerInput.vue?vue&type=script&setup=true&lang.ts
|
|
35
|
-
var
|
|
36
|
+
var ze = ["dir"], Be = ["data-value"], Ve = [
|
|
36
37
|
"id",
|
|
37
38
|
"aria-describedby",
|
|
38
39
|
"aria-disabled",
|
|
@@ -55,13 +56,13 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
55
56
|
"onInput",
|
|
56
57
|
"onKeydown",
|
|
57
58
|
"onPaste"
|
|
58
|
-
],
|
|
59
|
+
], He = ["onClick"], Ue = ["onClick"], We = [
|
|
59
60
|
"aria-controls",
|
|
60
61
|
"aria-disabled",
|
|
61
62
|
"aria-expanded",
|
|
62
63
|
"aria-label",
|
|
63
64
|
"disabled"
|
|
64
|
-
],
|
|
65
|
+
], Ge = ["id"], Ke = /*@__PURE__*/ Oe({
|
|
65
66
|
mixins: [c(l)],
|
|
66
67
|
inheritAttrs: !1,
|
|
67
68
|
__name: "BbTimePickerInput",
|
|
@@ -319,77 +320,77 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
319
320
|
"inactive",
|
|
320
321
|
"update:modelValue"
|
|
321
322
|
],
|
|
322
|
-
setup(c, { emit:
|
|
323
|
-
let
|
|
323
|
+
setup(c, { emit: Oe }) {
|
|
324
|
+
let Ke = c, qe = Oe, Je = Te("clock", pe), { props: T, emit: E, showAsterisk: Ye, errors: Xe, required: Ze, ariaRequired: Qe, model: $e, readonly: et, locked: tt } = o(Ke, qe, {
|
|
324
325
|
componentName: "BbTimePickerInput",
|
|
325
|
-
identifierFallback: () =>
|
|
326
|
+
identifierFallback: () => Ke.label,
|
|
326
327
|
leaveOn: "inactive"
|
|
327
328
|
});
|
|
328
329
|
process.env.NODE_ENV !== "production" && n("BbTimePickerInput", t("BbTimePickerInput"));
|
|
329
|
-
let
|
|
330
|
-
|
|
330
|
+
let nt = i(), { t: D } = ee(), rt = ne(), O = b(!1), it = b(!1), k = () => {
|
|
331
|
+
it.value = !1;
|
|
331
332
|
};
|
|
332
333
|
Me(() => {
|
|
333
|
-
|
|
334
|
-
}), je(
|
|
335
|
-
let
|
|
334
|
+
X.value = !1, O.value ? Zt() : k();
|
|
335
|
+
}), je(k);
|
|
336
|
+
let at = d(() => T.persistentHint || it.value), A = d(() => de(T.modelValue)), j = a("BbTimePickerInput", T, {
|
|
336
337
|
labelMode: "outside",
|
|
337
338
|
adaptive: !0,
|
|
338
339
|
autocomplete: "off",
|
|
339
340
|
compact: !1,
|
|
340
341
|
reverse: !1
|
|
341
|
-
}),
|
|
342
|
+
}), ot = d(() => j.labelMode), M = se({
|
|
342
343
|
component: "BbTimePickerInput",
|
|
343
344
|
attrs: Pe(),
|
|
344
345
|
controlAttrs: ae,
|
|
345
|
-
props:
|
|
346
|
+
props: T,
|
|
346
347
|
parts: l.parts,
|
|
347
348
|
states: l.states,
|
|
348
349
|
active: {
|
|
349
|
-
...oe(
|
|
350
|
-
open: () =>
|
|
350
|
+
...oe(T, () => A.value),
|
|
351
|
+
open: () => X.value
|
|
351
352
|
},
|
|
352
353
|
variant: {
|
|
353
354
|
...l.variant,
|
|
354
|
-
current: () =>
|
|
355
|
+
current: () => T.variant ?? "outline"
|
|
355
356
|
}
|
|
356
|
-
}), N = xe(),
|
|
357
|
+
}), N = xe(), st = (e, t) => N.isPm(t) ? e === 12 ? 12 : e + 12 : e === 12 ? 0 : e, ct = (e) => {
|
|
357
358
|
let t = e >= 12 ? "PM" : "AM", n = e % 12;
|
|
358
359
|
return n === 0 && (n = 12), {
|
|
359
360
|
hour: String(n).padStart(2, "0"),
|
|
360
361
|
meridiem: t
|
|
361
362
|
};
|
|
362
|
-
}, P =
|
|
363
|
+
}, P = b(null), F = b(null), lt = (e) => {
|
|
363
364
|
F.value = e.el?.parentElement ?? null;
|
|
364
|
-
},
|
|
365
|
-
id:
|
|
366
|
-
class: ["bb-time-picker-input__panel", { "bb-time-picker-input__panel--sheet":
|
|
367
|
-
inert:
|
|
368
|
-
},
|
|
369
|
-
let n = [e,
|
|
365
|
+
}, ut = b(null), dt = (e) => `btpi-description_${e}`, ft = (e) => `btpi-panel_${e}`, pt = (e) => g({
|
|
366
|
+
id: ft(e),
|
|
367
|
+
class: ["bb-time-picker-input__panel", { "bb-time-picker-input__panel--sheet": Z.value }],
|
|
368
|
+
inert: en.value
|
|
369
|
+
}, Z.value ? {} : M.panel ?? {}), mt = (e, t) => {
|
|
370
|
+
let n = [e, dt(t)].filter((e) => !!e?.trim()).flatMap((e) => e.split(/\s+/)).filter(Boolean);
|
|
370
371
|
return Array.from(new Set(n)).join(" ");
|
|
371
|
-
}, { isMobile: I } = ie(),
|
|
372
|
-
let t =
|
|
372
|
+
}, { isMobile: I } = ie(), ht = d(() => T.disableWriting === "mobile" ? !I.value : T.disableWriting === "desktop" ? I.value : !T.disableWriting), gt = d(() => !!T.readonly || !ht.value), _t = (e) => ht.value ? z.value[e].kind === "enum" ? "none" : "numeric" : "none", vt = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/, L = (e) => {
|
|
373
|
+
let t = vt.exec(e);
|
|
373
374
|
if (!t) return null;
|
|
374
375
|
let [, n, r] = t, i = parseInt(n, 10), a = parseInt(r, 10);
|
|
375
376
|
return i > 23 || a > 59 ? null : i * 60 + a;
|
|
376
377
|
};
|
|
377
|
-
for (let [e, t] of [["min",
|
|
378
|
+
for (let [e, t] of [["min", T.min], ["max", T.max]]) t && L(t) === null && rt.throw(`BbTimePickerInput: ${e} must be in the format HH:mm`);
|
|
378
379
|
let R = d(() => {
|
|
379
380
|
let e = ["hour", "minute"];
|
|
380
|
-
|
|
381
|
+
T.seconds && e.push("second"), T.ampm && e.push("meridiem");
|
|
381
382
|
let t = e.map((e) => ({
|
|
382
383
|
segment: "start",
|
|
383
384
|
field: e
|
|
384
385
|
}));
|
|
385
|
-
if (!
|
|
386
|
+
if (!T.range) return t;
|
|
386
387
|
let n = e.map((e) => ({
|
|
387
388
|
segment: "end",
|
|
388
389
|
field: e
|
|
389
390
|
}));
|
|
390
391
|
return [...t, ...n];
|
|
391
392
|
}), z = d(() => ({
|
|
392
|
-
hour:
|
|
393
|
+
hour: T.ampm ? {
|
|
393
394
|
kind: "numeric",
|
|
394
395
|
maxLength: 2,
|
|
395
396
|
max: 12,
|
|
@@ -422,7 +423,7 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
422
423
|
label: "Second"
|
|
423
424
|
},
|
|
424
425
|
meridiem: N.fieldSpec.value
|
|
425
|
-
})),
|
|
426
|
+
})), yt = (e) => z.value[e].kind === "numeric" ? void 0 : z.value[e].maxLength, bt = d(() => ce(R.value, (e) => e === "meridiem" ? "meridiem" : "time")), B = (e) => e.items.at(-1).index, xt = (e, t) => e.segment === t.segment ? t.field === "meridiem" ? " " : ":" : "–", { fields: V, fieldRefs: St, descriptorKey: Ct, emptyFieldGroup: wt, getSizedValue: Tt, minChars: Et, updateAllSizedValues: H, isOwnField: Dt, focusField: Ot, focusFirstField: kt, segmentStatus: U, onFieldInput: At, onFieldKeydown: jt, onFieldFocus: Mt, onFieldBlur: Nt, onFieldPaste: Pt, displayOf: Ft } = le({
|
|
426
427
|
fieldOrder: R,
|
|
427
428
|
specs: z,
|
|
428
429
|
segments: ["start", "end"],
|
|
@@ -434,52 +435,52 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
434
435
|
],
|
|
435
436
|
optionalGroups: [["second"]],
|
|
436
437
|
advanceKeys: [":", " "],
|
|
437
|
-
onDirty: () =>
|
|
438
|
-
numberingSystem: () => we(
|
|
439
|
-
}),
|
|
438
|
+
onDirty: () => J({ finalize: !1 }),
|
|
439
|
+
numberingSystem: () => we(nt.locale).numberingSystem
|
|
440
|
+
}), It = (e, t) => {
|
|
440
441
|
if (e.field === "meridiem") {
|
|
441
442
|
let n = V.value[e.segment], r = N.match(t.target.value, n.meridiem);
|
|
442
|
-
r && r !== n.meridiem && (n.meridiem = r,
|
|
443
|
+
r && r !== n.meridiem && (n.meridiem = r, J({ finalize: !1 }));
|
|
443
444
|
}
|
|
444
|
-
|
|
445
|
+
At(e, t);
|
|
445
446
|
};
|
|
446
447
|
N.onRelabel((e, t) => {
|
|
447
448
|
for (let n of Object.values(V.value)) n.meridiem === e && (n.meridiem = t);
|
|
448
449
|
H();
|
|
449
450
|
});
|
|
450
|
-
let
|
|
451
|
-
if (
|
|
452
|
-
},
|
|
451
|
+
let Lt = (e, t) => T.range ? `${t}-${e.segment}-${e.field}` : `${t}-${e.field}`, Rt = (e) => {
|
|
452
|
+
if (T.name) return T.range ? `${T.name}-${e.segment}-${e.field}` : `${T.name}-${e.field}`;
|
|
453
|
+
}, zt = {
|
|
453
454
|
hour: "datePickerInput.hourField",
|
|
454
455
|
minute: "datePickerInput.minuteField",
|
|
455
456
|
second: "datePickerInput.secondField",
|
|
456
457
|
meridiem: "datePickerInput.meridiemField"
|
|
457
|
-
},
|
|
458
|
-
let t =
|
|
459
|
-
return
|
|
460
|
-
},
|
|
461
|
-
let e =
|
|
462
|
-
return
|
|
463
|
-
}),
|
|
458
|
+
}, Bt = (e) => {
|
|
459
|
+
let t = D(zt[e.field]).value;
|
|
460
|
+
return T.range ? D(e.segment === "start" ? "datePickerInput.startFieldLabel" : "datePickerInput.endFieldLabel", t).value : t;
|
|
461
|
+
}, Vt = d(() => {
|
|
462
|
+
let e = D(T.seconds ? "datePickerInput.timeFormatSeconds" : "datePickerInput.timeFormat").value;
|
|
463
|
+
return T.range ? `${e} – ${e}` : e;
|
|
464
|
+
}), Ht = d(() => T.placeholder || Vt.value), Ut = d(() => R.value.every((e) => !V.value[e.segment][e.field])), Wt = (e) => {
|
|
464
465
|
if (!e.hour) return 0;
|
|
465
466
|
let t = parseInt(e.hour, 10);
|
|
466
|
-
return
|
|
467
|
-
},
|
|
468
|
-
if (!
|
|
467
|
+
return T.ampm ? st(t, e.meridiem || "AM") : t;
|
|
468
|
+
}, Gt = (e, t) => {
|
|
469
|
+
if (!T.ampm) {
|
|
469
470
|
e.hour = String(t).padStart(2, "0");
|
|
470
471
|
return;
|
|
471
472
|
}
|
|
472
|
-
let n =
|
|
473
|
+
let n = ct(t);
|
|
473
474
|
e.hour = n.hour, e.meridiem = N.label(n.meridiem);
|
|
474
475
|
}, W = (e) => {
|
|
475
|
-
let t =
|
|
476
|
+
let t = wt();
|
|
476
477
|
if (!e) return t;
|
|
477
|
-
let n =
|
|
478
|
+
let n = vt.exec(e);
|
|
478
479
|
if (!n) return t;
|
|
479
480
|
let [, r, i, a] = n, o = parseInt(r, 10);
|
|
480
|
-
return o > 23 || parseInt(i, 10) > 59 || (
|
|
481
|
+
return o > 23 || parseInt(i, 10) > 59 || (Gt(t, o), t.minute = i.padStart(2, "0"), t.second = T.seconds && a ? a.padStart(2, "0") : ""), t;
|
|
481
482
|
}, G = (e) => {
|
|
482
|
-
if (
|
|
483
|
+
if (T.range) {
|
|
483
484
|
let [t, n] = Array.isArray(e) ? e : [];
|
|
484
485
|
V.value = {
|
|
485
486
|
start: W(t),
|
|
@@ -487,69 +488,69 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
487
488
|
};
|
|
488
489
|
} else V.value = {
|
|
489
490
|
start: W(typeof e == "string" ? e : void 0),
|
|
490
|
-
end:
|
|
491
|
+
end: wt()
|
|
491
492
|
};
|
|
492
|
-
},
|
|
493
|
-
G(
|
|
493
|
+
}, Kt = () => {
|
|
494
|
+
G(T.modelValue);
|
|
494
495
|
};
|
|
495
|
-
G(
|
|
496
|
+
G(T.modelValue), H(), Fe(() => T.modelValue, (e) => {
|
|
496
497
|
if (e === null || Array.isArray(e) && e.length === 0) {
|
|
497
498
|
G(e), H();
|
|
498
499
|
return;
|
|
499
500
|
}
|
|
500
501
|
let t = document.activeElement;
|
|
501
|
-
t &&
|
|
502
|
+
t && Dt(t) || (G(e), H());
|
|
502
503
|
});
|
|
503
|
-
let
|
|
504
|
-
let t = V.value[e], n = String(
|
|
505
|
-
return
|
|
506
|
-
},
|
|
504
|
+
let K = (e) => {
|
|
505
|
+
let t = V.value[e], n = String(Wt(t)).padStart(2, "0"), r = (t.minute || "0").padStart(2, "0");
|
|
506
|
+
return T.seconds ? `${n}:${r}:${(t.second || "0").padStart(2, "0")}` : `${n}:${r}`;
|
|
507
|
+
}, q = (e) => E("error", e), qt = (e) => {
|
|
507
508
|
let t = L(e);
|
|
508
|
-
return t === null ? e :
|
|
509
|
-
},
|
|
509
|
+
return t === null ? e : T.min && t < L(T.min) ? T.min + (T.seconds ? ":00" : "") : T.max && t > L(T.max) ? T.max + (T.seconds ? ":00" : "") : e;
|
|
510
|
+
}, Jt = () => U("start") === "partial" ? !0 : T.range ? U("end") === "partial" : !1, J = (e = {}) => {
|
|
510
511
|
let t = !!e.finalize, n = U("start");
|
|
511
|
-
if (!
|
|
512
|
+
if (!T.range) {
|
|
512
513
|
if (n === "empty") {
|
|
513
|
-
|
|
514
|
+
E("update:modelValue", null);
|
|
514
515
|
return;
|
|
515
516
|
}
|
|
516
517
|
if (n === "partial") return;
|
|
517
|
-
let e =
|
|
518
|
+
let e = K("start"), r = qt(e);
|
|
518
519
|
if (r !== e) {
|
|
519
520
|
if (!t) return;
|
|
520
|
-
V.value.start = W(r), H(),
|
|
521
|
+
V.value.start = W(r), H(), E("update:modelValue", r), q({
|
|
521
522
|
code: "disabled_time",
|
|
522
523
|
original: e,
|
|
523
524
|
normalized: r
|
|
524
525
|
});
|
|
525
526
|
return;
|
|
526
527
|
}
|
|
527
|
-
|
|
528
|
+
E("update:modelValue", e);
|
|
528
529
|
return;
|
|
529
530
|
}
|
|
530
531
|
let r = U("end");
|
|
531
532
|
if (n === "empty" && r === "empty") {
|
|
532
|
-
|
|
533
|
+
E("update:modelValue", []);
|
|
533
534
|
return;
|
|
534
535
|
}
|
|
535
536
|
if (n === "partial" || r === "partial" || n === "empty") return;
|
|
536
|
-
let i =
|
|
537
|
+
let i = K("start"), a = qt(i);
|
|
537
538
|
if (a !== i) {
|
|
538
539
|
if (!t) return;
|
|
539
|
-
V.value.start = W(a),
|
|
540
|
+
V.value.start = W(a), q({
|
|
540
541
|
code: "disabled_time",
|
|
541
542
|
original: i,
|
|
542
543
|
normalized: a
|
|
543
544
|
}), i = a;
|
|
544
545
|
}
|
|
545
546
|
if (r === "empty") {
|
|
546
|
-
|
|
547
|
+
E("update:modelValue", [i]);
|
|
547
548
|
return;
|
|
548
549
|
}
|
|
549
|
-
let o =
|
|
550
|
+
let o = K("end"), s = qt(o);
|
|
550
551
|
if (s !== o) {
|
|
551
552
|
if (!t) return;
|
|
552
|
-
V.value.end = W(s),
|
|
553
|
+
V.value.end = W(s), q({
|
|
553
554
|
code: "disabled_time",
|
|
554
555
|
original: o,
|
|
555
556
|
normalized: s
|
|
@@ -558,84 +559,84 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
558
559
|
if (L(o) < L(i)) {
|
|
559
560
|
if (!t) return;
|
|
560
561
|
let e = { ...V.value.start };
|
|
561
|
-
V.value.start = { ...V.value.end }, V.value.end = e, H(),
|
|
562
|
+
V.value.start = { ...V.value.end }, V.value.end = e, H(), E("update:modelValue", [o, i]), q({
|
|
562
563
|
code: "end_before_start",
|
|
563
564
|
original: [i, o],
|
|
564
565
|
normalized: [o, i]
|
|
565
566
|
});
|
|
566
|
-
} else H(),
|
|
567
|
-
}, qt = () => {
|
|
568
|
-
D("update:modelValue", E.range ? [] : null);
|
|
569
|
-
}, Jt = () => {
|
|
570
|
-
k.value || (et.value = !0, D("active"), k.value = !0, document.addEventListener("focusin", J), document.addEventListener("click", J, !0));
|
|
571
|
-
}, J = (e) => {
|
|
572
|
-
let t = e.target;
|
|
573
|
-
t instanceof HTMLElement && P.value?.$el && (e.type === "focusin" && t.contains(P.value.$el) || P.value.$el.contains(t) || F.value?.contains(t) || Yt());
|
|
567
|
+
} else H(), E("update:modelValue", [i, o]);
|
|
574
568
|
}, Yt = () => {
|
|
575
|
-
|
|
576
|
-
},
|
|
577
|
-
|
|
569
|
+
E("update:modelValue", T.range ? [] : null);
|
|
570
|
+
}, Xt = () => {
|
|
571
|
+
O.value || (it.value = !0, E("active"), O.value = !0, document.addEventListener("focusin", Y), document.addEventListener("click", Y, !0));
|
|
572
|
+
}, Y = (e) => {
|
|
573
|
+
let t = e.target;
|
|
574
|
+
t instanceof HTMLElement && P.value?.$el && (e.type === "focusin" && t.contains(P.value.$el) || P.value.$el.contains(t) || F.value?.contains(t) || Zt());
|
|
575
|
+
}, Zt = () => {
|
|
576
|
+
J({ finalize: !0 }), Jt() && (Kt(), H()), O.value = !1, k(), E("inactive"), document.removeEventListener("focusin", Y), document.removeEventListener("click", Y, !0);
|
|
577
|
+
}, [Qt, $t] = Re(), X = b(!1), en = s(X, () => T.transitionDuration ?? fe.medium), tn = () => j.adaptive && I.value ? "canvas" : "popover", nn = b(tn()), Z = d(() => nn.value === "canvas");
|
|
578
|
+
Fe([
|
|
578
579
|
() => j.adaptive,
|
|
579
580
|
I,
|
|
580
|
-
|
|
581
|
+
X
|
|
581
582
|
], () => {
|
|
582
|
-
|
|
583
|
-
}), re(() =>
|
|
584
|
-
let
|
|
583
|
+
X.value || (nn.value = tn());
|
|
584
|
+
}), re(() => X.value && !Z.value, () => X.value = !1);
|
|
585
|
+
let rn = d(() => ({
|
|
585
586
|
side: "bottom",
|
|
586
587
|
size: "auto",
|
|
587
588
|
draggable: !0,
|
|
588
|
-
transitionDuration:
|
|
589
|
+
transitionDuration: T.transitionDuration,
|
|
589
590
|
hideClose: !0,
|
|
590
|
-
...r(
|
|
591
|
-
})),
|
|
592
|
-
|
|
593
|
-
},
|
|
591
|
+
...r(T.offCanvasProps)
|
|
592
|
+
})), an = () => {
|
|
593
|
+
ut.value?.focus(), E("hidden");
|
|
594
|
+
}, on = (e) => {
|
|
594
595
|
let t = e.target;
|
|
595
|
-
t && t instanceof HTMLDialogElement && (
|
|
596
|
+
t && t instanceof HTMLDialogElement && (X.value = !1);
|
|
596
597
|
}, Q = () => {
|
|
597
|
-
|
|
598
|
+
T.disabled || T.readonly || (nn.value = tn(), X.value = !0);
|
|
598
599
|
};
|
|
599
|
-
te(
|
|
600
|
-
isOpen: () =>
|
|
600
|
+
te(T, E, {
|
|
601
|
+
isOpen: () => X.value,
|
|
601
602
|
open: Q,
|
|
602
|
-
close: () =>
|
|
603
|
+
close: () => X.value = !1
|
|
603
604
|
});
|
|
604
|
-
let
|
|
605
|
-
if (!
|
|
605
|
+
let sn = d(() => !ht.value && !T.disabled && !T.readonly), cn = (e) => {
|
|
606
|
+
if (!sn.value || X.value) return;
|
|
606
607
|
let t = e.target;
|
|
607
608
|
t?.closest(".bb-field-input__box") && (t.closest(".bb-segmented-field__activator, .bb-clearable-button, .bb-time-picker-input__panel, [role=\"dialog\"]") || Q());
|
|
608
|
-
},
|
|
609
|
-
|
|
609
|
+
}, ln = (e) => e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "Backspace" || e.key === "Delete" || e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey, un = (e, t) => {
|
|
610
|
+
sn.value && (t.key === "Enter" || t.key === " ") ? (t.preventDefault(), X.value || Q()) : T.readonly && ln(t) ? t.preventDefault() : jt(e, t);
|
|
610
611
|
};
|
|
611
|
-
|
|
612
|
-
e ?
|
|
612
|
+
Fe(X, (e) => {
|
|
613
|
+
e ? Z.value || document.addEventListener("click", on, { passive: !0 }) : document.removeEventListener("click", on);
|
|
613
614
|
});
|
|
614
|
-
let
|
|
615
|
-
|
|
616
|
-
}, $ = d(() =>
|
|
615
|
+
let dn = b("start"), fn = (e, t) => {
|
|
616
|
+
dn.value = e.segment, Mt(e, t), E("focus", t);
|
|
617
|
+
}, $ = d(() => T.range ? V.value[dn.value].hour ? dn.value : V.value.start.hour && !V.value.end.hour ? "end" : "start" : "start"), pn = d(() => {
|
|
617
618
|
let e = V.value[$.value];
|
|
618
|
-
return e.hour ? String(
|
|
619
|
-
}),
|
|
619
|
+
return e.hour ? String(Wt(e)).padStart(2, "0") : "";
|
|
620
|
+
}), mn = ({ unit: e, value: t }) => {
|
|
620
621
|
let n = V.value[$.value];
|
|
621
|
-
e === "hour" ?
|
|
622
|
-
}, { isHydrated:
|
|
623
|
-
if (
|
|
624
|
-
let [e, t] = Array.isArray(
|
|
625
|
-
return !e || !t ?
|
|
622
|
+
e === "hour" ? Gt(n, parseInt(t, 10)) : e === "meridiem" ? n.meridiem = N.label(t === "PM" ? "PM" : "AM") : n[e] = t, n.hour ||= T.ampm ? "12" : "00", T.ampm && !n.meridiem && (n.meridiem = N.am.value), n.minute ||= "00", T.seconds && !n.second && (n.second = "00"), H(), J({ finalize: !1 });
|
|
623
|
+
}, { isHydrated: hn } = Ce(), gn = (e) => Se(e, nt.locale, !!T.ampm, !!T.seconds, hn.value), _n = d(() => {
|
|
624
|
+
if (T.range) {
|
|
625
|
+
let [e, t] = Array.isArray(T.modelValue) ? T.modelValue : [];
|
|
626
|
+
return !e || !t ? D("timePickerInput.emptyRange").value : D("timePickerInput.changeSelectionRange", gn(e), gn(t)).value;
|
|
626
627
|
}
|
|
627
|
-
return typeof
|
|
628
|
+
return typeof T.modelValue == "string" && T.modelValue ? D("timePickerInput.changeSelection", gn(T.modelValue)).value : D("timePickerInput.emptySelection").value;
|
|
628
629
|
});
|
|
629
630
|
return je(() => {
|
|
630
|
-
document.removeEventListener("focusin",
|
|
631
|
-
}), (t, n) => (
|
|
631
|
+
document.removeEventListener("focusin", Y), document.removeEventListener("click", Y, !0), document.removeEventListener("click", on);
|
|
632
|
+
}), (t, n) => (y(), Ee(_e, g({
|
|
632
633
|
id: c.id,
|
|
633
634
|
class: "bb-time-picker-input",
|
|
634
635
|
clearable: c.clearable && A.value,
|
|
635
|
-
compact:
|
|
636
|
+
compact: C(j).compact,
|
|
636
637
|
description: c.description,
|
|
637
638
|
disabled: c.disabled,
|
|
638
|
-
errors:
|
|
639
|
+
errors: C(Xe),
|
|
639
640
|
"has-errors": c.hasErrors,
|
|
640
641
|
"has-value": A.value,
|
|
641
642
|
"has-warnings": c.hasWarnings,
|
|
@@ -644,141 +645,141 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
644
645
|
"input-align": c.inputAlign,
|
|
645
646
|
label: c.label,
|
|
646
647
|
"label-align": c.labelAlign,
|
|
647
|
-
"label-mode":
|
|
648
|
+
"label-mode": ot.value,
|
|
648
649
|
"label-position": c.labelPosition,
|
|
649
|
-
layout:
|
|
650
|
+
layout: C(j).layout,
|
|
650
651
|
loading: c.loading,
|
|
651
652
|
name: c.name,
|
|
652
|
-
passthrough:
|
|
653
|
-
readonly:
|
|
654
|
-
reverse:
|
|
655
|
-
"show-asterisk":
|
|
656
|
-
"show-hint":
|
|
653
|
+
passthrough: C(M),
|
|
654
|
+
readonly: C(et),
|
|
655
|
+
reverse: C(j).reverse,
|
|
656
|
+
"show-asterisk": C(Ye),
|
|
657
|
+
"show-hint": at.value,
|
|
657
658
|
warnings: c.warnings
|
|
658
|
-
},
|
|
659
|
-
label: w((e) => [
|
|
659
|
+
}, C(M).forwardAttrs), De({
|
|
660
|
+
label: w((e) => [x(t.$slots, "label", v(ke(e)))]),
|
|
660
661
|
input: w(({ id: r, hasErrors: i, hasWarnings: a, ariaDescribedby: o }) => [h(ve, {
|
|
661
662
|
ref_key: "wrapper",
|
|
662
663
|
ref: P,
|
|
663
|
-
active:
|
|
664
|
-
"append:icon":
|
|
664
|
+
active: O.value,
|
|
665
|
+
"append:icon": C(T)["append:icon"],
|
|
665
666
|
class: _(["bb-time-picker-input__field", { "bb-time-picker-input__field--range": c.range }]),
|
|
666
|
-
clearable: c.clearable && !
|
|
667
|
-
compact:
|
|
667
|
+
clearable: c.clearable && !C(ue)(C($e)),
|
|
668
|
+
compact: C(j).compact,
|
|
668
669
|
disabled: c.disabled,
|
|
669
670
|
"has-errors": i,
|
|
670
671
|
"has-value": A.value,
|
|
671
672
|
"has-warnings": a,
|
|
672
673
|
loading: c.loading,
|
|
673
|
-
passthrough:
|
|
674
|
-
"prepend:icon":
|
|
675
|
-
readonly:
|
|
674
|
+
passthrough: C(M),
|
|
675
|
+
"prepend:icon": C(T)["prepend:icon"],
|
|
676
|
+
readonly: C(et),
|
|
676
677
|
variant: c.variant,
|
|
677
|
-
onClick:
|
|
678
|
-
"onClick:clear":
|
|
679
|
-
onFocusin:
|
|
680
|
-
},
|
|
681
|
-
"prepend:outer": w(() => [
|
|
682
|
-
prepend: w(() => [
|
|
678
|
+
onClick: cn,
|
|
679
|
+
"onClick:clear": Yt,
|
|
680
|
+
onFocusin: Xt
|
|
681
|
+
}, De({
|
|
682
|
+
"prepend:outer": w(() => [x(t.$slots, "prepend:outer")]),
|
|
683
|
+
prepend: w(() => [x(t.$slots, "prepend")]),
|
|
683
684
|
append: w(() => [m("button", g({
|
|
684
685
|
ref_key: "clockButton",
|
|
685
|
-
ref:
|
|
686
|
-
"aria-controls": F.value ?
|
|
687
|
-
"aria-disabled":
|
|
688
|
-
"aria-expanded":
|
|
686
|
+
ref: ut,
|
|
687
|
+
"aria-controls": F.value ? ft(r) : void 0,
|
|
688
|
+
"aria-disabled": C(tt) || void 0,
|
|
689
|
+
"aria-expanded": X.value,
|
|
689
690
|
"aria-haspopup": "dialog",
|
|
690
|
-
"aria-label":
|
|
691
|
-
class: ["bb-segmented-field__activator", { "bb-segmented-field__activator--active":
|
|
691
|
+
"aria-label": _n.value,
|
|
692
|
+
class: ["bb-segmented-field__activator", { "bb-segmented-field__activator--active": X.value }],
|
|
692
693
|
disabled: c.disabled || c.readonly,
|
|
693
694
|
type: "button",
|
|
694
|
-
onClick:
|
|
695
|
-
},
|
|
695
|
+
onClick: Le(Q, ["stop"])
|
|
696
|
+
}, C(M).activator), [h(me, {
|
|
696
697
|
class: "bb-segmented-field__trigger-icon",
|
|
697
|
-
icon:
|
|
698
|
-
}, null, 8, ["icon"])], 16,
|
|
698
|
+
icon: C(Je)
|
|
699
|
+
}, null, 8, ["icon"])], 16, We), x(t.$slots, "append", {}, () => [t.$slots.suffix ? (y(), p("span", g({
|
|
699
700
|
key: 0,
|
|
700
701
|
class: "bb-field-input__suffix"
|
|
701
|
-
},
|
|
702
|
-
"append:outer": w(() => [
|
|
702
|
+
}, C(M).suffix), [x(t.$slots, "suffix")], 16)) : f("", !0)])]),
|
|
703
|
+
"append:outer": w(() => [x(t.$slots, "append:outer")]),
|
|
703
704
|
default: w(() => [
|
|
704
705
|
m("div", {
|
|
705
706
|
class: _(["bb-segmented-field__fields", {
|
|
706
|
-
"bb-segmented-field__fields--empty":
|
|
707
|
+
"bb-segmented-field__fields--empty": Ut.value,
|
|
707
708
|
"bb-segmented-field__fields--range": c.range
|
|
708
709
|
}]),
|
|
709
|
-
style: Ae({ "--fields-min-ch":
|
|
710
|
-
}, [
|
|
710
|
+
style: Ae({ "--fields-min-ch": C(Et) })
|
|
711
|
+
}, [Ut.value ? (y(), p("span", {
|
|
711
712
|
key: 0,
|
|
712
713
|
"aria-hidden": "true",
|
|
713
714
|
class: "bb-segmented-field__placeholder",
|
|
714
|
-
onClick: n[0] ||= (...e) =>
|
|
715
|
-
},
|
|
715
|
+
onClick: n[0] ||= (...e) => C(kt) && C(kt)(...e)
|
|
716
|
+
}, S(Ht.value), 1)) : f("", !0), (y(!0), p(u, null, Ne(bt.value, (t, n) => (y(), p(u, { key: t.key }, [m("span", {
|
|
716
717
|
class: _(["bb-segmented-field__run", `bb-segmented-field__run--${t.kind}`]),
|
|
717
718
|
dir: t.kind === "time" ? "ltr" : void 0
|
|
718
|
-
}, [(
|
|
719
|
+
}, [(y(!0), p(u, null, Ne(t.items, ({ descriptor: n, index: a }, s) => (y(), p(u, { key: C(Ct)(n) }, [m("span", {
|
|
719
720
|
class: "bb-segmented-field__field-sizer",
|
|
720
|
-
"data-value":
|
|
721
|
-
}, [
|
|
722
|
-
id: a === 0 ? r :
|
|
721
|
+
"data-value": C(Tt)(n)
|
|
722
|
+
}, [Ie(m("input", g({
|
|
723
|
+
id: a === 0 ? r : Lt(n, r),
|
|
723
724
|
ref_for: !0,
|
|
724
|
-
ref: (e) =>
|
|
725
|
-
"aria-describedby":
|
|
725
|
+
ref: (e) => C(St)[C(Ct)(n)] = e,
|
|
726
|
+
"aria-describedby": mt(o, r),
|
|
726
727
|
"aria-disabled": c.disabled || void 0,
|
|
727
728
|
"aria-invalid": i ? "true" : void 0,
|
|
728
|
-
"aria-label":
|
|
729
|
-
"aria-readonly":
|
|
730
|
-
autocomplete:
|
|
729
|
+
"aria-label": Bt(n),
|
|
730
|
+
"aria-readonly": gt.value || void 0,
|
|
731
|
+
autocomplete: C(j).autocomplete,
|
|
731
732
|
autofocus: c.autofocus && a === 0,
|
|
732
733
|
class: ["bb-segmented-field__input", [`bb-segmented-field__input--${n.field}`, `bb-segmented-field__input--${n.segment}`]],
|
|
733
734
|
disabled: c.disabled,
|
|
734
|
-
inputmode:
|
|
735
|
-
maxlength:
|
|
736
|
-
name:
|
|
737
|
-
readonly:
|
|
738
|
-
required:
|
|
739
|
-
"aria-required":
|
|
735
|
+
inputmode: _t(n.field),
|
|
736
|
+
maxlength: yt(n.field),
|
|
737
|
+
name: Rt(n),
|
|
738
|
+
readonly: gt.value,
|
|
739
|
+
required: C(Ze),
|
|
740
|
+
"aria-required": C(Qe),
|
|
740
741
|
tabindex: n.field === "hour" ? 0 : -1,
|
|
741
742
|
type: "text",
|
|
742
|
-
value:
|
|
743
|
-
onBlur: (e) =>
|
|
744
|
-
onFocus: (e) =>
|
|
745
|
-
onInput: (e) =>
|
|
746
|
-
onKeydown: (e) =>
|
|
747
|
-
onPaste: (e) =>
|
|
748
|
-
}, { ref_for: !0 }, g(
|
|
743
|
+
value: C(Ft)(C(V)[n.segment][n.field]),
|
|
744
|
+
onBlur: (e) => C(Nt)(n),
|
|
745
|
+
onFocus: (e) => fn(n, e),
|
|
746
|
+
onInput: (e) => It(n, e),
|
|
747
|
+
onKeydown: (e) => un(n, e),
|
|
748
|
+
onPaste: (e) => C(Pt)(n, e)
|
|
749
|
+
}, { ref_for: !0 }, g(C(M).controlAttrs, C(M).input)), null, 16, Ve), [[C(e)]])], 8, Be), s < t.items.length - 1 ? (y(), p("span", {
|
|
749
750
|
key: 0,
|
|
750
751
|
"aria-hidden": "true",
|
|
751
752
|
class: "bb-segmented-field__separator",
|
|
752
753
|
role: "presentation",
|
|
753
|
-
onClick: (e) =>
|
|
754
|
-
},
|
|
754
|
+
onClick: (e) => C(Ot)(R.value[a + 1], { select: !0 })
|
|
755
|
+
}, S(xt(R.value[a], R.value[a + 1])), 9, He)) : f("", !0)], 64))), 128))], 10, ze), n < bt.value.length - 1 ? (y(), p("span", {
|
|
755
756
|
key: 0,
|
|
756
757
|
"aria-hidden": "true",
|
|
757
758
|
class: _(["bb-segmented-field__separator", { "bb-segmented-field__separator--range": R.value[B(t)].segment !== R.value[B(t) + 1].segment }]),
|
|
758
759
|
role: "presentation",
|
|
759
|
-
onClick: (e) =>
|
|
760
|
-
},
|
|
760
|
+
onClick: (e) => C(Ot)(R.value[B(t) + 1], { select: !0 })
|
|
761
|
+
}, S(xt(R.value[B(t)], R.value[B(t) + 1])), 11, Ue)) : f("", !0)], 64))), 128))], 6),
|
|
761
762
|
m("span", {
|
|
762
|
-
id:
|
|
763
|
+
id: dt(r),
|
|
763
764
|
class: "bb-time-picker-input__accessible-description",
|
|
764
765
|
hidden: ""
|
|
765
|
-
},
|
|
766
|
-
h(
|
|
766
|
+
}, S(Vt.value), 9, Ge),
|
|
767
|
+
h(C(Qt), null, {
|
|
767
768
|
default: w(() => [h(be, {
|
|
768
769
|
ampm: c.ampm,
|
|
769
|
-
disabled: c.disabled ||
|
|
770
|
-
hour:
|
|
770
|
+
disabled: c.disabled || C(et),
|
|
771
|
+
hour: pn.value,
|
|
771
772
|
max: c.max,
|
|
772
|
-
meridiem:
|
|
773
|
+
meridiem: C(V)[$.value].meridiem,
|
|
773
774
|
min: c.min,
|
|
774
|
-
minute:
|
|
775
|
-
passthrough:
|
|
776
|
-
second:
|
|
775
|
+
minute: C(V)[$.value].minute,
|
|
776
|
+
passthrough: C(M),
|
|
777
|
+
second: C(V)[$.value].second,
|
|
777
778
|
seconds: c.seconds,
|
|
778
779
|
step: c.step,
|
|
779
|
-
onSelect:
|
|
780
|
+
onSelect: mn,
|
|
780
781
|
onVnodeBeforeUnmount: n[1] ||= (e) => F.value = null,
|
|
781
|
-
onVnodeMounted:
|
|
782
|
+
onVnodeMounted: lt
|
|
782
783
|
}, null, 8, [
|
|
783
784
|
"ampm",
|
|
784
785
|
"disabled",
|
|
@@ -794,39 +795,39 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
794
795
|
])]),
|
|
795
796
|
_: 1
|
|
796
797
|
}),
|
|
797
|
-
|
|
798
|
+
Z.value ? (y(), Ee(he, g({
|
|
798
799
|
key: 0,
|
|
799
|
-
modelValue:
|
|
800
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
800
|
+
modelValue: X.value,
|
|
801
|
+
"onUpdate:modelValue": n[2] ||= (e) => X.value = e,
|
|
801
802
|
class: "bb-time-picker-input__sheet",
|
|
802
|
-
pt:
|
|
803
|
+
pt: C(M).forward({
|
|
803
804
|
panel: "root",
|
|
804
805
|
sheet: "root"
|
|
805
|
-
},
|
|
806
|
-
},
|
|
807
|
-
onHidden:
|
|
808
|
-
onHide: n[3] ||= (e) =>
|
|
809
|
-
onShow: n[4] ||= (e) =>
|
|
810
|
-
onShown: n[5] ||= (e) =>
|
|
806
|
+
}, C(ge).states, () => c.offCanvasProps?.pt)
|
|
807
|
+
}, rn.value, {
|
|
808
|
+
onHidden: an,
|
|
809
|
+
onHide: n[3] ||= (e) => C(E)("hide"),
|
|
810
|
+
onShow: n[4] ||= (e) => C(E)("show"),
|
|
811
|
+
onShown: n[5] ||= (e) => C(E)("shown")
|
|
811
812
|
}), {
|
|
812
|
-
default: w(() => [m("div", ke(
|
|
813
|
+
default: w(() => [m("div", v(ke(pt(r))), [h(C($t))], 16)]),
|
|
813
814
|
_: 2
|
|
814
|
-
}, 1040, ["modelValue", "pt"])) : (
|
|
815
|
+
}, 1040, ["modelValue", "pt"])) : (y(), Ee(ye, {
|
|
815
816
|
key: 1,
|
|
816
|
-
modelValue:
|
|
817
|
-
"onUpdate:modelValue": n[6] ||= (e) =>
|
|
817
|
+
modelValue: X.value,
|
|
818
|
+
"onUpdate:modelValue": n[6] ||= (e) => X.value = e,
|
|
818
819
|
anchor: P.value,
|
|
819
|
-
"bubble-attrs":
|
|
820
|
+
"bubble-attrs": pt(r),
|
|
820
821
|
class: "bb-time-picker-input__popover",
|
|
821
822
|
dialog: "",
|
|
822
823
|
offset: 4,
|
|
823
824
|
"transition-duration": c.transitionDuration,
|
|
824
|
-
onHidden: n[7] ||= (e) =>
|
|
825
|
-
onHide: n[8] ||= (e) =>
|
|
826
|
-
onShow: n[9] ||= (e) =>
|
|
827
|
-
onShown: n[10] ||= (e) =>
|
|
825
|
+
onHidden: n[7] ||= (e) => C(E)("hidden"),
|
|
826
|
+
onHide: n[8] ||= (e) => C(E)("hide"),
|
|
827
|
+
onShow: n[9] ||= (e) => C(E)("show"),
|
|
828
|
+
onShown: n[10] ||= (e) => C(E)("shown")
|
|
828
829
|
}, {
|
|
829
|
-
default: w(() => [h(
|
|
830
|
+
default: w(() => [h(C($t))]),
|
|
830
831
|
_: 1
|
|
831
832
|
}, 8, [
|
|
832
833
|
"modelValue",
|
|
@@ -838,7 +839,7 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
838
839
|
_: 2
|
|
839
840
|
}, [t.$slots.prefix ? {
|
|
840
841
|
name: "prefix",
|
|
841
|
-
fn: w(() => [
|
|
842
|
+
fn: w(() => [x(t.$slots, "prefix")]),
|
|
842
843
|
key: "0"
|
|
843
844
|
} : void 0]), 1032, [
|
|
844
845
|
"active",
|
|
@@ -859,7 +860,7 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
859
860
|
_: 2
|
|
860
861
|
}, [t.$slots.description ? {
|
|
861
862
|
name: "description",
|
|
862
|
-
fn: w((e) => [
|
|
863
|
+
fn: w((e) => [x(t.$slots, "description", v(ke(e)))]),
|
|
863
864
|
key: "0"
|
|
864
865
|
} : void 0]), 1040, [
|
|
865
866
|
"id",
|
|
@@ -890,4 +891,4 @@ var Re = ["dir"], ze = ["data-value"], Be = [
|
|
|
890
891
|
]));
|
|
891
892
|
}
|
|
892
893
|
});
|
|
893
|
-
export {
|
|
894
|
+
export { Ke as default };
|