@onereach/ui-components 2.69.1-beta.2103.0 → 2.69.1-beta.2110.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 (92) hide show
  1. package/dist/bundled/v2/{OrCard-58a1ba3e.js → OrCard-29116e1f.js} +2 -2
  2. package/dist/bundled/v2/OrCardCollection-773ae0db.js +346 -0
  3. package/dist/bundled/v2/{OrSearch-9d402f56.js → OrSearch-a11b3621.js} +9 -3
  4. package/dist/bundled/v2/{OrSelect-b20a9be0.js → OrSelect-759b4410.js} +1 -1
  5. package/dist/bundled/v2/{OrSortHeader-396e6a7c.js → OrSortHeader-9932d28f.js} +2 -2
  6. package/dist/bundled/v2/components/index.js +6 -6
  7. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +5 -0
  8. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +67 -42
  9. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +35 -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/props.d.ts +5 -1
  12. package/dist/bundled/v2/components/or-card-collection-v3/styles.d.ts +2 -2
  13. package/dist/bundled/v2/components/or-card-collection-v3/types.d.ts +8 -3
  14. package/dist/bundled/v2/components/or-card-v3/index.js +1 -1
  15. package/dist/bundled/v2/components/or-search-v3/OrSearch.vue.d.ts +13 -0
  16. package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
  17. package/dist/bundled/v2/components/or-select-v3/index.js +2 -2
  18. package/dist/bundled/v2/components/or-sort-header-v3/index.js +1 -1
  19. package/dist/bundled/v2/hooks/index.js +1 -1
  20. package/dist/bundled/v2/index.js +7 -7
  21. package/dist/bundled/v2/{useOverflow-bae6342f.js → useOverflow-dc93a300.js} +1 -1
  22. package/dist/bundled/v3/OrButton-8ab33d9d.js +33 -0
  23. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-b983bda7.js +228 -0
  24. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-289b5600.js → OrConfirm.vue_vue_type_script_lang-85472b12.js} +6 -36
  25. package/dist/bundled/v3/OrMenu-f26e8e55.js +29 -0
  26. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-ed78b21f.js → OrSearch.vue_vue_type_script_lang-0ae8a6dd.js} +8 -2
  27. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-15285ce4.js → OrSelect.vue_vue_type_script_lang-dfadd12f.js} +1 -1
  28. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-919b2021.js → OrTabs.vue_vue_type_script_lang-61b79a5a.js} +10 -36
  29. package/dist/bundled/v3/components/index.js +11 -9
  30. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +5 -0
  31. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +67 -42
  32. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +35 -0
  33. package/dist/bundled/v3/components/or-card-collection-v3/index.js +11 -4
  34. package/dist/bundled/v3/components/or-card-collection-v3/props.d.ts +5 -1
  35. package/dist/bundled/v3/components/or-card-collection-v3/styles.d.ts +2 -2
  36. package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +8 -3
  37. package/dist/bundled/v3/components/or-confirm-v3/index.js +2 -1
  38. package/dist/bundled/v3/components/or-search-v3/OrSearch.vue.d.ts +13 -0
  39. package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
  40. package/dist/bundled/v3/components/or-select-v3/index.js +2 -2
  41. package/dist/bundled/v3/components/or-tabs-v3/index.js +2 -1
  42. package/dist/bundled/v3/hooks/index.js +1 -1
  43. package/dist/bundled/v3/index.js +330 -299
  44. package/dist/bundled/v3/{useOverflow-6dce216b.js → useOverflow-06bcc7d7.js} +1 -1
  45. package/dist/esm/v2/OrCardCollection-61c86bfc.js +346 -0
  46. package/dist/esm/v2/{OrSearch-ddb7c1fe.js → OrSearch-62d91301.js} +7 -1
  47. package/dist/esm/v2/{OrSelect-f0ff5a85.js → OrSelect-ac382aa6.js} +1 -1
  48. package/dist/esm/v2/components/index.js +4 -4
  49. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +5 -0
  50. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +67 -42
  51. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +35 -0
  52. package/dist/esm/v2/components/or-card-collection-v3/index.js +7 -4
  53. package/dist/esm/v2/components/or-card-collection-v3/props.d.ts +5 -1
  54. package/dist/esm/v2/components/or-card-collection-v3/styles.d.ts +2 -2
  55. package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +8 -3
  56. package/dist/esm/v2/components/or-search-v3/OrSearch.vue.d.ts +13 -0
  57. package/dist/esm/v2/components/or-search-v3/index.js +1 -1
  58. package/dist/esm/v2/components/or-select-v3/index.js +2 -2
  59. package/dist/esm/v2/hooks/index.js +1 -1
  60. package/dist/esm/v2/index.js +4 -4
  61. package/dist/esm/v2/{useOverflow-af6161c8.js → useOverflow-a3dc6212.js} +1 -1
  62. package/dist/esm/v3/OrCardCollection-fdc7848b.js +289 -0
  63. package/dist/esm/v3/{OrSearch-cdde55ce.js → OrSearch-aafb93b4.js} +7 -1
  64. package/dist/esm/v3/{OrSelect-7e813982.js → OrSelect-fee9c099.js} +1 -1
  65. package/dist/esm/v3/components/index.js +4 -4
  66. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +5 -0
  67. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +67 -42
  68. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +35 -0
  69. package/dist/esm/v3/components/or-card-collection-v3/index.js +7 -4
  70. package/dist/esm/v3/components/or-card-collection-v3/props.d.ts +5 -1
  71. package/dist/esm/v3/components/or-card-collection-v3/styles.d.ts +2 -2
  72. package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +8 -3
  73. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +13 -0
  74. package/dist/esm/v3/components/or-search-v3/index.js +1 -1
  75. package/dist/esm/v3/components/or-select-v3/index.js +2 -2
  76. package/dist/esm/v3/hooks/index.js +1 -1
  77. package/dist/esm/v3/index.js +4 -4
  78. package/dist/esm/v3/{useOverflow-af6161c8.js → useOverflow-a3dc6212.js} +1 -1
  79. package/package.json +1 -1
  80. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +230 -30
  81. package/src/components/or-card-collection-v3/OrCardCollection.vue +120 -77
  82. package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +41 -0
  83. package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +42 -0
  84. package/src/components/or-card-collection-v3/props.ts +14 -1
  85. package/src/components/or-card-collection-v3/styles.ts +3 -3
  86. package/src/components/or-card-collection-v3/types.ts +9 -3
  87. package/src/components/or-search-v3/OrSearch.vue +7 -1
  88. package/src/hooks/useOverflow.ts +1 -1
  89. package/dist/bundled/v2/OrCardCollection-a9a779ea.js +0 -228
  90. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-3993a015.js +0 -164
  91. package/dist/esm/v2/OrCardCollection-4f001551.js +0 -227
  92. package/dist/esm/v3/OrCardCollection-5a0febaf.js +0 -198
@@ -23,7 +23,7 @@ function useOverflow(container) {
23
23
  x: containerOffset,
24
24
  width: containerWidth
25
25
  } = container.getBoundingClientRect();
26
- if (itemOffset + itemWidth > containerOffset + containerWidth) {
26
+ if (itemOffset + itemWidth >= containerOffset + containerWidth) {
27
27
  item.style.setProperty('visibility', 'hidden');
28
28
  return {
29
29
  innerItems,
@@ -0,0 +1,346 @@
1
+ import { defineComponent, computed, ref, watch } from 'vue-demi';
2
+ import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
+ import '@vueuse/core';
4
+ import { _ as __vue_component__$2 } from './OrIconButton-e17e4944.js';
5
+ import { _ as __vue_component__$4 } from './OrMenu-df27d0ef.js';
6
+ import './OrPopover-9bafbdb4.js';
7
+ import { _ as __vue_component__$5 } from './OrMenuItem-c7f28480.js';
8
+ import { _ as __vue_component__$6 } from './OrIcon-5e394c62.js';
9
+ import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
10
+ import { _ as __vue_component__$3 } from './OrButton-357a5756.js';
11
+ import { _ as __vue_component__$7 } from './OrSearch-62d91301.js';
12
+ import './OrInputBox-4d5a318d.js';
13
+
14
+ const CardCollectionRoot = [
15
+ // Layout
16
+ 'layout-column',
17
+ // Spacing
18
+ 'gap-md'];
19
+ const CardCollectionToolbar = [
20
+ // Layout
21
+ 'layout-row justify-between',
22
+ // Typography
23
+ 'typography-body-2-regular',
24
+ // Theme
25
+ 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
26
+ const CardCollectionToolbarPanel = [
27
+ // Layout
28
+ 'layout-row',
29
+ // Spacing
30
+ 'gap-lg+'];
31
+ const CardCollectionContent = [
32
+ // Layout
33
+ 'grid',
34
+ // Spacing
35
+ 'gap-sm md:gap-md'];
36
+ const CardCollectionContentViews = {
37
+ 'grid': [
38
+ // Layout
39
+ 'sm:grid-cols-1', 'md:grid-cols-2', 'lg:grid-cols-4', 'xl:grid-cols-6'],
40
+ 'list': []
41
+ };
42
+
43
+ var script$1 = defineComponent({
44
+ name: 'OrCardCollectionView',
45
+ props: {
46
+ items: {
47
+ type: Array,
48
+ default: []
49
+ },
50
+ mode: {
51
+ type: String,
52
+ required: true
53
+ }
54
+ },
55
+ setup(props) {
56
+ const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[props.mode]]);
57
+ return {
58
+ contentStyles
59
+ };
60
+ }
61
+ });
62
+
63
+ /* script */
64
+ const __vue_script__$1 = script$1;
65
+
66
+ /* template */
67
+ var __vue_render__$1 = function () {
68
+ var _vm = this;
69
+ var _h = _vm.$createElement;
70
+ var _c = _vm._self._c || _h;
71
+ return _c('div', {
72
+ class: _vm.contentStyles
73
+ }, [_vm._l(_vm.items, function (item) {
74
+ return _vm._t("item", function () {
75
+ return [_vm._v("\n " + _vm._s(item.key) + "\n ")];
76
+ }, null, {
77
+ item: item,
78
+ mode: _vm.mode
79
+ });
80
+ })], 2);
81
+ };
82
+ var __vue_staticRenderFns__$1 = [];
83
+
84
+ /* style */
85
+ const __vue_inject_styles__$1 = undefined;
86
+ /* scoped */
87
+ const __vue_scope_id__$1 = undefined;
88
+ /* module identifier */
89
+ const __vue_module_identifier__$1 = undefined;
90
+ /* functional template */
91
+ const __vue_is_functional_template__$1 = false;
92
+ /* style inject */
93
+
94
+ /* style inject SSR */
95
+
96
+ /* style inject shadow dom */
97
+
98
+ const __vue_component__$1 = /*#__PURE__*/normalizeComponent({
99
+ render: __vue_render__$1,
100
+ staticRenderFns: __vue_staticRenderFns__$1
101
+ }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
102
+
103
+ var DefaultCardCollectionViews;
104
+ (function (DefaultCardCollectionViews) {
105
+ DefaultCardCollectionViews["Grid"] = "grid";
106
+ DefaultCardCollectionViews["List"] = "list";
107
+ })(DefaultCardCollectionViews || (DefaultCardCollectionViews = {}));
108
+ const gridView = {
109
+ view: DefaultCardCollectionViews.Grid,
110
+ icon: 'grid_view'
111
+ };
112
+ const listView = {
113
+ view: DefaultCardCollectionViews.List,
114
+ icon: 'view_agenda'
115
+ };
116
+ const defaultViewModes = [gridView, listView];
117
+
118
+ var script = defineComponent({
119
+ name: 'OrCardCollection',
120
+ components: {
121
+ OrCardCollectionView: __vue_component__$1,
122
+ OrIconButton: __vue_component__$2,
123
+ OrButton: __vue_component__$3,
124
+ OrMenu: __vue_component__$4,
125
+ OrMenuItem: __vue_component__$5,
126
+ OrIcon: __vue_component__$6,
127
+ OrSearch: __vue_component__$7
128
+ },
129
+ inheritAttrs: false,
130
+ props: {
131
+ items: {
132
+ type: Array,
133
+ default: []
134
+ },
135
+ view: {
136
+ type: String,
137
+ default: gridView.view
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: ''
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
+ const sortLabel = computed(() => {
169
+ var _a;
170
+ return (_a = props.sortOptions.find(item => item.value === props.sort)) === null || _a === void 0 ? void 0 : _a.label;
171
+ });
172
+ // State
173
+ const proxyView = ref(props.view);
174
+ const proxySort = ref(props.sort);
175
+ const proxySearch = ref(props.search);
176
+ // Methods
177
+ function switchView(view) {
178
+ proxyView.value = view;
179
+ }
180
+ function handleSort(sort) {
181
+ proxySort.value = sort;
182
+ }
183
+ function handleSearch(search) {
184
+ proxySearch.value = search;
185
+ }
186
+ // Effects
187
+ watch(() => props.view, value => {
188
+ proxyView.value = value;
189
+ });
190
+ watch(proxyView, value => {
191
+ context.emit('viewChange', value);
192
+ });
193
+ watch(() => props.sort, value => {
194
+ proxySort.value = value;
195
+ });
196
+ watch(proxySort, value => {
197
+ context.emit('sortChange', value);
198
+ });
199
+ watch(() => props.search, value => {
200
+ proxySearch.value = value;
201
+ });
202
+ watch(proxySearch, value => {
203
+ context.emit('searchChange', value);
204
+ });
205
+ return {
206
+ root,
207
+ sortMenu,
208
+ sortButton,
209
+ rootStyles,
210
+ toolbarStyles,
211
+ toolbarPanelStyles,
212
+ proxyView,
213
+ proxySort,
214
+ proxySearch,
215
+ sortLabel,
216
+ switchView,
217
+ handleSort,
218
+ handleSearch
219
+ };
220
+ }
221
+ });
222
+
223
+ /* script */
224
+ const __vue_script__ = script;
225
+
226
+ /* template */
227
+ var __vue_render__ = function () {
228
+ var _vm = this;
229
+ var _h = _vm.$createElement;
230
+ var _c = _vm._self._c || _h;
231
+ return _c('div', _vm._b({
232
+ ref: "root",
233
+ class: _vm.rootStyles
234
+ }, 'div', _vm.$attrs, false), [_c('div', {
235
+ class: _vm.toolbarStyles
236
+ }, [_c('div', {
237
+ class: _vm.toolbarPanelStyles
238
+ }, [_vm.sortOptions.length ? [_c('OrButton', {
239
+ ref: "sortButton",
240
+ attrs: {
241
+ "variant": "link",
242
+ "color": "inherit"
243
+ },
244
+ on: {
245
+ "click": function ($event) {
246
+ return _vm.sortMenu.toggle();
247
+ }
248
+ }
249
+ }, [_vm._v("\n " + _vm._s(_vm.sortLabel) + "\n "), _vm.sortMenu ? _c('OrIcon', {
250
+ attrs: {
251
+ "icon": _vm.sortMenu.isOpen ? 'arrow_drop_up' : 'arrow_drop_down'
252
+ }
253
+ }) : _vm._e()], 1), _vm._v(" "), _c('OrMenu', {
254
+ ref: "sortMenu",
255
+ attrs: {
256
+ "trigger": _vm.sortButton && _vm.sortButton.root
257
+ }
258
+ }, _vm._l(_vm.sortOptions, function (sortItem) {
259
+ return _c('OrMenuItem', {
260
+ key: sortItem,
261
+ on: {
262
+ "click": function ($event) {
263
+ return _vm.handleSort(sortItem.value);
264
+ }
265
+ }
266
+ }, [_vm._v("\n " + _vm._s(sortItem.label) + "\n ")]);
267
+ }), 1)] : _vm._e()], 2), _vm._v(" "), _c('div', {
268
+ class: _vm.toolbarPanelStyles
269
+ }, [_c('OrSearch', {
270
+ staticClass: "md:w-[350px]",
271
+ attrs: {
272
+ "size": "s"
273
+ },
274
+ on: {
275
+ "search": _vm.handleSearch
276
+ },
277
+ model: {
278
+ value: _vm.proxySearch,
279
+ callback: function ($$v) {
280
+ _vm.proxySearch = $$v;
281
+ },
282
+ expression: "proxySearch"
283
+ }
284
+ }), _vm._v(" "), _c('div', {
285
+ staticClass: "layout-row gap-sm"
286
+ }, [_vm.viewModes.length > 1 ? _vm._l(_vm.viewModes, function (viewOption) {
287
+ return _c('OrIconButton', {
288
+ key: viewOption.view,
289
+ attrs: {
290
+ "icon": {
291
+ icon: viewOption.icon,
292
+ variant: viewOption.view === _vm.proxyView ? 'filled' : 'outlined'
293
+ }
294
+ },
295
+ on: {
296
+ "click": function ($event) {
297
+ return _vm.switchView(viewOption.view);
298
+ }
299
+ }
300
+ });
301
+ }) : _vm._e(), _vm._v(" "), _vm._t("addon")], 2)], 1)]), _vm._v(" "), _vm._t("header", null, null, {
302
+ items: _vm.items,
303
+ mode: _vm.proxyView
304
+ }), _vm._v(" "), _vm.items.length ? _vm._t(_vm.proxyView, function () {
305
+ return [_c('OrCardCollectionView', {
306
+ attrs: {
307
+ "items": _vm.items,
308
+ "mode": _vm.proxyView
309
+ },
310
+ scopedSlots: _vm._u([{
311
+ key: "item",
312
+ fn: function (props) {
313
+ return [_vm._t("item", null, null, props)];
314
+ }
315
+ }], null, true)
316
+ })];
317
+ }, null, {
318
+ items: _vm.items
319
+ }) : _vm.items.length === 0 && _vm.proxySearch.length > 0 ? _vm._t("noSearchResults", function () {
320
+ return [_vm._v("\n No results\n ")];
321
+ }, null, {
322
+ search: _vm.proxySearch
323
+ }) : _vm._e()], 2);
324
+ };
325
+ var __vue_staticRenderFns__ = [];
326
+
327
+ /* style */
328
+ const __vue_inject_styles__ = undefined;
329
+ /* scoped */
330
+ const __vue_scope_id__ = undefined;
331
+ /* module identifier */
332
+ const __vue_module_identifier__ = undefined;
333
+ /* functional template */
334
+ const __vue_is_functional_template__ = false;
335
+ /* style inject */
336
+
337
+ /* style inject SSR */
338
+
339
+ /* style inject shadow dom */
340
+
341
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
342
+ render: __vue_render__,
343
+ staticRenderFns: __vue_staticRenderFns__
344
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
345
+
346
+ export { DefaultCardCollectionViews as D, __vue_component__ as _, defaultViewModes as d, gridView as g, listView as l };
@@ -12,6 +12,11 @@ var script = defineComponent({
12
12
  },
13
13
  inheritAttrs: false,
14
14
  props: {
15
+ modelValue: {
16
+ type: String,
17
+ default: '',
18
+ required: false
19
+ },
15
20
  size: {
16
21
  type: String,
17
22
  default: InputBoxSize.M
@@ -36,13 +41,14 @@ var script = defineComponent({
36
41
  emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
37
42
  expose: ['root', 'focus', 'clear'],
38
43
  setup(props, context) {
44
+ var _a;
39
45
  // Refs
40
46
  const root = ref();
41
47
  // Styles
42
48
  const classAttribute = useClassAttribute();
43
49
  const rootStyles = computed(() => ['or-search', classAttribute.value]);
44
50
  // State
45
- const localModelValue = ref('');
51
+ const localModelValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : '');
46
52
  // Events
47
53
  debouncedWatch(localModelValue, () => context.emit('search', localModelValue.value), {
48
54
  debounce: props.debounce
@@ -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-af6161c8.js';
4
+ import { u as useOverflow } from './useOverflow-a3dc6212.js';
5
5
  import '@vueuse/core';
6
6
  import { _ as __vue_component__$1 } from './OrCheckbox-567e387c.js';
7
7
  import { _ as __vue_component__$2 } from './OrError-d267ee9a.js';
@@ -8,7 +8,7 @@ export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTT
8
8
  export { a as ButtonColor, b as ButtonType, B as ButtonVariant, _ as OrButtonV3 } from '../OrButton-357a5756.js';
9
9
  export { _ as OrCard } from '../OrCard-b7268256.js';
10
10
  export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from '../OrCardCollection-f6b07557.js';
11
- export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../OrCardCollection-4f001551.js';
11
+ export { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection-61c86bfc.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';
@@ -63,10 +63,10 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
63
63
  export { _ as OrRadio } from '../OrRadio-e4198532.js';
64
64
  export { _ as OrRadioGroup } from '../OrRadioGroup-d9d32cba.js';
65
65
  export { _ as OrRadioV3 } from '../OrRadio-848ce55d.js';
66
- export { _ as OrSearchV3 } from '../OrSearch-ddb7c1fe.js';
66
+ export { _ as OrSearchV3 } from '../OrSearch-62d91301.js';
67
67
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-e8dce8f9.js';
68
68
  export { _ as OrSelect } from '../OrSelect-dae2b069.js';
69
- export { _ as OrSelectV3 } from '../OrSelect-f0ff5a85.js';
69
+ export { _ as OrSelectV3 } from '../OrSelect-ac382aa6.js';
70
70
  export { _ as OrSidebar, O as OrSidebarSide } from '../OrSidebar-7d6125bb.js';
71
71
  export { O as OrSidebarPlacement, _ as OrSidebarV3 } from '../OrSidebar-fabc7bc9.js';
72
72
  export { _ as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from '../OrSkeletonText-cc94bdc9.js';
@@ -121,6 +121,6 @@ import '../useElevation-31bfe1f6.js';
121
121
  import '../useResponsive-a02e95b7.js';
122
122
  import '@vueuse/integrations/useFocusTrap';
123
123
  import '../dropdown-open-0d314aa4.js';
124
- import '../useOverflow-af6161c8.js';
124
+ import '../useOverflow-a3dc6212.js';
125
125
  import 'portal-vue/dist/portal-vue.esm.js';
126
126
  import 'portal-vue';
@@ -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,7 @@ 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>;
22
+ export declare const EmptySearchResults: StoryFn<typeof OrCardCollection>;
@@ -1,41 +1,51 @@
1
1
  import { PropType } from 'vue-demi';
2
- import { SortHeaderModel } from '../or-sort-header-v3';
3
- import { CardCollectionView } from './props';
4
- import { CardCollectionItem, CardCollectionSortHeader } from './types';
2
+ import { CardCollectionItem, SortOption, ViewMode } from './types';
5
3
  declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
6
4
  root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
5
+ 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, {
6
+ [x: string]: ((...args: any[]) => any) | null;
7
+ } | string[], {} & {}, {
8
+ [x: number]: string;
9
+ } | {}, true>)) | undefined>;
10
+ 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, {
11
+ [x: string]: ((...args: any[]) => any) | null;
12
+ } | string[], {} & {}, {
13
+ [x: number]: string;
14
+ } | {}, true>)) | undefined>;
7
15
  rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
8
16
  toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
9
17
  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
- }>;
18
+ proxyView: import("@vue/composition-api").Ref<string>;
19
+ proxySort: import("@vue/composition-api").Ref<string>;
16
20
  proxySearch: import("@vue/composition-api").Ref<string>;
17
- switchToGridView: () => void;
18
- switchToListView: () => void;
21
+ sortLabel: import("@vue/composition-api").ComputedRef<string | undefined>;
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>;
26
- default: CardCollectionView;
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ viewModes: {
35
+ type: PropType<ViewMode[]>;
36
+ default: () => ViewMode[];
27
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<SortOption[]>;
44
+ default: () => never[];
35
45
  };
36
46
  search: {
37
47
  type: StringConstructor;
38
- default: undefined;
48
+ default: string;
39
49
  };
40
50
  }, import("@vue/composition-api").ExtractPropTypes<{
41
51
  items: {
@@ -43,56 +53,71 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
43
53
  default: CardCollectionItem[];
44
54
  };
45
55
  view: {
46
- type: PropType<CardCollectionView>;
47
- default: CardCollectionView;
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ viewModes: {
60
+ type: PropType<ViewMode[]>;
61
+ default: () => ViewMode[];
48
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<SortOption[]>;
69
+ default: () => never[];
56
70
  };
57
71
  search: {
58
72
  type: StringConstructor;
59
- default: undefined;
73
+ default: string;
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: SortOption[];
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
+ sortLabel: import("@vue/composition-api").ComputedRef<string | undefined>;
103
+ switchView: (view: string) => void;
104
+ handleSort: (sort: string) => void;
105
+ handleSearch: (search: string) => void;
83
106
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
84
107
  search: string;
85
- sort: SortHeaderModel;
108
+ sort: string;
86
109
  items: CardCollectionItem[];
87
- view: CardCollectionView;
88
- sortHeaders: CardCollectionSortHeader[];
110
+ view: string;
111
+ viewModes: ViewMode[];
112
+ sortOptions: SortOption[];
89
113
  } & {} & {
90
114
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
91
115
  }, {
92
116
  search: string;
93
- sort: SortHeaderModel;
117
+ sort: string;
94
118
  items: CardCollectionItem[];
95
- view: CardCollectionView;
96
- sortHeaders: CardCollectionSortHeader[];
119
+ view: string;
120
+ viewModes: ViewMode[];
121
+ sortOptions: SortOption[];
97
122
  }, true>);
98
123
  export default _default;
@@ -0,0 +1,35 @@
1
+ import { PropType } from 'vue-demi';
2
+ import { CardCollectionItem } from './types';
3
+ import { DefaultCardCollectionViews } 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<DefaultCardCollectionViews>;
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<DefaultCardCollectionViews>;
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: DefaultCardCollectionViews;
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: DefaultCardCollectionViews;
32
+ } & {}, {
33
+ items: CardCollectionItem[];
34
+ }, true>);
35
+ export default _default;
@@ -1,11 +1,10 @@
1
- export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-4f001551.js';
1
+ export { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection-61c86bfc.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';
@@ -15,10 +14,14 @@ import '../../OrBottomSheet-16c2e610.js';
15
14
  import '../../OrOverlay-18ba2dc6.js';
16
15
  import '../../OrTeleport.vue2-fb92f29f.js';
17
16
  import 'portal-vue';
17
+ import '../../OrMenu-df27d0ef.js';
18
+ import '../../OrMenuItem-c7f28480.js';
19
+ import '../../OrButton-357a5756.js';
20
+ import '../../OrLoader-f857d55b.js';
21
+ import '../../OrSearch-62d91301.js';
18
22
  import '../../OrInput-2f16a7ac.js';
19
23
  import '../../OrError-d267ee9a.js';
20
24
  import '../../OrHint-42dc9ebb.js';
21
25
  import '../../OrInputBox-4d5a318d.js';
22
26
  import '../../OrLabel-2a9f1477.js';
23
27
  import '../../browser-82dea9ed.js';
24
- import '../../OrSortHeader-19bf94ca.js';