@lerianstudio/sindarian-ui 1.3.0-beta.3 → 1.3.0-beta.5
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/dialog/confirmation-dialog/index.d.ts.map +1 -1
- package/dist/components/dialog/confirmation-dialog/index.js +1 -1
- package/dist/components/page-header/index.d.ts +14 -2
- package/dist/components/page-header/index.d.ts.map +1 -1
- package/dist/components/page-header/index.js +4 -4
- package/dist/components/ui/alert/styles.css +3 -3
- package/dist/components/ui/badge/index.d.ts +8 -1
- package/dist/components/ui/badge/index.d.ts.map +1 -1
- package/dist/components/ui/badge/index.js +9 -1
- package/dist/components/ui/breadcrumb/styles.css +1 -1
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-expand-button.js +1 -1
- package/dist/domain/blotter/index.d.ts +7 -1
- package/dist/domain/blotter/index.d.ts.map +1 -1
- package/dist/domain/blotter/index.js +7 -3
- package/dist/domain/delinquency-aging/aging-buckets.d.ts +4 -1
- package/dist/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
- package/dist/domain/delinquency-aging/aging-buckets.js +7 -2
- package/dist/domain/delinquency-aging/index.d.ts +11 -1
- package/dist/domain/delinquency-aging/index.d.ts.map +1 -1
- package/dist/domain/delinquency-aging/index.js +7 -3
- package/dist/domain/figure/index.d.ts +13 -6
- package/dist/domain/figure/index.d.ts.map +1 -1
- package/dist/domain/figure/index.js +1 -0
- package/dist/domain/section-label/index.d.ts +7 -1
- package/dist/domain/section-label/index.d.ts.map +1 -1
- package/dist/domain/section-label/index.js +6 -2
- package/dist/enterprise/search-input/index.d.ts +7 -1
- package/dist/enterprise/search-input/index.d.ts.map +1 -1
- package/dist/enterprise/search-input/index.js +2 -2
- package/dist/esm/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/dialog/confirmation-dialog/index.js +1 -1
- package/dist/esm/components/page-header/index.d.ts +14 -2
- package/dist/esm/components/page-header/index.d.ts.map +1 -1
- package/dist/esm/components/page-header/index.js +4 -4
- package/dist/esm/components/ui/badge/index.d.ts +8 -1
- package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
- package/dist/esm/components/ui/badge/index.js +9 -1
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts +5 -0
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +1 -1
- package/dist/esm/domain/blotter/index.d.ts +7 -1
- package/dist/esm/domain/blotter/index.d.ts.map +1 -1
- package/dist/esm/domain/blotter/index.js +7 -3
- package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts +4 -1
- package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
- package/dist/esm/domain/delinquency-aging/aging-buckets.js +7 -2
- package/dist/esm/domain/delinquency-aging/index.d.ts +11 -1
- package/dist/esm/domain/delinquency-aging/index.d.ts.map +1 -1
- package/dist/esm/domain/delinquency-aging/index.js +7 -3
- package/dist/esm/domain/figure/index.d.ts +13 -6
- package/dist/esm/domain/figure/index.d.ts.map +1 -1
- package/dist/esm/domain/figure/index.js +1 -0
- package/dist/esm/domain/section-label/index.d.ts +7 -1
- package/dist/esm/domain/section-label/index.d.ts.map +1 -1
- package/dist/esm/domain/section-label/index.js +6 -2
- package/dist/esm/enterprise/search-input/index.d.ts +7 -1
- package/dist/esm/enterprise/search-input/index.d.ts.map +1 -1
- package/dist/esm/enterprise/search-input/index.js +2 -2
- package/dist/globals.css +70 -58
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/confirmation-dialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAuD9B,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,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,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,EACX,YAA4B,EAC7B,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/confirmation-dialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAuD9B,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,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,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,EACX,YAA4B,EAC7B,EAAE,uBAAuB,qBAmFzB"}
|
|
@@ -89,5 +89,5 @@ function ConfirmationDialog({ open, onOpenChange, title = '', description = '',
|
|
|
89
89
|
if (busy) {
|
|
90
90
|
event.preventDefault();
|
|
91
91
|
}
|
|
92
|
-
}, children: [(0, jsx_runtime_1.jsxs)(alert_dialog_1.AlertDialogHeader, { 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)(alert_dialog_1.AlertDialogTitle, { children: title }), (0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogDescription, { children: description })] })] }), (0, jsx_runtime_1.jsx)("span", { role: "status", className: "sr-only", children: busy ? pendingLabel : '' }), (0, jsx_runtime_1.jsxs)(alert_dialog_1.AlertDialogFooter, { className: "gap-4", children: [(0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogCancel, { asChild: true, children: (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: onCancel, disabled: busy, variant: "secondary", size: "small", className: "
|
|
92
|
+
}, children: [(0, jsx_runtime_1.jsxs)(alert_dialog_1.AlertDialogHeader, { 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)(alert_dialog_1.AlertDialogTitle, { children: title }), (0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogDescription, { children: description })] })] }), (0, jsx_runtime_1.jsx)("span", { role: "status", className: "sr-only", children: busy ? pendingLabel : '' }), (0, jsx_runtime_1.jsxs)(alert_dialog_1.AlertDialogFooter, { className: "gap-4", children: [(0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogCancel, { asChild: true, children: (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: onCancel, disabled: busy, variant: "secondary", size: "small", className: "button-secondary", children: cancelLabel ?? 'Cancel' }) }), (0, jsx_runtime_1.jsx)(loading_button_1.LoadingButton, { loading: busy, onClick: handleConfirm, variant: "primary", size: "small", "data-testid": "confirm", children: confirmLabel ?? 'Confirm' })] })] }) }));
|
|
93
93
|
}
|
|
@@ -3,17 +3,29 @@ export declare function PageHeaderActionButtons({ className, ...props }: React.C
|
|
|
3
3
|
export declare function PageHeaderWrapper({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
|
|
4
4
|
type PageHeaderProps = {
|
|
5
5
|
children: ReactNode;
|
|
6
|
+
/** Routed to the inner Collapsible, as it always has been. */
|
|
6
7
|
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Seam for the root element's own margins. Merged AFTER the hard-coded
|
|
10
|
+
* `mt-12`/`mb-12` so a consumer utility (e.g. `mt-0`) wins via tailwind-merge.
|
|
11
|
+
*/
|
|
12
|
+
rootClassName?: string;
|
|
7
13
|
};
|
|
8
|
-
export declare function PageHeader({ children, className }: PageHeaderProps): import("react").JSX.Element;
|
|
14
|
+
export declare function PageHeader({ children, className, rootClassName }: PageHeaderProps): import("react").JSX.Element;
|
|
9
15
|
export type PageHeaderInfoTitleProps = {
|
|
10
16
|
title: string;
|
|
11
17
|
subtitle?: string;
|
|
12
18
|
subtitleCopyToClipboard?: boolean;
|
|
19
|
+
/** Routed to the `h1`, as it always has been. */
|
|
13
20
|
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Seam for the wrapper element's own margins. Merged AFTER the hard-coded
|
|
23
|
+
* `mb-12` so a consumer utility (e.g. `mb-0`) wins via tailwind-merge.
|
|
24
|
+
*/
|
|
25
|
+
containerClassName?: string;
|
|
14
26
|
children?: ReactNode;
|
|
15
27
|
};
|
|
16
|
-
export declare function PageHeaderInfoTitle({ title, subtitle, className, children }: PageHeaderInfoTitleProps): import("react").JSX.Element;
|
|
28
|
+
export declare function PageHeaderInfoTitle({ title, subtitle, className, containerClassName, children }: PageHeaderInfoTitleProps): import("react").JSX.Element;
|
|
17
29
|
export type PageHeaderInfoTooltipProps = {
|
|
18
30
|
subtitle: string;
|
|
19
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAwB,MAAM,OAAO,CAAA;AAmBtE,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQ7B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAc7B;AAED,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAwB,MAAM,OAAO,CAAA;AAmBtE,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,C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,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,MAAM,EACN,OAAO,EACP,IAAI,EACL,EAAE,8BAA8B,+BAyChC"}
|
|
@@ -24,12 +24,12 @@ function PageHeaderWrapper({ className, ...props }) {
|
|
|
24
24
|
const { isOpen } = (0, react_1.useContext)(PageHeaderContext);
|
|
25
25
|
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "page-header-wrapper", className: (0, utils_1.cn)('flex items-start justify-between', isOpen && 'border-b', className), ...props }));
|
|
26
26
|
}
|
|
27
|
-
function PageHeader({ children, className }) {
|
|
27
|
+
function PageHeader({ children, className, rootClassName }) {
|
|
28
28
|
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(PageHeaderContext.Provider, { value: { isOpen }, children: (0, jsx_runtime_1.jsx)("div", { "data-slot": "page-header", className: (0, utils_1.cn)('mt-12', isOpen && 'mb-12'), children: (0, jsx_runtime_1.jsx)(collapsible_1.Collapsible, { open: isOpen, onOpenChange: setIsOpen, className: className, children: children }) }) }));
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(PageHeaderContext.Provider, { value: { isOpen }, children: (0, jsx_runtime_1.jsx)("div", { "data-slot": "page-header", className: (0, utils_1.cn)('mt-12', isOpen && 'mb-12', rootClassName), children: (0, jsx_runtime_1.jsx)(collapsible_1.Collapsible, { open: isOpen, onOpenChange: setIsOpen, className: className, children: children }) }) }));
|
|
30
30
|
}
|
|
31
|
-
function PageHeaderInfoTitle({ title, subtitle, className, children }) {
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "page-header-info-title", className:
|
|
31
|
+
function PageHeaderInfoTitle({ title, subtitle, className, containerClassName, children }) {
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "page-header-info-title", className: (0, utils_1.cn)('mb-12 flex flex-col gap-4', containerClassName), children: [(0, jsx_runtime_1.jsx)("h1", { className: (0, utils_1.cn)('text-foreground text-4xl font-bold', className), "data-testid": "title", children: title }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-shadcn-400 text-sm font-medium", children: subtitle }), children] })] }));
|
|
33
33
|
}
|
|
34
34
|
function PageHeaderInfoTooltip({ subtitle }) {
|
|
35
35
|
const { toast } = (0, use_toast_1.useToast)();
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
@layer components {
|
|
24
24
|
.alert {
|
|
25
25
|
@apply p-alert-p text-alert-text bg-card relative w-full rounded-lg;
|
|
26
|
-
@apply [&>svg]:size-alert-icon-size [&>svg
|
|
26
|
+
@apply [&>svg]:size-alert-icon-size [&>svg]:text-alert-text [&>svg]:absolute [&>svg]:top-4.5 [&>svg]:left-4.5 [&>svg~*]:pl-9.5;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.alert-informative {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.alert-title {
|
|
50
|
-
@apply text-alert-title mb-2 font-medium
|
|
50
|
+
@apply text-alert-title mb-2 leading-none font-medium tracking-tight;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.alert-description {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.alert-top-action {
|
|
62
|
-
@apply absolute
|
|
62
|
+
@apply absolute top-2 right-2 flex gap-2 !pl-0;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.alert-close {
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* `credit` is the accounting reading of a credit amount, NOT an alias of
|
|
5
|
+
* `destructive` (an error/alarm). The credit role is a tint-and-ink pair:
|
|
6
|
+
* `--credit-foreground` mirrors `--credit` by contract, so the red carries the
|
|
7
|
+
* role as text over a tinted surface. Do not "fix" this into a solid
|
|
8
|
+
* `bg-credit` fill — that renders red-on-red and is invisible.
|
|
9
|
+
*/
|
|
3
10
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "secondary" | "outline" | "destructive" | "alert" | "success" | "active" | "inactive" | "error" | "info" | "purple" | null | undefined;
|
|
11
|
+
variant?: "default" | "secondary" | "outline" | "destructive" | "alert" | "success" | "active" | "inactive" | "credit" | "error" | "info" | "purple" | null | undefined;
|
|
5
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
13
|
export type BadgeProps = React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
7
14
|
asChild?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,aAAa;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE;;;;;;GAMG;AACH,QAAA,MAAM,aAAa;;8EAiClB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GACnD,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAE5D,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBAUnE;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -6,6 +6,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const class_variance_authority_1 = require("class-variance-authority");
|
|
7
7
|
const utils_1 = require("../../../lib/utils");
|
|
8
8
|
const react_slot_1 = require("@radix-ui/react-slot");
|
|
9
|
+
/**
|
|
10
|
+
* `credit` is the accounting reading of a credit amount, NOT an alias of
|
|
11
|
+
* `destructive` (an error/alarm). The credit role is a tint-and-ink pair:
|
|
12
|
+
* `--credit-foreground` mirrors `--credit` by contract, so the red carries the
|
|
13
|
+
* role as text over a tinted surface. Do not "fix" this into a solid
|
|
14
|
+
* `bg-credit` fill — that renders red-on-red and is invisible.
|
|
15
|
+
*/
|
|
9
16
|
const badgeVariants = (0, class_variance_authority_1.cva)('inline-flex items-center rounded-full border border-border px-2.5 py-0.5 text-sm font-medium transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2', {
|
|
10
17
|
variants: {
|
|
11
18
|
variant: {
|
|
@@ -13,7 +20,8 @@ const badgeVariants = (0, class_variance_authority_1.cva)('inline-flex items-cen
|
|
|
13
20
|
active: 'bg-system-success-surface text-system-success-h1a border-system-success-border py-[2px] px-3',
|
|
14
21
|
inactive: 'bg-muted text-foreground border-muted-foreground/40 py-[2px] px-3',
|
|
15
22
|
secondary: 'border-transparent bg-muted-foreground text-white dark:text-black',
|
|
16
|
-
destructive: 'border-transparent bg-
|
|
23
|
+
destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
|
|
24
|
+
credit: 'border-credit/30 bg-credit/10 text-credit-foreground px-[10px] py-1',
|
|
17
25
|
error: 'border-system-error-border bg-system-error-surface text-system-error-text px-[10px] py-1',
|
|
18
26
|
success: 'border-system-success-border bg-system-success-surface text-system-success-text px-[10px] py-1',
|
|
19
27
|
info: 'border-system-info-border bg-system-info-surface text-system-info-text px-[10px] py-1',
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type SidebarExpandButtonProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Overrides the button's accessible name in BOTH states, and the visible
|
|
5
|
+
* tooltip copy in the collapsed state. Without it each state falls back to
|
|
6
|
+
* its own English default.
|
|
7
|
+
*/
|
|
3
8
|
tooltip?: string;
|
|
4
9
|
};
|
|
5
10
|
export declare const SidebarExpandButton: ({ tooltip }: SidebarExpandButtonProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-expand-button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/sidebar/sidebar-expand-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,KAAK,wBAAwB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,aAAa,wBAAwB,
|
|
1
|
+
{"version":3,"file":"sidebar-expand-button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/sidebar/sidebar-expand-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,KAAK,wBAAwB,GAAG;IAC9B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,aAAa,wBAAwB,sBA6CxE,CAAA"}
|
|
@@ -14,6 +14,6 @@ const tooltip_1 = require("../../ui/tooltip");
|
|
|
14
14
|
const icon_button_1 = require("../icon-button");
|
|
15
15
|
const SidebarExpandButton = ({ tooltip }) => {
|
|
16
16
|
const { isCollapsed, toggleSidebar } = (0, sidebar_provider_1.useSidebar)();
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [!isCollapsed && ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-expand-button", className: "border-border bg-card flex w-full", children: (0, jsx_runtime_1.jsx)("div", { className: "absolute right-[-20px] bottom-4", children: (0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { variant: "secondary", rounded: true, onClick: toggleSidebar, children: (0, jsx_runtime_1.jsx)(lucide_react_1.PanelLeftClose, { className: "text-shadcn-400" }) }) }) })), isCollapsed && ((0, jsx_runtime_1.jsx)(sidebar_components_1.SidebarFooter, { children: (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, { className: "group/expand-button text-shadcn-400 hover:bg-accent rounded-sm bg-transparent p-2", onClick: toggleSidebar, children: (0, jsx_runtime_1.jsx)(lucide_react_1.PanelRightClose, { className: "group-hover/expand-button:text-white dark:text-white" }) }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { side: "right", children: tooltip || 'Expand' })] }) }) }))] }));
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [!isCollapsed && ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-expand-button", className: "border-border bg-card flex w-full", children: (0, jsx_runtime_1.jsx)("div", { className: "absolute right-[-20px] bottom-4", children: (0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { variant: "secondary", rounded: true, onClick: toggleSidebar, "aria-label": tooltip || 'Collapse sidebar', "aria-expanded": true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.PanelLeftClose, { className: "text-shadcn-400" }) }) }) })), isCollapsed && ((0, jsx_runtime_1.jsx)(sidebar_components_1.SidebarFooter, { children: (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, { className: "group/expand-button text-shadcn-400 hover:bg-accent rounded-sm bg-transparent p-2", onClick: toggleSidebar, "aria-label": tooltip || 'Expand sidebar', "aria-expanded": false, children: (0, jsx_runtime_1.jsx)(lucide_react_1.PanelRightClose, { className: "group-hover/expand-button:text-white dark:text-white" }) }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { side: "right", children: tooltip || 'Expand' })] }) }) }))] }));
|
|
18
18
|
};
|
|
19
19
|
exports.SidebarExpandButton = SidebarExpandButton;
|
|
@@ -35,6 +35,12 @@ export type BlotterRowProps = {
|
|
|
35
35
|
* used by inline rows.
|
|
36
36
|
*/
|
|
37
37
|
stacked?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Render a skeleton in the value slot and mark the row `aria-busy`. The label
|
|
40
|
+
* is known before the figure is, so it keeps rendering — a loading blotter
|
|
41
|
+
* still reads as the same set of rows. Default off.
|
|
42
|
+
*/
|
|
43
|
+
loading?: boolean;
|
|
38
44
|
};
|
|
39
|
-
export declare function BlotterRow({ label, value, valueClassName, className, stacked }: BlotterRowProps): import("react").JSX.Element;
|
|
45
|
+
export declare function BlotterRow({ label, value, valueClassName, className, stacked, loading }: BlotterRowProps): import("react").JSX.Element;
|
|
40
46
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/blotter/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/blotter/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,YAAY,+BAE5D;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;IAChB,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,cAAc,EACd,SAAS,EACT,OAAe,EACf,OAAe,EAChB,EAAE,eAAe,+BAkDjB"}
|
|
@@ -3,14 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Blotter = Blotter;
|
|
4
4
|
exports.BlotterRow = BlotterRow;
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const skeleton_1 = require("../../components/ui/skeleton");
|
|
6
7
|
const typography_1 = require("../../lib/typography");
|
|
7
8
|
const utils_1 = require("../../lib/utils");
|
|
8
9
|
function Blotter({ children, className }) {
|
|
9
10
|
return (0, jsx_runtime_1.jsx)("dl", { className: (0, utils_1.cn)('divide-border divide-y', className), children: children });
|
|
10
11
|
}
|
|
11
|
-
function BlotterRow({ label, value, valueClassName, className, stacked = false }) {
|
|
12
|
+
function BlotterRow({ label, value, valueClassName, className, stacked = false, loading = false }) {
|
|
13
|
+
// The skeleton stands in for the value slot's own shape: a full-width prose
|
|
14
|
+
// line when stacked, the mono figure's width when inline.
|
|
15
|
+
const shownValue = loading ? ((0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { className: (0, utils_1.cn)('h-4', stacked ? 'w-full' : 'w-24') })) : (value);
|
|
12
16
|
if (stacked) {
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)('hover:bg-body-surface space-y-1 px-2 py-2 transition-colors duration-150 ease-out', className), children: [(0, jsx_runtime_1.jsx)("dt", { className: typography_1.LABEL_VOICE_CLASS, children: label }), (0, jsx_runtime_1.jsx)("dd", { className: (0, utils_1.cn)('text-foreground text-sm break-words whitespace-pre-wrap', valueClassName), children:
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "aria-busy": loading || undefined, className: (0, utils_1.cn)('hover:bg-body-surface space-y-1 px-2 py-2 transition-colors duration-150 ease-out', className), children: [(0, jsx_runtime_1.jsx)("dt", { className: typography_1.LABEL_VOICE_CLASS, children: label }), (0, jsx_runtime_1.jsx)("dd", { className: (0, utils_1.cn)('text-foreground text-sm break-words whitespace-pre-wrap', valueClassName), children: shownValue })] }));
|
|
14
18
|
}
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)('hover:bg-body-surface flex items-center justify-between gap-3 px-2 py-2 transition-colors duration-150 ease-out', className), children: [(0, jsx_runtime_1.jsx)("dt", { className: typography_1.LABEL_VOICE_CLASS, children: label }), (0, jsx_runtime_1.jsx)("dd", { className: (0, utils_1.cn)('font-mono text-sm font-medium tabular-nums', valueClassName), children:
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "aria-busy": loading || undefined, className: (0, utils_1.cn)('hover:bg-body-surface flex items-center justify-between gap-3 px-2 py-2 transition-colors duration-150 ease-out', className), children: [(0, jsx_runtime_1.jsx)("dt", { className: typography_1.LABEL_VOICE_CLASS, children: label }), (0, jsx_runtime_1.jsx)("dd", { className: (0, utils_1.cn)('font-mono text-sm font-medium tabular-nums', valueClassName), children: shownValue })] }));
|
|
16
20
|
}
|
|
@@ -36,6 +36,9 @@ export interface AgingBucketsProps {
|
|
|
36
36
|
showTotal?: boolean;
|
|
37
37
|
/** Override the fixed pt-BR copy. Omitted fields keep their defaults. */
|
|
38
38
|
labels?: AgingBucketsLabels;
|
|
39
|
+
/** Tint of the healthy (`current`) band: ambient green, or ink. Threaded in
|
|
40
|
+
* from `DelinquencyAging`; see the knob's doc there. Defaults to `success`. */
|
|
41
|
+
healthyTone?: 'success' | 'ink';
|
|
39
42
|
className?: string;
|
|
40
43
|
}
|
|
41
44
|
/**
|
|
@@ -53,5 +56,5 @@ export declare function bucketBand(index: number, count: number): AgingBand;
|
|
|
53
56
|
* grand total. Pure: the money-math third rail, unit-tested.
|
|
54
57
|
*/
|
|
55
58
|
export declare function sumBucketTotals(buckets: AgingBucket[], scale: number): string | null;
|
|
56
|
-
export declare function AgingBuckets({ buckets, currency, locale, showTotal, labels, className }: AgingBucketsProps): import("react").JSX.Element;
|
|
59
|
+
export declare function AgingBuckets({ buckets, currency, locale, showTotal, labels, healthyTone, className }: AgingBucketsProps): import("react").JSX.Element;
|
|
57
60
|
//# sourceMappingURL=aging-buckets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aging-buckets.d.ts","sourceRoot":"","sources":["../../../src/domain/delinquency-aging/aging-buckets.tsx"],"names":[],"mappings":"AAyCA,MAAM,WAAW,WAAW;IAC1B,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AAElE;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAA;IAC1C,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,iFAAiF;IACjF,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oEAAoE;IACpE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,yEAAyE;IACzE,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA2BD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAMlE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,EAAE,EACtB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,IAAI,CAMf;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAiB,EACjB,MAAM,EACN,SAAS,EACV,EAAE,iBAAiB,+
|
|
1
|
+
{"version":3,"file":"aging-buckets.d.ts","sourceRoot":"","sources":["../../../src/domain/delinquency-aging/aging-buckets.tsx"],"names":[],"mappings":"AAyCA,MAAM,WAAW,WAAW;IAC1B,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAA;IACb,yEAAyE;IACzE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AAElE;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAA;IAC1C,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+DAA+D;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,iFAAiF;IACjF,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oEAAoE;IACpE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,yEAAyE;IACzE,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B;oFACgF;IAChF,WAAW,CAAC,EAAE,SAAS,GAAG,KAAK,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA2BD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAMlE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,EAAE,EACtB,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,IAAI,CAMf;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAiB,EACjB,MAAM,EACN,WAAuB,EACvB,SAAS,EACV,EAAE,iBAAiB,+BA+GnB"}
|
|
@@ -89,7 +89,7 @@ function sumBucketTotals(buckets, scale) {
|
|
|
89
89
|
const total = (0, money_math_1.sumMinor)(buckets.map((b) => b.total), scale);
|
|
90
90
|
return total === null ? null : (0, money_math_1.minorToDecimal)(total, scale);
|
|
91
91
|
}
|
|
92
|
-
function AgingBuckets({ buckets, currency, locale, showTotal = false, labels, className }) {
|
|
92
|
+
function AgingBuckets({ buckets, currency, locale, showTotal = false, labels, healthyTone = 'success', className }) {
|
|
93
93
|
const countLabel = labels?.count ?? 'Itens';
|
|
94
94
|
const totalLabel = labels?.total ?? 'Total';
|
|
95
95
|
const grandTotalLabel = labels?.grandTotal ?? 'Total geral';
|
|
@@ -102,7 +102,12 @@ function AgingBuckets({ buckets, currency, locale, showTotal = false, labels, cl
|
|
|
102
102
|
const grandTotal = showTotal ? sumBucketTotals(buckets, scale) : null;
|
|
103
103
|
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)('flex flex-col', className), children: [(0, jsx_runtime_1.jsx)("ul", { className: "flex flex-col", children: buckets.map((bucket, i) => {
|
|
104
104
|
const band = bucketBand(i, buckets.length);
|
|
105
|
-
const { Icon,
|
|
105
|
+
const { Icon, word } = BAND[band];
|
|
106
|
+
// `ink` retones ONLY the healthy band — the escalated bands keep their
|
|
107
|
+
// alert and credit-red tints, which are the whole point of the scale.
|
|
108
|
+
const tint = healthyTone === 'ink' && band === 'current'
|
|
109
|
+
? 'text-foreground'
|
|
110
|
+
: BAND[band].tint;
|
|
106
111
|
// Shallow merge: an unlisted band keeps its pt-BR default.
|
|
107
112
|
const bandWord = labels?.bands?.[band] ?? word;
|
|
108
113
|
return ((0, jsx_runtime_1.jsxs)("li", { className: "border-border flex items-center gap-3 border-b py-2.5 last:border-b-0", children: [(0, jsx_runtime_1.jsx)(Icon, { "aria-hidden": true, className: (0, utils_1.cn)('size-4 shrink-0', tint) }), (0, jsx_runtime_1.jsxs)("span", { className: "sr-only", children: [bandWord, ": "] }), (0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, 'text-foreground min-w-0 flex-1 tracking-normal normal-case'), children: bucket.label }), (0, jsx_runtime_1.jsxs)("span", { className: "flex shrink-0 flex-col items-end leading-none", children: [(0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: "text-foreground", children: (0, format_1.formatCount)(bucket.count, locale) }), (0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, 'mt-1'), children: countLabel })] }), (0, jsx_runtime_1.jsxs)("span", { className: "flex w-32 shrink-0 flex-col items-end leading-none sm:w-40", children: [(0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: (0, utils_1.cn)(band === 'overdue' && 'text-credit'), children: (0, jsx_runtime_1.jsx)(money_text_1.MoneyText, { amount: bucket.total, currency: currency, fractionDigits: scale, locale: locale, signColor: false }) }), (0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, 'mt-1'), children: totalLabel })] })] }, `${bucket.label}-${i}`));
|
|
@@ -65,7 +65,17 @@ export interface DelinquencyAgingProps {
|
|
|
65
65
|
breach?: number;
|
|
66
66
|
/** Render the money-math-exact grand total row under the distribution. */
|
|
67
67
|
showTotal?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Tint of the healthy band — the low delinquency rate AND the `current`
|
|
70
|
+
* aging bucket. `'success'` (default) is the ambient green; `'ink'` retones
|
|
71
|
+
* both to `text-foreground`, which is the Ledger canon for a healthy-but-
|
|
72
|
+
* nonzero book: green reads as "achievement", and a book merely not in
|
|
73
|
+
* arrears has achieved nothing. Scoped to the healthy band only — elevated,
|
|
74
|
+
* distressed and overdue keep their alert and credit-red tints, since the
|
|
75
|
+
* glyph + sr-only word (not the tint) are the load-bearing cue either way.
|
|
76
|
+
*/
|
|
77
|
+
healthyTone?: 'success' | 'ink';
|
|
68
78
|
className?: string;
|
|
69
79
|
}
|
|
70
|
-
export declare function DelinquencyAging({ buckets, currency, locale, rateLabel, rateBandLabels, emptyLabel, indeterminateLabel, bucketLabels, warn, breach, showTotal, className }: DelinquencyAgingProps): import("react").JSX.Element;
|
|
80
|
+
export declare function DelinquencyAging({ buckets, currency, locale, rateLabel, rateBandLabels, emptyLabel, indeterminateLabel, bucketLabels, warn, breach, showTotal, healthyTone, className }: DelinquencyAgingProps): import("react").JSX.Element;
|
|
71
81
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/delinquency-aging/index.tsx"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,C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ClB;;;sBAGkB;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAA;IACnD,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,+EAA+E;IAC/E,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;oBAEgB;IAChB,YAAY,CAAC,EAAE,kBAAkB,CAAA;IACjC;;;mDAG+C;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;yEACqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,SAAS,GAAG,KAAK,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAA2B,EAC3B,cAAc,EACd,UAA2B,EAC3B,kBAAoC,EACpC,YAAY,EACZ,IAAW,EACX,MAAY,EACZ,SAAiB,EACjB,WAAuB,EACvB,SAAS,EACV,EAAE,qBAAqB,+BA+EvB"}
|
|
@@ -188,7 +188,7 @@ const RATE_BAND = {
|
|
|
188
188
|
warn: { Icon: lucide_react_1.TriangleAlert, tint: 'text-system-alert', word: 'Elevada' },
|
|
189
189
|
breach: { Icon: lucide_react_1.AlertOctagon, tint: 'text-credit', word: 'Em estresse' }
|
|
190
190
|
};
|
|
191
|
-
function DelinquencyAging({ buckets, currency, locale, rateLabel = 'Inadimplência', rateBandLabels, emptyLabel = 'sem carteira', indeterminateLabel = 'indeterminada', bucketLabels, warn = 0.05, breach = 0.1, showTotal = false, className }) {
|
|
191
|
+
function DelinquencyAging({ buckets, currency, locale, rateLabel = 'Inadimplência', rateBandLabels, emptyLabel = 'sem carteira', indeterminateLabel = 'indeterminada', bucketLabels, warn = 0.05, breach = 0.1, showTotal = false, healthyTone = 'success', className }) {
|
|
192
192
|
// THIRD RAIL: the rate scale and the two totals come from money-math, never
|
|
193
193
|
// float. The division below is of two exact BigInt-derived integers.
|
|
194
194
|
const scale = currency ? (0, money_math_1.minorDigitsOf)(currency) : 2;
|
|
@@ -202,12 +202,16 @@ function DelinquencyAging({ buckets, currency, locale, rateLabel = 'Inadimplênc
|
|
|
202
202
|
const band = hasRate && overdueMinor !== null && totalMinor !== null
|
|
203
203
|
? exactBand(overdueMinor, totalMinor, warn, breach)
|
|
204
204
|
: 'low';
|
|
205
|
-
const { Icon,
|
|
205
|
+
const { Icon, word } = RATE_BAND[band];
|
|
206
|
+
// `ink` retones ONLY the healthy band; `warn`/`breach` keep their alarm tints.
|
|
207
|
+
const tint = healthyTone === 'ink' && band === 'low'
|
|
208
|
+
? 'text-foreground'
|
|
209
|
+
: RATE_BAND[band].tint;
|
|
206
210
|
// Shallow merge: an unlisted band keeps its pt-BR default.
|
|
207
211
|
const bandWord = rateBandLabels?.[band] ?? word;
|
|
208
212
|
const distressed = band === 'breach';
|
|
209
213
|
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)('flex flex-col gap-4', className), children: [(0, jsx_runtime_1.jsxs)("header", { className: "flex items-baseline justify-between gap-3", children: [(0, jsx_runtime_1.jsx)(section_label_1.SectionLabel, { as: "span", children: rateLabel }), hasRate ? ((0, jsx_runtime_1.jsxs)("span", {
|
|
210
214
|
// A distressed rate is a credit alarm: announced the moment it
|
|
211
215
|
// crosses the band, so assistive tech does not lean on the tint.
|
|
212
|
-
role: distressed ? 'alert' : undefined, className: (0, utils_1.cn)('inline-flex items-center gap-1.5', tint), children: [(0, jsx_runtime_1.jsx)(Icon, { "aria-hidden": true, className: "size-4 shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { className: "sr-only", children: [bandWord, ": "] }), (0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: tint, children: (0, format_1.formatPercent)(rate, { unit: 'ratio', locale }) })] })) : ((0, jsx_runtime_1.jsxs)("span", { className: "text-muted-foreground inline-flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, 'tracking-normal normal-case'), children: indeterminate ? indeterminateLabel : emptyLabel }), (0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: "text-muted-foreground", children: format_1.NO_VALUE })] }))] }), (0, jsx_runtime_1.jsx)(aging_buckets_1.AgingBuckets, { buckets: buckets, currency: currency, locale: locale, showTotal: showTotal, labels: bucketLabels })] }));
|
|
216
|
+
role: distressed ? 'alert' : undefined, className: (0, utils_1.cn)('inline-flex items-center gap-1.5', tint), children: [(0, jsx_runtime_1.jsx)(Icon, { "aria-hidden": true, className: "size-4 shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { className: "sr-only", children: [bandWord, ": "] }), (0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: tint, children: (0, format_1.formatPercent)(rate, { unit: 'ratio', locale }) })] })) : ((0, jsx_runtime_1.jsxs)("span", { className: "text-muted-foreground inline-flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, 'tracking-normal normal-case'), children: indeterminate ? indeterminateLabel : emptyLabel }), (0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: "text-muted-foreground", children: format_1.NO_VALUE })] }))] }), (0, jsx_runtime_1.jsx)(aging_buckets_1.AgingBuckets, { buckets: buckets, currency: currency, locale: locale, showTotal: showTotal, labels: bucketLabels, healthyTone: healthyTone })] }));
|
|
213
217
|
}
|
|
@@ -8,14 +8,21 @@
|
|
|
8
8
|
* `FIGURE_CLASS` constants when composing className strings inline.
|
|
9
9
|
*
|
|
10
10
|
* Scale:
|
|
11
|
-
* - hero
|
|
12
|
-
* -
|
|
13
|
-
* -
|
|
14
|
-
* -
|
|
15
|
-
* -
|
|
11
|
+
* - hero : the dominant in-bar figure — text-4xl/5xl, semibold, tracking-tight
|
|
12
|
+
* - money-hero : hero-role MONEY figure — text-2xl/3xl, semibold, tracking-tight
|
|
13
|
+
* - panel : compliance / exposure — text-3xl, semibold, tracking-tight
|
|
14
|
+
* - count : ledger count — text-2xl, semibold, tracking-tight
|
|
15
|
+
* - row : inline / row figure — text-sm
|
|
16
|
+
* - tick : ruler / micro figure — text-[10px], leading-none
|
|
17
|
+
*
|
|
18
|
+
* `money-hero` is `hero`'s role at one step down the scale: a formatted BRL
|
|
19
|
+
* amount runs ~13 characters, which clips a three-column panel at 4xl/5xl, so
|
|
20
|
+
* consoles were hand-rolling `text-2xl lg:text-3xl` at the call site and losing
|
|
21
|
+
* the mono/tabular/weight invariants along the way. Same responsive shape as
|
|
22
|
+
* `hero`, same weight and tracking — only the two size steps differ.
|
|
16
23
|
*/
|
|
17
24
|
import type { ElementType, ReactNode } from 'react';
|
|
18
|
-
export type FigureSize = 'hero' | 'panel' | 'count' | 'row' | 'tick';
|
|
25
|
+
export type FigureSize = 'hero' | 'money-hero' | 'panel' | 'count' | 'row' | 'tick';
|
|
19
26
|
/** Canonical class strings per figure size. The `tabular-nums` and `font-mono`
|
|
20
27
|
* invariants live here so they can never be forgotten at a call site. */
|
|
21
28
|
export declare const FIGURE_CLASS: Record<FigureSize, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/figure/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/figure/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAInD,MAAM,MAAM,UAAU,GACpB,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;AAE5D;0EAC0E;AAC1E,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAQnD,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,EAAE,CAAC,EAAE,WAAW,CAAA;CACjB,CAAA;AAED,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,EAAE,EAAE,GAAY,EACjB,EAAE,WAAW,+BAEb"}
|
|
@@ -8,6 +8,7 @@ const utils_1 = require("../../lib/utils");
|
|
|
8
8
|
* invariants live here so they can never be forgotten at a call site. */
|
|
9
9
|
exports.FIGURE_CLASS = {
|
|
10
10
|
hero: 'font-mono text-4xl font-semibold tracking-tight tabular-nums lg:text-5xl',
|
|
11
|
+
'money-hero': 'font-mono text-2xl font-semibold tracking-tight tabular-nums lg:text-3xl',
|
|
11
12
|
panel: 'font-mono text-3xl font-semibold tracking-tight tabular-nums',
|
|
12
13
|
count: 'font-mono text-2xl font-semibold tracking-tight tabular-nums',
|
|
13
14
|
row: 'font-mono text-sm tabular-nums',
|
|
@@ -16,6 +16,12 @@ export type SectionLabelProps = {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
/** Render element. Defaults to `h2` (the ledger-sheet cell heading). */
|
|
18
18
|
as?: ElementType;
|
|
19
|
+
/**
|
|
20
|
+
* Rule the label as an entry-section head (hairline double border, `pb-2`)
|
|
21
|
+
* and stamp `data-variant="ruled"`. Mirrors `EmptyState.ruled`. Default off,
|
|
22
|
+
* so an unruled label renders exactly as before.
|
|
23
|
+
*/
|
|
24
|
+
ruled?: boolean;
|
|
19
25
|
} & Omit<HTMLAttributes<HTMLElement>, 'children' | 'className'>;
|
|
20
|
-
export declare function SectionLabel({ children, className, as: Tag, ...rest }: SectionLabelProps): import("react").JSX.Element;
|
|
26
|
+
export declare function SectionLabel({ children, className, as: Tag, ruled, ...rest }: SectionLabelProps): import("react").JSX.Element;
|
|
21
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/section-label/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/section-label/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,CAAA;AAE/D,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,EAAE,EAAE,GAAU,EACd,KAAa,EACb,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAcnB"}
|
|
@@ -4,10 +4,14 @@ exports.SectionLabel = SectionLabel;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const typography_1 = require("../../lib/typography");
|
|
6
6
|
const utils_1 = require("../../lib/utils");
|
|
7
|
-
|
|
7
|
+
/** The entry-section head treatment: a hairline double rule under the label.
|
|
8
|
+
* `border-border`, NOT the register head's ink — this is the quieter of the two
|
|
9
|
+
* head rules. Pinned here because ~20 call sites were restating it. */
|
|
10
|
+
const RULED_CLASS = 'border-b-[3px] border-double border-border pb-2';
|
|
11
|
+
function SectionLabel({ children, className, as: Tag = 'h2', ruled = false, ...rest }) {
|
|
8
12
|
// The remaining element props reach the rendered tag, so a panel can point
|
|
9
13
|
// `aria-labelledby` at this heading via `id`, and tests can hang a `data-*`
|
|
10
14
|
// hook off it. Without the spread there was no way to reference the heading
|
|
11
15
|
// from its own container.
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(Tag, { className: (0, utils_1.cn)(typography_1.SECTION_LABEL_CLASS, className),
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(Tag, { ...rest, "data-variant": ruled ? 'ruled' : undefined, className: (0, utils_1.cn)(typography_1.SECTION_LABEL_CLASS, ruled && RULED_CLASS, className), children: children }));
|
|
13
17
|
}
|
|
@@ -27,6 +27,12 @@ export type SearchInputProps = {
|
|
|
27
27
|
disabled?: boolean;
|
|
28
28
|
className?: string;
|
|
29
29
|
id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Key events on the field, passed straight through. The component adds no
|
|
32
|
+
* Escape behaviour of its own: Escape-to-clear is a consumer gesture (some
|
|
33
|
+
* filter rows clear the field, others close a popover), so it owns it.
|
|
34
|
+
*/
|
|
35
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
30
36
|
};
|
|
31
|
-
export declare function SearchInput({ value, onValueChange, debounceMs, placeholder, 'aria-label': ariaLabel, clearLabel, disabled, className, id }: SearchInputProps): React.JSX.Element;
|
|
37
|
+
export declare function SearchInput({ value, onValueChange, debounceMs, placeholder, 'aria-label': ariaLabel, clearLabel, disabled, className, id, onKeyDown }: SearchInputProps): React.JSX.Element;
|
|
32
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/search-input/index.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,2EAA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AAgB,EAChB,SAAS,EACT,EAAE,EACF,SAAS,EACV,EAAE,gBAAgB,qBAuGlB"}
|
|
@@ -59,7 +59,7 @@ const utils_1 = require("../../lib/utils");
|
|
|
59
59
|
* string: any string sentinel is a value a parent could legitimately pass.
|
|
60
60
|
*/
|
|
61
61
|
const NO_PENDING_ECHO = Symbol('no pending echo');
|
|
62
|
-
function SearchInput({ value, onValueChange, debounceMs = 250, placeholder = 'Search…', 'aria-label': ariaLabel, clearLabel = 'Clear search', disabled = false, className, id }) {
|
|
62
|
+
function SearchInput({ value, onValueChange, debounceMs = 250, placeholder = 'Search…', 'aria-label': ariaLabel, clearLabel = 'Clear search', disabled = false, className, id, onKeyDown }) {
|
|
63
63
|
// Local draft keeps typing instant; the controlled `value` is the source of
|
|
64
64
|
// truth between edits. When the parent changes `value` out of band (reset,
|
|
65
65
|
// programmatic set), the draft follows.
|
|
@@ -115,7 +115,7 @@ function SearchInput({ value, onValueChange, debounceMs = 250, placeholder = 'Se
|
|
|
115
115
|
onValueChange('');
|
|
116
116
|
};
|
|
117
117
|
const hasValue = draft.length > 0;
|
|
118
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('relative w-full sm:w-64', className), children: (0, jsx_runtime_1.jsx)(input_1.Input, { id: id, type: "search", role: "searchbox", value: draft, onChange: handleChange, placeholder: placeholder, "aria-label": ariaLabel ?? placeholder ?? 'Search', disabled: disabled,
|
|
118
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('relative w-full sm:w-64', className), children: (0, jsx_runtime_1.jsx)(input_1.Input, { id: id, type: "search", role: "searchbox", value: draft, onChange: handleChange, onKeyDown: onKeyDown, placeholder: placeholder, "aria-label": ariaLabel ?? placeholder ?? 'Search', disabled: disabled,
|
|
119
119
|
// The native search clear glyph would duplicate our button.
|
|
120
120
|
className: "[&::-webkit-search-cancel-button]:appearance-none", startAdornment: (0, jsx_runtime_1.jsx)(input_1.InputAdornment, { position: "start", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Search, { "aria-hidden": true }) }), endAdornment: hasValue ? ((0, jsx_runtime_1.jsx)(input_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(icon_button_1.IconButton, { type: "button", variant: "plain", size: "small", "aria-label": clearLabel, disabled: disabled, onClick: handleClear, className: "text-muted-foreground hover:text-foreground", children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "size-4", "aria-hidden": true }) }) })) : undefined }) }));
|
|
121
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/dialog/confirmation-dialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAuD9B,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,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,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,EACX,YAA4B,EAC7B,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/dialog/confirmation-dialog/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAuD9B,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,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,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,EACX,YAA4B,EAC7B,EAAE,uBAAuB,qBAmFzB"}
|
|
@@ -53,5 +53,5 @@ export function ConfirmationDialog({ open, onOpenChange, title = '', description
|
|
|
53
53
|
if (busy) {
|
|
54
54
|
event.preventDefault();
|
|
55
55
|
}
|
|
56
|
-
}, children: [_jsxs(AlertDialogHeader, { className: "flex-row items-center", children: [_jsx(ConfirmationDialogIcon, { variant: variant }), _jsxs("div", { className: "flex flex-col gap-4", children: [_jsx(AlertDialogTitle, { children: title }), _jsx(AlertDialogDescription, { children: description })] })] }), _jsx("span", { role: "status", className: "sr-only", children: busy ? pendingLabel : '' }), _jsxs(AlertDialogFooter, { className: "gap-4", children: [_jsx(AlertDialogCancel, { asChild: true, children: _jsx(Button, { onClick: onCancel, disabled: busy, variant: "secondary", size: "small", className: "
|
|
56
|
+
}, children: [_jsxs(AlertDialogHeader, { className: "flex-row items-center", children: [_jsx(ConfirmationDialogIcon, { variant: variant }), _jsxs("div", { className: "flex flex-col gap-4", children: [_jsx(AlertDialogTitle, { children: title }), _jsx(AlertDialogDescription, { children: description })] })] }), _jsx("span", { role: "status", className: "sr-only", children: busy ? pendingLabel : '' }), _jsxs(AlertDialogFooter, { className: "gap-4", children: [_jsx(AlertDialogCancel, { asChild: true, children: _jsx(Button, { onClick: onCancel, disabled: busy, variant: "secondary", size: "small", className: "button-secondary", children: cancelLabel ?? 'Cancel' }) }), _jsx(LoadingButton, { loading: busy, onClick: handleConfirm, variant: "primary", size: "small", "data-testid": "confirm", children: confirmLabel ?? 'Confirm' })] })] }) }));
|
|
57
57
|
}
|
|
@@ -3,17 +3,29 @@ export declare function PageHeaderActionButtons({ className, ...props }: React.C
|
|
|
3
3
|
export declare function PageHeaderWrapper({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
|
|
4
4
|
type PageHeaderProps = {
|
|
5
5
|
children: ReactNode;
|
|
6
|
+
/** Routed to the inner Collapsible, as it always has been. */
|
|
6
7
|
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Seam for the root element's own margins. Merged AFTER the hard-coded
|
|
10
|
+
* `mt-12`/`mb-12` so a consumer utility (e.g. `mt-0`) wins via tailwind-merge.
|
|
11
|
+
*/
|
|
12
|
+
rootClassName?: string;
|
|
7
13
|
};
|
|
8
|
-
export declare function PageHeader({ children, className }: PageHeaderProps): import("react").JSX.Element;
|
|
14
|
+
export declare function PageHeader({ children, className, rootClassName }: PageHeaderProps): import("react").JSX.Element;
|
|
9
15
|
export type PageHeaderInfoTitleProps = {
|
|
10
16
|
title: string;
|
|
11
17
|
subtitle?: string;
|
|
12
18
|
subtitleCopyToClipboard?: boolean;
|
|
19
|
+
/** Routed to the `h1`, as it always has been. */
|
|
13
20
|
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Seam for the wrapper element's own margins. Merged AFTER the hard-coded
|
|
23
|
+
* `mb-12` so a consumer utility (e.g. `mb-0`) wins via tailwind-merge.
|
|
24
|
+
*/
|
|
25
|
+
containerClassName?: string;
|
|
14
26
|
children?: ReactNode;
|
|
15
27
|
};
|
|
16
|
-
export declare function PageHeaderInfoTitle({ title, subtitle, className, children }: PageHeaderInfoTitleProps): import("react").JSX.Element;
|
|
28
|
+
export declare function PageHeaderInfoTitle({ title, subtitle, className, containerClassName, children }: PageHeaderInfoTitleProps): import("react").JSX.Element;
|
|
17
29
|
export type PageHeaderInfoTooltipProps = {
|
|
18
30
|
subtitle: string;
|
|
19
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/page-header/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAwB,MAAM,OAAO,CAAA;AAmBtE,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQ7B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAc7B;AAED,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/page-header/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAwB,MAAM,OAAO,CAAA;AAmBtE,wBAAgB,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jB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,MAAM,EACN,OAAO,EACP,IAAI,EACL,EAAE,8BAA8B,+BAyChC"}
|
|
@@ -15,12 +15,12 @@ export function PageHeaderWrapper({ className, ...props }) {
|
|
|
15
15
|
const { isOpen } = useContext(PageHeaderContext);
|
|
16
16
|
return (_jsx("div", { "data-slot": "page-header-wrapper", className: cn('flex items-start justify-between', isOpen && 'border-b', className), ...props }));
|
|
17
17
|
}
|
|
18
|
-
export function PageHeader({ children, className }) {
|
|
18
|
+
export function PageHeader({ children, className, rootClassName }) {
|
|
19
19
|
const [isOpen, setIsOpen] = useState(false);
|
|
20
|
-
return (_jsx(PageHeaderContext.Provider, { value: { isOpen }, children: _jsx("div", { "data-slot": "page-header", className: cn('mt-12', isOpen && 'mb-12'), children: _jsx(Collapsible, { open: isOpen, onOpenChange: setIsOpen, className: className, children: children }) }) }));
|
|
20
|
+
return (_jsx(PageHeaderContext.Provider, { value: { isOpen }, children: _jsx("div", { "data-slot": "page-header", className: cn('mt-12', isOpen && 'mb-12', rootClassName), children: _jsx(Collapsible, { open: isOpen, onOpenChange: setIsOpen, className: className, children: children }) }) }));
|
|
21
21
|
}
|
|
22
|
-
export function PageHeaderInfoTitle({ title, subtitle, className, children }) {
|
|
23
|
-
return (_jsxs("div", { "data-slot": "page-header-info-title", className:
|
|
22
|
+
export function PageHeaderInfoTitle({ title, subtitle, className, containerClassName, children }) {
|
|
23
|
+
return (_jsxs("div", { "data-slot": "page-header-info-title", className: cn('mb-12 flex flex-col gap-4', containerClassName), children: [_jsx("h1", { className: cn('text-foreground text-4xl font-bold', className), "data-testid": "title", children: title }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("p", { className: "text-shadcn-400 text-sm font-medium", children: subtitle }), children] })] }));
|
|
24
24
|
}
|
|
25
25
|
export function PageHeaderInfoTooltip({ subtitle }) {
|
|
26
26
|
const { toast } = useToast();
|