@onereach/ui-components 2.68.1-beta.2067.0 → 2.68.1-beta.2069.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/{OrCard-29116e1f.js → OrCard-58a1ba3e.js} +2 -2
- package/dist/bundled/v2/{OrCardCollection-94a30a19.js → OrCardCollection-a9a779ea.js} +53 -144
- package/dist/bundled/v2/{OrConfirm-ff57274f.js → OrConfirm-18c534df.js} +1 -1
- package/dist/bundled/v2/{OrInput-4b82eb59.js → OrInput-8b90e08f.js} +4 -4
- package/dist/bundled/v2/{OrSearch-3ece0ef6.js → OrSearch-9d402f56.js} +3 -3
- package/dist/bundled/v2/{OrSelect-68aacb62.js → OrSelect-f37e751b.js} +2 -2
- package/dist/bundled/v2/{OrSortHeader-9932d28f.js → OrSortHeader-396e6a7c.js} +2 -2
- package/dist/bundled/v2/components/index.js +7 -7
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -3
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +28 -42
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +5 -8
- package/dist/bundled/v2/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/bundled/v2/components/or-card-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-input-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-search-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-select-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-sort-header-v3/index.js +1 -1
- package/dist/bundled/v2/index.js +8 -8
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-0e029303.js → OrCardCollection.vue_vue_type_script_lang-3993a015.js} +48 -98
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-18997376.js → OrConfirm.vue_vue_type_script_lang-289b5600.js} +37 -7
- package/dist/bundled/v3/{OrInput-e97211bb.js → OrInput-fa782fc1.js} +1 -1
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-147a1fb9.js → OrSearch.vue_vue_type_script_lang-ed78b21f.js} +2 -2
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-58b92fb0.js → OrSelect.vue_vue_type_script_lang-c74a63e1.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/components/index.js +8 -10
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -3
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +28 -42
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +5 -12
- package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/bundled/v3/components/or-confirm-v3/index.js +2 -3
- package/dist/bundled/v3/components/or-search-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-select-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-tabs-v3/index.js +1 -2
- package/dist/bundled/v3/index.js +301 -316
- package/dist/esm/v2/{OrCardCollection-54648673.js → OrCardCollection-4f001551.js} +52 -144
- package/dist/esm/v2/{OrConfirm-74e21c56.js → OrConfirm-b0b2e43c.js} +1 -1
- package/dist/esm/v2/{OrInput-b8a1627f.js → OrInput-2f16a7ac.js} +4 -4
- package/dist/esm/v2/{OrSearch-0c0d1773.js → OrSearch-ddb7c1fe.js} +1 -1
- package/dist/esm/v2/{OrSelect-0e6e7868.js → OrSelect-528c7480.js} +2 -2
- package/dist/esm/v2/components/index.js +5 -5
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -3
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +28 -42
- package/dist/esm/v2/components/or-card-collection-v3/index.js +5 -8
- package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/esm/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/esm/v2/components/or-input-v3/index.js +1 -1
- package/dist/esm/v2/components/or-search-v3/index.js +2 -2
- package/dist/esm/v2/components/or-select-v3/index.js +2 -2
- package/dist/esm/v2/index.js +5 -5
- package/dist/esm/v3/OrCardCollection-5a0febaf.js +198 -0
- package/dist/esm/v3/{OrConfirm-a3f312a6.js → OrConfirm-906427ef.js} +1 -1
- package/dist/esm/v3/{OrInput-e2ac1182.js → OrInput-41691fb3.js} +1 -1
- package/dist/esm/v3/{OrSearch-01225d82.js → OrSearch-cdde55ce.js} +1 -1
- package/dist/esm/v3/{OrSelect-2e00d4c8.js → OrSelect-d9c76482.js} +2 -2
- package/dist/esm/v3/components/index.js +5 -5
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -3
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +28 -42
- package/dist/esm/v3/components/or-card-collection-v3/index.js +5 -8
- package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +1 -1
- package/dist/esm/v3/components/or-confirm-v3/index.js +2 -2
- package/dist/esm/v3/components/or-input-v3/index.js +1 -1
- package/dist/esm/v3/components/or-search-v3/index.js +2 -2
- package/dist/esm/v3/components/or-select-v3/index.js +2 -2
- package/dist/esm/v3/index.js +5 -5
- package/package.json +1 -1
- package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +19 -115
- package/src/components/or-card-collection-v3/OrCardCollection.vue +67 -93
- package/src/components/or-card-collection-v3/styles.ts +1 -1
- package/src/components/or-card-collection-v3/types.ts +1 -1
- package/src/components/or-input-v3/OrInput.vue +1 -1
- package/src/components/or-select-v3/OrSelect.vue +1 -1
- 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/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/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
- package/dist/esm/v3/OrCardCollection-9d0036fa.js +0 -259
- 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 -39
- package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +0 -40
|
@@ -3,9 +3,8 @@ import { Meta, StoryFn } from '@storybook/vue3';
|
|
|
3
3
|
import { OrIconV3 as OrIcon } from '../or-icon-v3';
|
|
4
4
|
import OrCardCollectionDocs from './OrCardCollection.docs.mdx';
|
|
5
5
|
import OrCardCollection from './OrCardCollection.vue';
|
|
6
|
-
import { OrCardV3 as OrCard } from '../or-card-v3';
|
|
7
6
|
import { CardCollectionView } from './props';
|
|
8
|
-
import { CardCollectionItem } from './types';
|
|
7
|
+
import { CardCollectionItem, CardCollectionSortHeader } from './types';
|
|
9
8
|
|
|
10
9
|
export default {
|
|
11
10
|
title: 'Components/Card Collection',
|
|
@@ -71,14 +70,12 @@ export default {
|
|
|
71
70
|
docs: {
|
|
72
71
|
page: OrCardCollectionDocs,
|
|
73
72
|
},
|
|
74
|
-
layout: 'fullscreen',
|
|
75
73
|
},
|
|
76
74
|
} as Meta<typeof OrCardCollection>;
|
|
77
75
|
|
|
78
76
|
const Template: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
79
77
|
components: {
|
|
80
78
|
OrCardCollection,
|
|
81
|
-
OrCard,
|
|
82
79
|
OrIcon,
|
|
83
80
|
},
|
|
84
81
|
|
|
@@ -92,19 +89,16 @@ const Template: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
|
92
89
|
},
|
|
93
90
|
|
|
94
91
|
template: `
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<template #addon>${args.addon}</template>
|
|
106
|
-
</OrCardCollection>
|
|
107
|
-
</div>
|
|
92
|
+
<OrCardCollection
|
|
93
|
+
v-bind="args"
|
|
94
|
+
@viewChange="onViewChange"
|
|
95
|
+
@sortChange="onSortChange"
|
|
96
|
+
@searchChange="onSearchChange"
|
|
97
|
+
>
|
|
98
|
+
<template #gridItem="item">${args.gridItem}</template>
|
|
99
|
+
<template #listItem="item">${args.listItem}</template>
|
|
100
|
+
<template #addon>${args.addon}</template>
|
|
101
|
+
</OrCardCollection>
|
|
108
102
|
`,
|
|
109
103
|
});
|
|
110
104
|
|
|
@@ -112,7 +106,8 @@ export const Default = Template.bind({});
|
|
|
112
106
|
|
|
113
107
|
Default.args = {
|
|
114
108
|
// Slots
|
|
115
|
-
|
|
109
|
+
gridItem: '{{ item.label }} (grid)',
|
|
110
|
+
listItem: '{{ item.label }} (list)',
|
|
116
111
|
addon: '<OrIcon icon="info" />',
|
|
117
112
|
|
|
118
113
|
// Props
|
|
@@ -144,7 +139,7 @@ Default.args = {
|
|
|
144
139
|
'Yankee',
|
|
145
140
|
'Zulu',
|
|
146
141
|
], (item) => ({
|
|
147
|
-
|
|
142
|
+
id: item.toLowerCase(),
|
|
148
143
|
label: item,
|
|
149
144
|
})),
|
|
150
145
|
};
|
|
@@ -155,104 +150,13 @@ WithSorting.args = {
|
|
|
155
150
|
...Default.args,
|
|
156
151
|
|
|
157
152
|
// Props
|
|
158
|
-
|
|
159
|
-
sortOptions: [
|
|
153
|
+
sortHeaders: Array.from<string, CardCollectionSortHeader>([
|
|
160
154
|
'Foo',
|
|
161
155
|
'Bar',
|
|
162
156
|
'Baz',
|
|
163
157
|
'Qux',
|
|
164
|
-
],
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
export const OverrideViewContainer: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
169
|
-
components: {
|
|
170
|
-
OrCardCollection,
|
|
171
|
-
OrCard,
|
|
172
|
-
OrIcon,
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
setup() {
|
|
176
|
-
return {
|
|
177
|
-
args,
|
|
178
|
-
onViewChange: action('viewChange'),
|
|
179
|
-
onSortChange: action('sortChange'),
|
|
180
|
-
onSearchChange: action('searchChange'),
|
|
181
|
-
};
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
template: `
|
|
185
|
-
<div class="p-md bg-surface-1 dark:bg-surface-1-dark">
|
|
186
|
-
<OrCardCollection
|
|
187
|
-
v-bind="args"
|
|
188
|
-
@viewChange="onViewChange"
|
|
189
|
-
@sortChange="onSortChange"
|
|
190
|
-
@searchChange="onSearchChange"
|
|
191
|
-
>
|
|
192
|
-
<template #grid="{items}">
|
|
193
|
-
<div class="typography-headline-3">Custom grid</div>
|
|
194
|
-
<div class="grid grid-cols-3">
|
|
195
|
-
<OrCard
|
|
196
|
-
v-for="item in items"
|
|
197
|
-
:key="item.id"
|
|
198
|
-
>
|
|
199
|
-
{{ item.label }}
|
|
200
|
-
</OrCard>
|
|
201
|
-
</div>
|
|
202
|
-
</template>
|
|
203
|
-
<template #list="{items}">
|
|
204
|
-
<div class="typography-headline-3">Custom list</div>
|
|
205
|
-
<ul>
|
|
206
|
-
<li
|
|
207
|
-
v-for="item in items"
|
|
208
|
-
:key="item.id"
|
|
209
|
-
>
|
|
210
|
-
- {{ item.label }}
|
|
211
|
-
</li>
|
|
212
|
-
</ul>
|
|
213
|
-
</template>
|
|
214
|
-
</OrCardCollection>
|
|
215
|
-
</div>
|
|
216
|
-
`,
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
OverrideViewContainer.args = {
|
|
220
|
-
...Default.args,
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
export const WithLink: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
225
|
-
components: {
|
|
226
|
-
OrCardCollection,
|
|
227
|
-
OrCard,
|
|
228
|
-
OrIcon,
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
setup() {
|
|
232
|
-
return {
|
|
233
|
-
args,
|
|
234
|
-
onViewChange: action('viewChange'),
|
|
235
|
-
onSortChange: action('sortChange'),
|
|
236
|
-
onSearchChange: action('searchChange'),
|
|
237
|
-
};
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
template: `
|
|
241
|
-
<div class="p-md bg-surface-1 dark:bg-surface-1-dark">
|
|
242
|
-
<OrCardCollection
|
|
243
|
-
v-bind="args"
|
|
244
|
-
@viewChange="onViewChange"
|
|
245
|
-
@sortChange="onSortChange"
|
|
246
|
-
@searchChange="onSearchChange"
|
|
247
|
-
>
|
|
248
|
-
<template #item="{item}">
|
|
249
|
-
<a href="#" @click.prevent><OrCard>${args.item}</OrCard></a>
|
|
250
|
-
</template>
|
|
251
|
-
</OrCardCollection>
|
|
252
|
-
</div>
|
|
253
|
-
`,
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
WithLink.args = {
|
|
257
|
-
...Default.args,
|
|
158
|
+
], (item) => ({
|
|
159
|
+
value: item.toLowerCase(),
|
|
160
|
+
label: item,
|
|
161
|
+
})),
|
|
258
162
|
};
|
|
@@ -6,106 +6,87 @@
|
|
|
6
6
|
>
|
|
7
7
|
<div :class="toolbarStyles">
|
|
8
8
|
<div :class="toolbarPanelStyles">
|
|
9
|
-
<template v-if="
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
<template v-if="sortHeaders">
|
|
10
|
+
<OrSortHeader
|
|
11
|
+
v-for="header in sortHeaders"
|
|
12
|
+
:key="header.value"
|
|
13
|
+
v-model="proxySort"
|
|
14
|
+
:input-value="header.value"
|
|
15
15
|
>
|
|
16
|
-
{{
|
|
17
|
-
|
|
18
|
-
v-if="sortMenu"
|
|
19
|
-
:icon="sortMenu.isOpen ? 'arrow_drop_up' : 'arrow_drop_down'"
|
|
20
|
-
/>
|
|
21
|
-
</OrButton>
|
|
22
|
-
<OrMenu
|
|
23
|
-
ref="sortMenu"
|
|
24
|
-
:trigger="sortButton && sortButton.root"
|
|
25
|
-
>
|
|
26
|
-
<OrMenuItem
|
|
27
|
-
v-for="sortItem in sortOptions"
|
|
28
|
-
:key="sortItem"
|
|
29
|
-
@click="handleSort(sortItem)"
|
|
30
|
-
>
|
|
31
|
-
{{ sortItem }}
|
|
32
|
-
</OrMenuItem>
|
|
33
|
-
</OrMenu>
|
|
16
|
+
{{ header.label }}
|
|
17
|
+
</OrSortHeader>
|
|
34
18
|
</template>
|
|
35
19
|
</div>
|
|
36
20
|
|
|
37
|
-
<div
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
size="s"
|
|
43
|
-
@search="handleSearch"
|
|
21
|
+
<div :class="toolbarPanelStyles">
|
|
22
|
+
<OrInput
|
|
23
|
+
v-model="proxySearch"
|
|
24
|
+
:type="'search'"
|
|
25
|
+
:placeholder="'Search'"
|
|
26
|
+
:size="'s'"
|
|
44
27
|
/>
|
|
45
|
-
<div class="layout-row gap-sm">
|
|
46
|
-
<OrIconButton
|
|
47
|
-
:icon="'grid_view'"
|
|
48
|
-
@click="switchToGridView()"
|
|
49
|
-
/>
|
|
50
28
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
29
|
+
<OrIconButton
|
|
30
|
+
:icon="'grid_view'"
|
|
31
|
+
@click="switchToGridView()"
|
|
32
|
+
/>
|
|
55
33
|
|
|
56
|
-
|
|
57
|
-
|
|
34
|
+
<OrIconButton
|
|
35
|
+
:icon="'view_list'"
|
|
36
|
+
@click="switchToListView()"
|
|
37
|
+
/>
|
|
38
|
+
|
|
39
|
+
<slot name="addon" />
|
|
58
40
|
</div>
|
|
59
41
|
</div>
|
|
60
42
|
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
:mode="proxyView"
|
|
68
|
-
>
|
|
69
|
-
<template v-slot:item="props">
|
|
43
|
+
<div :class="contentStyles">
|
|
44
|
+
<template v-if="proxyView === 'grid'">
|
|
45
|
+
<OrCard
|
|
46
|
+
v-for="item in items"
|
|
47
|
+
:key="item.id"
|
|
48
|
+
>
|
|
70
49
|
<slot
|
|
71
|
-
name="
|
|
72
|
-
v-bind="
|
|
50
|
+
name="gridItem"
|
|
51
|
+
v-bind="item"
|
|
73
52
|
/>
|
|
74
|
-
</
|
|
75
|
-
</
|
|
76
|
-
|
|
53
|
+
</OrCard>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<template v-if="proxyView === 'list'">
|
|
57
|
+
<OrCard
|
|
58
|
+
v-for="item in items"
|
|
59
|
+
:key="item.id"
|
|
60
|
+
>
|
|
61
|
+
<slot
|
|
62
|
+
name="listItem"
|
|
63
|
+
v-bind="item"
|
|
64
|
+
/>
|
|
65
|
+
</OrCard>
|
|
66
|
+
</template>
|
|
67
|
+
</div>
|
|
77
68
|
</div>
|
|
78
69
|
</template>
|
|
79
70
|
|
|
80
71
|
<script lang="ts">
|
|
81
72
|
import { computed, defineComponent, PropType, ref, watch } from 'vue-demi';
|
|
82
73
|
import { useClassAttribute } from '../../hooks';
|
|
74
|
+
import { OrCardV3 as OrCard } from '../or-card-v3';
|
|
83
75
|
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import { OrIconV3 as OrIcon } from '../or-icon-v3';
|
|
76
|
+
import { OrInputV3 as OrInput } from '../or-input-v3';
|
|
77
|
+
import { OrSortHeaderV3 as OrSortHeader, SortHeaderModel } from '../or-sort-header-v3';
|
|
87
78
|
import { CardCollectionView } from './props';
|
|
88
|
-
import {
|
|
89
|
-
|
|
90
|
-
CardCollectionToolbar,
|
|
91
|
-
CardCollectionToolbarPanel,
|
|
92
|
-
} from './styles';
|
|
93
|
-
import { CardCollectionItem } from './types';
|
|
94
|
-
import OrCardCollectionView from './OrCardCollectionView.vue3.vue';
|
|
95
|
-
import { OrButtonV3 as OrButton } from '../or-button-v3';
|
|
96
|
-
import { OrSearchV3 as OrSearch } from '../or-search-v3';
|
|
79
|
+
import { CardCollectionContent, CardCollectionContentViews, CardCollectionRoot, CardCollectionToolbar, CardCollectionToolbarPanel } from './styles';
|
|
80
|
+
import { CardCollectionItem, CardCollectionSortHeader } from './types';
|
|
97
81
|
|
|
98
82
|
export default defineComponent({
|
|
99
83
|
name: 'OrCardCollection',
|
|
100
84
|
|
|
101
85
|
components: {
|
|
102
|
-
|
|
86
|
+
OrCard,
|
|
103
87
|
OrIconButton,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
OrMenuItem,
|
|
107
|
-
OrIcon,
|
|
108
|
-
OrSearch,
|
|
88
|
+
OrInput,
|
|
89
|
+
OrSortHeader,
|
|
109
90
|
},
|
|
110
91
|
|
|
111
92
|
inheritAttrs: false,
|
|
@@ -115,19 +96,20 @@ export default defineComponent({
|
|
|
115
96
|
type: Array as PropType<CardCollectionItem[]>,
|
|
116
97
|
default: [] as CardCollectionItem[],
|
|
117
98
|
},
|
|
99
|
+
|
|
118
100
|
view: {
|
|
119
101
|
type: String as PropType<CardCollectionView>,
|
|
120
102
|
default: CardCollectionView.Grid,
|
|
121
103
|
},
|
|
122
104
|
|
|
123
105
|
sort: {
|
|
124
|
-
type:
|
|
125
|
-
|
|
106
|
+
type: Object as PropType<SortHeaderModel>,
|
|
107
|
+
default: undefined,
|
|
126
108
|
},
|
|
127
109
|
|
|
128
|
-
|
|
129
|
-
type: Array as PropType<
|
|
130
|
-
default:
|
|
110
|
+
sortHeaders: {
|
|
111
|
+
type: Array as PropType<CardCollectionSortHeader[]>,
|
|
112
|
+
default: undefined,
|
|
131
113
|
},
|
|
132
114
|
|
|
133
115
|
search: {
|
|
@@ -149,8 +131,6 @@ export default defineComponent({
|
|
|
149
131
|
setup(props, context) {
|
|
150
132
|
// Refs
|
|
151
133
|
const root = ref<HTMLElement>();
|
|
152
|
-
const sortMenu = ref<typeof OrMenu>();
|
|
153
|
-
const sortButton = ref<typeof OrButton>();
|
|
154
134
|
|
|
155
135
|
// Styles
|
|
156
136
|
const classAttribute = useClassAttribute();
|
|
@@ -169,6 +149,11 @@ export default defineComponent({
|
|
|
169
149
|
...CardCollectionToolbarPanel,
|
|
170
150
|
]);
|
|
171
151
|
|
|
152
|
+
const contentStyles = computed(() => [
|
|
153
|
+
...CardCollectionContent,
|
|
154
|
+
...CardCollectionContentViews[proxyView.value],
|
|
155
|
+
]);
|
|
156
|
+
|
|
172
157
|
// State
|
|
173
158
|
const proxyView = ref(props.view);
|
|
174
159
|
const proxySort = ref(props.sort);
|
|
@@ -183,14 +168,6 @@ export default defineComponent({
|
|
|
183
168
|
proxyView.value = CardCollectionView.List;
|
|
184
169
|
}
|
|
185
170
|
|
|
186
|
-
function handleSort(sort: string) {
|
|
187
|
-
proxySort.value = sort;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function handleSearch(search: string) {
|
|
191
|
-
proxySearch.value = search;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
171
|
// Effects
|
|
195
172
|
watch(() => props.view, (value) => {
|
|
196
173
|
proxyView.value = value;
|
|
@@ -218,18 +195,15 @@ export default defineComponent({
|
|
|
218
195
|
|
|
219
196
|
return {
|
|
220
197
|
root,
|
|
221
|
-
sortMenu,
|
|
222
|
-
sortButton,
|
|
223
198
|
rootStyles,
|
|
224
199
|
toolbarStyles,
|
|
225
200
|
toolbarPanelStyles,
|
|
201
|
+
contentStyles,
|
|
226
202
|
proxyView,
|
|
227
203
|
proxySort,
|
|
228
204
|
proxySearch,
|
|
229
205
|
switchToGridView,
|
|
230
206
|
switchToListView,
|
|
231
|
-
handleSort,
|
|
232
|
-
handleSearch,
|
|
233
207
|
};
|
|
234
208
|
},
|
|
235
209
|
});
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
@blur="$emit('blur', $event)"
|
|
42
42
|
>
|
|
43
43
|
|
|
44
|
-
<div :class="['layout-row'
|
|
44
|
+
<div :class="['layout-row']">
|
|
45
45
|
<template v-if="type === 'password'">
|
|
46
46
|
<OrIconButton
|
|
47
47
|
:icon="{ icon: disclosed ? 'visibility_off' : 'visibility', variant: 'filled' }"
|
|
@@ -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,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";
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { s as script } from './OrMenu.vue_vue_type_script_lang-2446a69a.js';
|
|
2
|
-
import { resolveComponent, openBlock, createElementBlock, mergeProps, createVNode, withCtx, createElementVNode, normalizeClass, withModifiers, renderSlot } from 'vue';
|
|
3
|
-
|
|
4
|
-
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5
|
-
const _component_OrPopover = resolveComponent("OrPopover");
|
|
6
|
-
return openBlock(), createElementBlock("div", mergeProps({
|
|
7
|
-
ref: "root"
|
|
8
|
-
}, _ctx.$attrs, {
|
|
9
|
-
class: _ctx.rootStyles
|
|
10
|
-
}), [createVNode(_component_OrPopover, {
|
|
11
|
-
ref: "popover",
|
|
12
|
-
variant: 'auto',
|
|
13
|
-
trigger: _ctx.trigger,
|
|
14
|
-
placement: _ctx.placement,
|
|
15
|
-
"full-width": false,
|
|
16
|
-
"disable-default-styles": false,
|
|
17
|
-
"onUpdate:state": _cache[1] || (_cache[1] = $event => _ctx.$emit('update:state', $event))
|
|
18
|
-
}, {
|
|
19
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
20
|
-
class: normalizeClass(_ctx.bodyStyles),
|
|
21
|
-
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onClick && _ctx.onClick(...args), ["stop"]))
|
|
22
|
-
}, [renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)]),
|
|
23
|
-
|
|
24
|
-
_: 3 /* FORWARDED */
|
|
25
|
-
}, 8 /* PROPS */, ["trigger", "placement"])], 16 /* FULL_PROPS */);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
script.render = render;
|
|
29
|
-
script.__file = "src/components/or-menu-v3/OrMenu.vue";
|
|
@@ -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,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;
|