@lerianstudio/sindarian-ui 1.4.0-beta.8 → 2.0.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/dist/components/card/account-card/index.d.ts.map +1 -1
- package/dist/components/card/account-card/index.js +1 -1
- package/dist/components/card/entity-card/index.js +3 -3
- package/dist/components/dialog/confirmation-dialog/index.d.ts +36 -5
- package/dist/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
- package/dist/components/dialog/confirmation-dialog/index.js +2 -2
- package/dist/components/entity-box/index.js +1 -1
- package/dist/components/entity-data-table/index.d.ts.map +1 -1
- package/dist/components/entity-data-table/index.js +1 -1
- package/dist/components/form/file-upload-field/index.d.ts +11 -2
- package/dist/components/form/file-upload-field/index.d.ts.map +1 -1
- package/dist/components/form/file-upload-field/index.js +8 -3
- package/dist/components/form/input-field/index.d.ts +41 -2
- package/dist/components/form/input-field/index.d.ts.map +1 -1
- package/dist/components/form/input-field/index.js +73 -15
- package/dist/components/form/select-field/index.d.ts +9 -1
- package/dist/components/form/select-field/index.d.ts.map +1 -1
- package/dist/components/form/select-field/index.js +2 -2
- package/dist/components/page-header/index.d.ts.map +1 -1
- package/dist/components/page-header/index.js +2 -2
- package/dist/components/ui/autocomplete/index.d.ts +34 -6
- package/dist/components/ui/autocomplete/index.d.ts.map +1 -1
- package/dist/components/ui/autocomplete/index.js +72 -16
- package/dist/components/ui/badge/index.d.ts.map +1 -1
- package/dist/components/ui/badge/index.js +11 -1
- package/dist/components/ui/button/styles.css +31 -1
- package/dist/components/ui/calendar/index.d.ts.map +1 -1
- package/dist/components/ui/calendar/index.js +7 -1
- package/dist/components/ui/card/index.d.ts.map +1 -1
- package/dist/components/ui/card/index.js +1 -1
- package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu/index.js +4 -1
- package/dist/components/ui/field/index.d.ts.map +1 -1
- package/dist/components/ui/field/index.js +5 -2
- package/dist/components/ui/file-upload/index.d.ts +76 -9
- package/dist/components/ui/file-upload/index.d.ts.map +1 -1
- package/dist/components/ui/file-upload/index.js +47 -12
- package/dist/components/ui/form.d.ts +4 -0
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +53 -8
- package/dist/components/ui/multiple-select/index.js +2 -2
- package/dist/components/ui/progress/index.d.ts +15 -1
- package/dist/components/ui/progress/index.d.ts.map +1 -1
- package/dist/components/ui/progress/index.js +25 -2
- package/dist/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
- package/dist/components/ui/sidebar/sidebar-expand-button.js +17 -1
- package/dist/components/ui/toggle-group/index.d.ts +1 -1
- package/dist/components/ui/toggle-group/index.d.ts.map +1 -1
- package/dist/components/ui/toggle-group/index.js +73 -4
- package/dist/components/ui/tooltip/index.d.ts +15 -0
- package/dist/components/ui/tooltip/index.d.ts.map +1 -1
- package/dist/components/ui/tooltip/index.js +16 -1
- package/dist/domain/blotter/index.d.ts +4 -2
- package/dist/domain/blotter/index.d.ts.map +1 -1
- package/dist/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
- package/dist/domain/delinquency-aging/aging-buckets.js +8 -3
- package/dist/domain/delinquency-aging/index.d.ts.map +1 -1
- package/dist/domain/delinquency-aging/index.js +8 -3
- package/dist/domain/key-id/index.js +1 -1
- package/dist/domain/status-rail/index.js +1 -1
- package/dist/domain/threshold-gauge/index.d.ts.map +1 -1
- package/dist/domain/threshold-gauge/index.js +9 -5
- package/dist/enterprise/stat-card/index.d.ts.map +1 -1
- package/dist/enterprise/stat-card/index.js +12 -4
- package/dist/esm/components/card/account-card/index.d.ts.map +1 -1
- package/dist/esm/components/card/account-card/index.js +1 -1
- package/dist/esm/components/card/entity-card/index.js +3 -3
- package/dist/esm/components/dialog/confirmation-dialog/index.d.ts +36 -5
- package/dist/esm/components/dialog/confirmation-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/dialog/confirmation-dialog/index.js +2 -2
- package/dist/esm/components/entity-box/index.js +1 -1
- package/dist/esm/components/entity-data-table/index.d.ts.map +1 -1
- package/dist/esm/components/entity-data-table/index.js +1 -1
- package/dist/esm/components/form/file-upload-field/index.d.ts +11 -2
- package/dist/esm/components/form/file-upload-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/file-upload-field/index.js +8 -3
- package/dist/esm/components/form/input-field/index.d.ts +41 -2
- package/dist/esm/components/form/input-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/input-field/index.js +73 -15
- package/dist/esm/components/form/select-field/index.d.ts +9 -1
- package/dist/esm/components/form/select-field/index.d.ts.map +1 -1
- package/dist/esm/components/form/select-field/index.js +2 -2
- package/dist/esm/components/page-header/index.d.ts.map +1 -1
- package/dist/esm/components/page-header/index.js +2 -2
- package/dist/esm/components/ui/autocomplete/index.d.ts +34 -6
- package/dist/esm/components/ui/autocomplete/index.d.ts.map +1 -1
- package/dist/esm/components/ui/autocomplete/index.js +72 -16
- package/dist/esm/components/ui/badge/index.d.ts.map +1 -1
- package/dist/esm/components/ui/badge/index.js +11 -1
- package/dist/esm/components/ui/calendar/index.d.ts.map +1 -1
- package/dist/esm/components/ui/calendar/index.js +8 -2
- package/dist/esm/components/ui/card/index.d.ts.map +1 -1
- package/dist/esm/components/ui/card/index.js +1 -1
- package/dist/esm/components/ui/dropdown-menu/index.d.ts.map +1 -1
- package/dist/esm/components/ui/dropdown-menu/index.js +4 -1
- package/dist/esm/components/ui/field/index.d.ts.map +1 -1
- package/dist/esm/components/ui/field/index.js +5 -2
- package/dist/esm/components/ui/file-upload/index.d.ts +76 -9
- package/dist/esm/components/ui/file-upload/index.d.ts.map +1 -1
- package/dist/esm/components/ui/file-upload/index.js +47 -13
- package/dist/esm/components/ui/form.d.ts +4 -0
- package/dist/esm/components/ui/form.d.ts.map +1 -1
- package/dist/esm/components/ui/form.js +53 -8
- package/dist/esm/components/ui/multiple-select/index.js +2 -2
- package/dist/esm/components/ui/progress/index.d.ts +15 -1
- package/dist/esm/components/ui/progress/index.d.ts.map +1 -1
- package/dist/esm/components/ui/progress/index.js +25 -2
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.d.ts.map +1 -1
- package/dist/esm/components/ui/sidebar/sidebar-expand-button.js +17 -1
- package/dist/esm/components/ui/toggle-group/index.d.ts +1 -1
- package/dist/esm/components/ui/toggle-group/index.d.ts.map +1 -1
- package/dist/esm/components/ui/toggle-group/index.js +73 -4
- package/dist/esm/components/ui/tooltip/index.d.ts +15 -0
- package/dist/esm/components/ui/tooltip/index.d.ts.map +1 -1
- package/dist/esm/components/ui/tooltip/index.js +16 -1
- package/dist/esm/domain/blotter/index.d.ts +4 -2
- package/dist/esm/domain/blotter/index.d.ts.map +1 -1
- package/dist/esm/domain/delinquency-aging/aging-buckets.d.ts.map +1 -1
- package/dist/esm/domain/delinquency-aging/aging-buckets.js +8 -3
- package/dist/esm/domain/delinquency-aging/index.d.ts.map +1 -1
- package/dist/esm/domain/delinquency-aging/index.js +8 -3
- package/dist/esm/domain/key-id/index.js +1 -1
- package/dist/esm/domain/status-rail/index.js +1 -1
- package/dist/esm/domain/threshold-gauge/index.d.ts.map +1 -1
- package/dist/esm/domain/threshold-gauge/index.js +9 -5
- package/dist/esm/enterprise/stat-card/index.d.ts.map +1 -1
- package/dist/esm/enterprise/stat-card/index.js +12 -4
- package/dist/globals.css +24 -1
- package/package.json +1 -1
|
@@ -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,CAAA;AAChF,OAAO,EACL,kBAAkB,EAEnB,MAAM,6BAA6B,CAAA;AAUpC,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,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AO,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,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,q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,KAAK,EACT,EAAE,mCAAmC,qBAqCrC;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"}
|
|
@@ -61,7 +61,7 @@ function AccountBalanceCardUpdateButton({ className: _className, loading, timest
|
|
|
61
61
|
const updated = react_1.default.useMemo(() => {
|
|
62
62
|
return !(0, dayjs_1.default)(timestamp).isBefore((0, dayjs_1.default)().subtract(1, 'minute'));
|
|
63
63
|
}, [_time, timestamp]);
|
|
64
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: "mb-3 flex flex-row items-center justify-end gap-2", children: [(0, jsx_runtime_1.jsxs)("p", { className: "text-shadcn-500 text-xs font-medium", children: [loading && loadingLabel, !loading && !updated && updatedInLabel, !loading && updated && updatedLabel] }), !loading && updated && ((0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, { className: "text-system-success h-4 w-4" })), (!updated || loading) && ((0, jsx_runtime_1.jsx)(button_1.Button, { ref: ref, variant: "link", "data-slot": "account-balance-card-update-button", className: "h-3 p-0", onClick: onRefresh, disabled: loading, ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { className: (0, utils_1.cn)('size-4', { 'motion-safe:animate-spin': loading }) }) }))] }));
|
|
64
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "mb-3 flex flex-row items-center justify-end gap-2", children: [(0, jsx_runtime_1.jsxs)("p", { className: "text-shadcn-500 text-xs font-medium", children: [loading && loadingLabel, !loading && !updated && updatedInLabel, !loading && updated && updatedLabel] }), !loading && updated && ((0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, { className: "text-system-success-h1a h-4 w-4" })), (!updated || loading) && ((0, jsx_runtime_1.jsx)(button_1.Button, { ref: ref, variant: "link", "data-slot": "account-balance-card-update-button", className: "h-3 p-0", onClick: onRefresh, disabled: loading, ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { className: (0, utils_1.cn)('size-4', { 'motion-safe:animate-spin': loading }) }) }))] }));
|
|
65
65
|
}
|
|
66
66
|
function AccountBalanceCardTrigger({ className, openLabel, closeLabel, children: _children, ...props }) {
|
|
67
67
|
const { open } = react_1.default.useContext(AccountBalanceCardContext);
|
|
@@ -46,7 +46,7 @@ function EntityCardTitle({ className, ...props }) {
|
|
|
46
46
|
return ((0, jsx_runtime_1.jsx)("h3", { "data-slot": "entity-card-title", className: (0, utils_1.cn)('text-foreground text-sm font-semibold', className), ...props }));
|
|
47
47
|
}
|
|
48
48
|
function EntityCardIcon({ className, ...props }) {
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)("span", { "data-slot": "entity-card-icon", className: (0, utils_1.cn)('text-
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)("span", { "data-slot": "entity-card-icon", className: (0, utils_1.cn)('text-muted-foreground size-8 [&>svg]:size-8 [&>svg]:stroke-[1.5]', className), ...props }));
|
|
50
50
|
}
|
|
51
51
|
function EntityCardBadgeList({ className, ...props }) {
|
|
52
52
|
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-badge-list", className: (0, utils_1.cn)('flex flex-wrap gap-2', className), ...props }));
|
|
@@ -58,11 +58,11 @@ function EntityCardContent({ className, ...props }) {
|
|
|
58
58
|
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "entity-card-content", className: (0, utils_1.cn)('flex flex-col gap-2.5', className), ...props }));
|
|
59
59
|
}
|
|
60
60
|
function EntityCardDescription({ className, ...props }) {
|
|
61
|
-
return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "entity-card-description", className: (0, utils_1.cn)('text-
|
|
61
|
+
return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "entity-card-description", className: (0, utils_1.cn)('text-muted-foreground text-xs font-medium', className), ...props }));
|
|
62
62
|
}
|
|
63
63
|
function EntityCardList({ className, ...props }) {
|
|
64
64
|
return ((0, jsx_runtime_1.jsx)("ul", { "data-slot": "entity-card-list", className: (0, utils_1.cn)('text-shadcn-500 mx-2 list-inside list-disc space-y-1 text-xs font-medium', className), ...props }));
|
|
65
65
|
}
|
|
66
66
|
function EntityCardFooter({ className, children, ...props }) {
|
|
67
|
-
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-card-footer", className: (0, utils_1.cn)('text-
|
|
67
|
+
return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "entity-card-footer", className: (0, utils_1.cn)('text-muted-foreground flex flex-col gap-2 text-xs font-medium', className), ...props, children: [(0, jsx_runtime_1.jsx)(separator_1.Separator, {}), (0, jsx_runtime_1.jsx)("div", { className: "[&>svg]:text-muted-foreground flex flex-row items-center gap-2 [&>svg]:size-4 [&>svg]:stroke-[1.5]", children: children })] }));
|
|
68
68
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type ConfirmationDialogSharedProps = {
|
|
3
3
|
open: boolean;
|
|
4
4
|
onOpenChange: (open: boolean) => void;
|
|
5
|
-
title?:
|
|
6
|
-
description?:
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
7
|
/** @deprecated dead prop, removed in the next major */
|
|
8
8
|
ledgerName?: string;
|
|
9
9
|
variant?: 'default' | 'warning' | 'destructive' | 'success';
|
|
10
|
-
loading?: boolean;
|
|
11
10
|
/**
|
|
12
11
|
* Awaited. While it is in flight the dialog reports a pending status, both
|
|
13
12
|
* actions are disabled and dismissal is blocked; it closes on resolve. A
|
|
@@ -17,8 +16,40 @@ export type ConfirmationDialogProps = {
|
|
|
17
16
|
onCancel?: () => void;
|
|
18
17
|
confirmLabel?: string;
|
|
19
18
|
cancelLabel?: string;
|
|
20
|
-
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* ⛔ `loading` IS THE DISCRIMINANT: driving the dialog's busy state from the
|
|
22
|
+
* outside requires `pendingLabel`, because the announcement region only mounts
|
|
23
|
+
* when that label exists and a `loading` dialog without one is silently
|
|
24
|
+
* unannounced.
|
|
25
|
+
*
|
|
26
|
+
* The rule is compile-time on purpose. `pendingLabel` had an English default
|
|
27
|
+
* until it was removed for reading "Processing" aloud over translated copy, and
|
|
28
|
+
* 73 consumer call sites pass `loading` with no label: every one of them would
|
|
29
|
+
* have lost its pending announcement on a silent bump, with nothing visible on
|
|
30
|
+
* screen to betray it.
|
|
31
|
+
*
|
|
32
|
+
* A dialog that drives its busy state from `onConfirm` alone is untouched:
|
|
33
|
+
* `pendingLabel` stays optional there, and omitting it still means the dialog
|
|
34
|
+
* announces nothing rather than announcing the wrong language.
|
|
35
|
+
*/
|
|
36
|
+
type ConfirmationDialogPendingProps = {
|
|
37
|
+
loading: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Announced to screen readers while a confirm is in flight.
|
|
40
|
+
* Caller-supplied and already localized: this string is never visible, so
|
|
41
|
+
* a default here would read English aloud over a translated dialog. The
|
|
42
|
+
* visible `confirmLabel` / `cancelLabel` keep their English defaults,
|
|
43
|
+
* because a caller sees those and overrides them.
|
|
44
|
+
*/
|
|
45
|
+
pendingLabel: string;
|
|
46
|
+
} | {
|
|
47
|
+
loading?: undefined;
|
|
48
|
+
/** As above, and optional while nothing drives the busy state from
|
|
49
|
+
* outside: omit it and an awaited `onConfirm` announces nothing. */
|
|
21
50
|
pendingLabel?: string;
|
|
22
51
|
};
|
|
52
|
+
export type ConfirmationDialogProps = ConfirmationDialogSharedProps & ConfirmationDialogPendingProps;
|
|
23
53
|
export declare function ConfirmationDialog({ open, onOpenChange, title, description, variant, loading, onConfirm, onCancel, confirmLabel, cancelLabel, pendingLabel }: ConfirmationDialogProps): React.JSX.Element;
|
|
54
|
+
export {};
|
|
24
55
|
//# 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;AAuD9B,
|
|
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,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;IAC3D;;;;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;CACrB,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,KAAK,8BAA8B,GAC/B;IACE,OAAO,EAAE,OAAO,CAAA;IAChB;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,CAAA;CACrB,GACD;IACE,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;yEACqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAEL,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,GACjE,8BAA8B,CAAA;AAEhC,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,YAAY,EACZ,KAAY,EACZ,WAAkB,EAClB,OAAmB,EACnB,OAAO,EACP,SAAoB,EACpB,QAAmB,EACnB,YAAY,EACZ,WAAW,EACX,YAAY,EACb,EAAE,uBAAuB,qBA8FzB"}
|
|
@@ -61,7 +61,7 @@ const confirmationDialogIconVariants = (0, class_variance_authority_1.cva)('flex
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
const ConfirmationDialogIcon = ({ className, variant, ...props }) => ((0, jsx_runtime_1.jsxs)("span", { className: (0, utils_1.cn)(confirmationDialogIconVariants({ variant }), className), ...props, children: [variant === 'default' && (0, jsx_runtime_1.jsx)(lucide_react_1.Ban, {}), variant === 'warning' && (0, jsx_runtime_1.jsx)(lucide_react_1.TriangleAlert, {}), variant === 'destructive' && (0, jsx_runtime_1.jsx)(lucide_react_1.Ban, {}), variant === 'success' && (0, jsx_runtime_1.jsx)(lucide_react_1.CheckCircle2, {})] }));
|
|
64
|
-
function ConfirmationDialog({ open, onOpenChange, title =
|
|
64
|
+
function ConfirmationDialog({ open, onOpenChange, title = null, description = null, variant = 'default', loading, onConfirm = () => { }, onCancel = () => { }, confirmLabel, cancelLabel, pendingLabel }) {
|
|
65
65
|
const [pending, setPending] = React.useState(false);
|
|
66
66
|
const busy = Boolean(loading) || pending;
|
|
67
67
|
const handleConfirm = async () => {
|
|
@@ -89,5 +89,5 @@ function ConfirmationDialog({ open, onOpenChange, title = '', description = '',
|
|
|
89
89
|
if (busy) {
|
|
90
90
|
event.preventDefault();
|
|
91
91
|
}
|
|
92
|
-
}, children: [(0, jsx_runtime_1.jsxs)(alert_dialog_1.AlertDialogHeader, { className: "flex-row items-center", children: [(0, jsx_runtime_1.jsx)(ConfirmationDialogIcon, { variant: variant }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-4", children: [(0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogTitle, { children: title }), (0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogDescription, { children: description })] })] }), (0, jsx_runtime_1.jsx)("span", { role: "status", className: "sr-only", children: busy ? pendingLabel : '' }), (0, jsx_runtime_1.jsxs)(alert_dialog_1.AlertDialogFooter, { className: "gap-4", children: [(0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogCancel, { asChild: true, variant: "secondary", children: (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: onCancel, disabled: busy, variant: "secondary", size: "small", children: cancelLabel ?? 'Cancel' }) }), (0, jsx_runtime_1.jsx)(loading_button_1.LoadingButton, { loading: busy, onClick: handleConfirm, variant: "primary", size: "small", "data-testid": "confirm", children: confirmLabel ?? 'Confirm' })] })] }) }));
|
|
92
|
+
}, children: [(0, jsx_runtime_1.jsxs)(alert_dialog_1.AlertDialogHeader, { className: "flex-row items-center", children: [(0, jsx_runtime_1.jsx)(ConfirmationDialogIcon, { variant: variant }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-4", children: [title == null || title === false || title === true || title === '' ? ((0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogTitle, { className: "sr-only", children: confirmLabel || 'Confirm' })) : ((0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogTitle, { children: title })), description == null ? null : ((0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogDescription, { children: description }))] })] }), pendingLabel ? ((0, jsx_runtime_1.jsx)("span", { role: "status", className: "sr-only", children: busy ? pendingLabel : '' })) : null, (0, jsx_runtime_1.jsxs)(alert_dialog_1.AlertDialogFooter, { className: "gap-4", children: [(0, jsx_runtime_1.jsx)(alert_dialog_1.AlertDialogCancel, { asChild: true, variant: "secondary", children: (0, jsx_runtime_1.jsx)(button_1.Button, { onClick: onCancel, disabled: busy, variant: "secondary", size: "small", children: cancelLabel ?? 'Cancel' }) }), (0, jsx_runtime_1.jsx)(loading_button_1.LoadingButton, { loading: busy, onClick: handleConfirm, variant: "primary", size: "small", "data-testid": "confirm", children: confirmLabel ?? 'Confirm' })] })] }) }));
|
|
93
93
|
}
|
|
@@ -27,7 +27,7 @@ function EntityBoxCollapsibleContent({ children, ...props }) {
|
|
|
27
27
|
return ((0, jsx_runtime_1.jsxs)(collapsible_1.CollapsibleContent, { ...props, children: [(0, jsx_runtime_1.jsx)(separator_1.Separator, { orientation: "horizontal" }), (0, jsx_runtime_1.jsx)("div", { className: "grid w-full grid-cols-3 p-6", children: children })] }));
|
|
28
28
|
}
|
|
29
29
|
function EntityBoxHeaderTitle({ title, subtitle, tooltip, tooltipWidth, className, 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-
|
|
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-muted-foreground h-5 w-5" }) }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { side: "right", style: tooltipWidth
|
|
31
31
|
? { width: tooltipWidth, maxWidth: tooltipWidth }
|
|
32
32
|
: undefined, children: tooltip })] }) }))] }), subtitle && (0, jsx_runtime_1.jsx)("p", { className: "text-muted-foreground text-sm", children: subtitle })] }));
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/entity-data-table/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,qBAEpC;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,iBAAS,yBAAyB,CAAC,EACjC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/entity-data-table/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,qBAEpC;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7B;AAED,iBAAS,yBAAyB,CAAC,EACjC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAW3B;AAED,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC,iBAAiB,GAAG;IACtE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,eAAe;;;;CAI3B,CAAA"}
|
|
@@ -11,7 +11,7 @@ function EntityDataTableFooter({ className, ...props }) {
|
|
|
11
11
|
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "data-table-footer", className: (0, utils_1.cn)('flex flex-row items-center justify-between px-6 py-3', className), ...props }));
|
|
12
12
|
}
|
|
13
13
|
function EntityDataTableFooterText({ className, ...props }) {
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "data-table-footer-text", className: (0, utils_1.cn)('text-
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)("p", { "data-slot": "data-table-footer-text", className: (0, utils_1.cn)('text-muted-foreground text-sm leading-8 italic', className), ...props }));
|
|
15
15
|
}
|
|
16
16
|
exports.EntityDataTable = {
|
|
17
17
|
Root: EntityDataTableRoot,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Control, FieldPathByValue, FieldValues } from 'react-hook-form';
|
|
3
|
-
import { type FileUploadResult } from '../../../components/ui/file-upload';
|
|
3
|
+
import { type FileUploadError, type FileUploadLabels, type FileUploadResult } from '../../../components/ui/file-upload';
|
|
4
4
|
import { type RenderableLabel } from '../../../components/form/renderable-label';
|
|
5
5
|
type FileUploadFieldOwnProps<T extends FieldValues = FieldValues> = {
|
|
6
6
|
control: Control<T>;
|
|
@@ -17,6 +17,15 @@ type FileUploadFieldOwnProps<T extends FieldValues = FieldValues> = {
|
|
|
17
17
|
maxSizeBytes?: number;
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Override the picker's user-visible copy. Threaded straight to FileUpload;
|
|
22
|
+
* omitted fields keep the English defaults. Note `labels.error` governs the
|
|
23
|
+
* PICKER's own size/type/read refusal only — resolver messages still come
|
|
24
|
+
* from the schema through FormMessage.
|
|
25
|
+
*/
|
|
26
|
+
labels?: FileUploadLabels;
|
|
27
|
+
/** Observe size, type, and read failures after the form value is cleared. */
|
|
28
|
+
onError?: (error: FileUploadError) => void;
|
|
20
29
|
/** Optional escape hatch to also observe the picked File/clear alongside the form's text value. */
|
|
21
30
|
onSelect?: (result: FileUploadResult | null) => void;
|
|
22
31
|
};
|
|
@@ -47,6 +56,6 @@ export type FileUploadFieldProps<T extends FieldValues = FieldValues> = FileUplo
|
|
|
47
56
|
* rejection; on resolver failure the FormMessage announces. Both surfaces are
|
|
48
57
|
* wired.
|
|
49
58
|
*/
|
|
50
|
-
export declare const FileUploadField: <T extends FieldValues = FieldValues>({ control, name, label, description, tooltip, required, accept, maxSizeBytes, disabled, className, onSelect, "aria-label": ariaLabelProp }: FileUploadFieldProps<T>) => import("react").JSX.Element;
|
|
59
|
+
export declare const FileUploadField: <T extends FieldValues = FieldValues>({ control, name, label, description, tooltip, required, accept, maxSizeBytes, disabled, className, labels, onError, onSelect, "aria-label": ariaLabelProp }: FileUploadFieldProps<T>) => import("react").JSX.Element;
|
|
51
60
|
export {};
|
|
52
61
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/file-upload-field/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAWxE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/file-upload-field/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;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6JAelE,oBAAoB,CAAC,CAAC,CAAC,gCAoFzB,CAAA"}
|
|
@@ -22,7 +22,7 @@ const renderable_label_1 = require("../../../components/form/renderable-label");
|
|
|
22
22
|
* rejection; on resolver failure the FormMessage announces. Both surfaces are
|
|
23
23
|
* wired.
|
|
24
24
|
*/
|
|
25
|
-
const FileUploadField = ({ control, name, label, description, tooltip, required, accept, maxSizeBytes, disabled, className, onSelect, 'aria-label': ariaLabelProp }) => {
|
|
25
|
+
const FileUploadField = ({ control, name, label, description, tooltip, required, accept, maxSizeBytes, disabled, className, labels, onError, onSelect, 'aria-label': ariaLabelProp }) => {
|
|
26
26
|
const [localValue, setLocalValue] = (0, react_1.useState)(null);
|
|
27
27
|
const showLabel = (0, renderable_label_1.hasRenderableLabel)(label);
|
|
28
28
|
// An empty or whitespace-only aria-label is worse than none: it names the
|
|
@@ -54,11 +54,16 @@ const FileUploadField = ({ control, name, label, description, tooltip, required,
|
|
|
54
54
|
// value carries nothing else to tell them apart. Fix needs a reset epoch
|
|
55
55
|
// from react-hook-form, or a form value richer than the file text.
|
|
56
56
|
const shown = localValue && field.value === localValue.text ? localValue : null;
|
|
57
|
-
return ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, children: [showLabel && ((0, jsx_runtime_1.jsx)(form_1.FormLabel, { extra: tooltip ? (0, jsx_runtime_1.jsx)(form_1.FormTooltip, { children: tooltip }) : undefined, children: label })), (0, jsx_runtime_1.jsx)(form_1.FormControl, { children: (0, jsx_runtime_1.jsx)(file_upload_1.FileUpload, { ref: field.ref, name: field.name, onBlur: field.onBlur, "aria-label": ariaLabel, accept: accept, maxSizeBytes: maxSizeBytes, disabled: disabled, className: className, value: shown, onSelect: (result) => {
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, children: [showLabel && ((0, jsx_runtime_1.jsx)(form_1.FormLabel, { extra: tooltip ? (0, jsx_runtime_1.jsx)(form_1.FormTooltip, { children: tooltip }) : undefined, children: label })), (0, jsx_runtime_1.jsx)(form_1.FormControl, { children: (0, jsx_runtime_1.jsx)(file_upload_1.FileUpload, { ref: field.ref, name: field.name, onBlur: field.onBlur, "aria-label": ariaLabel, labels: labels, accept: accept, maxSizeBytes: maxSizeBytes, disabled: disabled, className: className, value: shown, onSelect: (result) => {
|
|
58
58
|
setLocalValue(result);
|
|
59
59
|
field.onChange(result?.text ?? '');
|
|
60
60
|
onSelect?.(result);
|
|
61
|
-
}, onError: () =>
|
|
61
|
+
}, onError: (error) => {
|
|
62
|
+
setLocalValue(null);
|
|
63
|
+
field.onChange('');
|
|
64
|
+
onSelect?.(null);
|
|
65
|
+
onError?.(error);
|
|
66
|
+
} }) }), (0, jsx_runtime_1.jsx)(form_1.FormMessage, {}), description && (0, jsx_runtime_1.jsx)(form_1.FormDescription, { children: description })] }));
|
|
62
67
|
} }));
|
|
63
68
|
};
|
|
64
69
|
exports.FileUploadField = FileUploadField;
|
|
@@ -1,9 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type InputRef } from '../../../components/ui/input';
|
|
2
|
+
import { HTMLInputTypeAttribute, ReactNode, Ref } from 'react';
|
|
2
3
|
import { Control, FieldValues } from 'react-hook-form';
|
|
3
4
|
export type InputFieldProps<T extends FieldValues = FieldValues> = {
|
|
4
5
|
className?: string;
|
|
5
6
|
name: string;
|
|
6
7
|
type?: HTMLInputTypeAttribute;
|
|
8
|
+
/**
|
|
9
|
+
* Announce the field's own invalidity. Reaches the rendered control on BOTH
|
|
10
|
+
* branches, so a field with no `control` — and therefore no react-hook-form
|
|
11
|
+
* error state — can still tell a screen reader it is invalid.
|
|
12
|
+
*
|
|
13
|
+
* ORed with the form's error, never overriding it: `false` here cannot
|
|
14
|
+
* suppress a live resolver error. Nobody asked to mute a real validation
|
|
15
|
+
* failure, and on a financial console a muted one is a wrong number reaching
|
|
16
|
+
* a money path.
|
|
17
|
+
*
|
|
18
|
+
* TypeScript exempts hyphenated JSX attributes from excess-property
|
|
19
|
+
* checking, so passing this used to compile and then vanish.
|
|
20
|
+
*/
|
|
21
|
+
'aria-invalid'?: boolean;
|
|
22
|
+
/** Lower bound, forwarded to the single-line control on both branches. */
|
|
23
|
+
min?: number | string;
|
|
24
|
+
/** Upper bound, forwarded to the single-line control on both branches. */
|
|
25
|
+
max?: number | string;
|
|
26
|
+
/** Increment, forwarded to the single-line control on both branches. */
|
|
27
|
+
step?: number | string;
|
|
28
|
+
/** Character ceiling, forwarded on both branches (single-line and textarea). */
|
|
29
|
+
maxLength?: number;
|
|
30
|
+
/** Browser autofill hint. `"off"` is the one a money field usually wants. */
|
|
31
|
+
autoComplete?: React.HTMLInputAutoCompleteAttribute;
|
|
32
|
+
/** Virtual-keyboard hint, e.g. `"numeric"` or `"decimal"`. Both branches. */
|
|
33
|
+
inputMode?: React.HTMLAttributes<HTMLElement>['inputMode'];
|
|
34
|
+
/** Native validation regex. Single-line only — a textarea has no `pattern`. */
|
|
35
|
+
pattern?: string;
|
|
36
|
+
/** Focus the control on mount. React focuses the node rather than emitting an attribute. */
|
|
37
|
+
autoFocus?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Imperative handle on the rendered control: `focus()`/`blur()` on the
|
|
40
|
+
* single-line branch, the textarea node on the `textArea` branch (which
|
|
41
|
+
* satisfies the same shape). COMPOSED with react-hook-form's own ref when
|
|
42
|
+
* `control` is present, never replacing it — the form keeps the node it
|
|
43
|
+
* needs for `shouldFocusError`.
|
|
44
|
+
*/
|
|
45
|
+
ref?: Ref<InputRef>;
|
|
7
46
|
label?: ReactNode;
|
|
8
47
|
tooltip?: string;
|
|
9
48
|
labelExtra?: ReactNode;
|
|
@@ -32,5 +71,5 @@ export type InputFieldProps<T extends FieldValues = FieldValues> = {
|
|
|
32
71
|
'data-testid'?: string;
|
|
33
72
|
onChange?: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
34
73
|
};
|
|
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;
|
|
74
|
+
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, min, max, step, maxLength, autoComplete, inputMode, pattern, autoFocus, ref, "aria-invalid": ariaInvalid, ...others }: InputFieldProps<T>) => import("react").JSX.Element;
|
|
36
75
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input-field/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAS,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,GAAG,EAAmB,MAAM,OAAO,CAAA;AAC/E,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;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAA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AAC,CAAC,CAAC,gCAyHpB,CAAA"}
|
|
@@ -5,8 +5,59 @@ 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
|
|
9
|
-
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
/**
|
|
10
|
+
* Fan one node out to several refs. React hands a node to ONE ref, so a
|
|
11
|
+
* consumer ref and react-hook-form's `field.ref` cannot both be passed
|
|
12
|
+
* directly — one silently wins. Only used when the consumer actually supplied
|
|
13
|
+
* a ref, so a field without one keeps `field.ref`'s own identity and React
|
|
14
|
+
* never re-attaches it.
|
|
15
|
+
*/
|
|
16
|
+
function fanOutRef(...refs) {
|
|
17
|
+
return (node) => {
|
|
18
|
+
const cleanups = [];
|
|
19
|
+
for (const ref of refs) {
|
|
20
|
+
if (typeof ref === 'function') {
|
|
21
|
+
const cleanup = ref(node);
|
|
22
|
+
cleanups.push(typeof cleanup === 'function' ? cleanup : () => ref(null));
|
|
23
|
+
}
|
|
24
|
+
else if (ref) {
|
|
25
|
+
;
|
|
26
|
+
ref.current = node;
|
|
27
|
+
cleanups.push(() => {
|
|
28
|
+
;
|
|
29
|
+
ref.current = null;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return () => cleanups.forEach((cleanup) => cleanup());
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const InputField = ({ className, type, label, tooltip, labelExtra, placeholder, description, startAdornment, endAdornment, required, readOnly, minHeight, maxHeight, textArea, defaultValue, value, onChange, min, max, step, maxLength, autoComplete, inputMode, pattern, autoFocus, ref, 'aria-invalid': ariaInvalid, ...others }) => {
|
|
37
|
+
// OR with the form's error, expressed through the Slot merge rather than by
|
|
38
|
+
// reading the form: FormControl already injects `aria-invalid={!!error}`, and
|
|
39
|
+
// a child prop only wins that merge when the KEY is present. So emit the key
|
|
40
|
+
// only for an explicit `true`, and let FormControl answer for every other
|
|
41
|
+
// case. `true || error` is true; `false || error` is whatever the form says,
|
|
42
|
+
// which is the whole point — an explicit `false` cannot mute a live error.
|
|
43
|
+
// With no `control` there is no error to OR against, so FormControl injects
|
|
44
|
+
// `false` and today's behaviour is unchanged.
|
|
45
|
+
const ariaInvalidProp = ariaInvalid ? { 'aria-invalid': true } : undefined;
|
|
46
|
+
const formRef = (0, react_1.useRef)(undefined);
|
|
47
|
+
const composedRef = (0, react_1.useMemo)(() => ref ? fanOutRef((node) => formRef.current?.(node), ref) : ref,
|
|
48
|
+
// `others.name` belongs here, and leaving it out is not a lint nit.
|
|
49
|
+
// react-hook-form hands a fresh `field.ref` for every name, and that ref
|
|
50
|
+
// only receives the element when React reattaches, which it does only when
|
|
51
|
+
// this callback's identity changes. Memoised on `ref` alone, one identity
|
|
52
|
+
// survived a name change, the new field never got its element, and
|
|
53
|
+
// `form.setFocus(newName)` then found nothing to focus and said nothing.
|
|
54
|
+
[ref, others.name]);
|
|
55
|
+
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, maxLength: maxLength, autoComplete: autoComplete, inputMode: inputMode, autoFocus: autoFocus, "data-testid": others['data-testid'], ...ariaInvalidProp, ...binding })) : ((0, jsx_runtime_1.jsx)(input_1.Input, { className: className, type: type, placeholder: placeholder, readOnly: readOnly, startAdornment: startAdornment, endAdornment: endAdornment,
|
|
56
|
+
// Bounds belong to the single-line control only: `min`/`max`/`step`
|
|
57
|
+
// mean nothing on a textarea and would render as invalid markup.
|
|
58
|
+
min: min, max: max, step: step, maxLength: maxLength, autoComplete: autoComplete, inputMode: inputMode,
|
|
59
|
+
// Single-line only: `<textarea pattern>` is not a thing.
|
|
60
|
+
pattern: pattern, autoFocus: autoFocus, "data-testid": others['data-testid'], ...ariaInvalidProp, ...binding })) }), (0, jsx_runtime_1.jsx)(form_1.FormMessage, {}), description && (0, jsx_runtime_1.jsx)(form_1.FormDescription, { children: description })] }));
|
|
10
61
|
if (!others.control) {
|
|
11
62
|
return renderItem({
|
|
12
63
|
name: others.name,
|
|
@@ -14,7 +65,10 @@ const InputField = ({ className, type, label, tooltip, labelExtra, placeholder,
|
|
|
14
65
|
// Controlled when the caller holds the value, uncontrolled when it only
|
|
15
66
|
// seeds one — supplying both is what React warns about.
|
|
16
67
|
...(value !== undefined ? { value } : { defaultValue }),
|
|
17
|
-
onChange: (e) => onChange?.(e)
|
|
68
|
+
onChange: (e) => onChange?.(e),
|
|
69
|
+
// Nothing else claims the node on this branch, so the consumer ref goes
|
|
70
|
+
// straight through. Without it there was no node to focus at all.
|
|
71
|
+
ref: ref
|
|
18
72
|
});
|
|
19
73
|
}
|
|
20
74
|
return ((0, jsx_runtime_1.jsx)(form_1.FormField, { ...others, name: others.name,
|
|
@@ -22,17 +76,21 @@ const InputField = ({ className, type, label, tooltip, labelExtra, placeholder,
|
|
|
22
76
|
// value painted on the box only makes the field LOOK filled while the
|
|
23
77
|
// form still submits nothing for that name. Controller seeds its own
|
|
24
78
|
// state from this, so `field.value` carries the seed on both branches.
|
|
25
|
-
defaultValue: defaultValue, render: ({ field }) =>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
field.
|
|
34
|
-
onChange
|
|
35
|
-
|
|
36
|
-
|
|
79
|
+
defaultValue: defaultValue, render: ({ field }) => {
|
|
80
|
+
formRef.current = field.ref;
|
|
81
|
+
return renderItem({
|
|
82
|
+
...field,
|
|
83
|
+
// Controlled from mount. react-hook-form hands `undefined` for any
|
|
84
|
+
// name the form declares no default for; React then mounts the box
|
|
85
|
+
// uncontrolled and flips it on the first keystroke, losing that
|
|
86
|
+
// character.
|
|
87
|
+
value: field.value ?? '',
|
|
88
|
+
onChange: (e) => {
|
|
89
|
+
field.onChange(e);
|
|
90
|
+
onChange?.(e);
|
|
91
|
+
},
|
|
92
|
+
ref: (ref ? composedRef : field.ref)
|
|
93
|
+
});
|
|
94
|
+
} }));
|
|
37
95
|
};
|
|
38
96
|
exports.InputField = InputField;
|
|
@@ -13,7 +13,15 @@ type SelectFieldSharedProps<T extends FieldValues = FieldValues> = PropsWithChil
|
|
|
13
13
|
* with `value` + `onChange`. */
|
|
14
14
|
control?: Control<T>;
|
|
15
15
|
required?: boolean;
|
|
16
|
+
/** Copy for the "nothing to pick" row. Defaults to "No options found." */
|
|
16
17
|
emptyMessage?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Placed on the field's own root box, merged with its spacing rather than
|
|
20
|
+
* replacing it. The root is the element a parent grid positions, so
|
|
21
|
+
* without this a consumer had to wrap the field in a spare div just to
|
|
22
|
+
* span a column.
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
17
25
|
'data-testid'?: string;
|
|
18
26
|
};
|
|
19
27
|
/**
|
|
@@ -39,6 +47,6 @@ type SelectFieldModeProps = {
|
|
|
39
47
|
onChange?: (value: string) => void;
|
|
40
48
|
};
|
|
41
49
|
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;
|
|
50
|
+
export declare const SelectField: <T extends FieldValues = FieldValues>({ name, label, tooltip, labelExtra, required, placeholder, description, disabled, readOnly, multi, control, value, children, emptyMessage, className, onChange, ...others }: SelectFieldProps<T>) => React.JSX.Element;
|
|
43
51
|
export {};
|
|
44
52
|
//# 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,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,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,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,6KAkB9D,gBAAgB,CAAC,CAAC,CAAC,sBA6FrB,CAAA"}
|
|
@@ -6,14 +6,14 @@ 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, value, children, emptyMessage = 'No options found.', onChange, ...others }) => {
|
|
9
|
+
const SelectField = ({ name, label, tooltip, labelExtra, required, placeholder, description, disabled, readOnly, multi, control, value, children, emptyMessage = 'No options found.', className, onChange, ...others }) => {
|
|
10
10
|
// The props union already pairs `multi` with the callback shape that branch
|
|
11
11
|
// emits, but destructuring an intersection loses that correlation — TS sees
|
|
12
12
|
// two unrelated callbacks. Both branches report through this one seam, each
|
|
13
13
|
// with the payload its own union member declared.
|
|
14
14
|
const emitChange = onChange;
|
|
15
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) => {
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, className: className, 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
17
|
field.onChange(value);
|
|
18
18
|
emitChange?.(value);
|
|
19
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) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,SAAS,EAAwB,MAAM,OAAO,CAAA;AAmBhF,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,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IAC5C;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,EACR,SAAS,EACT,kBAAkB,EAClB,QAAQ,EACR,EAAE,EAAE,OAAc,EACnB,EAAE,wBAAwB,+BA2D1B;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACT,EAAE,0BAA0B,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2B,SAAS,EAAwB,MAAM,OAAO,CAAA;AAmBhF,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,wBAA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70,11 +70,11 @@ function PageHeaderInfoTooltip({ subtitle }) {
|
|
|
70
70
|
description: 'Copied to clipboard!'
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
-
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "page-header-info-tooltip", children: (0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { delayDuration: 300, children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipTrigger, { onClick: () => handleCopyToClipboard(subtitle), children: (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { size: 16, className: "cursor-pointer" }) }), (0, jsx_runtime_1.jsxs)(tooltip_1.TooltipContent, { className: "bg-shadcn-600 border-none", arrowPadding: 0, children: [(0, jsx_runtime_1.jsx)("p", { className: "text-shadcn-
|
|
73
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "page-header-info-tooltip", children: (0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { children: (0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { delayDuration: 300, children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipTrigger, { onClick: () => handleCopyToClipboard(subtitle), children: (0, jsx_runtime_1.jsx)(lucide_react_1.Copy, { size: 16, className: "cursor-pointer" }) }), (0, jsx_runtime_1.jsxs)(tooltip_1.TooltipContent, { className: "bg-shadcn-600 border-none", arrowPadding: 0, children: [(0, jsx_runtime_1.jsx)("p", { className: "text-shadcn-300 text-sm font-medium", children: subtitle }), (0, jsx_runtime_1.jsx)("p", { className: "text-center text-white", children: "Click to copy" }), (0, jsx_runtime_1.jsx)(react_tooltip_1.Arrow, { height: 8, width: 15 })] })] }) }) }));
|
|
74
74
|
}
|
|
75
75
|
function PageHeaderCollapsibleInfoTrigger({ question }) {
|
|
76
76
|
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" })] }) }) }));
|
|
77
77
|
}
|
|
78
78
|
function PageHeaderCollapsibleInfo({ question, answer, seeMore, href }) {
|
|
79
|
-
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-
|
|
79
|
+
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-muted-foreground 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" }) }) })] }) }) }));
|
|
80
80
|
}
|
|
@@ -21,10 +21,16 @@ export type AutocompleteContextType = React.HtmlHTMLAttributes<HTMLInputElement>
|
|
|
21
21
|
};
|
|
22
22
|
export type AutocompleteTriggerProps = React.ComponentProps<'div'> & {
|
|
23
23
|
onClear?: () => void;
|
|
24
|
+
/** Accessible label for the clear button. */
|
|
25
|
+
clearLabel?: string;
|
|
24
26
|
};
|
|
25
|
-
export declare function AutocompleteTrigger({ ref, className, onClear, children }: AutocompleteTriggerProps): React.JSX.Element;
|
|
27
|
+
export declare function AutocompleteTrigger({ ref, className, onClear, clearLabel, children }: AutocompleteTriggerProps): React.JSX.Element;
|
|
26
28
|
export declare function AutocompleteValue({ ref, className, value: valueProp, onValueChange, onBlur, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
|
|
27
|
-
export
|
|
29
|
+
export type AutocompleteMultipleValueProps = React.ComponentProps<typeof CommandPrimitive.Input> & {
|
|
30
|
+
/** Accessible label for each chip's remove button, prefixed to its value. */
|
|
31
|
+
clearLabel?: string;
|
|
32
|
+
};
|
|
33
|
+
export declare function AutocompleteMultipleValue({ ref, className, clearLabel, ...props }: AutocompleteMultipleValueProps): React.JSX.Element;
|
|
28
34
|
export declare function AutocompleteEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element | null;
|
|
29
35
|
export declare function AutocompleteLoading({ className, ref, ...props }: React.ComponentProps<typeof CommandPrimitive.Loading>): React.JSX.Element;
|
|
30
36
|
export declare const SIDE_OPTIONS: string[];
|
|
@@ -36,10 +42,32 @@ export type AutocompleteContentProps = React.ComponentProps<typeof CommandPrimit
|
|
|
36
42
|
};
|
|
37
43
|
export declare function AutocompleteContent({ className, position, side, ref, children, onMouseEnter, onMouseLeave, onPointerDownOutside, ...props }: AutocompleteContentProps): React.JSX.Element;
|
|
38
44
|
export declare function AutocompleteGroup({ className, ...props }: React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>): React.JSX.Element;
|
|
39
|
-
export
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
export type AutocompleteItemProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item> & {
|
|
46
|
+
/** Text this option reads as wherever it is rendered outside the list (the
|
|
47
|
+
* input, a chip and its remove button). Required only when the children are
|
|
48
|
+
* markup rather than a plain string, which cannot be read as text. */
|
|
49
|
+
label?: string;
|
|
50
|
+
};
|
|
51
|
+
export declare function AutocompleteItem({ className, value, label: _label, onSelect, ...props }: AutocompleteItemProps): React.JSX.Element;
|
|
52
|
+
export declare namespace AutocompleteItem {
|
|
53
|
+
var displayName: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* ⛔ THE THREE OMITS ARE THE POINT. cmdk's `Command` types `value`,
|
|
57
|
+
* `defaultValue` and `onValueChange` for a single-select command palette: bare
|
|
58
|
+
* `string`, and `(value: string) => void`. Intersecting rather than omitting
|
|
59
|
+
* collapsed each one to the cmdk half — `string & (string | string[])` is
|
|
60
|
+
* `string` — so `defaultValue={['next']}` was a type error on a component whose
|
|
61
|
+
* whole `multiple` mode passes arrays, and every consumer reached it through a
|
|
62
|
+
* cast.
|
|
63
|
+
*
|
|
64
|
+
* These are exactly the three this component destructures and re-implements
|
|
65
|
+
* below, so none of them reaches `CommandPrimitive` through `...props` and
|
|
66
|
+
* omitting them drops no behaviour.
|
|
67
|
+
*/
|
|
68
|
+
export type AutocompleteProps = Omit<React.ComponentProps<typeof CommandPrimitive>, 'value' | 'defaultValue' | 'onValueChange'> & {
|
|
69
|
+
value?: string | string[];
|
|
70
|
+
defaultValue?: string | string[];
|
|
43
71
|
onValueChange?: (values: string | string[]) => void;
|
|
44
72
|
onClear?: () => void;
|
|
45
73
|
open?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/autocomplete/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAmB,MAAM,MAAM,CAAA;AAInE,MAAM,MAAM,uBAAuB,GACjC,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,GAAG;IAC3C,sCAAsC;IACtC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,CAAA;IAC7B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAA;IAEnD,2BAA2B;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;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