@onereach/ui-components 2.69.1-beta.2097.0 → 2.69.1-beta.2099.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/{OrCardCollection-8606c407.js → OrCardCollection-953657a7.js} +15 -4
- package/dist/bundled/v2/{OrSearch-19f43fe5.js → OrSearch-a11b3621.js} +7 -1
- package/dist/bundled/v2/components/index.js +2 -2
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +1 -0
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +4 -4
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-search-v3/OrSearch.vue.d.ts +13 -0
- package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
- package/dist/bundled/v2/index.js +3 -3
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-80c10c12.js → OrCardCollection.vue_vue_type_script_lang-4debae8a.js} +2 -2
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-cb2d6612.js → OrSearch.vue_vue_type_script_lang-0ae8a6dd.js} +7 -1
- package/dist/bundled/v3/components/index.js +2 -2
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +1 -0
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +4 -4
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-search-v3/OrSearch.vue.d.ts +13 -0
- package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
- package/dist/bundled/v3/index.js +15 -7
- package/dist/esm/v2/{OrCardCollection-e7a4ead6.js → OrCardCollection-55e282a7.js} +15 -4
- package/dist/esm/v2/{OrSearch-ddb7c1fe.js → OrSearch-62d91301.js} +7 -1
- package/dist/esm/v2/components/index.js +2 -2
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +1 -0
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +4 -4
- package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -2
- package/dist/esm/v2/components/or-search-v3/OrSearch.vue.d.ts +13 -0
- package/dist/esm/v2/components/or-search-v3/index.js +1 -1
- package/dist/esm/v2/index.js +2 -2
- package/dist/esm/v3/{OrCardCollection-3bd67c5c.js → OrCardCollection-0c6da4b8.js} +13 -5
- package/dist/esm/v3/{OrSearch-cdde55ce.js → OrSearch-aafb93b4.js} +7 -1
- package/dist/esm/v3/components/index.js +2 -2
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +1 -0
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +4 -4
- package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -2
- package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +13 -0
- package/dist/esm/v3/components/or-search-v3/index.js +1 -1
- package/dist/esm/v3/index.js +2 -2
- package/package.json +1 -1
- package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +40 -4
- package/src/components/or-card-collection-v3/OrCardCollection.vue +11 -2
- package/src/components/or-search-v3/OrSearch.vue +7 -1
|
@@ -8,7 +8,7 @@ import { _ as __vue_component__$5 } from './OrMenuItem-c7f28480.js';
|
|
|
8
8
|
import { _ as __vue_component__$6 } from './OrIcon-5e394c62.js';
|
|
9
9
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
10
10
|
import { _ as __vue_component__$3 } from './OrButton-357a5756.js';
|
|
11
|
-
import { _ as __vue_component__$7 } from './OrSearch-
|
|
11
|
+
import { _ as __vue_component__$7 } from './OrSearch-62d91301.js';
|
|
12
12
|
import './OrInputBox-4d5a318d.js';
|
|
13
13
|
|
|
14
14
|
var CardCollectionView;
|
|
@@ -151,7 +151,7 @@ var script = defineComponent({
|
|
|
151
151
|
},
|
|
152
152
|
search: {
|
|
153
153
|
type: String,
|
|
154
|
-
default:
|
|
154
|
+
default: ''
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
157
|
emits: ['viewChange', 'sortChange', 'searchChange'],
|
|
@@ -274,6 +274,13 @@ var __vue_render__ = function () {
|
|
|
274
274
|
},
|
|
275
275
|
on: {
|
|
276
276
|
"search": _vm.handleSearch
|
|
277
|
+
},
|
|
278
|
+
model: {
|
|
279
|
+
value: _vm.proxySearch,
|
|
280
|
+
callback: function ($$v) {
|
|
281
|
+
_vm.proxySearch = $$v;
|
|
282
|
+
},
|
|
283
|
+
expression: "proxySearch"
|
|
277
284
|
}
|
|
278
285
|
}), _vm._v(" "), _c('div', {
|
|
279
286
|
staticClass: "layout-row gap-sm"
|
|
@@ -295,7 +302,7 @@ var __vue_render__ = function () {
|
|
|
295
302
|
}) : _vm._e(), _vm._v(" "), _vm._t("addon")], 2)], 1)]), _vm._v(" "), _vm._t("header", null, null, {
|
|
296
303
|
items: _vm.items,
|
|
297
304
|
mode: _vm.proxyView
|
|
298
|
-
}), _vm._v(" "), _vm._t(_vm.proxyView, function () {
|
|
305
|
+
}), _vm._v(" "), _vm.items.length ? _vm._t(_vm.proxyView, function () {
|
|
299
306
|
return [_c('OrCardCollectionView', {
|
|
300
307
|
attrs: {
|
|
301
308
|
"items": _vm.items,
|
|
@@ -310,7 +317,11 @@ var __vue_render__ = function () {
|
|
|
310
317
|
})];
|
|
311
318
|
}, null, {
|
|
312
319
|
items: _vm.items
|
|
313
|
-
})
|
|
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);
|
|
314
325
|
};
|
|
315
326
|
var __vue_staticRenderFns__ = [];
|
|
316
327
|
|
|
@@ -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
|
|
@@ -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-
|
|
11
|
+
export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../OrCardCollection-55e282a7.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,7 +63,7 @@ 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-
|
|
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
69
|
export { _ as OrSelectV3 } from '../OrSelect-ac382aa6.js';
|
|
@@ -19,3 +19,4 @@ export declare const WithSorting: StoryFn<import("vue").ComponentOptions<import(
|
|
|
19
19
|
export declare const OverrideViewContainer: StoryFn<typeof OrCardCollection>;
|
|
20
20
|
export declare const ExtraViewMode: StoryFn<typeof OrCardCollection>;
|
|
21
21
|
export declare const WithLink: StoryFn<typeof OrCardCollection>;
|
|
22
|
+
export declare const EmptySearchResults: StoryFn<typeof OrCardCollection>;
|
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
29
29
|
default: CardCollectionItem[];
|
|
30
30
|
};
|
|
31
31
|
view: {
|
|
32
|
-
type:
|
|
32
|
+
type: StringConstructor;
|
|
33
33
|
default: CardCollectionView;
|
|
34
34
|
};
|
|
35
35
|
viewModes: {
|
|
@@ -46,7 +46,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
46
46
|
};
|
|
47
47
|
search: {
|
|
48
48
|
type: StringConstructor;
|
|
49
|
-
default:
|
|
49
|
+
default: string;
|
|
50
50
|
};
|
|
51
51
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
52
52
|
items: {
|
|
@@ -54,7 +54,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
54
54
|
default: CardCollectionItem[];
|
|
55
55
|
};
|
|
56
56
|
view: {
|
|
57
|
-
type:
|
|
57
|
+
type: StringConstructor;
|
|
58
58
|
default: CardCollectionView;
|
|
59
59
|
};
|
|
60
60
|
viewModes: {
|
|
@@ -71,7 +71,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
71
71
|
};
|
|
72
72
|
search: {
|
|
73
73
|
type: StringConstructor;
|
|
74
|
-
default:
|
|
74
|
+
default: string;
|
|
75
75
|
};
|
|
76
76
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
77
77
|
search: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-
|
|
1
|
+
export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-55e282a7.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../useClassAttribute-47fdb016.js';
|
|
4
4
|
import '@vueuse/core';
|
|
@@ -18,7 +18,7 @@ import '../../OrMenu-df27d0ef.js';
|
|
|
18
18
|
import '../../OrMenuItem-c7f28480.js';
|
|
19
19
|
import '../../OrButton-357a5756.js';
|
|
20
20
|
import '../../OrLoader-f857d55b.js';
|
|
21
|
-
import '../../OrSearch-
|
|
21
|
+
import '../../OrSearch-62d91301.js';
|
|
22
22
|
import '../../OrInput-2f16a7ac.js';
|
|
23
23
|
import '../../OrError-d267ee9a.js';
|
|
24
24
|
import '../../OrHint-42dc9ebb.js';
|
|
@@ -11,6 +11,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
11
11
|
focus: () => void;
|
|
12
12
|
clear: () => void;
|
|
13
13
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
required: false;
|
|
18
|
+
};
|
|
14
19
|
size: {
|
|
15
20
|
type: PropType<SearchSize>;
|
|
16
21
|
default: SearchSize;
|
|
@@ -32,6 +37,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
32
37
|
default: boolean;
|
|
33
38
|
};
|
|
34
39
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
40
|
+
modelValue: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
required: false;
|
|
44
|
+
};
|
|
35
45
|
size: {
|
|
36
46
|
type: PropType<SearchSize>;
|
|
37
47
|
default: SearchSize;
|
|
@@ -53,6 +63,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
53
63
|
default: boolean;
|
|
54
64
|
};
|
|
55
65
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
66
|
+
modelValue: string;
|
|
56
67
|
size: SearchSize;
|
|
57
68
|
placeholder: string;
|
|
58
69
|
debounce: number;
|
|
@@ -71,6 +82,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
71
82
|
focus: () => void;
|
|
72
83
|
clear: () => void;
|
|
73
84
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
85
|
+
modelValue: string;
|
|
74
86
|
size: SearchSize;
|
|
75
87
|
placeholder: string;
|
|
76
88
|
debounce: number;
|
|
@@ -79,6 +91,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
79
91
|
} & {} & {
|
|
80
92
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
81
93
|
}, {
|
|
94
|
+
modelValue: string;
|
|
82
95
|
size: SearchSize;
|
|
83
96
|
placeholder: string;
|
|
84
97
|
debounce: number;
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -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-
|
|
11
|
+
export { C as CardCollectionView, _ as OrCardCollectionV3 } from './OrCardCollection-55e282a7.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,7 +63,7 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
|
|
|
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-
|
|
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
69
|
export { _ as OrSelectV3 } from './OrSelect-ac382aa6.js';
|
|
@@ -8,7 +8,7 @@ import { s as script$5 } from './OrMenuItem-9da279f6.js';
|
|
|
8
8
|
import { s as script$6 } from './OrIcon-b195169c.js';
|
|
9
9
|
import { openBlock, createElementBlock, normalizeClass, Fragment, renderList, renderSlot, mergeProps, createTextVNode, toDisplayString, resolveComponent, createElementVNode, createVNode, withCtx, createBlock, createCommentVNode, normalizeProps, guardReactiveProps } from 'vue';
|
|
10
10
|
import { s as script$3 } from './OrButton-f4b9ee51.js';
|
|
11
|
-
import { s as script$7 } from './OrSearch-
|
|
11
|
+
import { s as script$7 } from './OrSearch-aafb93b4.js';
|
|
12
12
|
import './OrInputBox-5247ab25.js';
|
|
13
13
|
|
|
14
14
|
var CardCollectionView;
|
|
@@ -127,7 +127,7 @@ var script = defineComponent({
|
|
|
127
127
|
},
|
|
128
128
|
search: {
|
|
129
129
|
type: String,
|
|
130
|
-
default:
|
|
130
|
+
default: ''
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
emits: ['viewChange', 'sortChange', 'searchChange'],
|
|
@@ -248,10 +248,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
248
248
|
}, 8 /* PROPS */, ["trigger"])], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)], 2 /* CLASS */), createElementVNode("div", {
|
|
249
249
|
class: normalizeClass(_ctx.toolbarPanelStyles)
|
|
250
250
|
}, [createVNode(_component_OrSearch, {
|
|
251
|
+
modelValue: _ctx.proxySearch,
|
|
252
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.proxySearch = $event),
|
|
251
253
|
class: "md:w-[350px]",
|
|
252
254
|
size: "s",
|
|
253
255
|
onSearch: _ctx.handleSearch
|
|
254
|
-
}, null, 8 /* PROPS */, ["onSearch"]), createElementVNode("div", _hoisted_1, [_ctx.viewModes.length > 1 ? (openBlock(true), createElementBlock(Fragment, {
|
|
256
|
+
}, null, 8 /* PROPS */, ["modelValue", "onSearch"]), createElementVNode("div", _hoisted_1, [_ctx.viewModes.length > 1 ? (openBlock(true), createElementBlock(Fragment, {
|
|
255
257
|
key: 0
|
|
256
258
|
}, renderList(_ctx.viewModes, viewOption => {
|
|
257
259
|
return openBlock(), createBlock(_component_OrIconButton, {
|
|
@@ -265,7 +267,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
265
267
|
}), 128 /* KEYED_FRAGMENT */)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "addon")])], 2 /* CLASS */)], 2 /* CLASS */), renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps({
|
|
266
268
|
items: _ctx.items,
|
|
267
269
|
mode: _ctx.proxyView
|
|
268
|
-
}))), renderSlot(_ctx.$slots, _ctx.proxyView, normalizeProps(
|
|
270
|
+
}))), _ctx.items.length ? renderSlot(_ctx.$slots, _ctx.proxyView, normalizeProps(mergeProps({
|
|
271
|
+
key: 0
|
|
272
|
+
}, {
|
|
269
273
|
items: _ctx.items
|
|
270
274
|
})), () => [createVNode(_component_OrCardCollectionView, {
|
|
271
275
|
items: _ctx.items,
|
|
@@ -273,7 +277,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
273
277
|
}, {
|
|
274
278
|
item: withCtx(props => [renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps(props)))]),
|
|
275
279
|
_: 3 /* FORWARDED */
|
|
276
|
-
}, 8 /* PROPS */, ["items", "mode"])])
|
|
280
|
+
}, 8 /* PROPS */, ["items", "mode"])]) : _ctx.items.length === 0 && _ctx.proxySearch.length > 0 ? renderSlot(_ctx.$slots, "noSearchResults", normalizeProps(mergeProps({
|
|
281
|
+
key: 1
|
|
282
|
+
}, {
|
|
283
|
+
search: _ctx.proxySearch
|
|
284
|
+
})), () => [createTextVNode(" No results ")]) : createCommentVNode("v-if", true)], 16 /* FULL_PROPS */);
|
|
277
285
|
}
|
|
278
286
|
|
|
279
287
|
script.render = render;
|
|
@@ -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
|
|
@@ -6,7 +6,7 @@ export { b as BUTTON_COLOR, d as BUTTON_LOADER_TYPE, c as BUTTON_SIZE, B as BUTT
|
|
|
6
6
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from '../OrButton-f4b9ee51.js';
|
|
7
7
|
export { s as OrCard } from '../OrCard-e3a5aea4.js';
|
|
8
8
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from '../OrCardCollection-a5e326ef.js';
|
|
9
|
-
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../OrCardCollection-
|
|
9
|
+
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../OrCardCollection-0c6da4b8.js';
|
|
10
10
|
export { s as OrCardV3 } from '../OrCard-fd92f7c8.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from '../OrCarouselItem-636d99a1.js';
|
|
12
12
|
export { s as OrCheckbox } from '../OrCheckbox-ed4a19cf.js';
|
|
@@ -58,7 +58,7 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
|
|
|
58
58
|
export { s as OrRadio } from '../OrRadio-c3ab11f2.js';
|
|
59
59
|
export { s as OrRadioGroup } from '../OrRadioGroup-00785e41.js';
|
|
60
60
|
export { s as OrRadioV3 } from '../OrRadio-54b6d0de.js';
|
|
61
|
-
export { s as OrSearchV3 } from '../OrSearch-
|
|
61
|
+
export { s as OrSearchV3 } from '../OrSearch-aafb93b4.js';
|
|
62
62
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-171cad78.js';
|
|
63
63
|
export { s as OrSelect } from '../OrSelect-0821b907.js';
|
|
64
64
|
export { s as OrSelectV3 } from '../OrSelect-fee9c099.js';
|
|
@@ -19,3 +19,4 @@ export declare const WithSorting: StoryFn<import("vue").ComponentOptions<import(
|
|
|
19
19
|
export declare const OverrideViewContainer: StoryFn<typeof OrCardCollection>;
|
|
20
20
|
export declare const ExtraViewMode: StoryFn<typeof OrCardCollection>;
|
|
21
21
|
export declare const WithLink: StoryFn<typeof OrCardCollection>;
|
|
22
|
+
export declare const EmptySearchResults: StoryFn<typeof OrCardCollection>;
|
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
29
29
|
default: CardCollectionItem[];
|
|
30
30
|
};
|
|
31
31
|
view: {
|
|
32
|
-
type:
|
|
32
|
+
type: StringConstructor;
|
|
33
33
|
default: CardCollectionView;
|
|
34
34
|
};
|
|
35
35
|
viewModes: {
|
|
@@ -46,7 +46,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
46
46
|
};
|
|
47
47
|
search: {
|
|
48
48
|
type: StringConstructor;
|
|
49
|
-
default:
|
|
49
|
+
default: string;
|
|
50
50
|
};
|
|
51
51
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
52
52
|
items: {
|
|
@@ -54,7 +54,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
54
54
|
default: CardCollectionItem[];
|
|
55
55
|
};
|
|
56
56
|
view: {
|
|
57
|
-
type:
|
|
57
|
+
type: StringConstructor;
|
|
58
58
|
default: CardCollectionView;
|
|
59
59
|
};
|
|
60
60
|
viewModes: {
|
|
@@ -71,7 +71,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
71
71
|
};
|
|
72
72
|
search: {
|
|
73
73
|
type: StringConstructor;
|
|
74
|
-
default:
|
|
74
|
+
default: string;
|
|
75
75
|
};
|
|
76
76
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
77
77
|
search: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../../OrCardCollection-
|
|
1
|
+
export { C as CardCollectionView, s as OrCardCollectionV3 } from '../../OrCardCollection-0c6da4b8.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../useClassAttribute-47fdb016.js';
|
|
4
4
|
import '@vueuse/core';
|
|
@@ -17,7 +17,7 @@ import '../../OrMenu-840038cd.js';
|
|
|
17
17
|
import '../../OrMenuItem-9da279f6.js';
|
|
18
18
|
import '../../OrButton-f4b9ee51.js';
|
|
19
19
|
import '../../OrLoader-b3cf4231.js';
|
|
20
|
-
import '../../OrSearch-
|
|
20
|
+
import '../../OrSearch-aafb93b4.js';
|
|
21
21
|
import '../../OrInput-41691fb3.js';
|
|
22
22
|
import '../../OrError-ec8c709d.js';
|
|
23
23
|
import '../../OrHint-74bb732d.js';
|
|
@@ -11,6 +11,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
11
11
|
focus: () => void;
|
|
12
12
|
clear: () => void;
|
|
13
13
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
required: false;
|
|
18
|
+
};
|
|
14
19
|
size: {
|
|
15
20
|
type: PropType<SearchSize>;
|
|
16
21
|
default: SearchSize;
|
|
@@ -32,6 +37,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
32
37
|
default: boolean;
|
|
33
38
|
};
|
|
34
39
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
40
|
+
modelValue: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: string;
|
|
43
|
+
required: false;
|
|
44
|
+
};
|
|
35
45
|
size: {
|
|
36
46
|
type: PropType<SearchSize>;
|
|
37
47
|
default: SearchSize;
|
|
@@ -53,6 +63,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
53
63
|
default: boolean;
|
|
54
64
|
};
|
|
55
65
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
66
|
+
modelValue: string;
|
|
56
67
|
size: SearchSize;
|
|
57
68
|
placeholder: string;
|
|
58
69
|
debounce: number;
|
|
@@ -71,6 +82,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
71
82
|
focus: () => void;
|
|
72
83
|
clear: () => void;
|
|
73
84
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
85
|
+
modelValue: string;
|
|
74
86
|
size: SearchSize;
|
|
75
87
|
placeholder: string;
|
|
76
88
|
debounce: number;
|
|
@@ -79,6 +91,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
79
91
|
} & {} & {
|
|
80
92
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
81
93
|
}, {
|
|
94
|
+
modelValue: string;
|
|
82
95
|
size: SearchSize;
|
|
83
96
|
placeholder: string;
|
|
84
97
|
debounce: number;
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export { b as BUTTON_COLOR, d as BUTTON_LOADER_TYPE, c as BUTTON_SIZE, B as BUTT
|
|
|
6
6
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from './OrButton-f4b9ee51.js';
|
|
7
7
|
export { s as OrCard } from './OrCard-e3a5aea4.js';
|
|
8
8
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from './OrCardCollection-a5e326ef.js';
|
|
9
|
-
export { C as CardCollectionView, s as OrCardCollectionV3 } from './OrCardCollection-
|
|
9
|
+
export { C as CardCollectionView, s as OrCardCollectionV3 } from './OrCardCollection-0c6da4b8.js';
|
|
10
10
|
export { s as OrCardV3 } from './OrCard-fd92f7c8.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from './OrCarouselItem-636d99a1.js';
|
|
12
12
|
export { s as OrCheckbox } from './OrCheckbox-ed4a19cf.js';
|
|
@@ -58,7 +58,7 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
|
|
|
58
58
|
export { s as OrRadio } from './OrRadio-c3ab11f2.js';
|
|
59
59
|
export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
|
|
60
60
|
export { s as OrRadioV3 } from './OrRadio-54b6d0de.js';
|
|
61
|
-
export { s as OrSearchV3 } from './OrSearch-
|
|
61
|
+
export { s as OrSearchV3 } from './OrSearch-aafb93b4.js';
|
|
62
62
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-171cad78.js';
|
|
63
63
|
export { s as OrSelect } from './OrSelect-0821b907.js';
|
|
64
64
|
export { s as OrSelectV3 } from './OrSelect-fee9c099.js';
|
package/package.json
CHANGED
|
@@ -108,9 +108,6 @@ const Template: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
|
108
108
|
@sortChange="onSortChange"
|
|
109
109
|
@searchChange="onSearchChange"
|
|
110
110
|
>
|
|
111
|
-
<template #header>
|
|
112
|
-
${args.header}
|
|
113
|
-
</template>
|
|
114
111
|
<template #item="{item, mode}">
|
|
115
112
|
<OrCard>${args.item} ({{mode}})</OrCard>
|
|
116
113
|
</template>
|
|
@@ -213,7 +210,7 @@ export const OverrideViewContainer: StoryFn<typeof OrCardCollection> = (args) =>
|
|
|
213
210
|
@searchChange="onSearchChange"
|
|
214
211
|
>
|
|
215
212
|
<template #header="{mode}">
|
|
216
|
-
|
|
213
|
+
${args.header}
|
|
217
214
|
</template>
|
|
218
215
|
<template #grid="{items}">
|
|
219
216
|
<div class="grid grid-cols-3">
|
|
@@ -242,6 +239,7 @@ export const OverrideViewContainer: StoryFn<typeof OrCardCollection> = (args) =>
|
|
|
242
239
|
|
|
243
240
|
OverrideViewContainer.args = {
|
|
244
241
|
...Default.args,
|
|
242
|
+
header: '<div class="typography-headline-3">Custom {{ mode }}</div>',
|
|
245
243
|
};
|
|
246
244
|
|
|
247
245
|
export const ExtraViewMode: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
@@ -325,3 +323,41 @@ export const WithLink: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
|
325
323
|
WithLink.args = {
|
|
326
324
|
...Default.args,
|
|
327
325
|
};
|
|
326
|
+
|
|
327
|
+
export const EmptySearchResults: StoryFn<typeof OrCardCollection> = (args) => ({
|
|
328
|
+
components: {
|
|
329
|
+
OrCardCollection,
|
|
330
|
+
OrCard,
|
|
331
|
+
OrIcon,
|
|
332
|
+
},
|
|
333
|
+
|
|
334
|
+
setup() {
|
|
335
|
+
return {
|
|
336
|
+
args,
|
|
337
|
+
onViewChange: action('viewChange'),
|
|
338
|
+
onSortChange: action('sortChange'),
|
|
339
|
+
onSearchChange: action('searchChange'),
|
|
340
|
+
};
|
|
341
|
+
},
|
|
342
|
+
|
|
343
|
+
template: `
|
|
344
|
+
<div class="p-md h-screen bg-surface-1 dark:bg-surface-1-dark">
|
|
345
|
+
<OrCardCollection
|
|
346
|
+
v-bind="args"
|
|
347
|
+
@viewChange="onViewChange"
|
|
348
|
+
@sortChange="onSortChange"
|
|
349
|
+
@searchChange="onSearchChange"
|
|
350
|
+
>
|
|
351
|
+
<template #noSearchResults="{search}">
|
|
352
|
+
<p class="text-center typography-headline-3">No results for "{{search}}"</p>
|
|
353
|
+
</template>
|
|
354
|
+
</OrCardCollection>
|
|
355
|
+
</div>
|
|
356
|
+
`,
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
EmptySearchResults.args = {
|
|
360
|
+
...Default.args,
|
|
361
|
+
search: 'My favorite ..',
|
|
362
|
+
items: [],
|
|
363
|
+
};
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
:class="toolbarPanelStyles"
|
|
38
38
|
>
|
|
39
39
|
<OrSearch
|
|
40
|
+
v-model="proxySearch"
|
|
40
41
|
class="md:w-[350px]"
|
|
41
42
|
size="s"
|
|
42
43
|
@search="handleSearch"
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
}"
|
|
63
64
|
/>
|
|
64
65
|
<slot
|
|
66
|
+
v-if="items.length"
|
|
65
67
|
:name="proxyView"
|
|
66
68
|
v-bind="{items}"
|
|
67
69
|
>
|
|
@@ -77,6 +79,13 @@
|
|
|
77
79
|
</template>
|
|
78
80
|
</OrCardCollectionView>
|
|
79
81
|
</slot>
|
|
82
|
+
<slot
|
|
83
|
+
v-else-if="items.length === 0 && proxySearch.length > 0"
|
|
84
|
+
name="noSearchResults"
|
|
85
|
+
v-bind="{search: proxySearch}"
|
|
86
|
+
>
|
|
87
|
+
No results
|
|
88
|
+
</slot>
|
|
80
89
|
</div>
|
|
81
90
|
</template>
|
|
82
91
|
|
|
@@ -121,7 +130,7 @@ export default defineComponent({
|
|
|
121
130
|
},
|
|
122
131
|
|
|
123
132
|
view: {
|
|
124
|
-
type: String
|
|
133
|
+
type: String,
|
|
125
134
|
default: CardCollectionView.Grid,
|
|
126
135
|
},
|
|
127
136
|
|
|
@@ -142,7 +151,7 @@ export default defineComponent({
|
|
|
142
151
|
|
|
143
152
|
search: {
|
|
144
153
|
type: String,
|
|
145
|
-
default:
|
|
154
|
+
default: '',
|
|
146
155
|
},
|
|
147
156
|
},
|
|
148
157
|
|
|
@@ -35,6 +35,12 @@ export default defineComponent({
|
|
|
35
35
|
inheritAttrs: false,
|
|
36
36
|
|
|
37
37
|
props: {
|
|
38
|
+
modelValue: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: '',
|
|
41
|
+
required: false,
|
|
42
|
+
},
|
|
43
|
+
|
|
38
44
|
size: {
|
|
39
45
|
type: String as PropType<SearchSize>,
|
|
40
46
|
default: SearchSize.M,
|
|
@@ -90,7 +96,7 @@ export default defineComponent({
|
|
|
90
96
|
]);
|
|
91
97
|
|
|
92
98
|
// State
|
|
93
|
-
const localModelValue = ref('');
|
|
99
|
+
const localModelValue = ref(props.modelValue ?? '');
|
|
94
100
|
|
|
95
101
|
// Events
|
|
96
102
|
debouncedWatch(
|