@lglab/compose-ui 0.29.0 → 0.30.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/accordion.d.ts +6 -6
- package/dist/alert-dialog.d.ts +10 -10
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/autocomplete.d.ts +13 -13
- package/dist/autocomplete.d.ts.map +1 -1
- package/dist/avatar.d.ts +5 -5
- package/dist/avatar.d.ts.map +1 -1
- package/dist/badge.d.ts +4 -4
- package/dist/badge.js +5 -5
- package/dist/badge.js.map +1 -1
- package/dist/button.d.ts +2 -2
- package/dist/button.d.ts.map +1 -1
- package/dist/card.d.ts +8 -8
- package/dist/checkbox-group.d.ts +2 -2
- package/dist/checkbox.d.ts +3 -3
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/collapsible.d.ts +4 -4
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/combobox.d.ts +25 -25
- package/dist/components/table/filters.d.ts +29 -0
- package/dist/components/table/filters.d.ts.map +1 -0
- package/dist/components/table/filters.js +47 -0
- package/dist/components/table/filters.js.map +1 -0
- package/dist/components/table/primitives.d.ts +93 -0
- package/dist/components/table/primitives.d.ts.map +1 -0
- package/dist/components/table/primitives.js +129 -0
- package/dist/components/table/primitives.js.map +1 -0
- package/dist/components/table/sort.js +17 -0
- package/dist/components/table/sort.js.map +1 -0
- package/dist/components/table/types.d.ts +101 -0
- package/dist/components/table/types.d.ts.map +1 -0
- package/dist/context-menu.d.ts +20 -20
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/dialog.d.ts +11 -11
- package/dist/drawer.d.ts +12 -12
- package/dist/field.d.ts +8 -8
- package/dist/fieldset.d.ts +3 -3
- package/dist/fieldset.d.ts.map +1 -1
- package/dist/form.d.ts +2 -2
- package/dist/form.d.ts.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +4 -1
- package/dist/input.d.ts +2 -2
- package/dist/input.d.ts.map +1 -1
- package/dist/lib/control-variants.js +3 -2
- package/dist/lib/control-variants.js.map +1 -1
- package/dist/menu.d.ts +20 -20
- package/dist/menubar.d.ts +21 -21
- package/dist/meter.d.ts +6 -6
- package/dist/navigation-menu.d.ts +14 -14
- package/dist/number-field.d.ts +8 -8
- package/dist/number-field.d.ts.map +1 -1
- package/dist/pagination.d.ts +184 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +164 -0
- package/dist/pagination.js.map +1 -0
- package/dist/popover.d.ts +12 -12
- package/dist/preview-card.d.ts +8 -8
- package/dist/progress.d.ts +6 -6
- package/dist/progress.d.ts.map +1 -1
- package/dist/radio-group.d.ts +2 -2
- package/dist/radio-group.d.ts.map +1 -1
- package/dist/radio.d.ts +3 -3
- package/dist/radio.d.ts.map +1 -1
- package/dist/scroll-area.d.ts +7 -7
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/select.d.ts +19 -19
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +1 -1
- package/dist/select.js.map +1 -1
- package/dist/separator.d.ts +2 -2
- package/dist/skeleton.d.ts +2 -2
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/slider.d.ts +7 -7
- package/dist/slider.d.ts.map +1 -1
- package/dist/styles/default.css +1 -1
- package/dist/switch.d.ts +3 -3
- package/dist/table/index.d.ts +5 -0
- package/dist/table/index.js +5 -0
- package/dist/table/use-table.d.ts +9 -0
- package/dist/table/use-table.d.ts.map +1 -0
- package/dist/table/use-table.js +256 -0
- package/dist/table/use-table.js.map +1 -0
- package/dist/tabs.d.ts +6 -6
- package/dist/textarea.d.ts +2 -2
- package/dist/toast.d.ts +10 -10
- package/dist/toggle-group.d.ts +3 -3
- package/dist/toggle.d.ts +2 -2
- package/dist/toolbar.d.ts +7 -7
- package/dist/tooltip.d.ts +8 -8
- package/package.json +20 -8
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { ControlSize, ControlVariant } from "./lib/control-variants.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as react_jsx_runtime82 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/pagination.d.ts
|
|
6
|
+
type PaginationPage = number | 'ellipsis';
|
|
7
|
+
type UsePaginationOptions = {
|
|
8
|
+
/** Current active page (1-indexed) */
|
|
9
|
+
currentPage: number;
|
|
10
|
+
/** Total number of pages */
|
|
11
|
+
totalPages: number;
|
|
12
|
+
/** Number of pages to show on each side of current page (default: 1) */
|
|
13
|
+
siblingCount?: number;
|
|
14
|
+
/** Callback when page changes */
|
|
15
|
+
onPageChange: (page: number) => void;
|
|
16
|
+
/** Current page size */
|
|
17
|
+
pageSize?: number;
|
|
18
|
+
/** Available page size options (default: [10, 25, 50, 100]) */
|
|
19
|
+
pageSizeOptions?: number[];
|
|
20
|
+
/** Callback when page size changes */
|
|
21
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
22
|
+
};
|
|
23
|
+
type UsePaginationReturn = {
|
|
24
|
+
/** Array of page numbers and 'ellipsis' markers */
|
|
25
|
+
pages: PaginationPage[];
|
|
26
|
+
/** Current active page */
|
|
27
|
+
currentPage: number;
|
|
28
|
+
/** Total number of pages */
|
|
29
|
+
totalPages: number;
|
|
30
|
+
/** Whether navigation to next page is possible */
|
|
31
|
+
canGoNext: boolean;
|
|
32
|
+
/** Whether navigation to previous page is possible */
|
|
33
|
+
canGoPrevious: boolean;
|
|
34
|
+
/** Navigate to a specific page */
|
|
35
|
+
goToPage: (page: number) => void;
|
|
36
|
+
/** Navigate to the next page */
|
|
37
|
+
goToNext: () => void;
|
|
38
|
+
/** Navigate to the previous page */
|
|
39
|
+
goToPrevious: () => void;
|
|
40
|
+
/** Navigate to the first page */
|
|
41
|
+
goToFirst: () => void;
|
|
42
|
+
/** Navigate to the last page */
|
|
43
|
+
goToLast: () => void;
|
|
44
|
+
/** Current page size */
|
|
45
|
+
pageSize: number;
|
|
46
|
+
/** Available page size options */
|
|
47
|
+
pageSizeOptions: number[];
|
|
48
|
+
/** Set page size (calls onPageSizeChange if provided) */
|
|
49
|
+
setPageSize: (size: number) => void;
|
|
50
|
+
};
|
|
51
|
+
declare function usePagination({
|
|
52
|
+
currentPage,
|
|
53
|
+
totalPages,
|
|
54
|
+
siblingCount,
|
|
55
|
+
onPageChange,
|
|
56
|
+
pageSize,
|
|
57
|
+
pageSizeOptions,
|
|
58
|
+
onPageSizeChange
|
|
59
|
+
}: UsePaginationOptions): UsePaginationReturn;
|
|
60
|
+
type PaginationRootProps = React.ComponentProps<'nav'>;
|
|
61
|
+
declare const PaginationRoot: {
|
|
62
|
+
({
|
|
63
|
+
className,
|
|
64
|
+
...props
|
|
65
|
+
}: PaginationRootProps): react_jsx_runtime82.JSX.Element;
|
|
66
|
+
displayName: string;
|
|
67
|
+
};
|
|
68
|
+
type PaginationContentProps = React.ComponentProps<'ul'>;
|
|
69
|
+
declare const PaginationContent: {
|
|
70
|
+
({
|
|
71
|
+
className,
|
|
72
|
+
...props
|
|
73
|
+
}: PaginationContentProps): react_jsx_runtime82.JSX.Element;
|
|
74
|
+
displayName: string;
|
|
75
|
+
};
|
|
76
|
+
type PaginationItemProps = React.ComponentProps<'li'>;
|
|
77
|
+
declare const PaginationItem: {
|
|
78
|
+
({
|
|
79
|
+
className,
|
|
80
|
+
...props
|
|
81
|
+
}: PaginationItemProps): react_jsx_runtime82.JSX.Element;
|
|
82
|
+
displayName: string;
|
|
83
|
+
};
|
|
84
|
+
type PaginationButtonProps = React.ComponentProps<'button'> & {
|
|
85
|
+
/** Whether this button represents the current active page */
|
|
86
|
+
isActive?: boolean;
|
|
87
|
+
/** Visual style of the button */
|
|
88
|
+
variant?: ControlVariant;
|
|
89
|
+
/** Size of the button */
|
|
90
|
+
size?: ControlSize;
|
|
91
|
+
};
|
|
92
|
+
declare const PaginationButton: {
|
|
93
|
+
({
|
|
94
|
+
className,
|
|
95
|
+
isActive,
|
|
96
|
+
variant,
|
|
97
|
+
size,
|
|
98
|
+
...props
|
|
99
|
+
}: PaginationButtonProps): react_jsx_runtime82.JSX.Element;
|
|
100
|
+
displayName: string;
|
|
101
|
+
};
|
|
102
|
+
type PaginationPreviousProps = React.ComponentProps<'button'> & {
|
|
103
|
+
/** Visual style of the button */
|
|
104
|
+
variant?: ControlVariant;
|
|
105
|
+
/** Size of the button */
|
|
106
|
+
size?: ControlSize;
|
|
107
|
+
};
|
|
108
|
+
declare const PaginationPrevious: {
|
|
109
|
+
({
|
|
110
|
+
className,
|
|
111
|
+
disabled,
|
|
112
|
+
variant,
|
|
113
|
+
size,
|
|
114
|
+
children,
|
|
115
|
+
...props
|
|
116
|
+
}: PaginationPreviousProps): react_jsx_runtime82.JSX.Element;
|
|
117
|
+
displayName: string;
|
|
118
|
+
};
|
|
119
|
+
type PaginationNextProps = React.ComponentProps<'button'> & {
|
|
120
|
+
/** Visual style of the button */
|
|
121
|
+
variant?: ControlVariant;
|
|
122
|
+
/** Size of the button */
|
|
123
|
+
size?: ControlSize;
|
|
124
|
+
};
|
|
125
|
+
declare const PaginationNext: {
|
|
126
|
+
({
|
|
127
|
+
className,
|
|
128
|
+
disabled,
|
|
129
|
+
variant,
|
|
130
|
+
size,
|
|
131
|
+
children,
|
|
132
|
+
...props
|
|
133
|
+
}: PaginationNextProps): react_jsx_runtime82.JSX.Element;
|
|
134
|
+
displayName: string;
|
|
135
|
+
};
|
|
136
|
+
type PaginationFirstProps = React.ComponentProps<'button'> & {
|
|
137
|
+
/** Visual style of the button */
|
|
138
|
+
variant?: ControlVariant;
|
|
139
|
+
/** Size of the button */
|
|
140
|
+
size?: ControlSize;
|
|
141
|
+
};
|
|
142
|
+
declare const PaginationFirst: {
|
|
143
|
+
({
|
|
144
|
+
className,
|
|
145
|
+
disabled,
|
|
146
|
+
variant,
|
|
147
|
+
size,
|
|
148
|
+
children,
|
|
149
|
+
...props
|
|
150
|
+
}: PaginationFirstProps): react_jsx_runtime82.JSX.Element;
|
|
151
|
+
displayName: string;
|
|
152
|
+
};
|
|
153
|
+
type PaginationLastProps = React.ComponentProps<'button'> & {
|
|
154
|
+
/** Visual style of the button */
|
|
155
|
+
variant?: ControlVariant;
|
|
156
|
+
/** Size of the button */
|
|
157
|
+
size?: ControlSize;
|
|
158
|
+
};
|
|
159
|
+
declare const PaginationLast: {
|
|
160
|
+
({
|
|
161
|
+
className,
|
|
162
|
+
disabled,
|
|
163
|
+
variant,
|
|
164
|
+
size,
|
|
165
|
+
children,
|
|
166
|
+
...props
|
|
167
|
+
}: PaginationLastProps): react_jsx_runtime82.JSX.Element;
|
|
168
|
+
displayName: string;
|
|
169
|
+
};
|
|
170
|
+
type PaginationEllipsisProps = React.ComponentProps<'span'> & {
|
|
171
|
+
/** Size of the ellipsis container */
|
|
172
|
+
size?: ControlSize;
|
|
173
|
+
};
|
|
174
|
+
declare const PaginationEllipsis: {
|
|
175
|
+
({
|
|
176
|
+
className,
|
|
177
|
+
size,
|
|
178
|
+
...props
|
|
179
|
+
}: PaginationEllipsisProps): react_jsx_runtime82.JSX.Element;
|
|
180
|
+
displayName: string;
|
|
181
|
+
};
|
|
182
|
+
//#endregion
|
|
183
|
+
export { PaginationButton, type PaginationButtonProps, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationFirst, type PaginationFirstProps, PaginationItem, type PaginationItemProps, PaginationLast, type PaginationLastProps, PaginationNext, type PaginationNextProps, type PaginationPage, PaginationPrevious, type PaginationPreviousProps, PaginationRoot, type PaginationRootProps, type UsePaginationOptions, type UsePaginationReturn, usePagination };
|
|
184
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","names":[],"sources":["../src/components/pagination.tsx"],"sourcesContent":[],"mappings":";;;;;KAeK,cAAA;KAIA,oBAAA;;EAJA,WAAA,EAAA,MAAc;EAId;EAiBA,UAAA,EAAA,MAAA;EA4EI;EAAa,YAAA,CAAA,EAAA,MAAA;;cAEpB,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,GAAA,IAAA;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,CAAM,cAAT,CAAA,QAAA,CAAA,GAAA;;SAEZ,CAAA,EAAA,cAAA;;EAEQ,IAAA,CAAA,EAAX,WAAW;AAAA,CAAA;cAGd,cAwBL,EAAA;;;;;;;;KAjBE,sBAAmB,mBAAA,CAAA,GAAA,CAAA;;;KAyBjB,uBAAA,GAA0B,KAAA,CAAM;;MAzBlC,CAAA,EA2BM,WA3BN;;cA8BG,kBA9BgB,EAAA;EAyBjB,CAAA;IAAA,SAAA;IAAA,IAAA;IAAA,GAAA;EAAuB,CAAA,EASzB,uBATyB,CAAA,EASF,mBAAA,CAAA,GAAA,CAAA,OATE;EAAA,WAAA,EAAA,MAAA"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import { controlVariants } from "./lib/control-variants.js";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/pagination.tsx
|
|
9
|
+
const DEFAULT_PAGE_SIZE_OPTIONS = [
|
|
10
|
+
10,
|
|
11
|
+
25,
|
|
12
|
+
50,
|
|
13
|
+
100
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* Generate page numbers with ellipsis for pagination display
|
|
17
|
+
*/
|
|
18
|
+
function computePageRange(currentPage, totalPages, siblingCount) {
|
|
19
|
+
if (totalPages <= 1) return [1];
|
|
20
|
+
if (totalPages <= 7) return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
21
|
+
const result = [];
|
|
22
|
+
const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
|
|
23
|
+
const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages);
|
|
24
|
+
const shouldShowLeftEllipsis = leftSiblingIndex > 2;
|
|
25
|
+
const shouldShowRightEllipsis = rightSiblingIndex < totalPages - 1;
|
|
26
|
+
result.push(1);
|
|
27
|
+
if (shouldShowLeftEllipsis) result.push("ellipsis");
|
|
28
|
+
for (let i = leftSiblingIndex; i <= rightSiblingIndex; i++) if (i !== 1 && i !== totalPages) result.push(i);
|
|
29
|
+
if (shouldShowRightEllipsis) result.push("ellipsis");
|
|
30
|
+
if (totalPages > 1) result.push(totalPages);
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
function usePagination({ currentPage, totalPages, siblingCount = 1, onPageChange, pageSize = DEFAULT_PAGE_SIZE_OPTIONS[0], pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS, onPageSizeChange }) {
|
|
34
|
+
const pages = React.useMemo(() => computePageRange(currentPage, totalPages, siblingCount), [
|
|
35
|
+
currentPage,
|
|
36
|
+
totalPages,
|
|
37
|
+
siblingCount
|
|
38
|
+
]);
|
|
39
|
+
const setPageSize = React.useCallback((size) => {
|
|
40
|
+
onPageSizeChange?.(size);
|
|
41
|
+
}, [onPageSizeChange]);
|
|
42
|
+
return {
|
|
43
|
+
pages,
|
|
44
|
+
currentPage,
|
|
45
|
+
totalPages,
|
|
46
|
+
canGoNext: currentPage < totalPages,
|
|
47
|
+
canGoPrevious: currentPage > 1,
|
|
48
|
+
goToPage: onPageChange,
|
|
49
|
+
goToNext: () => onPageChange(Math.min(currentPage + 1, totalPages)),
|
|
50
|
+
goToPrevious: () => onPageChange(Math.max(currentPage - 1, 1)),
|
|
51
|
+
goToFirst: () => onPageChange(1),
|
|
52
|
+
goToLast: () => onPageChange(totalPages),
|
|
53
|
+
pageSize,
|
|
54
|
+
pageSizeOptions,
|
|
55
|
+
setPageSize
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const PaginationRoot = ({ className, ...props }) => {
|
|
59
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
60
|
+
"aria-label": "pagination",
|
|
61
|
+
className,
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
PaginationRoot.displayName = "PaginationRoot";
|
|
66
|
+
const PaginationContent = ({ className, ...props }) => {
|
|
67
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
68
|
+
role: "list",
|
|
69
|
+
className: cn("flex flex-row flex-wrap items-center gap-1 w-fit", className),
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
PaginationContent.displayName = "PaginationContent";
|
|
74
|
+
const PaginationItem = ({ className, ...props }) => {
|
|
75
|
+
return /* @__PURE__ */ jsx("li", {
|
|
76
|
+
className: cn("", className),
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
PaginationItem.displayName = "PaginationItem";
|
|
81
|
+
const PaginationButton = ({ className, isActive, variant, size = "icon-sm", ...props }) => {
|
|
82
|
+
return /* @__PURE__ */ jsx("button", {
|
|
83
|
+
type: "button",
|
|
84
|
+
"aria-current": isActive ? "page" : void 0,
|
|
85
|
+
className: cn(controlVariants({
|
|
86
|
+
variant,
|
|
87
|
+
size
|
|
88
|
+
}), className),
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
PaginationButton.displayName = "PaginationButton";
|
|
93
|
+
const PaginationPrevious = ({ className, disabled, variant, size = "icon-sm", children, ...props }) => {
|
|
94
|
+
return /* @__PURE__ */ jsx("button", {
|
|
95
|
+
type: "button",
|
|
96
|
+
"aria-label": "Go to previous page",
|
|
97
|
+
"aria-disabled": disabled || void 0,
|
|
98
|
+
disabled,
|
|
99
|
+
className: cn(controlVariants({
|
|
100
|
+
variant,
|
|
101
|
+
size
|
|
102
|
+
}), disabled && "pointer-events-none opacity-50", className),
|
|
103
|
+
...props,
|
|
104
|
+
children
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
108
|
+
const PaginationNext = ({ className, disabled, variant, size = "icon-sm", children, ...props }) => {
|
|
109
|
+
return /* @__PURE__ */ jsx("button", {
|
|
110
|
+
type: "button",
|
|
111
|
+
"aria-label": "Go to next page",
|
|
112
|
+
"aria-disabled": disabled || void 0,
|
|
113
|
+
disabled,
|
|
114
|
+
className: cn(controlVariants({
|
|
115
|
+
variant,
|
|
116
|
+
size
|
|
117
|
+
}), disabled && "pointer-events-none opacity-50", className),
|
|
118
|
+
...props,
|
|
119
|
+
children
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
PaginationNext.displayName = "PaginationNext";
|
|
123
|
+
const PaginationFirst = ({ className, disabled, variant, size = "icon-sm", children, ...props }) => {
|
|
124
|
+
return /* @__PURE__ */ jsx("button", {
|
|
125
|
+
type: "button",
|
|
126
|
+
"aria-label": "Go to first page",
|
|
127
|
+
"aria-disabled": disabled || void 0,
|
|
128
|
+
disabled,
|
|
129
|
+
className: cn(controlVariants({
|
|
130
|
+
variant,
|
|
131
|
+
size
|
|
132
|
+
}), disabled && "pointer-events-none opacity-50", className),
|
|
133
|
+
...props,
|
|
134
|
+
children
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
PaginationFirst.displayName = "PaginationFirst";
|
|
138
|
+
const PaginationLast = ({ className, disabled, variant, size = "icon-sm", children, ...props }) => {
|
|
139
|
+
return /* @__PURE__ */ jsx("button", {
|
|
140
|
+
type: "button",
|
|
141
|
+
"aria-label": "Go to last page",
|
|
142
|
+
"aria-disabled": disabled || void 0,
|
|
143
|
+
disabled,
|
|
144
|
+
className: cn(controlVariants({
|
|
145
|
+
variant,
|
|
146
|
+
size
|
|
147
|
+
}), disabled && "pointer-events-none opacity-50", className),
|
|
148
|
+
...props,
|
|
149
|
+
children
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
PaginationLast.displayName = "PaginationLast";
|
|
153
|
+
const PaginationEllipsis = ({ className, size = "icon-sm", ...props }) => {
|
|
154
|
+
return /* @__PURE__ */ jsx("span", {
|
|
155
|
+
"aria-hidden": "true",
|
|
156
|
+
className: cn(controlVariants({ size }), "border-transparent bg-transparent shadow-none", className),
|
|
157
|
+
...props
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
161
|
+
|
|
162
|
+
//#endregion
|
|
163
|
+
export { PaginationButton, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationNext, PaginationPrevious, PaginationRoot, usePagination };
|
|
164
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","names":[],"sources":["../src/components/pagination.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\n\nimport {\n type ControlSize,\n type ControlVariant,\n controlVariants,\n} from '../lib/control-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// usePagination Hook\n// ============================================================================\n\ntype PaginationPage = number | 'ellipsis'\n\nconst DEFAULT_PAGE_SIZE_OPTIONS = [10, 25, 50, 100]\n\ntype UsePaginationOptions = {\n /** Current active page (1-indexed) */\n currentPage: number\n /** Total number of pages */\n totalPages: number\n /** Number of pages to show on each side of current page (default: 1) */\n siblingCount?: number\n /** Callback when page changes */\n onPageChange: (page: number) => void\n /** Current page size */\n pageSize?: number\n /** Available page size options (default: [10, 25, 50, 100]) */\n pageSizeOptions?: number[]\n /** Callback when page size changes */\n onPageSizeChange?: (pageSize: number) => void\n}\n\ntype UsePaginationReturn = {\n /** Array of page numbers and 'ellipsis' markers */\n pages: PaginationPage[]\n /** Current active page */\n currentPage: number\n /** Total number of pages */\n totalPages: number\n /** Whether navigation to next page is possible */\n canGoNext: boolean\n /** Whether navigation to previous page is possible */\n canGoPrevious: boolean\n /** Navigate to a specific page */\n goToPage: (page: number) => void\n /** Navigate to the next page */\n goToNext: () => void\n /** Navigate to the previous page */\n goToPrevious: () => void\n /** Navigate to the first page */\n goToFirst: () => void\n /** Navigate to the last page */\n goToLast: () => void\n /** Current page size */\n pageSize: number\n /** Available page size options */\n pageSizeOptions: number[]\n /** Set page size (calls onPageSizeChange if provided) */\n setPageSize: (size: number) => void\n}\n\n/**\n * Generate page numbers with ellipsis for pagination display\n */\nfunction computePageRange(\n currentPage: number,\n totalPages: number,\n siblingCount: number,\n): PaginationPage[] {\n if (totalPages <= 1) return [1]\n if (totalPages <= 7) {\n // Show all pages if 7 or fewer\n return Array.from({ length: totalPages }, (_, i) => i + 1)\n }\n\n const result: PaginationPage[] = []\n const leftSiblingIndex = Math.max(currentPage - siblingCount, 1)\n const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages)\n\n const shouldShowLeftEllipsis = leftSiblingIndex > 2\n const shouldShowRightEllipsis = rightSiblingIndex < totalPages - 1\n\n // Always show first page\n result.push(1)\n\n if (shouldShowLeftEllipsis) {\n result.push('ellipsis')\n }\n\n // Add pages around current page (excluding first and last which are handled separately)\n for (let i = leftSiblingIndex; i <= rightSiblingIndex; i++) {\n if (i !== 1 && i !== totalPages) {\n result.push(i)\n }\n }\n\n if (shouldShowRightEllipsis) {\n result.push('ellipsis')\n }\n\n // Always show last page\n if (totalPages > 1) {\n result.push(totalPages)\n }\n\n return result\n}\n\nfunction usePagination({\n currentPage,\n totalPages,\n siblingCount = 1,\n onPageChange,\n pageSize = DEFAULT_PAGE_SIZE_OPTIONS[0],\n pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS,\n onPageSizeChange,\n}: UsePaginationOptions): UsePaginationReturn {\n const pages = React.useMemo(\n () => computePageRange(currentPage, totalPages, siblingCount),\n [currentPage, totalPages, siblingCount],\n )\n\n const setPageSize = React.useCallback(\n (size: number) => {\n onPageSizeChange?.(size)\n },\n [onPageSizeChange],\n )\n\n return {\n pages,\n currentPage,\n totalPages,\n canGoNext: currentPage < totalPages,\n canGoPrevious: currentPage > 1,\n goToPage: onPageChange,\n goToNext: () => onPageChange(Math.min(currentPage + 1, totalPages)),\n goToPrevious: () => onPageChange(Math.max(currentPage - 1, 1)),\n goToFirst: () => onPageChange(1),\n goToLast: () => onPageChange(totalPages),\n pageSize,\n pageSizeOptions,\n setPageSize,\n }\n}\n\n// ============================================================================\n// PaginationRoot\n// ============================================================================\n\ntype PaginationRootProps = React.ComponentProps<'nav'>\n\nconst PaginationRoot = ({ className, ...props }: PaginationRootProps) => {\n return <nav aria-label='pagination' className={className} {...props} />\n}\n\nPaginationRoot.displayName = 'PaginationRoot'\n\n// ============================================================================\n// PaginationContent\n// ============================================================================\n\ntype PaginationContentProps = React.ComponentProps<'ul'>\n\nconst PaginationContent = ({ className, ...props }: PaginationContentProps) => {\n return (\n <ul\n role='list'\n className={cn('flex flex-row flex-wrap items-center gap-1 w-fit', className)}\n {...props}\n />\n )\n}\n\nPaginationContent.displayName = 'PaginationContent'\n\n// ============================================================================\n// PaginationItem\n// ============================================================================\n\ntype PaginationItemProps = React.ComponentProps<'li'>\n\nconst PaginationItem = ({ className, ...props }: PaginationItemProps) => {\n return <li className={cn('', className)} {...props} />\n}\n\nPaginationItem.displayName = 'PaginationItem'\n\n// ============================================================================\n// PaginationButton (page number button)\n// ============================================================================\n\ntype PaginationButtonProps = React.ComponentProps<'button'> & {\n /** Whether this button represents the current active page */\n isActive?: boolean\n /** Visual style of the button */\n variant?: ControlVariant\n /** Size of the button */\n size?: ControlSize\n}\n\nconst PaginationButton = ({\n className,\n isActive,\n variant,\n size = 'icon-sm',\n ...props\n}: PaginationButtonProps) => {\n return (\n <button\n type='button'\n aria-current={isActive ? 'page' : undefined}\n className={cn(controlVariants({ variant, size }), className)}\n {...props}\n />\n )\n}\n\nPaginationButton.displayName = 'PaginationButton'\n\n// ============================================================================\n// PaginationPrevious\n// ============================================================================\n\ntype PaginationPreviousProps = React.ComponentProps<'button'> & {\n /** Visual style of the button */\n variant?: ControlVariant\n /** Size of the button */\n size?: ControlSize\n}\n\nconst PaginationPrevious = ({\n className,\n disabled,\n variant,\n size = 'icon-sm',\n children,\n ...props\n}: PaginationPreviousProps) => {\n return (\n <button\n type='button'\n aria-label='Go to previous page'\n aria-disabled={disabled || undefined}\n disabled={disabled}\n className={cn(\n controlVariants({ variant, size }),\n disabled && 'pointer-events-none opacity-50',\n className,\n )}\n {...props}\n >\n {children}\n </button>\n )\n}\n\nPaginationPrevious.displayName = 'PaginationPrevious'\n\n// ============================================================================\n// PaginationNext\n// ============================================================================\n\ntype PaginationNextProps = React.ComponentProps<'button'> & {\n /** Visual style of the button */\n variant?: ControlVariant\n /** Size of the button */\n size?: ControlSize\n}\n\nconst PaginationNext = ({\n className,\n disabled,\n variant,\n size = 'icon-sm',\n children,\n ...props\n}: PaginationNextProps) => {\n return (\n <button\n type='button'\n aria-label='Go to next page'\n aria-disabled={disabled || undefined}\n disabled={disabled}\n className={cn(\n controlVariants({ variant, size }),\n disabled && 'pointer-events-none opacity-50',\n className,\n )}\n {...props}\n >\n {children}\n </button>\n )\n}\n\nPaginationNext.displayName = 'PaginationNext'\n\n// ============================================================================\n// PaginationFirst\n// ============================================================================\n\ntype PaginationFirstProps = React.ComponentProps<'button'> & {\n /** Visual style of the button */\n variant?: ControlVariant\n /** Size of the button */\n size?: ControlSize\n}\n\nconst PaginationFirst = ({\n className,\n disabled,\n variant,\n size = 'icon-sm',\n children,\n ...props\n}: PaginationFirstProps) => {\n return (\n <button\n type='button'\n aria-label='Go to first page'\n aria-disabled={disabled || undefined}\n disabled={disabled}\n className={cn(\n controlVariants({ variant, size }),\n disabled && 'pointer-events-none opacity-50',\n className,\n )}\n {...props}\n >\n {children}\n </button>\n )\n}\n\nPaginationFirst.displayName = 'PaginationFirst'\n\n// ============================================================================\n// PaginationLast\n// ============================================================================\n\ntype PaginationLastProps = React.ComponentProps<'button'> & {\n /** Visual style of the button */\n variant?: ControlVariant\n /** Size of the button */\n size?: ControlSize\n}\n\nconst PaginationLast = ({\n className,\n disabled,\n variant,\n size = 'icon-sm',\n children,\n ...props\n}: PaginationLastProps) => {\n return (\n <button\n type='button'\n aria-label='Go to last page'\n aria-disabled={disabled || undefined}\n disabled={disabled}\n className={cn(\n controlVariants({ variant, size }),\n disabled && 'pointer-events-none opacity-50',\n className,\n )}\n {...props}\n >\n {children}\n </button>\n )\n}\n\nPaginationLast.displayName = 'PaginationLast'\n\n// ============================================================================\n// PaginationEllipsis\n// ============================================================================\n\ntype PaginationEllipsisProps = React.ComponentProps<'span'> & {\n /** Size of the ellipsis container */\n size?: ControlSize\n}\n\nconst PaginationEllipsis = ({\n className,\n size = 'icon-sm',\n ...props\n}: PaginationEllipsisProps) => {\n return (\n <span\n aria-hidden='true'\n className={cn(\n controlVariants({ size }),\n 'border-transparent bg-transparent shadow-none',\n className,\n )}\n {...props}\n />\n )\n}\n\nPaginationEllipsis.displayName = 'PaginationEllipsis'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n // eslint-disable-next-line react-refresh/only-export-components\n usePagination,\n PaginationRoot,\n PaginationContent,\n PaginationItem,\n PaginationButton,\n PaginationPrevious,\n PaginationNext,\n PaginationFirst,\n PaginationLast,\n PaginationEllipsis,\n}\n\nexport type {\n PaginationPage,\n UsePaginationOptions,\n UsePaginationReturn,\n PaginationRootProps,\n PaginationContentProps,\n PaginationItemProps,\n PaginationButtonProps,\n PaginationPreviousProps,\n PaginationNextProps,\n PaginationFirstProps,\n PaginationLastProps,\n PaginationEllipsisProps,\n}\n"],"mappings":";;;;;;;;AAiBA,MAAM,4BAA4B;CAAC;CAAI;CAAI;CAAI;CAAI;;;;AAmDnD,SAAS,iBACP,aACA,YACA,cACkB;AAClB,KAAI,cAAc,EAAG,QAAO,CAAC,EAAE;AAC/B,KAAI,cAAc,EAEhB,QAAO,MAAM,KAAK,EAAE,QAAQ,YAAY,GAAG,GAAG,MAAM,IAAI,EAAE;CAG5D,MAAM,SAA2B,EAAE;CACnC,MAAM,mBAAmB,KAAK,IAAI,cAAc,cAAc,EAAE;CAChE,MAAM,oBAAoB,KAAK,IAAI,cAAc,cAAc,WAAW;CAE1E,MAAM,yBAAyB,mBAAmB;CAClD,MAAM,0BAA0B,oBAAoB,aAAa;AAGjE,QAAO,KAAK,EAAE;AAEd,KAAI,uBACF,QAAO,KAAK,WAAW;AAIzB,MAAK,IAAI,IAAI,kBAAkB,KAAK,mBAAmB,IACrD,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;;AAIN,mBAAmB,cAAc"}
|
package/dist/popover.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime162 from "react/jsx-runtime";
|
|
3
3
|
import { Popover } from "@base-ui/react/popover";
|
|
4
4
|
|
|
5
5
|
//#region src/components/popover.d.ts
|
|
6
6
|
type PopoverRootProps = React.ComponentProps<typeof Popover.Root>;
|
|
7
7
|
declare const PopoverRoot: {
|
|
8
|
-
(props: PopoverRootProps):
|
|
8
|
+
(props: PopoverRootProps): react_jsx_runtime162.JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
type PopoverTriggerProps = React.ComponentProps<typeof Popover.Trigger>;
|
|
@@ -13,12 +13,12 @@ declare const PopoverTrigger: {
|
|
|
13
13
|
({
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: PopoverTriggerProps):
|
|
16
|
+
}: PopoverTriggerProps): react_jsx_runtime162.JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
type PopoverPortalProps = React.ComponentProps<typeof Popover.Portal>;
|
|
20
20
|
declare const PopoverPortal: {
|
|
21
|
-
(props: PopoverPortalProps):
|
|
21
|
+
(props: PopoverPortalProps): react_jsx_runtime162.JSX.Element;
|
|
22
22
|
displayName: string;
|
|
23
23
|
};
|
|
24
24
|
type PopoverBackdropProps = React.ComponentProps<typeof Popover.Backdrop>;
|
|
@@ -26,7 +26,7 @@ declare const PopoverBackdrop: {
|
|
|
26
26
|
({
|
|
27
27
|
className,
|
|
28
28
|
...props
|
|
29
|
-
}: PopoverBackdropProps):
|
|
29
|
+
}: PopoverBackdropProps): react_jsx_runtime162.JSX.Element;
|
|
30
30
|
displayName: string;
|
|
31
31
|
};
|
|
32
32
|
type PopoverPositionerProps = React.ComponentProps<typeof Popover.Positioner>;
|
|
@@ -34,7 +34,7 @@ declare const PopoverPositioner: {
|
|
|
34
34
|
({
|
|
35
35
|
className,
|
|
36
36
|
...props
|
|
37
|
-
}: PopoverPositionerProps):
|
|
37
|
+
}: PopoverPositionerProps): react_jsx_runtime162.JSX.Element;
|
|
38
38
|
displayName: string;
|
|
39
39
|
};
|
|
40
40
|
type PopoverPopupProps = React.ComponentProps<typeof Popover.Popup>;
|
|
@@ -42,7 +42,7 @@ declare const PopoverPopup: {
|
|
|
42
42
|
({
|
|
43
43
|
className,
|
|
44
44
|
...props
|
|
45
|
-
}: PopoverPopupProps):
|
|
45
|
+
}: PopoverPopupProps): react_jsx_runtime162.JSX.Element;
|
|
46
46
|
displayName: string;
|
|
47
47
|
};
|
|
48
48
|
type PopoverArrowProps = React.ComponentProps<typeof Popover.Arrow>;
|
|
@@ -50,7 +50,7 @@ declare const PopoverArrow: {
|
|
|
50
50
|
({
|
|
51
51
|
className,
|
|
52
52
|
...props
|
|
53
|
-
}: PopoverArrowProps):
|
|
53
|
+
}: PopoverArrowProps): react_jsx_runtime162.JSX.Element;
|
|
54
54
|
displayName: string;
|
|
55
55
|
};
|
|
56
56
|
type PopoverTitleProps = React.ComponentProps<typeof Popover.Title>;
|
|
@@ -58,7 +58,7 @@ declare const PopoverTitle: {
|
|
|
58
58
|
({
|
|
59
59
|
className,
|
|
60
60
|
...props
|
|
61
|
-
}: PopoverTitleProps):
|
|
61
|
+
}: PopoverTitleProps): react_jsx_runtime162.JSX.Element;
|
|
62
62
|
displayName: string;
|
|
63
63
|
};
|
|
64
64
|
type PopoverDescriptionProps = React.ComponentProps<typeof Popover.Description>;
|
|
@@ -66,7 +66,7 @@ declare const PopoverDescription: {
|
|
|
66
66
|
({
|
|
67
67
|
className,
|
|
68
68
|
...props
|
|
69
|
-
}: PopoverDescriptionProps):
|
|
69
|
+
}: PopoverDescriptionProps): react_jsx_runtime162.JSX.Element;
|
|
70
70
|
displayName: string;
|
|
71
71
|
};
|
|
72
72
|
type PopoverCloseProps = React.ComponentProps<typeof Popover.Close>;
|
|
@@ -74,7 +74,7 @@ declare const PopoverClose: {
|
|
|
74
74
|
({
|
|
75
75
|
className,
|
|
76
76
|
...props
|
|
77
|
-
}: PopoverCloseProps):
|
|
77
|
+
}: PopoverCloseProps): react_jsx_runtime162.JSX.Element;
|
|
78
78
|
displayName: string;
|
|
79
79
|
};
|
|
80
80
|
type PopoverViewportProps = React.ComponentProps<typeof Popover.Viewport>;
|
|
@@ -82,7 +82,7 @@ declare const PopoverViewport: {
|
|
|
82
82
|
({
|
|
83
83
|
className,
|
|
84
84
|
...props
|
|
85
|
-
}: PopoverViewportProps):
|
|
85
|
+
}: PopoverViewportProps): react_jsx_runtime162.JSX.Element;
|
|
86
86
|
displayName: string;
|
|
87
87
|
};
|
|
88
88
|
//#endregion
|
package/dist/preview-card.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime173 from "react/jsx-runtime";
|
|
3
3
|
import { PreviewCard } from "@base-ui/react/preview-card";
|
|
4
4
|
|
|
5
5
|
//#region src/components/preview-card.d.ts
|
|
6
6
|
type PreviewCardRootProps = React.ComponentProps<typeof PreviewCard.Root>;
|
|
7
7
|
declare const PreviewCardRoot: {
|
|
8
|
-
(props: PreviewCardRootProps):
|
|
8
|
+
(props: PreviewCardRootProps): react_jsx_runtime173.JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
type PreviewCardTriggerProps = React.ComponentProps<typeof PreviewCard.Trigger>;
|
|
@@ -13,12 +13,12 @@ declare const PreviewCardTrigger: {
|
|
|
13
13
|
({
|
|
14
14
|
className,
|
|
15
15
|
...props
|
|
16
|
-
}: PreviewCardTriggerProps):
|
|
16
|
+
}: PreviewCardTriggerProps): react_jsx_runtime173.JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
type PreviewCardPortalProps = React.ComponentProps<typeof PreviewCard.Portal>;
|
|
20
20
|
declare const PreviewCardPortal: {
|
|
21
|
-
(props: PreviewCardPortalProps):
|
|
21
|
+
(props: PreviewCardPortalProps): react_jsx_runtime173.JSX.Element;
|
|
22
22
|
displayName: string;
|
|
23
23
|
};
|
|
24
24
|
type PreviewCardBackdropProps = React.ComponentProps<typeof PreviewCard.Backdrop>;
|
|
@@ -26,7 +26,7 @@ declare const PreviewCardBackdrop: {
|
|
|
26
26
|
({
|
|
27
27
|
className,
|
|
28
28
|
...props
|
|
29
|
-
}: PreviewCardBackdropProps):
|
|
29
|
+
}: PreviewCardBackdropProps): react_jsx_runtime173.JSX.Element;
|
|
30
30
|
displayName: string;
|
|
31
31
|
};
|
|
32
32
|
type PreviewCardPositionerProps = React.ComponentProps<typeof PreviewCard.Positioner>;
|
|
@@ -34,7 +34,7 @@ declare const PreviewCardPositioner: {
|
|
|
34
34
|
({
|
|
35
35
|
className,
|
|
36
36
|
...props
|
|
37
|
-
}: PreviewCardPositionerProps):
|
|
37
|
+
}: PreviewCardPositionerProps): react_jsx_runtime173.JSX.Element;
|
|
38
38
|
displayName: string;
|
|
39
39
|
};
|
|
40
40
|
type PreviewCardPopupProps = React.ComponentProps<typeof PreviewCard.Popup>;
|
|
@@ -42,7 +42,7 @@ declare const PreviewCardPopup: {
|
|
|
42
42
|
({
|
|
43
43
|
className,
|
|
44
44
|
...props
|
|
45
|
-
}: PreviewCardPopupProps):
|
|
45
|
+
}: PreviewCardPopupProps): react_jsx_runtime173.JSX.Element;
|
|
46
46
|
displayName: string;
|
|
47
47
|
};
|
|
48
48
|
type PreviewCardArrowProps = React.ComponentProps<typeof PreviewCard.Arrow>;
|
|
@@ -50,7 +50,7 @@ declare const PreviewCardArrow: {
|
|
|
50
50
|
({
|
|
51
51
|
className,
|
|
52
52
|
...props
|
|
53
|
-
}: PreviewCardArrowProps):
|
|
53
|
+
}: PreviewCardArrowProps): react_jsx_runtime173.JSX.Element;
|
|
54
54
|
displayName: string;
|
|
55
55
|
};
|
|
56
56
|
//#endregion
|
package/dist/progress.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime68 from "react/jsx-runtime";
|
|
3
3
|
import { Progress } from "@base-ui/react/progress";
|
|
4
4
|
|
|
5
5
|
//#region src/components/progress.d.ts
|
|
@@ -8,7 +8,7 @@ declare const ProgressRoot: {
|
|
|
8
8
|
({
|
|
9
9
|
className,
|
|
10
10
|
...props
|
|
11
|
-
}: ProgressRootProps):
|
|
11
|
+
}: ProgressRootProps): react_jsx_runtime68.JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
type ProgressTrackProps = React.ComponentProps<typeof Progress.Track>;
|
|
@@ -16,7 +16,7 @@ declare const ProgressTrack: {
|
|
|
16
16
|
({
|
|
17
17
|
className,
|
|
18
18
|
...props
|
|
19
|
-
}: ProgressTrackProps):
|
|
19
|
+
}: ProgressTrackProps): react_jsx_runtime68.JSX.Element;
|
|
20
20
|
displayName: string;
|
|
21
21
|
};
|
|
22
22
|
type ProgressIndicatorProps = React.ComponentProps<typeof Progress.Indicator>;
|
|
@@ -24,7 +24,7 @@ declare const ProgressIndicator: {
|
|
|
24
24
|
({
|
|
25
25
|
className,
|
|
26
26
|
...props
|
|
27
|
-
}: ProgressIndicatorProps):
|
|
27
|
+
}: ProgressIndicatorProps): react_jsx_runtime68.JSX.Element;
|
|
28
28
|
displayName: string;
|
|
29
29
|
};
|
|
30
30
|
type ProgressValueProps = React.ComponentProps<typeof Progress.Value>;
|
|
@@ -32,7 +32,7 @@ declare const ProgressValue: {
|
|
|
32
32
|
({
|
|
33
33
|
className,
|
|
34
34
|
...props
|
|
35
|
-
}: ProgressValueProps):
|
|
35
|
+
}: ProgressValueProps): react_jsx_runtime68.JSX.Element;
|
|
36
36
|
displayName: string;
|
|
37
37
|
};
|
|
38
38
|
type ProgressLabelProps = React.ComponentProps<typeof Progress.Label>;
|
|
@@ -40,7 +40,7 @@ declare const ProgressLabel: {
|
|
|
40
40
|
({
|
|
41
41
|
className,
|
|
42
42
|
...props
|
|
43
|
-
}: ProgressLabelProps):
|
|
43
|
+
}: ProgressLabelProps): react_jsx_runtime68.JSX.Element;
|
|
44
44
|
displayName: string;
|
|
45
45
|
};
|
|
46
46
|
//#endregion
|
package/dist/progress.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","names":[],"sources":["../src/components/progress.tsx"],"sourcesContent":[],"mappings":";;;;;KAWK,iBAAA,GAAoB,KAAA,CAAM,sBAAsB,QAAA,CAAa;cAE5D;;;;KAAyC,oBAAiB,
|
|
1
|
+
{"version":3,"file":"progress.d.ts","names":[],"sources":["../src/components/progress.tsx"],"sourcesContent":[],"mappings":";;;;;KAWK,iBAAA,GAAoB,KAAA,CAAM,sBAAsB,QAAA,CAAa;cAE5D;;;;KAAyC,oBAAiB,mBAAA,CAAA,GAAA,CAAA;EAF3D,WAAA,EAAA,MAAA;CAAiB;KAYjB,kBAAA,GAAqB,KAAA,CAAM,cAZkC,CAAA,OAYZ,QAAA,CAAa,KAZD,CAAA;cAc5D,aAdyB,EAAA;EAAc,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EAcG,kBAdH,CAAA,EAcqB,mBAAA,CAAA,GAAA,CAAA,OAdrB;EAEvC,WAAA,EAAA,MAEL;CAAA;KA4BI,sBAAA,GAAyB,KAAA,CAAM,sBAAsB,QAAA,CAAa;cAEjE,iBAhCyC,EAAA;;IAAiB,SAAA;IAAA,GAAA;EAAA,CAAA,EAgCZ,sBAhCY,CAAA,EAgCU,mBAAA,CAAA,GAAA,CAAA,OAhCV;EAAA,WAAA,EAAA,MAAA;AAAA,CAAA;KAkD3D,kBAAA,GAAqB,KAAA,CAAM,cAxCT,CAAA,OAwC+B,QAAA,CAAa,KAxC5C,CAAA;cA0CjB,aA1C6D,EAAA;;IAAzC,SAAM;IAAA,GAAA;EAAA,CAAA,EA0CgB,kBA1ChB,CAAA,EA0CkC,mBAAA,CAAA,GAAA,CAAA,OA1ClC;EAAc,WAAA,EAAA,MAAA;AAAA,CAAA;KAyDzC,kBAAA,GAAqB,KAAA,CAAM,cA7C/B,CAAA,OA6CqD,QAAA,CAAa,KA7ClE,CAAA;cA+CK;;IAzD0C,SAAA;IAAA,GAAA;EAAA,CAAA,EAyDA,kBAzDA,CAAA,EAyDkB,mBAAA,CAAA,GAAA,CAAA,OAzDlB;aAAkB,EAAA,MAAA;CAAA"}
|
package/dist/radio-group.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime75 from "react/jsx-runtime";
|
|
3
3
|
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
4
4
|
|
|
5
5
|
//#region src/components/radio-group.d.ts
|
|
@@ -8,7 +8,7 @@ declare const RadioGroupRoot: {
|
|
|
8
8
|
({
|
|
9
9
|
className,
|
|
10
10
|
...props
|
|
11
|
-
}: RadioGroupRootProps):
|
|
11
|
+
}: RadioGroupRootProps): react_jsx_runtime75.JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","names":[],"sources":["../src/components/radio-group.tsx"],"sourcesContent":[],"mappings":";;;;;KAWK,mBAAA,GAAsB,KAAA,CAAM,sBAAsB;cAEjD;;;;KAA2C,sBAAmB,
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","names":[],"sources":["../src/components/radio-group.tsx"],"sourcesContent":[],"mappings":";;;;;KAWK,mBAAA,GAAsB,KAAA,CAAM,sBAAsB;cAEjD;;;;KAA2C,sBAAmB,mBAAA,CAAA,GAAA,CAAA;EAF/D,WAAA,EAAA,MAAA;CAAmB"}
|
package/dist/radio.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime73 from "react/jsx-runtime";
|
|
3
3
|
import { Radio } from "@base-ui/react/radio";
|
|
4
4
|
|
|
5
5
|
//#region src/components/radio.d.ts
|
|
@@ -8,7 +8,7 @@ declare const RadioRoot: {
|
|
|
8
8
|
({
|
|
9
9
|
className,
|
|
10
10
|
...props
|
|
11
|
-
}: RadioRootProps):
|
|
11
|
+
}: RadioRootProps): react_jsx_runtime73.JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
type RadioIndicatorProps = React.ComponentProps<typeof Radio.Indicator>;
|
|
@@ -16,7 +16,7 @@ declare const RadioIndicator: {
|
|
|
16
16
|
({
|
|
17
17
|
className,
|
|
18
18
|
...props
|
|
19
|
-
}: RadioIndicatorProps):
|
|
19
|
+
}: RadioIndicatorProps): react_jsx_runtime73.JSX.Element;
|
|
20
20
|
displayName: string;
|
|
21
21
|
};
|
|
22
22
|
//#endregion
|
package/dist/radio.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","names":[],"sources":["../src/components/radio.tsx"],"sourcesContent":[],"mappings":";;;;;KAWK,cAAA,GAAiB,KAAA,CAAM,sBAAsB,KAAA,CAAU;cAEtD;;;;KAAsC,iBAAc,
|
|
1
|
+
{"version":3,"file":"radio.d.ts","names":[],"sources":["../src/components/radio.tsx"],"sourcesContent":[],"mappings":";;;;;KAWK,cAAA,GAAiB,KAAA,CAAM,sBAAsB,KAAA,CAAU;cAEtD;;;;KAAsC,iBAAc,mBAAA,CAAA,GAAA,CAAA;EAFrD,WAAA,EAAA,MAAc;CAAA;KAwBd,mBAAA,GAAsB,KAAA,CAAM,cAxB2B,CAAA,OAwBL,KAAA,CAAU,SAxBL,CAAA;cA0BtD,cA1BsB,EAAA;EAAc,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EA0BO,mBA1BP,CAAA,EA0B0B,mBAAA,CAAA,GAAA,CAAA,OA1B1B;EAEpC,WAAA,EAcL,MAAA;CAAA"}
|