@lerianstudio/sindarian-ui 1.4.0-beta.2 → 1.4.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.
- package/dist/components/entity-box/index.d.ts +11 -2
- package/dist/components/entity-box/index.d.ts.map +1 -1
- package/dist/components/entity-box/index.js +3 -3
- package/dist/components/form/input-field/index.d.ts +12 -2
- package/dist/components/form/input-field/index.d.ts.map +1 -1
- package/dist/components/form/input-field/index.js +29 -5
- package/dist/components/form/select-field/index.d.ts +29 -5
- package/dist/components/form/select-field/index.d.ts.map +1 -1
- package/dist/components/form/select-field/index.js +33 -10
- package/dist/components/page-header/index.d.ts +8 -2
- package/dist/components/page-header/index.d.ts.map +1 -1
- package/dist/components/page-header/index.js +4 -4
- package/dist/components/ui/badge/index.d.ts +8 -0
- package/dist/components/ui/badge/index.d.ts.map +1 -1
- package/dist/components/ui/badge/index.js +9 -1
- package/dist/components/ui/form.d.ts +4 -4
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +12 -6
- package/dist/components/ui/multiple-select/index.d.ts +11 -3
- package/dist/components/ui/multiple-select/index.d.ts.map +1 -1
- package/dist/components/ui/select/index.d.ts +5 -0
- package/dist/components/ui/select/index.d.ts.map +1 -1
- package/dist/components/ui/select/index.js +24 -1
- package/dist/domain/blotter/index.d.ts +2 -2
- package/dist/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
- package/dist/domain/delinquency-aging/aging-buckets.js +1 -1
- package/dist/domain/delinquency-aging/index.d.ts.map +1 -1
- package/dist/domain/delinquency-aging/index.js +1 -1
- package/dist/domain/figure/index.d.ts +11 -9
- package/dist/domain/figure/index.d.ts.map +1 -1
- package/dist/domain/figure/index.js +8 -8
- package/dist/domain/key-id/index.d.ts +1 -1
- package/dist/domain/key-id/index.d.ts.map +1 -1
- package/dist/domain/key-id/index.js +1 -1
- package/dist/domain/section-label/index.d.ts +10 -7
- package/dist/domain/section-label/index.d.ts.map +1 -1
- package/dist/domain/status-rail/index.d.ts +1 -1
- package/dist/domain/status-rail/index.d.ts.map +1 -1
- package/dist/domain/status-rail/index.js +8 -4
- package/dist/enterprise/alert-banner/index.d.ts +5 -3
- package/dist/enterprise/alert-banner/index.d.ts.map +1 -1
- package/dist/enterprise/alert-banner/index.js +2 -2
- package/dist/enterprise/data-table/column-size.d.ts +70 -0
- package/dist/enterprise/data-table/column-size.d.ts.map +1 -0
- package/dist/enterprise/data-table/column-size.js +103 -0
- package/dist/enterprise/data-table/index.d.ts.map +1 -1
- package/dist/enterprise/data-table/index.js +22 -2
- package/dist/enterprise/date-range-picker/index.d.ts.map +1 -1
- package/dist/enterprise/date-range-picker/index.js +1 -2
- package/dist/enterprise/stat-card/index.d.ts +3 -3
- package/dist/enterprise/stat-card/index.d.ts.map +1 -1
- package/dist/enterprise/stat-card/index.js +1 -1
- package/dist/enterprise/status-badge/index.js +1 -1
- package/dist/enterprise/virtualized-table/index.d.ts +18 -2
- package/dist/enterprise/virtualized-table/index.d.ts.map +1 -1
- package/dist/enterprise/virtualized-table/index.js +31 -4
- package/dist/esm/components/entity-box/index.d.ts +11 -2
- package/dist/esm/components/entity-box/index.d.ts.map +1 -1
- package/dist/esm/components/entity-box/index.js +3 -3
- package/dist/esm/components/form/input-field/index.d.ts +12 -2
- package/dist/esm/components/form/input-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/input-field/index.js +29 -5
- package/dist/esm/components/form/select-field/index.d.ts +29 -5
- package/dist/esm/components/form/select-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/select-field/index.js +33 -10
- package/dist/esm/components/page-header/index.d.ts +8 -2
- package/dist/esm/components/page-header/index.d.ts.map +1 -1
- package/dist/esm/components/page-header/index.js +4 -4
- package/dist/esm/components/ui/badge/index.d.ts +8 -0
- package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
- package/dist/esm/components/ui/badge/index.js +9 -1
- package/dist/esm/components/ui/form.d.ts +4 -4
- package/dist/esm/components/ui/form.d.ts.map +1 -1
- package/dist/esm/components/ui/form.js +12 -6
- package/dist/esm/components/ui/multiple-select/index.d.ts +11 -3
- package/dist/esm/components/ui/multiple-select/index.d.ts.map +1 -1
- package/dist/esm/components/ui/select/index.d.ts +5 -0
- package/dist/esm/components/ui/select/index.d.ts.map +1 -1
- package/dist/esm/components/ui/select/index.js +24 -1
- package/dist/esm/domain/blotter/index.d.ts +2 -2
- package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
- package/dist/esm/domain/delinquency-aging/aging-buckets.js +1 -1
- package/dist/esm/domain/delinquency-aging/index.d.ts.map +1 -1
- package/dist/esm/domain/delinquency-aging/index.js +1 -1
- package/dist/esm/domain/figure/index.d.ts +11 -9
- package/dist/esm/domain/figure/index.d.ts.map +1 -1
- package/dist/esm/domain/figure/index.js +8 -8
- package/dist/esm/domain/key-id/index.d.ts +1 -1
- package/dist/esm/domain/key-id/index.d.ts.map +1 -1
- package/dist/esm/domain/key-id/index.js +1 -1
- package/dist/esm/domain/section-label/index.d.ts +10 -7
- package/dist/esm/domain/section-label/index.d.ts.map +1 -1
- package/dist/esm/domain/status-rail/index.d.ts +1 -1
- package/dist/esm/domain/status-rail/index.d.ts.map +1 -1
- package/dist/esm/domain/status-rail/index.js +8 -4
- package/dist/esm/enterprise/alert-banner/index.d.ts +5 -3
- package/dist/esm/enterprise/alert-banner/index.d.ts.map +1 -1
- package/dist/esm/enterprise/alert-banner/index.js +2 -2
- package/dist/esm/enterprise/data-table/column-size.d.ts +70 -0
- package/dist/esm/enterprise/data-table/column-size.d.ts.map +1 -0
- package/dist/esm/enterprise/data-table/column-size.js +97 -0
- package/dist/esm/enterprise/data-table/index.d.ts.map +1 -1
- package/dist/esm/enterprise/data-table/index.js +22 -2
- package/dist/esm/enterprise/date-range-picker/index.d.ts.map +1 -1
- package/dist/esm/enterprise/date-range-picker/index.js +1 -2
- package/dist/esm/enterprise/stat-card/index.d.ts +3 -3
- package/dist/esm/enterprise/stat-card/index.d.ts.map +1 -1
- package/dist/esm/enterprise/stat-card/index.js +1 -1
- package/dist/esm/enterprise/status-badge/index.js +1 -1
- package/dist/esm/enterprise/virtualized-table/index.d.ts +18 -2
- package/dist/esm/enterprise/virtualized-table/index.d.ts.map +1 -1
- package/dist/esm/enterprise/virtualized-table/index.js +31 -4
- package/dist/esm/lib/typography.d.ts +21 -6
- package/dist/esm/lib/typography.d.ts.map +1 -1
- package/dist/esm/lib/typography.js +20 -5
- package/dist/globals.css +51 -16
- package/dist/lib/typography.d.ts +21 -6
- package/dist/lib/typography.d.ts.map +1 -1
- package/dist/lib/typography.js +20 -5
- package/package.json +1 -1
|
@@ -4,13 +4,22 @@ declare function EntityBox({ className, children, ...props }: React.ComponentPro
|
|
|
4
4
|
declare function EntityBoxCollapsible({ className, ...props }: CollapsibleProps): React.JSX.Element;
|
|
5
5
|
declare function EntityBoxCollapsibleTrigger(props: CollapsibleTriggerProps): React.JSX.Element;
|
|
6
6
|
declare function EntityBoxCollapsibleContent({ children, ...props }: CollapsibleContentProps): React.JSX.Element;
|
|
7
|
-
interface EntityBoxHeaderProps extends React.ComponentProps<'div'> {
|
|
7
|
+
export interface EntityBoxHeaderProps extends React.ComponentProps<'div'> {
|
|
8
8
|
title: string;
|
|
9
9
|
subtitle?: string;
|
|
10
10
|
tooltip?: string;
|
|
11
11
|
tooltipWidth?: string | number;
|
|
12
|
+
/**
|
|
13
|
+
* Heading element used for the title. Defaults to `h2`.
|
|
14
|
+
*
|
|
15
|
+
* An EntityBox is a content box UNDER the page's own heading — the page `h1`
|
|
16
|
+
* belongs to `PageHeaderInfoTitle` — so `h1` here would give the page a
|
|
17
|
+
* second top-level heading. Raise or lower the level to match the section
|
|
18
|
+
* the box actually sits in.
|
|
19
|
+
*/
|
|
20
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4';
|
|
12
21
|
}
|
|
13
|
-
declare function EntityBoxHeaderTitle({ title, subtitle, tooltip, tooltipWidth, className, ...props }: EntityBoxHeaderProps): React.JSX.Element;
|
|
22
|
+
declare function EntityBoxHeaderTitle({ title, subtitle, tooltip, tooltipWidth, className, as: Heading, ...props }: EntityBoxHeaderProps): React.JSX.Element;
|
|
14
23
|
declare function EntityBoxBanner({ className, children, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
15
24
|
declare function EntityBoxActions({ className, children, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
16
25
|
export { EntityBox, EntityBoxCollapsible, EntityBoxCollapsibleTrigger, EntityBoxCollapsibleContent, EntityBoxHeaderTitle, EntityBoxBanner, EntityBoxActions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/entity-box/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAczB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,6BAA6B,CAAA;AAIpC,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAa7B;AAED,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,qBAUtE;AAED,iBAAS,2BAA2B,CAAC,KAAK,EAAE,uBAAuB,qBAQlE;AAED,iBAAS,2BAA2B,CAAC,EACnC,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,qBAOzB;AAED,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/entity-box/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAczB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,EACxB,MAAM,6BAA6B,CAAA;AAIpC,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAa7B;AAED,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,qBAUtE;AAED,iBAAS,2BAA2B,CAAC,KAAK,EAAE,uBAAuB,qBAQlE;AAED,iBAAS,2BAA2B,CAAC,EACnC,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,qBAOzB;AAED,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACvE,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAC/B;AAED,iBAAS,oBAAoB,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,SAAS,EACT,EAAE,EAAE,OAAc,EAClB,GAAG,KAAK,EACT,EAAE,oBAAoB,qBAkCtB;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAU7B;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAa7B;AAED,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EACjB,CAAA"}
|
|
@@ -26,10 +26,10 @@ function EntityBoxCollapsibleTrigger(props) {
|
|
|
26
26
|
function EntityBoxCollapsibleContent({ children, ...props }) {
|
|
27
27
|
return ((0, jsx_runtime_1.jsxs)(collapsible_1.CollapsibleContent, { ...props, children: [(0, jsx_runtime_1.jsx)(separator_1.Separator, { orientation: "horizontal" }), (0, jsx_runtime_1.jsx)("div", { className: "grid w-full grid-cols-3 p-6", children: children })] }));
|
|
28
28
|
}
|
|
29
|
-
function EntityBoxHeaderTitle({ title, subtitle, tooltip, tooltipWidth, className, ...props }) {
|
|
30
|
-
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-box-header", className: (0, utils_1.cn)('flex flex-col items-start', className), ...props, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-[10px]", children: [(0, jsx_runtime_1.jsx)(
|
|
29
|
+
function EntityBoxHeaderTitle({ title, subtitle, tooltip, tooltipWidth, className, as: Heading = 'h2', ...props }) {
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-box-header", className: (0, utils_1.cn)('flex flex-col items-start', className), ...props, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-[10px]", children: [(0, jsx_runtime_1.jsx)(Heading, { className: "text-muted-foreground text-lg font-medium", children: title }), tooltip && ((0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.CircleHelp, { className: "pointer text-shadcn-400 h-5 w-5" }) }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { side: "right", style: tooltipWidth
|
|
31
31
|
? { width: tooltipWidth, maxWidth: tooltipWidth }
|
|
32
|
-
: undefined, children: tooltip })] }) }))] }), subtitle && (0, jsx_runtime_1.jsx)("p", { className: "text-
|
|
32
|
+
: undefined, children: tooltip })] }) }))] }), subtitle && (0, jsx_runtime_1.jsx)("p", { className: "text-muted-foreground text-sm", children: subtitle })] }));
|
|
33
33
|
}
|
|
34
34
|
function EntityBoxBanner({ className, children, ...props }) {
|
|
35
35
|
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-box-banner", className: (0, utils_1.cn)('grid grid-cols-3 p-6', className), ...props, children: children }));
|
|
@@ -11,16 +11,26 @@ export type InputFieldProps<T extends FieldValues = FieldValues> = {
|
|
|
11
11
|
description?: ReactNode;
|
|
12
12
|
startAdornment?: ReactNode;
|
|
13
13
|
endAdornment?: ReactNode;
|
|
14
|
-
control
|
|
14
|
+
/** react-hook-form control. Omit it to drive the field from plain state
|
|
15
|
+
* with `value`/`defaultValue` + `onChange`. */
|
|
16
|
+
control?: Control<T>;
|
|
17
|
+
/** Controlled value for the no-`control` path. */
|
|
18
|
+
value?: string;
|
|
15
19
|
disabled?: boolean;
|
|
16
20
|
readOnly?: boolean;
|
|
17
21
|
minHeight?: number;
|
|
18
22
|
maxHeight?: number;
|
|
19
23
|
textArea?: boolean;
|
|
20
24
|
required?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Seed value. With `control` and no form-level default for this name,
|
|
27
|
+
* react-hook-form treats the seed as a VALUE rather than a default, so
|
|
28
|
+
* `formState.isDirty` reads true after `reset()` and after retyping the
|
|
29
|
+
* seed. Prefer `useForm({ defaultValues })` when dirty tracking matters.
|
|
30
|
+
*/
|
|
21
31
|
defaultValue?: string;
|
|
22
32
|
'data-testid'?: string;
|
|
23
33
|
onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
24
34
|
};
|
|
25
|
-
export declare const InputField: <T extends FieldValues = FieldValues>({ className, type, label, tooltip, labelExtra, placeholder, description, startAdornment, endAdornment, required, readOnly, minHeight, maxHeight, textArea, defaultValue, onChange, ...others }: InputFieldProps<T>) => import("react").JSX.Element;
|
|
35
|
+
export declare const InputField: <T extends FieldValues = FieldValues>({ className, type, label, tooltip, labelExtra, placeholder, description, startAdornment, endAdornment, required, readOnly, minHeight, maxHeight, textArea, defaultValue, value, onChange, ...others }: InputFieldProps<T>) => import("react").JSX.Element;
|
|
26
36
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input-field/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input-field/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,OAAO,EAAkB,WAAW,EAAQ,MAAM,iBAAiB,CAAA;AAE5E,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI;IACjE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,sBAAsB,CAAA;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB;oDACgD;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,CACT,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,KACzD,IAAI,CAAA;CACV,CAAA;AAeD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,uMAmB7D,eAAe,CAAC,CAAC,CAAC,gCA2EpB,CAAA"}
|
|
@@ -5,10 +5,34 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const autosize_textarea_1 = require("../../../components/ui/autosize-textarea");
|
|
6
6
|
const form_1 = require("../../../components/ui/form");
|
|
7
7
|
const input_1 = require("../../../components/ui/input");
|
|
8
|
-
const InputField = ({ className, type, label, tooltip, labelExtra, placeholder, description, startAdornment, endAdornment, required, readOnly, minHeight, maxHeight, textArea, defaultValue, onChange, ...others }) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const InputField = ({ className, type, label, tooltip, labelExtra, placeholder, description, startAdornment, endAdornment, required, readOnly, minHeight, maxHeight, textArea, defaultValue, value, onChange, ...others }) => {
|
|
9
|
+
const renderItem = (binding) => ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, children: [label && ((0, jsx_runtime_1.jsx)(form_1.FormLabel, { extra: tooltip ? (0, jsx_runtime_1.jsx)(form_1.FormTooltip, { children: tooltip }) : labelExtra, children: label })), (0, jsx_runtime_1.jsx)(form_1.FormControl, { children: textArea ? ((0, jsx_runtime_1.jsx)(autosize_textarea_1.AutosizeTextarea, { className: className, placeholder: placeholder, readOnly: readOnly, minHeight: minHeight, maxHeight: maxHeight, "data-testid": others['data-testid'], ...binding })) : ((0, jsx_runtime_1.jsx)(input_1.Input, { className: className, type: type, placeholder: placeholder, readOnly: readOnly, startAdornment: startAdornment, endAdornment: endAdornment, "data-testid": others['data-testid'], ...binding })) }), (0, jsx_runtime_1.jsx)(form_1.FormMessage, {}), description && (0, jsx_runtime_1.jsx)(form_1.FormDescription, { children: description })] }));
|
|
10
|
+
if (!others.control) {
|
|
11
|
+
return renderItem({
|
|
12
|
+
name: others.name,
|
|
13
|
+
disabled: others.disabled,
|
|
14
|
+
// Controlled when the caller holds the value, uncontrolled when it only
|
|
15
|
+
// seeds one — supplying both is what React warns about.
|
|
16
|
+
...(value !== undefined ? { value } : { defaultValue }),
|
|
17
|
+
onChange: (e) => onChange?.(e)
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(form_1.FormField, { ...others, name: others.name,
|
|
21
|
+
// The seed goes through react-hook-form, never straight to the DOM: a
|
|
22
|
+
// value painted on the box only makes the field LOOK filled while the
|
|
23
|
+
// form still submits nothing for that name. Controller seeds its own
|
|
24
|
+
// state from this, so `field.value` carries the seed on both branches.
|
|
25
|
+
defaultValue: defaultValue, render: ({ field }) => renderItem({
|
|
26
|
+
...field,
|
|
27
|
+
// Controlled from mount. react-hook-form hands `undefined` for any
|
|
28
|
+
// name the form declares no default for; React then mounts the box
|
|
29
|
+
// uncontrolled and flips it on the first keystroke, losing that
|
|
30
|
+
// character.
|
|
31
|
+
value: field.value ?? '',
|
|
32
|
+
onChange: (e) => {
|
|
33
|
+
field.onChange(e);
|
|
34
|
+
onChange?.(e);
|
|
35
|
+
}
|
|
36
|
+
}) }));
|
|
13
37
|
};
|
|
14
38
|
exports.InputField = InputField;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { Control, FieldValues } from 'react-hook-form';
|
|
3
|
-
|
|
3
|
+
type SelectFieldSharedProps<T extends FieldValues = FieldValues> = PropsWithChildren & {
|
|
4
4
|
name: string;
|
|
5
5
|
label?: ReactNode;
|
|
6
6
|
tooltip?: string;
|
|
@@ -9,12 +9,36 @@ export type SelectFieldProps<T extends FieldValues = FieldValues> = PropsWithChi
|
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
readOnly?: boolean;
|
|
12
|
-
control
|
|
13
|
-
|
|
12
|
+
/** react-hook-form control. Omit it to drive the field from plain state
|
|
13
|
+
* with `value` + `onChange`. */
|
|
14
|
+
control?: Control<T>;
|
|
14
15
|
required?: boolean;
|
|
15
16
|
emptyMessage?: string;
|
|
16
|
-
onChange?: (value: string | string[]) => void;
|
|
17
17
|
'data-testid'?: string;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* `multi` is the DISCRIMINANT, not an independent flag: it selects which of the
|
|
21
|
+
* two field shapes the rest of the props must speak. Typed as a plain boolean
|
|
22
|
+
* beside `value?: string | string[]`, `multi` with `value="pix"` compiled and
|
|
23
|
+
* then rendered empty — the multi implementation only understands arrays and
|
|
24
|
+
* turned the string into `[]`, dropping the caller's selection with no error
|
|
25
|
+
* anywhere. The mismatch is unrepresentable now, and a multi consumer's
|
|
26
|
+
* `onChange` receives `string[]` without a cast at the call site.
|
|
27
|
+
*/
|
|
28
|
+
type SelectFieldModeProps = {
|
|
29
|
+
multi: true;
|
|
30
|
+
/** Controlled values for the no-`control` path. Omit to let the select
|
|
31
|
+
* keep its own state and just report changes through `onChange`. */
|
|
32
|
+
value?: string[];
|
|
33
|
+
onChange?: (value: string[]) => void;
|
|
34
|
+
} | {
|
|
35
|
+
multi?: false;
|
|
36
|
+
/** Controlled value for the no-`control` path. Omit to let the select
|
|
37
|
+
* keep its own state and just report changes through `onChange`. */
|
|
38
|
+
value?: string;
|
|
39
|
+
onChange?: (value: string) => void;
|
|
40
|
+
};
|
|
41
|
+
export type SelectFieldProps<T extends FieldValues = FieldValues> = SelectFieldSharedProps<T> & SelectFieldModeProps;
|
|
42
|
+
export declare const SelectField: <T extends FieldValues = FieldValues>({ name, label, tooltip, labelExtra, required, placeholder, description, disabled, readOnly, multi, control, value, children, emptyMessage, onChange, ...others }: SelectFieldProps<T>) => React.JSX.Element;
|
|
43
|
+
export {};
|
|
20
44
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/select-field/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/select-field/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,EACL,OAAO,EAEP,WAAW,EAEZ,MAAM,iBAAiB,CAAA;AAExB,KAAK,sBAAsB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAC7D,iBAAiB,GAAG;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;qCACiC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAEH;;;;;;;;GAQG;AACH,KAAK,oBAAoB,GACrB;IACE,KAAK,EAAE,IAAI,CAAA;IACX;yEACqE;IACrE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CACrC,GACD;IACE,KAAK,CAAC,EAAE,KAAK,CAAA;IACb;yEACqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACnC,CAAA;AAEL,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAC9D,sBAAsB,CAAC,CAAC,CAAC,GAAG,oBAAoB,CAAA;AAWlD,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,kKAiB9D,gBAAgB,CAAC,CAAC,CAAC,sBA6FrB,CAAA"}
|
|
@@ -6,15 +6,38 @@ const form_1 = require("../../../components/ui/form");
|
|
|
6
6
|
const multiple_select_1 = require("../../../components/ui/multiple-select");
|
|
7
7
|
const select_1 = require("../../../components/ui/select");
|
|
8
8
|
const utils_1 = require("../../../lib/utils");
|
|
9
|
-
const SelectField = ({ name, label, tooltip, labelExtra, required, placeholder, description, disabled, readOnly, multi, control, children, emptyMessage = 'No options found.', onChange, ...others }) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
const SelectField = ({ name, label, tooltip, labelExtra, required, placeholder, description, disabled, readOnly, multi, control, value, children, emptyMessage = 'No options found.', onChange, ...others }) => {
|
|
10
|
+
// The props union already pairs `multi` with the callback shape that branch
|
|
11
|
+
// emits, but destructuring an intersection loses that correlation — TS sees
|
|
12
|
+
// two unrelated callbacks. Both branches report through this one seam, each
|
|
13
|
+
// with the payload its own union member declared.
|
|
14
|
+
const emitChange = onChange;
|
|
15
|
+
const renderItem = (field) => {
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, children: [label && ((0, jsx_runtime_1.jsx)(form_1.FormLabel, { extra: tooltip ? (0, jsx_runtime_1.jsx)(form_1.FormTooltip, { children: tooltip }) : labelExtra, children: label })), multi ? ((0, jsx_runtime_1.jsxs)(multiple_select_1.MultipleSelect, { onValueChange: (value) => {
|
|
17
|
+
field.onChange(value);
|
|
18
|
+
emitChange?.(value);
|
|
19
|
+
}, disabled: disabled, ...field, children: [(0, jsx_runtime_1.jsx)(multiple_select_1.MultipleSelectTrigger, { readOnly: readOnly, children: (0, jsx_runtime_1.jsx)(multiple_select_1.MultipleSelectValue, { placeholder: placeholder }) }), (0, jsx_runtime_1.jsx)(multiple_select_1.MultipleSelectContent, { children: children })] })) : ((0, jsx_runtime_1.jsxs)(select_1.Select, { onValueChange: (value) => {
|
|
20
|
+
field.onChange(value);
|
|
21
|
+
emitChange?.(value);
|
|
22
|
+
}, value: field.value, disabled: disabled, open: readOnly ? false : undefined, onOpenChange: readOnly ? () => { } : undefined, children: [(0, jsx_runtime_1.jsx)(form_1.FormControl, { children: (0, jsx_runtime_1.jsx)(select_1.SelectTrigger, { className: (0, utils_1.cn)(disabled && 'bg-shadcn-100'), readOnly: readOnly, "data-testid": others['data-testid'], children: (0, jsx_runtime_1.jsx)(select_1.SelectValue, { placeholder: placeholder }) }) }), (0, jsx_runtime_1.jsxs)(select_1.SelectContent, { children: [(0, jsx_runtime_1.jsx)(select_1.SelectEmpty, { children: emptyMessage }), children] })] })), (0, jsx_runtime_1.jsx)(form_1.FormMessage, {}), description && (0, jsx_runtime_1.jsx)(form_1.FormDescription, { children: description })] }));
|
|
23
|
+
};
|
|
24
|
+
if (!control) {
|
|
25
|
+
// `value` undefined leaves Radix to keep its own state, so an uncontrolled
|
|
26
|
+
// standalone select still opens and picks; `onChange` reports either way.
|
|
27
|
+
// The caller's own `onChange` is invoked by the body, so this is a no-op.
|
|
28
|
+
return renderItem({
|
|
29
|
+
name,
|
|
30
|
+
value,
|
|
31
|
+
onChange: () => { },
|
|
32
|
+
onBlur: () => { },
|
|
33
|
+
ref: () => { },
|
|
34
|
+
disabled
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return ((0, jsx_runtime_1.jsx)(form_1.FormField, { name: name, control: control, ...others,
|
|
38
|
+
// An unset field falls back to the EMPTY value of its own shape: `''`
|
|
39
|
+
// for the single select, `[]` for the multi one. Falling back to `''`
|
|
40
|
+
// for both handed MultipleSelect a string it silently discarded.
|
|
41
|
+
render: ({ field }) => renderItem({ ...field, value: field.value ?? (multi ? [] : '') }) }));
|
|
19
42
|
};
|
|
20
43
|
exports.SelectField = SelectField;
|
|
@@ -16,8 +16,14 @@ export type PageHeaderInfoTitleProps = {
|
|
|
16
16
|
title: string;
|
|
17
17
|
subtitle?: string;
|
|
18
18
|
subtitleCopyToClipboard?: boolean;
|
|
19
|
-
/** Routed to the
|
|
19
|
+
/** Routed to the heading, as it always has been. */
|
|
20
20
|
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Heading level to render. Defaults to `h1`, which is correct: this IS the
|
|
23
|
+
* page heading. Set it when the block is nested under an existing `h1` (a
|
|
24
|
+
* wizard step, an embedded panel) so the document outline stays valid.
|
|
25
|
+
*/
|
|
26
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
21
27
|
/**
|
|
22
28
|
* Seam for the wrapper element's own margins. Merged AFTER the hard-coded
|
|
23
29
|
* `mb-12` so a consumer utility (e.g. `mb-0`) wins via tailwind-merge.
|
|
@@ -25,7 +31,7 @@ export type PageHeaderInfoTitleProps = {
|
|
|
25
31
|
containerClassName?: string;
|
|
26
32
|
children?: ReactNode;
|
|
27
33
|
};
|
|
28
|
-
export declare function PageHeaderInfoTitle({ title, subtitle, className, containerClassName, children }: PageHeaderInfoTitleProps): import("react").JSX.Element;
|
|
34
|
+
export declare function PageHeaderInfoTitle({ title, subtitle, className, containerClassName, children, as: Heading }: PageHeaderInfoTitleProps): import("react").JSX.Element;
|
|
29
35
|
export type PageHeaderInfoTooltipProps = {
|
|
30
36
|
subtitle: string;
|
|
31
37
|
};
|
|
@@ -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,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,
|
|
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,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,+BA+ChC"}
|
|
@@ -18,7 +18,7 @@ const use_toast_1 = require("../../hooks/use-toast");
|
|
|
18
18
|
const react_tooltip_1 = require("@radix-ui/react-tooltip");
|
|
19
19
|
const PageHeaderContext = (0, react_1.createContext)({ isOpen: false });
|
|
20
20
|
function PageHeaderActionButtons({ className, ...props }) {
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "page-header-action-buttons", className: (0, utils_1.cn)('flex items-center gap-8', className), ...props }));
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "page-header-action-buttons", className: (0, utils_1.cn)('flex min-w-0 flex-wrap items-center gap-8', className), ...props }));
|
|
22
22
|
}
|
|
23
23
|
function PageHeaderWrapper({ className, ...props }) {
|
|
24
24
|
const { isOpen } = (0, react_1.useContext)(PageHeaderContext);
|
|
@@ -28,8 +28,8 @@ function PageHeader({ children, className, rootClassName }) {
|
|
|
28
28
|
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
29
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, 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)(
|
|
31
|
+
function PageHeaderInfoTitle({ title, subtitle, className, containerClassName, children, as: Heading = 'h1' }) {
|
|
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)(Heading, { 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-muted-foreground text-sm font-medium", children: subtitle }), children] })] }));
|
|
33
33
|
}
|
|
34
34
|
function PageHeaderInfoTooltip({ subtitle }) {
|
|
35
35
|
const { toast } = (0, use_toast_1.useToast)();
|
|
@@ -45,5 +45,5 @@ function PageHeaderCollapsibleInfoTrigger({ question }) {
|
|
|
45
45
|
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "page-header-collapsible-info-trigger", children: (0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleTrigger, { asChild: true, children: (0, jsx_runtime_1.jsxs)(button_1.Button, { variant: "link", className: "flex gap-2 pr-0", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-foreground text-sm font-medium", children: question }), (0, jsx_runtime_1.jsx)(lucide_react_1.HelpCircle, { className: "h-4 w-4" })] }) }) }));
|
|
46
46
|
}
|
|
47
47
|
function PageHeaderCollapsibleInfo({ question, answer, seeMore, href }) {
|
|
48
|
-
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "page-header-collapsible-info", children: (0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full justify-between pt-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mt-12 flex grow flex-col gap-3 pr-6", children: [(0, jsx_runtime_1.jsx)("
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "page-header-collapsible-info", children: (0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleContent, { children: (0, jsx_runtime_1.jsxs)("div", { className: "flex w-full justify-between pt-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mt-12 flex grow flex-col gap-3 pr-6", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-foreground text-xl font-bold", children: question }), (0, jsx_runtime_1.jsxs)("p", { className: "text-shadcn-500 text-sm leading-relaxed font-medium", children: [answer, seeMore && href && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [' ', (0, jsx_runtime_1.jsxs)("a", { target: "_blank", rel: "noopener noreferrer", href: href, className: "text-shadcn-600 dark:text-shadcn-400 font-medium", children: [(0, jsx_runtime_1.jsx)("span", { className: "underline underline-offset-4", children: seeMore }), (0, jsx_runtime_1.jsx)(lucide_react_1.ExternalLink, { size: 16, className: "ml-1 inline align-middle" })] })] }))] })] }), (0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleTrigger, { asChild: true, children: (0, jsx_runtime_1.jsx)(button_1.Button, { variant: "link", className: "cursor-pointer self-start", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: 24, className: "text-shadcn-500" }) }) })] }) }) }));
|
|
49
49
|
}
|
|
@@ -7,6 +7,14 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
7
7
|
* role as text over a tinted surface. Do not "fix" this into a solid
|
|
8
8
|
* `bg-credit` fill — that renders red-on-red and is invisible.
|
|
9
9
|
*/
|
|
10
|
+
/**
|
|
11
|
+
* `gap-1` is load-bearing, not decoration: a badge holding a label AND an
|
|
12
|
+
* element child (`ID<code>ctx-123</code>`) has nothing between them otherwise —
|
|
13
|
+
* JSX drops the newline-only text node and CSS drops the whitespace-only
|
|
14
|
+
* anonymous flex item — so the screen reads `IDctx-123`. Consumers were pasting
|
|
15
|
+
* `className="gap-1"` per call site; `cn` runs tailwind-merge, so an explicit
|
|
16
|
+
* `gap-2` still wins. Single-child badges are unaffected: gap needs two items.
|
|
17
|
+
*/
|
|
10
18
|
declare const badgeVariants: (props?: ({
|
|
11
19
|
variant?: "default" | "secondary" | "outline" | "destructive" | "alert" | "success" | "active" | "inactive" | "credit" | "error" | "info" | "purple" | null | undefined;
|
|
12
20
|
size?: "default" | "sm" | null | undefined;
|
|
@@ -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;;;;;;GAMG;AACH,QAAA,MAAM,aAAa;;;8EA6ClB,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,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBAUzE;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;;;;;;;GAOG;AACH,QAAA,MAAM,aAAa;;;8EA6ClB,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,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBAUzE;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -13,7 +13,15 @@ const react_slot_1 = require("@radix-ui/react-slot");
|
|
|
13
13
|
* role as text over a tinted surface. Do not "fix" this into a solid
|
|
14
14
|
* `bg-credit` fill — that renders red-on-red and is invisible.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* `gap-1` is load-bearing, not decoration: a badge holding a label AND an
|
|
18
|
+
* element child (`ID<code>ctx-123</code>`) has nothing between them otherwise —
|
|
19
|
+
* JSX drops the newline-only text node and CSS drops the whitespace-only
|
|
20
|
+
* anonymous flex item — so the screen reads `IDctx-123`. Consumers were pasting
|
|
21
|
+
* `className="gap-1"` per call site; `cn` runs tailwind-merge, so an explicit
|
|
22
|
+
* `gap-2` still wins. Single-child badges are unaffected: gap needs two items.
|
|
23
|
+
*/
|
|
24
|
+
const badgeVariants = (0, class_variance_authority_1.cva)('inline-flex items-center gap-1 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', {
|
|
17
25
|
variants: {
|
|
18
26
|
variant: {
|
|
19
27
|
default: 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
|
|
@@ -5,10 +5,10 @@ import { TooltipProviderProps } from '@radix-ui/react-tooltip';
|
|
|
5
5
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
6
6
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
|
7
7
|
declare const useFormField: () => {
|
|
8
|
-
invalid
|
|
9
|
-
isDirty
|
|
10
|
-
isTouched
|
|
11
|
-
isValidating
|
|
8
|
+
invalid?: boolean | undefined;
|
|
9
|
+
isDirty?: boolean | undefined;
|
|
10
|
+
isTouched?: boolean | undefined;
|
|
11
|
+
isValidating?: boolean | undefined;
|
|
12
12
|
error?: import("react-hook-form").FieldError;
|
|
13
13
|
id: string;
|
|
14
14
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAEL,eAAe,EACf,SAAS,EACT,WAAW,EAGZ,MAAM,iBAAiB,CAAA;AAKxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAS9D,QAAA,MAAM,IAAI,4MAAe,CAAA;AAazB,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,sBAMtC,CAAA;AAED,QAAA,MAAM,YAAY;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAEL,eAAe,EACf,SAAS,EACT,WAAW,EAGZ,MAAM,iBAAiB,CAAA;AAKxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAS9D,QAAA,MAAM,IAAI,4MAAe,CAAA;AAazB,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,sBAMtC,CAAA;AAED,QAAA,MAAM,YAAY;;;;;;;;;;;;CAyBjB,CAAA;AAWD,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,QAAA,MAAM,QAAQ;eAHD,OAAO;wCAanB,CAAA;AAGD,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,wBAAwB,CACzD,OAAO,cAAc,CAAC,IAAI,CAC3B,GAAG;IACF,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB,CAAA;AAED,QAAA,MAAM,SAAS;YAHL,KAAK,CAAC,SAAS;0CA2BvB,CAAA;AAGF,eAAO,MAAM,WAAW,GAAI,yBAAyB,oBAAoB,sBASxE,CAAA;AAED,QAAA,MAAM,WAAW;;gFAmBf,CAAA;AAGF,QAAA,MAAM,eAAe,yHAcnB,CAAA;AAGF,QAAA,MAAM,WAAW,yHAuBf,CAAA;AAGF,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,EACV,CAAA"}
|
|
@@ -53,11 +53,14 @@ exports.FormField = FormField;
|
|
|
53
53
|
const useFormField = () => {
|
|
54
54
|
const fieldContext = React.useContext(FormFieldContext);
|
|
55
55
|
const itemContext = React.useContext(FormItemContext);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
// `useFormContext()` is null outside a `<Form>` provider, and destructuring it
|
|
57
|
+
// threw — which is what made every Form primitive, and so every *Field built
|
|
58
|
+
// on them, unusable in a plain `useState` filter bar. Inside a provider
|
|
59
|
+
// nothing below changes; outside one, the field simply has no error state.
|
|
60
|
+
const form = (0, react_hook_form_1.useFormContext)();
|
|
61
|
+
const fieldState = form && fieldContext.name
|
|
62
|
+
? form.getFieldState(fieldContext.name, form.formState)
|
|
63
|
+
: undefined;
|
|
61
64
|
const { id, required } = itemContext;
|
|
62
65
|
return {
|
|
63
66
|
id,
|
|
@@ -105,7 +108,10 @@ const FormMessage = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
105
108
|
if (!body) {
|
|
106
109
|
return null;
|
|
107
110
|
}
|
|
108
|
-
return ((0, jsx_runtime_1.jsx)("p", { ref: ref, id: formMessageId,
|
|
111
|
+
return ((0, jsx_runtime_1.jsx)("p", { ref: ref, id: formMessageId,
|
|
112
|
+
// The error TEXT token, not `text-destructive`: that is the badge/fill
|
|
113
|
+
// family and measures ~3.8:1 as ink, under AA. Validation copy is text.
|
|
114
|
+
className: (0, utils_1.cn)('text-system-error-h1a text-sm font-medium', className), ...props, children: body }));
|
|
109
115
|
});
|
|
110
116
|
exports.FormMessage = FormMessage;
|
|
111
117
|
FormMessage.displayName = 'FormMessage';
|
|
@@ -58,14 +58,22 @@ export declare const MultipleSelectItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
58
58
|
keywords?: string[];
|
|
59
59
|
forceMount?: boolean;
|
|
60
60
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
-
|
|
61
|
+
/**
|
|
62
|
+
* cmdk's own `value`/`defaultValue`/`onValueChange` are single-string search
|
|
63
|
+
* state. Spreading them and re-declaring the multi-select versions produced an
|
|
64
|
+
* INTERSECTION (`string & string[]`, and a handler taking both `string` and
|
|
65
|
+
* `string[]`), which no caller can satisfy — the controlled shape this
|
|
66
|
+
* component exists for was uncallable. They are omitted before the multi-value
|
|
67
|
+
* versions are declared; the component consumes cmdk's search state itself.
|
|
68
|
+
*/
|
|
69
|
+
export type MultipleSelectProps = Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive>, 'value' | 'defaultValue' | 'onValueChange'> & {
|
|
62
70
|
value?: string[] | [];
|
|
63
71
|
defaultValue?: string[] | [];
|
|
64
72
|
onValueChange?: (values: string[]) => void;
|
|
65
73
|
showValue?: boolean;
|
|
66
74
|
disabled?: boolean;
|
|
67
75
|
};
|
|
68
|
-
export declare const MultipleSelect: React.ForwardRefExoticComponent<Omit<{
|
|
76
|
+
export declare const MultipleSelect: React.ForwardRefExoticComponent<Omit<Omit<{
|
|
69
77
|
children?: React.ReactNode;
|
|
70
78
|
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
71
79
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -81,7 +89,7 @@ export declare const MultipleSelect: React.ForwardRefExoticComponent<Omit<{
|
|
|
81
89
|
loop?: boolean;
|
|
82
90
|
disablePointerSelection?: boolean;
|
|
83
91
|
vimBindings?: boolean;
|
|
84
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
92
|
+
} & React.RefAttributes<HTMLDivElement>, "ref">, "value" | "defaultValue" | "onValueChange"> & {
|
|
85
93
|
value?: string[] | [];
|
|
86
94
|
defaultValue?: string[] | [];
|
|
87
95
|
onValueChange?: (values: string[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/multiple-select/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAmB,MAAM,MAAM,CAAA;AAgDnE,eAAO,MAAM,qBAAqB;;;eAG0B,OAAO;wCAyFjE,CAAA;AAGF,eAAO,MAAM,mBAAmB;;;;;;;0FAiD9B,CAAA;AAGF,eAAO,MAAM,mBAAmB;;;;;;uJAiB9B,CAAA;AAGF,MAAM,MAAM,0BAA0B,GAAG,KAAK,CAAC,wBAAwB,CACrE,OAAO,gBAAgB,CAAC,IAAI,CAC7B,GAAG;IACF,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;eAHrB,QAAQ,GAAG,QAAQ;wCA+D/B,CAAA;AAGD,eAAO,MAAM,mBAAmB;;;;;;;;;;sFAY9B,CAAA;AAGF,eAAO,MA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M,cAAc;;;;;;;;;;;;;;;;;YAPjB,MAAM,EAAE,GAAG,EAAE;mBACN,MAAM,EAAE,GAAG,EAAE;oBACZ,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI;gBAC9B,OAAO;eACR,OAAO;wCA2HnB,CAAA"}
|
|
@@ -2,6 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
3
|
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
|
|
5
|
+
/**
|
|
6
|
+
* Radix strips `className` and `style` off its `Select.Value` before rendering
|
|
7
|
+
* the span, so this slot cannot be styled directly — it is styled from the
|
|
8
|
+
* trigger instead, see VALUE_OVERFLOW_CLASS.
|
|
9
|
+
*/
|
|
5
10
|
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
|
|
6
11
|
type SelectTriggerProps = React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
7
12
|
readOnly?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/select/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAKzD,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAEnD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAEpD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO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AAC,EACrB,SAAS,EACT,QAAQ,EACR,QAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,qBA0CtD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,qBAQvC;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAQpD;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAgBnD;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,qBAQxD;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACvB,CAAA"}
|
|
@@ -56,11 +56,34 @@ function Select({ ...props }) {
|
|
|
56
56
|
function SelectGroup({ ...props }) {
|
|
57
57
|
return (0, jsx_runtime_1.jsx)(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Radix strips `className` and `style` off its `Select.Value` before rendering
|
|
61
|
+
* the span, so this slot cannot be styled directly — it is styled from the
|
|
62
|
+
* trigger instead, see VALUE_OVERFLOW_CLASS.
|
|
63
|
+
*/
|
|
59
64
|
function SelectValue({ ...props }) {
|
|
60
65
|
return (0, jsx_runtime_1.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
61
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Truncate the selected value instead of letting it wrap out of the trigger.
|
|
69
|
+
*
|
|
70
|
+
* `.select-trigger` is a fixed-height `flex w-full items-center justify-between`
|
|
71
|
+
* box, and a flex item never shrinks below its own min-content width: a long
|
|
72
|
+
* value broke to a second line and overflowed the box. `min-w-0` lets the value
|
|
73
|
+
* slot shrink, `truncate` ellipsises what no longer fits — the chevron keeps its
|
|
74
|
+
* place because the value absorbs all the shrinkage.
|
|
75
|
+
*
|
|
76
|
+
* Written as a child-scoped variant on the TRIGGER because Radix strips
|
|
77
|
+
* `className` off `Select.Value` itself; the `>` combinator holds because Radix
|
|
78
|
+
* renders that span as the trigger's direct child.
|
|
79
|
+
*
|
|
80
|
+
* Truncation hides text, so a trigger showing a long value should also carry
|
|
81
|
+
* `title` — on the trigger, never on the value slot, which Radix renders
|
|
82
|
+
* `pointer-events: none`.
|
|
83
|
+
*/
|
|
84
|
+
const VALUE_OVERFLOW_CLASS = '[&>[data-slot=select-value]]:min-w-0 [&>[data-slot=select-value]]:truncate';
|
|
62
85
|
function SelectTrigger({ className, readOnly, children, ...props }) {
|
|
63
|
-
return ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": "default", className: (0, utils_1.cn)('select-trigger select-read-only select-disabled', className), "aria-readonly": readOnly, "data-read-only": readOnly ? '' : undefined, ...props, children: [children, !readOnly && ((0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "select-chevron" }) }))] }));
|
|
86
|
+
return ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": "default", className: (0, utils_1.cn)('select-trigger select-read-only select-disabled', VALUE_OVERFLOW_CLASS, className), "aria-readonly": readOnly, "data-read-only": readOnly ? '' : undefined, ...props, children: [children, !readOnly && ((0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "select-chevron" }) }))] }));
|
|
64
87
|
}
|
|
65
88
|
function SelectScrollUpButton({ className, ...props }) {
|
|
66
89
|
return ((0, jsx_runtime_1.jsx)(SelectPrimitive.ScrollUpButton, { "data-slot": "select-scroll-up-button", className: (0, utils_1.cn)('select-scroll-button', className), ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { className: "size-4" }) }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Blotter + BlotterRow — the
|
|
2
|
+
* Blotter + BlotterRow — the key/value readout of the console.
|
|
3
3
|
*
|
|
4
4
|
* Clean key/value rows separated by hairline borders (`divide-y divide-border`)
|
|
5
|
-
* — no zebra fills. Each row:
|
|
5
|
+
* — no zebra fills. Each row: a quiet sentence-case sans label on the left, a mono
|
|
6
6
|
* `tabular-nums` value on the right, `hover:bg-body-surface` as the quiet row
|
|
7
7
|
* affordance (the recessed page surface, one step behind `bg-card`, in both
|
|
8
8
|
* themes). Escalate the value color (`text-credit`, `text-system-alert`) only
|
|
@@ -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;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,+
|
|
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,+BAkHnB"}
|
|
@@ -110,6 +110,6 @@ function AgingBuckets({ buckets, currency, locale, showTotal = false, labels, he
|
|
|
110
110
|
: BAND[band].tint;
|
|
111
111
|
// Shallow merge: an unlisted band keeps its pt-BR default.
|
|
112
112
|
const bandWord = labels?.bands?.[band] ?? word;
|
|
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
|
|
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'), 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 text-xs'), 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 text-xs'), children: totalLabel })] })] }, `${bucket.label}-${i}`));
|
|
114
114
|
}) }), showTotal ? ((0, jsx_runtime_1.jsxs)("div", { className: "border-border flex items-center gap-3 border-t-2 pt-2.5", children: [(0, jsx_runtime_1.jsx)("span", { "aria-hidden": true, className: "size-4 shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, 'text-foreground min-w-0 flex-1'), children: grandTotalLabel }), (0, jsx_runtime_1.jsx)("span", { className: "w-32 shrink-0 text-right sm:w-40", children: grandTotal === null ? ((0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: "text-muted-foreground", children: format_1.NO_VALUE })) : ((0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: "text-foreground font-semibold", children: (0, jsx_runtime_1.jsx)(money_text_1.MoneyText, { amount: grandTotal, currency: currency, fractionDigits: scale, locale: locale, signColor: false }) })) })] })) : null] }));
|
|
115
115
|
}
|
|
@@ -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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AAE,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,+BA6EvB"}
|
|
@@ -213,5 +213,5 @@ function DelinquencyAging({ buckets, currency, locale, rateLabel = 'Inadimplênc
|
|
|
213
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", {
|
|
214
214
|
// A distressed rate is a credit alarm: announced the moment it
|
|
215
215
|
// crosses the band, so assistive tech does not lean on the tint.
|
|
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:
|
|
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: typography_1.LABEL_VOICE_CLASS, 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 })] }));
|
|
217
217
|
}
|