@onereach/ui-components 2.69.1-beta.2097.0 → 2.69.1-beta.2100.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 (61) hide show
  1. package/dist/bundled/v2/{OrCardCollection-8606c407.js → OrCardCollection-773ae0db.js} +24 -14
  2. package/dist/bundled/v2/{OrSearch-19f43fe5.js → OrSearch-a11b3621.js} +7 -1
  3. package/dist/bundled/v2/components/index.js +2 -2
  4. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +1 -0
  5. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +6 -7
  6. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +5 -5
  7. package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -2
  8. package/dist/bundled/v2/components/or-card-collection-v3/props.d.ts +5 -1
  9. package/dist/bundled/v2/components/or-card-collection-v3/styles.d.ts +2 -2
  10. package/dist/bundled/v2/components/or-search-v3/OrSearch.vue.d.ts +13 -0
  11. package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
  12. package/dist/bundled/v2/index.js +3 -3
  13. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-80c10c12.js → OrCardCollection.vue_vue_type_script_lang-b983bda7.js} +11 -12
  14. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-cb2d6612.js → OrSearch.vue_vue_type_script_lang-0ae8a6dd.js} +7 -1
  15. package/dist/bundled/v3/components/index.js +2 -2
  16. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +1 -0
  17. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +6 -7
  18. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +5 -5
  19. package/dist/bundled/v3/components/or-card-collection-v3/index.js +2 -2
  20. package/dist/bundled/v3/components/or-card-collection-v3/props.d.ts +5 -1
  21. package/dist/bundled/v3/components/or-card-collection-v3/styles.d.ts +2 -2
  22. package/dist/bundled/v3/components/or-search-v3/OrSearch.vue.d.ts +13 -0
  23. package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
  24. package/dist/bundled/v3/index.js +15 -7
  25. package/dist/esm/v2/{OrCardCollection-e7a4ead6.js → OrCardCollection-61c86bfc.js} +24 -14
  26. package/dist/esm/v2/{OrSearch-ddb7c1fe.js → OrSearch-62d91301.js} +7 -1
  27. package/dist/esm/v2/components/index.js +2 -2
  28. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +1 -0
  29. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +6 -7
  30. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +5 -5
  31. package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -2
  32. package/dist/esm/v2/components/or-card-collection-v3/props.d.ts +5 -1
  33. package/dist/esm/v2/components/or-card-collection-v3/styles.d.ts +2 -2
  34. package/dist/esm/v2/components/or-search-v3/OrSearch.vue.d.ts +13 -0
  35. package/dist/esm/v2/components/or-search-v3/index.js +1 -1
  36. package/dist/esm/v2/index.js +2 -2
  37. package/dist/esm/v3/{OrCardCollection-3bd67c5c.js → OrCardCollection-fdc7848b.js} +22 -15
  38. package/dist/esm/v3/{OrSearch-cdde55ce.js → OrSearch-aafb93b4.js} +7 -1
  39. package/dist/esm/v3/components/index.js +2 -2
  40. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +1 -0
  41. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +6 -7
  42. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +5 -5
  43. package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -2
  44. package/dist/esm/v3/components/or-card-collection-v3/props.d.ts +5 -1
  45. package/dist/esm/v3/components/or-card-collection-v3/styles.d.ts +2 -2
  46. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +13 -0
  47. package/dist/esm/v3/components/or-search-v3/index.js +1 -1
  48. package/dist/esm/v3/index.js +2 -2
  49. package/package.json +1 -1
  50. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +42 -7
  51. package/src/components/or-card-collection-v3/OrCardCollection.vue +14 -5
  52. package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +2 -2
  53. package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +2 -2
  54. package/src/components/or-card-collection-v3/props.ts +14 -1
  55. package/src/components/or-card-collection-v3/styles.ts +2 -2
  56. package/src/components/or-search-v3/OrSearch.vue +7 -1
  57. package/dist/bundled/v2/components/or-card-collection-v3/constatnts.d.ts +0 -4
  58. package/dist/bundled/v3/components/or-card-collection-v3/constatnts.d.ts +0 -4
  59. package/dist/esm/v2/components/or-card-collection-v3/constatnts.d.ts +0 -4
  60. package/dist/esm/v3/components/or-card-collection-v3/constatnts.d.ts +0 -4
  61. package/src/components/or-card-collection-v3/constatnts.ts +0 -12
@@ -6,15 +6,9 @@ import { O as OrButton } from './OrButton-0e91a808.js';
6
6
  import { O as OrMenu } from './OrMenu-fa47c888.js';
7
7
  import { O as OrMenuItem } from './OrMenuItem-26420908.js';
8
8
  import { O as OrIcon } from './OrIcon-8625385f.js';
9
- import { O as OrSearch } from './OrSearch-19f43fe5.js';
9
+ import { O as OrSearch } from './OrSearch-a11b3621.js';
10
10
  import { u as useClassAttribute } from './useClassAttribute-9bf33346.js';
11
11
 
12
- var CardCollectionView;
13
- (function (CardCollectionView) {
14
- CardCollectionView["Grid"] = "grid";
15
- CardCollectionView["List"] = "list";
16
- })(CardCollectionView || (CardCollectionView = {}));
17
-
18
12
  const CardCollectionRoot = [
19
13
  // Layout
20
14
  'layout-column',
@@ -105,12 +99,17 @@ const __vue_component__$2 = /*#__PURE__*/normalizeComponent({
105
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);
106
100
  var OrCardCollectionView = __vue_component__$2;
107
101
 
102
+ var DefaultCardCollectionViews;
103
+ (function (DefaultCardCollectionViews) {
104
+ DefaultCardCollectionViews["Grid"] = "grid";
105
+ DefaultCardCollectionViews["List"] = "list";
106
+ })(DefaultCardCollectionViews || (DefaultCardCollectionViews = {}));
108
107
  const gridView = {
109
- view: 'grid',
108
+ view: DefaultCardCollectionViews.Grid,
110
109
  icon: 'grid_view'
111
110
  };
112
111
  const listView = {
113
- view: 'list',
112
+ view: DefaultCardCollectionViews.List,
114
113
  icon: 'view_agenda'
115
114
  };
116
115
  const defaultViewModes = [gridView, listView];
@@ -134,7 +133,7 @@ var script = defineComponent({
134
133
  },
135
134
  view: {
136
135
  type: String,
137
- default: CardCollectionView.Grid
136
+ default: gridView.view
138
137
  },
139
138
  viewModes: {
140
139
  type: Array,
@@ -150,7 +149,7 @@ var script = defineComponent({
150
149
  },
151
150
  search: {
152
151
  type: String,
153
- default: undefined
152
+ default: ''
154
153
  }
155
154
  },
156
155
  emits: ['viewChange', 'sortChange', 'searchChange'],
@@ -273,6 +272,13 @@ var __vue_render__ = function () {
273
272
  },
274
273
  on: {
275
274
  "search": _vm.handleSearch
275
+ },
276
+ model: {
277
+ value: _vm.proxySearch,
278
+ callback: function ($$v) {
279
+ _vm.proxySearch = $$v;
280
+ },
281
+ expression: "proxySearch"
276
282
  }
277
283
  }), _vm._v(" "), _c('div', {
278
284
  staticClass: "layout-row gap-sm"
@@ -294,7 +300,7 @@ var __vue_render__ = function () {
294
300
  }) : _vm._e(), _vm._v(" "), _vm._t("addon")], 2)], 1)]), _vm._v(" "), _vm._t("header", null, null, {
295
301
  items: _vm.items,
296
302
  mode: _vm.proxyView
297
- }), _vm._v(" "), _vm._t(_vm.proxyView, function () {
303
+ }), _vm._v(" "), _vm.items.length ? _vm._t(_vm.proxyView, function () {
298
304
  return [_c('OrCardCollectionView', {
299
305
  attrs: {
300
306
  "items": _vm.items,
@@ -309,7 +315,11 @@ var __vue_render__ = function () {
309
315
  })];
310
316
  }, null, {
311
317
  items: _vm.items
312
- })], 2);
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);
313
323
  };
314
324
  var __vue_staticRenderFns__ = [];
315
325
 
@@ -333,4 +343,4 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({
333
343
  }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
334
344
  var __vue_component__$1 = __vue_component__;
335
345
 
336
- export { CardCollectionView as C, __vue_component__$1 as _ };
346
+ export { DefaultCardCollectionViews as D, __vue_component__$1 as _, defaultViewModes as d, gridView as g, listView as l };
@@ -13,6 +13,11 @@ var script = defineComponent({
13
13
  },
14
14
  inheritAttrs: false,
15
15
  props: {
16
+ modelValue: {
17
+ type: String,
18
+ default: '',
19
+ required: false
20
+ },
16
21
  size: {
17
22
  type: String,
18
23
  default: InputBoxSize.M
@@ -37,13 +42,14 @@ var script = defineComponent({
37
42
  emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
38
43
  expose: ['root', 'focus', 'clear'],
39
44
  setup(props, context) {
45
+ var _a;
40
46
  // Refs
41
47
  const root = ref();
42
48
  // Styles
43
49
  const classAttribute = useClassAttribute();
44
50
  const rootStyles = computed(() => ['or-search', classAttribute.value]);
45
51
  // State
46
- const localModelValue = ref('');
52
+ const localModelValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : '');
47
53
  // Events
48
54
  debouncedWatch(localModelValue, () => context.emit('search', localModelValue.value), {
49
55
  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, O as OrButtonV3 } from '../OrButton-0e91a808.js';
9
9
  export { O as OrCard } from '../OrCard-a6b30f8f.js';
10
10
  export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from '../OrCardCollection-89428bbf.js';
11
- export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../OrCardCollection-8606c407.js';
11
+ export { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection-773ae0db.js';
12
12
  export { _ as OrCardV3 } from '../OrCard-29116e1f.js';
13
13
  export { a as OrCarousel, _ as OrCarouselItem } from '../OrCarouselItem-6da755c0.js';
14
14
  export { O as OrCheckbox } from '../OrCheckbox-4cbddd67.js';
@@ -63,7 +63,7 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
63
63
  export { _ as OrRadio } from '../OrRadio-187d6fc7.js';
64
64
  export { _ as OrRadioGroup } from '../OrRadioGroup-aa9f0757.js';
65
65
  export { _ as OrRadioV3 } from '../OrRadio-cd39b20b.js';
66
- export { O as OrSearchV3 } from '../OrSearch-19f43fe5.js';
66
+ export { O as OrSearchV3 } from '../OrSearch-a11b3621.js';
67
67
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-21cc914e.js';
68
68
  export { _ as OrSelect } from '../OrSelect-a23d4210.js';
69
69
  export { _ as OrSelectV3 } from '../OrSelect-759b4410.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>;
@@ -1,5 +1,4 @@
1
1
  import { PropType } from 'vue-demi';
2
- import { CardCollectionView } from './props';
3
2
  import { CardCollectionItem, SortOption, ViewMode } from './types';
4
3
  declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
5
4
  root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
@@ -29,8 +28,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
29
28
  default: CardCollectionItem[];
30
29
  };
31
30
  view: {
32
- type: PropType<string>;
33
- default: CardCollectionView;
31
+ type: StringConstructor;
32
+ default: string;
34
33
  };
35
34
  viewModes: {
36
35
  type: PropType<ViewMode[]>;
@@ -46,7 +45,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
46
45
  };
47
46
  search: {
48
47
  type: StringConstructor;
49
- default: undefined;
48
+ default: string;
50
49
  };
51
50
  }, import("@vue/composition-api").ExtractPropTypes<{
52
51
  items: {
@@ -54,8 +53,8 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
54
53
  default: CardCollectionItem[];
55
54
  };
56
55
  view: {
57
- type: PropType<string>;
58
- default: CardCollectionView;
56
+ type: StringConstructor;
57
+ default: string;
59
58
  };
60
59
  viewModes: {
61
60
  type: PropType<ViewMode[]>;
@@ -71,7 +70,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
71
70
  };
72
71
  search: {
73
72
  type: StringConstructor;
74
- default: undefined;
73
+ default: string;
75
74
  };
76
75
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
77
76
  search: string;
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue-demi';
2
2
  import { CardCollectionItem } from './types';
3
- import { CardCollectionView } from './props';
3
+ import { DefaultCardCollectionViews } from './props';
4
4
  declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
5
5
  contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
6
6
  }> & import("@vue/composition-api").Data, {}, {}, {
@@ -9,7 +9,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
9
9
  default: CardCollectionItem[];
10
10
  };
11
11
  mode: {
12
- type: PropType<CardCollectionView>;
12
+ type: PropType<DefaultCardCollectionViews>;
13
13
  required: true;
14
14
  };
15
15
  }, import("@vue/composition-api").ExtractPropTypes<{
@@ -18,17 +18,17 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
18
18
  default: CardCollectionItem[];
19
19
  };
20
20
  mode: {
21
- type: PropType<CardCollectionView>;
21
+ type: PropType<DefaultCardCollectionViews>;
22
22
  required: true;
23
23
  };
24
24
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
25
25
  items: CardCollectionItem[];
26
- mode: CardCollectionView;
26
+ mode: DefaultCardCollectionViews;
27
27
  } & {}, import("@vue/composition-api").ShallowUnwrapRef<{
28
28
  contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
29
29
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
30
30
  items: CardCollectionItem[];
31
- mode: CardCollectionView;
31
+ mode: DefaultCardCollectionViews;
32
32
  } & {}, {
33
33
  items: CardCollectionItem[];
34
34
  }, true>);
@@ -1,4 +1,4 @@
1
- export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-8606c407.js';
1
+ export { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection-773ae0db.js';
2
2
  import '../../index-fa6eb4ca.js';
3
3
  import 'vue';
4
4
  import '@vue/composition-api/dist/vue-composition-api.mjs';
@@ -20,7 +20,7 @@ import '../../OrButton-0e91a808.js';
20
20
  import '../../OrLoader-6a1f937b.js';
21
21
  import '../../OrMenu-fa47c888.js';
22
22
  import '../../OrMenuItem-26420908.js';
23
- import '../../OrSearch-19f43fe5.js';
23
+ import '../../OrSearch-a11b3621.js';
24
24
  import '../../OrInput-8b90e08f.js';
25
25
  import '../../OrError-aad17598.js';
26
26
  import '../../OrHint-f38a1940.js';
@@ -1,4 +1,8 @@
1
- export declare enum CardCollectionView {
1
+ import { ViewMode } from './types';
2
+ export declare enum DefaultCardCollectionViews {
2
3
  Grid = "grid",
3
4
  List = "list"
4
5
  }
6
+ export declare const gridView: ViewMode;
7
+ export declare const listView: ViewMode;
8
+ export declare const defaultViewModes: ViewMode[];
@@ -1,6 +1,6 @@
1
- import { CardCollectionView } from './props';
1
+ import { DefaultCardCollectionViews } from './props';
2
2
  export declare const CardCollectionRoot: string[];
3
3
  export declare const CardCollectionToolbar: string[];
4
4
  export declare const CardCollectionToolbarPanel: string[];
5
5
  export declare const CardCollectionContent: string[];
6
- export declare const CardCollectionContentViews: Record<CardCollectionView, string[]>;
6
+ export declare const CardCollectionContentViews: Record<DefaultCardCollectionViews, string[]>;
@@ -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;
@@ -1,4 +1,4 @@
1
- export { O as OrSearchV3 } from '../../OrSearch-19f43fe5.js';
1
+ export { O as OrSearchV3 } from '../../OrSearch-a11b3621.js';
2
2
  export { a as SearchSize } from '../../OrInputBox-79ec54ad.js';
3
3
  import '../../index-fa6eb4ca.js';
4
4
  import 'vue';