@taicode/common-web 3.7.7 → 3.7.10
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/output/components/alert-dialog.d.ts +20 -0
- package/output/components/alert-dialog.d.ts.map +1 -0
- package/output/components/alert-dialog.js +65 -0
- package/output/components/alert.d.ts +11 -0
- package/output/components/alert.d.ts.map +1 -0
- package/output/components/alert.js +38 -0
- package/output/components/avatar.d.ts +13 -0
- package/output/components/avatar.d.ts.map +1 -0
- package/output/components/avatar.js +40 -0
- package/output/components/badge.d.ts +11 -0
- package/output/components/badge.d.ts.map +1 -0
- package/output/components/badge.js +39 -0
- package/output/components/button.d.ts +12 -0
- package/output/components/button.d.ts.map +1 -0
- package/output/components/button.js +48 -0
- package/output/components/calendar.d.ts +13 -0
- package/output/components/calendar.d.ts.map +1 -0
- package/output/components/calendar.js +57 -0
- package/output/components/card.d.ts +13 -0
- package/output/components/card.d.ts.map +1 -0
- package/output/components/card.js +43 -0
- package/output/components/chart.d.ts +56 -0
- package/output/components/chart.d.ts.map +1 -0
- package/output/components/chart.js +127 -0
- package/output/components/checkbox.d.ts +5 -0
- package/output/components/checkbox.d.ts.map +1 -0
- package/output/components/checkbox.js +21 -0
- package/output/components/command.d.ts +20 -0
- package/output/components/command.d.ts.map +1 -0
- package/output/components/command.js +55 -0
- package/output/components/dialog.d.ts +20 -0
- package/output/components/dialog.d.ts.map +1 -0
- package/output/components/dialog.js +58 -0
- package/output/components/direction.d.ts +9 -0
- package/output/components/direction.d.ts.map +1 -0
- package/output/components/direction.js +10 -0
- package/output/components/drawer.d.ts +14 -0
- package/output/components/drawer.d.ts.map +1 -0
- package/output/components/drawer.js +56 -0
- package/output/components/dropdown-menu.d.ts +29 -0
- package/output/components/dropdown-menu.d.ts.map +1 -0
- package/output/components/dropdown-menu.js +78 -0
- package/output/components/field.d.ts +39 -0
- package/output/components/field.d.ts.map +1 -0
- package/output/components/field.js +102 -0
- package/output/components/footer/index.d.ts +27 -0
- package/output/components/footer/index.d.ts.map +1 -0
- package/output/components/footer/index.js +17 -0
- package/output/components/form.d.ts +26 -0
- package/output/components/form.d.ts.map +1 -0
- package/output/components/form.js +69 -0
- package/output/components/index.d.ts +46 -0
- package/output/components/index.d.ts.map +1 -0
- package/output/components/index.js +45 -0
- package/output/components/input-group.d.ts +17 -0
- package/output/components/input-group.d.ts.map +1 -0
- package/output/components/input-group.js +75 -0
- package/output/components/input.d.ts +4 -0
- package/output/components/input.d.ts.map +1 -0
- package/output/components/input.js +19 -0
- package/output/components/item.d.ts +25 -0
- package/output/components/item.d.ts.map +1 -0
- package/output/components/item.js +89 -0
- package/output/components/json-view/index.d.ts +11 -0
- package/output/components/json-view/index.d.ts.map +1 -0
- package/output/components/json-view/index.js +52 -0
- package/output/components/json-view/lazy/index.d.ts +18 -0
- package/output/components/json-view/lazy/index.d.ts.map +1 -0
- package/output/components/json-view/lazy/index.js +22 -0
- package/output/components/kbd.d.ts +4 -0
- package/output/components/kbd.d.ts.map +1 -0
- package/output/components/kbd.js +22 -0
- package/output/components/label.d.ts +5 -0
- package/output/components/label.d.ts.map +1 -0
- package/output/components/label.js +20 -0
- package/output/components/list-actions/index.d.ts +23 -0
- package/output/components/list-actions/index.d.ts.map +1 -0
- package/output/components/list-actions/index.js +15 -0
- package/output/components/loading-button/index.d.ts +44 -0
- package/output/components/loading-button/index.d.ts.map +1 -0
- package/output/components/loading-button/index.js +75 -0
- package/output/components/loading-button/index.test.d.ts +2 -0
- package/output/components/loading-button/index.test.d.ts.map +1 -0
- package/output/components/loading-button/index.test.js +203 -0
- package/output/components/native-select.d.ts +9 -0
- package/output/components/native-select.d.ts.map +1 -0
- package/output/components/native-select.js +28 -0
- package/output/components/page-back-button/index.d.ts +8 -0
- package/output/components/page-back-button/index.d.ts.map +1 -0
- package/output/components/page-back-button/index.js +7 -0
- package/output/components/page-state.d.ts +19 -0
- package/output/components/page-state.d.ts.map +1 -0
- package/output/components/page-state.js +13 -0
- package/output/components/pagination/index.d.ts +34 -0
- package/output/components/pagination/index.d.ts.map +1 -0
- package/output/components/pagination/index.js +75 -0
- package/output/components/popover.d.ts +11 -0
- package/output/components/popover.d.ts.map +1 -0
- package/output/components/popover.js +44 -0
- package/output/components/progress.d.ts +5 -0
- package/output/components/progress.d.ts.map +1 -0
- package/output/components/progress.js +21 -0
- package/output/components/radio-group.d.ts +6 -0
- package/output/components/radio-group.d.ts.map +1 -0
- package/output/components/radio-group.js +25 -0
- package/output/components/route-pending-indicator/index.d.ts +20 -0
- package/output/components/route-pending-indicator/index.d.ts.map +1 -0
- package/output/components/route-pending-indicator/index.js +17 -0
- package/output/components/scroll-area.d.ts +6 -0
- package/output/components/scroll-area.d.ts.map +1 -0
- package/output/components/scroll-area.js +24 -0
- package/output/components/searchable-select/index.d.ts +41 -0
- package/output/components/searchable-select/index.d.ts.map +1 -0
- package/output/components/searchable-select/index.js +46 -0
- package/output/components/select.d.ts +17 -0
- package/output/components/select.d.ts.map +1 -0
- package/output/components/select.js +58 -0
- package/output/components/separator.d.ts +5 -0
- package/output/components/separator.d.ts.map +1 -0
- package/output/components/separator.js +20 -0
- package/output/components/sheet.d.ts +16 -0
- package/output/components/sheet.d.ts.map +1 -0
- package/output/components/sheet.js +58 -0
- package/output/components/sidebar.d.ts +78 -0
- package/output/components/sidebar.d.ts.map +1 -0
- package/output/components/sidebar.js +233 -0
- package/output/components/size-provider/index.d.ts +2 -0
- package/output/components/size-provider/index.d.ts.map +1 -0
- package/output/components/size-provider/index.js +1 -0
- package/output/components/size-provider/size-provider.d.ts +9 -0
- package/output/components/size-provider/size-provider.d.ts.map +1 -0
- package/output/components/size-provider/size-provider.js +29 -0
- package/output/components/skeleton.d.ts +3 -0
- package/output/components/skeleton.d.ts.map +1 -0
- package/output/components/skeleton.js +18 -0
- package/output/components/sonner.d.ts +8 -0
- package/output/components/sonner.d.ts.map +1 -0
- package/output/components/sonner.js +34 -0
- package/output/components/spinner.d.ts +3 -0
- package/output/components/spinner.d.ts.map +1 -0
- package/output/components/spinner.js +19 -0
- package/output/components/switch.d.ts +8 -0
- package/output/components/switch.d.ts.map +1 -0
- package/output/components/switch.js +20 -0
- package/output/components/table.d.ts +11 -0
- package/output/components/table.d.ts.map +1 -0
- package/output/components/table.js +47 -0
- package/output/components/tabs.d.ts +12 -0
- package/output/components/tabs.d.ts.map +1 -0
- package/output/components/tabs.js +45 -0
- package/output/components/textarea.d.ts +4 -0
- package/output/components/textarea.d.ts.map +1 -0
- package/output/components/textarea.js +19 -0
- package/output/components/theme-switcher.d.ts +6 -0
- package/output/components/theme-switcher.d.ts.map +1 -0
- package/output/components/theme-switcher.js +19 -0
- package/output/components/toaster/index.d.ts +16 -0
- package/output/components/toaster/index.d.ts.map +1 -0
- package/output/components/toaster/index.js +70 -0
- package/output/components/toggle-group.d.ts +12 -0
- package/output/components/toggle-group.d.ts.map +1 -0
- package/output/components/toggle-group.js +38 -0
- package/output/components/toggle.d.ts +10 -0
- package/output/components/toggle.d.ts.map +1 -0
- package/output/components/toggle.js +38 -0
- package/output/components/tooltip.d.ts +8 -0
- package/output/components/tooltip.d.ts.map +1 -0
- package/output/components/tooltip.js +33 -0
- package/output/features/confirm-dialog/index.d.ts +41 -0
- package/output/features/confirm-dialog/index.d.ts.map +1 -0
- package/output/features/confirm-dialog/index.js +19 -0
- package/output/features/input-confirm/index.d.ts +26 -0
- package/output/features/input-confirm/index.d.ts.map +1 -0
- package/output/features/input-confirm/index.js +59 -0
- package/output/features/signin/context.d.ts +14 -0
- package/output/features/signin/context.d.ts.map +1 -0
- package/output/features/signin/context.js +13 -0
- package/output/features/signin/index.d.ts +58 -0
- package/output/features/signin/index.d.ts.map +1 -0
- package/output/features/signin/index.js +137 -0
- package/output/features/signin/service.d.ts +92 -0
- package/output/features/signin/service.d.ts.map +1 -0
- package/output/features/signin/service.js +519 -0
- package/output/features/signin/service.test.d.ts +2 -0
- package/output/features/signin/service.test.d.ts.map +1 -0
- package/output/features/signin/service.test.js +211 -0
- package/output/features/signin/types.d.ts +63 -0
- package/output/features/signin/types.d.ts.map +1 -0
- package/output/features/signin/types.js +1 -0
- package/output/hooks/use-loading/index.d.ts +6 -0
- package/output/hooks/use-loading/index.d.ts.map +1 -0
- package/output/hooks/use-loading/index.js +14 -0
- package/output/hooks/use-loading/index.test.d.ts +2 -0
- package/output/hooks/use-loading/index.test.d.ts.map +1 -0
- package/output/hooks/use-loading/index.test.js +24 -0
- package/output/hooks/use-mobile/index.d.ts +2 -0
- package/output/hooks/use-mobile/index.d.ts.map +1 -0
- package/output/hooks/use-mobile/index.js +16 -0
- package/output/hooks/use-observer/index.d.ts +2 -0
- package/output/hooks/use-observer/index.d.ts.map +1 -0
- package/output/hooks/use-observer/index.js +1 -0
- package/output/hooks/use-observer/use-observer.d.ts +3 -0
- package/output/hooks/use-observer/use-observer.d.ts.map +1 -0
- package/output/hooks/use-observer/use-observer.js +16 -0
- package/output/hooks/use-observer/use-observer.test.d.ts +2 -0
- package/output/hooks/use-observer/use-observer.test.d.ts.map +1 -0
- package/output/hooks/use-observer/use-observer.test.js +134 -0
- package/output/hooks/use-offline/index.d.ts +6 -0
- package/output/hooks/use-offline/index.d.ts.map +1 -0
- package/output/hooks/use-offline/index.js +19 -0
- package/output/layout/app/index.d.ts +34 -0
- package/output/layout/app/index.d.ts.map +1 -0
- package/output/layout/app/index.js +34 -0
- package/output/layout/dashboard/index.d.ts +76 -0
- package/output/layout/dashboard/index.d.ts.map +1 -0
- package/output/layout/dashboard/index.js +84 -0
- package/output/layout/index.d.ts +3 -0
- package/output/layout/index.d.ts.map +1 -0
- package/output/layout/index.js +2 -0
- package/output/services/cache-api/cache-api.d.ts +23 -0
- package/output/services/cache-api/cache-api.d.ts.map +1 -0
- package/output/services/cache-api/cache-api.js +145 -0
- package/output/services/cache-api/cache-api.test.d.ts +2 -0
- package/output/services/cache-api/cache-api.test.d.ts.map +1 -0
- package/output/services/cache-api/cache-api.test.js +610 -0
- package/output/services/cache-api/index.d.ts +2 -0
- package/output/services/cache-api/index.d.ts.map +1 -0
- package/output/services/cache-api/index.js +1 -0
- package/output/services/cached-fetch/index.d.ts +50 -0
- package/output/services/cached-fetch/index.d.ts.map +1 -0
- package/output/services/cached-fetch/index.js +196 -0
- package/output/services/service/index.d.ts +2 -0
- package/output/services/service/index.d.ts.map +1 -0
- package/output/services/service/index.js +1 -0
- package/output/services/service/service.d.ts +135 -0
- package/output/services/service/service.d.ts.map +1 -0
- package/output/services/service/service.js +276 -0
- package/output/services/service/service.test.d.ts +2 -0
- package/output/services/service/service.test.d.ts.map +1 -0
- package/output/services/service/service.test.js +1399 -0
- package/output/services/side-cache/index.d.ts +2 -0
- package/output/services/side-cache/index.d.ts.map +1 -0
- package/output/services/side-cache/index.js +1 -0
- package/output/services/side-cache/side-cache.d.ts +11 -0
- package/output/services/side-cache/side-cache.d.ts.map +1 -0
- package/output/services/side-cache/side-cache.js +161 -0
- package/output/services/side-cache/side-cache.test.d.ts +2 -0
- package/output/services/side-cache/side-cache.test.d.ts.map +1 -0
- package/output/services/side-cache/side-cache.test.js +271 -0
- package/output/utils/avatar/index.d.ts +28 -0
- package/output/utils/avatar/index.d.ts.map +1 -0
- package/output/utils/avatar/index.js +35 -0
- package/output/utils/delay/index.d.ts +2 -0
- package/output/utils/delay/index.d.ts.map +1 -0
- package/output/utils/delay/index.js +5 -0
- package/output/utils/form/index.d.ts +3 -0
- package/output/utils/form/index.d.ts.map +1 -0
- package/output/utils/form/index.js +1 -0
- package/output/utils/merge-class-names/index.d.ts +3 -0
- package/output/utils/merge-class-names/index.d.ts.map +1 -0
- package/output/utils/merge-class-names/index.js +5 -0
- package/output/utils/merge-class-names/index.test.d.ts +2 -0
- package/output/utils/merge-class-names/index.test.d.ts.map +1 -0
- package/output/utils/merge-class-names/index.test.js +7 -0
- package/output/utils/performance/index.d.ts +82 -0
- package/output/utils/performance/index.d.ts.map +1 -0
- package/output/utils/performance/index.js +129 -0
- package/output/utils/redirect/index.d.ts +6 -0
- package/output/utils/redirect/index.d.ts.map +1 -0
- package/output/utils/redirect/index.js +32 -0
- package/package.json +8 -5
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LoaderCircleIcon, PlusIcon } from 'lucide-react';
|
|
3
|
+
import { Button } from './button.js';
|
|
4
|
+
export function LoadingState(props) {
|
|
5
|
+
const { title, description, fullscreen = false } = props;
|
|
6
|
+
return (_jsx("div", { className: fullscreen
|
|
7
|
+
? 'flex min-h-screen items-center justify-center'
|
|
8
|
+
: 'flex min-h-75 items-center justify-center rounded-lg border border-dashed py-8 md:min-h-100 md:py-12', role: "status", "aria-live": "polite", "aria-busy": "true", children: _jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [_jsx(LoaderCircleIcon, { className: "size-8 animate-spin text-muted-foreground" }), _jsx("div", { className: "text-sm text-muted-foreground md:text-base", children: title }), description && _jsx("p", { className: "max-w-sm px-4 text-xs text-muted-foreground md:text-sm", children: description })] }) }));
|
|
9
|
+
}
|
|
10
|
+
export function Empty(props) {
|
|
11
|
+
const { icon, title, description, action } = props;
|
|
12
|
+
return (_jsxs("div", { className: "flex min-h-75 flex-col items-center justify-center rounded-lg border border-dashed py-8 md:min-h-100 md:py-12", children: [icon && (_jsx("div", { className: "mb-3 flex size-10 items-center justify-center rounded-full bg-muted md:mb-4 md:size-12", children: _jsx("div", { className: "size-5 text-muted-foreground md:size-6", children: icon }) })), _jsx("h3", { className: "mt-2 text-sm font-semibold md:text-base", children: title }), description && _jsx("p", { className: "mt-1 max-w-sm px-4 text-center text-xs text-muted-foreground md:text-sm", children: description }), action && (_jsx("div", { className: "mt-4 md:mt-6", children: _jsxs(Button, { onClick: action.onClick, size: "sm", children: [action.icon || _jsx(PlusIcon, { className: "size-4" }), action.label] }) }))] }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface PaginationProps {
|
|
2
|
+
/**
|
|
3
|
+
* 当前页码(从1开始)
|
|
4
|
+
*/
|
|
5
|
+
currentPage: number;
|
|
6
|
+
/**
|
|
7
|
+
* 每页数量
|
|
8
|
+
*/
|
|
9
|
+
pageSize: number;
|
|
10
|
+
/**
|
|
11
|
+
* 总数据量
|
|
12
|
+
*/
|
|
13
|
+
total: number;
|
|
14
|
+
/**
|
|
15
|
+
* 页码改变回调
|
|
16
|
+
*/
|
|
17
|
+
onPageChange: (page: number) => void;
|
|
18
|
+
/**
|
|
19
|
+
* 每页数量改变回调(可选)
|
|
20
|
+
*/
|
|
21
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
22
|
+
/**
|
|
23
|
+
* 文案(可选,用于 i18n 覆盖)
|
|
24
|
+
*/
|
|
25
|
+
labels?: {
|
|
26
|
+
showingResults?: (start: number, end: number, total: number) => string;
|
|
27
|
+
previous?: string;
|
|
28
|
+
next?: string;
|
|
29
|
+
pageOf?: (current: number, total: number) => string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export declare function Pagination(props: PaginationProps): import("react").JSX.Element | null;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/components/pagination/index.tsx"],"names":[],"mappings":"AAIA,UAAU,eAAe;IACvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C;;OAEG;IACH,MAAM,CAAC,EAAE;QACP,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;QACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;KACpD,CAAA;CACF;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,sCAmIhD"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-react';
|
|
3
|
+
import { Button } from '../button.js';
|
|
4
|
+
export function Pagination(props) {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
const { currentPage, pageSize, total, onPageChange, labels } = props;
|
|
7
|
+
const totalPages = Math.max(1, Math.ceil(total / pageSize));
|
|
8
|
+
const getPageNumbers = () => {
|
|
9
|
+
const pages = [];
|
|
10
|
+
const maxVisible = 7;
|
|
11
|
+
if (totalPages <= maxVisible) {
|
|
12
|
+
for (let i = 1; i <= totalPages; i++) {
|
|
13
|
+
pages.push(i);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
if (currentPage <= 4) {
|
|
18
|
+
for (let i = 1; i <= 5; i++) {
|
|
19
|
+
pages.push(i);
|
|
20
|
+
}
|
|
21
|
+
pages.push('...');
|
|
22
|
+
pages.push(totalPages);
|
|
23
|
+
}
|
|
24
|
+
else if (currentPage >= totalPages - 3) {
|
|
25
|
+
pages.push(1);
|
|
26
|
+
pages.push('...');
|
|
27
|
+
for (let i = totalPages - 4; i <= totalPages; i++) {
|
|
28
|
+
pages.push(i);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
pages.push(1);
|
|
33
|
+
pages.push('...');
|
|
34
|
+
for (let i = currentPage - 1; i <= currentPage + 1; i++) {
|
|
35
|
+
pages.push(i);
|
|
36
|
+
}
|
|
37
|
+
pages.push('...');
|
|
38
|
+
pages.push(totalPages);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return pages;
|
|
42
|
+
};
|
|
43
|
+
const pageNumbers = getPageNumbers();
|
|
44
|
+
const handleFirst = () => {
|
|
45
|
+
onPageChange(1);
|
|
46
|
+
};
|
|
47
|
+
const handlePrevious = () => {
|
|
48
|
+
if (currentPage > 1) {
|
|
49
|
+
onPageChange(currentPage - 1);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const handleNext = () => {
|
|
53
|
+
if (currentPage < totalPages) {
|
|
54
|
+
onPageChange(currentPage + 1);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const handleLast = () => {
|
|
58
|
+
onPageChange(totalPages);
|
|
59
|
+
};
|
|
60
|
+
const handlePageClick = (page) => {
|
|
61
|
+
if (typeof page === 'number') {
|
|
62
|
+
onPageChange(page);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const startIndex = (currentPage - 1) * pageSize + 1;
|
|
66
|
+
const endIndex = Math.min(currentPage * pageSize, total);
|
|
67
|
+
if (total === 0) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
const showingResults = (labels === null || labels === void 0 ? void 0 : labels.showingResults) ? labels.showingResults(startIndex, endIndex, total) : `Showing ${startIndex} to ${endIndex} of ${total} results`;
|
|
71
|
+
const previousLabel = (_a = labels === null || labels === void 0 ? void 0 : labels.previous) !== null && _a !== void 0 ? _a : 'Previous';
|
|
72
|
+
const nextLabel = (_b = labels === null || labels === void 0 ? void 0 : labels.next) !== null && _b !== void 0 ? _b : 'Next';
|
|
73
|
+
const pageOfLabel = (labels === null || labels === void 0 ? void 0 : labels.pageOf) ? labels.pageOf(currentPage, totalPages) : `Page ${currentPage} of ${totalPages}`;
|
|
74
|
+
return (_jsxs("div", { className: "flex items-center justify-between px-4", children: [_jsx("div", { className: "text-muted-foreground hidden flex-1 text-sm lg:flex", children: showingResults }), _jsxs("div", { className: "flex w-full items-center justify-between gap-1 lg:hidden", children: [_jsxs(Button, { variant: "outline", size: "sm", className: "shrink-0 px-2", onClick: handlePrevious, disabled: currentPage === 1, children: [_jsx(ChevronLeft, { className: "h-4 w-4" }), previousLabel] }), _jsx("div", { className: "min-w-0 truncate px-1 text-center text-xs font-medium", children: pageOfLabel }), _jsxs(Button, { variant: "outline", size: "sm", className: "shrink-0 px-2", onClick: handleNext, disabled: currentPage === totalPages, children: [nextLabel, _jsx(ChevronRight, { className: "h-4 w-4" })] })] }), _jsxs("div", { className: "hidden w-full items-center gap-2 lg:flex lg:w-fit", children: [_jsxs(Button, { variant: "outline", className: "size-8 p-0", onClick: handleFirst, disabled: currentPage === 1, children: [_jsx("span", { className: "sr-only", children: "Go to first page" }), _jsx(ChevronsLeft, { className: "h-4 w-4" })] }), _jsxs(Button, { variant: "outline", className: "size-8 p-0", onClick: handlePrevious, disabled: currentPage === 1, children: [_jsx("span", { className: "sr-only", children: "Go to previous page" }), _jsx(ChevronLeft, { className: "h-4 w-4" })] }), _jsx("div", { className: "flex items-center gap-1", children: pageNumbers.map((page, index) => typeof page === 'number' ? (_jsx(Button, { variant: page === currentPage ? 'default' : 'outline', className: "size-8 p-0", onClick: () => handlePageClick(page), children: page }, `page-${page}`)) : (_jsx("span", { className: "flex size-8 items-center justify-center text-muted-foreground", children: page }, `ellipsis-${index}`))) }), _jsxs(Button, { variant: "outline", className: "size-8 p-0", onClick: handleNext, disabled: currentPage === totalPages, children: [_jsx("span", { className: "sr-only", children: "Go to next page" }), _jsx(ChevronRight, { className: "h-4 w-4" })] }), _jsxs(Button, { variant: "outline", className: "size-8 p-0", onClick: handleLast, disabled: currentPage === totalPages, children: [_jsx("span", { className: "sr-only", children: "Go to last page" }), _jsx(ChevronsRight, { className: "h-4 w-4" })] })] })] }));
|
|
75
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
3
|
+
declare function Popover(params: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function PopoverTrigger(params: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function PopoverContent(params: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
|
|
6
|
+
declare function PopoverAnchor(params: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
|
|
7
|
+
declare function PopoverHeader(params: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function PopoverTitle(params: React.ComponentProps<"h2">): React.JSX.Element;
|
|
9
|
+
declare function PopoverDescription(params: React.ComponentProps<"p">): React.JSX.Element;
|
|
10
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, };
|
|
11
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../source/components/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAItD,iBAAS,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAK1E;AAED,iBAAS,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,qBAKpF;AAED,iBAAS,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,qBAqBpF;AAED,iBAAS,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,qBAKlF;AAED,iBAAS,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBASzD;AAED,iBAAS,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBASvD;AAED,iBAAS,kBAAkB,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAY5D;AAED,OAAO,EACL,OAAO,EACP,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,cAAc,GACf,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
15
|
+
import { mergeClassNames } from "../utils/merge-class-names/index.js";
|
|
16
|
+
function Popover(params) {
|
|
17
|
+
const props = __rest(params, []);
|
|
18
|
+
return _jsx(PopoverPrimitive.Root, Object.assign({ "data-slot": "popover" }, props));
|
|
19
|
+
}
|
|
20
|
+
function PopoverTrigger(params) {
|
|
21
|
+
const props = __rest(params, []);
|
|
22
|
+
return _jsx(PopoverPrimitive.Trigger, Object.assign({ "data-slot": "popover-trigger" }, props));
|
|
23
|
+
}
|
|
24
|
+
function PopoverContent(params) {
|
|
25
|
+
const { className, align = "center", sideOffset = 4 } = params, props = __rest(params, ["className", "align", "sideOffset"]);
|
|
26
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, Object.assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: mergeClassNames("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-4 rounded-md p-4 text-sm shadow-md ring-1 duration-100 z-50 w-72 origin-(--radix-popover-content-transform-origin) outline-hidden", className) }, props)) }));
|
|
27
|
+
}
|
|
28
|
+
function PopoverAnchor(params) {
|
|
29
|
+
const props = __rest(params, []);
|
|
30
|
+
return _jsx(PopoverPrimitive.Anchor, Object.assign({ "data-slot": "popover-anchor" }, props));
|
|
31
|
+
}
|
|
32
|
+
function PopoverHeader(params) {
|
|
33
|
+
const { className } = params, props = __rest(params, ["className"]);
|
|
34
|
+
return (_jsx("div", Object.assign({ "data-slot": "popover-header", className: mergeClassNames("flex flex-col gap-1 text-sm", className) }, props)));
|
|
35
|
+
}
|
|
36
|
+
function PopoverTitle(params) {
|
|
37
|
+
const { className } = params, props = __rest(params, ["className"]);
|
|
38
|
+
return (_jsx("div", Object.assign({ "data-slot": "popover-title", className: mergeClassNames("font-medium", className) }, props)));
|
|
39
|
+
}
|
|
40
|
+
function PopoverDescription(params) {
|
|
41
|
+
const { className } = params, props = __rest(params, ["className"]);
|
|
42
|
+
return (_jsx("p", Object.assign({ "data-slot": "popover-description", className: mergeClassNames("text-muted-foreground", className) }, props)));
|
|
43
|
+
}
|
|
44
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../source/components/progress.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAIxD,iBAAS,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,qBAsB5E;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import { Progress as ProgressPrimitive } from "radix-ui";
|
|
16
|
+
import { mergeClassNames } from "../utils/merge-class-names/index.js";
|
|
17
|
+
function Progress(params) {
|
|
18
|
+
const { className, value } = params, props = __rest(params, ["className", "value"]);
|
|
19
|
+
return (_jsx(ProgressPrimitive.Root, Object.assign({ "data-slot": "progress", className: mergeClassNames("bg-muted h-1.5 rounded-full relative flex w-full items-center overflow-x-hidden", className) }, props, { children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "bg-primary size-full flex-1 transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
|
|
20
|
+
}
|
|
21
|
+
export { Progress };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';
|
|
3
|
+
declare function RadioGroup(params: React.ComponentProps<typeof RadioGroupPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function RadioGroupItem(params: React.ComponentProps<typeof RadioGroupPrimitive.Item>): React.JSX.Element;
|
|
5
|
+
export { RadioGroup, RadioGroupItem };
|
|
6
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../source/components/radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAK5D,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,qBAGhF;AAED,iBAAS,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,qBAgBpF;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';
|
|
15
|
+
import { CircleIcon } from 'lucide-react';
|
|
16
|
+
import { mergeClassNames } from '../utils/merge-class-names/index.js';
|
|
17
|
+
function RadioGroup(params) {
|
|
18
|
+
const { className } = params, props = __rest(params, ["className"]);
|
|
19
|
+
return _jsx(RadioGroupPrimitive.Root, Object.assign({ "data-slot": "radio-group", className: mergeClassNames('grid gap-3 w-full', className) }, props));
|
|
20
|
+
}
|
|
21
|
+
function RadioGroupItem(params) {
|
|
22
|
+
const { className } = params, props = __rest(params, ["className"]);
|
|
23
|
+
return (_jsx(RadioGroupPrimitive.Item, Object.assign({ "data-slot": "radio-group-item", className: mergeClassNames('border-input text-primary dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 flex size-4 rounded-full shadow-xs focus-visible:ring-[3px] aria-invalid:ring-[3px] group/radio-group-item peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50', className) }, props, { children: _jsx(RadioGroupPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "group-aria-invalid/radio-group-item:text-destructive text-primary flex size-4 items-center justify-center", children: _jsx(CircleIcon, { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current" }) }) })));
|
|
24
|
+
}
|
|
25
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface RoutePendingIndicatorProps {
|
|
2
|
+
/** 进度条的 aria-label */
|
|
3
|
+
label?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* 路由切换时显示的顶部进度条组件
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* import { RoutePendingIndicator } from '@taicode/common-web/components/route-pending-indicator'
|
|
11
|
+
*
|
|
12
|
+
* const router = createRouter({
|
|
13
|
+
* routeTree,
|
|
14
|
+
* defaultPendingComponent: RoutePendingIndicator,
|
|
15
|
+
* })
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function RoutePendingIndicator({ label }: RoutePendingIndicatorProps): import("react").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/components/route-pending-indicator/index.tsx"],"names":[],"mappings":"AAAA,UAAU,0BAA0B;IAClC,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,KAAiB,EAAE,EAAE,0BAA0B,+BAUtF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* 路由切换时显示的顶部进度条组件
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* import { RoutePendingIndicator } from '@taicode/common-web/components/route-pending-indicator'
|
|
8
|
+
*
|
|
9
|
+
* const router = createRouter({
|
|
10
|
+
* routeTree,
|
|
11
|
+
* defaultPendingComponent: RoutePendingIndicator,
|
|
12
|
+
* })
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export function RoutePendingIndicator({ label = 'Loading' }) {
|
|
16
|
+
return (_jsx("div", { role: "progressbar", "aria-label": label, className: "fixed inset-x-0 top-0 z-100 h-0.5 overflow-hidden bg-primary/20", children: _jsx("div", { className: "h-full w-2/5 animate-pulse bg-primary motion-reduce:animate-none" }) }));
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
3
|
+
declare function ScrollArea(params: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function ScrollBar(params: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): React.JSX.Element;
|
|
5
|
+
export { ScrollArea, ScrollBar };
|
|
6
|
+
//# sourceMappingURL=scroll-area.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../source/components/scroll-area.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAI5D,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,qBAsBhF;AAED,iBAAS,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,qBAuB9F;AAED,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
15
|
+
import { mergeClassNames } from "../utils/merge-class-names/index.js";
|
|
16
|
+
function ScrollArea(params) {
|
|
17
|
+
const { className, children } = params, props = __rest(params, ["className", "children"]);
|
|
18
|
+
return (_jsxs(ScrollAreaPrimitive.Root, Object.assign({ "data-slot": "scroll-area", className: mergeClassNames("relative", className) }, props, { children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
|
|
19
|
+
}
|
|
20
|
+
function ScrollBar(params) {
|
|
21
|
+
const { className, orientation = "vertical" } = params, props = __rest(params, ["className", "orientation"]);
|
|
22
|
+
return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, Object.assign({ "data-slot": "scroll-area-scrollbar", "data-orientation": orientation, orientation: orientation, className: mergeClassNames("data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none", className) }, props, { children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "rounded-full bg-border relative flex-1" }) })));
|
|
23
|
+
}
|
|
24
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export interface SearchableSelectProps<T = string> {
|
|
3
|
+
/** 当前选中值 */
|
|
4
|
+
value: T;
|
|
5
|
+
/** 可选项列表 */
|
|
6
|
+
options: T[];
|
|
7
|
+
/** 是否加载中 */
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
/** 值变化回调 */
|
|
10
|
+
onChange: (value: T) => void;
|
|
11
|
+
/** 将选项转换为显示文本 */
|
|
12
|
+
displayValue: (item: T) => string;
|
|
13
|
+
/** 输入框占位符 */
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
/** 无匹配时是否允许创建新项 */
|
|
16
|
+
creatable?: boolean;
|
|
17
|
+
/** 创建新项时的文案模板 */
|
|
18
|
+
createLabel?: (query: string) => string;
|
|
19
|
+
/** 自定义 className */
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 通用可搜索下拉选择器
|
|
24
|
+
*
|
|
25
|
+
* 基于 Popover + Command 构建,支持本地过滤、键盘导航和选中标记。
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const [value, setValue] = useState('')
|
|
30
|
+
*
|
|
31
|
+
* <SearchableSelect
|
|
32
|
+
* value={value}
|
|
33
|
+
* options={['Apple', 'Banana', 'Cherry']}
|
|
34
|
+
* onChange={setValue}
|
|
35
|
+
* displayValue={(item) => item}
|
|
36
|
+
* placeholder="Select fruit..."
|
|
37
|
+
* />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function SearchableSelect<T = string>(props: SearchableSelectProps<T>): React.JSX.Element;
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/components/searchable-select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,MAAM;IAC/C,YAAY;IACZ,KAAK,EAAE,CAAC,CAAA;IACR,YAAY;IACZ,OAAO,EAAE,CAAC,EAAE,CAAA;IACZ,YAAY;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY;IACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;IAC5B,iBAAiB;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAA;IACjC,aAAa;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mBAAmB;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iBAAiB;IACjB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC,oBAAoB;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,MAAM,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,qBA6F3E"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Check } from 'lucide-react';
|
|
4
|
+
import { Command, CommandEmpty, CommandGroup, CommandItem, CommandList, } from '../../components/command.js';
|
|
5
|
+
import { Input } from '../../components/input.js';
|
|
6
|
+
import { Popover, PopoverContent, PopoverTrigger, } from '../../components/popover.js';
|
|
7
|
+
import { mergeClassNames } from '../../utils/merge-class-names/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* 通用可搜索下拉选择器
|
|
10
|
+
*
|
|
11
|
+
* 基于 Popover + Command 构建,支持本地过滤、键盘导航和选中标记。
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const [value, setValue] = useState('')
|
|
16
|
+
*
|
|
17
|
+
* <SearchableSelect
|
|
18
|
+
* value={value}
|
|
19
|
+
* options={['Apple', 'Banana', 'Cherry']}
|
|
20
|
+
* onChange={setValue}
|
|
21
|
+
* displayValue={(item) => item}
|
|
22
|
+
* placeholder="Select fruit..."
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export function SearchableSelect(props) {
|
|
27
|
+
const { value, options, loading = false, onChange, displayValue, placeholder = 'Select...', creatable = false, createLabel = (query) => `Create: ${query}`, className, } = props;
|
|
28
|
+
const [query, setQuery] = useState('');
|
|
29
|
+
const [open, setOpen] = useState(false);
|
|
30
|
+
const matched = options.filter((item) => displayValue(item).toLowerCase().includes(query.toLowerCase()));
|
|
31
|
+
const handleSelect = (item) => {
|
|
32
|
+
onChange(item);
|
|
33
|
+
setQuery('');
|
|
34
|
+
setOpen(false);
|
|
35
|
+
};
|
|
36
|
+
const display = displayValue(value) || query;
|
|
37
|
+
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx("div", { className: mergeClassNames('relative', className), children: _jsx(Input, { value: display, onChange: (event) => {
|
|
38
|
+
setQuery(event.target.value);
|
|
39
|
+
if (!open)
|
|
40
|
+
setOpen(true);
|
|
41
|
+
}, onFocus: () => setOpen(true), placeholder: placeholder, className: "w-full", "aria-label": placeholder, disabled: loading }) }) }), _jsx(PopoverContent, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", onOpenAutoFocus: (e) => e.preventDefault(), children: _jsx(Command, { shouldFilter: false, children: _jsx(CommandList, { children: matched.length > 0 ? (_jsx(CommandGroup, { children: matched.map((item, index) => {
|
|
42
|
+
const label = displayValue(item);
|
|
43
|
+
const isSelected = displayValue(value) === label;
|
|
44
|
+
return (_jsxs(CommandItem, { value: label, onSelect: () => handleSelect(item), children: [_jsx(Check, { className: mergeClassNames('mr-2 h-4 w-4', isSelected ? 'opacity-100' : 'opacity-0') }), label] }, index));
|
|
45
|
+
}) })) : (_jsx(CommandEmpty, { children: creatable && query && (_jsx(CommandItem, { value: query, onSelect: () => handleSelect(query), children: createLabel(query) })) })) }) }) })] }));
|
|
46
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
3
|
+
type SelectTriggerParams = {
|
|
4
|
+
size?: "sm" | "default";
|
|
5
|
+
};
|
|
6
|
+
declare function Select(params: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
|
|
7
|
+
declare function SelectGroup(params: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
|
|
8
|
+
declare function SelectValue(params: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
|
|
9
|
+
declare function SelectTrigger(params: React.ComponentProps<typeof SelectPrimitive.Trigger> & SelectTriggerParams): React.JSX.Element;
|
|
10
|
+
declare function SelectContent(params: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
|
|
11
|
+
declare function SelectLabel(params: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element;
|
|
12
|
+
declare function SelectItem(params: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
|
|
13
|
+
declare function SelectSeparator(params: React.ComponentProps<typeof SelectPrimitive.Separator>): React.JSX.Element;
|
|
14
|
+
declare function SelectScrollUpButton(params: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.JSX.Element;
|
|
15
|
+
declare function SelectScrollDownButton(params: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.JSX.Element;
|
|
16
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
17
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../source/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAA;AAKpD,KAAK,mBAAmB,GAAG;IACzB,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CACxB,CAAA;AAED,iBAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAKxE;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAY9E;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAK9E;AAED,iBAAS,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG,mBAAmB,qBAuBxG;AAED,iBAAS,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,qBAgClF;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAY9E;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAuB5E;AAED,iBAAS,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,qBAYtF;AAED,iBAAS,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,cAAc,CAAC,qBAehG;AAED,iBAAS,sBAAsB,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,gBAAgB,CAAC,qBAepG;AAED,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
16
|
+
import { mergeClassNames } from "../utils/merge-class-names/index.js";
|
|
17
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
18
|
+
function Select(params) {
|
|
19
|
+
const props = __rest(params, []);
|
|
20
|
+
return _jsx(SelectPrimitive.Root, Object.assign({ "data-slot": "select" }, props));
|
|
21
|
+
}
|
|
22
|
+
function SelectGroup(params) {
|
|
23
|
+
const { className } = params, props = __rest(params, ["className"]);
|
|
24
|
+
return (_jsx(SelectPrimitive.Group, Object.assign({ "data-slot": "select-group", className: mergeClassNames("scroll-my-1 p-1", className) }, props)));
|
|
25
|
+
}
|
|
26
|
+
function SelectValue(params) {
|
|
27
|
+
const props = __rest(params, []);
|
|
28
|
+
return _jsx(SelectPrimitive.Value, Object.assign({ "data-slot": "select-value" }, props));
|
|
29
|
+
}
|
|
30
|
+
function SelectTrigger(params) {
|
|
31
|
+
const { className, size = "default", children } = params, props = __rest(params, ["className", "size", "children"]);
|
|
32
|
+
return (_jsxs(SelectPrimitive.Trigger, Object.assign({ "data-slot": "select-trigger", "data-size": size, className: mergeClassNames("border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props, { children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "text-muted-foreground size-4 pointer-events-none" }) })] })));
|
|
33
|
+
}
|
|
34
|
+
function SelectContent(params) {
|
|
35
|
+
const { className, children, position = "item-aligned", align = "center" } = params, props = __rest(params, ["className", "children", "position", "align"]);
|
|
36
|
+
return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, Object.assign({ "data-slot": "select-content", "data-align-trigger": position === "item-aligned", className: mergeClassNames("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-md shadow-md ring-1 duration-100 relative z-50 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, align: align }, props, { children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { "data-position": position, className: mergeClassNames("data-[position=popper]:h-[var(--radix-select-trigger-height)] data-[position=popper]:w-full data-[position=popper]:min-w-[var(--radix-select-trigger-width)]", position === "popper" && ""), children: children }), _jsx(SelectScrollDownButton, {})] })) }));
|
|
37
|
+
}
|
|
38
|
+
function SelectLabel(params) {
|
|
39
|
+
const { className } = params, props = __rest(params, ["className"]);
|
|
40
|
+
return (_jsx(SelectPrimitive.Label, Object.assign({ "data-slot": "select-label", className: mergeClassNames("text-muted-foreground px-2 py-1.5 text-xs", className) }, props)));
|
|
41
|
+
}
|
|
42
|
+
function SelectItem(params) {
|
|
43
|
+
const { className, children } = params, props = __rest(params, ["className", "children"]);
|
|
44
|
+
return (_jsxs(SelectPrimitive.Item, Object.assign({ "data-slot": "select-item", className: mergeClassNames("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props, { children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "pointer-events-none" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
|
|
45
|
+
}
|
|
46
|
+
function SelectSeparator(params) {
|
|
47
|
+
const { className } = params, props = __rest(params, ["className"]);
|
|
48
|
+
return (_jsx(SelectPrimitive.Separator, Object.assign({ "data-slot": "select-separator", className: mergeClassNames("bg-border -mx-1 my-1 h-px pointer-events-none", className) }, props)));
|
|
49
|
+
}
|
|
50
|
+
function SelectScrollUpButton(params) {
|
|
51
|
+
const { className } = params, props = __rest(params, ["className"]);
|
|
52
|
+
return (_jsx(SelectPrimitive.ScrollUpButton, Object.assign({ "data-slot": "select-scroll-up-button", className: mergeClassNames("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: _jsx(ChevronUpIcon, {}) })));
|
|
53
|
+
}
|
|
54
|
+
function SelectScrollDownButton(params) {
|
|
55
|
+
const { className } = params, props = __rest(params, ["className"]);
|
|
56
|
+
return (_jsx(SelectPrimitive.ScrollDownButton, Object.assign({ "data-slot": "select-scroll-down-button", className: mergeClassNames("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: _jsx(ChevronDownIcon, {}) })));
|
|
57
|
+
}
|
|
58
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../source/components/separator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAI1D,iBAAS,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,qBAc9E;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { Separator as SeparatorPrimitive } from 'radix-ui';
|
|
15
|
+
import { mergeClassNames } from '../utils/merge-class-names/index.js';
|
|
16
|
+
function Separator(params) {
|
|
17
|
+
const { className, orientation = 'horizontal', decorative = true } = params, props = __rest(params, ["className", "orientation", "decorative"]);
|
|
18
|
+
return (_jsx(SeparatorPrimitive.Root, Object.assign({ "data-slot": "separator", decorative: decorative, orientation: orientation, className: mergeClassNames('bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch', className) }, props)));
|
|
19
|
+
}
|
|
20
|
+
export { Separator };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
3
|
+
type SheetContentParams = {
|
|
4
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
5
|
+
showCloseButton?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare function Sheet(params: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
|
|
8
|
+
declare function SheetTrigger(params: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
|
|
9
|
+
declare function SheetClose(params: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
|
|
10
|
+
declare function SheetContent(params: React.ComponentProps<typeof SheetPrimitive.Content> & SheetContentParams): React.JSX.Element;
|
|
11
|
+
declare function SheetHeader(params: React.ComponentProps<"div">): React.JSX.Element;
|
|
12
|
+
declare function SheetFooter(params: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
+
declare function SheetTitle(params: React.ComponentProps<typeof SheetPrimitive.Title>): React.JSX.Element;
|
|
14
|
+
declare function SheetDescription(params: React.ComponentProps<typeof SheetPrimitive.Description>): React.JSX.Element;
|
|
15
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
16
|
+
//# sourceMappingURL=sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../source/components/sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAA;AAMnD,KAAK,kBAAkB,GAAG;IACxB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,iBAAS,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,qBAGtE;AAED,iBAAS,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,qBAKhF;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,qBAK5E;AAuBD,iBAAS,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,GAAG,kBAAkB,qBA8BrG;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBASvD;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBASvD;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,qBAY5E;AAED,iBAAS,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,qBAYxF;AAED,OAAO,EACL,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,CAAA"}
|