@onereach/ui-components 2.69.7-beta.2170.0 → 2.69.7-beta.2171.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 (117) hide show
  1. package/dist/bundled/v2/{OrButton-a846fa7e.js → OrButton-4b99c680.js} +1 -10
  2. package/dist/bundled/v2/{OrCardCollection-15d11d05.js → OrCardCollection-c4209a92.js} +1 -1
  3. package/dist/bundled/v2/{OrConfirm-ec3feaf5.js → OrConfirm-cab6535b.js} +1 -1
  4. package/dist/bundled/v2/{OrExpansionPanel-995caa85.js → OrExpansionPanel-d9a260e2.js} +32 -5
  5. package/dist/bundled/v2/{OrSelect-8a4d227e.js → OrSelect-9658e0f2.js} +9 -16
  6. package/dist/bundled/v2/components/index.d.ts +0 -1
  7. package/dist/bundled/v2/components/index.js +5 -6
  8. package/dist/bundled/v2/components/or-button-v3/OrButton.vue.d.ts +0 -11
  9. package/dist/bundled/v2/components/or-button-v3/index.js +1 -1
  10. package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -2
  11. package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
  12. package/dist/bundled/v2/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +22 -3
  13. package/dist/bundled/v2/components/or-expansion-panel-v3/index.js +1 -1
  14. package/dist/bundled/v2/components/or-select-v3/OrSelect.vue.d.ts +14 -25
  15. package/dist/bundled/v2/components/or-select-v3/index.d.ts +0 -1
  16. package/dist/bundled/v2/components/or-select-v3/index.js +2 -2
  17. package/dist/bundled/v2/components/or-select-v3/types.d.ts +1 -1
  18. package/dist/bundled/v2/index.js +6 -7
  19. package/dist/bundled/v3/{OrButton-2b27c1fd.js → OrButton-a671b8a1.js} +2 -3
  20. package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-8c44986c.js → OrButton.vue_vue_type_script_lang-b0dc31ca.js} +1 -9
  21. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-bd852915.js → OrCardCollection.vue_vue_type_script_lang-9a2ae9a3.js} +2 -2
  22. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-9e4e2884.js → OrConfirm.vue_vue_type_script_lang-f57ffa1a.js} +2 -2
  23. package/dist/bundled/v3/{OrExpansionPanel.vue_vue_type_script_lang-7f9c6721.js → OrExpansionPanel.vue_vue_type_script_lang-5360f580.js} +31 -4
  24. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-94063fc4.js → OrSelect.vue_vue_type_script_lang-359d1a58.js} +4 -8
  25. package/dist/bundled/v3/components/index.d.ts +0 -1
  26. package/dist/bundled/v3/components/index.js +6 -7
  27. package/dist/bundled/v3/components/or-button-v3/OrButton.vue.d.ts +0 -11
  28. package/dist/bundled/v3/components/or-button-v3/index.js +1 -1
  29. package/dist/bundled/v3/components/or-card-collection-v3/index.js +3 -3
  30. package/dist/bundled/v3/components/or-confirm-v3/index.js +3 -3
  31. package/dist/bundled/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +22 -3
  32. package/dist/bundled/v3/components/or-expansion-panel-v3/index.js +1 -1
  33. package/dist/bundled/v3/components/or-select-v3/OrSelect.vue.d.ts +14 -25
  34. package/dist/bundled/v3/components/or-select-v3/index.d.ts +0 -1
  35. package/dist/bundled/v3/components/or-select-v3/index.js +2 -2
  36. package/dist/bundled/v3/components/or-select-v3/types.d.ts +1 -1
  37. package/dist/bundled/v3/index.js +163 -254
  38. package/dist/esm/v2/{OrButton-835d4f11.js → OrButton-357e1e2c.js} +1 -10
  39. package/dist/esm/v2/{OrCardCollection-024cfba9.js → OrCardCollection-57d11adf.js} +1 -1
  40. package/dist/esm/v2/{OrConfirm-5e8dd4b6.js → OrConfirm-ec7aef0e.js} +1 -1
  41. package/dist/esm/v2/{OrExpansionPanel-968ddc61.js → OrExpansionPanel-a123024e.js} +32 -5
  42. package/dist/esm/v2/{OrSelect-641184f0.js → OrSelect-7a2f6001.js} +9 -16
  43. package/dist/esm/v2/components/index.d.ts +0 -1
  44. package/dist/esm/v2/components/index.js +5 -6
  45. package/dist/esm/v2/components/or-button-v3/OrButton.vue.d.ts +0 -11
  46. package/dist/esm/v2/components/or-button-v3/index.js +1 -1
  47. package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -2
  48. package/dist/esm/v2/components/or-confirm-v3/index.js +2 -2
  49. package/dist/esm/v2/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +22 -3
  50. package/dist/esm/v2/components/or-expansion-panel-v3/index.js +1 -1
  51. package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +14 -25
  52. package/dist/esm/v2/components/or-select-v3/index.d.ts +0 -1
  53. package/dist/esm/v2/components/or-select-v3/index.js +2 -2
  54. package/dist/esm/v2/components/or-select-v3/types.d.ts +1 -1
  55. package/dist/esm/v2/index.js +5 -6
  56. package/dist/esm/v3/{OrButton-0fa67a0d.js → OrButton-bb6bf8a9.js} +2 -11
  57. package/dist/esm/v3/{OrCardCollection-286d0f3f.js → OrCardCollection-2a6514f3.js} +1 -1
  58. package/dist/esm/v3/{OrConfirm-56ae1494.js → OrConfirm-5d56cbd3.js} +1 -1
  59. package/dist/esm/v3/{OrExpansionPanel-311e64cf.js → OrExpansionPanel-f8d7ff8d.js} +32 -5
  60. package/dist/esm/v3/{OrSelect-08bd0f60.js → OrSelect-4415b8d2.js} +10 -20
  61. package/dist/esm/v3/components/index.d.ts +0 -1
  62. package/dist/esm/v3/components/index.js +5 -6
  63. package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +0 -11
  64. package/dist/esm/v3/components/or-button-v3/index.js +1 -1
  65. package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -2
  66. package/dist/esm/v3/components/or-confirm-v3/index.js +2 -2
  67. package/dist/esm/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +22 -3
  68. package/dist/esm/v3/components/or-expansion-panel-v3/index.js +1 -1
  69. package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +14 -25
  70. package/dist/esm/v3/components/or-select-v3/index.d.ts +0 -1
  71. package/dist/esm/v3/components/or-select-v3/index.js +2 -2
  72. package/dist/esm/v3/components/or-select-v3/types.d.ts +1 -1
  73. package/dist/esm/v3/index.js +5 -6
  74. package/package.json +1 -1
  75. package/src/components/index.ts +0 -1
  76. package/src/components/or-button-v3/OrButton.stories3.ts +0 -4
  77. package/src/components/or-button-v3/OrButton.vue +0 -6
  78. package/src/components/or-button-v3/styles.ts +1 -9
  79. package/src/components/or-expansion-panel-v3/OrExpansionPanel.stories3.ts +12 -2
  80. package/src/components/or-expansion-panel-v3/OrExpansionPanel.vue +39 -3
  81. package/src/components/or-select-v3/OrSelect.vue +14 -26
  82. package/src/components/or-select-v3/index.ts +0 -1
  83. package/src/components/or-select-v3/types.ts +1 -1
  84. package/dist/bundled/v2/OrPagination-379c10b8.js +0 -308
  85. package/dist/bundled/v2/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
  86. package/dist/bundled/v2/components/or-pagination-v3/OrPagination.vue.d.ts +0 -112
  87. package/dist/bundled/v2/components/or-pagination-v3/index.d.ts +0 -2
  88. package/dist/bundled/v2/components/or-pagination-v3/index.js +0 -20
  89. package/dist/bundled/v2/components/or-pagination-v3/styles.d.ts +0 -4
  90. package/dist/bundled/v2/components/or-pagination-v3/types.d.ts +0 -4
  91. package/dist/bundled/v3/OrPagination.vue_vue_type_script_lang-c96d7cd7.js +0 -187
  92. package/dist/bundled/v3/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
  93. package/dist/bundled/v3/components/or-pagination-v3/OrPagination.vue.d.ts +0 -112
  94. package/dist/bundled/v3/components/or-pagination-v3/index.d.ts +0 -2
  95. package/dist/bundled/v3/components/or-pagination-v3/index.js +0 -22
  96. package/dist/bundled/v3/components/or-pagination-v3/styles.d.ts +0 -4
  97. package/dist/bundled/v3/components/or-pagination-v3/types.d.ts +0 -4
  98. package/dist/esm/v2/OrPagination-c0dbec6a.js +0 -308
  99. package/dist/esm/v2/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
  100. package/dist/esm/v2/components/or-pagination-v3/OrPagination.vue.d.ts +0 -112
  101. package/dist/esm/v2/components/or-pagination-v3/index.d.ts +0 -2
  102. package/dist/esm/v2/components/or-pagination-v3/index.js +0 -18
  103. package/dist/esm/v2/components/or-pagination-v3/styles.d.ts +0 -4
  104. package/dist/esm/v2/components/or-pagination-v3/types.d.ts +0 -4
  105. package/dist/esm/v3/OrPagination-a703307d.js +0 -269
  106. package/dist/esm/v3/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
  107. package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +0 -112
  108. package/dist/esm/v3/components/or-pagination-v3/index.d.ts +0 -2
  109. package/dist/esm/v3/components/or-pagination-v3/index.js +0 -17
  110. package/dist/esm/v3/components/or-pagination-v3/styles.d.ts +0 -4
  111. package/dist/esm/v3/components/or-pagination-v3/types.d.ts +0 -4
  112. package/src/components/or-pagination-v3/OrPagination.docs.mdx +0 -7
  113. package/src/components/or-pagination-v3/OrPagination.stories3.ts +0 -87
  114. package/src/components/or-pagination-v3/OrPagination.vue +0 -270
  115. package/src/components/or-pagination-v3/index.ts +0 -2
  116. package/src/components/or-pagination-v3/styles.ts +0 -38
  117. package/src/components/or-pagination-v3/types.ts +0 -4
@@ -1,269 +0,0 @@
1
- import { defineComponent, ref, computed } from 'vue-demi';
2
- import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
- import '@vueuse/core';
4
- import { s as script$1 } from './OrButton-0fa67a0d.js';
5
- import { s as script$2 } from './OrIcon-b195169c.js';
6
- import { s as script$4 } from './OrMenuItem-9da279f6.js';
7
- import { s as script$3 } from './OrMenu-840038cd.js';
8
- import './OrPopover-1075dd38.js';
9
- import { resolveComponent, openBlock, createElementBlock, mergeProps, createElementVNode, normalizeClass, createVNode, withModifiers, withCtx, Fragment, renderList, createBlock, createTextVNode, toDisplayString } from 'vue';
10
-
11
- const PaginationRoot = [
12
- // Layout
13
- 'layout-row',
14
- // Spacing
15
- 'gap-xl',
16
- // Typography
17
- 'typography-caption-regular',
18
- // Theme
19
- 'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
20
- const PaginationOffsetControl = [
21
- // Layout
22
- 'layout-row',
23
- // Spacing
24
- 'gap-md'];
25
- const PaginationLimitControl = [
26
- // Layout
27
- 'layout-row',
28
- // Spacing
29
- 'gap-sm'];
30
- const PaginationItem = [
31
- // Typography
32
- 'typography-caption-regular',
33
- // Typography (activated)
34
- 'activated:typography-caption-bold'];
35
-
36
- var script = defineComponent({
37
- name: 'OrPagination',
38
- components: {
39
- OrButton: script$1,
40
- OrIcon: script$2,
41
- OrMenu: script$3,
42
- OrMenuItem: script$4
43
- },
44
- inheritAttrs: false,
45
- props: {
46
- modelValue: {
47
- type: Object,
48
- default: undefined
49
- },
50
- value: {
51
- type: Object,
52
- default: undefined
53
- },
54
- length: {
55
- type: Number,
56
- required: true
57
- },
58
- pageSizeOptions: {
59
- type: Array,
60
- default: () => [50, 20, 10, 5]
61
- }
62
- },
63
- emits: ['update:modelValue', 'input'],
64
- expose: ['root'],
65
- setup(props, context) {
66
- // Refs
67
- const root = ref();
68
- const limitButton = ref();
69
- const limitButtonRoot = computed(() => {
70
- var _a;
71
- return (_a = limitButton.value) === null || _a === void 0 ? void 0 : _a.root;
72
- });
73
- const limitMenu = ref();
74
- const limitMenuRoot = computed(() => {
75
- var _a;
76
- return (_a = limitMenu.value) === null || _a === void 0 ? void 0 : _a.root;
77
- });
78
- // Styles
79
- const classAttribute = useClassAttribute();
80
- const rootStyles = computed(() => ['or-pagination', ...PaginationRoot, classAttribute.value]);
81
- const offsetControlStyles = computed(() => [...PaginationOffsetControl]);
82
- const limitControlStyles = computed(() => [...PaginationLimitControl]);
83
- const itemStyles = computed(() => [...PaginationItem]);
84
- // State
85
- const proxyModelValue = computed({
86
- get: () => {
87
- var _a;
88
- return (_a = props.modelValue) !== null && _a !== void 0 ? _a : props.value; // TODO: Remove Vue 2 fallback
89
- },
90
-
91
- set: value => {
92
- context.emit('input', value);
93
- context.emit('update:modelValue', value);
94
- }
95
- });
96
- const currentLimit = computed({
97
- get: () => {
98
- var _a, _b;
99
- return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.limit) !== null && _b !== void 0 ? _b : props.pageSizeOptions[0];
100
- },
101
- set: value => {
102
- proxyModelValue.value = {
103
- limit: value,
104
- offset: 0
105
- };
106
- }
107
- });
108
- const currentOffset = computed({
109
- get: () => {
110
- var _a, _b;
111
- return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.offset) !== null && _b !== void 0 ? _b : 0;
112
- },
113
- set: value => {
114
- proxyModelValue.value = {
115
- limit: currentLimit.value,
116
- offset: value
117
- };
118
- }
119
- });
120
- const currentPage = computed({
121
- get: () => {
122
- return Math.floor(currentOffset.value / currentLimit.value) + 1;
123
- },
124
- set: value => {
125
- currentOffset.value = (value - 1) * currentLimit.value;
126
- }
127
- });
128
- const firstPage = computed(() => {
129
- return 1;
130
- });
131
- const lastPage = computed(() => {
132
- return Math.ceil(props.length / currentLimit.value);
133
- });
134
- const buttonGroup = computed(() => {
135
- return Array.from({
136
- length: lastPage.value
137
- }, (_, index) => index + 1).map(page => {
138
- switch (true) {
139
- case page > firstPage.value && page < currentPage.value - 1:
140
- case page > currentPage.value + 1 && page < lastPage.value:
141
- return '…';
142
- default:
143
- return page;
144
- }
145
- }).reduce((accumulator, page) => {
146
- if (accumulator[accumulator.length - 1] === page) {
147
- return accumulator;
148
- }
149
- return [...accumulator, page];
150
- }, []);
151
- });
152
- // Functions
153
- function toPreviousPage() {
154
- currentPage.value = currentPage.value - 1;
155
- }
156
- function toNextPage() {
157
- currentPage.value = currentPage.value + 1;
158
- }
159
- function toPage(page) {
160
- currentPage.value = page;
161
- }
162
- return {
163
- root,
164
- limitButton,
165
- limitButtonRoot,
166
- limitMenu,
167
- limitMenuRoot,
168
- rootStyles,
169
- offsetControlStyles,
170
- limitControlStyles,
171
- itemStyles,
172
- proxyModelValue,
173
- currentLimit,
174
- currentOffset,
175
- currentPage,
176
- firstPage,
177
- lastPage,
178
- buttonGroup,
179
- toPreviousPage,
180
- toNextPage,
181
- toPage
182
- };
183
- }
184
- });
185
-
186
- function render(_ctx, _cache, $props, $setup, $data, $options) {
187
- const _component_OrIcon = resolveComponent("OrIcon");
188
- const _component_OrButton = resolveComponent("OrButton");
189
- const _component_OrMenuItem = resolveComponent("OrMenuItem");
190
- const _component_OrMenu = resolveComponent("OrMenu");
191
- return openBlock(), createElementBlock("div", mergeProps({
192
- ref: "root"
193
- }, _ctx.$attrs, {
194
- class: _ctx.rootStyles
195
- }), [createElementVNode("div", {
196
- class: normalizeClass(_ctx.offsetControlStyles)
197
- }, [createVNode(_component_OrButton, {
198
- class: normalizeClass(_ctx.itemStyles),
199
- variant: 'link',
200
- color: 'inherit',
201
- disabled: _ctx.currentPage === _ctx.firstPage,
202
- onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.toPreviousPage(), ["stop"]))
203
- }, {
204
- default: withCtx(() => [createVNode(_component_OrIcon, {
205
- icon: 'keyboard_arrow_left'
206
- })]),
207
- _: 1 /* STABLE */
208
- }, 8 /* PROPS */, ["class", "disabled"]), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.buttonGroup, (page, index) => {
209
- return openBlock(), createBlock(_component_OrButton, {
210
- key: index,
211
- class: normalizeClass(_ctx.itemStyles),
212
- variant: 'link',
213
- color: 'inherit',
214
- activated: _ctx.currentPage === page,
215
- onClick: withModifiers($event => typeof page === 'number' && _ctx.toPage(page), ["stop"])
216
- }, {
217
- default: withCtx(() => [createTextVNode(toDisplayString(page), 1 /* TEXT */)]),
218
-
219
- _: 2 /* DYNAMIC */
220
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "activated", "onClick"]);
221
- }), 128 /* KEYED_FRAGMENT */)), createVNode(_component_OrButton, {
222
- class: normalizeClass(_ctx.itemStyles),
223
- variant: 'link',
224
- color: 'inherit',
225
- disabled: _ctx.currentPage === _ctx.lastPage,
226
- onClick: _cache[1] || (_cache[1] = withModifiers($event => _ctx.toNextPage(), ["stop"]))
227
- }, {
228
- default: withCtx(() => [createVNode(_component_OrIcon, {
229
- icon: 'keyboard_arrow_right'
230
- })]),
231
- _: 1 /* STABLE */
232
- }, 8 /* PROPS */, ["class", "disabled"])], 2 /* CLASS */), createElementVNode("div", {
233
- class: normalizeClass(_ctx.limitControlStyles)
234
- }, [createTextVNode(" Per page: "), createVNode(_component_OrButton, {
235
- ref: "limitButton",
236
- class: normalizeClass(_ctx.itemStyles),
237
- variant: 'link',
238
- color: 'inherit',
239
- activated: true,
240
- onClick: _cache[2] || (_cache[2] = withModifiers($event => _ctx.limitMenu.open(), ["stop"]))
241
- }, {
242
- default: withCtx(() => [createTextVNode(toDisplayString(_ctx.currentLimit) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
243
- icon: 'arrow_drop_down'
244
- })]),
245
- _: 1 /* STABLE */
246
- }, 8 /* PROPS */, ["class"]), createVNode(_component_OrMenu, {
247
- ref: "limitMenu",
248
- trigger: _ctx.limitButtonRoot,
249
- placement: 'top'
250
- }, {
251
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.pageSizeOptions, pageSize => {
252
- return openBlock(), createBlock(_component_OrMenuItem, {
253
- key: pageSize,
254
- onClick: withModifiers($event => _ctx.currentLimit = pageSize, ["stop"])
255
- }, {
256
- default: withCtx(() => [createTextVNode(toDisplayString(pageSize), 1 /* TEXT */)]),
257
-
258
- _: 2 /* DYNAMIC */
259
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
260
- }), 128 /* KEYED_FRAGMENT */))]),
261
-
262
- _: 1 /* STABLE */
263
- }, 8 /* PROPS */, ["trigger"])], 2 /* CLASS */)], 16 /* FULL_PROPS */);
264
- }
265
-
266
- script.render = render;
267
- script.__file = "src/components/or-pagination-v3/OrPagination.vue";
268
-
269
- export { script as s };
@@ -1,12 +0,0 @@
1
- import { Meta, StoryFn } from '@storybook/vue3';
2
- declare const _default: Meta<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, {
3
- [x: string]: ((...args: any[]) => any) | null;
4
- } | string[], {} & {}, {
5
- [x: number]: string;
6
- } | {}, true>)>;
7
- export default _default;
8
- export declare const Default: StoryFn<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, {
9
- [x: string]: ((...args: any[]) => any) | null;
10
- } | string[], {} & {}, {
11
- [x: number]: string;
12
- } | {}, true>)>;
@@ -1,112 +0,0 @@
1
- import { PropType } from 'vue-demi';
2
- import { PaginationModel } from './types';
3
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
4
- root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
5
- limitButton: import("@vue/composition-api").Ref<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
- limitButtonRoot: import("@vue/composition-api").ComputedRef<undefined>;
11
- limitMenu: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
12
- [x: string]: ((...args: any[]) => any) | null;
13
- } | string[], {} & {}, {
14
- [x: number]: string;
15
- } | {}, true> | undefined>;
16
- limitMenuRoot: import("@vue/composition-api").ComputedRef<undefined>;
17
- rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
18
- offsetControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
19
- limitControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
20
- itemStyles: import("@vue/composition-api").ComputedRef<string[]>;
21
- proxyModelValue: import("@vue/composition-api").WritableComputedRef<PaginationModel>;
22
- currentLimit: import("@vue/composition-api").WritableComputedRef<number>;
23
- currentOffset: import("@vue/composition-api").WritableComputedRef<number>;
24
- currentPage: import("@vue/composition-api").WritableComputedRef<number>;
25
- firstPage: import("@vue/composition-api").ComputedRef<number>;
26
- lastPage: import("@vue/composition-api").ComputedRef<number>;
27
- buttonGroup: import("@vue/composition-api").ComputedRef<(string | number)[]>;
28
- toPreviousPage: () => void;
29
- toNextPage: () => void;
30
- toPage: (page: number) => void;
31
- }> & import("@vue/composition-api").Data, {}, {}, {
32
- modelValue: {
33
- type: PropType<PaginationModel>;
34
- default: undefined;
35
- };
36
- value: {
37
- type: PropType<PaginationModel>;
38
- default: undefined;
39
- };
40
- length: {
41
- type: NumberConstructor;
42
- required: true;
43
- };
44
- pageSizeOptions: {
45
- type: PropType<number[]>;
46
- default: () => number[];
47
- };
48
- }, import("@vue/composition-api").ExtractPropTypes<{
49
- modelValue: {
50
- type: PropType<PaginationModel>;
51
- default: undefined;
52
- };
53
- value: {
54
- type: PropType<PaginationModel>;
55
- default: undefined;
56
- };
57
- length: {
58
- type: NumberConstructor;
59
- required: true;
60
- };
61
- pageSizeOptions: {
62
- type: PropType<number[]>;
63
- default: () => number[];
64
- };
65
- }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
66
- length: number;
67
- modelValue: PaginationModel;
68
- value: PaginationModel;
69
- pageSizeOptions: number[];
70
- } & {} & {
71
- [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
72
- }, import("@vue/composition-api").ShallowUnwrapRef<{
73
- root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
74
- limitButton: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
75
- [x: string]: ((...args: any[]) => any) | null;
76
- } | string[], {} & {}, {
77
- [x: number]: string;
78
- } | {}, true> | undefined>;
79
- limitButtonRoot: import("@vue/composition-api").ComputedRef<undefined>;
80
- limitMenu: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
81
- [x: string]: ((...args: any[]) => any) | null;
82
- } | string[], {} & {}, {
83
- [x: number]: string;
84
- } | {}, true> | undefined>;
85
- limitMenuRoot: import("@vue/composition-api").ComputedRef<undefined>;
86
- rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
87
- offsetControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
88
- limitControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
89
- itemStyles: import("@vue/composition-api").ComputedRef<string[]>;
90
- proxyModelValue: import("@vue/composition-api").WritableComputedRef<PaginationModel>;
91
- currentLimit: import("@vue/composition-api").WritableComputedRef<number>;
92
- currentOffset: import("@vue/composition-api").WritableComputedRef<number>;
93
- currentPage: import("@vue/composition-api").WritableComputedRef<number>;
94
- firstPage: import("@vue/composition-api").ComputedRef<number>;
95
- lastPage: import("@vue/composition-api").ComputedRef<number>;
96
- buttonGroup: import("@vue/composition-api").ComputedRef<(string | number)[]>;
97
- toPreviousPage: () => void;
98
- toNextPage: () => void;
99
- toPage: (page: number) => void;
100
- }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
101
- length: number;
102
- modelValue: PaginationModel;
103
- value: PaginationModel;
104
- pageSizeOptions: number[];
105
- } & {} & {
106
- [x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
107
- }, {
108
- modelValue: PaginationModel;
109
- value: PaginationModel;
110
- pageSizeOptions: number[];
111
- }, true>);
112
- export default _default;
@@ -1,2 +0,0 @@
1
- export { default as OrPaginationV3 } from './OrPagination.vue';
2
- export * from './types';
@@ -1,17 +0,0 @@
1
- export { s as OrPaginationV3 } from '../../OrPagination-a703307d.js';
2
- import 'vue-demi';
3
- import '../../useClassAttribute-47fdb016.js';
4
- import '@vueuse/core';
5
- import '../../OrButton-0fa67a0d.js';
6
- import '../../OrLoader-b3cf4231.js';
7
- import 'vue';
8
- import '../../OrIcon-b195169c.js';
9
- import '../../OrMenuItem-9da279f6.js';
10
- import '../../OrMenu-840038cd.js';
11
- import '../../OrPopover-1075dd38.js';
12
- import '@floating-ui/dom';
13
- import '../../useElevation-31bfe1f6.js';
14
- import '../../useResponsive-a02e95b7.js';
15
- import '../../OrBottomSheet-62817aec.js';
16
- import '../../OrOverlay-738a44d5.js';
17
- import '../../OrTeleport.vue3-8099178c.js';
@@ -1,4 +0,0 @@
1
- export declare const PaginationRoot: string[];
2
- export declare const PaginationOffsetControl: string[];
3
- export declare const PaginationLimitControl: string[];
4
- export declare const PaginationItem: string[];
@@ -1,4 +0,0 @@
1
- export interface PaginationModel {
2
- limit: number;
3
- offset: number;
4
- }
@@ -1,7 +0,0 @@
1
- import { DocsPage } from '@storybook/addon-docs';
2
-
3
- ```ts
4
- import { OrPaginationV3 as OrPagination } from '@onereach/ui-components';
5
- ```
6
-
7
- <DocsPage />
@@ -1,87 +0,0 @@
1
- import { action } from '@storybook/addon-actions';
2
- import { Meta, StoryFn } from '@storybook/vue3';
3
- import { ref, watch } from 'vue-demi';
4
- import OrPaginationDocs from './OrPagination.docs.mdx';
5
- import OrPagination from './OrPagination.vue';
6
- import { PaginationModel } from './types';
7
-
8
- export default {
9
- title: 'Components/Pagination',
10
- component: OrPagination,
11
-
12
- argTypes: {
13
- // Props
14
- modelValue: {
15
- control: { type: 'text' },
16
- },
17
-
18
- value: { // TODO: Remove Vue 2 fallback
19
- table: { disable: true },
20
- },
21
-
22
- length: {
23
- control: { type: 'number' },
24
- },
25
-
26
- // Events
27
- 'update:modelValue': {
28
- table: { disable: true },
29
- },
30
-
31
- input: {
32
- table: { disable: true },
33
- },
34
- },
35
-
36
- parameters: {
37
- layout: 'centered',
38
-
39
- docs: {
40
- page: OrPaginationDocs,
41
- },
42
-
43
- design: {
44
- type: 'figma',
45
- url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=4063%3A35218&t=axoGLEPrByClXTTU-4',
46
- },
47
- },
48
- } as Meta<typeof OrPagination>;
49
-
50
- const Template: StoryFn<typeof OrPagination> = (args) => ({
51
- components: {
52
- OrPagination,
53
- },
54
-
55
- setup() {
56
- // State
57
- const model = ref<PaginationModel>();
58
-
59
- // Effects
60
- watch(model, (value) => {
61
- console.debug(value);
62
- });
63
-
64
- return {
65
- args,
66
- model,
67
- onUpdateModelValue: action('update:modelValue'),
68
- onInput: action('input'),
69
- };
70
- },
71
-
72
- template: `
73
- <OrPagination
74
- v-model="model"
75
- v-bind="args"
76
- @update:modelValue="onUpdateModelValue"
77
- @input="onInput"
78
- />
79
- `,
80
- });
81
-
82
- export const Default = Template.bind({});
83
-
84
- Default.args = {
85
- // Props
86
- length: 555,
87
- };