@onereach/ui-components 2.68.1-beta.2067.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-94a30a19.js → OrCardCollection-dac9fd1e.js} +53 -144
- package/dist/bundled/v2/{OrSearch-3ece0ef6.js → OrSearch-e34afaee.js} +2 -2
- package/dist/bundled/v2/{OrSelect-68aacb62.js → OrSelect-5fef3ccd.js} +1 -1
- package/dist/bundled/v2/{OrSortHeader-9932d28f.js → OrSortHeader-396e6a7c.js} +2 -2
- package/dist/bundled/v2/components/index.js +6 -6
- 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 +28 -42
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -7
- 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-search-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-select-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-sort-header-v3/index.js +1 -1
- 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 +7 -7
- package/dist/bundled/v2/{useOverflow-43299d81.js → useOverflow-bfea931e.js} +7 -3
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-0e029303.js → OrCardCollection.vue_vue_type_script_lang-7a07be47.js} +48 -98
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-18997376.js → OrConfirm.vue_vue_type_script_lang-2e7fa659.js} +36 -6
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-147a1fb9.js → OrSearch.vue_vue_type_script_lang-1d2a20e0.js} +1 -1
- 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/{OrTabs.vue_vue_type_script_lang-61b79a5a.js → OrTabs.vue_vue_type_script_lang-919b2021.js} +36 -10
- package/dist/bundled/v3/components/index.js +9 -11
- 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 +28 -42
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +4 -11
- package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/bundled/v3/components/or-confirm-v3/index.js +1 -2
- package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-select-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-tabs-v3/index.js +1 -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 +301 -316
- package/dist/bundled/v3/{useOverflow-2468b718.js → useOverflow-f7916ce2.js} +7 -3
- package/dist/esm/v2/{OrCardCollection-54648673.js → OrCardCollection-e46b220e.js} +52 -144
- 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 +28 -42
- package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -7
- 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/v2/{useOverflow-ac506c65.js → useOverflow-2f535f6c.js} +7 -3
- package/dist/esm/v3/OrCardCollection-5924d035.js +198 -0
- 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 +28 -42
- package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -7
- 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/v3/{useOverflow-ac506c65.js → useOverflow-2f535f6c.js} +7 -3
- package/package.json +1 -1
- package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +19 -115
- package/src/components/or-card-collection-v3/OrCardCollection.vue +67 -93
- package/src/components/or-card-collection-v3/styles.ts +1 -1
- 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/OrButton-8ab33d9d.js +0 -33
- package/dist/bundled/v3/OrMenu-f26e8e55.js +0 -29
- 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/OrCardCollection-9d0036fa.js +0 -259
- 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
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
2
|
+
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
3
|
+
import '@vueuse/core';
|
|
4
|
+
import { s as script$1 } from './OrCard-fd92f7c8.js';
|
|
5
|
+
import { s as script$2 } from './OrIconButton-1eebcafc.js';
|
|
6
|
+
import { s as script$3 } from './OrInput-e2ac1182.js';
|
|
7
|
+
import { s as script$4 } from './OrSortHeader-fe1a9cf8.js';
|
|
8
|
+
import { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, Fragment, renderList, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, createVNode, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
|
9
|
+
|
|
10
|
+
var CardCollectionView;
|
|
11
|
+
(function (CardCollectionView) {
|
|
12
|
+
CardCollectionView["Grid"] = "grid";
|
|
13
|
+
CardCollectionView["List"] = "list";
|
|
14
|
+
})(CardCollectionView || (CardCollectionView = {}));
|
|
15
|
+
|
|
16
|
+
const CardCollectionRoot = [
|
|
17
|
+
// Layout
|
|
18
|
+
'layout-column',
|
|
19
|
+
// Spacing
|
|
20
|
+
'gap-md'];
|
|
21
|
+
const CardCollectionToolbar = [
|
|
22
|
+
// Layout
|
|
23
|
+
'layout-row justify-between',
|
|
24
|
+
// Typography
|
|
25
|
+
'typography-body-2-regular',
|
|
26
|
+
// Theme
|
|
27
|
+
'theme-foreground-default', 'dark:theme-foreground-default-dark'];
|
|
28
|
+
const CardCollectionToolbarPanel = [
|
|
29
|
+
// Layout
|
|
30
|
+
'layout-row',
|
|
31
|
+
// Spacing
|
|
32
|
+
'gap-sm+'];
|
|
33
|
+
const CardCollectionContent = [
|
|
34
|
+
// Layout
|
|
35
|
+
'grid',
|
|
36
|
+
// Spacing
|
|
37
|
+
'gap-sm md:gap-md'];
|
|
38
|
+
const CardCollectionContentViews = {
|
|
39
|
+
'grid': [
|
|
40
|
+
// Layout
|
|
41
|
+
'sm:grid-cols-1', 'md:grid-cols-2', 'lg:grid-cols-4', 'xl:grid-cols-6'],
|
|
42
|
+
'list': []
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var script = defineComponent({
|
|
46
|
+
name: 'OrCardCollection',
|
|
47
|
+
components: {
|
|
48
|
+
OrCard: script$1,
|
|
49
|
+
OrIconButton: script$2,
|
|
50
|
+
OrInput: script$3,
|
|
51
|
+
OrSortHeader: script$4
|
|
52
|
+
},
|
|
53
|
+
inheritAttrs: false,
|
|
54
|
+
props: {
|
|
55
|
+
items: {
|
|
56
|
+
type: Array,
|
|
57
|
+
default: []
|
|
58
|
+
},
|
|
59
|
+
view: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: CardCollectionView.Grid
|
|
62
|
+
},
|
|
63
|
+
sort: {
|
|
64
|
+
type: Object,
|
|
65
|
+
default: undefined
|
|
66
|
+
},
|
|
67
|
+
sortHeaders: {
|
|
68
|
+
type: Array,
|
|
69
|
+
default: undefined
|
|
70
|
+
},
|
|
71
|
+
search: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: undefined
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
emits: ['viewChange', 'sortChange', 'searchChange'],
|
|
77
|
+
expose: ['root'],
|
|
78
|
+
setup(props, context) {
|
|
79
|
+
// Refs
|
|
80
|
+
const root = ref();
|
|
81
|
+
// Styles
|
|
82
|
+
const classAttribute = useClassAttribute();
|
|
83
|
+
const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
|
|
84
|
+
const toolbarStyles = computed(() => [...CardCollectionToolbar]);
|
|
85
|
+
const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
|
|
86
|
+
const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[proxyView.value]]);
|
|
87
|
+
// State
|
|
88
|
+
const proxyView = ref(props.view);
|
|
89
|
+
const proxySort = ref(props.sort);
|
|
90
|
+
const proxySearch = ref(props.search);
|
|
91
|
+
// Methods
|
|
92
|
+
function switchToGridView() {
|
|
93
|
+
proxyView.value = CardCollectionView.Grid;
|
|
94
|
+
}
|
|
95
|
+
function switchToListView() {
|
|
96
|
+
proxyView.value = CardCollectionView.List;
|
|
97
|
+
}
|
|
98
|
+
// Effects
|
|
99
|
+
watch(() => props.view, value => {
|
|
100
|
+
proxyView.value = value;
|
|
101
|
+
});
|
|
102
|
+
watch(proxyView, value => {
|
|
103
|
+
context.emit('viewChange', value);
|
|
104
|
+
});
|
|
105
|
+
watch(() => props.sort, value => {
|
|
106
|
+
proxySort.value = value;
|
|
107
|
+
});
|
|
108
|
+
watch(proxySort, value => {
|
|
109
|
+
context.emit('sortChange', value);
|
|
110
|
+
});
|
|
111
|
+
watch(() => props.search, value => {
|
|
112
|
+
proxySearch.value = value;
|
|
113
|
+
});
|
|
114
|
+
watch(proxySearch, value => {
|
|
115
|
+
context.emit('searchChange', value);
|
|
116
|
+
});
|
|
117
|
+
return {
|
|
118
|
+
root,
|
|
119
|
+
rootStyles,
|
|
120
|
+
toolbarStyles,
|
|
121
|
+
toolbarPanelStyles,
|
|
122
|
+
contentStyles,
|
|
123
|
+
proxyView,
|
|
124
|
+
proxySort,
|
|
125
|
+
proxySearch,
|
|
126
|
+
switchToGridView,
|
|
127
|
+
switchToListView
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
133
|
+
const _component_OrSortHeader = resolveComponent("OrSortHeader");
|
|
134
|
+
const _component_OrInput = resolveComponent("OrInput");
|
|
135
|
+
const _component_OrIconButton = resolveComponent("OrIconButton");
|
|
136
|
+
const _component_OrCard = resolveComponent("OrCard");
|
|
137
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
138
|
+
ref: "root"
|
|
139
|
+
}, _ctx.$attrs, {
|
|
140
|
+
class: _ctx.rootStyles
|
|
141
|
+
}), [createElementVNode("div", {
|
|
142
|
+
class: normalizeClass(_ctx.toolbarStyles)
|
|
143
|
+
}, [createElementVNode("div", {
|
|
144
|
+
class: normalizeClass(_ctx.toolbarPanelStyles)
|
|
145
|
+
}, [_ctx.sortHeaders ? (openBlock(true), createElementBlock(Fragment, {
|
|
146
|
+
key: 0
|
|
147
|
+
}, renderList(_ctx.sortHeaders, header => {
|
|
148
|
+
return openBlock(), createBlock(_component_OrSortHeader, {
|
|
149
|
+
key: header.value,
|
|
150
|
+
modelValue: _ctx.proxySort,
|
|
151
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.proxySort = $event),
|
|
152
|
+
"input-value": header.value
|
|
153
|
+
}, {
|
|
154
|
+
default: withCtx(() => [createTextVNode(toDisplayString(header.label), 1 /* TEXT */)]),
|
|
155
|
+
|
|
156
|
+
_: 2 /* DYNAMIC */
|
|
157
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "input-value"]);
|
|
158
|
+
}), 128 /* KEYED_FRAGMENT */)) : createCommentVNode("v-if", true)], 2 /* CLASS */), createElementVNode("div", {
|
|
159
|
+
class: normalizeClass(_ctx.toolbarPanelStyles)
|
|
160
|
+
}, [createVNode(_component_OrInput, {
|
|
161
|
+
modelValue: _ctx.proxySearch,
|
|
162
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.proxySearch = $event),
|
|
163
|
+
type: 'search',
|
|
164
|
+
placeholder: 'Search',
|
|
165
|
+
size: 's'
|
|
166
|
+
}, null, 8 /* PROPS */, ["modelValue"]), createVNode(_component_OrIconButton, {
|
|
167
|
+
icon: 'grid_view',
|
|
168
|
+
onClick: _cache[2] || (_cache[2] = $event => _ctx.switchToGridView())
|
|
169
|
+
}), createVNode(_component_OrIconButton, {
|
|
170
|
+
icon: 'view_list',
|
|
171
|
+
onClick: _cache[3] || (_cache[3] = $event => _ctx.switchToListView())
|
|
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 */);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
script.render = render;
|
|
196
|
+
script.__file = "src/components/or-card-collection-v3/OrCardCollection.vue";
|
|
197
|
+
|
|
198
|
+
export { CardCollectionView as C, script as s };
|
|
@@ -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>;
|
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
+
import { SortHeaderModel } from '../or-sort-header-v3';
|
|
2
3
|
import { CardCollectionView } from './props';
|
|
3
|
-
import { CardCollectionItem } from './types';
|
|
4
|
+
import { CardCollectionItem, CardCollectionSortHeader } from './types';
|
|
4
5
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
6
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
6
|
-
sortMenu: import("@vue/composition-api").Ref<(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, {
|
|
7
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
8
|
-
} | string[], {} & {}, {
|
|
9
|
-
[x: number]: string;
|
|
10
|
-
} | {}, true>)) | undefined>;
|
|
11
|
-
sortButton: import("@vue/composition-api").Ref<(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, {
|
|
12
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
13
|
-
} | string[], {} & {}, {
|
|
14
|
-
[x: number]: string;
|
|
15
|
-
} | {}, true>)) | undefined>;
|
|
16
7
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
17
8
|
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
18
9
|
toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
10
|
+
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
19
11
|
proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
|
|
20
|
-
proxySort: import("@vue/composition-api").Ref<
|
|
12
|
+
proxySort: import("@vue/composition-api").Ref<{
|
|
13
|
+
column: string;
|
|
14
|
+
direction: "asc" | "desc";
|
|
15
|
+
}>;
|
|
21
16
|
proxySearch: import("@vue/composition-api").Ref<string>;
|
|
22
17
|
switchToGridView: () => void;
|
|
23
18
|
switchToListView: () => void;
|
|
24
|
-
handleSort: (sort: string) => void;
|
|
25
|
-
handleSearch: (search: string) => void;
|
|
26
19
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
27
20
|
items: {
|
|
28
21
|
type: PropType<CardCollectionItem[]>;
|
|
@@ -33,12 +26,12 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
33
26
|
default: CardCollectionView;
|
|
34
27
|
};
|
|
35
28
|
sort: {
|
|
36
|
-
type:
|
|
37
|
-
|
|
29
|
+
type: PropType<SortHeaderModel>;
|
|
30
|
+
default: undefined;
|
|
38
31
|
};
|
|
39
|
-
|
|
40
|
-
type: PropType<
|
|
41
|
-
default:
|
|
32
|
+
sortHeaders: {
|
|
33
|
+
type: PropType<CardCollectionSortHeader[]>;
|
|
34
|
+
default: undefined;
|
|
42
35
|
};
|
|
43
36
|
search: {
|
|
44
37
|
type: StringConstructor;
|
|
@@ -54,12 +47,12 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
54
47
|
default: CardCollectionView;
|
|
55
48
|
};
|
|
56
49
|
sort: {
|
|
57
|
-
type:
|
|
58
|
-
|
|
50
|
+
type: PropType<SortHeaderModel>;
|
|
51
|
+
default: undefined;
|
|
59
52
|
};
|
|
60
|
-
|
|
61
|
-
type: PropType<
|
|
62
|
-
default:
|
|
53
|
+
sortHeaders: {
|
|
54
|
+
type: PropType<CardCollectionSortHeader[]>;
|
|
55
|
+
default: undefined;
|
|
63
56
|
};
|
|
64
57
|
search: {
|
|
65
58
|
type: StringConstructor;
|
|
@@ -67,46 +60,39 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
67
60
|
};
|
|
68
61
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
69
62
|
search: string;
|
|
70
|
-
sort:
|
|
63
|
+
sort: SortHeaderModel;
|
|
71
64
|
items: CardCollectionItem[];
|
|
72
65
|
view: CardCollectionView;
|
|
73
|
-
|
|
66
|
+
sortHeaders: CardCollectionSortHeader[];
|
|
74
67
|
} & {} & {
|
|
75
68
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
76
69
|
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
77
70
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
78
|
-
sortMenu: import("@vue/composition-api").Ref<(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, {
|
|
79
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
80
|
-
} | string[], {} & {}, {
|
|
81
|
-
[x: number]: string;
|
|
82
|
-
} | {}, true>)) | undefined>;
|
|
83
|
-
sortButton: import("@vue/composition-api").Ref<(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, {
|
|
84
|
-
[x: string]: ((...args: any[]) => any) | null;
|
|
85
|
-
} | string[], {} & {}, {
|
|
86
|
-
[x: number]: string;
|
|
87
|
-
} | {}, true>)) | undefined>;
|
|
88
71
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
89
72
|
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
90
73
|
toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
74
|
+
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
91
75
|
proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
|
|
92
|
-
proxySort: import("@vue/composition-api").Ref<
|
|
76
|
+
proxySort: import("@vue/composition-api").Ref<{
|
|
77
|
+
column: string;
|
|
78
|
+
direction: "asc" | "desc";
|
|
79
|
+
}>;
|
|
93
80
|
proxySearch: import("@vue/composition-api").Ref<string>;
|
|
94
81
|
switchToGridView: () => void;
|
|
95
82
|
switchToListView: () => void;
|
|
96
|
-
handleSort: (sort: string) => void;
|
|
97
|
-
handleSearch: (search: string) => void;
|
|
98
83
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
99
84
|
search: string;
|
|
100
|
-
sort:
|
|
85
|
+
sort: SortHeaderModel;
|
|
101
86
|
items: CardCollectionItem[];
|
|
102
87
|
view: CardCollectionView;
|
|
103
|
-
|
|
88
|
+
sortHeaders: CardCollectionSortHeader[];
|
|
104
89
|
} & {} & {
|
|
105
90
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
106
91
|
}, {
|
|
107
92
|
search: string;
|
|
93
|
+
sort: SortHeaderModel;
|
|
108
94
|
items: CardCollectionItem[];
|
|
109
95
|
view: CardCollectionView;
|
|
110
|
-
|
|
96
|
+
sortHeaders: CardCollectionSortHeader[];
|
|
111
97
|
}, true>);
|
|
112
98
|
export default _default;
|
|
@@ -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';
|
|
@@ -13,14 +14,10 @@ import '../../useResponsive-a02e95b7.js';
|
|
|
13
14
|
import '../../OrBottomSheet-62817aec.js';
|
|
14
15
|
import '../../OrOverlay-738a44d5.js';
|
|
15
16
|
import '../../OrTeleport.vue3-8099178c.js';
|
|
16
|
-
import '../../OrMenu-840038cd.js';
|
|
17
|
-
import '../../OrMenuItem-9da279f6.js';
|
|
18
|
-
import '../../OrButton-f4b9ee51.js';
|
|
19
|
-
import '../../OrLoader-b3cf4231.js';
|
|
20
|
-
import '../../OrSearch-01225d82.js';
|
|
21
17
|
import '../../OrInput-e2ac1182.js';
|
|
22
18
|
import '../../OrError-ec8c709d.js';
|
|
23
19
|
import '../../OrHint-74bb732d.js';
|
|
24
20
|
import '../../OrInputBox-5247ab25.js';
|
|
25
21
|
import '../../OrLabel-bdaec602.js';
|
|
26
22
|
import '../../style-inject.es-4c6f2515.js';
|
|
23
|
+
import '../../OrSortHeader-fe1a9cf8.js';
|
|
@@ -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,
|