@onereach/ui-components 3.0.4-beta.2500.0 → 3.0.4-beta.2502.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 (99) hide show
  1. package/dist/bundled/v2/OrDatePicker-19e467e2.js +330 -0
  2. package/dist/bundled/v2/OrDateTimePicker-1011dc69.js +440 -0
  3. package/dist/bundled/v2/OrDateTimePickerMonthSelect-9e64d257.js +408 -0
  4. package/dist/bundled/v2/OrDateTimePickerPopoverHeader-c8672c0d.js +239 -0
  5. package/dist/bundled/v2/OrDateTimePickerTimeSelect-158d717b.js +179 -0
  6. package/dist/bundled/v2/OrTimePicker-1b3a758a.js +318 -0
  7. package/dist/bundled/v2/components/index.d.ts +2 -0
  8. package/dist/bundled/v2/components/index.js +7 -2
  9. package/dist/bundled/v2/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
  10. package/dist/bundled/v2/components/or-date-picker-v3/index.d.ts +2 -0
  11. package/dist/bundled/v2/components/or-date-picker-v3/index.js +31 -0
  12. package/dist/bundled/v2/components/or-date-picker-v3/props.d.ts +1 -0
  13. package/dist/bundled/v2/components/or-date-picker-v3/styles.d.ts +2 -0
  14. package/dist/bundled/v2/components/or-date-time-picker-v3/index.js +7 -5
  15. package/dist/bundled/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
  16. package/dist/bundled/v2/components/or-time-picker-v3/index.d.ts +2 -0
  17. package/dist/bundled/v2/components/or-time-picker-v3/index.js +29 -0
  18. package/dist/bundled/v2/components/or-time-picker-v3/props.d.ts +1 -0
  19. package/dist/bundled/v2/components/or-time-picker-v3/styles.d.ts +2 -0
  20. package/dist/bundled/v2/index.js +7 -2
  21. package/dist/bundled/v3/OrDatePicker.vue_vue_type_script_lang-8eafbe6b.js +177 -0
  22. package/dist/bundled/v3/OrDateTimePicker.vue_vue_type_script_lang-b2a9ef8d.js +226 -0
  23. package/dist/bundled/v3/OrDateTimePickerMonthSelect-8989be5a.js +341 -0
  24. package/dist/bundled/v3/OrDateTimePickerPopoverHeader-caffcc00.js +162 -0
  25. package/dist/bundled/v3/OrDateTimePickerTimeSelect-e3a89bed.js +148 -0
  26. package/dist/bundled/v3/OrTimePicker.vue_vue_type_script_lang-f46eb37f.js +176 -0
  27. package/dist/bundled/v3/components/index.d.ts +2 -0
  28. package/dist/bundled/v3/components/index.js +8 -3
  29. package/dist/bundled/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
  30. package/dist/bundled/v3/components/or-date-picker-v3/index.d.ts +2 -0
  31. package/dist/bundled/v3/components/or-date-picker-v3/index.js +37 -0
  32. package/dist/bundled/v3/components/or-date-picker-v3/props.d.ts +1 -0
  33. package/dist/bundled/v3/components/or-date-picker-v3/styles.d.ts +2 -0
  34. package/dist/bundled/v3/components/or-date-time-picker-v3/index.js +7 -4
  35. package/dist/bundled/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
  36. package/dist/bundled/v3/components/or-time-picker-v3/index.d.ts +2 -0
  37. package/dist/bundled/v3/components/or-time-picker-v3/index.js +33 -0
  38. package/dist/bundled/v3/components/or-time-picker-v3/props.d.ts +1 -0
  39. package/dist/bundled/v3/components/or-time-picker-v3/styles.d.ts +2 -0
  40. package/dist/bundled/v3/index.js +629 -402
  41. package/dist/esm/v2/OrDatePicker-454f5267.js +329 -0
  42. package/dist/esm/v2/OrDateTimePicker-3f533d0c.js +439 -0
  43. package/dist/esm/v2/OrDateTimePickerMonthSelect-380d9c90.js +406 -0
  44. package/dist/esm/v2/OrDateTimePickerPopoverHeader-e11d3222.js +235 -0
  45. package/dist/esm/v2/OrDateTimePickerTimeSelect-83dd1e81.js +177 -0
  46. package/dist/esm/v2/OrTimePicker-f23c8577.js +317 -0
  47. package/dist/esm/v2/components/index.d.ts +2 -0
  48. package/dist/esm/v2/components/index.js +8 -3
  49. package/dist/esm/v2/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
  50. package/dist/esm/v2/components/or-date-picker-v3/index.d.ts +2 -0
  51. package/dist/esm/v2/components/or-date-picker-v3/index.js +29 -0
  52. package/dist/esm/v2/components/or-date-picker-v3/props.d.ts +1 -0
  53. package/dist/esm/v2/components/or-date-picker-v3/styles.d.ts +2 -0
  54. package/dist/esm/v2/components/or-date-time-picker-v3/index.js +4 -2
  55. package/dist/esm/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
  56. package/dist/esm/v2/components/or-time-picker-v3/index.d.ts +2 -0
  57. package/dist/esm/v2/components/or-time-picker-v3/index.js +27 -0
  58. package/dist/esm/v2/components/or-time-picker-v3/props.d.ts +1 -0
  59. package/dist/esm/v2/components/or-time-picker-v3/styles.d.ts +2 -0
  60. package/dist/esm/v2/index.js +8 -3
  61. package/dist/esm/v3/OrDatePicker-390f7f11.js +288 -0
  62. package/dist/esm/v3/OrDateTimePicker-54db4170.js +390 -0
  63. package/dist/esm/v3/OrDateTimePickerMonthSelect-709b673d.js +338 -0
  64. package/dist/esm/v3/OrDateTimePickerPopoverHeader-c771a251.js +161 -0
  65. package/dist/esm/v3/OrDateTimePickerTimeSelect-2c8a7f9c.js +148 -0
  66. package/dist/esm/v3/OrTimePicker-362ca566.js +282 -0
  67. package/dist/esm/v3/components/index.d.ts +2 -0
  68. package/dist/esm/v3/components/index.js +7 -2
  69. package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
  70. package/dist/esm/v3/components/or-date-picker-v3/index.d.ts +2 -0
  71. package/dist/esm/v3/components/or-date-picker-v3/index.js +27 -0
  72. package/dist/esm/v3/components/or-date-picker-v3/props.d.ts +1 -0
  73. package/dist/esm/v3/components/or-date-picker-v3/styles.d.ts +2 -0
  74. package/dist/esm/v3/components/or-date-time-picker-v3/index.js +4 -2
  75. package/dist/esm/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
  76. package/dist/esm/v3/components/or-time-picker-v3/index.d.ts +2 -0
  77. package/dist/esm/v3/components/or-time-picker-v3/index.js +25 -0
  78. package/dist/esm/v3/components/or-time-picker-v3/props.d.ts +1 -0
  79. package/dist/esm/v3/components/or-time-picker-v3/styles.d.ts +2 -0
  80. package/dist/esm/v3/index.js +7 -2
  81. package/package.json +2 -2
  82. package/src/components/index.ts +2 -0
  83. package/src/components/or-date-picker-v3/OrDatePicker.docs.mdx +7 -0
  84. package/src/components/or-date-picker-v3/OrDatePicker.stories3.ts +160 -0
  85. package/src/components/or-date-picker-v3/OrDatePicker.vue +308 -0
  86. package/src/components/or-date-picker-v3/index.ts +2 -0
  87. package/src/components/or-date-picker-v3/props.ts +1 -0
  88. package/src/components/or-date-picker-v3/styles.ts +12 -0
  89. package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +0 -34
  90. package/src/components/or-time-picker-v3/OrTimePicker.docs.mdx +7 -0
  91. package/src/components/or-time-picker-v3/OrTimePicker.stories3.ts +160 -0
  92. package/src/components/or-time-picker-v3/OrTimePicker.vue +302 -0
  93. package/src/components/or-time-picker-v3/index.ts +2 -0
  94. package/src/components/or-time-picker-v3/props.ts +1 -0
  95. package/src/components/or-time-picker-v3/styles.ts +12 -0
  96. package/dist/bundled/v2/OrDateTimePicker-5a379f88.js +0 -1245
  97. package/dist/bundled/v3/OrDateTimePicker.vue_vue_type_script_lang-77c42110.js +0 -855
  98. package/dist/esm/v2/OrDateTimePicker-9b277e74.js +0 -1238
  99. package/dist/esm/v3/OrDateTimePicker-46b452b3.js +0 -1021
@@ -1,1021 +0,0 @@
1
- import { defineComponent, ref, computed, reactive, watch } from 'vue-demi';
2
- import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-e1f90e0a.js';
3
- import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
4
- import '@vueuse/core';
5
- import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
6
- import { s as script$d } from './OrError-c01d0c29.js';
7
- import { s as script$e } from './OrHint-06ab89d7.js';
8
- import { s as script$a } from './OrIconButton-e3f4d060.js';
9
- import { s as script$f, I as InputBoxSize } from './OrInputBox-901887a1.js';
10
- import { s as script$8 } from './OrLabel-4da56db0.js';
11
- import { s as script$g } from './OrPopover-3ac8f589.js';
12
- import { s as script$7 } from './OrButton-5a850657.js';
13
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString, createVNode, renderSlot, resolveDirective, createCommentVNode, withDirectives, mergeProps, pushScopeId, popScopeId } from 'vue';
14
- import { s as script$9 } from './OrIcon-62793572.js';
15
- import { s as script$c } from './OrMenuItem-dbee450f.js';
16
- import { s as script$b } from './OrMenu-70cee836.js';
17
- import { s as styleInject } from './style-inject.es-4c6f2515.js';
18
-
19
- function useDefaultDate() {
20
- return new Date().getUTCDate();
21
- }
22
-
23
- function useDefaultHours() {
24
- return 0;
25
- }
26
-
27
- function useDefaultMinutes() {
28
- return 0;
29
- }
30
-
31
- function useDefaultMonth() {
32
- return new Date().getUTCMonth();
33
- }
34
-
35
- function useDefaultYear() {
36
- return new Date().getUTCFullYear();
37
- }
38
-
39
- const DateTimePickerDaySelect = [
40
- // Layout
41
- 'layout-column',
42
- // Spacing
43
- 'px-md', 'py-md', 'gap-sm'];
44
- const DateTimePickerDaySelectButtonGroup = [
45
- // Layout
46
- 'grid', 'grid-cols-7',
47
- // Spacing
48
- 'gap-xs'];
49
- const DateTimePickerDaySelectButtonGroupItem = [
50
- // Box
51
- 'min-w-fit',
52
- // Spacing
53
- '!px-sm', '!py-sm',
54
- // Typography
55
- 'typography-caption-regular'];
56
-
57
- var script$6 = defineComponent({
58
- name: 'OrDateTimePickerDaySelect',
59
- components: {
60
- OrButton: script$7
61
- },
62
- model: {
63
- prop: 'modelValue',
64
- event: 'update:modelValue'
65
- },
66
- props: {
67
- modelValue: {
68
- type: Date,
69
- default: undefined
70
- },
71
- filter: {
72
- type: Function,
73
- default: undefined
74
- }
75
- },
76
- emits: ['update:modelValue'],
77
- expose: ['root'],
78
- setup(props, context) {
79
- // Refs
80
- const root = ref();
81
- // Styles
82
- const rootStyles = computed(() => ['or-date-time-picker-day-select', ...DateTimePickerDaySelect]);
83
- const buttonGroupStyles = computed(() => [...DateTimePickerDaySelectButtonGroup]);
84
- const buttonGroupItemStyles = computed(() => [...DateTimePickerDaySelectButtonGroupItem]);
85
- // State
86
- const proxyModelValue = computed({
87
- get: () => {
88
- var _a;
89
- return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
90
- },
91
- set: value => {
92
- context.emit('update:modelValue', value);
93
- }
94
- });
95
- const dayOptions = computed(() => {
96
- const monthStartDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), 1, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
97
- const monthEndDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, 0, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
98
- const calendarStartDate = new Date(Date.UTC(monthStartDate.getUTCFullYear(), monthStartDate.getUTCMonth(), 1 - (monthStartDate.getUTCDay() + 6) % 7, monthStartDate.getUTCHours(), monthStartDate.getUTCMinutes()));
99
- const calendarEndDate = new Date(Date.UTC(monthEndDate.getUTCFullYear(), monthEndDate.getUTCMonth() + 1, (7 - monthEndDate.getUTCDay()) % 7, monthEndDate.getUTCHours(), monthEndDate.getUTCMinutes()));
100
- return (() => {
101
- let options = [],
102
- value = calendarStartDate;
103
- while (Number(value) !== Number(calendarEndDate)) {
104
- options = [...options, value];
105
- value = new Date(Date.UTC(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate() + 1, value.getUTCHours(), value.getUTCMinutes()));
106
- }
107
- return options;
108
- })();
109
- });
110
- // Methods
111
- function formatDay(value) {
112
- return value.toLocaleString('default', {
113
- day: 'numeric',
114
- timeZone: 'UTC'
115
- });
116
- }
117
- return {
118
- root,
119
- rootStyles,
120
- buttonGroupStyles,
121
- buttonGroupItemStyles,
122
- proxyModelValue,
123
- dayOptions,
124
- formatDay
125
- };
126
- }
127
- });
128
-
129
- function render$6(_ctx, _cache, $props, $setup, $data, $options) {
130
- const _component_OrButton = resolveComponent("OrButton");
131
- return openBlock(), createElementBlock("div", {
132
- ref: "root",
133
- class: normalizeClass(_ctx.rootStyles)
134
- }, [createElementVNode("div", {
135
- class: normalizeClass(_ctx.buttonGroupStyles)
136
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dayOptions, value => {
137
- return openBlock(), createBlock(_component_OrButton, {
138
- key: Number(value),
139
- class: normalizeClass(_ctx.buttonGroupItemStyles),
140
- variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
141
- color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
142
- disabled: _ctx.filter && !_ctx.filter(value),
143
- onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
144
- }, {
145
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatDay(value)), 1 /* TEXT */)]),
146
-
147
- _: 2 /* DYNAMIC */
148
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "disabled", "onClick"]);
149
- }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 2 /* CLASS */);
150
- }
151
-
152
- script$6.render = render$6;
153
- script$6.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue";
154
-
155
- const DateTimePickerMobileControl = [
156
- // Layout
157
- 'layout-column',
158
- // Spacing
159
- 'gap-xs'];
160
- const DateTimePickerMobileControlContent = [
161
- // Typography
162
- 'typography-headline-1',
163
- // Theme
164
- 'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
165
-
166
- var script$5 = defineComponent({
167
- name: 'OrDateTimePickerMobileControl',
168
- components: {
169
- OrLabel: script$8
170
- },
171
- props: {
172
- label: {
173
- type: String,
174
- required: true
175
- }
176
- },
177
- expose: ['root'],
178
- setup() {
179
- // Refs
180
- const root = ref();
181
- // Styles
182
- const rootStyles = computed(() => ['or-date-time-picker-mobile-control', ...DateTimePickerMobileControl]);
183
- const contentStyles = computed(() => [...DateTimePickerMobileControlContent]);
184
- return {
185
- root,
186
- rootStyles,
187
- contentStyles
188
- };
189
- }
190
- });
191
-
192
- function render$5(_ctx, _cache, $props, $setup, $data, $options) {
193
- const _component_OrLabel = resolveComponent("OrLabel");
194
- return openBlock(), createElementBlock("div", {
195
- ref: "root",
196
- class: normalizeClass(_ctx.rootStyles)
197
- }, [createVNode(_component_OrLabel, null, {
198
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.label), 1 /* TEXT */)]),
199
-
200
- _: 1 /* STABLE */
201
- }), createElementVNode("div", {
202
- class: normalizeClass(_ctx.contentStyles)
203
- }, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)], 2 /* CLASS */);
204
- }
205
-
206
- script$5.render = render$5;
207
- script$5.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue";
208
-
209
- const DateTimePickerMonthSelect = [
210
- // Layout
211
- 'layout-row justify-between',
212
- // Spacing
213
- 'px-md', 'py-md', 'gap-md'];
214
-
215
- var script$4 = defineComponent({
216
- name: 'OrDateTimePickerMonthSelect',
217
- components: {
218
- OrButton: script$7,
219
- OrIcon: script$9,
220
- OrIconButton: script$a,
221
- OrMenu: script$b,
222
- OrMenuItem: script$c
223
- },
224
- model: {
225
- prop: 'modelValue',
226
- event: 'update:modelValue'
227
- },
228
- props: {
229
- modelValue: {
230
- type: Date,
231
- default: undefined
232
- },
233
- filter: {
234
- type: Function,
235
- default: undefined
236
- }
237
- },
238
- emits: ['update:modelValue'],
239
- expose: ['root'],
240
- setup(props, context) {
241
- // Refs
242
- const root = ref();
243
- const yearButton = ref();
244
- const monthButton = ref();
245
- const yearButtonRoot = computed(() => {
246
- var _a;
247
- return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
248
- });
249
- const monthButtonRoot = computed(() => {
250
- var _a;
251
- return (_a = monthButton.value) === null || _a === void 0 ? void 0 : _a.root;
252
- });
253
- const yearMenu = ref();
254
- const monthMenu = ref();
255
- const yearMenuState = computed(() => {
256
- var _a;
257
- return (_a = yearMenu.value) === null || _a === void 0 ? void 0 : _a.state;
258
- });
259
- const monthMenuState = computed(() => {
260
- var _a;
261
- return (_a = monthMenu.value) === null || _a === void 0 ? void 0 : _a.state;
262
- });
263
- // Styles
264
- const rootStyles = computed(() => ['or-date-time-picker-month-select', ...DateTimePickerMonthSelect]);
265
- // State
266
- const proxyModelValue = computed({
267
- get: () => {
268
- var _a;
269
- return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
270
- },
271
- set: value => {
272
- context.emit('update:modelValue', value);
273
- }
274
- });
275
- const yearOptions = computed(() => {
276
- return Array.from({
277
- length: 11
278
- }).map((_value, index, {
279
- length
280
- }) => {
281
- const value = proxyModelValue.value.getUTCFullYear() - Math.floor(length / 2) + index;
282
- return new Date(Date.UTC(value, proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
283
- });
284
- });
285
- const monthOptions = computed(() => {
286
- return Array.from({
287
- length: 12
288
- }, (_value, index) => {
289
- const value = index;
290
- return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), value, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
291
- });
292
- });
293
- // Methods
294
- function goToNextMonth() {
295
- proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
296
- }
297
- function goToPreviousMonth() {
298
- proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() - 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
299
- }
300
- function formatYear(value) {
301
- return value.toLocaleString('default', {
302
- year: 'numeric',
303
- timeZone: 'UTC'
304
- });
305
- }
306
- function formatMonth(value) {
307
- return value.toLocaleString('default', {
308
- month: 'long',
309
- timeZone: 'UTC'
310
- });
311
- }
312
- return {
313
- root,
314
- yearButton,
315
- monthButton,
316
- yearButtonRoot,
317
- monthButtonRoot,
318
- yearMenu,
319
- monthMenu,
320
- yearMenuState,
321
- monthMenuState,
322
- rootStyles,
323
- proxyModelValue,
324
- yearOptions,
325
- monthOptions,
326
- goToNextMonth,
327
- goToPreviousMonth,
328
- formatYear,
329
- formatMonth
330
- };
331
- }
332
- });
333
-
334
- const _hoisted_1$1 = {
335
- class: /*#__PURE__*/normalizeClass(['layout-row-reverse', 'gap-md'])
336
- };
337
- function render$4(_ctx, _cache, $props, $setup, $data, $options) {
338
- const _component_OrIconButton = resolveComponent("OrIconButton");
339
- const _component_OrIcon = resolveComponent("OrIcon");
340
- const _component_OrButton = resolveComponent("OrButton");
341
- const _component_OrMenuItem = resolveComponent("OrMenuItem");
342
- const _component_OrMenu = resolveComponent("OrMenu");
343
- return openBlock(), createElementBlock("div", {
344
- ref: "root",
345
- class: normalizeClass(_ctx.rootStyles)
346
- }, [createVNode(_component_OrIconButton, {
347
- icon: 'chevron_left',
348
- onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.goToPreviousMonth(), ["stop"]))
349
- }), createElementVNode("div", _hoisted_1$1, [createVNode(_component_OrButton, {
350
- ref: "yearButton",
351
- variant: 'link',
352
- color: 'inherit',
353
- onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.yearMenu.open(), ["stop"]))
354
- }, {
355
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(_ctx.proxyModelValue)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
356
- icon: _ctx.yearMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
357
- }, null, 8 /* PROPS */, ["icon"])]),
358
- _: 1 /* STABLE */
359
- }, 512 /* NEED_PATCH */), createVNode(_component_OrButton, {
360
- ref: "monthButton",
361
- variant: 'link',
362
- color: 'inherit',
363
- onClick: _cache[2] || (_cache[2] = withModifiers($event => _ctx.monthMenu.open(), ["stop"]))
364
- }, {
365
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(_ctx.proxyModelValue)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
366
- icon: _ctx.monthMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
367
- }, null, 8 /* PROPS */, ["icon"])]),
368
- _: 1 /* STABLE */
369
- }, 512 /* NEED_PATCH */), createVNode(_component_OrMenu, {
370
- ref: "yearMenu",
371
- trigger: _ctx.yearButtonRoot
372
- }, {
373
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.yearOptions, value => {
374
- return openBlock(), createBlock(_component_OrMenuItem, {
375
- key: Number(value),
376
- selected: Number(value) === Number(_ctx.proxyModelValue),
377
- disabled: _ctx.filter && !_ctx.filter(value),
378
- onClick: withModifiers($event => {
379
- _ctx.proxyModelValue = value;
380
- _ctx.yearMenu.close();
381
- }, ["stop"])
382
- }, {
383
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(value)), 1 /* TEXT */)]),
384
-
385
- _: 2 /* DYNAMIC */
386
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "disabled", "onClick"]);
387
- }), 128 /* KEYED_FRAGMENT */))]),
388
-
389
- _: 1 /* STABLE */
390
- }, 8 /* PROPS */, ["trigger"]), createVNode(_component_OrMenu, {
391
- ref: "monthMenu",
392
- trigger: _ctx.monthButtonRoot
393
- }, {
394
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.monthOptions, value => {
395
- return openBlock(), createBlock(_component_OrMenuItem, {
396
- key: Number(value),
397
- selected: Number(value) === Number(_ctx.proxyModelValue),
398
- disabled: _ctx.filter && !_ctx.filter(value),
399
- onClick: withModifiers($event => {
400
- _ctx.proxyModelValue = value;
401
- _ctx.monthMenu.close();
402
- }, ["stop"])
403
- }, {
404
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(value)), 1 /* TEXT */)]),
405
-
406
- _: 2 /* DYNAMIC */
407
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "disabled", "onClick"]);
408
- }), 128 /* KEYED_FRAGMENT */))]),
409
-
410
- _: 1 /* STABLE */
411
- }, 8 /* PROPS */, ["trigger"])]), createVNode(_component_OrIconButton, {
412
- icon: 'chevron_right',
413
- onClick: _cache[3] || (_cache[3] = withModifiers($event => _ctx.goToNextMonth(), ["stop"]))
414
- })], 2 /* CLASS */);
415
- }
416
-
417
- script$4.render = render$4;
418
- script$4.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue";
419
-
420
- const DateTimePickerPopoverFooter = [
421
- // Layout
422
- 'layout-row-reverse',
423
- // Layout (children)
424
- 'children:grow',
425
- // Spacing
426
- 'px-md md:px-sm', 'py-md md:py-sm', 'gap-md md:gap-sm'];
427
-
428
- var script$3 = defineComponent({
429
- name: 'OrDateTimePickerPopoverFooter',
430
- components: {
431
- OrButton: script$7
432
- },
433
- emits: ['resolve', 'reject'],
434
- expose: ['root'],
435
- setup() {
436
- // Refs
437
- const root = ref();
438
- // Styles
439
- const rootStyles = computed(() => ['or-date-time-picker-popover-footer', ...DateTimePickerPopoverFooter]);
440
- return {
441
- root,
442
- rootStyles
443
- };
444
- }
445
- });
446
-
447
- function render$3(_ctx, _cache, $props, $setup, $data, $options) {
448
- const _component_OrButton = resolveComponent("OrButton");
449
- return openBlock(), createElementBlock("footer", {
450
- ref: "root",
451
- class: normalizeClass(_ctx.rootStyles)
452
- }, [createVNode(_component_OrButton, {
453
- variant: 'outlined',
454
- onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.$emit('resolve'), ["stop"]))
455
- }, {
456
- default: withCtx(() => [createTextVNode(" Done ")]),
457
- _: 1 /* STABLE */
458
- }), createVNode(_component_OrButton, {
459
- variant: 'text',
460
- onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.$emit('reject'), ["stop"]))
461
- }, {
462
- default: withCtx(() => [createTextVNode(" Cancel ")]),
463
- _: 1 /* STABLE */
464
- })], 2 /* CLASS */);
465
- }
466
-
467
- script$3.render = render$3;
468
- script$3.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue";
469
-
470
- const DateTimePickerPopoverHeader = [
471
- // Layout
472
- 'layout-row md:hidden',
473
- // Spacing
474
- 'px-md', 'py-md', 'gap-xl'];
475
-
476
- var script$2 = defineComponent({
477
- name: 'OrDateTimePickerPopoverHeader',
478
- expose: ['root'],
479
- setup() {
480
- // Refs
481
- const root = ref();
482
- // Styles
483
- const rootStyles = computed(() => ['or-date-time-picker-popover-header', ...DateTimePickerPopoverHeader]);
484
- return {
485
- root,
486
- rootStyles
487
- };
488
- }
489
- });
490
-
491
- function render$2(_ctx, _cache, $props, $setup, $data, $options) {
492
- return openBlock(), createElementBlock("header", {
493
- ref: "root",
494
- class: normalizeClass(_ctx.rootStyles)
495
- }, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */);
496
- }
497
-
498
- script$2.render = render$2;
499
- script$2.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue";
500
-
501
- const DateTimePickerTimeSelect = [
502
- // Layout
503
- 'layout-row justify-center',
504
- // Spacing
505
- 'px-md', 'py-md', 'gap-sm',
506
- // Typography
507
- 'typography-body-2-regular',
508
- // Theme
509
- 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
510
- const DateTimePickerTimeSelectButtonGroup = [
511
- // Layout
512
- 'layout-column',
513
- // Box
514
- 'max-h-[224px]',
515
- // Overflow
516
- 'overflow-x-hidden', 'overflow-y-auto'];
517
- const DateTimePickerTimeSelectButtonGroupItem = [
518
- // Typography
519
- 'typography-caption-regular'];
520
-
521
- var script$1 = defineComponent({
522
- name: 'OrDateTimePickerTimeSelect',
523
- components: {
524
- OrButton: script$7
525
- },
526
- model: {
527
- prop: 'modelValue',
528
- event: 'update:modelValue'
529
- },
530
- props: {
531
- modelValue: {
532
- type: Date,
533
- default: undefined
534
- },
535
- filter: {
536
- type: Function,
537
- default: undefined
538
- }
539
- },
540
- emits: ['update:modelValue'],
541
- expose: ['root'],
542
- setup(props, context) {
543
- // Refs
544
- const root = ref();
545
- // Styles
546
- const rootStyles = computed(() => ['or-date-time-picker-time-select', ...DateTimePickerTimeSelect]);
547
- const buttonGroupStyles = computed(() => [...DateTimePickerTimeSelectButtonGroup]);
548
- const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
549
- // State
550
- const proxyModelValue = computed({
551
- get: () => {
552
- var _a;
553
- return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
554
- },
555
- set: value => {
556
- context.emit('update:modelValue', value);
557
- }
558
- });
559
- const hoursOptions = computed(() => {
560
- return Array.from({
561
- length: 24
562
- }, (_value, index) => {
563
- const value = index;
564
- return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), value, proxyModelValue.value.getUTCMinutes()));
565
- });
566
- });
567
- const minutesOptions = computed(() => {
568
- return Array.from({
569
- length: 60
570
- }, (_value, index) => {
571
- const value = index;
572
- return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), value));
573
- });
574
- });
575
- // Methods
576
- function formatHours(value) {
577
- return value.toLocaleString('default', {
578
- hour: '2-digit',
579
- timeZone: 'UTC'
580
- });
581
- }
582
- function formatMinutes(value) {
583
- return value.toLocaleString('default', {
584
- minute: '2-digit',
585
- timeZone: 'UTC'
586
- });
587
- }
588
- return {
589
- root,
590
- rootStyles,
591
- buttonGroupStyles,
592
- buttonGroupItemStyles,
593
- proxyModelValue,
594
- hoursOptions,
595
- minutesOptions,
596
- formatHours,
597
- formatMinutes
598
- };
599
- }
600
- });
601
-
602
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
603
- const _component_OrButton = resolveComponent("OrButton");
604
- return openBlock(), createElementBlock("div", {
605
- ref: "root",
606
- class: normalizeClass(_ctx.rootStyles)
607
- }, [createElementVNode("div", {
608
- class: normalizeClass(_ctx.buttonGroupStyles)
609
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.hoursOptions, value => {
610
- return openBlock(), createBlock(_component_OrButton, {
611
- key: Number(value),
612
- class: normalizeClass(_ctx.buttonGroupItemStyles),
613
- variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
614
- color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
615
- disabled: _ctx.filter && !_ctx.filter(value),
616
- onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
617
- }, {
618
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatHours(value)), 1 /* TEXT */)]),
619
-
620
- _: 2 /* DYNAMIC */
621
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "disabled", "onClick"]);
622
- }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), createTextVNode(" : "), createElementVNode("div", {
623
- class: normalizeClass(_ctx.buttonGroupStyles)
624
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.minutesOptions, value => {
625
- return openBlock(), createBlock(_component_OrButton, {
626
- key: Number(value),
627
- class: normalizeClass(_ctx.buttonGroupItemStyles),
628
- variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
629
- color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
630
- disabled: _ctx.filter && !_ctx.filter(value),
631
- onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
632
- }, {
633
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMinutes(value)), 1 /* TEXT */)]),
634
-
635
- _: 2 /* DYNAMIC */
636
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "disabled", "onClick"]);
637
- }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 2 /* CLASS */);
638
- }
639
-
640
- script$1.render = render$1;
641
- script$1.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue";
642
-
643
- const DateTimePicker = [
644
- // Layout
645
- 'layout-column',
646
- // Spacing
647
- 'gap-xs'];
648
- const DateTimePickerControl = [
649
- // Layout
650
- 'layout-inline-row justify-center',
651
- // Theme (focus)
652
- 'focus:theme-border-2-current', 'dark:focus:theme-border-2-current-dark', 'focus:theme-border-underline', 'dark:focus:theme-border-underline'];
653
-
654
- var script = defineComponent({
655
- name: 'OrDateTimePicker',
656
- components: {
657
- OrDateTimePickerDaySelect: script$6,
658
- OrDateTimePickerMobileControl: script$5,
659
- OrDateTimePickerMonthSelect: script$4,
660
- OrDateTimePickerPopoverFooter: script$3,
661
- OrDateTimePickerPopoverHeader: script$2,
662
- OrDateTimePickerTimeSelect: script$1,
663
- OrError: script$d,
664
- OrHint: script$e,
665
- OrIconButton: script$a,
666
- OrInputBox: script$f,
667
- OrLabel: script$8,
668
- OrPopover: script$g
669
- },
670
- directives: {
671
- DropdownClose,
672
- DropdownOpen
673
- },
674
- model: {
675
- prop: 'modelValue',
676
- event: 'update:modelValue'
677
- },
678
- props: {
679
- modelValue: {
680
- type: Date,
681
- default: undefined
682
- },
683
- filter: {
684
- type: Function,
685
- default: undefined
686
- },
687
- size: {
688
- type: String,
689
- default: InputBoxSize.M
690
- },
691
- label: {
692
- type: String,
693
- default: undefined
694
- },
695
- hint: {
696
- type: String,
697
- default: undefined
698
- },
699
- error: {
700
- type: [String, Boolean],
701
- default: undefined
702
- },
703
- required: {
704
- type: Boolean,
705
- default: false
706
- },
707
- readonly: {
708
- type: Boolean,
709
- default: false
710
- },
711
- disabled: {
712
- type: Boolean,
713
- default: false
714
- },
715
- disableDefaultStyles: {
716
- type: Boolean,
717
- default: false
718
- }
719
- },
720
- emits: ['update:modelValue', 'keydown', 'keyup', 'focus', 'blur'],
721
- expose: ['root', 'focus', 'blur'],
722
- setup(props, context) {
723
- // Refs
724
- const root = ref();
725
- const dateControl = ref();
726
- const timeControl = ref();
727
- const datePopover = ref();
728
- const timePopover = ref();
729
- const datePopoverState = computed(() => {
730
- var _a;
731
- return (_a = datePopover.value) === null || _a === void 0 ? void 0 : _a.state;
732
- });
733
- const timePopoverState = computed(() => {
734
- var _a;
735
- return (_a = timePopover.value) === null || _a === void 0 ? void 0 : _a.state;
736
- });
737
- // Styles
738
- const rootStyles = computed(() => ['or-date-time-picker', ...DateTimePicker]);
739
- const controlStyles = computed(() => [...DateTimePickerControl]);
740
- // State
741
- const controlAttributes = reactive({
742
- id: useIdAttribute(),
743
- ...useControlAttributes(),
744
- ...useValidationAttributes()
745
- });
746
- const proxyModelValue = computed({
747
- get: () => props.modelValue,
748
- set: value => {
749
- context.emit('update:modelValue', value);
750
- }
751
- });
752
- const draftModelValue = ref();
753
- watch(proxyModelValue, value => {
754
- draftModelValue.value = value;
755
- }, {
756
- immediate: true
757
- });
758
- // Methods
759
- function toggleDatePopover() {
760
- if (!props.readonly && !props.disabled) {
761
- const popoverInstance = datePopover.value;
762
- if (popoverInstance) {
763
- if (datePopoverState.value === 'open') {
764
- popoverInstance.close();
765
- } else {
766
- popoverInstance.open();
767
- }
768
- }
769
- }
770
- }
771
- function toggleTimePopover() {
772
- if (!props.readonly && !props.disabled) {
773
- const popoverInstance = timePopover.value;
774
- if (popoverInstance) {
775
- if (timePopoverState.value === 'open') {
776
- popoverInstance.close();
777
- } else {
778
- popoverInstance.open();
779
- }
780
- }
781
- }
782
- }
783
- function closeDatePopover() {
784
- const popoverInstance = datePopover.value;
785
- if (popoverInstance) {
786
- popoverInstance.close();
787
- }
788
- }
789
- function closeTimePopover() {
790
- const popoverInstance = timePopover.value;
791
- if (popoverInstance) {
792
- popoverInstance.close();
793
- }
794
- }
795
- function formatDate(value) {
796
- var _a;
797
- return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
798
- dateStyle: 'short',
799
- timeZone: 'UTC'
800
- })) !== null && _a !== void 0 ? _a : '--';
801
- }
802
- function formatTime(value) {
803
- var _a;
804
- return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
805
- timeStyle: 'short',
806
- timeZone: 'UTC'
807
- })) !== null && _a !== void 0 ? _a : '--';
808
- }
809
- function formatDateAlt(value) {
810
- var _a;
811
- return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
812
- dateStyle: 'medium',
813
- timeZone: 'UTC'
814
- })) !== null && _a !== void 0 ? _a : '--';
815
- }
816
- function formatTimeAlt(value) {
817
- var _a;
818
- return (_a = value === null || value === void 0 ? void 0 : value.toLocaleString('default', {
819
- timeStyle: 'short',
820
- timeZone: 'UTC'
821
- })) !== null && _a !== void 0 ? _a : '--';
822
- }
823
- return {
824
- root,
825
- dateControl,
826
- timeControl,
827
- datePopover,
828
- timePopover,
829
- datePopoverState,
830
- timePopoverState,
831
- rootStyles,
832
- controlStyles,
833
- controlAttributes,
834
- proxyModelValue,
835
- draftModelValue,
836
- toggleDatePopover,
837
- toggleTimePopover,
838
- closeDatePopover,
839
- closeTimePopover,
840
- formatDate,
841
- formatTime,
842
- formatDateAlt,
843
- formatTimeAlt
844
- };
845
- }
846
- });
847
-
848
- const _withScopeId = n => (pushScopeId("data-v-4ab76bac"), n = n(), popScopeId(), n);
849
- const _hoisted_1 = ["required", "readonly", "disabled"];
850
- const _hoisted_2 = ["required", "readonly", "disabled"];
851
- const _hoisted_3 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/createElementVNode("div", {
852
- class: /*#__PURE__*/normalizeClass(['grow'])
853
- }, null, -1 /* HOISTED */));
854
- const _hoisted_4 = {
855
- class: /*#__PURE__*/normalizeClass(['layout-inline-row'])
856
- };
857
- function render(_ctx, _cache, $props, $setup, $data, $options) {
858
- const _component_OrLabel = resolveComponent("OrLabel");
859
- const _component_OrDateTimePickerMobileControl = resolveComponent("OrDateTimePickerMobileControl");
860
- const _component_OrDateTimePickerPopoverHeader = resolveComponent("OrDateTimePickerPopoverHeader");
861
- const _component_OrDateTimePickerMonthSelect = resolveComponent("OrDateTimePickerMonthSelect");
862
- const _component_OrDateTimePickerDaySelect = resolveComponent("OrDateTimePickerDaySelect");
863
- const _component_OrDateTimePickerPopoverFooter = resolveComponent("OrDateTimePickerPopoverFooter");
864
- const _component_OrPopover = resolveComponent("OrPopover");
865
- const _component_OrDateTimePickerTimeSelect = resolveComponent("OrDateTimePickerTimeSelect");
866
- const _component_OrIconButton = resolveComponent("OrIconButton");
867
- const _component_OrInputBox = resolveComponent("OrInputBox");
868
- const _component_OrHint = resolveComponent("OrHint");
869
- const _component_OrError = resolveComponent("OrError");
870
- const _directive_dropdown_open = resolveDirective("dropdown-open");
871
- const _directive_dropdown_close = resolveDirective("dropdown-close");
872
- return openBlock(), createElementBlock("div", {
873
- ref: "root",
874
- class: normalizeClass(_ctx.rootStyles)
875
- }, [_ctx.label ? (openBlock(), createBlock(_component_OrLabel, {
876
- key: 0,
877
- "control-id": _ctx.controlAttributes.id,
878
- variant: 'input',
879
- required: _ctx.required,
880
- disabled: _ctx.disabled
881
- }, {
882
- addon: withCtx(() => [renderSlot(_ctx.$slots, "addon")]),
883
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.label) + " ", 1 /* TEXT */)]),
884
-
885
- _: 3 /* FORWARDED */
886
- }, 8 /* PROPS */, ["control-id", "required", "disabled"])) : createCommentVNode("v-if", true), withDirectives((openBlock(), createBlock(_component_OrInputBox, {
887
- variant: _ctx.disableDefaultStyles ? 'unstyled' : 'styled',
888
- size: _ctx.size,
889
- invalid: !!_ctx.error,
890
- readonly: _ctx.readonly,
891
- disabled: _ctx.disabled
892
- }, {
893
- default: withCtx(() => [createCommentVNode(" <input\n ref=\"dateControl\"\n v-dropdown-open=\"toggleDatePopover\"\n v-dropdown-close=\"closeDatePopover\"\n v-bind=\"controlAttributes\"\n :class=\"controlStyles\"\n :type=\"'text'\"\n :value=\"formatDate(proxyModelValue)\"\n :required=\"required\"\n :readonly=\"readonly\"\n :disabled=\"disabled\"\n > "), createCommentVNode(" <input\n ref=\"timeControl\"\n v-dropdown-open=\"toggleTimePopover\"\n v-dropdown-close=\"closeTimePopover\"\n v-bind=\"controlAttributes\"\n :class=\"controlStyles\"\n :type=\"'text'\"\n :value=\"formatTime(proxyModelValue)\"\n :required=\"required\"\n :readonly=\"readonly\"\n :disabled=\"disabled\"\n > "), withDirectives((openBlock(), createElementBlock("div", mergeProps({
894
- ref: "dateControl"
895
- }, _ctx.controlAttributes, {
896
- class: _ctx.controlStyles,
897
- contenteditable: true,
898
- required: _ctx.required,
899
- readonly: _ctx.readonly,
900
- disabled: _ctx.disabled
901
- }), [createTextVNode(toDisplayString(_ctx.formatDate(_ctx.proxyModelValue)), 1 /* TEXT */)], 16 /* FULL_PROPS */, _hoisted_1)), [[_directive_dropdown_open, _ctx.toggleDatePopover], [_directive_dropdown_close, _ctx.closeDatePopover]]), withDirectives((openBlock(), createElementBlock("div", mergeProps({
902
- ref: "timeControl"
903
- }, _ctx.controlAttributes, {
904
- class: _ctx.controlStyles,
905
- contenteditable: true,
906
- required: _ctx.required,
907
- readonly: _ctx.readonly,
908
- disabled: _ctx.disabled
909
- }), [createTextVNode(toDisplayString(_ctx.formatTime(_ctx.proxyModelValue)), 1 /* TEXT */)], 16 /* FULL_PROPS */, _hoisted_2)), [[_directive_dropdown_open, _ctx.toggleTimePopover], [_directive_dropdown_close, _ctx.closeTimePopover]]), createVNode(_component_OrPopover, {
910
- ref: "datePopover",
911
- variant: 'auto',
912
- trigger: _ctx.dateControl,
913
- placement: 'bottom'
914
- }, {
915
- default: withCtx(() => [createVNode(_component_OrDateTimePickerPopoverHeader, null, {
916
- default: withCtx(() => [createVNode(_component_OrDateTimePickerMobileControl, {
917
- label: "Date"
918
- }, {
919
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatDateAlt(_ctx.draftModelValue)), 1 /* TEXT */)]),
920
-
921
- _: 1 /* STABLE */
922
- }), createVNode(_component_OrDateTimePickerMobileControl, {
923
- label: "Time"
924
- }, {
925
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatTimeAlt(_ctx.draftModelValue)), 1 /* TEXT */)]),
926
-
927
- _: 1 /* STABLE */
928
- })]),
929
-
930
- _: 1 /* STABLE */
931
- }), createVNode(_component_OrDateTimePickerMonthSelect, {
932
- modelValue: _ctx.draftModelValue,
933
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.draftModelValue = $event),
934
- filter: _ctx.filter
935
- }, null, 8 /* PROPS */, ["modelValue", "filter"]), createVNode(_component_OrDateTimePickerDaySelect, {
936
- modelValue: _ctx.draftModelValue,
937
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.draftModelValue = $event),
938
- filter: _ctx.filter
939
- }, null, 8 /* PROPS */, ["modelValue", "filter"]), createVNode(_component_OrDateTimePickerPopoverFooter, {
940
- onResolve: _cache[2] || (_cache[2] = $event => {
941
- _ctx.proxyModelValue = _ctx.draftModelValue;
942
- _ctx.datePopover.close();
943
- }),
944
- onReject: _cache[3] || (_cache[3] = $event => {
945
- _ctx.draftModelValue = _ctx.proxyModelValue;
946
- _ctx.datePopover.close();
947
- })
948
- })]),
949
- _: 1 /* STABLE */
950
- }, 8 /* PROPS */, ["trigger"]), createVNode(_component_OrPopover, {
951
- ref: "timePopover",
952
- variant: 'auto',
953
- trigger: _ctx.timeControl,
954
- placement: 'bottom'
955
- }, {
956
- default: withCtx(() => [createVNode(_component_OrDateTimePickerPopoverHeader, null, {
957
- default: withCtx(() => [createVNode(_component_OrDateTimePickerMobileControl, {
958
- label: "Date"
959
- }, {
960
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatDateAlt(_ctx.draftModelValue)), 1 /* TEXT */)]),
961
-
962
- _: 1 /* STABLE */
963
- }), createVNode(_component_OrDateTimePickerMobileControl, {
964
- label: "Time"
965
- }, {
966
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatTimeAlt(_ctx.draftModelValue)), 1 /* TEXT */)]),
967
-
968
- _: 1 /* STABLE */
969
- })]),
970
-
971
- _: 1 /* STABLE */
972
- }), createVNode(_component_OrDateTimePickerTimeSelect, {
973
- modelValue: _ctx.draftModelValue,
974
- "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => _ctx.draftModelValue = $event),
975
- filter: _ctx.filter
976
- }, null, 8 /* PROPS */, ["modelValue", "filter"]), createVNode(_component_OrDateTimePickerPopoverFooter, {
977
- onResolve: _cache[5] || (_cache[5] = $event => {
978
- _ctx.proxyModelValue = _ctx.draftModelValue;
979
- _ctx.timePopover.close();
980
- }),
981
- onReject: _cache[6] || (_cache[6] = $event => {
982
- _ctx.draftModelValue = _ctx.proxyModelValue;
983
- _ctx.timePopover.close();
984
- })
985
- })]),
986
- _: 1 /* STABLE */
987
- }, 8 /* PROPS */, ["trigger"]), _hoisted_3, createElementVNode("div", _hoisted_4, [_ctx.modelValue ? (openBlock(), createBlock(_component_OrIconButton, {
988
- key: 0,
989
- icon: 'close',
990
- color: 'inherit',
991
- disabled: _ctx.readonly || _ctx.disabled,
992
- onClick: _cache[7] || (_cache[7] = withModifiers($event => _ctx.$emit('update:modelValue', undefined), ["stop"]))
993
- }, null, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)])]),
994
- _: 1 /* STABLE */
995
- }, 8 /* PROPS */, ["variant", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.toggleDatePopover], [_directive_dropdown_close, _ctx.closeDatePopover]]), !_ctx.error ? (openBlock(), createElementBlock(Fragment, {
996
- key: 1
997
- }, [_ctx.hint ? (openBlock(), createBlock(_component_OrHint, {
998
- key: 0,
999
- disabled: _ctx.disabled
1000
- }, {
1001
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.hint), 1 /* TEXT */)]),
1002
-
1003
- _: 1 /* STABLE */
1004
- }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true), typeof _ctx.error === 'string' ? (openBlock(), createBlock(_component_OrError, {
1005
- key: 2,
1006
- disabled: _ctx.disabled
1007
- }, {
1008
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)]),
1009
-
1010
- _: 1 /* STABLE */
1011
- }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 2 /* CLASS */);
1012
- }
1013
-
1014
- var css_248z = "\ninput[data-v-4ab76bac] {\n min-width: 0;\n background: none;\n outline: none;\n}\n";
1015
- styleInject(css_248z);
1016
-
1017
- script.render = render;
1018
- script.__scopeId = "data-v-4ab76bac";
1019
- script.__file = "src/components/or-date-time-picker-v3/OrDateTimePicker.vue";
1020
-
1021
- export { script as s };