@lerianstudio/sindarian-ui 1.3.0 → 1.4.0-beta.2
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/README.md +93 -12
- package/dist/components/card/account-card/index.d.ts.map +1 -1
- package/dist/components/card/account-card/index.js +2 -2
- package/dist/components/card/entity-card/index.d.ts.map +1 -1
- package/dist/components/card/entity-card/index.js +5 -1
- package/dist/components/dialog/confirmation-dialog/index.d.ts +10 -2
- package/dist/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
- package/dist/components/dialog/confirmation-dialog/index.js +72 -7
- package/dist/components/page-header/index.d.ts +14 -2
- package/dist/components/page-header/index.d.ts.map +1 -1
- package/dist/components/page-header/index.js +4 -4
- package/dist/components/ui/accordion/index.js +1 -1
- package/dist/components/ui/alert/index.d.ts +1 -1
- package/dist/components/ui/alert/styles.css +3 -3
- package/dist/components/ui/alert-dialog/index.d.ts +8 -2
- package/dist/components/ui/alert-dialog/index.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog/index.js +4 -4
- package/dist/components/ui/autocomplete/index.d.ts +1 -1
- package/dist/components/ui/autocomplete/index.d.ts.map +1 -1
- package/dist/components/ui/autocomplete/index.js +42 -6
- package/dist/components/ui/badge/index.d.ts +10 -2
- package/dist/components/ui/badge/index.d.ts.map +1 -1
- package/dist/components/ui/badge/index.js +24 -4
- package/dist/components/ui/breadcrumb/styles.css +1 -1
- package/dist/components/ui/button/index.d.ts +2 -2
- package/dist/components/ui/button/index.d.ts.map +1 -1
- package/dist/components/ui/button/index.js +2 -1
- package/dist/components/ui/button/styles.css +17 -4
- package/dist/components/ui/card/index.d.ts +10 -2
- package/dist/components/ui/card/index.d.ts.map +1 -1
- package/dist/components/ui/card/index.js +2 -2
- package/dist/components/ui/command/index.js +1 -1
- package/dist/components/ui/dialog/styles.css +3 -3
- package/dist/components/ui/dropdown-menu/index.js +2 -2
- package/dist/components/ui/hover-card/index.js +1 -1
- package/dist/components/ui/input/adornment.d.ts +1 -1
- package/dist/components/ui/loading-button/index.js +1 -1
- package/dist/components/ui/multiple-select/index.js +1 -1
- package/dist/components/ui/otp-input/index.js +1 -1
- package/dist/components/ui/paper-collapsible/index.js +1 -1
- package/dist/components/ui/popover/index.js +1 -1
- package/dist/components/ui/select/styles.css +1 -1
- package/dist/components/ui/sheet/index.d.ts +1 -1
- package/dist/components/ui/sheet/index.js +2 -2
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts +5 -0
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-expand-button.js +1 -1
- package/dist/components/ui/sidebar/sidebar-item-collapsible.js +1 -1
- package/dist/components/ui/skeleton/index.js +1 -1
- package/dist/components/ui/toast/toaster.d.ts +5 -0
- package/dist/components/ui/toast/toaster.d.ts.map +1 -1
- package/dist/components/ui/toast/toaster.js +6 -2
- package/dist/components/ui/tooltip/index.js +1 -1
- package/dist/domain/blotter/index.d.ts +7 -1
- package/dist/domain/blotter/index.d.ts.map +1 -1
- package/dist/domain/blotter/index.js +7 -3
- package/dist/domain/delinquency-aging/aging-buckets.d.ts +4 -1
- package/dist/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
- package/dist/domain/delinquency-aging/aging-buckets.js +7 -2
- package/dist/domain/delinquency-aging/index.d.ts +11 -1
- package/dist/domain/delinquency-aging/index.d.ts.map +1 -1
- package/dist/domain/delinquency-aging/index.js +7 -3
- package/dist/domain/figure/index.d.ts +13 -6
- package/dist/domain/figure/index.d.ts.map +1 -1
- package/dist/domain/figure/index.js +1 -0
- package/dist/domain/section-label/index.d.ts +7 -1
- package/dist/domain/section-label/index.d.ts.map +1 -1
- package/dist/domain/section-label/index.js +6 -2
- package/dist/enterprise/app-shell/index.d.ts +14 -0
- package/dist/enterprise/app-shell/index.d.ts.map +1 -1
- package/dist/enterprise/app-shell/index.js +2 -2
- package/dist/enterprise/data-table/index.d.ts +13 -1
- package/dist/enterprise/data-table/index.d.ts.map +1 -1
- package/dist/enterprise/data-table/index.js +7 -3
- package/dist/enterprise/search-input/index.d.ts +7 -1
- package/dist/enterprise/search-input/index.d.ts.map +1 -1
- package/dist/enterprise/search-input/index.js +2 -2
- package/dist/esm/components/card/account-card/index.d.ts.map +1 -1
- package/dist/esm/components/card/account-card/index.js +2 -2
- package/dist/esm/components/card/entity-card/index.d.ts.map +1 -1
- package/dist/esm/components/card/entity-card/index.js +5 -1
- package/dist/esm/components/dialog/confirmation-dialog/index.d.ts +10 -2
- package/dist/esm/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/dialog/confirmation-dialog/index.js +39 -7
- package/dist/esm/components/page-header/index.d.ts +14 -2
- package/dist/esm/components/page-header/index.d.ts.map +1 -1
- package/dist/esm/components/page-header/index.js +4 -4
- package/dist/esm/components/ui/accordion/index.js +1 -1
- package/dist/esm/components/ui/alert/index.d.ts +1 -1
- package/dist/esm/components/ui/alert-dialog/index.d.ts +8 -2
- package/dist/esm/components/ui/alert-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/ui/alert-dialog/index.js +4 -4
- package/dist/esm/components/ui/autocomplete/index.d.ts +1 -1
- package/dist/esm/components/ui/autocomplete/index.d.ts.map +1 -1
- package/dist/esm/components/ui/autocomplete/index.js +42 -6
- package/dist/esm/components/ui/badge/index.d.ts +10 -2
- package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
- package/dist/esm/components/ui/badge/index.js +24 -4
- package/dist/esm/components/ui/button/index.d.ts +2 -2
- package/dist/esm/components/ui/button/index.d.ts.map +1 -1
- package/dist/esm/components/ui/button/index.js +2 -1
- package/dist/esm/components/ui/card/index.d.ts +10 -2
- package/dist/esm/components/ui/card/index.d.ts.map +1 -1
- package/dist/esm/components/ui/card/index.js +2 -2
- package/dist/esm/components/ui/command/index.js +1 -1
- package/dist/esm/components/ui/dropdown-menu/index.js +2 -2
- package/dist/esm/components/ui/hover-card/index.js +1 -1
- package/dist/esm/components/ui/input/adornment.d.ts +1 -1
- package/dist/esm/components/ui/loading-button/index.js +1 -1
- package/dist/esm/components/ui/multiple-select/index.js +1 -1
- package/dist/esm/components/ui/otp-input/index.js +1 -1
- package/dist/esm/components/ui/paper-collapsible/index.js +1 -1
- package/dist/esm/components/ui/popover/index.js +1 -1
- package/dist/esm/components/ui/sheet/index.d.ts +1 -1
- package/dist/esm/components/ui/sheet/index.js +2 -2
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts +5 -0
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-item-collapsible.js +1 -1
- package/dist/esm/components/ui/skeleton/index.js +1 -1
- package/dist/esm/components/ui/toast/toaster.d.ts +5 -0
- package/dist/esm/components/ui/toast/toaster.d.ts.map +1 -1
- package/dist/esm/components/ui/toast/toaster.js +6 -2
- package/dist/esm/components/ui/tooltip/index.js +1 -1
- package/dist/esm/domain/blotter/index.d.ts +7 -1
- package/dist/esm/domain/blotter/index.d.ts.map +1 -1
- package/dist/esm/domain/blotter/index.js +7 -3
- package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts +4 -1
- package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
- package/dist/esm/domain/delinquency-aging/aging-buckets.js +7 -2
- package/dist/esm/domain/delinquency-aging/index.d.ts +11 -1
- package/dist/esm/domain/delinquency-aging/index.d.ts.map +1 -1
- package/dist/esm/domain/delinquency-aging/index.js +7 -3
- package/dist/esm/domain/figure/index.d.ts +13 -6
- package/dist/esm/domain/figure/index.d.ts.map +1 -1
- package/dist/esm/domain/figure/index.js +1 -0
- package/dist/esm/domain/section-label/index.d.ts +7 -1
- package/dist/esm/domain/section-label/index.d.ts.map +1 -1
- package/dist/esm/domain/section-label/index.js +6 -2
- package/dist/esm/enterprise/app-shell/index.d.ts +14 -0
- package/dist/esm/enterprise/app-shell/index.d.ts.map +1 -1
- package/dist/esm/enterprise/app-shell/index.js +2 -2
- package/dist/esm/enterprise/data-table/index.d.ts +13 -1
- package/dist/esm/enterprise/data-table/index.d.ts.map +1 -1
- package/dist/esm/enterprise/data-table/index.js +8 -4
- package/dist/esm/enterprise/search-input/index.d.ts +7 -1
- package/dist/esm/enterprise/search-input/index.d.ts.map +1 -1
- package/dist/esm/enterprise/search-input/index.js +2 -2
- package/dist/esm/lib/utils.d.ts.map +1 -1
- package/dist/esm/lib/utils.js +27 -1
- package/dist/esm/theme/theme-provider.d.ts +8 -0
- package/dist/esm/theme/theme-provider.d.ts.map +1 -1
- package/dist/esm/theme/theme-provider.js +10 -0
- package/dist/globals.css +85 -58
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +27 -1
- package/dist/theme/theme-provider.d.ts +8 -0
- package/dist/theme/theme-provider.d.ts.map +1 -1
- package/dist/theme/theme-provider.js +11 -0
- package/package.json +1 -1
|
@@ -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,CAA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
warn: { Icon: lucide_react_1.TriangleAlert, tint: 'text-system-alert', word: 'Elevada' },
|
|
189
189
|
breach: { Icon: lucide_react_1.AlertOctagon, tint: 'text-credit', word: 'Em estresse' }
|
|
190
190
|
};
|
|
191
|
-
function DelinquencyAging({ buckets, currency, locale, rateLabel = 'Inadimplência', rateBandLabels, emptyLabel = 'sem carteira', indeterminateLabel = 'indeterminada', bucketLabels, warn = 0.05, breach = 0.1, showTotal = false, className }) {
|
|
191
|
+
function DelinquencyAging({ buckets, currency, locale, rateLabel = 'Inadimplência', rateBandLabels, emptyLabel = 'sem carteira', indeterminateLabel = 'indeterminada', bucketLabels, warn = 0.05, breach = 0.1, showTotal = false, healthyTone = 'success', className }) {
|
|
192
192
|
// THIRD RAIL: the rate scale and the two totals come from money-math, never
|
|
193
193
|
// float. The division below is of two exact BigInt-derived integers.
|
|
194
194
|
const scale = currency ? (0, money_math_1.minorDigitsOf)(currency) : 2;
|
|
@@ -202,12 +202,16 @@ function DelinquencyAging({ buckets, currency, locale, rateLabel = 'Inadimplênc
|
|
|
202
202
|
const band = hasRate && overdueMinor !== null && totalMinor !== null
|
|
203
203
|
? exactBand(overdueMinor, totalMinor, warn, breach)
|
|
204
204
|
: 'low';
|
|
205
|
-
const { Icon,
|
|
205
|
+
const { Icon, word } = RATE_BAND[band];
|
|
206
|
+
// `ink` retones ONLY the healthy band; `warn`/`breach` keep their alarm tints.
|
|
207
|
+
const tint = healthyTone === 'ink' && band === 'low'
|
|
208
|
+
? 'text-foreground'
|
|
209
|
+
: RATE_BAND[band].tint;
|
|
206
210
|
// Shallow merge: an unlisted band keeps its pt-BR default.
|
|
207
211
|
const bandWord = rateBandLabels?.[band] ?? word;
|
|
208
212
|
const distressed = band === 'breach';
|
|
209
213
|
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)('flex flex-col gap-4', className), children: [(0, jsx_runtime_1.jsxs)("header", { className: "flex items-baseline justify-between gap-3", children: [(0, jsx_runtime_1.jsx)(section_label_1.SectionLabel, { as: "span", children: rateLabel }), hasRate ? ((0, jsx_runtime_1.jsxs)("span", {
|
|
210
214
|
// A distressed rate is a credit alarm: announced the moment it
|
|
211
215
|
// crosses the band, so assistive tech does not lean on the tint.
|
|
212
|
-
role: distressed ? 'alert' : undefined, className: (0, utils_1.cn)('inline-flex items-center gap-1.5', tint), children: [(0, jsx_runtime_1.jsx)(Icon, { "aria-hidden": true, className: "size-4 shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { className: "sr-only", children: [bandWord, ": "] }), (0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: tint, children: (0, format_1.formatPercent)(rate, { unit: 'ratio', locale }) })] })) : ((0, jsx_runtime_1.jsxs)("span", { className: "text-muted-foreground inline-flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, 'tracking-normal normal-case'), children: indeterminate ? indeterminateLabel : emptyLabel }), (0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: "text-muted-foreground", children: format_1.NO_VALUE })] }))] }), (0, jsx_runtime_1.jsx)(aging_buckets_1.AgingBuckets, { buckets: buckets, currency: currency, locale: locale, showTotal: showTotal, labels: bucketLabels })] }));
|
|
216
|
+
role: distressed ? 'alert' : undefined, className: (0, utils_1.cn)('inline-flex items-center gap-1.5', tint), children: [(0, jsx_runtime_1.jsx)(Icon, { "aria-hidden": true, className: "size-4 shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { className: "sr-only", children: [bandWord, ": "] }), (0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: tint, children: (0, format_1.formatPercent)(rate, { unit: 'ratio', locale }) })] })) : ((0, jsx_runtime_1.jsxs)("span", { className: "text-muted-foreground inline-flex items-center gap-1.5", children: [(0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, 'tracking-normal normal-case'), children: indeterminate ? indeterminateLabel : emptyLabel }), (0, jsx_runtime_1.jsx)(figure_1.Figure, { size: "row", className: "text-muted-foreground", children: format_1.NO_VALUE })] }))] }), (0, jsx_runtime_1.jsx)(aging_buckets_1.AgingBuckets, { buckets: buckets, currency: currency, locale: locale, showTotal: showTotal, labels: bucketLabels, healthyTone: healthyTone })] }));
|
|
213
217
|
}
|
|
@@ -8,14 +8,21 @@
|
|
|
8
8
|
* `FIGURE_CLASS` constants when composing className strings inline.
|
|
9
9
|
*
|
|
10
10
|
* Scale:
|
|
11
|
-
* - hero
|
|
12
|
-
* -
|
|
13
|
-
* -
|
|
14
|
-
* -
|
|
15
|
-
* -
|
|
11
|
+
* - hero : the dominant in-bar figure — text-4xl/5xl, semibold, tracking-tight
|
|
12
|
+
* - money-hero : hero-role MONEY figure — text-2xl/3xl, semibold, tracking-tight
|
|
13
|
+
* - panel : compliance / exposure — text-3xl, semibold, tracking-tight
|
|
14
|
+
* - count : ledger count — text-2xl, semibold, tracking-tight
|
|
15
|
+
* - row : inline / row figure — text-sm
|
|
16
|
+
* - tick : ruler / micro figure — text-[10px], leading-none
|
|
17
|
+
*
|
|
18
|
+
* `money-hero` is `hero`'s role at one step down the scale: a formatted BRL
|
|
19
|
+
* amount runs ~13 characters, which clips a three-column panel at 4xl/5xl, so
|
|
20
|
+
* consoles were hand-rolling `text-2xl lg:text-3xl` at the call site and losing
|
|
21
|
+
* the mono/tabular/weight invariants along the way. Same responsive shape as
|
|
22
|
+
* `hero`, same weight and tracking — only the two size steps differ.
|
|
16
23
|
*/
|
|
17
24
|
import type { ElementType, ReactNode } from 'react';
|
|
18
|
-
export type FigureSize = 'hero' | 'panel' | 'count' | 'row' | 'tick';
|
|
25
|
+
export type FigureSize = 'hero' | 'money-hero' | 'panel' | 'count' | 'row' | 'tick';
|
|
19
26
|
/** Canonical class strings per figure size. The `tabular-nums` and `font-mono`
|
|
20
27
|
* invariants live here so they can never be forgotten at a call site. */
|
|
21
28
|
export declare const FIGURE_CLASS: Record<FigureSize, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/figure/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/figure/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAInD,MAAM,MAAM,UAAU,GACpB,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;AAE5D;0EAC0E;AAC1E,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAQnD,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,UAAU,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,EAAE,CAAC,EAAE,WAAW,CAAA;CACjB,CAAA;AAED,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,EAAE,EAAE,GAAY,EACjB,EAAE,WAAW,+BAEb"}
|
|
@@ -8,6 +8,7 @@ const utils_1 = require("../../lib/utils");
|
|
|
8
8
|
* invariants live here so they can never be forgotten at a call site. */
|
|
9
9
|
exports.FIGURE_CLASS = {
|
|
10
10
|
hero: 'font-mono text-4xl font-semibold tracking-tight tabular-nums lg:text-5xl',
|
|
11
|
+
'money-hero': 'font-mono text-2xl font-semibold tracking-tight tabular-nums lg:text-3xl',
|
|
11
12
|
panel: 'font-mono text-3xl font-semibold tracking-tight tabular-nums',
|
|
12
13
|
count: 'font-mono text-2xl font-semibold tracking-tight tabular-nums',
|
|
13
14
|
row: 'font-mono text-sm tabular-nums',
|
|
@@ -16,6 +16,12 @@ export type SectionLabelProps = {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
/** Render element. Defaults to `h2` (the ledger-sheet cell heading). */
|
|
18
18
|
as?: ElementType;
|
|
19
|
+
/**
|
|
20
|
+
* Rule the label as an entry-section head (hairline double border, `pb-2`)
|
|
21
|
+
* and stamp `data-variant="ruled"`. Mirrors `EmptyState.ruled`. Default off,
|
|
22
|
+
* so an unruled label renders exactly as before.
|
|
23
|
+
*/
|
|
24
|
+
ruled?: boolean;
|
|
19
25
|
} & Omit<HTMLAttributes<HTMLElement>, 'children' | 'className'>;
|
|
20
|
-
export declare function SectionLabel({ children, className, as: Tag, ...rest }: SectionLabelProps): import("react").JSX.Element;
|
|
26
|
+
export declare function SectionLabel({ children, className, as: Tag, ruled, ...rest }: SectionLabelProps): import("react").JSX.Element;
|
|
21
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/section-label/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/section-label/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUnE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,GAAG,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,CAAA;AAE/D,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,EAAE,EAAE,GAAU,EACd,KAAa,EACb,GAAG,IAAI,EACR,EAAE,iBAAiB,+BAcnB"}
|
|
@@ -4,10 +4,14 @@ exports.SectionLabel = SectionLabel;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const typography_1 = require("../../lib/typography");
|
|
6
6
|
const utils_1 = require("../../lib/utils");
|
|
7
|
-
|
|
7
|
+
/** The entry-section head treatment: a hairline double rule under the label.
|
|
8
|
+
* `border-border`, NOT the register head's ink — this is the quieter of the two
|
|
9
|
+
* head rules. Pinned here because ~20 call sites were restating it. */
|
|
10
|
+
const RULED_CLASS = 'border-b-[3px] border-double border-border pb-2';
|
|
11
|
+
function SectionLabel({ children, className, as: Tag = 'h2', ruled = false, ...rest }) {
|
|
8
12
|
// The remaining element props reach the rendered tag, so a panel can point
|
|
9
13
|
// `aria-labelledby` at this heading via `id`, and tests can hang a `data-*`
|
|
10
14
|
// hook off it. Without the spread there was no way to reference the heading
|
|
11
15
|
// from its own container.
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(Tag, { className: (0, utils_1.cn)(typography_1.SECTION_LABEL_CLASS, className),
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(Tag, { ...rest, "data-variant": ruled ? 'ruled' : undefined, className: (0, utils_1.cn)(typography_1.SECTION_LABEL_CLASS, ruled && RULED_CLASS, className), children: children }));
|
|
13
17
|
}
|
|
@@ -46,6 +46,20 @@ export type AppShellProps = {
|
|
|
46
46
|
* inside <main> and are correctly page content, not a top-level landmark.
|
|
47
47
|
*/
|
|
48
48
|
header?: React.ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Accessible name for the <header> banner landmark, rendered as its
|
|
51
|
+
* `aria-label`. Omit it and the attribute is absent — the single banner is
|
|
52
|
+
* unambiguous on its own, so a name buys nothing and an unlocalized one costs
|
|
53
|
+
* clarity.
|
|
54
|
+
*
|
|
55
|
+
* Name it when the page carries MORE than one banner-role region (the shell's
|
|
56
|
+
* banner plus, say, an embedded app frame), because a screen-reader landmark
|
|
57
|
+
* list then shows two entries called "banner" with nothing to tell them
|
|
58
|
+
* apart. Also name it when an audit rule demands every landmark be named
|
|
59
|
+
* (`landmark-unique` / a house i18n-strict policy). Pass an ALREADY-TRANSLATED
|
|
60
|
+
* string — the shell does no i18n.
|
|
61
|
+
*/
|
|
62
|
+
headerLabel?: string;
|
|
49
63
|
children: React.ReactNode;
|
|
50
64
|
className?: string;
|
|
51
65
|
contentClassName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/app-shell/index.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/app-shell/index.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,QAAQ,mFAoEpB,CAAA"}
|
|
@@ -72,14 +72,14 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
72
72
|
const React = __importStar(require("react"));
|
|
73
73
|
const sidebar_1 = require("../../components/ui/sidebar");
|
|
74
74
|
const utils_1 = require("../../lib/utils");
|
|
75
|
-
exports.AppShell = React.forwardRef(function AppShell({ sidebar, header, children, className, contentClassName, skipToContentLabel }, ref) {
|
|
75
|
+
exports.AppShell = React.forwardRef(function AppShell({ sidebar, header, headerLabel, children, className, contentClassName, skipToContentLabel }, ref) {
|
|
76
76
|
// The content <main> id — wires the skip link to its target and gives the
|
|
77
77
|
// <main> a stable, focusable anchor. Internal: no consumer-facing id prop.
|
|
78
78
|
const mainId = React.useId();
|
|
79
79
|
// sindarian-ui's SidebarProvider is context-only (it renders no DOM and
|
|
80
80
|
// takes no className), so the shell owns the flex row itself and `className`
|
|
81
81
|
// lands on it — the same element the legacy provider's className reached.
|
|
82
|
-
return ((0, jsx_runtime_1.jsx)(sidebar_1.SidebarProvider, { children: (0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)('flex h-svh w-full overflow-hidden', className), children: [skipToContentLabel ? ((0, jsx_runtime_1.jsx)("a", { href: `#${mainId}`, className: "focus:bg-background focus:text-foreground sr-only focus:not-sr-only focus:absolute focus:z-50 focus:m-2 focus:rounded focus:px-3 focus:py-2 focus:shadow", children: skipToContentLabel })) : null, sidebar, (0, jsx_runtime_1.jsxs)("div", { "data-slot": "sidebar-inset", className: "bg-background relative flex w-full min-w-0 flex-1 flex-col", children: [header ? ((0, jsx_runtime_1.jsx)("header", { className: "border-border bg-background sticky top-0 z-10 flex items-center gap-3 border-b px-6 py-3", children: header })) : null, (0, jsx_runtime_1.jsx)("main", { id: mainId, ref: ref, tabIndex: -1,
|
|
82
|
+
return ((0, jsx_runtime_1.jsx)(sidebar_1.SidebarProvider, { children: (0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)('flex h-svh w-full overflow-hidden', className), children: [skipToContentLabel ? ((0, jsx_runtime_1.jsx)("a", { href: `#${mainId}`, className: "focus:bg-background focus:text-foreground sr-only focus:not-sr-only focus:absolute focus:z-50 focus:m-2 focus:rounded focus:px-3 focus:py-2 focus:shadow", children: skipToContentLabel })) : null, sidebar, (0, jsx_runtime_1.jsxs)("div", { "data-slot": "sidebar-inset", className: "bg-background relative flex w-full min-w-0 flex-1 flex-col", children: [header ? ((0, jsx_runtime_1.jsx)("header", { "aria-label": headerLabel, className: "border-border bg-background sticky top-0 z-10 flex items-center gap-3 border-b px-6 py-3", children: header })) : null, (0, jsx_runtime_1.jsx)("main", { id: mainId, ref: ref, tabIndex: -1,
|
|
83
83
|
// min-h-0 lets this flex child shrink below its content height —
|
|
84
84
|
// without it `flex-1` keeps min-height:auto and nothing scrolls.
|
|
85
85
|
className: "min-h-0 flex-1 overflow-y-auto outline-none", children: (0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)('mx-auto w-full max-w-7xl px-6 py-8 lg:px-8', contentClassName), children: children }) })] })] }) }));
|
|
@@ -81,8 +81,20 @@ type DataTableBaseProps<TData> = {
|
|
|
81
81
|
*/
|
|
82
82
|
rowHref?: (row: TData) => string;
|
|
83
83
|
className?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Extra classes merged onto every header cell, after the kit label voice —
|
|
86
|
+
* so a caller can override the voice's size/tracking/color for one table
|
|
87
|
+
* without restating the cluster. Per-column alignment stays `meta.numeric`.
|
|
88
|
+
*/
|
|
89
|
+
headClassName?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Footed-total row(s) rendered inside the kit `TableFooter` after the body.
|
|
92
|
+
* The caller supplies the row markup (`<tr><td>…</td></tr>`) so the footer
|
|
93
|
+
* can span, align and format its own figures. Omitted → no `tfoot`.
|
|
94
|
+
*/
|
|
95
|
+
footer?: React.ReactNode;
|
|
84
96
|
};
|
|
85
97
|
export type DataTableProps<TData> = DataTableBaseProps<TData> & RowSelectionProps<TData>;
|
|
86
|
-
export declare function DataTable<TData>({ columns, data, loading, skeletonRows, loadingLabel, empty, getRowId, flush, density, enableRowSelection, rowSelection, onRowSelectionChange, getRowSelectionLabel, onRowActivate, rowHref, className }: DataTableProps<TData>): import("react").JSX.Element;
|
|
98
|
+
export declare function DataTable<TData>({ columns, data, loading, skeletonRows, loadingLabel, empty, getRowId, flush, density, enableRowSelection, rowSelection, onRowSelectionChange, getRowSelectionLabel, onRowActivate, rowHref, className, headClassName, footer }: DataTableProps<TData>): import("react").JSX.Element;
|
|
87
99
|
export {};
|
|
88
100
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/data-table/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/enterprise/data-table/index.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,UAAU,EAEf,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAA;AAc9B,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEjE;;;;GAIG;AACH,OAAO,QAAQ,uBAAuB,CAAC;IAIrC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAChD,OAAO,CAAC,EAAE,OAAO,CAAA;KAClB;CACF;AAED;;;;;;;;GAQG;AACH,KAAK,iBAAiB,CAAC,KAAK,IACxB;IACE,kBAAkB,CAAC,EAAE,KAAK,CAAA;IAC1B,YAAY,CAAC,EAAE,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,CAAA;AAED,MAAM,MAAM,cAAc,CAAC,KAAK,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAC3D,iBAAiB,CAAC,KAAK,CAAC,CAAA;AA4E1B,wBAAgB,SAAS,CAAC,KAAK,EAAE,EAC/B,OAAO,EACP,IAAI,EACJ,OAAe,EACf,YAAgB,EAChB,YAAmC,EACnC,KAAK,EACL,QAAQ,EACR,KAAa,EACb,OAAuB,EACvB,kBAA0B,EAC1B,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,OAAO,EACP,SAAS,EACT,aAAa,EACb,MAAM,EACP,EAAE,cAAc,CAAC,KAAK,CAAC,+BAiSvB"}
|
|
@@ -13,6 +13,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
13
13
|
* - empty → EmptyState (data resolved, zero rows)
|
|
14
14
|
* - data → semantic table rows; cells own any links/actions
|
|
15
15
|
*
|
|
16
|
+
* Column heads speak the kit's LABEL_VOICE_CLASS; `headClassName` overrides it
|
|
17
|
+
* per table. An optional `footer` node renders in a `tfoot` for footed totals.
|
|
18
|
+
*
|
|
16
19
|
* Columns are standard TanStack `ColumnDef<T>`; cells receive the row's
|
|
17
20
|
* `original` value, so screens compose money / date / status cells directly in
|
|
18
21
|
* their column `cell` renderers.
|
|
@@ -39,6 +42,7 @@ const react_1 = require("react");
|
|
|
39
42
|
const react_table_1 = require("@tanstack/react-table");
|
|
40
43
|
const table_1 = require("../../components/ui/table");
|
|
41
44
|
const skeleton_1 = require("../../components/ui/skeleton");
|
|
45
|
+
const typography_1 = require("../../lib/typography");
|
|
42
46
|
const utils_1 = require("../../lib/utils");
|
|
43
47
|
const empty_state_1 = require("../empty-state");
|
|
44
48
|
const SELECTION_COLUMN_ID = '__select__';
|
|
@@ -78,7 +82,7 @@ function createSelectionColumn(getLabel) {
|
|
|
78
82
|
cell: ({ row }) => (0, jsx_runtime_1.jsx)(RowSelectionCheckbox, { row: row, getLabel: getLabel })
|
|
79
83
|
};
|
|
80
84
|
}
|
|
81
|
-
function DataTable({ columns, data, loading = false, skeletonRows = 8, loadingLabel = 'Loading table rows', empty, getRowId, flush = false, density = 'comfortable', enableRowSelection = false, rowSelection, onRowSelectionChange, getRowSelectionLabel, onRowActivate, rowHref, className }) {
|
|
85
|
+
function DataTable({ columns, data, loading = false, skeletonRows = 8, loadingLabel = 'Loading table rows', empty, getRowId, flush = false, density = 'comfortable', enableRowSelection = false, rowSelection, onRowSelectionChange, getRowSelectionLabel, onRowActivate, rowHref, className, headClassName, footer }) {
|
|
82
86
|
const tableColumns = (0, react_1.useMemo)(() => enableRowSelection
|
|
83
87
|
? [createSelectionColumn(getRowSelectionLabel), ...columns]
|
|
84
88
|
: columns, [columns, enableRowSelection, getRowSelectionLabel]);
|
|
@@ -216,7 +220,7 @@ function DataTable({ columns, data, loading = false, skeletonRows = 8, loadingLa
|
|
|
216
220
|
? 'No rows'
|
|
217
221
|
: `${rowCount} rows` }), (0, jsx_runtime_1.jsxs)(table_1.Table, { "aria-busy": loading ? 'true' : undefined, children: [(0, jsx_runtime_1.jsx)(table_1.TableHeader, { children: table.getHeaderGroups().map((headerGroup) => ((0, jsx_runtime_1.jsx)(table_1.TableRow, { className: "hover:bg-transparent", children: headerGroup.headers.map((header) => {
|
|
218
222
|
const numeric = header.column.columnDef.meta?.numeric;
|
|
219
|
-
return ((0, jsx_runtime_1.jsx)(table_1.TableHead, { align: numeric ? 'right' : undefined, className: (0, utils_1.cn)(
|
|
223
|
+
return ((0, jsx_runtime_1.jsx)(table_1.TableHead, { align: numeric ? 'right' : undefined, className: (0, utils_1.cn)(typography_1.LABEL_VOICE_CLASS, headDensityClass, header.column.id === SELECTION_COLUMN_ID && 'w-10', headClassName), children: header.isPlaceholder
|
|
220
224
|
? null
|
|
221
225
|
: (0, react_table_1.flexRender)(header.column.columnDef.header, header.getContext()) }, header.id));
|
|
222
226
|
}) }, headerGroup.id))) }), (0, jsx_runtime_1.jsx)(table_1.TableBody, { children: loading ? (Array.from({ length: skeletonRows }).map((_, rowIndex) => ((0, jsx_runtime_1.jsx)(table_1.TableRow, { className: "hover:bg-transparent", children: Array.from({ length: colCount }).map((__, cellIndex) => ((0, jsx_runtime_1.jsx)(table_1.TableCell, { className: cellDensityClass, children: (0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { className: "h-4 w-full max-w-[160px]" }) }, `skeleton-${rowIndex}-${cellIndex}`))) }, `skeleton-${rowIndex}`)))) : rowCount === 0 ? ((0, jsx_runtime_1.jsx)(table_1.TableRow, { className: "hover:bg-transparent", children: (0, jsx_runtime_1.jsx)(table_1.TableCell, { colSpan: colCount, className: "p-0", children: (0, jsx_runtime_1.jsx)(empty_state_1.EmptyState, { title: empty?.title ?? 'Nothing here yet', description: empty?.description, icon: empty?.icon, action: empty?.action,
|
|
@@ -241,5 +245,5 @@ function DataTable({ columns, data, loading = false, skeletonRows = 8, loadingLa
|
|
|
241
245
|
? 'selected'
|
|
242
246
|
: undefined, children: row.getVisibleCells().map((cell) => ((0, jsx_runtime_1.jsx)(table_1.TableCell, { className: (0, utils_1.cn)(cell.column.columnDef.meta?.numeric && NUMERIC_CELL_CLASS, cellDensityClass, cell.column.id === SELECTION_COLUMN_ID && 'w-10'), onClick: cell.column.id === SELECTION_COLUMN_ID
|
|
243
247
|
? stopPropagation
|
|
244
|
-
: undefined, children: (0, react_table_1.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id)))) })] })] }));
|
|
248
|
+
: undefined, children: (0, react_table_1.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id)))) }), footer ? (0, jsx_runtime_1.jsx)(table_1.TableFooter, { children: footer }) : null] })] }));
|
|
245
249
|
}
|
|
@@ -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;
|
|
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/card/account-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAGzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAgB,WAAW,EAA0B,MAAM,cAAc,C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H,GAAG,KAAK,EACT,EAAE,2BAA2B,qBAe7B;AAED,MAAM,MAAM,mCAAmC,GAAG,KAAK,CAAC,cAAc,CACpE,OAAO,MAAM,CACd,GAAG;IACF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,SAAS,EAAE,UAAU,EACrB,OAAO,EACP,SAAS,EACT,YAA4B,EAC5B,cAA6B,EAC7B,YAAwB,EACxB,SAAS,EACT,QAAQ,EAAE,SAAS,EACnB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,mCAAmC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/account-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAGzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAgB,WAAW,EAA0B,MAAM,cAAc,CAAA;AAChF,OAAO,EACL,kBAAkB,EAEnB,MAAM,6BAA6B,CAAA;AAUpC,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,qBAc1C;AAED,wBAAgB,sBAAsB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAS1E;AAED,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED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S,EACT,YAA4B,EAC5B,cAA6B,EAC7B,YAAwB,EACxB,SAAS,EACT,QAAQ,EAAE,SAAS,EACnB,GAAG,EACH,GAAG,KAAK,EACT,EAAE,mCAAmC,qBAkCrC;AAED,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EAAE,SAAS,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,qBAeA"}
|
|
@@ -29,7 +29,7 @@ export function AccountBalanceCardDeleteButton({ className, ...props }) {
|
|
|
29
29
|
return (_jsx(IconButton, { variant: "outline", size: "small", rounded: true, "data-slot": "account-balance-card-delete-button", className: cn('absolute top-3 right-3', className), ...props, children: _jsx(Trash, { className: "text-muted-foreground h-4 w-4" }) }));
|
|
30
30
|
}
|
|
31
31
|
export function AccountBalanceCardContent({ className, ...props }) {
|
|
32
|
-
return (_jsx(CollapsibleContent, { "data-slot": "account-balance-card-content", className: cn('data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden', className), ...props }));
|
|
32
|
+
return (_jsx(CollapsibleContent, { "data-slot": "account-balance-card-content", className: cn('motion-safe:data-[state=closed]:animate-accordion-up motion-safe:data-[state=open]:animate-accordion-down overflow-hidden', className), ...props }));
|
|
33
33
|
}
|
|
34
34
|
export function AccountBalanceCardLoading({ className, ...props }) {
|
|
35
35
|
return (_jsx(Skeleton, { "data-slot": "account-balance-card-loading", className: cn('bg-muted mt-3 h-3 w-full rounded-md', className), ...props }));
|
|
@@ -45,7 +45,7 @@ export function AccountBalanceCardUpdateButton({ className: _className, loading,
|
|
|
45
45
|
const updated = React.useMemo(() => {
|
|
46
46
|
return !dayjs(timestamp).isBefore(dayjs().subtract(1, 'minute'));
|
|
47
47
|
}, [_time, timestamp]);
|
|
48
|
-
return (_jsxs("div", { className: "mb-3 flex flex-row items-center justify-end gap-2", children: [_jsxs("p", { className: "text-shadcn-500 text-xs font-medium", children: [loading && loadingLabel, !loading && !updated && updatedInLabel, !loading && updated && updatedLabel] }), !loading && updated && (_jsx(CheckCircle2, { className: "h-4 w-4
|
|
48
|
+
return (_jsxs("div", { className: "mb-3 flex flex-row items-center justify-end gap-2", children: [_jsxs("p", { className: "text-shadcn-500 text-xs font-medium", children: [loading && loadingLabel, !loading && !updated && updatedInLabel, !loading && updated && updatedLabel] }), !loading && updated && (_jsx(CheckCircle2, { className: "text-system-success h-4 w-4" })), (!updated || loading) && (_jsx(Button, { ref: ref, variant: "link", "data-slot": "account-balance-card-update-button", className: "h-3 p-0", onClick: onRefresh, disabled: loading, ...props, children: _jsx(RefreshCw, { className: cn('size-4', { 'motion-safe:animate-spin': loading }) }) }))] }));
|
|
49
49
|
}
|
|
50
50
|
export function AccountBalanceCardTrigger({ className, openLabel, closeLabel, children: _children, ...props }) {
|
|
51
51
|
const { open } = React.useContext(AccountBalanceCardContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/entity-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EACL,YAAY,EAEZ,gBAAgB,EAEjB,MAAM,+BAA+B,CAAA;AAOtC,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/entity-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,K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AK,CAAC,qBAQ7B;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,qBAQpC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7B;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAQ3B;AAED,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAW5B;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAgB7B"}
|
|
@@ -10,7 +10,11 @@ export function EntityCardGrid({ className, ...props }) {
|
|
|
10
10
|
return (_jsx("div", { className: cn('grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3', className), "data-slot": "entity-card-grid", ...props }));
|
|
11
11
|
}
|
|
12
12
|
export function EntityCardGridFooter({ className, ...props }) {
|
|
13
|
-
return (_jsx("div", { className: cn(
|
|
13
|
+
return (_jsx("div", { className: cn(
|
|
14
|
+
// Semantic tokens, not raw palette steps: `bg-white`/`border-zinc-200`
|
|
15
|
+
// have no dark counterpart, so this footer stayed a white slab under
|
|
16
|
+
// cards that followed the theme.
|
|
17
|
+
'border-border bg-card flex items-center justify-between rounded-lg border px-6 py-4', className), "data-slot": "entity-card-grid-footer", ...props }));
|
|
14
18
|
}
|
|
15
19
|
export function EntityCard({ className, value, progress = false, children, ...props }) {
|
|
16
20
|
return (_jsxs("div", { "data-slot": "entity-card-wrapper", className: "transition-shadow hover:shadow-xl", children: [_jsx("div", { "data-slot": "entity-card", className: cn('bg-card relative flex flex-col gap-4 rounded-lg px-5 py-4', { 'rounded-b-none': progress }, className), ...props, children: children }), progress && _jsx(Progress, { className: "h-1.5 rounded-t-none", value: value })] }));
|
|
@@ -4,13 +4,21 @@ export type ConfirmationDialogProps = {
|
|
|
4
4
|
onOpenChange: (open: boolean) => void;
|
|
5
5
|
title?: string;
|
|
6
6
|
description?: string;
|
|
7
|
+
/** @deprecated dead prop, removed in the next major */
|
|
7
8
|
ledgerName?: string;
|
|
8
9
|
variant?: 'default' | 'warning' | 'destructive' | 'success';
|
|
9
10
|
loading?: boolean;
|
|
10
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Awaited. While it is in flight the dialog reports a pending status, both
|
|
13
|
+
* actions are disabled and dismissal is blocked; it closes on resolve. A
|
|
14
|
+
* rejection leaves the dialog open — error UX belongs to the caller.
|
|
15
|
+
*/
|
|
16
|
+
onConfirm?: () => void | Promise<void>;
|
|
11
17
|
onCancel?: () => void;
|
|
12
18
|
confirmLabel?: string;
|
|
13
19
|
cancelLabel?: string;
|
|
20
|
+
/** Announced to screen readers while a confirm is in flight. */
|
|
21
|
+
pendingLabel?: string;
|
|
14
22
|
};
|
|
15
|
-
export declare function ConfirmationDialog({ open, onOpenChange, title, description, variant, loading, onConfirm, onCancel, confirmLabel, cancelLabel }: ConfirmationDialogProps): React.JSX.Element;
|
|
23
|
+
export declare function ConfirmationDialog({ open, onOpenChange, title, description, variant, loading, onConfirm, onCancel, confirmLabel, cancelLabel, pendingLabel }: ConfirmationDialogProps): React.JSX.Element;
|
|
16
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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;
|
|
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,qBAiFzB"}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
3
4
|
import { Button } from '../../../components/ui/button/index.js';
|
|
4
|
-
import {
|
|
5
|
+
import { AlertDialog, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from '../../../components/ui/alert-dialog/index.js';
|
|
5
6
|
import { LoadingButton } from '../../../components/ui/loading-button/index.js';
|
|
6
7
|
import { Ban, CheckCircle2, TriangleAlert } from 'lucide-react';
|
|
7
8
|
import { cn } from '../../../lib/utils.js';
|
|
8
9
|
import { cva } from 'class-variance-authority';
|
|
9
10
|
const confirmationDialogIconVariants = cva('flex size-10 shrink-0 items-center justify-center rounded-lg [&>svg]:size-6', {
|
|
10
11
|
variants: {
|
|
12
|
+
// System tokens, not raw palette steps: a raw 50-step surface has no dark
|
|
13
|
+
// counterpart, so on the dark canvas it rendered a near-white block.
|
|
14
|
+
// `default` is deliberately neutral so `destructive` reads as a distinct,
|
|
15
|
+
// heavier warning instead of an alias of it.
|
|
11
16
|
variant: {
|
|
12
|
-
default: 'bg-
|
|
13
|
-
warning: 'bg-
|
|
14
|
-
destructive: 'bg-
|
|
15
|
-
success: 'bg-
|
|
17
|
+
default: 'bg-muted text-foreground',
|
|
18
|
+
warning: 'bg-system-alert-surface text-system-alert-h1a',
|
|
19
|
+
destructive: 'bg-system-error-surface text-system-error-h1a',
|
|
20
|
+
success: 'bg-system-success-surface text-system-success-h1a'
|
|
16
21
|
}
|
|
17
22
|
},
|
|
18
23
|
defaultVariants: {
|
|
@@ -20,6 +25,33 @@ const confirmationDialogIconVariants = cva('flex size-10 shrink-0 items-center j
|
|
|
20
25
|
}
|
|
21
26
|
});
|
|
22
27
|
const ConfirmationDialogIcon = ({ className, variant, ...props }) => (_jsxs("span", { className: cn(confirmationDialogIconVariants({ variant }), className), ...props, children: [variant === 'default' && _jsx(Ban, {}), variant === 'warning' && _jsx(TriangleAlert, {}), variant === 'destructive' && _jsx(Ban, {}), variant === 'success' && _jsx(CheckCircle2, {})] }));
|
|
23
|
-
export function ConfirmationDialog({ open, onOpenChange, title = '', description = '', variant = 'default', loading, onConfirm = () => { }, onCancel = () => { }, confirmLabel, cancelLabel }) {
|
|
24
|
-
|
|
28
|
+
export function ConfirmationDialog({ open, onOpenChange, title = '', description = '', variant = 'default', loading, onConfirm = () => { }, onCancel = () => { }, confirmLabel, cancelLabel, pendingLabel = 'Processing…' }) {
|
|
29
|
+
const [pending, setPending] = React.useState(false);
|
|
30
|
+
const busy = Boolean(loading) || pending;
|
|
31
|
+
const handleConfirm = async () => {
|
|
32
|
+
if (busy) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
setPending(true);
|
|
36
|
+
try {
|
|
37
|
+
await onConfirm();
|
|
38
|
+
onOpenChange(false);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
// Deliberately silent: the caller owns error UX. Catching only keeps a
|
|
42
|
+
// rejection from escaping the click handler as an unhandled rejection —
|
|
43
|
+
// the dialog stays open so the caller can render the failure in place.
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
setPending(false);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return (_jsx(AlertDialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(AlertDialogContent, { "data-testid": "dialog",
|
|
50
|
+
// Radix already blocks outside interaction on an alert dialog, so
|
|
51
|
+
// Escape is the only remaining way to abandon a mutation mid-flight.
|
|
52
|
+
onEscapeKeyDown: (event) => {
|
|
53
|
+
if (busy) {
|
|
54
|
+
event.preventDefault();
|
|
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, variant: "secondary", children: _jsx(Button, { onClick: onCancel, disabled: busy, variant: "secondary", size: "small", children: cancelLabel ?? 'Cancel' }) }), _jsx(LoadingButton, { loading: busy, onClick: handleConfirm, variant: "primary", size: "small", "data-testid": "confirm", children: confirmLabel ?? 'Confirm' })] })] }) }));
|
|
25
57
|
}
|
|
@@ -3,17 +3,29 @@ export declare function PageHeaderActionButtons({ className, ...props }: React.C
|
|
|
3
3
|
export declare function PageHeaderWrapper({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
|
|
4
4
|
type PageHeaderProps = {
|
|
5
5
|
children: ReactNode;
|
|
6
|
+
/** Routed to the inner Collapsible, as it always has been. */
|
|
6
7
|
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Seam for the root element's own margins. Merged AFTER the hard-coded
|
|
10
|
+
* `mt-12`/`mb-12` so a consumer utility (e.g. `mt-0`) wins via tailwind-merge.
|
|
11
|
+
*/
|
|
12
|
+
rootClassName?: string;
|
|
7
13
|
};
|
|
8
|
-
export declare function PageHeader({ children, className }: PageHeaderProps): import("react").JSX.Element;
|
|
14
|
+
export declare function PageHeader({ children, className, rootClassName }: PageHeaderProps): import("react").JSX.Element;
|
|
9
15
|
export type PageHeaderInfoTitleProps = {
|
|
10
16
|
title: string;
|
|
11
17
|
subtitle?: string;
|
|
12
18
|
subtitleCopyToClipboard?: boolean;
|
|
19
|
+
/** Routed to the `h1`, as it always has been. */
|
|
13
20
|
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Seam for the wrapper element's own margins. Merged AFTER the hard-coded
|
|
23
|
+
* `mb-12` so a consumer utility (e.g. `mb-0`) wins via tailwind-merge.
|
|
24
|
+
*/
|
|
25
|
+
containerClassName?: string;
|
|
14
26
|
children?: ReactNode;
|
|
15
27
|
};
|
|
16
|
-
export declare function PageHeaderInfoTitle({ title, subtitle, className, children }: PageHeaderInfoTitleProps): import("react").JSX.Element;
|
|
28
|
+
export declare function PageHeaderInfoTitle({ title, subtitle, className, containerClassName, children }: PageHeaderInfoTitleProps): import("react").JSX.Element;
|
|
17
29
|
export type PageHeaderInfoTooltipProps = {
|
|
18
30
|
subtitle: string;
|
|
19
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/page-header/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAwB,MAAM,OAAO,CAAA;AAmBtE,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQ7B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAc7B;AAED,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/page-header/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,SAAS,EAAwB,MAAM,OAAO,CAAA;AAmBtE,wBAAgB,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:
|
|
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();
|
|
@@ -19,6 +19,6 @@ function AccordionTrigger({ className, children, ...props }) {
|
|
|
19
19
|
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn('focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-colors outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180', className), ...props, children: [children, _jsx(ChevronDown, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })] }) }));
|
|
20
20
|
}
|
|
21
21
|
function AccordionContent({ className, children, ...props }) {
|
|
22
|
-
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm", ...props, children: _jsx("div", { className: cn('pt-0 pb-4', className), children: children }) }));
|
|
22
|
+
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: "motion-safe:data-[state=closed]:animate-accordion-up motion-safe:data-[state=open]:animate-accordion-down overflow-hidden text-sm", ...props, children: _jsx("div", { className: cn('pt-0 pb-4', className), children: children }) }));
|
|
23
23
|
}
|
|
24
24
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { IconButton } from '../icon-button/index.js';
|
|
4
4
|
declare const alertVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "
|
|
5
|
+
variant?: "default" | "destructive" | "informative" | "warning" | "success" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export type AlertProps = React.ComponentProps<'div'> & VariantProps<typeof alertVariants>;
|
|
8
8
|
declare function Alert({ className, variant, ...props }: AlertProps): React.JSX.Element;
|