@onereach/ui-components 2.68.0 → 2.68.1-beta.2065.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-58a1ba3e.js → OrCard-29116e1f.js} +2 -2
- package/dist/bundled/v2/{OrCardCollection-dac9fd1e.js → OrCardCollection-0eaf7489.js} +78 -17
- package/dist/bundled/v2/components/index.js +2 -2
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +3 -0
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +0 -2
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +35 -0
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -3
- 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/index.js +3 -3
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-7a07be47.js → OrCardCollection.vue_vue_type_script_lang-26d9a7c8.js} +40 -18
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +3 -0
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +0 -2
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +35 -0
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +2 -3
- package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/bundled/v3/index.js +197 -197
- package/dist/esm/v2/{OrCardCollection-e46b220e.js → OrCardCollection-7bf35252.js} +76 -16
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +3 -0
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +0 -2
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +35 -0
- package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -3
- package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrCardCollection-5924d035.js → OrCardCollection-9682c6ef.js} +49 -28
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +3 -0
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +0 -2
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +35 -0
- package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -3
- package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/esm/v3/index.js +1 -1
- package/package.json +2 -3
- package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +96 -5
- package/src/components/or-card-collection-v3/OrCardCollection.vue +21 -33
- package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +39 -0
- package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +40 -0
- package/src/components/or-card-collection-v3/types.ts +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, computed, ref, 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';
|
|
5
4
|
import { _ as __vue_component__$2 } from './OrIconButton-e17e4944.js';
|
|
6
5
|
import { _ as __vue_component__$3 } from './OrInput-b8a1627f.js';
|
|
7
6
|
import { _ as __vue_component__$4 } from './OrSortHeader-19bf94ca.js';
|
|
@@ -42,10 +41,68 @@ const CardCollectionContentViews = {
|
|
|
42
41
|
'list': []
|
|
43
42
|
};
|
|
44
43
|
|
|
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
|
+
|
|
45
102
|
var script = defineComponent({
|
|
46
103
|
name: 'OrCardCollection',
|
|
47
104
|
components: {
|
|
48
|
-
|
|
105
|
+
OrCardCollectionView: __vue_component__$1,
|
|
49
106
|
OrIconButton: __vue_component__$2,
|
|
50
107
|
OrInput: __vue_component__$3,
|
|
51
108
|
OrSortHeader: __vue_component__$4
|
|
@@ -83,7 +140,6 @@ var script = defineComponent({
|
|
|
83
140
|
const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
|
|
84
141
|
const toolbarStyles = computed(() => [...CardCollectionToolbar]);
|
|
85
142
|
const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
|
|
86
|
-
const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[proxyView.value]]);
|
|
87
143
|
// State
|
|
88
144
|
const proxyView = ref(props.view);
|
|
89
145
|
const proxySort = ref(props.sort);
|
|
@@ -119,7 +175,6 @@ var script = defineComponent({
|
|
|
119
175
|
rootStyles,
|
|
120
176
|
toolbarStyles,
|
|
121
177
|
toolbarPanelStyles,
|
|
122
|
-
contentStyles,
|
|
123
178
|
proxyView,
|
|
124
179
|
proxySort,
|
|
125
180
|
proxySearch,
|
|
@@ -191,17 +246,22 @@ var __vue_render__ = function () {
|
|
|
191
246
|
return _vm.switchToListView();
|
|
192
247
|
}
|
|
193
248
|
}
|
|
194
|
-
}), _vm._v(" "), _vm._t("addon")], 2)]), _vm._v(" "),
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
249
|
+
}), _vm._v(" "), _vm._t("addon")], 2)]), _vm._v(" "), _vm._t(_vm.proxyView, function () {
|
|
250
|
+
return [_c('OrCardCollectionView', {
|
|
251
|
+
attrs: {
|
|
252
|
+
"items": _vm.items,
|
|
253
|
+
"mode": _vm.proxyView
|
|
254
|
+
},
|
|
255
|
+
scopedSlots: _vm._u([{
|
|
256
|
+
key: "item",
|
|
257
|
+
fn: function (props) {
|
|
258
|
+
return [_vm._t("item", null, null, props)];
|
|
259
|
+
}
|
|
260
|
+
}], null, true)
|
|
261
|
+
})];
|
|
262
|
+
}, null, {
|
|
263
|
+
items: _vm.items
|
|
264
|
+
})], 2);
|
|
205
265
|
};
|
|
206
266
|
var __vue_staticRenderFns__ = [];
|
|
207
267
|
|
|
@@ -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-7bf35252.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';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
+
import OrCardCollection from './OrCardCollection.vue';
|
|
2
3
|
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, {
|
|
3
4
|
[x: string]: ((...args: any[]) => any) | null;
|
|
4
5
|
} | string[], {} & {}, {
|
|
@@ -15,3 +16,5 @@ export declare const WithSorting: StoryFn<import("vue").ComponentOptions<import(
|
|
|
15
16
|
} | string[], {} & {}, {
|
|
16
17
|
[x: number]: string;
|
|
17
18
|
} | {}, true>)>;
|
|
19
|
+
export declare const OverrideViewContainer: StoryFn<typeof OrCardCollection>;
|
|
20
|
+
export declare const WithLink: StoryFn<typeof OrCardCollection>;
|
|
@@ -7,7 +7,6 @@ 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[]>;
|
|
11
10
|
proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
|
|
12
11
|
proxySort: import("@vue/composition-api").Ref<{
|
|
13
12
|
column: string;
|
|
@@ -71,7 +70,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
71
70
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
72
71
|
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
73
72
|
toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
74
|
-
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
75
73
|
proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
|
|
76
74
|
proxySort: import("@vue/composition-api").Ref<{
|
|
77
75
|
column: string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { CardCollectionItem } from './types';
|
|
3
|
+
import { CardCollectionView } from './props';
|
|
4
|
+
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
|
+
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
6
|
+
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
7
|
+
items: {
|
|
8
|
+
type: PropType<CardCollectionItem[]>;
|
|
9
|
+
default: CardCollectionItem[];
|
|
10
|
+
};
|
|
11
|
+
mode: {
|
|
12
|
+
type: PropType<CardCollectionView>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
16
|
+
items: {
|
|
17
|
+
type: PropType<CardCollectionItem[]>;
|
|
18
|
+
default: CardCollectionItem[];
|
|
19
|
+
};
|
|
20
|
+
mode: {
|
|
21
|
+
type: PropType<CardCollectionView>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
25
|
+
items: CardCollectionItem[];
|
|
26
|
+
mode: CardCollectionView;
|
|
27
|
+
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
28
|
+
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
29
|
+
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
30
|
+
items: CardCollectionItem[];
|
|
31
|
+
mode: CardCollectionView;
|
|
32
|
+
} & {}, {
|
|
33
|
+
items: CardCollectionItem[];
|
|
34
|
+
}, true>);
|
|
35
|
+
export default _default;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-
|
|
1
|
+
export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-7bf35252.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';
|
|
7
5
|
import '../../OrIconButton-e17e4944.js';
|
|
8
6
|
import '../../OrIcon-5e394c62.js';
|
|
7
|
+
import '../../normalize-component-6e8e3d80.js';
|
|
9
8
|
import '../../OrTooltip-513bee30.js';
|
|
10
9
|
import '../../OrPopover-9bafbdb4.js';
|
|
11
10
|
import '@floating-ui/dom';
|
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-7bf35252.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';
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, computed, ref, 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';
|
|
5
4
|
import { s as script$2 } from './OrIconButton-1eebcafc.js';
|
|
6
5
|
import { s as script$3 } from './OrInput-e2ac1182.js';
|
|
7
6
|
import { s as script$4 } from './OrSortHeader-fe1a9cf8.js';
|
|
8
|
-
import {
|
|
7
|
+
import { openBlock, createElementBlock, normalizeClass, Fragment, renderList, renderSlot, mergeProps, resolveComponent, createElementVNode, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, createVNode, normalizeProps, guardReactiveProps } from 'vue';
|
|
9
8
|
|
|
10
9
|
var CardCollectionView;
|
|
11
10
|
(function (CardCollectionView) {
|
|
@@ -42,10 +41,46 @@ const CardCollectionContentViews = {
|
|
|
42
41
|
'list': []
|
|
43
42
|
};
|
|
44
43
|
|
|
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
|
+
|
|
45
80
|
var script = defineComponent({
|
|
46
81
|
name: 'OrCardCollection',
|
|
47
82
|
components: {
|
|
48
|
-
|
|
83
|
+
OrCardCollectionView: script$1,
|
|
49
84
|
OrIconButton: script$2,
|
|
50
85
|
OrInput: script$3,
|
|
51
86
|
OrSortHeader: script$4
|
|
@@ -83,7 +118,6 @@ var script = defineComponent({
|
|
|
83
118
|
const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
|
|
84
119
|
const toolbarStyles = computed(() => [...CardCollectionToolbar]);
|
|
85
120
|
const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
|
|
86
|
-
const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[proxyView.value]]);
|
|
87
121
|
// State
|
|
88
122
|
const proxyView = ref(props.view);
|
|
89
123
|
const proxySort = ref(props.sort);
|
|
@@ -119,7 +153,6 @@ var script = defineComponent({
|
|
|
119
153
|
rootStyles,
|
|
120
154
|
toolbarStyles,
|
|
121
155
|
toolbarPanelStyles,
|
|
122
|
-
contentStyles,
|
|
123
156
|
proxyView,
|
|
124
157
|
proxySort,
|
|
125
158
|
proxySearch,
|
|
@@ -133,7 +166,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
133
166
|
const _component_OrSortHeader = resolveComponent("OrSortHeader");
|
|
134
167
|
const _component_OrInput = resolveComponent("OrInput");
|
|
135
168
|
const _component_OrIconButton = resolveComponent("OrIconButton");
|
|
136
|
-
const
|
|
169
|
+
const _component_OrCardCollectionView = resolveComponent("OrCardCollectionView");
|
|
137
170
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
138
171
|
ref: "root"
|
|
139
172
|
}, _ctx.$attrs, {
|
|
@@ -169,27 +202,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
169
202
|
}), createVNode(_component_OrIconButton, {
|
|
170
203
|
icon: 'view_list',
|
|
171
204
|
onClick: _cache[3] || (_cache[3] = $event => _ctx.switchToListView())
|
|
172
|
-
}), renderSlot(_ctx.$slots, "addon")], 2 /* CLASS */)], 2 /* CLASS */),
|
|
173
|
-
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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 */);
|
|
205
|
+
}), renderSlot(_ctx.$slots, "addon")], 2 /* CLASS */)], 2 /* CLASS */), renderSlot(_ctx.$slots, _ctx.proxyView, normalizeProps(guardReactiveProps({
|
|
206
|
+
items: _ctx.items
|
|
207
|
+
})), () => [createVNode(_component_OrCardCollectionView, {
|
|
208
|
+
items: _ctx.items,
|
|
209
|
+
mode: _ctx.proxyView
|
|
210
|
+
}, {
|
|
211
|
+
item: withCtx(props => [renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps(props)))]),
|
|
212
|
+
_: 3 /* FORWARDED */
|
|
213
|
+
}, 8 /* PROPS */, ["items", "mode"])])], 16 /* FULL_PROPS */);
|
|
193
214
|
}
|
|
194
215
|
|
|
195
216
|
script.render = render;
|
|
@@ -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-9682c6ef.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';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
+
import OrCardCollection from './OrCardCollection.vue';
|
|
2
3
|
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, {
|
|
3
4
|
[x: string]: ((...args: any[]) => any) | null;
|
|
4
5
|
} | string[], {} & {}, {
|
|
@@ -15,3 +16,5 @@ export declare const WithSorting: StoryFn<import("vue").ComponentOptions<import(
|
|
|
15
16
|
} | string[], {} & {}, {
|
|
16
17
|
[x: number]: string;
|
|
17
18
|
} | {}, true>)>;
|
|
19
|
+
export declare const OverrideViewContainer: StoryFn<typeof OrCardCollection>;
|
|
20
|
+
export declare const WithLink: StoryFn<typeof OrCardCollection>;
|
|
@@ -7,7 +7,6 @@ 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[]>;
|
|
11
10
|
proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
|
|
12
11
|
proxySort: import("@vue/composition-api").Ref<{
|
|
13
12
|
column: string;
|
|
@@ -71,7 +70,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
71
70
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
72
71
|
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
73
72
|
toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
74
|
-
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
75
73
|
proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
|
|
76
74
|
proxySort: import("@vue/composition-api").Ref<{
|
|
77
75
|
column: string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { CardCollectionItem } from './types';
|
|
3
|
+
import { CardCollectionView } from './props';
|
|
4
|
+
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
|
+
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
6
|
+
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
7
|
+
items: {
|
|
8
|
+
type: PropType<CardCollectionItem[]>;
|
|
9
|
+
default: CardCollectionItem[];
|
|
10
|
+
};
|
|
11
|
+
mode: {
|
|
12
|
+
type: PropType<CardCollectionView>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
16
|
+
items: {
|
|
17
|
+
type: PropType<CardCollectionItem[]>;
|
|
18
|
+
default: CardCollectionItem[];
|
|
19
|
+
};
|
|
20
|
+
mode: {
|
|
21
|
+
type: PropType<CardCollectionView>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
25
|
+
items: CardCollectionItem[];
|
|
26
|
+
mode: CardCollectionView;
|
|
27
|
+
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
28
|
+
contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
29
|
+
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
30
|
+
items: CardCollectionItem[];
|
|
31
|
+
mode: CardCollectionView;
|
|
32
|
+
} & {}, {
|
|
33
|
+
items: CardCollectionItem[];
|
|
34
|
+
}, true>);
|
|
35
|
+
export default _default;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../../OrCardCollection-
|
|
1
|
+
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../../OrCardCollection-9682c6ef.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';
|
|
7
5
|
import '../../OrIconButton-1eebcafc.js';
|
|
8
6
|
import '../../OrIcon-b195169c.js';
|
|
7
|
+
import 'vue';
|
|
9
8
|
import '../../OrTooltip-50d27b4f.js';
|
|
10
9
|
import '../../OrPopover-1075dd38.js';
|
|
11
10
|
import '@floating-ui/dom';
|
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-9682c6ef.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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "2.68.0",
|
|
3
|
+
"version": "2.68.1-beta.2065.0",
|
|
4
4
|
"description": "Vue components library for v2/3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/auto/index.js",
|
|
@@ -123,6 +123,5 @@
|
|
|
123
123
|
"default": "./dist/bundled/v3/components/*/index.js"
|
|
124
124
|
},
|
|
125
125
|
"./package.json": "./package.json"
|
|
126
|
-
}
|
|
127
|
-
"gitHead": "299060820141c34359b8a439b36a4a737b2f6f51"
|
|
126
|
+
}
|
|
128
127
|
}
|
|
@@ -3,6 +3,7 @@ import { Meta, StoryFn } from '@storybook/vue3';
|
|
|
3
3
|
import { OrIconV3 as OrIcon } from '../or-icon-v3';
|
|
4
4
|
import OrCardCollectionDocs from './OrCardCollection.docs.mdx';
|
|
5
5
|
import OrCardCollection from './OrCardCollection.vue';
|
|
6
|
+
import { OrCardV3 as OrCard } from '../or-card-v3';
|
|
6
7
|
import { CardCollectionView } from './props';
|
|
7
8
|
import { CardCollectionItem, CardCollectionSortHeader } from './types';
|
|
8
9
|
|
|
@@ -76,6 +77,7 @@ export default {
|
|
|
76
77
|
const Template: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
77
78
|
components: {
|
|
78
79
|
OrCardCollection,
|
|
80
|
+
OrCard,
|
|
79
81
|
OrIcon,
|
|
80
82
|
},
|
|
81
83
|
|
|
@@ -95,8 +97,9 @@ const Template: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
|
95
97
|
@sortChange="onSortChange"
|
|
96
98
|
@searchChange="onSearchChange"
|
|
97
99
|
>
|
|
98
|
-
<template #
|
|
99
|
-
|
|
100
|
+
<template #item="{item, mode}">
|
|
101
|
+
<OrCard>${args.item} ({{mode}}}</OrCard>
|
|
102
|
+
</template>
|
|
100
103
|
<template #addon>${args.addon}</template>
|
|
101
104
|
</OrCardCollection>
|
|
102
105
|
`,
|
|
@@ -106,8 +109,7 @@ export const Default = Template.bind({});
|
|
|
106
109
|
|
|
107
110
|
Default.args = {
|
|
108
111
|
// Slots
|
|
109
|
-
|
|
110
|
-
listItem: '{{ item.label }} (list)',
|
|
112
|
+
item: '{{ item.label }}',
|
|
111
113
|
addon: '<OrIcon icon="info" />',
|
|
112
114
|
|
|
113
115
|
// Props
|
|
@@ -139,7 +141,7 @@ Default.args = {
|
|
|
139
141
|
'Yankee',
|
|
140
142
|
'Zulu',
|
|
141
143
|
], (item) => ({
|
|
142
|
-
|
|
144
|
+
key: item.toLowerCase(),
|
|
143
145
|
label: item,
|
|
144
146
|
})),
|
|
145
147
|
};
|
|
@@ -160,3 +162,92 @@ WithSorting.args = {
|
|
|
160
162
|
label: item,
|
|
161
163
|
})),
|
|
162
164
|
};
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
export const OverrideViewContainer: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
168
|
+
components: {
|
|
169
|
+
OrCardCollection,
|
|
170
|
+
OrCard,
|
|
171
|
+
OrIcon,
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
setup() {
|
|
175
|
+
return {
|
|
176
|
+
args,
|
|
177
|
+
onViewChange: action('viewChange'),
|
|
178
|
+
onSortChange: action('sortChange'),
|
|
179
|
+
onSearchChange: action('searchChange'),
|
|
180
|
+
};
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
template: `
|
|
184
|
+
<OrCardCollection
|
|
185
|
+
v-bind="args"
|
|
186
|
+
@viewChange="onViewChange"
|
|
187
|
+
@sortChange="onSortChange"
|
|
188
|
+
@searchChange="onSearchChange"
|
|
189
|
+
>
|
|
190
|
+
<template #grid="{items}">
|
|
191
|
+
<div class="typography-headline-3">Custom grid</div>
|
|
192
|
+
<div class="grid grid-cols-3">
|
|
193
|
+
<OrCard
|
|
194
|
+
v-for="item in items"
|
|
195
|
+
:key="item.id"
|
|
196
|
+
>
|
|
197
|
+
{{ item.label }}
|
|
198
|
+
</OrCard>
|
|
199
|
+
</div>
|
|
200
|
+
</template>
|
|
201
|
+
<template #list="{items}">
|
|
202
|
+
<div class="typography-headline-3">Custom list</div>
|
|
203
|
+
<ul>
|
|
204
|
+
<li
|
|
205
|
+
v-for="item in items"
|
|
206
|
+
:key="item.id"
|
|
207
|
+
>
|
|
208
|
+
- {{ item.label }}
|
|
209
|
+
</li>
|
|
210
|
+
</ul>
|
|
211
|
+
</template>
|
|
212
|
+
</OrCardCollection>
|
|
213
|
+
`,
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
OverrideViewContainer.args = {
|
|
217
|
+
...Default.args,
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
export const WithLink: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
222
|
+
components: {
|
|
223
|
+
OrCardCollection,
|
|
224
|
+
OrCard,
|
|
225
|
+
OrIcon,
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
setup() {
|
|
229
|
+
return {
|
|
230
|
+
args,
|
|
231
|
+
onViewChange: action('viewChange'),
|
|
232
|
+
onSortChange: action('sortChange'),
|
|
233
|
+
onSearchChange: action('searchChange'),
|
|
234
|
+
};
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
template: `
|
|
238
|
+
<OrCardCollection
|
|
239
|
+
v-bind="args"
|
|
240
|
+
@viewChange="onViewChange"
|
|
241
|
+
@sortChange="onSortChange"
|
|
242
|
+
@searchChange="onSearchChange"
|
|
243
|
+
>
|
|
244
|
+
<template #item="{item}">
|
|
245
|
+
<a href="#" @click.prevent><OrCard>${args.item}</OrCard></a>
|
|
246
|
+
</template>
|
|
247
|
+
</OrCardCollection>
|
|
248
|
+
`,
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
WithLink.args = {
|
|
252
|
+
...Default.args,
|
|
253
|
+
};
|