@taicode/common-web 3.4.0 → 3.5.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/output/components/index.d.ts +3 -0
- package/output/components/index.d.ts.map +1 -1
- package/output/components/index.js +3 -0
- package/output/components/list-actions/index.d.ts.map +1 -0
- package/output/{layout → components}/list-actions/index.js +1 -1
- package/output/components/page-back-button/index.d.ts.map +1 -0
- package/output/{layout → components}/page-back-button/index.js +1 -1
- package/output/components/pagination/index.d.ts.map +1 -0
- package/output/{layout → components}/pagination/index.js +1 -1
- package/output/layout/dashboard/index.d.ts +18 -0
- package/output/layout/dashboard/index.d.ts.map +1 -1
- package/output/layout/dashboard/index.js +15 -2
- package/output/layout/index.d.ts +0 -4
- package/output/layout/index.d.ts.map +1 -1
- package/output/layout/index.js +0 -4
- package/package.json +1 -1
- package/output/layout/empty/index.d.ts +0 -20
- package/output/layout/empty/index.d.ts.map +0 -1
- package/output/layout/empty/index.js +0 -14
- package/output/layout/list-actions/index.d.ts.map +0 -1
- package/output/layout/page-back-button/index.d.ts.map +0 -1
- package/output/layout/pagination/index.d.ts.map +0 -1
- /package/output/{layout → components}/list-actions/index.d.ts +0 -0
- /package/output/{layout → components}/page-back-button/index.d.ts +0 -0
- /package/output/{layout → components}/pagination/index.d.ts +0 -0
|
@@ -18,8 +18,11 @@ export * from './input.js';
|
|
|
18
18
|
export * from './item.js';
|
|
19
19
|
export * from './kbd.js';
|
|
20
20
|
export * from './label.js';
|
|
21
|
+
export * from './list-actions/index.js';
|
|
21
22
|
export * from './native-select.js';
|
|
23
|
+
export * from './page-back-button/index.js';
|
|
22
24
|
export * from './page-state.js';
|
|
25
|
+
export * from './pagination/index.js';
|
|
23
26
|
export * from './popover.js';
|
|
24
27
|
export * from './progress.js';
|
|
25
28
|
export * from './radio-group.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/components/index.ts"],"names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AAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA"}
|
|
@@ -18,8 +18,11 @@ export * from './input.js';
|
|
|
18
18
|
export * from './item.js';
|
|
19
19
|
export * from './kbd.js';
|
|
20
20
|
export * from './label.js';
|
|
21
|
+
export * from './list-actions/index.js';
|
|
21
22
|
export * from './native-select.js';
|
|
23
|
+
export * from './page-back-button/index.js';
|
|
22
24
|
export * from './page-state.js';
|
|
25
|
+
export * from './pagination/index.js';
|
|
23
26
|
export * from './popover.js';
|
|
24
27
|
export * from './progress.js';
|
|
25
28
|
export * from './radio-group.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/components/list-actions/index.tsx"],"names":[],"mappings":"AAIA,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAQtD;AAED,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAQlD;AAED,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAatD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { RefreshCwIcon, RotateCcwIcon, SearchIcon } from 'lucide-react';
|
|
3
|
-
import { Button } from '
|
|
3
|
+
import { Button } from '../button.js';
|
|
4
4
|
export function RefreshButton(props) {
|
|
5
5
|
const { onClick, loading = false, label = 'Refresh' } = props;
|
|
6
6
|
return (_jsx(Button, { variant: "outline", size: "icon", className: "size-9", onClick: onClick, disabled: loading, "aria-label": label, title: label, children: _jsx(RefreshCwIcon, { className: loading ? 'size-4 animate-spin' : 'size-4' }) }));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/components/page-back-button/index.tsx"],"names":[],"mappings":"AAIA,KAAK,mBAAmB,GAAG;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAYxD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowLeftIcon } from 'lucide-react';
|
|
3
|
-
import { Button } from '
|
|
3
|
+
import { Button } from '../button.js';
|
|
4
4
|
export function PageBackButton(props) {
|
|
5
5
|
const { label = 'Back', context, onClick } = props;
|
|
6
6
|
return (_jsxs("div", { className: "flex min-h-9 min-w-0 items-center gap-2", children: [_jsxs(Button, { variant: "ghost", size: "sm", onClick: onClick, className: "-ml-2 shrink-0 gap-1.5 px-2", children: [_jsx(ArrowLeftIcon, { className: "size-4" }), _jsx("span", { children: label })] }), context && _jsx("span", { className: "truncate text-sm text-muted-foreground", children: context })] }));
|
|
@@ -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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from 'lucide-react';
|
|
3
|
-
import { Button } from '
|
|
3
|
+
import { Button } from '../button.js';
|
|
4
4
|
export function Pagination(props) {
|
|
5
5
|
var _a, _b;
|
|
6
6
|
const { currentPage, pageSize, total, onPageChange, labels } = props;
|
|
@@ -5,6 +5,19 @@ export interface DashboardLayoutProps {
|
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export declare function DashboardLayout(props: DashboardLayoutProps): import("react").JSX.Element;
|
|
8
|
+
export interface DashboardShellProps {
|
|
9
|
+
sidebar: ReactNode;
|
|
10
|
+
header?: ReactNode;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
sidebarWidth?: number;
|
|
13
|
+
headerHeight?: number;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* DashboardShell — 带 SidebarProvider 的完整 Dashboard 布局壳
|
|
18
|
+
* 包含响应式侧边栏 + 内容区,开箱即用
|
|
19
|
+
*/
|
|
20
|
+
export declare function DashboardShell(props: DashboardShellProps): import("react").JSX.Element;
|
|
8
21
|
export interface DashboardContentProps {
|
|
9
22
|
title: ReactNode;
|
|
10
23
|
description?: ReactNode;
|
|
@@ -12,6 +25,11 @@ export interface DashboardContentProps {
|
|
|
12
25
|
toolbar?: ReactNode;
|
|
13
26
|
filters?: ReactNode;
|
|
14
27
|
children: ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* 渲染隐藏的假输入框,防止浏览器自动填充
|
|
30
|
+
* 适用于包含表单的页面
|
|
31
|
+
*/
|
|
32
|
+
antiAutoFill?: boolean;
|
|
15
33
|
}
|
|
16
34
|
export declare function DashboardMain(props: ComponentProps<'div'>): import("react").JSX.Element;
|
|
17
35
|
export declare function DashboardContent(props: DashboardContentProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/layout/dashboard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/layout/dashboard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOrE,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,+BAc1D;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,SAAS,CAAA;IAClB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAmBxD;AAED,MAAM,WA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AA;CACtB;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,+BAGxE;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,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,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,sCAwClE"}
|
|
@@ -12,18 +12,31 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import { ArrowLeftIcon, ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, RefreshCwIcon, RotateCcwIcon, SearchIcon } from 'lucide-react';
|
|
14
14
|
import { Button } from '../../components/button.js';
|
|
15
|
+
import { SidebarInset, SidebarProvider } from '../../components/sidebar.js';
|
|
15
16
|
import { mergeClassNames } from '../../utils/merge-class-names/index.js';
|
|
16
17
|
export function DashboardLayout(props) {
|
|
17
18
|
const { sidebar, header, children } = props;
|
|
18
19
|
return (_jsxs(_Fragment, { children: [sidebar, _jsxs("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [header, _jsx("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: _jsx("div", { className: "@container/main flex min-w-0 flex-1 flex-col gap-2", children: children }) })] })] }));
|
|
19
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* DashboardShell — 带 SidebarProvider 的完整 Dashboard 布局壳
|
|
23
|
+
* 包含响应式侧边栏 + 内容区,开箱即用
|
|
24
|
+
*/
|
|
25
|
+
export function DashboardShell(props) {
|
|
26
|
+
const { sidebar, header, children, sidebarWidth = 60, headerHeight = 12, className } = props;
|
|
27
|
+
const style = {
|
|
28
|
+
'--sidebar-width': `calc(var(--spacing) * ${sidebarWidth})`,
|
|
29
|
+
'--header-height': `calc(var(--spacing) * ${headerHeight})`,
|
|
30
|
+
};
|
|
31
|
+
return (_jsxs(SidebarProvider, { style: style, children: [sidebar, _jsxs(SidebarInset, { className: mergeClassNames('min-w-0', className), children: [header, _jsx("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: _jsx("div", { className: "@container/main flex min-w-0 flex-1 flex-col gap-2", children: children }) })] })] }));
|
|
32
|
+
}
|
|
20
33
|
export function DashboardMain(props) {
|
|
21
34
|
const { className } = props, rest = __rest(props, ["className"]);
|
|
22
35
|
return _jsx("div", Object.assign({ className: mergeClassNames('w-full min-w-0 px-4 lg:px-6', className) }, rest));
|
|
23
36
|
}
|
|
24
37
|
export function DashboardContent(props) {
|
|
25
|
-
const { title, description, back, toolbar, filters, children } = props;
|
|
26
|
-
return (_jsxs("div", { className: "flex min-w-0 flex-col gap-4 pb-4 pt-3 md:gap-6 md:py-6", children: [_jsxs("div", { className: "flex flex-col gap-3 border-b px-4 pb-4 lg:px-6", children: [back, _jsxs("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("h1", { className: "text-xl font-semibold leading-7 md:text-2xl", children: title }), description && (_jsx("p", { className: "mt-0.5 line-clamp-2 text-xs leading-5 text-muted-foreground sm:text-sm md:mt-1", children: description }))] }), toolbar && _jsx("div", { className: "flex min-h-9 shrink-0 items-center justify-end gap-2", children: toolbar })] }), filters && _jsx("div", { className: "flex flex-col gap-4", children: filters })] }), _jsx(DashboardMain, { className: "space-y-4 md:space-y-6", children: children })] }));
|
|
38
|
+
const { title, description, back, toolbar, filters, children, antiAutoFill = false } = props;
|
|
39
|
+
return (_jsxs("div", { className: "flex min-w-0 flex-col gap-4 pb-4 pt-3 md:gap-6 md:py-6", children: [_jsxs("div", { className: "flex flex-col gap-3 border-b px-4 pb-4 lg:px-6", children: [back, _jsxs("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("h1", { className: "text-xl font-semibold leading-7 md:text-2xl", children: title }), description && (_jsx("p", { className: "mt-0.5 line-clamp-2 text-xs leading-5 text-muted-foreground sm:text-sm md:mt-1", children: description }))] }), toolbar && _jsx("div", { className: "flex min-h-9 shrink-0 items-center justify-end gap-2", children: toolbar })] }), filters && _jsx("div", { className: "flex flex-col gap-4", children: filters })] }), _jsx(DashboardMain, { className: "space-y-4 md:space-y-6", children: children }), antiAutoFill && (_jsxs(_Fragment, { children: [_jsx("input", { type: "text", name: "fake-username", autoComplete: "off", tabIndex: -1, style: { position: 'absolute', top: -1000, left: -1000 } }), _jsx("input", { type: "password", name: "fake-password", autoComplete: "new-password", tabIndex: -1, style: { position: 'absolute', top: -1000, left: -1000 } })] }))] }));
|
|
27
40
|
}
|
|
28
41
|
export function DashboardBackButton(props) {
|
|
29
42
|
const { label = 'Back', context, onClick } = props;
|
package/output/layout/index.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
export * from './app/index.js';
|
|
2
2
|
export * from './dashboard/index.js';
|
|
3
|
-
export * from './empty/index.js';
|
|
4
|
-
export * from './list-actions/index.js';
|
|
5
|
-
export * from './page-back-button/index.js';
|
|
6
|
-
export * from './pagination/index.js';
|
|
7
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,sBAAsB,CAAA"}
|
package/output/layout/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
interface EmptyProps {
|
|
3
|
-
icon?: React.ReactNode;
|
|
4
|
-
title: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
action?: {
|
|
7
|
-
label: string;
|
|
8
|
-
onClick: () => void;
|
|
9
|
-
icon?: React.ReactNode;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
interface LoadingStateProps {
|
|
13
|
-
title: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
fullscreen?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare function LoadingState(props: LoadingStateProps): React.JSX.Element;
|
|
18
|
-
export declare function Empty(props: EmptyProps): React.JSX.Element;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/layout/empty/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,UAAU,UAAU;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,MAAM,IAAI,CAAA;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;KACvB,CAAA;CACF;AAED,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAqBpD;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,qBAsBtC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { mergeClassNames } from '../../utils/merge-class-names/index.js';
|
|
3
|
-
import { Button } from '../../components/button.js';
|
|
4
|
-
import { LoaderCircleIcon, PlusIcon } from 'lucide-react';
|
|
5
|
-
export function LoadingState(props) {
|
|
6
|
-
const { title, description, fullscreen = false } = props;
|
|
7
|
-
return (_jsx("div", { className: mergeClassNames(fullscreen
|
|
8
|
-
? 'flex min-h-screen items-center justify-center'
|
|
9
|
-
: '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 })] }) }));
|
|
10
|
-
}
|
|
11
|
-
export function Empty(props) {
|
|
12
|
-
const { icon, title, description, action } = props;
|
|
13
|
-
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] }) }))] }));
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/layout/list-actions/index.tsx"],"names":[],"mappings":"AAIA,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAQtD;AAED,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BAQlD;AAED,KAAK,kBAAkB,GAAG;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAatD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/layout/page-back-button/index.tsx"],"names":[],"mappings":"AAIA,KAAK,mBAAmB,GAAG;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,+BAYxD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/layout/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"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|