@onereach/ui-components 2.65.2-beta.1969.0 → 2.65.2-beta.1972.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.
- package/dist/v2/{OrCardCollection-02cbe47d.js → OrCardCollection-064282ad.js} +2 -2
- package/dist/v2/{OrConfirm-72bde35b.js → OrConfirm-924ae32c.js} +1 -1
- package/dist/v2/{OrIconButton-a2dda348.js → OrIconButton-d4e78dbd.js} +2 -2
- package/dist/v2/{OrInlineInput-a0949faa.js → OrInlineInput-0fea477d.js} +1 -1
- package/dist/v2/{OrInlineTextarea-3acb0a46.js → OrInlineTextarea-6d18caed.js} +1 -1
- package/dist/v2/{OrInput-6d4f6a8a.js → OrInput-385f48da.js} +1 -1
- package/dist/v2/{OrMenu-bb81644d.js → OrMenu-a2dedea3.js} +13 -4
- package/dist/v2/{OrMenuItem-9034aece.js → OrMenuItem-db9bf83a.js} +2 -2
- package/dist/v2/{OrModal-c8617460.js → OrModal-80e15678.js} +1 -1
- package/dist/v2/{OrNotification-9c5b175d.js → OrNotification-3d1dab4c.js} +1 -1
- package/dist/v2/{OrPopover-9080fc00.js → OrPopover-c6e5acf4.js} +13 -4
- package/dist/v2/{OrSearch-5f24449b.js → OrSearch-b087463b.js} +1 -1
- package/dist/v2/{OrSelect-28121deb.js → OrSelect-bd41da4a.js} +4 -4
- package/dist/v2/{OrTabs-b1f0c7b8.js → OrTabs-1ad5fb57.js} +3 -3
- package/dist/v2/{OrTag-f3dbd61f.js → OrTag-5e12d98e.js} +1 -1
- package/dist/v2/{OrTooltip-afe7030b.js → OrTooltip-c51ebe82.js} +1 -1
- package/dist/v2/components/or-menu-v3/OrMenu.stories3.d.ts +5 -0
- package/dist/v2/components/or-menu-v3/OrMenu.vue.d.ts +4 -0
- package/dist/v2/components/or-popover-v3/OrPopover.vue.d.ts +4 -0
- package/dist/v2/index.js +17 -17
- package/dist/v2/index11.js +5 -5
- package/dist/v2/index2.js +17 -17
- package/dist/v2/index21.js +5 -5
- package/dist/v2/index32.js +3 -3
- package/dist/v2/index35.js +4 -4
- package/dist/v2/index37.js +4 -4
- package/dist/v2/index39.js +4 -4
- package/dist/v2/index48.js +1 -1
- package/dist/v2/index49.js +2 -2
- package/dist/v2/index51.js +4 -4
- package/dist/v2/index53.js +4 -4
- package/dist/v2/index57.js +1 -1
- package/dist/v2/index63.js +5 -5
- package/dist/v2/index66.js +7 -7
- package/dist/v2/index80.js +4 -4
- package/dist/v2/index82.js +4 -4
- package/dist/v2/index90.js +4 -4
- package/dist/v2/index93.js +2 -2
- package/dist/v2/{types-fbe618a6.js → types-d1571b53.js} +1 -1
- package/dist/v3/{OrCardCollection-30914b21.js → OrCardCollection-aabb79d6.js} +2 -2
- package/dist/v3/{OrConfirm-9ab10313.js → OrConfirm-9aa2eb42.js} +1 -1
- package/dist/v3/{OrIconButton-f0aca58a.js → OrIconButton-7905be29.js} +2 -2
- package/dist/v3/{OrInlineInput-9afe1893.js → OrInlineInput-acf4170c.js} +1 -1
- package/dist/v3/{OrInlineTextarea-7c67a298.js → OrInlineTextarea-271d41ba.js} +1 -1
- package/dist/v3/{OrInput-6376195d.js → OrInput-0accb96c.js} +1 -1
- package/dist/v3/{OrMenu-75ef8635.js → OrMenu-320b485f.js} +13 -4
- package/dist/v3/{OrMenuItem-60afcdcb.js → OrMenuItem-9cfc4cc4.js} +2 -2
- package/dist/v3/{OrModal-ce7a20bf.js → OrModal-3e294644.js} +1 -1
- package/dist/v3/{OrNotification-4b09a862.js → OrNotification-5806b30e.js} +1 -1
- package/dist/v3/{OrPopover-3525c670.js → OrPopover-16b6f117.js} +14 -3
- package/dist/v3/{OrSearch-8aaedf9d.js → OrSearch-d7662fa5.js} +1 -1
- package/dist/v3/{OrSelect-58a004fd.js → OrSelect-60ab3704.js} +4 -4
- package/dist/v3/{OrTabs-fe7039de.js → OrTabs-ec203edf.js} +3 -3
- package/dist/v3/{OrTag-a3f5dbf4.js → OrTag-7e2abc90.js} +1 -1
- package/dist/v3/{OrTooltip-36c6728c.js → OrTooltip-cbb14b43.js} +1 -1
- package/dist/v3/components/or-menu-v3/OrMenu.stories3.d.ts +5 -0
- package/dist/v3/components/or-menu-v3/OrMenu.vue.d.ts +4 -0
- package/dist/v3/components/or-popover-v3/OrPopover.vue.d.ts +4 -0
- package/dist/v3/index.js +17 -17
- package/dist/v3/index11.js +5 -5
- package/dist/v3/index2.js +17 -17
- package/dist/v3/index21.js +5 -5
- package/dist/v3/index32.js +3 -3
- package/dist/v3/index35.js +4 -4
- package/dist/v3/index37.js +4 -4
- package/dist/v3/index39.js +4 -4
- package/dist/v3/index48.js +1 -1
- package/dist/v3/index49.js +2 -2
- package/dist/v3/index51.js +4 -4
- package/dist/v3/index53.js +4 -4
- package/dist/v3/index57.js +1 -1
- package/dist/v3/index63.js +5 -5
- package/dist/v3/index66.js +7 -7
- package/dist/v3/index80.js +4 -4
- package/dist/v3/index82.js +4 -4
- package/dist/v3/index90.js +4 -4
- package/dist/v3/index93.js +2 -2
- package/dist/v3/{types-bc8b5580.js → types-ac61ba80.js} +1 -1
- package/package.json +2 -2
- package/src/components/or-menu-item-v3/styles.ts +2 -2
- package/src/components/or-menu-v3/OrMenu.stories3.ts +64 -0
- package/src/components/or-menu-v3/OrMenu.vue +10 -2
- package/src/components/or-menu-v3/styles.ts +2 -1
- package/src/components/or-popover-v3/OrPopover.vue +14 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
>
|
|
7
7
|
<OrPopover
|
|
8
8
|
ref="popover"
|
|
9
|
-
:variant="'
|
|
9
|
+
:variant="'auto'"
|
|
10
10
|
:trigger="trigger"
|
|
11
11
|
:placement="placement"
|
|
12
12
|
:full-width="false"
|
|
@@ -59,6 +59,8 @@ export default defineComponent({
|
|
|
59
59
|
'root',
|
|
60
60
|
'open',
|
|
61
61
|
'close',
|
|
62
|
+
'isOpen',
|
|
63
|
+
'toggle',
|
|
62
64
|
],
|
|
63
65
|
|
|
64
66
|
setup() {
|
|
@@ -67,7 +69,7 @@ export default defineComponent({
|
|
|
67
69
|
|
|
68
70
|
const popover = ref<InstanceType<typeof OrPopover>>();
|
|
69
71
|
const popoverRoot = computed(() => popover.value?.root);
|
|
70
|
-
|
|
72
|
+
const isOpen = computed(() => popover.value?.isOpen);
|
|
71
73
|
// Styles
|
|
72
74
|
const classAttribute = useClassAttribute();
|
|
73
75
|
|
|
@@ -98,6 +100,10 @@ export default defineComponent({
|
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
102
|
|
|
103
|
+
function toggle(): void {
|
|
104
|
+
isOpen.value ? close() : open();
|
|
105
|
+
}
|
|
106
|
+
|
|
101
107
|
// Handlers
|
|
102
108
|
function onClick(event: Event): void {
|
|
103
109
|
const path = event.composedPath() as HTMLElement[];
|
|
@@ -117,8 +123,10 @@ export default defineComponent({
|
|
|
117
123
|
popoverRoot,
|
|
118
124
|
rootStyles,
|
|
119
125
|
bodyStyles,
|
|
126
|
+
isOpen,
|
|
120
127
|
open,
|
|
121
128
|
close,
|
|
129
|
+
toggle,
|
|
122
130
|
onClick,
|
|
123
131
|
};
|
|
124
132
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<template v-if="isMobile && variant === 'auto' || variant === 'bottom-sheet'">
|
|
22
22
|
<OrBottomSheet
|
|
23
23
|
ref="bottomSheet"
|
|
24
|
-
@update:state="
|
|
24
|
+
@update:state="handleBottomSheetState"
|
|
25
25
|
>
|
|
26
26
|
<slot />
|
|
27
27
|
</OrBottomSheet>
|
|
@@ -83,6 +83,7 @@ export default defineComponent({
|
|
|
83
83
|
expose: [
|
|
84
84
|
'root',
|
|
85
85
|
'state',
|
|
86
|
+
'isOpen',
|
|
86
87
|
'open',
|
|
87
88
|
'close',
|
|
88
89
|
],
|
|
@@ -112,6 +113,7 @@ export default defineComponent({
|
|
|
112
113
|
|
|
113
114
|
// State
|
|
114
115
|
const state = ref<'open' | 'closed'>('closed');
|
|
116
|
+
const isOpen = computed(() => state.value === 'open');
|
|
115
117
|
|
|
116
118
|
// Events
|
|
117
119
|
watch(state, (value) => {
|
|
@@ -185,6 +187,15 @@ export default defineComponent({
|
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
|
|
190
|
+
// Handlers
|
|
191
|
+
function handleBottomSheetState(bottomShetState: string): void {
|
|
192
|
+
if (bottomShetState === 'closed') {
|
|
193
|
+
state.value = 'closed';
|
|
194
|
+
} else {
|
|
195
|
+
state.value = 'open';
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
188
199
|
// Effects
|
|
189
200
|
watchPostEffect(() => {
|
|
190
201
|
const rootElement = unref(root);
|
|
@@ -233,9 +244,11 @@ export default defineComponent({
|
|
|
233
244
|
root,
|
|
234
245
|
bottomSheet,
|
|
235
246
|
bottomSheetRoot,
|
|
247
|
+
handleBottomSheetState,
|
|
236
248
|
rootStyles,
|
|
237
249
|
bodyStyles,
|
|
238
250
|
state,
|
|
251
|
+
isOpen,
|
|
239
252
|
open,
|
|
240
253
|
close,
|
|
241
254
|
};
|