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