@onereach/ui-components 2.62.3-beta.1899.0 → 2.62.3-beta.1902.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 (74) hide show
  1. package/dist/v2/{OrConfirm-d561bf82.js → OrConfirm-f3aed6d3.js} +1 -1
  2. package/dist/v2/{OrIconButton-1b34f3fa.js → OrIconButton-94c69467.js} +1 -1
  3. package/dist/v2/{OrInlineInput-e754cb9f.js → OrInlineInput-50da2b1f.js} +1 -1
  4. package/dist/v2/{OrInlineTextarea-7dc58bb1.js → OrInlineTextarea-94253b64.js} +1 -1
  5. package/dist/v2/{OrInput-0dcfba2a.js → OrInput-040147f3.js} +1 -1
  6. package/dist/v2/{OrModal-1ed53441.js → OrModal-e4439825.js} +1 -1
  7. package/dist/v2/{OrNotification-e2d510b3.js → OrNotification-be6132e6.js} +1 -1
  8. package/dist/v2/{OrSearch-45ea8c33.js → OrSearch-375ad422.js} +1 -1
  9. package/dist/v2/{OrSelect-b44cac14.js → OrSelect-846e9a87.js} +33 -13
  10. package/dist/v2/{OrTag-c42c3f9c.js → OrTag-02320f5f.js} +1 -1
  11. package/dist/v2/{OrTooltip-caeac590.js → OrTooltip-afe7030b.js} +33 -3
  12. package/dist/v2/components/or-select-v3/OrSelect.vue.d.ts +2 -2
  13. package/dist/v2/components/or-tooltip-v3/styles.d.ts +2 -0
  14. package/dist/v2/index.d.ts +0 -1
  15. package/dist/v2/index.js +12 -13
  16. package/dist/v2/index2.js +12 -13
  17. package/dist/v2/index20.js +4 -4
  18. package/dist/v2/index31.js +2 -2
  19. package/dist/v2/index34.js +3 -3
  20. package/dist/v2/index36.js +3 -3
  21. package/dist/v2/index38.js +3 -3
  22. package/dist/v2/index50.js +3 -3
  23. package/dist/v2/index52.js +3 -3
  24. package/dist/v2/index62.js +4 -4
  25. package/dist/v2/index64.js +5 -6
  26. package/dist/v2/index79.js +3 -3
  27. package/dist/v2/index87.js +3 -3
  28. package/dist/v2/index90.js +1 -1
  29. package/dist/v2/index91.js +6 -1
  30. package/dist/v2/index92.js +1 -5
  31. package/dist/v2/{types-8ea6482d.js → types-dd4c7282.js} +1 -1
  32. package/dist/v3/{OrConfirm-a9d3f157.js → OrConfirm-58aa4260.js} +1 -1
  33. package/dist/v3/{OrIconButton-f9226adf.js → OrIconButton-eef9eb43.js} +1 -1
  34. package/dist/v3/{OrInlineInput-8f473205.js → OrInlineInput-0c87838c.js} +1 -1
  35. package/dist/v3/{OrInlineTextarea-86f4506d.js → OrInlineTextarea-d50f03b7.js} +1 -1
  36. package/dist/v3/{OrInput-f51916d4.js → OrInput-d34c8571.js} +1 -1
  37. package/dist/v3/{OrModal-0713f927.js → OrModal-179f5a1a.js} +1 -1
  38. package/dist/v3/{OrNotification-7ef1b4e7.js → OrNotification-4a0dc24a.js} +1 -1
  39. package/dist/v3/{OrSearch-e27cadbf.js → OrSearch-95d4e098.js} +1 -1
  40. package/dist/v3/{OrSelect-9d821ef2.js → OrSelect-32f188bd.js} +32 -12
  41. package/dist/v3/{OrTag-60585386.js → OrTag-d1f3a0d0.js} +1 -1
  42. package/dist/v3/{OrTooltip-30e05f9e.js → OrTooltip-36c6728c.js} +33 -3
  43. package/dist/v3/components/or-select-v3/OrSelect.vue.d.ts +2 -2
  44. package/dist/v3/components/or-tooltip-v3/styles.d.ts +2 -0
  45. package/dist/v3/index.d.ts +0 -1
  46. package/dist/v3/index.js +12 -13
  47. package/dist/v3/index2.js +12 -13
  48. package/dist/v3/index20.js +4 -4
  49. package/dist/v3/index31.js +2 -2
  50. package/dist/v3/index34.js +3 -3
  51. package/dist/v3/index36.js +3 -3
  52. package/dist/v3/index38.js +3 -3
  53. package/dist/v3/index50.js +3 -3
  54. package/dist/v3/index52.js +3 -3
  55. package/dist/v3/index62.js +4 -4
  56. package/dist/v3/index64.js +5 -6
  57. package/dist/v3/index79.js +3 -3
  58. package/dist/v3/index87.js +3 -3
  59. package/dist/v3/index90.js +1 -1
  60. package/dist/v3/index91.js +6 -1
  61. package/dist/v3/index92.js +1 -5
  62. package/dist/v3/{types-e4403486.js → types-8ff779b1.js} +1 -1
  63. package/package.json +1 -1
  64. package/src/components/or-select-v3/OrSelect.vue +6 -9
  65. package/src/components/or-tooltip-v3/OrTooltip.vue +3 -2
  66. package/src/components/or-tooltip-v3/styles.ts +55 -0
  67. package/src/index.ts +0 -1
  68. package/dist/v2/directives/index.d.ts +0 -2
  69. package/dist/v2/dropdown-open-0d314aa4.js +0 -28
  70. package/dist/v2/index93.js +0 -3
  71. package/dist/v3/directives/index.d.ts +0 -2
  72. package/dist/v3/dropdown-open-0d314aa4.js +0 -28
  73. package/dist/v3/index93.js +0 -3
  74. package/src/directives/index.ts +0 -2
@@ -1,7 +1,6 @@
1
- export { s as OrSelectV3 } from './OrSelect-9d821ef2.js';
1
+ export { s as OrSelectV3 } from './OrSelect-32f188bd.js';
2
2
  export { a as SelectSize } from './OrInputBox-634230b1.js';
3
3
  import 'vue-demi';
4
- import './dropdown-open-0d314aa4.js';
5
4
  import './useClassAttribute-47fdb016.js';
6
5
  import './useOverflow-ac506c65.js';
7
6
  import '@vueuse/core';
@@ -13,9 +12,9 @@ import './OrError-19a62a18.js';
13
12
  import './OrExpansionPanel-1e2a6375.js';
14
13
  import './OrIcon-b3906e35.js';
15
14
  import './OrHint-73835593.js';
16
- import './OrInput-f51916d4.js';
17
- import './OrIconButton-f9226adf.js';
18
- import './OrTooltip-30e05f9e.js';
15
+ import './OrInput-d34c8571.js';
16
+ import './OrIconButton-eef9eb43.js';
17
+ import './OrTooltip-36c6728c.js';
19
18
  import './OrPopover-3525c670.js';
20
19
  import '@floating-ui/dom';
21
20
  import './useElevation-0e973238.js';
@@ -24,4 +23,4 @@ import './OrBottomSheet-9de57dd0.js';
24
23
  import './OrOverlay-27050c19.js';
25
24
  import './OrTeleport.vue3-8099178c.js';
26
25
  import './OrMenuItem-8773d073.js';
27
- import './OrTag-60585386.js';
26
+ import './OrTag-d1f3a0d0.js';
@@ -1,11 +1,11 @@
1
- export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-60585386.js';
1
+ export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-d1f3a0d0.js';
2
2
  import 'vue-demi';
3
3
  import './useClassAttribute-47fdb016.js';
4
4
  import '@vueuse/core';
5
- import './OrIconButton-f9226adf.js';
5
+ import './OrIconButton-eef9eb43.js';
6
6
  import './OrIcon-b3906e35.js';
7
7
  import 'vue';
8
- import './OrTooltip-30e05f9e.js';
8
+ import './OrTooltip-36c6728c.js';
9
9
  import './OrPopover-3525c670.js';
10
10
  import '@floating-ui/dom';
11
11
  import './useElevation-0e973238.js';
@@ -1,13 +1,13 @@
1
- export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-e4403486.js';
1
+ export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-8ff779b1.js';
2
2
  export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-0665462d.js';
3
3
  import '@vueuse/core';
4
4
  import 'vue-demi';
5
5
  import './OrTeleport.vue3-8099178c.js';
6
6
  import 'vue';
7
- import './OrIconButton-f9226adf.js';
7
+ import './OrIconButton-eef9eb43.js';
8
8
  import './useClassAttribute-47fdb016.js';
9
9
  import './OrIcon-b3906e35.js';
10
- import './OrTooltip-30e05f9e.js';
10
+ import './OrTooltip-36c6728c.js';
11
11
  import './OrPopover-3525c670.js';
12
12
  import '@floating-ui/dom';
13
13
  import './useElevation-0e973238.js';
@@ -1,4 +1,4 @@
1
- export { s as OrTooltipV3 } from './OrTooltip-30e05f9e.js';
1
+ export { s as OrTooltipV3 } from './OrTooltip-36c6728c.js';
2
2
  export { P as TooltipPlacement } from './OrPopover-3525c670.js';
3
3
  import '@vueuse/core';
4
4
  import 'vue-demi';
@@ -1,2 +1,7 @@
1
- export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
1
+ export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
2
+ export { u as useElevation } from './useElevation-0e973238.js';
3
+ export { u as useOverflow } from './useOverflow-ac506c65.js';
4
+ export { u as useResponsive } from './useResponsive-a02e95b7.js';
5
+ export { u as useToggle } from './useToggle-29e4d7c7.js';
2
6
  import 'vue-demi';
7
+ import '@vueuse/core';
@@ -1,7 +1,3 @@
1
- export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
2
- export { u as useElevation } from './useElevation-0e973238.js';
3
- export { u as useOverflow } from './useOverflow-ac506c65.js';
4
1
  export { u as useResponsive } from './useResponsive-a02e95b7.js';
5
- export { u as useToggle } from './useToggle-29e4d7c7.js';
6
- import 'vue-demi';
7
2
  import '@vueuse/core';
3
+ import 'vue-demi';
@@ -2,7 +2,7 @@ import { useToggle } from '@vueuse/core';
2
2
  import { defineComponent, ref, computed, onBeforeMount, onBeforeUnmount, nextTick } from 'vue-demi';
3
3
  import { s as script$4 } from './OrTeleport.vue3-8099178c.js';
4
4
  import { T as ToastType, P as PositionsX, b as PositionsY, c as TransitionType, d as useToastEventBus, a as useQueue } from './useToast-0665462d.js';
5
- import { s as script$2 } from './OrIconButton-f9226adf.js';
5
+ import { s as script$2 } from './OrIconButton-eef9eb43.js';
6
6
  import { s as script$3 } from './OrLoader-60943812.js';
7
7
  import { resolveComponent, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createVNode, toDisplayString, createElementVNode, createBlock, withModifiers, withCtx, TransitionGroup, Fragment, renderList, mergeProps } from 'vue';
8
8
  import { s as styleInject } from './style-inject.es-4c6f2515.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "2.62.3-beta.1899.0",
3
+ "version": "2.62.3-beta.1902.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -21,7 +21,7 @@
21
21
 
22
22
  <OrInputBox
23
23
  ref="inputBox"
24
- v-dropdown-open="toggle"
24
+ v-dropdown-open="open"
25
25
  v-dropdown-close="close"
26
26
  :class="[popoverState === 'open' && 'rounded-b-0']"
27
27
  :size="size"
@@ -208,7 +208,8 @@
208
208
 
209
209
  <script lang="ts">
210
210
  import { computed, defineComponent, getCurrentInstance, onMounted, PropType, ref, watch } from 'vue-demi';
211
- import { DropdownClose, DropdownOpen } from '../../directives';
211
+ import { DropdownClose } from '../../directives/dropdown-close';
212
+ import { DropdownOpen } from '../../directives/dropdown-open';
212
213
  import { useClassAttribute, useOverflow } from '../../hooks';
213
214
  import { OrCheckboxV3 as OrCheckbox } from '../or-checkbox-v3';
214
215
  import { OrErrorV3 as OrError } from '../or-error-v3';
@@ -464,16 +465,12 @@ export default defineComponent({
464
465
  });
465
466
 
466
467
  // Methods
467
- function toggle(): void {
468
+ function open(): void {
468
469
  if (!readonly.value && !props.disabled) {
469
470
  const popoverInstance = popover.value;
470
471
 
471
472
  if (popoverInstance) {
472
- if (popoverState.value === 'open') {
473
- (popoverInstance.close as () => void)();
474
- } else {
475
- (popoverInstance.open as () => void)();
476
- }
473
+ (popoverInstance.open as () => void)();
477
474
  }
478
475
  }
479
476
  }
@@ -518,7 +515,7 @@ export default defineComponent({
518
515
  internalSearchOptions,
519
516
  resolvedSearchOptions,
520
517
  groupedOptions,
521
- toggle,
518
+ open,
522
519
  close,
523
520
  deselect,
524
521
  innerItems,
@@ -30,7 +30,7 @@ import { computed, defineComponent, PropType, ref, watch } from 'vue-demi';
30
30
  import { useClassAttribute } from '../../hooks';
31
31
  import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
32
32
  import { TooltipPlacement } from './props';
33
- import { TooltipBody, TooltipRoot } from './styles';
33
+ import { TooltipBody, TooltipBodyPlacements, TooltipRoot } from './styles';
34
34
 
35
35
  export default defineComponent({
36
36
  name: 'OrTooltip',
@@ -63,7 +63,7 @@ export default defineComponent({
63
63
  'close',
64
64
  ],
65
65
 
66
- setup() {
66
+ setup(props) {
67
67
  // Refs
68
68
  const root = ref<HTMLElement>();
69
69
 
@@ -81,6 +81,7 @@ export default defineComponent({
81
81
 
82
82
  const bodyStyles = computed(() => [
83
83
  ...TooltipBody,
84
+ ...TooltipBodyPlacements[props.placement],
84
85
  ]);
85
86
 
86
87
  // Methods
@@ -1,3 +1,5 @@
1
+ import { TooltipPlacement } from './props';
2
+
1
3
  export const TooltipRoot: string[] = [
2
4
  // Layout
3
5
  'inline-block',
@@ -9,6 +11,9 @@ export const TooltipBody: string[] = [
9
11
  'rounded-sm',
10
12
 
11
13
  // Sizing
14
+ 'mx-sm',
15
+ 'my-sm',
16
+
12
17
  'px-sm',
13
18
  'py-xs',
14
19
 
@@ -22,3 +27,53 @@ export const TooltipBody: string[] = [
22
27
  'text-inverse-on-surface',
23
28
  'dark:text-inverse-on-surface-dark',
24
29
  ];
30
+
31
+ export const TooltipBodyPlacements: Record<TooltipPlacement, string[]> = {
32
+ 'top': [],
33
+
34
+ 'top-start': [
35
+ // Sizing
36
+ 'ml-none',
37
+ ],
38
+
39
+ 'top-end': [
40
+ // Sizing
41
+ 'mr-none',
42
+ ],
43
+
44
+ 'bottom': [],
45
+
46
+ 'bottom-start': [
47
+ // Sizing
48
+ 'ml-none',
49
+ ],
50
+
51
+ 'bottom-end': [
52
+ // Sizing
53
+ 'mr-none',
54
+ ],
55
+
56
+ 'left': [],
57
+
58
+ 'left-start': [
59
+ // Sizing
60
+ 'mt-none',
61
+ ],
62
+
63
+ 'left-end': [
64
+ // Sizing
65
+ 'mb-none',
66
+ ],
67
+
68
+ 'right': [],
69
+
70
+ 'right-start': [
71
+ // Sizing
72
+ 'mt-none',
73
+ ],
74
+
75
+ 'right-end': [
76
+ // Sizing
77
+ 'mb-none',
78
+ ],
79
+ };
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from './components';
2
- export * from './directives';
3
2
  export * from './hooks';
4
3
  export * from './utils/functions/text';
@@ -1,2 +0,0 @@
1
- export * from './dropdown-close';
2
- export * from './dropdown-open';
@@ -1,28 +0,0 @@
1
- import { isVue3 } from 'vue-demi';
2
-
3
- const created$1 = (element, binding) => {
4
- element.addEventListener('keydown', event => {
5
- event.preventDefault();
6
- if (['Escape'].includes(event.key)) {
7
- binding.value(event);
8
- }
9
- });
10
- };
11
- const DropdownClose = {
12
- [isVue3 ? 'created' : 'bind']: created$1
13
- };
14
-
15
- const created = (element, binding) => {
16
- element.addEventListener('keydown', event => {
17
- event.preventDefault();
18
- if (['Enter', ' '].includes(event.key)) {
19
- binding.value(event);
20
- }
21
- });
22
- element.addEventListener('click', binding.value);
23
- };
24
- const DropdownOpen = {
25
- [isVue3 ? 'created' : 'bind']: created
26
- };
27
-
28
- export { DropdownClose as D, DropdownOpen as a };
@@ -1,3 +0,0 @@
1
- export { u as useResponsive } from './useResponsive-a02e95b7.js';
2
- import '@vueuse/core';
3
- import 'vue-demi';
@@ -1,2 +0,0 @@
1
- export * from './dropdown-close';
2
- export * from './dropdown-open';
@@ -1,28 +0,0 @@
1
- import { isVue3 } from 'vue-demi';
2
-
3
- const created$1 = (element, binding) => {
4
- element.addEventListener('keydown', event => {
5
- event.preventDefault();
6
- if (['Escape'].includes(event.key)) {
7
- binding.value(event);
8
- }
9
- });
10
- };
11
- const DropdownClose = {
12
- [isVue3 ? 'created' : 'bind']: created$1
13
- };
14
-
15
- const created = (element, binding) => {
16
- element.addEventListener('keydown', event => {
17
- event.preventDefault();
18
- if (['Enter', ' '].includes(event.key)) {
19
- binding.value(event);
20
- }
21
- });
22
- element.addEventListener('click', binding.value);
23
- };
24
- const DropdownOpen = {
25
- [isVue3 ? 'created' : 'bind']: created
26
- };
27
-
28
- export { DropdownClose as D, DropdownOpen as a };
@@ -1,3 +0,0 @@
1
- export { u as useResponsive } from './useResponsive-a02e95b7.js';
2
- import '@vueuse/core';
3
- import 'vue-demi';
@@ -1,2 +0,0 @@
1
- export * from './dropdown-close';
2
- export * from './dropdown-open';