bootstrap-vue-next 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BAccordion-ByAMZCS9.js → BAccordion-BfaVicrj.js} +2 -2
- package/dist/{BAccordion-ByAMZCS9.js.map → BAccordion-BfaVicrj.js.map} +1 -1
- package/dist/{BAlert-DdfFcjWF.js → BAlert-Czy83dU3.js} +5 -5
- package/dist/{BAlert-DdfFcjWF.js.map → BAlert-Czy83dU3.js.map} +1 -1
- package/dist/BAutocomplete-Bh4Bp5AI.js +437 -0
- package/dist/BAutocomplete-Bh4Bp5AI.js.map +1 -0
- package/dist/{BAvatar-BsStQrBF.js → BAvatar-BJNeQ1fe.js} +2 -2
- package/dist/{BAvatar-BsStQrBF.js.map → BAvatar-BJNeQ1fe.js.map} +1 -1
- package/dist/{BButton-KZu5jczf.js → BButton-DlOQ5sem.js} +2 -2
- package/dist/{BButton-KZu5jczf.js.map → BButton-DlOQ5sem.js.map} +1 -1
- package/dist/{BCard-DELccMG-.js → BCard-Bc1wed-3.js} +2 -2
- package/dist/{BCard-DELccMG-.js.map → BCard-Bc1wed-3.js.map} +1 -1
- package/dist/{BCarousel-qHGRSVFe.js → BCarousel-B-WZR469.js} +3 -4
- package/dist/{BCarousel-qHGRSVFe.js.map → BCarousel-B-WZR469.js.map} +1 -1
- package/dist/{BCollapse-DtuJwN7B.js → BCollapse-DCjKiTxo.js} +2 -2
- package/dist/{BCollapse-DtuJwN7B.js.map → BCollapse-DCjKiTxo.js.map} +1 -1
- package/dist/BDateField-Oh-cU-4i.js +456 -0
- package/dist/BDateField-Oh-cU-4i.js.map +1 -0
- package/dist/BDatePicker-HNI11eCe.js +632 -0
- package/dist/BDatePicker-HNI11eCe.js.map +1 -0
- package/dist/{BDropdown-BY-E0SHv.js → BDropdown-04nGcMhm.js} +6 -7
- package/dist/{BDropdown-BY-E0SHv.js.map → BDropdown-04nGcMhm.js.map} +1 -1
- package/dist/{BFormCheckbox-BYNGQgr2.js → BFormCheckbox-zjr8OsNd.js} +2 -2
- package/dist/{BFormCheckbox-BYNGQgr2.js.map → BFormCheckbox-zjr8OsNd.js.map} +1 -1
- package/dist/{BFormFile-C2DnrbK7.js → BFormFile-D_s8tf1m.js} +2 -2
- package/dist/{BFormFile-C2DnrbK7.js.map → BFormFile-D_s8tf1m.js.map} +1 -1
- package/dist/{BFormInput-_AkAy6Wk.js → BFormInput-DnIBPLCx.js} +2 -2
- package/dist/{BFormInput-_AkAy6Wk.js.map → BFormInput-DnIBPLCx.js.map} +1 -1
- package/dist/BFormOtp-Dx2RxPAW.js +150 -0
- package/dist/BFormOtp-Dx2RxPAW.js.map +1 -0
- package/dist/{BFormRadio-DAddcnfE.js → BFormRadio-DUz60sBI.js} +2 -2
- package/dist/{BFormRadio-DAddcnfE.js.map → BFormRadio-DUz60sBI.js.map} +1 -1
- package/dist/{BFormRating-iKFgSFet.js → BFormRating-CtMmDgrF.js} +2 -2
- package/dist/{BFormRating-iKFgSFet.js.map → BFormRating-CtMmDgrF.js.map} +1 -1
- package/dist/{BFormSelect-CSS-_kul.js → BFormSelect-CeslPN3i.js} +2 -3
- package/dist/{BFormSelect-CSS-_kul.js.map → BFormSelect-CeslPN3i.js.map} +1 -1
- package/dist/{BFormSpinbutton-fkVMbQC3.js → BFormSpinbutton-BR9YTfYy.js} +2 -3
- package/dist/{BFormSpinbutton-fkVMbQC3.js.map → BFormSpinbutton-BR9YTfYy.js.map} +1 -1
- package/dist/{BFormTags-CUcyRTCK.js → BFormTags-6qQn0Vlv.js} +2 -3
- package/dist/{BFormTags-CUcyRTCK.js.map → BFormTags-6qQn0Vlv.js.map} +1 -1
- package/dist/{BFormTextarea-CBBlEcrV.js → BFormTextarea-DvLrtG08.js} +3 -3
- package/dist/{BFormTextarea-CBBlEcrV.js.map → BFormTextarea-DvLrtG08.js.map} +1 -1
- package/dist/{BImg-knz2UZQE.js → BImg-Dd8Pc1Ln.js} +2 -2
- package/dist/{BImg-knz2UZQE.js.map → BImg-Dd8Pc1Ln.js.map} +1 -1
- package/dist/{BModal-DtQlIFNn.js → BModal-DOmTYI6F.js} +5 -6
- package/dist/{BModal-DtQlIFNn.js.map → BModal-DOmTYI6F.js.map} +1 -1
- package/dist/{BNav-BMWNXoNo.js → BNav-D3XbyI1R.js} +2 -2
- package/dist/{BNav-BMWNXoNo.js.map → BNav-D3XbyI1R.js.map} +1 -1
- package/dist/{BOffcanvas-BtvIDgH7.js → BOffcanvas-DyPG7s8I.js} +5 -5
- package/dist/{BOffcanvas-BtvIDgH7.js.map → BOffcanvas-DyPG7s8I.js.map} +1 -1
- package/dist/{BPagination-C85wHRgS.js → BPagination-DGvgWeYG.js} +2 -2
- package/dist/{BPagination-C85wHRgS.js.map → BPagination-DGvgWeYG.js.map} +1 -1
- package/dist/{BPlaceholder-DI12zz0a.js → BPlaceholder-BrBmbfIg.js} +3 -3
- package/dist/{BPlaceholder-DI12zz0a.js.map → BPlaceholder-BrBmbfIg.js.map} +1 -1
- package/dist/{BProgress-BNxYppi-.js → BProgress-CXhe6hsN.js} +2 -2
- package/dist/{BProgress-BNxYppi-.js.map → BProgress-CXhe6hsN.js.map} +1 -1
- package/dist/{BTable-BZxX17YU.js → BTable-8jp3wPAI.js} +2 -2
- package/dist/{BTable-BZxX17YU.js.map → BTable-8jp3wPAI.js.map} +1 -1
- package/dist/BTimeField-vdultTwg.js +138 -0
- package/dist/BTimeField-vdultTwg.js.map +1 -0
- package/dist/{BToast-Cm7TZlZq.js → BToast-vxfpFGe3.js} +5 -5
- package/dist/{BToast-Cm7TZlZq.js.map → BToast-vxfpFGe3.js.map} +1 -1
- package/dist/{BTooltip-CAgQ77tS.js → BTooltip-CV5Ogidy.js} +2 -2
- package/dist/{BTooltip-CAgQ77tS.js.map → BTooltip-CV5Ogidy.js.map} +1 -1
- package/dist/bootstrap-vue-next.mjs +33 -33
- package/dist/{floatingUi-CSJCHfOw.js → floatingUi-BhgR4GBJ.js} +10 -168
- package/dist/floatingUi-BhgR4GBJ.js.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/src/components/BAccordion/index.mjs +1 -1
- package/dist/src/components/BAlert/index.mjs +1 -1
- package/dist/src/components/BAutocomplete/index.mjs +1 -1
- package/dist/src/components/BAvatar/index.mjs +1 -1
- package/dist/src/components/BButton/index.mjs +1 -1
- package/dist/src/components/BCard/index.mjs +1 -1
- package/dist/src/components/BCarousel/index.mjs +1 -1
- package/dist/src/components/BCollapse/index.mjs +1 -1
- package/dist/src/components/BDateField/index.mjs +1 -1
- package/dist/src/components/BDatePicker/index.mjs +1 -1
- package/dist/src/components/BDropdown/index.mjs +1 -1
- package/dist/src/components/BFormCheckbox/index.mjs +1 -1
- package/dist/src/components/BFormFile/index.mjs +1 -1
- package/dist/src/components/BFormInput/index.mjs +1 -1
- package/dist/src/components/BFormOtp/index.mjs +1 -1
- package/dist/src/components/BFormRadio/index.mjs +1 -1
- package/dist/src/components/BFormRating/index.mjs +1 -1
- package/dist/src/components/BFormSelect/index.mjs +1 -1
- package/dist/src/components/BFormSpinbutton/index.mjs +1 -1
- package/dist/src/components/BFormTags/index.mjs +1 -1
- package/dist/src/components/BFormTextarea/index.mjs +1 -1
- package/dist/src/components/BImg/index.mjs +1 -1
- package/dist/src/components/BModal/index.mjs +1 -1
- package/dist/src/components/BNav/index.mjs +1 -1
- package/dist/src/components/BOffcanvas/index.mjs +1 -1
- package/dist/src/components/BPagination/index.mjs +1 -1
- package/dist/src/components/BPlaceholder/index.mjs +1 -1
- package/dist/src/components/BPopover/index.mjs +1 -1
- package/dist/src/components/BProgress/index.mjs +1 -1
- package/dist/src/components/BTable/index.mjs +1 -1
- package/dist/src/components/BTimeField/index.mjs +1 -1
- package/dist/src/components/BToast/index.mjs +1 -1
- package/dist/src/components/BTooltip/index.mjs +1 -1
- package/dist/src/components/index.mjs +34 -34
- package/dist/src/composables/index.mjs +1 -1
- package/dist/src/composables/useColorMode/index.mjs +1 -1
- package/dist/src/composables/useModal/index.mjs +1 -1
- package/dist/src/composables/usePopover/index.mjs +2 -2
- package/dist/src/composables/useScrollLock/index.mjs +1 -2
- package/dist/src/composables/useScrollLock/index.mjs.map +1 -1
- package/dist/src/composables/useScrollspy/index.mjs +1 -2
- package/dist/src/composables/useScrollspy/index.mjs.map +1 -1
- package/dist/src/composables/useToast/index.mjs +1 -1
- package/dist/src/directives/BPopover/index.mjs +2 -2
- package/dist/src/directives/BScrollspy/index.mjs +1 -1
- package/dist/src/directives/BToggle/index.mjs +1 -1
- package/dist/src/directives/BTooltip/index.mjs +2 -2
- package/dist/src/directives/index.mjs +1 -1
- package/dist/src/plugins/index.mjs +1 -1
- package/dist/src/resolvers/index.mjs +1 -1
- package/dist/src/types/index.mjs +1 -1
- package/dist/src/utils/index.mjs +1 -1
- package/dist/{useCountdownHover-BN8vJIQW.js → useCountdownHover-HZSJZkHq.js} +2 -2
- package/dist/{useCountdownHover-BN8vJIQW.js.map → useCountdownHover-HZSJZkHq.js.map} +1 -1
- package/dist/{useFormInput-C-iXRxog.js → useFormInput-CMtXFoM2.js} +2 -3
- package/dist/{useFormInput-C-iXRxog.js.map → useFormInput-CMtXFoM2.js.map} +1 -1
- package/dist/useSafeScrollLock-BT4KKhxB.js +89 -0
- package/dist/useSafeScrollLock-BT4KKhxB.js.map +1 -0
- package/dist/{useShowHide-Dpld86ys.js → useShowHide-BLIZLD9E.js} +2 -3
- package/dist/{useShowHide-Dpld86ys.js.map → useShowHide-BLIZLD9E.js.map} +1 -1
- package/dist/{utils-DYdkCKBf.js → utils-CvjliJBf.js} +2 -2
- package/dist/{utils-DYdkCKBf.js.map → utils-CvjliJBf.js.map} +1 -1
- package/package.json +3 -23
- package/dist/BAutocomplete-BFbbKtpz.js +0 -2490
- package/dist/BAutocomplete-BFbbKtpz.js.map +0 -1
- package/dist/BDateField-Bj-Jz7u4.js +0 -906
- package/dist/BDateField-Bj-Jz7u4.js.map +0 -1
- package/dist/BDatePicker-AVTYcVLy.js +0 -5210
- package/dist/BDatePicker-AVTYcVLy.js.map +0 -1
- package/dist/BFormOtp-ClDACqXM.js +0 -577
- package/dist/BFormOtp-ClDACqXM.js.map +0 -1
- package/dist/BTimeField-CbRGjaI6.js +0 -516
- package/dist/BTimeField-CbRGjaI6.js.map +0 -1
- package/dist/DateRangeFieldInput-Cbzjg8iF.js +0 -761
- package/dist/DateRangeFieldInput-Cbzjg8iF.js.map +0 -1
- package/dist/PopperContent-C9eeL6LH.js +0 -1726
- package/dist/PopperContent-C9eeL6LH.js.map +0 -1
- package/dist/VisuallyHidden-BYzyjJiY.js +0 -182
- package/dist/VisuallyHidden-BYzyjJiY.js.map +0 -1
- package/dist/VisuallyHiddenInput-CUrc8XXa.js +0 -180
- package/dist/VisuallyHiddenInput-CUrc8XXa.js.map +0 -1
- package/dist/dist-9-XTMhb-.js +0 -1302
- package/dist/dist-9-XTMhb-.js.map +0 -1
- package/dist/dist-B-regXAP.js +0 -123
- package/dist/dist-B-regXAP.js.map +0 -1
- package/dist/dist-DKc2ivHS.js +0 -411
- package/dist/dist-DKc2ivHS.js.map +0 -1
- package/dist/floating-ui.dom-C7UZexJK.js +0 -1484
- package/dist/floating-ui.dom-C7UZexJK.js.map +0 -1
- package/dist/floatingUi-CSJCHfOw.js.map +0 -1
- package/dist/rolldown-runtime-BBjsoOtd.js +0 -27
- package/dist/useDateField-CQZb799C.js +0 -3679
- package/dist/useDateField-CQZb799C.js.map +0 -1
- package/dist/useForwardExpose-DDvk7mir.js +0 -60
- package/dist/useForwardExpose-DDvk7mir.js.map +0 -1
- package/dist/useKbd-DRsaFU_f.js +0 -76
- package/dist/useKbd-DRsaFU_f.js.map +0 -1
- package/dist/useSafeScrollLock-PVgSASYu.js +0 -1326
- package/dist/useSafeScrollLock-PVgSASYu.js.map +0 -1
|
@@ -1,906 +0,0 @@
|
|
|
1
|
-
import { S as useVModel } from "./dist-9-XTMhb-.js";
|
|
2
|
-
import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
|
|
3
|
-
import { t as useId$1 } from "./useId-Fh-Arhb7.js";
|
|
4
|
-
import { D as isBeforeOrSame, E as isBefore, H as $ad063034c8620db8$export$d0bdf45af03a6ea3, N as $d07e34cce18680fd$export$b21e0b124e224484, V as $ad063034c8620db8$export$aa8b41735afcabd2, a as createContent, c as syncSegmentValues, d as useDateFormatter, g as normalizeHourCycle, h as normalizeDateStep, i as isSegmentNavigationKey, j as $2aaf608024c21ca1$export$680ea196effce5f, l as syncTimeSegmentValues, r as getTimeFieldSegmentElements, s as initializeTimeSegmentValues, t as useDateField, u as useLocale, v as areAllDaysBetweenValid, x as getDefaultTime } from "./useDateField-CQZb799C.js";
|
|
5
|
-
import { a as useDirection, l as createContext, n as usePrimitiveElement, r as Primitive, t as VisuallyHidden_default } from "./VisuallyHidden-BYzyjJiY.js";
|
|
6
|
-
import { r as isNullish, t as useKbd } from "./useKbd-DRsaFU_f.js";
|
|
7
|
-
import { i as DateFieldRoot_default, n as DateRangeFieldRoot_default, r as DateFieldInput_default, t as DateRangeFieldInput_default } from "./DateRangeFieldInput-Cbzjg8iF.js";
|
|
8
|
-
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, toHandlers, toRefs, unref, useModel, watch, withCtx, withKeys } from "vue";
|
|
9
|
-
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/TimeRangeField/TimeRangeFieldRoot.js
|
|
10
|
-
var [injectTimeRangeFieldRootContext, provideTimeRangeFieldRootContext] = /*#__PURE__*/ createContext("TimeRangeFieldRoot");
|
|
11
|
-
function convertValue(value, date = $ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2())) {
|
|
12
|
-
if (value && "day" in value) return value;
|
|
13
|
-
return $d07e34cce18680fd$export$b21e0b124e224484(date, value);
|
|
14
|
-
}
|
|
15
|
-
var TimeRangeFieldRoot_default = /* @__PURE__ */ defineComponent({
|
|
16
|
-
inheritAttrs: false,
|
|
17
|
-
__name: "TimeRangeFieldRoot",
|
|
18
|
-
props: {
|
|
19
|
-
defaultValue: {
|
|
20
|
-
type: Object,
|
|
21
|
-
required: false,
|
|
22
|
-
default: void 0
|
|
23
|
-
},
|
|
24
|
-
defaultPlaceholder: {
|
|
25
|
-
type: Object,
|
|
26
|
-
required: false
|
|
27
|
-
},
|
|
28
|
-
placeholder: {
|
|
29
|
-
type: Object,
|
|
30
|
-
required: false,
|
|
31
|
-
default: void 0
|
|
32
|
-
},
|
|
33
|
-
modelValue: {
|
|
34
|
-
type: [Object, null],
|
|
35
|
-
required: false
|
|
36
|
-
},
|
|
37
|
-
hourCycle: {
|
|
38
|
-
type: null,
|
|
39
|
-
required: false
|
|
40
|
-
},
|
|
41
|
-
step: {
|
|
42
|
-
type: Object,
|
|
43
|
-
required: false
|
|
44
|
-
},
|
|
45
|
-
granularity: {
|
|
46
|
-
type: String,
|
|
47
|
-
required: false
|
|
48
|
-
},
|
|
49
|
-
hideTimeZone: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
required: false
|
|
52
|
-
},
|
|
53
|
-
maxValue: {
|
|
54
|
-
type: Object,
|
|
55
|
-
required: false
|
|
56
|
-
},
|
|
57
|
-
minValue: {
|
|
58
|
-
type: Object,
|
|
59
|
-
required: false
|
|
60
|
-
},
|
|
61
|
-
locale: {
|
|
62
|
-
type: String,
|
|
63
|
-
required: false
|
|
64
|
-
},
|
|
65
|
-
disabled: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
required: false,
|
|
68
|
-
default: false
|
|
69
|
-
},
|
|
70
|
-
readonly: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
required: false,
|
|
73
|
-
default: false
|
|
74
|
-
},
|
|
75
|
-
id: {
|
|
76
|
-
type: String,
|
|
77
|
-
required: false
|
|
78
|
-
},
|
|
79
|
-
dir: {
|
|
80
|
-
type: String,
|
|
81
|
-
required: false
|
|
82
|
-
},
|
|
83
|
-
isTimeUnavailable: {
|
|
84
|
-
type: Function,
|
|
85
|
-
required: false,
|
|
86
|
-
default: void 0
|
|
87
|
-
},
|
|
88
|
-
asChild: {
|
|
89
|
-
type: Boolean,
|
|
90
|
-
required: false
|
|
91
|
-
},
|
|
92
|
-
as: {
|
|
93
|
-
type: null,
|
|
94
|
-
required: false
|
|
95
|
-
},
|
|
96
|
-
name: {
|
|
97
|
-
type: String,
|
|
98
|
-
required: false
|
|
99
|
-
},
|
|
100
|
-
required: {
|
|
101
|
-
type: Boolean,
|
|
102
|
-
required: false
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
emits: ["update:modelValue", "update:placeholder"],
|
|
106
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
107
|
-
const props = __props;
|
|
108
|
-
const emits = __emit;
|
|
109
|
-
const { disabled, readonly, granularity, defaultValue, minValue, maxValue, dir: propDir, locale: propLocale, isTimeUnavailable: propsIsTimeUnavailable } = toRefs(props);
|
|
110
|
-
const locale = useLocale(propLocale);
|
|
111
|
-
const dir = useDirection(propDir);
|
|
112
|
-
const formatter = useDateFormatter(locale.value, { hourCycle: normalizeHourCycle(props.hourCycle) });
|
|
113
|
-
const { primitiveElement, currentElement: parentElement } = usePrimitiveElement();
|
|
114
|
-
const segmentElements = ref(/* @__PURE__ */ new Set());
|
|
115
|
-
const step = computed(() => normalizeDateStep(props));
|
|
116
|
-
const convertedMinValue = computed(() => minValue.value ? convertValue(minValue.value) : void 0);
|
|
117
|
-
const convertedMaxValue = computed(() => maxValue.value ? convertValue(maxValue.value) : void 0);
|
|
118
|
-
onMounted(() => {
|
|
119
|
-
getTimeFieldSegmentElements(parentElement.value).forEach((item) => segmentElements.value.add(item));
|
|
120
|
-
});
|
|
121
|
-
const modelValue = useVModel(props, "modelValue", emits, {
|
|
122
|
-
defaultValue: defaultValue.value ?? {
|
|
123
|
-
start: void 0,
|
|
124
|
-
end: void 0
|
|
125
|
-
},
|
|
126
|
-
passive: props.modelValue === void 0
|
|
127
|
-
});
|
|
128
|
-
const isStartInvalid = computed(() => {
|
|
129
|
-
if (!modelValue.value?.start) return false;
|
|
130
|
-
const convertedStartValue$1 = convertValue(modelValue.value.start);
|
|
131
|
-
if (propsIsTimeUnavailable.value?.(convertedStartValue$1)) return true;
|
|
132
|
-
if (convertedMinValue.value && isBefore(convertedStartValue$1, convertedMinValue.value)) return true;
|
|
133
|
-
if (convertedMaxValue.value && isBefore(convertedMaxValue.value, convertedStartValue$1)) return true;
|
|
134
|
-
return false;
|
|
135
|
-
});
|
|
136
|
-
const isEndInvalid = computed(() => {
|
|
137
|
-
if (!modelValue.value?.end) return false;
|
|
138
|
-
const convertedEndValue$1 = convertValue(modelValue.value.end);
|
|
139
|
-
if (propsIsTimeUnavailable.value?.(convertedEndValue$1)) return true;
|
|
140
|
-
if (convertedMinValue.value && isBefore(convertedEndValue$1, convertedMinValue.value)) return true;
|
|
141
|
-
if (convertedMaxValue.value && isBefore(convertedMaxValue.value, convertedEndValue$1)) return true;
|
|
142
|
-
return false;
|
|
143
|
-
});
|
|
144
|
-
const isInvalid = computed(() => {
|
|
145
|
-
if (isStartInvalid.value || isEndInvalid.value) return true;
|
|
146
|
-
if (!modelValue.value?.start || !modelValue.value?.end) return false;
|
|
147
|
-
const convertedModelValue$1 = {
|
|
148
|
-
start: convertValue(modelValue.value.start),
|
|
149
|
-
end: convertValue(modelValue.value.end)
|
|
150
|
-
};
|
|
151
|
-
if (!isBeforeOrSame(convertedModelValue$1.start, convertedModelValue$1.end)) return true;
|
|
152
|
-
if (propsIsTimeUnavailable.value !== void 0) {
|
|
153
|
-
if (!areAllDaysBetweenValid(convertedModelValue$1.start, convertedModelValue$1.end, propsIsTimeUnavailable.value, void 0)) return true;
|
|
154
|
-
}
|
|
155
|
-
return false;
|
|
156
|
-
});
|
|
157
|
-
const startValue = ref(modelValue.value?.start?.copy());
|
|
158
|
-
const endValue = ref(modelValue.value?.end?.copy());
|
|
159
|
-
watch([startValue, endValue], ([_startValue, _endValue]) => {
|
|
160
|
-
modelValue.value = {
|
|
161
|
-
start: _startValue?.copy(),
|
|
162
|
-
end: _endValue?.copy()
|
|
163
|
-
};
|
|
164
|
-
});
|
|
165
|
-
const convertedStartValue = computed({
|
|
166
|
-
get() {
|
|
167
|
-
if (isNullish(startValue.value)) return startValue.value;
|
|
168
|
-
return convertValue(startValue.value);
|
|
169
|
-
},
|
|
170
|
-
set(newValue) {
|
|
171
|
-
if (newValue) startValue.value = startValue.value && "day" in startValue.value ? newValue : new $2aaf608024c21ca1$export$680ea196effce5f(newValue.hour, newValue.minute, newValue.second, startValue.value?.millisecond);
|
|
172
|
-
else startValue.value = newValue;
|
|
173
|
-
return newValue;
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
const convertedEndValue = computed({
|
|
177
|
-
get() {
|
|
178
|
-
if (isNullish(endValue.value)) return endValue.value;
|
|
179
|
-
return convertValue(endValue.value);
|
|
180
|
-
},
|
|
181
|
-
set(newValue) {
|
|
182
|
-
if (newValue) endValue.value = endValue.value && "day" in endValue.value ? newValue : new $2aaf608024c21ca1$export$680ea196effce5f(newValue.hour, newValue.minute, newValue.second, endValue.value?.millisecond);
|
|
183
|
-
else endValue.value = newValue;
|
|
184
|
-
return newValue;
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
const convertedModelValue = computed(() => ({
|
|
188
|
-
start: convertedStartValue.value,
|
|
189
|
-
end: convertedEndValue.value
|
|
190
|
-
}));
|
|
191
|
-
const defaultDate = getDefaultTime({
|
|
192
|
-
defaultPlaceholder: props.placeholder,
|
|
193
|
-
defaultValue: modelValue.value?.start
|
|
194
|
-
});
|
|
195
|
-
const placeholder = useVModel(props, "placeholder", emits, {
|
|
196
|
-
defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),
|
|
197
|
-
passive: props.placeholder === void 0
|
|
198
|
-
});
|
|
199
|
-
const convertedPlaceholder = computed({
|
|
200
|
-
get() {
|
|
201
|
-
return convertValue(placeholder.value);
|
|
202
|
-
},
|
|
203
|
-
set(newValue) {
|
|
204
|
-
if (newValue) placeholder.value = "day" in placeholder.value ? newValue.copy() : new $2aaf608024c21ca1$export$680ea196effce5f(newValue.hour, newValue.minute, newValue.second, placeholder.value?.millisecond);
|
|
205
|
-
return newValue;
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
const inferredGranularity = computed(() => {
|
|
209
|
-
if (granularity.value) return granularity.value;
|
|
210
|
-
return "minute";
|
|
211
|
-
});
|
|
212
|
-
const initialSegments = initializeTimeSegmentValues(inferredGranularity.value);
|
|
213
|
-
const startSegmentValues = ref(convertedStartValue.value ? { ...syncTimeSegmentValues({
|
|
214
|
-
value: convertedStartValue.value,
|
|
215
|
-
formatter
|
|
216
|
-
}) } : { ...initialSegments });
|
|
217
|
-
const endSegmentValues = ref(convertedEndValue.value ? { ...syncTimeSegmentValues({
|
|
218
|
-
value: convertedEndValue.value,
|
|
219
|
-
formatter
|
|
220
|
-
}) } : { ...initialSegments });
|
|
221
|
-
const startSegmentContent = computed(() => createContent({
|
|
222
|
-
granularity: inferredGranularity.value,
|
|
223
|
-
dateRef: convertedPlaceholder.value,
|
|
224
|
-
formatter,
|
|
225
|
-
hideTimeZone: props.hideTimeZone,
|
|
226
|
-
hourCycle: props.hourCycle,
|
|
227
|
-
segmentValues: startSegmentValues.value,
|
|
228
|
-
locale,
|
|
229
|
-
isTimeValue: true
|
|
230
|
-
}));
|
|
231
|
-
const endSegmentContent = computed(() => createContent({
|
|
232
|
-
granularity: inferredGranularity.value,
|
|
233
|
-
dateRef: convertedPlaceholder.value,
|
|
234
|
-
formatter,
|
|
235
|
-
hideTimeZone: props.hideTimeZone,
|
|
236
|
-
hourCycle: props.hourCycle,
|
|
237
|
-
segmentValues: endSegmentValues.value,
|
|
238
|
-
locale,
|
|
239
|
-
isTimeValue: true
|
|
240
|
-
}));
|
|
241
|
-
const segmentContents = computed(() => ({
|
|
242
|
-
start: startSegmentContent.value.arr,
|
|
243
|
-
end: endSegmentContent.value.arr
|
|
244
|
-
}));
|
|
245
|
-
const editableSegmentContents = computed(() => ({
|
|
246
|
-
start: segmentContents.value.start.filter(({ part }) => part !== "literal"),
|
|
247
|
-
end: segmentContents.value.end.filter(({ part }) => part !== "literal")
|
|
248
|
-
}));
|
|
249
|
-
watch(convertedModelValue, (_modelValue) => {
|
|
250
|
-
if (_modelValue?.start && convertedStartValue.value ? _modelValue.start.compare(convertedStartValue.value) !== 0 : _modelValue?.start !== convertedStartValue.value) convertedStartValue.value = _modelValue?.start?.copy();
|
|
251
|
-
if (_modelValue?.end && convertedEndValue.value ? _modelValue.end.compare(convertedEndValue.value) !== 0 : _modelValue?.end !== convertedEndValue.value) convertedEndValue.value = _modelValue?.end?.copy();
|
|
252
|
-
});
|
|
253
|
-
watch([convertedStartValue, locale], ([_startValue]) => {
|
|
254
|
-
if (_startValue !== void 0) startSegmentValues.value = { ...syncSegmentValues({
|
|
255
|
-
value: _startValue,
|
|
256
|
-
formatter
|
|
257
|
-
}) };
|
|
258
|
-
else if (Object.values(startSegmentValues.value).every((value) => value !== null) && _startValue === void 0) startSegmentValues.value = { ...initialSegments };
|
|
259
|
-
});
|
|
260
|
-
watch(locale, (value) => {
|
|
261
|
-
if (formatter.getLocale() !== value) {
|
|
262
|
-
formatter.setLocale(value);
|
|
263
|
-
nextTick(() => {
|
|
264
|
-
segmentElements.value.clear();
|
|
265
|
-
getTimeFieldSegmentElements(parentElement.value).forEach((item) => segmentElements.value.add(item));
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
watch(convertedModelValue, (_modelValue) => {
|
|
270
|
-
if (_modelValue && _modelValue.start !== void 0 && placeholder.value.compare(_modelValue.start) !== 0) placeholder.value = _modelValue.start.copy();
|
|
271
|
-
});
|
|
272
|
-
watch([convertedEndValue, locale], ([_endValue]) => {
|
|
273
|
-
if (_endValue !== void 0) endSegmentValues.value = { ...syncSegmentValues({
|
|
274
|
-
value: _endValue,
|
|
275
|
-
formatter
|
|
276
|
-
}) };
|
|
277
|
-
else if (Object.values(endSegmentValues.value).every((value) => value !== null) && _endValue === void 0) endSegmentValues.value = { ...initialSegments };
|
|
278
|
-
});
|
|
279
|
-
const currentFocusedElement = ref(null);
|
|
280
|
-
const currentSegmentIndex = computed(() => Array.from(segmentElements.value).findIndex((el) => el.getAttribute("data-reka-time-field-segment") === currentFocusedElement.value?.getAttribute("data-reka-time-field-segment") && el.getAttribute("data-reka-time-range-field-segment-type") === currentFocusedElement.value?.getAttribute("data-reka-time-range-field-segment-type")));
|
|
281
|
-
const nextFocusableSegment = computed(() => {
|
|
282
|
-
const sign = dir.value === "rtl" ? -1 : 1;
|
|
283
|
-
if (sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1) return null;
|
|
284
|
-
return Array.from(segmentElements.value)[currentSegmentIndex.value + sign];
|
|
285
|
-
});
|
|
286
|
-
const prevFocusableSegment = computed(() => {
|
|
287
|
-
const sign = dir.value === "rtl" ? -1 : 1;
|
|
288
|
-
if (sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1) return null;
|
|
289
|
-
return Array.from(segmentElements.value)[currentSegmentIndex.value - sign];
|
|
290
|
-
});
|
|
291
|
-
const kbd = useKbd();
|
|
292
|
-
function handleKeydown(e) {
|
|
293
|
-
if (e.isComposing) return;
|
|
294
|
-
if (!isSegmentNavigationKey(e.key)) return;
|
|
295
|
-
if (e.key === kbd.ARROW_LEFT) prevFocusableSegment.value?.focus();
|
|
296
|
-
if (e.key === kbd.ARROW_RIGHT) nextFocusableSegment.value?.focus();
|
|
297
|
-
}
|
|
298
|
-
function setFocusedElement(el) {
|
|
299
|
-
currentFocusedElement.value = el;
|
|
300
|
-
}
|
|
301
|
-
provideTimeRangeFieldRootContext({
|
|
302
|
-
locale,
|
|
303
|
-
startValue: convertedStartValue,
|
|
304
|
-
endValue: convertedEndValue,
|
|
305
|
-
placeholder: convertedPlaceholder,
|
|
306
|
-
disabled,
|
|
307
|
-
formatter,
|
|
308
|
-
hourCycle: props.hourCycle,
|
|
309
|
-
step,
|
|
310
|
-
readonly,
|
|
311
|
-
isInvalid,
|
|
312
|
-
segmentValues: {
|
|
313
|
-
start: startSegmentValues,
|
|
314
|
-
end: endSegmentValues
|
|
315
|
-
},
|
|
316
|
-
segmentContents: editableSegmentContents,
|
|
317
|
-
elements: segmentElements,
|
|
318
|
-
setFocusedElement,
|
|
319
|
-
focusNext() {
|
|
320
|
-
Array.from(segmentElements.value)[currentSegmentIndex.value + 1]?.focus();
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
__expose({ setFocusedElement });
|
|
324
|
-
return (_ctx, _cache) => {
|
|
325
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps(_ctx.$attrs, {
|
|
326
|
-
ref_key: "primitiveElement",
|
|
327
|
-
ref: primitiveElement,
|
|
328
|
-
role: "group",
|
|
329
|
-
"aria-disabled": unref(disabled) ? true : void 0,
|
|
330
|
-
"data-disabled": unref(disabled) ? "" : void 0,
|
|
331
|
-
"data-readonly": unref(readonly) ? "" : void 0,
|
|
332
|
-
"data-invalid": isInvalid.value ? "" : void 0,
|
|
333
|
-
dir: unref(dir),
|
|
334
|
-
onKeydown: withKeys(handleKeydown, ["left", "right"])
|
|
335
|
-
}), {
|
|
336
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
|
|
337
|
-
modelValue: unref(modelValue),
|
|
338
|
-
segments: segmentContents.value,
|
|
339
|
-
isInvalid: isInvalid.value
|
|
340
|
-
}), createVNode(unref(VisuallyHidden_default), {
|
|
341
|
-
id: _ctx.id,
|
|
342
|
-
as: "input",
|
|
343
|
-
feature: "focusable",
|
|
344
|
-
tabindex: "-1",
|
|
345
|
-
value: `${unref(modelValue)?.start?.toString()} - ${unref(modelValue)?.end?.toString()}`,
|
|
346
|
-
name: _ctx.name,
|
|
347
|
-
disabled: unref(disabled),
|
|
348
|
-
required: _ctx.required,
|
|
349
|
-
onFocus: _cache[0] || (_cache[0] = ($event) => Array.from(segmentElements.value)?.[0]?.focus())
|
|
350
|
-
}, null, 8, [
|
|
351
|
-
"id",
|
|
352
|
-
"value",
|
|
353
|
-
"name",
|
|
354
|
-
"disabled",
|
|
355
|
-
"required"
|
|
356
|
-
])]),
|
|
357
|
-
_: 3
|
|
358
|
-
}, 16, [
|
|
359
|
-
"aria-disabled",
|
|
360
|
-
"data-disabled",
|
|
361
|
-
"data-readonly",
|
|
362
|
-
"data-invalid",
|
|
363
|
-
"dir"
|
|
364
|
-
]);
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
//#endregion
|
|
369
|
-
//#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/TimeRangeField/TimeRangeFieldInput.js
|
|
370
|
-
var TimeRangeFieldInput_default = /* @__PURE__ */ defineComponent({
|
|
371
|
-
__name: "TimeRangeFieldInput",
|
|
372
|
-
props: {
|
|
373
|
-
part: {
|
|
374
|
-
type: null,
|
|
375
|
-
required: true
|
|
376
|
-
},
|
|
377
|
-
type: {
|
|
378
|
-
type: String,
|
|
379
|
-
required: true
|
|
380
|
-
},
|
|
381
|
-
asChild: {
|
|
382
|
-
type: Boolean,
|
|
383
|
-
required: false
|
|
384
|
-
},
|
|
385
|
-
as: {
|
|
386
|
-
type: null,
|
|
387
|
-
required: false
|
|
388
|
-
}
|
|
389
|
-
},
|
|
390
|
-
setup(__props) {
|
|
391
|
-
const props = __props;
|
|
392
|
-
const rootContext = injectTimeRangeFieldRootContext();
|
|
393
|
-
const hasLeftFocus = ref(true);
|
|
394
|
-
const lastKeyZero = ref(false);
|
|
395
|
-
const { handleSegmentClick, handleSegmentKeydown, handleSegmentBeforeInput, handleSegmentCompositionStart, handleSegmentCompositionEnd, attributes } = useDateField({
|
|
396
|
-
hasLeftFocus,
|
|
397
|
-
lastKeyZero,
|
|
398
|
-
placeholder: rootContext.placeholder,
|
|
399
|
-
hourCycle: rootContext.hourCycle,
|
|
400
|
-
step: rootContext.step,
|
|
401
|
-
segmentValues: rootContext.segmentValues[props.type],
|
|
402
|
-
formatter: rootContext.formatter,
|
|
403
|
-
part: props.part,
|
|
404
|
-
disabled: rootContext.disabled,
|
|
405
|
-
readonly: rootContext.readonly,
|
|
406
|
-
focusNext: rootContext.focusNext,
|
|
407
|
-
modelValue: props.type === "start" ? rootContext.startValue : rootContext.endValue
|
|
408
|
-
});
|
|
409
|
-
const disabled = computed(() => rootContext.disabled.value);
|
|
410
|
-
const readonly = computed(() => rootContext.readonly.value);
|
|
411
|
-
const isInvalid = computed(() => rootContext.isInvalid.value);
|
|
412
|
-
return (_ctx, _cache) => {
|
|
413
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps({
|
|
414
|
-
as: _ctx.as,
|
|
415
|
-
"as-child": _ctx.asChild
|
|
416
|
-
}, unref(attributes), {
|
|
417
|
-
contenteditable: disabled.value || readonly.value ? false : _ctx.part !== "literal",
|
|
418
|
-
"data-reka-time-field-segment": _ctx.part,
|
|
419
|
-
"data-reka-time-range-field-segment-type": _ctx.type,
|
|
420
|
-
"aria-disabled": disabled.value ? true : void 0,
|
|
421
|
-
"aria-readonly": readonly.value ? true : void 0,
|
|
422
|
-
"data-disabled": disabled.value ? "" : void 0,
|
|
423
|
-
"data-invalid": isInvalid.value ? "" : void 0,
|
|
424
|
-
"aria-invalid": isInvalid.value ? true : void 0
|
|
425
|
-
}, toHandlers(_ctx.part !== "literal" ? {
|
|
426
|
-
mousedown: unref(handleSegmentClick),
|
|
427
|
-
keydown: unref(handleSegmentKeydown),
|
|
428
|
-
beforeinput: unref(handleSegmentBeforeInput),
|
|
429
|
-
compositionstart: unref(handleSegmentCompositionStart),
|
|
430
|
-
compositionend: unref(handleSegmentCompositionEnd),
|
|
431
|
-
focusout: () => {
|
|
432
|
-
hasLeftFocus.value = true;
|
|
433
|
-
},
|
|
434
|
-
focusin: (e) => {
|
|
435
|
-
unref(rootContext).setFocusedElement(e.target);
|
|
436
|
-
}
|
|
437
|
-
} : {})), {
|
|
438
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
439
|
-
_: 3
|
|
440
|
-
}, 16, [
|
|
441
|
-
"as",
|
|
442
|
-
"as-child",
|
|
443
|
-
"contenteditable",
|
|
444
|
-
"data-reka-time-field-segment",
|
|
445
|
-
"data-reka-time-range-field-segment-type",
|
|
446
|
-
"aria-disabled",
|
|
447
|
-
"aria-readonly",
|
|
448
|
-
"data-disabled",
|
|
449
|
-
"data-invalid",
|
|
450
|
-
"aria-invalid"
|
|
451
|
-
]);
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
|
-
//#endregion
|
|
456
|
-
//#region src/components/BDateField/BDateField.vue
|
|
457
|
-
var BDateField_default = /* @__PURE__ */ defineComponent({
|
|
458
|
-
__name: "BDateField",
|
|
459
|
-
props: /*@__PURE__*/ mergeModels({
|
|
460
|
-
defaultPlaceholder: { default: void 0 },
|
|
461
|
-
defaultValue: { default: void 0 },
|
|
462
|
-
dir: { default: void 0 },
|
|
463
|
-
disabled: {
|
|
464
|
-
type: Boolean,
|
|
465
|
-
default: false
|
|
466
|
-
},
|
|
467
|
-
granularity: { default: void 0 },
|
|
468
|
-
hideTimeZone: {
|
|
469
|
-
type: Boolean,
|
|
470
|
-
default: void 0
|
|
471
|
-
},
|
|
472
|
-
hourCycle: { default: void 0 },
|
|
473
|
-
id: { default: void 0 },
|
|
474
|
-
isDateUnavailable: {
|
|
475
|
-
type: Function,
|
|
476
|
-
default: void 0
|
|
477
|
-
},
|
|
478
|
-
locale: { default: void 0 },
|
|
479
|
-
maxValue: { default: void 0 },
|
|
480
|
-
minValue: { default: void 0 },
|
|
481
|
-
name: { default: void 0 },
|
|
482
|
-
readonly: {
|
|
483
|
-
type: Boolean,
|
|
484
|
-
default: false
|
|
485
|
-
},
|
|
486
|
-
required: {
|
|
487
|
-
type: Boolean,
|
|
488
|
-
default: false
|
|
489
|
-
},
|
|
490
|
-
size: { default: void 0 },
|
|
491
|
-
state: {
|
|
492
|
-
type: [Boolean, null],
|
|
493
|
-
default: null
|
|
494
|
-
},
|
|
495
|
-
step: { default: void 0 }
|
|
496
|
-
}, {
|
|
497
|
-
"modelValue": { default: null },
|
|
498
|
-
"modelModifiers": {},
|
|
499
|
-
"placeholder": {},
|
|
500
|
-
"placeholderModifiers": {}
|
|
501
|
-
}),
|
|
502
|
-
emits: ["update:modelValue", "update:placeholder"],
|
|
503
|
-
setup(__props) {
|
|
504
|
-
const props = useDefaults(__props, "BDateField");
|
|
505
|
-
const modelValue = useModel(__props, "modelValue");
|
|
506
|
-
const placeholderModel = useModel(__props, "placeholder");
|
|
507
|
-
const computedId = useId$1(() => props.id, "date-field");
|
|
508
|
-
const computedRootClasses = computed(() => ({
|
|
509
|
-
"disabled": props.disabled,
|
|
510
|
-
"readonly": props.readonly,
|
|
511
|
-
"is-valid": props.state === true,
|
|
512
|
-
"is-invalid": props.state === false,
|
|
513
|
-
[`form-control-${props.size}`]: props.size !== void 0
|
|
514
|
-
}));
|
|
515
|
-
return (_ctx, _cache) => {
|
|
516
|
-
return openBlock(), createBlock(unref(DateFieldRoot_default), {
|
|
517
|
-
id: unref(computedId),
|
|
518
|
-
modelValue: modelValue.value,
|
|
519
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
520
|
-
placeholder: placeholderModel.value,
|
|
521
|
-
"onUpdate:placeholder": _cache[1] || (_cache[1] = ($event) => placeholderModel.value = $event),
|
|
522
|
-
"default-value": unref(props).defaultValue,
|
|
523
|
-
"default-placeholder": unref(props).defaultPlaceholder,
|
|
524
|
-
"hour-cycle": unref(props).hourCycle,
|
|
525
|
-
step: unref(props).step,
|
|
526
|
-
granularity: unref(props).granularity,
|
|
527
|
-
"hide-time-zone": unref(props).hideTimeZone,
|
|
528
|
-
"max-value": unref(props).maxValue,
|
|
529
|
-
"min-value": unref(props).minValue,
|
|
530
|
-
locale: unref(props).locale,
|
|
531
|
-
disabled: unref(props).disabled,
|
|
532
|
-
readonly: unref(props).readonly,
|
|
533
|
-
name: unref(props).name,
|
|
534
|
-
required: unref(props).required,
|
|
535
|
-
dir: unref(props).dir,
|
|
536
|
-
"is-date-unavailable": unref(props).isDateUnavailable,
|
|
537
|
-
class: normalizeClass([computedRootClasses.value, "b-date-field form-control d-inline-flex align-items-center gap-0"])
|
|
538
|
-
}, {
|
|
539
|
-
default: withCtx(({ segments, isInvalid, modelValue: currentValue }) => [renderSlot(_ctx.$slots, "default", {
|
|
540
|
-
modelValue: currentValue,
|
|
541
|
-
segments,
|
|
542
|
-
isInvalid
|
|
543
|
-
}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(segments, ({ part, value }) => {
|
|
544
|
-
return openBlock(), createElementBlock(Fragment, { key: part }, [part === "literal" ? (openBlock(), createBlock(unref(DateFieldInput_default), {
|
|
545
|
-
key: 0,
|
|
546
|
-
part,
|
|
547
|
-
class: "b-date-field-literal"
|
|
548
|
-
}, {
|
|
549
|
-
default: withCtx(() => [createTextVNode(toDisplayString(value), 1)]),
|
|
550
|
-
_: 2
|
|
551
|
-
}, 1032, ["part"])) : (openBlock(), createBlock(unref(DateFieldInput_default), {
|
|
552
|
-
key: 1,
|
|
553
|
-
part,
|
|
554
|
-
class: "b-date-field-segment"
|
|
555
|
-
}, {
|
|
556
|
-
default: withCtx(() => [createTextVNode(toDisplayString(value), 1)]),
|
|
557
|
-
_: 2
|
|
558
|
-
}, 1032, ["part"]))], 64);
|
|
559
|
-
}), 128))])]),
|
|
560
|
-
_: 3
|
|
561
|
-
}, 8, [
|
|
562
|
-
"id",
|
|
563
|
-
"modelValue",
|
|
564
|
-
"placeholder",
|
|
565
|
-
"default-value",
|
|
566
|
-
"default-placeholder",
|
|
567
|
-
"hour-cycle",
|
|
568
|
-
"step",
|
|
569
|
-
"granularity",
|
|
570
|
-
"hide-time-zone",
|
|
571
|
-
"max-value",
|
|
572
|
-
"min-value",
|
|
573
|
-
"locale",
|
|
574
|
-
"disabled",
|
|
575
|
-
"readonly",
|
|
576
|
-
"name",
|
|
577
|
-
"required",
|
|
578
|
-
"dir",
|
|
579
|
-
"is-date-unavailable",
|
|
580
|
-
"class"
|
|
581
|
-
]);
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
});
|
|
585
|
-
//#endregion
|
|
586
|
-
//#region src/components/BDateField/BDateRangeField.vue
|
|
587
|
-
var BDateRangeField_default = /* @__PURE__ */ defineComponent({
|
|
588
|
-
__name: "BDateRangeField",
|
|
589
|
-
props: /*@__PURE__*/ mergeModels({
|
|
590
|
-
defaultPlaceholder: { default: void 0 },
|
|
591
|
-
defaultValue: { default: void 0 },
|
|
592
|
-
dir: { default: void 0 },
|
|
593
|
-
disabled: {
|
|
594
|
-
type: Boolean,
|
|
595
|
-
default: false
|
|
596
|
-
},
|
|
597
|
-
granularity: { default: void 0 },
|
|
598
|
-
hideTimeZone: {
|
|
599
|
-
type: Boolean,
|
|
600
|
-
default: void 0
|
|
601
|
-
},
|
|
602
|
-
hourCycle: { default: void 0 },
|
|
603
|
-
id: { default: void 0 },
|
|
604
|
-
isDateUnavailable: {
|
|
605
|
-
type: Function,
|
|
606
|
-
default: void 0
|
|
607
|
-
},
|
|
608
|
-
locale: { default: void 0 },
|
|
609
|
-
maxValue: { default: void 0 },
|
|
610
|
-
minValue: { default: void 0 },
|
|
611
|
-
name: { default: void 0 },
|
|
612
|
-
readonly: {
|
|
613
|
-
type: Boolean,
|
|
614
|
-
default: false
|
|
615
|
-
},
|
|
616
|
-
required: {
|
|
617
|
-
type: Boolean,
|
|
618
|
-
default: false
|
|
619
|
-
},
|
|
620
|
-
size: { default: void 0 },
|
|
621
|
-
state: {
|
|
622
|
-
type: [Boolean, null],
|
|
623
|
-
default: null
|
|
624
|
-
},
|
|
625
|
-
step: { default: void 0 }
|
|
626
|
-
}, {
|
|
627
|
-
"modelValue": { default: null },
|
|
628
|
-
"modelModifiers": {},
|
|
629
|
-
"placeholder": {},
|
|
630
|
-
"placeholderModifiers": {}
|
|
631
|
-
}),
|
|
632
|
-
emits: ["update:modelValue", "update:placeholder"],
|
|
633
|
-
setup(__props) {
|
|
634
|
-
const props = useDefaults(__props, "BDateRangeField");
|
|
635
|
-
const modelValue = useModel(__props, "modelValue");
|
|
636
|
-
const placeholderModel = useModel(__props, "placeholder");
|
|
637
|
-
const computedId = useId$1(() => props.id, "date-range-field");
|
|
638
|
-
const computedRootClasses = computed(() => ({
|
|
639
|
-
"disabled": props.disabled,
|
|
640
|
-
"readonly": props.readonly,
|
|
641
|
-
"is-valid": props.state === true,
|
|
642
|
-
"is-invalid": props.state === false,
|
|
643
|
-
[`form-control-${props.size}`]: props.size !== void 0
|
|
644
|
-
}));
|
|
645
|
-
return (_ctx, _cache) => {
|
|
646
|
-
return openBlock(), createBlock(unref(DateRangeFieldRoot_default), {
|
|
647
|
-
id: unref(computedId),
|
|
648
|
-
modelValue: modelValue.value,
|
|
649
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
650
|
-
placeholder: placeholderModel.value,
|
|
651
|
-
"onUpdate:placeholder": _cache[1] || (_cache[1] = ($event) => placeholderModel.value = $event),
|
|
652
|
-
"default-value": unref(props).defaultValue,
|
|
653
|
-
"default-placeholder": unref(props).defaultPlaceholder,
|
|
654
|
-
"hour-cycle": unref(props).hourCycle,
|
|
655
|
-
step: unref(props).step,
|
|
656
|
-
granularity: unref(props).granularity,
|
|
657
|
-
"hide-time-zone": unref(props).hideTimeZone,
|
|
658
|
-
"max-value": unref(props).maxValue,
|
|
659
|
-
"min-value": unref(props).minValue,
|
|
660
|
-
locale: unref(props).locale,
|
|
661
|
-
disabled: unref(props).disabled,
|
|
662
|
-
readonly: unref(props).readonly,
|
|
663
|
-
name: unref(props).name,
|
|
664
|
-
required: unref(props).required,
|
|
665
|
-
dir: unref(props).dir,
|
|
666
|
-
"is-date-unavailable": unref(props).isDateUnavailable,
|
|
667
|
-
class: normalizeClass([computedRootClasses.value, "b-date-range-field form-control d-inline-flex align-items-center gap-0"])
|
|
668
|
-
}, {
|
|
669
|
-
default: withCtx(({ segments, isInvalid, modelValue: currentValue }) => [renderSlot(_ctx.$slots, "default", {
|
|
670
|
-
modelValue: currentValue,
|
|
671
|
-
segments,
|
|
672
|
-
isInvalid
|
|
673
|
-
}, () => [
|
|
674
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(segments.start, ({ part, value }) => {
|
|
675
|
-
return openBlock(), createElementBlock(Fragment, { key: `start-${part}` }, [part === "literal" ? (openBlock(), createBlock(unref(DateRangeFieldInput_default), {
|
|
676
|
-
key: 0,
|
|
677
|
-
type: "start",
|
|
678
|
-
part,
|
|
679
|
-
class: "b-date-range-field-literal"
|
|
680
|
-
}, {
|
|
681
|
-
default: withCtx(() => [createTextVNode(toDisplayString(value), 1)]),
|
|
682
|
-
_: 2
|
|
683
|
-
}, 1032, ["part"])) : (openBlock(), createBlock(unref(DateRangeFieldInput_default), {
|
|
684
|
-
key: 1,
|
|
685
|
-
type: "start",
|
|
686
|
-
part,
|
|
687
|
-
class: "b-date-range-field-segment"
|
|
688
|
-
}, {
|
|
689
|
-
default: withCtx(() => [createTextVNode(toDisplayString(value), 1)]),
|
|
690
|
-
_: 2
|
|
691
|
-
}, 1032, ["part"]))], 64);
|
|
692
|
-
}), 128)),
|
|
693
|
-
_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
694
|
-
class: "b-date-range-field-separator",
|
|
695
|
-
"aria-hidden": "true"
|
|
696
|
-
}, " – ", -1)),
|
|
697
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(segments.end, ({ part, value }) => {
|
|
698
|
-
return openBlock(), createElementBlock(Fragment, { key: `end-${part}` }, [part === "literal" ? (openBlock(), createBlock(unref(DateRangeFieldInput_default), {
|
|
699
|
-
key: 0,
|
|
700
|
-
type: "end",
|
|
701
|
-
part,
|
|
702
|
-
class: "b-date-range-field-literal"
|
|
703
|
-
}, {
|
|
704
|
-
default: withCtx(() => [createTextVNode(toDisplayString(value), 1)]),
|
|
705
|
-
_: 2
|
|
706
|
-
}, 1032, ["part"])) : (openBlock(), createBlock(unref(DateRangeFieldInput_default), {
|
|
707
|
-
key: 1,
|
|
708
|
-
type: "end",
|
|
709
|
-
part,
|
|
710
|
-
class: "b-date-range-field-segment"
|
|
711
|
-
}, {
|
|
712
|
-
default: withCtx(() => [createTextVNode(toDisplayString(value), 1)]),
|
|
713
|
-
_: 2
|
|
714
|
-
}, 1032, ["part"]))], 64);
|
|
715
|
-
}), 128))
|
|
716
|
-
])]),
|
|
717
|
-
_: 3
|
|
718
|
-
}, 8, [
|
|
719
|
-
"id",
|
|
720
|
-
"modelValue",
|
|
721
|
-
"placeholder",
|
|
722
|
-
"default-value",
|
|
723
|
-
"default-placeholder",
|
|
724
|
-
"hour-cycle",
|
|
725
|
-
"step",
|
|
726
|
-
"granularity",
|
|
727
|
-
"hide-time-zone",
|
|
728
|
-
"max-value",
|
|
729
|
-
"min-value",
|
|
730
|
-
"locale",
|
|
731
|
-
"disabled",
|
|
732
|
-
"readonly",
|
|
733
|
-
"name",
|
|
734
|
-
"required",
|
|
735
|
-
"dir",
|
|
736
|
-
"is-date-unavailable",
|
|
737
|
-
"class"
|
|
738
|
-
]);
|
|
739
|
-
};
|
|
740
|
-
}
|
|
741
|
-
});
|
|
742
|
-
//#endregion
|
|
743
|
-
//#region src/components/BDateField/BTimeRangeField.vue
|
|
744
|
-
var BTimeRangeField_default = /* @__PURE__ */ defineComponent({
|
|
745
|
-
__name: "BTimeRangeField",
|
|
746
|
-
props: /*@__PURE__*/ mergeModels({
|
|
747
|
-
defaultPlaceholder: { default: void 0 },
|
|
748
|
-
defaultValue: { default: void 0 },
|
|
749
|
-
dir: { default: void 0 },
|
|
750
|
-
disabled: {
|
|
751
|
-
type: Boolean,
|
|
752
|
-
default: false
|
|
753
|
-
},
|
|
754
|
-
granularity: { default: void 0 },
|
|
755
|
-
hideTimeZone: {
|
|
756
|
-
type: Boolean,
|
|
757
|
-
default: void 0
|
|
758
|
-
},
|
|
759
|
-
hourCycle: { default: void 0 },
|
|
760
|
-
id: { default: void 0 },
|
|
761
|
-
isTimeUnavailable: {
|
|
762
|
-
type: Function,
|
|
763
|
-
default: void 0
|
|
764
|
-
},
|
|
765
|
-
locale: { default: void 0 },
|
|
766
|
-
maxValue: { default: void 0 },
|
|
767
|
-
minValue: { default: void 0 },
|
|
768
|
-
name: { default: void 0 },
|
|
769
|
-
readonly: {
|
|
770
|
-
type: Boolean,
|
|
771
|
-
default: false
|
|
772
|
-
},
|
|
773
|
-
required: {
|
|
774
|
-
type: Boolean,
|
|
775
|
-
default: false
|
|
776
|
-
},
|
|
777
|
-
size: { default: void 0 },
|
|
778
|
-
state: {
|
|
779
|
-
type: [Boolean, null],
|
|
780
|
-
default: null
|
|
781
|
-
},
|
|
782
|
-
step: { default: void 0 },
|
|
783
|
-
stepSnapping: {
|
|
784
|
-
type: Boolean,
|
|
785
|
-
default: false
|
|
786
|
-
}
|
|
787
|
-
}, {
|
|
788
|
-
"modelValue": { default: null },
|
|
789
|
-
"modelModifiers": {},
|
|
790
|
-
"placeholder": {},
|
|
791
|
-
"placeholderModifiers": {}
|
|
792
|
-
}),
|
|
793
|
-
emits: ["update:modelValue", "update:placeholder"],
|
|
794
|
-
setup(__props) {
|
|
795
|
-
const props = useDefaults(__props, "BTimeRangeField");
|
|
796
|
-
const modelValue = useModel(__props, "modelValue");
|
|
797
|
-
const placeholderModel = useModel(__props, "placeholder");
|
|
798
|
-
const computedId = useId$1(() => props.id, "time-range-field");
|
|
799
|
-
const computedRootClasses = computed(() => ({
|
|
800
|
-
"disabled": props.disabled,
|
|
801
|
-
"readonly": props.readonly,
|
|
802
|
-
"is-valid": props.state === true,
|
|
803
|
-
"is-invalid": props.state === false,
|
|
804
|
-
[`form-control-${props.size}`]: props.size !== void 0
|
|
805
|
-
}));
|
|
806
|
-
return (_ctx, _cache) => {
|
|
807
|
-
return openBlock(), createBlock(unref(TimeRangeFieldRoot_default), {
|
|
808
|
-
id: unref(computedId),
|
|
809
|
-
modelValue: modelValue.value,
|
|
810
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
811
|
-
placeholder: placeholderModel.value,
|
|
812
|
-
"onUpdate:placeholder": _cache[1] || (_cache[1] = ($event) => placeholderModel.value = $event),
|
|
813
|
-
"default-value": unref(props).defaultValue,
|
|
814
|
-
"default-placeholder": unref(props).defaultPlaceholder,
|
|
815
|
-
"hour-cycle": unref(props).hourCycle,
|
|
816
|
-
step: unref(props).step,
|
|
817
|
-
granularity: unref(props).granularity,
|
|
818
|
-
"hide-time-zone": unref(props).hideTimeZone,
|
|
819
|
-
"max-value": unref(props).maxValue,
|
|
820
|
-
"min-value": unref(props).minValue,
|
|
821
|
-
locale: unref(props).locale,
|
|
822
|
-
disabled: unref(props).disabled,
|
|
823
|
-
readonly: unref(props).readonly,
|
|
824
|
-
name: unref(props).name,
|
|
825
|
-
required: unref(props).required,
|
|
826
|
-
dir: unref(props).dir,
|
|
827
|
-
"is-time-unavailable": unref(props).isTimeUnavailable,
|
|
828
|
-
class: normalizeClass([computedRootClasses.value, "b-time-range-field form-control d-inline-flex align-items-center gap-0"])
|
|
829
|
-
}, {
|
|
830
|
-
default: withCtx(({ segments, isInvalid, modelValue: currentValue }) => [renderSlot(_ctx.$slots, "default", {
|
|
831
|
-
modelValue: currentValue,
|
|
832
|
-
segments,
|
|
833
|
-
isInvalid
|
|
834
|
-
}, () => [
|
|
835
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(segments.start, ({ part, value }) => {
|
|
836
|
-
return openBlock(), createElementBlock(Fragment, { key: `start-${part}` }, [part === "literal" ? (openBlock(), createBlock(unref(TimeRangeFieldInput_default), {
|
|
837
|
-
key: 0,
|
|
838
|
-
type: "start",
|
|
839
|
-
part,
|
|
840
|
-
class: "b-time-range-field-literal"
|
|
841
|
-
}, {
|
|
842
|
-
default: withCtx(() => [createTextVNode(toDisplayString(value), 1)]),
|
|
843
|
-
_: 2
|
|
844
|
-
}, 1032, ["part"])) : (openBlock(), createBlock(unref(TimeRangeFieldInput_default), {
|
|
845
|
-
key: 1,
|
|
846
|
-
type: "start",
|
|
847
|
-
part,
|
|
848
|
-
class: "b-time-range-field-segment"
|
|
849
|
-
}, {
|
|
850
|
-
default: withCtx(() => [createTextVNode(toDisplayString(value), 1)]),
|
|
851
|
-
_: 2
|
|
852
|
-
}, 1032, ["part"]))], 64);
|
|
853
|
-
}), 128)),
|
|
854
|
-
_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
855
|
-
class: "b-time-range-field-separator",
|
|
856
|
-
"aria-hidden": "true"
|
|
857
|
-
}, " – ", -1)),
|
|
858
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(segments.end, ({ part, value }) => {
|
|
859
|
-
return openBlock(), createElementBlock(Fragment, { key: `end-${part}` }, [part === "literal" ? (openBlock(), createBlock(unref(TimeRangeFieldInput_default), {
|
|
860
|
-
key: 0,
|
|
861
|
-
type: "end",
|
|
862
|
-
part,
|
|
863
|
-
class: "b-time-range-field-literal"
|
|
864
|
-
}, {
|
|
865
|
-
default: withCtx(() => [createTextVNode(toDisplayString(value), 1)]),
|
|
866
|
-
_: 2
|
|
867
|
-
}, 1032, ["part"])) : (openBlock(), createBlock(unref(TimeRangeFieldInput_default), {
|
|
868
|
-
key: 1,
|
|
869
|
-
type: "end",
|
|
870
|
-
part,
|
|
871
|
-
class: "b-time-range-field-segment"
|
|
872
|
-
}, {
|
|
873
|
-
default: withCtx(() => [createTextVNode(toDisplayString(value), 1)]),
|
|
874
|
-
_: 2
|
|
875
|
-
}, 1032, ["part"]))], 64);
|
|
876
|
-
}), 128))
|
|
877
|
-
])]),
|
|
878
|
-
_: 3
|
|
879
|
-
}, 8, [
|
|
880
|
-
"id",
|
|
881
|
-
"modelValue",
|
|
882
|
-
"placeholder",
|
|
883
|
-
"default-value",
|
|
884
|
-
"default-placeholder",
|
|
885
|
-
"hour-cycle",
|
|
886
|
-
"step",
|
|
887
|
-
"granularity",
|
|
888
|
-
"hide-time-zone",
|
|
889
|
-
"max-value",
|
|
890
|
-
"min-value",
|
|
891
|
-
"locale",
|
|
892
|
-
"disabled",
|
|
893
|
-
"readonly",
|
|
894
|
-
"name",
|
|
895
|
-
"required",
|
|
896
|
-
"dir",
|
|
897
|
-
"is-time-unavailable",
|
|
898
|
-
"class"
|
|
899
|
-
]);
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
});
|
|
903
|
-
//#endregion
|
|
904
|
-
export { BDateRangeField_default as n, BDateField_default as r, BTimeRangeField_default as t };
|
|
905
|
-
|
|
906
|
-
//# sourceMappingURL=BDateField-Bj-Jz7u4.js.map
|