@sprawlify/vue 0.0.67 → 0.0.72
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/boolean-CpMsIRK4.js +7 -0
- package/dist/{collapsible-DQfAISmg.js → collapsible-jX9S7WYj.js} +5 -4
- package/dist/{collection-Ba0Aeh5P.js → collection-DGKjEgOz.js} +1 -1
- package/dist/components/accordion/index.d.ts +19 -19
- package/dist/components/accordion/index.js +8 -7
- package/dist/components/angle-slider/index.d.ts +18 -18
- package/dist/components/angle-slider/index.js +5 -4
- package/dist/components/avatar/index.d.ts +11 -11
- package/dist/components/avatar/index.js +5 -4
- package/dist/components/bottom-sheet/index.d.ts +22 -22
- package/dist/components/bottom-sheet/index.js +8 -7
- package/dist/components/carousel/index.d.ts +25 -25
- package/dist/components/carousel/index.js +5 -4
- package/dist/components/checkbox/index.d.ts +27 -27
- package/dist/components/checkbox/index.js +8 -12
- package/dist/components/client-only/index.d.ts +2 -2
- package/dist/components/clipboard/index.d.ts +17 -17
- package/dist/components/clipboard/index.js +5 -4
- package/dist/components/collapsible/index.d.ts +16 -16
- package/dist/components/collapsible/index.js +5 -4
- package/dist/components/collection/index.d.ts +1 -1
- package/dist/components/collection/index.js +1 -1
- package/dist/components/color-picker/index.d.ts +56 -56
- package/dist/components/color-picker/index.js +8 -7
- package/dist/components/combobox/index.d.ts +38 -38
- package/dist/components/combobox/index.js +9 -8
- package/dist/components/date-picker/index.d.ts +47 -47
- package/dist/components/date-picker/index.js +7 -6
- package/dist/components/dialog/index.d.ts +35 -35
- package/dist/components/dialog/index.js +7 -6
- package/dist/components/download-trigger/index.d.ts +4 -4
- package/dist/components/download-trigger/index.js +4 -3
- package/dist/components/editable/index.d.ts +29 -29
- package/dist/components/editable/index.js +6 -5
- package/dist/components/field/index.d.ts +25 -25
- package/dist/components/field/index.js +5 -4
- package/dist/components/fieldset/index.d.ts +13 -13
- package/dist/components/fieldset/index.js +5 -4
- package/dist/components/file-upload/index.d.ts +329 -0
- package/dist/components/file-upload/index.js +597 -0
- package/dist/components/floating-panel/index.d.ts +325 -0
- package/dist/components/floating-panel/index.js +568 -0
- package/dist/components/focus-trap/index.d.ts +48 -0
- package/dist/components/focus-trap/index.js +96 -0
- package/dist/components/format/index.d.ts +40 -0
- package/dist/components/format/index.js +148 -0
- package/dist/components/frame/index.d.ts +39 -0
- package/dist/components/frame/index.js +111 -0
- package/dist/components/highlight/index.d.ts +4 -4
- package/dist/components/highlight/index.js +1 -1
- package/dist/components/hover-card/index.d.ts +200 -0
- package/dist/components/hover-card/index.js +335 -0
- package/dist/components/image-cropper/index.d.ts +211 -0
- package/dist/components/image-cropper/index.js +381 -0
- package/dist/components/json-tree-view/index.d.ts +91 -0
- package/dist/components/json-tree-view/index.js +490 -0
- package/dist/components/listbox/index.d.ts +325 -0
- package/dist/components/listbox/index.js +533 -0
- package/dist/components/marquee/index.d.ts +268 -0
- package/dist/components/marquee/index.js +340 -0
- package/dist/components/menu/index.d.ts +55 -56
- package/dist/components/menu/index.js +7 -6
- package/dist/components/navigation-menu/index.d.ts +272 -0
- package/dist/components/navigation-menu/index.js +559 -0
- package/dist/components/number-input/index.d.ts +253 -0
- package/dist/components/number-input/index.js +427 -0
- package/dist/components/pagination/index.d.ts +211 -0
- package/dist/components/pagination/index.js +346 -0
- package/dist/components/password-input/index.d.ts +213 -0
- package/dist/components/password-input/index.js +325 -0
- package/dist/components/pin-input/index.d.ts +198 -0
- package/dist/components/pin-input/index.js +346 -0
- package/dist/components/popover/index.d.ts +318 -0
- package/dist/components/popover/index.js +486 -0
- package/dist/components/presence/index.d.ts +2 -2
- package/dist/components/presence/index.js +4 -3
- package/dist/components/progress/index.d.ts +231 -0
- package/dist/components/progress/index.js +372 -0
- package/dist/components/qr-code/index.d.ts +159 -0
- package/dist/components/qr-code/index.js +263 -0
- package/dist/components/radio-group/index.d.ts +231 -0
- package/dist/components/radio-group/index.js +378 -0
- package/dist/components/rating-group/index.d.ts +201 -0
- package/dist/components/rating-group/index.js +330 -0
- package/dist/components/scroll-area/index.d.ts +171 -0
- package/dist/components/scroll-area/index.js +264 -0
- package/dist/components/segment-group/index.d.ts +231 -0
- package/dist/components/segment-group/index.js +422 -0
- package/dist/components/select/index.d.ts +39 -39
- package/dist/components/select/index.js +9 -8
- package/dist/components/signature-pad/index.d.ts +202 -0
- package/dist/components/signature-pad/index.js +345 -0
- package/dist/components/slider/index.d.ts +300 -0
- package/dist/components/slider/index.js +511 -0
- package/dist/components/splitter/index.d.ts +162 -0
- package/dist/components/splitter/index.js +280 -0
- package/dist/components/steps/index.d.ts +290 -0
- package/dist/components/steps/index.js +469 -0
- package/dist/components/switch/index.d.ts +179 -0
- package/dist/components/switch/index.js +290 -0
- package/dist/components/tabs/index.d.ts +181 -0
- package/dist/components/tabs/index.js +335 -0
- package/dist/components/tags-input/index.d.ts +339 -0
- package/dist/components/tags-input/index.js +569 -0
- package/dist/components/timer/index.d.ts +177 -0
- package/dist/components/timer/index.js +295 -0
- package/dist/components/tree-view/index.d.ts +6 -0
- package/dist/components/tree-view/index.js +11 -0
- package/dist/create-context-Ds1GbsVc.js +16 -0
- package/dist/{field-DnHnX3Tf.js → field-CtPR24u6.js} +4 -3
- package/dist/{fieldset-DzhN7Zrg.js → fieldset-D5SznrKY.js} +4 -3
- package/dist/{index-CDQghZtv.d.ts → index-B_UiXhk3.d.ts} +11 -11
- package/dist/index-DwWFWpls.d.ts +447 -0
- package/dist/{index-BBHms9-0.d.ts → index-xb1q4_02.d.ts} +7 -7
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -2
- package/dist/{presence-CvUnYMZQ.js → presence-B4-UhJY9.js} +3 -2
- package/dist/{providers-B2CNPFg1.js → providers-DNBWT-O_.js} +1 -1
- package/dist/tree-view-Ctpu5RjE.js +737 -0
- package/dist/{use-forward-expose-4p5AGAI3.js → use-forward-expose-CCAmHTUB.js} +2 -15
- package/dist/{use-render-strategy-BkxoN6ll.js → use-render-strategy-DA33j31C.js} +1 -1
- package/package.json +126 -2
- /package/dist/{clean-props-BDv2zb5M.js → clean-props-D2R4tz5e.js} +0 -0
- /package/dist/{create-split-props-YZ3qgXe_.js → create-split-props-0RD5_O4P.js} +0 -0
- /package/dist/{factory-D_ge_w76.d.ts → factory-B5zr8_kk.d.ts} +0 -0
- /package/dist/{factory-BH3WrWd2.js → factory-Co08Aw8u.js} +0 -0
- /package/dist/{index-B66Om_3U.d.ts → index-CCRVRFFQ.d.ts} +0 -0
- /package/dist/{index-DqRk-Yea.d.ts → index-DhFoJHfp.d.ts} +0 -0
- /package/dist/{presence-types-Bv1E60Cw.d.ts → presence-types-BJRr8tqd.d.ts} +0 -0
- /package/dist/{types-Bj-dS2Hc.d.ts → types-DIEO6uP3.d.ts} +0 -0
- /package/dist/{use-render-strategy-CHj_pCfT.d.ts → use-render-strategy-U5NxU252.d.ts} +0 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { t as PolymorphicProps } from "../../factory-B5zr8_kk.js";
|
|
2
|
+
import { a as Optional, r as EmitFn$1 } from "../../types-DIEO6uP3.js";
|
|
3
|
+
import { r as PropTypes } from "../../index-CCRVRFFQ.js";
|
|
4
|
+
import * as vue262 from "vue";
|
|
5
|
+
import { ButtonHTMLAttributes, ComputedRef, HTMLAttributes, MaybeRef, SlotsType, UnwrapRef } from "vue";
|
|
6
|
+
import * as pagination from "@sprawlify/primitives/machines/pagination";
|
|
7
|
+
import { EllipsisProps, ItemLabelDetails, ItemLabelDetails as PaginationItemLabelDetails, ItemProps, PageChangeDetails, PageChangeDetails as PaginationPageChangeDetails, PageSizeChangeDetails, PageSizeChangeDetails as PaginationPageSizeChangeDetails, PageUrlDetails, PageUrlDetails as PaginationPageUrlDetails, anatomy as paginationAnatomy } from "@sprawlify/primitives/machines/pagination";
|
|
8
|
+
|
|
9
|
+
//#region src/components/pagination/pagination-ellipsis.vue.d.ts
|
|
10
|
+
interface PaginationEllipsisBaseProps extends EllipsisProps, PolymorphicProps {}
|
|
11
|
+
interface PaginationEllipsisProps extends PaginationEllipsisBaseProps,
|
|
12
|
+
/**
|
|
13
|
+
* @vue-ignore
|
|
14
|
+
*/
|
|
15
|
+
HTMLAttributes {}
|
|
16
|
+
declare const _default$1: typeof __VLS_export$8;
|
|
17
|
+
declare const __VLS_export$8: __VLS_WithSlots$8<vue262.DefineComponent<PaginationEllipsisProps, {}, {}, {}, {}, vue262.ComponentOptionsMixin, vue262.ComponentOptionsMixin, {}, string, vue262.PublicProps, Readonly<PaginationEllipsisProps> & Readonly<{}>, {}, {}, {}, {}, string, vue262.ComponentProvideOptions, false, {}, any>, {
|
|
18
|
+
default?: (props: {}) => any;
|
|
19
|
+
}>;
|
|
20
|
+
type __VLS_WithSlots$8<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/pagination/pagination-first-trigger.vue.d.ts
|
|
27
|
+
interface PaginationFirstTriggerBaseProps extends PolymorphicProps {}
|
|
28
|
+
interface PaginationFirstTriggerProps extends PaginationFirstTriggerBaseProps,
|
|
29
|
+
/**
|
|
30
|
+
* @vue-ignore
|
|
31
|
+
*/
|
|
32
|
+
ButtonHTMLAttributes {}
|
|
33
|
+
declare const _default$2: typeof __VLS_export$7;
|
|
34
|
+
declare const __VLS_export$7: __VLS_WithSlots$7<vue262.DefineComponent<PaginationFirstTriggerProps, {}, {}, {}, {}, vue262.ComponentOptionsMixin, vue262.ComponentOptionsMixin, {}, string, vue262.PublicProps, Readonly<PaginationFirstTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, vue262.ComponentProvideOptions, false, {}, any>, {
|
|
35
|
+
default?: (props: {}) => any;
|
|
36
|
+
}>;
|
|
37
|
+
type __VLS_WithSlots$7<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/components/pagination/pagination-item.vue.d.ts
|
|
44
|
+
interface PaginationItemBaseProps extends ItemProps, PolymorphicProps {}
|
|
45
|
+
interface PaginationItemProps extends PaginationItemBaseProps,
|
|
46
|
+
/**
|
|
47
|
+
* @vue-ignore
|
|
48
|
+
*/
|
|
49
|
+
Omit<ButtonHTMLAttributes, 'type' | 'value'> {}
|
|
50
|
+
declare const _default$3: typeof __VLS_export$6;
|
|
51
|
+
declare const __VLS_export$6: __VLS_WithSlots$6<vue262.DefineComponent<PaginationItemProps, {}, {}, {}, {}, vue262.ComponentOptionsMixin, vue262.ComponentOptionsMixin, {}, string, vue262.PublicProps, Readonly<PaginationItemProps> & Readonly<{}>, {}, {}, {}, {}, string, vue262.ComponentProvideOptions, false, {}, any>, {
|
|
52
|
+
default?: (props: {}) => any;
|
|
53
|
+
}>;
|
|
54
|
+
type __VLS_WithSlots$6<T, S> = T & {
|
|
55
|
+
new (): {
|
|
56
|
+
$slots: S;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/pagination/pagination-last-trigger.vue.d.ts
|
|
61
|
+
interface PaginationLastTriggerBaseProps extends PolymorphicProps {}
|
|
62
|
+
interface PaginationLastTriggerProps extends PaginationLastTriggerBaseProps,
|
|
63
|
+
/**
|
|
64
|
+
* @vue-ignore
|
|
65
|
+
*/
|
|
66
|
+
ButtonHTMLAttributes {}
|
|
67
|
+
declare const _default$4: typeof __VLS_export$5;
|
|
68
|
+
declare const __VLS_export$5: __VLS_WithSlots$5<vue262.DefineComponent<PaginationLastTriggerProps, {}, {}, {}, {}, vue262.ComponentOptionsMixin, vue262.ComponentOptionsMixin, {}, string, vue262.PublicProps, Readonly<PaginationLastTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, vue262.ComponentProvideOptions, false, {}, any>, {
|
|
69
|
+
default?: (props: {}) => any;
|
|
70
|
+
}>;
|
|
71
|
+
type __VLS_WithSlots$5<T, S> = T & {
|
|
72
|
+
new (): {
|
|
73
|
+
$slots: S;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/components/pagination/pagination-next-trigger.vue.d.ts
|
|
78
|
+
interface PaginationNextTriggerBaseProps extends PolymorphicProps {}
|
|
79
|
+
interface PaginationNextTriggerProps extends PaginationNextTriggerBaseProps,
|
|
80
|
+
/**
|
|
81
|
+
* @vue-ignore
|
|
82
|
+
*/
|
|
83
|
+
ButtonHTMLAttributes {}
|
|
84
|
+
declare const _default$5: typeof __VLS_export$4;
|
|
85
|
+
declare const __VLS_export$4: __VLS_WithSlots$4<vue262.DefineComponent<PaginationNextTriggerProps, {}, {}, {}, {}, vue262.ComponentOptionsMixin, vue262.ComponentOptionsMixin, {}, string, vue262.PublicProps, Readonly<PaginationNextTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, vue262.ComponentProvideOptions, false, {}, any>, {
|
|
86
|
+
default?: (props: {}) => any;
|
|
87
|
+
}>;
|
|
88
|
+
type __VLS_WithSlots$4<T, S> = T & {
|
|
89
|
+
new (): {
|
|
90
|
+
$slots: S;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/components/pagination/pagination-prev-trigger.vue.d.ts
|
|
95
|
+
interface PaginationPrevTriggerBaseProps extends PolymorphicProps {}
|
|
96
|
+
interface PaginationPrevTriggerProps extends PaginationPrevTriggerBaseProps,
|
|
97
|
+
/**
|
|
98
|
+
* @vue-ignore
|
|
99
|
+
*/
|
|
100
|
+
ButtonHTMLAttributes {}
|
|
101
|
+
declare const _default$6: typeof __VLS_export$3;
|
|
102
|
+
declare const __VLS_export$3: __VLS_WithSlots$3<vue262.DefineComponent<PaginationPrevTriggerProps, {}, {}, {}, {}, vue262.ComponentOptionsMixin, vue262.ComponentOptionsMixin, {}, string, vue262.PublicProps, Readonly<PaginationPrevTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, vue262.ComponentProvideOptions, false, {}, any>, {
|
|
103
|
+
default?: (props: {}) => any;
|
|
104
|
+
}>;
|
|
105
|
+
type __VLS_WithSlots$3<T, S> = T & {
|
|
106
|
+
new (): {
|
|
107
|
+
$slots: S;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/components/pagination/pagination-root-provider.vue.d.ts
|
|
112
|
+
interface RootProviderProps {
|
|
113
|
+
value: UnwrapRef<UsePaginationReturn>;
|
|
114
|
+
}
|
|
115
|
+
interface PaginationRootProviderBaseProps extends RootProviderProps, PolymorphicProps {}
|
|
116
|
+
interface PaginationRootProviderProps extends PaginationRootProviderBaseProps,
|
|
117
|
+
/**
|
|
118
|
+
* @vue-ignore
|
|
119
|
+
*/
|
|
120
|
+
HTMLAttributes {}
|
|
121
|
+
declare const _default$8: typeof __VLS_export$2;
|
|
122
|
+
declare const __VLS_export$2: __VLS_WithSlots$2<vue262.DefineComponent<PaginationRootProviderProps, {}, {}, {}, {}, vue262.ComponentOptionsMixin, vue262.ComponentOptionsMixin, {}, string, vue262.PublicProps, Readonly<PaginationRootProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue262.ComponentProvideOptions, false, {}, any>, {
|
|
123
|
+
default?: (props: {}) => any;
|
|
124
|
+
}>;
|
|
125
|
+
type __VLS_WithSlots$2<T, S> = T & {
|
|
126
|
+
new (): {
|
|
127
|
+
$slots: S;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/components/pagination/pagination-types.d.ts
|
|
132
|
+
interface RootProps {
|
|
133
|
+
count?: number;
|
|
134
|
+
defaultPage?: number;
|
|
135
|
+
defaultPageSize?: number;
|
|
136
|
+
id?: string;
|
|
137
|
+
ids?: Partial<{
|
|
138
|
+
root: string;
|
|
139
|
+
ellipsis(index: number): string;
|
|
140
|
+
prevTrigger: string;
|
|
141
|
+
nextTrigger: string;
|
|
142
|
+
item(page: number): string;
|
|
143
|
+
}>;
|
|
144
|
+
page?: number;
|
|
145
|
+
pageSize?: number;
|
|
146
|
+
siblingCount?: number;
|
|
147
|
+
translations?: pagination.IntlTranslations;
|
|
148
|
+
type?: 'button' | 'link';
|
|
149
|
+
getPageUrl?: (details: pagination.PageUrlDetails) => string;
|
|
150
|
+
}
|
|
151
|
+
type RootEmits = {
|
|
152
|
+
pageChange: [details: pagination.PageChangeDetails];
|
|
153
|
+
pageSizeChange: [details: pagination.PageSizeChangeDetails];
|
|
154
|
+
'update:page': [page: pagination.PageChangeDetails['page']];
|
|
155
|
+
'update:pageSize': [pageSize: pagination.PageSizeChangeDetails['pageSize']];
|
|
156
|
+
};
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/components/pagination/pagination-root.vue.d.ts
|
|
159
|
+
interface PaginationRootBaseProps extends RootProps, PolymorphicProps {}
|
|
160
|
+
interface PaginationRootProps extends PaginationRootBaseProps,
|
|
161
|
+
/**
|
|
162
|
+
* @vue-ignore
|
|
163
|
+
*/
|
|
164
|
+
HTMLAttributes {}
|
|
165
|
+
interface PaginationRootEmits extends RootEmits {}
|
|
166
|
+
declare const _default$7: typeof __VLS_export$1;
|
|
167
|
+
declare const __VLS_export$1: __VLS_WithSlots$1<vue262.DefineComponent<PaginationRootProps, {}, {}, {}, {}, vue262.ComponentOptionsMixin, vue262.ComponentOptionsMixin, {
|
|
168
|
+
pageChange: (details: pagination.PageChangeDetails) => any;
|
|
169
|
+
pageSizeChange: (details: pagination.PageSizeChangeDetails) => any;
|
|
170
|
+
"update:page": (page: number) => any;
|
|
171
|
+
"update:pageSize": (pageSize: number) => any;
|
|
172
|
+
}, string, vue262.PublicProps, Readonly<PaginationRootProps> & Readonly<{
|
|
173
|
+
onPageChange?: ((details: pagination.PageChangeDetails) => any) | undefined;
|
|
174
|
+
onPageSizeChange?: ((details: pagination.PageSizeChangeDetails) => any) | undefined;
|
|
175
|
+
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
176
|
+
"onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
177
|
+
}>, {}, {}, {}, {}, string, vue262.ComponentProvideOptions, false, {}, any>, {
|
|
178
|
+
default?: (props: {}) => any;
|
|
179
|
+
}>;
|
|
180
|
+
type __VLS_WithSlots$1<T, S> = T & {
|
|
181
|
+
new (): {
|
|
182
|
+
$slots: S;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
declare namespace pagination_d_exports {
|
|
186
|
+
export { _default as Context, PaginationContextProps as ContextProps, _default$1 as Ellipsis, PaginationEllipsisBaseProps as EllipsisBaseProps, PaginationEllipsisProps as EllipsisProps, _default$2 as FirstTrigger, PaginationFirstTriggerBaseProps as FirstTriggerBaseProps, PaginationFirstTriggerProps as FirstTriggerProps, _default$3 as Item, PaginationItemBaseProps as ItemBaseProps, ItemLabelDetails, PaginationItemProps as ItemProps, _default$4 as LastTrigger, PaginationLastTriggerBaseProps as LastTriggerBaseProps, PaginationLastTriggerProps as LastTriggerProps, _default$5 as NextTrigger, PaginationNextTriggerBaseProps as NextTriggerBaseProps, PaginationNextTriggerProps as NextTriggerProps, PageChangeDetails, PageSizeChangeDetails, PageUrlDetails, _default$6 as PrevTrigger, PaginationPrevTriggerBaseProps as PrevTriggerBaseProps, PaginationPrevTriggerProps as PrevTriggerProps, _default$7 as Root, PaginationRootBaseProps as RootBaseProps, PaginationRootEmits as RootEmits, PaginationRootProps as RootProps, _default$8 as RootProvider, PaginationRootProviderBaseProps as RootProviderBaseProps, PaginationRootProviderProps as RootProviderProps };
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/components/pagination/use-pagination.d.ts
|
|
190
|
+
interface UsePaginationProps extends Optional<Omit<pagination.Props, 'dir' | 'getRootNode'>, 'id'> {}
|
|
191
|
+
interface UsePaginationReturn extends ComputedRef<pagination.Api<PropTypes>> {}
|
|
192
|
+
declare const usePagination: (props?: MaybeRef<UsePaginationProps>, emit?: EmitFn$1<PaginationRootEmits>) => UsePaginationReturn;
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/components/pagination/use-pagination-context.d.ts
|
|
195
|
+
interface UsePaginationContext extends UsePaginationReturn {}
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/components/pagination/pagination-context.vue.d.ts
|
|
198
|
+
interface PaginationContextProps extends SlotsType<{
|
|
199
|
+
default: UnwrapRef<UsePaginationContext>;
|
|
200
|
+
}> {}
|
|
201
|
+
declare const _default: typeof __VLS_export;
|
|
202
|
+
declare const __VLS_export: __VLS_WithSlots<vue262.DefineComponent<{}, {}, {}, {}, {}, vue262.ComponentOptionsMixin, vue262.ComponentOptionsMixin, {}, string, vue262.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue262.ComponentProvideOptions, true, {}, any>, {
|
|
203
|
+
default(pagination: UnwrapRef<UsePaginationContext>): unknown;
|
|
204
|
+
}>;
|
|
205
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
206
|
+
new (): {
|
|
207
|
+
$slots: S;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
//#endregion
|
|
211
|
+
export { pagination_d_exports as Pagination, _default as PaginationContext, type PaginationContextProps, _default$1 as PaginationEllipsis, type PaginationEllipsisBaseProps, type PaginationEllipsisProps, _default$2 as PaginationFirstTrigger, type PaginationFirstTriggerBaseProps, type PaginationFirstTriggerProps, _default$3 as PaginationItem, type PaginationItemBaseProps, type PaginationItemLabelDetails, type PaginationItemProps, _default$4 as PaginationLastTrigger, type PaginationLastTriggerBaseProps, type PaginationLastTriggerProps, _default$5 as PaginationNextTrigger, type PaginationNextTriggerBaseProps, type PaginationNextTriggerProps, type PaginationPageChangeDetails, type PaginationPageSizeChangeDetails, type PaginationPageUrlDetails, _default$6 as PaginationPrevTrigger, type PaginationPrevTriggerBaseProps, type PaginationPrevTriggerProps, _default$7 as PaginationRoot, type PaginationRootBaseProps, type PaginationRootEmits, type PaginationRootProps, _default$8 as PaginationRootProvider, type PaginationRootProviderBaseProps, type PaginationRootProviderProps, type UsePaginationContext, type UsePaginationProps, type UsePaginationReturn, paginationAnatomy, usePagination, usePaginationContext };
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { t as __exportAll } from "../../chunk-BN_g-Awi.js";
|
|
2
|
+
import { n as useMachine, r as normalizeProps$1 } from "../../core-DNndr38p.js";
|
|
3
|
+
import { a as useLocaleContext, c as useEnvironmentContext, i as DEFAULT_LOCALE, s as DEFAULT_ENVIRONMENT } from "../../providers-DNBWT-O_.js";
|
|
4
|
+
import { t as createContext } from "../../create-context-Ds1GbsVc.js";
|
|
5
|
+
import { t as useForwardExpose } from "../../use-forward-expose-CCAmHTUB.js";
|
|
6
|
+
import { t as sprawlify } from "../../factory-Co08Aw8u.js";
|
|
7
|
+
import { t as cleanProps } from "../../clean-props-D2R4tz5e.js";
|
|
8
|
+
import { computed, createBlock, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, toValue, unref, useId, withCtx } from "vue";
|
|
9
|
+
import * as pagination from "@sprawlify/primitives/machines/pagination";
|
|
10
|
+
import { anatomy as paginationAnatomy } from "@sprawlify/primitives/machines/pagination";
|
|
11
|
+
|
|
12
|
+
//#region src/components/pagination/use-pagination-context.ts
|
|
13
|
+
const [PaginationProvider, usePaginationContext] = createContext("PaginationContext");
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/components/pagination/pagination-context.vue?vue&type=script&setup=true&lang.ts
|
|
17
|
+
var pagination_context_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
18
|
+
__name: "pagination-context",
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const pagination = usePaginationContext();
|
|
21
|
+
return (_ctx, _cache) => {
|
|
22
|
+
return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(pagination))));
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/components/pagination/pagination-context.vue
|
|
29
|
+
var pagination_context_default = pagination_context_vue_vue_type_script_setup_true_lang_default;
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/pagination/pagination-ellipsis.vue?vue&type=script&setup=true&lang.ts
|
|
33
|
+
var pagination_ellipsis_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
34
|
+
__name: "pagination-ellipsis",
|
|
35
|
+
props: {
|
|
36
|
+
index: {
|
|
37
|
+
type: Number,
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
asChild: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
required: false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
setup(__props) {
|
|
46
|
+
const props = __props;
|
|
47
|
+
const pagination = usePaginationContext();
|
|
48
|
+
useForwardExpose();
|
|
49
|
+
return (_ctx, _cache) => {
|
|
50
|
+
return openBlock(), createBlock(unref(sprawlify).div, mergeProps(unref(pagination).getEllipsisProps(props), { "as-child": __props.asChild }), {
|
|
51
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
52
|
+
_: 3
|
|
53
|
+
}, 16, ["as-child"]);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/components/pagination/pagination-ellipsis.vue
|
|
60
|
+
var pagination_ellipsis_default = pagination_ellipsis_vue_vue_type_script_setup_true_lang_default;
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/components/pagination/pagination-first-trigger.vue?vue&type=script&setup=true&lang.ts
|
|
64
|
+
var pagination_first_trigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
65
|
+
__name: "pagination-first-trigger",
|
|
66
|
+
props: { asChild: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
required: false
|
|
69
|
+
} },
|
|
70
|
+
setup(__props) {
|
|
71
|
+
const pagination = usePaginationContext();
|
|
72
|
+
useForwardExpose();
|
|
73
|
+
return (_ctx, _cache) => {
|
|
74
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(pagination).getFirstTriggerProps(), { "as-child": __props.asChild }), {
|
|
75
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 16, ["as-child"]);
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/components/pagination/pagination-first-trigger.vue
|
|
84
|
+
var pagination_first_trigger_default = pagination_first_trigger_vue_vue_type_script_setup_true_lang_default;
|
|
85
|
+
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/components/pagination/pagination-item.vue?vue&type=script&setup=true&lang.ts
|
|
88
|
+
var pagination_item_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
89
|
+
__name: "pagination-item",
|
|
90
|
+
props: {
|
|
91
|
+
type: {
|
|
92
|
+
type: String,
|
|
93
|
+
required: true
|
|
94
|
+
},
|
|
95
|
+
value: {
|
|
96
|
+
type: Number,
|
|
97
|
+
required: true
|
|
98
|
+
},
|
|
99
|
+
asChild: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
required: false
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
setup(__props) {
|
|
105
|
+
const props = __props;
|
|
106
|
+
const pagination = usePaginationContext();
|
|
107
|
+
useForwardExpose();
|
|
108
|
+
return (_ctx, _cache) => {
|
|
109
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(pagination).getItemProps(props), { "as-child": __props.asChild }), {
|
|
110
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
111
|
+
_: 3
|
|
112
|
+
}, 16, ["as-child"]);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/components/pagination/pagination-item.vue
|
|
119
|
+
var pagination_item_default = pagination_item_vue_vue_type_script_setup_true_lang_default;
|
|
120
|
+
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/components/pagination/pagination-last-trigger.vue?vue&type=script&setup=true&lang.ts
|
|
123
|
+
var pagination_last_trigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
124
|
+
__name: "pagination-last-trigger",
|
|
125
|
+
props: { asChild: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
required: false
|
|
128
|
+
} },
|
|
129
|
+
setup(__props) {
|
|
130
|
+
const pagination = usePaginationContext();
|
|
131
|
+
useForwardExpose();
|
|
132
|
+
return (_ctx, _cache) => {
|
|
133
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(pagination).getLastTriggerProps(), { "as-child": __props.asChild }), {
|
|
134
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
135
|
+
_: 3
|
|
136
|
+
}, 16, ["as-child"]);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/components/pagination/pagination-last-trigger.vue
|
|
143
|
+
var pagination_last_trigger_default = pagination_last_trigger_vue_vue_type_script_setup_true_lang_default;
|
|
144
|
+
|
|
145
|
+
//#endregion
|
|
146
|
+
//#region src/components/pagination/pagination-next-trigger.vue?vue&type=script&setup=true&lang.ts
|
|
147
|
+
var pagination_next_trigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
148
|
+
__name: "pagination-next-trigger",
|
|
149
|
+
props: { asChild: {
|
|
150
|
+
type: Boolean,
|
|
151
|
+
required: false
|
|
152
|
+
} },
|
|
153
|
+
setup(__props) {
|
|
154
|
+
const pagination = usePaginationContext();
|
|
155
|
+
useForwardExpose();
|
|
156
|
+
return (_ctx, _cache) => {
|
|
157
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(pagination).getNextTriggerProps(), { "as-child": __props.asChild }), {
|
|
158
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
159
|
+
_: 3
|
|
160
|
+
}, 16, ["as-child"]);
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/components/pagination/pagination-next-trigger.vue
|
|
167
|
+
var pagination_next_trigger_default = pagination_next_trigger_vue_vue_type_script_setup_true_lang_default;
|
|
168
|
+
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region src/components/pagination/pagination-prev-trigger.vue?vue&type=script&setup=true&lang.ts
|
|
171
|
+
var pagination_prev_trigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
172
|
+
__name: "pagination-prev-trigger",
|
|
173
|
+
props: { asChild: {
|
|
174
|
+
type: Boolean,
|
|
175
|
+
required: false
|
|
176
|
+
} },
|
|
177
|
+
setup(__props) {
|
|
178
|
+
const pagination = usePaginationContext();
|
|
179
|
+
useForwardExpose();
|
|
180
|
+
return (_ctx, _cache) => {
|
|
181
|
+
return openBlock(), createBlock(unref(sprawlify).button, mergeProps(unref(pagination).getPrevTriggerProps(), { "as-child": __props.asChild }), {
|
|
182
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
183
|
+
_: 3
|
|
184
|
+
}, 16, ["as-child"]);
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/components/pagination/pagination-prev-trigger.vue
|
|
191
|
+
var pagination_prev_trigger_default = pagination_prev_trigger_vue_vue_type_script_setup_true_lang_default;
|
|
192
|
+
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region src/components/pagination/pagination-root-provider.vue?vue&type=script&setup=true&lang.ts
|
|
195
|
+
var pagination_root_provider_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
196
|
+
__name: "pagination-root-provider",
|
|
197
|
+
props: {
|
|
198
|
+
value: {
|
|
199
|
+
type: null,
|
|
200
|
+
required: true
|
|
201
|
+
},
|
|
202
|
+
asChild: {
|
|
203
|
+
type: Boolean,
|
|
204
|
+
required: false
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
setup(__props) {
|
|
208
|
+
const props = __props;
|
|
209
|
+
const pagination = computed(() => props.value);
|
|
210
|
+
PaginationProvider(pagination);
|
|
211
|
+
useForwardExpose();
|
|
212
|
+
return (_ctx, _cache) => {
|
|
213
|
+
return openBlock(), createBlock(unref(sprawlify).nav, mergeProps(pagination.value.getRootProps(), { "as-child": __props.asChild }), {
|
|
214
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
215
|
+
_: 3
|
|
216
|
+
}, 16, ["as-child"]);
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region src/components/pagination/pagination-root-provider.vue
|
|
223
|
+
var pagination_root_provider_default = pagination_root_provider_vue_vue_type_script_setup_true_lang_default;
|
|
224
|
+
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region src/components/pagination/use-pagination.ts
|
|
227
|
+
const usePagination = (props = {}, emit) => {
|
|
228
|
+
const id = useId();
|
|
229
|
+
const env = useEnvironmentContext(DEFAULT_ENVIRONMENT);
|
|
230
|
+
const locale = useLocaleContext(DEFAULT_LOCALE);
|
|
231
|
+
const context = computed(() => {
|
|
232
|
+
const localeProps = toValue(props);
|
|
233
|
+
return {
|
|
234
|
+
id,
|
|
235
|
+
dir: locale.value.dir,
|
|
236
|
+
getRootNode: env?.value.getRootNode,
|
|
237
|
+
...cleanProps(localeProps),
|
|
238
|
+
onPageChange: (details) => {
|
|
239
|
+
emit?.("pageChange", details);
|
|
240
|
+
emit?.("update:page", details.page);
|
|
241
|
+
localeProps.onPageChange?.(details);
|
|
242
|
+
},
|
|
243
|
+
onPageSizeChange: (details) => {
|
|
244
|
+
emit?.("pageSizeChange", details);
|
|
245
|
+
emit?.("update:pageSize", details.pageSize);
|
|
246
|
+
localeProps.onPageSizeChange?.(details);
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
});
|
|
250
|
+
const service = useMachine(pagination.machine, context);
|
|
251
|
+
return computed(() => pagination.connect(service, normalizeProps$1));
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/components/pagination/pagination-root.vue?vue&type=script&setup=true&lang.ts
|
|
256
|
+
var pagination_root_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
257
|
+
__name: "pagination-root",
|
|
258
|
+
props: {
|
|
259
|
+
count: {
|
|
260
|
+
type: Number,
|
|
261
|
+
required: false
|
|
262
|
+
},
|
|
263
|
+
defaultPage: {
|
|
264
|
+
type: Number,
|
|
265
|
+
required: false
|
|
266
|
+
},
|
|
267
|
+
defaultPageSize: {
|
|
268
|
+
type: Number,
|
|
269
|
+
required: false
|
|
270
|
+
},
|
|
271
|
+
id: {
|
|
272
|
+
type: String,
|
|
273
|
+
required: false
|
|
274
|
+
},
|
|
275
|
+
ids: {
|
|
276
|
+
type: Object,
|
|
277
|
+
required: false
|
|
278
|
+
},
|
|
279
|
+
page: {
|
|
280
|
+
type: Number,
|
|
281
|
+
required: false
|
|
282
|
+
},
|
|
283
|
+
pageSize: {
|
|
284
|
+
type: Number,
|
|
285
|
+
required: false
|
|
286
|
+
},
|
|
287
|
+
siblingCount: {
|
|
288
|
+
type: Number,
|
|
289
|
+
required: false
|
|
290
|
+
},
|
|
291
|
+
translations: {
|
|
292
|
+
type: null,
|
|
293
|
+
required: false
|
|
294
|
+
},
|
|
295
|
+
type: {
|
|
296
|
+
type: String,
|
|
297
|
+
required: false
|
|
298
|
+
},
|
|
299
|
+
getPageUrl: {
|
|
300
|
+
type: Function,
|
|
301
|
+
required: false
|
|
302
|
+
},
|
|
303
|
+
asChild: {
|
|
304
|
+
type: Boolean,
|
|
305
|
+
required: false
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
emits: [
|
|
309
|
+
"pageChange",
|
|
310
|
+
"pageSizeChange",
|
|
311
|
+
"update:page",
|
|
312
|
+
"update:pageSize"
|
|
313
|
+
],
|
|
314
|
+
setup(__props, { emit: __emit }) {
|
|
315
|
+
const pagination = usePagination(__props, __emit);
|
|
316
|
+
PaginationProvider(pagination);
|
|
317
|
+
useForwardExpose();
|
|
318
|
+
return (_ctx, _cache) => {
|
|
319
|
+
return openBlock(), createBlock(unref(sprawlify).nav, mergeProps(unref(pagination).getRootProps(), { "as-child": __props.asChild }), {
|
|
320
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
321
|
+
_: 3
|
|
322
|
+
}, 16, ["as-child"]);
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region src/components/pagination/pagination-root.vue
|
|
329
|
+
var pagination_root_default = pagination_root_vue_vue_type_script_setup_true_lang_default;
|
|
330
|
+
|
|
331
|
+
//#endregion
|
|
332
|
+
//#region src/components/pagination/pagination.ts
|
|
333
|
+
var pagination_exports = /* @__PURE__ */ __exportAll({
|
|
334
|
+
Context: () => pagination_context_default,
|
|
335
|
+
Ellipsis: () => pagination_ellipsis_default,
|
|
336
|
+
FirstTrigger: () => pagination_first_trigger_default,
|
|
337
|
+
Item: () => pagination_item_default,
|
|
338
|
+
LastTrigger: () => pagination_last_trigger_default,
|
|
339
|
+
NextTrigger: () => pagination_next_trigger_default,
|
|
340
|
+
PrevTrigger: () => pagination_prev_trigger_default,
|
|
341
|
+
Root: () => pagination_root_default,
|
|
342
|
+
RootProvider: () => pagination_root_provider_default
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
//#endregion
|
|
346
|
+
export { pagination_exports as Pagination, pagination_context_default as PaginationContext, pagination_ellipsis_default as PaginationEllipsis, pagination_first_trigger_default as PaginationFirstTrigger, pagination_item_default as PaginationItem, pagination_last_trigger_default as PaginationLastTrigger, pagination_next_trigger_default as PaginationNextTrigger, pagination_prev_trigger_default as PaginationPrevTrigger, pagination_root_default as PaginationRoot, pagination_root_provider_default as PaginationRootProvider, paginationAnatomy, usePagination, usePaginationContext };
|