@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.
- package/dist/bundled/v2/{OrButton-a846fa7e.js → OrButton-4b99c680.js} +1 -10
- package/dist/bundled/v2/{OrCardCollection-15d11d05.js → OrCardCollection-c4209a92.js} +1 -1
- package/dist/bundled/v2/{OrConfirm-ec3feaf5.js → OrConfirm-cab6535b.js} +1 -1
- package/dist/bundled/v2/{OrExpansionPanel-995caa85.js → OrExpansionPanel-d9a260e2.js} +32 -5
- package/dist/bundled/v2/{OrSelect-8a4d227e.js → OrSelect-9658e0f2.js} +9 -16
- package/dist/bundled/v2/components/index.d.ts +0 -1
- package/dist/bundled/v2/components/index.js +5 -6
- package/dist/bundled/v2/components/or-button-v3/OrButton.vue.d.ts +0 -11
- package/dist/bundled/v2/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +22 -3
- package/dist/bundled/v2/components/or-expansion-panel-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-select-v3/OrSelect.vue.d.ts +14 -25
- package/dist/bundled/v2/components/or-select-v3/index.d.ts +0 -1
- package/dist/bundled/v2/components/or-select-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-select-v3/types.d.ts +1 -1
- package/dist/bundled/v2/index.js +6 -7
- package/dist/bundled/v3/{OrButton-2b27c1fd.js → OrButton-a671b8a1.js} +2 -3
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-8c44986c.js → OrButton.vue_vue_type_script_lang-b0dc31ca.js} +1 -9
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-bd852915.js → OrCardCollection.vue_vue_type_script_lang-9a2ae9a3.js} +2 -2
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-9e4e2884.js → OrConfirm.vue_vue_type_script_lang-f57ffa1a.js} +2 -2
- package/dist/bundled/v3/{OrExpansionPanel.vue_vue_type_script_lang-7f9c6721.js → OrExpansionPanel.vue_vue_type_script_lang-5360f580.js} +31 -4
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-94063fc4.js → OrSelect.vue_vue_type_script_lang-359d1a58.js} +4 -8
- package/dist/bundled/v3/components/index.d.ts +0 -1
- package/dist/bundled/v3/components/index.js +6 -7
- package/dist/bundled/v3/components/or-button-v3/OrButton.vue.d.ts +0 -11
- package/dist/bundled/v3/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-confirm-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +22 -3
- package/dist/bundled/v3/components/or-expansion-panel-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-select-v3/OrSelect.vue.d.ts +14 -25
- package/dist/bundled/v3/components/or-select-v3/index.d.ts +0 -1
- package/dist/bundled/v3/components/or-select-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-select-v3/types.d.ts +1 -1
- package/dist/bundled/v3/index.js +163 -254
- package/dist/esm/v2/{OrButton-835d4f11.js → OrButton-357e1e2c.js} +1 -10
- package/dist/esm/v2/{OrCardCollection-024cfba9.js → OrCardCollection-57d11adf.js} +1 -1
- package/dist/esm/v2/{OrConfirm-5e8dd4b6.js → OrConfirm-ec7aef0e.js} +1 -1
- package/dist/esm/v2/{OrExpansionPanel-968ddc61.js → OrExpansionPanel-a123024e.js} +32 -5
- package/dist/esm/v2/{OrSelect-641184f0.js → OrSelect-7a2f6001.js} +9 -16
- package/dist/esm/v2/components/index.d.ts +0 -1
- package/dist/esm/v2/components/index.js +5 -6
- package/dist/esm/v2/components/or-button-v3/OrButton.vue.d.ts +0 -11
- package/dist/esm/v2/components/or-button-v3/index.js +1 -1
- package/dist/esm/v2/components/or-card-collection-v3/index.js +2 -2
- package/dist/esm/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/esm/v2/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +22 -3
- package/dist/esm/v2/components/or-expansion-panel-v3/index.js +1 -1
- package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +14 -25
- package/dist/esm/v2/components/or-select-v3/index.d.ts +0 -1
- package/dist/esm/v2/components/or-select-v3/index.js +2 -2
- package/dist/esm/v2/components/or-select-v3/types.d.ts +1 -1
- package/dist/esm/v2/index.js +5 -6
- package/dist/esm/v3/{OrButton-0fa67a0d.js → OrButton-bb6bf8a9.js} +2 -11
- package/dist/esm/v3/{OrCardCollection-286d0f3f.js → OrCardCollection-2a6514f3.js} +1 -1
- package/dist/esm/v3/{OrConfirm-56ae1494.js → OrConfirm-5d56cbd3.js} +1 -1
- package/dist/esm/v3/{OrExpansionPanel-311e64cf.js → OrExpansionPanel-f8d7ff8d.js} +32 -5
- package/dist/esm/v3/{OrSelect-08bd0f60.js → OrSelect-4415b8d2.js} +10 -20
- package/dist/esm/v3/components/index.d.ts +0 -1
- package/dist/esm/v3/components/index.js +5 -6
- package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +0 -11
- package/dist/esm/v3/components/or-button-v3/index.js +1 -1
- package/dist/esm/v3/components/or-card-collection-v3/index.js +2 -2
- package/dist/esm/v3/components/or-confirm-v3/index.js +2 -2
- package/dist/esm/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +22 -3
- package/dist/esm/v3/components/or-expansion-panel-v3/index.js +1 -1
- package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +14 -25
- package/dist/esm/v3/components/or-select-v3/index.d.ts +0 -1
- package/dist/esm/v3/components/or-select-v3/index.js +2 -2
- package/dist/esm/v3/components/or-select-v3/types.d.ts +1 -1
- package/dist/esm/v3/index.js +5 -6
- package/package.json +1 -1
- package/src/components/index.ts +0 -1
- package/src/components/or-button-v3/OrButton.stories3.ts +0 -4
- package/src/components/or-button-v3/OrButton.vue +0 -6
- package/src/components/or-button-v3/styles.ts +1 -9
- package/src/components/or-expansion-panel-v3/OrExpansionPanel.stories3.ts +12 -2
- package/src/components/or-expansion-panel-v3/OrExpansionPanel.vue +39 -3
- package/src/components/or-select-v3/OrSelect.vue +14 -26
- package/src/components/or-select-v3/index.ts +0 -1
- package/src/components/or-select-v3/types.ts +1 -1
- package/dist/bundled/v2/OrPagination-379c10b8.js +0 -308
- package/dist/bundled/v2/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
- package/dist/bundled/v2/components/or-pagination-v3/OrPagination.vue.d.ts +0 -112
- package/dist/bundled/v2/components/or-pagination-v3/index.d.ts +0 -2
- package/dist/bundled/v2/components/or-pagination-v3/index.js +0 -20
- package/dist/bundled/v2/components/or-pagination-v3/styles.d.ts +0 -4
- package/dist/bundled/v2/components/or-pagination-v3/types.d.ts +0 -4
- package/dist/bundled/v3/OrPagination.vue_vue_type_script_lang-c96d7cd7.js +0 -187
- package/dist/bundled/v3/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
- package/dist/bundled/v3/components/or-pagination-v3/OrPagination.vue.d.ts +0 -112
- package/dist/bundled/v3/components/or-pagination-v3/index.d.ts +0 -2
- package/dist/bundled/v3/components/or-pagination-v3/index.js +0 -22
- package/dist/bundled/v3/components/or-pagination-v3/styles.d.ts +0 -4
- package/dist/bundled/v3/components/or-pagination-v3/types.d.ts +0 -4
- package/dist/esm/v2/OrPagination-c0dbec6a.js +0 -308
- package/dist/esm/v2/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
- package/dist/esm/v2/components/or-pagination-v3/OrPagination.vue.d.ts +0 -112
- package/dist/esm/v2/components/or-pagination-v3/index.d.ts +0 -2
- package/dist/esm/v2/components/or-pagination-v3/index.js +0 -18
- package/dist/esm/v2/components/or-pagination-v3/styles.d.ts +0 -4
- package/dist/esm/v2/components/or-pagination-v3/types.d.ts +0 -4
- package/dist/esm/v3/OrPagination-a703307d.js +0 -269
- package/dist/esm/v3/components/or-pagination-v3/OrPagination.stories3.d.ts +0 -12
- package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +0 -112
- package/dist/esm/v3/components/or-pagination-v3/index.d.ts +0 -2
- package/dist/esm/v3/components/or-pagination-v3/index.js +0 -17
- package/dist/esm/v3/components/or-pagination-v3/styles.d.ts +0 -4
- package/dist/esm/v3/components/or-pagination-v3/types.d.ts +0 -4
- package/src/components/or-pagination-v3/OrPagination.docs.mdx +0 -7
- package/src/components/or-pagination-v3/OrPagination.stories3.ts +0 -87
- package/src/components/or-pagination-v3/OrPagination.vue +0 -270
- package/src/components/or-pagination-v3/index.ts +0 -2
- package/src/components/or-pagination-v3/styles.ts +0 -38
- package/src/components/or-pagination-v3/types.ts +0 -4
|
@@ -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,20 +0,0 @@
|
|
|
1
|
-
export { _ as OrPaginationV3 } from '../../OrPagination-379c10b8.js';
|
|
2
|
-
import '../../index-fa6eb4ca.js';
|
|
3
|
-
import 'vue';
|
|
4
|
-
import '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
5
|
-
import '../../OrButton-a846fa7e.js';
|
|
6
|
-
import '../../OrLoader-6a1f937b.js';
|
|
7
|
-
import '../../useClassAttribute-9bf33346.js';
|
|
8
|
-
import '../../normalize-component-6e8e3d80.js';
|
|
9
|
-
import '../../OrIcon-8625385f.js';
|
|
10
|
-
import '../../OrMenu-fa47c888.js';
|
|
11
|
-
import '../../OrPopover-5dc240f1.js';
|
|
12
|
-
import '../../floating-ui.dom.esm-83eba816.js';
|
|
13
|
-
import '@vueuse/core';
|
|
14
|
-
import '../../OrBottomSheet-1cd1ab4c.js';
|
|
15
|
-
import '../../OrOverlay-3c89d622.js';
|
|
16
|
-
import '../../OrTeleport.vue2-e9ba3054.js';
|
|
17
|
-
import 'portal-vue';
|
|
18
|
-
import '../../useElevation-aac032f4.js';
|
|
19
|
-
import '../../useResponsive-e13dfbb0.js';
|
|
20
|
-
import '../../OrMenuItem-26420908.js';
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed } from 'vue';
|
|
2
|
-
import './OrButton-2b27c1fd.js';
|
|
3
|
-
import './OrIcon-d878b768.js';
|
|
4
|
-
import './OrMenu-f26e8e55.js';
|
|
5
|
-
import './OrMenuItem-4feaba6c.js';
|
|
6
|
-
import { u as useClassAttribute } from './useClassAttribute-00888f78.js';
|
|
7
|
-
import { s as script$1 } from './OrButton.vue_vue_type_script_lang-8c44986c.js';
|
|
8
|
-
import { s as script$2 } from './OrIcon.vue_vue_type_script_lang-a119a715.js';
|
|
9
|
-
import { s as script$3 } from './OrMenu.vue_vue_type_script_lang-2446a69a.js';
|
|
10
|
-
import { s as script$4 } from './OrMenuItem.vue_vue_type_script_lang-0ffaef05.js';
|
|
11
|
-
|
|
12
|
-
const PaginationRoot = [
|
|
13
|
-
// Layout
|
|
14
|
-
'layout-row',
|
|
15
|
-
// Spacing
|
|
16
|
-
'gap-xl',
|
|
17
|
-
// Typography
|
|
18
|
-
'typography-caption-regular',
|
|
19
|
-
// Theme
|
|
20
|
-
'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
|
|
21
|
-
const PaginationOffsetControl = [
|
|
22
|
-
// Layout
|
|
23
|
-
'layout-row',
|
|
24
|
-
// Spacing
|
|
25
|
-
'gap-md'];
|
|
26
|
-
const PaginationLimitControl = [
|
|
27
|
-
// Layout
|
|
28
|
-
'layout-row',
|
|
29
|
-
// Spacing
|
|
30
|
-
'gap-sm'];
|
|
31
|
-
const PaginationItem = [
|
|
32
|
-
// Typography
|
|
33
|
-
'typography-caption-regular',
|
|
34
|
-
// Typography (activated)
|
|
35
|
-
'activated:typography-caption-bold'];
|
|
36
|
-
|
|
37
|
-
var script = defineComponent({
|
|
38
|
-
name: 'OrPagination',
|
|
39
|
-
components: {
|
|
40
|
-
OrButton: script$1,
|
|
41
|
-
OrIcon: script$2,
|
|
42
|
-
OrMenu: script$3,
|
|
43
|
-
OrMenuItem: script$4
|
|
44
|
-
},
|
|
45
|
-
inheritAttrs: false,
|
|
46
|
-
props: {
|
|
47
|
-
modelValue: {
|
|
48
|
-
type: Object,
|
|
49
|
-
default: undefined
|
|
50
|
-
},
|
|
51
|
-
value: {
|
|
52
|
-
type: Object,
|
|
53
|
-
default: undefined
|
|
54
|
-
},
|
|
55
|
-
length: {
|
|
56
|
-
type: Number,
|
|
57
|
-
required: true
|
|
58
|
-
},
|
|
59
|
-
pageSizeOptions: {
|
|
60
|
-
type: Array,
|
|
61
|
-
default: () => [50, 20, 10, 5]
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
emits: ['update:modelValue', 'input'],
|
|
65
|
-
expose: ['root'],
|
|
66
|
-
setup(props, context) {
|
|
67
|
-
// Refs
|
|
68
|
-
const root = ref();
|
|
69
|
-
const limitButton = ref();
|
|
70
|
-
const limitButtonRoot = computed(() => {
|
|
71
|
-
var _a;
|
|
72
|
-
return (_a = limitButton.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
73
|
-
});
|
|
74
|
-
const limitMenu = ref();
|
|
75
|
-
const limitMenuRoot = computed(() => {
|
|
76
|
-
var _a;
|
|
77
|
-
return (_a = limitMenu.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
78
|
-
});
|
|
79
|
-
// Styles
|
|
80
|
-
const classAttribute = useClassAttribute();
|
|
81
|
-
const rootStyles = computed(() => ['or-pagination', ...PaginationRoot, classAttribute.value]);
|
|
82
|
-
const offsetControlStyles = computed(() => [...PaginationOffsetControl]);
|
|
83
|
-
const limitControlStyles = computed(() => [...PaginationLimitControl]);
|
|
84
|
-
const itemStyles = computed(() => [...PaginationItem]);
|
|
85
|
-
// State
|
|
86
|
-
const proxyModelValue = computed({
|
|
87
|
-
get: () => {
|
|
88
|
-
var _a;
|
|
89
|
-
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : props.value; // TODO: Remove Vue 2 fallback
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
set: value => {
|
|
93
|
-
context.emit('input', value);
|
|
94
|
-
context.emit('update:modelValue', value);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
const currentLimit = computed({
|
|
98
|
-
get: () => {
|
|
99
|
-
var _a, _b;
|
|
100
|
-
return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.limit) !== null && _b !== void 0 ? _b : props.pageSizeOptions[0];
|
|
101
|
-
},
|
|
102
|
-
set: value => {
|
|
103
|
-
proxyModelValue.value = {
|
|
104
|
-
limit: value,
|
|
105
|
-
offset: 0
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
const currentOffset = computed({
|
|
110
|
-
get: () => {
|
|
111
|
-
var _a, _b;
|
|
112
|
-
return (_b = (_a = proxyModelValue.value) === null || _a === void 0 ? void 0 : _a.offset) !== null && _b !== void 0 ? _b : 0;
|
|
113
|
-
},
|
|
114
|
-
set: value => {
|
|
115
|
-
proxyModelValue.value = {
|
|
116
|
-
limit: currentLimit.value,
|
|
117
|
-
offset: value
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
const currentPage = computed({
|
|
122
|
-
get: () => {
|
|
123
|
-
return Math.floor(currentOffset.value / currentLimit.value) + 1;
|
|
124
|
-
},
|
|
125
|
-
set: value => {
|
|
126
|
-
currentOffset.value = (value - 1) * currentLimit.value;
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
const firstPage = computed(() => {
|
|
130
|
-
return 1;
|
|
131
|
-
});
|
|
132
|
-
const lastPage = computed(() => {
|
|
133
|
-
return Math.ceil(props.length / currentLimit.value);
|
|
134
|
-
});
|
|
135
|
-
const buttonGroup = computed(() => {
|
|
136
|
-
return Array.from({
|
|
137
|
-
length: lastPage.value
|
|
138
|
-
}, (_, index) => index + 1).map(page => {
|
|
139
|
-
switch (true) {
|
|
140
|
-
case page > firstPage.value && page < currentPage.value - 1:
|
|
141
|
-
case page > currentPage.value + 1 && page < lastPage.value:
|
|
142
|
-
return '…';
|
|
143
|
-
default:
|
|
144
|
-
return page;
|
|
145
|
-
}
|
|
146
|
-
}).reduce((accumulator, page) => {
|
|
147
|
-
if (accumulator[accumulator.length - 1] === page) {
|
|
148
|
-
return accumulator;
|
|
149
|
-
}
|
|
150
|
-
return [...accumulator, page];
|
|
151
|
-
}, []);
|
|
152
|
-
});
|
|
153
|
-
// Functions
|
|
154
|
-
function toPreviousPage() {
|
|
155
|
-
currentPage.value = currentPage.value - 1;
|
|
156
|
-
}
|
|
157
|
-
function toNextPage() {
|
|
158
|
-
currentPage.value = currentPage.value + 1;
|
|
159
|
-
}
|
|
160
|
-
function toPage(page) {
|
|
161
|
-
currentPage.value = page;
|
|
162
|
-
}
|
|
163
|
-
return {
|
|
164
|
-
root,
|
|
165
|
-
limitButton,
|
|
166
|
-
limitButtonRoot,
|
|
167
|
-
limitMenu,
|
|
168
|
-
limitMenuRoot,
|
|
169
|
-
rootStyles,
|
|
170
|
-
offsetControlStyles,
|
|
171
|
-
limitControlStyles,
|
|
172
|
-
itemStyles,
|
|
173
|
-
proxyModelValue,
|
|
174
|
-
currentLimit,
|
|
175
|
-
currentOffset,
|
|
176
|
-
currentPage,
|
|
177
|
-
firstPage,
|
|
178
|
-
lastPage,
|
|
179
|
-
buttonGroup,
|
|
180
|
-
toPreviousPage,
|
|
181
|
-
toNextPage,
|
|
182
|
-
toPage
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
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,22 +0,0 @@
|
|
|
1
|
-
export { s as OrPaginationV3 } from '../../OrPagination.vue_vue_type_script_lang-c96d7cd7.js';
|
|
2
|
-
import 'vue';
|
|
3
|
-
import '../../OrButton-2b27c1fd.js';
|
|
4
|
-
import '../../OrButton.vue_vue_type_script_lang-8c44986c.js';
|
|
5
|
-
import '../../OrLoader-c4bbef2f.js';
|
|
6
|
-
import '../../OrLoader.vue_vue_type_script_lang-5405040c.js';
|
|
7
|
-
import '../../useClassAttribute-00888f78.js';
|
|
8
|
-
import '../../OrIcon-d878b768.js';
|
|
9
|
-
import '../../OrIcon.vue_vue_type_script_lang-a119a715.js';
|
|
10
|
-
import '../../OrMenu-f26e8e55.js';
|
|
11
|
-
import '../../OrMenu.vue_vue_type_script_lang-2446a69a.js';
|
|
12
|
-
import '../../OrPopover-c462ce77.js';
|
|
13
|
-
import '../../OrPopover.vue_vue_type_script_lang-54c7b11c.js';
|
|
14
|
-
import '../../floating-ui.dom.esm-83eba816.js';
|
|
15
|
-
import '@vueuse/core';
|
|
16
|
-
import '../../OrBottomSheet.vue_vue_type_script_lang-6fb49de9.js';
|
|
17
|
-
import '../../OrOverlay.vue_vue_type_script_lang-cb3aad0c.js';
|
|
18
|
-
import '../../OrTeleport.vue3.vue_vue_type_script_lang-4dc70cf1.js';
|
|
19
|
-
import '../../useElevation-c8d5d3ba.js';
|
|
20
|
-
import '../../useResponsive-9d397e2a.js';
|
|
21
|
-
import '../../OrMenuItem-4feaba6c.js';
|
|
22
|
-
import '../../OrMenuItem.vue_vue_type_script_lang-0ffaef05.js';
|