@czi-sds/components 21.6.3 → 21.7.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.
@@ -33,7 +33,7 @@ import { TabsProps as RawTabsProps } from "@mui/material";
33
33
  import { ChipProps as ChipProps$0 } from "@mui/material";
34
34
  import React from "react";
35
35
  import { CSSProperties, ReactElement, ReactNode, SyntheticEvent, ComponentType } from "react";
36
- import { Theme, ThemeOptions, TypographyStyle, PaletteOptions } from "@mui/material/styles";
36
+ import { Theme, ThemeOptions, TypographyStyle, Breakpoints, PaletteOptions } from "@mui/material/styles";
37
37
  import { SerializedStyles } from "@emotion/react";
38
38
  import { AlertProps } from "@mui/lab";
39
39
  import { AutocompleteChangeDetails, AutocompleteChangeReason, AutocompleteCloseReason, AutocompleteValue } from "@mui/base";
@@ -136,6 +136,19 @@ declare module "@mui/material/styles" {
136
136
  interface PaletteOptions {
137
137
  sds?: SDSPalette;
138
138
  }
139
+ /**
140
+ * @see https://mui.com/material-ui/customization/breakpoints/#custom-breakpoints
141
+ * (masoudmanson): ModuleAugmentation is required for TypeScript to recognize the
142
+ * custom breakpoints added to the theme.
143
+ */
144
+ interface BreakpointOverrides {
145
+ // remove the xs and xl breakpoints since SDS does not support them
146
+ xs: false;
147
+ sm: true;
148
+ md: true;
149
+ lg: true;
150
+ xl: false;
151
+ }
139
152
  }
140
153
  interface SDSTheme extends Theme {
141
154
  app?: AppTheme;
@@ -159,6 +172,67 @@ interface Shadows {
159
172
  m: string;
160
173
  l: string;
161
174
  }
175
+ interface TypographyStyles {
176
+ body: {
177
+ regular: {
178
+ button: TypographyStyle;
179
+ l: TypographyStyle;
180
+ m: TypographyStyle;
181
+ s: TypographyStyle;
182
+ xs: TypographyStyle;
183
+ xxs: TypographyStyle;
184
+ xxxs: TypographyStyle;
185
+ };
186
+ semibold: {
187
+ button: TypographyStyle;
188
+ l: TypographyStyle;
189
+ m: TypographyStyle;
190
+ s: TypographyStyle;
191
+ xs: TypographyStyle;
192
+ xxs: TypographyStyle;
193
+ xxxs: TypographyStyle;
194
+ };
195
+ };
196
+ caps: {
197
+ semibold: {
198
+ xxs: TypographyStyle;
199
+ xxxs: TypographyStyle;
200
+ xxxxs: TypographyStyle;
201
+ };
202
+ };
203
+ code: {
204
+ regular: {
205
+ s: TypographyStyle;
206
+ xs: TypographyStyle;
207
+ };
208
+ semibold: {
209
+ s: TypographyStyle;
210
+ xs: TypographyStyle;
211
+ };
212
+ };
213
+ header: {
214
+ semibold: {
215
+ xxl: TypographyStyle;
216
+ xl: TypographyStyle;
217
+ l: TypographyStyle;
218
+ m: TypographyStyle;
219
+ s: TypographyStyle;
220
+ xs: TypographyStyle;
221
+ xxs: TypographyStyle;
222
+ xxxs: TypographyStyle;
223
+ };
224
+ };
225
+ tabular: {
226
+ regular: {
227
+ s: TypographyStyle;
228
+ xs: TypographyStyle;
229
+ };
230
+ semibold: {
231
+ s: TypographyStyle;
232
+ xs: TypographyStyle;
233
+ };
234
+ };
235
+ }
162
236
  interface Typography {
163
237
  fontFamily: {
164
238
  body: CSSProperties["fontFamily"];
@@ -167,67 +241,8 @@ interface Typography {
167
241
  header?: CSSProperties["fontFamily"];
168
242
  tabular?: CSSProperties["fontFamily"];
169
243
  };
170
- styles: {
171
- body: {
172
- regular: {
173
- button: TypographyStyle;
174
- l: TypographyStyle;
175
- m: TypographyStyle;
176
- s: TypographyStyle;
177
- xs: TypographyStyle;
178
- xxs: TypographyStyle;
179
- xxxs: TypographyStyle;
180
- };
181
- semibold: {
182
- button: TypographyStyle;
183
- l: TypographyStyle;
184
- m: TypographyStyle;
185
- s: TypographyStyle;
186
- xs: TypographyStyle;
187
- xxs: TypographyStyle;
188
- xxxs: TypographyStyle;
189
- };
190
- };
191
- caps: {
192
- semibold: {
193
- xxs: TypographyStyle;
194
- xxxs: TypographyStyle;
195
- xxxxs: TypographyStyle;
196
- };
197
- };
198
- code: {
199
- regular: {
200
- s: TypographyStyle;
201
- xs: TypographyStyle;
202
- };
203
- semibold: {
204
- s: TypographyStyle;
205
- xs: TypographyStyle;
206
- };
207
- };
208
- header: {
209
- semibold: {
210
- xxl: TypographyStyle;
211
- xl: TypographyStyle;
212
- l: TypographyStyle;
213
- m: TypographyStyle;
214
- s: TypographyStyle;
215
- xs: TypographyStyle;
216
- xxs: TypographyStyle;
217
- xxxs: TypographyStyle;
218
- };
219
- };
220
- tabular: {
221
- regular: {
222
- s: TypographyStyle;
223
- xs: TypographyStyle;
224
- };
225
- semibold: {
226
- s: TypographyStyle;
227
- xs: TypographyStyle;
228
- };
229
- };
230
- };
244
+ wideStyles: TypographyStyles;
245
+ narrowStyles: TypographyStyles;
231
246
  }
232
247
  interface FontWeights {
233
248
  bold: number;
@@ -379,10 +394,11 @@ declare const getCorners: ({ theme }: CommonThemeProps) => Corners | null;
379
394
  declare const getFontWeights: ({ theme }: CommonThemeProps) => FontWeights | null;
380
395
  declare const getIconSizes: ({ theme }: CommonThemeProps) => IconSizes | null;
381
396
  declare const getBorders: ({ theme }: CommonThemeProps) => Borders | null;
397
+ declare const getBreakpoints: ({ theme }: CommonThemeProps) => Breakpoints | null;
382
398
  declare function focusVisibleA11yStyle(props: CommonThemeProps): string;
383
- type FontBodyWeight = keyof Typography["styles"]["body"];
384
- type FontBodySize<T extends FontBodyWeight> = keyof Typography["styles"]["body"][T];
385
- declare const fontBody: (fontSize: FontBodySize<FontBodyWeight>, fontWeight?: FontBodyWeight) => (props: CommonThemeProps) => SerializedStyles | null;
399
+ type FontBodyWeight = keyof Typography["wideStyles"]["body"];
400
+ type FontBodySize<T extends FontBodyWeight> = keyof Typography["wideStyles"]["body"][T];
401
+ declare const fontBody: (fontSize: FontBodySize<FontBodyWeight>, fontWeight?: FontBodyWeight, isNarrow?: boolean) => (props: CommonThemeProps) => SerializedStyles | null;
386
402
  declare const fontBodyL: (props: CommonThemeProps) => SerializedStyles | null;
387
403
  declare const fontBodyM: (props: CommonThemeProps) => SerializedStyles | null;
388
404
  declare const fontBodyS: (props: CommonThemeProps) => SerializedStyles | null;
@@ -396,14 +412,14 @@ declare const fontBodySemiboldXs: (props: CommonThemeProps) => SerializedStyles
396
412
  declare const fontBodySemiboldXxs: (props: CommonThemeProps) => SerializedStyles | null;
397
413
  declare const fontBodySemiboldXxxs: (props: CommonThemeProps) => SerializedStyles | null;
398
414
  // Font Caps
399
- type FontCapsSize = keyof Typography["styles"]["caps"]["semibold"];
400
- declare const fontCaps: (fontSize: FontCapsSize) => (props: CommonThemeProps) => SerializedStyles | null;
415
+ type FontCapsSize = keyof Typography["wideStyles"]["caps"]["semibold"];
416
+ declare const fontCaps: (fontSize: FontCapsSize, isNarrow?: boolean) => (props: CommonThemeProps) => SerializedStyles | null;
401
417
  declare const fontCapsXxs: (props: CommonThemeProps) => SerializedStyles | null;
402
418
  declare const fontCapsXxxs: (props: CommonThemeProps) => SerializedStyles | null;
403
419
  declare const fontCapsXxxxs: (props: CommonThemeProps) => SerializedStyles | null;
404
420
  // Font Header
405
- type FontHeaderSize = keyof Typography["styles"]["header"]["semibold"];
406
- declare const fontHeader: (fontSize: FontHeaderSize) => (props: CommonThemeProps) => SerializedStyles | null;
421
+ type FontHeaderSize = keyof Typography["wideStyles"]["header"]["semibold"];
422
+ declare const fontHeader: (fontSize: FontHeaderSize, isNarrow?: boolean) => (props: CommonThemeProps) => SerializedStyles | null;
407
423
  declare const fontHeaderXxl: (props: CommonThemeProps) => SerializedStyles | null;
408
424
  declare const fontHeaderXl: (props: CommonThemeProps) => SerializedStyles | null;
409
425
  declare const fontHeaderL: (props: CommonThemeProps) => SerializedStyles | null;
@@ -413,17 +429,17 @@ declare const fontHeaderXs: (props: CommonThemeProps) => SerializedStyles | null
413
429
  declare const fontHeaderXxs: (props: CommonThemeProps) => SerializedStyles | null;
414
430
  declare const fontHeaderXxxs: (props: CommonThemeProps) => SerializedStyles | null;
415
431
  // Font Code
416
- type FontCodeWeight = keyof Typography["styles"]["code"];
417
- type FontCodeSize<T extends FontCodeWeight> = keyof Typography["styles"]["code"][T];
418
- declare const fontCode: (fontSize: FontCodeSize<FontCodeWeight>, fontWeight?: FontCodeWeight) => (props: CommonThemeProps) => SerializedStyles | null;
432
+ type FontCodeWeight = keyof Typography["wideStyles"]["code"];
433
+ type FontCodeSize<T extends FontCodeWeight> = keyof Typography["wideStyles"]["code"][T];
434
+ declare const fontCode: (fontSize: FontCodeSize<FontCodeWeight>, fontWeight?: FontCodeWeight, isNarrow?: boolean) => (props: CommonThemeProps) => SerializedStyles | null;
419
435
  declare const fontCodeXs: (props: CommonThemeProps) => SerializedStyles | null;
420
436
  declare const fontCodeS: (props: CommonThemeProps) => SerializedStyles | null;
421
437
  declare const fontCodeSemiboldXs: (props: CommonThemeProps) => SerializedStyles | null;
422
438
  declare const fontCodeSemiboldS: (props: CommonThemeProps) => SerializedStyles | null;
423
439
  // Font Tabular
424
- type FontTabularWeight = keyof Typography["styles"]["tabular"];
425
- type FontTabularSize<T extends FontTabularWeight> = keyof Typography["styles"]["tabular"][T];
426
- declare const fontTabular: (fontSize: FontTabularSize<FontTabularWeight>, fontWeight?: FontTabularWeight) => (props: CommonThemeProps) => SerializedStyles | null;
440
+ type FontTabularWeight = keyof Typography["wideStyles"]["tabular"];
441
+ type FontTabularSize<T extends FontTabularWeight> = keyof Typography["wideStyles"]["tabular"][T];
442
+ declare const fontTabular: (fontSize: FontTabularSize<FontTabularWeight>, fontWeight?: FontTabularWeight, isNarrow?: boolean) => (props: CommonThemeProps) => SerializedStyles | null;
427
443
  declare const fontTabularXs: (props: CommonThemeProps) => SerializedStyles | null;
428
444
  declare const fontTabularS: (props: CommonThemeProps) => SerializedStyles | null;
429
445
  declare const fontTabularSemiboldXs: (props: CommonThemeProps) => SerializedStyles | null;
@@ -670,6 +686,7 @@ interface ExtraAutocompleteProps<T, Multiple, DisableClearable, FreeSolo> extend
670
686
  onChange?: (event: React.SyntheticEvent, value: AutocompleteValue$0<T, Multiple, DisableClearable, FreeSolo>, reason: AutocompleteChangeReason$0, details?: AutocompleteChangeDetails$0<T>) => void;
671
687
  InputBaseProps?: Partial<InputSearchProps>;
672
688
  label?: string;
689
+ intent?: InputSearchProps["intent"];
673
690
  onClickAway?: (event?: MouseEvent | TouchEvent, reason?: AutocompleteCloseReason$0) => void;
674
691
  onClick?: (event?: TouchEvent | MouseEvent) => void;
675
692
  }
@@ -1489,5 +1506,5 @@ type TooltipTableContentProps = TooltipTableExtraProps;
1489
1506
  * @see https://mui.com/material-ui/react-table/
1490
1507
  */
1491
1508
  declare const TooltipTableContent: (props: TooltipTableContentProps) => JSX.Element;
1492
- export { AccordionDetails, AccordionHeader, AccordionProps, Accordion, Alert, AutocompleteSingleColumnOption, AutocompleteMultiColumnOption, SDSAutocompleteOptions, AutocompleteMultiColumnValue, AutocompleteSingleColumnValue, SDSAutocompleteValue, AutocompleteSingleColumnOnChange, AutocompleteMultiColumnOnChange, SDSAutocompleteOnChange, AutocompleteProps, StyledPopper as AutocompleteMultiColumnStyledPopper, StyledPaper$0 as AutocompleteSingleColumnStyledPaper, Autocomplete$0 as Autocomplete, BannerProps, Banner, ButtonProps, Button, ButtonDropdownProps, ButtonDropdown, ButtonIconInternalProps, ButtonIconProps, ButtonIcon, ButtonToggleProps, ButtonToggle, CalloutIntentType, CalloutProps, ExposedCalloutProps, Callout, CalloutTitle, CellBasicRawProps, CellBasicProps, CellBasic, CellComponentProps, CellComponent, CellHeaderDirection, CellHeaderProps, CellHeader, Chip, InputDropdown as ComplexFilterInputDropdown, InputDropdown as DropdownInputDropdown, InputDropdown, StyledPopper$1 as ComplexFilterPopper, StyledPopper$1 as DropdownPopper, ComplexFilterProps, ComplexFilter, DialogContext, DialogProps, Dialog, DialogActionsProps, DialogActions, DialogContentProps, _default, _default as DialogContent, DialogPaperProps, DialogPaper, Subtitle$0 as DialogTitleSubtitle, Title as DialogTitleTitle, Overline as DialogTitleOverline, DialogTitleProps, DialogTitle, StyledPaper$1 as DropdownPaper, ExtraDropdownProps, DropdownProps, Dropdown, DefaultDropdownMenuOption, MINIMUM_DROPDOWN_MENU_POPPER_WIDTH, DropdownMenuProps, DropdownMenu, SdsIconWithColor$0 as SdsIconWithColor, IconProps, Icon, CheckboxProps, InputCheckbox, InputDropdownProps$0 as InputDropdownProps, RadioContentProps, RadioProps, InputRadio, AccessibleInputSearchProps, InputSearchProps, InputSearch, InputSliderProps, InputSlider, InputTextProps, InputText, InputToggle, LinkProps$0 as LinkProps, Link, ListProps, List, ListItemLabel, ListItemProps, ListItem, ListSubheaderProps, ListSubheader, LoadingIndicatorProps$0 as LoadingIndicatorProps, LoadingIndicator, MenuProps, Menu, IconNameToSmallSizes, MenuItemExtraProps, MenuItemProps, MenuItem, DefaultMenuSelectOption, MenuSelectProps, MenuSelect, NavigationJumpToProps, NavigationJumpTo, NotificationIntentType, NotificationProps, ExposedNotificationProps, Notification, PaginationInternalProps, PaginationProps, Pagination, BasicPanelProps, OverlayPanelProps, PanelProps, PANEL_BASIC_MIN_WIDTH_PX, PANEL_OVERLAY_MIN_WIDTH_PX, Panel, SingleButtonDefinition, SegmentedControlProps, SegmentedControl, SdsTableProps, TableProps, Table, TableHeaderProps, TableHeader, TableRowProps, TableRow, Tabs, TabProps$0 as TabProps, Tab, SdsTagProps, TagProps, Tag, SdsTagFilterProps, TagFilterProps, TagFilter, Tooltip, TooltipCondensedProps, TooltipCondensed, TooltipTableContent, TooltipTableContent as TooltipTable, AccentColor, BaseColor, IntentColor, SDSPalette, SDSTheme, SDSThemeOptions, AppTheme, Shadows, Typography, FontWeights, Corners, Spaces, Spacings, Color, Colors, IconSize, IconSizes, Border, Borders, Theme$0 as Theme, defaultTheme, makeSdsSemanticAppTheme, SDSLightAppTheme, SDSDarkAppTheme, SDSChooseTheme, defaultAppTheme, makeThemeOptions, focusVisibleA11yStyle, fontBody, fontBodyL, fontBodyM, fontBodyS, fontBodyXs, fontBodyXxs, fontBodyXxxs, fontBodySemiboldL, fontBodySemiboldM, fontBodySemiboldS, fontBodySemiboldXs, fontBodySemiboldXxs, fontBodySemiboldXxxs, fontCaps, fontCapsXxs, fontCapsXxxs, fontCapsXxxxs, fontHeader, fontHeaderXxl, fontHeaderXl, fontHeaderL, fontHeaderM, fontHeaderS, fontHeaderXs, fontHeaderXxs, fontHeaderXxxs, fontCode, fontCodeXs, fontCodeS, fontCodeSemiboldXs, fontCodeSemiboldS, fontTabular, fontTabularXs, fontTabularS, fontTabularSemiboldXs, fontTabularSemiboldS, CommonThemeProps, getSpaces, getSpacings, getTypography, getMode, getPalette, getColors, getSemanticColors, getShadows, getCorners, getFontWeights, getIconSizes, getBorders };
1509
+ export { AccordionDetails, AccordionHeader, AccordionProps, Accordion, Alert, AutocompleteSingleColumnOption, AutocompleteMultiColumnOption, SDSAutocompleteOptions, AutocompleteMultiColumnValue, AutocompleteSingleColumnValue, SDSAutocompleteValue, AutocompleteSingleColumnOnChange, AutocompleteMultiColumnOnChange, SDSAutocompleteOnChange, AutocompleteProps, StyledPopper as AutocompleteMultiColumnStyledPopper, StyledPaper$0 as AutocompleteSingleColumnStyledPaper, Autocomplete$0 as Autocomplete, BannerProps, Banner, ButtonProps, Button, ButtonDropdownProps, ButtonDropdown, ButtonIconInternalProps, ButtonIconProps, ButtonIcon, ButtonToggleProps, ButtonToggle, CalloutIntentType, CalloutProps, ExposedCalloutProps, Callout, CalloutTitle, CellBasicRawProps, CellBasicProps, CellBasic, CellComponentProps, CellComponent, CellHeaderDirection, CellHeaderProps, CellHeader, Chip, InputDropdown as ComplexFilterInputDropdown, InputDropdown as DropdownInputDropdown, InputDropdown, StyledPopper$1 as ComplexFilterPopper, StyledPopper$1 as DropdownPopper, ComplexFilterProps, ComplexFilter, DialogContext, DialogProps, Dialog, DialogActionsProps, DialogActions, DialogContentProps, _default, _default as DialogContent, DialogPaperProps, DialogPaper, Subtitle$0 as DialogTitleSubtitle, Title as DialogTitleTitle, Overline as DialogTitleOverline, DialogTitleProps, DialogTitle, StyledPaper$1 as DropdownPaper, ExtraDropdownProps, DropdownProps, Dropdown, DefaultDropdownMenuOption, MINIMUM_DROPDOWN_MENU_POPPER_WIDTH, DropdownMenuProps, DropdownMenu, SdsIconWithColor$0 as SdsIconWithColor, IconProps, Icon, CheckboxProps, InputCheckbox, InputDropdownProps$0 as InputDropdownProps, RadioContentProps, RadioProps, InputRadio, AccessibleInputSearchProps, InputSearchProps, InputSearch, InputSliderProps, InputSlider, InputTextProps, InputText, InputToggle, LinkProps$0 as LinkProps, Link, ListProps, List, ListItemLabel, ListItemProps, ListItem, ListSubheaderProps, ListSubheader, LoadingIndicatorProps$0 as LoadingIndicatorProps, LoadingIndicator, MenuProps, Menu, IconNameToSmallSizes, MenuItemExtraProps, MenuItemProps, MenuItem, DefaultMenuSelectOption, MenuSelectProps, MenuSelect, NavigationJumpToProps, NavigationJumpTo, NotificationIntentType, NotificationProps, ExposedNotificationProps, Notification, PaginationInternalProps, PaginationProps, Pagination, BasicPanelProps, OverlayPanelProps, PanelProps, PANEL_BASIC_MIN_WIDTH_PX, PANEL_OVERLAY_MIN_WIDTH_PX, Panel, SingleButtonDefinition, SegmentedControlProps, SegmentedControl, SdsTableProps, TableProps, Table, TableHeaderProps, TableHeader, TableRowProps, TableRow, Tabs, TabProps$0 as TabProps, Tab, SdsTagProps, TagProps, Tag, SdsTagFilterProps, TagFilterProps, TagFilter, Tooltip, TooltipCondensedProps, TooltipCondensed, TooltipTableContent, TooltipTableContent as TooltipTable, AccentColor, BaseColor, IntentColor, SDSPalette, SDSTheme, SDSThemeOptions, AppTheme, Shadows, TypographyStyles, Typography, FontWeights, Corners, Spaces, Spacings, Color, Colors, IconSize, IconSizes, Border, Borders, Theme$0 as Theme, defaultTheme, makeSdsSemanticAppTheme, SDSLightAppTheme, SDSDarkAppTheme, SDSChooseTheme, defaultAppTheme, makeThemeOptions, focusVisibleA11yStyle, fontBody, fontBodyL, fontBodyM, fontBodyS, fontBodyXs, fontBodyXxs, fontBodyXxxs, fontBodySemiboldL, fontBodySemiboldM, fontBodySemiboldS, fontBodySemiboldXs, fontBodySemiboldXxs, fontBodySemiboldXxxs, fontCaps, fontCapsXxs, fontCapsXxxs, fontCapsXxxxs, fontHeader, fontHeaderXxl, fontHeaderXl, fontHeaderL, fontHeaderM, fontHeaderS, fontHeaderXs, fontHeaderXxs, fontHeaderXxxs, fontCode, fontCodeXs, fontCodeS, fontCodeSemiboldXs, fontCodeSemiboldS, fontTabular, fontTabularXs, fontTabularS, fontTabularSemiboldXs, fontTabularSemiboldS, CommonThemeProps, getSpaces, getSpacings, getTypography, getMode, getPalette, getColors, getSemanticColors, getShadows, getCorners, getFontWeights, getIconSizes, getBorders, getBreakpoints };
1493
1510
  export type { AutocompleteBaseProps, AutocompleteMultiColumnProps, AutocompleteOptionBasic, AutocompleteOptionComponent, DefaultAutocompleteOption, ChipProps, IconNameToSizes, InputToggleExtraProps as InputToggleProps, TabsProps$0 as TabsProps, SdsTagColorType, TooltipProps, TooltipTableContentProps };