bootstrap-vue-next 1.2.3 → 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.
Files changed (189) hide show
  1. package/dist/{BAccordion-nQptHiXD.js → BAccordion-BfaVicrj.js} +2 -2
  2. package/dist/{BAccordion-nQptHiXD.js.map → BAccordion-BfaVicrj.js.map} +1 -1
  3. package/dist/{BAlert-Bl3TOay3.js → BAlert-Czy83dU3.js} +5 -5
  4. package/dist/{BAlert-Bl3TOay3.js.map → BAlert-Czy83dU3.js.map} +1 -1
  5. package/dist/{BApp-Bg5xEz8H.js → BApp-DZ9AITOm.js} +22 -3
  6. package/dist/BApp-DZ9AITOm.js.map +1 -0
  7. package/dist/BAutocomplete-Bh4Bp5AI.js +437 -0
  8. package/dist/BAutocomplete-Bh4Bp5AI.js.map +1 -0
  9. package/dist/{BAvatar-BsStQrBF.js → BAvatar-BJNeQ1fe.js} +2 -2
  10. package/dist/{BAvatar-BsStQrBF.js.map → BAvatar-BJNeQ1fe.js.map} +1 -1
  11. package/dist/{BButton-KZu5jczf.js → BButton-DlOQ5sem.js} +2 -2
  12. package/dist/{BButton-KZu5jczf.js.map → BButton-DlOQ5sem.js.map} +1 -1
  13. package/dist/{BCard-DELccMG-.js → BCard-Bc1wed-3.js} +2 -2
  14. package/dist/{BCard-DELccMG-.js.map → BCard-Bc1wed-3.js.map} +1 -1
  15. package/dist/{BCarousel-BV2EiQRM.js → BCarousel-B-WZR469.js} +4 -5
  16. package/dist/{BCarousel-BV2EiQRM.js.map → BCarousel-B-WZR469.js.map} +1 -1
  17. package/dist/{BCollapse-B2q9Ya2S.js → BCollapse-DCjKiTxo.js} +2 -2
  18. package/dist/{BCollapse-B2q9Ya2S.js.map → BCollapse-DCjKiTxo.js.map} +1 -1
  19. package/dist/BDateField-Oh-cU-4i.js +456 -0
  20. package/dist/BDateField-Oh-cU-4i.js.map +1 -0
  21. package/dist/BDatePicker-HNI11eCe.js +632 -0
  22. package/dist/BDatePicker-HNI11eCe.js.map +1 -0
  23. package/dist/{BDropdown-D4gLdtmX.js → BDropdown-04nGcMhm.js} +6 -7
  24. package/dist/{BDropdown-D4gLdtmX.js.map → BDropdown-04nGcMhm.js.map} +1 -1
  25. package/dist/{BFormCheckbox-BYNGQgr2.js → BFormCheckbox-zjr8OsNd.js} +2 -2
  26. package/dist/{BFormCheckbox-BYNGQgr2.js.map → BFormCheckbox-zjr8OsNd.js.map} +1 -1
  27. package/dist/{BFormFile-C2DnrbK7.js → BFormFile-D_s8tf1m.js} +2 -2
  28. package/dist/{BFormFile-C2DnrbK7.js.map → BFormFile-D_s8tf1m.js.map} +1 -1
  29. package/dist/{BFormInput-_AkAy6Wk.js → BFormInput-DnIBPLCx.js} +2 -2
  30. package/dist/{BFormInput-_AkAy6Wk.js.map → BFormInput-DnIBPLCx.js.map} +1 -1
  31. package/dist/BFormOtp-Dx2RxPAW.js +150 -0
  32. package/dist/BFormOtp-Dx2RxPAW.js.map +1 -0
  33. package/dist/{BFormRadio-DAddcnfE.js → BFormRadio-DUz60sBI.js} +2 -2
  34. package/dist/{BFormRadio-DAddcnfE.js.map → BFormRadio-DUz60sBI.js.map} +1 -1
  35. package/dist/{BFormRating-iKFgSFet.js → BFormRating-CtMmDgrF.js} +2 -2
  36. package/dist/{BFormRating-iKFgSFet.js.map → BFormRating-CtMmDgrF.js.map} +1 -1
  37. package/dist/{BFormSelect-CSS-_kul.js → BFormSelect-CeslPN3i.js} +2 -3
  38. package/dist/{BFormSelect-CSS-_kul.js.map → BFormSelect-CeslPN3i.js.map} +1 -1
  39. package/dist/{BFormSpinbutton-fkVMbQC3.js → BFormSpinbutton-BR9YTfYy.js} +2 -3
  40. package/dist/{BFormSpinbutton-fkVMbQC3.js.map → BFormSpinbutton-BR9YTfYy.js.map} +1 -1
  41. package/dist/{BFormTags-CUcyRTCK.js → BFormTags-6qQn0Vlv.js} +2 -3
  42. package/dist/{BFormTags-CUcyRTCK.js.map → BFormTags-6qQn0Vlv.js.map} +1 -1
  43. package/dist/{BFormTextarea-CBBlEcrV.js → BFormTextarea-DvLrtG08.js} +3 -3
  44. package/dist/{BFormTextarea-CBBlEcrV.js.map → BFormTextarea-DvLrtG08.js.map} +1 -1
  45. package/dist/{BImg-knz2UZQE.js → BImg-Dd8Pc1Ln.js} +2 -2
  46. package/dist/{BImg-knz2UZQE.js.map → BImg-Dd8Pc1Ln.js.map} +1 -1
  47. package/dist/{BModal-BjmeVZen.js → BModal-DOmTYI6F.js} +5 -6
  48. package/dist/{BModal-BjmeVZen.js.map → BModal-DOmTYI6F.js.map} +1 -1
  49. package/dist/{BNav-B2PlMEMD.js → BNav-D3XbyI1R.js} +2 -2
  50. package/dist/{BNav-B2PlMEMD.js.map → BNav-D3XbyI1R.js.map} +1 -1
  51. package/dist/{BOffcanvas-DfR32-ZP.js → BOffcanvas-DyPG7s8I.js} +5 -5
  52. package/dist/{BOffcanvas-DfR32-ZP.js.map → BOffcanvas-DyPG7s8I.js.map} +1 -1
  53. package/dist/{BPagination-CfrsVgDp.js → BPagination-DGvgWeYG.js} +3 -3
  54. package/dist/{BPagination-CfrsVgDp.js.map → BPagination-DGvgWeYG.js.map} +1 -1
  55. package/dist/{BPlaceholder-DI12zz0a.js → BPlaceholder-BrBmbfIg.js} +3 -3
  56. package/dist/{BPlaceholder-DI12zz0a.js.map → BPlaceholder-BrBmbfIg.js.map} +1 -1
  57. package/dist/{BProgress-BNxYppi-.js → BProgress-CXhe6hsN.js} +2 -2
  58. package/dist/{BProgress-BNxYppi-.js.map → BProgress-CXhe6hsN.js.map} +1 -1
  59. package/dist/{BTable-BZxX17YU.js → BTable-8jp3wPAI.js} +2 -2
  60. package/dist/{BTable-BZxX17YU.js.map → BTable-8jp3wPAI.js.map} +1 -1
  61. package/dist/{BTabs-Zp8CvCL_.js → BTabs-Cfe8HOGE.js} +2 -2
  62. package/dist/{BTabs-Zp8CvCL_.js.map → BTabs-Cfe8HOGE.js.map} +1 -1
  63. package/dist/BTimeField-vdultTwg.js +138 -0
  64. package/dist/BTimeField-vdultTwg.js.map +1 -0
  65. package/dist/{BToast-CqE2VMW2.js → BToast-vxfpFGe3.js} +5 -5
  66. package/dist/{BToast-CqE2VMW2.js.map → BToast-vxfpFGe3.js.map} +1 -1
  67. package/dist/{BTooltip-BHFBLXnr.js → BTooltip-CV5Ogidy.js} +5 -11
  68. package/dist/BTooltip-CV5Ogidy.js.map +1 -0
  69. package/dist/bootstrap-vue-next.mjs +36 -36
  70. package/dist/{classes-BEWWGbj5.js → classes-DCjKFM2E.js} +12 -2
  71. package/dist/classes-DCjKFM2E.js.map +1 -0
  72. package/dist/components/BTooltip/BTooltip.vue.d.mts +3 -3
  73. package/dist/components/BTooltip/BTooltip.vue.d.ts +3 -3
  74. package/dist/composables/usePopover/index.d.mts +9 -9
  75. package/dist/composables/usePopover/index.d.ts +9 -9
  76. package/dist/{floatingUi-Stb1SUvw.js → floatingUi-BhgR4GBJ.js} +10 -168
  77. package/dist/floatingUi-BhgR4GBJ.js.map +1 -0
  78. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  79. package/dist/src/components/BAccordion/index.mjs +1 -1
  80. package/dist/src/components/BAlert/index.mjs +1 -1
  81. package/dist/src/components/BApp/index.mjs +1 -1
  82. package/dist/src/components/BAutocomplete/index.mjs +1 -1
  83. package/dist/src/components/BAvatar/index.mjs +1 -1
  84. package/dist/src/components/BButton/index.mjs +1 -1
  85. package/dist/src/components/BCard/index.mjs +1 -1
  86. package/dist/src/components/BCarousel/index.mjs +1 -1
  87. package/dist/src/components/BCollapse/index.mjs +1 -1
  88. package/dist/src/components/BDateField/index.mjs +1 -1
  89. package/dist/src/components/BDatePicker/index.mjs +1 -1
  90. package/dist/src/components/BDropdown/index.mjs +1 -1
  91. package/dist/src/components/BFormCheckbox/index.mjs +1 -1
  92. package/dist/src/components/BFormFile/index.mjs +1 -1
  93. package/dist/src/components/BFormInput/index.mjs +1 -1
  94. package/dist/src/components/BFormOtp/index.mjs +1 -1
  95. package/dist/src/components/BFormRadio/index.mjs +1 -1
  96. package/dist/src/components/BFormRating/index.mjs +1 -1
  97. package/dist/src/components/BFormSelect/index.mjs +1 -1
  98. package/dist/src/components/BFormSpinbutton/index.mjs +1 -1
  99. package/dist/src/components/BFormTags/index.mjs +1 -1
  100. package/dist/src/components/BFormTextarea/index.mjs +1 -1
  101. package/dist/src/components/BImg/index.mjs +1 -1
  102. package/dist/src/components/BModal/index.mjs +1 -1
  103. package/dist/src/components/BNav/index.mjs +1 -1
  104. package/dist/src/components/BOffcanvas/index.mjs +1 -1
  105. package/dist/src/components/BPagination/index.mjs +1 -1
  106. package/dist/src/components/BPlaceholder/index.mjs +1 -1
  107. package/dist/src/components/BPopover/index.mjs +1 -1
  108. package/dist/src/components/BProgress/index.mjs +1 -1
  109. package/dist/src/components/BTable/index.mjs +1 -1
  110. package/dist/src/components/BTabs/index.mjs +1 -1
  111. package/dist/src/components/BTimeField/index.mjs +1 -1
  112. package/dist/src/components/BToast/index.mjs +1 -1
  113. package/dist/src/components/BTooltip/index.mjs +1 -1
  114. package/dist/src/components/index.mjs +36 -36
  115. package/dist/src/composables/index.mjs +1 -1
  116. package/dist/src/composables/orchestratorShared/index.mjs +145 -27
  117. package/dist/src/composables/orchestratorShared/index.mjs.map +1 -1
  118. package/dist/src/composables/useColorMode/index.mjs +1 -1
  119. package/dist/src/composables/useModal/index.mjs +1 -1
  120. package/dist/src/composables/usePopover/index.mjs +2 -2
  121. package/dist/src/composables/useScrollLock/index.mjs +1 -2
  122. package/dist/src/composables/useScrollLock/index.mjs.map +1 -1
  123. package/dist/src/composables/useScrollspy/index.mjs +1 -2
  124. package/dist/src/composables/useScrollspy/index.mjs.map +1 -1
  125. package/dist/src/composables/useToast/index.mjs +1 -1
  126. package/dist/src/directives/BPopover/index.mjs +2 -2
  127. package/dist/src/directives/BScrollspy/index.mjs +1 -1
  128. package/dist/src/directives/BToggle/index.mjs +1 -1
  129. package/dist/src/directives/BTooltip/index.mjs +2 -2
  130. package/dist/src/directives/index.mjs +1 -1
  131. package/dist/src/plugins/index.mjs +1 -1
  132. package/dist/src/resolvers/index.mjs +1 -1
  133. package/dist/src/types/index.mjs +1 -1
  134. package/dist/src/utils/index.mjs +2 -2
  135. package/dist/types/ComponentOrchestratorTypes.d.mts +8 -1
  136. package/dist/types/ComponentOrchestratorTypes.d.ts +8 -1
  137. package/dist/{useCountdownHover-BN8vJIQW.js → useCountdownHover-HZSJZkHq.js} +2 -2
  138. package/dist/{useCountdownHover-BN8vJIQW.js.map → useCountdownHover-HZSJZkHq.js.map} +1 -1
  139. package/dist/{useFormInput-C-iXRxog.js → useFormInput-CMtXFoM2.js} +2 -3
  140. package/dist/{useFormInput-C-iXRxog.js.map → useFormInput-CMtXFoM2.js.map} +1 -1
  141. package/dist/useSafeScrollLock-BT4KKhxB.js +89 -0
  142. package/dist/useSafeScrollLock-BT4KKhxB.js.map +1 -0
  143. package/dist/{useShowHide-B6RQbFDt.js → useShowHide-BLIZLD9E.js} +125 -56
  144. package/dist/useShowHide-BLIZLD9E.js.map +1 -0
  145. package/dist/utils/classes.d.mts +10 -0
  146. package/dist/utils/classes.d.ts +10 -0
  147. package/dist/{utils-CK56zzsO.js → utils-CvjliJBf.js} +2 -2
  148. package/dist/{utils-CK56zzsO.js.map → utils-CvjliJBf.js.map} +1 -1
  149. package/package.json +3 -23
  150. package/dist/BApp-Bg5xEz8H.js.map +0 -1
  151. package/dist/BAutocomplete-BFbbKtpz.js +0 -2490
  152. package/dist/BAutocomplete-BFbbKtpz.js.map +0 -1
  153. package/dist/BDateField-Bj-Jz7u4.js +0 -906
  154. package/dist/BDateField-Bj-Jz7u4.js.map +0 -1
  155. package/dist/BDatePicker-AVTYcVLy.js +0 -5210
  156. package/dist/BDatePicker-AVTYcVLy.js.map +0 -1
  157. package/dist/BFormOtp-ClDACqXM.js +0 -577
  158. package/dist/BFormOtp-ClDACqXM.js.map +0 -1
  159. package/dist/BTimeField-CbRGjaI6.js +0 -516
  160. package/dist/BTimeField-CbRGjaI6.js.map +0 -1
  161. package/dist/BTooltip-BHFBLXnr.js.map +0 -1
  162. package/dist/DateRangeFieldInput-Cbzjg8iF.js +0 -761
  163. package/dist/DateRangeFieldInput-Cbzjg8iF.js.map +0 -1
  164. package/dist/PopperContent-C9eeL6LH.js +0 -1726
  165. package/dist/PopperContent-C9eeL6LH.js.map +0 -1
  166. package/dist/VisuallyHidden-BYzyjJiY.js +0 -182
  167. package/dist/VisuallyHidden-BYzyjJiY.js.map +0 -1
  168. package/dist/VisuallyHiddenInput-CUrc8XXa.js +0 -180
  169. package/dist/VisuallyHiddenInput-CUrc8XXa.js.map +0 -1
  170. package/dist/classes-BEWWGbj5.js.map +0 -1
  171. package/dist/dist-9-XTMhb-.js +0 -1302
  172. package/dist/dist-9-XTMhb-.js.map +0 -1
  173. package/dist/dist-B-regXAP.js +0 -123
  174. package/dist/dist-B-regXAP.js.map +0 -1
  175. package/dist/dist-DKc2ivHS.js +0 -411
  176. package/dist/dist-DKc2ivHS.js.map +0 -1
  177. package/dist/floating-ui.dom-C7UZexJK.js +0 -1484
  178. package/dist/floating-ui.dom-C7UZexJK.js.map +0 -1
  179. package/dist/floatingUi-Stb1SUvw.js.map +0 -1
  180. package/dist/rolldown-runtime-BBjsoOtd.js +0 -27
  181. package/dist/useDateField-CQZb799C.js +0 -3679
  182. package/dist/useDateField-CQZb799C.js.map +0 -1
  183. package/dist/useForwardExpose-DDvk7mir.js +0 -60
  184. package/dist/useForwardExpose-DDvk7mir.js.map +0 -1
  185. package/dist/useKbd-DRsaFU_f.js +0 -76
  186. package/dist/useKbd-DRsaFU_f.js.map +0 -1
  187. package/dist/useSafeScrollLock-PVgSASYu.js +0 -1326
  188. package/dist/useSafeScrollLock-PVgSASYu.js.map +0 -1
  189. package/dist/useShowHide-B6RQbFDt.js.map +0 -1
@@ -1,761 +0,0 @@
1
- import { S as useVModel } from "./dist-9-XTMhb-.js";
2
- import { D as isBeforeOrSame, E as isBefore, _ as normalizeInputValue, a as createContent, b as getDefaultDate, c as syncSegmentValues, d as useDateFormatter, g as normalizeHourCycle, h as normalizeDateStep, i as isSegmentNavigationKey, n as getSegmentElements, o as initializeSegmentValues, p as getInputType, t as useDateField, u as useLocale, v as areAllDaysBetweenValid, w as hasTime } from "./useDateField-CQZb799C.js";
3
- import { a as useDirection, l as createContext, n as usePrimitiveElement, r as Primitive, t as VisuallyHidden_default } from "./VisuallyHidden-BYzyjJiY.js";
4
- import { r as isNullish, t as useKbd } from "./useKbd-DRsaFU_f.js";
5
- import { computed, createBlock, createVNode, defineComponent, mergeProps, nextTick, onMounted, openBlock, ref, renderSlot, toHandlers, toRefs, unref, watch, withCtx, withKeys } from "vue";
6
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/DateField/DateFieldRoot.js
7
- var [injectDateFieldRootContext, provideDateFieldRootContext] = /*#__PURE__*/ createContext("DateFieldRoot");
8
- var DateFieldRoot_default = /* @__PURE__ */ defineComponent({
9
- inheritAttrs: false,
10
- __name: "DateFieldRoot",
11
- props: {
12
- defaultValue: {
13
- type: null,
14
- required: false,
15
- default: void 0
16
- },
17
- defaultPlaceholder: {
18
- type: null,
19
- required: false
20
- },
21
- placeholder: {
22
- type: null,
23
- required: false,
24
- default: void 0
25
- },
26
- modelValue: {
27
- type: null,
28
- required: false
29
- },
30
- hourCycle: {
31
- type: null,
32
- required: false
33
- },
34
- step: {
35
- type: Object,
36
- required: false
37
- },
38
- stepSnapping: {
39
- type: Boolean,
40
- required: false,
41
- default: false
42
- },
43
- granularity: {
44
- type: String,
45
- required: false
46
- },
47
- hideTimeZone: {
48
- type: Boolean,
49
- required: false
50
- },
51
- maxValue: {
52
- type: null,
53
- required: false
54
- },
55
- minValue: {
56
- type: null,
57
- required: false
58
- },
59
- locale: {
60
- type: String,
61
- required: false
62
- },
63
- disabled: {
64
- type: Boolean,
65
- required: false,
66
- default: false
67
- },
68
- readonly: {
69
- type: Boolean,
70
- required: false,
71
- default: false
72
- },
73
- isDateUnavailable: {
74
- type: Function,
75
- required: false,
76
- default: void 0
77
- },
78
- id: {
79
- type: String,
80
- required: false
81
- },
82
- dir: {
83
- type: String,
84
- required: false
85
- },
86
- asChild: {
87
- type: Boolean,
88
- required: false
89
- },
90
- as: {
91
- type: null,
92
- required: false
93
- },
94
- name: {
95
- type: String,
96
- required: false
97
- },
98
- required: {
99
- type: Boolean,
100
- required: false
101
- }
102
- },
103
- emits: ["update:modelValue", "update:placeholder"],
104
- setup(__props, { expose: __expose, emit: __emit }) {
105
- const props = __props;
106
- const emits = __emit;
107
- const { disabled, readonly, isDateUnavailable: propsIsDateUnavailable, granularity, defaultValue, stepSnapping, dir: propDir, locale: propLocale } = toRefs(props);
108
- const locale = useLocale(propLocale);
109
- const dir = useDirection(propDir);
110
- const formatter = useDateFormatter(locale.value, { hourCycle: normalizeHourCycle(props.hourCycle) });
111
- const { primitiveElement, currentElement: parentElement } = usePrimitiveElement();
112
- const segmentElements = ref(/* @__PURE__ */ new Set());
113
- onMounted(() => {
114
- getSegmentElements(parentElement.value).forEach((item) => segmentElements.value.add(item));
115
- });
116
- const modelValue = useVModel(props, "modelValue", emits, {
117
- defaultValue: defaultValue.value,
118
- passive: props.modelValue === void 0
119
- });
120
- const defaultDate = getDefaultDate({
121
- defaultPlaceholder: props.placeholder,
122
- granularity: granularity.value,
123
- defaultValue: modelValue.value,
124
- locale: props.locale
125
- });
126
- const placeholder = useVModel(props, "placeholder", emits, {
127
- defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),
128
- passive: props.placeholder === void 0
129
- });
130
- const step = computed(() => normalizeDateStep(props));
131
- const inferredGranularity = computed(() => {
132
- if (props.granularity) return !hasTime(placeholder.value) ? "day" : props.granularity;
133
- return hasTime(placeholder.value) ? "minute" : "day";
134
- });
135
- const isInvalid = computed(() => {
136
- if (!modelValue.value) return false;
137
- if (propsIsDateUnavailable.value?.(modelValue.value)) return true;
138
- if (props.minValue && isBefore(modelValue.value, props.minValue)) return true;
139
- if (props.maxValue && isBefore(props.maxValue, modelValue.value)) return true;
140
- return false;
141
- });
142
- const initialSegments = initializeSegmentValues(inferredGranularity.value);
143
- const segmentValues = ref(modelValue.value ? { ...syncSegmentValues({
144
- value: modelValue.value,
145
- formatter
146
- }) } : { ...initialSegments });
147
- const allSegmentContent = computed(() => createContent({
148
- granularity: inferredGranularity.value,
149
- dateRef: placeholder.value,
150
- formatter,
151
- hideTimeZone: props.hideTimeZone,
152
- hourCycle: props.hourCycle,
153
- segmentValues: segmentValues.value,
154
- locale
155
- }));
156
- const segmentContents = computed(() => allSegmentContent.value.arr);
157
- const editableSegmentContents = computed(() => segmentContents.value.filter(({ part }) => part !== "literal"));
158
- watch(locale, (value) => {
159
- if (formatter.getLocale() !== value) {
160
- formatter.setLocale(value);
161
- nextTick(() => {
162
- segmentElements.value.clear();
163
- getSegmentElements(parentElement.value).forEach((item) => segmentElements.value.add(item));
164
- });
165
- }
166
- });
167
- watch(modelValue, (_modelValue) => {
168
- if (!isNullish(_modelValue) && placeholder.value.compare(_modelValue) !== 0) placeholder.value = _modelValue.copy();
169
- });
170
- watch([modelValue, locale], ([_modelValue]) => {
171
- if (!isNullish(_modelValue)) segmentValues.value = { ...syncSegmentValues({
172
- value: _modelValue,
173
- formatter
174
- }) };
175
- else if (Object.values(segmentValues.value).every((value) => value !== null) && isNullish(_modelValue)) segmentValues.value = { ...initialSegments };
176
- });
177
- const currentFocusedElement = ref(null);
178
- const currentSegmentIndex = computed(() => Array.from(segmentElements.value).findIndex((el) => el.getAttribute("data-reka-date-field-segment") === currentFocusedElement.value?.getAttribute("data-reka-date-field-segment")));
179
- const nextFocusableSegment = computed(() => {
180
- const sign = dir.value === "rtl" ? -1 : 1;
181
- if (sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1) return null;
182
- return Array.from(segmentElements.value)[currentSegmentIndex.value + sign];
183
- });
184
- const prevFocusableSegment = computed(() => {
185
- const sign = dir.value === "rtl" ? -1 : 1;
186
- if (sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1) return null;
187
- return Array.from(segmentElements.value)[currentSegmentIndex.value - sign];
188
- });
189
- const inputType = computed(() => getInputType(inferredGranularity.value));
190
- const inputValue = computed(() => normalizeInputValue(modelValue.value, inferredGranularity.value));
191
- const inputMaxValue = computed(() => props.maxValue ? normalizeInputValue(props.maxValue, inferredGranularity.value) : void 0);
192
- const inputMinValue = computed(() => props.minValue ? normalizeInputValue(props.minValue, inferredGranularity.value) : void 0);
193
- const kbd = useKbd();
194
- function handleKeydown(e) {
195
- if (e.isComposing) return;
196
- if (!isSegmentNavigationKey(e.key)) return;
197
- if (e.key === kbd.ARROW_LEFT) prevFocusableSegment.value?.focus();
198
- if (e.key === kbd.ARROW_RIGHT) nextFocusableSegment.value?.focus();
199
- }
200
- function setFocusedElement(el) {
201
- currentFocusedElement.value = el;
202
- }
203
- provideDateFieldRootContext({
204
- isDateUnavailable: propsIsDateUnavailable.value,
205
- locale,
206
- modelValue,
207
- placeholder,
208
- disabled,
209
- formatter,
210
- hourCycle: props.hourCycle,
211
- step,
212
- stepSnapping,
213
- readonly,
214
- segmentValues,
215
- isInvalid,
216
- segmentContents: editableSegmentContents,
217
- elements: segmentElements,
218
- setFocusedElement,
219
- focusNext() {
220
- Array.from(segmentElements.value)[currentSegmentIndex.value + 1]?.focus();
221
- }
222
- });
223
- __expose({ setFocusedElement });
224
- return (_ctx, _cache) => {
225
- return openBlock(), createBlock(unref(Primitive), mergeProps(_ctx.$attrs, {
226
- ref_key: "primitiveElement",
227
- ref: primitiveElement,
228
- role: "group",
229
- "aria-disabled": unref(disabled) ? true : void 0,
230
- "data-disabled": unref(disabled) ? "" : void 0,
231
- "data-readonly": unref(readonly) ? "" : void 0,
232
- "data-invalid": isInvalid.value ? "" : void 0,
233
- dir: unref(dir),
234
- onKeydown: withKeys(handleKeydown, ["left", "right"])
235
- }), {
236
- default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
237
- modelValue: unref(modelValue),
238
- segments: segmentContents.value,
239
- isInvalid: isInvalid.value
240
- }), createVNode(unref(VisuallyHidden_default), {
241
- id: _ctx.id,
242
- as: "input",
243
- type: inputType.value,
244
- feature: "focusable",
245
- tabindex: "-1",
246
- value: inputValue.value,
247
- name: _ctx.name,
248
- disabled: unref(disabled),
249
- required: _ctx.required,
250
- max: inputMaxValue.value,
251
- min: inputMinValue.value,
252
- onFocus: _cache[0] || (_cache[0] = ($event) => Array.from(segmentElements.value)?.[0]?.focus())
253
- }, null, 8, [
254
- "id",
255
- "type",
256
- "value",
257
- "name",
258
- "disabled",
259
- "required",
260
- "max",
261
- "min"
262
- ])]),
263
- _: 3
264
- }, 16, [
265
- "aria-disabled",
266
- "data-disabled",
267
- "data-readonly",
268
- "data-invalid",
269
- "dir"
270
- ]);
271
- };
272
- }
273
- });
274
- //#endregion
275
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/DateField/DateFieldInput.js
276
- var DateFieldInput_default = /* @__PURE__ */ defineComponent({
277
- __name: "DateFieldInput",
278
- props: {
279
- part: {
280
- type: null,
281
- required: true
282
- },
283
- asChild: {
284
- type: Boolean,
285
- required: false
286
- },
287
- as: {
288
- type: null,
289
- required: false
290
- }
291
- },
292
- setup(__props) {
293
- const props = __props;
294
- const rootContext = injectDateFieldRootContext();
295
- const hasLeftFocus = ref(true);
296
- const lastKeyZero = ref(false);
297
- const { handleSegmentClick, handleSegmentKeydown, handleSegmentFocusOut, handleSegmentBeforeInput, handleSegmentCompositionStart, handleSegmentCompositionEnd, attributes } = useDateField({
298
- hasLeftFocus,
299
- lastKeyZero,
300
- placeholder: rootContext.placeholder,
301
- hourCycle: rootContext.hourCycle,
302
- step: rootContext.step,
303
- stepSnapping: rootContext.stepSnapping,
304
- segmentValues: rootContext.segmentValues,
305
- formatter: rootContext.formatter,
306
- part: props.part,
307
- disabled: rootContext.disabled,
308
- readonly: rootContext.readonly,
309
- focusNext: rootContext.focusNext,
310
- modelValue: rootContext.modelValue
311
- });
312
- const disabled = computed(() => rootContext.disabled.value);
313
- const readonly = computed(() => rootContext.readonly.value);
314
- const isInvalid = computed(() => rootContext.isInvalid.value);
315
- return (_ctx, _cache) => {
316
- return openBlock(), createBlock(unref(Primitive), mergeProps({
317
- as: _ctx.as,
318
- "as-child": _ctx.asChild
319
- }, unref(attributes), {
320
- contenteditable: disabled.value || readonly.value ? false : _ctx.part !== "literal",
321
- "data-reka-date-field-segment": _ctx.part,
322
- "aria-disabled": disabled.value ? true : void 0,
323
- "aria-readonly": readonly.value ? true : void 0,
324
- "data-disabled": disabled.value ? "" : void 0,
325
- "data-invalid": isInvalid.value ? "" : void 0,
326
- "aria-invalid": isInvalid.value ? true : void 0
327
- }, toHandlers(_ctx.part !== "literal" ? {
328
- mousedown: unref(handleSegmentClick),
329
- keydown: unref(handleSegmentKeydown),
330
- beforeinput: unref(handleSegmentBeforeInput),
331
- compositionstart: unref(handleSegmentCompositionStart),
332
- compositionend: unref(handleSegmentCompositionEnd),
333
- focusout: () => {
334
- hasLeftFocus.value = true;
335
- unref(handleSegmentFocusOut)();
336
- },
337
- focusin: (e) => {
338
- unref(rootContext).setFocusedElement(e.target);
339
- }
340
- } : {})), {
341
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
342
- _: 3
343
- }, 16, [
344
- "as",
345
- "as-child",
346
- "contenteditable",
347
- "data-reka-date-field-segment",
348
- "aria-disabled",
349
- "aria-readonly",
350
- "data-disabled",
351
- "data-invalid",
352
- "aria-invalid"
353
- ]);
354
- };
355
- }
356
- });
357
- //#endregion
358
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/DateRangeField/DateRangeFieldRoot.js
359
- var [injectDateRangeFieldRootContext, provideDateRangeFieldRootContext] = /*#__PURE__*/ createContext("DateRangeFieldRoot");
360
- var DateRangeFieldRoot_default = /* @__PURE__ */ defineComponent({
361
- inheritAttrs: false,
362
- __name: "DateRangeFieldRoot",
363
- props: {
364
- defaultValue: {
365
- type: Object,
366
- required: false,
367
- default: void 0
368
- },
369
- defaultPlaceholder: {
370
- type: null,
371
- required: false
372
- },
373
- placeholder: {
374
- type: null,
375
- required: false,
376
- default: void 0
377
- },
378
- modelValue: {
379
- type: [Object, null],
380
- required: false
381
- },
382
- hourCycle: {
383
- type: null,
384
- required: false
385
- },
386
- step: {
387
- type: Object,
388
- required: false
389
- },
390
- granularity: {
391
- type: String,
392
- required: false
393
- },
394
- hideTimeZone: {
395
- type: Boolean,
396
- required: false
397
- },
398
- maxValue: {
399
- type: null,
400
- required: false
401
- },
402
- minValue: {
403
- type: null,
404
- required: false
405
- },
406
- locale: {
407
- type: String,
408
- required: false
409
- },
410
- disabled: {
411
- type: Boolean,
412
- required: false,
413
- default: false
414
- },
415
- readonly: {
416
- type: Boolean,
417
- required: false,
418
- default: false
419
- },
420
- isDateUnavailable: {
421
- type: Function,
422
- required: false,
423
- default: void 0
424
- },
425
- id: {
426
- type: String,
427
- required: false
428
- },
429
- dir: {
430
- type: String,
431
- required: false
432
- },
433
- asChild: {
434
- type: Boolean,
435
- required: false
436
- },
437
- as: {
438
- type: null,
439
- required: false
440
- },
441
- name: {
442
- type: String,
443
- required: false
444
- },
445
- required: {
446
- type: Boolean,
447
- required: false
448
- }
449
- },
450
- emits: ["update:modelValue", "update:placeholder"],
451
- setup(__props, { expose: __expose, emit: __emit }) {
452
- const props = __props;
453
- const emits = __emit;
454
- const { disabled, readonly, isDateUnavailable: propsIsDateUnavailable, dir: propDir, locale: propLocale } = toRefs(props);
455
- const locale = useLocale(propLocale);
456
- const dir = useDirection(propDir);
457
- const formatter = useDateFormatter(locale.value, { hourCycle: normalizeHourCycle(props.hourCycle) });
458
- const { primitiveElement, currentElement: parentElement } = usePrimitiveElement();
459
- const segmentElements = ref(/* @__PURE__ */ new Set());
460
- onMounted(() => {
461
- getSegmentElements(parentElement.value).forEach((item) => segmentElements.value.add(item));
462
- });
463
- const modelValue = useVModel(props, "modelValue", emits, {
464
- defaultValue: props.defaultValue ?? {
465
- start: void 0,
466
- end: void 0
467
- },
468
- passive: props.modelValue === void 0
469
- });
470
- const defaultDate = getDefaultDate({
471
- defaultPlaceholder: props.placeholder,
472
- granularity: props.granularity,
473
- defaultValue: modelValue.value?.start,
474
- locale: props.locale
475
- });
476
- const placeholder = useVModel(props, "placeholder", emits, {
477
- defaultValue: props.defaultPlaceholder ?? defaultDate.copy(),
478
- passive: props.placeholder === void 0
479
- });
480
- const step = computed(() => normalizeDateStep(props));
481
- const inferredGranularity = computed(() => {
482
- if (props.granularity) return !hasTime(placeholder.value) ? "day" : props.granularity;
483
- return hasTime(placeholder.value) ? "minute" : "day";
484
- });
485
- const isStartInvalid = computed(() => {
486
- if (!modelValue.value?.start) return false;
487
- if (propsIsDateUnavailable.value?.(modelValue.value.start)) return true;
488
- if (props.minValue && isBefore(modelValue.value.start, props.minValue)) return true;
489
- if (props.maxValue && isBefore(props.maxValue, modelValue.value.start)) return true;
490
- return false;
491
- });
492
- const isEndInvalid = computed(() => {
493
- if (!modelValue.value?.end) return false;
494
- if (propsIsDateUnavailable.value?.(modelValue.value.end)) return true;
495
- if (props.minValue && isBefore(modelValue.value.end, props.minValue)) return true;
496
- if (props.maxValue && isBefore(props.maxValue, modelValue.value.end)) return true;
497
- return false;
498
- });
499
- const isInvalid = computed(() => {
500
- if (isStartInvalid.value || isEndInvalid.value) return true;
501
- if (!modelValue.value?.start || !modelValue.value?.end) return false;
502
- if (!isBeforeOrSame(modelValue.value.start, modelValue.value.end)) return true;
503
- if (propsIsDateUnavailable.value !== void 0) {
504
- if (!areAllDaysBetweenValid(modelValue.value.start, modelValue.value.end, propsIsDateUnavailable.value, void 0)) return true;
505
- }
506
- return false;
507
- });
508
- const initialSegments = initializeSegmentValues(inferredGranularity.value);
509
- const startSegmentValues = ref(modelValue.value?.start ? { ...syncSegmentValues({
510
- value: modelValue.value.start,
511
- formatter
512
- }) } : { ...initialSegments });
513
- const endSegmentValues = ref(modelValue.value?.end ? { ...syncSegmentValues({
514
- value: modelValue.value.end,
515
- formatter
516
- }) } : { ...initialSegments });
517
- const startSegmentContent = computed(() => createContent({
518
- granularity: inferredGranularity.value,
519
- dateRef: placeholder.value,
520
- formatter,
521
- hideTimeZone: props.hideTimeZone,
522
- hourCycle: props.hourCycle,
523
- segmentValues: startSegmentValues.value,
524
- locale
525
- }));
526
- const endSegmentContent = computed(() => createContent({
527
- granularity: inferredGranularity.value,
528
- dateRef: placeholder.value,
529
- formatter,
530
- hideTimeZone: props.hideTimeZone,
531
- hourCycle: props.hourCycle,
532
- segmentValues: endSegmentValues.value,
533
- locale
534
- }));
535
- const segmentContents = computed(() => ({
536
- start: startSegmentContent.value.arr,
537
- end: endSegmentContent.value.arr
538
- }));
539
- const editableSegmentContents = computed(() => ({
540
- start: segmentContents.value.start.filter(({ part }) => part !== "literal"),
541
- end: segmentContents.value.end.filter(({ part }) => part !== "literal")
542
- }));
543
- const startValue = ref(modelValue.value?.start?.copy());
544
- const endValue = ref(modelValue.value?.end?.copy());
545
- watch([startValue, endValue], ([_startValue, _endValue]) => {
546
- modelValue.value = {
547
- start: _startValue?.copy(),
548
- end: _endValue?.copy()
549
- };
550
- });
551
- watch(modelValue, (_modelValue) => {
552
- if (_modelValue?.start && startValue.value ? _modelValue.start.compare(startValue.value) !== 0 : _modelValue?.start !== startValue.value) startValue.value = _modelValue?.start?.copy();
553
- if (_modelValue?.end && endValue.value ? _modelValue.end.compare(endValue.value) !== 0 : _modelValue?.end !== endValue.value) endValue.value = _modelValue?.end?.copy();
554
- });
555
- watch([startValue, locale], ([_startValue]) => {
556
- if (_startValue !== void 0) startSegmentValues.value = { ...syncSegmentValues({
557
- value: _startValue,
558
- formatter
559
- }) };
560
- else if (Object.values(startSegmentValues.value).every((value) => value !== null) && _startValue === void 0) startSegmentValues.value = { ...initialSegments };
561
- });
562
- watch(locale, (value) => {
563
- if (formatter.getLocale() !== value) {
564
- formatter.setLocale(value);
565
- nextTick(() => {
566
- segmentElements.value.clear();
567
- getSegmentElements(parentElement.value).forEach((item) => segmentElements.value.add(item));
568
- });
569
- }
570
- });
571
- watch(modelValue, (_modelValue) => {
572
- if (_modelValue && _modelValue.start !== void 0 && placeholder.value.compare(_modelValue.start) !== 0) placeholder.value = _modelValue.start.copy();
573
- });
574
- watch([endValue, locale], ([_endValue]) => {
575
- if (_endValue !== void 0) endSegmentValues.value = { ...syncSegmentValues({
576
- value: _endValue,
577
- formatter
578
- }) };
579
- else if (Object.values(endSegmentValues.value).every((value) => value !== null) && _endValue === void 0) endSegmentValues.value = { ...initialSegments };
580
- });
581
- const currentFocusedElement = ref(null);
582
- const currentSegmentIndex = computed(() => Array.from(segmentElements.value).findIndex((el) => el.getAttribute("data-reka-date-field-segment") === currentFocusedElement.value?.getAttribute("data-reka-date-field-segment") && el.getAttribute("data-reka-date-range-field-segment-type") === currentFocusedElement.value?.getAttribute("data-reka-date-range-field-segment-type")));
583
- const nextFocusableSegment = computed(() => {
584
- const sign = dir.value === "rtl" ? -1 : 1;
585
- if (sign < 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1) return null;
586
- return Array.from(segmentElements.value)[currentSegmentIndex.value + sign];
587
- });
588
- const prevFocusableSegment = computed(() => {
589
- const sign = dir.value === "rtl" ? -1 : 1;
590
- if (sign > 0 ? currentSegmentIndex.value < 0 : currentSegmentIndex.value > segmentElements.value.size - 1) return null;
591
- return Array.from(segmentElements.value)[currentSegmentIndex.value - sign];
592
- });
593
- const kbd = useKbd();
594
- function handleKeydown(e) {
595
- if (e.isComposing) return;
596
- if (!isSegmentNavigationKey(e.key)) return;
597
- if (e.key === kbd.ARROW_LEFT) prevFocusableSegment.value?.focus();
598
- if (e.key === kbd.ARROW_RIGHT) nextFocusableSegment.value?.focus();
599
- }
600
- function setFocusedElement(el) {
601
- currentFocusedElement.value = el;
602
- }
603
- provideDateRangeFieldRootContext({
604
- isDateUnavailable: propsIsDateUnavailable.value,
605
- locale,
606
- startValue,
607
- endValue,
608
- placeholder,
609
- disabled,
610
- formatter,
611
- hourCycle: props.hourCycle,
612
- step,
613
- readonly,
614
- segmentValues: {
615
- start: startSegmentValues,
616
- end: endSegmentValues
617
- },
618
- isInvalid,
619
- segmentContents: editableSegmentContents,
620
- elements: segmentElements,
621
- setFocusedElement,
622
- focusNext() {
623
- Array.from(segmentElements.value)[currentSegmentIndex.value + 1]?.focus();
624
- }
625
- });
626
- __expose({ setFocusedElement });
627
- return (_ctx, _cache) => {
628
- return openBlock(), createBlock(unref(Primitive), mergeProps(_ctx.$attrs, {
629
- ref_key: "primitiveElement",
630
- ref: primitiveElement,
631
- role: "group",
632
- "aria-disabled": unref(disabled) ? true : void 0,
633
- "data-disabled": unref(disabled) ? "" : void 0,
634
- "data-readonly": unref(readonly) ? "" : void 0,
635
- "data-invalid": isInvalid.value ? "" : void 0,
636
- dir: unref(dir),
637
- onKeydown: withKeys(handleKeydown, ["left", "right"])
638
- }), {
639
- default: withCtx(() => [renderSlot(_ctx.$slots, "default", {
640
- modelValue: unref(modelValue),
641
- segments: segmentContents.value,
642
- isInvalid: isInvalid.value
643
- }), createVNode(unref(VisuallyHidden_default), {
644
- id: _ctx.id,
645
- as: "input",
646
- feature: "focusable",
647
- tabindex: "-1",
648
- value: `${unref(modelValue)?.start?.toString()} - ${unref(modelValue)?.end?.toString()}`,
649
- name: _ctx.name,
650
- disabled: unref(disabled),
651
- required: _ctx.required,
652
- onFocus: _cache[0] || (_cache[0] = ($event) => Array.from(segmentElements.value)?.[0]?.focus())
653
- }, null, 8, [
654
- "id",
655
- "value",
656
- "name",
657
- "disabled",
658
- "required"
659
- ])]),
660
- _: 3
661
- }, 16, [
662
- "aria-disabled",
663
- "data-disabled",
664
- "data-readonly",
665
- "data-invalid",
666
- "dir"
667
- ]);
668
- };
669
- }
670
- });
671
- //#endregion
672
- //#region ../../node_modules/.pnpm/reka-ui@2.10.3_vue@3.5.41_typescript@5.9.3_/node_modules/reka-ui/dist/DateRangeField/DateRangeFieldInput.js
673
- var DateRangeFieldInput_default = /* @__PURE__ */ defineComponent({
674
- __name: "DateRangeFieldInput",
675
- props: {
676
- part: {
677
- type: null,
678
- required: true
679
- },
680
- type: {
681
- type: String,
682
- required: true
683
- },
684
- asChild: {
685
- type: Boolean,
686
- required: false
687
- },
688
- as: {
689
- type: null,
690
- required: false
691
- }
692
- },
693
- setup(__props) {
694
- const props = __props;
695
- const rootContext = injectDateRangeFieldRootContext();
696
- const hasLeftFocus = ref(true);
697
- const lastKeyZero = ref(false);
698
- const { handleSegmentClick, handleSegmentKeydown, handleSegmentBeforeInput, handleSegmentCompositionStart, handleSegmentCompositionEnd, attributes } = useDateField({
699
- hasLeftFocus,
700
- lastKeyZero,
701
- placeholder: rootContext.placeholder,
702
- hourCycle: rootContext.hourCycle,
703
- step: rootContext.step,
704
- segmentValues: rootContext.segmentValues[props.type],
705
- formatter: rootContext.formatter,
706
- part: props.part,
707
- disabled: rootContext.disabled,
708
- readonly: rootContext.readonly,
709
- focusNext: rootContext.focusNext,
710
- modelValue: props.type === "start" ? rootContext.startValue : rootContext.endValue
711
- });
712
- const disabled = computed(() => rootContext.disabled.value);
713
- const readonly = computed(() => rootContext.readonly.value);
714
- const isInvalid = computed(() => rootContext.isInvalid.value);
715
- return (_ctx, _cache) => {
716
- return openBlock(), createBlock(unref(Primitive), mergeProps({
717
- as: _ctx.as,
718
- "as-child": _ctx.asChild
719
- }, unref(attributes), {
720
- contenteditable: disabled.value || readonly.value ? false : _ctx.part !== "literal",
721
- "data-reka-date-field-segment": _ctx.part,
722
- "aria-disabled": disabled.value ? true : void 0,
723
- "aria-readonly": readonly.value ? true : void 0,
724
- "data-disabled": disabled.value ? "" : void 0,
725
- "data-reka-date-range-field-segment-type": _ctx.type,
726
- "data-invalid": isInvalid.value ? "" : void 0,
727
- "aria-invalid": isInvalid.value ? true : void 0
728
- }, toHandlers(_ctx.part !== "literal" ? {
729
- mousedown: unref(handleSegmentClick),
730
- keydown: unref(handleSegmentKeydown),
731
- beforeinput: unref(handleSegmentBeforeInput),
732
- compositionstart: unref(handleSegmentCompositionStart),
733
- compositionend: unref(handleSegmentCompositionEnd),
734
- focusout: () => {
735
- hasLeftFocus.value = true;
736
- },
737
- focusin: (e) => {
738
- unref(rootContext).setFocusedElement(e.target);
739
- }
740
- } : {})), {
741
- default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
742
- _: 3
743
- }, 16, [
744
- "as",
745
- "as-child",
746
- "contenteditable",
747
- "data-reka-date-field-segment",
748
- "aria-disabled",
749
- "aria-readonly",
750
- "data-disabled",
751
- "data-reka-date-range-field-segment-type",
752
- "data-invalid",
753
- "aria-invalid"
754
- ]);
755
- };
756
- }
757
- });
758
- //#endregion
759
- export { DateFieldRoot_default as i, DateRangeFieldRoot_default as n, DateFieldInput_default as r, DateRangeFieldInput_default as t };
760
-
761
- //# sourceMappingURL=DateRangeFieldInput-Cbzjg8iF.js.map