@onereach/ui-components 2.65.2-beta.1960.0 → 2.65.2-beta.1968.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 (73) hide show
  1. package/dist/v2/{OrCardCollection-061b2b90.js → OrCardCollection-02cbe47d.js} +2 -2
  2. package/dist/v2/{OrConfirm-c573c6ef.js → OrConfirm-72bde35b.js} +1 -1
  3. package/dist/v2/{OrIconButton-b98d623d.js → OrIconButton-a2dda348.js} +1 -1
  4. package/dist/v2/{OrInlineInput-72d73db6.js → OrInlineInput-a0949faa.js} +1 -1
  5. package/dist/v2/{OrInlineTextarea-ffb297ea.js → OrInlineTextarea-3acb0a46.js} +1 -1
  6. package/dist/v2/{OrInput-6682207d.js → OrInput-6d4f6a8a.js} +1 -1
  7. package/dist/v2/{OrMenu-bb81644d.js → OrMenu-2ab4f346.js} +7 -2
  8. package/dist/v2/{OrModal-1e0bf943.js → OrModal-c8617460.js} +1 -1
  9. package/dist/v2/{OrNotification-6b7b2609.js → OrNotification-9c5b175d.js} +1 -1
  10. package/dist/v2/{OrSearch-09744b1a.js → OrSearch-5f24449b.js} +1 -1
  11. package/dist/v2/{OrSelect-881d238b.js → OrSelect-28121deb.js} +2 -2
  12. package/dist/v2/{OrTabs-b1f0c7b8.js → OrTabs-e4ab5c27.js} +1 -1
  13. package/dist/v2/{OrTag-fd4ac608.js → OrTag-f3dbd61f.js} +1 -1
  14. package/dist/v2/{OrTooltip-c1abdef8.js → OrTooltip-afe7030b.js} +5 -5
  15. package/dist/v2/components/or-menu-v3/OrMenu.stories3.d.ts +5 -0
  16. package/dist/v2/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
  17. package/dist/v2/index.js +15 -15
  18. package/dist/v2/index11.js +4 -4
  19. package/dist/v2/index2.js +15 -15
  20. package/dist/v2/index21.js +4 -4
  21. package/dist/v2/index32.js +2 -2
  22. package/dist/v2/index35.js +3 -3
  23. package/dist/v2/index37.js +3 -3
  24. package/dist/v2/index39.js +3 -3
  25. package/dist/v2/index49.js +1 -1
  26. package/dist/v2/index51.js +3 -3
  27. package/dist/v2/index53.js +3 -3
  28. package/dist/v2/index63.js +4 -4
  29. package/dist/v2/index66.js +5 -5
  30. package/dist/v2/index80.js +2 -2
  31. package/dist/v2/index82.js +3 -3
  32. package/dist/v2/index90.js +3 -3
  33. package/dist/v2/index93.js +1 -1
  34. package/dist/v2/{types-0b717b34.js → types-fbe618a6.js} +1 -1
  35. package/dist/v3/{OrCardCollection-9ef29028.js → OrCardCollection-30914b21.js} +2 -2
  36. package/dist/v3/{OrConfirm-d702594b.js → OrConfirm-9ab10313.js} +1 -1
  37. package/dist/v3/{OrIconButton-00f4cbf1.js → OrIconButton-f0aca58a.js} +1 -1
  38. package/dist/v3/{OrInlineInput-bc11abbb.js → OrInlineInput-9afe1893.js} +1 -1
  39. package/dist/v3/{OrInlineTextarea-99d59076.js → OrInlineTextarea-7c67a298.js} +1 -1
  40. package/dist/v3/{OrInput-b8babcfd.js → OrInput-6376195d.js} +1 -1
  41. package/dist/v3/{OrMenu-75ef8635.js → OrMenu-403f6aeb.js} +7 -2
  42. package/dist/v3/{OrModal-24d08f17.js → OrModal-ce7a20bf.js} +1 -1
  43. package/dist/v3/{OrNotification-6a03ef7a.js → OrNotification-4b09a862.js} +1 -1
  44. package/dist/v3/{OrSearch-a197b43a.js → OrSearch-8aaedf9d.js} +1 -1
  45. package/dist/v3/{OrSelect-e248bfcd.js → OrSelect-58a004fd.js} +2 -2
  46. package/dist/v3/{OrTabs-fe7039de.js → OrTabs-f7b645cd.js} +1 -1
  47. package/dist/v3/{OrTag-498707b4.js → OrTag-a3f5dbf4.js} +1 -1
  48. package/dist/v3/{OrTooltip-e7ddcda2.js → OrTooltip-36c6728c.js} +5 -5
  49. package/dist/v3/components/or-menu-v3/OrMenu.stories3.d.ts +5 -0
  50. package/dist/v3/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
  51. package/dist/v3/index.js +15 -15
  52. package/dist/v3/index11.js +4 -4
  53. package/dist/v3/index2.js +15 -15
  54. package/dist/v3/index21.js +4 -4
  55. package/dist/v3/index32.js +2 -2
  56. package/dist/v3/index35.js +3 -3
  57. package/dist/v3/index37.js +3 -3
  58. package/dist/v3/index39.js +3 -3
  59. package/dist/v3/index49.js +1 -1
  60. package/dist/v3/index51.js +3 -3
  61. package/dist/v3/index53.js +3 -3
  62. package/dist/v3/index63.js +4 -4
  63. package/dist/v3/index66.js +5 -5
  64. package/dist/v3/index80.js +2 -2
  65. package/dist/v3/index82.js +3 -3
  66. package/dist/v3/index90.js +3 -3
  67. package/dist/v3/index93.js +1 -1
  68. package/dist/v3/{types-21f4f684.js → types-bc8b5580.js} +1 -1
  69. package/package.json +1 -1
  70. package/src/components/or-menu-v3/OrMenu.stories3.ts +60 -0
  71. package/src/components/or-menu-v3/OrMenu.vue +3 -1
  72. package/src/components/or-menu-v3/styles.ts +2 -1
  73. package/src/components/or-tooltip-v3/OrTooltip.vue +5 -5
@@ -1,11 +1,11 @@
1
- export { M as ModalSize, s as OrModalV3 } from './OrModal-24d08f17.js';
1
+ export { M as ModalSize, s as OrModalV3 } from './OrModal-ce7a20bf.js';
2
2
  import 'vue-demi';
3
3
  import './useClassAttribute-47fdb016.js';
4
4
  import '@vueuse/core';
5
- import './OrIconButton-00f4cbf1.js';
5
+ import './OrIconButton-f0aca58a.js';
6
6
  import './OrIcon-e2fa4cf8.js';
7
7
  import 'vue';
8
- import './OrTooltip-e7ddcda2.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,11 +1,11 @@
1
- export { N as NotificationVariant, s as OrNotificationV3 } from './OrNotification-6a03ef7a.js';
1
+ export { N as NotificationVariant, s as OrNotificationV3 } from './OrNotification-4b09a862.js';
2
2
  import 'vue-demi';
3
3
  import './useClassAttribute-47fdb016.js';
4
4
  import '@vueuse/core';
5
- import './OrIconButton-00f4cbf1.js';
5
+ import './OrIconButton-f0aca58a.js';
6
6
  import './OrIcon-e2fa4cf8.js';
7
7
  import 'vue';
8
- import './OrTooltip-e7ddcda2.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,15 +1,15 @@
1
- export { s as OrSearchV3 } from './OrSearch-a197b43a.js';
1
+ export { s as OrSearchV3 } from './OrSearch-8aaedf9d.js';
2
2
  export { a as SearchSize } from './OrInputBox-634230b1.js';
3
3
  import 'vue-demi';
4
4
  import '@vueuse/core';
5
5
  import './useClassAttribute-47fdb016.js';
6
- import './OrInput-b8babcfd.js';
6
+ import './OrInput-6376195d.js';
7
7
  import './OrError-19a62a18.js';
8
8
  import 'vue';
9
9
  import './OrHint-73835593.js';
10
- import './OrIconButton-00f4cbf1.js';
10
+ import './OrIconButton-f0aca58a.js';
11
11
  import './OrIcon-e2fa4cf8.js';
12
- import './OrTooltip-e7ddcda2.js';
12
+ import './OrTooltip-36c6728c.js';
13
13
  import './OrPopover-3525c670.js';
14
14
  import '@floating-ui/dom';
15
15
  import './useElevation-0e973238.js';
@@ -1,4 +1,4 @@
1
- export { s as OrSelectV3 } from './OrSelect-e248bfcd.js';
1
+ export { s as OrSelectV3 } from './OrSelect-58a004fd.js';
2
2
  export { a as SelectSize } from './OrInputBox-634230b1.js';
3
3
  import 'vue-demi';
4
4
  import './dropdown-open-0d314aa4.js';
@@ -13,9 +13,9 @@ import './OrError-19a62a18.js';
13
13
  import './OrExpansionPanel-65afdfad.js';
14
14
  import './OrIcon-e2fa4cf8.js';
15
15
  import './OrHint-73835593.js';
16
- import './OrInput-b8babcfd.js';
17
- import './OrIconButton-00f4cbf1.js';
18
- import './OrTooltip-e7ddcda2.js';
16
+ import './OrInput-6376195d.js';
17
+ import './OrIconButton-f0aca58a.js';
18
+ import './OrTooltip-36c6728c.js';
19
19
  import './OrPopover-3525c670.js';
20
20
  import '@floating-ui/dom';
21
21
  import './useElevation-0e973238.js';
@@ -24,4 +24,4 @@ import './OrBottomSheet-9de57dd0.js';
24
24
  import './OrOverlay-27050c19.js';
25
25
  import './OrTeleport.vue3-8099178c.js';
26
26
  import './OrMenuItem-60afcdcb.js';
27
- import './OrTag-498707b4.js';
27
+ import './OrTag-a3f5dbf4.js';
@@ -1,11 +1,11 @@
1
- export { s as OrTabsV3, T as TabsVariant } from './OrTabs-fe7039de.js';
1
+ export { s as OrTabsV3, T as TabsVariant } from './OrTabs-f7b645cd.js';
2
2
  import '@vueuse/core';
3
3
  import 'vue-demi';
4
4
  import './useClassAttribute-47fdb016.js';
5
5
  import './OrIcon-e2fa4cf8.js';
6
6
  import 'vue';
7
7
  import './OrMenuItem-60afcdcb.js';
8
- import './OrMenu-75ef8635.js';
8
+ import './OrMenu-403f6aeb.js';
9
9
  import './OrPopover-3525c670.js';
10
10
  import '@floating-ui/dom';
11
11
  import './useElevation-0e973238.js';
@@ -1,11 +1,11 @@
1
- export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-498707b4.js';
1
+ export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-a3f5dbf4.js';
2
2
  import 'vue-demi';
3
3
  import './useClassAttribute-47fdb016.js';
4
4
  import '@vueuse/core';
5
- import './OrIconButton-00f4cbf1.js';
5
+ import './OrIconButton-f0aca58a.js';
6
6
  import './OrIcon-e2fa4cf8.js';
7
7
  import 'vue';
8
- import './OrTooltip-e7ddcda2.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-21f4f684.js';
1
+ export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-bc8b5580.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-00f4cbf1.js';
7
+ import './OrIconButton-f0aca58a.js';
8
8
  import './useClassAttribute-47fdb016.js';
9
9
  import './OrIcon-e2fa4cf8.js';
10
- import './OrTooltip-e7ddcda2.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-e7ddcda2.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';
@@ -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-00f4cbf1.js';
5
+ import { s as script$2 } from './OrIconButton-f0aca58a.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.65.2-beta.1960.0",
3
+ "version": "2.65.2-beta.1968.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -3,6 +3,7 @@ import { Meta, StoryFn } from '@storybook/vue3';
3
3
  import { ref } from 'vue-demi';
4
4
  import { OrButtonV3 as OrButton } from '../or-button-v3';
5
5
  import { OrMenuItemV3 as OrMenuItem } from '../or-menu-item-v3';
6
+ import { OrIconV3 as OrIcon } from '../or-icon-v3';
6
7
  import OrMenuDocs from './OrMenu.docs.mdx';
7
8
  import OrMenu from './OrMenu.vue';
8
9
  import { MenuPlacement } from './props';
@@ -105,3 +106,62 @@ Menu.args = {
105
106
  <OrMenuItem>Very Looooooooooooooooooooooooooooooooooooooooooooooooooooooooong Item</OrMenuItem>
106
107
  `,
107
108
  };
109
+
110
+ const OrderDropdownTemplate: StoryFn<typeof OrMenu> = (args) => ({
111
+ components: {
112
+ OrButton,
113
+ OrMenu,
114
+ OrMenuItem,
115
+ OrIcon,
116
+ },
117
+
118
+ setup() {
119
+ // Refs
120
+ const button = ref<InstanceType<typeof OrButton>>();
121
+ const menu = ref<InstanceType<typeof OrMenu>>();
122
+
123
+ return {
124
+ args,
125
+ button,
126
+ menu,
127
+ onUpdateState: action('update:state'),
128
+ };
129
+ },
130
+
131
+ template: `
132
+ <div class="contents">
133
+ <OrButton
134
+ ref="button"
135
+ variant="link"
136
+ @click="menu.open()"
137
+ >
138
+ Last Updated
139
+ <OrIcon
140
+ :icon="menu?.isOpen === 'closed' ? 'arrow_drop_down': 'arrow_drop_up'"
141
+ />
142
+ </OrButton>
143
+
144
+ <OrMenu
145
+ ref="menu"
146
+ v-bind="args"
147
+ :trigger="button?.root"
148
+ @update:state="onUpdateState"
149
+ class="min-w-[160px]"
150
+ >
151
+ ${args.default}
152
+ </OrMenu>
153
+ </div>
154
+ `,
155
+ });
156
+
157
+ export const OrderDropdown = OrderDropdownTemplate.bind({});
158
+
159
+ OrderDropdown.args = {
160
+ // Slots
161
+ default: `
162
+ <OrMenuItem selected>Last Updated</OrMenuItem>
163
+ <OrMenuItem>Firs Updated</OrMenuItem>
164
+ <OrMenuItem>A - Z</OrMenuItem>
165
+ <OrMenuItem>Z - A</OrMenuItem>
166
+ `,
167
+ };
@@ -59,6 +59,7 @@ export default defineComponent({
59
59
  'root',
60
60
  'open',
61
61
  'close',
62
+ 'isOpen',
62
63
  ],
63
64
 
64
65
  setup() {
@@ -67,7 +68,7 @@ export default defineComponent({
67
68
 
68
69
  const popover = ref<InstanceType<typeof OrPopover>>();
69
70
  const popoverRoot = computed(() => popover.value?.root);
70
-
71
+ const isOpen = computed(() => popover.value?.state);
71
72
  // Styles
72
73
  const classAttribute = useClassAttribute();
73
74
 
@@ -118,6 +119,7 @@ export default defineComponent({
118
119
  rootStyles,
119
120
  bodyStyles,
120
121
  open,
122
+ isOpen,
121
123
  close,
122
124
  onClick,
123
125
  };
@@ -8,6 +8,7 @@ export const MenuBody: string[] = [
8
8
  'overflow-y-auto',
9
9
 
10
10
  // Box
11
- 'max-w-[128px]',
11
+ 'min-w-[160px]',
12
+ 'max-w-[256px]',
12
13
  'max-h-[340px]',
13
14
  ];
@@ -25,7 +25,7 @@
25
25
  </template>
26
26
 
27
27
  <script lang="ts">
28
- import { useDebounceFn, useElementHover } from '@vueuse/core';
28
+ import { useElementHover } from '@vueuse/core';
29
29
  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';
@@ -85,21 +85,21 @@ export default defineComponent({
85
85
  ]);
86
86
 
87
87
  // Methods
88
- const open = useDebounceFn(() => {
88
+ function open(): void {
89
89
  const popoverInstance = popover.value;
90
90
 
91
91
  if (popoverInstance) {
92
92
  (popoverInstance.open as () => void)();
93
93
  }
94
- }, 1000);
94
+ }
95
95
 
96
- const close = useDebounceFn(() => {
96
+ function close(): void {
97
97
  const popoverInstance = popover.value;
98
98
 
99
99
  if (popoverInstance) {
100
100
  (popoverInstance.close as () => void)();
101
101
  }
102
- }, 500);
102
+ }
103
103
 
104
104
  // Effects
105
105
  // #region Hover