@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.
- package/dist/bundled/v2/OrDatePicker-19e467e2.js +330 -0
- package/dist/bundled/v2/OrDateTimePicker-1011dc69.js +440 -0
- package/dist/bundled/v2/OrDateTimePickerMonthSelect-9e64d257.js +408 -0
- package/dist/bundled/v2/OrDateTimePickerPopoverHeader-c8672c0d.js +239 -0
- package/dist/bundled/v2/OrDateTimePickerTimeSelect-158d717b.js +179 -0
- package/dist/bundled/v2/OrTimePicker-1b3a758a.js +318 -0
- package/dist/bundled/v2/components/index.d.ts +2 -0
- package/dist/bundled/v2/components/index.js +7 -2
- package/dist/bundled/v2/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
- package/dist/bundled/v2/components/or-date-picker-v3/index.d.ts +2 -0
- package/dist/bundled/v2/components/or-date-picker-v3/index.js +31 -0
- package/dist/bundled/v2/components/or-date-picker-v3/props.d.ts +1 -0
- package/dist/bundled/v2/components/or-date-picker-v3/styles.d.ts +2 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +11 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/index.js +7 -5
- package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts +12 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +12 -0
- package/dist/bundled/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +12 -0
- package/dist/bundled/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
- package/dist/bundled/v2/components/or-time-picker-v3/index.d.ts +2 -0
- package/dist/bundled/v2/components/or-time-picker-v3/index.js +29 -0
- package/dist/bundled/v2/components/or-time-picker-v3/props.d.ts +1 -0
- package/dist/bundled/v2/components/or-time-picker-v3/styles.d.ts +2 -0
- package/dist/bundled/v2/index.js +8 -3
- package/dist/bundled/v3/OrDatePicker.vue_vue_type_script_lang-8eafbe6b.js +177 -0
- package/dist/bundled/v3/OrDateTimePicker.vue_vue_type_script_lang-b2a9ef8d.js +226 -0
- package/dist/bundled/v3/OrDateTimePickerMonthSelect-8989be5a.js +341 -0
- package/dist/bundled/v3/OrDateTimePickerPopoverHeader-caffcc00.js +162 -0
- package/dist/bundled/v3/OrDateTimePickerTimeSelect-e3a89bed.js +148 -0
- package/dist/bundled/v3/OrTimePicker.vue_vue_type_script_lang-f46eb37f.js +176 -0
- package/dist/bundled/v3/components/index.d.ts +2 -0
- package/dist/bundled/v3/components/index.js +8 -3
- package/dist/bundled/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
- package/dist/bundled/v3/components/or-date-picker-v3/index.d.ts +2 -0
- package/dist/bundled/v3/components/or-date-picker-v3/index.js +37 -0
- package/dist/bundled/v3/components/or-date-picker-v3/props.d.ts +1 -0
- package/dist/bundled/v3/components/or-date-picker-v3/styles.d.ts +2 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +11 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/index.js +7 -4
- package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts +12 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +12 -0
- package/dist/bundled/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +12 -0
- package/dist/bundled/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
- package/dist/bundled/v3/components/or-time-picker-v3/index.d.ts +2 -0
- package/dist/bundled/v3/components/or-time-picker-v3/index.js +33 -0
- package/dist/bundled/v3/components/or-time-picker-v3/props.d.ts +1 -0
- package/dist/bundled/v3/components/or-time-picker-v3/styles.d.ts +2 -0
- package/dist/bundled/v3/index.js +638 -408
- package/dist/esm/v2/OrDatePicker-454f5267.js +329 -0
- package/dist/esm/v2/OrDateTimePicker-3f533d0c.js +439 -0
- package/dist/esm/v2/OrDateTimePickerMonthSelect-380d9c90.js +406 -0
- package/dist/esm/v2/OrDateTimePickerPopoverHeader-e11d3222.js +235 -0
- package/dist/esm/v2/OrDateTimePickerTimeSelect-83dd1e81.js +177 -0
- package/dist/esm/v2/OrTimePicker-f23c8577.js +317 -0
- package/dist/esm/v2/components/index.d.ts +2 -0
- package/dist/esm/v2/components/index.js +8 -3
- package/dist/esm/v2/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
- package/dist/esm/v2/components/or-date-picker-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-date-picker-v3/index.js +29 -0
- package/dist/esm/v2/components/or-date-picker-v3/props.d.ts +1 -0
- package/dist/esm/v2/components/or-date-picker-v3/styles.d.ts +2 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +11 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/index.js +4 -2
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts +12 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +12 -0
- package/dist/esm/v2/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +12 -0
- package/dist/esm/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
- package/dist/esm/v2/components/or-time-picker-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-time-picker-v3/index.js +27 -0
- package/dist/esm/v2/components/or-time-picker-v3/props.d.ts +1 -0
- package/dist/esm/v2/components/or-time-picker-v3/styles.d.ts +2 -0
- package/dist/esm/v2/index.js +8 -3
- package/dist/esm/v3/OrDatePicker-390f7f11.js +288 -0
- package/dist/esm/v3/OrDateTimePicker-54db4170.js +390 -0
- package/dist/esm/v3/OrDateTimePickerMonthSelect-709b673d.js +338 -0
- package/dist/esm/v3/OrDateTimePickerPopoverHeader-c771a251.js +161 -0
- package/dist/esm/v3/OrDateTimePickerTimeSelect-2c8a7f9c.js +148 -0
- package/dist/esm/v3/OrTimePicker-362ca566.js +282 -0
- package/dist/esm/v3/components/index.d.ts +2 -0
- package/dist/esm/v3/components/index.js +7 -2
- package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +183 -0
- package/dist/esm/v3/components/or-date-picker-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-date-picker-v3/index.js +27 -0
- package/dist/esm/v3/components/or-date-picker-v3/props.d.ts +1 -0
- package/dist/esm/v3/components/or-date-picker-v3/styles.d.ts +2 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +11 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/index.js +4 -2
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue.d.ts +12 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +12 -0
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +12 -0
- package/dist/esm/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +183 -0
- package/dist/esm/v3/components/or-time-picker-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-time-picker-v3/index.js +25 -0
- package/dist/esm/v3/components/or-time-picker-v3/props.d.ts +1 -0
- package/dist/esm/v3/components/or-time-picker-v3/styles.d.ts +2 -0
- package/dist/esm/v3/index.js +7 -2
- package/package.json +2 -2
- package/src/components/index.ts +2 -0
- package/src/components/or-date-picker-v3/OrDatePicker.docs.mdx +7 -0
- package/src/components/or-date-picker-v3/OrDatePicker.stories3.ts +160 -0
- package/src/components/or-date-picker-v3/OrDatePicker.vue +308 -0
- package/src/components/or-date-picker-v3/index.ts +2 -0
- package/src/components/or-date-picker-v3/props.ts +1 -0
- package/src/components/or-date-picker-v3/styles.ts +12 -0
- package/src/components/or-date-time-picker-v3/OrDateTimePicker.stories3.ts +4 -0
- package/src/components/or-date-time-picker-v3/OrDateTimePicker.vue +17 -37
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue +7 -1
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue +8 -1
- package/src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue +8 -1
- package/src/components/or-time-picker-v3/OrTimePicker.docs.mdx +7 -0
- package/src/components/or-time-picker-v3/OrTimePicker.stories3.ts +160 -0
- package/src/components/or-time-picker-v3/OrTimePicker.vue +302 -0
- package/src/components/or-time-picker-v3/index.ts +2 -0
- package/src/components/or-time-picker-v3/props.ts +1 -0
- package/src/components/or-time-picker-v3/styles.ts +12 -0
- package/dist/bundled/v2/OrDateTimePicker-d6f327ad.js +0 -1215
- package/dist/bundled/v3/OrDateTimePicker.vue_vue_type_script_lang-ba3ac4fb.js +0 -834
- package/dist/esm/v2/OrDateTimePicker-57094f24.js +0 -1208
- package/dist/esm/v3/OrDateTimePicker-a8247a84.js +0 -997
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString, createVNode } from 'vue';
|
|
2
|
+
import { u as useDefaultYear, c as useDefaultMonth, d as useDefaultDate, e as useDefaultHours, f as useDefaultMinutes } from './OrDateTimePickerPopoverHeader-caffcc00.js';
|
|
3
|
+
import './OrButton-7b1eac5d.js';
|
|
4
|
+
import { s as script$2 } from './OrButton.vue_vue_type_script_lang-ed1524cf.js';
|
|
5
|
+
import './OrIcon-a670d8e9.js';
|
|
6
|
+
import './OrIconButton-55238a89.js';
|
|
7
|
+
import './OrMenu-101f1c62.js';
|
|
8
|
+
import './OrMenuItem-a90b0369.js';
|
|
9
|
+
import { s as script$3 } from './OrIcon.vue_vue_type_script_lang-859d76fb.js';
|
|
10
|
+
import { s as script$4 } from './OrIconButton.vue_vue_type_script_lang-3aeb76ac.js';
|
|
11
|
+
import { s as script$5 } from './OrMenu.vue_vue_type_script_lang-7ba15d1d.js';
|
|
12
|
+
import { s as script$6 } from './OrMenuItem.vue_vue_type_script_lang-d65eec51.js';
|
|
13
|
+
|
|
14
|
+
const DateTimePickerDaySelect = [
|
|
15
|
+
// Layout
|
|
16
|
+
'layout-column',
|
|
17
|
+
// Spacing
|
|
18
|
+
'px-md', 'py-md', 'gap-sm'];
|
|
19
|
+
const DateTimePickerDaySelectButtonGroup = [
|
|
20
|
+
// Layout
|
|
21
|
+
'grid', 'grid-cols-7',
|
|
22
|
+
// Spacing
|
|
23
|
+
'gap-xs'];
|
|
24
|
+
const DateTimePickerDaySelectButtonGroupItem = [
|
|
25
|
+
// Box
|
|
26
|
+
'min-w-fit',
|
|
27
|
+
// Spacing
|
|
28
|
+
'!px-sm', '!py-sm',
|
|
29
|
+
// Typography
|
|
30
|
+
'typography-caption-regular'];
|
|
31
|
+
|
|
32
|
+
var script$1 = defineComponent({
|
|
33
|
+
name: 'OrDateTimePickerDaySelect',
|
|
34
|
+
components: {
|
|
35
|
+
OrButton: script$2
|
|
36
|
+
},
|
|
37
|
+
model: {
|
|
38
|
+
prop: 'modelValue',
|
|
39
|
+
event: 'update:modelValue'
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
modelValue: {
|
|
43
|
+
type: Date,
|
|
44
|
+
default: undefined
|
|
45
|
+
},
|
|
46
|
+
filter: {
|
|
47
|
+
type: Function,
|
|
48
|
+
default: undefined
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
emits: ['update:modelValue'],
|
|
52
|
+
expose: ['root'],
|
|
53
|
+
setup(props, context) {
|
|
54
|
+
// Refs
|
|
55
|
+
const root = ref();
|
|
56
|
+
// Styles
|
|
57
|
+
const rootStyles = computed(() => ['or-date-time-picker-day-select', ...DateTimePickerDaySelect]);
|
|
58
|
+
const buttonGroupStyles = computed(() => [...DateTimePickerDaySelectButtonGroup]);
|
|
59
|
+
const buttonGroupItemStyles = computed(() => [...DateTimePickerDaySelectButtonGroupItem]);
|
|
60
|
+
// State
|
|
61
|
+
const proxyModelValue = computed({
|
|
62
|
+
get: () => {
|
|
63
|
+
var _a;
|
|
64
|
+
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
|
|
65
|
+
},
|
|
66
|
+
set: value => {
|
|
67
|
+
context.emit('update:modelValue', value);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const dayOptions = computed(() => {
|
|
71
|
+
const monthStartDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), 1, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
72
|
+
const monthEndDate = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, 0, proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
73
|
+
const calendarStartDate = new Date(Date.UTC(monthStartDate.getUTCFullYear(), monthStartDate.getUTCMonth(), 1 - (monthStartDate.getUTCDay() + 6) % 7, monthStartDate.getUTCHours(), monthStartDate.getUTCMinutes()));
|
|
74
|
+
const calendarEndDate = new Date(Date.UTC(monthEndDate.getUTCFullYear(), monthEndDate.getUTCMonth() + 1, (7 - monthEndDate.getUTCDay()) % 7, monthEndDate.getUTCHours(), monthEndDate.getUTCMinutes()));
|
|
75
|
+
return (() => {
|
|
76
|
+
let options = [],
|
|
77
|
+
value = calendarStartDate;
|
|
78
|
+
while (Number(value) !== Number(calendarEndDate)) {
|
|
79
|
+
options = [...options, value];
|
|
80
|
+
value = new Date(Date.UTC(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate() + 1, value.getUTCHours(), value.getUTCMinutes()));
|
|
81
|
+
}
|
|
82
|
+
return options;
|
|
83
|
+
})();
|
|
84
|
+
});
|
|
85
|
+
// Methods
|
|
86
|
+
function formatDay(value) {
|
|
87
|
+
return value.toLocaleString('default', {
|
|
88
|
+
day: 'numeric',
|
|
89
|
+
timeZone: 'UTC'
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
root,
|
|
94
|
+
rootStyles,
|
|
95
|
+
buttonGroupStyles,
|
|
96
|
+
buttonGroupItemStyles,
|
|
97
|
+
proxyModelValue,
|
|
98
|
+
dayOptions,
|
|
99
|
+
formatDay
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
105
|
+
const _component_OrButton = resolveComponent("OrButton");
|
|
106
|
+
return openBlock(), createElementBlock("div", {
|
|
107
|
+
ref: "root",
|
|
108
|
+
class: normalizeClass(_ctx.rootStyles)
|
|
109
|
+
}, [createElementVNode("div", {
|
|
110
|
+
class: normalizeClass(_ctx.buttonGroupStyles)
|
|
111
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dayOptions, value => {
|
|
112
|
+
return openBlock(), createBlock(_component_OrButton, {
|
|
113
|
+
key: Number(value),
|
|
114
|
+
class: normalizeClass(_ctx.buttonGroupItemStyles),
|
|
115
|
+
variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
|
|
116
|
+
color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
|
|
117
|
+
disabled: _ctx.filter && !_ctx.filter(value),
|
|
118
|
+
onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
|
|
119
|
+
}, {
|
|
120
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatDay(value)), 1 /* TEXT */)]),
|
|
121
|
+
|
|
122
|
+
_: 2 /* DYNAMIC */
|
|
123
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "disabled", "onClick"]);
|
|
124
|
+
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 2 /* CLASS */);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
script$1.render = render$1;
|
|
128
|
+
script$1.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-day-select/OrDateTimePickerDaySelect.vue";
|
|
129
|
+
|
|
130
|
+
const DateTimePickerMonthSelect = [
|
|
131
|
+
// Layout
|
|
132
|
+
'layout-row justify-between',
|
|
133
|
+
// Spacing
|
|
134
|
+
'px-md', 'py-md', 'gap-md'];
|
|
135
|
+
|
|
136
|
+
var script = defineComponent({
|
|
137
|
+
name: 'OrDateTimePickerMonthSelect',
|
|
138
|
+
components: {
|
|
139
|
+
OrButton: script$2,
|
|
140
|
+
OrIcon: script$3,
|
|
141
|
+
OrIconButton: script$4,
|
|
142
|
+
OrMenu: script$5,
|
|
143
|
+
OrMenuItem: script$6
|
|
144
|
+
},
|
|
145
|
+
model: {
|
|
146
|
+
prop: 'modelValue',
|
|
147
|
+
event: 'update:modelValue'
|
|
148
|
+
},
|
|
149
|
+
props: {
|
|
150
|
+
modelValue: {
|
|
151
|
+
type: Date,
|
|
152
|
+
default: undefined
|
|
153
|
+
},
|
|
154
|
+
filter: {
|
|
155
|
+
type: Function,
|
|
156
|
+
default: undefined
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
emits: ['update:modelValue'],
|
|
160
|
+
expose: ['root'],
|
|
161
|
+
setup(props, context) {
|
|
162
|
+
// Refs
|
|
163
|
+
const root = ref();
|
|
164
|
+
const yearButton = ref();
|
|
165
|
+
const monthButton = ref();
|
|
166
|
+
const yearButtonRoot = computed(() => {
|
|
167
|
+
var _a;
|
|
168
|
+
return (_a = yearButton.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
169
|
+
});
|
|
170
|
+
const monthButtonRoot = computed(() => {
|
|
171
|
+
var _a;
|
|
172
|
+
return (_a = monthButton.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
173
|
+
});
|
|
174
|
+
const yearMenu = ref();
|
|
175
|
+
const monthMenu = ref();
|
|
176
|
+
const yearMenuState = computed(() => {
|
|
177
|
+
var _a;
|
|
178
|
+
return (_a = yearMenu.value) === null || _a === void 0 ? void 0 : _a.state;
|
|
179
|
+
});
|
|
180
|
+
const monthMenuState = computed(() => {
|
|
181
|
+
var _a;
|
|
182
|
+
return (_a = monthMenu.value) === null || _a === void 0 ? void 0 : _a.state;
|
|
183
|
+
});
|
|
184
|
+
// Styles
|
|
185
|
+
const rootStyles = computed(() => ['or-date-time-picker-month-select', ...DateTimePickerMonthSelect]);
|
|
186
|
+
// State
|
|
187
|
+
const proxyModelValue = computed({
|
|
188
|
+
get: () => {
|
|
189
|
+
var _a;
|
|
190
|
+
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
|
|
191
|
+
},
|
|
192
|
+
set: value => {
|
|
193
|
+
context.emit('update:modelValue', value);
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
const yearOptions = computed(() => {
|
|
197
|
+
return Array.from({
|
|
198
|
+
length: 11
|
|
199
|
+
}).map((_value, index, {
|
|
200
|
+
length
|
|
201
|
+
}) => {
|
|
202
|
+
const value = proxyModelValue.value.getUTCFullYear() - Math.floor(length / 2) + index;
|
|
203
|
+
return new Date(Date.UTC(value, proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
const monthOptions = computed(() => {
|
|
207
|
+
return Array.from({
|
|
208
|
+
length: 12
|
|
209
|
+
}, (_value, index) => {
|
|
210
|
+
const value = index;
|
|
211
|
+
return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), value, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
// Methods
|
|
215
|
+
function goToNextMonth() {
|
|
216
|
+
proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() + 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
217
|
+
}
|
|
218
|
+
function goToPreviousMonth() {
|
|
219
|
+
proxyModelValue.value = new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth() - 1, proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), proxyModelValue.value.getUTCMinutes()));
|
|
220
|
+
}
|
|
221
|
+
function formatYear(value) {
|
|
222
|
+
return value.toLocaleString('default', {
|
|
223
|
+
year: 'numeric',
|
|
224
|
+
timeZone: 'UTC'
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
function formatMonth(value) {
|
|
228
|
+
return value.toLocaleString('default', {
|
|
229
|
+
month: 'long',
|
|
230
|
+
timeZone: 'UTC'
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
return {
|
|
234
|
+
root,
|
|
235
|
+
yearButton,
|
|
236
|
+
monthButton,
|
|
237
|
+
yearButtonRoot,
|
|
238
|
+
monthButtonRoot,
|
|
239
|
+
yearMenu,
|
|
240
|
+
monthMenu,
|
|
241
|
+
yearMenuState,
|
|
242
|
+
monthMenuState,
|
|
243
|
+
rootStyles,
|
|
244
|
+
proxyModelValue,
|
|
245
|
+
yearOptions,
|
|
246
|
+
monthOptions,
|
|
247
|
+
goToNextMonth,
|
|
248
|
+
goToPreviousMonth,
|
|
249
|
+
formatYear,
|
|
250
|
+
formatMonth
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
const _hoisted_1 = {
|
|
256
|
+
class: /*#__PURE__*/normalizeClass(['layout-row-reverse', 'gap-md'])
|
|
257
|
+
};
|
|
258
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
259
|
+
const _component_OrIconButton = resolveComponent("OrIconButton");
|
|
260
|
+
const _component_OrIcon = resolveComponent("OrIcon");
|
|
261
|
+
const _component_OrButton = resolveComponent("OrButton");
|
|
262
|
+
const _component_OrMenuItem = resolveComponent("OrMenuItem");
|
|
263
|
+
const _component_OrMenu = resolveComponent("OrMenu");
|
|
264
|
+
return openBlock(), createElementBlock("div", {
|
|
265
|
+
ref: "root",
|
|
266
|
+
class: normalizeClass(_ctx.rootStyles)
|
|
267
|
+
}, [createVNode(_component_OrIconButton, {
|
|
268
|
+
icon: 'chevron_left',
|
|
269
|
+
onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.goToPreviousMonth(), ["stop"]))
|
|
270
|
+
}), createElementVNode("div", _hoisted_1, [createVNode(_component_OrButton, {
|
|
271
|
+
ref: "yearButton",
|
|
272
|
+
variant: 'link',
|
|
273
|
+
color: 'inherit',
|
|
274
|
+
onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.yearMenu.open(), ["stop"]))
|
|
275
|
+
}, {
|
|
276
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(_ctx.proxyModelValue)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
|
|
277
|
+
icon: _ctx.yearMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
|
|
278
|
+
}, null, 8 /* PROPS */, ["icon"])]),
|
|
279
|
+
_: 1 /* STABLE */
|
|
280
|
+
}, 512 /* NEED_PATCH */), createVNode(_component_OrButton, {
|
|
281
|
+
ref: "monthButton",
|
|
282
|
+
variant: 'link',
|
|
283
|
+
color: 'inherit',
|
|
284
|
+
onClick: _cache[2] || (_cache[2] = withModifiers($event => _ctx.monthMenu.open(), ["stop"]))
|
|
285
|
+
}, {
|
|
286
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(_ctx.proxyModelValue)) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
|
|
287
|
+
icon: _ctx.monthMenuState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
|
|
288
|
+
}, null, 8 /* PROPS */, ["icon"])]),
|
|
289
|
+
_: 1 /* STABLE */
|
|
290
|
+
}, 512 /* NEED_PATCH */), createVNode(_component_OrMenu, {
|
|
291
|
+
ref: "yearMenu",
|
|
292
|
+
trigger: _ctx.yearButtonRoot
|
|
293
|
+
}, {
|
|
294
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.yearOptions, value => {
|
|
295
|
+
return openBlock(), createBlock(_component_OrMenuItem, {
|
|
296
|
+
key: Number(value),
|
|
297
|
+
selected: Number(value) === Number(_ctx.proxyModelValue),
|
|
298
|
+
disabled: _ctx.filter && !_ctx.filter(value),
|
|
299
|
+
onClick: withModifiers($event => {
|
|
300
|
+
_ctx.proxyModelValue = value;
|
|
301
|
+
_ctx.yearMenu.close();
|
|
302
|
+
}, ["stop"])
|
|
303
|
+
}, {
|
|
304
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatYear(value)), 1 /* TEXT */)]),
|
|
305
|
+
|
|
306
|
+
_: 2 /* DYNAMIC */
|
|
307
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "disabled", "onClick"]);
|
|
308
|
+
}), 128 /* KEYED_FRAGMENT */))]),
|
|
309
|
+
|
|
310
|
+
_: 1 /* STABLE */
|
|
311
|
+
}, 8 /* PROPS */, ["trigger"]), createVNode(_component_OrMenu, {
|
|
312
|
+
ref: "monthMenu",
|
|
313
|
+
trigger: _ctx.monthButtonRoot
|
|
314
|
+
}, {
|
|
315
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.monthOptions, value => {
|
|
316
|
+
return openBlock(), createBlock(_component_OrMenuItem, {
|
|
317
|
+
key: Number(value),
|
|
318
|
+
selected: Number(value) === Number(_ctx.proxyModelValue),
|
|
319
|
+
disabled: _ctx.filter && !_ctx.filter(value),
|
|
320
|
+
onClick: withModifiers($event => {
|
|
321
|
+
_ctx.proxyModelValue = value;
|
|
322
|
+
_ctx.monthMenu.close();
|
|
323
|
+
}, ["stop"])
|
|
324
|
+
}, {
|
|
325
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMonth(value)), 1 /* TEXT */)]),
|
|
326
|
+
|
|
327
|
+
_: 2 /* DYNAMIC */
|
|
328
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "disabled", "onClick"]);
|
|
329
|
+
}), 128 /* KEYED_FRAGMENT */))]),
|
|
330
|
+
|
|
331
|
+
_: 1 /* STABLE */
|
|
332
|
+
}, 8 /* PROPS */, ["trigger"])]), createVNode(_component_OrIconButton, {
|
|
333
|
+
icon: 'chevron_right',
|
|
334
|
+
onClick: _cache[3] || (_cache[3] = withModifiers($event => _ctx.goToNextMonth(), ["stop"]))
|
|
335
|
+
})], 2 /* CLASS */);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
script.render = render;
|
|
339
|
+
script.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue";
|
|
340
|
+
|
|
341
|
+
export { script as a, script$1 as s };
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString, createElementVNode, renderSlot, withModifiers } from 'vue';
|
|
2
|
+
import './OrLabel-4da10c50.js';
|
|
3
|
+
import { s as script$3 } from './OrLabel.vue_vue_type_script_lang-5ba2b33c.js';
|
|
4
|
+
import './OrButton-7b1eac5d.js';
|
|
5
|
+
import { s as script$4 } from './OrButton.vue_vue_type_script_lang-ed1524cf.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: script$3
|
|
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
|
+
function render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
65
|
+
const _component_OrLabel = resolveComponent("OrLabel");
|
|
66
|
+
return openBlock(), createElementBlock("div", {
|
|
67
|
+
ref: "root",
|
|
68
|
+
class: normalizeClass(_ctx.rootStyles)
|
|
69
|
+
}, [createVNode(_component_OrLabel, null, {
|
|
70
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.label), 1 /* TEXT */)]),
|
|
71
|
+
|
|
72
|
+
_: 1 /* STABLE */
|
|
73
|
+
}), createElementVNode("div", {
|
|
74
|
+
class: normalizeClass(_ctx.contentStyles)
|
|
75
|
+
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)], 2 /* CLASS */);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
script$2.render = render$2;
|
|
79
|
+
script$2.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue";
|
|
80
|
+
|
|
81
|
+
const DateTimePickerPopoverFooter = [
|
|
82
|
+
// Layout
|
|
83
|
+
'layout-row-reverse',
|
|
84
|
+
// Layout (children)
|
|
85
|
+
'children:grow',
|
|
86
|
+
// Spacing
|
|
87
|
+
'px-md md:px-sm', 'py-md md:py-sm', 'gap-md md:gap-sm'];
|
|
88
|
+
|
|
89
|
+
var script$1 = defineComponent({
|
|
90
|
+
name: 'OrDateTimePickerPopoverFooter',
|
|
91
|
+
components: {
|
|
92
|
+
OrButton: script$4
|
|
93
|
+
},
|
|
94
|
+
emits: ['resolve', 'reject'],
|
|
95
|
+
expose: ['root'],
|
|
96
|
+
setup() {
|
|
97
|
+
// Refs
|
|
98
|
+
const root = ref();
|
|
99
|
+
// Styles
|
|
100
|
+
const rootStyles = computed(() => ['or-date-time-picker-popover-footer', ...DateTimePickerPopoverFooter]);
|
|
101
|
+
return {
|
|
102
|
+
root,
|
|
103
|
+
rootStyles
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
109
|
+
const _component_OrButton = resolveComponent("OrButton");
|
|
110
|
+
return openBlock(), createElementBlock("footer", {
|
|
111
|
+
ref: "root",
|
|
112
|
+
class: normalizeClass(_ctx.rootStyles)
|
|
113
|
+
}, [createVNode(_component_OrButton, {
|
|
114
|
+
variant: 'outlined',
|
|
115
|
+
onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.$emit('resolve'), ["stop"]))
|
|
116
|
+
}, {
|
|
117
|
+
default: withCtx(() => [createTextVNode(" Done ")]),
|
|
118
|
+
_: 1 /* STABLE */
|
|
119
|
+
}), createVNode(_component_OrButton, {
|
|
120
|
+
variant: 'text',
|
|
121
|
+
onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.$emit('reject'), ["stop"]))
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(() => [createTextVNode(" Cancel ")]),
|
|
124
|
+
_: 1 /* STABLE */
|
|
125
|
+
})], 2 /* CLASS */);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
script$1.render = render$1;
|
|
129
|
+
script$1.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue";
|
|
130
|
+
|
|
131
|
+
const DateTimePickerPopoverHeader = [
|
|
132
|
+
// Layout
|
|
133
|
+
'layout-row md:hidden',
|
|
134
|
+
// Spacing
|
|
135
|
+
'px-md', 'py-md', 'gap-xl'];
|
|
136
|
+
|
|
137
|
+
var script = defineComponent({
|
|
138
|
+
name: 'OrDateTimePickerPopoverHeader',
|
|
139
|
+
expose: ['root'],
|
|
140
|
+
setup() {
|
|
141
|
+
// Refs
|
|
142
|
+
const root = ref();
|
|
143
|
+
// Styles
|
|
144
|
+
const rootStyles = computed(() => ['or-date-time-picker-popover-header', ...DateTimePickerPopoverHeader]);
|
|
145
|
+
return {
|
|
146
|
+
root,
|
|
147
|
+
rootStyles
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
153
|
+
return openBlock(), createElementBlock("header", {
|
|
154
|
+
ref: "root",
|
|
155
|
+
class: normalizeClass(_ctx.rootStyles)
|
|
156
|
+
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
script.render = render;
|
|
160
|
+
script.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue";
|
|
161
|
+
|
|
162
|
+
export { script$1 as a, script as b, useDefaultMonth as c, useDefaultDate as d, useDefaultHours as e, useDefaultMinutes as f, script$2 as s, useDefaultYear as u };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, withModifiers, withCtx, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
+
import { u as useDefaultYear, c as useDefaultMonth, d as useDefaultDate, e as useDefaultHours, f as useDefaultMinutes } from './OrDateTimePickerPopoverHeader-caffcc00.js';
|
|
3
|
+
import './OrButton-7b1eac5d.js';
|
|
4
|
+
import { s as script$1 } from './OrButton.vue_vue_type_script_lang-ed1524cf.js';
|
|
5
|
+
|
|
6
|
+
const DateTimePickerTimeSelect = [
|
|
7
|
+
// Layout
|
|
8
|
+
'layout-row justify-center',
|
|
9
|
+
// Spacing
|
|
10
|
+
'px-md', 'py-md', 'gap-sm',
|
|
11
|
+
// Typography
|
|
12
|
+
'typography-body-2-regular',
|
|
13
|
+
// Theme
|
|
14
|
+
'theme-foreground-default', 'dark:theme-foreground-default-dark'];
|
|
15
|
+
const DateTimePickerTimeSelectButtonGroup = [
|
|
16
|
+
// Layout
|
|
17
|
+
'layout-column',
|
|
18
|
+
// Box
|
|
19
|
+
'max-h-[224px]',
|
|
20
|
+
// Overflow
|
|
21
|
+
'overflow-x-hidden', 'overflow-y-auto'];
|
|
22
|
+
const DateTimePickerTimeSelectButtonGroupItem = [
|
|
23
|
+
// Typography
|
|
24
|
+
'typography-caption-regular'];
|
|
25
|
+
|
|
26
|
+
var script = defineComponent({
|
|
27
|
+
name: 'OrDateTimePickerTimeSelect',
|
|
28
|
+
components: {
|
|
29
|
+
OrButton: script$1
|
|
30
|
+
},
|
|
31
|
+
model: {
|
|
32
|
+
prop: 'modelValue',
|
|
33
|
+
event: 'update:modelValue'
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
modelValue: {
|
|
37
|
+
type: Date,
|
|
38
|
+
default: undefined
|
|
39
|
+
},
|
|
40
|
+
filter: {
|
|
41
|
+
type: Function,
|
|
42
|
+
default: undefined
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
emits: ['update:modelValue'],
|
|
46
|
+
expose: ['root'],
|
|
47
|
+
setup(props, context) {
|
|
48
|
+
// Refs
|
|
49
|
+
const root = ref();
|
|
50
|
+
// Styles
|
|
51
|
+
const rootStyles = computed(() => ['or-date-time-picker-time-select', ...DateTimePickerTimeSelect]);
|
|
52
|
+
const buttonGroupStyles = computed(() => [...DateTimePickerTimeSelectButtonGroup]);
|
|
53
|
+
const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
|
|
54
|
+
// State
|
|
55
|
+
const proxyModelValue = computed({
|
|
56
|
+
get: () => {
|
|
57
|
+
var _a;
|
|
58
|
+
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : new Date(Date.UTC(useDefaultYear(), useDefaultMonth(), useDefaultDate(), useDefaultHours(), useDefaultMinutes()));
|
|
59
|
+
},
|
|
60
|
+
set: value => {
|
|
61
|
+
context.emit('update:modelValue', value);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
const hoursOptions = computed(() => {
|
|
65
|
+
return Array.from({
|
|
66
|
+
length: 24
|
|
67
|
+
}, (_value, index) => {
|
|
68
|
+
const value = index;
|
|
69
|
+
return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), value, proxyModelValue.value.getUTCMinutes()));
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
const minutesOptions = computed(() => {
|
|
73
|
+
return Array.from({
|
|
74
|
+
length: 60
|
|
75
|
+
}, (_value, index) => {
|
|
76
|
+
const value = index;
|
|
77
|
+
return new Date(Date.UTC(proxyModelValue.value.getUTCFullYear(), proxyModelValue.value.getUTCMonth(), proxyModelValue.value.getUTCDate(), proxyModelValue.value.getUTCHours(), value));
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
// Methods
|
|
81
|
+
function formatHours(value) {
|
|
82
|
+
return value.toLocaleString('default', {
|
|
83
|
+
hour: '2-digit',
|
|
84
|
+
timeZone: 'UTC'
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function formatMinutes(value) {
|
|
88
|
+
return value.toLocaleString('default', {
|
|
89
|
+
minute: '2-digit',
|
|
90
|
+
timeZone: 'UTC'
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
root,
|
|
95
|
+
rootStyles,
|
|
96
|
+
buttonGroupStyles,
|
|
97
|
+
buttonGroupItemStyles,
|
|
98
|
+
proxyModelValue,
|
|
99
|
+
hoursOptions,
|
|
100
|
+
minutesOptions,
|
|
101
|
+
formatHours,
|
|
102
|
+
formatMinutes
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
108
|
+
const _component_OrButton = resolveComponent("OrButton");
|
|
109
|
+
return openBlock(), createElementBlock("div", {
|
|
110
|
+
ref: "root",
|
|
111
|
+
class: normalizeClass(_ctx.rootStyles)
|
|
112
|
+
}, [createElementVNode("div", {
|
|
113
|
+
class: normalizeClass(_ctx.buttonGroupStyles)
|
|
114
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.hoursOptions, value => {
|
|
115
|
+
return openBlock(), createBlock(_component_OrButton, {
|
|
116
|
+
key: Number(value),
|
|
117
|
+
class: normalizeClass(_ctx.buttonGroupItemStyles),
|
|
118
|
+
variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
|
|
119
|
+
color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
|
|
120
|
+
disabled: _ctx.filter && !_ctx.filter(value),
|
|
121
|
+
onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatHours(value)), 1 /* TEXT */)]),
|
|
124
|
+
|
|
125
|
+
_: 2 /* DYNAMIC */
|
|
126
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "disabled", "onClick"]);
|
|
127
|
+
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), createTextVNode(" : "), createElementVNode("div", {
|
|
128
|
+
class: normalizeClass(_ctx.buttonGroupStyles)
|
|
129
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.minutesOptions, value => {
|
|
130
|
+
return openBlock(), createBlock(_component_OrButton, {
|
|
131
|
+
key: Number(value),
|
|
132
|
+
class: normalizeClass(_ctx.buttonGroupItemStyles),
|
|
133
|
+
variant: Number(value) === Number(_ctx.proxyModelValue) ? 'contained' : 'text',
|
|
134
|
+
color: Number(value) === Number(_ctx.proxyModelValue) ? 'primary' : 'inherit',
|
|
135
|
+
disabled: _ctx.filter && !_ctx.filter(value),
|
|
136
|
+
onClick: withModifiers($event => _ctx.proxyModelValue = value, ["stop"])
|
|
137
|
+
}, {
|
|
138
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.formatMinutes(value)), 1 /* TEXT */)]),
|
|
139
|
+
|
|
140
|
+
_: 2 /* DYNAMIC */
|
|
141
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "variant", "color", "disabled", "onClick"]);
|
|
142
|
+
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)], 2 /* CLASS */);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
script.render = render;
|
|
146
|
+
script.__file = "src/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue";
|
|
147
|
+
|
|
148
|
+
export { script as s };
|