@czi-sds/components 23.9.0 → 24.1.0
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 +3 -3
- package/dist/index.cjs.d.ts +146 -36
- package/dist/index.cjs.js +185 -159
- package/dist/index.esm.d.ts +146 -36
- package/dist/index.esm.js +186 -160
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `@czi-sds/components`
|
|
2
2
|
|
|
3
|
-
React component library for the [Science Design System (SDS)](https://
|
|
3
|
+
React component library for the [Science Design System (SDS)](https://chanzuckerberg.github.io/sci-components/). Built on **Material UI v9**.
|
|
4
4
|
|
|
5
5
|
Full documentation (usage, theming, scripts, contributing) lives in the [repository README](https://github.com/chanzuckerberg/sci-components#readme).
|
|
6
6
|
|
|
@@ -30,13 +30,13 @@ yarn add @czi-sds/components @emotion/css @emotion/react @emotion/styled @mui/ma
|
|
|
30
30
|
|
|
31
31
|
## Migrating to SDS 24.0.0
|
|
32
32
|
|
|
33
|
-
SDS `24.0.0` is a **breaking release** that moves the Material UI peer dependency from v5 to v9. Follow the step-by-step guide:
|
|
33
|
+
SDS `24.0.0` is a **breaking release** that moves the Material UI peer dependency from v5 to v9. Follow the step-by-step guide to upgrade the SDS version:
|
|
34
34
|
|
|
35
35
|
→ [Migration guide](https://github.com/chanzuckerberg/sci-components/blob/main/migration-docs/migrate-to-24.0.0.md)
|
|
36
36
|
|
|
37
37
|
## Links
|
|
38
38
|
|
|
39
|
-
- [Design
|
|
39
|
+
- [Design system documentation](https://chanzuckerberg.github.io/sci-components/)
|
|
40
40
|
- [Full repo docs](https://github.com/chanzuckerberg/sci-components#readme)
|
|
41
41
|
- [npm package](https://www.npmjs.com/package/@czi-sds/components)
|
|
42
42
|
- [Material UI API docs](https://mui.com/)
|
package/dist/index.cjs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AccordionDetailsProps, AccordionProps as AccordionProps$1, AccordionSummaryProps, AlertProps, AppBarProps, AutocompleteChangeDetails, AutocompleteChangeReason, AutocompleteCloseReason, AutocompleteInputChangeReason, AutocompleteProps as AutocompleteProps$1, AutocompleteRenderInputParams, AutocompleteValue, ButtonGroupProps as ButtonGroupProps$1, ButtonProps as ButtonProps$1, CardMedia, CardMediaProps, CardProps, CheckboxProps as CheckboxProps$1, ChipProps as ChipProps$1, ClickAwayListenerProps, DialogActionsProps as DialogActionsProps$1, DialogContentProps as DialogContentProps$1, DialogProps as DialogProps$1, DialogTitleProps as DialogTitleProps$1, DrawerProps, IconButtonProps as IconButtonProps$1, LinkProps as LinkProps$1, ListItemProps as ListItemProps$1, ListProps as ListProps$1, ListSubheaderProps as ListSubheaderProps$1, MenuItemProps as MenuItemProps$1, MenuProps as MenuProps$1, PaletteMode, PaperProps, PopoverProps as PopoverProps$1, PopperProps, RadioProps as RadioProps$1, SliderProps, SwitchProps, TabProps as TabProps$1, TabsProps as TabsProps$1, TextFieldProps, ToggleButtonGroupProps, TooltipProps as TooltipProps$1 } from "@mui/material";
|
|
2
|
+
import { AccordionDetailsProps, AccordionProps as AccordionProps$1, AccordionSummaryProps, AlertProps, AppBarProps, AutocompleteChangeDetails, AutocompleteChangeReason, AutocompleteCloseReason, AutocompleteInputChangeReason, AutocompleteProps as AutocompleteProps$1, AutocompleteRenderInputParams, AutocompleteValue, ButtonGroupProps as ButtonGroupProps$1, ButtonProps as ButtonProps$1, CardMedia, CardMediaProps, CardProps, CheckboxProps as CheckboxProps$1, ChipProps as ChipProps$1, ClickAwayListenerProps, DialogActionsProps as DialogActionsProps$1, DialogContentProps as DialogContentProps$1, DialogProps as DialogProps$1, DialogTitleProps as DialogTitleProps$1, DrawerProps, IconButtonProps as IconButtonProps$1, LinkProps as LinkProps$1, ListItemProps as ListItemProps$1, ListProps as ListProps$1, ListSubheaderProps as ListSubheaderProps$1, MenuItemProps as MenuItemProps$1, MenuProps as MenuProps$1, PaletteMode, PaperProps, PopoverProps as PopoverProps$1, PopperProps, RadioProps as RadioProps$1, SlideProps, SliderProps, SwitchProps, TabProps as TabProps$1, TabsProps as TabsProps$1, TextFieldProps, ToggleButtonGroupProps, TooltipProps as TooltipProps$1 } from "@mui/material";
|
|
3
3
|
import React$1, { CSSProperties, ComponentType, ElementType, HTMLAttributeAnchorTarget, HTMLAttributes, ReactElement, ReactNode, SyntheticEvent } from "react";
|
|
4
4
|
import { Breakpoints, PaletteOptions, Theme as Theme$1, ThemeOptions, TypographyStyle } from "@mui/material/styles";
|
|
5
5
|
import { SerializedStyles } from "@emotion/react";
|
|
@@ -541,7 +541,7 @@ declare const getBreakpoints: ({
|
|
|
541
541
|
declare function focusVisibleA11yStyle(props: CommonThemeProps): string;
|
|
542
542
|
//#endregion
|
|
543
543
|
//#region src/core/styles/common/mixins/fonts.d.ts
|
|
544
|
-
declare const fontBody: <W extends "
|
|
544
|
+
declare const fontBody: <W extends "medium" | "regular" | "semibold">(fontSize: keyof {
|
|
545
545
|
regular: {
|
|
546
546
|
l: import("@mui/material").CSSProperties;
|
|
547
547
|
m: import("@mui/material").CSSProperties;
|
|
@@ -621,7 +621,7 @@ declare const fontHeaderS: (props: CommonThemeProps) => SerializedStyles | null;
|
|
|
621
621
|
declare const fontHeaderXs: (props: CommonThemeProps) => SerializedStyles | null;
|
|
622
622
|
declare const fontHeaderXxs: (props: CommonThemeProps) => SerializedStyles | null;
|
|
623
623
|
declare const fontHeaderXxxs: (props: CommonThemeProps) => SerializedStyles | null;
|
|
624
|
-
declare const fontCode: <W extends "
|
|
624
|
+
declare const fontCode: <W extends "medium" | "regular" | "semibold">(fontSize: keyof {
|
|
625
625
|
regular: {
|
|
626
626
|
s: import("@mui/material").CSSProperties;
|
|
627
627
|
xs: import("@mui/material").CSSProperties;
|
|
@@ -641,7 +641,7 @@ declare const fontCodeMediumXs: (props: CommonThemeProps) => SerializedStyles |
|
|
|
641
641
|
declare const fontCodeMediumS: (props: CommonThemeProps) => SerializedStyles | null;
|
|
642
642
|
declare const fontCodeSemiboldXs: (props: CommonThemeProps) => SerializedStyles | null;
|
|
643
643
|
declare const fontCodeSemiboldS: (props: CommonThemeProps) => SerializedStyles | null;
|
|
644
|
-
declare const fontTabular: <W extends "
|
|
644
|
+
declare const fontTabular: <W extends "medium" | "regular" | "semibold">(fontSize: keyof {
|
|
645
645
|
regular: {
|
|
646
646
|
s: import("@mui/material").CSSProperties;
|
|
647
647
|
xs: import("@mui/material").CSSProperties;
|
|
@@ -689,7 +689,7 @@ declare const fontTitle: <W extends "bold">(fontSize: keyof {
|
|
|
689
689
|
declare const fontTitleBoldS: (props: CommonThemeProps) => SerializedStyles | null;
|
|
690
690
|
declare const fontTitleBoldM: (props: CommonThemeProps) => SerializedStyles | null;
|
|
691
691
|
declare const fontTitleBoldL: (props: CommonThemeProps) => SerializedStyles | null;
|
|
692
|
-
declare const fontLink: <W extends "
|
|
692
|
+
declare const fontLink: <W extends "medium" | "regular" | "semibold">(fontSize: keyof {
|
|
693
693
|
regular: {
|
|
694
694
|
l: import("@mui/material").CSSProperties;
|
|
695
695
|
m: import("@mui/material").CSSProperties;
|
|
@@ -922,6 +922,19 @@ interface SdsIconWithColor {
|
|
|
922
922
|
type IconProps<IconName extends keyof IconNameToSizes> = IconExtraProps<IconName> & SdsIconWithColor;
|
|
923
923
|
/**
|
|
924
924
|
* @see https://mui.com/material-ui/icons/#icons
|
|
925
|
+
*
|
|
926
|
+
* @deprecated
|
|
927
|
+
* This component is deprecated and will be removed in a future major version.
|
|
928
|
+
* SDS icons come from Phosphor now: import the icon you need from
|
|
929
|
+
* `@phosphor-icons/react`, or from `@czi-sds/icons` for the icons SDS draws
|
|
930
|
+
* itself. Both take the same props, so the only difference is the import.
|
|
931
|
+
*
|
|
932
|
+
* ```tsx
|
|
933
|
+
* // Before
|
|
934
|
+
* <Icon sdsIcon="InfoCircle" sdsSize="l" />
|
|
935
|
+
* // After
|
|
936
|
+
* <InfoIcon size={24} />
|
|
937
|
+
* ```
|
|
925
938
|
*/
|
|
926
939
|
declare const Icon: import("react").ForwardRefExoticComponent<IconExtraProps<keyof IconNameToSizes> & SdsIconWithColor & import("react").RefAttributes<HTMLDivElement | null>>;
|
|
927
940
|
//#endregion
|
|
@@ -956,7 +969,7 @@ type InputSearchProps = TextFieldProps & AccessibleInputSearchProps & InputSearc
|
|
|
956
969
|
/**
|
|
957
970
|
* @see https://mui.com/material-ui/react-text-field/
|
|
958
971
|
*/
|
|
959
|
-
declare const InputSearch: React$1.ForwardRefExoticComponent<(Omit<import("@mui/material").
|
|
972
|
+
declare const InputSearch: React$1.ForwardRefExoticComponent<(Omit<import("@mui/material").FilledTextFieldProps & AccessibleInputSearchProps & InputSearchExtraProps, "ref"> | Omit<import("@mui/material").OutlinedTextFieldProps & AccessibleInputSearchProps & InputSearchExtraProps, "ref"> | Omit<import("@mui/material").StandardTextFieldProps & AccessibleInputSearchProps & InputSearchExtraProps, "ref">) & React$1.RefAttributes<HTMLDivElement>>;
|
|
960
973
|
//#endregion
|
|
961
974
|
//#region src/core/MenuItem/index.d.ts
|
|
962
975
|
type ModifiedIconNameToSizes = { [K in keyof IconNameToSizes]: IconNameToSizes[K] extends "xs" | "s" | "l" | "xl" ? IconNameToSizes[K] extends "l" | "xl" ? "l" | "xl" : "xs" | "s" : IconNameToSizes[K] };
|
|
@@ -990,7 +1003,7 @@ interface StyleProps$3 extends CommonThemeProps {
|
|
|
990
1003
|
}
|
|
991
1004
|
declare const StyledPaper: import("@emotion/styled").StyledComponent<import("@mui/material").PaperOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
992
1005
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
993
|
-
}, "
|
|
1006
|
+
}, "classes" | "children" | "className" | "style" | "sx" | "elevation" | "square" | "variant"> & {
|
|
994
1007
|
theme?: import("@emotion/react").Theme | undefined;
|
|
995
1008
|
} & CommonThemeProps, {}, {}>;
|
|
996
1009
|
//#endregion
|
|
@@ -1136,23 +1149,25 @@ declare const ButtonDropdown: React$1.ForwardRefExoticComponent<Omit<ButtonDropd
|
|
|
1136
1149
|
//#region src/core/ButtonGroup/ButtonGroup.types.d.ts
|
|
1137
1150
|
interface ButtonGroupProps extends Omit<ButtonGroupProps$1, "variant" | "size"> {
|
|
1138
1151
|
/**
|
|
1139
|
-
*
|
|
1152
|
+
* Tells the group which surface it sits on so it can pick colors with enough
|
|
1153
|
+
* contrast.
|
|
1140
1154
|
* @default "matchBackground"
|
|
1141
1155
|
*/
|
|
1142
1156
|
backgroundAppearance?: "dark" | "matchBackground";
|
|
1143
1157
|
/**
|
|
1144
|
-
*
|
|
1158
|
+
* Style of the button group. Outline is the only value.
|
|
1145
1159
|
* @default "outline"
|
|
1146
1160
|
*/
|
|
1147
1161
|
sdsStyle?: "outline";
|
|
1148
1162
|
/**
|
|
1149
|
-
*
|
|
1163
|
+
* Color scheme applied to every button in the group.
|
|
1150
1164
|
* @default "primary"
|
|
1151
1165
|
*/
|
|
1152
1166
|
sdsType?: "primary" | "secondary";
|
|
1153
1167
|
/**
|
|
1154
|
-
*
|
|
1155
|
-
*
|
|
1168
|
+
* Size of the group. It is injected into each Button and ButtonToggle child,
|
|
1169
|
+
* so setting size on an individual button has no effect.
|
|
1170
|
+
* @default "large"
|
|
1156
1171
|
*/
|
|
1157
1172
|
size?: "small" | "medium" | "large";
|
|
1158
1173
|
}
|
|
@@ -1205,6 +1220,10 @@ declare const ButtonIcon: import("react").ForwardRefExoticComponent<Omit<ButtonI
|
|
|
1205
1220
|
//#endregion
|
|
1206
1221
|
//#region src/core/ButtonToggle/ButtonToggle.types.d.ts
|
|
1207
1222
|
interface ButtonToggleProps extends ButtonProps {
|
|
1223
|
+
/**
|
|
1224
|
+
* Required. The icon displayed within the component. Pass the SDS Icon
|
|
1225
|
+
* component, for example `<Icon sdsIcon="Search" sdsSize="s" />`.
|
|
1226
|
+
*/
|
|
1208
1227
|
startIcon: keyof IconNameToSizes | React.ReactElement<CustomSVGProps>;
|
|
1209
1228
|
sdsStage?: "on" | "off";
|
|
1210
1229
|
}
|
|
@@ -1318,6 +1337,10 @@ interface CalloutProps {
|
|
|
1318
1337
|
hideTitle?: boolean;
|
|
1319
1338
|
body?: React$1.ReactNode;
|
|
1320
1339
|
hideBody?: boolean;
|
|
1340
|
+
/**
|
|
1341
|
+
* The same slot as `children`, for callers that would rather pass it as a
|
|
1342
|
+
* prop. Both render when both are given, `children` first.
|
|
1343
|
+
*/
|
|
1321
1344
|
extraContent?: React$1.ReactNode;
|
|
1322
1345
|
sdsStyle?: CalloutSdsStyleType;
|
|
1323
1346
|
}
|
|
@@ -1339,8 +1362,20 @@ declare const CalloutTitle: {
|
|
|
1339
1362
|
interface TooltipExtraProps extends CommonThemeProps {
|
|
1340
1363
|
arrowOffset?: number;
|
|
1341
1364
|
followCursor?: boolean;
|
|
1365
|
+
/**
|
|
1366
|
+
* @deprecated Tooltips follow the theme mode and no longer have an inverted
|
|
1367
|
+
* style. This prop is ignored and will be removed in a future release.
|
|
1368
|
+
*/
|
|
1342
1369
|
inverted?: boolean;
|
|
1370
|
+
/**
|
|
1371
|
+
* @deprecated Tooltips follow the theme mode and no longer have an inverted
|
|
1372
|
+
* style. This prop is ignored and will be removed in a future release.
|
|
1373
|
+
*/
|
|
1343
1374
|
sdsStyle?: "dark" | "light";
|
|
1375
|
+
/**
|
|
1376
|
+
* @deprecated Tooltips follow the theme mode and no longer have an inverted
|
|
1377
|
+
* style. This prop is ignored and will be removed in a future release.
|
|
1378
|
+
*/
|
|
1344
1379
|
hasInvertedStyle?: boolean;
|
|
1345
1380
|
title?: React.ReactNode;
|
|
1346
1381
|
subtitle?: React.ReactNode;
|
|
@@ -1348,6 +1383,9 @@ interface TooltipExtraProps extends CommonThemeProps {
|
|
|
1348
1383
|
textAlign?: "left" | "center" | "right";
|
|
1349
1384
|
componentSlot?: React.ReactNode;
|
|
1350
1385
|
/**
|
|
1386
|
+
* The popper the tooltip renders into, carrying the arrow's shape and
|
|
1387
|
+
* placement.
|
|
1388
|
+
*
|
|
1351
1389
|
* (v9): MUI removed the Tooltip `PopperComponent` prop in favor of
|
|
1352
1390
|
* `slots.popper`. We keep `PopperComponent` as an SDS prop for backward
|
|
1353
1391
|
* compatibility and map it to `slots.popper` internally.
|
|
@@ -1485,7 +1523,7 @@ declare const StyledPopper$1: import("@emotion/styled").StyledComponent<import("
|
|
|
1485
1523
|
} & CommonThemeProps, {}, {}>;
|
|
1486
1524
|
declare const StyledPaper$1: import("@emotion/styled").StyledComponent<import("@mui/material").PaperOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
1487
1525
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
1488
|
-
}, "
|
|
1526
|
+
}, "classes" | "children" | "className" | "style" | "sx" | "elevation" | "square" | "variant"> & {
|
|
1489
1527
|
theme?: import("@emotion/react").Theme | undefined;
|
|
1490
1528
|
} & StyleProps$1, {}, {}>;
|
|
1491
1529
|
//#endregion
|
|
@@ -1565,7 +1603,19 @@ type InputDropdownProps$1 = InputDropdownProps$2 & {
|
|
|
1565
1603
|
/**
|
|
1566
1604
|
* @see https://mui.com/material-ui/react-button/
|
|
1567
1605
|
*/
|
|
1568
|
-
declare const InputDropdown: (
|
|
1606
|
+
declare const InputDropdown: import("react").ForwardRefExoticComponent<InputDropdownProps$2 & {
|
|
1607
|
+
classes?: {
|
|
1608
|
+
root?: string | undefined;
|
|
1609
|
+
label?: string | undefined;
|
|
1610
|
+
labelDetailsWrapper?: string | undefined;
|
|
1611
|
+
contentWrapper?: string | undefined;
|
|
1612
|
+
details?: string | undefined;
|
|
1613
|
+
counter?: string | undefined;
|
|
1614
|
+
iconWrapper?: string | undefined;
|
|
1615
|
+
chevronIcon?: string | undefined;
|
|
1616
|
+
minimalDetails?: string | undefined;
|
|
1617
|
+
} | undefined;
|
|
1618
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
1569
1619
|
//#endregion
|
|
1570
1620
|
//#region src/core/Dropdown/index.d.ts
|
|
1571
1621
|
interface ExtraDropdownProps<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined> {
|
|
@@ -1618,6 +1668,10 @@ interface BaseContentCardProps extends CardProps {
|
|
|
1618
1668
|
metadataText?: ReactNode;
|
|
1619
1669
|
boundingBox?: boolean;
|
|
1620
1670
|
decorativeBorder?: boolean;
|
|
1671
|
+
/**
|
|
1672
|
+
* The content to be displayed inside the card body, including custom
|
|
1673
|
+
* components and ContentCardActions.
|
|
1674
|
+
*/
|
|
1621
1675
|
children?: ReactNode;
|
|
1622
1676
|
clickableCard?: boolean;
|
|
1623
1677
|
clickableCardProps?: Partial<ButtonProps & {
|
|
@@ -1667,7 +1721,7 @@ type ContentCardProps = ImageContentCardProps | IconContentCardProps | NoneConte
|
|
|
1667
1721
|
type CardExtraProps = Partial<ContentCardProps> & CommonThemeProps;
|
|
1668
1722
|
declare const StyledContentCardBody: import("@emotion/styled").StyledComponent<import("@mui/material").CardContentOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
1669
1723
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
1670
|
-
}, "
|
|
1724
|
+
}, "classes" | "children" | "className" | "style" | "sx"> & {
|
|
1671
1725
|
theme?: import("@emotion/react").Theme | undefined;
|
|
1672
1726
|
} & CardExtraProps, {}, {}>;
|
|
1673
1727
|
//#endregion
|
|
@@ -1741,6 +1795,7 @@ declare const Dialog: React$1.ForwardRefExoticComponent<Omit<DialogProps, "ref">
|
|
|
1741
1795
|
interface DialogActionsProps extends DialogActionsProps$1 {
|
|
1742
1796
|
sdsSize?: DialogExtraProps["sdsSize"];
|
|
1743
1797
|
buttonPosition?: "left" | "right";
|
|
1798
|
+
/** Class name for the actions row. */
|
|
1744
1799
|
classes?: {
|
|
1745
1800
|
root?: string;
|
|
1746
1801
|
};
|
|
@@ -1764,17 +1819,17 @@ interface DialogTitleExtraProps extends CommonThemeProps {
|
|
|
1764
1819
|
}
|
|
1765
1820
|
declare const Title: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
1766
1821
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
1767
|
-
}, "
|
|
1822
|
+
}, "classes" | "children" | "className" | "style" | "color" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "variantMapping"> & {
|
|
1768
1823
|
theme?: import("@emotion/react").Theme | undefined;
|
|
1769
1824
|
} & DialogTitleExtraProps, {}, {}>;
|
|
1770
1825
|
declare const Subtitle: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
1771
1826
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
1772
|
-
}, "
|
|
1827
|
+
}, "classes" | "children" | "className" | "style" | "color" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "variantMapping"> & {
|
|
1773
1828
|
theme?: import("@emotion/react").Theme | undefined;
|
|
1774
1829
|
} & DialogTitleExtraProps, {}, {}>;
|
|
1775
1830
|
declare const Overline: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
1776
1831
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
1777
|
-
}, "
|
|
1832
|
+
}, "classes" | "children" | "className" | "style" | "color" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "variantMapping"> & {
|
|
1778
1833
|
theme?: import("@emotion/react").Theme | undefined;
|
|
1779
1834
|
} & DialogTitleExtraProps, {}, {}>;
|
|
1780
1835
|
//#endregion
|
|
@@ -1784,6 +1839,7 @@ interface DialogTitleProps extends DialogTitleExtraProps, DialogTitleProps$1 {
|
|
|
1784
1839
|
subtitle?: string;
|
|
1785
1840
|
overline?: string;
|
|
1786
1841
|
onClose?: () => void;
|
|
1842
|
+
/** Class names for the individual parts of the title block. */
|
|
1787
1843
|
classes?: {
|
|
1788
1844
|
root?: string;
|
|
1789
1845
|
title?: string;
|
|
@@ -1844,6 +1900,11 @@ interface CheckboxContentProps extends Omit<CheckboxProps$1, "color" | "defaultC
|
|
|
1844
1900
|
intent?: "default" | "negative" | "notice" | "positive";
|
|
1845
1901
|
label?: React.ReactNode;
|
|
1846
1902
|
stage?: "checked" | "unchecked" | "indeterminate";
|
|
1903
|
+
/**
|
|
1904
|
+
* Class names for the internal elements: root, labelCaptionContainer, label,
|
|
1905
|
+
* caption, checkbox, checkboxCheckedIcon, checkboxDefaultIcon, and
|
|
1906
|
+
* checkboxIndeterminateIcon.
|
|
1907
|
+
*/
|
|
1847
1908
|
classes?: {
|
|
1848
1909
|
root?: string;
|
|
1849
1910
|
labelCaptionContainer?: string;
|
|
@@ -1874,7 +1935,17 @@ interface RadioContentProps extends Omit<RadioProps$1, "color" | "defaultChecked
|
|
|
1874
1935
|
label?: React$1.ReactNode;
|
|
1875
1936
|
radioProps?: Partial<RadioProps$1>;
|
|
1876
1937
|
stage?: "checked" | "unchecked";
|
|
1938
|
+
/**
|
|
1939
|
+
* The value a RadioGroup compares against to decide whether this radio is
|
|
1940
|
+
* selected. It also backs the label and caption element ids, so give every
|
|
1941
|
+
* radio a unique one.
|
|
1942
|
+
*/
|
|
1877
1943
|
value?: string;
|
|
1944
|
+
/**
|
|
1945
|
+
* Class names for the internal elements: root, labelCaptionContainer, label,
|
|
1946
|
+
* caption, radioButton, radioCheckedIcon, radioCheckedIconDot, and
|
|
1947
|
+
* radioDefaultIcon.
|
|
1948
|
+
*/
|
|
1878
1949
|
classes?: {
|
|
1879
1950
|
root?: string;
|
|
1880
1951
|
labelCaptionContainer?: string;
|
|
@@ -1926,11 +1997,16 @@ type InputTextProps = TextFieldProps & InputTextExtraProps & AccessibleInputText
|
|
|
1926
1997
|
/**
|
|
1927
1998
|
* @see https://mui.com/material-ui/react-text-field/
|
|
1928
1999
|
*/
|
|
1929
|
-
declare const InputText: import("react").ForwardRefExoticComponent<(Omit<import("@mui/material").
|
|
2000
|
+
declare const InputText: import("react").ForwardRefExoticComponent<(Omit<import("@mui/material").FilledTextFieldProps & InputTextExtraProps & AccessibleInputTextProps, "ref"> | Omit<import("@mui/material").OutlinedTextFieldProps & InputTextExtraProps & AccessibleInputTextProps, "ref"> | Omit<import("@mui/material").StandardTextFieldProps & InputTextExtraProps & AccessibleInputTextProps, "ref">) & import("react").RefAttributes<HTMLInputElement>>;
|
|
1930
2001
|
//#endregion
|
|
1931
2002
|
//#region src/core/InputToggle/style.d.ts
|
|
1932
2003
|
interface InputToggleExtraProps extends SwitchProps, CommonThemeProps {
|
|
1933
2004
|
offLabel?: string;
|
|
2005
|
+
/**
|
|
2006
|
+
* Called whenever the user toggles the component, in either direction. It is
|
|
2007
|
+
* given the event alone: unlike MUI's, it is not passed the new checked
|
|
2008
|
+
* state, which is read from the event's target instead.
|
|
2009
|
+
*/
|
|
1934
2010
|
onChange?(e: React.ChangeEvent): void;
|
|
1935
2011
|
onLabel?: string;
|
|
1936
2012
|
width?: number;
|
|
@@ -1963,63 +2039,72 @@ declare const IntentMessage: (props: IntentMessageProps) => JSX.Element;
|
|
|
1963
2039
|
//#region src/core/Legend/Legend.types.d.ts
|
|
1964
2040
|
interface LegendItemData {
|
|
1965
2041
|
/**
|
|
1966
|
-
*
|
|
2042
|
+
* The item's label, and the start of its accessible name. Names need not be
|
|
2043
|
+
* unique, since items are addressed by index.
|
|
1967
2044
|
*/
|
|
1968
2045
|
name: string;
|
|
1969
2046
|
/**
|
|
1970
|
-
*
|
|
2047
|
+
* Shown after the name when `showValues` is on. Numbers are grouped by
|
|
2048
|
+
* locale; a string is printed as given, for a unit or a percentage.
|
|
1971
2049
|
*/
|
|
1972
2050
|
value?: number | string;
|
|
1973
2051
|
/**
|
|
1974
|
-
*
|
|
1975
|
-
*
|
|
1976
|
-
* Falls back to gray if not provided
|
|
2052
|
+
* The swatch color. The `colors` palette takes priority over it, and without
|
|
2053
|
+
* either the swatch is the theme's grey.
|
|
1977
2054
|
*/
|
|
1978
2055
|
color?: string;
|
|
1979
2056
|
/**
|
|
1980
|
-
*
|
|
2057
|
+
* Dims the item and stops it responding to hover or clicks.
|
|
1981
2058
|
* @default false
|
|
1982
2059
|
*/
|
|
1983
2060
|
disabled?: boolean;
|
|
1984
2061
|
}
|
|
1985
2062
|
interface LegendProps extends HTMLAttributes<HTMLDivElement> {
|
|
1986
2063
|
/**
|
|
1987
|
-
*
|
|
2064
|
+
* The items, drawn in order. Their indices are what selection, hover, and the
|
|
2065
|
+
* callbacks refer to.
|
|
1988
2066
|
*/
|
|
1989
2067
|
items: LegendItemData[];
|
|
1990
2068
|
/**
|
|
1991
|
-
*
|
|
1992
|
-
*
|
|
2069
|
+
* A palette applied by index, taking priority over the color on an item.
|
|
2070
|
+
* Entries past the end of the array fall back to the item's color, then to
|
|
2071
|
+
* grey.
|
|
1993
2072
|
*/
|
|
1994
2073
|
colors?: string[];
|
|
1995
2074
|
/**
|
|
1996
|
-
*
|
|
2075
|
+
* Called when the pointer enters an item. The legend already dims its own
|
|
2076
|
+
* swatches, so this is for driving something outside it, such as a highlight
|
|
2077
|
+
* on the chart.
|
|
1997
2078
|
*/
|
|
1998
2079
|
onItemMouseEnter?: (item: LegendItemData, index: number) => void;
|
|
1999
2080
|
/**
|
|
2000
|
-
*
|
|
2081
|
+
* Called when the pointer leaves an item.
|
|
2001
2082
|
*/
|
|
2002
2083
|
onItemMouseLeave?: (item: LegendItemData, index: number) => void;
|
|
2003
2084
|
/**
|
|
2004
|
-
*
|
|
2085
|
+
* Fires on a click, alongside any selection change rather than instead of it.
|
|
2005
2086
|
*/
|
|
2006
2087
|
onItemClick?: (item: LegendItemData, index: number) => void;
|
|
2007
2088
|
/**
|
|
2008
|
-
*
|
|
2089
|
+
* Draws each item's value beside its name. Items without a value are
|
|
2090
|
+
* unaffected.
|
|
2009
2091
|
* @default false
|
|
2010
2092
|
*/
|
|
2011
2093
|
showValues?: boolean;
|
|
2012
2094
|
/**
|
|
2013
|
-
*
|
|
2095
|
+
* Indices of the selected items. The legend is controlled: it draws this and
|
|
2096
|
+
* never changes it.
|
|
2014
2097
|
*/
|
|
2015
2098
|
selectedIndices?: number[];
|
|
2016
2099
|
/**
|
|
2017
|
-
*
|
|
2018
|
-
*
|
|
2100
|
+
* Called with the next selection when an item is clicked, with that index
|
|
2101
|
+
* toggled. Without it, clicking selects nothing.
|
|
2019
2102
|
*/
|
|
2020
2103
|
onSelectionChange?: (selectedIndices: number[]) => void;
|
|
2021
2104
|
/**
|
|
2022
|
-
*
|
|
2105
|
+
* Highlights an item from outside, for syncing with a chart. It adds to the
|
|
2106
|
+
* legend's own hover rather than replacing it, and `null` reads as no
|
|
2107
|
+
* external highlight.
|
|
2023
2108
|
*/
|
|
2024
2109
|
hoveredIndex?: number | null;
|
|
2025
2110
|
}
|
|
@@ -2145,6 +2230,10 @@ type ExtraTagProps = ExtraSmallTagProps | ExtraLargeTagProps;
|
|
|
2145
2230
|
//#endregion
|
|
2146
2231
|
//#region src/core/Tag/index.d.ts
|
|
2147
2232
|
interface SdsTagProps extends Omit<ChipProps$1, "color"> {
|
|
2233
|
+
/**
|
|
2234
|
+
* The tag's text, and its accessible name. It is cut off with an ellipsis
|
|
2235
|
+
* rather than wrapped, so keep it to a word or two.
|
|
2236
|
+
*/
|
|
2148
2237
|
label: string;
|
|
2149
2238
|
color?: SdsTagColorType;
|
|
2150
2239
|
}
|
|
@@ -2430,6 +2519,21 @@ interface PanelHeaderCloseProps {
|
|
|
2430
2519
|
}
|
|
2431
2520
|
//#endregion
|
|
2432
2521
|
//#region src/core/Panel/Panel.types.d.ts
|
|
2522
|
+
/**
|
|
2523
|
+
* An overlay Panel slides in on MUI's `Slide`, which takes a `container` to
|
|
2524
|
+
* measure that slide against. MUI types the transition slot against the generic
|
|
2525
|
+
* transition interface, which knows nothing of it, and leaves this interface
|
|
2526
|
+
* open for the component that does — so the prop is declared here.
|
|
2527
|
+
*
|
|
2528
|
+
* A Panel rendered into a box rather than the page needs it. Without one the
|
|
2529
|
+
* slide is measured against the window and the panel spends most of its
|
|
2530
|
+
* animation outside the frame it was given.
|
|
2531
|
+
*/
|
|
2532
|
+
declare module "@mui/material/Drawer" {
|
|
2533
|
+
interface DrawerTransitionSlotPropsOverrides {
|
|
2534
|
+
container?: SlideProps["container"];
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2433
2537
|
interface BasicPanelProps extends Omit<DrawerProps, "variant"> {
|
|
2434
2538
|
sdsType: "basic";
|
|
2435
2539
|
position?: "left" | "right";
|
|
@@ -2582,7 +2686,13 @@ declare const Tab: React$1.ForwardRefExoticComponent<Omit<TabProps, "ref"> & Rea
|
|
|
2582
2686
|
//#endregion
|
|
2583
2687
|
//#region src/core/TagFilter/index.d.ts
|
|
2584
2688
|
interface SdsTagFilterProps extends Omit<ChipProps$1, "color" | "variant"> {
|
|
2689
|
+
/** The filter's text. Cut off with an ellipsis when there is not room for it. */
|
|
2585
2690
|
label: string;
|
|
2691
|
+
/**
|
|
2692
|
+
* Runs when the X is clicked or activated, and when Backspace or Delete is
|
|
2693
|
+
* pressed on the tag. Drop the filter from your state here; the component
|
|
2694
|
+
* does not remove itself.
|
|
2695
|
+
*/
|
|
2586
2696
|
onDelete: React$1.EventHandler<any>;
|
|
2587
2697
|
}
|
|
2588
2698
|
type TagFilterProps = SdsTagFilterProps;
|