@onereach/ui-components 20.2.0-beta.5208.0 → 20.2.0-beta.5212.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/esm/components/{OrAutocompleteV3-508d99c0.js → OrAutocompleteV3-fd7065f1.js} +29 -29
  2. package/dist/esm/components/OrDateTimePickerV3-3c2fd488.js +1506 -0
  3. package/dist/esm/components/{OrEditorTabsV3-4047a163.js → OrEditorTabsV3-152c10c5.js} +1 -1
  4. package/dist/esm/components/{OrInlineInputV3-46210775.js → OrInlineInputV3-34103682.js} +1 -1
  5. package/dist/esm/components/index.js +5 -5
  6. package/dist/esm/components/or-autocomplete-v3/index.js +2 -2
  7. package/dist/esm/components/or-avatar-v3/index.js +2 -2
  8. package/dist/esm/components/or-bottom-sheet-v3/index.js +2 -2
  9. package/dist/esm/components/or-button-group-v3/index.js +2 -2
  10. package/dist/esm/components/or-button-v3/index.js +2 -2
  11. package/dist/esm/components/or-card-collection-v3/index.js +2 -2
  12. package/dist/esm/components/or-checkbox-group-v3/index.js +2 -2
  13. package/dist/esm/components/or-checkbox-tree-v3/index.js +2 -2
  14. package/dist/esm/components/or-checkbox-v3/index.js +2 -2
  15. package/dist/esm/components/or-code-v3/index.js +2 -2
  16. package/dist/esm/components/or-confirm-v3/index.js +2 -2
  17. package/dist/esm/components/or-context-menu-v3/index.js +2 -2
  18. package/dist/esm/components/or-data-grid-v3/index.js +4 -4
  19. package/dist/esm/components/or-date-format-v3/index.js +3 -3
  20. package/dist/esm/components/or-date-picker-v3/index.js +3 -3
  21. package/dist/esm/components/or-date-range-picker-v3/index.js +3 -3
  22. package/dist/esm/components/or-date-time-format-v3/index.js +4 -4
  23. package/dist/esm/components/or-date-time-picker-v3/index.js +19 -1510
  24. package/dist/esm/components/or-drawer-v3/index.js +2 -2
  25. package/dist/esm/components/or-drop-area-v3/index.js +2 -2
  26. package/dist/esm/components/or-editor-tabs-v3/index.js +3 -3
  27. package/dist/esm/components/or-expansion-panel-v3/index.js +2 -2
  28. package/dist/esm/components/or-fab-v3/index.js +2 -2
  29. package/dist/esm/components/or-filter-popover-v3/index.js +2 -2
  30. package/dist/esm/components/or-filter-trigger-v3/index.js +2 -2
  31. package/dist/esm/components/or-filter-v3/index.js +2 -2
  32. package/dist/esm/components/or-icon-button-v3/index.js +2 -2
  33. package/dist/esm/components/or-inline-input-v3/index.js +2 -2
  34. package/dist/esm/components/or-inline-textarea-v3/index.js +2 -2
  35. package/dist/esm/components/or-input-v3/index.js +2 -2
  36. package/dist/esm/components/or-list-v3/index.js +2 -2
  37. package/dist/esm/components/or-menu-item-v3/index.js +2 -2
  38. package/dist/esm/components/or-menu-v3/index.js +2 -2
  39. package/dist/esm/components/or-modal-v3/index.js +2 -2
  40. package/dist/esm/components/or-notification-v3/index.js +2 -2
  41. package/dist/esm/components/or-overlay-v3/index.js +2 -2
  42. package/dist/esm/components/or-pagination-v3/index.js +2 -2
  43. package/dist/esm/components/or-popover-v3/index.js +2 -2
  44. package/dist/esm/components/or-progress-v3/index.js +2 -2
  45. package/dist/esm/components/or-radio-group-v3/index.js +2 -2
  46. package/dist/esm/components/or-radio-v3/index.js +2 -2
  47. package/dist/esm/components/or-range-slider-v3/index.js +2 -2
  48. package/dist/esm/components/or-rating-v3/index.js +2 -2
  49. package/dist/esm/components/or-resizeable-panel-v3/index.js +2 -2
  50. package/dist/esm/components/or-rich-text-editor-v3/index.js +2 -2
  51. package/dist/esm/components/or-rich-tooltip-v3/index.js +2 -2
  52. package/dist/esm/components/or-search-v3/index.js +2 -2
  53. package/dist/esm/components/or-segmented-control-v3/index.js +2 -2
  54. package/dist/esm/components/or-select-v3/index.js +3 -3
  55. package/dist/esm/components/or-sidebar-v3/index.js +2 -2
  56. package/dist/esm/components/or-skeleton-v3/index.js +2 -2
  57. package/dist/esm/components/or-slider-v3/index.js +2 -2
  58. package/dist/esm/components/or-sorting-v3/index.js +2 -2
  59. package/dist/esm/components/or-switch-v3/index.js +2 -2
  60. package/dist/esm/components/or-tabs-v3/OrTabs.vue.d.ts +10 -1
  61. package/dist/esm/components/or-tabs-v3/index.js +26 -7
  62. package/dist/esm/components/or-tabs-v3/props.d.ts +5 -0
  63. package/dist/esm/components/or-tabs-v3/styles.d.ts +2 -1
  64. package/dist/esm/components/or-tag-input-v3/index.js +2 -2
  65. package/dist/esm/components/or-tag-v3/index.js +2 -2
  66. package/dist/esm/components/or-tags-v3/index.js +2 -2
  67. package/dist/esm/components/or-textarea-v3/index.js +2 -2
  68. package/dist/esm/components/or-time-format-v3/index.js +4 -4
  69. package/dist/esm/components/or-time-picker-v3/index.js +4 -4
  70. package/dist/esm/components/or-time-range-picker-v3/index.js +4 -4
  71. package/dist/esm/components/or-toast-v3/index.js +2 -2
  72. package/dist/esm/components/or-tooltip-v3/index.js +2 -2
  73. package/dist/esm/components/or-tree-v3/index.js +2 -2
  74. package/dist/esm/index.js +5 -5
  75. package/package.json +3 -3
@@ -0,0 +1,1506 @@
1
+ import { defineComponent, ref, computed, toRef, openBlock, createElementBlock, normalizeClass, withModifiers, Fragment, createTextVNode, toDisplayString, resolveComponent, createElementVNode, renderList, createBlock, withCtx, createVNode, renderSlot, watch, nextTick, createCommentVNode, resolveDirective, withDirectives, vShow } from 'vue';
2
+ import { j as h, r as re, J, o as oe, s, g as c, G, h as se, f as X } from './OrAutocompleteV3-fd7065f1.js';
3
+ import { OrButtonV3 as script$9 } from './or-button-v3/index.js';
4
+ import { OrLabelV3 as script$a } from './or-label-v3/index.js';
5
+ import { OrIconV3 as script$b } from './or-icon-v3/index.js';
6
+ import { OrIconButtonV3 as script$c } from './or-icon-button-v3/index.js';
7
+ import { OrMenuV3 as script$d } from './or-menu-v3/index.js';
8
+ import { OrMenuItemV3 as script$e } from './or-menu-item-v3/index.js';
9
+ import { OrErrorV3 as script$f } from './or-error-v3/index.js';
10
+ import { OrHintV3 as script$g } from './or-hint-v3/index.js';
11
+ import { OrInputBoxV3 as script$h, InputBoxVariant } from './or-input-box-v3/index.js';
12
+ import { OrPopoverV3 as script$i } from './or-popover-v3/index.js';
13
+
14
+ const formatDate = (value, format, locale) => {
15
+ if (typeof format === 'function') {
16
+ return format(value, locale);
17
+ }
18
+ return value.toLocaleString(locale, {
19
+ dateStyle: format,
20
+ timeZone: 'UTC'
21
+ });
22
+ };
23
+
24
+ const formatMobileDate = (value, format, locale) => {
25
+ return value.toLocaleString(locale, {
26
+ dateStyle: 'medium',
27
+ timeZone: 'UTC'
28
+ });
29
+ };
30
+
31
+ var m = /* @__PURE__ */ ((r) => (r.XS = "xs", r.SM = "sm", r.MD = "md", r.LG = "lg", r.XL = "xl", r))(m || {});
32
+
33
+ const formatMobileTime = (value, format, locale) => {
34
+ return value.toLocaleString(locale, {
35
+ timeStyle: 'short',
36
+ hourCycle: typeof format !== 'function' && format !== h.Auto ? format : undefined,
37
+ timeZone: 'UTC'
38
+ });
39
+ };
40
+
41
+ const formatTime = (value, format, locale) => {
42
+ if (typeof format === 'function') {
43
+ return format(value, locale);
44
+ }
45
+ return value.toLocaleString(locale, {
46
+ timeStyle: 'short',
47
+ hourCycle: format !== h.Auto ? format : undefined,
48
+ timeZone: 'UTC'
49
+ });
50
+ };
51
+
52
+ const getCurrentDate = () => {
53
+ const currentDate = new Date();
54
+ return new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate()));
55
+ };
56
+
57
+ const getNextMonthDate = () => {
58
+ const currentDate = new Date();
59
+ return new Date(Date.UTC(currentDate.getUTCFullYear(), currentDate.getUTCMonth() + 1, currentDate.getUTCDate()));
60
+ };
61
+
62
+ const scrollToElementWithinContainer = (element, container) => {
63
+ const elementRect = element.getBoundingClientRect();
64
+ const containerRect = container.getBoundingClientRect();
65
+ // Determine if the element is fully visible within the container by comparing their positions.
66
+ const isFullyVisible = elementRect.top >= containerRect.top && elementRect.bottom <= containerRect.bottom;
67
+ if (!isFullyVisible) {
68
+ // Calculate the new scrollTop value to center the element within the container.
69
+ // This involves adjusting for the height of the element and container, ensuring the element is centered.
70
+ container.scrollTop = element.offsetTop - container.offsetTop - container.clientHeight / 2 + element.clientHeight / 2;
71
+ }
72
+ };
73
+
74
+ const DateTimePickerDateControl = [
75
+ // Layout
76
+ 'layout-inline-row',
77
+ // Interactivity
78
+ 'interactivity-click',
79
+ // Theme (focus)
80
+ 'focus-visible:theme-border-inherit focus-visible:border-b-2', 'dark:focus-visible:theme-border-inherit-dark',
81
+ // Theme (selected)
82
+ 'selected:theme-border-inherit selected:border-b-2', 'dark:selected:theme-border-inherit-dark'];
83
+ const DateTimePickerDateControlPlaceholder = [
84
+ // Theme
85
+ 'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
86
+
87
+ var script$8 = defineComponent({
88
+ name: 'OrDateTimePickerDateControl',
89
+ model: {
90
+ prop: 'modelValue',
91
+ event: 'update:modelValue'
92
+ },
93
+ props: {
94
+ modelValue: {
95
+ type: undefined,
96
+ default: undefined
97
+ },
98
+ format: {
99
+ type: [String, Function],
100
+ required: true
101
+ },
102
+ locale: {
103
+ type: String,
104
+ required: true
105
+ },
106
+ selected: {
107
+ type: Boolean,
108
+ default: false
109
+ },
110
+ required: {
111
+ type: Boolean,
112
+ default: false
113
+ },
114
+ readonly: {
115
+ type: Boolean,
116
+ default: false
117
+ },
118
+ disabled: {
119
+ type: Boolean,
120
+ default: false
121
+ }
122
+ },
123
+ expose: ['root'],
124
+ setup(props, context) {
125
+ // Refs & Styles
126
+ const root = ref();
127
+ const rootStyles = computed(() => ['or-date-time-picker-date-control-v3', ...DateTimePickerDateControl]);
128
+ const placeholderStyles = computed(() => [...DateTimePickerDateControlPlaceholder]);
129
+ // State
130
+ const model = re(toRef(props, 'modelValue'), context.emit);
131
+ const placeholder = J(toRef(props, 'format'), toRef(props, 'locale'));
132
+ return {
133
+ root,
134
+ rootStyles,
135
+ placeholderStyles,
136
+ model,
137
+ placeholder,
138
+ formatDate
139
+ };
140
+ }
141
+ });
142
+
143
+ const _hoisted_1$4 = ["contenteditable", "selected", "required", "readonly", "disabled"];
144
+ const _hoisted_2$1 = ["disabled"];
145
+ function render$8(_ctx, _cache, $props, $setup, $data, $options) {
146
+ return openBlock(), createElementBlock("div", {
147
+ ref: 'root',
148
+ class: normalizeClass(_ctx.rootStyles),
149
+ contenteditable: !_ctx.disabled,
150
+ selected: _ctx.selected,
151
+ required: _ctx.required,
152
+ readonly: _ctx.readonly,
153
+ disabled: _ctx.disabled,
154
+ onKeydown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"]))
155
+ }, [_ctx.model ? (openBlock(), createElementBlock(Fragment, {
156
+ key: 0
157
+ }, [createTextVNode(toDisplayString(_ctx.formatDate(_ctx.model, _ctx.format, _ctx.locale)), 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createElementBlock("span", {
158
+ key: 1,
159
+ class: normalizeClass(_ctx.placeholderStyles),
160
+ disabled: _ctx.disabled
161
+ }, toDisplayString(_ctx.placeholder), 11 /* TEXT, CLASS, PROPS */, _hoisted_2$1))], 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_1$4);
162
+ }
163
+
164
+ script$8.render = render$8;
165
+ script$8.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue";
166
+
167
+ const DateTimePickerDateSelect = [
168
+ // Layout
169
+ 'layout-column',
170
+ // Spacing
171
+ 'px-md', 'py-md', 'gap-sm'];
172
+ const DateTimePickerDateSelectButtonGroup = [
173
+ // Layout
174
+ 'grid content-start', 'grid-cols-7',
175
+ // Box
176
+ 'h-[262px]',
177
+ // Spacing
178
+ '-mx-[2px]', '-my-[2px]'];
179
+ const DateTimePickerDateSelectButtonGroupWeekdayItem = [
180
+ // Layout
181
+ 'layout-row justify-center',
182
+ // Interactivity
183
+ 'interactivity-default',
184
+ // Spacing
185
+ 'mx-[2px]', 'my-[2px]', 'px-sm', 'py-sm',
186
+ // Typography
187
+ 'typography-caption-regular',
188
+ // Theme
189
+ 'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
190
+ const DateTimePickerDateSelectButtonGroupDateItem = [
191
+ // Box
192
+ '!min-w-fit',
193
+ // Spacing
194
+ 'mx-[2px]', 'my-[2px]', '!px-sm', '!py-sm',
195
+ // Typography
196
+ 'typography-caption-regular'];
197
+ const DateTimePickerDateSelectButtonGroupCurrentDateItem = [
198
+ // Theme
199
+ 'theme-foreground-primary', 'dark:theme-foreground-primary-dark', 'theme-outline-primary outline-1', 'dark:theme-outline-primary-dark'];
200
+ const DateTimePickerDateSelectButtonGroupInRangeDateItem = [
201
+ // Spacing
202
+ '!mx-0', '!px-[10px]',
203
+ // Shape
204
+ '!rounded-0',
205
+ // Theme
206
+ 'theme-background-primary-translucent-2', 'dark:theme-background-primary-translucent-2-dark'];
207
+
208
+ var script$7 = defineComponent({
209
+ name: 'OrDateTimePickerDateSelect',
210
+ components: {
211
+ OrButton: script$9
212
+ },
213
+ model: {
214
+ prop: 'modelValue',
215
+ event: 'update:modelValue'
216
+ },
217
+ props: {
218
+ modelValue: {
219
+ type: undefined,
220
+ default: undefined
221
+ },
222
+ initialValue: {
223
+ type: Date,
224
+ required: true
225
+ },
226
+ format: {
227
+ type: [String, Function],
228
+ required: true
229
+ },
230
+ locale: {
231
+ type: String,
232
+ required: true
233
+ },
234
+ dateFilter: {
235
+ type: Function,
236
+ default: undefined
237
+ },
238
+ rangeStart: {
239
+ type: Date,
240
+ default: undefined
241
+ },
242
+ rangeEnd: {
243
+ type: Date,
244
+ default: undefined
245
+ }
246
+ },
247
+ emits: ['update:modelValue'],
248
+ expose: ['root'],
249
+ setup(props, context) {
250
+ // Refs & Styles
251
+ const root = ref();
252
+ const rootStyles = computed(() => ['or-date-time-picker-date-select-v3', ...DateTimePickerDateSelect]);
253
+ const buttonGroupStyles = computed(() => [...DateTimePickerDateSelectButtonGroup]);
254
+ const buttonGroupWeekdayItemStyles = computed(() => [...DateTimePickerDateSelectButtonGroupWeekdayItem]);
255
+ const buttonGroupDateItemStyles = computed(() => [...DateTimePickerDateSelectButtonGroupDateItem]);
256
+ const buttonGroupCurrentDateItemStyles = computed(() => [...DateTimePickerDateSelectButtonGroupCurrentDateItem]);
257
+ const buttonGroupInRangeDateItemStyles = computed(() => [...DateTimePickerDateSelectButtonGroupInRangeDateItem]);
258
+ // State
259
+ const model = re(toRef(props, 'modelValue'), context.emit);
260
+ const dayOptions = computed(() => {
261
+ const monthStartDate = new Date(Date.UTC(props.initialValue.getUTCFullYear(), props.initialValue.getUTCMonth(), 1, props.initialValue.getUTCHours(), props.initialValue.getUTCMinutes()));
262
+ const monthEndDate = new Date(Date.UTC(props.initialValue.getUTCFullYear(), props.initialValue.getUTCMonth() + 1, 0, props.initialValue.getUTCHours(), props.initialValue.getUTCMinutes()));
263
+ const calendarStartDate = new Date(Date.UTC(monthStartDate.getUTCFullYear(), monthStartDate.getUTCMonth(), 1 - monthStartDate.getUTCDay(), monthStartDate.getUTCHours(), monthStartDate.getUTCMinutes()));
264
+ const calendarEndDate = new Date(Date.UTC(monthEndDate.getUTCFullYear(), monthEndDate.getUTCMonth() + 1, 7 - monthEndDate.getUTCDay(), monthEndDate.getUTCHours(), monthEndDate.getUTCMinutes()));
265
+ return (() => {
266
+ let options = [],
267
+ value = calendarStartDate;
268
+ while (Number(value) !== Number(calendarEndDate)) {
269
+ options = [...options, value];
270
+ value = new Date(Date.UTC(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate() + 1, value.getUTCHours(), value.getUTCMinutes()));
271
+ }
272
+ return options;
273
+ })();
274
+ });
275
+ const currentDate = computed(() => {
276
+ const value = new Date();
277
+ value.setUTCHours(props.initialValue.getUTCHours());
278
+ value.setUTCMinutes(props.initialValue.getUTCMinutes());
279
+ value.setUTCSeconds(props.initialValue.getUTCSeconds());
280
+ value.setUTCMilliseconds(props.initialValue.getUTCMilliseconds());
281
+ return value;
282
+ });
283
+ // Methods
284
+ function formatWeekday(value) {
285
+ return value.toLocaleString(props.locale, {
286
+ weekday: 'short',
287
+ timeZone: 'UTC'
288
+ });
289
+ }
290
+ function formatDay(value) {
291
+ return value.toLocaleString(props.locale, {
292
+ day: 'numeric',
293
+ timeZone: 'UTC'
294
+ });
295
+ }
296
+ return {
297
+ root,
298
+ rootStyles,
299
+ buttonGroupStyles,
300
+ buttonGroupWeekdayItemStyles,
301
+ buttonGroupDateItemStyles,
302
+ buttonGroupCurrentDateItemStyles,
303
+ buttonGroupInRangeDateItemStyles,
304
+ model,
305
+ dayOptions,
306
+ currentDate,
307
+ formatWeekday,
308
+ formatDay
309
+ };
310
+ }
311
+ });
312
+
313
+ function render$7(_ctx, _cache, $props, $setup, $data, $options) {
314
+ const _component_OrButton = resolveComponent("OrButton");
315
+ return openBlock(), createElementBlock("div", {
316
+ ref: 'root',
317
+ class: normalizeClass(_ctx.rootStyles)
318
+ }, [createElementVNode("div", {
319
+ class: normalizeClass(_ctx.buttonGroupStyles)
320
+ }, [(openBlock(), createElementBlock(Fragment, null, renderList(7, weekday => {
321
+ return createElementVNode("div", {
322
+ key: weekday,
323
+ class: normalizeClass(_ctx.buttonGroupWeekdayItemStyles)
324
+ }, toDisplayString(_ctx.formatWeekday(_ctx.dayOptions[weekday - 1])), 3 /* TEXT, CLASS */);
325
+ }), 64 /* STABLE_FRAGMENT */)), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dayOptions, value => {
326
+ return openBlock(), createBlock(_component_OrButton, {
327
+ key: Number(value),
328
+ class: normalizeClass({
329
+ [_ctx.buttonGroupDateItemStyles.join(' ')]: true,
330
+ [_ctx.buttonGroupCurrentDateItemStyles.join(' ')]: Number(value) !== Number(_ctx.model) && Number(value) !== Number(_ctx.rangeStart) && Number(value) !== Number(_ctx.rangeEnd) && Number(value) === Number(_ctx.currentDate),
331
+ [_ctx.buttonGroupInRangeDateItemStyles.join(' ')]: _ctx.rangeStart && Number(value) > Number(_ctx.rangeStart) && _ctx.rangeEnd && Number(value) < Number(_ctx.rangeEnd)
332
+ }),
333
+ variant: Number(value) === Number(_ctx.model) || _ctx.rangeStart && Number(value) === Number(_ctx.rangeStart) || _ctx.rangeEnd && Number(value) === Number(_ctx.rangeEnd) ? 'contained' : 'text',
334
+ color: Number(value) === Number(_ctx.model) || _ctx.rangeStart && Number(value) === Number(_ctx.rangeStart) || _ctx.rangeEnd && Number(value) === Number(_ctx.rangeEnd) ? 'primary' : 'inherit',
335
+ disabled: _ctx.dateFilter && !_ctx.dateFilter(value),
336
+ onClick: withModifiers($event => _ctx.model = value, ["stop"])
337
+ }, {
338
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatDay(value)), 1 /* TEXT */)]),
339
+ _: 2 /* DYNAMIC */
340
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "disabled", "onClick"]);
341
+ }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 2 /* CLASS */);
342
+ }
343
+
344
+ script$7.render = render$7;
345
+ script$7.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue";
346
+
347
+ const DateTimePickerMobileControl = [
348
+ // Layout
349
+ 'layout-column',
350
+ // Interactivity
351
+ 'interactivity-auto',
352
+ // Spacing
353
+ 'gap-xs',
354
+ // Theme
355
+ 'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
356
+ // Theme (selected)
357
+ 'selected:theme-foreground-default', 'dark:selected:theme-foreground-default-dark'];
358
+ const DateTimePickerMobileControlContent = [
359
+ // Typography
360
+ 'typography-headline-1'];
361
+
362
+ var script$6 = defineComponent({
363
+ name: 'OrDateTimePickerMobileControl',
364
+ components: {
365
+ OrLabel: script$a
366
+ },
367
+ props: {
368
+ label: {
369
+ type: String,
370
+ required: true
371
+ },
372
+ selected: {
373
+ type: Boolean,
374
+ default: false
375
+ }
376
+ },
377
+ expose: ['root'],
378
+ setup() {
379
+ // Refs & Styles
380
+ const root = ref();
381
+ const rootStyles = computed(() => ['or-date-time-picker-mobile-control-v3', ...DateTimePickerMobileControl]);
382
+ const contentStyles = computed(() => [...DateTimePickerMobileControlContent]);
383
+ return {
384
+ root,
385
+ rootStyles,
386
+ contentStyles
387
+ };
388
+ }
389
+ });
390
+
391
+ const _hoisted_1$3 = ["selected"];
392
+ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
393
+ const _component_OrLabel = resolveComponent("OrLabel");
394
+ return openBlock(), createElementBlock("div", {
395
+ ref: 'root',
396
+ class: normalizeClass(_ctx.rootStyles),
397
+ selected: _ctx.selected
398
+ }, [createVNode(_component_OrLabel, null, {
399
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.label), 1 /* TEXT */)]),
400
+ _: 1 /* STABLE */
401
+ }), createElementVNode("div", {
402
+ class: normalizeClass(_ctx.contentStyles)
403
+ }, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)], 10 /* CLASS, PROPS */, _hoisted_1$3);
404
+ }
405
+
406
+ script$6.render = render$6;
407
+ script$6.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue";
408
+
409
+ const DateTimePickerMonthSelect = [
410
+ // Layout
411
+ 'layout-row justify-between',
412
+ // Spacing
413
+ 'px-md', 'py-md', 'gap-md'];
414
+
415
+ var script$5 = defineComponent({
416
+ name: 'OrDateTimePickerMonthSelect',
417
+ components: {
418
+ OrButton: script$9,
419
+ OrIcon: script$b,
420
+ OrIconButton: script$c,
421
+ OrMenu: script$d,
422
+ OrMenuItem: script$e
423
+ },
424
+ model: {
425
+ prop: 'modelValue',
426
+ event: 'update:modelValue'
427
+ },
428
+ props: {
429
+ modelValue: {
430
+ type: undefined,
431
+ required: true
432
+ },
433
+ locale: {
434
+ type: String,
435
+ required: true
436
+ },
437
+ yearFilter: {
438
+ type: Function,
439
+ default: undefined
440
+ },
441
+ monthFilter: {
442
+ type: Function,
443
+ default: undefined
444
+ }
445
+ },
446
+ emits: ['update:modelValue'],
447
+ expose: ['root'],
448
+ setup(props, context) {
449
+ // Refs & Styles
450
+ const root = ref();
451
+ const rootStyles = computed(() => ['or-date-time-picker-month-select-v3', ...DateTimePickerMonthSelect]);
452
+ const yearButton = ref();
453
+ const yearButtonRoot = computed(() => {
454
+ var _a;
455
+ return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
456
+ });
457
+ const monthButton = ref();
458
+ const monthButtonRoot = computed(() => {
459
+ var _a;
460
+ return (_a = monthButton.value) === null || _a === void 0 ? void 0 : _a.root;
461
+ });
462
+ const yearMenu = ref();
463
+ const yearMenuState = computed(() => {
464
+ var _a;
465
+ return (_a = yearMenu.value) === null || _a === void 0 ? void 0 : _a.state;
466
+ });
467
+ const monthMenu = ref();
468
+ const monthMenuState = computed(() => {
469
+ var _a;
470
+ return (_a = monthMenu.value) === null || _a === void 0 ? void 0 : _a.state;
471
+ });
472
+ // State
473
+ const model = re(toRef(props, 'modelValue'), context.emit);
474
+ const yearOptions = computed(() => {
475
+ return Array.from({
476
+ length: 11
477
+ }).map((_value, index, {
478
+ length
479
+ }) => {
480
+ const value = model.value.getUTCFullYear() - Math.floor(length / 2) + index;
481
+ return new Date(Date.UTC(value, model.value.getUTCMonth(), model.value.getUTCDate(), model.value.getUTCHours(), model.value.getUTCMinutes()));
482
+ });
483
+ });
484
+ const monthOptions = computed(() => {
485
+ return Array.from({
486
+ length: 12
487
+ }, (_value, index) => {
488
+ const value = index;
489
+ return new Date(Date.UTC(model.value.getUTCFullYear(), value, model.value.getUTCDate(), model.value.getUTCHours(), model.value.getUTCMinutes()));
490
+ });
491
+ });
492
+ // Methods
493
+ function goToNextMonth() {
494
+ model.value = new Date(Date.UTC(model.value.getUTCFullYear(), model.value.getUTCMonth() + 1, model.value.getUTCDate(), model.value.getUTCHours(), model.value.getUTCMinutes()));
495
+ }
496
+ function goToPreviousMonth() {
497
+ model.value = new Date(Date.UTC(model.value.getUTCFullYear(), model.value.getUTCMonth() - 1, model.value.getUTCDate(), model.value.getUTCHours(), model.value.getUTCMinutes()));
498
+ }
499
+ function formatYear(value) {
500
+ return value.toLocaleString(props.locale, {
501
+ year: 'numeric',
502
+ timeZone: 'UTC'
503
+ });
504
+ }
505
+ function formatMonth(value) {
506
+ return value.toLocaleString(props.locale, {
507
+ month: 'long',
508
+ timeZone: 'UTC'
509
+ });
510
+ }
511
+ return {
512
+ root,
513
+ rootStyles,
514
+ yearButton,
515
+ yearButtonRoot,
516
+ monthButton,
517
+ monthButtonRoot,
518
+ yearMenu,
519
+ yearMenuState,
520
+ monthMenu,
521
+ monthMenuState,
522
+ model,
523
+ yearOptions,
524
+ monthOptions,
525
+ goToNextMonth,
526
+ goToPreviousMonth,
527
+ formatYear,
528
+ formatMonth
529
+ };
530
+ }
531
+ });
532
+
533
+ const _hoisted_1$2 = {
534
+ class: /*#__PURE__*/normalizeClass(['layout-row-reverse', 'gap-md'])
535
+ };
536
+ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
537
+ const _component_OrIconButton = resolveComponent("OrIconButton");
538
+ const _component_OrIcon = resolveComponent("OrIcon");
539
+ const _component_OrButton = resolveComponent("OrButton");
540
+ const _component_OrMenuItem = resolveComponent("OrMenuItem");
541
+ const _component_OrMenu = resolveComponent("OrMenu");
542
+ return openBlock(), createElementBlock("div", {
543
+ ref: 'root',
544
+ class: normalizeClass(_ctx.rootStyles)
545
+ }, [createVNode(_component_OrIconButton, {
546
+ icon: 'chevron_left',
547
+ onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.goToPreviousMonth(), ["stop"]))
548
+ }), createElementVNode("div", _hoisted_1$2, [createVNode(_component_OrButton, {
549
+ ref: 'yearButton',
550
+ variant: 'link',
551
+ color: 'inherit',
552
+ onClick: _cache[1] || (_cache[1] = withModifiers($event => {
553
+ _ctx.monthMenu && _ctx.monthMenu.close();
554
+ _ctx.yearMenu && _ctx.yearMenu.toggle();
555
+ }, ["stop"]))
556
+ }, {
557
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(_ctx.model)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
558
+ icon: _ctx.yearMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
559
+ }, null, 8 /* PROPS */, ["icon"])]),
560
+ _: 1 /* STABLE */
561
+ }), createVNode(_component_OrButton, {
562
+ ref: 'monthButton',
563
+ variant: 'link',
564
+ color: 'inherit',
565
+ onClick: _cache[2] || (_cache[2] = withModifiers($event => {
566
+ _ctx.yearMenu && _ctx.yearMenu.close();
567
+ _ctx.monthMenu && _ctx.monthMenu.toggle();
568
+ }, ["stop"]))
569
+ }, {
570
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(_ctx.model)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
571
+ icon: _ctx.monthMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
572
+ }, null, 8 /* PROPS */, ["icon"])]),
573
+ _: 1 /* STABLE */
574
+ }), createVNode(_component_OrMenu, {
575
+ ref: 'yearMenu',
576
+ trigger: _ctx.yearButtonRoot
577
+ }, {
578
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.yearOptions, value => {
579
+ return openBlock(), createBlock(_component_OrMenuItem, {
580
+ key: Number(value),
581
+ selected: Number(value) === Number(_ctx.model),
582
+ disabled: _ctx.yearFilter && !_ctx.yearFilter(value),
583
+ onClick: withModifiers($event => {
584
+ _ctx.model = value;
585
+ _ctx.yearMenu && _ctx.yearMenu.close();
586
+ }, ["stop"])
587
+ }, {
588
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(value)), 1 /* TEXT */)]),
589
+ _: 2 /* DYNAMIC */
590
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "disabled", "onClick"]);
591
+ }), 128 /* KEYED_FRAGMENT */))]),
592
+ _: 1 /* STABLE */
593
+ }, 8 /* PROPS */, ["trigger"]), createVNode(_component_OrMenu, {
594
+ ref: 'monthMenu',
595
+ trigger: _ctx.monthButtonRoot
596
+ }, {
597
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.monthOptions, value => {
598
+ return openBlock(), createBlock(_component_OrMenuItem, {
599
+ key: Number(value),
600
+ selected: Number(value) === Number(_ctx.model),
601
+ disabled: _ctx.monthFilter && !_ctx.monthFilter(value),
602
+ onClick: withModifiers($event => {
603
+ _ctx.model = value;
604
+ _ctx.monthMenu && _ctx.monthMenu.close();
605
+ }, ["stop"])
606
+ }, {
607
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(value)), 1 /* TEXT */)]),
608
+ _: 2 /* DYNAMIC */
609
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "disabled", "onClick"]);
610
+ }), 128 /* KEYED_FRAGMENT */))]),
611
+ _: 1 /* STABLE */
612
+ }, 8 /* PROPS */, ["trigger"])]), createVNode(_component_OrIconButton, {
613
+ icon: 'chevron_right',
614
+ onClick: _cache[3] || (_cache[3] = withModifiers($event => _ctx.goToNextMonth(), ["stop"]))
615
+ })], 2 /* CLASS */);
616
+ }
617
+
618
+ script$5.render = render$5;
619
+ script$5.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue";
620
+
621
+ const DateTimePickerPopoverFooter = [
622
+ // Layout
623
+ 'layout-row-reverse',
624
+ // Layout (children)
625
+ 'children:grow',
626
+ // Spacing
627
+ 'px-md md:px-sm', 'py-md md:py-sm', 'gap-md md:gap-sm',
628
+ // Theme
629
+ 'theme-border-outline-variant border-t-1', 'dark:theme-border-outline-variant-dark'];
630
+
631
+ var script$4 = defineComponent({
632
+ name: 'OrDateTimePickerPopoverFooter',
633
+ components: {
634
+ OrButton: script$9
635
+ },
636
+ props: {
637
+ disabled: {
638
+ type: Boolean,
639
+ default: false
640
+ }
641
+ },
642
+ emits: ['apply', 'reset'],
643
+ expose: ['root'],
644
+ setup() {
645
+ // Refs & Styles
646
+ const root = ref();
647
+ const rootStyles = computed(() => ['or-date-time-picker-popover-footer-v3', ...DateTimePickerPopoverFooter]);
648
+ return {
649
+ root,
650
+ rootStyles
651
+ };
652
+ }
653
+ });
654
+
655
+ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
656
+ const _component_OrButton = resolveComponent("OrButton");
657
+ return openBlock(), createElementBlock("footer", {
658
+ ref: 'root',
659
+ class: normalizeClass(_ctx.rootStyles)
660
+ }, [createVNode(_component_OrButton, {
661
+ variant: 'outlined',
662
+ disabled: _ctx.disabled,
663
+ onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.$emit('apply'), ["stop"]))
664
+ }, {
665
+ default: withCtx(() => [createTextVNode(" Done ")]),
666
+ _: 1 /* STABLE */
667
+ }, 8 /* PROPS */, ["disabled"]), createVNode(_component_OrButton, {
668
+ variant: 'text',
669
+ onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.$emit('reset'), ["stop"]))
670
+ }, {
671
+ default: withCtx(() => [createTextVNode(" Cancel ")]),
672
+ _: 1 /* STABLE */
673
+ })], 2 /* CLASS */);
674
+ }
675
+
676
+ script$4.render = render$4;
677
+ script$4.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue";
678
+
679
+ const DateTimePickerPopoverHeader = [
680
+ // Layout
681
+ 'layout-row md:hidden',
682
+ // Spacing
683
+ 'px-md', 'py-md', 'gap-xl'];
684
+
685
+ var script$3 = defineComponent({
686
+ name: 'OrDateTimePickerPopoverHeader',
687
+ expose: ['root'],
688
+ setup() {
689
+ // Refs & Styles
690
+ const root = ref();
691
+ const rootStyles = computed(() => ['or-date-time-picker-popover-header-v3', ...DateTimePickerPopoverHeader]);
692
+ return {
693
+ root,
694
+ rootStyles
695
+ };
696
+ }
697
+ });
698
+
699
+ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
700
+ return openBlock(), createElementBlock("header", {
701
+ ref: 'root',
702
+ class: normalizeClass(_ctx.rootStyles)
703
+ }, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */);
704
+ }
705
+
706
+ script$3.render = render$3;
707
+ script$3.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue";
708
+
709
+ const DateTimePickerTimeControl = [
710
+ // Layout
711
+ 'layout-inline-row',
712
+ // Interactivity
713
+ 'interactivity-click',
714
+ // Theme (focus)
715
+ 'focus-visible:theme-border-inherit focus-visible:border-b-2', 'dark:focus-visible:theme-border-inherit-dark',
716
+ // Theme (selected)
717
+ 'selected:theme-border-inherit selected:border-b-2', 'dark:selected:theme-border-inherit-dark'];
718
+ const DateTimePickerTimeControlPlaceholder = [
719
+ // Theme
720
+ 'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
721
+
722
+ var script$2 = defineComponent({
723
+ name: 'OrDateTimePickerTimeControl',
724
+ model: {
725
+ prop: 'modelValue',
726
+ event: 'update:modelValue'
727
+ },
728
+ props: {
729
+ modelValue: {
730
+ type: undefined,
731
+ default: undefined
732
+ },
733
+ format: {
734
+ type: [String, Function],
735
+ required: true
736
+ },
737
+ locale: {
738
+ type: String,
739
+ required: true
740
+ },
741
+ selected: {
742
+ type: Boolean,
743
+ default: false
744
+ },
745
+ required: {
746
+ type: Boolean,
747
+ default: false
748
+ },
749
+ readonly: {
750
+ type: Boolean,
751
+ default: false
752
+ },
753
+ disabled: {
754
+ type: Boolean,
755
+ default: false
756
+ }
757
+ },
758
+ expose: ['root'],
759
+ setup(props, context) {
760
+ // Refs & Styles
761
+ const root = ref();
762
+ const rootStyles = computed(() => ['or-date-time-picker-time-control-v3', ...DateTimePickerTimeControl]);
763
+ const placeholderStyles = computed(() => [...DateTimePickerTimeControlPlaceholder]);
764
+ // State
765
+ const model = re(toRef(props, 'modelValue'), context.emit);
766
+ const placeholder = oe(toRef(props, 'format'), toRef(props, 'locale'));
767
+ return {
768
+ root,
769
+ rootStyles,
770
+ placeholderStyles,
771
+ model,
772
+ placeholder,
773
+ formatTime
774
+ };
775
+ }
776
+ });
777
+
778
+ const _hoisted_1$1 = ["contenteditable", "selected", "required", "readonly", "disabled"];
779
+ const _hoisted_2 = ["disabled"];
780
+ function render$2(_ctx, _cache, $props, $setup, $data, $options) {
781
+ return openBlock(), createElementBlock("div", {
782
+ ref: 'root',
783
+ class: normalizeClass(_ctx.rootStyles),
784
+ contenteditable: !_ctx.disabled,
785
+ selected: _ctx.selected,
786
+ required: _ctx.required,
787
+ readonly: _ctx.readonly,
788
+ disabled: _ctx.disabled,
789
+ onKeydown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"]))
790
+ }, [_ctx.model ? (openBlock(), createElementBlock(Fragment, {
791
+ key: 0
792
+ }, [createTextVNode(toDisplayString(_ctx.formatTime(_ctx.model, _ctx.format, _ctx.locale)), 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createElementBlock("span", {
793
+ key: 1,
794
+ class: normalizeClass(_ctx.placeholderStyles),
795
+ disabled: _ctx.disabled
796
+ }, toDisplayString(_ctx.placeholder), 11 /* TEXT, CLASS, PROPS */, _hoisted_2))], 42 /* CLASS, PROPS, NEED_HYDRATION */, _hoisted_1$1);
797
+ }
798
+
799
+ script$2.render = render$2;
800
+ script$2.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue";
801
+
802
+ const DateTimePickerTimeSelect = [
803
+ // Layout
804
+ 'layout-row justify-center',
805
+ // Spacing
806
+ 'px-md', 'py-md', 'gap-sm',
807
+ // Typography
808
+ 'typography-body-2-regular',
809
+ // Theme
810
+ 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
811
+ const DateTimePickerTimeSelectButtonGroup = [
812
+ // Layout
813
+ 'layout-column',
814
+ // Box
815
+ 'h-[294px] md:h-[238px]',
816
+ // Overflow
817
+ 'overflow-x-hidden', 'overflow-y-auto'];
818
+ const DateTimePickerTimeSelectButtonGroupItem = [
819
+ // Box
820
+ '!min-w-fit',
821
+ // Typography
822
+ 'typography-caption-regular'];
823
+
824
+ var script$1 = defineComponent({
825
+ name: 'OrDateTimePickerTimeSelect',
826
+ components: {
827
+ OrButton: script$9
828
+ },
829
+ model: {
830
+ prop: 'modelValue',
831
+ event: 'update:modelValue'
832
+ },
833
+ props: {
834
+ modelValue: {
835
+ type: undefined,
836
+ default: undefined
837
+ },
838
+ initialValue: {
839
+ type: Date,
840
+ required: true
841
+ },
842
+ format: {
843
+ type: [String, Function],
844
+ required: true
845
+ },
846
+ locale: {
847
+ type: String,
848
+ required: true
849
+ },
850
+ hoursFilter: {
851
+ type: Function,
852
+ default: undefined
853
+ },
854
+ minutesFilter: {
855
+ type: Function,
856
+ default: undefined
857
+ },
858
+ hourStep: {
859
+ type: Number,
860
+ default: 1
861
+ },
862
+ minuteStep: {
863
+ type: Number,
864
+ default: 1
865
+ },
866
+ isActive: {
867
+ type: Boolean,
868
+ default: false
869
+ }
870
+ },
871
+ emits: ['update:modelValue'],
872
+ expose: ['root'],
873
+ setup(props, context) {
874
+ var _a;
875
+ // Refs & Styles
876
+ const root = ref();
877
+ const hoursContainer = ref();
878
+ const minutesContainer = ref();
879
+ const hoursButtons = ref([]);
880
+ const minutesButtons = ref([]);
881
+ const rootStyles = computed(() => ['or-date-time-picker-time-select-v3', ...DateTimePickerTimeSelect]);
882
+ const buttonGroupStyles = computed(() => [...DateTimePickerTimeSelectButtonGroup]);
883
+ const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
884
+ // State
885
+ const model = re(toRef(props, 'modelValue'), context.emit);
886
+ const dayPeriod = ref(((_a = model.value) !== null && _a !== void 0 ? _a : props.initialValue).getUTCHours() < 12 ? 'am' : 'pm');
887
+ // Effects
888
+ watch(dayPeriod, value => {
889
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
890
+ switch (value) {
891
+ case 'am':
892
+ model.value = new Date(Date.UTC(((_a = model.value) !== null && _a !== void 0 ? _a : props.initialValue).getUTCFullYear(), ((_b = model.value) !== null && _b !== void 0 ? _b : props.initialValue).getUTCMonth(), ((_c = model.value) !== null && _c !== void 0 ? _c : props.initialValue).getUTCDate(), ((_d = model.value) !== null && _d !== void 0 ? _d : props.initialValue).getUTCHours() - 12, ((_e = model.value) !== null && _e !== void 0 ? _e : props.initialValue).getUTCMinutes()));
893
+ break;
894
+ case 'pm':
895
+ model.value = new Date(Date.UTC(((_f = model.value) !== null && _f !== void 0 ? _f : props.initialValue).getUTCFullYear(), ((_g = model.value) !== null && _g !== void 0 ? _g : props.initialValue).getUTCMonth(), ((_h = model.value) !== null && _h !== void 0 ? _h : props.initialValue).getUTCDate(), ((_j = model.value) !== null && _j !== void 0 ? _j : props.initialValue).getUTCHours() + 12, ((_k = model.value) !== null && _k !== void 0 ? _k : props.initialValue).getUTCMinutes()));
896
+ break;
897
+ }
898
+ });
899
+ watch(() => props.isActive, isActive => {
900
+ // Wait for the next DOM update cycle to ensure all refs are correctly updated.
901
+ nextTick(() => {
902
+ if (!isActive || !model.value) {
903
+ return;
904
+ }
905
+ const activeHourButton = getActiveButton(hoursButtons.value, hoursOptions.value);
906
+ const activeMinuteButton = getActiveButton(minutesButtons.value, minutesOptions.value);
907
+ if (activeHourButton && hoursContainer.value) {
908
+ // scroll to the active hour button within the hours container.
909
+ scrollToElementWithinContainer(activeHourButton, hoursContainer.value);
910
+ }
911
+ if (activeMinuteButton && minutesContainer.value) {
912
+ // scroll to the active minute button within the minutes container.
913
+ scrollToElementWithinContainer(activeMinuteButton, minutesContainer.value);
914
+ }
915
+ });
916
+ }, {
917
+ immediate: true
918
+ });
919
+ // Computed
920
+ const proxyTimeFormat = computed(() => {
921
+ if (typeof props.format === 'function' || props.format === h.Auto) {
922
+ const timeSample = new Date(1970, 0);
923
+ if (timeSample.toLocaleTimeString(props.locale).includes('12')) {
924
+ return h.H12;
925
+ }
926
+ return h.H23;
927
+ }
928
+ return props.format;
929
+ });
930
+ const hoursOptions = computed(() => {
931
+ const hourStep = props.hourStep > 0 ? props.hourStep : 1;
932
+ return Array.from({
933
+ length: Math.ceil(24 / hourStep)
934
+ }, (_value, index) => {
935
+ var _a, _b, _c, _d;
936
+ const value = index * hourStep;
937
+ return new Date(Date.UTC(((_a = model.value) !== null && _a !== void 0 ? _a : props.initialValue).getUTCFullYear(), ((_b = model.value) !== null && _b !== void 0 ? _b : props.initialValue).getUTCMonth(), ((_c = model.value) !== null && _c !== void 0 ? _c : props.initialValue).getUTCDate(), value, ((_d = model.value) !== null && _d !== void 0 ? _d : props.initialValue).getUTCMinutes()));
938
+ }).filter(value => {
939
+ if (proxyTimeFormat.value === h.H23) {
940
+ return true;
941
+ }
942
+ switch (dayPeriod.value) {
943
+ case 'am':
944
+ return value.getUTCHours() < 12;
945
+ case 'pm':
946
+ return value.getUTCHours() >= 12;
947
+ }
948
+ });
949
+ });
950
+ const minutesOptions = computed(() => {
951
+ const minuteStep = props.minuteStep > 0 ? props.minuteStep : 1;
952
+ return Array.from({
953
+ length: Math.ceil(60 / minuteStep)
954
+ }, (_value, index) => {
955
+ var _a, _b, _c, _d;
956
+ const value = index * minuteStep;
957
+ return new Date(Date.UTC(((_a = model.value) !== null && _a !== void 0 ? _a : props.initialValue).getUTCFullYear(), ((_b = model.value) !== null && _b !== void 0 ? _b : props.initialValue).getUTCMonth(), ((_c = model.value) !== null && _c !== void 0 ? _c : props.initialValue).getUTCDate(), ((_d = model.value) !== null && _d !== void 0 ? _d : props.initialValue).getUTCHours(), value));
958
+ });
959
+ });
960
+ // Methods
961
+ function formatHours(value) {
962
+ return value.toLocaleString(props.locale, {
963
+ hour: 'numeric',
964
+ hourCycle: typeof props.format !== 'function' && props.format !== h.Auto ? props.format : undefined,
965
+ timeZone: 'UTC'
966
+ }).replace(/\D/g, '');
967
+ }
968
+ function formatMinutes(value) {
969
+ return String(value.getUTCMinutes()).padStart(2, '0');
970
+ }
971
+ function sortElementsByPosition(elements) {
972
+ return [...elements].sort((a, b) => {
973
+ return a.root.compareDocumentPosition(b.root) & 2 ? 1 : -1;
974
+ });
975
+ }
976
+ function getActiveButton(buttons, options) {
977
+ var _a;
978
+ return (_a = sortElementsByPosition(buttons).find((button, index) => Number(model.value) === Number(options[index]))) === null || _a === void 0 ? void 0 : _a.root;
979
+ }
980
+ return {
981
+ root,
982
+ rootStyles,
983
+ hoursContainer,
984
+ minutesContainer,
985
+ hoursButtons,
986
+ minutesButtons,
987
+ buttonGroupStyles,
988
+ buttonGroupItemStyles,
989
+ model,
990
+ dayPeriod,
991
+ proxyTimeFormat,
992
+ hoursOptions,
993
+ minutesOptions,
994
+ formatHours,
995
+ formatMinutes
996
+ };
997
+ }
998
+ });
999
+
1000
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
1001
+ const _component_OrButton = resolveComponent("OrButton");
1002
+ return openBlock(), createElementBlock("div", {
1003
+ ref: 'root',
1004
+ class: normalizeClass(_ctx.rootStyles)
1005
+ }, [createElementVNode("div", {
1006
+ ref: 'hoursContainer',
1007
+ class: normalizeClass(_ctx.buttonGroupStyles)
1008
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.hoursOptions, value => {
1009
+ return openBlock(), createBlock(_component_OrButton, {
1010
+ ref_for: true,
1011
+ ref: 'hoursButtons',
1012
+ key: Number(value),
1013
+ class: normalizeClass(_ctx.buttonGroupItemStyles),
1014
+ variant: Number(value) === Number(_ctx.model) ? 'contained' : 'text',
1015
+ color: Number(value) === Number(_ctx.model) ? 'primary' : 'inherit',
1016
+ disabled: _ctx.hoursFilter && !_ctx.hoursFilter(value),
1017
+ onClick: withModifiers($event => _ctx.model = value, ["stop"])
1018
+ }, {
1019
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatHours(value)), 1 /* TEXT */)]),
1020
+ _: 2 /* DYNAMIC */
1021
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "disabled", "onClick"]);
1022
+ }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), createTextVNode(" : "), createElementVNode("div", {
1023
+ ref: 'minutesContainer',
1024
+ class: normalizeClass(_ctx.buttonGroupStyles)
1025
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.minutesOptions, value => {
1026
+ return openBlock(), createBlock(_component_OrButton, {
1027
+ ref_for: true,
1028
+ ref: 'minutesButtons',
1029
+ key: Number(value),
1030
+ class: normalizeClass(_ctx.buttonGroupItemStyles),
1031
+ variant: Number(value) === Number(_ctx.model) ? 'contained' : 'text',
1032
+ color: Number(value) === Number(_ctx.model) ? 'primary' : 'inherit',
1033
+ disabled: _ctx.minutesFilter && !_ctx.minutesFilter(value),
1034
+ onClick: withModifiers($event => _ctx.model = value, ["stop"])
1035
+ }, {
1036
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMinutes(value)), 1 /* TEXT */)]),
1037
+ _: 2 /* DYNAMIC */
1038
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "disabled", "onClick"]);
1039
+ }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), _ctx.proxyTimeFormat === 'h12' ? (openBlock(), createElementBlock("div", {
1040
+ key: 0,
1041
+ class: normalizeClass(_ctx.buttonGroupStyles)
1042
+ }, [createVNode(_component_OrButton, {
1043
+ class: normalizeClass(_ctx.buttonGroupItemStyles),
1044
+ variant: _ctx.dayPeriod === 'am' ? 'contained' : 'text',
1045
+ color: _ctx.dayPeriod === 'am' ? 'primary' : 'inherit',
1046
+ onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.dayPeriod = 'am', ["stop"]))
1047
+ }, {
1048
+ default: withCtx(() => [createTextVNode(" AM ")]),
1049
+ _: 1 /* STABLE */
1050
+ }, 8 /* PROPS */, ["class", "variant", "color"]), createVNode(_component_OrButton, {
1051
+ class: normalizeClass(_ctx.buttonGroupItemStyles),
1052
+ variant: _ctx.dayPeriod === 'pm' ? 'contained' : 'text',
1053
+ color: _ctx.dayPeriod === 'pm' ? 'primary' : 'inherit',
1054
+ onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.dayPeriod = 'pm', ["stop"]))
1055
+ }, {
1056
+ default: withCtx(() => [createTextVNode(" PM ")]),
1057
+ _: 1 /* STABLE */
1058
+ }, 8 /* PROPS */, ["class", "variant", "color"])], 2 /* CLASS */)) : createCommentVNode("v-if", true)], 2 /* CLASS */);
1059
+ }
1060
+
1061
+ script$1.render = render$1;
1062
+ script$1.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue";
1063
+
1064
+ const DateTimePicker = [
1065
+ // Layout
1066
+ 'layout-column',
1067
+ // Spacing
1068
+ 'gap-xs'];
1069
+ const DateTimePickerDatePopover = [
1070
+ // Box
1071
+ 'w-[298px]'];
1072
+ const DateTimePickerTimePopover = [];
1073
+
1074
+ var script = defineComponent({
1075
+ name: 'OrDateTimePicker',
1076
+ components: {
1077
+ OrDateTimePickerDateControl: script$8,
1078
+ OrDateTimePickerDateSelect: script$7,
1079
+ OrDateTimePickerMobileControl: script$6,
1080
+ OrDateTimePickerMonthSelect: script$5,
1081
+ OrDateTimePickerPopoverFooter: script$4,
1082
+ OrDateTimePickerPopoverHeader: script$3,
1083
+ OrDateTimePickerTimeControl: script$2,
1084
+ OrDateTimePickerTimeSelect: script$1,
1085
+ OrError: script$f,
1086
+ OrHint: script$g,
1087
+ OrIcon: script$b,
1088
+ OrIconButton: script$c,
1089
+ OrInputBox: script$h,
1090
+ OrLabel: script$a,
1091
+ OrPopover: script$i
1092
+ },
1093
+ directives: {
1094
+ DropdownClose: s,
1095
+ DropdownOpen: c
1096
+ },
1097
+ model: {
1098
+ prop: 'modelValue',
1099
+ event: 'update:modelValue'
1100
+ },
1101
+ props: {
1102
+ modelValue: {
1103
+ type: undefined,
1104
+ default: undefined
1105
+ },
1106
+ dateFormat: {
1107
+ type: [String, Function],
1108
+ default: undefined
1109
+ },
1110
+ timeFormat: {
1111
+ type: [String, Function],
1112
+ default: undefined
1113
+ },
1114
+ locale: {
1115
+ type: String,
1116
+ default: undefined
1117
+ },
1118
+ yearFilter: {
1119
+ type: Function,
1120
+ default: undefined
1121
+ },
1122
+ monthFilter: {
1123
+ type: Function,
1124
+ default: undefined
1125
+ },
1126
+ dateFilter: {
1127
+ type: Function,
1128
+ default: undefined
1129
+ },
1130
+ hoursFilter: {
1131
+ type: Function,
1132
+ default: undefined
1133
+ },
1134
+ minutesFilter: {
1135
+ type: Function,
1136
+ default: undefined
1137
+ },
1138
+ hourStep: {
1139
+ type: Number,
1140
+ default: 1
1141
+ },
1142
+ minuteStep: {
1143
+ type: Number,
1144
+ default: 1
1145
+ },
1146
+ variant: {
1147
+ type: String,
1148
+ default: undefined
1149
+ },
1150
+ size: {
1151
+ type: String,
1152
+ default: undefined
1153
+ },
1154
+ anchor: {
1155
+ type: Object,
1156
+ default: undefined
1157
+ },
1158
+ label: {
1159
+ type: String,
1160
+ default: undefined
1161
+ },
1162
+ hint: {
1163
+ type: String,
1164
+ default: undefined
1165
+ },
1166
+ error: {
1167
+ type: [String, Boolean],
1168
+ default: undefined
1169
+ },
1170
+ required: {
1171
+ type: Boolean,
1172
+ default: false
1173
+ },
1174
+ readonly: {
1175
+ type: Boolean,
1176
+ default: false
1177
+ },
1178
+ disabled: {
1179
+ type: Boolean,
1180
+ default: false
1181
+ }
1182
+ },
1183
+ emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur'],
1184
+ expose: ['root', 'focus', 'blur'],
1185
+ setup(props, context) {
1186
+ var _a;
1187
+ // Refs & Styles
1188
+ const root = ref();
1189
+ const rootStyles = computed(() => ['or-date-time-picker-v3', ...DateTimePicker, ...(props.variant === InputBoxVariant.Embedded ? ['grow'] : [])]);
1190
+ const inputBox = ref();
1191
+ const inputBoxRoot = computed(() => {
1192
+ var _a;
1193
+ return (_a = inputBox.value) === null || _a === void 0 ? void 0 : _a.root;
1194
+ });
1195
+ const datePopover = ref();
1196
+ const datePopoverState = computed(() => {
1197
+ var _a;
1198
+ return (_a = datePopover.value) === null || _a === void 0 ? void 0 : _a.state;
1199
+ });
1200
+ const datePopoverStyles = computed(() => ['or-date-time-picker-date-popover-v3', ...DateTimePickerDatePopover]);
1201
+ const timePopover = ref();
1202
+ const timePopoverState = computed(() => {
1203
+ var _a;
1204
+ return (_a = timePopover.value) === null || _a === void 0 ? void 0 : _a.state;
1205
+ });
1206
+ const timePopoverStyles = computed(() => ['or-date-time-picker-time-popover-v3', ...DateTimePickerTimePopover]);
1207
+ // Options
1208
+ const resolvedDateFormat = G(toRef(props, 'dateFormat'));
1209
+ const resolvedTimeFormat = se(toRef(props, 'timeFormat'));
1210
+ const resolvedLocale = X(toRef(props, 'locale'));
1211
+ // State
1212
+ const initialValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : getCurrentDate());
1213
+ watch(() => props.modelValue, value => {
1214
+ initialValue.value = value !== null && value !== void 0 ? value : getCurrentDate();
1215
+ });
1216
+ const model = re(toRef(props, 'modelValue'), context.emit);
1217
+ const draft = ref(model.value);
1218
+ watch(model, value => {
1219
+ draft.value = value;
1220
+ });
1221
+ const invalid = computed(() => {
1222
+ if (draft.value) {
1223
+ if (props.yearFilter && !props.yearFilter(draft.value)) {
1224
+ return true;
1225
+ }
1226
+ if (props.monthFilter && !props.monthFilter(draft.value)) {
1227
+ return true;
1228
+ }
1229
+ if (props.dateFilter && !props.dateFilter(draft.value)) {
1230
+ return true;
1231
+ }
1232
+ if (props.hoursFilter && !props.hoursFilter(draft.value)) {
1233
+ return true;
1234
+ }
1235
+ if (props.minutesFilter && !props.minutesFilter(draft.value)) {
1236
+ return true;
1237
+ }
1238
+ return false;
1239
+ }
1240
+ return true;
1241
+ });
1242
+ // Methods
1243
+ function apply() {
1244
+ model.value = draft.value;
1245
+ }
1246
+ function reset() {
1247
+ draft.value = model.value;
1248
+ }
1249
+ function toggleDatePopover() {
1250
+ if (!props.readonly && !props.disabled) {
1251
+ const popoverInstance = datePopover.value;
1252
+ if (popoverInstance) {
1253
+ if (datePopoverState.value === 'open') {
1254
+ popoverInstance.close();
1255
+ } else {
1256
+ popoverInstance.open();
1257
+ }
1258
+ }
1259
+ closeTimePopover();
1260
+ }
1261
+ }
1262
+ function toggleTimePopover() {
1263
+ if (!props.readonly && !props.disabled) {
1264
+ const popoverInstance = timePopover.value;
1265
+ if (popoverInstance) {
1266
+ if (timePopoverState.value === 'open') {
1267
+ popoverInstance.close();
1268
+ } else {
1269
+ popoverInstance.open();
1270
+ }
1271
+ }
1272
+ closeDatePopover();
1273
+ }
1274
+ }
1275
+ function closeDatePopover() {
1276
+ const popoverInstance = datePopover.value;
1277
+ if (popoverInstance) {
1278
+ popoverInstance.close();
1279
+ }
1280
+ }
1281
+ function closeTimePopover() {
1282
+ const popoverInstance = timePopover.value;
1283
+ if (popoverInstance) {
1284
+ popoverInstance.close();
1285
+ }
1286
+ }
1287
+ return {
1288
+ root,
1289
+ rootStyles,
1290
+ inputBox,
1291
+ inputBoxRoot,
1292
+ datePopover,
1293
+ datePopoverState,
1294
+ datePopoverStyles,
1295
+ timePopover,
1296
+ timePopoverState,
1297
+ timePopoverStyles,
1298
+ resolvedDateFormat,
1299
+ resolvedTimeFormat,
1300
+ resolvedLocale,
1301
+ initialValue,
1302
+ model,
1303
+ draft,
1304
+ invalid,
1305
+ apply,
1306
+ reset,
1307
+ toggleDatePopover,
1308
+ toggleTimePopover,
1309
+ closeDatePopover,
1310
+ closeTimePopover,
1311
+ formatMobileDate,
1312
+ formatMobileTime
1313
+ };
1314
+ }
1315
+ });
1316
+
1317
+ const _hoisted_1 = /*#__PURE__*/createElementVNode("div", {
1318
+ class: /*#__PURE__*/normalizeClass(['grow'])
1319
+ }, null, -1 /* HOISTED */);
1320
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
1321
+ const _component_OrLabel = resolveComponent("OrLabel");
1322
+ const _component_OrDateTimePickerDateControl = resolveComponent("OrDateTimePickerDateControl");
1323
+ const _component_OrDateTimePickerTimeControl = resolveComponent("OrDateTimePickerTimeControl");
1324
+ const _component_OrDateTimePickerMobileControl = resolveComponent("OrDateTimePickerMobileControl");
1325
+ const _component_OrDateTimePickerPopoverHeader = resolveComponent("OrDateTimePickerPopoverHeader");
1326
+ const _component_OrDateTimePickerMonthSelect = resolveComponent("OrDateTimePickerMonthSelect");
1327
+ const _component_OrDateTimePickerDateSelect = resolveComponent("OrDateTimePickerDateSelect");
1328
+ const _component_OrDateTimePickerPopoverFooter = resolveComponent("OrDateTimePickerPopoverFooter");
1329
+ const _component_OrPopover = resolveComponent("OrPopover");
1330
+ const _component_OrDateTimePickerTimeSelect = resolveComponent("OrDateTimePickerTimeSelect");
1331
+ const _component_OrIconButton = resolveComponent("OrIconButton");
1332
+ const _component_OrIcon = resolveComponent("OrIcon");
1333
+ const _component_OrInputBox = resolveComponent("OrInputBox");
1334
+ const _component_OrHint = resolveComponent("OrHint");
1335
+ const _component_OrError = resolveComponent("OrError");
1336
+ const _directive_dropdown_open = resolveDirective("dropdown-open");
1337
+ const _directive_dropdown_close = resolveDirective("dropdown-close");
1338
+ return openBlock(), createElementBlock("div", {
1339
+ ref: 'root',
1340
+ class: normalizeClass(_ctx.rootStyles)
1341
+ }, [_ctx.$slots.label || _ctx.$slots.addon || _ctx.label ? (openBlock(), createBlock(_component_OrLabel, {
1342
+ key: 0,
1343
+ variant: 'input',
1344
+ required: _ctx.required,
1345
+ disabled: _ctx.disabled
1346
+ }, {
1347
+ addon: withCtx(() => [renderSlot(_ctx.$slots, "addon")]),
1348
+ default: withCtx(() => [renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(_ctx.label), 1 /* TEXT */)])]),
1349
+ _: 3 /* FORWARDED */
1350
+ }, 8 /* PROPS */, ["required", "disabled"])) : createCommentVNode("v-if", true), withDirectives((openBlock(), createBlock(_component_OrInputBox, {
1351
+ ref: 'inputBox',
1352
+ variant: _ctx.variant,
1353
+ size: _ctx.size,
1354
+ invalid: !!_ctx.error,
1355
+ readonly: _ctx.readonly,
1356
+ disabled: _ctx.disabled
1357
+ }, {
1358
+ addon: withCtx(() => [_ctx.modelValue ? (openBlock(), createBlock(_component_OrIconButton, {
1359
+ key: 0,
1360
+ icon: 'close',
1361
+ color: 'inherit',
1362
+ disabled: _ctx.readonly || _ctx.disabled,
1363
+ onClick: _cache[11] || (_cache[11] = withModifiers($event => _ctx.$emit('update:modelValue', undefined), ["stop"]))
1364
+ }, null, 8 /* PROPS */, ["disabled"])) : (openBlock(), createBlock(_component_OrIcon, {
1365
+ key: 1,
1366
+ icon: 'calendar_month',
1367
+ variant: 'outlined'
1368
+ }))]),
1369
+ default: withCtx(() => [withDirectives(createVNode(_component_OrDateTimePickerDateControl, {
1370
+ modelValue: _ctx.draft,
1371
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.draft = $event),
1372
+ format: _ctx.resolvedDateFormat,
1373
+ locale: _ctx.resolvedLocale,
1374
+ selected: _ctx.datePopover && _ctx.datePopover.state === 'open',
1375
+ required: _ctx.required,
1376
+ readonly: _ctx.readonly,
1377
+ disabled: _ctx.disabled
1378
+ }, null, 8 /* PROPS */, ["modelValue", "format", "locale", "selected", "required", "readonly", "disabled"]), [[_directive_dropdown_open, _ctx.toggleDatePopover], [_directive_dropdown_close, _ctx.closeDatePopover]]), withDirectives(createVNode(_component_OrDateTimePickerTimeControl, {
1379
+ modelValue: _ctx.draft,
1380
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.draft = $event),
1381
+ format: _ctx.resolvedTimeFormat,
1382
+ locale: _ctx.resolvedLocale,
1383
+ selected: _ctx.timePopover && _ctx.timePopover.state === 'open',
1384
+ required: _ctx.required,
1385
+ readonly: _ctx.readonly,
1386
+ disabled: _ctx.disabled
1387
+ }, null, 8 /* PROPS */, ["modelValue", "format", "locale", "selected", "required", "readonly", "disabled"]), [[_directive_dropdown_open, _ctx.toggleTimePopover], [_directive_dropdown_close, _ctx.closeTimePopover]]), createVNode(_component_OrPopover, {
1388
+ ref: 'datePopover',
1389
+ class: normalizeClass(_ctx.datePopoverStyles),
1390
+ "custom-styles": _ctx.datePopoverStyles,
1391
+ variant: 'auto',
1392
+ "bottom-sheet-props": {
1393
+ variant: 'basic'
1394
+ },
1395
+ trigger: _ctx.anchor || _ctx.inputBoxRoot,
1396
+ placement: 'bottom-start',
1397
+ "fallback-placement": 'start',
1398
+ onClose: _cache[6] || (_cache[6] = $event => _ctx.reset())
1399
+ }, {
1400
+ default: withCtx(() => [createVNode(_component_OrDateTimePickerPopoverHeader, null, {
1401
+ default: withCtx(() => [createVNode(_component_OrDateTimePickerMobileControl, {
1402
+ label: 'Date'
1403
+ }, {
1404
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.draft ? _ctx.formatMobileDate(_ctx.draft, _ctx.resolvedDateFormat, _ctx.resolvedLocale) : '--'), 1 /* TEXT */)]),
1405
+ _: 1 /* STABLE */
1406
+ }), createVNode(_component_OrDateTimePickerMobileControl, {
1407
+ label: 'Time'
1408
+ }, {
1409
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.draft ? _ctx.formatMobileTime(_ctx.draft, _ctx.resolvedTimeFormat, _ctx.resolvedLocale) : '--'), 1 /* TEXT */)]),
1410
+ _: 1 /* STABLE */
1411
+ })]),
1412
+ _: 1 /* STABLE */
1413
+ }), createVNode(_component_OrDateTimePickerMonthSelect, {
1414
+ modelValue: _ctx.initialValue,
1415
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.initialValue = $event),
1416
+ locale: _ctx.resolvedLocale,
1417
+ "year-filter": _ctx.yearFilter,
1418
+ "month-filter": _ctx.monthFilter
1419
+ }, null, 8 /* PROPS */, ["modelValue", "locale", "year-filter", "month-filter"]), createVNode(_component_OrDateTimePickerDateSelect, {
1420
+ modelValue: _ctx.draft,
1421
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => _ctx.draft = $event),
1422
+ "initial-value": _ctx.initialValue,
1423
+ format: _ctx.resolvedDateFormat,
1424
+ locale: _ctx.resolvedLocale,
1425
+ "date-filter": _ctx.dateFilter
1426
+ }, null, 8 /* PROPS */, ["modelValue", "initial-value", "format", "locale", "date-filter"]), createVNode(_component_OrDateTimePickerPopoverFooter, {
1427
+ disabled: _ctx.invalid,
1428
+ onApply: _cache[4] || (_cache[4] = $event => {
1429
+ _ctx.apply();
1430
+ _ctx.datePopover && _ctx.datePopover.close();
1431
+ }),
1432
+ onReset: _cache[5] || (_cache[5] = $event => {
1433
+ _ctx.reset();
1434
+ _ctx.datePopover && _ctx.datePopover.close();
1435
+ })
1436
+ }, null, 8 /* PROPS */, ["disabled"])]),
1437
+ _: 1 /* STABLE */
1438
+ }, 8 /* PROPS */, ["class", "custom-styles", "trigger"]), createVNode(_component_OrPopover, {
1439
+ ref: 'timePopover',
1440
+ class: normalizeClass(_ctx.timePopoverStyles),
1441
+ "custom-styles": _ctx.timePopoverStyles,
1442
+ variant: 'auto',
1443
+ "bottom-sheet-props": {
1444
+ variant: 'basic'
1445
+ },
1446
+ trigger: _ctx.anchor || _ctx.inputBoxRoot,
1447
+ placement: 'bottom-start',
1448
+ "fallback-placement": 'start',
1449
+ onClose: _cache[10] || (_cache[10] = $event => _ctx.reset())
1450
+ }, {
1451
+ default: withCtx(() => [createVNode(_component_OrDateTimePickerPopoverHeader, null, {
1452
+ default: withCtx(() => [createVNode(_component_OrDateTimePickerMobileControl, {
1453
+ label: 'Date'
1454
+ }, {
1455
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.draft ? _ctx.formatMobileDate(_ctx.draft, _ctx.resolvedDateFormat, _ctx.resolvedLocale) : '--'), 1 /* TEXT */)]),
1456
+ _: 1 /* STABLE */
1457
+ }), createVNode(_component_OrDateTimePickerMobileControl, {
1458
+ label: 'Time'
1459
+ }, {
1460
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.draft ? _ctx.formatMobileTime(_ctx.draft, _ctx.resolvedTimeFormat, _ctx.resolvedLocale) : '--'), 1 /* TEXT */)]),
1461
+ _: 1 /* STABLE */
1462
+ })]),
1463
+ _: 1 /* STABLE */
1464
+ }), createVNode(_component_OrDateTimePickerTimeSelect, {
1465
+ modelValue: _ctx.draft,
1466
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => _ctx.draft = $event),
1467
+ "initial-value": _ctx.initialValue,
1468
+ format: _ctx.resolvedTimeFormat,
1469
+ locale: _ctx.resolvedLocale,
1470
+ "hours-filter": _ctx.hoursFilter,
1471
+ "minutes-filter": _ctx.minutesFilter,
1472
+ "is-active": _ctx.timePopover && _ctx.timePopover.state === 'open',
1473
+ "hour-step": _ctx.hourStep,
1474
+ "minute-step": _ctx.minuteStep
1475
+ }, null, 8 /* PROPS */, ["modelValue", "initial-value", "format", "locale", "hours-filter", "minutes-filter", "is-active", "hour-step", "minute-step"]), createVNode(_component_OrDateTimePickerPopoverFooter, {
1476
+ disabled: _ctx.invalid,
1477
+ onApply: _cache[8] || (_cache[8] = $event => {
1478
+ _ctx.apply();
1479
+ _ctx.timePopover && _ctx.timePopover.close();
1480
+ }),
1481
+ onReset: _cache[9] || (_cache[9] = $event => {
1482
+ _ctx.reset();
1483
+ _ctx.timePopover && _ctx.timePopover.close();
1484
+ })
1485
+ }, null, 8 /* PROPS */, ["disabled"])]),
1486
+ _: 1 /* STABLE */
1487
+ }, 8 /* PROPS */, ["class", "custom-styles", "trigger"]), _hoisted_1]),
1488
+ _: 1 /* STABLE */
1489
+ }, 8 /* PROPS */, ["variant", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.toggleDatePopover], [_directive_dropdown_close, _ctx.closeDatePopover]]), _ctx.$slots.hint || _ctx.hint ? withDirectives((openBlock(), createBlock(_component_OrHint, {
1490
+ key: 1,
1491
+ disabled: _ctx.disabled
1492
+ }, {
1493
+ default: withCtx(() => [renderSlot(_ctx.$slots, "hint", {}, () => [createTextVNode(toDisplayString(_ctx.hint), 1 /* TEXT */)])]),
1494
+ _: 3 /* FORWARDED */
1495
+ }, 8 /* PROPS */, ["disabled"])), [[vShow, !_ctx.error]]) : createCommentVNode("v-if", true), withDirectives(createVNode(_component_OrError, {
1496
+ disabled: _ctx.disabled
1497
+ }, {
1498
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)]),
1499
+ _: 1 /* STABLE */
1500
+ }, 8 /* PROPS */, ["disabled"]), [[vShow, typeof _ctx.error === 'string' && _ctx.error.length > 0]])], 2 /* CLASS */);
1501
+ }
1502
+
1503
+ script.render = render;
1504
+ script.__file = "src/components/or-date-time-picker-v3/OrDateTimePicker.vue";
1505
+
1506
+ export { script$8 as a, script$7 as b, script$6 as c, script$5 as d, script$4 as e, formatDate as f, script$3 as g, getCurrentDate as h, formatMobileDate as i, getNextMonthDate as j, formatTime as k, script$2 as l, script$1 as m, formatMobileTime as n, scrollToElementWithinContainer as o, m as p, script as s };