@onereach/ui-components 2.69.0 → 2.69.1-beta.2089.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 (62) hide show
  1. package/dist/bundled/v2/{OrCard-58a1ba3e.js → OrCard-29116e1f.js} +2 -2
  2. package/dist/bundled/v2/OrCardCollection-a8d5ce32.js +328 -0
  3. package/dist/bundled/v2/{OrSearch-9d402f56.js → OrSearch-19f43fe5.js} +2 -2
  4. package/dist/bundled/v2/{OrSortHeader-396e6a7c.js → OrSortHeader-9932d28f.js} +2 -2
  5. package/dist/bundled/v2/components/index.js +4 -4
  6. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +4 -0
  7. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +61 -37
  8. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +35 -0
  9. package/dist/bundled/v2/components/or-card-collection-v3/constatnts.d.ts +4 -0
  10. package/dist/bundled/v2/components/or-card-collection-v3/index.js +7 -4
  11. package/dist/bundled/v2/components/or-card-collection-v3/types.d.ts +5 -4
  12. package/dist/bundled/v2/components/or-card-v3/index.js +1 -1
  13. package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
  14. package/dist/bundled/v2/components/or-sort-header-v3/index.js +1 -1
  15. package/dist/bundled/v2/index.js +5 -5
  16. package/dist/bundled/v3/OrButton-8ab33d9d.js +33 -0
  17. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-f9f329a2.js +224 -0
  18. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-289b5600.js → OrConfirm.vue_vue_type_script_lang-85472b12.js} +6 -36
  19. package/dist/bundled/v3/OrMenu-f26e8e55.js +29 -0
  20. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-ed78b21f.js → OrSearch.vue_vue_type_script_lang-cb2d6612.js} +1 -1
  21. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-919b2021.js → OrTabs.vue_vue_type_script_lang-61b79a5a.js} +10 -36
  22. package/dist/bundled/v3/components/index.js +9 -7
  23. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +4 -0
  24. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +61 -37
  25. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +35 -0
  26. package/dist/bundled/v3/components/or-card-collection-v3/constatnts.d.ts +4 -0
  27. package/dist/bundled/v3/components/or-card-collection-v3/index.js +11 -4
  28. package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +5 -4
  29. package/dist/bundled/v3/components/or-confirm-v3/index.js +2 -1
  30. package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
  31. package/dist/bundled/v3/components/or-tabs-v3/index.js +2 -1
  32. package/dist/bundled/v3/index.js +319 -299
  33. package/dist/esm/v2/OrCardCollection-95b051e1.js +328 -0
  34. package/dist/esm/v2/components/index.js +1 -1
  35. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +4 -0
  36. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +61 -37
  37. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +35 -0
  38. package/dist/esm/v2/components/or-card-collection-v3/constatnts.d.ts +4 -0
  39. package/dist/esm/v2/components/or-card-collection-v3/index.js +7 -4
  40. package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +5 -4
  41. package/dist/esm/v2/index.js +1 -1
  42. package/dist/esm/v3/OrCardCollection-afd863fc.js +274 -0
  43. package/dist/esm/v3/components/index.js +1 -1
  44. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +4 -0
  45. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +61 -37
  46. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +35 -0
  47. package/dist/esm/v3/components/or-card-collection-v3/constatnts.d.ts +4 -0
  48. package/dist/esm/v3/components/or-card-collection-v3/index.js +7 -4
  49. package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +5 -4
  50. package/dist/esm/v3/index.js +1 -1
  51. package/package.json +2 -3
  52. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +160 -19
  53. package/src/components/or-card-collection-v3/OrCardCollection.vue +99 -74
  54. package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +41 -0
  55. package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +42 -0
  56. package/src/components/or-card-collection-v3/constatnts.ts +12 -0
  57. package/src/components/or-card-collection-v3/styles.ts +1 -1
  58. package/src/components/or-card-collection-v3/types.ts +5 -4
  59. package/dist/bundled/v2/OrCardCollection-a9a779ea.js +0 -228
  60. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-3993a015.js +0 -164
  61. package/dist/esm/v2/OrCardCollection-4f001551.js +0 -227
  62. package/dist/esm/v3/OrCardCollection-5a0febaf.js +0 -198
@@ -67,6 +67,6 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({
67
67
  render: __vue_render__,
68
68
  staticRenderFns: __vue_staticRenderFns__
69
69
  }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
70
- var OrCard = __vue_component__;
70
+ var __vue_component__$1 = __vue_component__;
71
71
 
72
- export { OrCard as O };
72
+ export { __vue_component__$1 as _ };
@@ -0,0 +1,328 @@
1
+ import './index-fa6eb4ca.js';
2
+ import { defineComponent, computed, ref, watch } from '@vue/composition-api/dist/vue-composition-api.mjs';
3
+ import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
4
+ import { O as OrIconButton } from './OrIconButton-a215104c.js';
5
+ import { O as OrButton } from './OrButton-0e91a808.js';
6
+ import { O as OrMenu } from './OrMenu-fa47c888.js';
7
+ import { O as OrMenuItem } from './OrMenuItem-26420908.js';
8
+ import { O as OrIcon } from './OrIcon-8625385f.js';
9
+ import { O as OrSearch } from './OrSearch-19f43fe5.js';
10
+ import { u as useClassAttribute } from './useClassAttribute-9bf33346.js';
11
+
12
+ var CardCollectionView;
13
+ (function (CardCollectionView) {
14
+ CardCollectionView["Grid"] = "grid";
15
+ CardCollectionView["List"] = "list";
16
+ })(CardCollectionView || (CardCollectionView = {}));
17
+
18
+ const CardCollectionRoot = [
19
+ // Layout
20
+ 'layout-column',
21
+ // Spacing
22
+ 'gap-md'];
23
+ const CardCollectionToolbar = [
24
+ // Layout
25
+ 'layout-row justify-between',
26
+ // Typography
27
+ 'typography-body-2-regular',
28
+ // Theme
29
+ 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
30
+ const CardCollectionToolbarPanel = [
31
+ // Layout
32
+ 'layout-row',
33
+ // Spacing
34
+ 'gap-lg+'];
35
+ const CardCollectionContent = [
36
+ // Layout
37
+ 'grid',
38
+ // Spacing
39
+ 'gap-sm md:gap-md'];
40
+ const CardCollectionContentViews = {
41
+ 'grid': [
42
+ // Layout
43
+ 'sm:grid-cols-1', 'md:grid-cols-2', 'lg:grid-cols-4', 'xl:grid-cols-6'],
44
+ 'list': []
45
+ };
46
+
47
+ var script$1 = defineComponent({
48
+ name: 'OrCardCollectionView',
49
+ props: {
50
+ items: {
51
+ type: Array,
52
+ default: []
53
+ },
54
+ mode: {
55
+ type: String,
56
+ required: true
57
+ }
58
+ },
59
+ setup(props) {
60
+ const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[props.mode]]);
61
+ return {
62
+ contentStyles
63
+ };
64
+ }
65
+ });
66
+
67
+ /* script */
68
+ const __vue_script__$1 = script$1;
69
+
70
+ /* template */
71
+ var __vue_render__$1 = function () {
72
+ var _vm = this;
73
+ var _h = _vm.$createElement;
74
+ var _c = _vm._self._c || _h;
75
+ return _c('div', {
76
+ class: _vm.contentStyles
77
+ }, [_vm._l(_vm.items, function (item) {
78
+ return _vm._t("item", function () {
79
+ return [_vm._v("\n " + _vm._s(item.key) + "\n ")];
80
+ }, null, {
81
+ item: item,
82
+ mode: _vm.mode
83
+ });
84
+ })], 2);
85
+ };
86
+ var __vue_staticRenderFns__$1 = [];
87
+
88
+ /* style */
89
+ const __vue_inject_styles__$1 = undefined;
90
+ /* scoped */
91
+ const __vue_scope_id__$1 = undefined;
92
+ /* module identifier */
93
+ const __vue_module_identifier__$1 = undefined;
94
+ /* functional template */
95
+ const __vue_is_functional_template__$1 = false;
96
+ /* style inject */
97
+
98
+ /* style inject SSR */
99
+
100
+ /* style inject shadow dom */
101
+
102
+ const __vue_component__$2 = /*#__PURE__*/normalizeComponent({
103
+ render: __vue_render__$1,
104
+ staticRenderFns: __vue_staticRenderFns__$1
105
+ }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
106
+ var OrCardCollectionView = __vue_component__$2;
107
+
108
+ const gridView = {
109
+ view: 'grid',
110
+ icon: 'grid_view'
111
+ };
112
+ const listView = {
113
+ view: 'list',
114
+ icon: 'view_agenda'
115
+ };
116
+ const defaultViewModes = [gridView, listView];
117
+
118
+ var script = defineComponent({
119
+ name: 'OrCardCollection',
120
+ components: {
121
+ OrCardCollectionView,
122
+ OrIconButton,
123
+ OrButton,
124
+ OrMenu,
125
+ OrMenuItem,
126
+ OrIcon,
127
+ OrSearch
128
+ },
129
+ inheritAttrs: false,
130
+ props: {
131
+ items: {
132
+ type: Array,
133
+ default: []
134
+ },
135
+ view: {
136
+ type: String,
137
+ default: CardCollectionView.Grid
138
+ },
139
+ viewModes: {
140
+ type: Array,
141
+ default: () => defaultViewModes
142
+ },
143
+ sort: {
144
+ type: String,
145
+ default: undefined
146
+ },
147
+ sortOptions: {
148
+ type: Array,
149
+ default: () => []
150
+ },
151
+ search: {
152
+ type: String,
153
+ default: undefined
154
+ }
155
+ },
156
+ emits: ['viewChange', 'sortChange', 'searchChange'],
157
+ expose: ['root'],
158
+ setup(props, context) {
159
+ // Refs
160
+ const root = ref();
161
+ const sortMenu = ref();
162
+ const sortButton = ref();
163
+ // Styles
164
+ const classAttribute = useClassAttribute();
165
+ const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
166
+ const toolbarStyles = computed(() => [...CardCollectionToolbar]);
167
+ const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
168
+ // State
169
+ const proxyView = ref(props.view);
170
+ const proxySort = ref(props.sort);
171
+ const proxySearch = ref(props.search);
172
+ // Methods
173
+ function switchView(view) {
174
+ proxyView.value = view;
175
+ }
176
+ function handleSort(sort) {
177
+ proxySort.value = sort;
178
+ }
179
+ function handleSearch(search) {
180
+ proxySearch.value = search;
181
+ }
182
+ // Effects
183
+ watch(() => props.view, value => {
184
+ proxyView.value = value;
185
+ });
186
+ watch(proxyView, value => {
187
+ context.emit('viewChange', value);
188
+ });
189
+ watch(() => props.sort, value => {
190
+ proxySort.value = value;
191
+ });
192
+ watch(proxySort, value => {
193
+ context.emit('sortChange', value);
194
+ });
195
+ watch(() => props.search, value => {
196
+ proxySearch.value = value;
197
+ });
198
+ watch(proxySearch, value => {
199
+ context.emit('searchChange', value);
200
+ });
201
+ return {
202
+ root,
203
+ sortMenu,
204
+ sortButton,
205
+ rootStyles,
206
+ toolbarStyles,
207
+ toolbarPanelStyles,
208
+ proxyView,
209
+ proxySort,
210
+ proxySearch,
211
+ switchView,
212
+ handleSort,
213
+ handleSearch
214
+ };
215
+ }
216
+ });
217
+
218
+ /* script */
219
+ const __vue_script__ = script;
220
+
221
+ /* template */
222
+ var __vue_render__ = function () {
223
+ var _vm = this;
224
+ var _h = _vm.$createElement;
225
+ var _c = _vm._self._c || _h;
226
+ return _c('div', _vm._b({
227
+ ref: "root",
228
+ class: _vm.rootStyles
229
+ }, 'div', _vm.$attrs, false), [_c('div', {
230
+ class: _vm.toolbarStyles
231
+ }, [_c('div', {
232
+ class: _vm.toolbarPanelStyles
233
+ }, [_vm.sortOptions.length ? [_c('OrButton', {
234
+ ref: "sortButton",
235
+ attrs: {
236
+ "variant": "link",
237
+ "color": "inherit"
238
+ },
239
+ on: {
240
+ "click": function ($event) {
241
+ return _vm.sortMenu.toggle();
242
+ }
243
+ }
244
+ }, [_vm._v("\n " + _vm._s(_vm.proxySort) + "\n "), _vm.sortMenu ? _c('OrIcon', {
245
+ attrs: {
246
+ "icon": _vm.sortMenu.isOpen ? 'arrow_drop_up' : 'arrow_drop_down'
247
+ }
248
+ }) : _vm._e()], 1), _vm._v(" "), _c('OrMenu', {
249
+ ref: "sortMenu",
250
+ attrs: {
251
+ "trigger": _vm.sortButton && _vm.sortButton.root
252
+ }
253
+ }, _vm._l(_vm.sortOptions, function (sortItem) {
254
+ return _c('OrMenuItem', {
255
+ key: sortItem,
256
+ on: {
257
+ "click": function ($event) {
258
+ return _vm.handleSort(sortItem);
259
+ }
260
+ }
261
+ }, [_vm._v("\n " + _vm._s(sortItem) + "\n ")]);
262
+ }), 1)] : _vm._e()], 2), _vm._v(" "), _c('div', {
263
+ class: _vm.toolbarPanelStyles
264
+ }, [_c('OrSearch', {
265
+ staticClass: "md:w-[350px]",
266
+ attrs: {
267
+ "size": "s"
268
+ },
269
+ on: {
270
+ "search": _vm.handleSearch
271
+ }
272
+ }), _vm._v(" "), _c('div', {
273
+ staticClass: "layout-row gap-sm"
274
+ }, [_vm.viewModes.length > 1 ? _vm._l(_vm.viewModes, function (viewOption) {
275
+ return _c('OrIconButton', {
276
+ key: viewOption.view,
277
+ attrs: {
278
+ "icon": {
279
+ icon: viewOption.icon,
280
+ variant: viewOption.view === _vm.proxyView ? 'filled' : 'outlined'
281
+ }
282
+ },
283
+ on: {
284
+ "click": function ($event) {
285
+ return _vm.switchView(viewOption.view);
286
+ }
287
+ }
288
+ });
289
+ }) : _vm._e(), _vm._v(" "), _vm._t("addon")], 2)], 1)]), _vm._v(" "), _vm._t(_vm.proxyView, function () {
290
+ return [_c('OrCardCollectionView', {
291
+ attrs: {
292
+ "items": _vm.items,
293
+ "mode": _vm.proxyView
294
+ },
295
+ scopedSlots: _vm._u([{
296
+ key: "item",
297
+ fn: function (props) {
298
+ return [_vm._t("item", null, null, props)];
299
+ }
300
+ }], null, true)
301
+ })];
302
+ }, null, {
303
+ items: _vm.items
304
+ })], 2);
305
+ };
306
+ var __vue_staticRenderFns__ = [];
307
+
308
+ /* style */
309
+ const __vue_inject_styles__ = undefined;
310
+ /* scoped */
311
+ const __vue_scope_id__ = undefined;
312
+ /* module identifier */
313
+ const __vue_module_identifier__ = undefined;
314
+ /* functional template */
315
+ const __vue_is_functional_template__ = false;
316
+ /* style inject */
317
+
318
+ /* style inject SSR */
319
+
320
+ /* style inject shadow dom */
321
+
322
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
323
+ render: __vue_render__,
324
+ staticRenderFns: __vue_staticRenderFns__
325
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
326
+ var __vue_component__$1 = __vue_component__;
327
+
328
+ export { CardCollectionView as C, __vue_component__$1 as _ };
@@ -137,6 +137,6 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({
137
137
  render: __vue_render__,
138
138
  staticRenderFns: __vue_staticRenderFns__
139
139
  }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
140
- var __vue_component__$1 = __vue_component__;
140
+ var OrSearch = __vue_component__;
141
141
 
142
- export { __vue_component__$1 as _ };
142
+ export { OrSearch as O };
@@ -129,6 +129,6 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({
129
129
  render: __vue_render__,
130
130
  staticRenderFns: __vue_staticRenderFns__
131
131
  }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
132
- var OrSortHeader = __vue_component__;
132
+ var __vue_component__$1 = __vue_component__;
133
133
 
134
- export { OrSortHeader as O };
134
+ export { __vue_component__$1 as _ };
@@ -8,8 +8,8 @@ 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, O as OrButtonV3 } from '../OrButton-0e91a808.js';
9
9
  export { O as OrCard } from '../OrCard-a6b30f8f.js';
10
10
  export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from '../OrCardCollection-89428bbf.js';
11
- export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../OrCardCollection-a9a779ea.js';
12
- export { O as OrCardV3 } from '../OrCard-58a1ba3e.js';
11
+ export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../OrCardCollection-a8d5ce32.js';
12
+ export { _ as OrCardV3 } from '../OrCard-29116e1f.js';
13
13
  export { a as OrCarousel, _ as OrCarouselItem } from '../OrCarouselItem-6da755c0.js';
14
14
  export { O as OrCheckbox } from '../OrCheckbox-4cbddd67.js';
15
15
  export { O as OrCheckboxV3 } from '../OrCheckbox-dbef9f9a.js';
@@ -63,7 +63,7 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
63
63
  export { _ as OrRadio } from '../OrRadio-187d6fc7.js';
64
64
  export { _ as OrRadioGroup } from '../OrRadioGroup-aa9f0757.js';
65
65
  export { _ as OrRadioV3 } from '../OrRadio-cd39b20b.js';
66
- export { _ as OrSearchV3 } from '../OrSearch-9d402f56.js';
66
+ export { O as OrSearchV3 } from '../OrSearch-19f43fe5.js';
67
67
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-21cc914e.js';
68
68
  export { _ as OrSelect } from '../OrSelect-a23d4210.js';
69
69
  export { _ as OrSelectV3 } from '../OrSelect-759b4410.js';
@@ -72,7 +72,7 @@ export { O as OrSidebarPlacement, _ as OrSidebarV3 } from '../OrSidebar-c95ef614
72
72
  export { _ as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from '../OrSkeletonText-242d22f3.js';
73
73
  export { _ as OrSkeletonCircleV3, a as OrSkeletonRectV3, b as OrSkeletonTextV3 } from '../OrSkeletonText-516993b4.js';
74
74
  export { _ as OrSlider } from '../OrSlider-59d05856.js';
75
- export { O as OrSortHeaderV3 } from '../OrSortHeader-396e6a7c.js';
75
+ export { _ as OrSortHeaderV3 } from '../OrSortHeader-9932d28f.js';
76
76
  export { _ as OrStepper } from '../OrStepper-3fc1a2b3.js';
77
77
  export { _ as OrSwitch } from '../OrSwitch-47670dbd.js';
78
78
  export { _ as OrSwitchV3 } from '../OrSwitch-237a2081.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,6 @@ 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 ExtraViewMode: StoryFn<typeof OrCardCollection>;
21
+ export declare const WithLink: StoryFn<typeof OrCardCollection>;
@@ -1,37 +1,47 @@
1
1
  import { PropType } from 'vue-demi';
2
- import { SortHeaderModel } from '../or-sort-header-v3';
3
2
  import { CardCollectionView } from './props';
4
- import { CardCollectionItem, CardCollectionSortHeader } from './types';
3
+ import { CardCollectionItem, ViewMode } from './types';
5
4
  declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
6
5
  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>;
7
16
  rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
8
17
  toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
9
18
  toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
10
- contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
11
- proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
12
- proxySort: import("@vue/composition-api").Ref<{
13
- column: string;
14
- direction: "asc" | "desc";
15
- }>;
19
+ proxyView: import("@vue/composition-api").Ref<string>;
20
+ proxySort: import("@vue/composition-api").Ref<string>;
16
21
  proxySearch: import("@vue/composition-api").Ref<string>;
17
- switchToGridView: () => void;
18
- switchToListView: () => void;
22
+ switchView: (view: string) => void;
23
+ handleSort: (sort: string) => void;
24
+ handleSearch: (search: string) => void;
19
25
  }> & import("@vue/composition-api").Data, {}, {}, {
20
26
  items: {
21
27
  type: PropType<CardCollectionItem[]>;
22
28
  default: CardCollectionItem[];
23
29
  };
24
30
  view: {
25
- type: PropType<CardCollectionView>;
31
+ type: PropType<string>;
26
32
  default: CardCollectionView;
27
33
  };
34
+ viewModes: {
35
+ type: PropType<ViewMode[]>;
36
+ default: () => ViewMode[];
37
+ };
28
38
  sort: {
29
- type: PropType<SortHeaderModel>;
39
+ type: StringConstructor;
30
40
  default: undefined;
31
41
  };
32
- sortHeaders: {
33
- type: PropType<CardCollectionSortHeader[]>;
34
- default: undefined;
42
+ sortOptions: {
43
+ type: PropType<string[]>;
44
+ default: () => never[];
35
45
  };
36
46
  search: {
37
47
  type: StringConstructor;
@@ -43,16 +53,20 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
43
53
  default: CardCollectionItem[];
44
54
  };
45
55
  view: {
46
- type: PropType<CardCollectionView>;
56
+ type: PropType<string>;
47
57
  default: CardCollectionView;
48
58
  };
59
+ viewModes: {
60
+ type: PropType<ViewMode[]>;
61
+ default: () => ViewMode[];
62
+ };
49
63
  sort: {
50
- type: PropType<SortHeaderModel>;
64
+ type: StringConstructor;
51
65
  default: undefined;
52
66
  };
53
- sortHeaders: {
54
- type: PropType<CardCollectionSortHeader[]>;
55
- default: undefined;
67
+ sortOptions: {
68
+ type: PropType<string[]>;
69
+ default: () => never[];
56
70
  };
57
71
  search: {
58
72
  type: StringConstructor;
@@ -60,39 +74,49 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
60
74
  };
61
75
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
62
76
  search: string;
63
- sort: SortHeaderModel;
77
+ sort: string;
64
78
  items: CardCollectionItem[];
65
- view: CardCollectionView;
66
- sortHeaders: CardCollectionSortHeader[];
79
+ view: string;
80
+ viewModes: ViewMode[];
81
+ sortOptions: string[];
67
82
  } & {} & {
68
83
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
69
84
  }, import("@vue/composition-api").ShallowUnwrapRef<{
70
85
  root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
86
+ 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, {
87
+ [x: string]: ((...args: any[]) => any) | null;
88
+ } | string[], {} & {}, {
89
+ [x: number]: string;
90
+ } | {}, true>)) | undefined>;
91
+ 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, {
92
+ [x: string]: ((...args: any[]) => any) | null;
93
+ } | string[], {} & {}, {
94
+ [x: number]: string;
95
+ } | {}, true>)) | undefined>;
71
96
  rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
72
97
  toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
73
98
  toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
74
- contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
75
- proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
76
- proxySort: import("@vue/composition-api").Ref<{
77
- column: string;
78
- direction: "asc" | "desc";
79
- }>;
99
+ proxyView: import("@vue/composition-api").Ref<string>;
100
+ proxySort: import("@vue/composition-api").Ref<string>;
80
101
  proxySearch: import("@vue/composition-api").Ref<string>;
81
- switchToGridView: () => void;
82
- switchToListView: () => void;
102
+ switchView: (view: string) => void;
103
+ handleSort: (sort: string) => void;
104
+ handleSearch: (search: string) => void;
83
105
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
84
106
  search: string;
85
- sort: SortHeaderModel;
107
+ sort: string;
86
108
  items: CardCollectionItem[];
87
- view: CardCollectionView;
88
- sortHeaders: CardCollectionSortHeader[];
109
+ view: string;
110
+ viewModes: ViewMode[];
111
+ sortOptions: string[];
89
112
  } & {} & {
90
113
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
91
114
  }, {
92
115
  search: string;
93
- sort: SortHeaderModel;
116
+ sort: string;
94
117
  items: CardCollectionItem[];
95
- view: CardCollectionView;
96
- sortHeaders: CardCollectionSortHeader[];
118
+ view: string;
119
+ viewModes: ViewMode[];
120
+ sortOptions: string[];
97
121
  }, true>);
98
122
  export default _default;
@@ -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;
@@ -0,0 +1,4 @@
1
+ import { ViewMode } from './types';
2
+ export declare const gridView: ViewMode;
3
+ export declare const listView: ViewMode;
4
+ export declare const defaultViewModes: ViewMode[];
@@ -1,12 +1,11 @@
1
- export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-a9a779ea.js';
1
+ export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-a8d5ce32.js';
2
2
  import '../../index-fa6eb4ca.js';
3
3
  import 'vue';
4
4
  import '@vue/composition-api/dist/vue-composition-api.mjs';
5
- import '../../OrCard-58a1ba3e.js';
6
- import '../../useClassAttribute-9bf33346.js';
7
5
  import '../../normalize-component-6e8e3d80.js';
8
6
  import '../../OrIconButton-a215104c.js';
9
7
  import '../../OrIcon-8625385f.js';
8
+ import '../../useClassAttribute-9bf33346.js';
10
9
  import '../../OrTooltip-fbfa05fd.js';
11
10
  import '@vueuse/core';
12
11
  import '../../OrPopover-5dc240f1.js';
@@ -17,10 +16,14 @@ import '../../OrTeleport.vue2-e9ba3054.js';
17
16
  import 'portal-vue';
18
17
  import '../../useElevation-aac032f4.js';
19
18
  import '../../useResponsive-e13dfbb0.js';
19
+ import '../../OrButton-0e91a808.js';
20
+ import '../../OrLoader-6a1f937b.js';
21
+ import '../../OrMenu-fa47c888.js';
22
+ import '../../OrMenuItem-26420908.js';
23
+ import '../../OrSearch-19f43fe5.js';
20
24
  import '../../OrInput-8b90e08f.js';
21
25
  import '../../OrError-aad17598.js';
22
26
  import '../../OrHint-f38a1940.js';
23
27
  import '../../OrInputBox-79ec54ad.js';
24
28
  import '../../OrLabel-172c4b89.js';
25
29
  import '../../browser-82dea9ed.js';
26
- import '../../OrSortHeader-396e6a7c.js';
@@ -1,7 +1,8 @@
1
1
  export interface CardCollectionItem {
2
- id: string;
2
+ key?: string;
3
+ [key: string | number]: any;
3
4
  }
4
- export interface CardCollectionSortHeader {
5
- value: string;
6
- label: string;
5
+ export interface ViewMode {
6
+ view: string;
7
+ icon: string;
7
8
  }
@@ -1,4 +1,4 @@
1
- export { O as OrCardV3 } from '../../OrCard-58a1ba3e.js';
1
+ export { _ as OrCardV3 } from '../../OrCard-29116e1f.js';
2
2
  import '../../index-fa6eb4ca.js';
3
3
  import 'vue';
4
4
  import '@vue/composition-api/dist/vue-composition-api.mjs';
@@ -1,4 +1,4 @@
1
- export { _ as OrSearchV3 } from '../../OrSearch-9d402f56.js';
1
+ export { O as OrSearchV3 } from '../../OrSearch-19f43fe5.js';
2
2
  export { a as SearchSize } from '../../OrInputBox-79ec54ad.js';
3
3
  import '../../index-fa6eb4ca.js';
4
4
  import 'vue';
@@ -1,4 +1,4 @@
1
- export { O as OrSortHeaderV3 } from '../../OrSortHeader-396e6a7c.js';
1
+ export { _ as OrSortHeaderV3 } from '../../OrSortHeader-9932d28f.js';
2
2
  import '../../index-fa6eb4ca.js';
3
3
  import 'vue';
4
4
  import '@vue/composition-api/dist/vue-composition-api.mjs';