@onereach/ui-components 3.0.4-beta.2500.0 → 3.0.4-beta.2504.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 (118) 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-checkbox-v3/OrCheckbox.stories3.ts +1 -1
  84. package/src/components/or-combined-input-v3/OrCombinedInput.stories3.ts +1 -1
  85. package/src/components/{or-error-v3/OrError.docs.mdx → or-date-picker-v3/OrDatePicker.docs.mdx} +1 -1
  86. package/src/components/or-date-picker-v3/OrDatePicker.stories3.ts +160 -0
  87. package/src/components/or-date-picker-v3/OrDatePicker.vue +308 -0
  88. package/src/components/or-date-picker-v3/index.ts +2 -0
  89. package/src/components/or-date-picker-v3/props.ts +1 -0
  90. package/src/components/or-date-picker-v3/styles.ts +12 -0
  91. package/src/components/or-date-time-picker-v3/OrDateTimePicker.stories3.ts +1 -1
  92. package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +0 -34
  93. package/src/components/or-inline-input-v3/OrInlineInput.stories3.ts +1 -1
  94. package/src/components/or-inline-textarea-v3/OrInlineTextarea.stories3.ts +1 -1
  95. package/src/components/or-input-v3/OrInput.stories3.ts +2 -2
  96. package/src/components/or-radio-v3/OrRadio.stories3.ts +1 -1
  97. package/src/components/or-segmented-control-v3/OrSegmentedControl.stories3.ts +1 -1
  98. package/src/components/or-select-v3/OrSelect.stories3.ts +1 -1
  99. package/src/components/or-switch-v3/OrSwitch.stories3.ts +1 -1
  100. package/src/components/or-textarea-v3/OrTextarea.stories3.ts +1 -1
  101. package/src/components/{or-hint-v3/OrHint.docs.mdx → or-time-picker-v3/OrTimePicker.docs.mdx} +1 -1
  102. package/src/components/or-time-picker-v3/OrTimePicker.stories3.ts +160 -0
  103. package/src/components/or-time-picker-v3/OrTimePicker.vue +302 -0
  104. package/src/components/or-time-picker-v3/index.ts +2 -0
  105. package/src/components/or-time-picker-v3/props.ts +1 -0
  106. package/src/components/or-time-picker-v3/styles.ts +12 -0
  107. package/dist/bundled/v2/OrDateTimePicker-5a379f88.js +0 -1245
  108. package/dist/bundled/v3/OrDateTimePicker.vue_vue_type_script_lang-77c42110.js +0 -855
  109. package/dist/esm/v2/OrDateTimePicker-9b277e74.js +0 -1238
  110. package/dist/esm/v3/OrDateTimePicker-46b452b3.js +0 -1021
  111. package/src/components/or-error-v3/OrError.stories3.ts +0 -77
  112. package/src/components/or-hint-v3/OrHint.stories3.ts +0 -77
  113. package/src/components/or-inline-input-box-v3/OrInlineInputBox.docs.mdx +0 -3
  114. package/src/components/or-inline-input-box-v3/OrInlineInputBox.stories3.ts +0 -67
  115. package/src/components/or-input-box-v3/OrInputBox.docs.mdx +0 -3
  116. package/src/components/or-input-box-v3/OrInputBox.stories3.ts +0 -80
  117. package/src/components/or-label-v3/OrLabel.docs.mdx +0 -11
  118. package/src/components/or-label-v3/OrLabel.stories3.ts +0 -91
@@ -0,0 +1,408 @@
1
+ import './index-fa6eb4ca.js';
2
+ import { u as useDefaultYear, c as useDefaultMonth, d as useDefaultDate, e as useDefaultHours, f as useDefaultMinutes } from './OrDateTimePickerPopoverHeader-c8672c0d.js';
3
+ import { O as OrButton } from './OrButton-28addda1.js';
4
+ import { defineComponent, ref, computed } from '@vue/composition-api/dist/vue-composition-api.mjs';
5
+ import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
6
+ import { O as OrIcon } from './OrIcon-05d29a78.js';
7
+ import { O as OrIconButton } from './OrIconButton-50f3e359.js';
8
+ import { O as OrMenu } from './OrMenu-0c2c348c.js';
9
+ import { O as OrMenuItem } from './OrMenuItem-7eb9d387.js';
10
+
11
+ const DateTimePickerDaySelect = [
12
+ // Layout
13
+ 'layout-column',
14
+ // Spacing
15
+ 'px-md', 'py-md', 'gap-sm'];
16
+ const DateTimePickerDaySelectButtonGroup = [
17
+ // Layout
18
+ 'grid', 'grid-cols-7',
19
+ // Spacing
20
+ 'gap-xs'];
21
+ const DateTimePickerDaySelectButtonGroupItem = [
22
+ // Box
23
+ 'min-w-fit',
24
+ // Spacing
25
+ '!px-sm', '!py-sm',
26
+ // Typography
27
+ 'typography-caption-regular'];
28
+
29
+ var script$1 = defineComponent({
30
+ name: 'OrDateTimePickerDaySelect',
31
+ components: {
32
+ OrButton
33
+ },
34
+ model: {
35
+ prop: 'modelValue',
36
+ event: 'update:modelValue'
37
+ },
38
+ props: {
39
+ modelValue: {
40
+ type: Date,
41
+ default: undefined
42
+ },
43
+ filter: {
44
+ type: Function,
45
+ default: undefined
46
+ }
47
+ },
48
+ emits: ['update:modelValue'],
49
+ expose: ['root'],
50
+ setup(props, context) {
51
+ // Refs
52
+ const root = ref();
53
+ // Styles
54
+ const rootStyles = computed(() => ['or-date-time-picker-day-select', ...DateTimePickerDaySelect]);
55
+ const buttonGroupStyles = computed(() => [...DateTimePickerDaySelectButtonGroup]);
56
+ const buttonGroupItemStyles = computed(() => [...DateTimePickerDaySelectButtonGroupItem]);
57
+ // State
58
+ const proxyModelValue = computed({
59
+ get: () => {
60
+ var _a;
61
+ return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
62
+ },
63
+ set: value => {
64
+ context.emit('update:modelValue', value);
65
+ }
66
+ });
67
+ const dayOptions = computed(() => {
68
+ const monthStartDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), 1, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
69
+ const monthEndDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, 0, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
70
+ const calendarStartDate = new Date(Date.UTC(monthStartDate.getUTCFullYear(), monthStartDate.getUTCMonth(), 1 - (monthStartDate.getUTCDay() + 6) % 7, monthStartDate.getUTCHours(), monthStartDate.getUTCMinutes()));
71
+ const calendarEndDate = new Date(Date.UTC(monthEndDate.getUTCFullYear(), monthEndDate.getUTCMonth() + 1, (7 - monthEndDate.getUTCDay()) % 7, monthEndDate.getUTCHours(), monthEndDate.getUTCMinutes()));
72
+ return (() => {
73
+ let options = [],
74
+ value = calendarStartDate;
75
+ while (Number(value) !== Number(calendarEndDate)) {
76
+ options = [...options, value];
77
+ value = new Date(Date.UTC(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate() + 1, value.getUTCHours(), value.getUTCMinutes()));
78
+ }
79
+ return options;
80
+ })();
81
+ });
82
+ // Methods
83
+ function formatDay(value) {
84
+ return value.toLocaleString('default', {
85
+ day: 'numeric',
86
+ timeZone: 'UTC'
87
+ });
88
+ }
89
+ return {
90
+ root,
91
+ rootStyles,
92
+ buttonGroupStyles,
93
+ buttonGroupItemStyles,
94
+ proxyModelValue,
95
+ dayOptions,
96
+ formatDay
97
+ };
98
+ }
99
+ });
100
+
101
+ /* script */
102
+ const __vue_script__$1 = script$1;
103
+
104
+ /* template */
105
+ var __vue_render__$1 = function () {
106
+ var _vm = this;
107
+ var _h = _vm.$createElement;
108
+ var _c = _vm._self._c || _h;
109
+ return _c('div', {
110
+ ref: "root",
111
+ class: _vm.rootStyles
112
+ }, [_c('div', {
113
+ class: _vm.buttonGroupStyles
114
+ }, _vm._l(_vm.dayOptions, function (value) {
115
+ return _c('OrButton', {
116
+ key: Number(value),
117
+ class: _vm.buttonGroupItemStyles,
118
+ attrs: {
119
+ "variant": Number(value) === Number(_vm.proxyModelValue) ? 'contained' : 'text',
120
+ "color": Number(value) === Number(_vm.proxyModelValue) ? 'primary' : 'inherit',
121
+ "disabled": _vm.filter && !_vm.filter(value)
122
+ },
123
+ on: {
124
+ "click": function ($event) {
125
+ $event.stopPropagation();
126
+ _vm.proxyModelValue = value;
127
+ }
128
+ }
129
+ }, [_vm._v("\n " + _vm._s(_vm.formatDay(value)) + "\n ")]);
130
+ }), 1)]);
131
+ };
132
+ var __vue_staticRenderFns__$1 = [];
133
+
134
+ /* style */
135
+ const __vue_inject_styles__$1 = undefined;
136
+ /* scoped */
137
+ const __vue_scope_id__$1 = undefined;
138
+ /* module identifier */
139
+ const __vue_module_identifier__$1 = undefined;
140
+ /* functional template */
141
+ const __vue_is_functional_template__$1 = false;
142
+ /* style inject */
143
+
144
+ /* style inject SSR */
145
+
146
+ /* style inject shadow dom */
147
+
148
+ const __vue_component__$1 = /*#__PURE__*/normalizeComponent({
149
+ render: __vue_render__$1,
150
+ staticRenderFns: __vue_staticRenderFns__$1
151
+ }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
152
+ var OrDateTimePickerDaySelect = __vue_component__$1;
153
+
154
+ const DateTimePickerMonthSelect = [
155
+ // Layout
156
+ 'layout-row justify-between',
157
+ // Spacing
158
+ 'px-md', 'py-md', 'gap-md'];
159
+
160
+ var script = defineComponent({
161
+ name: 'OrDateTimePickerMonthSelect',
162
+ components: {
163
+ OrButton,
164
+ OrIcon,
165
+ OrIconButton,
166
+ OrMenu,
167
+ OrMenuItem
168
+ },
169
+ model: {
170
+ prop: 'modelValue',
171
+ event: 'update:modelValue'
172
+ },
173
+ props: {
174
+ modelValue: {
175
+ type: Date,
176
+ default: undefined
177
+ },
178
+ filter: {
179
+ type: Function,
180
+ default: undefined
181
+ }
182
+ },
183
+ emits: ['update:modelValue'],
184
+ expose: ['root'],
185
+ setup(props, context) {
186
+ // Refs
187
+ const root = ref();
188
+ const yearButton = ref();
189
+ const monthButton = ref();
190
+ const yearButtonRoot = computed(() => {
191
+ var _a;
192
+ return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
193
+ });
194
+ const monthButtonRoot = computed(() => {
195
+ var _a;
196
+ return (_a = monthButton.value) === null || _a === void 0 ? void 0 : _a.root;
197
+ });
198
+ const yearMenu = ref();
199
+ const monthMenu = ref();
200
+ const yearMenuState = computed(() => {
201
+ var _a;
202
+ return (_a = yearMenu.value) === null || _a === void 0 ? void 0 : _a.state;
203
+ });
204
+ const monthMenuState = computed(() => {
205
+ var _a;
206
+ return (_a = monthMenu.value) === null || _a === void 0 ? void 0 : _a.state;
207
+ });
208
+ // Styles
209
+ const rootStyles = computed(() => ['or-date-time-picker-month-select', ...DateTimePickerMonthSelect]);
210
+ // State
211
+ const proxyModelValue = computed({
212
+ get: () => {
213
+ var _a;
214
+ return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
215
+ },
216
+ set: value => {
217
+ context.emit('update:modelValue', value);
218
+ }
219
+ });
220
+ const yearOptions = computed(() => {
221
+ return Array.from({
222
+ length: 11
223
+ }).map((_value, index, {
224
+ length
225
+ }) => {
226
+ const value = proxyModelValue.value.getUTCFullYear() - Math.floor(length / 2) + index;
227
+ return new Date(Date.UTC(value, proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
228
+ });
229
+ });
230
+ const monthOptions = computed(() => {
231
+ return Array.from({
232
+ length: 12
233
+ }, (_value, index) => {
234
+ const value = index;
235
+ return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), value, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
236
+ });
237
+ });
238
+ // Methods
239
+ function goToNextMonth() {
240
+ proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
241
+ }
242
+ function goToPreviousMonth() {
243
+ proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() - 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
244
+ }
245
+ function formatYear(value) {
246
+ return value.toLocaleString('default', {
247
+ year: 'numeric',
248
+ timeZone: 'UTC'
249
+ });
250
+ }
251
+ function formatMonth(value) {
252
+ return value.toLocaleString('default', {
253
+ month: 'long',
254
+ timeZone: 'UTC'
255
+ });
256
+ }
257
+ return {
258
+ root,
259
+ yearButton,
260
+ monthButton,
261
+ yearButtonRoot,
262
+ monthButtonRoot,
263
+ yearMenu,
264
+ monthMenu,
265
+ yearMenuState,
266
+ monthMenuState,
267
+ rootStyles,
268
+ proxyModelValue,
269
+ yearOptions,
270
+ monthOptions,
271
+ goToNextMonth,
272
+ goToPreviousMonth,
273
+ formatYear,
274
+ formatMonth
275
+ };
276
+ }
277
+ });
278
+
279
+ /* script */
280
+ const __vue_script__ = script;
281
+
282
+ /* template */
283
+ var __vue_render__ = function () {
284
+ var _vm = this;
285
+ var _h = _vm.$createElement;
286
+ var _c = _vm._self._c || _h;
287
+ return _c('div', {
288
+ ref: "root",
289
+ class: _vm.rootStyles
290
+ }, [_c('OrIconButton', {
291
+ attrs: {
292
+ "icon": 'chevron_left'
293
+ },
294
+ on: {
295
+ "click": function ($event) {
296
+ $event.stopPropagation();
297
+ return _vm.goToPreviousMonth();
298
+ }
299
+ }
300
+ }), _vm._v(" "), _c('div', {
301
+ class: ['layout-row-reverse', 'gap-md']
302
+ }, [_c('OrButton', {
303
+ ref: "yearButton",
304
+ attrs: {
305
+ "variant": 'link',
306
+ "color": 'inherit'
307
+ },
308
+ on: {
309
+ "click": function ($event) {
310
+ $event.stopPropagation();
311
+ return _vm.yearMenu.open();
312
+ }
313
+ }
314
+ }, [_vm._v("\n " + _vm._s(_vm.formatYear(_vm.proxyModelValue)) + " "), _c('OrIcon', {
315
+ attrs: {
316
+ "icon": _vm.yearMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
317
+ }
318
+ })], 1), _vm._v(" "), _c('OrButton', {
319
+ ref: "monthButton",
320
+ attrs: {
321
+ "variant": 'link',
322
+ "color": 'inherit'
323
+ },
324
+ on: {
325
+ "click": function ($event) {
326
+ $event.stopPropagation();
327
+ return _vm.monthMenu.open();
328
+ }
329
+ }
330
+ }, [_vm._v("\n " + _vm._s(_vm.formatMonth(_vm.proxyModelValue)) + " "), _c('OrIcon', {
331
+ attrs: {
332
+ "icon": _vm.monthMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
333
+ }
334
+ })], 1), _vm._v(" "), _c('OrMenu', {
335
+ ref: "yearMenu",
336
+ attrs: {
337
+ "trigger": _vm.yearButtonRoot
338
+ }
339
+ }, _vm._l(_vm.yearOptions, function (value) {
340
+ return _c('OrMenuItem', {
341
+ key: Number(value),
342
+ attrs: {
343
+ "selected": Number(value) === Number(_vm.proxyModelValue),
344
+ "disabled": _vm.filter && !_vm.filter(value)
345
+ },
346
+ on: {
347
+ "click": function ($event) {
348
+ $event.stopPropagation();
349
+ _vm.proxyModelValue = value;
350
+ _vm.yearMenu.close();
351
+ }
352
+ }
353
+ }, [_vm._v("\n " + _vm._s(_vm.formatYear(value)) + "\n ")]);
354
+ }), 1), _vm._v(" "), _c('OrMenu', {
355
+ ref: "monthMenu",
356
+ attrs: {
357
+ "trigger": _vm.monthButtonRoot
358
+ }
359
+ }, _vm._l(_vm.monthOptions, function (value) {
360
+ return _c('OrMenuItem', {
361
+ key: Number(value),
362
+ attrs: {
363
+ "selected": Number(value) === Number(_vm.proxyModelValue),
364
+ "disabled": _vm.filter && !_vm.filter(value)
365
+ },
366
+ on: {
367
+ "click": function ($event) {
368
+ $event.stopPropagation();
369
+ _vm.proxyModelValue = value;
370
+ _vm.monthMenu.close();
371
+ }
372
+ }
373
+ }, [_vm._v("\n " + _vm._s(_vm.formatMonth(value)) + "\n ")]);
374
+ }), 1)], 1), _vm._v(" "), _c('OrIconButton', {
375
+ attrs: {
376
+ "icon": 'chevron_right'
377
+ },
378
+ on: {
379
+ "click": function ($event) {
380
+ $event.stopPropagation();
381
+ return _vm.goToNextMonth();
382
+ }
383
+ }
384
+ })], 1);
385
+ };
386
+ var __vue_staticRenderFns__ = [];
387
+
388
+ /* style */
389
+ const __vue_inject_styles__ = undefined;
390
+ /* scoped */
391
+ const __vue_scope_id__ = undefined;
392
+ /* module identifier */
393
+ const __vue_module_identifier__ = undefined;
394
+ /* functional template */
395
+ const __vue_is_functional_template__ = false;
396
+ /* style inject */
397
+
398
+ /* style inject SSR */
399
+
400
+ /* style inject shadow dom */
401
+
402
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
403
+ render: __vue_render__,
404
+ staticRenderFns: __vue_staticRenderFns__
405
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
406
+ var OrDateTimePickerMonthSelect = __vue_component__;
407
+
408
+ export { OrDateTimePickerDaySelect as O, OrDateTimePickerMonthSelect as a };
@@ -0,0 +1,239 @@
1
+ import './index-fa6eb4ca.js';
2
+ import { O as OrLabel } from './OrLabel-761500d5.js';
3
+ import { defineComponent, ref, computed } from '@vue/composition-api/dist/vue-composition-api.mjs';
4
+ import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
5
+ import { O as OrButton } from './OrButton-28addda1.js';
6
+
7
+ function useDefaultDate() {
8
+ return new Date().getUTCDate();
9
+ }
10
+
11
+ function useDefaultHours() {
12
+ return 0;
13
+ }
14
+
15
+ function useDefaultMinutes() {
16
+ return 0;
17
+ }
18
+
19
+ function useDefaultMonth() {
20
+ return new Date().getUTCMonth();
21
+ }
22
+
23
+ function useDefaultYear() {
24
+ return new Date().getUTCFullYear();
25
+ }
26
+
27
+ const DateTimePickerMobileControl = [
28
+ // Layout
29
+ 'layout-column',
30
+ // Spacing
31
+ 'gap-xs'];
32
+ const DateTimePickerMobileControlContent = [
33
+ // Typography
34
+ 'typography-headline-1',
35
+ // Theme
36
+ 'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
37
+
38
+ var script$2 = defineComponent({
39
+ name: 'OrDateTimePickerMobileControl',
40
+ components: {
41
+ OrLabel
42
+ },
43
+ props: {
44
+ label: {
45
+ type: String,
46
+ required: true
47
+ }
48
+ },
49
+ expose: ['root'],
50
+ setup() {
51
+ // Refs
52
+ const root = ref();
53
+ // Styles
54
+ const rootStyles = computed(() => ['or-date-time-picker-mobile-control', ...DateTimePickerMobileControl]);
55
+ const contentStyles = computed(() => [...DateTimePickerMobileControlContent]);
56
+ return {
57
+ root,
58
+ rootStyles,
59
+ contentStyles
60
+ };
61
+ }
62
+ });
63
+
64
+ /* script */
65
+ const __vue_script__$2 = script$2;
66
+
67
+ /* template */
68
+ var __vue_render__$2 = function () {
69
+ var _vm = this;
70
+ var _h = _vm.$createElement;
71
+ var _c = _vm._self._c || _h;
72
+ return _c('div', {
73
+ ref: "root",
74
+ class: _vm.rootStyles
75
+ }, [_c('OrLabel', [_vm._v(_vm._s(_vm.label))]), _vm._v(" "), _c('div', {
76
+ class: _vm.contentStyles
77
+ }, [_vm._t("default")], 2)], 1);
78
+ };
79
+ var __vue_staticRenderFns__$2 = [];
80
+
81
+ /* style */
82
+ const __vue_inject_styles__$2 = undefined;
83
+ /* scoped */
84
+ const __vue_scope_id__$2 = undefined;
85
+ /* module identifier */
86
+ const __vue_module_identifier__$2 = undefined;
87
+ /* functional template */
88
+ const __vue_is_functional_template__$2 = false;
89
+ /* style inject */
90
+
91
+ /* style inject SSR */
92
+
93
+ /* style inject shadow dom */
94
+
95
+ const __vue_component__$2 = /*#__PURE__*/normalizeComponent({
96
+ render: __vue_render__$2,
97
+ staticRenderFns: __vue_staticRenderFns__$2
98
+ }, __vue_inject_styles__$2, __vue_script__$2, __vue_scope_id__$2, __vue_is_functional_template__$2, __vue_module_identifier__$2, false, undefined, undefined, undefined);
99
+ var OrDateTimePickerMobileControl = __vue_component__$2;
100
+
101
+ const DateTimePickerPopoverFooter = [
102
+ // Layout
103
+ 'layout-row-reverse',
104
+ // Layout (children)
105
+ 'children:grow',
106
+ // Spacing
107
+ 'px-md md:px-sm', 'py-md md:py-sm', 'gap-md md:gap-sm'];
108
+
109
+ var script$1 = defineComponent({
110
+ name: 'OrDateTimePickerPopoverFooter',
111
+ components: {
112
+ OrButton
113
+ },
114
+ emits: ['resolve', 'reject'],
115
+ expose: ['root'],
116
+ setup() {
117
+ // Refs
118
+ const root = ref();
119
+ // Styles
120
+ const rootStyles = computed(() => ['or-date-time-picker-popover-footer', ...DateTimePickerPopoverFooter]);
121
+ return {
122
+ root,
123
+ rootStyles
124
+ };
125
+ }
126
+ });
127
+
128
+ /* script */
129
+ const __vue_script__$1 = script$1;
130
+
131
+ /* template */
132
+ var __vue_render__$1 = function () {
133
+ var _vm = this;
134
+ var _h = _vm.$createElement;
135
+ var _c = _vm._self._c || _h;
136
+ return _c('footer', {
137
+ ref: "root",
138
+ class: _vm.rootStyles
139
+ }, [_c('OrButton', {
140
+ attrs: {
141
+ "variant": 'outlined'
142
+ },
143
+ on: {
144
+ "click": function ($event) {
145
+ $event.stopPropagation();
146
+ return _vm.$emit('resolve');
147
+ }
148
+ }
149
+ }, [_vm._v("\n Done\n ")]), _vm._v(" "), _c('OrButton', {
150
+ attrs: {
151
+ "variant": 'text'
152
+ },
153
+ on: {
154
+ "click": function ($event) {
155
+ $event.stopPropagation();
156
+ return _vm.$emit('reject');
157
+ }
158
+ }
159
+ }, [_vm._v("\n Cancel\n ")])], 1);
160
+ };
161
+ var __vue_staticRenderFns__$1 = [];
162
+
163
+ /* style */
164
+ const __vue_inject_styles__$1 = undefined;
165
+ /* scoped */
166
+ const __vue_scope_id__$1 = undefined;
167
+ /* module identifier */
168
+ const __vue_module_identifier__$1 = undefined;
169
+ /* functional template */
170
+ const __vue_is_functional_template__$1 = false;
171
+ /* style inject */
172
+
173
+ /* style inject SSR */
174
+
175
+ /* style inject shadow dom */
176
+
177
+ const __vue_component__$1 = /*#__PURE__*/normalizeComponent({
178
+ render: __vue_render__$1,
179
+ staticRenderFns: __vue_staticRenderFns__$1
180
+ }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
181
+ var OrDateTimePickerPopoverFooter = __vue_component__$1;
182
+
183
+ const DateTimePickerPopoverHeader = [
184
+ // Layout
185
+ 'layout-row md:hidden',
186
+ // Spacing
187
+ 'px-md', 'py-md', 'gap-xl'];
188
+
189
+ var script = defineComponent({
190
+ name: 'OrDateTimePickerPopoverHeader',
191
+ expose: ['root'],
192
+ setup() {
193
+ // Refs
194
+ const root = ref();
195
+ // Styles
196
+ const rootStyles = computed(() => ['or-date-time-picker-popover-header', ...DateTimePickerPopoverHeader]);
197
+ return {
198
+ root,
199
+ rootStyles
200
+ };
201
+ }
202
+ });
203
+
204
+ /* script */
205
+ const __vue_script__ = script;
206
+
207
+ /* template */
208
+ var __vue_render__ = function () {
209
+ var _vm = this;
210
+ var _h = _vm.$createElement;
211
+ var _c = _vm._self._c || _h;
212
+ return _c('header', {
213
+ ref: "root",
214
+ class: _vm.rootStyles
215
+ }, [_vm._t("default")], 2);
216
+ };
217
+ var __vue_staticRenderFns__ = [];
218
+
219
+ /* style */
220
+ const __vue_inject_styles__ = undefined;
221
+ /* scoped */
222
+ const __vue_scope_id__ = undefined;
223
+ /* module identifier */
224
+ const __vue_module_identifier__ = undefined;
225
+ /* functional template */
226
+ const __vue_is_functional_template__ = false;
227
+ /* style inject */
228
+
229
+ /* style inject SSR */
230
+
231
+ /* style inject shadow dom */
232
+
233
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
234
+ render: __vue_render__,
235
+ staticRenderFns: __vue_staticRenderFns__
236
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
237
+ var OrDateTimePickerPopoverHeader = __vue_component__;
238
+
239
+ export { OrDateTimePickerMobileControl as O, OrDateTimePickerPopoverFooter as a, OrDateTimePickerPopoverHeader as b, useDefaultMonth as c, useDefaultDate as d, useDefaultHours as e, useDefaultMinutes as f, useDefaultYear as u };