@onereach/ui-components 2.69.0 → 2.69.1-beta.2089.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 (62) hide show
  1. package/dist/bundled/v2/{OrCard-58a1ba3e.js → OrCard-29116e1f.js} +2 -2
  2. package/dist/bundled/v2/OrCardCollection-a8d5ce32.js +328 -0
  3. package/dist/bundled/v2/{OrSearch-9d402f56.js → OrSearch-19f43fe5.js} +2 -2
  4. package/dist/bundled/v2/{OrSortHeader-396e6a7c.js → OrSortHeader-9932d28f.js} +2 -2
  5. package/dist/bundled/v2/components/index.js +4 -4
  6. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +4 -0
  7. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +61 -37
  8. package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +35 -0
  9. package/dist/bundled/v2/components/or-card-collection-v3/constatnts.d.ts +4 -0
  10. package/dist/bundled/v2/components/or-card-collection-v3/index.js +7 -4
  11. package/dist/bundled/v2/components/or-card-collection-v3/types.d.ts +5 -4
  12. package/dist/bundled/v2/components/or-card-v3/index.js +1 -1
  13. package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
  14. package/dist/bundled/v2/components/or-sort-header-v3/index.js +1 -1
  15. package/dist/bundled/v2/index.js +5 -5
  16. package/dist/bundled/v3/OrButton-8ab33d9d.js +33 -0
  17. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-f9f329a2.js +224 -0
  18. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-289b5600.js → OrConfirm.vue_vue_type_script_lang-85472b12.js} +6 -36
  19. package/dist/bundled/v3/OrMenu-f26e8e55.js +29 -0
  20. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-ed78b21f.js → OrSearch.vue_vue_type_script_lang-cb2d6612.js} +1 -1
  21. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-919b2021.js → OrTabs.vue_vue_type_script_lang-61b79a5a.js} +10 -36
  22. package/dist/bundled/v3/components/index.js +9 -7
  23. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +4 -0
  24. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +61 -37
  25. package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +35 -0
  26. package/dist/bundled/v3/components/or-card-collection-v3/constatnts.d.ts +4 -0
  27. package/dist/bundled/v3/components/or-card-collection-v3/index.js +11 -4
  28. package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +5 -4
  29. package/dist/bundled/v3/components/or-confirm-v3/index.js +2 -1
  30. package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
  31. package/dist/bundled/v3/components/or-tabs-v3/index.js +2 -1
  32. package/dist/bundled/v3/index.js +319 -299
  33. package/dist/esm/v2/OrCardCollection-95b051e1.js +328 -0
  34. package/dist/esm/v2/components/index.js +1 -1
  35. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +4 -0
  36. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +61 -37
  37. package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +35 -0
  38. package/dist/esm/v2/components/or-card-collection-v3/constatnts.d.ts +4 -0
  39. package/dist/esm/v2/components/or-card-collection-v3/index.js +7 -4
  40. package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +5 -4
  41. package/dist/esm/v2/index.js +1 -1
  42. package/dist/esm/v3/OrCardCollection-afd863fc.js +274 -0
  43. package/dist/esm/v3/components/index.js +1 -1
  44. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +4 -0
  45. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +61 -37
  46. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +35 -0
  47. package/dist/esm/v3/components/or-card-collection-v3/constatnts.d.ts +4 -0
  48. package/dist/esm/v3/components/or-card-collection-v3/index.js +7 -4
  49. package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +5 -4
  50. package/dist/esm/v3/index.js +1 -1
  51. package/package.json +2 -3
  52. package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +160 -19
  53. package/src/components/or-card-collection-v3/OrCardCollection.vue +99 -74
  54. package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +41 -0
  55. package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +42 -0
  56. package/src/components/or-card-collection-v3/constatnts.ts +12 -0
  57. package/src/components/or-card-collection-v3/styles.ts +1 -1
  58. package/src/components/or-card-collection-v3/types.ts +5 -4
  59. package/dist/bundled/v2/OrCardCollection-a9a779ea.js +0 -228
  60. package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-3993a015.js +0 -164
  61. package/dist/esm/v2/OrCardCollection-4f001551.js +0 -227
  62. package/dist/esm/v3/OrCardCollection-5a0febaf.js +0 -198
@@ -1,198 +0,0 @@
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 };