@onereach/ui-components 3.0.4-beta.2486.0 → 3.0.4-beta.2487.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 (111) hide show
  1. package/dist/bundled/v2/{OrCardCollection-ad2240ac.js → OrCardCollection-a10920a3.js} +1 -1
  2. package/dist/bundled/v2/{OrDateTimePicker-60e1a7ee.js → OrDateTimePicker-11b6d4dd.js} +261 -165
  3. package/dist/bundled/v2/{OrMenu-cbb0c2c8.js → OrMenu-0c2c348c.js} +6 -1
  4. package/dist/bundled/v2/{OrPagination-cf47d71c.js → OrPagination-00ab6954.js} +1 -1
  5. package/dist/bundled/v2/{OrTabs-10f7e668.js → OrTabs-f7c9f754.js} +1 -1
  6. package/dist/bundled/v2/components/index.js +5 -5
  7. package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -2
  8. package/dist/bundled/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
  9. package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
  10. package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
  11. package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
  12. package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
  13. package/dist/bundled/v2/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
  14. package/dist/bundled/v2/components/or-date-time-picker-v3/index.js +4 -4
  15. package/dist/bundled/v2/components/or-date-time-picker-v3/partials/{or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
  16. package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
  17. package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
  18. package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
  19. package/dist/bundled/v2/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
  20. package/dist/bundled/v2/components/or-menu-v3/index.js +1 -1
  21. package/dist/bundled/v2/components/or-pagination-v3/index.js +2 -2
  22. package/dist/bundled/v2/components/or-tabs-v3/index.js +2 -2
  23. package/dist/bundled/v2/index.js +6 -6
  24. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-61f92c57.js → OrCardCollection.vue_vue_type_script_lang-93c84377.js} +2 -2
  25. package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-fb197c2f.js → OrDateTimePicker.vue_vue_type_script_lang-b9bc77aa.js} +243 -163
  26. package/dist/bundled/v3/{OrMenu-89afef68.js → OrMenu-101f1c62.js} +1 -1
  27. package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-f6748a99.js → OrMenu.vue_vue_type_script_lang-7ba15d1d.js} +6 -1
  28. package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-7673a00e.js → OrPagination.vue_vue_type_script_lang-d3e6732f.js} +2 -2
  29. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-ebd2a59d.js → OrTabs.vue_vue_type_script_lang-513b1e98.js} +2 -2
  30. package/dist/bundled/v3/components/index.js +6 -6
  31. package/dist/bundled/v3/components/or-card-collection-v3/index.js +3 -3
  32. package/dist/bundled/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
  33. package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
  34. package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
  35. package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
  36. package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
  37. package/dist/bundled/v3/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
  38. package/dist/bundled/v3/components/or-date-time-picker-v3/index.js +5 -5
  39. package/dist/{esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
  40. package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
  41. package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
  42. package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
  43. package/dist/bundled/v3/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
  44. package/dist/bundled/v3/components/or-menu-v3/index.js +1 -1
  45. package/dist/bundled/v3/components/or-pagination-v3/index.js +3 -3
  46. package/dist/bundled/v3/components/or-tabs-v3/index.js +3 -3
  47. package/dist/bundled/v3/index.js +36 -22
  48. package/dist/esm/v2/{OrCardCollection-662d5727.js → OrCardCollection-54079e79.js} +1 -1
  49. package/dist/esm/v2/{OrDateTimePicker-4b650aca.js → OrDateTimePicker-7411ea1f.js} +266 -170
  50. package/dist/esm/v2/{OrMenu-47b319a6.js → OrMenu-18a7f179.js} +6 -1
  51. package/dist/esm/v2/{OrPagination-4d330d4f.js → OrPagination-16f6d75b.js} +1 -1
  52. package/dist/esm/v2/{OrTabs-f0e4db08.js → OrTabs-18df1ce9.js} +1 -1
  53. package/dist/esm/v2/components/index.js +5 -5
  54. package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -2
  55. package/dist/esm/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
  56. package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
  57. package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
  58. package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
  59. package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
  60. package/dist/esm/v2/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
  61. package/dist/esm/v2/components/or-date-time-picker-v3/index.js +2 -2
  62. package/dist/esm/v2/components/or-date-time-picker-v3/partials/{or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
  63. package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
  64. package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
  65. package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
  66. package/dist/esm/v2/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
  67. package/dist/esm/v2/components/or-menu-v3/index.js +1 -1
  68. package/dist/esm/v2/components/or-pagination-v3/index.js +2 -2
  69. package/dist/esm/v2/components/or-tabs-v3/index.js +2 -2
  70. package/dist/esm/v2/index.js +5 -5
  71. package/dist/esm/v3/{OrCardCollection-aa7f0c81.js → OrCardCollection-b937aa7a.js} +1 -1
  72. package/dist/esm/v3/{OrDateTimePicker-3e2dc067.js → OrDateTimePicker-966d5b1d.js} +267 -173
  73. package/dist/esm/v3/{OrMenu-053a9ab7.js → OrMenu-70cee836.js} +6 -1
  74. package/dist/esm/v3/{OrPagination-f2d104d9.js → OrPagination-7f4ed166.js} +1 -1
  75. package/dist/esm/v3/{OrTabs-d9e2a07e.js → OrTabs-0a5c80be.js} +1 -1
  76. package/dist/esm/v3/components/index.js +5 -5
  77. package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -2
  78. package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +2 -0
  79. package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultDate.d.ts +1 -0
  80. package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultHours.d.ts +1 -0
  81. package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultMinutes.d.ts +1 -0
  82. package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultMonth.d.ts +1 -0
  83. package/dist/esm/v3/components/or-date-time-picker-v3/hooks/useDefaultYear.d.ts +1 -0
  84. package/dist/esm/v3/components/or-date-time-picker-v3/index.js +2 -2
  85. package/dist/{bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts → esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts} +8 -0
  86. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.d.ts +3 -0
  87. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +26 -34
  88. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +8 -20
  89. package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
  90. package/dist/esm/v3/components/or-menu-v3/index.js +1 -1
  91. package/dist/esm/v3/components/or-pagination-v3/index.js +2 -2
  92. package/dist/esm/v3/components/or-tabs-v3/index.js +2 -2
  93. package/dist/esm/v3/index.js +5 -5
  94. package/package.json +2 -2
  95. package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +17 -8
  96. package/src/components/or-date-time-picker-v3/hooks/useDefaultDate.ts +3 -0
  97. package/src/components/or-date-time-picker-v3/hooks/useDefaultHours.ts +3 -0
  98. package/src/components/or-date-time-picker-v3/hooks/useDefaultMinutes.ts +3 -0
  99. package/src/components/or-date-time-picker-v3/hooks/useDefaultMonth.ts +3 -0
  100. package/src/components/or-date-time-picker-v3/hooks/useDefaultYear.ts +3 -0
  101. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue +162 -0
  102. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/styles.ts +28 -0
  103. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue +101 -79
  104. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue +58 -42
  105. package/src/components/or-menu-v3/OrMenu.vue +3 -0
  106. package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
  107. package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
  108. package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
  109. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.d.ts +0 -1
  110. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue +0 -63
  111. package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/styles.ts +0 -10
@@ -2,8 +2,8 @@ import { resolveComponent, openBlock, createBlock, normalizeClass, defineCompone
2
2
  import './OrIconButton-55238a89.js';
3
3
  import { s as script$3 } from './OrIconButton.vue_vue_type_script_lang-3aeb76ac.js';
4
4
  import './OrButton-7b1eac5d.js';
5
- import './OrMenu-89afef68.js';
6
- import { s as script$5 } from './OrMenu.vue_vue_type_script_lang-f6748a99.js';
5
+ import './OrMenu-101f1c62.js';
6
+ import { s as script$5 } from './OrMenu.vue_vue_type_script_lang-7ba15d1d.js';
7
7
  import './OrMenuItem-a90b0369.js';
8
8
  import { s as script$6 } from './OrMenuItem.vue_vue_type_script_lang-d65eec51.js';
9
9
  import './OrIcon-a670d8e9.js';
@@ -1,15 +1,15 @@
1
- import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, resolveComponent, createVNode, withCtx, createTextVNode, toDisplayString, createElementVNode, renderSlot, withModifiers, Fragment, renderList, createBlock, reactive } from 'vue';
2
- import './OrLabel-4da10c50.js';
3
- import { s as script$7 } from './OrLabel.vue_vue_type_script_lang-5ba2b33c.js';
1
+ import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString, createVNode, renderSlot, reactive, watch } from 'vue';
4
2
  import './OrButton-7b1eac5d.js';
3
+ import { s as script$7 } from './OrButton.vue_vue_type_script_lang-ed1524cf.js';
4
+ import './OrLabel-4da10c50.js';
5
+ import { s as script$8 } from './OrLabel.vue_vue_type_script_lang-5ba2b33c.js';
5
6
  import './OrIcon-a670d8e9.js';
6
7
  import './OrIconButton-55238a89.js';
7
- import './OrMenu-89afef68.js';
8
+ import './OrMenu-101f1c62.js';
8
9
  import './OrMenuItem-a90b0369.js';
9
- import { s as script$8 } from './OrButton.vue_vue_type_script_lang-ed1524cf.js';
10
10
  import { s as script$9 } from './OrIcon.vue_vue_type_script_lang-859d76fb.js';
11
11
  import { s as script$a } from './OrIconButton.vue_vue_type_script_lang-3aeb76ac.js';
12
- import { s as script$b } from './OrMenu.vue_vue_type_script_lang-f6748a99.js';
12
+ import { s as script$b } from './OrMenu.vue_vue_type_script_lang-7ba15d1d.js';
13
13
  import { s as script$c } from './OrMenuItem.vue_vue_type_script_lang-d65eec51.js';
14
14
  import './OrHint-fcd2563e.js';
15
15
  import './OrInputBox-688eb48b.js';
@@ -23,14 +23,47 @@ import { s as script$f } from './OrInputBox.vue_vue_type_script_lang-0e3ff329.js
23
23
  import { s as script$g } from './OrPopover.vue_vue_type_script_lang-9bf2361c.js';
24
24
  import { I as InputBoxSize } from './props-c966ae5f.js';
25
25
 
26
- const DateTimePickerDateSelect = [
26
+ function useDefaultDate() {
27
+ return new Date().getUTCDate();
28
+ }
29
+
30
+ function useDefaultHours() {
31
+ return 0;
32
+ }
33
+
34
+ function useDefaultMinutes() {
35
+ return 0;
36
+ }
37
+
38
+ function useDefaultMonth() {
39
+ return new Date().getUTCMonth();
40
+ }
41
+
42
+ function useDefaultYear() {
43
+ return new Date().getUTCFullYear();
44
+ }
45
+
46
+ const DateTimePickerDaySelect = [
27
47
  // Layout
28
48
  'layout-column',
29
49
  // Spacing
30
50
  'px-md', 'py-md', 'gap-sm'];
51
+ const DateTimePickerDaySelectButtonGroup = [
52
+ // Layout
53
+ 'grid', 'grid-cols-7'];
54
+ const DateTimePickerDaySelectButtonGroupItem = [
55
+ // Box
56
+ 'min-w-fit',
57
+ // Spacing
58
+ '!px-sm', '!py-sm',
59
+ // Typography
60
+ 'typography-caption-regular'];
31
61
 
32
62
  var script$6 = defineComponent({
33
- name: 'OrDateTimePickerDateSelect',
63
+ name: 'OrDateTimePickerDaySelect',
64
+ components: {
65
+ OrButton: script$7
66
+ },
34
67
  model: {
35
68
  prop: 'modelValue',
36
69
  event: 'update:modelValue'
@@ -47,31 +80,77 @@ var script$6 = defineComponent({
47
80
  // Refs
48
81
  const root = ref();
49
82
  // Styles
50
- const rootStyles = computed(() => ['or-date-time-picker-date-select', ...DateTimePickerDateSelect]);
83
+ const rootStyles = computed(() => ['or-date-time-picker-day-select', ...DateTimePickerDaySelect]);
84
+ const buttonGroupStyles = computed(() => [...DateTimePickerDaySelectButtonGroup]);
85
+ const buttonGroupItemStyles = computed(() => [...DateTimePickerDaySelectButtonGroupItem]);
51
86
  // State
52
87
  const proxyModelValue = computed({
53
- get: () => props.modelValue,
88
+ get: () => {
89
+ var _a;
90
+ return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
91
+ },
54
92
  set: value => {
55
93
  context.emit('update:modelValue', value);
56
94
  }
57
95
  });
96
+ const dayOptions = computed(() => {
97
+ const monthStartDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), 1, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
98
+ const monthEndDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, 0, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
99
+ const calendarStartDate = new Date(Date.UTC(monthStartDate.getUTCFullYear(), monthStartDate.getUTCMonth(), 1 - (monthStartDate.getUTCDay() + 6) % 7, monthStartDate.getUTCHours(), monthStartDate.getUTCMinutes()));
100
+ const calendarEndDate = new Date(Date.UTC(monthEndDate.getUTCFullYear(), monthEndDate.getUTCMonth() + 1, (7 - monthEndDate.getUTCDay()) % 7, monthEndDate.getUTCHours(), monthEndDate.getUTCMinutes()));
101
+ return (() => {
102
+ let options = [],
103
+ value = calendarStartDate;
104
+ while (Number(value) !== Number(calendarEndDate)) {
105
+ options = [...options, value];
106
+ value = new Date(Date.UTC(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate() + 1, value.getUTCHours(), value.getUTCMinutes()));
107
+ }
108
+ return options;
109
+ })();
110
+ });
111
+ // Methods
112
+ function formatDay(value) {
113
+ return value.toLocaleString('default', {
114
+ day: 'numeric',
115
+ timeZone: 'UTC'
116
+ });
117
+ }
58
118
  return {
59
119
  root,
60
120
  rootStyles,
61
- proxyModelValue
121
+ buttonGroupStyles,
122
+ buttonGroupItemStyles,
123
+ proxyModelValue,
124
+ dayOptions,
125
+ formatDay
62
126
  };
63
127
  }
64
128
  });
65
129
 
66
130
  function render$5(_ctx, _cache, $props, $setup, $data, $options) {
131
+ const _component_OrButton = resolveComponent("OrButton");
67
132
  return openBlock(), createElementBlock("div", {
68
133
  ref: "root",
69
134
  class: normalizeClass(_ctx.rootStyles)
70
- }, " Calendar ", 2 /* CLASS */);
135
+ }, [createElementVNode("div", {
136
+ class: normalizeClass(_ctx.buttonGroupStyles)
137
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dayOptions, value => {
138
+ return openBlock(), createBlock(_component_OrButton, {
139
+ key: Number(value),
140
+ class: normalizeClass(_ctx.buttonGroupItemStyles),
141
+ variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
142
+ color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
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", "onClick"]);
149
+ }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 2 /* CLASS */);
71
150
  }
72
151
 
73
152
  script$6.render = render$5;
74
- script$6.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue";
153
+ script$6.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue";
75
154
 
76
155
  const DateTimePickerMobileControl = [
77
156
  // Layout
@@ -87,7 +166,7 @@ const DateTimePickerMobileControlContent = [
87
166
  var script$5 = defineComponent({
88
167
  name: 'OrDateTimePickerMobileControl',
89
168
  components: {
90
- OrLabel: script$7
169
+ OrLabel: script$8
91
170
  },
92
171
  props: {
93
172
  label: {
@@ -136,7 +215,7 @@ const DateTimePickerMonthSelect = [
136
215
  var script$4 = defineComponent({
137
216
  name: 'OrDateTimePickerMonthSelect',
138
217
  components: {
139
- OrButton: script$8,
218
+ OrButton: script$7,
140
219
  OrIcon: script$9,
141
220
  OrIconButton: script$a,
142
221
  OrMenu: script$b,
@@ -157,107 +236,99 @@ var script$4 = defineComponent({
157
236
  setup(props, context) {
158
237
  // Refs
159
238
  const root = ref();
160
- const monthButton = ref();
161
239
  const yearButton = ref();
240
+ const monthButton = ref();
241
+ const yearButtonRoot = computed(() => {
242
+ var _a;
243
+ return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
244
+ });
162
245
  const monthButtonRoot = computed(() => {
163
246
  var _a;
164
247
  return (_a = monthButton.value) === null || _a === void 0 ? void 0 : _a.root;
165
248
  });
166
- const yearButtonRoot = computed(() => {
249
+ const yearMenu = ref();
250
+ const monthMenu = ref();
251
+ const yearMenuState = computed(() => {
167
252
  var _a;
168
- return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
253
+ return (_a = yearMenu.value) === null || _a === void 0 ? void 0 : _a.state;
254
+ });
255
+ const monthMenuState = computed(() => {
256
+ var _a;
257
+ return (_a = monthMenu.value) === null || _a === void 0 ? void 0 : _a.state;
169
258
  });
170
- const monthMenu = ref();
171
- const yearMenu = ref();
172
- // const monthMenuState = computed(() => monthMenu.value?.state);
173
- // const yearMenuState = computed(() => yearMenu.value?.state);
174
259
  // Styles
175
260
  const rootStyles = computed(() => ['or-date-time-picker-month-select', ...DateTimePickerMonthSelect]);
176
261
  // State
177
262
  const proxyModelValue = computed({
178
- get: () => props.modelValue,
179
- set: value => {
180
- context.emit('update:modelValue', value);
181
- }
182
- });
183
- const yearValue = computed({
184
- get: () => {
185
- var _a, _b;
186
- return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : new Date().getUTCFullYear();
187
- },
188
- set: value => {
189
- var _a, _b, _c, _d, _e, _f, _g, _h;
190
- proxyModelValue.value = new Date(Date.UTC(value, (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCMonth()) !== null && _b !== void 0 ? _b : monthValue.value, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCDate()) !== null && _d !== void 0 ? _d : 1, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCHours()) !== null && _f !== void 0 ? _f : 0, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCMinutes()) !== null && _h !== void 0 ? _h : 0));
191
- }
192
- });
193
- const monthValue = computed({
194
263
  get: () => {
195
- var _a, _b;
196
- return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCMonth()) !== null && _b !== void 0 ? _b : new Date().getUTCMonth();
264
+ var _a;
265
+ return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
197
266
  },
198
267
  set: value => {
199
- var _a, _b, _c, _d, _e, _f, _g, _h;
200
- proxyModelValue.value = new Date(Date.UTC((_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : yearValue.value, value, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCDate()) !== null && _d !== void 0 ? _d : 1, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCHours()) !== null && _f !== void 0 ? _f : 0, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCMinutes()) !== null && _h !== void 0 ? _h : 0));
268
+ context.emit('update:modelValue', value);
201
269
  }
202
270
  });
203
- const yearLabel = computed(() => {
204
- var _a;
205
- return (_a = yearOptions.find(({
206
- value
207
- }) => value === yearValue.value)) === null || _a === void 0 ? void 0 : _a.label;
208
- });
209
- const monthLabel = computed(() => {
210
- var _a;
211
- return (_a = monthOptions.find(({
212
- value
213
- }) => value === monthValue.value)) === null || _a === void 0 ? void 0 : _a.label;
271
+ const yearOptions = computed(() => {
272
+ return Array.from({
273
+ length: 11
274
+ }).map((_value, index, {
275
+ length
276
+ }) => {
277
+ const value = proxyModelValue.value.getUTCFullYear() - Math.floor(length / 2) + index;
278
+ return new Date(Date.UTC(value, proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
279
+ });
214
280
  });
215
- const yearOptions = Array.from({
216
- length: 100
217
- }, (_value, index) => {
218
- const year = new Date().getUTCFullYear() - index;
219
- return {
220
- value: year,
221
- label: new Date(year, monthValue.value).toLocaleString([], {
222
- year: 'numeric'
223
- })
224
- };
225
- });
226
- const monthOptions = Array.from({
227
- length: 12
228
- }, (_value, index) => {
229
- const month = index;
230
- return {
231
- value: month,
232
- label: new Date(yearValue.value, month).toLocaleString([], {
233
- month: 'long'
234
- })
235
- };
281
+ const monthOptions = computed(() => {
282
+ return Array.from({
283
+ length: 12
284
+ }, (_value, index) => {
285
+ const value = index;
286
+ return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), value, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
287
+ });
236
288
  });
289
+ // Methods
290
+ function goToNextMonth() {
291
+ proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
292
+ }
293
+ function goToPreviousMonth() {
294
+ proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() - 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
295
+ }
296
+ function formatYear(value) {
297
+ return value.toLocaleString('default', {
298
+ year: 'numeric',
299
+ timeZone: 'UTC'
300
+ });
301
+ }
302
+ function formatMonth(value) {
303
+ return value.toLocaleString('default', {
304
+ month: 'long',
305
+ timeZone: 'UTC'
306
+ });
307
+ }
237
308
  return {
238
309
  root,
239
- monthButton,
240
310
  yearButton,
241
- monthButtonRoot,
311
+ monthButton,
242
312
  yearButtonRoot,
243
- monthMenu,
313
+ monthButtonRoot,
244
314
  yearMenu,
245
- // monthMenuState,
246
- // yearMenuState,
315
+ monthMenu,
316
+ yearMenuState,
317
+ monthMenuState,
247
318
  rootStyles,
248
319
  proxyModelValue,
249
- yearValue,
250
- monthValue,
251
- yearLabel,
252
- monthLabel,
253
320
  yearOptions,
254
- monthOptions
321
+ monthOptions,
322
+ goToNextMonth,
323
+ goToPreviousMonth,
324
+ formatYear,
325
+ formatMonth
255
326
  };
256
327
  }
257
328
  });
258
329
 
259
330
  const _hoisted_1 = {
260
- class: /*#__PURE__*/normalizeClass(['layout-row', 'gap-md'])
331
+ class: /*#__PURE__*/normalizeClass(['layout-row-reverse', 'gap-md'])
261
332
  };
262
333
  function render$3(_ctx, _cache, $props, $setup, $data, $options) {
263
334
  const _component_OrIconButton = resolveComponent("OrIconButton");
@@ -270,68 +341,70 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
270
341
  class: normalizeClass(_ctx.rootStyles)
271
342
  }, [createVNode(_component_OrIconButton, {
272
343
  icon: 'chevron_left',
273
- onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.monthValue = _ctx.monthValue - 1, ["stop"]))
344
+ onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.goToPreviousMonth(), ["stop"]))
274
345
  }), createElementVNode("div", _hoisted_1, [createVNode(_component_OrButton, {
275
- ref: "monthButton",
346
+ ref: "yearButton",
276
347
  variant: 'link',
277
348
  color: 'inherit',
278
- onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.monthMenu.open(), ["stop"]))
349
+ onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.yearMenu.open(), ["stop"]))
279
350
  }, {
280
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.monthLabel) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
281
- icon: 'arrow_drop_down'
282
- })]),
351
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(_ctx.proxyModelValue)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
352
+ icon: _ctx.yearMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
353
+ }, null, 8 /* PROPS */, ["icon"])]),
283
354
  _: 1 /* STABLE */
284
355
  }, 512 /* NEED_PATCH */), createVNode(_component_OrButton, {
285
- ref: "yearButton",
356
+ ref: "monthButton",
286
357
  variant: 'link',
287
358
  color: 'inherit',
288
- onClick: _cache[2] || (_cache[2] = withModifiers($event => _ctx.yearMenu.open(), ["stop"]))
359
+ onClick: _cache[2] || (_cache[2] = withModifiers($event => _ctx.monthMenu.open(), ["stop"]))
289
360
  }, {
290
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.yearLabel) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
291
- icon: 'arrow_drop_down'
292
- })]),
361
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(_ctx.proxyModelValue)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
362
+ icon: _ctx.monthMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
363
+ }, null, 8 /* PROPS */, ["icon"])]),
293
364
  _: 1 /* STABLE */
294
365
  }, 512 /* NEED_PATCH */), createVNode(_component_OrMenu, {
295
- ref: "monthMenu",
296
- trigger: _ctx.monthButtonRoot
366
+ ref: "yearMenu",
367
+ trigger: _ctx.yearButtonRoot
297
368
  }, {
298
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.monthOptions, option => {
369
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.yearOptions, value => {
299
370
  return openBlock(), createBlock(_component_OrMenuItem, {
300
- key: option.value,
371
+ key: Number(value),
372
+ selected: Number(value) === Number(_ctx.proxyModelValue),
301
373
  onClick: withModifiers($event => {
302
- _ctx.monthValue = option.value;
303
- _ctx.monthMenu.close();
374
+ _ctx.proxyModelValue = value;
375
+ _ctx.yearMenu.close();
304
376
  }, ["stop"])
305
377
  }, {
306
- default: withCtx(() => [createTextVNode(toDisplayString(option.label), 1 /* TEXT */)]),
378
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(value)), 1 /* TEXT */)]),
307
379
 
308
380
  _: 2 /* DYNAMIC */
309
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
381
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "onClick"]);
310
382
  }), 128 /* KEYED_FRAGMENT */))]),
311
383
 
312
384
  _: 1 /* STABLE */
313
385
  }, 8 /* PROPS */, ["trigger"]), createVNode(_component_OrMenu, {
314
- ref: "yearMenu",
315
- trigger: _ctx.yearButtonRoot
386
+ ref: "monthMenu",
387
+ trigger: _ctx.monthButtonRoot
316
388
  }, {
317
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.yearOptions, option => {
389
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.monthOptions, value => {
318
390
  return openBlock(), createBlock(_component_OrMenuItem, {
319
- key: option.value,
391
+ key: Number(value),
392
+ selected: Number(value) === Number(_ctx.proxyModelValue),
320
393
  onClick: withModifiers($event => {
321
- _ctx.yearValue = option.value;
322
- _ctx.yearMenu.close();
394
+ _ctx.proxyModelValue = value;
395
+ _ctx.monthMenu.close();
323
396
  }, ["stop"])
324
397
  }, {
325
- default: withCtx(() => [createTextVNode(toDisplayString(option.label), 1 /* TEXT */)]),
398
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(value)), 1 /* TEXT */)]),
326
399
 
327
400
  _: 2 /* DYNAMIC */
328
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
401
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "onClick"]);
329
402
  }), 128 /* KEYED_FRAGMENT */))]),
330
403
 
331
404
  _: 1 /* STABLE */
332
405
  }, 8 /* PROPS */, ["trigger"])]), createVNode(_component_OrIconButton, {
333
406
  icon: 'chevron_right',
334
- onClick: _cache[3] || (_cache[3] = withModifiers($event => _ctx.monthValue = _ctx.monthValue + 1, ["stop"]))
407
+ onClick: _cache[3] || (_cache[3] = withModifiers($event => _ctx.goToNextMonth(), ["stop"]))
335
408
  })], 2 /* CLASS */);
336
409
  }
337
410
 
@@ -349,7 +422,7 @@ const DateTimePickerPopoverFooter = [
349
422
  var script$3 = defineComponent({
350
423
  name: 'OrDateTimePickerPopoverFooter',
351
424
  components: {
352
- OrButton: script$8
425
+ OrButton: script$7
353
426
  },
354
427
  emits: ['resolve', 'reject'],
355
428
  expose: ['root'],
@@ -442,7 +515,7 @@ const DateTimePickerTimeSelectButtonGroupItem = [
442
515
  var script$1 = defineComponent({
443
516
  name: 'OrDateTimePickerTimeSelect',
444
517
  components: {
445
- OrButton: script$8
518
+ OrButton: script$7
446
519
  },
447
520
  model: {
448
521
  prop: 'modelValue',
@@ -465,53 +538,53 @@ var script$1 = defineComponent({
465
538
  const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
466
539
  // State
467
540
  const proxyModelValue = computed({
468
- get: () => props.modelValue,
469
- set: value => {
470
- context.emit('update:modelValue', value);
471
- }
472
- });
473
- const hoursValue = computed({
474
541
  get: () => {
475
- var _a, _b;
476
- return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCHours()) !== null && _b !== void 0 ? _b : 0;
542
+ var _a;
543
+ return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
477
544
  },
478
545
  set: value => {
479
- var _a, _b, _c, _d, _e, _f, _g, _h;
480
- proxyModelValue.value = new Date(Date.UTC((_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : 1970, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCMonth()) !== null && _d !== void 0 ? _d : 0, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCDate()) !== null && _f !== void 0 ? _f : 1, value, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCMinutes()) !== null && _h !== void 0 ? _h : minutesValue.value));
546
+ context.emit('update:modelValue', value);
481
547
  }
482
548
  });
483
- const minutesValue = computed({
484
- get: () => {
485
- var _a, _b;
486
- return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCMinutes()) !== null && _b !== void 0 ? _b : 0;
487
- },
488
- set: value => {
489
- var _a, _b, _c, _d, _e, _f, _g, _h;
490
- proxyModelValue.value = new Date(Date.UTC((_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.getUTCFullYear()) !== null && _b !== void 0 ? _b : 1970, (_d = (_c = proxyModelValue.value) === null || _c === void 0 ? void 0 : _c.getUTCMonth()) !== null && _d !== void 0 ? _d : 0, (_f = (_e = proxyModelValue.value) === null || _e === void 0 ? void 0 : _e.getUTCDate()) !== null && _f !== void 0 ? _f : 1, (_h = (_g = proxyModelValue.value) === null || _g === void 0 ? void 0 : _g.getUTCHours()) !== null && _h !== void 0 ? _h : hoursValue.value, value));
491
- }
549
+ const hoursOptions = computed(() => {
550
+ return Array.from({
551
+ length: 24
552
+ }, (_value, index) => {
553
+ const value = index;
554
+ return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), value, proxyModelValue.value.getUTCMinutes()));
555
+ });
492
556
  });
493
- const hoursOptions = Array.from({
494
- length: 24
495
- }, (_value, index) => ({
496
- value: index,
497
- label: String(index).padStart(2, '0')
498
- }));
499
- const minutesOptions = Array.from({
500
- length: 60
501
- }, (_value, index) => ({
502
- value: index,
503
- label: String(index).padStart(2, '0')
504
- }));
557
+ const minutesOptions = computed(() => {
558
+ return Array.from({
559
+ length: 60
560
+ }, (_value, index) => {
561
+ const value = index;
562
+ return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), value));
563
+ });
564
+ });
565
+ // Methods
566
+ function formatHours(value) {
567
+ return value.toLocaleString('default', {
568
+ hour: '2-digit',
569
+ timeZone: 'UTC'
570
+ });
571
+ }
572
+ function formatMinutes(value) {
573
+ return value.toLocaleString('default', {
574
+ minute: '2-digit',
575
+ timeZone: 'UTC'
576
+ });
577
+ }
505
578
  return {
506
579
  root,
507
580
  rootStyles,
508
581
  buttonGroupStyles,
509
582
  buttonGroupItemStyles,
510
583
  proxyModelValue,
511
- hoursValue,
512
- minutesValue,
513
584
  hoursOptions,
514
- minutesOptions
585
+ minutesOptions,
586
+ formatHours,
587
+ formatMinutes
515
588
  };
516
589
  }
517
590
  });
@@ -523,29 +596,29 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
523
596
  class: normalizeClass(_ctx.rootStyles)
524
597
  }, [createElementVNode("div", {
525
598
  class: normalizeClass(_ctx.buttonGroupStyles)
526
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.hoursOptions, option => {
599
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.hoursOptions, value => {
527
600
  return openBlock(), createBlock(_component_OrButton, {
528
- key: option.value,
601
+ key: Number(value),
529
602
  class: normalizeClass(_ctx.buttonGroupItemStyles),
530
- variant: _ctx.hoursValue === option.value ? 'contained' : 'text',
531
- color: _ctx.hoursValue === option.value ? 'primary' : 'inherit',
532
- onClick: withModifiers($event => _ctx.hoursValue = option.value, ["stop"])
603
+ variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
604
+ color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
605
+ onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
533
606
  }, {
534
- default: withCtx(() => [createTextVNode(toDisplayString(option.label), 1 /* TEXT */)]),
607
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatHours(value)), 1 /* TEXT */)]),
535
608
 
536
609
  _: 2 /* DYNAMIC */
537
610
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "onClick"]);
538
611
  }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), createTextVNode(" : "), createElementVNode("div", {
539
612
  class: normalizeClass(_ctx.buttonGroupStyles)
540
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.minutesOptions, option => {
613
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.minutesOptions, value => {
541
614
  return openBlock(), createBlock(_component_OrButton, {
542
- key: option.value,
615
+ key: Number(value),
543
616
  class: normalizeClass(_ctx.buttonGroupItemStyles),
544
- variant: _ctx.minutesValue === option.value ? 'contained' : 'text',
545
- color: _ctx.minutesValue === option.value ? 'primary' : 'inherit',
546
- onClick: withModifiers($event => _ctx.minutesValue = option.value, ["stop"])
617
+ variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
618
+ color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
619
+ onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
547
620
  }, {
548
- default: withCtx(() => [createTextVNode(toDisplayString(option.label), 1 /* TEXT */)]),
621
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMinutes(value)), 1 /* TEXT */)]),
549
622
 
550
623
  _: 2 /* DYNAMIC */
551
624
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "onClick"]);
@@ -567,7 +640,7 @@ const DateTimePickerControl = [
567
640
  var script = defineComponent({
568
641
  name: 'OrDateTimePicker',
569
642
  components: {
570
- OrDateTimePickerDateSelect: script$6,
643
+ OrDateTimePickerDaySelect: script$6,
571
644
  OrDateTimePickerMobileControl: script$5,
572
645
  OrDateTimePickerMonthSelect: script$4,
573
646
  OrDateTimePickerPopoverFooter: script$3,
@@ -577,7 +650,7 @@ var script = defineComponent({
577
650
  OrHint: script$e,
578
651
  OrIconButton: script$a,
579
652
  OrInputBox: script$f,
580
- OrLabel: script$7,
653
+ OrLabel: script$8,
581
654
  OrPopover: script$g
582
655
  },
583
656
  directives: {
@@ -658,6 +731,12 @@ var script = defineComponent({
658
731
  context.emit('update:modelValue', value);
659
732
  }
660
733
  });
734
+ const draftModelValue = ref();
735
+ watch(proxyModelValue, value => {
736
+ draftModelValue.value = value;
737
+ }, {
738
+ immediate: true
739
+ });
661
740
  // Methods
662
741
  function toggleDatePopover() {
663
742
  if (!props.readonly && !props.disabled) {
@@ -707,6 +786,7 @@ var script = defineComponent({
707
786
  controlStyles,
708
787
  controlAttributes,
709
788
  proxyModelValue,
789
+ draftModelValue,
710
790
  toggleDatePopover,
711
791
  toggleTimePopover,
712
792
  closeDatePopover,
@@ -1,4 +1,4 @@
1
- import { s as script } from './OrMenu.vue_vue_type_script_lang-f6748a99.js';
1
+ import { s as script } from './OrMenu.vue_vue_type_script_lang-7ba15d1d.js';
2
2
  import { resolveComponent, openBlock, createBlock, withCtx, createElementVNode, mergeProps, withModifiers, renderSlot } from 'vue';
3
3
 
4
4
  function render(_ctx, _cache, $props, $setup, $data, $options) {