@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,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,347 +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 { _ 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
- 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
- /* script */
70
- const __vue_script__$1 = script$1;
71
-
72
- /* template */
73
- var __vue_render__$1 = function () {
74
- var _vm = this;
75
- var _h = _vm.$createElement;
76
- var _c = _vm._self._c || _h;
77
- return _c('div', {
78
- class: _vm.contentStyles
79
- }, [_vm._l(_vm.items, function (item) {
80
- return _vm._t("item", function () {
81
- return [_vm._v("\n " + _vm._s(item.key) + "\n ")];
82
- }, null, {
83
- item: item,
84
- mode: _vm.mode
85
- });
86
- })], 2);
87
- };
88
- var __vue_staticRenderFns__$1 = [];
89
-
90
- /* style */
91
- const __vue_inject_styles__$1 = undefined;
92
- /* scoped */
93
- const __vue_scope_id__$1 = undefined;
94
- /* module identifier */
95
- const __vue_module_identifier__$1 = undefined;
96
- /* functional template */
97
- const __vue_is_functional_template__$1 = false;
98
- /* style inject */
99
-
100
- /* style inject SSR */
101
-
102
- /* style inject shadow dom */
103
-
104
- const __vue_component__$1 = /*#__PURE__*/normalizeComponent({
105
- render: __vue_render__$1,
106
- staticRenderFns: __vue_staticRenderFns__$1
107
- }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
108
-
109
- const gridView = {
110
- view: 'grid',
111
- icon: 'grid_view'
112
- };
113
- const listView = {
114
- view: 'list',
115
- icon: 'view_agenda'
116
- };
117
- const defaultViewModes = [gridView, listView];
118
-
119
- var script = defineComponent({
120
- name: 'OrCardCollection',
121
- components: {
122
- OrCardCollectionView: __vue_component__$1,
123
- OrIconButton: __vue_component__$2,
124
- OrButton: __vue_component__$3,
125
- OrMenu: __vue_component__$4,
126
- OrMenuItem: __vue_component__$5,
127
- OrIcon: __vue_component__$6,
128
- OrSearch: __vue_component__$7
129
- },
130
- inheritAttrs: false,
131
- props: {
132
- items: {
133
- type: Array,
134
- default: []
135
- },
136
- view: {
137
- type: String,
138
- default: CardCollectionView.Grid
139
- },
140
- viewModes: {
141
- type: Array,
142
- default: () => defaultViewModes
143
- },
144
- sort: {
145
- type: String,
146
- default: undefined
147
- },
148
- sortOptions: {
149
- type: Array,
150
- default: () => []
151
- },
152
- search: {
153
- type: String,
154
- default: ''
155
- }
156
- },
157
- emits: ['viewChange', 'sortChange', 'searchChange'],
158
- expose: ['root'],
159
- setup(props, context) {
160
- // Refs
161
- const root = ref();
162
- const sortMenu = ref();
163
- const sortButton = ref();
164
- // Styles
165
- const classAttribute = useClassAttribute();
166
- const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
167
- const toolbarStyles = computed(() => [...CardCollectionToolbar]);
168
- const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
169
- const sortLabel = computed(() => {
170
- var _a;
171
- return (_a = props.sortOptions.find(item => item.value === props.sort)) === null || _a === void 0 ? void 0 : _a.label;
172
- });
173
- // State
174
- const proxyView = ref(props.view);
175
- const proxySort = ref(props.sort);
176
- const proxySearch = ref(props.search);
177
- // Methods
178
- function switchView(view) {
179
- proxyView.value = view;
180
- }
181
- function handleSort(sort) {
182
- proxySort.value = sort;
183
- }
184
- function handleSearch(search) {
185
- proxySearch.value = search;
186
- }
187
- // Effects
188
- watch(() => props.view, value => {
189
- proxyView.value = value;
190
- });
191
- watch(proxyView, value => {
192
- context.emit('viewChange', value);
193
- });
194
- watch(() => props.sort, value => {
195
- proxySort.value = value;
196
- });
197
- watch(proxySort, value => {
198
- context.emit('sortChange', value);
199
- });
200
- watch(() => props.search, value => {
201
- proxySearch.value = value;
202
- });
203
- watch(proxySearch, value => {
204
- context.emit('searchChange', value);
205
- });
206
- return {
207
- root,
208
- sortMenu,
209
- sortButton,
210
- rootStyles,
211
- toolbarStyles,
212
- toolbarPanelStyles,
213
- proxyView,
214
- proxySort,
215
- proxySearch,
216
- sortLabel,
217
- switchView,
218
- handleSort,
219
- handleSearch
220
- };
221
- }
222
- });
223
-
224
- /* script */
225
- const __vue_script__ = script;
226
-
227
- /* template */
228
- var __vue_render__ = function () {
229
- var _vm = this;
230
- var _h = _vm.$createElement;
231
- var _c = _vm._self._c || _h;
232
- return _c('div', _vm._b({
233
- ref: "root",
234
- class: _vm.rootStyles
235
- }, 'div', _vm.$attrs, false), [_c('div', {
236
- class: _vm.toolbarStyles
237
- }, [_c('div', {
238
- class: _vm.toolbarPanelStyles
239
- }, [_vm.sortOptions.length ? [_c('OrButton', {
240
- ref: "sortButton",
241
- attrs: {
242
- "variant": "link",
243
- "color": "inherit"
244
- },
245
- on: {
246
- "click": function ($event) {
247
- return _vm.sortMenu.toggle();
248
- }
249
- }
250
- }, [_vm._v("\n " + _vm._s(_vm.sortLabel) + "\n "), _vm.sortMenu ? _c('OrIcon', {
251
- attrs: {
252
- "icon": _vm.sortMenu.isOpen ? 'arrow_drop_up' : 'arrow_drop_down'
253
- }
254
- }) : _vm._e()], 1), _vm._v(" "), _c('OrMenu', {
255
- ref: "sortMenu",
256
- attrs: {
257
- "trigger": _vm.sortButton && _vm.sortButton.root
258
- }
259
- }, _vm._l(_vm.sortOptions, function (sortItem) {
260
- return _c('OrMenuItem', {
261
- key: sortItem,
262
- on: {
263
- "click": function ($event) {
264
- return _vm.handleSort(sortItem.value);
265
- }
266
- }
267
- }, [_vm._v("\n " + _vm._s(sortItem.label) + "\n ")]);
268
- }), 1)] : _vm._e()], 2), _vm._v(" "), _c('div', {
269
- class: _vm.toolbarPanelStyles
270
- }, [_c('OrSearch', {
271
- staticClass: "md:w-[350px]",
272
- attrs: {
273
- "size": "s"
274
- },
275
- on: {
276
- "search": _vm.handleSearch
277
- },
278
- model: {
279
- value: _vm.proxySearch,
280
- callback: function ($$v) {
281
- _vm.proxySearch = $$v;
282
- },
283
- expression: "proxySearch"
284
- }
285
- }), _vm._v(" "), _c('div', {
286
- staticClass: "layout-row gap-sm"
287
- }, [_vm.viewModes.length > 1 ? _vm._l(_vm.viewModes, function (viewOption) {
288
- return _c('OrIconButton', {
289
- key: viewOption.view,
290
- attrs: {
291
- "icon": {
292
- icon: viewOption.icon,
293
- variant: viewOption.view === _vm.proxyView ? 'filled' : 'outlined'
294
- }
295
- },
296
- on: {
297
- "click": function ($event) {
298
- return _vm.switchView(viewOption.view);
299
- }
300
- }
301
- });
302
- }) : _vm._e(), _vm._v(" "), _vm._t("addon")], 2)], 1)]), _vm._v(" "), _vm._t("header", null, null, {
303
- items: _vm.items,
304
- mode: _vm.proxyView
305
- }), _vm._v(" "), _vm.items.length ? _vm._t(_vm.proxyView, function () {
306
- return [_c('OrCardCollectionView', {
307
- attrs: {
308
- "items": _vm.items,
309
- "mode": _vm.proxyView
310
- },
311
- scopedSlots: _vm._u([{
312
- key: "item",
313
- fn: function (props) {
314
- return [_vm._t("item", null, null, props)];
315
- }
316
- }], null, true)
317
- })];
318
- }, null, {
319
- items: _vm.items
320
- }) : _vm.items.length === 0 && _vm.proxySearch.length > 0 ? _vm._t("noSearchResults", function () {
321
- return [_vm._v("\n No results\n ")];
322
- }, null, {
323
- search: _vm.proxySearch
324
- }) : _vm._e()], 2);
325
- };
326
- var __vue_staticRenderFns__ = [];
327
-
328
- /* style */
329
- const __vue_inject_styles__ = undefined;
330
- /* scoped */
331
- const __vue_scope_id__ = undefined;
332
- /* module identifier */
333
- const __vue_module_identifier__ = undefined;
334
- /* functional template */
335
- const __vue_is_functional_template__ = false;
336
- /* style inject */
337
-
338
- /* style inject SSR */
339
-
340
- /* style inject shadow dom */
341
-
342
- const __vue_component__ = /*#__PURE__*/normalizeComponent({
343
- render: __vue_render__,
344
- staticRenderFns: __vue_staticRenderFns__
345
- }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
346
-
347
- export { CardCollectionView as C, __vue_component__ as _ };
@@ -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[];