@onereach/ui-components 2.68.1-beta.2065.0 → 2.68.1-beta.2068.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/bundled/v2/{OrCard-29116e1f.js → OrCard-58a1ba3e.js} +2 -2
- package/dist/bundled/v2/{OrCardCollection-0eaf7489.js → OrCardCollection-dac9fd1e.js} +17 -78
- package/dist/bundled/v2/{OrSelect-68aacb62.js → OrSelect-5fef3ccd.js} +1 -1
- package/dist/bundled/v2/components/index.js +4 -4
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -3
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +2 -0
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +3 -2
- package/dist/bundled/v2/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/bundled/v2/components/or-card-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-select-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-tag-v3/OrTag.stories3.d.ts +5 -0
- package/dist/bundled/v2/hooks/index.js +1 -1
- package/dist/bundled/v2/index.js +5 -5
- package/dist/bundled/v2/{useOverflow-43299d81.js → useOverflow-bfea931e.js} +7 -3
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-26d9a7c8.js → OrCardCollection.vue_vue_type_script_lang-7a07be47.js} +18 -40
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-58b92fb0.js → OrSelect.vue_vue_type_script_lang-6fd881cf.js} +1 -1
- package/dist/bundled/v3/components/index.js +3 -3
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -3
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +2 -0
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +3 -2
- package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/bundled/v3/components/or-select-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-tag-v3/OrTag.stories3.d.ts +5 -0
- package/dist/bundled/v3/hooks/index.js +1 -1
- package/dist/bundled/v3/index.js +199 -199
- package/dist/bundled/v3/{useOverflow-2468b718.js → useOverflow-f7916ce2.js} +7 -3
- package/dist/esm/v2/{OrCardCollection-7bf35252.js → OrCardCollection-e46b220e.js} +16 -76
- package/dist/esm/v2/{OrSelect-0e6e7868.js → OrSelect-81c1173a.js} +1 -1
- package/dist/esm/v2/components/index.js +3 -3
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -3
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +2 -0
- package/dist/esm/v2/components/or-card-collection-v3/index.js +3 -2
- package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/esm/v2/components/or-select-v3/index.js +2 -2
- package/dist/esm/v2/components/or-tag-v3/OrTag.stories3.d.ts +5 -0
- package/dist/esm/v2/hooks/index.js +1 -1
- package/dist/esm/v2/index.js +3 -3
- package/dist/esm/{v3/useOverflow-ac506c65.js → v2/useOverflow-2f535f6c.js} +7 -3
- package/dist/esm/v3/{OrCardCollection-9682c6ef.js → OrCardCollection-5924d035.js} +28 -49
- package/dist/esm/v3/{OrSelect-2e00d4c8.js → OrSelect-fe1566ac.js} +1 -1
- package/dist/esm/v3/components/index.js +3 -3
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -3
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +2 -0
- package/dist/esm/v3/components/or-card-collection-v3/index.js +3 -2
- package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/esm/v3/components/or-select-v3/index.js +2 -2
- package/dist/esm/v3/components/or-tag-v3/OrTag.stories3.d.ts +5 -0
- package/dist/esm/v3/hooks/index.js +1 -1
- package/dist/esm/v3/index.js +3 -3
- package/dist/esm/{v2/useOverflow-ac506c65.js → v3/useOverflow-2f535f6c.js} +7 -3
- package/package.json +1 -1
- package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +5 -96
- package/src/components/or-card-collection-v3/OrCardCollection.vue +33 -21
- package/src/components/or-card-collection-v3/types.ts +1 -1
- package/src/components/or-tag-v3/OrTag.stories3.ts +112 -0
- package/src/hooks/useOverflow.ts +3 -2
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +0 -35
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +0 -35
- package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +0 -39
- package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +0 -40
|
@@ -10,16 +10,20 @@ function useOverflow(container) {
|
|
|
10
10
|
function updateState() {
|
|
11
11
|
const container = containerRef.value;
|
|
12
12
|
if (container) {
|
|
13
|
+
const {
|
|
14
|
+
x: containerOffset,
|
|
15
|
+
width: containerWidth
|
|
16
|
+
} = container.getBoundingClientRect();
|
|
13
17
|
const update = [...container.children].reduce(({
|
|
14
18
|
innerItems,
|
|
15
19
|
outerItems
|
|
16
20
|
}, child) => {
|
|
17
21
|
const item = child,
|
|
18
22
|
{
|
|
19
|
-
x:
|
|
20
|
-
width
|
|
23
|
+
x: itemOffset,
|
|
24
|
+
width: itemWidth
|
|
21
25
|
} = child.getBoundingClientRect();
|
|
22
|
-
if (
|
|
26
|
+
if (itemOffset + itemWidth >= containerOffset + containerWidth) {
|
|
23
27
|
item.style.setProperty('visibility', 'hidden');
|
|
24
28
|
return {
|
|
25
29
|
innerItems,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
2
2
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
3
3
|
import '@vueuse/core';
|
|
4
|
+
import { _ as __vue_component__$1 } from './OrCard-de799db0.js';
|
|
4
5
|
import { _ as __vue_component__$2 } from './OrIconButton-e17e4944.js';
|
|
5
6
|
import { _ as __vue_component__$3 } from './OrInput-b8a1627f.js';
|
|
6
7
|
import { _ as __vue_component__$4 } from './OrSortHeader-19bf94ca.js';
|
|
@@ -41,68 +42,10 @@ const CardCollectionContentViews = {
|
|
|
41
42
|
'list': []
|
|
42
43
|
};
|
|
43
44
|
|
|
44
|
-
var script$1 = defineComponent({
|
|
45
|
-
name: 'OrCardCollectionView',
|
|
46
|
-
props: {
|
|
47
|
-
items: {
|
|
48
|
-
type: Array,
|
|
49
|
-
default: []
|
|
50
|
-
},
|
|
51
|
-
mode: {
|
|
52
|
-
type: String,
|
|
53
|
-
required: true
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
setup(props) {
|
|
57
|
-
const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[props.mode]]);
|
|
58
|
-
return {
|
|
59
|
-
contentStyles
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
/* script */
|
|
65
|
-
const __vue_script__$1 = script$1;
|
|
66
|
-
|
|
67
|
-
/* template */
|
|
68
|
-
var __vue_render__$1 = function () {
|
|
69
|
-
var _vm = this;
|
|
70
|
-
var _h = _vm.$createElement;
|
|
71
|
-
var _c = _vm._self._c || _h;
|
|
72
|
-
return _c('div', {
|
|
73
|
-
class: _vm.contentStyles
|
|
74
|
-
}, [_vm._l(_vm.items, function (item) {
|
|
75
|
-
return _vm._t("item", null, null, {
|
|
76
|
-
item: item,
|
|
77
|
-
mode: _vm.mode
|
|
78
|
-
});
|
|
79
|
-
})], 2);
|
|
80
|
-
};
|
|
81
|
-
var __vue_staticRenderFns__$1 = [];
|
|
82
|
-
|
|
83
|
-
/* style */
|
|
84
|
-
const __vue_inject_styles__$1 = undefined;
|
|
85
|
-
/* scoped */
|
|
86
|
-
const __vue_scope_id__$1 = undefined;
|
|
87
|
-
/* module identifier */
|
|
88
|
-
const __vue_module_identifier__$1 = undefined;
|
|
89
|
-
/* functional template */
|
|
90
|
-
const __vue_is_functional_template__$1 = false;
|
|
91
|
-
/* style inject */
|
|
92
|
-
|
|
93
|
-
/* style inject SSR */
|
|
94
|
-
|
|
95
|
-
/* style inject shadow dom */
|
|
96
|
-
|
|
97
|
-
const __vue_component__$1 = /*#__PURE__*/normalizeComponent({
|
|
98
|
-
render: __vue_render__$1,
|
|
99
|
-
staticRenderFns: __vue_staticRenderFns__$1
|
|
100
|
-
}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
|
|
101
|
-
|
|
102
45
|
var script = defineComponent({
|
|
103
46
|
name: 'OrCardCollection',
|
|
104
47
|
components: {
|
|
105
|
-
|
|
48
|
+
OrCard: __vue_component__$1,
|
|
106
49
|
OrIconButton: __vue_component__$2,
|
|
107
50
|
OrInput: __vue_component__$3,
|
|
108
51
|
OrSortHeader: __vue_component__$4
|
|
@@ -140,6 +83,7 @@ var script = defineComponent({
|
|
|
140
83
|
const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
|
|
141
84
|
const toolbarStyles = computed(() => [...CardCollectionToolbar]);
|
|
142
85
|
const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
|
|
86
|
+
const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[proxyView.value]]);
|
|
143
87
|
// State
|
|
144
88
|
const proxyView = ref(props.view);
|
|
145
89
|
const proxySort = ref(props.sort);
|
|
@@ -175,6 +119,7 @@ var script = defineComponent({
|
|
|
175
119
|
rootStyles,
|
|
176
120
|
toolbarStyles,
|
|
177
121
|
toolbarPanelStyles,
|
|
122
|
+
contentStyles,
|
|
178
123
|
proxyView,
|
|
179
124
|
proxySort,
|
|
180
125
|
proxySearch,
|
|
@@ -246,22 +191,17 @@ var __vue_render__ = function () {
|
|
|
246
191
|
return _vm.switchToListView();
|
|
247
192
|
}
|
|
248
193
|
}
|
|
249
|
-
}), _vm._v(" "), _vm._t("addon")], 2)]), _vm._v(" "),
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}], null, true)
|
|
261
|
-
})];
|
|
262
|
-
}, null, {
|
|
263
|
-
items: _vm.items
|
|
264
|
-
})], 2);
|
|
194
|
+
}), _vm._v(" "), _vm._t("addon")], 2)]), _vm._v(" "), _c('div', {
|
|
195
|
+
class: _vm.contentStyles
|
|
196
|
+
}, [_vm.proxyView === 'grid' ? _vm._l(_vm.items, function (item) {
|
|
197
|
+
return _c('OrCard', {
|
|
198
|
+
key: item.id
|
|
199
|
+
}, [_vm._t("gridItem", null, null, item)], 2);
|
|
200
|
+
}) : _vm._e(), _vm._v(" "), _vm.proxyView === 'list' ? _vm._l(_vm.items, function (item) {
|
|
201
|
+
return _c('OrCard', {
|
|
202
|
+
key: item.id
|
|
203
|
+
}, [_vm._t("listItem", null, null, item)], 2);
|
|
204
|
+
}) : _vm._e()], 2)]);
|
|
265
205
|
};
|
|
266
206
|
var __vue_staticRenderFns__ = [];
|
|
267
207
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
|
|
2
2
|
import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
3
3
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
4
|
-
import { u as useOverflow } from './useOverflow-
|
|
4
|
+
import { u as useOverflow } from './useOverflow-2f535f6c.js';
|
|
5
5
|
import '@vueuse/core';
|
|
6
6
|
import { _ as __vue_component__$1 } from './OrCheckbox-567e387c.js';
|
|
7
7
|
import { _ as __vue_component__$2 } from './OrError-d267ee9a.js';
|
|
@@ -8,7 +8,7 @@ export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTT
|
|
|
8
8
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, _ as OrButtonV3 } from '../OrButton-357a5756.js';
|
|
9
9
|
export { _ as OrCard } from '../OrCard-b7268256.js';
|
|
10
10
|
export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from '../OrCardCollection-f6b07557.js';
|
|
11
|
-
export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../OrCardCollection-
|
|
11
|
+
export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../OrCardCollection-e46b220e.js';
|
|
12
12
|
export { _ as OrCardV3 } from '../OrCard-de799db0.js';
|
|
13
13
|
export { a as OrCarousel, _ as OrCarouselItem } from '../OrCarouselItem-4e2cf3d8.js';
|
|
14
14
|
export { _ as OrCheckbox } from '../OrCheckbox-915f1f0a.js';
|
|
@@ -66,7 +66,7 @@ export { _ as OrRadioV3 } from '../OrRadio-848ce55d.js';
|
|
|
66
66
|
export { _ as OrSearchV3 } from '../OrSearch-0c0d1773.js';
|
|
67
67
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-e8dce8f9.js';
|
|
68
68
|
export { _ as OrSelect } from '../OrSelect-dae2b069.js';
|
|
69
|
-
export { _ as OrSelectV3 } from '../OrSelect-
|
|
69
|
+
export { _ as OrSelectV3 } from '../OrSelect-81c1173a.js';
|
|
70
70
|
export { _ as OrSidebar, O as OrSidebarSide } from '../OrSidebar-7d6125bb.js';
|
|
71
71
|
export { O as OrSidebarPlacement, _ as OrSidebarV3 } from '../OrSidebar-fabc7bc9.js';
|
|
72
72
|
export { _ as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from '../OrSkeletonText-cc94bdc9.js';
|
|
@@ -121,6 +121,6 @@ import '../useElevation-31bfe1f6.js';
|
|
|
121
121
|
import '../useResponsive-a02e95b7.js';
|
|
122
122
|
import '@vueuse/integrations/useFocusTrap';
|
|
123
123
|
import '../dropdown-open-0d314aa4.js';
|
|
124
|
-
import '../useOverflow-
|
|
124
|
+
import '../useOverflow-2f535f6c.js';
|
|
125
125
|
import 'portal-vue/dist/portal-vue.esm.js';
|
|
126
126
|
import 'portal-vue';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
-
import OrCardCollection from './OrCardCollection.vue';
|
|
3
2
|
declare const _default: Meta<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
4
3
|
[x: string]: ((...args: any[]) => any) | null;
|
|
5
4
|
} | string[], {} & {}, {
|
|
@@ -16,5 +15,3 @@ export declare const WithSorting: StoryFn<import("vue").ComponentOptions<import(
|
|
|
16
15
|
} | string[], {} & {}, {
|
|
17
16
|
[x: number]: string;
|
|
18
17
|
} | {}, true>)>;
|
|
19
|
-
export declare const OverrideViewContainer: StoryFn<typeof OrCardCollection>;
|
|
20
|
-
export declare const WithLink: StoryFn<typeof OrCardCollection>;
|
|
@@ -7,6 +7,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
7
7
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
8
8
|
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
9
9
|
toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
10
|
+
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
10
11
|
proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
|
|
11
12
|
proxySort: import("@vue/composition-api").Ref<{
|
|
12
13
|
column: string;
|
|
@@ -70,6 +71,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
70
71
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
71
72
|
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
72
73
|
toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
74
|
+
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
73
75
|
proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
|
|
74
76
|
proxySort: import("@vue/composition-api").Ref<{
|
|
75
77
|
column: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-
|
|
1
|
+
export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-e46b220e.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../useClassAttribute-47fdb016.js';
|
|
4
4
|
import '@vueuse/core';
|
|
5
|
+
import '../../OrCard-de799db0.js';
|
|
6
|
+
import '../../normalize-component-6e8e3d80.js';
|
|
5
7
|
import '../../OrIconButton-e17e4944.js';
|
|
6
8
|
import '../../OrIcon-5e394c62.js';
|
|
7
|
-
import '../../normalize-component-6e8e3d80.js';
|
|
8
9
|
import '../../OrTooltip-513bee30.js';
|
|
9
10
|
import '../../OrPopover-9bafbdb4.js';
|
|
10
11
|
import '@floating-ui/dom';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { _ as OrSelectV3 } from '../../OrSelect-
|
|
1
|
+
export { _ as OrSelectV3 } from '../../OrSelect-81c1173a.js';
|
|
2
2
|
export { a as SelectSize } from '../../OrInputBox-4d5a318d.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../dropdown-open-0d314aa4.js';
|
|
5
5
|
import '../../useClassAttribute-47fdb016.js';
|
|
6
|
-
import '../../useOverflow-
|
|
6
|
+
import '../../useOverflow-2f535f6c.js';
|
|
7
7
|
import '@vueuse/core';
|
|
8
8
|
import '../../OrCheckbox-567e387c.js';
|
|
9
9
|
import '../../OrLabel-2a9f1477.js';
|
|
@@ -15,3 +15,8 @@ export declare const WithCustomColor: StoryFn<import("vue").ComponentOptions<imp
|
|
|
15
15
|
} | string[], {} & {}, {
|
|
16
16
|
[x: number]: string;
|
|
17
17
|
} | {}, true>)>;
|
|
18
|
+
export declare const InsideContainer: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
19
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
20
|
+
} | string[], {} & {}, {
|
|
21
|
+
[x: number]: string;
|
|
22
|
+
} | {}, true>)>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { u as useClassAttribute } from '../useClassAttribute-47fdb016.js';
|
|
2
2
|
export { u as useElevation } from '../useElevation-31bfe1f6.js';
|
|
3
|
-
export { u as useOverflow } from '../useOverflow-
|
|
3
|
+
export { u as useOverflow } from '../useOverflow-2f535f6c.js';
|
|
4
4
|
export { u as useResponsive } from '../useResponsive-a02e95b7.js';
|
|
5
5
|
export { u as useToggle } from '../useToggle-29e4d7c7.js';
|
|
6
6
|
import 'vue-demi';
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTT
|
|
|
8
8
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, _ as OrButtonV3 } from './OrButton-357a5756.js';
|
|
9
9
|
export { _ as OrCard } from './OrCard-b7268256.js';
|
|
10
10
|
export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from './OrCardCollection-f6b07557.js';
|
|
11
|
-
export { C as CardCollectionView, _ as OrCardCollectionV3 } from './OrCardCollection-
|
|
11
|
+
export { C as CardCollectionView, _ as OrCardCollectionV3 } from './OrCardCollection-e46b220e.js';
|
|
12
12
|
export { _ as OrCardV3 } from './OrCard-de799db0.js';
|
|
13
13
|
export { a as OrCarousel, _ as OrCarouselItem } from './OrCarouselItem-4e2cf3d8.js';
|
|
14
14
|
export { _ as OrCheckbox } from './OrCheckbox-915f1f0a.js';
|
|
@@ -66,7 +66,7 @@ export { _ as OrRadioV3 } from './OrRadio-848ce55d.js';
|
|
|
66
66
|
export { _ as OrSearchV3 } from './OrSearch-0c0d1773.js';
|
|
67
67
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-e8dce8f9.js';
|
|
68
68
|
export { _ as OrSelect } from './OrSelect-dae2b069.js';
|
|
69
|
-
export { _ as OrSelectV3 } from './OrSelect-
|
|
69
|
+
export { _ as OrSelectV3 } from './OrSelect-81c1173a.js';
|
|
70
70
|
export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-7d6125bb.js';
|
|
71
71
|
export { O as OrSidebarPlacement, _ as OrSidebarV3 } from './OrSidebar-fabc7bc9.js';
|
|
72
72
|
export { _ as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-cc94bdc9.js';
|
|
@@ -98,7 +98,7 @@ export { _ as OrTooltipV3 } from './OrTooltip-513bee30.js';
|
|
|
98
98
|
export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
99
99
|
export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
100
100
|
export { u as useElevation } from './useElevation-31bfe1f6.js';
|
|
101
|
-
export { u as useOverflow } from './useOverflow-
|
|
101
|
+
export { u as useOverflow } from './useOverflow-2f535f6c.js';
|
|
102
102
|
export { u as useResponsive } from './useResponsive-a02e95b7.js';
|
|
103
103
|
export { u as useToggle } from './useToggle-29e4d7c7.js';
|
|
104
104
|
import { R as RX_ABBREVIATION_FROM_STRING } from './color-1f348774.js';
|
|
@@ -10,16 +10,20 @@ function useOverflow(container) {
|
|
|
10
10
|
function updateState() {
|
|
11
11
|
const container = containerRef.value;
|
|
12
12
|
if (container) {
|
|
13
|
+
const {
|
|
14
|
+
x: containerOffset,
|
|
15
|
+
width: containerWidth
|
|
16
|
+
} = container.getBoundingClientRect();
|
|
13
17
|
const update = [...container.children].reduce(({
|
|
14
18
|
innerItems,
|
|
15
19
|
outerItems
|
|
16
20
|
}, child) => {
|
|
17
21
|
const item = child,
|
|
18
22
|
{
|
|
19
|
-
x:
|
|
20
|
-
width
|
|
23
|
+
x: itemOffset,
|
|
24
|
+
width: itemWidth
|
|
21
25
|
} = child.getBoundingClientRect();
|
|
22
|
-
if (
|
|
26
|
+
if (itemOffset + itemWidth >= containerOffset + containerWidth) {
|
|
23
27
|
item.style.setProperty('visibility', 'hidden');
|
|
24
28
|
return {
|
|
25
29
|
innerItems,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
2
2
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
3
3
|
import '@vueuse/core';
|
|
4
|
+
import { s as script$1 } from './OrCard-fd92f7c8.js';
|
|
4
5
|
import { s as script$2 } from './OrIconButton-1eebcafc.js';
|
|
5
6
|
import { s as script$3 } from './OrInput-e2ac1182.js';
|
|
6
7
|
import { s as script$4 } from './OrSortHeader-fe1a9cf8.js';
|
|
7
|
-
import { openBlock, createElementBlock,
|
|
8
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, Fragment, renderList, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, createVNode, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
|
8
9
|
|
|
9
10
|
var CardCollectionView;
|
|
10
11
|
(function (CardCollectionView) {
|
|
@@ -41,46 +42,10 @@ const CardCollectionContentViews = {
|
|
|
41
42
|
'list': []
|
|
42
43
|
};
|
|
43
44
|
|
|
44
|
-
var script$1 = defineComponent({
|
|
45
|
-
name: 'OrCardCollectionView',
|
|
46
|
-
props: {
|
|
47
|
-
items: {
|
|
48
|
-
type: Array,
|
|
49
|
-
default: []
|
|
50
|
-
},
|
|
51
|
-
mode: {
|
|
52
|
-
type: String,
|
|
53
|
-
required: true
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
setup(props) {
|
|
57
|
-
const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[props.mode]]);
|
|
58
|
-
return {
|
|
59
|
-
contentStyles
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
function render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
65
|
-
return openBlock(), createElementBlock("div", {
|
|
66
|
-
class: normalizeClass(_ctx.contentStyles)
|
|
67
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item, index) => {
|
|
68
|
-
return renderSlot(_ctx.$slots, "item", mergeProps({
|
|
69
|
-
key: item.key || index
|
|
70
|
-
}, {
|
|
71
|
-
item,
|
|
72
|
-
mode: _ctx.mode
|
|
73
|
-
}));
|
|
74
|
-
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
script$1.render = render$1;
|
|
78
|
-
script$1.__file = "src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue";
|
|
79
|
-
|
|
80
45
|
var script = defineComponent({
|
|
81
46
|
name: 'OrCardCollection',
|
|
82
47
|
components: {
|
|
83
|
-
|
|
48
|
+
OrCard: script$1,
|
|
84
49
|
OrIconButton: script$2,
|
|
85
50
|
OrInput: script$3,
|
|
86
51
|
OrSortHeader: script$4
|
|
@@ -118,6 +83,7 @@ var script = defineComponent({
|
|
|
118
83
|
const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
|
|
119
84
|
const toolbarStyles = computed(() => [...CardCollectionToolbar]);
|
|
120
85
|
const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
|
|
86
|
+
const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[proxyView.value]]);
|
|
121
87
|
// State
|
|
122
88
|
const proxyView = ref(props.view);
|
|
123
89
|
const proxySort = ref(props.sort);
|
|
@@ -153,6 +119,7 @@ var script = defineComponent({
|
|
|
153
119
|
rootStyles,
|
|
154
120
|
toolbarStyles,
|
|
155
121
|
toolbarPanelStyles,
|
|
122
|
+
contentStyles,
|
|
156
123
|
proxyView,
|
|
157
124
|
proxySort,
|
|
158
125
|
proxySearch,
|
|
@@ -166,7 +133,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
166
133
|
const _component_OrSortHeader = resolveComponent("OrSortHeader");
|
|
167
134
|
const _component_OrInput = resolveComponent("OrInput");
|
|
168
135
|
const _component_OrIconButton = resolveComponent("OrIconButton");
|
|
169
|
-
const
|
|
136
|
+
const _component_OrCard = resolveComponent("OrCard");
|
|
170
137
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
171
138
|
ref: "root"
|
|
172
139
|
}, _ctx.$attrs, {
|
|
@@ -202,15 +169,27 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
202
169
|
}), createVNode(_component_OrIconButton, {
|
|
203
170
|
icon: 'view_list',
|
|
204
171
|
onClick: _cache[3] || (_cache[3] = $event => _ctx.switchToListView())
|
|
205
|
-
}), renderSlot(_ctx.$slots, "addon")], 2 /* CLASS */)], 2 /* CLASS */),
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
172
|
+
}), renderSlot(_ctx.$slots, "addon")], 2 /* CLASS */)], 2 /* CLASS */), createElementVNode("div", {
|
|
173
|
+
class: normalizeClass(_ctx.contentStyles)
|
|
174
|
+
}, [_ctx.proxyView === 'grid' ? (openBlock(true), createElementBlock(Fragment, {
|
|
175
|
+
key: 0
|
|
176
|
+
}, renderList(_ctx.items, item => {
|
|
177
|
+
return openBlock(), createBlock(_component_OrCard, {
|
|
178
|
+
key: item.id
|
|
179
|
+
}, {
|
|
180
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "gridItem", normalizeProps(guardReactiveProps(item)))]),
|
|
181
|
+
_: 2 /* DYNAMIC */
|
|
182
|
+
}, 1024 /* DYNAMIC_SLOTS */);
|
|
183
|
+
}), 128 /* KEYED_FRAGMENT */)) : createCommentVNode("v-if", true), _ctx.proxyView === 'list' ? (openBlock(true), createElementBlock(Fragment, {
|
|
184
|
+
key: 1
|
|
185
|
+
}, renderList(_ctx.items, item => {
|
|
186
|
+
return openBlock(), createBlock(_component_OrCard, {
|
|
187
|
+
key: item.id
|
|
188
|
+
}, {
|
|
189
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "listItem", normalizeProps(guardReactiveProps(item)))]),
|
|
190
|
+
_: 2 /* DYNAMIC */
|
|
191
|
+
}, 1024 /* DYNAMIC_SLOTS */);
|
|
192
|
+
}), 128 /* KEYED_FRAGMENT */)) : createCommentVNode("v-if", true)], 2 /* CLASS */)], 16 /* FULL_PROPS */);
|
|
214
193
|
}
|
|
215
194
|
|
|
216
195
|
script.render = render;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
|
|
2
2
|
import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
3
3
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
4
|
-
import { u as useOverflow } from './useOverflow-
|
|
4
|
+
import { u as useOverflow } from './useOverflow-2f535f6c.js';
|
|
5
5
|
import '@vueuse/core';
|
|
6
6
|
import { s as script$1 } from './OrCheckbox-3e139eac.js';
|
|
7
7
|
import { s as script$2 } from './OrError-ec8c709d.js';
|
|
@@ -6,7 +6,7 @@ export { b as BUTTON_COLOR, d as BUTTON_LOADER_TYPE, c as BUTTON_SIZE, B as BUTT
|
|
|
6
6
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from '../OrButton-f4b9ee51.js';
|
|
7
7
|
export { s as OrCard } from '../OrCard-e3a5aea4.js';
|
|
8
8
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from '../OrCardCollection-a5e326ef.js';
|
|
9
|
-
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../OrCardCollection-
|
|
9
|
+
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../OrCardCollection-5924d035.js';
|
|
10
10
|
export { s as OrCardV3 } from '../OrCard-fd92f7c8.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from '../OrCarouselItem-636d99a1.js';
|
|
12
12
|
export { s as OrCheckbox } from '../OrCheckbox-ed4a19cf.js';
|
|
@@ -61,7 +61,7 @@ export { s as OrRadioV3 } from '../OrRadio-54b6d0de.js';
|
|
|
61
61
|
export { s as OrSearchV3 } from '../OrSearch-01225d82.js';
|
|
62
62
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-171cad78.js';
|
|
63
63
|
export { s as OrSelect } from '../OrSelect-0821b907.js';
|
|
64
|
-
export { s as OrSelectV3 } from '../OrSelect-
|
|
64
|
+
export { s as OrSelectV3 } from '../OrSelect-fe1566ac.js';
|
|
65
65
|
export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar-375c85a3.js';
|
|
66
66
|
export { O as OrSidebarPlacement, s as OrSidebarV3 } from '../OrSidebar-a62972f5.js';
|
|
67
67
|
export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from '../OrSkeletonText-2b1610ce.js';
|
|
@@ -115,4 +115,4 @@ import '../useElevation-31bfe1f6.js';
|
|
|
115
115
|
import '../useResponsive-a02e95b7.js';
|
|
116
116
|
import '@vueuse/integrations/useFocusTrap';
|
|
117
117
|
import '../dropdown-open-0d314aa4.js';
|
|
118
|
-
import '../useOverflow-
|
|
118
|
+
import '../useOverflow-2f535f6c.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
-
import OrCardCollection from './OrCardCollection.vue';
|
|
3
2
|
declare const _default: Meta<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
4
3
|
[x: string]: ((...args: any[]) => any) | null;
|
|
5
4
|
} | string[], {} & {}, {
|
|
@@ -16,5 +15,3 @@ export declare const WithSorting: StoryFn<import("vue").ComponentOptions<import(
|
|
|
16
15
|
} | string[], {} & {}, {
|
|
17
16
|
[x: number]: string;
|
|
18
17
|
} | {}, true>)>;
|
|
19
|
-
export declare const OverrideViewContainer: StoryFn<typeof OrCardCollection>;
|
|
20
|
-
export declare const WithLink: StoryFn<typeof OrCardCollection>;
|
|
@@ -7,6 +7,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
7
7
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
8
8
|
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
9
9
|
toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
10
|
+
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
10
11
|
proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
|
|
11
12
|
proxySort: import("@vue/composition-api").Ref<{
|
|
12
13
|
column: string;
|
|
@@ -70,6 +71,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
70
71
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
71
72
|
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
72
73
|
toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
74
|
+
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
73
75
|
proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
|
|
74
76
|
proxySort: import("@vue/composition-api").Ref<{
|
|
75
77
|
column: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../../OrCardCollection-
|
|
1
|
+
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../../OrCardCollection-5924d035.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../useClassAttribute-47fdb016.js';
|
|
4
4
|
import '@vueuse/core';
|
|
5
|
+
import '../../OrCard-fd92f7c8.js';
|
|
6
|
+
import 'vue';
|
|
5
7
|
import '../../OrIconButton-1eebcafc.js';
|
|
6
8
|
import '../../OrIcon-b195169c.js';
|
|
7
|
-
import 'vue';
|
|
8
9
|
import '../../OrTooltip-50d27b4f.js';
|
|
9
10
|
import '../../OrPopover-1075dd38.js';
|
|
10
11
|
import '@floating-ui/dom';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { s as OrSelectV3 } from '../../OrSelect-
|
|
1
|
+
export { s as OrSelectV3 } from '../../OrSelect-fe1566ac.js';
|
|
2
2
|
export { a as SelectSize } from '../../OrInputBox-5247ab25.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../dropdown-open-0d314aa4.js';
|
|
5
5
|
import '../../useClassAttribute-47fdb016.js';
|
|
6
|
-
import '../../useOverflow-
|
|
6
|
+
import '../../useOverflow-2f535f6c.js';
|
|
7
7
|
import '@vueuse/core';
|
|
8
8
|
import '../../OrCheckbox-3e139eac.js';
|
|
9
9
|
import '../../OrLabel-bdaec602.js';
|
|
@@ -15,3 +15,8 @@ export declare const WithCustomColor: StoryFn<import("vue").ComponentOptions<imp
|
|
|
15
15
|
} | string[], {} & {}, {
|
|
16
16
|
[x: number]: string;
|
|
17
17
|
} | {}, true>)>;
|
|
18
|
+
export declare const InsideContainer: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
19
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
20
|
+
} | string[], {} & {}, {
|
|
21
|
+
[x: number]: string;
|
|
22
|
+
} | {}, true>)>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { u as useClassAttribute } from '../useClassAttribute-47fdb016.js';
|
|
2
2
|
export { u as useElevation } from '../useElevation-31bfe1f6.js';
|
|
3
|
-
export { u as useOverflow } from '../useOverflow-
|
|
3
|
+
export { u as useOverflow } from '../useOverflow-2f535f6c.js';
|
|
4
4
|
export { u as useResponsive } from '../useResponsive-a02e95b7.js';
|
|
5
5
|
export { u as useToggle } from '../useToggle-29e4d7c7.js';
|
|
6
6
|
import 'vue-demi';
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export { b as BUTTON_COLOR, d as BUTTON_LOADER_TYPE, c as BUTTON_SIZE, B as BUTT
|
|
|
6
6
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from './OrButton-f4b9ee51.js';
|
|
7
7
|
export { s as OrCard } from './OrCard-e3a5aea4.js';
|
|
8
8
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from './OrCardCollection-a5e326ef.js';
|
|
9
|
-
export { C as CardCollectionView, s as OrCardCollectionV3 } from './OrCardCollection-
|
|
9
|
+
export { C as CardCollectionView, s as OrCardCollectionV3 } from './OrCardCollection-5924d035.js';
|
|
10
10
|
export { s as OrCardV3 } from './OrCard-fd92f7c8.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from './OrCarouselItem-636d99a1.js';
|
|
12
12
|
export { s as OrCheckbox } from './OrCheckbox-ed4a19cf.js';
|
|
@@ -61,7 +61,7 @@ export { s as OrRadioV3 } from './OrRadio-54b6d0de.js';
|
|
|
61
61
|
export { s as OrSearchV3 } from './OrSearch-01225d82.js';
|
|
62
62
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-171cad78.js';
|
|
63
63
|
export { s as OrSelect } from './OrSelect-0821b907.js';
|
|
64
|
-
export { s as OrSelectV3 } from './OrSelect-
|
|
64
|
+
export { s as OrSelectV3 } from './OrSelect-fe1566ac.js';
|
|
65
65
|
export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
|
|
66
66
|
export { O as OrSidebarPlacement, s as OrSidebarV3 } from './OrSidebar-a62972f5.js';
|
|
67
67
|
export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-2b1610ce.js';
|
|
@@ -92,7 +92,7 @@ export { s as OrTooltipV3 } from './OrTooltip-50d27b4f.js';
|
|
|
92
92
|
export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
93
93
|
export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
94
94
|
export { u as useElevation } from './useElevation-31bfe1f6.js';
|
|
95
|
-
export { u as useOverflow } from './useOverflow-
|
|
95
|
+
export { u as useOverflow } from './useOverflow-2f535f6c.js';
|
|
96
96
|
export { u as useResponsive } from './useResponsive-a02e95b7.js';
|
|
97
97
|
export { u as useToggle } from './useToggle-29e4d7c7.js';
|
|
98
98
|
import { R as RX_ABBREVIATION_FROM_STRING } from './color-1f348774.js';
|
|
@@ -10,16 +10,20 @@ function useOverflow(container) {
|
|
|
10
10
|
function updateState() {
|
|
11
11
|
const container = containerRef.value;
|
|
12
12
|
if (container) {
|
|
13
|
+
const {
|
|
14
|
+
x: containerOffset,
|
|
15
|
+
width: containerWidth
|
|
16
|
+
} = container.getBoundingClientRect();
|
|
13
17
|
const update = [...container.children].reduce(({
|
|
14
18
|
innerItems,
|
|
15
19
|
outerItems
|
|
16
20
|
}, child) => {
|
|
17
21
|
const item = child,
|
|
18
22
|
{
|
|
19
|
-
x:
|
|
20
|
-
width
|
|
23
|
+
x: itemOffset,
|
|
24
|
+
width: itemWidth
|
|
21
25
|
} = child.getBoundingClientRect();
|
|
22
|
-
if (
|
|
26
|
+
if (itemOffset + itemWidth >= containerOffset + containerWidth) {
|
|
23
27
|
item.style.setProperty('visibility', 'hidden');
|
|
24
28
|
return {
|
|
25
29
|
innerItems,
|