@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.
Files changed (123) hide show
  1. package/dist/bundled/v2/{OrAvatar-2fa559e1.js → OrAvatar-ae61bfb9.js} +41 -15
  2. package/dist/bundled/v2/{OrCard-29116e1f.js → OrCard-58a1ba3e.js} +2 -2
  3. package/dist/bundled/v2/OrCardCollection-a9a779ea.js +228 -0
  4. package/dist/bundled/v2/{OrSearch-a11b3621.js → OrSearch-9d402f56.js} +3 -9
  5. package/dist/bundled/v2/{OrSortHeader-9932d28f.js → OrSortHeader-396e6a7c.js} +2 -2
  6. package/dist/bundled/v2/components/index.js +5 -5
  7. package/dist/bundled/v2/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
  8. package/dist/bundled/v2/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
  9. package/dist/bundled/v2/components/or-avatar-v3/index.js +2 -1
  10. package/dist/bundled/v2/components/or-avatar-v3/props.d.ts +2 -1
  11. package/dist/bundled/v2/components/or-avatar-v3/styles.d.ts +2 -0
  12. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  13. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +42 -67
  14. package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -7
  15. package/dist/bundled/v2/components/or-card-collection-v3/props.d.ts +1 -5
  16. package/dist/bundled/v2/components/or-card-collection-v3/styles.d.ts +2 -2
  17. package/dist/bundled/v2/components/or-card-collection-v3/types.d.ts +3 -8
  18. package/dist/bundled/v2/components/or-card-v3/index.js +1 -1
  19. package/dist/bundled/v2/components/or-search-v3/OrSearch.vue.d.ts +0 -13
  20. package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
  21. package/dist/bundled/v2/components/or-sort-header-v3/index.js +1 -1
  22. package/dist/bundled/v2/index.js +6 -6
  23. package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-22e46ce1.js → OrAvatar.vue_vue_type_script_lang-0426862b.js} +35 -13
  24. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-861158b5.js +164 -0
  25. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-85472b12.js → OrConfirm.vue_vue_type_script_lang-289b5600.js} +36 -6
  26. package/dist/bundled/v3/{OrIconButton-4bd33e3c.js → OrIconButton-1581013c.js} +1 -1
  27. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-641f6e06.js → OrIconButton.vue_vue_type_script_lang-f6f801ff.js} +1 -1
  28. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-3a8189f4.js → OrInlineInput.vue_vue_type_script_lang-f29483f4.js} +2 -2
  29. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-890b97ab.js → OrInlineTextarea.vue_vue_type_script_lang-cc40af48.js} +2 -2
  30. package/dist/bundled/v3/OrInput.vue_vue_type_script_lang-f6d793d3.js +2 -2
  31. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-00a477f0.js → OrModal.vue_vue_type_script_lang-80a7b906.js} +2 -2
  32. package/dist/bundled/v3/OrNotification.vue_vue_type_script_lang-fbb35355.js +2 -2
  33. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-0ae8a6dd.js → OrSearch.vue_vue_type_script_lang-ed78b21f.js} +2 -8
  34. package/dist/bundled/v3/OrSelect.vue_vue_type_script_lang-15285ce4.js +1 -1
  35. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-61b79a5a.js → OrTabs.vue_vue_type_script_lang-919b2021.js} +36 -10
  36. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-92d9fb12.js → OrTag.vue_vue_type_script_lang-dc6a4011.js} +2 -2
  37. package/dist/bundled/v3/{OrToastContainer-afb51e5d.js → OrToastContainer-7c3c0b12.js} +1 -1
  38. package/dist/bundled/v3/components/index.js +15 -17
  39. package/dist/bundled/v3/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
  40. package/dist/bundled/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
  41. package/dist/bundled/v3/components/or-avatar-v3/index.js +3 -1
  42. package/dist/bundled/v3/components/or-avatar-v3/props.d.ts +2 -1
  43. package/dist/bundled/v3/components/or-avatar-v3/styles.d.ts +2 -0
  44. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  45. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +42 -67
  46. package/dist/bundled/v3/components/or-card-collection-v3/index.js +6 -13
  47. package/dist/bundled/v3/components/or-card-collection-v3/props.d.ts +1 -5
  48. package/dist/bundled/v3/components/or-card-collection-v3/styles.d.ts +2 -2
  49. package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +3 -8
  50. package/dist/bundled/v3/components/or-confirm-v3/index.js +3 -4
  51. package/dist/bundled/v3/components/or-icon-button-v3/index.js +1 -1
  52. package/dist/bundled/v3/components/or-inline-input-v3/index.js +3 -3
  53. package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +3 -3
  54. package/dist/bundled/v3/components/or-input-v3/index.js +2 -2
  55. package/dist/bundled/v3/components/or-modal-v3/index.js +3 -3
  56. package/dist/bundled/v3/components/or-notification-v3/index.js +2 -2
  57. package/dist/bundled/v3/components/or-search-v3/OrSearch.vue.d.ts +0 -13
  58. package/dist/bundled/v3/components/or-search-v3/index.js +3 -3
  59. package/dist/bundled/v3/components/or-select-v3/index.js +3 -3
  60. package/dist/bundled/v3/components/or-tabs-v3/index.js +1 -2
  61. package/dist/bundled/v3/components/or-tag-v3/index.js +3 -3
  62. package/dist/bundled/v3/components/or-toast-v3/index.js +4 -4
  63. package/dist/bundled/v3/index.js +314 -339
  64. package/dist/bundled/v3/{types-6c5eee23.js → types-dcc78caa.js} +2 -2
  65. package/dist/esm/v2/{OrAvatar-0afdef36.js → OrAvatar-3d155af3.js} +41 -15
  66. package/dist/esm/v2/OrCardCollection-4f001551.js +227 -0
  67. package/dist/esm/v2/{OrSearch-62d91301.js → OrSearch-ddb7c1fe.js} +1 -7
  68. package/dist/esm/v2/components/index.js +3 -3
  69. package/dist/esm/v2/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
  70. package/dist/esm/v2/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
  71. package/dist/esm/v2/components/or-avatar-v3/index.js +2 -1
  72. package/dist/esm/v2/components/or-avatar-v3/props.d.ts +2 -1
  73. package/dist/esm/v2/components/or-avatar-v3/styles.d.ts +2 -0
  74. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  75. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +42 -67
  76. package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -7
  77. package/dist/esm/v2/components/or-card-collection-v3/props.d.ts +1 -5
  78. package/dist/esm/v2/components/or-card-collection-v3/styles.d.ts +2 -2
  79. package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +3 -8
  80. package/dist/esm/v2/components/or-search-v3/OrSearch.vue.d.ts +0 -13
  81. package/dist/esm/v2/components/or-search-v3/index.js +1 -1
  82. package/dist/esm/v2/index.js +3 -3
  83. package/dist/esm/v3/{OrAvatar-ef88d31c.js → OrAvatar-53a4429d.js} +43 -16
  84. package/dist/esm/v3/OrCardCollection-5a0febaf.js +198 -0
  85. package/dist/esm/v3/{OrSearch-aafb93b4.js → OrSearch-cdde55ce.js} +1 -7
  86. package/dist/esm/v3/components/index.js +3 -3
  87. package/dist/esm/v3/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
  88. package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
  89. package/dist/esm/v3/components/or-avatar-v3/index.js +2 -1
  90. package/dist/esm/v3/components/or-avatar-v3/props.d.ts +2 -1
  91. package/dist/esm/v3/components/or-avatar-v3/styles.d.ts +2 -0
  92. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +0 -5
  93. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +42 -67
  94. package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -7
  95. package/dist/esm/v3/components/or-card-collection-v3/props.d.ts +1 -5
  96. package/dist/esm/v3/components/or-card-collection-v3/styles.d.ts +2 -2
  97. package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +3 -8
  98. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +0 -13
  99. package/dist/esm/v3/components/or-search-v3/index.js +1 -1
  100. package/dist/esm/v3/index.js +3 -3
  101. package/package.json +1 -1
  102. package/src/components/or-avatar-v3/OrAvatar.stories3.ts +9 -7
  103. package/src/components/or-avatar-v3/OrAvatar.vue +22 -2
  104. package/src/components/or-avatar-v3/props.ts +1 -0
  105. package/src/components/or-avatar-v3/styles.ts +49 -11
  106. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +30 -230
  107. package/src/components/or-card-collection-v3/OrCardCollection.vue +77 -120
  108. package/src/components/or-card-collection-v3/props.ts +1 -14
  109. package/src/components/or-card-collection-v3/styles.ts +3 -3
  110. package/src/components/or-card-collection-v3/types.ts +3 -9
  111. package/src/components/or-search-v3/OrSearch.vue +1 -7
  112. package/dist/bundled/v2/OrCardCollection-773ae0db.js +0 -346
  113. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
  114. package/dist/bundled/v3/OrButton-8ab33d9d.js +0 -33
  115. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-b983bda7.js +0 -228
  116. package/dist/bundled/v3/OrMenu-f26e8e55.js +0 -29
  117. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +0 -35
  118. package/dist/esm/v2/OrCardCollection-61c86bfc.js +0 -346
  119. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +0 -35
  120. package/dist/esm/v3/OrCardCollection-fdc7848b.js +0 -289
  121. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +0 -35
  122. package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +0 -41
  123. package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +0 -42
@@ -1,51 +1,41 @@
1
1
  import { PropType } from 'vue-demi';
2
- import { CardCollectionItem, SortOption, ViewMode } from './types';
2
+ import { SortHeaderModel } from '../or-sort-header-v3';
3
+ import { CardCollectionView } from './props';
4
+ import { CardCollectionItem, CardCollectionSortHeader } from './types';
3
5
  declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
4
6
  root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
5
- sortMenu: import("@vue/composition-api").Ref<(import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
6
- [x: string]: ((...args: any[]) => any) | null;
7
- } | string[], {} & {}, {
8
- [x: number]: string;
9
- } | {}, true>)) | undefined>;
10
- sortButton: import("@vue/composition-api").Ref<(import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
11
- [x: string]: ((...args: any[]) => any) | null;
12
- } | string[], {} & {}, {
13
- [x: number]: string;
14
- } | {}, true>)) | undefined>;
15
7
  rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
16
8
  toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
17
9
  toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
18
- proxyView: import("@vue/composition-api").Ref<string>;
19
- proxySort: import("@vue/composition-api").Ref<string>;
10
+ contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
11
+ proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
12
+ proxySort: import("@vue/composition-api").Ref<{
13
+ column: string;
14
+ direction: "asc" | "desc";
15
+ }>;
20
16
  proxySearch: import("@vue/composition-api").Ref<string>;
21
- sortLabel: import("@vue/composition-api").ComputedRef<string | undefined>;
22
- switchView: (view: string) => void;
23
- handleSort: (sort: string) => void;
24
- handleSearch: (search: string) => void;
17
+ switchToGridView: () => void;
18
+ switchToListView: () => void;
25
19
  }> & import("@vue/composition-api").Data, {}, {}, {
26
20
  items: {
27
21
  type: PropType<CardCollectionItem[]>;
28
22
  default: CardCollectionItem[];
29
23
  };
30
24
  view: {
31
- type: StringConstructor;
32
- default: string;
33
- };
34
- viewModes: {
35
- type: PropType<ViewMode[]>;
36
- default: () => ViewMode[];
25
+ type: PropType<CardCollectionView>;
26
+ default: CardCollectionView;
37
27
  };
38
28
  sort: {
39
- type: StringConstructor;
29
+ type: PropType<SortHeaderModel>;
40
30
  default: undefined;
41
31
  };
42
- sortOptions: {
43
- type: PropType<SortOption[]>;
44
- default: () => never[];
32
+ sortHeaders: {
33
+ type: PropType<CardCollectionSortHeader[]>;
34
+ default: undefined;
45
35
  };
46
36
  search: {
47
37
  type: StringConstructor;
48
- default: string;
38
+ default: undefined;
49
39
  };
50
40
  }, import("@vue/composition-api").ExtractPropTypes<{
51
41
  items: {
@@ -53,71 +43,56 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
53
43
  default: CardCollectionItem[];
54
44
  };
55
45
  view: {
56
- type: StringConstructor;
57
- default: string;
58
- };
59
- viewModes: {
60
- type: PropType<ViewMode[]>;
61
- default: () => ViewMode[];
46
+ type: PropType<CardCollectionView>;
47
+ default: CardCollectionView;
62
48
  };
63
49
  sort: {
64
- type: StringConstructor;
50
+ type: PropType<SortHeaderModel>;
65
51
  default: undefined;
66
52
  };
67
- sortOptions: {
68
- type: PropType<SortOption[]>;
69
- default: () => never[];
53
+ sortHeaders: {
54
+ type: PropType<CardCollectionSortHeader[]>;
55
+ default: undefined;
70
56
  };
71
57
  search: {
72
58
  type: StringConstructor;
73
- default: string;
59
+ default: undefined;
74
60
  };
75
61
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
76
62
  search: string;
77
- sort: string;
63
+ sort: SortHeaderModel;
78
64
  items: CardCollectionItem[];
79
- view: string;
80
- viewModes: ViewMode[];
81
- sortOptions: SortOption[];
65
+ view: CardCollectionView;
66
+ sortHeaders: CardCollectionSortHeader[];
82
67
  } & {} & {
83
68
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
84
69
  }, import("@vue/composition-api").ShallowUnwrapRef<{
85
70
  root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
86
- sortMenu: import("@vue/composition-api").Ref<(import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
87
- [x: string]: ((...args: any[]) => any) | null;
88
- } | string[], {} & {}, {
89
- [x: number]: string;
90
- } | {}, true>)) | undefined>;
91
- sortButton: import("@vue/composition-api").Ref<(import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
92
- [x: string]: ((...args: any[]) => any) | null;
93
- } | string[], {} & {}, {
94
- [x: number]: string;
95
- } | {}, true>)) | undefined>;
96
71
  rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
97
72
  toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
98
73
  toolbarPanelStyles: import("@vue/composition-api").ComputedRef<string[]>;
99
- proxyView: import("@vue/composition-api").Ref<string>;
100
- proxySort: import("@vue/composition-api").Ref<string>;
74
+ contentStyles: import("@vue/composition-api").ComputedRef<string[]>;
75
+ proxyView: import("@vue/composition-api").Ref<CardCollectionView>;
76
+ proxySort: import("@vue/composition-api").Ref<{
77
+ column: string;
78
+ direction: "asc" | "desc";
79
+ }>;
101
80
  proxySearch: import("@vue/composition-api").Ref<string>;
102
- sortLabel: import("@vue/composition-api").ComputedRef<string | undefined>;
103
- switchView: (view: string) => void;
104
- handleSort: (sort: string) => void;
105
- handleSearch: (search: string) => void;
81
+ switchToGridView: () => void;
82
+ switchToListView: () => void;
106
83
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
107
84
  search: string;
108
- sort: string;
85
+ sort: SortHeaderModel;
109
86
  items: CardCollectionItem[];
110
- view: string;
111
- viewModes: ViewMode[];
112
- sortOptions: SortOption[];
87
+ view: CardCollectionView;
88
+ sortHeaders: CardCollectionSortHeader[];
113
89
  } & {} & {
114
90
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
115
91
  }, {
116
92
  search: string;
117
- sort: string;
93
+ sort: SortHeaderModel;
118
94
  items: CardCollectionItem[];
119
- view: string;
120
- viewModes: ViewMode[];
121
- sortOptions: SortOption[];
95
+ view: CardCollectionView;
96
+ sortHeaders: CardCollectionSortHeader[];
122
97
  }, true>);
123
98
  export default _default;
@@ -1,10 +1,11 @@
1
- export { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection-61c86bfc.js';
1
+ export { C as CardCollectionView, _ as OrCardCollectionV3 } from '../../OrCardCollection-4f001551.js';
2
2
  import 'vue-demi';
3
3
  import '../../useClassAttribute-47fdb016.js';
4
4
  import '@vueuse/core';
5
+ import '../../OrCard-de799db0.js';
6
+ import '../../normalize-component-6e8e3d80.js';
5
7
  import '../../OrIconButton-e17e4944.js';
6
8
  import '../../OrIcon-5e394c62.js';
7
- import '../../normalize-component-6e8e3d80.js';
8
9
  import '../../OrTooltip-513bee30.js';
9
10
  import '../../OrPopover-9bafbdb4.js';
10
11
  import '@floating-ui/dom';
@@ -14,14 +15,10 @@ import '../../OrBottomSheet-16c2e610.js';
14
15
  import '../../OrOverlay-18ba2dc6.js';
15
16
  import '../../OrTeleport.vue2-fb92f29f.js';
16
17
  import 'portal-vue';
17
- import '../../OrMenu-df27d0ef.js';
18
- import '../../OrMenuItem-c7f28480.js';
19
- import '../../OrButton-357a5756.js';
20
- import '../../OrLoader-f857d55b.js';
21
- import '../../OrSearch-62d91301.js';
22
18
  import '../../OrInput-2f16a7ac.js';
23
19
  import '../../OrError-d267ee9a.js';
24
20
  import '../../OrHint-42dc9ebb.js';
25
21
  import '../../OrInputBox-4d5a318d.js';
26
22
  import '../../OrLabel-2a9f1477.js';
27
23
  import '../../browser-82dea9ed.js';
24
+ import '../../OrSortHeader-19bf94ca.js';
@@ -1,8 +1,4 @@
1
- import { ViewMode } from './types';
2
- export declare enum DefaultCardCollectionViews {
1
+ export declare enum CardCollectionView {
3
2
  Grid = "grid",
4
3
  List = "list"
5
4
  }
6
- export declare const gridView: ViewMode;
7
- export declare const listView: ViewMode;
8
- export declare const defaultViewModes: ViewMode[];
@@ -1,6 +1,6 @@
1
- import { DefaultCardCollectionViews } from './props';
1
+ import { CardCollectionView } 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<DefaultCardCollectionViews, string[]>;
6
+ export declare const CardCollectionContentViews: Record<CardCollectionView, string[]>;
@@ -1,12 +1,7 @@
1
1
  export interface CardCollectionItem {
2
- key?: string;
3
- [key: string | number]: any;
2
+ id: string;
4
3
  }
5
- export interface ViewMode {
6
- view: string;
7
- icon: string;
8
- }
9
- export interface SortOption {
10
- label: string;
4
+ export interface CardCollectionSortHeader {
11
5
  value: string;
6
+ label: string;
12
7
  }
@@ -11,11 +11,6 @@ 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
- };
19
14
  size: {
20
15
  type: PropType<SearchSize>;
21
16
  default: SearchSize;
@@ -37,11 +32,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
37
32
  default: boolean;
38
33
  };
39
34
  }, import("@vue/composition-api").ExtractPropTypes<{
40
- modelValue: {
41
- type: StringConstructor;
42
- default: string;
43
- required: false;
44
- };
45
35
  size: {
46
36
  type: PropType<SearchSize>;
47
37
  default: SearchSize;
@@ -63,7 +53,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
63
53
  default: boolean;
64
54
  };
65
55
  }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
66
- modelValue: string;
67
56
  size: SearchSize;
68
57
  placeholder: string;
69
58
  debounce: number;
@@ -82,7 +71,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
82
71
  focus: () => void;
83
72
  clear: () => void;
84
73
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
85
- modelValue: string;
86
74
  size: SearchSize;
87
75
  placeholder: string;
88
76
  debounce: number;
@@ -91,7 +79,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
91
79
  } & {} & {
92
80
  [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
93
81
  }, {
94
- modelValue: string;
95
82
  size: SearchSize;
96
83
  placeholder: string;
97
84
  debounce: number;
@@ -1,4 +1,4 @@
1
- export { _ as OrSearchV3 } from '../../OrSearch-62d91301.js';
1
+ export { _ as OrSearchV3 } from '../../OrSearch-ddb7c1fe.js';
2
2
  export { a as SearchSize } from '../../OrInputBox-4d5a318d.js';
3
3
  import 'vue-demi';
4
4
  import '@vueuse/core';
@@ -1,5 +1,5 @@
1
1
  export { O as OR_AVATAR_SIZE, _ as OrAvatar } from './OrAvatar-4824c57f.js';
2
- export { a as AvatarColor, A as AvatarSize, _ as OrAvatarV3 } from './OrAvatar-0afdef36.js';
2
+ export { a as AvatarColor, A as AvatarSize, _ as OrAvatarV3 } from './OrAvatar-3d155af3.js';
3
3
  export { _ as OrBottomSheetV3 } from './OrBottomSheet-16c2e610.js';
4
4
  export { _ as OrButton, a as OrButtonColors, b as OrButtonSizes, O as OrButtonViews } from './OrButton-2ca1c3d6.js';
5
5
  export { _ as OrButtonV2 } from './OrButton-c4f9955b.js';
@@ -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 { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-61c86bfc.js';
11
+ export { C as CardCollectionView, _ as OrCardCollectionV3 } from './OrCardCollection-4f001551.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-62d91301.js';
66
+ export { _ as OrSearchV3 } from './OrSearch-ddb7c1fe.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-f0ff5a85.js';
@@ -2,7 +2,8 @@ import { defineComponent, ref, computed, watchPostEffect } from 'vue-demi';
2
2
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
3
  import '@vueuse/core';
4
4
  import { h as hslToColorString, g as generateHslFromString } from './color-1f348774.js';
5
- import { openBlock, createElementBlock, mergeProps, renderSlot, createElementVNode, normalizeClass } from 'vue';
5
+ import { s as script$1 } from './OrIcon-b195169c.js';
6
+ import { resolveComponent, openBlock, createElementBlock, mergeProps, renderSlot, normalizeClass, createBlock, createCommentVNode } from 'vue';
6
7
 
7
8
  var AvatarSize;
8
9
  (function (AvatarSize) {
@@ -10,6 +11,7 @@ var AvatarSize;
10
11
  AvatarSize["L"] = "l";
11
12
  AvatarSize["M"] = "m";
12
13
  AvatarSize["S"] = "s";
14
+ AvatarSize["XS"] = "xs";
13
15
  })(AvatarSize || (AvatarSize = {}));
14
16
  var AvatarColor;
15
17
  (function (AvatarColor) {
@@ -34,24 +36,19 @@ const AvatarImage = [
34
36
  const AvatarRootSizes = {
35
37
  'xl': [
36
38
  // Box
37
- 'w-[80px]', 'h-[80px]',
38
- // Typography
39
- 'text-[32px]'],
39
+ 'w-[80px]', 'h-[80px]'],
40
40
  'l': [
41
41
  // Box
42
- 'w-[64px]', 'h-[64px]',
43
- // Typography
44
- 'text-[24px]'],
42
+ 'w-[64px]', 'h-[64px]'],
45
43
  'm': [
46
44
  // Box
47
- 'w-[40px]', 'h-[40px]',
48
- // Typography
49
- 'text-[16px]'],
45
+ 'w-[40px]', 'h-[40px]'],
50
46
  's': [
51
47
  // Box
52
- 'w-[32px]', 'h-[32px]',
53
- // Typography
54
- 'text-[16px]']
48
+ 'w-[32px]', 'h-[32px]'],
49
+ 'xs': [
50
+ // Box
51
+ 'w-[24px]', 'h-[24px]']
55
52
  };
56
53
  const AvatarRootColors = {
57
54
  [AvatarColor.blue]: [
@@ -73,9 +70,26 @@ const AvatarRootColors = {
73
70
  // Theme
74
71
  'text-white', 'dark:text-overlay-dark']
75
72
  };
73
+ const AvatarRootAbbreviationSizes = {
74
+ 'xl': ['typography-headline-1'],
75
+ 'l': ['typography-headline-1'],
76
+ 'm': ['typography-body-1-bold'],
77
+ 's': ['typography-body-1-bold'],
78
+ 'xs': ['typography-caption-semibold']
79
+ };
80
+ const AvatarRootIconSizes = {
81
+ 'xl': ['text-[40px]'],
82
+ 'l': ['text-[32px]'],
83
+ 'm': ['text-[20px]'],
84
+ 's': ['text-[16px]'],
85
+ 'xs': ['text-[16px]']
86
+ };
76
87
 
77
88
  var script = defineComponent({
78
89
  name: 'OrAvatar',
90
+ components: {
91
+ OrIcon: script$1
92
+ },
79
93
  inheritAttrs: false,
80
94
  props: {
81
95
  src: {
@@ -86,6 +100,10 @@ var script = defineComponent({
86
100
  type: String,
87
101
  default: AvatarSize.M
88
102
  },
103
+ icon: {
104
+ type: String,
105
+ default: undefined
106
+ },
89
107
  color: {
90
108
  type: String,
91
109
  default: AvatarColor.auto,
@@ -101,9 +119,12 @@ var script = defineComponent({
101
119
  setup(props) {
102
120
  // Refs
103
121
  const root = ref();
122
+ const isIcon = computed(() => {
123
+ return !props.icon;
124
+ });
104
125
  // Styles
105
126
  const classAttribute = useClassAttribute();
106
- const rootStyles = computed(() => ['or-avatar', ...AvatarRoot, ...AvatarRootSizes[props.size], ...AvatarRootColors[props.color], classAttribute.value]);
127
+ const rootStyles = computed(() => ['or-avatar', ...AvatarRoot, ...AvatarRootSizes[props.size], ...AvatarRootColors[props.color], ...(isIcon.value ? AvatarRootAbbreviationSizes[props.size] : AvatarRootIconSizes[props.size]), classAttribute.value]);
107
128
  const imageStyles = computed(() => [...AvatarImage]);
108
129
  // Effects
109
130
  watchPostEffect(() => {
@@ -126,15 +147,21 @@ var script = defineComponent({
126
147
 
127
148
  const _hoisted_1 = ["src"];
128
149
  function render(_ctx, _cache, $props, $setup, $data, $options) {
150
+ const _component_or_icon = resolveComponent("or-icon");
129
151
  return openBlock(), createElementBlock("div", mergeProps({
130
152
  ref: "root"
131
153
  }, _ctx.$attrs, {
132
154
  class: _ctx.rootStyles
133
- }), [renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("img", {
155
+ }), [renderSlot(_ctx.$slots, "default", {}, () => [_ctx.src ? (openBlock(), createElementBlock("img", {
156
+ key: 0,
134
157
  class: normalizeClass(_ctx.imageStyles),
135
158
  src: _ctx.src,
136
159
  alt: ''
137
- }, null, 10 /* CLASS, PROPS */, _hoisted_1)])], 16 /* FULL_PROPS */);
160
+ }, null, 10 /* CLASS, PROPS */, _hoisted_1)) : _ctx.icon ? (openBlock(), createBlock(_component_or_icon, {
161
+ key: 1,
162
+ icon: _ctx.icon,
163
+ size: "inherit"
164
+ }, null, 8 /* PROPS */, ["icon"])) : createCommentVNode("v-if", true)])], 16 /* FULL_PROPS */);
138
165
  }
139
166
 
140
167
  script.render = render;
@@ -0,0 +1,198 @@
1
+ import { defineComponent, ref, computed, watch } from 'vue-demi';
2
+ import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
+ import '@vueuse/core';
4
+ import { s as script$1 } from './OrCard-fd92f7c8.js';
5
+ import { s as script$2 } from './OrIconButton-1eebcafc.js';
6
+ import { s as script$3 } from './OrInput-41691fb3.js';
7
+ import { s as script$4 } from './OrSortHeader-fe1a9cf8.js';
8
+ import { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, Fragment, renderList, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, createVNode, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
9
+
10
+ var CardCollectionView;
11
+ (function (CardCollectionView) {
12
+ CardCollectionView["Grid"] = "grid";
13
+ CardCollectionView["List"] = "list";
14
+ })(CardCollectionView || (CardCollectionView = {}));
15
+
16
+ const CardCollectionRoot = [
17
+ // Layout
18
+ 'layout-column',
19
+ // Spacing
20
+ 'gap-md'];
21
+ const CardCollectionToolbar = [
22
+ // Layout
23
+ 'layout-row justify-between',
24
+ // Typography
25
+ 'typography-body-2-regular',
26
+ // Theme
27
+ 'theme-foreground-default', 'dark:theme-foreground-default-dark'];
28
+ const CardCollectionToolbarPanel = [
29
+ // Layout
30
+ 'layout-row',
31
+ // Spacing
32
+ 'gap-sm+'];
33
+ const CardCollectionContent = [
34
+ // Layout
35
+ 'grid',
36
+ // Spacing
37
+ 'gap-sm md:gap-md'];
38
+ const CardCollectionContentViews = {
39
+ 'grid': [
40
+ // Layout
41
+ 'sm:grid-cols-1', 'md:grid-cols-2', 'lg:grid-cols-4', 'xl:grid-cols-6'],
42
+ 'list': []
43
+ };
44
+
45
+ var script = defineComponent({
46
+ name: 'OrCardCollection',
47
+ components: {
48
+ OrCard: script$1,
49
+ OrIconButton: script$2,
50
+ OrInput: script$3,
51
+ OrSortHeader: script$4
52
+ },
53
+ inheritAttrs: false,
54
+ props: {
55
+ items: {
56
+ type: Array,
57
+ default: []
58
+ },
59
+ view: {
60
+ type: String,
61
+ default: CardCollectionView.Grid
62
+ },
63
+ sort: {
64
+ type: Object,
65
+ default: undefined
66
+ },
67
+ sortHeaders: {
68
+ type: Array,
69
+ default: undefined
70
+ },
71
+ search: {
72
+ type: String,
73
+ default: undefined
74
+ }
75
+ },
76
+ emits: ['viewChange', 'sortChange', 'searchChange'],
77
+ expose: ['root'],
78
+ setup(props, context) {
79
+ // Refs
80
+ const root = ref();
81
+ // Styles
82
+ const classAttribute = useClassAttribute();
83
+ const rootStyles = computed(() => ['or-card-collection', ...CardCollectionRoot, classAttribute.value]);
84
+ const toolbarStyles = computed(() => [...CardCollectionToolbar]);
85
+ const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
86
+ const contentStyles = computed(() => [...CardCollectionContent, ...CardCollectionContentViews[proxyView.value]]);
87
+ // State
88
+ const proxyView = ref(props.view);
89
+ const proxySort = ref(props.sort);
90
+ const proxySearch = ref(props.search);
91
+ // Methods
92
+ function switchToGridView() {
93
+ proxyView.value = CardCollectionView.Grid;
94
+ }
95
+ function switchToListView() {
96
+ proxyView.value = CardCollectionView.List;
97
+ }
98
+ // Effects
99
+ watch(() => props.view, value => {
100
+ proxyView.value = value;
101
+ });
102
+ watch(proxyView, value => {
103
+ context.emit('viewChange', value);
104
+ });
105
+ watch(() => props.sort, value => {
106
+ proxySort.value = value;
107
+ });
108
+ watch(proxySort, value => {
109
+ context.emit('sortChange', value);
110
+ });
111
+ watch(() => props.search, value => {
112
+ proxySearch.value = value;
113
+ });
114
+ watch(proxySearch, value => {
115
+ context.emit('searchChange', value);
116
+ });
117
+ return {
118
+ root,
119
+ rootStyles,
120
+ toolbarStyles,
121
+ toolbarPanelStyles,
122
+ contentStyles,
123
+ proxyView,
124
+ proxySort,
125
+ proxySearch,
126
+ switchToGridView,
127
+ switchToListView
128
+ };
129
+ }
130
+ });
131
+
132
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
133
+ const _component_OrSortHeader = resolveComponent("OrSortHeader");
134
+ const _component_OrInput = resolveComponent("OrInput");
135
+ const _component_OrIconButton = resolveComponent("OrIconButton");
136
+ const _component_OrCard = resolveComponent("OrCard");
137
+ return openBlock(), createElementBlock("div", mergeProps({
138
+ ref: "root"
139
+ }, _ctx.$attrs, {
140
+ class: _ctx.rootStyles
141
+ }), [createElementVNode("div", {
142
+ class: normalizeClass(_ctx.toolbarStyles)
143
+ }, [createElementVNode("div", {
144
+ class: normalizeClass(_ctx.toolbarPanelStyles)
145
+ }, [_ctx.sortHeaders ? (openBlock(true), createElementBlock(Fragment, {
146
+ key: 0
147
+ }, renderList(_ctx.sortHeaders, header => {
148
+ return openBlock(), createBlock(_component_OrSortHeader, {
149
+ key: header.value,
150
+ modelValue: _ctx.proxySort,
151
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.proxySort = $event),
152
+ "input-value": header.value
153
+ }, {
154
+ default: withCtx(() => [createTextVNode(toDisplayString(header.label), 1 /* TEXT */)]),
155
+
156
+ _: 2 /* DYNAMIC */
157
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "input-value"]);
158
+ }), 128 /* KEYED_FRAGMENT */)) : createCommentVNode("v-if", true)], 2 /* CLASS */), createElementVNode("div", {
159
+ class: normalizeClass(_ctx.toolbarPanelStyles)
160
+ }, [createVNode(_component_OrInput, {
161
+ modelValue: _ctx.proxySearch,
162
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.proxySearch = $event),
163
+ type: 'search',
164
+ placeholder: 'Search',
165
+ size: 's'
166
+ }, null, 8 /* PROPS */, ["modelValue"]), createVNode(_component_OrIconButton, {
167
+ icon: 'grid_view',
168
+ onClick: _cache[2] || (_cache[2] = $event => _ctx.switchToGridView())
169
+ }), createVNode(_component_OrIconButton, {
170
+ icon: 'view_list',
171
+ onClick: _cache[3] || (_cache[3] = $event => _ctx.switchToListView())
172
+ }), renderSlot(_ctx.$slots, "addon")], 2 /* CLASS */)], 2 /* CLASS */), createElementVNode("div", {
173
+ class: normalizeClass(_ctx.contentStyles)
174
+ }, [_ctx.proxyView === 'grid' ? (openBlock(true), createElementBlock(Fragment, {
175
+ key: 0
176
+ }, renderList(_ctx.items, item => {
177
+ return openBlock(), createBlock(_component_OrCard, {
178
+ key: item.id
179
+ }, {
180
+ default: withCtx(() => [renderSlot(_ctx.$slots, "gridItem", normalizeProps(guardReactiveProps(item)))]),
181
+ _: 2 /* DYNAMIC */
182
+ }, 1024 /* DYNAMIC_SLOTS */);
183
+ }), 128 /* KEYED_FRAGMENT */)) : createCommentVNode("v-if", true), _ctx.proxyView === 'list' ? (openBlock(true), createElementBlock(Fragment, {
184
+ key: 1
185
+ }, renderList(_ctx.items, item => {
186
+ return openBlock(), createBlock(_component_OrCard, {
187
+ key: item.id
188
+ }, {
189
+ default: withCtx(() => [renderSlot(_ctx.$slots, "listItem", normalizeProps(guardReactiveProps(item)))]),
190
+ _: 2 /* DYNAMIC */
191
+ }, 1024 /* DYNAMIC_SLOTS */);
192
+ }), 128 /* KEYED_FRAGMENT */)) : createCommentVNode("v-if", true)], 2 /* CLASS */)], 16 /* FULL_PROPS */);
193
+ }
194
+
195
+ script.render = render;
196
+ script.__file = "src/components/or-card-collection-v3/OrCardCollection.vue";
197
+
198
+ export { CardCollectionView as C, script as s };
@@ -12,11 +12,6 @@ var script = defineComponent({
12
12
  },
13
13
  inheritAttrs: false,
14
14
  props: {
15
- modelValue: {
16
- type: String,
17
- default: '',
18
- required: false
19
- },
20
15
  size: {
21
16
  type: String,
22
17
  default: InputBoxSize.M
@@ -41,14 +36,13 @@ var script = defineComponent({
41
36
  emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
42
37
  expose: ['root', 'focus', 'clear'],
43
38
  setup(props, context) {
44
- var _a;
45
39
  // Refs
46
40
  const root = ref();
47
41
  // Styles
48
42
  const classAttribute = useClassAttribute();
49
43
  const rootStyles = computed(() => ['or-search', classAttribute.value]);
50
44
  // State
51
- const localModelValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : '');
45
+ const localModelValue = ref('');
52
46
  // Events
53
47
  debouncedWatch(localModelValue, () => context.emit('search', localModelValue.value), {
54
48
  debounce: props.debounce