shru-design-system 0.6.1 → 0.6.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 +2 -2
- package/dist/index.d.mts +167 -27
- package/dist/index.d.ts +167 -27
- package/dist/index.js +693 -136
- package/dist/index.mjs +688 -137
- package/package.json +1 -1
- package/scripts/check-metadata-props.js +183 -16
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# shru-design-system
|
|
2
2
|
|
|
3
|
-
React component library — **
|
|
3
|
+
React component library — **99 components**, multi-axis token themes, Tailwind + CVA.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install shru-design-system
|
|
@@ -44,7 +44,7 @@ Published: `dist/` components, `styles.css`, Tailwind preset.
|
|
|
44
44
|
| Doc | Covers |
|
|
45
45
|
|-----|--------|
|
|
46
46
|
| [Architecture](./docs/reference/ARCHITECTURE.md) | Repo map, build pipeline, check gates |
|
|
47
|
-
| [Components](./docs/reference/COMPONENTS.md) |
|
|
47
|
+
| [Components](./docs/reference/COMPONENTS.md) | 99 shipped spec |
|
|
48
48
|
| [Component graph](./docs/reference/COMPONENT_GRAPH.md) | Composition flowcharts |
|
|
49
49
|
| [Tokens](./docs/reference/TOKENS.md) | Token JSON layout, pipeline |
|
|
50
50
|
|
package/dist/index.d.mts
CHANGED
|
@@ -58,17 +58,21 @@ interface CopyButtonProps extends Omit<ButtonProps, "onClick" | "children" | "on
|
|
|
58
58
|
/** Fired after a successful clipboard write. */
|
|
59
59
|
onValueCopy?: (value: string) => void;
|
|
60
60
|
onCopyError?: (error: unknown) => void;
|
|
61
|
-
/** Shown on the button before copy / when reset. */
|
|
61
|
+
/** Shown on the button before copy / when reset. Omit for icon-only (uses `copyIcon`). */
|
|
62
62
|
copyLabel?: React.ReactNode;
|
|
63
|
-
/** Shown on the button briefly after a successful copy. */
|
|
63
|
+
/** Shown on the button briefly after a successful copy (label mode). */
|
|
64
64
|
copiedLabel?: React.ReactNode;
|
|
65
|
-
/**
|
|
65
|
+
/** Icon before copy / when reset (icon-only mode). */
|
|
66
|
+
copyIcon?: React.ReactNode;
|
|
67
|
+
/** Icon briefly after a successful copy (icon-only mode). */
|
|
68
|
+
copiedIcon?: React.ReactNode;
|
|
69
|
+
/** How long to show the copied state on the button (ms). */
|
|
66
70
|
timeout?: number;
|
|
67
71
|
/** Wraps the button in a `Tooltip` when true. */
|
|
68
72
|
tooltip?: boolean;
|
|
69
|
-
/** Tooltip body when idle; defaults to `copyLabel`. */
|
|
73
|
+
/** Tooltip body when idle; defaults to `copyLabel` or `"Copy"`. */
|
|
70
74
|
tooltipLabel?: React.ReactNode;
|
|
71
|
-
/** Tooltip body after copy; defaults to `copiedLabel`. */
|
|
75
|
+
/** Tooltip body after copy; defaults to `copiedLabel` or `"Copied!"`. */
|
|
72
76
|
tooltipCopiedLabel?: React.ReactNode;
|
|
73
77
|
/** @deprecated Use `tooltipLabel`. */
|
|
74
78
|
tooltipContent?: React.ReactNode;
|
|
@@ -538,18 +542,22 @@ declare namespace Upload {
|
|
|
538
542
|
interface InlineEditProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
|
|
539
543
|
value?: string;
|
|
540
544
|
defaultValue?: string;
|
|
541
|
-
onSave?: (value: string) => void
|
|
545
|
+
onSave?: (value: string) => void | Promise<void>;
|
|
542
546
|
onCancel?: () => void;
|
|
543
547
|
placeholder?: string;
|
|
544
548
|
disabled?: boolean;
|
|
549
|
+
/** Disables editing controls while a save is in progress (use with async `onSave` or control externally). */
|
|
550
|
+
loading?: boolean;
|
|
545
551
|
required?: boolean;
|
|
546
552
|
validate?: boolean | ((value: string) => string | undefined);
|
|
547
553
|
editTrigger?: "click" | "doubleClick";
|
|
548
554
|
saveOnBlur?: boolean;
|
|
549
555
|
saveOnEnter?: boolean;
|
|
556
|
+
saveButtonProps?: Partial<ButtonProps>;
|
|
557
|
+
cancelButtonProps?: Partial<ButtonProps>;
|
|
550
558
|
className?: string;
|
|
551
559
|
}
|
|
552
|
-
declare function InlineEdit({ value, defaultValue, onSave, onCancel, placeholder, disabled, required, validate, editTrigger, saveOnBlur, saveOnEnter, className, ...rest }: InlineEditProps): react_jsx_runtime.JSX.Element;
|
|
560
|
+
declare function InlineEdit({ value, defaultValue, onSave, onCancel, placeholder, disabled, loading, required, validate, editTrigger, saveOnBlur, saveOnEnter, saveButtonProps, cancelButtonProps, className, ...rest }: InlineEditProps): react_jsx_runtime.JSX.Element;
|
|
553
561
|
declare namespace InlineEdit {
|
|
554
562
|
var displayName: string;
|
|
555
563
|
}
|
|
@@ -673,7 +681,7 @@ declare namespace Form {
|
|
|
673
681
|
var displayName: string;
|
|
674
682
|
}
|
|
675
683
|
|
|
676
|
-
type FormFieldType = "text" | "email" | "password" | "number" | "url" | "search" | "textarea";
|
|
684
|
+
type FormFieldType = "text" | "email" | "password" | "number" | "url" | "search" | "textarea" | "select" | "checkbox" | "upload";
|
|
677
685
|
interface FormFieldProps {
|
|
678
686
|
name: string;
|
|
679
687
|
type?: FormFieldType;
|
|
@@ -684,10 +692,23 @@ interface FormFieldProps {
|
|
|
684
692
|
value?: string;
|
|
685
693
|
defaultValue?: string;
|
|
686
694
|
onChange?: (value: string) => void;
|
|
695
|
+
/** Called after the field value updates (select, checkbox, and text inputs). */
|
|
696
|
+
onValueChange?: (value: string) => void;
|
|
687
697
|
validate?: boolean | ((value: string) => string | undefined);
|
|
688
698
|
errorMessage?: string;
|
|
689
699
|
touched?: boolean;
|
|
690
700
|
showError?: boolean;
|
|
701
|
+
/** Select options when `type="select"`. */
|
|
702
|
+
items?: SelectOption[];
|
|
703
|
+
rows?: number;
|
|
704
|
+
/** Upload options when `type="upload"`. */
|
|
705
|
+
accept?: string;
|
|
706
|
+
dragAndDrop?: boolean;
|
|
707
|
+
multiple?: boolean;
|
|
708
|
+
maxSize?: number;
|
|
709
|
+
maxFiles?: number;
|
|
710
|
+
loading?: boolean;
|
|
711
|
+
onUpload?: (files: File[]) => void | Promise<void>;
|
|
691
712
|
render?: (props: FormFieldRenderProps) => React.ReactNode;
|
|
692
713
|
children?: React.ReactNode;
|
|
693
714
|
className?: string;
|
|
@@ -695,7 +716,7 @@ interface FormFieldProps {
|
|
|
695
716
|
labelProps?: Record<string, unknown>;
|
|
696
717
|
helperTextProps?: Record<string, unknown>;
|
|
697
718
|
}
|
|
698
|
-
declare function FormField({ name, type, label, placeholder, required, disabled, value: valueProp, defaultValue, onChange: onChangeProp, validate, errorMessage, touched: touchedProp, showError, render, children, className, inputProps, }: FormFieldProps): react_jsx_runtime.JSX.Element;
|
|
719
|
+
declare function FormField({ name, type, label, placeholder, required, disabled, value: valueProp, defaultValue, onChange: onChangeProp, validate, errorMessage, touched: touchedProp, showError, render, children, className, inputProps, onValueChange, items, rows, accept, dragAndDrop, multiple, maxSize, maxFiles, loading, onUpload, }: FormFieldProps): react_jsx_runtime.JSX.Element;
|
|
699
720
|
declare namespace FormField {
|
|
700
721
|
var displayName: string;
|
|
701
722
|
}
|
|
@@ -1148,6 +1169,56 @@ declare namespace Collapsible {
|
|
|
1148
1169
|
var displayName: string;
|
|
1149
1170
|
}
|
|
1150
1171
|
|
|
1172
|
+
/** Side the panel shrinks toward when closed. */
|
|
1173
|
+
type CollapsiblePanelCloseDirection = "left" | "right" | "top" | "bottom";
|
|
1174
|
+
type CollapsiblePanelCrossAxis = "full" | "parent" | "viewport";
|
|
1175
|
+
type CollapsiblePanelVariant = "default" | "inset";
|
|
1176
|
+
type CollapsiblePanelTriggerPlacement = "none" | "header" | "floater";
|
|
1177
|
+
type CollapsiblePanelTriggerVariant = "default" | "pill";
|
|
1178
|
+
declare const collapsiblePanelRootVariants: (props?: ({
|
|
1179
|
+
closeDirection?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
1180
|
+
crossAxis?: "full" | "parent" | "viewport" | null | undefined;
|
|
1181
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1182
|
+
declare const collapsiblePanelSurfaceVariants: (props?: ({
|
|
1183
|
+
closeDirection?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
1184
|
+
variant?: "default" | "inset" | null | undefined;
|
|
1185
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1186
|
+
/** Seam-adjacent floater — derived from close direction + cross-axis centering. */
|
|
1187
|
+
declare const floaterTriggerVariants: (props?: ({
|
|
1188
|
+
closeDirection?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
1189
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1190
|
+
interface CollapsiblePanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
1191
|
+
open?: boolean;
|
|
1192
|
+
defaultOpen?: boolean;
|
|
1193
|
+
onOpenChange?: (open: boolean) => void;
|
|
1194
|
+
/** Side the panel collapses toward — width shrinks for `left`/`right`, height for `top`/`bottom`. */
|
|
1195
|
+
closeDirection?: CollapsiblePanelCloseDirection;
|
|
1196
|
+
/** Expanded size on the collapse axis. */
|
|
1197
|
+
size?: string | number;
|
|
1198
|
+
/**
|
|
1199
|
+
* Collapsed size on the collapse axis.
|
|
1200
|
+
* Default when omitted: `0` for `triggerPlacement` `none` / `floater`; icon-rail width for `header`.
|
|
1201
|
+
*/
|
|
1202
|
+
collapsedSize?: string | number;
|
|
1203
|
+
/** Cross-axis sizing — height when collapsing horizontally, width when collapsing vertically. */
|
|
1204
|
+
crossAxis?: CollapsiblePanelCrossAxis;
|
|
1205
|
+
trigger?: React.ReactNode;
|
|
1206
|
+
triggerPlacement?: CollapsiblePanelTriggerPlacement;
|
|
1207
|
+
/** Floater toggle surface — `pill` matches compact seam handles in editor layouts. */
|
|
1208
|
+
triggerVariant?: CollapsiblePanelTriggerVariant;
|
|
1209
|
+
toggleButtonProps?: Partial<ButtonProps>;
|
|
1210
|
+
header?: React.ReactNode;
|
|
1211
|
+
footer?: React.ReactNode;
|
|
1212
|
+
scrollable?: boolean;
|
|
1213
|
+
variant?: CollapsiblePanelVariant;
|
|
1214
|
+
surfaceClassName?: string;
|
|
1215
|
+
contentClassName?: string;
|
|
1216
|
+
headerClassName?: string;
|
|
1217
|
+
footerClassName?: string;
|
|
1218
|
+
children?: React.ReactNode;
|
|
1219
|
+
}
|
|
1220
|
+
declare const CollapsiblePanel: React.ForwardRefExoticComponent<CollapsiblePanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
1221
|
+
|
|
1151
1222
|
interface AccordionItem {
|
|
1152
1223
|
value: string;
|
|
1153
1224
|
label: React.ReactNode;
|
|
@@ -1398,6 +1469,9 @@ interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children
|
|
|
1398
1469
|
variant?: VariantProps<typeof tabsListVariants>["variant"];
|
|
1399
1470
|
className?: string;
|
|
1400
1471
|
listClassName?: string;
|
|
1472
|
+
/** Applied to the active tab panel wrapper — use `flex min-h-0 flex-1 flex-col` for editor layouts. */
|
|
1473
|
+
panelClassName?: string;
|
|
1474
|
+
contentClassName?: string;
|
|
1401
1475
|
}
|
|
1402
1476
|
declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
1403
1477
|
|
|
@@ -1648,12 +1722,14 @@ interface HistoryControlButtonsProps extends React.HTMLAttributes<HTMLDivElement
|
|
|
1648
1722
|
/** When false, hides the redo control. Default true. */
|
|
1649
1723
|
showRedo?: boolean;
|
|
1650
1724
|
showLabels?: boolean;
|
|
1725
|
+
/** When false, icon-only buttons render without hover tooltips. Default true. */
|
|
1726
|
+
showTooltips?: boolean;
|
|
1651
1727
|
undoButtonProps?: Partial<ButtonProps>;
|
|
1652
1728
|
redoButtonProps?: Partial<ButtonProps>;
|
|
1653
1729
|
resetButtonProps?: Partial<ButtonProps>;
|
|
1654
1730
|
className?: string;
|
|
1655
1731
|
}
|
|
1656
|
-
declare function HistoryControlButtons({ canUndo, canRedo, canReset, onUndo, onRedo, onReset, showUndo, showRedo, showLabels, undoButtonProps, redoButtonProps, resetButtonProps, className, ...rest }: HistoryControlButtonsProps): react_jsx_runtime.JSX.Element;
|
|
1732
|
+
declare function HistoryControlButtons({ canUndo, canRedo, canReset, onUndo, onRedo, onReset, showUndo, showRedo, showLabels, showTooltips, undoButtonProps, redoButtonProps, resetButtonProps, className, ...rest }: HistoryControlButtonsProps): react_jsx_runtime.JSX.Element;
|
|
1657
1733
|
declare namespace HistoryControlButtons {
|
|
1658
1734
|
var displayName: string;
|
|
1659
1735
|
}
|
|
@@ -1691,27 +1767,25 @@ declare namespace FixedScreenWidget {
|
|
|
1691
1767
|
declare const modalSurfaceVariants: (props?: ({
|
|
1692
1768
|
size?: "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
|
|
1693
1769
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1770
|
+
declare const modalOverlayLayout: (props?: ({
|
|
1771
|
+
align?: "center" | "top" | null | undefined;
|
|
1772
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
1694
1773
|
type ModalSize = NonNullable<VariantProps<typeof modalSurfaceVariants>["size"]>;
|
|
1695
|
-
type
|
|
1696
|
-
|
|
1697
|
-
left?: React.ReactNode;
|
|
1698
|
-
variant?: ButtonProps["variant"];
|
|
1699
|
-
size?: ButtonProps["size"];
|
|
1700
|
-
className?: string;
|
|
1701
|
-
};
|
|
1702
|
-
interface ModalProps extends VariantProps<typeof modalSurfaceVariants> {
|
|
1774
|
+
type ModalAlign = NonNullable<VariantProps<typeof modalOverlayLayout>["align"]>;
|
|
1775
|
+
interface ModalProps extends VariantProps<typeof modalSurfaceVariants>, VariantProps<typeof modalOverlayLayout> {
|
|
1703
1776
|
open?: boolean;
|
|
1704
1777
|
defaultOpen?: boolean;
|
|
1705
1778
|
onOpenChange?: (open: boolean) => void;
|
|
1706
1779
|
onClose?: () => void;
|
|
1707
|
-
triggerProps?: ModalTriggerProps;
|
|
1708
1780
|
header?: React.ReactNode;
|
|
1709
1781
|
footer?: React.ReactNode;
|
|
1710
1782
|
showClose?: boolean;
|
|
1783
|
+
/** When true, backdrop clicks do not close the dialog. */
|
|
1711
1784
|
loading?: boolean;
|
|
1712
1785
|
minHeight?: string | number;
|
|
1713
1786
|
maxHeight?: string | number;
|
|
1714
1787
|
className?: string;
|
|
1788
|
+
overlayClassName?: string;
|
|
1715
1789
|
cardProps?: Omit<CardProps, "header" | "footer" | "children" | "minHeight" | "maxHeight">;
|
|
1716
1790
|
/** Portal target for the backdrop — use `parent` inside `OverlayPortalScope` for scoped previews. */
|
|
1717
1791
|
container?: OverlayPortalContainer;
|
|
@@ -1719,11 +1793,17 @@ interface ModalProps extends VariantProps<typeof modalSurfaceVariants> {
|
|
|
1719
1793
|
}
|
|
1720
1794
|
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
1721
1795
|
|
|
1722
|
-
type
|
|
1723
|
-
|
|
1796
|
+
type ModalTriggerProps = Pick<ButtonProps, "variant" | "size" | "className" | "disabled" | "iconOnly" | "ariaLabel"> & {
|
|
1797
|
+
label?: string;
|
|
1798
|
+
left?: React.ReactNode;
|
|
1724
1799
|
};
|
|
1725
|
-
|
|
1726
|
-
|
|
1800
|
+
interface TriggerModalProps extends ModalProps {
|
|
1801
|
+
/** Custom trigger node — use instead of `triggerProps` for full control. */
|
|
1802
|
+
trigger?: React.ReactNode;
|
|
1803
|
+
triggerProps?: ModalTriggerProps;
|
|
1804
|
+
}
|
|
1805
|
+
/** Modal with an optional trigger — base for ConfirmModal and FormModal. */
|
|
1806
|
+
declare function TriggerModal({ trigger, triggerProps, showClose, open: openProp, defaultOpen, onOpenChange, ...modalProps }: TriggerModalProps): react_jsx_runtime.JSX.Element;
|
|
1727
1807
|
declare namespace TriggerModal {
|
|
1728
1808
|
var displayName: string;
|
|
1729
1809
|
}
|
|
@@ -1757,15 +1837,51 @@ declare namespace ConfirmModal {
|
|
|
1757
1837
|
}
|
|
1758
1838
|
|
|
1759
1839
|
type FormModalMode = "create" | "edit";
|
|
1840
|
+
type FormFieldChangeHelpers = {
|
|
1841
|
+
values: Record<string, unknown>;
|
|
1842
|
+
setValue: (name: string, value: unknown) => void;
|
|
1843
|
+
};
|
|
1844
|
+
/** Passed to `FormFieldSchema.render` / `renderAfter` — form helpers plus field metadata. */
|
|
1845
|
+
type FormFieldSchemaRenderHelpers = FormFieldChangeHelpers & {
|
|
1846
|
+
name: string;
|
|
1847
|
+
field: FormFieldRenderProps;
|
|
1848
|
+
errorMessage?: string;
|
|
1849
|
+
disabled?: boolean;
|
|
1850
|
+
};
|
|
1760
1851
|
type FormFieldSchema = {
|
|
1761
1852
|
name: string;
|
|
1762
1853
|
type?: FormFieldType;
|
|
1763
|
-
label?:
|
|
1764
|
-
placeholder?: string;
|
|
1854
|
+
label?: React.ReactNode;
|
|
1855
|
+
placeholder?: string | ((values: Record<string, unknown>) => string);
|
|
1765
1856
|
required?: boolean;
|
|
1766
1857
|
disabled?: boolean;
|
|
1767
1858
|
validate?: boolean | ((value: string) => string | undefined);
|
|
1768
|
-
errorMessage?: string;
|
|
1859
|
+
errorMessage?: string | ((values: Record<string, unknown>) => string | undefined);
|
|
1860
|
+
/** Select options — static array or derived from current form values. */
|
|
1861
|
+
items?: SelectOption[] | ((values: Record<string, unknown>) => SelectOption[]);
|
|
1862
|
+
/** Hide the field unless this returns true. */
|
|
1863
|
+
showWhen?: (values: Record<string, unknown>) => boolean;
|
|
1864
|
+
/** Side effects after value change (e.g. reset dependent fields). */
|
|
1865
|
+
onValueChange?: (value: string, helpers: FormFieldChangeHelpers) => void;
|
|
1866
|
+
rows?: number;
|
|
1867
|
+
/** Upload field options when `type="upload"`. */
|
|
1868
|
+
accept?: string;
|
|
1869
|
+
dragAndDrop?: boolean;
|
|
1870
|
+
multiple?: boolean;
|
|
1871
|
+
maxSize?: number;
|
|
1872
|
+
maxFiles?: number;
|
|
1873
|
+
loading?: boolean;
|
|
1874
|
+
onUpload?: (files: File[], helpers: FormFieldChangeHelpers) => void | Promise<void>;
|
|
1875
|
+
/**
|
|
1876
|
+
* Full custom field UI — replaces auto-render for this schema row.
|
|
1877
|
+
* Receives form helpers and the resolved field control props.
|
|
1878
|
+
*/
|
|
1879
|
+
render?: (helpers: FormFieldSchemaRenderHelpers) => React.ReactNode;
|
|
1880
|
+
/**
|
|
1881
|
+
* Renders below the auto-rendered control (e.g. VariablePills under a textarea).
|
|
1882
|
+
* Ignored when `render` is set.
|
|
1883
|
+
*/
|
|
1884
|
+
renderAfter?: (helpers: FormFieldSchemaRenderHelpers) => React.ReactNode;
|
|
1769
1885
|
};
|
|
1770
1886
|
interface FormModalProps extends Omit<TriggerModalProps, "header" | "footer" | "children" | "triggerProps"> {
|
|
1771
1887
|
triggerProps?: ModalTriggerProps;
|
|
@@ -2013,10 +2129,26 @@ interface ListItem {
|
|
|
2013
2129
|
action?: React.ReactNode;
|
|
2014
2130
|
disabled?: boolean;
|
|
2015
2131
|
selected?: boolean;
|
|
2132
|
+
/** Matched against selected filter chip values (`filterChips`). */
|
|
2133
|
+
filterKeys?: string[];
|
|
2134
|
+
/** Render `label` as-is without default row chrome (grid cards, etc.). */
|
|
2135
|
+
custom?: boolean;
|
|
2016
2136
|
}
|
|
2017
2137
|
type ListLayout = "list" | "grid";
|
|
2018
2138
|
/** Default filter: case-insensitive match on `label`, `description`, and `value`. */
|
|
2019
2139
|
declare function defaultListItemFilter(items: readonly ListItem[], query: string): ListItem[];
|
|
2140
|
+
/** Default chip filter: OR match on `item.filterKeys`; items without keys always pass. */
|
|
2141
|
+
declare function defaultListChipFilter(items: readonly ListItem[], selected: readonly string[]): ListItem[];
|
|
2142
|
+
type ListFilterChipsConfig = Omit<PillGroupProps, "items" | "value" | "defaultValue" | "onChange" | "selectable"> & {
|
|
2143
|
+
items: PillItem[];
|
|
2144
|
+
value?: string[];
|
|
2145
|
+
defaultValue?: string[];
|
|
2146
|
+
onChange?: (next: string[]) => void;
|
|
2147
|
+
/** Replace built-in OR match on `item.filterKeys`. */
|
|
2148
|
+
filter?: (items: readonly ListItem[], selected: readonly string[]) => readonly ListItem[];
|
|
2149
|
+
/** When false, chips render but do not filter rows. Default true. */
|
|
2150
|
+
filterItems?: boolean;
|
|
2151
|
+
};
|
|
2020
2152
|
type ListSearchConfig = Omit<Partial<SearchInputProps>, "value" | "defaultValue" | "onChange" | "onSearch" | "onClear"> & {
|
|
2021
2153
|
/** Replace built-in label/description/value matching. */
|
|
2022
2154
|
filter?: (items: readonly ListItem[], query: string) => readonly ListItem[];
|
|
@@ -2047,6 +2179,14 @@ interface ListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children
|
|
|
2047
2179
|
/** Shown when search is active and nothing matches. */
|
|
2048
2180
|
noResultsState?: React.ReactNode;
|
|
2049
2181
|
loading?: boolean;
|
|
2182
|
+
/** Replaces default loading copy when `loading` is true. */
|
|
2183
|
+
loadingState?: React.ReactNode;
|
|
2184
|
+
/** Replaces list body (search/chips chrome still render). */
|
|
2185
|
+
errorState?: React.ReactNode;
|
|
2186
|
+
/** Optional filter chips above the list body — pairs with `ListItem.filterKeys`. */
|
|
2187
|
+
filterChips?: ListFilterChipsConfig;
|
|
2188
|
+
/** Override default row rendering. */
|
|
2189
|
+
renderItem?: (item: ListItem, index: number) => React.ReactNode;
|
|
2050
2190
|
children?: React.ReactNode;
|
|
2051
2191
|
/** Prepended above search (if any) and the list body. */
|
|
2052
2192
|
header?: React.ReactNode;
|
|
@@ -2639,4 +2779,4 @@ declare function getCurrentCSSVariables(): Record<string, string>;
|
|
|
2639
2779
|
*/
|
|
2640
2780
|
declare function applyThemeSync(): void;
|
|
2641
2781
|
|
|
2642
|
-
export { Accordion, type AccordionItem, type AccordionProps, Alert, AlertDialog, type AlertDialogCancelProps, type AlertDialogConfirmProps, type AlertDialogProps, type AlertProps, AppShell, type AppShellProps, AspectRatio, type AspectRatioProps, AuthLayout, type AuthLayoutProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, BarChart, type BarChartProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarProps, type CalendarSelectionMode, Card, type CardColor, type CardProps, type CardVariant, Carousel, type CarouselItem, type CarouselProps, Chart, type ChartProps, type ChartType, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, Command, type CommandItem, type CommandProps, ConfirmModal, type ConfirmModalCancelProps, type ConfirmModalConfirmProps, type ConfirmModalIntent, type ConfirmModalProps, ContextMenu, type ContextMenuProps, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, type DatePreset, DateRangePicker, type DateRangePickerProps, type DescriptionItem, DescriptionList, type DescriptionListProps, Drawer, type DrawerPlacement, type DrawerProps, type DrawerSize, type DrawerVariant, Dropdown, type DropdownItem, type DropdownProps, EmptyState, type EmptyStateAction, type EmptyStateProps, ErrorBoundary, type ErrorBoundaryProps, FAB, type FABProps, FieldLayout, type FieldLayoutProps, type FieldSurfaceProps, FixedScreenWidget, type FixedScreenWidgetPosition, type FixedScreenWidgetProps, type FixedScreenWidgetSlideFrom, Form, FormField, type FormFieldProps, type FormFieldRenderProps, type FormFieldSchema, type FormFieldType, FormModal, type FormModalMode, type FormModalProps, type FormProps, type FormValues, Grid, type GridProps, type GridRootTag, HelperText, type HelperTextProps, Hero, type HeroActions, type HeroProps, HistoryControlButtons, type HistoryControlButtonsProps, HoverCard, type HoverCardProps, type HoverCardTriggerProps, Icon, type IconProps, Image, type ImageProps, InlineEdit, type InlineEditProps, InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputOTP, type InputOTPProps, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, Label, type LabelProps, LineChart, type LineChartProps, Link, type LinkProps, List, type ListItem, type ListLayout, type ListProps, type ListSearchConfig, LoadingOverlay, type LoadingOverlayProps, Menubar, type MenubarMenu, type MenubarProps, Modal, type ModalProps, type ModalSize, type ModalTriggerProps, type NavItem, type NavMenuItem, Navbar, type NavbarProps, NavigationMenu, type NavigationMenuProps, Overlay, type OverlayPortalContainer, OverlayPortalScope, type OverlayProps, PageFooter, type PageFooterProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, PhoneInput, type PhoneInputProps, type PhoneValue, PieChart, type PieChartProps, Pill, PillGroup, type PillGroupProps, type PillItem, type PillProps, Popover, type PopoverPlacement, type PopoverProps, type PopoverTriggerProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupItem, type RadioGroupProps, type RadioProps, Rating, type RatingPrecision, type RatingProps, ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, ResizeContainer, type ResizeContainerProps, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sidebar, type SidebarItem, type SidebarProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SortDirection, Spinner, type SpinnerProps, type SpinnerSize, SplitButton, type SplitButtonMenuItem, type SplitButtonProps, Stack, type StackProps, type StackRootTag, type StepItem, type StepStatus, Stepper, type StepperProps, type StringFieldValidateOpts, THEME_CATEGORY_ORDER, type TabItem, Table, type TableColumn, type TableColumnAlign, type TableProps, TableSkeleton, type TableSkeletonProps, Tabs, type TabsProps, Tag, type TagProps, type TagSurfaceVariant, Text, TextInput, type TextInputProps, type TextProps, Textarea, type TextareaProps, type ThemeMetadata$1 as ThemeMetadata, ThemePanel, type ThemePanelProps, type ThemePreset, type ThemeSelection, ThemeToggle, type ThemeToggleProps, TimePicker, type TimePickerProps, Toast, type ToastAction, type ToastProps, type ToastTone, type ToastVariant, Toaster, type ToasterPosition, type ToasterProps, Toggle, type ToggleProps, Tooltip, type TooltipPlacement, type TooltipProps, TooltipProvider, type TooltipProviderProps, type TreeAddRelation, type TreeItem, type TreeItemKind, type TreeMovePosition, TreeView, type TreeViewProps, TriggerModal, type TriggerModalProps, Upload, type UploadProps, Video, type VideoProps, VisuallyHidden, type VisuallyHiddenProps, addTreeNodeChild, addTreeNodeSibling, alertDialogVariants, alertVariants, applyPreset, applyThemeSync, pillSurfaceVariants as badgeVariants, buttonVariants, cardVariants, clearToasts, defaultListItemFilter, deleteTreeNode, descriptionListVariants, disabledControl, dismissToast, drawerVariants, emptyStateVariants, enableDebugMode, fieldSurfaceVariants, focusRing, focusRingDestructive, focusRingOffset, formatAspectRatioLabel, getCurrentCSSVariables, getPhoneDialCode, getStringFieldValidationError, getTheme, getThemeCategories, getThemeFilePath, getThemesForCategory, gridSpacingVariants as gridVariants, heroVariants, iconVariants, linkVariants, modalSurfaceVariants, moveTreeNode, navbarVariants, overlayVariants, pageFooterVariants, pageHeaderVariants, peerFocusRing, pillSurfaceVariants as pillVariants, ratingVariants, registerTheme, registerThemeFromFile, ringOffsetBackground, sidebarVariants, stackVariants, textVariants, toast, toastVariants, toggleThumbVariants, toggleVariants, tooltipArrowVariants, tooltipContentVariants, useFormContext, useTheme, useThemeToggle };
|
|
2782
|
+
export { Accordion, type AccordionItem, type AccordionProps, Alert, AlertDialog, type AlertDialogCancelProps, type AlertDialogConfirmProps, type AlertDialogProps, type AlertProps, AppShell, type AppShellProps, AspectRatio, type AspectRatioProps, AuthLayout, type AuthLayoutProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, BarChart, type BarChartProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarProps, type CalendarSelectionMode, Card, type CardColor, type CardProps, type CardVariant, Carousel, type CarouselItem, type CarouselProps, Chart, type ChartProps, type ChartType, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsiblePanel, type CollapsiblePanelCloseDirection, type CollapsiblePanelCrossAxis, type CollapsiblePanelProps, type CollapsiblePanelTriggerPlacement, type CollapsiblePanelTriggerVariant, type CollapsiblePanelVariant, type CollapsibleProps, Command, type CommandItem, type CommandProps, ConfirmModal, type ConfirmModalCancelProps, type ConfirmModalConfirmProps, type ConfirmModalIntent, type ConfirmModalProps, ContextMenu, type ContextMenuProps, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, type DatePreset, DateRangePicker, type DateRangePickerProps, type DescriptionItem, DescriptionList, type DescriptionListProps, Drawer, type DrawerPlacement, type DrawerProps, type DrawerSize, type DrawerVariant, Dropdown, type DropdownItem, type DropdownProps, EmptyState, type EmptyStateAction, type EmptyStateProps, ErrorBoundary, type ErrorBoundaryProps, FAB, type FABProps, FieldLayout, type FieldLayoutProps, type FieldSurfaceProps, FixedScreenWidget, type FixedScreenWidgetPosition, type FixedScreenWidgetProps, type FixedScreenWidgetSlideFrom, Form, FormField, type FormFieldChangeHelpers, type FormFieldProps, type FormFieldRenderProps, type FormFieldSchema, type FormFieldSchemaRenderHelpers, type FormFieldType, FormModal, type FormModalMode, type FormModalProps, type FormProps, type FormValues, Grid, type GridProps, type GridRootTag, HelperText, type HelperTextProps, Hero, type HeroActions, type HeroProps, HistoryControlButtons, type HistoryControlButtonsProps, HoverCard, type HoverCardProps, type HoverCardTriggerProps, Icon, type IconProps, Image, type ImageProps, InlineEdit, type InlineEditProps, InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputOTP, type InputOTPProps, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, Label, type LabelProps, LineChart, type LineChartProps, Link, type LinkProps, List, type ListFilterChipsConfig, type ListItem, type ListLayout, type ListProps, type ListSearchConfig, LoadingOverlay, type LoadingOverlayProps, Menubar, type MenubarMenu, type MenubarProps, Modal, type ModalAlign, type ModalProps, type ModalSize, type ModalTriggerProps, type NavItem, type NavMenuItem, Navbar, type NavbarProps, NavigationMenu, type NavigationMenuProps, Overlay, type OverlayPortalContainer, OverlayPortalScope, type OverlayProps, PageFooter, type PageFooterProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, PhoneInput, type PhoneInputProps, type PhoneValue, PieChart, type PieChartProps, Pill, PillGroup, type PillGroupProps, type PillItem, type PillProps, Popover, type PopoverPlacement, type PopoverProps, type PopoverTriggerProps, Progress, type ProgressProps, Radio, RadioGroup, type RadioGroupItem, type RadioGroupProps, type RadioProps, Rating, type RatingPrecision, type RatingProps, ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, ResizeContainer, type ResizeContainerProps, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sidebar, type SidebarItem, type SidebarProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SortDirection, Spinner, type SpinnerProps, type SpinnerSize, SplitButton, type SplitButtonMenuItem, type SplitButtonProps, Stack, type StackProps, type StackRootTag, type StepItem, type StepStatus, Stepper, type StepperProps, type StringFieldValidateOpts, THEME_CATEGORY_ORDER, type TabItem, Table, type TableColumn, type TableColumnAlign, type TableProps, TableSkeleton, type TableSkeletonProps, Tabs, type TabsProps, Tag, type TagProps, type TagSurfaceVariant, Text, TextInput, type TextInputProps, type TextProps, Textarea, type TextareaProps, type ThemeMetadata$1 as ThemeMetadata, ThemePanel, type ThemePanelProps, type ThemePreset, type ThemeSelection, ThemeToggle, type ThemeToggleProps, TimePicker, type TimePickerProps, Toast, type ToastAction, type ToastProps, type ToastTone, type ToastVariant, Toaster, type ToasterPosition, type ToasterProps, Toggle, type ToggleProps, Tooltip, type TooltipPlacement, type TooltipProps, TooltipProvider, type TooltipProviderProps, type TreeAddRelation, type TreeItem, type TreeItemKind, type TreeMovePosition, TreeView, type TreeViewProps, TriggerModal, type TriggerModalProps, Upload, type UploadProps, Video, type VideoProps, VisuallyHidden, type VisuallyHiddenProps, addTreeNodeChild, addTreeNodeSibling, alertDialogVariants, alertVariants, applyPreset, applyThemeSync, pillSurfaceVariants as badgeVariants, buttonVariants, cardVariants, clearToasts, collapsiblePanelRootVariants, collapsiblePanelSurfaceVariants, defaultListChipFilter, defaultListItemFilter, deleteTreeNode, descriptionListVariants, disabledControl, dismissToast, drawerVariants, emptyStateVariants, enableDebugMode, fieldSurfaceVariants, floaterTriggerVariants, focusRing, focusRingDestructive, focusRingOffset, formatAspectRatioLabel, getCurrentCSSVariables, getPhoneDialCode, getStringFieldValidationError, getTheme, getThemeCategories, getThemeFilePath, getThemesForCategory, gridSpacingVariants as gridVariants, heroVariants, iconVariants, linkVariants, modalOverlayLayout, modalSurfaceVariants, moveTreeNode, navbarVariants, overlayVariants, pageFooterVariants, pageHeaderVariants, peerFocusRing, pillSurfaceVariants as pillVariants, ratingVariants, registerTheme, registerThemeFromFile, ringOffsetBackground, sidebarVariants, stackVariants, textVariants, toast, toastVariants, toggleThumbVariants, toggleVariants, tooltipArrowVariants, tooltipContentVariants, useFormContext, useTheme, useThemeToggle };
|