@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.
Files changed (149) hide show
  1. package/dist/esm/components/{OrAutocompleteV3-961163d0.js → OrAutocompleteV3-ab3c83bc.js} +68 -71
  2. package/dist/esm/components/OrButtonV3-a83254fb.js +264 -0
  3. package/dist/esm/components/{OrDateTimePickerV3-7b24568c.js → OrDateTimePickerV3-68c0e2c8.js} +14 -14
  4. package/dist/esm/components/{OrEditorTabsV3-856e42f1.js → OrEditorTabsV3-ae6257e1.js} +4 -3
  5. package/dist/esm/components/{OrInlineInputV3-4e69972f.js → OrInlineInputV3-6593cb76.js} +5 -5
  6. package/dist/esm/components/index.js +5 -5
  7. package/dist/esm/components/or-autocomplete-v3/index.js +4 -4
  8. package/dist/esm/components/or-avatar-v3/index.js +4 -4
  9. package/dist/esm/components/or-bottom-sheet-v3/index.js +6 -6
  10. package/dist/esm/components/or-button-group-v3/index.js +2 -25
  11. package/dist/esm/components/or-button-v3/index.js +3 -283
  12. package/dist/esm/components/or-card-collection-v3/index.js +5 -5
  13. package/dist/esm/components/or-checkbox-group-v3/index.js +6 -6
  14. package/dist/esm/components/or-checkbox-tree-v3/index.js +5 -5
  15. package/dist/esm/components/or-checkbox-v3/index.js +7 -7
  16. package/dist/esm/components/or-code-v3/index.js +8 -8
  17. package/dist/esm/components/or-confirm-v3/index.js +5 -5
  18. package/dist/esm/components/or-context-menu-v3/index.js +6 -6
  19. package/dist/esm/components/or-data-grid-v3/index.js +6 -6
  20. package/dist/esm/components/or-date-format-v3/index.js +7 -7
  21. package/dist/esm/components/or-date-picker-v3/index.js +10 -10
  22. package/dist/esm/components/or-date-range-picker-v3/index.js +11 -11
  23. package/dist/esm/components/or-date-time-format-v3/index.js +8 -8
  24. package/dist/esm/components/or-date-time-picker-v3/index.js +5 -5
  25. package/dist/esm/components/or-drawer-v3/index.js +5 -5
  26. package/dist/esm/components/or-drop-area-v3/index.js +6 -6
  27. package/dist/esm/components/or-editor-tabs-v3/index.js +5 -5
  28. package/dist/esm/components/or-expansion-panel-v3/index.js +5 -5
  29. package/dist/esm/components/or-fab-v3/index.js +2 -24
  30. package/dist/esm/components/or-filter-popover-v3/index.js +7 -7
  31. package/dist/esm/components/or-filter-trigger-v3/index.js +5 -5
  32. package/dist/esm/components/or-filter-v3/index.js +5 -5
  33. package/dist/esm/components/or-icon-button-v3/index.js +4 -4
  34. package/dist/esm/components/or-inline-input-v3/index.js +4 -4
  35. package/dist/esm/components/or-inline-textarea-v3/index.js +7 -7
  36. package/dist/esm/components/or-input-v3/index.js +8 -8
  37. package/dist/esm/components/or-list-v3/index.js +4 -4
  38. package/dist/esm/components/or-menu-item-v3/index.js +4 -4
  39. package/dist/esm/components/or-menu-v3/index.js +5 -5
  40. package/dist/esm/components/or-modal-v3/index.js +6 -6
  41. package/dist/esm/components/or-notification-v3/index.js +5 -5
  42. package/dist/esm/components/or-overlay-v3/index.js +5 -5
  43. package/dist/esm/components/or-pagination-v3/index.js +6 -6
  44. package/dist/esm/components/or-popover-v3/index.js +7 -7
  45. package/dist/esm/components/or-progress-v3/index.js +5 -5
  46. package/dist/esm/components/or-radio-group-v3/index.js +6 -6
  47. package/dist/esm/components/or-radio-v3/index.js +8 -8
  48. package/dist/esm/components/or-range-slider-v3/index.js +5 -5
  49. package/dist/esm/components/or-rating-v3/index.js +6 -6
  50. package/dist/esm/components/or-resizeable-panel-v3/index.js +4 -4
  51. package/dist/esm/components/or-rich-text-editor-v3/index.js +5 -5
  52. package/dist/esm/components/or-rich-tooltip-v3/index.js +5 -5
  53. package/dist/esm/components/or-search-v3/index.js +8 -8
  54. package/dist/esm/components/or-segmented-control-v3/index.js +5 -5
  55. package/dist/esm/components/or-select-v3/index.js +10 -10
  56. package/dist/esm/components/or-sidebar-v3/index.js +5 -5
  57. package/dist/esm/components/or-skeleton-v3/index.js +4 -4
  58. package/dist/esm/components/or-slider-v3/index.js +5 -5
  59. package/dist/esm/components/or-sorting-v3/index.js +5 -5
  60. package/dist/esm/components/or-switch-v3/index.js +6 -6
  61. package/dist/esm/components/or-tabs-v3/index.js +5 -5
  62. package/dist/esm/components/or-tag-input-v3/index.js +8 -8
  63. package/dist/esm/components/or-tag-v3/index.js +6 -6
  64. package/dist/esm/components/or-tags-v3/index.js +5 -5
  65. package/dist/esm/components/or-textarea-v3/index.js +8 -8
  66. package/dist/esm/components/or-time-format-v3/index.js +7 -7
  67. package/dist/esm/components/or-time-picker-v3/index.js +8 -8
  68. package/dist/esm/components/or-time-range-picker-v3/index.js +9 -9
  69. package/dist/esm/components/or-toast-v3/index.js +4 -4
  70. package/dist/esm/components/or-tooltip-v3/index.js +5 -5
  71. package/dist/esm/components/or-tree-v3/index.js +2 -24
  72. package/dist/esm/index.js +5 -5
  73. package/package.json +4 -4
  74. package/dist/esm/components/or-autocomplete-v3/constants.d.ts +0 -2
  75. package/dist/esm/components/or-avatar-v3/constants.d.ts +0 -2
  76. package/dist/esm/components/or-bottom-sheet-v3/constants.d.ts +0 -2
  77. package/dist/esm/components/or-button-group-v3/constants.d.ts +0 -2
  78. package/dist/esm/components/or-card-collection-v3/constants.d.ts +0 -2
  79. package/dist/esm/components/or-card-v3/constants.d.ts +0 -2
  80. package/dist/esm/components/or-checkbox-group-v3/constants.d.ts +0 -2
  81. package/dist/esm/components/or-checkbox-tree-v3/constants.d.ts +0 -2
  82. package/dist/esm/components/or-checkbox-v3/constants.d.ts +0 -2
  83. package/dist/esm/components/or-code-v3/constants.d.ts +0 -2
  84. package/dist/esm/components/or-combined-input-v3/constants.d.ts +0 -2
  85. package/dist/esm/components/or-confirm-v3/constants.d.ts +0 -2
  86. package/dist/esm/components/or-context-menu-v3/constants.d.ts +0 -2
  87. package/dist/esm/components/or-data-grid-v3/constants.d.ts +0 -2
  88. package/dist/esm/components/or-date-format-v3/constants.d.ts +0 -2
  89. package/dist/esm/components/or-date-picker-v3/constants.d.ts +0 -2
  90. package/dist/esm/components/or-date-range-picker-v3/constants.d.ts +0 -2
  91. package/dist/esm/components/or-date-time-format-v3/constants.d.ts +0 -2
  92. package/dist/esm/components/or-date-time-picker-v3/constants.d.ts +0 -2
  93. package/dist/esm/components/or-drawer-v3/constants.d.ts +0 -2
  94. package/dist/esm/components/or-drop-area-v3/constants.d.ts +0 -2
  95. package/dist/esm/components/or-empty-state-v3/constants.d.ts +0 -2
  96. package/dist/esm/components/or-error-v3/constants.d.ts +0 -2
  97. package/dist/esm/components/or-expansion-panel-v3/constants.d.ts +0 -2
  98. package/dist/esm/components/or-filter-popover-v3/constants.d.ts +0 -2
  99. package/dist/esm/components/or-filter-trigger-v3/constants.d.ts +0 -2
  100. package/dist/esm/components/or-filter-v3/constants.d.ts +0 -2
  101. package/dist/esm/components/or-form-group-v3/constants.d.ts +0 -2
  102. package/dist/esm/components/or-hint-v3/constants.d.ts +0 -2
  103. package/dist/esm/components/or-icon-v3/constants.d.ts +0 -2
  104. package/dist/esm/components/or-indicator-v3/constants.d.ts +0 -2
  105. package/dist/esm/components/or-inline-input-box-v3/constants.d.ts +0 -2
  106. package/dist/esm/components/or-inline-input-v3/constants.d.ts +0 -2
  107. package/dist/esm/components/or-inline-textarea-v3/constants.d.ts +0 -2
  108. package/dist/esm/components/or-input-box-v3/constants.d.ts +0 -2
  109. package/dist/esm/components/or-input-v3/constants.d.ts +0 -2
  110. package/dist/esm/components/or-label-v3/constants.d.ts +0 -2
  111. package/dist/esm/components/or-link-v3/constants.d.ts +0 -2
  112. package/dist/esm/components/or-list-v3/constants.d.ts +0 -2
  113. package/dist/esm/components/or-loader-v3/constants.d.ts +0 -2
  114. package/dist/esm/components/or-menu-item-v3/constants.d.ts +0 -2
  115. package/dist/esm/components/or-menu-v3/constants.d.ts +0 -2
  116. package/dist/esm/components/or-modal-v3/constants.d.ts +0 -2
  117. package/dist/esm/components/or-notification-v3/constants.d.ts +0 -2
  118. package/dist/esm/components/or-pagination-v3/constants.d.ts +0 -2
  119. package/dist/esm/components/or-popover-v3/constants.d.ts +0 -2
  120. package/dist/esm/components/or-progress-v3/constants.d.ts +0 -2
  121. package/dist/esm/components/or-radio-group-v3/constants.d.ts +0 -2
  122. package/dist/esm/components/or-radio-v3/constants.d.ts +0 -2
  123. package/dist/esm/components/or-range-slider-v3/constants.d.ts +0 -2
  124. package/dist/esm/components/or-rating-v3/constants.d.ts +0 -2
  125. package/dist/esm/components/or-resizeable-panel-v3/constants.d.ts +0 -2
  126. package/dist/esm/components/or-rich-text-editor-v3/constants.d.ts +0 -2
  127. package/dist/esm/components/or-rich-tooltip-v3/constants.d.ts +0 -2
  128. package/dist/esm/components/or-search-v3/constants.d.ts +0 -2
  129. package/dist/esm/components/or-select-v3/constants.d.ts +0 -2
  130. package/dist/esm/components/or-sidebar-v3/constants.d.ts +0 -2
  131. package/dist/esm/components/or-skeleton-v3/constants.d.ts +0 -2
  132. package/dist/esm/components/or-slider-v3/constants.d.ts +0 -2
  133. package/dist/esm/components/or-sorting-v3/constants.d.ts +0 -2
  134. package/dist/esm/components/or-status-v3/constants.d.ts +0 -2
  135. package/dist/esm/components/or-switch-v3/constants.d.ts +0 -2
  136. package/dist/esm/components/or-tab-v3/constants.d.ts +0 -2
  137. package/dist/esm/components/or-tabs-v3/constants.d.ts +0 -2
  138. package/dist/esm/components/or-tag-input-v3/constants.d.ts +0 -2
  139. package/dist/esm/components/or-tag-v3/constants.d.ts +0 -2
  140. package/dist/esm/components/or-tags-v3/constants.d.ts +0 -2
  141. package/dist/esm/components/or-teleport-v3/constants.d.ts +0 -2
  142. package/dist/esm/components/or-text-v3/constants.d.ts +0 -2
  143. package/dist/esm/components/or-textarea-v3/constants.d.ts +0 -2
  144. package/dist/esm/components/or-time-format-v3/constants.d.ts +0 -2
  145. package/dist/esm/components/or-time-picker-v3/constants.d.ts +0 -2
  146. package/dist/esm/components/or-time-range-picker-v3/constants.d.ts +0 -2
  147. package/dist/esm/components/or-toast-v3/constants.d.ts +0 -2
  148. package/dist/esm/components/or-tooltip-v3/constants.d.ts +0 -2
  149. 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 L$1 from '@onereach/styles/tailwind.config.json';
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
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
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
- }, V$1 = Symbol(), U$1 = Symbol(), q$1 = Symbol(), G$1 = (e) => computed(() => e.value ?? inject(V$1, r.Short)), J$1 = (e, t) => computed(() => typeof e.value != "function" ? new Intl.DateTimeFormat(t.value, {
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)), K$1 = (e, t) => {
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(a) {
74
- a.style.zIndex = String(Math.max(0, ...l$1(a)) + 1);
68
+ function n(i) {
69
+ i.style.zIndex = String(Math.max(0, ...l$1(i)) + 1);
75
70
  }
76
- watch([s, r], ([a]) => {
77
- a && n(a);
71
+ watch([s, r], ([i]) => {
72
+ i && n(i);
78
73
  }, { immediate: !0 });
79
- }, N$1 = () => {
74
+ }, J$1 = () => {
80
75
  const e = useAttrs(), t = getCurrentInstance();
81
76
  return computed(() => e.id ?? (t == null ? void 0 : t.uid.toString()));
82
- }, X$1 = (e) => computed(() => e.value ?? inject(U$1, navigator.language)), ee = (e, t = {}) => {
83
- const { hide: s = !0, threshold: r = 0 } = t, n = isRef(e) ? e : ref(e), a = ref([]), l = ref([]);
84
- function o() {
85
- const i = n.value;
86
- if (i) {
87
- const d = [...i.children].reduce(({ innerItems: m, outerItems: y }, T) => {
88
- const f = T, { x: D, width: I } = f.getBoundingClientRect(), { x: w, width: A } = i.getBoundingClientRect();
89
- return D + I > w + A + r ? (s && f.style.setProperty("visibility", "hidden"), {
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, f]
92
- }) : (s && f.style.removeProperty("visibility"), {
93
- innerItems: [...m, f],
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
- a.value = d.innerItems, l.value = d.outerItems;
95
+ i.value = d.innerItems, l.value = d.outerItems;
101
96
  } else
102
- a.value = [], l.value = [];
97
+ i.value = [], l.value = [];
103
98
  }
104
- return watch(n, o, {
99
+ return watch(n, a, {
105
100
  immediate: !0
106
- }), useMutationObserver(n, o, {
101
+ }), useMutationObserver(n, a, {
107
102
  childList: !0
108
- }), useResizeObserver(n, () => t$1(o)), {
109
- innerItems: a,
103
+ }), useResizeObserver(n, () => t$1(a)), {
104
+ innerItems: i,
110
105
  outerItems: l
111
106
  };
112
- }, te = (e, t, s = {}) => {
107
+ }, X$1 = (e, t, s = {}) => {
113
108
  const r = ref(e.value ? "open" : "closed");
114
- watch(e, (i) => {
115
- r.value = i ? "open" : "closed";
109
+ watch(e, (o) => {
110
+ r.value = o ? "open" : "closed";
116
111
  });
117
112
  const n = refDebounced(r, s.debounce ?? 0);
118
- watch(n, (i) => {
119
- switch (t("update:state", i), i) {
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 a() {
123
+ function i() {
129
124
  r.value = "open";
130
125
  }
131
126
  function l() {
132
127
  r.value = "closed";
133
128
  }
134
- function o() {
129
+ function a() {
135
130
  r.value = r.value === "open" ? "closed" : "open";
136
131
  }
137
132
  return {
138
133
  state: n,
139
- open: a,
134
+ open: i,
140
135
  close: l,
141
- toggle: o
136
+ toggle: a
142
137
  };
143
138
  };
144
- function re(e, t, s = {}) {
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 ne(e) {
153
+ function te(e) {
159
154
  const t = getCurrentInstance(), s = ref();
160
- e ? watch(e, (o) => {
161
- s.value = o;
155
+ e ? watch(e, (a) => {
156
+ s.value = a;
162
157
  }) : onMounted(() => {
163
158
  if (t) {
164
- const o = t.vnode["el" ];
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) || a.value), n = computed(() => !r.value), a = useMediaQuery(`(min-width: ${O.md})`);
169
- function l(o) {
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 (!o)
166
+ if (!a)
172
167
  return !1;
173
- const i = (d = o.getAttribute("force-screen")) == null ? void 0 : d.split(/\s+/);
174
- return i != null && i.some((m) => ["md", "lg", "xl"].includes(m)) ? !0 : l(o.parentElement ?? void 0);
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 ue = () => L$1.theme, se = (e) => computed(() => e.value ?? inject(q$1, h$1.Auto)), oe = (e, t) => computed(() => typeof e.value != "function" ? new Intl.DateTimeFormat(t.value, {
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 ae(e = !1) {
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 ie = () => {
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 t = (a, d) => {
229
- a.addEventListener("keydown", (e) => {
230
- ["Escape"].includes(e.key) && d.value(e);
223
+ const o = (d, n) => {
224
+ d.addEventListener("keydown", (e) => {
225
+ ["Escape"].includes(e.key) && n.value(e);
231
226
  });
232
- }, s = {
233
- ["created" ]: t
234
- }, n = (a, d) => {
235
- a.addEventListener("keydown", (e) => {
236
- ["Enter", " "].includes(e.key) && d.value(e);
237
- }), a.addEventListener("click", (e) => {
238
- e.stopPropagation(), e.preventDefault(), d.value(e);
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
- ["created" ]: n
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: s,
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: N$1(),
479
- ...k$1(),
480
- ...ie()
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
- } = ne();
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 = re(toRef(props, 'modelValue'), context.emit);
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 $, F as A, B, m as C, D, x as E, Ft as F, G$1 as G, Ht as H, G as I, J$1 as J, K$1 as K, b as L, Mt as M, N$1 as N, l as O, Pt as P, j as Q, R, V$1 as S, r as T, U, V, T as W, X, U$1 as Y, z as Z, w as _, isVue3 as a, q as a0, k as a1, Z as a2, Y as a3, W as a4, K as a5, g as a6, Q as a7, J as a8, Ct as a9, q$1 as aA, Bt as aB, Lt as aC, ht as aD, S as aE, l$1 as aF, dt as aG, P as aH, I as aI, yt as aJ, L as aK, i$2 as aL, E as aM, t$1 as aN, It as aO, ae as aP, Nt as aa, v as ab, Dt as ac, Xt as ad, tt as ae, nt as af, rt as ag, it as ah, ot as ai, st as aj, N as ak, et as al, ct as am, Et as an, pt as ao, _t as ap, C as aq, Rt as ar, Tt as as, ut as at, At as au, St as av, ft as aw, Ot as ax, at as ay, gt as az, i$1 as b, c, ie as d, X$1 as e, c$1 as f, se as g, h$1 as h, i, isVue2 as j, k$1 as k, u as l, d as m, ne as n, oe as o, p, ee as q, re as r, s, te as t, ue as u, script as v, h as w, H as x, $ as y, y as z };
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 };
@@ -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, r as re, J, o as oe, s, f as c, G, g as se, e as X } from './OrAutocompleteV3-961163d0.js';
3
- import { OrButtonV3 as script$9 } from './or-button-v3/index.js';
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 = re(toRef(props, 'modelValue'), context.emit);
131
- const placeholder = J(toRef(props, 'format'), toRef(props, 'locale'));
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 = re(toRef(props, 'modelValue'), context.emit);
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 = re(toRef(props, 'modelValue'), context.emit);
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 = re(toRef(props, 'modelValue'), context.emit);
766
- const placeholder = oe(toRef(props, 'format'), toRef(props, 'locale'));
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 = re(toRef(props, 'modelValue'), context.emit);
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: s,
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 = G(toRef(props, 'dateFormat'));
1209
- const resolvedTimeFormat = se(toRef(props, 'timeFormat'));
1210
- const resolvedLocale = X(toRef(props, 'locale'));
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 = re(toRef(props, 'modelValue'), context.emit);
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, j as isVue2, r as re, l as u, n as ne } from './OrAutocompleteV3-961163d0.js';
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 = re(toRef(props, 'modelValue'), context.emit);
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
- } = ne();
233
+ } = te();
233
234
  // Effects
234
235
  watch(() => props.items, items => {
235
236
  if (items.length === 1) {