@lerianstudio/sindarian-ui 1.0.0-beta.4 → 1.0.0-beta.41
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/components/breadcrumb/index.js +2 -2
- package/dist/components/card/account-card/index.d.ts +32 -0
- package/dist/components/card/account-card/index.d.ts.map +1 -0
- package/dist/components/card/account-card/index.js +69 -0
- package/dist/components/card/basic-card/index.d.ts +6 -0
- package/dist/components/card/basic-card/index.d.ts.map +1 -0
- package/dist/components/card/basic-card/index.js +20 -0
- package/dist/components/card/dashboard-card/index.d.ts +5 -0
- package/dist/components/card/dashboard-card/index.d.ts.map +1 -0
- package/dist/components/card/dashboard-card/index.js +20 -0
- package/dist/components/card/entity-card/index.d.ts +22 -0
- package/dist/components/card/entity-card/index.d.ts.map +1 -0
- package/dist/components/card/entity-card/index.js +64 -0
- package/dist/components/card/index.d.ts +5 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +20 -0
- package/dist/components/dialog/confirmation-dialog/index.d.ts +15 -0
- package/dist/components/dialog/confirmation-dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/confirmation-dialog/index.js +28 -0
- package/dist/components/dialog/confirmation-dialog/use-confirm-dialog.d.ts +31 -0
- package/dist/components/dialog/confirmation-dialog/use-confirm-dialog.d.ts.map +1 -0
- package/dist/components/dialog/confirmation-dialog/use-confirm-dialog.js +55 -0
- package/dist/components/dialog/index.d.ts +4 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/index.js +19 -0
- package/dist/components/dialog/large-dialog/index.d.ts +11 -0
- package/dist/components/dialog/large-dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/large-dialog/index.js +21 -0
- package/dist/components/entity-box/index.js +3 -3
- package/dist/components/form/combo-box-field/index.js +1 -1
- package/dist/components/form/date-picker-field/index.d.ts +20 -0
- package/dist/components/form/date-picker-field/index.d.ts.map +1 -0
- package/dist/components/form/date-picker-field/index.js +43 -0
- package/dist/components/form/date-range-field/index.d.ts +20 -0
- package/dist/components/form/date-range-field/index.d.ts.map +1 -0
- package/dist/components/form/date-range-field/index.js +22 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +3 -0
- package/dist/components/form/input-field/index.d.ts +4 -1
- package/dist/components/form/input-field/index.d.ts.map +1 -1
- package/dist/components/form/input-field/index.js +3 -3
- package/dist/components/form/pagination-limit-field/index.d.ts +2 -1
- package/dist/components/form/pagination-limit-field/index.d.ts.map +1 -1
- package/dist/components/form/pagination-limit-field/index.js +2 -2
- package/dist/components/form/password-field/index.d.ts +5 -4
- package/dist/components/form/password-field/index.d.ts.map +1 -1
- package/dist/components/form/password-field/index.js +8 -7
- package/dist/components/form/select-field/index.d.ts +3 -1
- package/dist/components/form/select-field/index.d.ts.map +1 -1
- package/dist/components/form/select-field/index.js +8 -2
- package/dist/components/form/state-field/index.js +1 -1
- package/dist/components/form/switch-field/index.d.ts +2 -1
- package/dist/components/form/switch-field/index.d.ts.map +1 -1
- package/dist/components/form/switch-field/index.js +2 -2
- package/dist/components/page/index.d.ts.map +1 -1
- package/dist/components/page/index.js +3 -3
- package/dist/components/page-header/index.d.ts.map +1 -1
- package/dist/components/page-header/index.js +8 -6
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/table/id-table-cell.d.ts +3 -2
- package/dist/components/table/id-table-cell.d.ts.map +1 -1
- package/dist/components/table/id-table-cell.js +2 -2
- package/dist/components/table/locked-table-actions.js +1 -1
- package/dist/components/ui/alert/index.d.ts +5 -1
- package/dist/components/ui/alert/index.d.ts.map +1 -1
- package/dist/components/ui/alert/index.js +22 -8
- package/dist/components/ui/alert/styles.css +68 -0
- package/dist/components/ui/autocomplete/index.js +8 -8
- package/dist/components/ui/autosize-textarea/index.js +1 -1
- package/dist/components/ui/badge/index.d.ts +1 -1
- package/dist/components/ui/badge/index.d.ts.map +1 -1
- package/dist/components/ui/badge/index.js +7 -7
- package/dist/components/ui/breadcrumb/index.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb/index.js +5 -5
- package/dist/components/ui/breadcrumb/styles.css +27 -0
- package/dist/components/ui/button/index.d.ts +8 -3
- package/dist/components/ui/button/index.d.ts.map +1 -1
- package/dist/components/ui/button/index.js +22 -30
- package/dist/components/ui/button/styles.css +64 -0
- package/dist/components/ui/calendar/index.d.ts +9 -0
- package/dist/components/ui/calendar/index.d.ts.map +1 -0
- package/dist/components/ui/calendar/index.js +115 -0
- package/dist/components/ui/card/index.js +1 -1
- package/dist/components/ui/checkbox/index.js +1 -1
- package/dist/components/ui/command/index.d.ts +1 -1
- package/dist/components/ui/command/index.d.ts.map +1 -1
- package/dist/components/ui/command/index.js +59 -9
- package/dist/components/ui/dialog/index.d.ts.map +1 -1
- package/dist/components/ui/dialog/index.js +6 -6
- package/dist/components/ui/dialog/styles.css +34 -0
- package/dist/components/ui/dropdown-menu/index.js +6 -6
- package/dist/components/ui/field/index.d.ts +25 -0
- package/dist/components/ui/field/index.d.ts.map +1 -0
- package/dist/components/ui/field/index.js +79 -0
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +3 -2
- package/dist/components/ui/icon-button/index.d.ts +13 -0
- package/dist/components/ui/icon-button/index.d.ts.map +1 -0
- package/dist/components/ui/icon-button/index.js +35 -0
- package/dist/components/ui/icon-button/styles.css +33 -0
- package/dist/components/ui/input/adornment.d.ts +9 -0
- package/dist/components/ui/input/adornment.d.ts.map +1 -0
- package/dist/components/ui/input/adornment.js +21 -0
- package/dist/components/ui/input/index.d.ts +16 -2
- package/dist/components/ui/input/index.d.ts.map +1 -1
- package/dist/components/ui/input/index.js +90 -2
- package/dist/components/ui/input/styles.css +68 -0
- package/dist/components/ui/multiple-select/index.d.ts +6 -6
- package/dist/components/ui/multiple-select/index.d.ts.map +1 -1
- package/dist/components/ui/multiple-select/index.js +12 -10
- package/dist/components/ui/paper/index.js +1 -1
- package/dist/components/ui/paper-collapsible/index.d.ts +9 -0
- package/dist/components/ui/paper-collapsible/index.d.ts.map +1 -0
- package/dist/components/ui/paper-collapsible/index.js +24 -0
- package/dist/components/ui/progress/index.d.ts +1 -1
- package/dist/components/ui/progress/index.d.ts.map +1 -1
- package/dist/components/ui/select/index.d.ts +1 -2
- package/dist/components/ui/select/index.d.ts.map +1 -1
- package/dist/components/ui/select/index.js +9 -18
- package/dist/components/ui/select/styles.css +57 -0
- package/dist/components/ui/separator/index.js +1 -1
- package/dist/components/ui/sheet/index.d.ts.map +1 -1
- package/dist/components/ui/sheet/index.js +2 -2
- package/dist/components/ui/sidebar/index.d.ts +10 -0
- package/dist/components/ui/sidebar/index.d.ts.map +1 -0
- package/dist/components/ui/sidebar/index.js +25 -0
- package/dist/components/ui/sidebar/sidebar-back-button.d.ts +3 -0
- package/dist/components/ui/sidebar/sidebar-back-button.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-back-button.js +8 -0
- package/dist/components/ui/sidebar/sidebar-components.d.ts +23 -0
- package/dist/components/ui/sidebar/sidebar-components.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-components.js +23 -0
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts +6 -0
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-expand-button.js +19 -0
- package/dist/components/ui/sidebar/sidebar-item-button.d.ts +12 -0
- package/dist/components/ui/sidebar/sidebar-item-button.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-item-button.js +23 -0
- package/dist/components/ui/sidebar/sidebar-item-collapsible.d.ts +12 -0
- package/dist/components/ui/sidebar/sidebar-item-collapsible.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-item-collapsible.js +52 -0
- package/dist/components/ui/sidebar/sidebar-item-icon-button.d.ts +12 -0
- package/dist/components/ui/sidebar/sidebar-item-icon-button.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-item-icon-button.js +20 -0
- package/dist/components/ui/sidebar/sidebar-item.d.ts +13 -0
- package/dist/components/ui/sidebar/sidebar-item.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-item.js +19 -0
- package/dist/components/ui/sidebar/sidebar-provider.d.ts +12 -0
- package/dist/components/ui/sidebar/sidebar-provider.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-provider.js +59 -0
- package/dist/components/ui/sidebar/sidebar-provider.test.d.ts +2 -0
- package/dist/components/ui/sidebar/sidebar-provider.test.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-provider.test.js +167 -0
- package/dist/components/ui/sidebar/sidebar-root.d.ts +3 -0
- package/dist/components/ui/sidebar/sidebar-root.d.ts.map +1 -0
- package/dist/components/ui/sidebar/sidebar-root.js +24 -0
- package/dist/components/ui/stepper/index.d.ts.map +1 -1
- package/dist/components/ui/stepper/index.js +5 -5
- package/dist/components/ui/stepper/styles.css +41 -0
- package/dist/components/ui/switch/index.js +1 -1
- package/dist/components/ui/table/index.js +4 -4
- package/dist/components/ui/tabs/index.d.ts.map +1 -1
- package/dist/components/ui/tabs/index.js +4 -4
- package/dist/components/ui/tabs/styles.css +31 -0
- package/dist/components/ui/textarea/index.js +1 -1
- package/dist/components/ui/toast/index.d.ts.map +1 -1
- package/dist/components/ui/toast/index.js +7 -7
- package/dist/components/ui/toast/toaster.js +1 -1
- package/dist/globals.css +333 -0
- package/dist/hooks/use-time.d.ts +6 -0
- package/dist/hooks/use-time.d.ts.map +1 -0
- package/dist/hooks/use-time.js +20 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/lib/storage/get-storage-object.d.ts +2 -0
- package/dist/lib/storage/get-storage-object.d.ts.map +1 -0
- package/dist/lib/storage/get-storage-object.js +19 -0
- package/dist/lib/storage/get-storage.d.ts +2 -0
- package/dist/lib/storage/get-storage.d.ts.map +1 -0
- package/dist/lib/storage/get-storage.js +17 -0
- package/dist/lib/storage/index.d.ts +3 -0
- package/dist/lib/storage/index.d.ts.map +1 -0
- package/dist/lib/storage/index.js +18 -0
- package/dist/public/arm.gif +0 -0
- package/dist/public/clap.gif +0 -0
- package/dist/public/confetti-ball.gif +0 -0
- package/dist/public/countries.json +21200 -21200
- package/dist/public/dizzy.gif +0 -0
- package/dist/public/electricity.gif +0 -0
- package/dist/public/gear.gif +0 -0
- package/dist/public/gem.gif +0 -0
- package/dist/public/pencil.gif +0 -0
- package/dist/public/robot.gif +0 -0
- package/dist/public/rocket.gif +0 -0
- package/dist/public/software.gif +0 -0
- package/dist/public/solar-system.gif +0 -0
- package/dist/public/unicorn.gif +0 -0
- package/dist/utilities.css +22 -0
- package/package.json +32 -29
- package/dist/components/ui/input-with-icon/index.d.ts +0 -12
- package/dist/components/ui/input-with-icon/index.d.ts.map +0 -1
- package/dist/components/ui/input-with-icon/index.js +0 -57
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Breadcrumb = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const breadcrumb_1 = require("../../components/ui/breadcrumb");
|
|
9
8
|
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const breadcrumb_1 = require("../../components/ui/breadcrumb");
|
|
10
10
|
const Breadcrumb = ({ paths }) => {
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(breadcrumb_1.Breadcrumb, { children: (0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbList, { children: paths.map((path, index) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbItem, { children: path.href ? ((0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbLink, { href: path.href, children: path.name })) : ((0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbPage, { children: path.name })) }),
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(breadcrumb_1.Breadcrumb, { children: (0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbList, { children: paths.map((path, index) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbItem, { children: path.href ? ((0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbLink, { href: path.href, children: path.name })) : ((0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbPage, { children: path.name })) }), (0, jsx_runtime_1.jsx)(breadcrumb_1.BreadcrumbSeparator, {})] }, index))) }) }));
|
|
12
12
|
};
|
|
13
13
|
exports.Breadcrumb = Breadcrumb;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Collapsible } from '@radix-ui/react-collapsible';
|
|
3
|
+
import { Button } from '../../../components/ui/button';
|
|
4
|
+
import { LucideProps } from 'lucide-react';
|
|
5
|
+
import { CollapsibleContent } from '../../../components/ui/collapsible';
|
|
6
|
+
export declare function AccountBalanceCard({ className, open, onOpenChange, children, ...props }: React.ComponentProps<typeof Collapsible>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function AccountBalanceCardIcon({ className, ...props }: LucideProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function AccountBalanceCardHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function AccountBalanceCardTitle({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function AccountBalanceCardDeleteButton({ className, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function AccountBalanceCardContent({ className, ...props }: React.ComponentProps<typeof CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function AccountBalanceCardLoading({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function AccountBalanceCardEmpty({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export type AccountBalanceCardInfoProps = React.ComponentProps<'div'> & {
|
|
15
|
+
assetCode: string;
|
|
16
|
+
value: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function AccountBalanceCardInfo({ className, assetCode, value, children: _children, ref, ...props }: AccountBalanceCardInfoProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export type AccountBalanceCardUpdateButtonProps = React.ComponentProps<typeof Button> & {
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
timestamp: number;
|
|
22
|
+
loadingLabel?: string;
|
|
23
|
+
updatedInLabel?: string;
|
|
24
|
+
updatedLabel?: string;
|
|
25
|
+
onRefresh: () => void;
|
|
26
|
+
};
|
|
27
|
+
export declare function AccountBalanceCardUpdateButton({ className: _className, loading, timestamp, loadingLabel, updatedInLabel, updatedLabel, onRefresh, children: _children, ref, ...props }: AccountBalanceCardUpdateButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function AccountBalanceCardTrigger({ className, openLabel, closeLabel, children, ...props }: React.ComponentProps<typeof Button> & {
|
|
29
|
+
openLabel?: string;
|
|
30
|
+
closeLabel?: string;
|
|
31
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/card/account-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAGzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAgB,WAAW,EAA0B,MAAM,cAAc,CAAA;AAChF,OAAO,EACL,kBAAkB,EAEnB,MAAM,6BAA6B,CAAA;AAUpC,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,2CAc1C;AAED,wBAAgB,sBAAsB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAS1E;AAED,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAQ3B;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,2CAarC;AAED,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,2CAWjD;AAED,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAW3B;AAED,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACtE,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,SAAS,EACT,KAAK,EACL,QAAQ,EAAE,SAAS,EACnB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,2BAA2B,2CAe7B;AAED,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC,cAAc,CACpE,OAAO,MAAM,CACd,GAAG;IACF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,SAAS,EAAE,UAAU,EACrB,OAAO,EACP,SAAS,EACT,YAA4B,EAC5B,cAA6B,EAC7B,YAAwB,EACxB,SAAS,EACT,QAAQ,EAAE,SAAS,EACnB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,mCAAmC,2CAgCrC;AAED,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,2CAeA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AccountBalanceCard = AccountBalanceCard;
|
|
7
|
+
exports.AccountBalanceCardIcon = AccountBalanceCardIcon;
|
|
8
|
+
exports.AccountBalanceCardHeader = AccountBalanceCardHeader;
|
|
9
|
+
exports.AccountBalanceCardTitle = AccountBalanceCardTitle;
|
|
10
|
+
exports.AccountBalanceCardDeleteButton = AccountBalanceCardDeleteButton;
|
|
11
|
+
exports.AccountBalanceCardContent = AccountBalanceCardContent;
|
|
12
|
+
exports.AccountBalanceCardLoading = AccountBalanceCardLoading;
|
|
13
|
+
exports.AccountBalanceCardEmpty = AccountBalanceCardEmpty;
|
|
14
|
+
exports.AccountBalanceCardInfo = AccountBalanceCardInfo;
|
|
15
|
+
exports.AccountBalanceCardUpdateButton = AccountBalanceCardUpdateButton;
|
|
16
|
+
exports.AccountBalanceCardTrigger = AccountBalanceCardTrigger;
|
|
17
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
const react_1 = __importDefault(require("react"));
|
|
19
|
+
const react_collapsible_1 = require("@radix-ui/react-collapsible");
|
|
20
|
+
const utils_1 = require("../../../lib/utils");
|
|
21
|
+
const card_1 = require("../../../components/ui/card");
|
|
22
|
+
const button_1 = require("../../../components/ui/button");
|
|
23
|
+
const lucide_react_1 = require("lucide-react");
|
|
24
|
+
const collapsible_1 = require("../../../components/ui/collapsible");
|
|
25
|
+
const skeleton_1 = require("../../../components/ui/skeleton");
|
|
26
|
+
const use_time_1 = require("../../../hooks/use-time");
|
|
27
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
28
|
+
const icon_button_1 = require("../../../components/ui/icon-button");
|
|
29
|
+
const AccountBalanceCardContext = react_1.default.createContext({
|
|
30
|
+
open: false
|
|
31
|
+
});
|
|
32
|
+
function AccountBalanceCard({ className, open, onOpenChange, children, ...props }) {
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(react_collapsible_1.Collapsible, { open: open, onOpenChange: onOpenChange, "data-slot": "account-balance-card", className: (0, utils_1.cn)('w-full', className), ...props, children: (0, jsx_runtime_1.jsx)(AccountBalanceCardContext.Provider, { value: { open }, children: (0, jsx_runtime_1.jsx)(card_1.Card, { className: "shadow-xs relative gap-2 px-5 py-4", children: children }) }) }));
|
|
34
|
+
}
|
|
35
|
+
function AccountBalanceCardIcon({ className, ...props }) {
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(lucide_react_1.User, { "data-slot": "account-balance-card-icon", strokeWidth: 1, className: (0, utils_1.cn)('text-foreground mb-[14px] size-8 opacity-40', className), ...props }));
|
|
37
|
+
}
|
|
38
|
+
function AccountBalanceCardHeader({ className, ...props }) {
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "account-balance-card-header", className: (0, utils_1.cn)('flex flex-col', className), ...props }));
|
|
40
|
+
}
|
|
41
|
+
function AccountBalanceCardTitle({ className, ...props }) {
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "account-balance-card-title", className: (0, utils_1.cn)('text-shadcn-600 text-lg font-bold', className), ...props }));
|
|
43
|
+
}
|
|
44
|
+
function AccountBalanceCardDeleteButton({ className, ...props }) {
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { variant: "outline", size: "small", rounded: true, "data-slot": "account-balance-card-delete-button", className: (0, utils_1.cn)('absolute right-3 top-3', className), ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Trash, { className: "text-muted-foreground h-4 w-4" }) }));
|
|
46
|
+
}
|
|
47
|
+
function AccountBalanceCardContent({ className, ...props }) {
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleContent, { "data-slot": "account-balance-card-content", className: (0, utils_1.cn)('data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden', className), ...props }));
|
|
49
|
+
}
|
|
50
|
+
function AccountBalanceCardLoading({ className, ...props }) {
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { "data-slot": "account-balance-card-loading", className: (0, utils_1.cn)('bg-muted mt-3 h-3 w-full rounded-md', className), ...props }));
|
|
52
|
+
}
|
|
53
|
+
function AccountBalanceCardEmpty({ className, ...props }) {
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "account-balance-card-empty", className: (0, utils_1.cn)('text-shadcn-500 mt-3 text-center text-sm font-normal', className), ...props }));
|
|
55
|
+
}
|
|
56
|
+
function AccountBalanceCardInfo({ className, assetCode, value, children: _children, ref, ...props }) {
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, "data-slot": "account-balance-card-info", className: (0, utils_1.cn)('text-shadcn-500 mt-3 flex flex-row items-center justify-between text-sm font-normal', className), ...props, children: [(0, jsx_runtime_1.jsx)("p", { children: assetCode }), (0, jsx_runtime_1.jsx)("p", { children: value })] }));
|
|
58
|
+
}
|
|
59
|
+
function AccountBalanceCardUpdateButton({ className: _className, loading, timestamp, loadingLabel = 'Updating...', updatedInLabel = 'Updated in', updatedLabel = 'Updated', onRefresh, children: _children, ref, ...props }) {
|
|
60
|
+
const _time = (0, use_time_1.useTime)({ interval: 1000 * 60 });
|
|
61
|
+
const updated = react_1.default.useMemo(() => {
|
|
62
|
+
return !(0, dayjs_1.default)(timestamp).isBefore((0, dayjs_1.default)().subtract(1, 'minute'));
|
|
63
|
+
}, [_time, timestamp]);
|
|
64
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "mb-3 flex flex-row items-center justify-end gap-2", children: [(0, jsx_runtime_1.jsxs)("p", { className: "text-shadcn-500 text-xs font-medium", children: [loading && loadingLabel, !loading && !updated && updatedInLabel, !loading && updated && updatedLabel] }), !loading && updated && ((0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, { className: "h-4 w-4 text-green-600" })), (!updated || loading) && ((0, jsx_runtime_1.jsx)(button_1.Button, { ref: ref, variant: "link", "data-slot": "account-balance-card-update-button", className: "h-3 p-0", onClick: onRefresh, disabled: loading, ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { className: (0, utils_1.cn)('size-4', { 'animate-spin': loading }) }) }))] }));
|
|
65
|
+
}
|
|
66
|
+
function AccountBalanceCardTrigger({ className, openLabel, closeLabel, children, ...props }) {
|
|
67
|
+
const { open } = react_1.default.useContext(AccountBalanceCardContext);
|
|
68
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(button_1.Button, { variant: "link", "data-slot": "account-balance-card-trigger", className: (0, utils_1.cn)('text-shadcn-600/40 h-4 p-0 text-xs', className), ...props, children: !open ? openLabel : closeLabel }) }));
|
|
69
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function BasicCard({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function BasicCardTitle({ className, ...props }: React.ComponentProps<'h2'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function BasicCardContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function BasicCardAction({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/card/basic-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAO7B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAO5B;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAO7B;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAE7B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BasicCard = BasicCard;
|
|
4
|
+
exports.BasicCardTitle = BasicCardTitle;
|
|
5
|
+
exports.BasicCardContent = BasicCardContent;
|
|
6
|
+
exports.BasicCardAction = BasicCardAction;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const utils_1 = require("../../../lib/utils");
|
|
9
|
+
function BasicCard({ className, ...props }) {
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('bg-card flex flex-col rounded-lg p-6', className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function BasicCardTitle({ className, ...props }) {
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("h2", { className: (0, utils_1.cn)('text-shadcn-600 mb-4 text-sm font-medium', className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function BasicCardContent({ className, ...props }) {
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('text-shadcn-500 mb-6 text-sm font-medium', className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function BasicCardAction({ className, ...props }) {
|
|
19
|
+
return (0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('flex flex-col', className), ...props });
|
|
20
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function DashboardCard({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function DashboardCardIcon({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function DashboardCardTitle({ className, ...props }: React.ComponentProps<'h2'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function DashboardCardContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/card/dashboard-card/index.tsx"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAU7B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAU7B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAU5B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAU7B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DashboardCard = DashboardCard;
|
|
4
|
+
exports.DashboardCardIcon = DashboardCardIcon;
|
|
5
|
+
exports.DashboardCardTitle = DashboardCardTitle;
|
|
6
|
+
exports.DashboardCardContent = DashboardCardContent;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const utils_1 = require("../../../lib/utils");
|
|
9
|
+
function DashboardCard({ className, ...props }) {
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('bg-card relative flex flex-col rounded-lg p-6 pt-4', className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function DashboardCardIcon({ className, ...props }) {
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('text-muted-foreground absolute right-6 top-4 flex size-6 items-center justify-center [&>svg]:size-6', className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function DashboardCardTitle({ className, ...props }) {
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("h2", { className: (0, utils_1.cn)('text-muted-foreground mb-4 text-sm font-medium uppercase', className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function DashboardCardContent({ className, ...props }) {
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('text-muted-foreground text-[32px] font-extrabold', className), ...props }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Badge } from '../../../components/ui/badge';
|
|
3
|
+
import { DropdownMenu, DropdownMenuItem } from '../../../components/ui/dropdown-menu';
|
|
4
|
+
export declare function EntityCardGrid({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function EntityCardGridFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export type EntityCardProps = React.ComponentProps<'div'> & {
|
|
7
|
+
value?: number;
|
|
8
|
+
progress?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function EntityCard({ className, value, progress, children, ...props }: EntityCardProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function EntityCardAction({ children, ...props }: React.ComponentProps<typeof DropdownMenu>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const EntityCardActionItem: typeof DropdownMenuItem;
|
|
13
|
+
export declare function EntityCardHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function EntityCardTitle({ className, ...props }: React.ComponentProps<'h3'>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function EntityCardIcon({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function EntityCardBadgeList({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function EntityCardBadge({ className, ...props }: React.ComponentProps<typeof Badge>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function EntityCardContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function EntityCardDescription({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function EntityCardList({ className, ...props }: React.ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function EntityCardFooter({ className, children, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/card/entity-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EACL,YAAY,EAEZ,gBAAgB,EAEjB,MAAM,+BAA+B,CAAA;AAOtC,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW7B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW7B;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,KAAK,EACL,QAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,2CAoBjB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,2CAW3C;AAED,eAAO,MAAM,oBAAoB,yBAAmB,CAAA;AAEpD,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAQ5B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAW9B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,2CAQpC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAQ3B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAW5B;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAgB7B"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntityCardActionItem = void 0;
|
|
4
|
+
exports.EntityCardGrid = EntityCardGrid;
|
|
5
|
+
exports.EntityCardGridFooter = EntityCardGridFooter;
|
|
6
|
+
exports.EntityCard = EntityCard;
|
|
7
|
+
exports.EntityCardAction = EntityCardAction;
|
|
8
|
+
exports.EntityCardHeader = EntityCardHeader;
|
|
9
|
+
exports.EntityCardTitle = EntityCardTitle;
|
|
10
|
+
exports.EntityCardIcon = EntityCardIcon;
|
|
11
|
+
exports.EntityCardBadgeList = EntityCardBadgeList;
|
|
12
|
+
exports.EntityCardBadge = EntityCardBadge;
|
|
13
|
+
exports.EntityCardContent = EntityCardContent;
|
|
14
|
+
exports.EntityCardDescription = EntityCardDescription;
|
|
15
|
+
exports.EntityCardList = EntityCardList;
|
|
16
|
+
exports.EntityCardFooter = EntityCardFooter;
|
|
17
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
const badge_1 = require("../../../components/ui/badge");
|
|
19
|
+
const dropdown_menu_1 = require("../../../components/ui/dropdown-menu");
|
|
20
|
+
const icon_button_1 = require("../../../components/ui/icon-button");
|
|
21
|
+
const progress_1 = require("../../../components/ui/progress");
|
|
22
|
+
const separator_1 = require("../../../components/ui/separator");
|
|
23
|
+
const utils_1 = require("../../../lib/utils");
|
|
24
|
+
const lucide_react_1 = require("lucide-react");
|
|
25
|
+
function EntityCardGrid({ className, ...props }) {
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3', className), "data-slot": "entity-card-grid", ...props }));
|
|
27
|
+
}
|
|
28
|
+
function EntityCardGridFooter({ className, ...props }) {
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('flex items-center justify-between rounded-lg border border-zinc-200 bg-white px-6 py-4', className), "data-slot": "entity-card-grid-footer", ...props }));
|
|
30
|
+
}
|
|
31
|
+
function EntityCard({ className, value, progress = false, children, ...props }) {
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-card-wrapper", className: "transition-shadow hover:shadow-xl", children: [(0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card", className: (0, utils_1.cn)('bg-card relative flex flex-col gap-4 rounded-lg px-5 py-4', { 'rounded-b-none': progress }, className), ...props, children: children }), progress && (0, jsx_runtime_1.jsx)(progress_1.Progress, { className: "h-1.5 rounded-t-none", value: value })] }));
|
|
33
|
+
}
|
|
34
|
+
function EntityCardAction({ children, ...props }) {
|
|
35
|
+
return ((0, jsx_runtime_1.jsxs)(dropdown_menu_1.DropdownMenu, { ...props, children: [(0, jsx_runtime_1.jsx)(dropdown_menu_1.DropdownMenuTrigger, { className: "absolute right-2.5 top-2.5", children: (0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { variant: "outline", size: "small", rounded: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.EllipsisVertical, {}) }) }), (0, jsx_runtime_1.jsx)(dropdown_menu_1.DropdownMenuContent, { children: children })] }));
|
|
36
|
+
}
|
|
37
|
+
exports.EntityCardActionItem = dropdown_menu_1.DropdownMenuItem;
|
|
38
|
+
function EntityCardHeader({ className, ...props }) {
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-header", className: (0, utils_1.cn)('flex flex-col gap-2', className), ...props }));
|
|
40
|
+
}
|
|
41
|
+
function EntityCardTitle({ className, ...props }) {
|
|
42
|
+
return ((0, jsx_runtime_1.jsx)("h3", { "data-slot": "entity-card-title", className: (0, utils_1.cn)('text-foreground text-sm font-semibold', className), ...props }));
|
|
43
|
+
}
|
|
44
|
+
function EntityCardIcon({ className, ...props }) {
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)("span", { "data-slot": "entity-card-icon", className: (0, utils_1.cn)('text-shadcn-400 size-8 [&>svg]:size-8 [&>svg]:stroke-[1.5]', className), ...props }));
|
|
46
|
+
}
|
|
47
|
+
function EntityCardBadgeList({ className, ...props }) {
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-badge-list", className: (0, utils_1.cn)('flex flex-wrap gap-2', className), ...props }));
|
|
49
|
+
}
|
|
50
|
+
function EntityCardBadge({ className, ...props }) {
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(badge_1.Badge, { "data-slot": "entity-card-badge", className: (0, utils_1.cn)('h-5 text-xs', className), ...props }));
|
|
52
|
+
}
|
|
53
|
+
function EntityCardContent({ className, ...props }) {
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-content", className: (0, utils_1.cn)('flex flex-col gap-2.5', className), ...props }));
|
|
55
|
+
}
|
|
56
|
+
function EntityCardDescription({ className, ...props }) {
|
|
57
|
+
return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "entity-card-description", className: (0, utils_1.cn)('text-shadcn-400 text-xs font-medium', className), ...props }));
|
|
58
|
+
}
|
|
59
|
+
function EntityCardList({ className, ...props }) {
|
|
60
|
+
return ((0, jsx_runtime_1.jsx)("ul", { "data-slot": "entity-card-list", className: (0, utils_1.cn)('text-shadcn-500 mx-2 list-inside list-disc space-y-1 text-xs font-medium', className), ...props }));
|
|
61
|
+
}
|
|
62
|
+
function EntityCardFooter({ className, children, ...props }) {
|
|
63
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-card-footer", className: (0, utils_1.cn)('text-shadcn-400 flex flex-col gap-2 text-xs font-medium', className), ...props, children: [(0, jsx_runtime_1.jsx)(separator_1.Separator, {}), (0, jsx_runtime_1.jsx)("div", { className: "[&>svg]:text-muted-foreground flex flex-row items-center gap-2 [&>svg]:size-4 [&>svg]:stroke-[1.5]", children: children })] }));
|
|
64
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./account-card"), exports);
|
|
18
|
+
__exportStar(require("./basic-card"), exports);
|
|
19
|
+
__exportStar(require("./dashboard-card"), exports);
|
|
20
|
+
__exportStar(require("./entity-card"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ConfirmationDialogProps = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onOpenChange: (open: boolean) => void;
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
ledgerName?: string;
|
|
7
|
+
variant?: 'default' | 'warning' | 'destructive' | 'success';
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
onConfirm?: () => void;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
confirmLabel?: string;
|
|
12
|
+
cancelLabel?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function ConfirmationDialog({ open, onOpenChange, title, description, variant, loading, onConfirm, onCancel, confirmLabel, cancelLabel }: ConfirmationDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/confirmation-dialog/index.tsx"],"names":[],"mappings":"AAoDA,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,YAAY,EACZ,KAAU,EACV,WAAgB,EAChB,OAAmB,EACnB,OAAO,EACP,SAAoB,EACpB,QAAmB,EACnB,YAAY,EACZ,WAAW,EACZ,EAAE,uBAAuB,2CA6BzB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ConfirmationDialog = ConfirmationDialog;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const button_1 = require("../../../components/ui/button");
|
|
7
|
+
const dialog_1 = require("../../../components/ui/dialog");
|
|
8
|
+
const loading_button_1 = require("../../../components/ui/loading-button");
|
|
9
|
+
const lucide_react_1 = require("lucide-react");
|
|
10
|
+
const utils_1 = require("../../../lib/utils");
|
|
11
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
12
|
+
const confirmationDialogIconVariants = (0, class_variance_authority_1.cva)('flex size-10 shrink-0 items-center justify-center rounded-lg [&>svg]:size-6', {
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: 'bg-red-50 text-red-500',
|
|
16
|
+
warning: 'bg-yellow-50 text-yellow-500',
|
|
17
|
+
destructive: 'bg-red-50 text-red-500',
|
|
18
|
+
success: 'bg-green-50 text-green-800'
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: 'default'
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const ConfirmationDialogIcon = ({ className, variant, ...props }) => ((0, jsx_runtime_1.jsxs)("span", { className: (0, utils_1.cn)(confirmationDialogIconVariants({ variant }), className), ...props, children: [variant === 'default' && (0, jsx_runtime_1.jsx)(lucide_react_1.Ban, {}), variant === 'warning' && (0, jsx_runtime_1.jsx)(lucide_react_1.TriangleAlert, {}), variant === 'destructive' && (0, jsx_runtime_1.jsx)(lucide_react_1.Ban, {}), variant === 'success' && (0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, {})] }));
|
|
26
|
+
function ConfirmationDialog({ open, onOpenChange, title = '', description = '', variant = 'default', loading, onConfirm = () => { }, onCancel = () => { }, confirmLabel, cancelLabel }) {
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(dialog_1.Dialog, { open: open, onOpenChange: onOpenChange, children: (0, jsx_runtime_1.jsxs)(dialog_1.DialogContent, { "data-testid": "dialog", children: [(0, jsx_runtime_1.jsxs)(dialog_1.DialogHeader, { className: "flex-row items-center", children: [(0, jsx_runtime_1.jsx)(ConfirmationDialogIcon, { variant: variant }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-4", children: [(0, jsx_runtime_1.jsx)(dialog_1.DialogTitle, { children: title }), (0, jsx_runtime_1.jsx)(dialog_1.DialogDescription, { children: description })] })] }), (0, jsx_runtime_1.jsxs)(dialog_1.DialogFooter, { className: "gap-4", children: [(0, jsx_runtime_1.jsx)(button_1.Button, { onClick: onCancel, variant: "secondary", size: "small", children: cancelLabel ?? 'Cancel' }), (0, jsx_runtime_1.jsx)(loading_button_1.LoadingButton, { loading: loading, onClick: onConfirm, variant: "primary", size: "small", "data-testid": "confirm", children: confirmLabel ?? 'Confirm' })] })] }) }));
|
|
28
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type UseConfirmDialog = {
|
|
2
|
+
onConfirm?: (id: string) => void;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* A custom hook that manages the state and behavior of a confirmation dialog.
|
|
6
|
+
*
|
|
7
|
+
* @template TData - The type of the data associated with the dialog.
|
|
8
|
+
*
|
|
9
|
+
* @param {UseConfirmDialog} param0 - An object containing the onConfirm callback.
|
|
10
|
+
* @param {Function} [param0.onConfirm] - A callback function that is called when the dialog is confirmed.
|
|
11
|
+
*
|
|
12
|
+
* @returns {Object} An object containing the dialog state and handlers.
|
|
13
|
+
* @returns {string} id - The current id associated with the dialog.
|
|
14
|
+
* @returns {TData | null} data - The current data associated with the dialog.
|
|
15
|
+
* @returns {Function} handleDialogOpen - A function to open the dialog with a specific id and optional data.
|
|
16
|
+
* @returns {Object} dialogProps - An object containing the dialog properties and handlers.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useConfirmDialog<TData = {}>({ onConfirm: onConfirmProp }: UseConfirmDialog): {
|
|
19
|
+
id: string;
|
|
20
|
+
data: TData | null;
|
|
21
|
+
handleDialogClose: () => void;
|
|
22
|
+
handleDialogOpen: (id: string, data?: any) => void;
|
|
23
|
+
dialogProps: {
|
|
24
|
+
open: boolean;
|
|
25
|
+
onOpenChange: (open: boolean) => void;
|
|
26
|
+
onCancel: () => void;
|
|
27
|
+
onConfirm: () => void;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=use-confirm-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-confirm-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/confirmation-dialog/use-confirm-dialog.ts"],"names":[],"mappings":"AAEA,KAAK,gBAAgB,GAAG;IACtB,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,GAAG,EAAE,EAAE,EAC3C,SAAS,EAAE,aAAa,EACzB,EAAE,gBAAgB;;;;2BAOa,MAAM,SAAS,GAAG;;;6BAFpB,OAAO;;;;EAkCpC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useConfirmDialog = useConfirmDialog;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
/**
|
|
9
|
+
* A custom hook that manages the state and behavior of a confirmation dialog.
|
|
10
|
+
*
|
|
11
|
+
* @template TData - The type of the data associated with the dialog.
|
|
12
|
+
*
|
|
13
|
+
* @param {UseConfirmDialog} param0 - An object containing the onConfirm callback.
|
|
14
|
+
* @param {Function} [param0.onConfirm] - A callback function that is called when the dialog is confirmed.
|
|
15
|
+
*
|
|
16
|
+
* @returns {Object} An object containing the dialog state and handlers.
|
|
17
|
+
* @returns {string} id - The current id associated with the dialog.
|
|
18
|
+
* @returns {TData | null} data - The current data associated with the dialog.
|
|
19
|
+
* @returns {Function} handleDialogOpen - A function to open the dialog with a specific id and optional data.
|
|
20
|
+
* @returns {Object} dialogProps - An object containing the dialog properties and handlers.
|
|
21
|
+
*/
|
|
22
|
+
function useConfirmDialog({ onConfirm: onConfirmProp }) {
|
|
23
|
+
const [id, setId] = react_1.default.useState('');
|
|
24
|
+
const [data, setData] = react_1.default.useState(null);
|
|
25
|
+
const [open, setOpen] = react_1.default.useState(false);
|
|
26
|
+
const onOpenChange = (open) => setOpen(open);
|
|
27
|
+
const handleDialogOpen = (id, data) => {
|
|
28
|
+
setId(id);
|
|
29
|
+
setData(data);
|
|
30
|
+
setOpen(true);
|
|
31
|
+
};
|
|
32
|
+
const handleDialogClose = () => setOpen(false);
|
|
33
|
+
const onCancel = () => {
|
|
34
|
+
setId('');
|
|
35
|
+
setData(null);
|
|
36
|
+
setOpen(false);
|
|
37
|
+
};
|
|
38
|
+
const onConfirm = () => {
|
|
39
|
+
setId('');
|
|
40
|
+
setData(null);
|
|
41
|
+
onConfirmProp?.(id);
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
id,
|
|
45
|
+
data,
|
|
46
|
+
handleDialogClose,
|
|
47
|
+
handleDialogOpen,
|
|
48
|
+
dialogProps: {
|
|
49
|
+
open,
|
|
50
|
+
onOpenChange,
|
|
51
|
+
onCancel,
|
|
52
|
+
onConfirm
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/index.tsx"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,0CAA0C,CAAA;AACxD,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./confirmation-dialog"), exports);
|
|
18
|
+
__exportStar(require("./confirmation-dialog/use-confirm-dialog"), exports);
|
|
19
|
+
__exportStar(require("./large-dialog"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DialogContentProps } from '@radix-ui/react-dialog';
|
|
2
|
+
declare function OnboardDialogContent({ className, ...props }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function OnboardDialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export type OnboardDialogTitleProps = React.ComponentProps<'div'> & {
|
|
5
|
+
upperTitle: string;
|
|
6
|
+
title: string;
|
|
7
|
+
};
|
|
8
|
+
declare function OnboardDialogTitle({ upperTitle, title, className, ...props }: OnboardDialogTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function OnboardDialogIcon({ className, children, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { OnboardDialogContent, OnboardDialogHeader, OnboardDialogTitle, OnboardDialogIcon };
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/large-dialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,2CAYxE;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAClE,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,iBAAS,kBAAkB,CAAC,EAC1B,UAAU,EACV,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAezB;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAU7B;AAED,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EAClB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnboardDialogContent = OnboardDialogContent;
|
|
4
|
+
exports.OnboardDialogHeader = OnboardDialogHeader;
|
|
5
|
+
exports.OnboardDialogTitle = OnboardDialogTitle;
|
|
6
|
+
exports.OnboardDialogIcon = OnboardDialogIcon;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const utils_1 = require("../../../lib/utils");
|
|
9
|
+
const dialog_1 = require("../../../components/ui/dialog");
|
|
10
|
+
function OnboardDialogContent({ className, ...props }) {
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(dialog_1.DialogContent, { "data-slot": "onboard-dialog-content", showCloseButton: false, className: (0, utils_1.cn)('[data-radix-dialog-close] w-full max-w-[640px] p-12 sm:min-w-[640px]', className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
function OnboardDialogHeader({ className, ...props }) {
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "onboard-dialog-header", className: (0, utils_1.cn)('flex flex-row justify-between', className), ...props }));
|
|
15
|
+
}
|
|
16
|
+
function OnboardDialogTitle({ upperTitle, title, className, ...props }) {
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "onboard-dialog-title", className: (0, utils_1.cn)('flex flex-col gap-8', className), ...props, children: [(0, jsx_runtime_1.jsx)("p", { className: "text-muted-foreground text-base font-medium", children: upperTitle }), (0, jsx_runtime_1.jsx)(dialog_1.DialogTitle, { className: "text-muted-foreground text-4xl font-bold", children: title })] }));
|
|
18
|
+
}
|
|
19
|
+
function OnboardDialogIcon({ className, children, ...props }) {
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "onboard-dialog-icon", className: (0, utils_1.cn)('flex items-center px-12', className), ...props, children: (0, jsx_runtime_1.jsx)("div", { className: "shrink-0", children: children }) }));
|
|
21
|
+
}
|
|
@@ -15,10 +15,10 @@ const collapsible_1 = require("../ui/collapsible");
|
|
|
15
15
|
const button_1 = require("../ui/button");
|
|
16
16
|
const separator_1 = require("../ui/separator");
|
|
17
17
|
function EntityBox({ className, children, ...props }) {
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-box", className: (0, utils_1.cn)('shadow-entity-box mb-2 flex items-center justify-between rounded-lg
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-box", className: (0, utils_1.cn)('shadow-entity-box bg-card mb-2 flex items-center justify-between rounded-lg p-6', className), ...props, children: children }));
|
|
19
19
|
}
|
|
20
20
|
function EntityBoxCollapsible({ className, ...props }) {
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(collapsible_1.Collapsible, { className: (0, utils_1.cn)('shadow-entity-box mb-2 flex flex-col rounded-lg
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(collapsible_1.Collapsible, { className: (0, utils_1.cn)('shadow-entity-box bg-card mb-2 flex flex-col rounded-lg', className), ...props }));
|
|
22
22
|
}
|
|
23
23
|
function EntityBoxCollapsibleTrigger(props) {
|
|
24
24
|
return ((0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleTrigger, { ...props, asChild: true, children: (0, jsx_runtime_1.jsx)(button_1.Button, { variant: "secondary", className: "h-[34px] w-[34px] p-2", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Settings2, { size: 16 }) }) }));
|
|
@@ -27,7 +27,7 @@ function EntityBoxCollapsibleContent({ children, ...props }) {
|
|
|
27
27
|
return ((0, jsx_runtime_1.jsxs)(collapsible_1.CollapsibleContent, { ...props, children: [(0, jsx_runtime_1.jsx)(separator_1.Separator, { orientation: "horizontal" }), (0, jsx_runtime_1.jsx)("div", { className: "grid w-full grid-cols-3 p-6", children: children })] }));
|
|
28
28
|
}
|
|
29
29
|
function EntityBoxHeaderTitle({ title, subtitle, tooltip, tooltipWidth, className, ...props }) {
|
|
30
|
-
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-box-header", className: (0, utils_1.cn)('flex flex-col items-start', className), ...props, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-[10px]", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-lg font-medium
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-box-header", className: (0, utils_1.cn)('flex flex-col items-start', className), ...props, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-[10px]", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-muted-foreground text-lg font-medium", children: title }), tooltip && ((0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.CircleHelp, { className: "pointer text-shadcn-400 h-5 w-5" }) }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { side: "right", style: tooltipWidth
|
|
31
31
|
? { width: tooltipWidth, maxWidth: tooltipWidth }
|
|
32
32
|
: undefined, children: tooltip })] }) }))] }), subtitle && (0, jsx_runtime_1.jsx)("p", { className: "text-shadcn-400 text-sm", children: subtitle })] }));
|
|
33
33
|
}
|
|
@@ -22,7 +22,7 @@ const ComboBoxField = ({ name, label, placeholder, emptyMessage, required, child
|
|
|
22
22
|
const getDisplayValue = react_1.default.useCallback((value) => {
|
|
23
23
|
return options.find((option) => option.value === value)?.label ?? null;
|
|
24
24
|
}, [options]);
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)(form_1.FormField, { name: name, ...others, render: ({ field }) => ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, children: [label && (0, jsx_runtime_1.jsx)(form_1.FormLabel, { children: label }), (0, jsx_runtime_1.jsxs)(popover_1.Popover, { open: readOnly ? false : open, onOpenChange: readOnly ? () => { } : setOpen, children: [(0, jsx_runtime_1.jsx)(popover_1.PopoverTrigger, { asChild: true, children: (0, jsx_runtime_1.jsxs)(button_1.Button, { variant: "outline", role: "combobox", "aria-expanded": readOnly ? false : open, readOnly: readOnly, tabIndex: 0, className: (0, utils_1.cn)('w-full justify-between', !field.value && 'text-muted-foreground'), children: [getDisplayValue(field.value) ?? placeholder, !readOnly && ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" }))] }) }), (0, jsx_runtime_1.jsx)(popover_1.PopoverContent, { className: "w-(--radix-popover-trigger-width) p-0", children: (0, jsx_runtime_1.jsxs)(command_1.Command, { children: [(0, jsx_runtime_1.jsx)(command_1.CommandInput, { placeholder: placeholder }), (0, jsx_runtime_1.jsxs)(command_1.CommandList, { children: [(0, jsx_runtime_1.jsx)(command_1.CommandEmpty, { children: emptyMessage }), (0, jsx_runtime_1.jsx)(command_1.CommandGroup, { children: react_1.default.Children.map(react_1.default.Children.toArray(children), (child) => react_1.default.isValidElement(child)
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(form_1.FormField, { name: name, ...others, render: ({ field }) => ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, children: [label && (0, jsx_runtime_1.jsx)(form_1.FormLabel, { children: label }), (0, jsx_runtime_1.jsxs)(popover_1.Popover, { open: readOnly ? false : open, onOpenChange: readOnly ? () => { } : setOpen, children: [(0, jsx_runtime_1.jsx)(popover_1.PopoverTrigger, { asChild: true, children: (0, jsx_runtime_1.jsxs)(button_1.Button, { variant: "outline", role: "combobox", "aria-expanded": readOnly ? false : open, readOnly: readOnly, tabIndex: 0, className: (0, utils_1.cn)('border-border bg-input hover:bg-input h-10 w-full justify-between rounded-md border px-4 py-2 pl-6 text-left text-sm font-normal focus:outline-none focus:ring-2 focus:ring-offset-0', !field.value && 'text-muted-foreground'), children: [getDisplayValue(field.value) ?? placeholder, !readOnly && ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" }))] }) }), (0, jsx_runtime_1.jsx)(popover_1.PopoverContent, { className: "w-(--radix-popover-trigger-width) p-0", children: (0, jsx_runtime_1.jsxs)(command_1.Command, { children: [(0, jsx_runtime_1.jsx)(command_1.CommandInput, { placeholder: placeholder }), (0, jsx_runtime_1.jsxs)(command_1.CommandList, { children: [(0, jsx_runtime_1.jsx)(command_1.CommandEmpty, { children: emptyMessage }), (0, jsx_runtime_1.jsx)(command_1.CommandGroup, { children: react_1.default.Children.map(react_1.default.Children.toArray(children), (child) => react_1.default.isValidElement(child)
|
|
26
26
|
? react_1.default.cloneElement(child, {
|
|
27
27
|
keywords: [child.props.children],
|
|
28
28
|
onSelect: (value) => {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Control } from 'react-hook-form';
|
|
3
|
+
export type DatePickerFieldProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
tooltip?: string;
|
|
7
|
+
labelExtra?: ReactNode;
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
control: Control<any>;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
dateFormat?: string;
|
|
15
|
+
align?: 'start' | 'center' | 'end';
|
|
16
|
+
'data-testid'?: string;
|
|
17
|
+
valueAsString?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const DatePickerField: ({ name, label, tooltip, labelExtra, description, placeholder, disabled, readOnly, control, required, dateFormat, align, valueAsString, ...others }: DatePickerFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|