@onereach/ui-components 16.3.0-beta.4791.0 → 16.3.0-beta.4796.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) 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/OrSelectV3/OrSelect.js +69 -30
  4. package/dist/bundled/v2/components/OrToast/index.js +1 -1
  5. package/dist/bundled/v2/components/OrToastContainer/index.js +1 -1
  6. package/dist/bundled/v2/components/OrToastContainerV3/index.js +2 -2
  7. package/dist/bundled/v2/components/OrToastV3/index.js +2 -2
  8. package/dist/bundled/v2/components/index.js +1 -1
  9. package/dist/bundled/v2/index.js +1 -1
  10. package/dist/bundled/v3/components/OrDataGridV3/OrDataGrid.js +1 -1
  11. package/dist/bundled/v3/components/OrDataGridV3/index.js +1 -1
  12. package/dist/bundled/v3/components/OrDataGridV3/styles.js +1 -1
  13. package/dist/bundled/v3/components/{OrDataGridV3-e01c5258.js → OrDataGridV3-a06f6814.js} +1 -1
  14. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +1 -1
  15. package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
  16. package/dist/bundled/v3/components/OrSelectV3/styles.js +1 -1
  17. package/dist/bundled/v3/components/{OrSelectV3-adaeaa6e.js → OrSelectV3-d3facf4f.js} +64 -29
  18. package/dist/bundled/v3/components/index.js +2 -2
  19. package/dist/bundled/v3/hooks/index.js +1 -1
  20. package/dist/bundled/v3/index.js +2 -2
  21. package/dist/esm/v2/{OrDataGrid-e28e164f.js → OrDataGrid-e9889846.js} +1 -1
  22. package/dist/esm/v2/{OrDataGridToolbar-114bcc93.js → OrDataGridToolbar-323cb335.js} +1 -1
  23. package/dist/esm/v2/{OrSelect-a051d32b.js → OrSelect-03b0b27f.js} +1 -1
  24. package/dist/esm/v2/{OrSelectSingleControl-5525edde.js → OrSelectSingleControl-58b80fd4.js} +45 -6
  25. package/dist/esm/v2/components/index.js +4 -4
  26. package/dist/esm/v2/components/or-data-grid-v3/index.js +4 -4
  27. package/dist/esm/v2/components/or-data-grid-v3/partials/index.js +3 -3
  28. package/dist/esm/v2/components/or-select-v3/index.js +2 -2
  29. package/dist/esm/v2/components/or-select-v3/partials/index.js +1 -1
  30. package/dist/esm/v2/components/or-select-v3/partials/or-select-single-control/OrSelectSingleControl.vue.d.ts +5 -0
  31. package/dist/esm/v2/components/or-select-v3/partials/or-select-single-control/index.js +15 -1
  32. package/dist/esm/v2/index.js +4 -4
  33. package/dist/esm/v3/{OrDataGrid-8bd1f5c6.js → OrDataGrid-1870ce18.js} +1 -1
  34. package/dist/esm/v3/{OrDataGridToolbar-9e907457.js → OrDataGridToolbar-83dcd163.js} +1 -1
  35. package/dist/esm/v3/{OrSelect-063355e7.js → OrSelect-73b527a1.js} +1 -1
  36. package/dist/esm/v3/{OrSelectSingleControl-70644f38.js → OrSelectSingleControl-624bbadc.js} +41 -6
  37. package/dist/esm/v3/components/index.js +4 -4
  38. package/dist/esm/v3/components/or-data-grid-v3/index.js +4 -4
  39. package/dist/esm/v3/components/or-data-grid-v3/partials/index.js +3 -3
  40. package/dist/esm/v3/components/or-select-v3/index.js +2 -2
  41. package/dist/esm/v3/components/or-select-v3/partials/index.js +1 -1
  42. package/dist/esm/v3/components/or-select-v3/partials/or-select-single-control/OrSelectSingleControl.vue.d.ts +5 -0
  43. package/dist/esm/v3/components/or-select-v3/partials/or-select-single-control/index.js +14 -1
  44. package/dist/esm/v3/index.js +4 -4
  45. package/package.json +1 -1
  46. package/src/components/or-select-v3/partials/or-select-single-control/OrSelectSingleControl.vue +44 -4
  47. /package/dist/bundled/v2/{OrDataGrid-05c4bdc6.js → OrDataGrid-337a4151.js} +0 -0
@@ -1,2 +1,2 @@
1
- export { _ as default } from '../../OrDataGrid-05c4bdc6.js';
1
+ export { _ as default } from '../../OrDataGrid-337a4151.js';
2
2
  import '../../normalize-component-6e8e3d80.js';
@@ -1 +1 @@
1
- export { D as DataGridVariant, _ as OrDataGridV3 } from '../../OrDataGrid-05c4bdc6.js';
1
+ export { D as DataGridVariant, _ as OrDataGridV3 } from '../../OrDataGrid-337a4151.js';
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, toRefs, computed, watch, getCurrentInstance } from 'vue-demi';
1
+ import { defineComponent, ref, toRefs, computed, watch, nextTick, getCurrentInstance } from 'vue-demi';
2
2
  import { k as useFocus } from '../../index-a7c3000c.js';
3
3
  import { useProxyModelValue } from '../../hooks/useProxyModelValue.js';
4
4
  import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
@@ -7,20 +7,21 @@ import { isEqual } from '../../utils/isEqual.js';
7
7
  import { TagsOverflow } from '../OrTagsV3/props.js';
8
8
  import { isNil } from '../../utils/isNil.js';
9
9
  import { toArray } from '../../utils/toArray.js';
10
+ import __vue_component__$6 from '../OrTooltipV3/OrTooltip.js';
10
11
  import { isEmpty } from '../../utils/isEmpty.js';
11
12
  import { Select, SelectControl, SelectSearchControl, SelectDropdown, SelectDropdownFlipped, SelectDropdownDefault, SelectDropdownItem, SelectNoSearchResults } from './styles.js';
12
- import __vue_component__$6 from '../OrCheckboxV3/OrCheckbox.js';
13
- import __vue_component__$7 from '../OrErrorV3/OrError.js';
14
- import __vue_component__$8 from '../OrExpansionPanelV3/OrExpansionPanel.js';
15
- import __vue_component__$9 from '../OrHintV3/OrHint.js';
16
- import __vue_component__$a from '../OrIconV3/OrIcon.js';
17
- import __vue_component__$b from '../OrIconButtonV3/OrIconButton.js';
18
- import { _ as __vue_component__$c } from '../../OrInput-873ac2db.js';
19
- import __vue_component__$d from '../OrInputBoxV3/OrInputBox.js';
20
- import __vue_component__$e from '../OrLabelV3/OrLabel.js';
21
- import __vue_component__$f from '../OrMenuItemV3/OrMenuItem.js';
22
- import __vue_component__$g from '../OrPopoverV3/OrPopover.js';
23
- import __vue_component__$h from '../OrSkeletonTextV3/OrSkeletonText.js';
13
+ import __vue_component__$7 from '../OrCheckboxV3/OrCheckbox.js';
14
+ import __vue_component__$8 from '../OrErrorV3/OrError.js';
15
+ import __vue_component__$9 from '../OrExpansionPanelV3/OrExpansionPanel.js';
16
+ import __vue_component__$a from '../OrHintV3/OrHint.js';
17
+ import __vue_component__$b from '../OrIconV3/OrIcon.js';
18
+ import __vue_component__$c from '../OrIconButtonV3/OrIconButton.js';
19
+ import { _ as __vue_component__$d } from '../../OrInput-873ac2db.js';
20
+ import __vue_component__$e from '../OrInputBoxV3/OrInputBox.js';
21
+ import __vue_component__$f from '../OrLabelV3/OrLabel.js';
22
+ import __vue_component__$g from '../OrMenuItemV3/OrMenuItem.js';
23
+ import __vue_component__$h from '../OrPopoverV3/OrPopover.js';
24
+ import __vue_component__$i from '../OrSkeletonTextV3/OrSkeletonText.js';
24
25
  import { searchItemsByLabel } from '../../helpers/searchItemsByLabel.js';
25
26
  import { DropdownClose } from '../../directives/dropdown-close.js';
26
27
  import { DropdownOpen } from '../../directives/dropdown-open.js';
@@ -448,7 +449,8 @@ var script$1 = defineComponent({
448
449
  name: 'OrSelectSingleControl',
449
450
  components: {
450
451
  OrSelectPlaceholder,
451
- OrSelectControlInput
452
+ OrSelectControlInput,
453
+ OrTooltip: __vue_component__$6
452
454
  },
453
455
  model: {
454
456
  prop: 'modelValue',
@@ -490,6 +492,9 @@ var script$1 = defineComponent({
490
492
  // Refs
491
493
  const root = ref();
492
494
  const searchControl = ref();
495
+ const selectionLabelRef = ref();
496
+ const tooltipRef = ref();
497
+ const isContentTruncated = ref(false);
493
498
  // Props
494
499
  const {
495
500
  modelValue,
@@ -508,10 +513,24 @@ var script$1 = defineComponent({
508
513
  var _a;
509
514
  return (_a = selection.value) === null || _a === void 0 ? void 0 : _a.label;
510
515
  });
516
+ /* NOTE: using watch here due to async action.
517
+ Computed don't work since we need not just to track the data but to analyze UI after the re-render */
518
+ watch(model, async () => {
519
+ await nextTick();
520
+ if (selectionLabelRef.value) {
521
+ isContentTruncated.value = selectionLabelRef.value.scrollWidth > selectionLabelRef.value.clientWidth;
522
+ }
523
+ });
511
524
  const focused = computed(() => {
512
525
  var _a;
513
526
  return (_a = searchControl.value) === null || _a === void 0 ? void 0 : _a.focused;
514
527
  });
528
+ const openTooltip = () => {
529
+ if (tooltipRef.value) tooltipRef.value.open();
530
+ };
531
+ const closeTooltip = () => {
532
+ if (tooltipRef.value) tooltipRef.value.close();
533
+ };
515
534
  // Styles
516
535
  const rootStyles = computed(() => ['or-select-single-control-v3', ...SelectSingleControlInput]);
517
536
  // Methods
@@ -529,7 +548,12 @@ var script$1 = defineComponent({
529
548
  selection,
530
549
  selectionLabel,
531
550
  focus,
532
- focused
551
+ focused,
552
+ isContentTruncated,
553
+ selectionLabelRef,
554
+ tooltipRef,
555
+ openTooltip,
556
+ closeTooltip
533
557
  };
534
558
  }
535
559
  });
@@ -561,9 +585,24 @@ var __vue_render__$1 = function () {
561
585
  attrs: {
562
586
  "disabled": _vm.disabled
563
587
  }
564
- }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])] : [_c('span', {
565
- staticClass: "truncate"
566
- }, [_vm._v("\n " + _vm._s(_vm.selectionLabel) + "\n ")])]]], 2);
588
+ }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])] : [_c('div', {
589
+ staticClass: "flex"
590
+ }, [_c('div', {
591
+ ref: "selectionLabelRef",
592
+ staticClass: "truncate w-full",
593
+ on: {
594
+ "mouseenter": _vm.openTooltip,
595
+ "mouseleave": function ($event) {
596
+ _vm.tooltipRef && _vm.tooltipRef.close();
597
+ }
598
+ }
599
+ }, [_vm._v("\n " + _vm._s(_vm.selectionLabel) + "\n ")]), _vm._v(" "), _vm.isContentTruncated ? _c('OrTooltip', {
600
+ ref: "tooltipRef",
601
+ attrs: {
602
+ "content": _vm.selectionLabel,
603
+ "trigger": _vm.selectionLabelRef
604
+ }
605
+ }) : _vm._e()], 1)]]], 2);
567
606
  };
568
607
  var __vue_staticRenderFns__$1 = [];
569
608
 
@@ -590,20 +629,20 @@ var OrSelectSingleControl = __vue_component__$1;
590
629
  var script = defineComponent({
591
630
  name: 'OrSelect',
592
631
  components: {
593
- OrCheckbox: __vue_component__$6,
594
- OrError: __vue_component__$7,
595
- OrExpansionPanel: __vue_component__$8,
596
- OrHint: __vue_component__$9,
597
- OrIcon: __vue_component__$a,
598
- OrIconButton: __vue_component__$b,
599
- OrInput: __vue_component__$c,
600
- OrInputBox: __vue_component__$d,
601
- OrLabel: __vue_component__$e,
602
- OrMenuItem: __vue_component__$f,
603
- OrPopover: __vue_component__$g,
632
+ OrCheckbox: __vue_component__$7,
633
+ OrError: __vue_component__$8,
634
+ OrExpansionPanel: __vue_component__$9,
635
+ OrHint: __vue_component__$a,
636
+ OrIcon: __vue_component__$b,
637
+ OrIconButton: __vue_component__$c,
638
+ OrInput: __vue_component__$d,
639
+ OrInputBox: __vue_component__$e,
640
+ OrLabel: __vue_component__$f,
641
+ OrMenuItem: __vue_component__$g,
642
+ OrPopover: __vue_component__$h,
604
643
  OrSelectMultipleControl,
605
644
  OrSelectSingleControl,
606
- OrSkeletonText: __vue_component__$h
645
+ OrSkeletonText: __vue_component__$i
607
646
  },
608
647
  directives: {
609
648
  DropdownClose,
@@ -1,5 +1,5 @@
1
1
  export { default as OrToast } from './OrToast.js';
2
2
  export { default as OrToastContainer } from '../OrToastContainer/OrToastContainer.js';
3
- export { PositionsX, PositionsY, ToastType, TransitionType } from './constants.js';
4
3
  export { default as useToast } from './composable/useToast.js';
5
4
  export { default as useQueue } from './composable/useQueue.js';
5
+ export { PositionsX, PositionsY, ToastType, TransitionType } from './constants.js';
@@ -1,4 +1,4 @@
1
1
  export { default as OrToastContainer } from './OrToastContainer.js';
2
- export { PositionsX, PositionsY, ToastType, TransitionType } from '../OrToast/constants.js';
3
2
  export { default as useToast } from '../OrToast/composable/useToast.js';
4
3
  export { default as useQueue } from '../OrToast/composable/useQueue.js';
4
+ export { PositionsX, PositionsY, ToastType, TransitionType } from '../OrToast/constants.js';
@@ -1,5 +1,5 @@
1
1
  export { default as OrToastContainerV3 } from './OrToastContainer.js';
2
- export { t as TypesV3 } from '../../types-668300dd.js';
3
- export { p as PropsV3 } from '../../props-7be029c7.js';
4
2
  export { default as useToastV3 } from '../OrToastV3/composable/useToast.js';
5
3
  export { default as useQueueV3 } from '../OrToastV3/composable/useQueue.js';
4
+ export { t as TypesV3 } from '../../types-668300dd.js';
5
+ export { p as PropsV3 } from '../../props-7be029c7.js';
@@ -1,6 +1,6 @@
1
1
  export { default as OrToastV3 } from './OrToast.js';
2
2
  export { default as OrToastContainerV3 } from '../OrToastContainerV3/OrToastContainer.js';
3
- export { t as TypesV3 } from '../../types-668300dd.js';
4
- export { p as PropsV3 } from '../../props-7be029c7.js';
5
3
  export { default as useToastV3 } from './composable/useToast.js';
6
4
  export { default as useQueueV3 } from './composable/useQueue.js';
5
+ export { t as TypesV3 } from '../../types-668300dd.js';
6
+ export { p as PropsV3 } from '../../props-7be029c7.js';
@@ -44,7 +44,7 @@ export { default as OrConfirm } from './OrConfirm/OrConfirm.js';
44
44
  export { default as OrConfirmV3 } from './OrConfirmV3/OrConfirm.js';
45
45
  export { ConfirmType } from './OrConfirmV3/props.js';
46
46
  export { default as OrContextMenuV3 } from './OrContextMenuV3/OrContextMenu.js';
47
- export { D as DataGridVariant, _ as OrDataGridV3 } from '../OrDataGrid-05c4bdc6.js';
47
+ export { D as DataGridVariant, _ as OrDataGridV3 } from '../OrDataGrid-337a4151.js';
48
48
  export { default as OrDateFormatV3 } from './OrDateFormatV3/OrDateFormat.js';
49
49
  export { default as OrDatePickerV3 } from './OrDatePickerV3/OrDatePicker.js';
50
50
  export { default as OrDateRangePickerV3 } from './OrDateRangePickerV3/OrDateRangePicker.js';
@@ -18,7 +18,7 @@ export { default as OrCombinedInputV3 } from './components/OrCombinedInputV3/OrC
18
18
  export { default as OrConfirm } from './components/OrConfirm/OrConfirm.js';
19
19
  export { default as OrConfirmV3 } from './components/OrConfirmV3/OrConfirm.js';
20
20
  export { default as OrContextMenuV3 } from './components/OrContextMenuV3/OrContextMenu.js';
21
- export { D as DataGridVariant, _ as OrDataGridV3 } from './OrDataGrid-05c4bdc6.js';
21
+ export { D as DataGridVariant, _ as OrDataGridV3 } from './OrDataGrid-337a4151.js';
22
22
  export { default as OrDateFormatV3 } from './components/OrDateFormatV3/OrDateFormat.js';
23
23
  export { default as OrDatePickerV3 } from './components/OrDatePickerV3/OrDatePicker.js';
24
24
  export { default as OrDateRangePickerV3 } from './components/OrDateRangePickerV3/OrDateRangePicker.js';
@@ -1 +1 @@
1
- export { s as default } from '../OrDataGridV3-e01c5258.js';
1
+ export { s as default } from '../OrDataGridV3-a06f6814.js';
@@ -1 +1 @@
1
- export { D as DataGridVariant, s as OrDataGridV3 } from '../OrDataGridV3-e01c5258.js';
1
+ export { D as DataGridVariant, s as OrDataGridV3 } from '../OrDataGridV3-a06f6814.js';
@@ -1 +1 @@
1
- export { a as DataGrid } from '../OrDataGridV3-e01c5258.js';
1
+ export { a as DataGrid } from '../OrDataGridV3-a06f6814.js';
@@ -5,7 +5,7 @@ import { s as script$g } from './OrDatePickerV3-30492c4c.js';
5
5
  import { s as script$h } from './OrDateTimePickerV3-0f7c75ba.js';
6
6
  import { s as script$i } from './OrInputV3-bd25f9e7.js';
7
7
  import { s as script$j } from './OrRatingV3-e3260da7.js';
8
- import { s as script$k } from './OrSelectV3-adaeaa6e.js';
8
+ import { s as script$k } from './OrSelectV3-d3facf4f.js';
9
9
  import { s as script$l } from './OrSwitchV3-a2f4cdeb.js';
10
10
  import { s as script$m } from './OrTagInputV3-094bca9d.js';
11
11
  import { s as script$n } from './OrTimePickerV3-0fa8e719.js';
@@ -1 +1 @@
1
- export { s as default } from '../OrSelectV3-adaeaa6e.js';
1
+ export { s as default } from '../OrSelectV3-d3facf4f.js';
@@ -1 +1 @@
1
- export { s as OrSelectV3 } from '../OrSelectV3-adaeaa6e.js';
1
+ export { s as OrSelectV3 } from '../OrSelectV3-d3facf4f.js';
@@ -1 +1 @@
1
- export { S as Select, a as SelectControl, c as SelectDropdown, d as SelectDropdownDefault, e as SelectDropdownFlipped, f as SelectDropdownItem, g as SelectNoSearchResults, b as SelectSearchControl } from '../OrSelectV3-adaeaa6e.js';
1
+ export { S as Select, a as SelectControl, c as SelectDropdown, d as SelectDropdownDefault, e as SelectDropdownFlipped, f as SelectDropdownItem, g as SelectNoSearchResults, b as SelectSearchControl } from '../OrSelectV3-d3facf4f.js';
@@ -1,24 +1,25 @@
1
1
  import { withDirectives, openBlock, createElementBlock, normalizeStyle, normalizeClass, vModelDynamic, renderSlot, resolveComponent, createVNode, createSlots, withCtx, createTextVNode, toDisplayString, createElementVNode, vShow, createBlock, createCommentVNode, Fragment, resolveDirective, withModifiers, renderList } from 'vue';
2
- import { defineComponent, ref, toRefs, computed, watch, getCurrentInstance } from 'vue-demi';
2
+ import { defineComponent, ref, toRefs, computed, watch, nextTick, getCurrentInstance } from 'vue-demi';
3
3
  import { v as useFocus } from './OrAutocompleteV3-72df6cbd.js';
4
4
  import { useProxyModelValue } from '../hooks/useProxyModelValue.js';
5
5
  import { s as script$5, T as TagsOverflow } from './OrTagsV3-5a41119c.js';
6
6
  import { isEqual } from '../utils/isEqual.js';
7
7
  import { isNil } from '../utils/isNil.js';
8
8
  import { toArray } from '../utils/toArray.js';
9
+ import { s as script$6 } from './OrTooltipV3-a54da954.js';
9
10
  import { isEmpty } from '../utils/isEmpty.js';
10
- import { s as script$6 } from './OrCheckboxV3-2f2f7bc1.js';
11
- import { s as script$7 } from './OrErrorV3-b04d76aa.js';
12
- import { s as script$8 } from './OrExpansionPanelV3-eaf7465e.js';
13
- import { s as script$9 } from './OrHintV3-c8ac5975.js';
14
- import { s as script$a } from './OrIconV3-b5c97ea7.js';
15
- import { s as script$b } from './OrIconButtonV3-2d89d3fd.js';
16
- import { s as script$c } from './OrInputV3-bd25f9e7.js';
17
- import { s as script$d, I as InputBoxVariant } from './OrInputBoxV3-efe30bd8.js';
18
- import { s as script$e } from './OrLabelV3-2715e117.js';
19
- import { s as script$f } from './OrMenuItemV3-b0cfe54a.js';
20
- import { s as script$g } from './OrPopoverV3-4b885d7a.js';
21
- import { s as script$h } from './OrSkeletonV3-b48005a2.js';
11
+ import { s as script$7 } from './OrCheckboxV3-2f2f7bc1.js';
12
+ import { s as script$8 } from './OrErrorV3-b04d76aa.js';
13
+ import { s as script$9 } from './OrExpansionPanelV3-eaf7465e.js';
14
+ import { s as script$a } from './OrHintV3-c8ac5975.js';
15
+ import { s as script$b } from './OrIconV3-b5c97ea7.js';
16
+ import { s as script$c } from './OrIconButtonV3-2d89d3fd.js';
17
+ import { s as script$d } from './OrInputV3-bd25f9e7.js';
18
+ import { s as script$e, I as InputBoxVariant } from './OrInputBoxV3-efe30bd8.js';
19
+ import { s as script$f } from './OrLabelV3-2715e117.js';
20
+ import { s as script$g } from './OrMenuItemV3-b0cfe54a.js';
21
+ import { s as script$h } from './OrPopoverV3-4b885d7a.js';
22
+ import { s as script$i } from './OrSkeletonV3-b48005a2.js';
22
23
  import { searchItemsByLabel } from '../helpers/searchItemsByLabel.js';
23
24
  import { DropdownClose } from '../directives/dropdown-close.js';
24
25
  import { DropdownOpen } from '../directives/dropdown-open.js';
@@ -333,7 +334,8 @@ var script$1 = defineComponent({
333
334
  name: 'OrSelectSingleControl',
334
335
  components: {
335
336
  OrSelectPlaceholder: script$3,
336
- OrSelectControlInput: script$4
337
+ OrSelectControlInput: script$4,
338
+ OrTooltip: script$6
337
339
  },
338
340
  model: {
339
341
  prop: 'modelValue',
@@ -375,6 +377,9 @@ var script$1 = defineComponent({
375
377
  // Refs
376
378
  const root = ref();
377
379
  const searchControl = ref();
380
+ const selectionLabelRef = ref();
381
+ const tooltipRef = ref();
382
+ const isContentTruncated = ref(false);
378
383
  // Props
379
384
  const {
380
385
  modelValue,
@@ -393,10 +398,24 @@ var script$1 = defineComponent({
393
398
  var _a;
394
399
  return (_a = selection.value) === null || _a === void 0 ? void 0 : _a.label;
395
400
  });
401
+ /* NOTE: using watch here due to async action.
402
+ Computed don't work since we need not just to track the data but to analyze UI after the re-render */
403
+ watch(model, async () => {
404
+ await nextTick();
405
+ if (selectionLabelRef.value) {
406
+ isContentTruncated.value = selectionLabelRef.value.scrollWidth > selectionLabelRef.value.clientWidth;
407
+ }
408
+ });
396
409
  const focused = computed(() => {
397
410
  var _a;
398
411
  return (_a = searchControl.value) === null || _a === void 0 ? void 0 : _a.focused;
399
412
  });
413
+ const openTooltip = () => {
414
+ if (tooltipRef.value) tooltipRef.value.open();
415
+ };
416
+ const closeTooltip = () => {
417
+ if (tooltipRef.value) tooltipRef.value.close();
418
+ };
400
419
  // Styles
401
420
  const rootStyles = computed(() => ['or-select-single-control-v3', ...SelectSingleControlInput]);
402
421
  // Methods
@@ -414,18 +433,24 @@ var script$1 = defineComponent({
414
433
  selection,
415
434
  selectionLabel,
416
435
  focus,
417
- focused
436
+ focused,
437
+ isContentTruncated,
438
+ selectionLabelRef,
439
+ tooltipRef,
440
+ openTooltip,
441
+ closeTooltip
418
442
  };
419
443
  }
420
444
  });
421
445
 
422
446
  const _hoisted_1$1 = {
423
447
  key: 1,
424
- class: "truncate"
448
+ class: "flex"
425
449
  };
426
450
  function render$1(_ctx, _cache, $props, $setup, $data, $options) {
427
451
  const _component_OrSelectControlInput = resolveComponent("OrSelectControlInput");
428
452
  const _component_OrSelectPlaceholder = resolveComponent("OrSelectPlaceholder");
453
+ const _component_OrTooltip = resolveComponent("OrTooltip");
429
454
  return openBlock(), createElementBlock("div", {
430
455
  ref: 'root',
431
456
  class: normalizeClass(_ctx.rootStyles)
@@ -443,7 +468,17 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
443
468
  }, {
444
469
  default: withCtx(() => [createTextVNode(toDisplayString(_ctx.placeholder), 1 /* TEXT */)]),
445
470
  _: 1 /* STABLE */
446
- }, 8 /* PROPS */, ["disabled"])) : (openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(_ctx.selectionLabel), 1 /* TEXT */))], 64 /* STABLE_FRAGMENT */))], 2 /* CLASS */);
471
+ }, 8 /* PROPS */, ["disabled"])) : (openBlock(), createElementBlock("div", _hoisted_1$1, [createElementVNode("div", {
472
+ ref: "selectionLabelRef",
473
+ class: "truncate w-full",
474
+ onMouseenter: _cache[1] || (_cache[1] = (...args) => _ctx.openTooltip && _ctx.openTooltip(...args)),
475
+ onMouseleave: _cache[2] || (_cache[2] = $event => _ctx.tooltipRef && _ctx.tooltipRef.close())
476
+ }, toDisplayString(_ctx.selectionLabel), 545 /* TEXT, NEED_HYDRATION, NEED_PATCH */), _ctx.isContentTruncated ? (openBlock(), createBlock(_component_OrTooltip, {
477
+ key: 0,
478
+ ref: "tooltipRef",
479
+ content: _ctx.selectionLabel,
480
+ trigger: _ctx.selectionLabelRef
481
+ }, null, 8 /* PROPS */, ["content", "trigger"])) : createCommentVNode("v-if", true)]))], 64 /* STABLE_FRAGMENT */))], 2 /* CLASS */);
447
482
  }
448
483
 
449
484
  script$1.render = render$1;
@@ -505,20 +540,20 @@ const SelectNoSearchResults = [
505
540
  var script = defineComponent({
506
541
  name: 'OrSelect',
507
542
  components: {
508
- OrCheckbox: script$6,
509
- OrError: script$7,
510
- OrExpansionPanel: script$8,
511
- OrHint: script$9,
512
- OrIcon: script$a,
513
- OrIconButton: script$b,
514
- OrInput: script$c,
515
- OrInputBox: script$d,
516
- OrLabel: script$e,
517
- OrMenuItem: script$f,
518
- OrPopover: script$g,
543
+ OrCheckbox: script$7,
544
+ OrError: script$8,
545
+ OrExpansionPanel: script$9,
546
+ OrHint: script$a,
547
+ OrIcon: script$b,
548
+ OrIconButton: script$c,
549
+ OrInput: script$d,
550
+ OrInputBox: script$e,
551
+ OrLabel: script$f,
552
+ OrMenuItem: script$g,
553
+ OrPopover: script$h,
519
554
  OrSelectMultipleControl: script$2,
520
555
  OrSelectSingleControl: script$1,
521
- OrSkeletonText: script$h
556
+ OrSkeletonText: script$i
522
557
  },
523
558
  directives: {
524
559
  DropdownClose,
@@ -24,7 +24,7 @@ export { s as OrCombinedInputV3 } from './OrCombinedInputV3-ceff5a22.js';
24
24
  export { s as OrConfirm } from './OrConfirm-d85d5ef4.js';
25
25
  export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirmV3-9a0d8dca.js';
26
26
  export { default as OrContextMenuV3 } from './OrContextMenuV3/OrContextMenu.js';
27
- export { D as DataGridVariant, s as OrDataGridV3 } from './OrDataGridV3-e01c5258.js';
27
+ export { D as DataGridVariant, s as OrDataGridV3 } from './OrDataGridV3-a06f6814.js';
28
28
  export { s as OrDateFormatV3 } from './OrDateFormatV3-72908378.js';
29
29
  export { s as OrDatePickerV3 } from './OrDatePickerV3-30492c4c.js';
30
30
  export { s as OrDateRangePickerV3 } from './OrDateRangePickerV3-be91d8cd.js';
@@ -93,7 +93,7 @@ export { default as OrSearch } from './OrSearch/OrSearch.js';
93
93
  export { default as OrSearchV3 } from './OrSearchV3/OrSearch.js';
94
94
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControlV3-99c7f6ed.js';
95
95
  export { s as OrSelect } from './OrSelect-06b1f2ff.js';
96
- export { s as OrSelectV3 } from './OrSelectV3-adaeaa6e.js';
96
+ export { s as OrSelectV3 } from './OrSelectV3-d3facf4f.js';
97
97
  export { OrSidebar, OrSidebarSide } from './OrSidebar/index.js';
98
98
  export { s as OrSidebarV3, S as SidebarPlacement } from './OrSidebarV3-57477782.js';
99
99
  export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeleton-766b54c3.js';
@@ -7,9 +7,9 @@ export { useLocale } from './useLocale.js';
7
7
  export { useOverflow } from './useOverflow.js';
8
8
  export { usePopoverState } from './usePopoverState.js';
9
9
  export { useProxyModelValue } from './useProxyModelValue.js';
10
+ export { default as useResponsive } from './useResponsive/useResponsive.js';
10
11
  export { useTheme } from './useTheme.js';
11
12
  export { useTimeFormat } from './useTimeFormat.js';
12
13
  export { useTimeMask } from './useTimeMask.js';
13
14
  export { default as useToggle } from './useToggle.js';
14
15
  export { useValidationAttributes } from './useValidationAttributes.js';
15
- export { default as useResponsive } from './useResponsive/useResponsive.js';
@@ -16,7 +16,7 @@ export { s as OrCombinedInputV3 } from './components/OrCombinedInputV3-ceff5a22.
16
16
  export { s as OrConfirm } from './components/OrConfirm-d85d5ef4.js';
17
17
  export { C as ConfirmType, s as OrConfirmV3 } from './components/OrConfirmV3-9a0d8dca.js';
18
18
  export { default as OrContextMenuV3 } from './components/OrContextMenuV3/OrContextMenu.js';
19
- export { D as DataGridVariant, s as OrDataGridV3 } from './components/OrDataGridV3-e01c5258.js';
19
+ export { D as DataGridVariant, s as OrDataGridV3 } from './components/OrDataGridV3-a06f6814.js';
20
20
  export { s as OrDateFormatV3 } from './components/OrDateFormatV3-72908378.js';
21
21
  export { s as OrDateRangePickerV3 } from './components/OrDateRangePickerV3-be91d8cd.js';
22
22
  export { s as OrDateTimeFormatV3 } from './components/OrDateTimeFormatV3-689439f5.js';
@@ -116,7 +116,7 @@ export { s as OrRatingV3, R as RatingVariant } from './components/OrRatingV3-e32
116
116
  export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement } from './components/OrResizeablePanelV3-951e391d.js';
117
117
  export { default as OrSearch } from './components/OrSearch/OrSearch.js';
118
118
  export { default as OrSearchV3 } from './components/OrSearchV3/OrSearch.js';
119
- export { s as OrSelectV3 } from './components/OrSelectV3-adaeaa6e.js';
119
+ export { s as OrSelectV3 } from './components/OrSelectV3-d3facf4f.js';
120
120
  export { s as OrSortingV3 } from './components/OrSortingV3-cd48e096.js';
121
121
  export { s as OrSwitchV3 } from './components/OrSwitchV3-a2f4cdeb.js';
122
122
  export { default as OrTabHeaderItem } from './components/OrTabHeaderItem/OrTabHeaderItem.js';
@@ -5,7 +5,7 @@ import { _ as __vue_component__$h } from './OrSearch-c8fe6750.js';
5
5
  import './OrSkeletonCircle.vue_rollup-plugin-vue_script-f572f02f.js';
6
6
  import './OrSkeletonRect.vue_rollup-plugin-vue_script-d2b78065.js';
7
7
  import { _ as __vue_component__$i } from './OrSkeletonText-b6e51e70.js';
8
- import { _ as __vue_component__$2, a as __vue_component__$3, b as __vue_component__$4, c as __vue_component__$5, d as __vue_component__$6, e as __vue_component__$7, f as __vue_component__$8, g as __vue_component__$9, h as __vue_component__$a, i as __vue_component__$b, j as __vue_component__$c, k as __vue_component__$d, l as __vue_component__$e, m as __vue_component__$f, D as DataGridVariant } from './OrDataGridToolbar-114bcc93.js';
8
+ import { _ as __vue_component__$2, a as __vue_component__$3, b as __vue_component__$4, c as __vue_component__$5, d as __vue_component__$6, e as __vue_component__$7, f as __vue_component__$8, g as __vue_component__$9, h as __vue_component__$a, i as __vue_component__$b, j as __vue_component__$c, k as __vue_component__$d, l as __vue_component__$e, m as __vue_component__$f, D as DataGridVariant } from './OrDataGridToolbar-323cb335.js';
9
9
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
10
10
 
11
11
  const DataGrid = [
@@ -12,7 +12,7 @@ import { _ as __vue_component__$g } from './OrDateTimePicker-c16643e9.js';
12
12
  import './OrDateTimePickerTimeSelect-08e435fd.js';
13
13
  import { _ as __vue_component__$h } from './OrInput-1801c226.js';
14
14
  import { _ as __vue_component__$i } from './OrRating-7c968949.js';
15
- import { _ as __vue_component__$j } from './OrSelect-a051d32b.js';
15
+ import { _ as __vue_component__$j } from './OrSelect-03b0b27f.js';
16
16
  import { _ as __vue_component__$k } from './OrSwitch-d9bb9ac5.js';
17
17
  import { _ as __vue_component__$l } from './OrTagInput-35d812e2.js';
18
18
  import { _ as __vue_component__$m } from './OrTimePicker-59f1941d.js';
@@ -27,7 +27,7 @@ import './OrSkeletonRect.vue_rollup-plugin-vue_script-d2b78065.js';
27
27
  import { _ as __vue_component__$e } from './OrSkeletonText-b6e51e70.js';
28
28
  import { T as TagsOverflow } from './OrTags-1dd44e9c.js';
29
29
  import { _ as __vue_component__$c } from './OrSelectMultipleControl-63dbf79d.js';
30
- import { _ as __vue_component__$d } from './OrSelectSingleControl-5525edde.js';
30
+ import { _ as __vue_component__$d } from './OrSelectSingleControl-58b80fd4.js';
31
31
  import './OrSelectPlaceholder-a6caa9e0.js';
32
32
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
33
33
 
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, toRefs, computed } from 'vue-demi';
1
+ import { defineComponent, ref, toRefs, computed, watch, nextTick } 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';
@@ -9,6 +9,7 @@ import '@onereach/styles/screens.json';
9
9
  import '@onereach/styles/tailwind.config.json';
10
10
  import { _ as __vue_component__$2 } from './OrSelectControlInput-31d24ab9.js';
11
11
  import { _ as __vue_component__$1 } from './OrSelectPlaceholder-a6caa9e0.js';
12
+ import { _ as __vue_component__$3 } from './OrTooltip-24e3f17d.js';
12
13
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
13
14
 
14
15
  const SelectSingleControlInput = [
@@ -19,7 +20,8 @@ var script = defineComponent({
19
20
  name: 'OrSelectSingleControl',
20
21
  components: {
21
22
  OrSelectPlaceholder: __vue_component__$1,
22
- OrSelectControlInput: __vue_component__$2
23
+ OrSelectControlInput: __vue_component__$2,
24
+ OrTooltip: __vue_component__$3
23
25
  },
24
26
  model: {
25
27
  prop: 'modelValue',
@@ -61,6 +63,9 @@ var script = defineComponent({
61
63
  // Refs
62
64
  const root = ref();
63
65
  const searchControl = ref();
66
+ const selectionLabelRef = ref();
67
+ const tooltipRef = ref();
68
+ const isContentTruncated = ref(false);
64
69
  // Props
65
70
  const {
66
71
  modelValue,
@@ -79,10 +84,24 @@ var script = defineComponent({
79
84
  var _a;
80
85
  return (_a = selection.value) === null || _a === void 0 ? void 0 : _a.label;
81
86
  });
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
+ });
82
95
  const focused = computed(() => {
83
96
  var _a;
84
97
  return (_a = searchControl.value) === null || _a === void 0 ? void 0 : _a.focused;
85
98
  });
99
+ const openTooltip = () => {
100
+ if (tooltipRef.value) tooltipRef.value.open();
101
+ };
102
+ const closeTooltip = () => {
103
+ if (tooltipRef.value) tooltipRef.value.close();
104
+ };
86
105
  // Styles
87
106
  const rootStyles = computed(() => ['or-select-single-control-v3', ...SelectSingleControlInput]);
88
107
  // Methods
@@ -100,7 +119,12 @@ var script = defineComponent({
100
119
  selection,
101
120
  selectionLabel,
102
121
  focus,
103
- focused
122
+ focused,
123
+ isContentTruncated,
124
+ selectionLabelRef,
125
+ tooltipRef,
126
+ openTooltip,
127
+ closeTooltip
104
128
  };
105
129
  }
106
130
  });
@@ -132,9 +156,24 @@ var __vue_render__ = function () {
132
156
  attrs: {
133
157
  "disabled": _vm.disabled
134
158
  }
135
- }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])] : [_c('span', {
136
- staticClass: "truncate"
137
- }, [_vm._v("\n " + _vm._s(_vm.selectionLabel) + "\n ")])]]], 2);
159
+ }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])] : [_c('div', {
160
+ staticClass: "flex"
161
+ }, [_c('div', {
162
+ ref: "selectionLabelRef",
163
+ staticClass: "truncate w-full",
164
+ on: {
165
+ "mouseenter": _vm.openTooltip,
166
+ "mouseleave": function ($event) {
167
+ _vm.tooltipRef && _vm.tooltipRef.close();
168
+ }
169
+ }
170
+ }, [_vm._v("\n " + _vm._s(_vm.selectionLabel) + "\n ")]), _vm._v(" "), _vm.isContentTruncated ? _c('OrTooltip', {
171
+ ref: "tooltipRef",
172
+ attrs: {
173
+ "content": _vm.selectionLabel,
174
+ "trigger": _vm.selectionLabelRef
175
+ }
176
+ }) : _vm._e()], 1)]]], 2);
138
177
  };
139
178
  var __vue_staticRenderFns__ = [];
140
179
 
@@ -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-e040da16.js';
36
36
  export { _ as OrContextMenuV3 } from '../OrContextMenu-a6fee3eb.js';
37
- export { _ as OrDataGridV3 } from '../OrDataGrid-e28e164f.js';
38
- export { D as DataGridVariant } from '../OrDataGridToolbar-114bcc93.js';
37
+ export { _ as OrDataGridV3 } from '../OrDataGrid-e9889846.js';
38
+ export { D as DataGridVariant } from '../OrDataGridToolbar-323cb335.js';
39
39
  export { _ as OrDateFormatV3 } from '../OrDateFormat-c81a6a00.js';
40
40
  export { _ as OrDatePickerV3 } from '../OrDatePicker-47a91168.js';
41
41
  export { _ as OrDateRangePickerV3 } from '../OrDateRangePicker-4c97e720.js';
@@ -112,7 +112,7 @@ export { _ as OrSearch } from '../OrSearch-9c4cd6ca.js';
112
112
  export { _ as OrSearchV3 } from '../OrSearch-c8fe6750.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-a051d32b.js';
115
+ export { _ as OrSelectV3 } from '../OrSelect-03b0b27f.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-63dbf79d.js';
243
243
  import '../isEqual-15f4b2f5.js';
244
244
  import '../OrSelectControlInput-31d24ab9.js';
245
245
  import '../OrSelectPlaceholder-a6caa9e0.js';
246
- import '../OrSelectSingleControl-5525edde.js';
246
+ import '../OrSelectSingleControl-58b80fd4.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-e28e164f.js';
2
- export { D as DataGridVariant } from '../../OrDataGridToolbar-114bcc93.js';
1
+ export { _ as OrDataGridV3 } from '../../OrDataGrid-e9889846.js';
2
+ export { D as DataGridVariant } from '../../OrDataGridToolbar-323cb335.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-c16643e9.js';
65
65
  import '../../OrRating-7c968949.js';
66
- import '../../OrSelect-a051d32b.js';
66
+ import '../../OrSelect-03b0b27f.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-63dbf79d.js';
77
77
  import '../../isEqual-15f4b2f5.js';
78
78
  import '../../OrSelectControlInput-31d24ab9.js';
79
79
  import '../../OrSelectPlaceholder-a6caa9e0.js';
80
- import '../../OrSelectSingleControl-5525edde.js';
80
+ import '../../OrSelectSingleControl-58b80fd4.js';
81
81
  import '../../OrSwitch-d9bb9ac5.js';
82
82
  import '../../OrTagInput-35d812e2.js';
83
83
  import '../../OrTimePicker-59f1941d.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-114bcc93.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-323cb335.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-c16643e9.js';
54
54
  import '../../../OrInput-1801c226.js';
55
55
  import '../../../useValidationAttributes-257954f3.js';
56
56
  import '../../../OrRating-7c968949.js';
57
- import '../../../OrSelect-a051d32b.js';
57
+ import '../../../OrSelect-03b0b27f.js';
58
58
  import '../../../isString-cf957a95.js';
59
59
  import '../../../isNull-7ae26d1d.js';
60
60
  import '../../../isObject-4d5300e9.js';
@@ -74,7 +74,7 @@ import '../../../OrSelectMultipleControl-63dbf79d.js';
74
74
  import '../../../isEqual-15f4b2f5.js';
75
75
  import '../../../OrSelectControlInput-31d24ab9.js';
76
76
  import '../../../OrSelectPlaceholder-a6caa9e0.js';
77
- import '../../../OrSelectSingleControl-5525edde.js';
77
+ import '../../../OrSelectSingleControl-58b80fd4.js';
78
78
  import '../../../OrSwitch-d9bb9ac5.js';
79
79
  import '../../../OrTagInput-35d812e2.js';
80
80
  import '../../../OrTimePicker-59f1941d.js';
@@ -1,4 +1,4 @@
1
- export { _ as OrSelectV3 } from '../../OrSelect-a051d32b.js';
1
+ export { _ as OrSelectV3 } from '../../OrSelect-03b0b27f.js';
2
2
  import 'vue-demi';
3
3
  import '../../dropdown-open-06d651cf.js';
4
4
  import '../../include-2a81e823.js';
@@ -62,4 +62,4 @@ import '../../OrSelectMultipleControl-63dbf79d.js';
62
62
  import '../../isEqual-15f4b2f5.js';
63
63
  import '../../OrSelectControlInput-31d24ab9.js';
64
64
  import '../../OrSelectPlaceholder-a6caa9e0.js';
65
- import '../../OrSelectSingleControl-5525edde.js';
65
+ import '../../OrSelectSingleControl-58b80fd4.js';
@@ -1,5 +1,5 @@
1
1
  export { _ as OrSelectMultipleControl } from '../../../OrSelectMultipleControl-63dbf79d.js';
2
- export { _ as OrSelectSingleControl } from '../../../OrSelectSingleControl-5525edde.js';
2
+ export { _ as OrSelectSingleControl } from '../../../OrSelectSingleControl-58b80fd4.js';
3
3
  export { _ as OrSelectPlaceholder } from '../../../OrSelectPlaceholder-a6caa9e0.js';
4
4
  import 'vue-demi';
5
5
  import '../../../TimeFormat-a7f5565b.js';
@@ -39,6 +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
+ selectionLabelRef: import("vue-demi").Ref<HTMLDialogElement | undefined>;
44
+ tooltipRef: import("vue-demi").Ref<any>;
45
+ openTooltip: () => void;
46
+ closeTooltip: () => void;
42
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<{
43
48
  modelValue: {
44
49
  type: StringConstructor;
@@ -1,4 +1,4 @@
1
- export { _ as OrSelectSingleControl } from '../../../../OrSelectSingleControl-5525edde.js';
1
+ export { _ as OrSelectSingleControl } from '../../../../OrSelectSingleControl-58b80fd4.js';
2
2
  import 'vue-demi';
3
3
  import '../../../../TimeFormat-a7f5565b.js';
4
4
  import '../../../../dom-53c9635b.js';
@@ -17,3 +17,17 @@ import '@onereach/styles/tailwind.config.json';
17
17
  import '../../../../OrSelectControlInput-31d24ab9.js';
18
18
  import '../../../../normalize-component-6e8e3d80.js';
19
19
  import '../../../../OrSelectPlaceholder-a6caa9e0.js';
20
+ import '../../../../OrTooltip-24e3f17d.js';
21
+ import '../../../../usePopoverState-7267fa91.js';
22
+ import '../../../../OrPopover-45e2dbce.js';
23
+ import '@floating-ui/dom';
24
+ import '../../../../useElevation-895bc28f.js';
25
+ import '../../../../isVisible-d1e49905.js';
26
+ import '../../../../useResponsive-491da8c6.js';
27
+ import '../../../../OrBottomSheet-3bb9d8e9.js';
28
+ import '../../../../OrOverlay-59e59078.js';
29
+ import '../../../../OrTeleport.vue2-424c7f33.js';
30
+ import 'portal-vue';
31
+ import '../../../../useTheme-dc76b423.js';
32
+ import '../../../../isPrevented-b1764210.js';
33
+ import '../../../../isAncestor-2973d4f4.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-e040da16.js';
36
36
  export { _ as OrContextMenuV3 } from './OrContextMenu-a6fee3eb.js';
37
- export { _ as OrDataGridV3 } from './OrDataGrid-e28e164f.js';
38
- export { D as DataGridVariant } from './OrDataGridToolbar-114bcc93.js';
37
+ export { _ as OrDataGridV3 } from './OrDataGrid-e9889846.js';
38
+ export { D as DataGridVariant } from './OrDataGridToolbar-323cb335.js';
39
39
  export { _ as OrDateFormatV3 } from './OrDateFormat-c81a6a00.js';
40
40
  export { _ as OrDatePickerV3 } from './OrDatePicker-47a91168.js';
41
41
  export { _ as OrDateRangePickerV3 } from './OrDateRangePicker-4c97e720.js';
@@ -112,7 +112,7 @@ export { _ as OrSearch } from './OrSearch-9c4cd6ca.js';
112
112
  export { _ as OrSearchV3 } from './OrSearch-c8fe6750.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-a051d32b.js';
115
+ export { _ as OrSelectV3 } from './OrSelect-03b0b27f.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-63dbf79d.js';
246
246
  import './OrSelectControlInput-31d24ab9.js';
247
247
  import './OrSelectPlaceholder-a6caa9e0.js';
248
- import './OrSelectSingleControl-5525edde.js';
248
+ import './OrSelectSingleControl-58b80fd4.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-ca4ae6ee.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-9e907457.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-83dcd163.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-4611aad8.js';
12
12
  import './OrDateTimePickerTimeSelect-aeef3ae9.js';
13
13
  import { s as script$h } from './OrInput-75918049.js';
14
14
  import { s as script$i } from './OrRating-7c2f8e4d.js';
15
- import { s as script$j } from './OrSelect-063355e7.js';
15
+ import { s as script$j } from './OrSelect-73b527a1.js';
16
16
  import { s as script$k } from './OrSwitch-86583d97.js';
17
17
  import { s as script$l } from './OrTagInput-c0064822.js';
18
18
  import { s as script$m } from './OrTimePicker-220477a2.js';
@@ -26,7 +26,7 @@ import './OrSkeletonRect-d0b8b2cf.js';
26
26
  import { s as script$e } from './OrSkeletonText-5e9579c1.js';
27
27
  import { T as TagsOverflow } from './OrTags-b414ac51.js';
28
28
  import { s as script$c } from './OrSelectMultipleControl-938776f3.js';
29
- import { s as script$d } from './OrSelectSingleControl-70644f38.js';
29
+ import { s as script$d } from './OrSelectSingleControl-624bbadc.js';
30
30
  import './OrSelectPlaceholder-81502228.js';
31
31
  import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives, createElementVNode, withModifiers, createVNode, vShow, Fragment, renderList } from 'vue';
32
32
 
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, toRefs, computed } from 'vue-demi';
1
+ import { defineComponent, ref, toRefs, computed, watch, nextTick } 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';
@@ -9,7 +9,8 @@ import '@onereach/styles/screens.json';
9
9
  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
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, Fragment, withCtx, createTextVNode, toDisplayString } from 'vue';
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
14
 
14
15
  const SelectSingleControlInput = [
15
16
  // Layout
@@ -19,7 +20,8 @@ var script = defineComponent({
19
20
  name: 'OrSelectSingleControl',
20
21
  components: {
21
22
  OrSelectPlaceholder: script$1,
22
- OrSelectControlInput: script$2
23
+ OrSelectControlInput: script$2,
24
+ OrTooltip: script$3
23
25
  },
24
26
  model: {
25
27
  prop: 'modelValue',
@@ -61,6 +63,9 @@ var script = defineComponent({
61
63
  // Refs
62
64
  const root = ref();
63
65
  const searchControl = ref();
66
+ const selectionLabelRef = ref();
67
+ const tooltipRef = ref();
68
+ const isContentTruncated = ref(false);
64
69
  // Props
65
70
  const {
66
71
  modelValue,
@@ -79,10 +84,24 @@ var script = defineComponent({
79
84
  var _a;
80
85
  return (_a = selection.value) === null || _a === void 0 ? void 0 : _a.label;
81
86
  });
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
+ });
82
95
  const focused = computed(() => {
83
96
  var _a;
84
97
  return (_a = searchControl.value) === null || _a === void 0 ? void 0 : _a.focused;
85
98
  });
99
+ const openTooltip = () => {
100
+ if (tooltipRef.value) tooltipRef.value.open();
101
+ };
102
+ const closeTooltip = () => {
103
+ if (tooltipRef.value) tooltipRef.value.close();
104
+ };
86
105
  // Styles
87
106
  const rootStyles = computed(() => ['or-select-single-control-v3', ...SelectSingleControlInput]);
88
107
  // Methods
@@ -100,18 +119,24 @@ var script = defineComponent({
100
119
  selection,
101
120
  selectionLabel,
102
121
  focus,
103
- focused
122
+ focused,
123
+ isContentTruncated,
124
+ selectionLabelRef,
125
+ tooltipRef,
126
+ openTooltip,
127
+ closeTooltip
104
128
  };
105
129
  }
106
130
  });
107
131
 
108
132
  const _hoisted_1 = {
109
133
  key: 1,
110
- class: "truncate"
134
+ class: "flex"
111
135
  };
112
136
  function render(_ctx, _cache, $props, $setup, $data, $options) {
113
137
  const _component_OrSelectControlInput = resolveComponent("OrSelectControlInput");
114
138
  const _component_OrSelectPlaceholder = resolveComponent("OrSelectPlaceholder");
139
+ const _component_OrTooltip = resolveComponent("OrTooltip");
115
140
  return openBlock(), createElementBlock("div", {
116
141
  ref: 'root',
117
142
  class: normalizeClass(_ctx.rootStyles)
@@ -129,7 +154,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
129
154
  }, {
130
155
  default: withCtx(() => [createTextVNode(toDisplayString(_ctx.placeholder), 1 /* TEXT */)]),
131
156
  _: 1 /* STABLE */
132
- }, 8 /* PROPS */, ["disabled"])) : (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(_ctx.selectionLabel), 1 /* TEXT */))], 64 /* STABLE_FRAGMENT */))], 2 /* CLASS */);
157
+ }, 8 /* PROPS */, ["disabled"])) : (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", {
158
+ ref: "selectionLabelRef",
159
+ class: "truncate w-full",
160
+ onMouseenter: _cache[1] || (_cache[1] = (...args) => _ctx.openTooltip && _ctx.openTooltip(...args)),
161
+ onMouseleave: _cache[2] || (_cache[2] = $event => _ctx.tooltipRef && _ctx.tooltipRef.close())
162
+ }, toDisplayString(_ctx.selectionLabel), 545 /* TEXT, NEED_HYDRATION, NEED_PATCH */), _ctx.isContentTruncated ? (openBlock(), createBlock(_component_OrTooltip, {
163
+ key: 0,
164
+ ref: "tooltipRef",
165
+ content: _ctx.selectionLabel,
166
+ trigger: _ctx.selectionLabelRef
167
+ }, null, 8 /* PROPS */, ["content", "trigger"])) : createCommentVNode("v-if", true)]))], 64 /* STABLE_FRAGMENT */))], 2 /* CLASS */);
133
168
  }
134
169
 
135
170
  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-2ec6233e.js';
34
34
  export { s as OrContextMenuV3 } from '../OrContextMenu-d8c71891.js';
35
- export { s as OrDataGridV3 } from '../OrDataGrid-8bd1f5c6.js';
36
- export { D as DataGridVariant } from '../OrDataGridToolbar-9e907457.js';
35
+ export { s as OrDataGridV3 } from '../OrDataGrid-1870ce18.js';
36
+ export { D as DataGridVariant } from '../OrDataGridToolbar-83dcd163.js';
37
37
  export { s as OrDateFormatV3 } from '../OrDateFormat-9faeb7d0.js';
38
38
  export { s as OrDatePickerV3 } from '../OrDatePicker-fff9b6b3.js';
39
39
  export { s as OrDateRangePickerV3 } from '../OrDateRangePicker-35babae1.js';
@@ -109,7 +109,7 @@ export { s as OrSearch } from '../OrSearch-4192737e.js';
109
109
  export { s as OrSearchV3 } from '../OrSearch-ca4ae6ee.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-063355e7.js';
112
+ export { s as OrSelectV3 } from '../OrSelect-73b527a1.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-938776f3.js';
231
231
  import '../isEqual-15f4b2f5.js';
232
232
  import '../OrSelectControlInput-e0116b29.js';
233
233
  import '../OrSelectPlaceholder-81502228.js';
234
- import '../OrSelectSingleControl-70644f38.js';
234
+ import '../OrSelectSingleControl-624bbadc.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-8bd1f5c6.js';
2
- export { D as DataGridVariant } from '../../OrDataGridToolbar-9e907457.js';
1
+ export { s as OrDataGridV3 } from '../../OrDataGrid-1870ce18.js';
2
+ export { D as DataGridVariant } from '../../OrDataGridToolbar-83dcd163.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-063355e7.js';
62
+ import '../../OrSelect-73b527a1.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-938776f3.js';
73
73
  import '../../isEqual-15f4b2f5.js';
74
74
  import '../../OrSelectControlInput-e0116b29.js';
75
75
  import '../../OrSelectPlaceholder-81502228.js';
76
- import '../../OrSelectSingleControl-70644f38.js';
76
+ import '../../OrSelectSingleControl-624bbadc.js';
77
77
  import '../../OrSwitch-86583d97.js';
78
78
  import '../../OrTagInput-c0064822.js';
79
79
  import '../../OrTimePicker-220477a2.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-9e907457.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-83dcd163.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-75918049.js';
51
51
  import '../../../useValidationAttributes-257954f3.js';
52
52
  import '../../../OrRating-7c2f8e4d.js';
53
- import '../../../OrSelect-063355e7.js';
53
+ import '../../../OrSelect-73b527a1.js';
54
54
  import '../../../isString-cf957a95.js';
55
55
  import '../../../isNull-7ae26d1d.js';
56
56
  import '../../../isObject-4d5300e9.js';
@@ -70,7 +70,7 @@ import '../../../OrSelectMultipleControl-938776f3.js';
70
70
  import '../../../isEqual-15f4b2f5.js';
71
71
  import '../../../OrSelectControlInput-e0116b29.js';
72
72
  import '../../../OrSelectPlaceholder-81502228.js';
73
- import '../../../OrSelectSingleControl-70644f38.js';
73
+ import '../../../OrSelectSingleControl-624bbadc.js';
74
74
  import '../../../OrSwitch-86583d97.js';
75
75
  import '../../../OrTagInput-c0064822.js';
76
76
  import '../../../OrTimePicker-220477a2.js';
@@ -1,4 +1,4 @@
1
- export { s as OrSelectV3 } from '../../OrSelect-063355e7.js';
1
+ export { s as OrSelectV3 } from '../../OrSelect-73b527a1.js';
2
2
  import 'vue-demi';
3
3
  import '../../dropdown-open-06d651cf.js';
4
4
  import '../../include-2a81e823.js';
@@ -59,4 +59,4 @@ import '../../OrSelectMultipleControl-938776f3.js';
59
59
  import '../../isEqual-15f4b2f5.js';
60
60
  import '../../OrSelectControlInput-e0116b29.js';
61
61
  import '../../OrSelectPlaceholder-81502228.js';
62
- import '../../OrSelectSingleControl-70644f38.js';
62
+ import '../../OrSelectSingleControl-624bbadc.js';
@@ -1,5 +1,5 @@
1
1
  export { s as OrSelectMultipleControl } from '../../../OrSelectMultipleControl-938776f3.js';
2
- export { s as OrSelectSingleControl } from '../../../OrSelectSingleControl-70644f38.js';
2
+ export { s as OrSelectSingleControl } from '../../../OrSelectSingleControl-624bbadc.js';
3
3
  export { s as OrSelectPlaceholder } from '../../../OrSelectPlaceholder-81502228.js';
4
4
  import 'vue-demi';
5
5
  import '../../../TimeFormat-a7f5565b.js';
@@ -39,6 +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
+ selectionLabelRef: import("vue-demi").Ref<HTMLDialogElement | undefined>;
44
+ tooltipRef: import("vue-demi").Ref<any>;
45
+ openTooltip: () => void;
46
+ closeTooltip: () => void;
42
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<{
43
48
  modelValue: {
44
49
  type: StringConstructor;
@@ -1,4 +1,4 @@
1
- export { s as OrSelectSingleControl } from '../../../../OrSelectSingleControl-70644f38.js';
1
+ export { s as OrSelectSingleControl } from '../../../../OrSelectSingleControl-624bbadc.js';
2
2
  import 'vue-demi';
3
3
  import '../../../../TimeFormat-a7f5565b.js';
4
4
  import '../../../../dom-53c9635b.js';
@@ -17,3 +17,16 @@ import '@onereach/styles/tailwind.config.json';
17
17
  import '../../../../OrSelectControlInput-e0116b29.js';
18
18
  import 'vue';
19
19
  import '../../../../OrSelectPlaceholder-81502228.js';
20
+ import '../../../../OrTooltip-77d97056.js';
21
+ import '../../../../usePopoverState-7267fa91.js';
22
+ import '../../../../OrPopover-0daeba14.js';
23
+ import '@floating-ui/dom';
24
+ import '../../../../useElevation-895bc28f.js';
25
+ import '../../../../isVisible-d1e49905.js';
26
+ import '../../../../useResponsive-491da8c6.js';
27
+ import '../../../../OrBottomSheet-a7a06f7f.js';
28
+ import '../../../../OrOverlay-97c94f0b.js';
29
+ import '../../../../OrTeleport.vue3-8099178c.js';
30
+ import '../../../../useTheme-dc76b423.js';
31
+ import '../../../../isPrevented-b1764210.js';
32
+ import '../../../../isAncestor-2973d4f4.js';
@@ -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-2ec6233e.js';
34
34
  export { s as OrContextMenuV3 } from './OrContextMenu-d8c71891.js';
35
- export { s as OrDataGridV3 } from './OrDataGrid-8bd1f5c6.js';
36
- export { D as DataGridVariant } from './OrDataGridToolbar-9e907457.js';
35
+ export { s as OrDataGridV3 } from './OrDataGrid-1870ce18.js';
36
+ export { D as DataGridVariant } from './OrDataGridToolbar-83dcd163.js';
37
37
  export { s as OrDateFormatV3 } from './OrDateFormat-9faeb7d0.js';
38
38
  export { s as OrDatePickerV3 } from './OrDatePicker-fff9b6b3.js';
39
39
  export { s as OrDateRangePickerV3 } from './OrDateRangePicker-35babae1.js';
@@ -109,7 +109,7 @@ export { s as OrSearch } from './OrSearch-4192737e.js';
109
109
  export { s as OrSearchV3 } from './OrSearch-ca4ae6ee.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-063355e7.js';
112
+ export { s as OrSelectV3 } from './OrSelect-73b527a1.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';
@@ -233,7 +233,7 @@ import 'lodash/keyBy';
233
233
  import './OrSelectMultipleControl-938776f3.js';
234
234
  import './OrSelectControlInput-e0116b29.js';
235
235
  import './OrSelectPlaceholder-81502228.js';
236
- import './OrSelectSingleControl-70644f38.js';
236
+ import './OrSelectSingleControl-624bbadc.js';
237
237
  import 'lodash/range';
238
238
  import './styles-ed564e39.js';
239
239
  import 'lodash/isNil';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "16.3.0-beta.4791.0",
3
+ "version": "16.3.0-beta.4796.0",
4
4
  "npmUnpacked": "4.15.2",
5
5
  "description": "Vue components library for v2/3",
6
6
  "sideEffects": false,
@@ -19,21 +19,35 @@
19
19
  </template>
20
20
 
21
21
  <template v-else>
22
- <span class="truncate">
23
- {{ selectionLabel }}
24
- </span>
22
+ <div class="flex">
23
+ <div
24
+ ref="selectionLabelRef"
25
+ class="truncate w-full"
26
+ @mouseenter="openTooltip"
27
+ @mouseleave="tooltipRef && tooltipRef.close()"
28
+ >
29
+ {{ selectionLabel }}
30
+ </div>
31
+ <OrTooltip
32
+ v-if="isContentTruncated"
33
+ ref="tooltipRef"
34
+ :content="selectionLabel"
35
+ :trigger="selectionLabelRef"
36
+ />
37
+ </div>
25
38
  </template>
26
39
  </template>
27
40
  </div>
28
41
  </template>
29
42
 
30
43
  <script lang="ts">
31
- import { PropType, computed, defineComponent, ref, toRefs } from 'vue-demi';
44
+ import { PropType, computed, defineComponent, ref, toRefs, watch, nextTick } from 'vue-demi';
32
45
  import { useProxyModelValue } from '../../../../hooks';
33
46
  import { isEmpty, isEqual } from '../../../../utils';
34
47
  import { SelectItem, SelectModelValue } from '../../types';
35
48
  import OrSelectControlInput from '../or-select-control-input/OrSelectControlInput.vue';
36
49
  import OrSelectPlaceholder from '../or-select-placeholder/OrSelectPlaceholder.vue';
50
+ import { OrTooltipV3 as OrTooltip } from '../../../or-tooltip-v3';
37
51
  import { SelectSingleControlInput } from './styles';
38
52
 
39
53
  export default defineComponent({
@@ -42,6 +56,7 @@ export default defineComponent({
42
56
  components: {
43
57
  OrSelectPlaceholder,
44
58
  OrSelectControlInput,
59
+ OrTooltip,
45
60
  },
46
61
 
47
62
  model: {
@@ -101,6 +116,9 @@ export default defineComponent({
101
116
  // Refs
102
117
  const root = ref<HTMLDivElement>();
103
118
  const searchControl = ref<InstanceType<typeof OrSelectControlInput>>();
119
+ const selectionLabelRef = ref<HTMLDialogElement>();
120
+ const tooltipRef = ref<InstanceType<typeof OrTooltip>>();
121
+ const isContentTruncated = ref(false);
104
122
 
105
123
  // Props
106
124
  const { modelValue, model, options } = toRefs(props);
@@ -120,10 +138,27 @@ export default defineComponent({
120
138
  return selection.value?.label;
121
139
  });
122
140
 
141
+ /* NOTE: using watch here due to async action.
142
+ Computed don't work since we need not just to track the data but to analyze UI after the re-render */
143
+ watch(model, async () => {
144
+ await nextTick();
145
+ if (selectionLabelRef.value) {
146
+ isContentTruncated.value = selectionLabelRef.value.scrollWidth > selectionLabelRef.value.clientWidth;
147
+ }
148
+ });
149
+
123
150
  const focused = computed(() => {
124
151
  return searchControl.value?.focused;
125
152
  });
126
153
 
154
+ const openTooltip = () => {
155
+ if (tooltipRef.value) tooltipRef.value.open();
156
+ };
157
+
158
+ const closeTooltip = () => {
159
+ if (tooltipRef.value) tooltipRef.value.close();
160
+ };
161
+
127
162
  // Styles
128
163
  const rootStyles = computed(() => ([
129
164
  'or-select-single-control-v3',
@@ -147,6 +182,11 @@ export default defineComponent({
147
182
  selectionLabel,
148
183
  focus,
149
184
  focused,
185
+ isContentTruncated,
186
+ selectionLabelRef,
187
+ tooltipRef,
188
+ openTooltip,
189
+ closeTooltip,
150
190
  };
151
191
  },
152
192
  });