@onereach/ui-components 2.69.2-beta.2123.0 → 2.69.2-beta.2128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/v2/{OrAvatar-2fa559e1.js → OrAvatar-ae61bfb9.js} +41 -15
- package/dist/bundled/v2/{OrCard-29116e1f.js → OrCard-58a1ba3e.js} +2 -2
- package/dist/bundled/v2/OrCardCollection-a9a779ea.js +228 -0
- package/dist/bundled/v2/{OrSearch-a11b3621.js → OrSearch-9d402f56.js} +3 -9
- package/dist/bundled/v2/{OrSortHeader-9932d28f.js → OrSortHeader-396e6a7c.js} +2 -2
- package/dist/bundled/v2/components/index.js +5 -5
- package/dist/bundled/v2/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/bundled/v2/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
- package/dist/bundled/v2/components/or-avatar-v3/index.js +2 -1
- package/dist/bundled/v2/components/or-avatar-v3/props.d.ts +2 -1
- package/dist/bundled/v2/components/or-avatar-v3/styles.d.ts +2 -0
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +42 -67
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -7
- package/dist/bundled/v2/components/or-card-collection-v3/props.d.ts +1 -5
- package/dist/bundled/v2/components/or-card-collection-v3/styles.d.ts +2 -2
- package/dist/bundled/v2/components/or-card-collection-v3/types.d.ts +3 -8
- package/dist/bundled/v2/components/or-card-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-search-v3/OrSearch.vue.d.ts +0 -13
- package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-sort-header-v3/index.js +1 -1
- package/dist/bundled/v2/index.js +6 -6
- package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-22e46ce1.js → OrAvatar.vue_vue_type_script_lang-0426862b.js} +35 -13
- package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-861158b5.js +164 -0
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-85472b12.js → OrConfirm.vue_vue_type_script_lang-289b5600.js} +36 -6
- package/dist/bundled/v3/{OrIconButton-4bd33e3c.js → OrIconButton-1581013c.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-641f6e06.js → OrIconButton.vue_vue_type_script_lang-f6f801ff.js} +1 -1
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-3a8189f4.js → OrInlineInput.vue_vue_type_script_lang-f29483f4.js} +2 -2
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-890b97ab.js → OrInlineTextarea.vue_vue_type_script_lang-cc40af48.js} +2 -2
- package/dist/bundled/v3/OrInput.vue_vue_type_script_lang-f6d793d3.js +2 -2
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-00a477f0.js → OrModal.vue_vue_type_script_lang-80a7b906.js} +2 -2
- package/dist/bundled/v3/OrNotification.vue_vue_type_script_lang-fbb35355.js +2 -2
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-0ae8a6dd.js → OrSearch.vue_vue_type_script_lang-ed78b21f.js} +2 -8
- package/dist/bundled/v3/OrSelect.vue_vue_type_script_lang-15285ce4.js +1 -1
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-61b79a5a.js → OrTabs.vue_vue_type_script_lang-919b2021.js} +36 -10
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-92d9fb12.js → OrTag.vue_vue_type_script_lang-dc6a4011.js} +2 -2
- package/dist/bundled/v3/{OrToastContainer-afb51e5d.js → OrToastContainer-7c3c0b12.js} +1 -1
- package/dist/bundled/v3/components/index.js +15 -17
- package/dist/bundled/v3/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/bundled/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
- package/dist/bundled/v3/components/or-avatar-v3/index.js +3 -1
- package/dist/bundled/v3/components/or-avatar-v3/props.d.ts +2 -1
- package/dist/bundled/v3/components/or-avatar-v3/styles.d.ts +2 -0
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +42 -67
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +6 -13
- package/dist/bundled/v3/components/or-card-collection-v3/props.d.ts +1 -5
- package/dist/bundled/v3/components/or-card-collection-v3/styles.d.ts +2 -2
- package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +3 -8
- package/dist/bundled/v3/components/or-confirm-v3/index.js +3 -4
- package/dist/bundled/v3/components/or-icon-button-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-inline-input-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-input-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-modal-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-notification-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-search-v3/OrSearch.vue.d.ts +0 -13
- package/dist/bundled/v3/components/or-search-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-select-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-tabs-v3/index.js +1 -2
- package/dist/bundled/v3/components/or-tag-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-toast-v3/index.js +4 -4
- package/dist/bundled/v3/index.js +314 -339
- package/dist/bundled/v3/{types-6c5eee23.js → types-dcc78caa.js} +2 -2
- package/dist/esm/v2/{OrAvatar-0afdef36.js → OrAvatar-3d155af3.js} +41 -15
- package/dist/esm/v2/OrCardCollection-4f001551.js +227 -0
- package/dist/esm/v2/{OrSearch-62d91301.js → OrSearch-ddb7c1fe.js} +1 -7
- package/dist/esm/v2/components/index.js +3 -3
- package/dist/esm/v2/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/esm/v2/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
- package/dist/esm/v2/components/or-avatar-v3/index.js +2 -1
- package/dist/esm/v2/components/or-avatar-v3/props.d.ts +2 -1
- package/dist/esm/v2/components/or-avatar-v3/styles.d.ts +2 -0
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +42 -67
- package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -7
- package/dist/esm/v2/components/or-card-collection-v3/props.d.ts +1 -5
- package/dist/esm/v2/components/or-card-collection-v3/styles.d.ts +2 -2
- package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +3 -8
- package/dist/esm/v2/components/or-search-v3/OrSearch.vue.d.ts +0 -13
- package/dist/esm/v2/components/or-search-v3/index.js +1 -1
- package/dist/esm/v2/index.js +3 -3
- package/dist/esm/v3/{OrAvatar-ef88d31c.js → OrAvatar-53a4429d.js} +43 -16
- package/dist/esm/v3/OrCardCollection-5a0febaf.js +198 -0
- package/dist/esm/v3/{OrSearch-aafb93b4.js → OrSearch-cdde55ce.js} +1 -7
- package/dist/esm/v3/components/index.js +3 -3
- package/dist/esm/v3/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
- package/dist/esm/v3/components/or-avatar-v3/index.js +2 -1
- package/dist/esm/v3/components/or-avatar-v3/props.d.ts +2 -1
- package/dist/esm/v3/components/or-avatar-v3/styles.d.ts +2 -0
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +42 -67
- package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -7
- package/dist/esm/v3/components/or-card-collection-v3/props.d.ts +1 -5
- package/dist/esm/v3/components/or-card-collection-v3/styles.d.ts +2 -2
- package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +3 -8
- package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +0 -13
- package/dist/esm/v3/components/or-search-v3/index.js +1 -1
- package/dist/esm/v3/index.js +3 -3
- package/package.json +1 -1
- package/src/components/or-avatar-v3/OrAvatar.stories3.ts +9 -7
- package/src/components/or-avatar-v3/OrAvatar.vue +22 -2
- package/src/components/or-avatar-v3/props.ts +1 -0
- package/src/components/or-avatar-v3/styles.ts +49 -11
- package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +30 -230
- package/src/components/or-card-collection-v3/OrCardCollection.vue +77 -120
- package/src/components/or-card-collection-v3/props.ts +1 -14
- package/src/components/or-card-collection-v3/styles.ts +3 -3
- package/src/components/or-card-collection-v3/types.ts +3 -9
- package/src/components/or-search-v3/OrSearch.vue +1 -7
- package/dist/bundled/v2/OrCardCollection-773ae0db.js +0 -346
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
- package/dist/bundled/v3/OrButton-8ab33d9d.js +0 -33
- package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-b983bda7.js +0 -228
- package/dist/bundled/v3/OrMenu-f26e8e55.js +0 -29
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +0 -35
- package/dist/esm/v2/OrCardCollection-61c86bfc.js +0 -346
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
- package/dist/esm/v3/OrCardCollection-fdc7848b.js +0 -289
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +0 -35
- package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +0 -41
- package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +0 -42
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export enum DefaultCardCollectionViews {
|
|
1
|
+
export enum CardCollectionView {
|
|
4
2
|
Grid = 'grid',
|
|
5
3
|
List = 'list',
|
|
6
4
|
}
|
|
7
|
-
|
|
8
|
-
export const gridView: ViewMode = {
|
|
9
|
-
view: DefaultCardCollectionViews.Grid,
|
|
10
|
-
icon: 'grid_view',
|
|
11
|
-
};
|
|
12
|
-
export const listView: ViewMode = {
|
|
13
|
-
view: DefaultCardCollectionViews.List,
|
|
14
|
-
icon: 'view_agenda',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const defaultViewModes = [gridView, listView];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CardCollectionView } from './props';
|
|
2
2
|
|
|
3
3
|
export const CardCollectionRoot: string[] = [
|
|
4
4
|
// Layout
|
|
@@ -25,7 +25,7 @@ export const CardCollectionToolbarPanel: string[] = [
|
|
|
25
25
|
'layout-row',
|
|
26
26
|
|
|
27
27
|
// Spacing
|
|
28
|
-
'gap-
|
|
28
|
+
'gap-sm+',
|
|
29
29
|
];
|
|
30
30
|
|
|
31
31
|
export const CardCollectionContent: string[] = [
|
|
@@ -36,7 +36,7 @@ export const CardCollectionContent: string[] = [
|
|
|
36
36
|
'gap-sm md:gap-md',
|
|
37
37
|
];
|
|
38
38
|
|
|
39
|
-
export const CardCollectionContentViews: Record<
|
|
39
|
+
export const CardCollectionContentViews: Record<CardCollectionView, string[]> = {
|
|
40
40
|
'grid': [
|
|
41
41
|
// Layout
|
|
42
42
|
'sm:grid-cols-1',
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
export interface CardCollectionItem {
|
|
2
|
-
|
|
3
|
-
[key: string|number]: any;
|
|
2
|
+
id: string;
|
|
4
3
|
}
|
|
5
4
|
|
|
6
|
-
export interface
|
|
7
|
-
view: string;
|
|
8
|
-
icon: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface SortOption {
|
|
12
|
-
label: string;
|
|
5
|
+
export interface CardCollectionSortHeader {
|
|
13
6
|
value: string;
|
|
7
|
+
label: string;
|
|
14
8
|
}
|
|
@@ -35,12 +35,6 @@ export default defineComponent({
|
|
|
35
35
|
inheritAttrs: false,
|
|
36
36
|
|
|
37
37
|
props: {
|
|
38
|
-
modelValue: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: '',
|
|
41
|
-
required: false,
|
|
42
|
-
},
|
|
43
|
-
|
|
44
38
|
size: {
|
|
45
39
|
type: String as PropType<SearchSize>,
|
|
46
40
|
default: SearchSize.M,
|
|
@@ -96,7 +90,7 @@ export default defineComponent({
|
|
|
96
90
|
]);
|
|
97
91
|
|
|
98
92
|
// State
|
|
99
|
-
const localModelValue = ref(
|
|
93
|
+
const localModelValue = ref('');
|
|
100
94
|
|
|
101
95
|
// Events
|
|
102
96
|
debouncedWatch(
|
|
@@ -1,346 +0,0 @@
|
|
|
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-a11b3621.js';
|
|
10
|
-
import { u as useClassAttribute } from './useClassAttribute-9bf33346.js';
|
|
11
|
-
|
|
12
|
-
const CardCollectionRoot = [
|
|
13
|
-
// Layout
|
|
14
|
-
'layout-column',
|
|
15
|
-
// Spacing
|
|
16
|
-
'gap-md'];
|
|
17
|
-
const CardCollectionToolbar = [
|
|
18
|
-
// Layout
|
|
19
|
-
'layout-row justify-between',
|
|
20
|
-
// Typography
|
|
21
|
-
'typography-body-2-regular',
|
|
22
|
-
// Theme
|
|
23
|
-
'theme-foreground-default', 'dark:theme-foreground-default-dark'];
|
|
24
|
-
const CardCollectionToolbarPanel = [
|
|
25
|
-
// Layout
|
|
26
|
-
'layout-row',
|
|
27
|
-
// Spacing
|
|
28
|
-
'gap-lg+'];
|
|
29
|
-
const CardCollectionContent = [
|
|
30
|
-
// Layout
|
|
31
|
-
'grid',
|
|
32
|
-
// Spacing
|
|
33
|
-
'gap-sm md:gap-md'];
|
|
34
|
-
const CardCollectionContentViews = {
|
|
35
|
-
'grid': [
|
|
36
|
-
// Layout
|
|
37
|
-
'sm:grid-cols-1', 'md:grid-cols-2', 'lg:grid-cols-4', 'xl:grid-cols-6'],
|
|
38
|
-
'list': []
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var script$1 = defineComponent({
|
|
42
|
-
name: 'OrCardCollectionView',
|
|
43
|
-
props: {
|
|
44
|
-
items: {
|
|
45
|
-
type: Array,
|
|
46
|
-
default: []
|
|
47
|
-
},
|
|
48
|
-
mode: {
|
|
49
|
-
type: String,
|
|
50
|
-
required: true
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
setup(props) {
|
|
54
|
-
const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[props.mode]]);
|
|
55
|
-
return {
|
|
56
|
-
contentStyles
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
/* script */
|
|
62
|
-
const __vue_script__$1 = script$1;
|
|
63
|
-
|
|
64
|
-
/* template */
|
|
65
|
-
var __vue_render__$1 = function () {
|
|
66
|
-
var _vm = this;
|
|
67
|
-
var _h = _vm.$createElement;
|
|
68
|
-
var _c = _vm._self._c || _h;
|
|
69
|
-
return _c('div', {
|
|
70
|
-
class: _vm.contentStyles
|
|
71
|
-
}, [_vm._l(_vm.items, function (item) {
|
|
72
|
-
return _vm._t("item", function () {
|
|
73
|
-
return [_vm._v("\n " + _vm._s(item.key) + "\n ")];
|
|
74
|
-
}, null, {
|
|
75
|
-
item: item,
|
|
76
|
-
mode: _vm.mode
|
|
77
|
-
});
|
|
78
|
-
})], 2);
|
|
79
|
-
};
|
|
80
|
-
var __vue_staticRenderFns__$1 = [];
|
|
81
|
-
|
|
82
|
-
/* style */
|
|
83
|
-
const __vue_inject_styles__$1 = undefined;
|
|
84
|
-
/* scoped */
|
|
85
|
-
const __vue_scope_id__$1 = undefined;
|
|
86
|
-
/* module identifier */
|
|
87
|
-
const __vue_module_identifier__$1 = undefined;
|
|
88
|
-
/* functional template */
|
|
89
|
-
const __vue_is_functional_template__$1 = false;
|
|
90
|
-
/* style inject */
|
|
91
|
-
|
|
92
|
-
/* style inject SSR */
|
|
93
|
-
|
|
94
|
-
/* style inject shadow dom */
|
|
95
|
-
|
|
96
|
-
const __vue_component__$2 = /*#__PURE__*/normalizeComponent({
|
|
97
|
-
render: __vue_render__$1,
|
|
98
|
-
staticRenderFns: __vue_staticRenderFns__$1
|
|
99
|
-
}, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
|
|
100
|
-
var OrCardCollectionView = __vue_component__$2;
|
|
101
|
-
|
|
102
|
-
var DefaultCardCollectionViews;
|
|
103
|
-
(function (DefaultCardCollectionViews) {
|
|
104
|
-
DefaultCardCollectionViews["Grid"] = "grid";
|
|
105
|
-
DefaultCardCollectionViews["List"] = "list";
|
|
106
|
-
})(DefaultCardCollectionViews || (DefaultCardCollectionViews = {}));
|
|
107
|
-
const gridView = {
|
|
108
|
-
view: DefaultCardCollectionViews.Grid,
|
|
109
|
-
icon: 'grid_view'
|
|
110
|
-
};
|
|
111
|
-
const listView = {
|
|
112
|
-
view: DefaultCardCollectionViews.List,
|
|
113
|
-
icon: 'view_agenda'
|
|
114
|
-
};
|
|
115
|
-
const defaultViewModes = [gridView, listView];
|
|
116
|
-
|
|
117
|
-
var script = defineComponent({
|
|
118
|
-
name: 'OrCardCollection',
|
|
119
|
-
components: {
|
|
120
|
-
OrCardCollectionView,
|
|
121
|
-
OrIconButton,
|
|
122
|
-
OrButton,
|
|
123
|
-
OrMenu,
|
|
124
|
-
OrMenuItem,
|
|
125
|
-
OrIcon,
|
|
126
|
-
OrSearch
|
|
127
|
-
},
|
|
128
|
-
inheritAttrs: false,
|
|
129
|
-
props: {
|
|
130
|
-
items: {
|
|
131
|
-
type: Array,
|
|
132
|
-
default: []
|
|
133
|
-
},
|
|
134
|
-
view: {
|
|
135
|
-
type: String,
|
|
136
|
-
default: gridView.view
|
|
137
|
-
},
|
|
138
|
-
viewModes: {
|
|
139
|
-
type: Array,
|
|
140
|
-
default: () => defaultViewModes
|
|
141
|
-
},
|
|
142
|
-
sort: {
|
|
143
|
-
type: String,
|
|
144
|
-
default: undefined
|
|
145
|
-
},
|
|
146
|
-
sortOptions: {
|
|
147
|
-
type: Array,
|
|
148
|
-
default: () => []
|
|
149
|
-
},
|
|
150
|
-
search: {
|
|
151
|
-
type: String,
|
|
152
|
-
default: ''
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
emits: ['viewChange', 'sortChange', 'searchChange'],
|
|
156
|
-
expose: ['root'],
|
|
157
|
-
setup(props, context) {
|
|
158
|
-
// Refs
|
|
159
|
-
const root = ref();
|
|
160
|
-
const sortMenu = ref();
|
|
161
|
-
const sortButton = ref();
|
|
162
|
-
// Styles
|
|
163
|
-
const classAttribute = useClassAttribute();
|
|
164
|
-
const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
|
|
165
|
-
const toolbarStyles = computed(() => [...CardCollectionToolbar]);
|
|
166
|
-
const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
|
|
167
|
-
const sortLabel = computed(() => {
|
|
168
|
-
var _a;
|
|
169
|
-
return (_a = props.sortOptions.find(item => item.value === props.sort)) === null || _a === void 0 ? void 0 : _a.label;
|
|
170
|
-
});
|
|
171
|
-
// State
|
|
172
|
-
const proxyView = ref(props.view);
|
|
173
|
-
const proxySort = ref(props.sort);
|
|
174
|
-
const proxySearch = ref(props.search);
|
|
175
|
-
// Methods
|
|
176
|
-
function switchView(view) {
|
|
177
|
-
proxyView.value = view;
|
|
178
|
-
}
|
|
179
|
-
function handleSort(sort) {
|
|
180
|
-
proxySort.value = sort;
|
|
181
|
-
}
|
|
182
|
-
function handleSearch(search) {
|
|
183
|
-
proxySearch.value = search;
|
|
184
|
-
}
|
|
185
|
-
// Effects
|
|
186
|
-
watch(() => props.view, value => {
|
|
187
|
-
proxyView.value = value;
|
|
188
|
-
});
|
|
189
|
-
watch(proxyView, value => {
|
|
190
|
-
context.emit('viewChange', value);
|
|
191
|
-
});
|
|
192
|
-
watch(() => props.sort, value => {
|
|
193
|
-
proxySort.value = value;
|
|
194
|
-
});
|
|
195
|
-
watch(proxySort, value => {
|
|
196
|
-
context.emit('sortChange', value);
|
|
197
|
-
});
|
|
198
|
-
watch(() => props.search, value => {
|
|
199
|
-
proxySearch.value = value;
|
|
200
|
-
});
|
|
201
|
-
watch(proxySearch, value => {
|
|
202
|
-
context.emit('searchChange', value);
|
|
203
|
-
});
|
|
204
|
-
return {
|
|
205
|
-
root,
|
|
206
|
-
sortMenu,
|
|
207
|
-
sortButton,
|
|
208
|
-
rootStyles,
|
|
209
|
-
toolbarStyles,
|
|
210
|
-
toolbarPanelStyles,
|
|
211
|
-
proxyView,
|
|
212
|
-
proxySort,
|
|
213
|
-
proxySearch,
|
|
214
|
-
sortLabel,
|
|
215
|
-
switchView,
|
|
216
|
-
handleSort,
|
|
217
|
-
handleSearch
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
/* script */
|
|
223
|
-
const __vue_script__ = script;
|
|
224
|
-
|
|
225
|
-
/* template */
|
|
226
|
-
var __vue_render__ = function () {
|
|
227
|
-
var _vm = this;
|
|
228
|
-
var _h = _vm.$createElement;
|
|
229
|
-
var _c = _vm._self._c || _h;
|
|
230
|
-
return _c('div', _vm._b({
|
|
231
|
-
ref: "root",
|
|
232
|
-
class: _vm.rootStyles
|
|
233
|
-
}, 'div', _vm.$attrs, false), [_c('div', {
|
|
234
|
-
class: _vm.toolbarStyles
|
|
235
|
-
}, [_c('div', {
|
|
236
|
-
class: _vm.toolbarPanelStyles
|
|
237
|
-
}, [_vm.sortOptions.length ? [_c('OrButton', {
|
|
238
|
-
ref: "sortButton",
|
|
239
|
-
attrs: {
|
|
240
|
-
"variant": "link",
|
|
241
|
-
"color": "inherit"
|
|
242
|
-
},
|
|
243
|
-
on: {
|
|
244
|
-
"click": function ($event) {
|
|
245
|
-
return _vm.sortMenu.toggle();
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}, [_vm._v("\n " + _vm._s(_vm.sortLabel) + "\n "), _vm.sortMenu ? _c('OrIcon', {
|
|
249
|
-
attrs: {
|
|
250
|
-
"icon": _vm.sortMenu.isOpen ? 'arrow_drop_up' : 'arrow_drop_down'
|
|
251
|
-
}
|
|
252
|
-
}) : _vm._e()], 1), _vm._v(" "), _c('OrMenu', {
|
|
253
|
-
ref: "sortMenu",
|
|
254
|
-
attrs: {
|
|
255
|
-
"trigger": _vm.sortButton && _vm.sortButton.root
|
|
256
|
-
}
|
|
257
|
-
}, _vm._l(_vm.sortOptions, function (sortItem) {
|
|
258
|
-
return _c('OrMenuItem', {
|
|
259
|
-
key: sortItem,
|
|
260
|
-
on: {
|
|
261
|
-
"click": function ($event) {
|
|
262
|
-
return _vm.handleSort(sortItem.value);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}, [_vm._v("\n " + _vm._s(sortItem.label) + "\n ")]);
|
|
266
|
-
}), 1)] : _vm._e()], 2), _vm._v(" "), _c('div', {
|
|
267
|
-
class: _vm.toolbarPanelStyles
|
|
268
|
-
}, [_c('OrSearch', {
|
|
269
|
-
staticClass: "md:w-[350px]",
|
|
270
|
-
attrs: {
|
|
271
|
-
"size": "s"
|
|
272
|
-
},
|
|
273
|
-
on: {
|
|
274
|
-
"search": _vm.handleSearch
|
|
275
|
-
},
|
|
276
|
-
model: {
|
|
277
|
-
value: _vm.proxySearch,
|
|
278
|
-
callback: function ($$v) {
|
|
279
|
-
_vm.proxySearch = $$v;
|
|
280
|
-
},
|
|
281
|
-
expression: "proxySearch"
|
|
282
|
-
}
|
|
283
|
-
}), _vm._v(" "), _c('div', {
|
|
284
|
-
staticClass: "layout-row gap-sm"
|
|
285
|
-
}, [_vm.viewModes.length > 1 ? _vm._l(_vm.viewModes, function (viewOption) {
|
|
286
|
-
return _c('OrIconButton', {
|
|
287
|
-
key: viewOption.view,
|
|
288
|
-
attrs: {
|
|
289
|
-
"icon": {
|
|
290
|
-
icon: viewOption.icon,
|
|
291
|
-
variant: viewOption.view === _vm.proxyView ? 'filled' : 'outlined'
|
|
292
|
-
}
|
|
293
|
-
},
|
|
294
|
-
on: {
|
|
295
|
-
"click": function ($event) {
|
|
296
|
-
return _vm.switchView(viewOption.view);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
}) : _vm._e(), _vm._v(" "), _vm._t("addon")], 2)], 1)]), _vm._v(" "), _vm._t("header", null, null, {
|
|
301
|
-
items: _vm.items,
|
|
302
|
-
mode: _vm.proxyView
|
|
303
|
-
}), _vm._v(" "), _vm.items.length ? _vm._t(_vm.proxyView, function () {
|
|
304
|
-
return [_c('OrCardCollectionView', {
|
|
305
|
-
attrs: {
|
|
306
|
-
"items": _vm.items,
|
|
307
|
-
"mode": _vm.proxyView
|
|
308
|
-
},
|
|
309
|
-
scopedSlots: _vm._u([{
|
|
310
|
-
key: "item",
|
|
311
|
-
fn: function (props) {
|
|
312
|
-
return [_vm._t("item", null, null, props)];
|
|
313
|
-
}
|
|
314
|
-
}], null, true)
|
|
315
|
-
})];
|
|
316
|
-
}, null, {
|
|
317
|
-
items: _vm.items
|
|
318
|
-
}) : _vm.items.length === 0 && _vm.proxySearch.length > 0 ? _vm._t("noSearchResults", function () {
|
|
319
|
-
return [_vm._v("\n No results\n ")];
|
|
320
|
-
}, null, {
|
|
321
|
-
search: _vm.proxySearch
|
|
322
|
-
}) : _vm._e()], 2);
|
|
323
|
-
};
|
|
324
|
-
var __vue_staticRenderFns__ = [];
|
|
325
|
-
|
|
326
|
-
/* style */
|
|
327
|
-
const __vue_inject_styles__ = undefined;
|
|
328
|
-
/* scoped */
|
|
329
|
-
const __vue_scope_id__ = undefined;
|
|
330
|
-
/* module identifier */
|
|
331
|
-
const __vue_module_identifier__ = undefined;
|
|
332
|
-
/* functional template */
|
|
333
|
-
const __vue_is_functional_template__ = false;
|
|
334
|
-
/* style inject */
|
|
335
|
-
|
|
336
|
-
/* style inject SSR */
|
|
337
|
-
|
|
338
|
-
/* style inject shadow dom */
|
|
339
|
-
|
|
340
|
-
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
341
|
-
render: __vue_render__,
|
|
342
|
-
staticRenderFns: __vue_staticRenderFns__
|
|
343
|
-
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
344
|
-
var __vue_component__$1 = __vue_component__;
|
|
345
|
-
|
|
346
|
-
export { DefaultCardCollectionViews as D, __vue_component__$1 as _, defaultViewModes as d, gridView as g, listView as l };
|
|
@@ -1,35 +0,0 @@
|
|
|
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,33 +0,0 @@
|
|
|
1
|
-
import { s as script } from './OrButton.vue_vue_type_script_lang-3718b300.js';
|
|
2
|
-
import { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, renderSlot, createBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
|
|
3
|
-
|
|
4
|
-
const _hoisted_1 = ["type", "disabled"];
|
|
5
|
-
const _hoisted_2 = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: /*#__PURE__*/normalizeClass(['absolute'])
|
|
8
|
-
};
|
|
9
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10
|
-
const _component_OrLoader = resolveComponent("OrLoader");
|
|
11
|
-
return openBlock(), createElementBlock("button", mergeProps({
|
|
12
|
-
ref: "root"
|
|
13
|
-
}, _ctx.$attrs, {
|
|
14
|
-
class: _ctx.rootStyles,
|
|
15
|
-
type: _ctx.type,
|
|
16
|
-
disabled: _ctx.disabled,
|
|
17
|
-
onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('click', $event)),
|
|
18
|
-
onFocus: _cache[1] || (_cache[1] = $event => _ctx.$emit('focus', $event)),
|
|
19
|
-
onBlur: _cache[2] || (_cache[2] = $event => _ctx.$emit('blur', $event))
|
|
20
|
-
}), [createElementVNode("div", {
|
|
21
|
-
class: normalizeClass(['contents', _ctx.loading && 'invisible'])
|
|
22
|
-
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */), _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_2, [_ctx.variant !== 'link' ? (openBlock(), createBlock(_component_OrLoader, {
|
|
23
|
-
key: 0,
|
|
24
|
-
variant: 'circular',
|
|
25
|
-
color: 'inherit',
|
|
26
|
-
size: 's'
|
|
27
|
-
})) : (openBlock(), createElementBlock(Fragment, {
|
|
28
|
-
key: 1
|
|
29
|
-
}, [createTextVNode(toDisplayString(_ctx.loadingText) + "… ", 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */))])) : createCommentVNode("v-if", true)], 16 /* FULL_PROPS */, _hoisted_1);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
script.render = render;
|
|
33
|
-
script.__file = "src/components/or-button-v3/OrButton.vue";
|