@lerianstudio/sindarian-ui 1.3.0-beta.3 → 1.3.0-beta.4

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.
Files changed (60) hide show
  1. package/dist/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
  2. package/dist/components/dialog/confirmation-dialog/index.js +1 -1
  3. package/dist/components/page-header/index.d.ts +14 -2
  4. package/dist/components/page-header/index.d.ts.map +1 -1
  5. package/dist/components/page-header/index.js +4 -4
  6. package/dist/components/ui/badge/index.d.ts +8 -1
  7. package/dist/components/ui/badge/index.d.ts.map +1 -1
  8. package/dist/components/ui/badge/index.js +9 -1
  9. package/dist/components/ui/sidebar/sidebar-expand-button.d.ts +5 -0
  10. package/dist/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
  11. package/dist/components/ui/sidebar/sidebar-expand-button.js +1 -1
  12. package/dist/domain/blotter/index.d.ts +7 -1
  13. package/dist/domain/blotter/index.d.ts.map +1 -1
  14. package/dist/domain/blotter/index.js +7 -3
  15. package/dist/domain/delinquency-aging/aging-buckets.d.ts +4 -1
  16. package/dist/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
  17. package/dist/domain/delinquency-aging/aging-buckets.js +7 -2
  18. package/dist/domain/delinquency-aging/index.d.ts +11 -1
  19. package/dist/domain/delinquency-aging/index.d.ts.map +1 -1
  20. package/dist/domain/delinquency-aging/index.js +7 -3
  21. package/dist/domain/figure/index.d.ts +13 -6
  22. package/dist/domain/figure/index.d.ts.map +1 -1
  23. package/dist/domain/figure/index.js +1 -0
  24. package/dist/domain/section-label/index.d.ts +7 -1
  25. package/dist/domain/section-label/index.d.ts.map +1 -1
  26. package/dist/domain/section-label/index.js +6 -2
  27. package/dist/enterprise/search-input/index.d.ts +7 -1
  28. package/dist/enterprise/search-input/index.d.ts.map +1 -1
  29. package/dist/enterprise/search-input/index.js +2 -2
  30. package/dist/esm/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
  31. package/dist/esm/components/dialog/confirmation-dialog/index.js +1 -1
  32. package/dist/esm/components/page-header/index.d.ts +14 -2
  33. package/dist/esm/components/page-header/index.d.ts.map +1 -1
  34. package/dist/esm/components/page-header/index.js +4 -4
  35. package/dist/esm/components/ui/badge/index.d.ts +8 -1
  36. package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
  37. package/dist/esm/components/ui/badge/index.js +9 -1
  38. package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts +5 -0
  39. package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
  40. package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +1 -1
  41. package/dist/esm/domain/blotter/index.d.ts +7 -1
  42. package/dist/esm/domain/blotter/index.d.ts.map +1 -1
  43. package/dist/esm/domain/blotter/index.js +7 -3
  44. package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts +4 -1
  45. package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
  46. package/dist/esm/domain/delinquency-aging/aging-buckets.js +7 -2
  47. package/dist/esm/domain/delinquency-aging/index.d.ts +11 -1
  48. package/dist/esm/domain/delinquency-aging/index.d.ts.map +1 -1
  49. package/dist/esm/domain/delinquency-aging/index.js +7 -3
  50. package/dist/esm/domain/figure/index.d.ts +13 -6
  51. package/dist/esm/domain/figure/index.d.ts.map +1 -1
  52. package/dist/esm/domain/figure/index.js +1 -0
  53. package/dist/esm/domain/section-label/index.d.ts +7 -1
  54. package/dist/esm/domain/section-label/index.d.ts.map +1 -1
  55. package/dist/esm/domain/section-label/index.js +6 -2
  56. package/dist/esm/enterprise/search-input/index.d.ts +7 -1
  57. package/dist/esm/enterprise/search-input/index.d.ts.map +1 -1
  58. package/dist/esm/enterprise/search-input/index.js +2 -2
  59. package/dist/globals.css +70 -58
  60. 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,qBAkFzB"}
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: "enabled:border-button-border hover:border-button-border enabled:shadow-sm", 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' })] })] }) }));
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;CACnB,CAAA;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,eAAe,+BAgBlE;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACT,EAAE,wBAAwB,+BAmB1B;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACT,EAAE,0BAA0B,+BA8B5B;AAED,MAAM,MAAM,qCAAqC,GAAG;IAClD,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EACT,EAAE,qCAAqC,+BAavC;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,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"}
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,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,aAAa,EACd,EAAE,eAAe,+BAmBjB;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,QAAQ,EACT,EAAE,wBAAwB,+BAmB1B;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACT,EAAE,0BAA0B,+BA8B5B;AAED,MAAM,MAAM,qCAAqC,GAAG;IAClD,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EACT,EAAE,qCAAqC,+BAavC;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,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"}
@@ -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: "mb-12 flex flex-col gap-4", 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] })] }));
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)();
@@ -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;;8EA+BlB,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"}
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-red-500 text-primary-foreground hover:bg-red-500/80',
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,sBAqCxE,CAAA"}
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;AAKtC,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;CAClB,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,cAAc,EACd,SAAS,EACT,OAAe,EAChB,EAAE,eAAe,+BAwCjB"}
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: value })] }));
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: value })] }));
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,+BAyGnB"}
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, tint, word } = BAND[band];
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,CAAA;AAKtE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAOpE;;wEAEwE;AACxE,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;oEACoE;AACpE,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iFAAiF;IACjF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,6EAA6E;IAC7E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB;;0EAEsE;IACtE,aAAa,EAAE,OAAO,CAAA;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,iBAAiB,EAAE,EAC5B,KAAK,EAAE,MAAM,GACZ,eAAe,CAuDjB;AAoFD,MAAM,WAAW,qBAAqB;IACpC;yEACqE;IACrE,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;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,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,SAAS,EACV,EAAE,qBAAqB,+BAyEvB"}
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,CAAA;AAKtE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAOpE;;wEAEwE;AACxE,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;oEACoE;AACpE,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iFAAiF;IACjF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,6EAA6E;IAC7E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB;;0EAEsE;IACtE,aAAa,EAAE,OAAO,CAAA;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,iBAAiB,EAAE,EAC5B,KAAK,EAAE,MAAM,GACZ,eAAe,CAuDjB;AAoFD,MAAM,WAAW,qBAAqB;IACpC;yEACqE;IACrE,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;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, tint, word } = RATE_BAND[band];
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 : the dominant in-bar figure — text-4xl/5xl, semibold, tracking-tight
12
- * - panel : compliance / exposure — text-3xl, semibold, tracking-tight
13
- * - count : ledger count — text-2xl, semibold, tracking-tight
14
- * - row : inline / row figure — text-sm
15
- * - tick : ruler / micro figure — text-[10px], leading-none
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;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAInD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;AAEpE;0EAC0E;AAC1E,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAMnD,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"}
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;AAKnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,EAAE,CAAC,EAAE,WAAW,CAAA;CACjB,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,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAUnB"}
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
- function SectionLabel({ children, className, as: Tag = 'h2', ...rest }) {
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), ...rest, children: children }));
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,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,8CAA8C;IAC9C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,EACb,UAAgB,EAChB,WAAuB,EACvB,YAAY,EAAE,SAAS,EACvB,UAA2B,EAC3B,QAAgB,EAChB,SAAS,EACT,EAAE,EACH,EAAE,gBAAgB,qBAsGlB"}
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,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,8CAA8C;IAC9C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;CACzD,CAAA;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,EACb,UAAgB,EAChB,WAAuB,EACvB,YAAY,EAAE,SAAS,EACvB,UAA2B,EAC3B,QAAgB,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,qBAkFzB"}
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: "enabled:border-button-border hover:border-button-border enabled:shadow-sm", children: cancelLabel ?? 'Cancel' }) }), _jsx(LoadingButton, { loading: busy, onClick: handleConfirm, variant: "primary", size: "small", "data-testid": "confirm", children: confirmLabel ?? 'Confirm' })] })] }) }));
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;CACnB,CAAA;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,eAAe,+BAgBlE;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACT,EAAE,wBAAwB,+BAmB1B;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACT,EAAE,0BAA0B,+BA8B5B;AAED,MAAM,MAAM,qCAAqC,GAAG;IAClD,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EACT,EAAE,qCAAqC,+BAavC;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,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"}
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,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,aAAa,EACd,EAAE,eAAe,+BAmBjB;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,QAAQ,EACT,EAAE,wBAAwB,+BAmB1B;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACT,EAAE,0BAA0B,+BA8B5B;AAED,MAAM,MAAM,qCAAqC,GAAG;IAClD,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,QAAQ,EACT,EAAE,qCAAqC,+BAavC;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,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: "mb-12 flex flex-col gap-4", 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] })] }));
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();
@@ -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;;8EA+BlB,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"}
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"}
@@ -2,6 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cva } from 'class-variance-authority';
3
3
  import { cn } from '../../../lib/utils.js';
4
4
  import { Slot } from '@radix-ui/react-slot';
5
+ /**
6
+ * `credit` is the accounting reading of a credit amount, NOT an alias of
7
+ * `destructive` (an error/alarm). The credit role is a tint-and-ink pair:
8
+ * `--credit-foreground` mirrors `--credit` by contract, so the red carries the
9
+ * role as text over a tinted surface. Do not "fix" this into a solid
10
+ * `bg-credit` fill — that renders red-on-red and is invisible.
11
+ */
5
12
  const badgeVariants = 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', {
6
13
  variants: {
7
14
  variant: {
@@ -9,7 +16,8 @@ const badgeVariants = cva('inline-flex items-center rounded-full border border-b
9
16
  active: 'bg-system-success-surface text-system-success-h1a border-system-success-border py-[2px] px-3',
10
17
  inactive: 'bg-muted text-foreground border-muted-foreground/40 py-[2px] px-3',
11
18
  secondary: 'border-transparent bg-muted-foreground text-white dark:text-black',
12
- destructive: 'border-transparent bg-red-500 text-primary-foreground hover:bg-red-500/80',
19
+ destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
20
+ credit: 'border-credit/30 bg-credit/10 text-credit-foreground px-[10px] py-1',
13
21
  error: 'border-system-error-border bg-system-error-surface text-system-error-text px-[10px] py-1',
14
22
  success: 'border-system-success-border bg-system-success-surface text-system-success-text px-[10px] py-1',
15
23
  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,sBAqCxE,CAAA"}
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"}
@@ -8,5 +8,5 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../
8
8
  import { IconButton } from '../icon-button/index.js';
9
9
  export const SidebarExpandButton = ({ tooltip }) => {
10
10
  const { isCollapsed, toggleSidebar } = useSidebar();
11
- return (_jsxs(React.Fragment, { children: [!isCollapsed && (_jsx("div", { "data-slot": "sidebar-expand-button", className: "border-border bg-card flex w-full", children: _jsx("div", { className: "absolute right-[-20px] bottom-4", children: _jsx(IconButton, { variant: "secondary", rounded: true, onClick: toggleSidebar, children: _jsx(PanelLeftClose, { className: "text-shadcn-400" }) }) }) })), isCollapsed && (_jsx(SidebarFooter, { children: _jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { className: "group/expand-button text-shadcn-400 hover:bg-accent rounded-sm bg-transparent p-2", onClick: toggleSidebar, children: _jsx(PanelRightClose, { className: "group-hover/expand-button:text-white dark:text-white" }) }), _jsx(TooltipContent, { side: "right", children: tooltip || 'Expand' })] }) }) }))] }));
11
+ return (_jsxs(React.Fragment, { children: [!isCollapsed && (_jsx("div", { "data-slot": "sidebar-expand-button", className: "border-border bg-card flex w-full", children: _jsx("div", { className: "absolute right-[-20px] bottom-4", children: _jsx(IconButton, { variant: "secondary", rounded: true, onClick: toggleSidebar, "aria-label": tooltip || 'Collapse sidebar', "aria-expanded": true, children: _jsx(PanelLeftClose, { className: "text-shadcn-400" }) }) }) })), isCollapsed && (_jsx(SidebarFooter, { children: _jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(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: _jsx(PanelRightClose, { className: "group-hover/expand-button:text-white dark:text-white" }) }), _jsx(TooltipContent, { side: "right", children: tooltip || 'Expand' })] }) }) }))] }));
12
12
  };
@@ -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;AAKtC,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;CAClB,CAAA;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,cAAc,EACd,SAAS,EACT,OAAe,EAChB,EAAE,eAAe,+BAwCjB"}
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"}
@@ -1,12 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Skeleton } from '../../components/ui/skeleton/index.js';
2
3
  import { LABEL_VOICE_CLASS } from '../../lib/typography.js';
3
4
  import { cn } from '../../lib/utils.js';
4
5
  export function Blotter({ children, className }) {
5
6
  return _jsx("dl", { className: cn('divide-border divide-y', className), children: children });
6
7
  }
7
- export function BlotterRow({ label, value, valueClassName, className, stacked = false }) {
8
+ export function BlotterRow({ label, value, valueClassName, className, stacked = false, loading = false }) {
9
+ // The skeleton stands in for the value slot's own shape: a full-width prose
10
+ // line when stacked, the mono figure's width when inline.
11
+ const shownValue = loading ? (_jsx(Skeleton, { className: cn('h-4', stacked ? 'w-full' : 'w-24') })) : (value);
8
12
  if (stacked) {
9
- return (_jsxs("div", { className: cn('hover:bg-body-surface space-y-1 px-2 py-2 transition-colors duration-150 ease-out', className), children: [_jsx("dt", { className: LABEL_VOICE_CLASS, children: label }), _jsx("dd", { className: cn('text-foreground text-sm break-words whitespace-pre-wrap', valueClassName), children: value })] }));
13
+ return (_jsxs("div", { "aria-busy": loading || undefined, className: cn('hover:bg-body-surface space-y-1 px-2 py-2 transition-colors duration-150 ease-out', className), children: [_jsx("dt", { className: LABEL_VOICE_CLASS, children: label }), _jsx("dd", { className: cn('text-foreground text-sm break-words whitespace-pre-wrap', valueClassName), children: shownValue })] }));
10
14
  }
11
- return (_jsxs("div", { className: cn('hover:bg-body-surface flex items-center justify-between gap-3 px-2 py-2 transition-colors duration-150 ease-out', className), children: [_jsx("dt", { className: LABEL_VOICE_CLASS, children: label }), _jsx("dd", { className: cn('font-mono text-sm font-medium tabular-nums', valueClassName), children: value })] }));
15
+ return (_jsxs("div", { "aria-busy": loading || undefined, className: cn('hover:bg-body-surface flex items-center justify-between gap-3 px-2 py-2 transition-colors duration-150 ease-out', className), children: [_jsx("dt", { className: LABEL_VOICE_CLASS, children: label }), _jsx("dd", { className: cn('font-mono text-sm font-medium tabular-nums', valueClassName), children: shownValue })] }));
12
16
  }
@@ -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,+BAyGnB"}
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"}
@@ -84,7 +84,7 @@ export function sumBucketTotals(buckets, scale) {
84
84
  const total = sumMinor(buckets.map((b) => b.total), scale);
85
85
  return total === null ? null : minorToDecimal(total, scale);
86
86
  }
87
- export function AgingBuckets({ buckets, currency, locale, showTotal = false, labels, className }) {
87
+ export function AgingBuckets({ buckets, currency, locale, showTotal = false, labels, healthyTone = 'success', className }) {
88
88
  const countLabel = labels?.count ?? 'Itens';
89
89
  const totalLabel = labels?.total ?? 'Total';
90
90
  const grandTotalLabel = labels?.grandTotal ?? 'Total geral';
@@ -97,7 +97,12 @@ export function AgingBuckets({ buckets, currency, locale, showTotal = false, lab
97
97
  const grandTotal = showTotal ? sumBucketTotals(buckets, scale) : null;
98
98
  return (_jsxs("div", { className: cn('flex flex-col', className), children: [_jsx("ul", { className: "flex flex-col", children: buckets.map((bucket, i) => {
99
99
  const band = bucketBand(i, buckets.length);
100
- const { Icon, tint, word } = BAND[band];
100
+ const { Icon, word } = BAND[band];
101
+ // `ink` retones ONLY the healthy band — the escalated bands keep their
102
+ // alert and credit-red tints, which are the whole point of the scale.
103
+ const tint = healthyTone === 'ink' && band === 'current'
104
+ ? 'text-foreground'
105
+ : BAND[band].tint;
101
106
  // Shallow merge: an unlisted band keeps its pt-BR default.
102
107
  const bandWord = labels?.bands?.[band] ?? word;
103
108
  return (_jsxs("li", { className: "border-border flex items-center gap-3 border-b py-2.5 last:border-b-0", children: [_jsx(Icon, { "aria-hidden": true, className: cn('size-4 shrink-0', tint) }), _jsxs("span", { className: "sr-only", children: [bandWord, ": "] }), _jsx("span", { className: cn(LABEL_VOICE_CLASS, 'text-foreground min-w-0 flex-1 tracking-normal normal-case'), children: bucket.label }), _jsxs("span", { className: "flex shrink-0 flex-col items-end leading-none", children: [_jsx(Figure, { size: "row", className: "text-foreground", children: formatCount(bucket.count, locale) }), _jsx("span", { className: cn(LABEL_VOICE_CLASS, 'mt-1'), children: countLabel })] }), _jsxs("span", { className: "flex w-32 shrink-0 flex-col items-end leading-none sm:w-40", children: [_jsx(Figure, { size: "row", className: cn(band === 'overdue' && 'text-credit'), children: _jsx(MoneyText, { amount: bucket.total, currency: currency, fractionDigits: scale, locale: locale, signColor: false }) }), _jsx("span", { className: cn(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,CAAA;AAKtE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAOpE;;wEAEwE;AACxE,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;oEACoE;AACpE,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iFAAiF;IACjF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,6EAA6E;IAC7E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB;;0EAEsE;IACtE,aAAa,EAAE,OAAO,CAAA;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,iBAAiB,EAAE,EAC5B,KAAK,EAAE,MAAM,GACZ,eAAe,CAuDjB;AAoFD,MAAM,WAAW,qBAAqB;IACpC;yEACqE;IACrE,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;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,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,SAAS,EACV,EAAE,qBAAqB,+BAyEvB"}
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,CAAA;AAKtE,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAOpE;;wEAEwE;AACxE,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;oEACoE;AACpE,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iFAAiF;IACjF,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,6EAA6E;IAC7E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB;;0EAEsE;IACtE,aAAa,EAAE,OAAO,CAAA;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,iBAAiB,EAAE,EAC5B,KAAK,EAAE,MAAM,GACZ,eAAe,CAuDjB;AAoFD,MAAM,WAAW,qBAAqB;IACpC;yEACqE;IACrE,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;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"}
@@ -184,7 +184,7 @@ const RATE_BAND = {
184
184
  warn: { Icon: TriangleAlert, tint: 'text-system-alert', word: 'Elevada' },
185
185
  breach: { Icon: AlertOctagon, tint: 'text-credit', word: 'Em estresse' }
186
186
  };
187
- export function DelinquencyAging({ buckets, currency, locale, rateLabel = 'Inadimplência', rateBandLabels, emptyLabel = 'sem carteira', indeterminateLabel = 'indeterminada', bucketLabels, warn = 0.05, breach = 0.1, showTotal = false, className }) {
187
+ export 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 }) {
188
188
  // THIRD RAIL: the rate scale and the two totals come from money-math, never
189
189
  // float. The division below is of two exact BigInt-derived integers.
190
190
  const scale = currency ? minorDigitsOf(currency) : 2;
@@ -198,12 +198,16 @@ export function DelinquencyAging({ buckets, currency, locale, rateLabel = 'Inadi
198
198
  const band = hasRate && overdueMinor !== null && totalMinor !== null
199
199
  ? exactBand(overdueMinor, totalMinor, warn, breach)
200
200
  : 'low';
201
- const { Icon, tint, word } = RATE_BAND[band];
201
+ const { Icon, word } = RATE_BAND[band];
202
+ // `ink` retones ONLY the healthy band; `warn`/`breach` keep their alarm tints.
203
+ const tint = healthyTone === 'ink' && band === 'low'
204
+ ? 'text-foreground'
205
+ : RATE_BAND[band].tint;
202
206
  // Shallow merge: an unlisted band keeps its pt-BR default.
203
207
  const bandWord = rateBandLabels?.[band] ?? word;
204
208
  const distressed = band === 'breach';
205
209
  return (_jsxs("div", { className: cn('flex flex-col gap-4', className), children: [_jsxs("header", { className: "flex items-baseline justify-between gap-3", children: [_jsx(SectionLabel, { as: "span", children: rateLabel }), hasRate ? (_jsxs("span", {
206
210
  // A distressed rate is a credit alarm: announced the moment it
207
211
  // crosses the band, so assistive tech does not lean on the tint.
208
- role: distressed ? 'alert' : undefined, className: cn('inline-flex items-center gap-1.5', tint), children: [_jsx(Icon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsxs("span", { className: "sr-only", children: [bandWord, ": "] }), _jsx(Figure, { size: "row", className: tint, children: formatPercent(rate, { unit: 'ratio', locale }) })] })) : (_jsxs("span", { className: "text-muted-foreground inline-flex items-center gap-1.5", children: [_jsx("span", { className: cn(LABEL_VOICE_CLASS, 'tracking-normal normal-case'), children: indeterminate ? indeterminateLabel : emptyLabel }), _jsx(Figure, { size: "row", className: "text-muted-foreground", children: NO_VALUE })] }))] }), _jsx(AgingBuckets, { buckets: buckets, currency: currency, locale: locale, showTotal: showTotal, labels: bucketLabels })] }));
212
+ role: distressed ? 'alert' : undefined, className: cn('inline-flex items-center gap-1.5', tint), children: [_jsx(Icon, { "aria-hidden": true, className: "size-4 shrink-0" }), _jsxs("span", { className: "sr-only", children: [bandWord, ": "] }), _jsx(Figure, { size: "row", className: tint, children: formatPercent(rate, { unit: 'ratio', locale }) })] })) : (_jsxs("span", { className: "text-muted-foreground inline-flex items-center gap-1.5", children: [_jsx("span", { className: cn(LABEL_VOICE_CLASS, 'tracking-normal normal-case'), children: indeterminate ? indeterminateLabel : emptyLabel }), _jsx(Figure, { size: "row", className: "text-muted-foreground", children: NO_VALUE })] }))] }), _jsx(AgingBuckets, { buckets: buckets, currency: currency, locale: locale, showTotal: showTotal, labels: bucketLabels, healthyTone: healthyTone })] }));
209
213
  }
@@ -8,14 +8,21 @@
8
8
  * `FIGURE_CLASS` constants when composing className strings inline.
9
9
  *
10
10
  * Scale:
11
- * - hero : the dominant in-bar figure — text-4xl/5xl, semibold, tracking-tight
12
- * - panel : compliance / exposure — text-3xl, semibold, tracking-tight
13
- * - count : ledger count — text-2xl, semibold, tracking-tight
14
- * - row : inline / row figure — text-sm
15
- * - tick : ruler / micro figure — text-[10px], leading-none
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;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAInD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;AAEpE;0EAC0E;AAC1E,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAMnD,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"}
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"}
@@ -4,6 +4,7 @@ import { cn } from '../../lib/utils.js';
4
4
  * invariants live here so they can never be forgotten at a call site. */
5
5
  export const FIGURE_CLASS = {
6
6
  hero: 'font-mono text-4xl font-semibold tracking-tight tabular-nums lg:text-5xl',
7
+ 'money-hero': 'font-mono text-2xl font-semibold tracking-tight tabular-nums lg:text-3xl',
7
8
  panel: 'font-mono text-3xl font-semibold tracking-tight tabular-nums',
8
9
  count: 'font-mono text-2xl font-semibold tracking-tight tabular-nums',
9
10
  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;AAKnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,EAAE,CAAC,EAAE,WAAW,CAAA;CACjB,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,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAUnB"}
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"}
@@ -1,10 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { SECTION_LABEL_CLASS } from '../../lib/typography.js';
3
3
  import { cn } from '../../lib/utils.js';
4
- export function SectionLabel({ children, className, as: Tag = 'h2', ...rest }) {
4
+ /** The entry-section head treatment: a hairline double rule under the label.
5
+ * `border-border`, NOT the register head's ink — this is the quieter of the two
6
+ * head rules. Pinned here because ~20 call sites were restating it. */
7
+ const RULED_CLASS = 'border-b-[3px] border-double border-border pb-2';
8
+ export function SectionLabel({ children, className, as: Tag = 'h2', ruled = false, ...rest }) {
5
9
  // The remaining element props reach the rendered tag, so a panel can point
6
10
  // `aria-labelledby` at this heading via `id`, and tests can hang a `data-*`
7
11
  // hook off it. Without the spread there was no way to reference the heading
8
12
  // from its own container.
9
- return (_jsx(Tag, { className: cn(SECTION_LABEL_CLASS, className), ...rest, children: children }));
13
+ return (_jsx(Tag, { ...rest, "data-variant": ruled ? 'ruled' : undefined, className: cn(SECTION_LABEL_CLASS, ruled && RULED_CLASS, className), children: children }));
10
14
  }
@@ -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,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,8CAA8C;IAC9C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,EACb,UAAgB,EAChB,WAAuB,EACvB,YAAY,EAAE,SAAS,EACvB,UAA2B,EAC3B,QAAgB,EAChB,SAAS,EACT,EAAE,EACH,EAAE,gBAAgB,qBAsGlB"}
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,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,8CAA8C;IAC9C,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;CACzD,CAAA;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,aAAa,EACb,UAAgB,EAChB,WAAuB,EACvB,YAAY,EAAE,SAAS,EACvB,UAA2B,EAC3B,QAAgB,EAChB,SAAS,EACT,EAAE,EACF,SAAS,EACV,EAAE,gBAAgB,qBAuGlB"}
@@ -23,7 +23,7 @@ import { cn } from '../../lib/utils.js';
23
23
  * string: any string sentinel is a value a parent could legitimately pass.
24
24
  */
25
25
  const NO_PENDING_ECHO = Symbol('no pending echo');
26
- export function SearchInput({ value, onValueChange, debounceMs = 250, placeholder = 'Search…', 'aria-label': ariaLabel, clearLabel = 'Clear search', disabled = false, className, id }) {
26
+ export function SearchInput({ value, onValueChange, debounceMs = 250, placeholder = 'Search…', 'aria-label': ariaLabel, clearLabel = 'Clear search', disabled = false, className, id, onKeyDown }) {
27
27
  // Local draft keeps typing instant; the controlled `value` is the source of
28
28
  // truth between edits. When the parent changes `value` out of band (reset,
29
29
  // programmatic set), the draft follows.
@@ -79,7 +79,7 @@ export function SearchInput({ value, onValueChange, debounceMs = 250, placeholde
79
79
  onValueChange('');
80
80
  };
81
81
  const hasValue = draft.length > 0;
82
- return (_jsx("div", { className: cn('relative w-full sm:w-64', className), children: _jsx(Input, { id: id, type: "search", role: "searchbox", value: draft, onChange: handleChange, placeholder: placeholder, "aria-label": ariaLabel ?? placeholder ?? 'Search', disabled: disabled,
82
+ return (_jsx("div", { className: cn('relative w-full sm:w-64', className), children: _jsx(Input, { id: id, type: "search", role: "searchbox", value: draft, onChange: handleChange, onKeyDown: onKeyDown, placeholder: placeholder, "aria-label": ariaLabel ?? placeholder ?? 'Search', disabled: disabled,
83
83
  // The native search clear glyph would duplicate our button.
84
84
  className: "[&::-webkit-search-cancel-button]:appearance-none", startAdornment: _jsx(InputAdornment, { position: "start", children: _jsx(Search, { "aria-hidden": true }) }), endAdornment: hasValue ? (_jsx(InputAdornment, { position: "end", children: _jsx(IconButton, { type: "button", variant: "plain", size: "small", "aria-label": clearLabel, disabled: disabled, onClick: handleClear, className: "text-muted-foreground hover:text-foreground", children: _jsx(X, { className: "size-4", "aria-hidden": true }) }) })) : undefined }) }));
85
85
  }
package/dist/globals.css CHANGED
@@ -13,7 +13,8 @@
13
13
  @custom-variant dark (&:is(.dark *));
14
14
 
15
15
  @theme inline {
16
- --font-sans: var(--font-inter), Inter, ui-sans-serif, system-ui, sans-serif;
16
+ --font-sans:
17
+ var(--font-inter, 'Inter'), 'Inter', ui-sans-serif, system-ui, sans-serif;
17
18
 
18
19
  --shadow-sidebar: 5px 0px 15px -3px hsl(var(--shadow-color) / 0.05);
19
20
  --shadow-data-table:
@@ -358,6 +359,17 @@
358
359
  --accent-hover: 46 98% 57%; /* sunglow/400 = #FDCB28 - opacity via /70 */
359
360
  --accent-mute: 46 98% 57%; /* sunglow/400 = #FDCB28 - opacity via /50 */
360
361
 
362
+ /*
363
+ Shadcn — Destructive. Lifted to red/400 like every other red in this
364
+ block (--system-error, --credit, --chart-2): the light red/500 inherited
365
+ here before, which left `text-destructive` at 2.76:1 on a --card surface
366
+ and `bg-destructive`/`text-destructive-foreground` at 3.78:1. The
367
+ foreground inverts to red/950 — the deep end this theme already uses as
368
+ --system-error-surface — so the pair reads 5.94:1.
369
+ */
370
+ --destructive: 0 91% 71%; /* red/400 = #F87171 */
371
+ --destructive-foreground: 0 75% 15%; /* red/950 = #450A0A */
372
+
361
373
  /* Shadcn — System Error */
362
374
  --system-error: 0 91% 71%; /* red/400 = #F87171 */
363
375
  --system-error-surface: 0 75% 15%; /* red/950 = #450A0A */
@@ -396,9 +408,23 @@
396
408
  /* Shadow color for dark mode */
397
409
  --shadow-color: 0 0% 100%;
398
410
 
399
- /* Ledger credit semantic — lifted for the dark canvas; foreground mirrors. */
400
- --credit: 0 91% 71%; /* red/400 = #F87171 */
401
- --credit-foreground: 0 91% 71%; /* mirrors --credit */
411
+ /*
412
+ Ledger credit semantic lifted for the dark canvas; foreground mirrors.
413
+ Sized by the composite the mirror actually produces, not by the plain
414
+ pair: components write `bg-credit/10` + `text-credit`, so the real
415
+ measurement is credit-as-text over a 10% credit tint composited on
416
+ --card. red/400 read only 3.34:1 there. red/300 — the channel this block
417
+ already uses for --system-error-text — reaches 4.59:1, and 5.54:1 as
418
+ plain text on --card.
419
+
420
+ Credit stays one step further from the canvas than --destructive
421
+ (red/400 here), the way light keeps credit at red/700 against a red/500
422
+ destructive: on a dark ground "further from the canvas" means lighter,
423
+ so the direction inverts but the separation holds and the two never read
424
+ as the same signal.
425
+ */
426
+ --credit: 0 94% 82%; /* red/300 = #FCA5A5 */
427
+ --credit-foreground: 0 94% 82%; /* mirrors --credit */
402
428
 
403
429
  /* Reconciliation matte fills — raised surfaces over base/800, one step apart. */
404
430
  --matched-surface: 240 5% 26%; /* base/700 = #3F3F46 */
@@ -433,21 +459,30 @@
433
459
  0 4px 6px -4px rgba(0, 0, 0, 0.1);
434
460
  }
435
461
 
462
+ /*
463
+ Type fills come from the system token families, so a toast themes with the
464
+ rest of the app. Ink is picked per family by polarity, not per theme:
465
+ --primary-foreground is the ink that sits on a solid fill and already
466
+ inverts (white in light, base/800 in dark), which is what the success and
467
+ error fills need — they darken in light and lift in dark. --system-alert is
468
+ bright in BOTH themes, so warning takes --accent-foreground, the token that
469
+ means "ink on yellow" and is near-black in both.
470
+ */
436
471
  [data-sonner-toast][data-type='success'] {
437
- --normal-bg: #22c55e;
438
- --normal-text: #ffffff;
472
+ --normal-bg: hsl(var(--system-success));
473
+ --normal-text: hsl(var(--primary-foreground));
439
474
  --normal-border: transparent;
440
475
  }
441
476
 
442
477
  [data-sonner-toast][data-type='error'] {
443
- --normal-bg: #ef4444;
444
- --normal-text: #ffffff;
478
+ --normal-bg: hsl(var(--system-error));
479
+ --normal-text: hsl(var(--primary-foreground));
445
480
  --normal-border: transparent;
446
481
  }
447
482
 
448
483
  [data-sonner-toast][data-type='warning'] {
449
- --normal-bg: #f59e0b;
450
- --normal-text: #422006;
484
+ --normal-bg: hsl(var(--system-alert));
485
+ --normal-text: hsl(var(--accent-foreground));
451
486
  --normal-border: transparent;
452
487
  }
453
488
 
@@ -476,42 +511,35 @@
476
511
  display: none !important;
477
512
  }
478
513
 
514
+ /*
515
+ The close button derives from the toast's own --normal-text, so it is legible
516
+ on every fill and in both themes by construction. That is what replaced the
517
+ six rules previously here: one per-theme pair plus one pair per coloured
518
+ type, each hardcoding the ink it assumed the fill needed.
519
+
520
+ Both rules keep !important. Sonner's own resting rule is
521
+ `[data-sonner-toast][data-styled='true'] [data-close-button]` (0,3,0,
522
+ color: var(--gray12)) and its dark rule adds a fourth compound, so a plain
523
+ descendant selector here cannot win the cascade against a stylesheet that is
524
+ injected at runtime — the fade this rule intends was previously decided by
525
+ source order rather than by the sheet.
526
+ */
479
527
  [data-sonner-toast] [data-close-button] {
480
- color: hsl(var(--foreground) / 0.5);
528
+ color: color-mix(in srgb, var(--normal-text) 50%, transparent) !important;
481
529
  }
482
530
 
483
531
  [data-sonner-toast] [data-close-button]:hover {
484
- color: #ffffff !important;
485
- background-color: hsl(var(--foreground)) !important;
486
- border-color: hsl(var(--foreground)) !important;
487
- }
488
-
489
- .dark [data-sonner-toast] [data-close-button]:hover {
490
- color: #ffffff !important;
491
- background-color: hsl(240 5% 26%) !important;
492
- border-color: hsl(240 5% 26%) !important;
493
- }
494
-
495
- [data-sonner-toast][data-type='success'] [data-close-button],
496
- [data-sonner-toast][data-type='error'] [data-close-button] {
497
- color: rgba(255, 255, 255, 0.6);
498
- }
499
-
500
- [data-sonner-toast][data-type='success'] [data-close-button]:hover,
501
- [data-sonner-toast][data-type='error'] [data-close-button]:hover {
502
- color: #ffffff !important;
503
- background-color: hsl(var(--foreground)) !important;
504
- border-color: hsl(var(--foreground)) !important;
505
- }
506
-
507
- [data-sonner-toast][data-type='warning'] [data-close-button] {
508
- color: rgba(66, 32, 6, 0.5);
509
- }
510
-
511
- [data-sonner-toast][data-type='warning'] [data-close-button]:hover {
512
- color: #422006 !important;
513
- background-color: rgba(66, 32, 6, 0.15) !important;
514
- border-color: rgba(66, 32, 6, 0.15) !important;
532
+ color: var(--normal-text) !important;
533
+ background-color: color-mix(
534
+ in srgb,
535
+ var(--normal-text) 15%,
536
+ transparent
537
+ ) !important;
538
+ border-color: color-mix(
539
+ in srgb,
540
+ var(--normal-text) 15%,
541
+ transparent
542
+ ) !important;
515
543
  }
516
544
 
517
545
  .dark [data-sonner-toast] {
@@ -557,22 +585,6 @@
557
585
  }
558
586
  }
559
587
 
560
- @keyframes caret-blink {
561
- 0%,
562
- 70%,
563
- 100% {
564
- opacity: 1;
565
- }
566
- 20%,
567
- 50% {
568
- opacity: 0;
569
- }
570
- }
571
-
572
- @utility animate-caret-blink {
573
- animation: caret-blink 1.25s ease-out infinite;
574
- }
575
-
576
588
  .ticket {
577
589
  mask: radial-gradient(21px 13px at 50% 102%, #0000 98%, #000) 50%
578
590
  calc(100% - 16px) / 64px 100% repeat-x;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lerianstudio/sindarian-ui",
3
- "version": "1.3.0-beta.3",
3
+ "version": "1.3.0-beta.4",
4
4
  "description": "Sindarian UI - A UI library for Midaz Console",
5
5
  "license": "ISC",
6
6
  "author": {