@onereach/ui-components 21.5.0 → 21.5.2
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/esm/components/{OrAutocompleteV3-961163d0.js → OrAutocompleteV3-ab3c83bc.js} +68 -71
- package/dist/esm/components/OrButtonV3-a83254fb.js +264 -0
- package/dist/esm/components/{OrDateTimePickerV3-7b24568c.js → OrDateTimePickerV3-68c0e2c8.js} +14 -14
- package/dist/esm/components/{OrEditorTabsV3-856e42f1.js → OrEditorTabsV3-ae6257e1.js} +4 -3
- package/dist/esm/components/{OrInlineInputV3-4e69972f.js → OrInlineInputV3-6593cb76.js} +5 -5
- package/dist/esm/components/index.js +5 -5
- package/dist/esm/components/or-autocomplete-v3/index.js +4 -4
- package/dist/esm/components/or-avatar-v3/index.js +4 -4
- package/dist/esm/components/or-bottom-sheet-v3/index.js +6 -6
- package/dist/esm/components/or-button-group-v3/index.js +2 -25
- package/dist/esm/components/or-button-v3/index.js +3 -283
- package/dist/esm/components/or-card-collection-v3/index.js +5 -5
- package/dist/esm/components/or-checkbox-group-v3/index.js +6 -6
- package/dist/esm/components/or-checkbox-tree-v3/index.js +5 -5
- package/dist/esm/components/or-checkbox-v3/index.js +7 -7
- package/dist/esm/components/or-code-v3/index.js +8 -8
- package/dist/esm/components/or-confirm-v3/index.js +5 -5
- package/dist/esm/components/or-context-menu-v3/index.js +6 -6
- package/dist/esm/components/or-data-grid-v3/index.js +6 -6
- package/dist/esm/components/or-date-format-v3/index.js +7 -7
- package/dist/esm/components/or-date-picker-v3/index.js +10 -10
- package/dist/esm/components/or-date-range-picker-v3/index.js +11 -11
- package/dist/esm/components/or-date-time-format-v3/index.js +8 -8
- package/dist/esm/components/or-date-time-picker-v3/index.js +5 -5
- package/dist/esm/components/or-drawer-v3/index.js +5 -5
- package/dist/esm/components/or-drop-area-v3/index.js +6 -6
- package/dist/esm/components/or-editor-tabs-v3/index.js +5 -5
- package/dist/esm/components/or-expansion-panel-v3/index.js +5 -5
- package/dist/esm/components/or-fab-v3/index.js +2 -24
- package/dist/esm/components/or-filter-popover-v3/index.js +7 -7
- package/dist/esm/components/or-filter-trigger-v3/index.js +5 -5
- package/dist/esm/components/or-filter-v3/index.js +5 -5
- package/dist/esm/components/or-icon-button-v3/index.js +4 -4
- package/dist/esm/components/or-inline-input-v3/index.js +4 -4
- package/dist/esm/components/or-inline-textarea-v3/index.js +7 -7
- package/dist/esm/components/or-input-v3/index.js +8 -8
- package/dist/esm/components/or-list-v3/index.js +4 -4
- package/dist/esm/components/or-menu-item-v3/index.js +4 -4
- package/dist/esm/components/or-menu-v3/index.js +5 -5
- package/dist/esm/components/or-modal-v3/index.js +6 -6
- package/dist/esm/components/or-notification-v3/index.js +5 -5
- package/dist/esm/components/or-overlay-v3/index.js +5 -5
- package/dist/esm/components/or-pagination-v3/index.js +6 -6
- package/dist/esm/components/or-popover-v3/index.js +7 -7
- package/dist/esm/components/or-progress-v3/index.js +5 -5
- package/dist/esm/components/or-radio-group-v3/index.js +6 -6
- package/dist/esm/components/or-radio-v3/index.js +8 -8
- package/dist/esm/components/or-range-slider-v3/index.js +5 -5
- package/dist/esm/components/or-rating-v3/index.js +6 -6
- package/dist/esm/components/or-resizeable-panel-v3/index.js +4 -4
- package/dist/esm/components/or-rich-text-editor-v3/index.js +5 -5
- package/dist/esm/components/or-rich-tooltip-v3/index.js +5 -5
- package/dist/esm/components/or-search-v3/index.js +8 -8
- package/dist/esm/components/or-segmented-control-v3/index.js +5 -5
- package/dist/esm/components/or-select-v3/index.js +10 -10
- package/dist/esm/components/or-sidebar-v3/index.js +5 -5
- package/dist/esm/components/or-skeleton-v3/index.js +4 -4
- package/dist/esm/components/or-slider-v3/index.js +5 -5
- package/dist/esm/components/or-sorting-v3/index.js +5 -5
- package/dist/esm/components/or-switch-v3/index.js +6 -6
- package/dist/esm/components/or-tabs-v3/index.js +5 -5
- package/dist/esm/components/or-tag-input-v3/index.js +8 -8
- package/dist/esm/components/or-tag-v3/index.js +6 -6
- package/dist/esm/components/or-tags-v3/index.js +5 -5
- package/dist/esm/components/or-textarea-v3/index.js +8 -8
- package/dist/esm/components/or-time-format-v3/index.js +7 -7
- package/dist/esm/components/or-time-picker-v3/index.js +8 -8
- package/dist/esm/components/or-time-range-picker-v3/index.js +9 -9
- package/dist/esm/components/or-toast-v3/index.js +4 -4
- package/dist/esm/components/or-tooltip-v3/index.js +5 -5
- package/dist/esm/components/or-tree-v3/index.js +2 -24
- package/dist/esm/index.js +5 -5
- package/package.json +4 -4
- package/dist/esm/components/or-autocomplete-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-avatar-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-bottom-sheet-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-button-group-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-card-collection-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-card-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-checkbox-group-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-checkbox-tree-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-checkbox-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-code-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-combined-input-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-confirm-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-context-menu-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-data-grid-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-date-format-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-date-picker-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-date-range-picker-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-date-time-format-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-date-time-picker-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-drawer-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-drop-area-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-empty-state-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-error-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-expansion-panel-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-filter-popover-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-filter-trigger-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-filter-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-form-group-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-hint-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-icon-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-indicator-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-inline-input-box-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-inline-input-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-inline-textarea-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-input-box-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-input-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-label-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-link-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-list-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-loader-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-menu-item-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-menu-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-modal-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-notification-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-pagination-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-popover-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-progress-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-radio-group-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-radio-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-range-slider-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-rating-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-resizeable-panel-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-rich-text-editor-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-rich-tooltip-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-search-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-select-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-sidebar-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-skeleton-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-slider-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-sorting-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-status-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-switch-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-tab-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-tabs-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-tag-input-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-tag-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-tags-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-teleport-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-text-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-textarea-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-time-format-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-time-picker-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-time-range-picker-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-toast-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-tooltip-v3/constants.d.ts +0 -2
- package/dist/esm/components/or-tree-v3/constants.d.ts +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useAttrs, computed, inject, isRef, ref, watch, getCurrentInstance, onMounted, defineComponent, reactive, toRef, nextTick, resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives, createSlots, createElementVNode, mergeProps, createVNode, Fragment, renderList, vShow } from 'vue';
|
|
2
2
|
import { useMutationObserver, useResizeObserver, refDebounced, useMediaQuery, computedAsync, watchTriggerable } from '@vueuse/core';
|
|
3
3
|
import O from '@onereach/styles/screens.json';
|
|
4
|
-
import
|
|
4
|
+
import Y$1 from '@onereach/styles/tailwind.config.json';
|
|
5
5
|
import { OrErrorV3 as script$1 } from './or-error-v3/index.js';
|
|
6
6
|
import { OrHintV3 as script$2 } from './or-hint-v3/index.js';
|
|
7
7
|
import { OrIconButtonV3 as script$3 } from './or-icon-button-v3/index.js';
|
|
@@ -33,19 +33,14 @@ function l$1(e) {
|
|
|
33
33
|
return n;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
// @ts-ignore
|
|
38
|
-
const isVue3 = true;
|
|
39
|
-
const isVue2 = !isVue3;
|
|
40
|
-
|
|
41
|
-
const k$1 = () => {
|
|
36
|
+
const Z$1 = () => {
|
|
42
37
|
const e = useAttrs();
|
|
43
38
|
return {
|
|
44
39
|
readonly: computed(() => e.readonly),
|
|
45
40
|
disabled: computed(() => e.disabled),
|
|
46
41
|
"force-state": computed(() => e["force-state"])
|
|
47
42
|
};
|
|
48
|
-
},
|
|
43
|
+
}, L$1 = Symbol(), U$1 = Symbol(), V$1 = Symbol(), _$1 = (e) => computed(() => e.value ?? inject(L$1, r.Short)), k$1 = (e, t) => computed(() => typeof e.value != "function" ? new Intl.DateTimeFormat(t.value, {
|
|
49
44
|
dateStyle: e.value,
|
|
50
45
|
timeZone: "UTC"
|
|
51
46
|
}).formatToParts(Date.UTC(1, 0, 1, 1, 1)).reduce((r, n) => {
|
|
@@ -68,55 +63,55 @@ const k$1 = () => {
|
|
|
68
63
|
default:
|
|
69
64
|
return r + n.value;
|
|
70
65
|
}
|
|
71
|
-
}, "") : e.value(void 0, t.value)),
|
|
66
|
+
}, "") : e.value(void 0, t.value)), G$1 = (e, t) => {
|
|
72
67
|
const s = isRef(e) ? e : ref(e), r = isRef(t) ? t : ref();
|
|
73
|
-
function n(
|
|
74
|
-
|
|
68
|
+
function n(i) {
|
|
69
|
+
i.style.zIndex = String(Math.max(0, ...l$1(i)) + 1);
|
|
75
70
|
}
|
|
76
|
-
watch([s, r], ([
|
|
77
|
-
|
|
71
|
+
watch([s, r], ([i]) => {
|
|
72
|
+
i && n(i);
|
|
78
73
|
}, { immediate: !0 });
|
|
79
|
-
},
|
|
74
|
+
}, J$1 = () => {
|
|
80
75
|
const e = useAttrs(), t = getCurrentInstance();
|
|
81
76
|
return computed(() => e.id ?? (t == null ? void 0 : t.uid.toString()));
|
|
82
|
-
},
|
|
83
|
-
const { hide: s = !0, threshold: r = 0 } = t, n = isRef(e) ? e : ref(e),
|
|
84
|
-
function
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
const d = [...
|
|
88
|
-
const
|
|
89
|
-
return D + I > w + A + r ? (s &&
|
|
77
|
+
}, K$1 = (e) => computed(() => e.value ?? inject(U$1, navigator.language)), N$1 = (e, t = {}) => {
|
|
78
|
+
const { hide: s = !0, threshold: r = 0 } = t, n = isRef(e) ? e : ref(e), i = ref([]), l = ref([]);
|
|
79
|
+
function a() {
|
|
80
|
+
const o = n.value;
|
|
81
|
+
if (o) {
|
|
82
|
+
const d = [...o.children].reduce(({ innerItems: m, outerItems: y }, T) => {
|
|
83
|
+
const v = T, { x: D, width: I } = v.getBoundingClientRect(), { x: w, width: A } = o.getBoundingClientRect();
|
|
84
|
+
return D + I > w + A + r ? (s && v.style.setProperty("visibility", "hidden"), {
|
|
90
85
|
innerItems: m,
|
|
91
|
-
outerItems: [...y,
|
|
92
|
-
}) : (s &&
|
|
93
|
-
innerItems: [...m,
|
|
86
|
+
outerItems: [...y, v]
|
|
87
|
+
}) : (s && v.style.removeProperty("visibility"), {
|
|
88
|
+
innerItems: [...m, v],
|
|
94
89
|
outerItems: y
|
|
95
90
|
});
|
|
96
91
|
}, {
|
|
97
92
|
innerItems: [],
|
|
98
93
|
outerItems: []
|
|
99
94
|
});
|
|
100
|
-
|
|
95
|
+
i.value = d.innerItems, l.value = d.outerItems;
|
|
101
96
|
} else
|
|
102
|
-
|
|
97
|
+
i.value = [], l.value = [];
|
|
103
98
|
}
|
|
104
|
-
return watch(n,
|
|
99
|
+
return watch(n, a, {
|
|
105
100
|
immediate: !0
|
|
106
|
-
}), useMutationObserver(n,
|
|
101
|
+
}), useMutationObserver(n, a, {
|
|
107
102
|
childList: !0
|
|
108
|
-
}), useResizeObserver(n, () => t$1(
|
|
109
|
-
innerItems:
|
|
103
|
+
}), useResizeObserver(n, () => t$1(a)), {
|
|
104
|
+
innerItems: i,
|
|
110
105
|
outerItems: l
|
|
111
106
|
};
|
|
112
|
-
},
|
|
107
|
+
}, X$1 = (e, t, s = {}) => {
|
|
113
108
|
const r = ref(e.value ? "open" : "closed");
|
|
114
|
-
watch(e, (
|
|
115
|
-
r.value =
|
|
109
|
+
watch(e, (o) => {
|
|
110
|
+
r.value = o ? "open" : "closed";
|
|
116
111
|
});
|
|
117
112
|
const n = refDebounced(r, s.debounce ?? 0);
|
|
118
|
-
watch(n, (
|
|
119
|
-
switch (t("update:state",
|
|
113
|
+
watch(n, (o) => {
|
|
114
|
+
switch (t("update:state", o), o) {
|
|
120
115
|
case "open":
|
|
121
116
|
t("open");
|
|
122
117
|
break;
|
|
@@ -125,23 +120,23 @@ const k$1 = () => {
|
|
|
125
120
|
break;
|
|
126
121
|
}
|
|
127
122
|
});
|
|
128
|
-
function
|
|
123
|
+
function i() {
|
|
129
124
|
r.value = "open";
|
|
130
125
|
}
|
|
131
126
|
function l() {
|
|
132
127
|
r.value = "closed";
|
|
133
128
|
}
|
|
134
|
-
function
|
|
129
|
+
function a() {
|
|
135
130
|
r.value = r.value === "open" ? "closed" : "open";
|
|
136
131
|
}
|
|
137
132
|
return {
|
|
138
133
|
state: n,
|
|
139
|
-
open:
|
|
134
|
+
open: i,
|
|
140
135
|
close: l,
|
|
141
|
-
toggle:
|
|
136
|
+
toggle: a
|
|
142
137
|
};
|
|
143
138
|
};
|
|
144
|
-
function
|
|
139
|
+
function ee(e, t, s = {}) {
|
|
145
140
|
const { defaultValue: r } = s;
|
|
146
141
|
return r ? computed({
|
|
147
142
|
get: () => e.value ?? r.value,
|
|
@@ -155,30 +150,30 @@ function re(e, t, s = {}) {
|
|
|
155
150
|
}
|
|
156
151
|
});
|
|
157
152
|
}
|
|
158
|
-
function
|
|
153
|
+
function te(e) {
|
|
159
154
|
const t = getCurrentInstance(), s = ref();
|
|
160
|
-
e ? watch(e, (
|
|
161
|
-
s.value =
|
|
155
|
+
e ? watch(e, (a) => {
|
|
156
|
+
s.value = a;
|
|
162
157
|
}) : onMounted(() => {
|
|
163
158
|
if (t) {
|
|
164
|
-
const
|
|
159
|
+
const a = t.vnode, o = a.el || a.elm;
|
|
165
160
|
o instanceof Element && (s.value = o);
|
|
166
161
|
}
|
|
167
162
|
});
|
|
168
|
-
const r = computed(() => l(s.value) ||
|
|
169
|
-
function l(
|
|
163
|
+
const r = computed(() => l(s.value) || i.value), n = computed(() => !r.value), i = useMediaQuery(`(min-width: ${O.md})`);
|
|
164
|
+
function l(a) {
|
|
170
165
|
var d;
|
|
171
|
-
if (!
|
|
166
|
+
if (!a)
|
|
172
167
|
return !1;
|
|
173
|
-
const
|
|
174
|
-
return
|
|
168
|
+
const o = (d = a.getAttribute("force-screen")) == null ? void 0 : d.split(/\s+/);
|
|
169
|
+
return o != null && o.some((m) => ["md", "lg", "xl"].includes(m)) ? !0 : l(a.parentElement ?? void 0);
|
|
175
170
|
}
|
|
176
171
|
return {
|
|
177
172
|
isDesktop: r,
|
|
178
173
|
isMobile: n
|
|
179
174
|
};
|
|
180
175
|
}
|
|
181
|
-
const
|
|
176
|
+
const re = () => Y$1.theme, ne = (e) => computed(() => e.value ?? inject(V$1, h$1.Auto)), ue = (e, t) => computed(() => typeof e.value != "function" ? new Intl.DateTimeFormat(t.value, {
|
|
182
177
|
timeStyle: "short",
|
|
183
178
|
hourCycle: e.value !== h$1.Auto ? e.value : void 0,
|
|
184
179
|
timeZone: "UTC"
|
|
@@ -194,7 +189,7 @@ const ue = () => L$1.theme, se = (e) => computed(() => e.value ?? inject(q$1, h$
|
|
|
194
189
|
return r + n.value;
|
|
195
190
|
}
|
|
196
191
|
}, "") : e.value(void 0, t.value));
|
|
197
|
-
function
|
|
192
|
+
function se(e = !1) {
|
|
198
193
|
const t = ref(e);
|
|
199
194
|
function s() {
|
|
200
195
|
t.value = !0;
|
|
@@ -212,7 +207,7 @@ function ae(e = !1) {
|
|
|
212
207
|
toggle: n
|
|
213
208
|
};
|
|
214
209
|
}
|
|
215
|
-
const
|
|
210
|
+
const oe = () => {
|
|
216
211
|
const e = useAttrs();
|
|
217
212
|
return {
|
|
218
213
|
required: computed(() => e.required),
|
|
@@ -225,20 +220,22 @@ const ie = () => {
|
|
|
225
220
|
};
|
|
226
221
|
};
|
|
227
222
|
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
["Escape"].includes(e.key) &&
|
|
223
|
+
const o = (d, n) => {
|
|
224
|
+
d.addEventListener("keydown", (e) => {
|
|
225
|
+
["Escape"].includes(e.key) && n.value(e);
|
|
231
226
|
});
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
227
|
+
}, a = {
|
|
228
|
+
created: o,
|
|
229
|
+
bind: o
|
|
230
|
+
}, t = (d, n) => {
|
|
231
|
+
d.addEventListener("keydown", (e) => {
|
|
232
|
+
["Enter", " "].includes(e.key) && n.value(e);
|
|
233
|
+
}), d.addEventListener("click", (e) => {
|
|
234
|
+
e.stopPropagation(), e.preventDefault(), n.value(e);
|
|
239
235
|
});
|
|
240
236
|
}, c$1 = {
|
|
241
|
-
|
|
237
|
+
created: t,
|
|
238
|
+
bind: t
|
|
242
239
|
};
|
|
243
240
|
|
|
244
241
|
const i$1 = (e) => e === void 0;
|
|
@@ -392,7 +389,7 @@ var script = defineComponent({
|
|
|
392
389
|
OrTagInput: script$a
|
|
393
390
|
},
|
|
394
391
|
directives: {
|
|
395
|
-
DropdownClose:
|
|
392
|
+
DropdownClose: a,
|
|
396
393
|
DropdownOpen: c$1
|
|
397
394
|
},
|
|
398
395
|
model: {
|
|
@@ -475,9 +472,9 @@ var script = defineComponent({
|
|
|
475
472
|
expose: ['root', 'popover', 'popoverState', 'reset', 'clear', 'focus', 'blur'],
|
|
476
473
|
setup(props, context) {
|
|
477
474
|
const attributes = reactive({
|
|
478
|
-
id:
|
|
479
|
-
...
|
|
480
|
-
...
|
|
475
|
+
id: J$1(),
|
|
476
|
+
...Z$1(),
|
|
477
|
+
...oe()
|
|
481
478
|
});
|
|
482
479
|
// Refs
|
|
483
480
|
const root = ref();
|
|
@@ -511,7 +508,7 @@ var script = defineComponent({
|
|
|
511
508
|
// Helpers
|
|
512
509
|
const {
|
|
513
510
|
isMobile
|
|
514
|
-
} =
|
|
511
|
+
} = te();
|
|
515
512
|
// Styles
|
|
516
513
|
const rootStyles = computed(() => ['or-autocomplete-v3', ...Autocomplete, ...(props.variant === InputBoxVariant.Embedded ? ['grow'] : [])]);
|
|
517
514
|
const controlStyles = computed(() => [...AutocompleteControl]);
|
|
@@ -524,7 +521,7 @@ var script = defineComponent({
|
|
|
524
521
|
const loaderContainerStyles = computed(() => [...AutocompleteLoaderContainer]);
|
|
525
522
|
const boxOpenStyles = computed(() => [...(popoverState.value === 'open' && !isMobile.value ? popoverFlipped.value ? AutocompleteInputBoxOpenFlipped : AutocompleteInputBoxOpen : [])]);
|
|
526
523
|
// State
|
|
527
|
-
const model =
|
|
524
|
+
const model = ee(toRef(props, 'modelValue'), context.emit);
|
|
528
525
|
const searchText = ref();
|
|
529
526
|
const filteredItems = computedAsync(async () => {
|
|
530
527
|
return searchText.value ? (await props.searchFunction(searchText.value, props.items)).filter(item => {
|
|
@@ -851,4 +848,4 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
851
848
|
script.render = render;
|
|
852
849
|
script.__file = "src/components/or-autocomplete-v3/OrAutocomplete.vue";
|
|
853
850
|
|
|
854
|
-
export { $t as $,
|
|
851
|
+
export { $t as $, b as A, B, l as C, D, j as E, Ft as F, G$1 as G, Ht as H, r as I, J$1 as J, K$1 as K, L$1 as L, Mt as M, N$1 as N, U$1 as O, Pt as P, z as Q, R, w as S, T, U, V, q as W, X$1 as X, k as Y, Z$1 as Z, _$1 as _, X as a, Z as a0, Y as a1, W as a2, K as a3, g as a4, Q as a5, J as a6, Ct as a7, Nt as a8, v as a9, Lt as aA, ht as aB, S as aC, l$1 as aD, dt as aE, P as aF, I as aG, yt as aH, L as aI, i$2 as aJ, E as aK, t$1 as aL, It as aM, se as aN, Dt as aa, Xt as ab, tt as ac, nt as ad, rt as ae, it as af, ot as ag, st as ah, N as ai, et as aj, ct as ak, Et as al, pt as am, _t as an, C as ao, Rt as ap, Tt as aq, ut as ar, At as as, St as at, ft as au, Ot as av, at as aw, gt as ax, V$1 as ay, Bt as az, i$1 as b, c, a as d, ee as e, c$1 as f, u as g, h$1 as h, i, d as j, k$1 as k, h as l, H as m, ne as n, oe as o, p, $ as q, re as r, script as s, te as t, ue as u, F as v, m as w, x, y, G as z };
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, mergeProps, toHandlers, createElementVNode, normalizeClass, renderSlot, Fragment, createVNode, createBlock, createCommentVNode } from 'vue';
|
|
2
|
+
import { OrLoaderV3 as script$1 } from './or-loader-v3/index.js';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
const isVue3 = true;
|
|
7
|
+
const isVue2 = !isVue3;
|
|
8
|
+
|
|
9
|
+
var ButtonVariant;
|
|
10
|
+
(function (ButtonVariant) {
|
|
11
|
+
ButtonVariant["Contained"] = "contained";
|
|
12
|
+
ButtonVariant["Outlined"] = "outlined";
|
|
13
|
+
ButtonVariant["Text"] = "text";
|
|
14
|
+
ButtonVariant["Link"] = "link";
|
|
15
|
+
})(ButtonVariant || (ButtonVariant = {}));
|
|
16
|
+
var ButtonColor;
|
|
17
|
+
(function (ButtonColor) {
|
|
18
|
+
ButtonColor["Primary"] = "primary";
|
|
19
|
+
ButtonColor["Danger"] = "danger";
|
|
20
|
+
ButtonColor["Inherit"] = "inherit";
|
|
21
|
+
})(ButtonColor || (ButtonColor = {}));
|
|
22
|
+
var ButtonType;
|
|
23
|
+
(function (ButtonType) {
|
|
24
|
+
ButtonType["Button"] = "button";
|
|
25
|
+
ButtonType["Submit"] = "submit";
|
|
26
|
+
ButtonType["Reset"] = "reset";
|
|
27
|
+
})(ButtonType || (ButtonType = {}));
|
|
28
|
+
|
|
29
|
+
const Button = [
|
|
30
|
+
// Layout
|
|
31
|
+
'layout-inline-row',
|
|
32
|
+
// Overflow
|
|
33
|
+
'overflow-hidden',
|
|
34
|
+
// Interactivity
|
|
35
|
+
'interactivity-click',
|
|
36
|
+
// Shape
|
|
37
|
+
'rounded-md',
|
|
38
|
+
// Typography
|
|
39
|
+
'typography-button'];
|
|
40
|
+
const ButtonVariants = {
|
|
41
|
+
[ButtonVariant.Contained]: [
|
|
42
|
+
// Layout
|
|
43
|
+
'layout-inline-row justify-center',
|
|
44
|
+
// Box
|
|
45
|
+
'min-w-[96px]',
|
|
46
|
+
// Spacing
|
|
47
|
+
'px-md md:px-md', 'py-sm+ md:py-sm'],
|
|
48
|
+
[ButtonVariant.Outlined]: [
|
|
49
|
+
// Layout
|
|
50
|
+
'layout-inline-row justify-center',
|
|
51
|
+
// Box
|
|
52
|
+
'min-w-[96px]',
|
|
53
|
+
// Spacing
|
|
54
|
+
'px-md* md:px-md*', 'py-sm+* md:py-sm*'],
|
|
55
|
+
[ButtonVariant.Text]: [
|
|
56
|
+
// Layout
|
|
57
|
+
'layout-inline-row justify-center',
|
|
58
|
+
// Box
|
|
59
|
+
'min-w-[96px]',
|
|
60
|
+
// Spacing
|
|
61
|
+
'px-md md:px-md', 'py-sm+ md:py-sm'],
|
|
62
|
+
[ButtonVariant.Link]: [
|
|
63
|
+
// Layout
|
|
64
|
+
'layout-inline-row justify-center']
|
|
65
|
+
};
|
|
66
|
+
const ButtonContainerVariants = {
|
|
67
|
+
[ButtonVariant.Contained]: [
|
|
68
|
+
// Layout
|
|
69
|
+
'layout-inline-row', 'gap-sm+ md:gap-sm'],
|
|
70
|
+
[ButtonVariant.Outlined]: [
|
|
71
|
+
// Layout
|
|
72
|
+
'layout-inline-row', 'gap-sm+ md:gap-sm'],
|
|
73
|
+
[ButtonVariant.Text]: [
|
|
74
|
+
// Layout
|
|
75
|
+
'layout-inline-row', 'gap-sm+ md:gap-sm'],
|
|
76
|
+
[ButtonVariant.Link]: [
|
|
77
|
+
// Layout
|
|
78
|
+
'layout-inline-row',
|
|
79
|
+
// Spacing
|
|
80
|
+
'gap-xs']
|
|
81
|
+
};
|
|
82
|
+
const ButtonColors = {
|
|
83
|
+
'primary-contained': [
|
|
84
|
+
// Theme
|
|
85
|
+
'theme-preset-1-primary', 'dark:theme-preset-1-primary-dark',
|
|
86
|
+
// Elevation (enabled)
|
|
87
|
+
'enabled:shadow-button', 'dark:enabled:shadow-button-dark'],
|
|
88
|
+
'danger-contained': [
|
|
89
|
+
// Theme
|
|
90
|
+
'theme-preset-1-error', 'dark:theme-preset-1-error-dark',
|
|
91
|
+
// Elevation (enabled)
|
|
92
|
+
'enabled:shadow-button', 'dark:enabled:shadow-button-dark'],
|
|
93
|
+
'inherit-contained': [
|
|
94
|
+
// Elevation (enabled)
|
|
95
|
+
'enabled:shadow-button', 'dark:enabled:shadow-button-dark'],
|
|
96
|
+
'primary-outlined': [
|
|
97
|
+
// Theme
|
|
98
|
+
'theme-preset-3-primary', 'dark:theme-preset-3-primary-dark', 'theme-border-outline border-1', 'dark:theme-border-outline-dark',
|
|
99
|
+
// Theme (active)
|
|
100
|
+
'active:theme-border-primary active:border-1', 'dark:active:theme-border-primary-dark'],
|
|
101
|
+
'danger-outlined': [
|
|
102
|
+
// Theme
|
|
103
|
+
'theme-preset-3-error', 'dark:theme-preset-3-error-dark', 'theme-border-error border-1', 'dark:theme-border-error-dark'],
|
|
104
|
+
'inherit-outlined': [],
|
|
105
|
+
'primary-text': [
|
|
106
|
+
// Theme
|
|
107
|
+
'theme-preset-4-primary', 'dark:theme-preset-4-primary-dark'],
|
|
108
|
+
'danger-text': [
|
|
109
|
+
// Theme
|
|
110
|
+
'theme-preset-4-error', 'dark:theme-preset-4-error-dark'],
|
|
111
|
+
'inherit-text': [
|
|
112
|
+
// Theme
|
|
113
|
+
'theme-foreground-inherit', 'dark:theme-foreground-inherit-dark'],
|
|
114
|
+
'primary-link': [
|
|
115
|
+
// Theme
|
|
116
|
+
'theme-preset-4-primary', 'dark:theme-preset-4-primary-dark'],
|
|
117
|
+
'danger-link': [
|
|
118
|
+
// Theme
|
|
119
|
+
'theme-preset-4-error', 'dark:theme-preset-4-error-dark'],
|
|
120
|
+
'inherit-link': [
|
|
121
|
+
// Theme
|
|
122
|
+
'theme-foreground-inherit', 'dark:theme-foreground-inherit-dark',
|
|
123
|
+
// Theme (activated)
|
|
124
|
+
'activated:theme-foreground-default', 'dark:activated:theme-foreground-default-dark']
|
|
125
|
+
};
|
|
126
|
+
const ButtonLoadingColors = {
|
|
127
|
+
'primary-contained': ['interactivity-none', 'bg-primary-hover dark:bg-primary-hover-dark'],
|
|
128
|
+
'danger-contained': ['interactivity-none', 'bg-error-hover dark:bg-error-hover-dark'],
|
|
129
|
+
'inherit-contained': ['interactivity-none'],
|
|
130
|
+
'primary-outlined': ['interactivity-none'],
|
|
131
|
+
'danger-outlined': ['interactivity-none'],
|
|
132
|
+
'inherit-outlined': ['interactivity-none'],
|
|
133
|
+
'primary-text': ['interactivity-none', 'text-primary-hover dark:text-primary-hover-dark'],
|
|
134
|
+
'danger-text': ['interactivity-none', 'text-error-hover dark:text-error-hover-dark'],
|
|
135
|
+
'inherit-text': ['interactivity-none'],
|
|
136
|
+
'primary-link': ['interactivity-none', 'text-primary-hover dark:text-primary-hover-dark'],
|
|
137
|
+
'danger-link': ['interactivity-none', 'text-error-hover dark:text-error-hover-dark'],
|
|
138
|
+
'inherit-link': ['interactivity-none']
|
|
139
|
+
};
|
|
140
|
+
const ButtonContainerVariantsLoading = {
|
|
141
|
+
'contained': [
|
|
142
|
+
// Position
|
|
143
|
+
'relative', 'flex',
|
|
144
|
+
// Box
|
|
145
|
+
'w-full', 'h-full',
|
|
146
|
+
// Aligment
|
|
147
|
+
'items-center', 'justify-center'],
|
|
148
|
+
'outlined': [
|
|
149
|
+
// Position
|
|
150
|
+
'relative', 'flex',
|
|
151
|
+
// Box
|
|
152
|
+
'w-full', 'h-full',
|
|
153
|
+
// Aligment
|
|
154
|
+
'items-center', 'justify-center'],
|
|
155
|
+
'text': [
|
|
156
|
+
// Position
|
|
157
|
+
'relative', 'flex',
|
|
158
|
+
// Box
|
|
159
|
+
'w-full', 'h-full',
|
|
160
|
+
// Aligment
|
|
161
|
+
'items-center', 'justify-center'],
|
|
162
|
+
'link': ['contents']
|
|
163
|
+
};
|
|
164
|
+
const ButtonContentLoading = {
|
|
165
|
+
'contained': ['invisible'],
|
|
166
|
+
'outlined': ['invisible'],
|
|
167
|
+
'text': ['hidden'],
|
|
168
|
+
'link': ['hidden']
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
var script = defineComponent({
|
|
172
|
+
name: 'OrButton',
|
|
173
|
+
components: {
|
|
174
|
+
OrLoader: script$1
|
|
175
|
+
},
|
|
176
|
+
props: {
|
|
177
|
+
type: {
|
|
178
|
+
type: String,
|
|
179
|
+
default: () => ButtonType.Button
|
|
180
|
+
},
|
|
181
|
+
variant: {
|
|
182
|
+
type: String,
|
|
183
|
+
default: () => ButtonVariant.Contained
|
|
184
|
+
},
|
|
185
|
+
color: {
|
|
186
|
+
type: String,
|
|
187
|
+
default: () => ButtonColor.Primary
|
|
188
|
+
},
|
|
189
|
+
activated: {
|
|
190
|
+
type: Boolean,
|
|
191
|
+
default: false
|
|
192
|
+
},
|
|
193
|
+
disabled: {
|
|
194
|
+
type: Boolean,
|
|
195
|
+
default: false
|
|
196
|
+
},
|
|
197
|
+
loading: {
|
|
198
|
+
type: Boolean,
|
|
199
|
+
default: false
|
|
200
|
+
},
|
|
201
|
+
loadingText: {
|
|
202
|
+
type: String,
|
|
203
|
+
default: 'Loading'
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
emits: ['click', 'focus', 'blur'],
|
|
207
|
+
expose: ['root'],
|
|
208
|
+
setup(props) {
|
|
209
|
+
// Refs
|
|
210
|
+
const root = ref();
|
|
211
|
+
// Styles
|
|
212
|
+
const rootStyles = computed(() => ['or-button-v3', ...Button, ...ButtonVariants[props.variant], ...ButtonColors[`${props.color}-${props.variant}`], ...(props.loading ? ButtonLoadingColors[`${props.color}-${props.variant}`] : [])]);
|
|
213
|
+
const contentContainerStyles = computed(() => [...ButtonContainerVariants[props.variant], ...(props.loading ? ButtonContainerVariantsLoading[props.variant] : [])]);
|
|
214
|
+
const contentStyles = computed(() => ['contents', ...(props.loading ? ButtonContentLoading[props.variant] : [])]);
|
|
215
|
+
return {
|
|
216
|
+
root,
|
|
217
|
+
rootStyles,
|
|
218
|
+
contentStyles,
|
|
219
|
+
contentContainerStyles,
|
|
220
|
+
isVue3
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
const _hoisted_1 = ["type", "activated", "disabled", "data-loading"];
|
|
226
|
+
const _hoisted_2 = {
|
|
227
|
+
key: 0,
|
|
228
|
+
class: /*#__PURE__*/normalizeClass(['absolute'])
|
|
229
|
+
};
|
|
230
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
231
|
+
const _component_OrLoader = resolveComponent("OrLoader");
|
|
232
|
+
return openBlock(), createElementBlock("button", mergeProps({
|
|
233
|
+
ref: 'root',
|
|
234
|
+
class: _ctx.rootStyles,
|
|
235
|
+
type: _ctx.type,
|
|
236
|
+
activated: _ctx.activated,
|
|
237
|
+
disabled: _ctx.disabled,
|
|
238
|
+
"data-loading": _ctx.loading
|
|
239
|
+
}, toHandlers({
|
|
240
|
+
...(_ctx.isVue3 ? {} : _ctx.$listeners),
|
|
241
|
+
click: e => _ctx.$emit('click', e),
|
|
242
|
+
focus: e => _ctx.$emit('focus', e),
|
|
243
|
+
blur: e => _ctx.$emit('blur', e)
|
|
244
|
+
}, true)), [createElementVNode("div", {
|
|
245
|
+
class: normalizeClass(_ctx.contentContainerStyles)
|
|
246
|
+
}, [createElementVNode("div", {
|
|
247
|
+
class: normalizeClass(_ctx.contentStyles)
|
|
248
|
+
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */), _ctx.loading ? (openBlock(), createElementBlock(Fragment, {
|
|
249
|
+
key: 0
|
|
250
|
+
}, [_ctx.variant == 'contained' || _ctx.variant == 'outlined' ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_OrLoader, {
|
|
251
|
+
variant: 'circular',
|
|
252
|
+
color: 'inherit',
|
|
253
|
+
size: 's'
|
|
254
|
+
})])) : (openBlock(), createBlock(_component_OrLoader, {
|
|
255
|
+
key: 1,
|
|
256
|
+
variant: "text",
|
|
257
|
+
text: _ctx.loadingText
|
|
258
|
+
}, null, 8 /* PROPS */, ["text"]))], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)], 2 /* CLASS */)], 16 /* FULL_PROPS */, _hoisted_1);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
script.render = render;
|
|
262
|
+
script.__file = "src/components/or-button-v3/OrButton.vue";
|
|
263
|
+
|
|
264
|
+
export { ButtonVariant as B, ButtonColor as a, isVue3 as b, ButtonType as c, isVue2 as i, script as s };
|
package/dist/esm/components/{OrDateTimePickerV3-7b24568c.js → OrDateTimePickerV3-68c0e2c8.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, toRef, openBlock, createElementBlock, normalizeClass, withModifiers, Fragment, createTextVNode, toDisplayString, resolveComponent, createElementVNode, renderList, createBlock, withCtx, createVNode, renderSlot, watch, nextTick, createCommentVNode, resolveDirective, withDirectives, vShow } from 'vue';
|
|
2
|
-
import { h,
|
|
3
|
-
import {
|
|
2
|
+
import { h, e as ee, k, u as ue, d as a, f as c, _, n as ne, K } from './OrAutocompleteV3-ab3c83bc.js';
|
|
3
|
+
import { s as script$9 } from './OrButtonV3-a83254fb.js';
|
|
4
4
|
import { OrLabelV3 as script$a } from './or-label-v3/index.js';
|
|
5
5
|
import { OrIconV3 as script$b } from './or-icon-v3/index.js';
|
|
6
6
|
import { OrIconButtonV3 as script$c } from './or-icon-button-v3/index.js';
|
|
@@ -127,8 +127,8 @@ var script$8 = defineComponent({
|
|
|
127
127
|
const rootStyles = computed(() => ['or-date-time-picker-date-control-v3', ...DateTimePickerDateControl]);
|
|
128
128
|
const placeholderStyles = computed(() => [...DateTimePickerDateControlPlaceholder]);
|
|
129
129
|
// State
|
|
130
|
-
const model =
|
|
131
|
-
const placeholder =
|
|
130
|
+
const model = ee(toRef(props, 'modelValue'), context.emit);
|
|
131
|
+
const placeholder = k(toRef(props, 'format'), toRef(props, 'locale'));
|
|
132
132
|
return {
|
|
133
133
|
root,
|
|
134
134
|
rootStyles,
|
|
@@ -256,7 +256,7 @@ var script$7 = defineComponent({
|
|
|
256
256
|
const buttonGroupCurrentDateItemStyles = computed(() => [...DateTimePickerDateSelectButtonGroupCurrentDateItem]);
|
|
257
257
|
const buttonGroupInRangeDateItemStyles = computed(() => [...DateTimePickerDateSelectButtonGroupInRangeDateItem]);
|
|
258
258
|
// State
|
|
259
|
-
const model =
|
|
259
|
+
const model = ee(toRef(props, 'modelValue'), context.emit);
|
|
260
260
|
const dayOptions = computed(() => {
|
|
261
261
|
const monthStartDate = new Date(Date.UTC(props.initialValue.getUTCFullYear(), props.initialValue.getUTCMonth(), 1, props.initialValue.getUTCHours(), props.initialValue.getUTCMinutes()));
|
|
262
262
|
const monthEndDate = new Date(Date.UTC(props.initialValue.getUTCFullYear(), props.initialValue.getUTCMonth() + 1, 0, props.initialValue.getUTCHours(), props.initialValue.getUTCMinutes()));
|
|
@@ -470,7 +470,7 @@ var script$5 = defineComponent({
|
|
|
470
470
|
return (_a = monthMenu.value) === null || _a === void 0 ? void 0 : _a.state;
|
|
471
471
|
});
|
|
472
472
|
// State
|
|
473
|
-
const model =
|
|
473
|
+
const model = ee(toRef(props, 'modelValue'), context.emit);
|
|
474
474
|
const yearOptions = computed(() => {
|
|
475
475
|
return Array.from({
|
|
476
476
|
length: 11
|
|
@@ -762,8 +762,8 @@ var script$2 = defineComponent({
|
|
|
762
762
|
const rootStyles = computed(() => ['or-date-time-picker-time-control-v3', ...DateTimePickerTimeControl]);
|
|
763
763
|
const placeholderStyles = computed(() => [...DateTimePickerTimeControlPlaceholder]);
|
|
764
764
|
// State
|
|
765
|
-
const model =
|
|
766
|
-
const placeholder =
|
|
765
|
+
const model = ee(toRef(props, 'modelValue'), context.emit);
|
|
766
|
+
const placeholder = ue(toRef(props, 'format'), toRef(props, 'locale'));
|
|
767
767
|
return {
|
|
768
768
|
root,
|
|
769
769
|
rootStyles,
|
|
@@ -882,7 +882,7 @@ var script$1 = defineComponent({
|
|
|
882
882
|
const buttonGroupStyles = computed(() => [...DateTimePickerTimeSelectButtonGroup]);
|
|
883
883
|
const buttonGroupItemStyles = computed(() => [...DateTimePickerTimeSelectButtonGroupItem]);
|
|
884
884
|
// State
|
|
885
|
-
const model =
|
|
885
|
+
const model = ee(toRef(props, 'modelValue'), context.emit);
|
|
886
886
|
const dayPeriod = ref(((_a = model.value) !== null && _a !== void 0 ? _a : props.initialValue).getUTCHours() < 12 ? 'am' : 'pm');
|
|
887
887
|
// Effects
|
|
888
888
|
watch(dayPeriod, value => {
|
|
@@ -1091,7 +1091,7 @@ var script = defineComponent({
|
|
|
1091
1091
|
OrPopover: script$i
|
|
1092
1092
|
},
|
|
1093
1093
|
directives: {
|
|
1094
|
-
DropdownClose:
|
|
1094
|
+
DropdownClose: a,
|
|
1095
1095
|
DropdownOpen: c
|
|
1096
1096
|
},
|
|
1097
1097
|
model: {
|
|
@@ -1205,15 +1205,15 @@ var script = defineComponent({
|
|
|
1205
1205
|
});
|
|
1206
1206
|
const timePopoverStyles = computed(() => ['or-date-time-picker-time-popover-v3', ...DateTimePickerTimePopover]);
|
|
1207
1207
|
// Options
|
|
1208
|
-
const resolvedDateFormat =
|
|
1209
|
-
const resolvedTimeFormat =
|
|
1210
|
-
const resolvedLocale =
|
|
1208
|
+
const resolvedDateFormat = _(toRef(props, 'dateFormat'));
|
|
1209
|
+
const resolvedTimeFormat = ne(toRef(props, 'timeFormat'));
|
|
1210
|
+
const resolvedLocale = K(toRef(props, 'locale'));
|
|
1211
1211
|
// State
|
|
1212
1212
|
const initialValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : getCurrentDate());
|
|
1213
1213
|
watch(() => props.modelValue, value => {
|
|
1214
1214
|
initialValue.value = value !== null && value !== void 0 ? value : getCurrentDate();
|
|
1215
1215
|
});
|
|
1216
|
-
const model =
|
|
1216
|
+
const model = ee(toRef(props, 'modelValue'), context.emit);
|
|
1217
1217
|
const draft = ref(model.value);
|
|
1218
1218
|
watch(model, value => {
|
|
1219
1219
|
draft.value = value;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, Fragment, createVNode, withModifiers, createCommentVNode, createElementVNode, toRef, watch, renderList, createBlock, withCtx, toDisplayString, createTextVNode } from 'vue';
|
|
2
|
-
import { b as i,
|
|
2
|
+
import { b as i, e as ee, g as u, t as te } from './OrAutocompleteV3-ab3c83bc.js';
|
|
3
|
+
import { i as isVue2 } from './OrButtonV3-a83254fb.js';
|
|
3
4
|
import { OrIconButtonV3 as script$2 } from './or-icon-button-v3/index.js';
|
|
4
5
|
import { OrIconV3 as script$3 } from './or-icon-v3/index.js';
|
|
5
6
|
import { OrMenuV3 as script$4 } from './or-menu-v3/index.js';
|
|
@@ -192,7 +193,7 @@ var script = defineComponent({
|
|
|
192
193
|
const contentStyles = computed(() => [...EditorTabsContent]);
|
|
193
194
|
const addButtonStyles = computed(() => [...EditorTabsAddButton]);
|
|
194
195
|
// State
|
|
195
|
-
const proxyModelValue =
|
|
196
|
+
const proxyModelValue = ee(toRef(props, 'modelValue'), context.emit);
|
|
196
197
|
const selectedItem = computed(() => {
|
|
197
198
|
return !u(proxyModelValue.value) ? s(proxyModelValue.value, props.items) : undefined;
|
|
198
199
|
});
|
|
@@ -229,7 +230,7 @@ var script = defineComponent({
|
|
|
229
230
|
const {
|
|
230
231
|
isDesktop,
|
|
231
232
|
isMobile
|
|
232
|
-
} =
|
|
233
|
+
} = te();
|
|
233
234
|
// Effects
|
|
234
235
|
watch(() => props.items, items => {
|
|
235
236
|
if (items.length === 1) {
|