@onereach/ui-components 17.1.0 → 17.1.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 (59) hide show
  1. package/dist/bundled/v2/components/OrDataGridV3/OrDataGrid.js +1 -1
  2. package/dist/bundled/v2/components/OrDataGridV3/index.js +1 -1
  3. package/dist/bundled/v2/components/OrDropAreaV3/OrDropArea.js +28 -2
  4. package/dist/bundled/v2/components/OrDropAreaV3/OrDropArea.vue.d.ts +10 -0
  5. package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +12 -18
  6. package/dist/bundled/v2/components/index.js +1 -1
  7. package/dist/bundled/v2/index.js +1 -1
  8. package/dist/bundled/v3/components/OrDataGridV3/OrDataGrid.js +1 -1
  9. package/dist/bundled/v3/components/OrDataGridV3/index.js +1 -1
  10. package/dist/bundled/v3/components/OrDataGridV3/styles.js +1 -1
  11. package/dist/bundled/v3/components/{OrDataGridV3-054c0ff2.js → OrDataGridV3-61becb11.js} +1 -1
  12. package/dist/bundled/v3/components/OrDropAreaV3/OrDropArea.js +1 -1
  13. package/dist/bundled/v3/components/OrDropAreaV3/OrDropArea.vue.d.ts +10 -0
  14. package/dist/bundled/v3/components/OrDropAreaV3/index.js +1 -1
  15. package/dist/bundled/v3/components/OrDropAreaV3/props.js +1 -1
  16. package/dist/bundled/v3/components/OrDropAreaV3/styles.js +1 -1
  17. package/dist/bundled/v3/components/OrDropAreaV3/utils/approximateFileSize.js +1 -1
  18. package/dist/bundled/v3/components/OrDropAreaV3/utils/index.js +1 -1
  19. package/dist/bundled/v3/components/{OrDropAreaV3-cf5ef7d5.js → OrDropAreaV3-a9883f18.js} +28 -2
  20. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +1 -1
  21. package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
  22. package/dist/bundled/v3/components/OrSelectV3/styles.js +1 -1
  23. package/dist/bundled/v3/components/{OrSelectV3-bb7f767d.js → OrSelectV3-b7448701.js} +12 -17
  24. package/dist/bundled/v3/components/index.js +3 -3
  25. package/dist/bundled/v3/index.js +3 -3
  26. package/dist/esm/v2/{OrDataGrid-7dc6f16f.js → OrDataGrid-74589615.js} +1 -1
  27. package/dist/esm/v2/{OrDataGridToolbar-c414c8f2.js → OrDataGridToolbar-303a4c3d.js} +1 -1
  28. package/dist/esm/v2/{OrDropArea-7cf24c23.js → OrDropArea-78f52187.js} +28 -2
  29. package/dist/esm/v2/{OrSelect-cf1f8c43.js → OrSelect-5e6734f2.js} +1 -1
  30. package/dist/esm/v2/{OrSelectSingleControl-ba3f3975.js → OrSelectSingleControl-450f2642.js} +12 -18
  31. package/dist/esm/v2/components/index.js +5 -5
  32. package/dist/esm/v2/components/or-data-grid-v3/index.js +4 -4
  33. package/dist/esm/v2/components/or-data-grid-v3/partials/index.js +3 -3
  34. package/dist/esm/v2/components/or-drop-area-v3/OrDropArea.vue.d.ts +10 -0
  35. package/dist/esm/v2/components/or-drop-area-v3/index.js +1 -1
  36. package/dist/esm/v2/components/or-select-v3/index.js +2 -2
  37. package/dist/esm/v2/components/or-select-v3/partials/index.js +1 -1
  38. package/dist/esm/v2/components/or-select-v3/partials/or-select-single-control/OrSelectSingleControl.vue.d.ts +1 -1
  39. package/dist/esm/v2/components/or-select-v3/partials/or-select-single-control/index.js +1 -1
  40. package/dist/esm/v2/index.js +5 -5
  41. package/dist/esm/v3/{OrDataGrid-a91f8a87.js → OrDataGrid-f56e2527.js} +1 -1
  42. package/dist/esm/v3/{OrDataGridToolbar-8bebd1fd.js → OrDataGridToolbar-8fedec74.js} +1 -1
  43. package/dist/esm/v3/{OrDropArea-24fe94e7.js → OrDropArea-8b3fc35c.js} +28 -2
  44. package/dist/esm/v3/{OrSelect-27c013b2.js → OrSelect-1274c0d1.js} +1 -1
  45. package/dist/esm/v3/{OrSelectSingleControl-722043c2.js → OrSelectSingleControl-93cdab5b.js} +13 -18
  46. package/dist/esm/v3/components/index.js +5 -5
  47. package/dist/esm/v3/components/or-data-grid-v3/index.js +4 -4
  48. package/dist/esm/v3/components/or-data-grid-v3/partials/index.js +3 -3
  49. package/dist/esm/v3/components/or-drop-area-v3/OrDropArea.vue.d.ts +10 -0
  50. package/dist/esm/v3/components/or-drop-area-v3/index.js +1 -1
  51. package/dist/esm/v3/components/or-select-v3/index.js +2 -2
  52. package/dist/esm/v3/components/or-select-v3/partials/index.js +1 -1
  53. package/dist/esm/v3/components/or-select-v3/partials/or-select-single-control/OrSelectSingleControl.vue.d.ts +1 -1
  54. package/dist/esm/v3/components/or-select-v3/partials/or-select-single-control/index.js +1 -1
  55. package/dist/esm/v3/index.js +5 -5
  56. package/package.json +3 -3
  57. package/src/components/or-drop-area-v3/OrDropArea.vue +33 -2
  58. package/src/components/or-select-v3/partials/or-select-single-control/OrSelectSingleControl.vue +11 -15
  59. /package/dist/bundled/v2/{OrDataGrid-e08ff27a.js → OrDataGrid-16e613a1.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, toRefs, computed, watch, nextTick } from 'vue-demi';
1
+ import { defineComponent, ref, toRefs, computed, watch } from 'vue-demi';
2
2
  import './TimeFormat-a7f5565b.js';
3
3
  import './dom-53c9635b.js';
4
4
  import { i as isEmpty } from './isString-cf957a95.js';
@@ -65,7 +65,6 @@ var script = defineComponent({
65
65
  const searchControl = ref();
66
66
  const selectionLabelRef = ref();
67
67
  const tooltipRef = ref();
68
- const isContentTruncated = ref(false);
69
68
  // Props
70
69
  const {
71
70
  modelValue,
@@ -84,14 +83,6 @@ var script = defineComponent({
84
83
  var _a;
85
84
  return (_a = selection.value) === null || _a === void 0 ? void 0 : _a.label;
86
85
  });
87
- /* NOTE: using watch here due to async action.
88
- Computed don't work since we need not just to track the data but to analyze UI after the re-render */
89
- watch(model, async () => {
90
- await nextTick();
91
- if (selectionLabelRef.value) {
92
- isContentTruncated.value = selectionLabelRef.value.scrollWidth > selectionLabelRef.value.clientWidth;
93
- }
94
- });
95
86
  watch(() => props.isOpen, () => {
96
87
  var _a;
97
88
  (_a = tooltipRef.value) === null || _a === void 0 ? void 0 : _a.close();
@@ -114,6 +105,11 @@ var script = defineComponent({
114
105
  searchControl.value.focus();
115
106
  }
116
107
  }
108
+ function checkTooltip() {
109
+ if (!selectionLabelRef.value) return; // to prevent fro TS error; normally ref will always be available here since the method is a mouse event callback
110
+ const isContentTruncated = selectionLabelRef.value.scrollWidth > selectionLabelRef.value.clientWidth;
111
+ if (isContentTruncated) openTooltip();
112
+ }
117
113
  return {
118
114
  root,
119
115
  rootStyles,
@@ -124,11 +120,11 @@ var script = defineComponent({
124
120
  selectionLabel,
125
121
  focus,
126
122
  focused,
127
- isContentTruncated,
128
123
  selectionLabelRef,
129
124
  tooltipRef,
130
125
  openTooltip,
131
- closeTooltip
126
+ closeTooltip,
127
+ checkTooltip
132
128
  };
133
129
  }
134
130
  });
@@ -166,18 +162,16 @@ var __vue_render__ = function () {
166
162
  ref: "selectionLabelRef",
167
163
  staticClass: "truncate w-full",
168
164
  on: {
169
- "mouseenter": _vm.openTooltip,
170
- "mouseleave": function ($event) {
171
- _vm.tooltipRef && _vm.tooltipRef.close();
172
- }
165
+ "mouseenter": _vm.checkTooltip,
166
+ "mouseleave": _vm.closeTooltip
173
167
  }
174
- }, [_vm._v("\n " + _vm._s(_vm.selectionLabel) + "\n ")]), _vm._v(" "), _vm.isContentTruncated ? _c('OrTooltip', {
168
+ }, [_vm._v("\n " + _vm._s(_vm.selectionLabel) + "\n ")]), _vm._v(" "), _c('OrTooltip', {
175
169
  ref: "tooltipRef",
176
170
  attrs: {
177
171
  "content": _vm.selectionLabel,
178
172
  "trigger": _vm.selectionLabelRef
179
173
  }
180
- }) : _vm._e()], 1)]]], 2);
174
+ })], 1)]]], 2);
181
175
  };
182
176
  var __vue_staticRenderFns__ = [];
183
177
 
@@ -34,8 +34,8 @@ export { _ as OrCombinedInputV3 } from '../OrCombinedInput-da2fc9f0.js';
34
34
  export { _ as OrConfirm } from '../OrConfirm-8f6d47e1.js';
35
35
  export { C as ConfirmType, _ as OrConfirmV3 } from '../OrConfirm-e5d286c5.js';
36
36
  export { _ as OrContextMenuV3 } from '../OrContextMenu-a6fee3eb.js';
37
- export { _ as OrDataGridV3 } from '../OrDataGrid-7dc6f16f.js';
38
- export { D as DataGridVariant } from '../OrDataGridToolbar-c414c8f2.js';
37
+ export { _ as OrDataGridV3 } from '../OrDataGrid-74589615.js';
38
+ export { D as DataGridVariant } from '../OrDataGridToolbar-303a4c3d.js';
39
39
  export { _ as OrDateFormatV3 } from '../OrDateFormat-d5b6fe55.js';
40
40
  export { _ as OrDatePickerV3 } from '../OrDatePicker-c923babb.js';
41
41
  export { _ as OrDateRangePickerV3 } from '../OrDateRangePicker-bc3c6062.js';
@@ -47,7 +47,7 @@ export { f as formatDate, a as formatTime } from '../formatTime-3f37a00f.js';
47
47
  export { f as formatMobileDate, a as formatMobileTime, g as getCurrentDate } from '../getCurrentDate-e5a478c3.js';
48
48
  export { g as getNextMonthDate } from '../getNextMonthDate-8ec29631.js';
49
49
  export { D as DrawerPlacement, _ as OrDrawerV3 } from '../OrDrawer-ac6cdc09.js';
50
- export { D as DropAreaSize, _ as OrDropAreaV3 } from '../OrDropArea-7cf24c23.js';
50
+ export { D as DropAreaSize, _ as OrDropAreaV3 } from '../OrDropArea-78f52187.js';
51
51
  export { a as approximateFileSize } from '../approximateFileSize-a48b356b.js';
52
52
  export { E as EditorTabsOverflow, _ as OrEditorTabsV3 } from '../OrEditorTabs-17d79ae1.js';
53
53
  export { E as EmptyStateSize, _ as OrEmptyStateV3 } from '../OrEmptyState-186f7abc.js';
@@ -112,7 +112,7 @@ export { _ as OrSearch } from '../OrSearch-9c4cd6ca.js';
112
112
  export { _ as OrSearchV3 } from '../OrSearch-3731baa5.js';
113
113
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-047e2414.js';
114
114
  export { _ as OrSelect } from '../OrSelect-1df35160.js';
115
- export { _ as OrSelectV3 } from '../OrSelect-cf1f8c43.js';
115
+ export { _ as OrSelectV3 } from '../OrSelect-5e6734f2.js';
116
116
  export { _ as OrSidebar, O as OrSidebarSide } from '../OrSidebar-054b26c6.js';
117
117
  export { _ as OrSidebarV3, S as SidebarPlacement } from '../props-dc3db737.js';
118
118
  export { _ as OrSkeletonCircle } from '../OrSkeletonCircle-c4bf0e34.js';
@@ -243,7 +243,7 @@ import '../OrSelectMultipleControl-aa5891fd.js';
243
243
  import '../isEqual-15f4b2f5.js';
244
244
  import '../OrSelectControlInput-31d24ab9.js';
245
245
  import '../OrSelectPlaceholder-a6caa9e0.js';
246
- import '../OrSelectSingleControl-ba3f3975.js';
246
+ import '../OrSelectSingleControl-450f2642.js';
247
247
  import 'lodash/range';
248
248
  import '../useOverflow-5a08887e.js';
249
249
  import 'portal-vue/dist/portal-vue.esm.js';
@@ -1,5 +1,5 @@
1
- export { _ as OrDataGridV3 } from '../../OrDataGrid-7dc6f16f.js';
2
- export { D as DataGridVariant } from '../../OrDataGridToolbar-c414c8f2.js';
1
+ export { _ as OrDataGridV3 } from '../../OrDataGrid-74589615.js';
2
+ export { D as DataGridVariant } from '../../OrDataGridToolbar-303a4c3d.js';
3
3
  import 'vue-demi';
4
4
  import '../../OrCheckbox-f2dc364e.js';
5
5
  import '../../useIdAttribute-3a339b79.js';
@@ -63,7 +63,7 @@ import '../../formatTime-3f37a00f.js';
63
63
  import '../../getCurrentDate-e5a478c3.js';
64
64
  import '../../OrDateTimePicker-4fba136b.js';
65
65
  import '../../OrRating-7c968949.js';
66
- import '../../OrSelect-cf1f8c43.js';
66
+ import '../../OrSelect-5e6734f2.js';
67
67
  import '../../isString-cf957a95.js';
68
68
  import '../../isNull-7ae26d1d.js';
69
69
  import '../../isObject-4d5300e9.js';
@@ -77,7 +77,7 @@ import '../../OrSelectMultipleControl-aa5891fd.js';
77
77
  import '../../isEqual-15f4b2f5.js';
78
78
  import '../../OrSelectControlInput-31d24ab9.js';
79
79
  import '../../OrSelectPlaceholder-a6caa9e0.js';
80
- import '../../OrSelectSingleControl-ba3f3975.js';
80
+ import '../../OrSelectSingleControl-450f2642.js';
81
81
  import '../../OrSwitch-783547da.js';
82
82
  import '../../OrTagInput-2dd90e11.js';
83
83
  import '../../OrTimePicker-db4774fb.js';
@@ -1,4 +1,4 @@
1
- export { _ as OrDataGridFooter, a as OrDataGridHeader, b as OrDataGridTable, c as OrDataGridTableContent, d as OrDataGridTableContentCell, e as OrDataGridTableContentRow, f as OrDataGridTableFooter, g as OrDataGridTableFooterCell, h as OrDataGridTableFooterRow, i as OrDataGridTableHeader, j as OrDataGridTableHeaderCell, k as OrDataGridTableHeaderRow, l as OrDataGridTablePlaceholder, m as OrDataGridToolbar } from '../../../OrDataGridToolbar-c414c8f2.js';
1
+ export { _ as OrDataGridFooter, a as OrDataGridHeader, b as OrDataGridTable, c as OrDataGridTableContent, d as OrDataGridTableContentCell, e as OrDataGridTableContentRow, f as OrDataGridTableFooter, g as OrDataGridTableFooterCell, h as OrDataGridTableFooterRow, i as OrDataGridTableHeader, j as OrDataGridTableHeaderCell, k as OrDataGridTableHeaderRow, l as OrDataGridTablePlaceholder, m as OrDataGridToolbar } from '../../../OrDataGridToolbar-303a4c3d.js';
2
2
  import 'vue-demi';
3
3
  import '../../../normalize-component-6e8e3d80.js';
4
4
  import '../../../TimeFormat-a7f5565b.js';
@@ -54,7 +54,7 @@ import '../../../OrDateTimePicker-4fba136b.js';
54
54
  import '../../../OrInput-52c9e48e.js';
55
55
  import '../../../useValidationAttributes-257954f3.js';
56
56
  import '../../../OrRating-7c968949.js';
57
- import '../../../OrSelect-cf1f8c43.js';
57
+ import '../../../OrSelect-5e6734f2.js';
58
58
  import '../../../isString-cf957a95.js';
59
59
  import '../../../isNull-7ae26d1d.js';
60
60
  import '../../../isObject-4d5300e9.js';
@@ -68,7 +68,7 @@ import '../../../OrSelectMultipleControl-aa5891fd.js';
68
68
  import '../../../isEqual-15f4b2f5.js';
69
69
  import '../../../OrSelectControlInput-31d24ab9.js';
70
70
  import '../../../OrSelectPlaceholder-a6caa9e0.js';
71
- import '../../../OrSelectSingleControl-ba3f3975.js';
71
+ import '../../../OrSelectSingleControl-450f2642.js';
72
72
  import '../../../OrSwitch-783547da.js';
73
73
  import '../../../OrTagInput-2dd90e11.js';
74
74
  import '../../../OrTimePicker-db4774fb.js';
@@ -26,6 +26,10 @@ declare const _default: import("vue-demi").DefineComponent<{
26
26
  type: BooleanConstructor;
27
27
  default: boolean;
28
28
  };
29
+ error: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
29
33
  }, {
30
34
  root: import("vue-demi").Ref<HTMLElement | undefined>;
31
35
  rootStyles: import("vue-demi").ComputedRef<string[]>;
@@ -35,6 +39,7 @@ declare const _default: import("vue-demi").DefineComponent<{
35
39
  textEmphasisStyles: import("vue-demi").ComputedRef<string[]>;
36
40
  constraintsStyles: import("vue-demi").ComputedRef<string[]>;
37
41
  proxyModelValue: import("../../hooks").UseProxyModelValueReturn<File[]>;
42
+ accept: import("vue-demi").ComputedRef<string>;
38
43
  invalid: import("vue-demi").ComputedRef<boolean>;
39
44
  onChange: (event: Event) => void;
40
45
  isDesktop: import("vue-demi").ComputedRef<boolean>;
@@ -65,6 +70,10 @@ declare const _default: import("vue-demi").DefineComponent<{
65
70
  type: BooleanConstructor;
66
71
  default: boolean;
67
72
  };
73
+ error: {
74
+ type: BooleanConstructor;
75
+ default: boolean;
76
+ };
68
77
  }>> & {
69
78
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
70
79
  }, {
@@ -74,5 +83,6 @@ declare const _default: import("vue-demi").DefineComponent<{
74
83
  maxFileSize: number;
75
84
  size: "m" | "s";
76
85
  disabled: boolean;
86
+ error: boolean;
77
87
  }>;
78
88
  export default _default;
@@ -1,4 +1,4 @@
1
- export { D as DropAreaSize, _ as OrDropAreaV3 } from '../../OrDropArea-7cf24c23.js';
1
+ export { D as DropAreaSize, _ as OrDropAreaV3 } from '../../OrDropArea-78f52187.js';
2
2
  export { a as approximateFileSize } from '../../approximateFileSize-a48b356b.js';
3
3
  import 'vue-demi';
4
4
  import '../../TimeFormat-a7f5565b.js';
@@ -1,4 +1,4 @@
1
- export { _ as OrSelectV3 } from '../../OrSelect-cf1f8c43.js';
1
+ export { _ as OrSelectV3 } from '../../OrSelect-5e6734f2.js';
2
2
  import 'vue-demi';
3
3
  import '../../dropdown-open-06d651cf.js';
4
4
  import '../../include-2a81e823.js';
@@ -56,4 +56,4 @@ import '../../OrSelectMultipleControl-aa5891fd.js';
56
56
  import '../../isEqual-15f4b2f5.js';
57
57
  import '../../OrSelectControlInput-31d24ab9.js';
58
58
  import '../../OrSelectPlaceholder-a6caa9e0.js';
59
- import '../../OrSelectSingleControl-ba3f3975.js';
59
+ import '../../OrSelectSingleControl-450f2642.js';
@@ -1,5 +1,5 @@
1
1
  export { _ as OrSelectMultipleControl } from '../../../OrSelectMultipleControl-aa5891fd.js';
2
- export { _ as OrSelectSingleControl } from '../../../OrSelectSingleControl-ba3f3975.js';
2
+ export { _ as OrSelectSingleControl } from '../../../OrSelectSingleControl-450f2642.js';
3
3
  export { _ as OrSelectPlaceholder } from '../../../OrSelectPlaceholder-a6caa9e0.js';
4
4
  import 'vue-demi';
5
5
  import '../../../TimeFormat-a7f5565b.js';
@@ -39,11 +39,11 @@ declare const _default: import("vue-demi").DefineComponent<{
39
39
  selectionLabel: import("vue-demi").ComputedRef<string | undefined>;
40
40
  focus: () => void;
41
41
  focused: import("vue-demi").ComputedRef<any>;
42
- isContentTruncated: import("vue-demi").Ref<boolean>;
43
42
  selectionLabelRef: import("vue-demi").Ref<HTMLDialogElement | undefined>;
44
43
  tooltipRef: import("vue-demi").Ref<any>;
45
44
  openTooltip: () => void;
46
45
  closeTooltip: () => void;
46
+ checkTooltip: () => void;
47
47
  }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
48
48
  modelValue: {
49
49
  type: StringConstructor;
@@ -1,4 +1,4 @@
1
- export { _ as OrSelectSingleControl } from '../../../../OrSelectSingleControl-ba3f3975.js';
1
+ export { _ as OrSelectSingleControl } from '../../../../OrSelectSingleControl-450f2642.js';
2
2
  import 'vue-demi';
3
3
  import '../../../../TimeFormat-a7f5565b.js';
4
4
  import '../../../../dom-53c9635b.js';
@@ -34,8 +34,8 @@ export { _ as OrCombinedInputV3 } from './OrCombinedInput-da2fc9f0.js';
34
34
  export { _ as OrConfirm } from './OrConfirm-8f6d47e1.js';
35
35
  export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-e5d286c5.js';
36
36
  export { _ as OrContextMenuV3 } from './OrContextMenu-a6fee3eb.js';
37
- export { _ as OrDataGridV3 } from './OrDataGrid-7dc6f16f.js';
38
- export { D as DataGridVariant } from './OrDataGridToolbar-c414c8f2.js';
37
+ export { _ as OrDataGridV3 } from './OrDataGrid-74589615.js';
38
+ export { D as DataGridVariant } from './OrDataGridToolbar-303a4c3d.js';
39
39
  export { _ as OrDateFormatV3 } from './OrDateFormat-d5b6fe55.js';
40
40
  export { _ as OrDatePickerV3 } from './OrDatePicker-c923babb.js';
41
41
  export { _ as OrDateRangePickerV3 } from './OrDateRangePicker-bc3c6062.js';
@@ -47,7 +47,7 @@ export { f as formatDate, a as formatTime } from './formatTime-3f37a00f.js';
47
47
  export { f as formatMobileDate, a as formatMobileTime, g as getCurrentDate } from './getCurrentDate-e5a478c3.js';
48
48
  export { g as getNextMonthDate } from './getNextMonthDate-8ec29631.js';
49
49
  export { D as DrawerPlacement, _ as OrDrawerV3 } from './OrDrawer-ac6cdc09.js';
50
- export { D as DropAreaSize, _ as OrDropAreaV3 } from './OrDropArea-7cf24c23.js';
50
+ export { D as DropAreaSize, _ as OrDropAreaV3 } from './OrDropArea-78f52187.js';
51
51
  export { a as approximateFileSize } from './approximateFileSize-a48b356b.js';
52
52
  export { E as EditorTabsOverflow, _ as OrEditorTabsV3 } from './OrEditorTabs-17d79ae1.js';
53
53
  export { E as EmptyStateSize, _ as OrEmptyStateV3 } from './OrEmptyState-186f7abc.js';
@@ -112,7 +112,7 @@ export { _ as OrSearch } from './OrSearch-9c4cd6ca.js';
112
112
  export { _ as OrSearchV3 } from './OrSearch-3731baa5.js';
113
113
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-047e2414.js';
114
114
  export { _ as OrSelect } from './OrSelect-1df35160.js';
115
- export { _ as OrSelectV3 } from './OrSelect-cf1f8c43.js';
115
+ export { _ as OrSelectV3 } from './OrSelect-5e6734f2.js';
116
116
  export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-054b26c6.js';
117
117
  export { _ as OrSidebarV3, S as SidebarPlacement } from './props-dc3db737.js';
118
118
  export { _ as OrSkeletonCircle } from './OrSkeletonCircle-c4bf0e34.js';
@@ -245,7 +245,7 @@ import 'lodash/keyBy';
245
245
  import './OrSelectMultipleControl-aa5891fd.js';
246
246
  import './OrSelectControlInput-31d24ab9.js';
247
247
  import './OrSelectPlaceholder-a6caa9e0.js';
248
- import './OrSelectSingleControl-ba3f3975.js';
248
+ import './OrSelectSingleControl-450f2642.js';
249
249
  import 'lodash/range';
250
250
  import 'portal-vue/dist/portal-vue.esm.js';
251
251
  import 'portal-vue';
@@ -5,7 +5,7 @@ import { s as script$h } from './OrSearch-7d90b23b.js';
5
5
  import './OrSkeletonCircle-a3eb5f53.js';
6
6
  import './OrSkeletonRect-d0b8b2cf.js';
7
7
  import { s as script$i } from './OrSkeletonText-5e9579c1.js';
8
- import { s as script$2, a as script$3, b as script$4, c as script$5, d as script$6, e as script$7, f as script$8, g as script$9, h as script$a, i as script$b, j as script$c, k as script$d, l as script$e, m as script$f, D as DataGridVariant } from './OrDataGridToolbar-8bebd1fd.js';
8
+ import { s as script$2, a as script$3, b as script$4, c as script$5, d as script$6, e as script$7, f as script$8, g as script$9, h as script$a, i as script$b, j as script$c, k as script$d, l as script$e, m as script$f, D as DataGridVariant } from './OrDataGridToolbar-8fedec74.js';
9
9
  import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, createSlots, withCtx, renderSlot, createVNode, createCommentVNode, normalizeStyle, Fragment, renderList, createTextVNode, toDisplayString } from 'vue';
10
10
 
11
11
  const DataGrid = [
@@ -12,7 +12,7 @@ import { s as script$g } from './OrDateTimePicker-ef43a321.js';
12
12
  import './OrDateTimePickerTimeSelect-8ecd5e17.js';
13
13
  import { s as script$h } from './OrInput-684d592e.js';
14
14
  import { s as script$i } from './OrRating-7c2f8e4d.js';
15
- import { s as script$j } from './OrSelect-27c013b2.js';
15
+ import { s as script$j } from './OrSelect-1274c0d1.js';
16
16
  import { s as script$k } from './OrSwitch-0fb0d361.js';
17
17
  import { s as script$l } from './OrTagInput-fb3e1714.js';
18
18
  import { s as script$m } from './OrTimePicker-e042d71a.js';
@@ -119,6 +119,10 @@ var script = defineComponent({
119
119
  disabled: {
120
120
  type: Boolean,
121
121
  default: false
122
+ },
123
+ error: {
124
+ type: Boolean,
125
+ default: false
122
126
  }
123
127
  },
124
128
  emits: ['update:modelValue'],
@@ -135,13 +139,34 @@ var script = defineComponent({
135
139
  const constraintsStyles = computed(() => [...DropAreaConstraints]);
136
140
  // State
137
141
  const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
142
+ const accept = computed(() => {
143
+ if (!props.fileTypes || !Array.isArray(props.fileTypes)) return '';
144
+ return props.fileTypes.join(',');
145
+ });
138
146
  const invalid = computed(() => {
139
- if (props.fileTypes.length > 0 && proxyModelValue.value.some(file => !props.fileTypes.includes(file.type))) {
147
+ /* External error */
148
+ if (props.error) return true;
149
+ /* No validation provided */
150
+ if (!props.fileTypes) return false;
151
+ /* File type match: strict and non-strict MIME-type comparison */
152
+ if (props.fileTypes.length > 0 && proxyModelValue.value.some(file => {
153
+ let match = props.fileTypes.some(fileType => {
154
+ if (fileType.match(/\/\*$/)) {
155
+ const baseType = fileType.replace('/*', '');
156
+ return file.type.indexOf(baseType) !== -1;
157
+ } else {
158
+ return file.type === fileType;
159
+ }
160
+ });
161
+ return !match;
162
+ })) {
140
163
  return true;
141
164
  }
165
+ /* Files count */
142
166
  if (proxyModelValue.value.length > props.maxFiles) {
143
167
  return true;
144
168
  }
169
+ /* File size */
145
170
  if (proxyModelValue.value.some(file => file.size > props.maxFileSize)) {
146
171
  return true;
147
172
  }
@@ -165,6 +190,7 @@ var script = defineComponent({
165
190
  textEmphasisStyles,
166
191
  constraintsStyles,
167
192
  proxyModelValue,
193
+ accept,
168
194
  invalid,
169
195
  onChange,
170
196
  isDesktop,
@@ -192,7 +218,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
192
218
  }, [createElementVNode("input", {
193
219
  class: normalizeClass(_ctx.controlStyles),
194
220
  type: 'file',
195
- accept: _ctx.fileTypes.join(','),
221
+ accept: _ctx.accept,
196
222
  multiple: _ctx.maxFiles > 1,
197
223
  disabled: _ctx.disabled,
198
224
  onChange: _cache[0] || (_cache[0] = $event => _ctx.onChange($event))
@@ -24,7 +24,7 @@ import { s as script$b } from './OrPopover-0daeba14.js';
24
24
  import { T as TagsOverflow } from './OrTags-660ca32e.js';
25
25
  import { s as script$e } from './OrLoader-472e965e.js';
26
26
  import { s as script$c } from './OrSelectMultipleControl-a22cec0a.js';
27
- import { s as script$d } from './OrSelectSingleControl-722043c2.js';
27
+ import { s as script$d } from './OrSelectSingleControl-93cdab5b.js';
28
28
  import './OrSelectPlaceholder-81502228.js';
29
29
  import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives, createElementVNode, withModifiers, createVNode, vShow, Fragment, renderList } from 'vue';
30
30
 
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, toRefs, computed, watch, nextTick } from 'vue-demi';
1
+ import { defineComponent, ref, toRefs, computed, watch } from 'vue-demi';
2
2
  import './TimeFormat-a7f5565b.js';
3
3
  import './dom-53c9635b.js';
4
4
  import { i as isEmpty } from './isString-cf957a95.js';
@@ -10,7 +10,7 @@ import '@onereach/styles/tailwind.config.json';
10
10
  import { s as script$2 } from './OrSelectControlInput-e0116b29.js';
11
11
  import { s as script$1 } from './OrSelectPlaceholder-81502228.js';
12
12
  import { s as script$3 } from './OrTooltip-77d97056.js';
13
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, Fragment, withCtx, createTextVNode, toDisplayString, createElementVNode, createCommentVNode } from 'vue';
13
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, Fragment, withCtx, createTextVNode, toDisplayString, createElementVNode, createVNode } from 'vue';
14
14
 
15
15
  const SelectSingleControlInput = [
16
16
  // Layout
@@ -65,7 +65,6 @@ var script = defineComponent({
65
65
  const searchControl = ref();
66
66
  const selectionLabelRef = ref();
67
67
  const tooltipRef = ref();
68
- const isContentTruncated = ref(false);
69
68
  // Props
70
69
  const {
71
70
  modelValue,
@@ -84,14 +83,6 @@ var script = defineComponent({
84
83
  var _a;
85
84
  return (_a = selection.value) === null || _a === void 0 ? void 0 : _a.label;
86
85
  });
87
- /* NOTE: using watch here due to async action.
88
- Computed don't work since we need not just to track the data but to analyze UI after the re-render */
89
- watch(model, async () => {
90
- await nextTick();
91
- if (selectionLabelRef.value) {
92
- isContentTruncated.value = selectionLabelRef.value.scrollWidth > selectionLabelRef.value.clientWidth;
93
- }
94
- });
95
86
  watch(() => props.isOpen, () => {
96
87
  var _a;
97
88
  (_a = tooltipRef.value) === null || _a === void 0 ? void 0 : _a.close();
@@ -114,6 +105,11 @@ var script = defineComponent({
114
105
  searchControl.value.focus();
115
106
  }
116
107
  }
108
+ function checkTooltip() {
109
+ if (!selectionLabelRef.value) return; // to prevent fro TS error; normally ref will always be available here since the method is a mouse event callback
110
+ const isContentTruncated = selectionLabelRef.value.scrollWidth > selectionLabelRef.value.clientWidth;
111
+ if (isContentTruncated) openTooltip();
112
+ }
117
113
  return {
118
114
  root,
119
115
  rootStyles,
@@ -124,11 +120,11 @@ var script = defineComponent({
124
120
  selectionLabel,
125
121
  focus,
126
122
  focused,
127
- isContentTruncated,
128
123
  selectionLabelRef,
129
124
  tooltipRef,
130
125
  openTooltip,
131
- closeTooltip
126
+ closeTooltip,
127
+ checkTooltip
132
128
  };
133
129
  }
134
130
  });
@@ -161,14 +157,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
161
157
  }, 8 /* PROPS */, ["disabled"])) : (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", {
162
158
  ref: "selectionLabelRef",
163
159
  class: "truncate w-full",
164
- onMouseenter: _cache[1] || (_cache[1] = (...args) => _ctx.openTooltip && _ctx.openTooltip(...args)),
165
- onMouseleave: _cache[2] || (_cache[2] = $event => _ctx.tooltipRef && _ctx.tooltipRef.close())
166
- }, toDisplayString(_ctx.selectionLabel), 545 /* TEXT, NEED_HYDRATION, NEED_PATCH */), _ctx.isContentTruncated ? (openBlock(), createBlock(_component_OrTooltip, {
167
- key: 0,
160
+ onMouseenter: _cache[1] || (_cache[1] = (...args) => _ctx.checkTooltip && _ctx.checkTooltip(...args)),
161
+ onMouseleave: _cache[2] || (_cache[2] = (...args) => _ctx.closeTooltip && _ctx.closeTooltip(...args))
162
+ }, toDisplayString(_ctx.selectionLabel), 545 /* TEXT, NEED_HYDRATION, NEED_PATCH */), createVNode(_component_OrTooltip, {
168
163
  ref: "tooltipRef",
169
164
  content: _ctx.selectionLabel,
170
165
  trigger: _ctx.selectionLabelRef
171
- }, null, 8 /* PROPS */, ["content", "trigger"])) : createCommentVNode("v-if", true)]))], 64 /* STABLE_FRAGMENT */))], 2 /* CLASS */);
166
+ }, null, 8 /* PROPS */, ["content", "trigger"])]))], 64 /* STABLE_FRAGMENT */))], 2 /* CLASS */);
172
167
  }
173
168
 
174
169
  script.render = render;
@@ -32,8 +32,8 @@ export { s as OrCombinedInputV3 } from '../OrCombinedInput-75b556fa.js';
32
32
  export { s as OrConfirm } from '../OrConfirm-05a78778.js';
33
33
  export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm-f47d7230.js';
34
34
  export { s as OrContextMenuV3 } from '../OrContextMenu-d8c71891.js';
35
- export { s as OrDataGridV3 } from '../OrDataGrid-a91f8a87.js';
36
- export { D as DataGridVariant } from '../OrDataGridToolbar-8bebd1fd.js';
35
+ export { s as OrDataGridV3 } from '../OrDataGrid-f56e2527.js';
36
+ export { D as DataGridVariant } from '../OrDataGridToolbar-8fedec74.js';
37
37
  export { s as OrDateFormatV3 } from '../OrDateFormat-5a4af897.js';
38
38
  export { s as OrDatePickerV3 } from '../OrDatePicker-f0457c2a.js';
39
39
  export { s as OrDateRangePickerV3 } from '../OrDateRangePicker-fbf1430a.js';
@@ -45,7 +45,7 @@ export { f as formatDate, a as formatTime } from '../formatTime-3f37a00f.js';
45
45
  export { f as formatMobileDate, a as formatMobileTime, g as getCurrentDate } from '../getCurrentDate-e5a478c3.js';
46
46
  export { g as getNextMonthDate } from '../getNextMonthDate-8ec29631.js';
47
47
  export { D as DrawerPlacement, s as OrDrawerV3 } from '../OrDrawer-f12faf1a.js';
48
- export { D as DropAreaSize, s as OrDropAreaV3 } from '../OrDropArea-24fe94e7.js';
48
+ export { D as DropAreaSize, s as OrDropAreaV3 } from '../OrDropArea-8b3fc35c.js';
49
49
  export { a as approximateFileSize } from '../approximateFileSize-a48b356b.js';
50
50
  export { E as EditorTabsOverflow, s as OrEditorTabsV3 } from '../OrEditorTabs-d5779ee7.js';
51
51
  export { E as EmptyStateSize, s as OrEmptyStateV3 } from '../OrEmptyState-47f9d910.js';
@@ -109,7 +109,7 @@ export { s as OrSearch } from '../OrSearch-4192737e.js';
109
109
  export { s as OrSearchV3 } from '../OrSearch-7d90b23b.js';
110
110
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-5dd163fb.js';
111
111
  export { s as OrSelect } from '../OrSelect-2c033afb.js';
112
- export { s as OrSelectV3 } from '../OrSelect-27c013b2.js';
112
+ export { s as OrSelectV3 } from '../OrSelect-1274c0d1.js';
113
113
  export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar-4ab42b93.js';
114
114
  export { s as OrSidebarV3, S as SidebarPlacement } from '../props-413bed7b.js';
115
115
  export { s as OrSkeletonCircle } from '../OrSkeletonCircle-66e175a0.js';
@@ -231,7 +231,7 @@ import '../OrSelectMultipleControl-a22cec0a.js';
231
231
  import '../isEqual-15f4b2f5.js';
232
232
  import '../OrSelectControlInput-e0116b29.js';
233
233
  import '../OrSelectPlaceholder-81502228.js';
234
- import '../OrSelectSingleControl-722043c2.js';
234
+ import '../OrSelectSingleControl-93cdab5b.js';
235
235
  import 'lodash/range';
236
236
  import '../styles-ed564e39.js';
237
237
  import '../useOverflow-5a08887e.js';
@@ -1,5 +1,5 @@
1
- export { s as OrDataGridV3 } from '../../OrDataGrid-a91f8a87.js';
2
- export { D as DataGridVariant } from '../../OrDataGridToolbar-8bebd1fd.js';
1
+ export { s as OrDataGridV3 } from '../../OrDataGrid-f56e2527.js';
2
+ export { D as DataGridVariant } from '../../OrDataGridToolbar-8fedec74.js';
3
3
  import 'vue-demi';
4
4
  import '../../OrCheckbox-e353ee89.js';
5
5
  import '../../useIdAttribute-3a339b79.js';
@@ -59,7 +59,7 @@ import '../../useTimeMask-a1c090c1.js';
59
59
  import '../../formatTime-3f37a00f.js';
60
60
  import '../../getCurrentDate-e5a478c3.js';
61
61
  import '../../OrRating-7c2f8e4d.js';
62
- import '../../OrSelect-27c013b2.js';
62
+ import '../../OrSelect-1274c0d1.js';
63
63
  import '../../isString-cf957a95.js';
64
64
  import '../../isNull-7ae26d1d.js';
65
65
  import '../../isObject-4d5300e9.js';
@@ -73,7 +73,7 @@ import '../../OrSelectMultipleControl-a22cec0a.js';
73
73
  import '../../isEqual-15f4b2f5.js';
74
74
  import '../../OrSelectControlInput-e0116b29.js';
75
75
  import '../../OrSelectPlaceholder-81502228.js';
76
- import '../../OrSelectSingleControl-722043c2.js';
76
+ import '../../OrSelectSingleControl-93cdab5b.js';
77
77
  import '../../OrSwitch-0fb0d361.js';
78
78
  import '../../OrTagInput-fb3e1714.js';
79
79
  import '../../OrTimePicker-e042d71a.js';
@@ -1,4 +1,4 @@
1
- export { s as OrDataGridFooter, a as OrDataGridHeader, b as OrDataGridTable, c as OrDataGridTableContent, d as OrDataGridTableContentCell, e as OrDataGridTableContentRow, f as OrDataGridTableFooter, g as OrDataGridTableFooterCell, h as OrDataGridTableFooterRow, i as OrDataGridTableHeader, j as OrDataGridTableHeaderCell, k as OrDataGridTableHeaderRow, l as OrDataGridTablePlaceholder, m as OrDataGridToolbar } from '../../../OrDataGridToolbar-8bebd1fd.js';
1
+ export { s as OrDataGridFooter, a as OrDataGridHeader, b as OrDataGridTable, c as OrDataGridTableContent, d as OrDataGridTableContentCell, e as OrDataGridTableContentRow, f as OrDataGridTableFooter, g as OrDataGridTableFooterCell, h as OrDataGridTableFooterRow, i as OrDataGridTableHeader, j as OrDataGridTableHeaderCell, k as OrDataGridTableHeaderRow, l as OrDataGridTablePlaceholder, m as OrDataGridToolbar } from '../../../OrDataGridToolbar-8fedec74.js';
2
2
  import 'vue-demi';
3
3
  import 'vue';
4
4
  import '../../../TimeFormat-a7f5565b.js';
@@ -50,7 +50,7 @@ import '../../../getCurrentDate-e5a478c3.js';
50
50
  import '../../../OrInput-684d592e.js';
51
51
  import '../../../useValidationAttributes-257954f3.js';
52
52
  import '../../../OrRating-7c2f8e4d.js';
53
- import '../../../OrSelect-27c013b2.js';
53
+ import '../../../OrSelect-1274c0d1.js';
54
54
  import '../../../isString-cf957a95.js';
55
55
  import '../../../isNull-7ae26d1d.js';
56
56
  import '../../../isObject-4d5300e9.js';
@@ -64,7 +64,7 @@ import '../../../OrSelectMultipleControl-a22cec0a.js';
64
64
  import '../../../isEqual-15f4b2f5.js';
65
65
  import '../../../OrSelectControlInput-e0116b29.js';
66
66
  import '../../../OrSelectPlaceholder-81502228.js';
67
- import '../../../OrSelectSingleControl-722043c2.js';
67
+ import '../../../OrSelectSingleControl-93cdab5b.js';
68
68
  import '../../../OrSwitch-0fb0d361.js';
69
69
  import '../../../OrTagInput-fb3e1714.js';
70
70
  import '../../../OrTimePicker-e042d71a.js';
@@ -26,6 +26,10 @@ declare const _default: import("vue-demi").DefineComponent<{
26
26
  type: BooleanConstructor;
27
27
  default: boolean;
28
28
  };
29
+ error: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
29
33
  }, {
30
34
  root: import("vue-demi").Ref<HTMLElement | undefined>;
31
35
  rootStyles: import("vue-demi").ComputedRef<string[]>;
@@ -35,6 +39,7 @@ declare const _default: import("vue-demi").DefineComponent<{
35
39
  textEmphasisStyles: import("vue-demi").ComputedRef<string[]>;
36
40
  constraintsStyles: import("vue-demi").ComputedRef<string[]>;
37
41
  proxyModelValue: import("../../hooks").UseProxyModelValueReturn<File[]>;
42
+ accept: import("vue-demi").ComputedRef<string>;
38
43
  invalid: import("vue-demi").ComputedRef<boolean>;
39
44
  onChange: (event: Event) => void;
40
45
  isDesktop: import("vue-demi").ComputedRef<boolean>;
@@ -65,6 +70,10 @@ declare const _default: import("vue-demi").DefineComponent<{
65
70
  type: BooleanConstructor;
66
71
  default: boolean;
67
72
  };
73
+ error: {
74
+ type: BooleanConstructor;
75
+ default: boolean;
76
+ };
68
77
  }>> & {
69
78
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
70
79
  }, {
@@ -74,5 +83,6 @@ declare const _default: import("vue-demi").DefineComponent<{
74
83
  maxFileSize: number;
75
84
  size: "m" | "s";
76
85
  disabled: boolean;
86
+ error: boolean;
77
87
  }>;
78
88
  export default _default;
@@ -1,4 +1,4 @@
1
- export { D as DropAreaSize, s as OrDropAreaV3 } from '../../OrDropArea-24fe94e7.js';
1
+ export { D as DropAreaSize, s as OrDropAreaV3 } from '../../OrDropArea-8b3fc35c.js';
2
2
  export { a as approximateFileSize } from '../../approximateFileSize-a48b356b.js';
3
3
  import 'vue-demi';
4
4
  import '../../TimeFormat-a7f5565b.js';
@@ -1,4 +1,4 @@
1
- export { s as OrSelectV3 } from '../../OrSelect-27c013b2.js';
1
+ export { s as OrSelectV3 } from '../../OrSelect-1274c0d1.js';
2
2
  import 'vue-demi';
3
3
  import '../../dropdown-open-06d651cf.js';
4
4
  import '../../include-2a81e823.js';
@@ -53,4 +53,4 @@ import '../../OrSelectMultipleControl-a22cec0a.js';
53
53
  import '../../isEqual-15f4b2f5.js';
54
54
  import '../../OrSelectControlInput-e0116b29.js';
55
55
  import '../../OrSelectPlaceholder-81502228.js';
56
- import '../../OrSelectSingleControl-722043c2.js';
56
+ import '../../OrSelectSingleControl-93cdab5b.js';
@@ -1,5 +1,5 @@
1
1
  export { s as OrSelectMultipleControl } from '../../../OrSelectMultipleControl-a22cec0a.js';
2
- export { s as OrSelectSingleControl } from '../../../OrSelectSingleControl-722043c2.js';
2
+ export { s as OrSelectSingleControl } from '../../../OrSelectSingleControl-93cdab5b.js';
3
3
  export { s as OrSelectPlaceholder } from '../../../OrSelectPlaceholder-81502228.js';
4
4
  import 'vue-demi';
5
5
  import '../../../TimeFormat-a7f5565b.js';