@onereach/ui-components 2.69.1-beta.2099.0 → 2.69.1-beta.2101.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/bundled/v2/{OrAvatar-2fa559e1.js → OrAvatar-1ada4581.js} +7 -1
  2. package/dist/bundled/v2/{OrCard-29116e1f.js → OrCard-58a1ba3e.js} +2 -2
  3. package/dist/bundled/v2/OrCardCollection-a9a779ea.js +228 -0
  4. package/dist/bundled/v2/{OrSearch-a11b3621.js → OrSearch-9d402f56.js} +3 -9
  5. package/dist/bundled/v2/{OrSortHeader-9932d28f.js → OrSortHeader-396e6a7c.js} +2 -2
  6. package/dist/bundled/v2/components/index.js +5 -5
  7. package/dist/bundled/v2/components/or-avatar-v3/index.js +1 -1
  8. package/dist/bundled/v2/components/or-avatar-v3/props.d.ts +2 -1
  9. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  10. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +39 -65
  11. package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -7
  12. package/dist/bundled/v2/components/or-card-collection-v3/types.d.ts +3 -8
  13. package/dist/bundled/v2/components/or-card-v3/index.js +1 -1
  14. package/dist/bundled/v2/components/or-search-v3/OrSearch.vue.d.ts +0 -13
  15. package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
  16. package/dist/bundled/v2/components/or-sort-header-v3/index.js +1 -1
  17. package/dist/bundled/v2/index.js +6 -6
  18. package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-22e46ce1.js → OrAvatar.vue_vue_type_script_lang-a0a72134.js} +7 -1
  19. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-3993a015.js +164 -0
  20. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-85472b12.js → OrConfirm.vue_vue_type_script_lang-289b5600.js} +36 -6
  21. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-0ae8a6dd.js → OrSearch.vue_vue_type_script_lang-ed78b21f.js} +2 -8
  22. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-61b79a5a.js → OrTabs.vue_vue_type_script_lang-919b2021.js} +36 -10
  23. package/dist/bundled/v3/components/index.js +8 -10
  24. package/dist/bundled/v3/components/or-avatar-v3/index.js +1 -1
  25. package/dist/bundled/v3/components/or-avatar-v3/props.d.ts +2 -1
  26. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  27. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +39 -65
  28. package/dist/bundled/v3/components/or-card-collection-v3/index.js +4 -11
  29. package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +3 -8
  30. package/dist/bundled/v3/components/or-confirm-v3/index.js +1 -2
  31. package/dist/bundled/v3/components/or-search-v3/OrSearch.vue.d.ts +0 -13
  32. package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
  33. package/dist/bundled/v3/components/or-tabs-v3/index.js +1 -2
  34. package/dist/bundled/v3/index.js +298 -329
  35. package/dist/esm/v2/{OrAvatar-0afdef36.js → OrAvatar-95b029b4.js} +7 -1
  36. package/dist/esm/v2/OrCardCollection-4f001551.js +227 -0
  37. package/dist/esm/v2/{OrSearch-62d91301.js → OrSearch-ddb7c1fe.js} +1 -7
  38. package/dist/esm/v2/components/index.js +3 -3
  39. package/dist/esm/v2/components/or-avatar-v3/index.js +1 -1
  40. package/dist/esm/v2/components/or-avatar-v3/props.d.ts +2 -1
  41. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  42. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +39 -65
  43. package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -7
  44. package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +3 -8
  45. package/dist/esm/v2/components/or-search-v3/OrSearch.vue.d.ts +0 -13
  46. package/dist/esm/v2/components/or-search-v3/index.js +1 -1
  47. package/dist/esm/v2/index.js +3 -3
  48. package/dist/esm/v3/{OrAvatar-ef88d31c.js → OrAvatar-9ed782da.js} +7 -1
  49. package/dist/esm/v3/OrCardCollection-5a0febaf.js +198 -0
  50. package/dist/esm/v3/{OrSearch-aafb93b4.js → OrSearch-cdde55ce.js} +1 -7
  51. package/dist/esm/v3/components/index.js +3 -3
  52. package/dist/esm/v3/components/or-avatar-v3/index.js +1 -1
  53. package/dist/esm/v3/components/or-avatar-v3/props.d.ts +2 -1
  54. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  55. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +39 -65
  56. package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -7
  57. package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +3 -8
  58. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +0 -13
  59. package/dist/esm/v3/components/or-search-v3/index.js +1 -1
  60. package/dist/esm/v3/index.js +3 -3
  61. package/package.json +1 -1
  62. package/src/components/or-avatar-v3/props.ts +1 -0
  63. package/src/components/or-avatar-v3/styles.ts +9 -0
  64. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +28 -229
  65. package/src/components/or-card-collection-v3/OrCardCollection.vue +76 -119
  66. package/src/components/or-card-collection-v3/styles.ts +1 -1
  67. package/src/components/or-card-collection-v3/types.ts +3 -9
  68. package/src/components/or-search-v3/OrSearch.vue +1 -7
  69. package/dist/bundled/v2/OrCardCollection-953657a7.js +0 -347
  70. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
  71. package/dist/bundled/v2/components/or-card-collection-v3/constatnts.d.ts +0 -4
  72. package/dist/bundled/v3/OrButton-8ab33d9d.js +0 -33
  73. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-4debae8a.js +0 -229
  74. package/dist/bundled/v3/OrMenu-f26e8e55.js +0 -29
  75. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +0 -35
  76. package/dist/bundled/v3/components/or-card-collection-v3/constatnts.d.ts +0 -4
  77. package/dist/esm/v2/OrCardCollection-55e282a7.js +0 -347
  78. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
  79. package/dist/esm/v2/components/or-card-collection-v3/constatnts.d.ts +0 -4
  80. package/dist/esm/v3/OrCardCollection-0c6da4b8.js +0 -290
  81. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +0 -35
  82. package/dist/esm/v3/components/or-card-collection-v3/constatnts.d.ts +0 -4
  83. package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +0 -41
  84. package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +0 -42
  85. package/src/components/or-card-collection-v3/constatnts.ts +0 -12
@@ -1,290 +0,0 @@
1
- import { defineComponent, computed, ref, watch } from 'vue-demi';
2
- import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
- import '@vueuse/core';
4
- import { s as script$2 } from './OrIconButton-1eebcafc.js';
5
- import { s as script$4 } from './OrMenu-840038cd.js';
6
- import './OrPopover-1075dd38.js';
7
- import { s as script$5 } from './OrMenuItem-9da279f6.js';
8
- import { s as script$6 } from './OrIcon-b195169c.js';
9
- import { openBlock, createElementBlock, normalizeClass, Fragment, renderList, renderSlot, mergeProps, createTextVNode, toDisplayString, resolveComponent, createElementVNode, createVNode, withCtx, createBlock, createCommentVNode, normalizeProps, guardReactiveProps } from 'vue';
10
- import { s as script$3 } from './OrButton-f4b9ee51.js';
11
- import { s as script$7 } from './OrSearch-aafb93b4.js';
12
- import './OrInputBox-5247ab25.js';
13
-
14
- var CardCollectionView;
15
- (function (CardCollectionView) {
16
- CardCollectionView["Grid"] = "grid";
17
- CardCollectionView["List"] = "list";
18
- })(CardCollectionView || (CardCollectionView = {}));
19
-
20
- const CardCollectionRoot = [
21
- // Layout
22
- 'layout-column',
23
- // Spacing
24
- 'gap-md'];
25
- const CardCollectionToolbar = [
26
- // Layout
27
- 'layout-row justify-between',
28
- // Typography
29
- 'typography-body-2-regular',
30
- // Theme
31
- 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
32
- const CardCollectionToolbarPanel = [
33
- // Layout
34
- 'layout-row',
35
- // Spacing
36
- 'gap-lg+'];
37
- const CardCollectionContent = [
38
- // Layout
39
- 'grid',
40
- // Spacing
41
- 'gap-sm md:gap-md'];
42
- const CardCollectionContentViews = {
43
- 'grid': [
44
- // Layout
45
- 'sm:grid-cols-1', 'md:grid-cols-2', 'lg:grid-cols-4', 'xl:grid-cols-6'],
46
- 'list': []
47
- };
48
-
49
- var script$1 = defineComponent({
50
- name: 'OrCardCollectionView',
51
- props: {
52
- items: {
53
- type: Array,
54
- default: []
55
- },
56
- mode: {
57
- type: String,
58
- required: true
59
- }
60
- },
61
- setup(props) {
62
- const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[props.mode]]);
63
- return {
64
- contentStyles
65
- };
66
- }
67
- });
68
-
69
- function render$1(_ctx, _cache, $props, $setup, $data, $options) {
70
- return openBlock(), createElementBlock("div", {
71
- class: normalizeClass(_ctx.contentStyles)
72
- }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item, index) => {
73
- return renderSlot(_ctx.$slots, "item", mergeProps({
74
- key: item.key || index
75
- }, {
76
- item,
77
- mode: _ctx.mode
78
- }), () => [createTextVNode(toDisplayString(item.key), 1 /* TEXT */)]);
79
- }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */);
80
- }
81
-
82
- script$1.render = render$1;
83
- script$1.__file = "src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue";
84
-
85
- const gridView = {
86
- view: 'grid',
87
- icon: 'grid_view'
88
- };
89
- const listView = {
90
- view: 'list',
91
- icon: 'view_agenda'
92
- };
93
- const defaultViewModes = [gridView, listView];
94
-
95
- var script = defineComponent({
96
- name: 'OrCardCollection',
97
- components: {
98
- OrCardCollectionView: script$1,
99
- OrIconButton: script$2,
100
- OrButton: script$3,
101
- OrMenu: script$4,
102
- OrMenuItem: script$5,
103
- OrIcon: script$6,
104
- OrSearch: script$7
105
- },
106
- inheritAttrs: false,
107
- props: {
108
- items: {
109
- type: Array,
110
- default: []
111
- },
112
- view: {
113
- type: String,
114
- default: CardCollectionView.Grid
115
- },
116
- viewModes: {
117
- type: Array,
118
- default: () => defaultViewModes
119
- },
120
- sort: {
121
- type: String,
122
- default: undefined
123
- },
124
- sortOptions: {
125
- type: Array,
126
- default: () => []
127
- },
128
- search: {
129
- type: String,
130
- default: ''
131
- }
132
- },
133
- emits: ['viewChange', 'sortChange', 'searchChange'],
134
- expose: ['root'],
135
- setup(props, context) {
136
- // Refs
137
- const root = ref();
138
- const sortMenu = ref();
139
- const sortButton = ref();
140
- // Styles
141
- const classAttribute = useClassAttribute();
142
- const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
143
- const toolbarStyles = computed(() => [...CardCollectionToolbar]);
144
- const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
145
- const sortLabel = computed(() => {
146
- var _a;
147
- return (_a = props.sortOptions.find(item => item.value === props.sort)) === null || _a === void 0 ? void 0 : _a.label;
148
- });
149
- // State
150
- const proxyView = ref(props.view);
151
- const proxySort = ref(props.sort);
152
- const proxySearch = ref(props.search);
153
- // Methods
154
- function switchView(view) {
155
- proxyView.value = view;
156
- }
157
- function handleSort(sort) {
158
- proxySort.value = sort;
159
- }
160
- function handleSearch(search) {
161
- proxySearch.value = search;
162
- }
163
- // Effects
164
- watch(() => props.view, value => {
165
- proxyView.value = value;
166
- });
167
- watch(proxyView, value => {
168
- context.emit('viewChange', value);
169
- });
170
- watch(() => props.sort, value => {
171
- proxySort.value = value;
172
- });
173
- watch(proxySort, value => {
174
- context.emit('sortChange', value);
175
- });
176
- watch(() => props.search, value => {
177
- proxySearch.value = value;
178
- });
179
- watch(proxySearch, value => {
180
- context.emit('searchChange', value);
181
- });
182
- return {
183
- root,
184
- sortMenu,
185
- sortButton,
186
- rootStyles,
187
- toolbarStyles,
188
- toolbarPanelStyles,
189
- proxyView,
190
- proxySort,
191
- proxySearch,
192
- sortLabel,
193
- switchView,
194
- handleSort,
195
- handleSearch
196
- };
197
- }
198
- });
199
-
200
- const _hoisted_1 = {
201
- class: "layout-row gap-sm"
202
- };
203
- function render(_ctx, _cache, $props, $setup, $data, $options) {
204
- const _component_OrIcon = resolveComponent("OrIcon");
205
- const _component_OrButton = resolveComponent("OrButton");
206
- const _component_OrMenuItem = resolveComponent("OrMenuItem");
207
- const _component_OrMenu = resolveComponent("OrMenu");
208
- const _component_OrSearch = resolveComponent("OrSearch");
209
- const _component_OrIconButton = resolveComponent("OrIconButton");
210
- const _component_OrCardCollectionView = resolveComponent("OrCardCollectionView");
211
- return openBlock(), createElementBlock("div", mergeProps({
212
- ref: "root"
213
- }, _ctx.$attrs, {
214
- class: _ctx.rootStyles
215
- }), [createElementVNode("div", {
216
- class: normalizeClass(_ctx.toolbarStyles)
217
- }, [createElementVNode("div", {
218
- class: normalizeClass(_ctx.toolbarPanelStyles)
219
- }, [_ctx.sortOptions.length ? (openBlock(), createElementBlock(Fragment, {
220
- key: 0
221
- }, [createVNode(_component_OrButton, {
222
- ref: "sortButton",
223
- variant: "link",
224
- color: "inherit",
225
- onClick: _cache[0] || (_cache[0] = $event => _ctx.sortMenu.toggle())
226
- }, {
227
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.sortLabel) + " ", 1 /* TEXT */), _ctx.sortMenu ? (openBlock(), createBlock(_component_OrIcon, {
228
- key: 0,
229
- icon: _ctx.sortMenu.isOpen ? 'arrow_drop_up' : 'arrow_drop_down'
230
- }, null, 8 /* PROPS */, ["icon"])) : createCommentVNode("v-if", true)]),
231
- _: 1 /* STABLE */
232
- }, 512 /* NEED_PATCH */), createVNode(_component_OrMenu, {
233
- ref: "sortMenu",
234
- trigger: _ctx.sortButton && _ctx.sortButton.root
235
- }, {
236
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.sortOptions, sortItem => {
237
- return openBlock(), createBlock(_component_OrMenuItem, {
238
- key: sortItem,
239
- onClick: $event => _ctx.handleSort(sortItem.value)
240
- }, {
241
- default: withCtx(() => [createTextVNode(toDisplayString(sortItem.label), 1 /* TEXT */)]),
242
-
243
- _: 2 /* DYNAMIC */
244
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
245
- }), 128 /* KEYED_FRAGMENT */))]),
246
-
247
- _: 1 /* STABLE */
248
- }, 8 /* PROPS */, ["trigger"])], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)], 2 /* CLASS */), createElementVNode("div", {
249
- class: normalizeClass(_ctx.toolbarPanelStyles)
250
- }, [createVNode(_component_OrSearch, {
251
- modelValue: _ctx.proxySearch,
252
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.proxySearch = $event),
253
- class: "md:w-[350px]",
254
- size: "s",
255
- onSearch: _ctx.handleSearch
256
- }, null, 8 /* PROPS */, ["modelValue", "onSearch"]), createElementVNode("div", _hoisted_1, [_ctx.viewModes.length > 1 ? (openBlock(true), createElementBlock(Fragment, {
257
- key: 0
258
- }, renderList(_ctx.viewModes, viewOption => {
259
- return openBlock(), createBlock(_component_OrIconButton, {
260
- key: viewOption.view,
261
- icon: {
262
- icon: viewOption.icon,
263
- variant: viewOption.view === _ctx.proxyView ? 'filled' : 'outlined'
264
- },
265
- onClick: $event => _ctx.switchView(viewOption.view)
266
- }, null, 8 /* PROPS */, ["icon", "onClick"]);
267
- }), 128 /* KEYED_FRAGMENT */)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "addon")])], 2 /* CLASS */)], 2 /* CLASS */), renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps({
268
- items: _ctx.items,
269
- mode: _ctx.proxyView
270
- }))), _ctx.items.length ? renderSlot(_ctx.$slots, _ctx.proxyView, normalizeProps(mergeProps({
271
- key: 0
272
- }, {
273
- items: _ctx.items
274
- })), () => [createVNode(_component_OrCardCollectionView, {
275
- items: _ctx.items,
276
- mode: _ctx.proxyView
277
- }, {
278
- item: withCtx(props => [renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps(props)))]),
279
- _: 3 /* FORWARDED */
280
- }, 8 /* PROPS */, ["items", "mode"])]) : _ctx.items.length === 0 && _ctx.proxySearch.length > 0 ? renderSlot(_ctx.$slots, "noSearchResults", normalizeProps(mergeProps({
281
- key: 1
282
- }, {
283
- search: _ctx.proxySearch
284
- })), () => [createTextVNode(" No results ")]) : createCommentVNode("v-if", true)], 16 /* FULL_PROPS */);
285
- }
286
-
287
- script.render = render;
288
- script.__file = "src/components/or-card-collection-v3/OrCardCollection.vue";
289
-
290
- export { CardCollectionView as C, script as s };
@@ -1,35 +0,0 @@
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,4 +0,0 @@
1
- import { ViewMode } from './types';
2
- export declare const gridView: ViewMode;
3
- export declare const listView: ViewMode;
4
- export declare const defaultViewModes: ViewMode[];
@@ -1,41 +0,0 @@
1
- <template>
2
- <div :class="contentStyles">
3
- <slot
4
- v-for="(item) in items"
5
- name="item"
6
- v-bind="{
7
- item,
8
- mode,
9
- }"
10
- >
11
- {{ item.key }}
12
- </slot>
13
- </div>
14
- </template>
15
- <script lang="ts">
16
- import { defineComponent, computed, PropType } from 'vue-demi';
17
- import { CardCollectionContent, CardCollectionContentViews } from './styles';
18
- import { CardCollectionItem } from './types';
19
- import { CardCollectionView } from './props';
20
-
21
- export default defineComponent({
22
- name: 'OrCardCollectionView',
23
- props: {
24
- items: {
25
- type: Array as PropType<CardCollectionItem[]>,
26
- default: [] as CardCollectionItem[],
27
- },
28
- mode: {
29
- type: String as PropType<CardCollectionView>,
30
- required: true,
31
- },
32
- },
33
- setup(props) {
34
- const contentStyles = computed(() => [
35
- ...CardCollectionContent,
36
- ...CardCollectionContentViews[props.mode],
37
- ]);
38
- return { contentStyles };
39
- },
40
- });
41
- </script>
@@ -1,42 +0,0 @@
1
- <template>
2
- <div :class="contentStyles">
3
- <slot
4
- v-for="(item, index) in items"
5
- :key="item.key || index"
6
- name="item"
7
- v-bind="{
8
- item,
9
- mode,
10
- }"
11
- >
12
- {{ item.key }}
13
- </slot>
14
- </div>
15
- </template>
16
- <script lang="ts">
17
- import { defineComponent, computed, PropType } from 'vue-demi';
18
- import { CardCollectionContent, CardCollectionContentViews } from './styles';
19
- import { CardCollectionItem } from './types';
20
- import { CardCollectionView } from './props';
21
-
22
- export default defineComponent({
23
- name: 'OrCardCollectionView',
24
- props: {
25
- items: {
26
- type: Array as PropType<CardCollectionItem[]>,
27
- default: [] as CardCollectionItem[],
28
- },
29
- mode: {
30
- type: String as PropType<CardCollectionView>,
31
- required: true,
32
- },
33
- },
34
- setup(props) {
35
- const contentStyles = computed(() => [
36
- ...CardCollectionContent,
37
- ...CardCollectionContentViews[props.mode],
38
- ]);
39
- return { contentStyles };
40
- },
41
- });
42
- </script>
@@ -1,12 +0,0 @@
1
- import { ViewMode } from './types';
2
-
3
- export const gridView: ViewMode = {
4
- view: 'grid',
5
- icon: 'grid_view',
6
- };
7
- export const listView: ViewMode = {
8
- view: 'list',
9
- icon: 'view_agenda',
10
- };
11
-
12
- export const defaultViewModes = [gridView, listView];