@czi-sds/components 21.6.0 → 21.6.1
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 +27 -0
- package/dist/index.cjs.d.ts +5 -1
- package/dist/index.cjs.js +71 -123
- package/dist/index.esm.d.ts +5 -1
- package/dist/index.esm.js +71 -124
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -254,6 +254,33 @@ const theme = createTheme(appTheme)
|
|
|
254
254
|
</StyledEngineProvider>
|
|
255
255
|
```
|
|
256
256
|
|
|
257
|
+
To apply custom colors that align with your branding while maintaining the SDS design configurations, use the `makeSdsSemanticAppTheme`. Provide it with a Colors object that follows the SDS model.
|
|
258
|
+
|
|
259
|
+
```tsx
|
|
260
|
+
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
|
|
261
|
+
import { makeSdsSemanticAppTheme, makeThemeOptions, type Colors } from "@czi-sds/components";
|
|
262
|
+
import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
|
|
263
|
+
import createTheme from "@mui/material/styles/createTheme";
|
|
264
|
+
|
|
265
|
+
const CustomColors: Colors = {
|
|
266
|
+
...
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const customColorAppTheme = makeSdsSemanticAppTheme(CustomColors);
|
|
270
|
+
|
|
271
|
+
const appTheme = makeThemeOptions(customColorAppTheme)
|
|
272
|
+
|
|
273
|
+
const theme = createTheme(appTheme)
|
|
274
|
+
|
|
275
|
+
<StyledEngineProvider injectFirst>
|
|
276
|
+
<ThemeProvider theme={theme}>
|
|
277
|
+
<EmotionThemeProvider theme={theme}>
|
|
278
|
+
<YourApp />
|
|
279
|
+
</EmotionThemeProvider>
|
|
280
|
+
</ThemeProvider>
|
|
281
|
+
</StyledEngineProvider>
|
|
282
|
+
```
|
|
283
|
+
|
|
257
284
|
💡 CZGE example available [here](https://github.com/chanzuckerberg/czgenepi/blob/trunk/src/frontend/src/common/styles/theme.ts).
|
|
258
285
|
|
|
259
286
|
💡 Material UI docs for custom theming available [here](https://mui.com/material-ui/customization/theming/).
|
package/dist/index.cjs.d.ts
CHANGED
|
@@ -333,6 +333,10 @@ declare const Theme$0: (t: PaletteMode) => import("@mui/material").Theme;
|
|
|
333
333
|
* Use the `theme` export to get a flexible light/dark mode theme function
|
|
334
334
|
*/
|
|
335
335
|
declare const defaultTheme: import("@mui/material").Theme;
|
|
336
|
+
/**
|
|
337
|
+
* Create a SDS App Theme with custom colors that follows the SDS color model.
|
|
338
|
+
*/
|
|
339
|
+
declare const makeSdsSemanticAppTheme: (colors: Colors) => AppTheme;
|
|
336
340
|
declare const SDSLightAppTheme: AppTheme;
|
|
337
341
|
declare const SDSDarkAppTheme: AppTheme;
|
|
338
342
|
/**
|
|
@@ -1485,5 +1489,5 @@ type TooltipTableContentProps = TooltipTableExtraProps;
|
|
|
1485
1489
|
* @see https://mui.com/material-ui/react-table/
|
|
1486
1490
|
*/
|
|
1487
1491
|
declare const TooltipTableContent: (props: TooltipTableContentProps) => JSX.Element;
|
|
1488
|
-
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, 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 };
|
|
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 };
|
|
1489
1493
|
export type { AutocompleteBaseProps, AutocompleteMultiColumnProps, AutocompleteOptionBasic, AutocompleteOptionComponent, DefaultAutocompleteOption, ChipProps, IconNameToSizes, InputToggleExtraProps as InputToggleProps, TabsProps$0 as TabsProps, SdsTagColorType, TooltipProps, TooltipTableContentProps };
|
package/dist/index.cjs.js
CHANGED
|
@@ -548,120 +548,71 @@ var sharedAppTheme = {
|
|
|
548
548
|
},
|
|
549
549
|
},
|
|
550
550
|
};
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
//
|
|
556
|
-
//
|
|
557
|
-
//
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
hover: "1px solid ".concat(SDSDarkAppTheme.colors.blue[600]),
|
|
617
|
-
open: "1px solid ".concat(SDSDarkAppTheme.colors.blue[500]),
|
|
618
|
-
pressed: "1px solid ".concat(SDSDarkAppTheme.colors.blue[700]),
|
|
619
|
-
selected: "1px solid ".concat(SDSDarkAppTheme.colors.blue[500]),
|
|
620
|
-
},
|
|
621
|
-
base: {
|
|
622
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.gray[500]),
|
|
623
|
-
disabled: "1px solid ".concat(SDSDarkAppTheme.colors.gray[300]),
|
|
624
|
-
divider: "1px solid ".concat(SDSDarkAppTheme.colors.gray[200]),
|
|
625
|
-
hover: "1px solid ".concat(SDSDarkAppTheme.colors.gray[900]),
|
|
626
|
-
pressed: "1px solid ".concat(SDSDarkAppTheme.colors.gray[900]),
|
|
627
|
-
table: "1px solid ".concat(SDSDarkAppTheme.colors.gray[300]),
|
|
628
|
-
},
|
|
629
|
-
beta: {
|
|
630
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.purple[600]),
|
|
631
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.purple[600]),
|
|
632
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.purple[600]),
|
|
633
|
-
},
|
|
634
|
-
info: {
|
|
635
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.blue[600]),
|
|
636
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.blue[600]),
|
|
637
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.blue[600]),
|
|
638
|
-
},
|
|
639
|
-
link: {
|
|
640
|
-
dashed: "1px dashed",
|
|
641
|
-
solid: "1px solid",
|
|
642
|
-
},
|
|
643
|
-
negative: {
|
|
644
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.red[600]),
|
|
645
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.red[600]),
|
|
646
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.red[600]),
|
|
647
|
-
},
|
|
648
|
-
neutral: {
|
|
649
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.gray[500]),
|
|
650
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.gray[500]),
|
|
651
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.gray[500]),
|
|
652
|
-
},
|
|
653
|
-
none: "none",
|
|
654
|
-
notice: {
|
|
655
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.yellow[600]),
|
|
656
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.yellow[600]),
|
|
657
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.yellow[600]),
|
|
658
|
-
},
|
|
659
|
-
positive: {
|
|
660
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.green[600]),
|
|
661
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.green[600]),
|
|
662
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.green[600]),
|
|
663
|
-
},
|
|
664
|
-
};
|
|
551
|
+
/**
|
|
552
|
+
* Create a SDS App Theme with custom colors that follows the SDS color model.
|
|
553
|
+
*/
|
|
554
|
+
var makeSdsSemanticAppTheme = function (colors) { return (__assign(__assign({}, sharedAppTheme), {
|
|
555
|
+
// (mlila) whenever our theme uses colors, we need to make sure we allow consuming
|
|
556
|
+
// applications to override those colors using their own custom theme.
|
|
557
|
+
// By defining borders using SDSAppTheme.colors instead of defaultThemeColors,
|
|
558
|
+
// we allow other apps to specify their colors once, and have them apply
|
|
559
|
+
// throughout the application, such as in borders, etc without having to manually
|
|
560
|
+
// override every theme property that makes use of colors.
|
|
561
|
+
borders: {
|
|
562
|
+
accent: {
|
|
563
|
+
default: "1px solid ".concat(colors.blue[500]),
|
|
564
|
+
focused: "1px solid ".concat(colors.blue[500]),
|
|
565
|
+
hover: "1px solid ".concat(colors.blue[600]),
|
|
566
|
+
open: "1px solid ".concat(colors.blue[500]),
|
|
567
|
+
pressed: "1px solid ".concat(colors.blue[700]),
|
|
568
|
+
selected: "1px solid ".concat(colors.blue[500]),
|
|
569
|
+
},
|
|
570
|
+
base: {
|
|
571
|
+
default: "1px solid ".concat(colors.gray[500]),
|
|
572
|
+
disabled: "1px solid ".concat(colors.gray[300]),
|
|
573
|
+
divider: "1px solid ".concat(colors.gray[200]),
|
|
574
|
+
hover: "1px solid ".concat(colors.gray[900]),
|
|
575
|
+
pressed: "1px solid ".concat(colors.gray[900]),
|
|
576
|
+
table: "1px solid ".concat(colors.gray[300]),
|
|
577
|
+
},
|
|
578
|
+
beta: {
|
|
579
|
+
default: "1px solid ".concat(colors.purple[600]),
|
|
580
|
+
extraThick: "4px solid ".concat(colors.purple[600]),
|
|
581
|
+
thick: "2px solid ".concat(colors.purple[600]),
|
|
582
|
+
},
|
|
583
|
+
info: {
|
|
584
|
+
default: "1px solid ".concat(colors.blue[600]),
|
|
585
|
+
extraThick: "4px solid ".concat(colors.blue[600]),
|
|
586
|
+
thick: "2px solid ".concat(colors.blue[600]),
|
|
587
|
+
},
|
|
588
|
+
link: {
|
|
589
|
+
dashed: "1px dashed",
|
|
590
|
+
solid: "1px solid",
|
|
591
|
+
},
|
|
592
|
+
negative: {
|
|
593
|
+
default: "1px solid ".concat(colors.red[600]),
|
|
594
|
+
extraThick: "4px solid ".concat(colors.red[600]),
|
|
595
|
+
thick: "2px solid ".concat(colors.red[600]),
|
|
596
|
+
},
|
|
597
|
+
neutral: {
|
|
598
|
+
default: "1px solid ".concat(colors.gray[500]),
|
|
599
|
+
extraThick: "4px solid ".concat(colors.gray[500]),
|
|
600
|
+
thick: "2px solid ".concat(colors.gray[500]),
|
|
601
|
+
},
|
|
602
|
+
none: "none",
|
|
603
|
+
notice: {
|
|
604
|
+
default: "1px solid ".concat(colors.yellow[600]),
|
|
605
|
+
extraThick: "4px solid ".concat(colors.yellow[600]),
|
|
606
|
+
thick: "2px solid ".concat(colors.yellow[600]),
|
|
607
|
+
},
|
|
608
|
+
positive: {
|
|
609
|
+
default: "1px solid ".concat(colors.green[600]),
|
|
610
|
+
extraThick: "4px solid ".concat(colors.green[600]),
|
|
611
|
+
thick: "2px solid ".concat(colors.green[600]),
|
|
612
|
+
},
|
|
613
|
+
}, colors: colors })); };
|
|
614
|
+
var SDSLightAppTheme = makeSdsSemanticAppTheme(SDSLightThemeColors);
|
|
615
|
+
var SDSDarkAppTheme = makeSdsSemanticAppTheme(SDSDarkThemeColors);
|
|
665
616
|
/**
|
|
666
617
|
* Helper function to select the appropriate theme settings.
|
|
667
618
|
*
|
|
@@ -7095,16 +7046,12 @@ var InputToggle = function (props) {
|
|
|
7095
7046
|
|
|
7096
7047
|
var doNotForwardProps$a = ["sdsStyle", "sdsSize", "fontWeight"];
|
|
7097
7048
|
var defaultStyle = function (props) {
|
|
7098
|
-
var _a, _b, _c, _d
|
|
7099
|
-
var _h = props.sdsSize, sdsSize = _h === void 0 ? "s" : _h;
|
|
7049
|
+
var _a, _b, _c, _d;
|
|
7100
7050
|
var semanticColors = getSemanticColors(props);
|
|
7101
|
-
return react.css(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n color: ", ";\n position: relative;\n
|
|
7051
|
+
return react.css(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n color: ", ";\n position: relative;\n text-decoration: none;\n text-underline-offset: 2.5px;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:focus {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n text-decoration: underline;\n }\n "], ["\n color: ", ";\n position: relative;\n text-decoration: none;\n text-underline-offset: 2.5px;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:focus {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n text-decoration: underline;\n }\n "])), (_a = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.accent) === null || _a === void 0 ? void 0 : _a.textAction, (_b = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.accent) === null || _b === void 0 ? void 0 : _b.textActionHover, (_c = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.accent) === null || _c === void 0 ? void 0 : _c.textActionHover, (_d = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.accent) === null || _d === void 0 ? void 0 : _d.textActionPressed);
|
|
7102
7052
|
};
|
|
7103
|
-
var dashedStyle = function (
|
|
7104
|
-
|
|
7105
|
-
var _d = props.sdsSize, sdsSize = _d === void 0 ? "s" : _d;
|
|
7106
|
-
var semanticColors = getSemanticColors(props);
|
|
7107
|
-
return react.css(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n color: inherit;\n position: relative;\n\n &::after {\n content: \"\";\n display: block;\n position: absolute;\n height: 1px;\n margin-top: ", "px;\n margin-left: 1px;\n width: 100%;\n background-image: linear-gradient(\n to right,\n ", " 60%,\n transparent 60%\n );\n background-size: 5px 100%;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n &::after {\n background-image: linear-gradient(\n to right,\n ", " 60%,\n ", " 60%\n );\n }\n }\n "], ["\n color: inherit;\n position: relative;\n\n &::after {\n content: \"\";\n display: block;\n position: absolute;\n height: 1px;\n margin-top: ", "px;\n margin-left: 1px;\n width: 100%;\n background-image: linear-gradient(\n to right,\n ", " 60%,\n transparent 60%\n );\n background-size: 5px 100%;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n &::after {\n background-image: linear-gradient(\n to right,\n ", " 60%,\n ", " 60%\n );\n }\n }\n "])), sdsSize === "s" ? -4 : -3, (_a = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _a === void 0 ? void 0 : _a.borderHover, (_b = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _b === void 0 ? void 0 : _b.borderHover, (_c = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _c === void 0 ? void 0 : _c.borderHover);
|
|
7053
|
+
var dashedStyle = function () {
|
|
7054
|
+
return react.css(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n color: inherit;\n position: relative;\n text-decoration: underline dashed;\n text-underline-offset: 2.5px;\n\n &:hover,\n &:focus,\n &:active,\n &:focus-visible {\n text-decoration-style: solid;\n }\n "], ["\n color: inherit;\n position: relative;\n text-decoration: underline dashed;\n text-underline-offset: 2.5px;\n\n &:hover,\n &:focus,\n &:active,\n &:focus-visible {\n text-decoration-style: solid;\n }\n "])));
|
|
7108
7055
|
};
|
|
7109
7056
|
var smallStyle = function (props) {
|
|
7110
7057
|
return fontBodyS$1(props);
|
|
@@ -7118,7 +7065,7 @@ var StyledLink = styled(material.Link, {
|
|
|
7118
7065
|
},
|
|
7119
7066
|
})(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n all: unset;\n\n ", "\n\n ", "\n"], ["\n all: unset;\n\n ", "\n\n ", "\n"])), focusVisibleA11yStyle, function (props) {
|
|
7120
7067
|
var _a = props.fontWeight, fontWeight = _a === void 0 ? "normal" : _a, sdsStyle = props.sdsStyle, _b = props.sdsSize, sdsSize = _b === void 0 ? "s" : _b;
|
|
7121
|
-
return react.css(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n\n font-weight: ", ";\n display: inline-block;\n cursor: pointer;\n "], ["\n ", "\n ", "\n ", "\n ", "\n\n font-weight: ", ";\n display: inline-block;\n cursor: pointer;\n "])), sdsStyle === "default" && defaultStyle(props), sdsStyle === "dashed" && dashedStyle(
|
|
7068
|
+
return react.css(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n\n font-weight: ", ";\n display: inline-block;\n cursor: pointer;\n "], ["\n ", "\n ", "\n ", "\n ", "\n\n font-weight: ", ";\n display: inline-block;\n cursor: pointer;\n "])), sdsStyle === "default" && defaultStyle(props), sdsStyle === "dashed" && dashedStyle(), sdsSize === "s" && smallStyle(props), sdsSize === "xs" && extraSmallStyle(props), fontWeight === "normal" ? "400" : "600");
|
|
7122
7069
|
});
|
|
7123
7070
|
var templateObject_1$m, templateObject_2$b, templateObject_3$6, templateObject_4$5;
|
|
7124
7071
|
|
|
@@ -8350,4 +8297,5 @@ exports.getShadows = getShadows;
|
|
|
8350
8297
|
exports.getSpaces = getSpaces;
|
|
8351
8298
|
exports.getSpacings = getSpacings;
|
|
8352
8299
|
exports.getTypography = getTypography;
|
|
8300
|
+
exports.makeSdsSemanticAppTheme = makeSdsSemanticAppTheme;
|
|
8353
8301
|
exports.makeThemeOptions = makeThemeOptions;
|
package/dist/index.esm.d.ts
CHANGED
|
@@ -333,6 +333,10 @@ declare const Theme$0: (t: PaletteMode) => import("@mui/material").Theme;
|
|
|
333
333
|
* Use the `theme` export to get a flexible light/dark mode theme function
|
|
334
334
|
*/
|
|
335
335
|
declare const defaultTheme: import("@mui/material").Theme;
|
|
336
|
+
/**
|
|
337
|
+
* Create a SDS App Theme with custom colors that follows the SDS color model.
|
|
338
|
+
*/
|
|
339
|
+
declare const makeSdsSemanticAppTheme: (colors: Colors) => AppTheme;
|
|
336
340
|
declare const SDSLightAppTheme: AppTheme;
|
|
337
341
|
declare const SDSDarkAppTheme: AppTheme;
|
|
338
342
|
/**
|
|
@@ -1485,5 +1489,5 @@ type TooltipTableContentProps = TooltipTableExtraProps;
|
|
|
1485
1489
|
* @see https://mui.com/material-ui/react-table/
|
|
1486
1490
|
*/
|
|
1487
1491
|
declare const TooltipTableContent: (props: TooltipTableContentProps) => JSX.Element;
|
|
1488
|
-
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, 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 };
|
|
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 };
|
|
1489
1493
|
export type { AutocompleteBaseProps, AutocompleteMultiColumnProps, AutocompleteOptionBasic, AutocompleteOptionComponent, DefaultAutocompleteOption, ChipProps, IconNameToSizes, InputToggleExtraProps as InputToggleProps, TabsProps$0 as TabsProps, SdsTagColorType, TooltipProps, TooltipTableContentProps };
|
package/dist/index.esm.js
CHANGED
|
@@ -528,120 +528,71 @@ var sharedAppTheme = {
|
|
|
528
528
|
},
|
|
529
529
|
},
|
|
530
530
|
};
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
//
|
|
536
|
-
//
|
|
537
|
-
//
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
hover: "1px solid ".concat(SDSDarkAppTheme.colors.blue[600]),
|
|
597
|
-
open: "1px solid ".concat(SDSDarkAppTheme.colors.blue[500]),
|
|
598
|
-
pressed: "1px solid ".concat(SDSDarkAppTheme.colors.blue[700]),
|
|
599
|
-
selected: "1px solid ".concat(SDSDarkAppTheme.colors.blue[500]),
|
|
600
|
-
},
|
|
601
|
-
base: {
|
|
602
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.gray[500]),
|
|
603
|
-
disabled: "1px solid ".concat(SDSDarkAppTheme.colors.gray[300]),
|
|
604
|
-
divider: "1px solid ".concat(SDSDarkAppTheme.colors.gray[200]),
|
|
605
|
-
hover: "1px solid ".concat(SDSDarkAppTheme.colors.gray[900]),
|
|
606
|
-
pressed: "1px solid ".concat(SDSDarkAppTheme.colors.gray[900]),
|
|
607
|
-
table: "1px solid ".concat(SDSDarkAppTheme.colors.gray[300]),
|
|
608
|
-
},
|
|
609
|
-
beta: {
|
|
610
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.purple[600]),
|
|
611
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.purple[600]),
|
|
612
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.purple[600]),
|
|
613
|
-
},
|
|
614
|
-
info: {
|
|
615
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.blue[600]),
|
|
616
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.blue[600]),
|
|
617
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.blue[600]),
|
|
618
|
-
},
|
|
619
|
-
link: {
|
|
620
|
-
dashed: "1px dashed",
|
|
621
|
-
solid: "1px solid",
|
|
622
|
-
},
|
|
623
|
-
negative: {
|
|
624
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.red[600]),
|
|
625
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.red[600]),
|
|
626
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.red[600]),
|
|
627
|
-
},
|
|
628
|
-
neutral: {
|
|
629
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.gray[500]),
|
|
630
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.gray[500]),
|
|
631
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.gray[500]),
|
|
632
|
-
},
|
|
633
|
-
none: "none",
|
|
634
|
-
notice: {
|
|
635
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.yellow[600]),
|
|
636
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.yellow[600]),
|
|
637
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.yellow[600]),
|
|
638
|
-
},
|
|
639
|
-
positive: {
|
|
640
|
-
default: "1px solid ".concat(SDSDarkAppTheme.colors.green[600]),
|
|
641
|
-
extraThick: "4px solid ".concat(SDSDarkAppTheme.colors.green[600]),
|
|
642
|
-
thick: "2px solid ".concat(SDSDarkAppTheme.colors.green[600]),
|
|
643
|
-
},
|
|
644
|
-
};
|
|
531
|
+
/**
|
|
532
|
+
* Create a SDS App Theme with custom colors that follows the SDS color model.
|
|
533
|
+
*/
|
|
534
|
+
var makeSdsSemanticAppTheme = function (colors) { return (__assign(__assign({}, sharedAppTheme), {
|
|
535
|
+
// (mlila) whenever our theme uses colors, we need to make sure we allow consuming
|
|
536
|
+
// applications to override those colors using their own custom theme.
|
|
537
|
+
// By defining borders using SDSAppTheme.colors instead of defaultThemeColors,
|
|
538
|
+
// we allow other apps to specify their colors once, and have them apply
|
|
539
|
+
// throughout the application, such as in borders, etc without having to manually
|
|
540
|
+
// override every theme property that makes use of colors.
|
|
541
|
+
borders: {
|
|
542
|
+
accent: {
|
|
543
|
+
default: "1px solid ".concat(colors.blue[500]),
|
|
544
|
+
focused: "1px solid ".concat(colors.blue[500]),
|
|
545
|
+
hover: "1px solid ".concat(colors.blue[600]),
|
|
546
|
+
open: "1px solid ".concat(colors.blue[500]),
|
|
547
|
+
pressed: "1px solid ".concat(colors.blue[700]),
|
|
548
|
+
selected: "1px solid ".concat(colors.blue[500]),
|
|
549
|
+
},
|
|
550
|
+
base: {
|
|
551
|
+
default: "1px solid ".concat(colors.gray[500]),
|
|
552
|
+
disabled: "1px solid ".concat(colors.gray[300]),
|
|
553
|
+
divider: "1px solid ".concat(colors.gray[200]),
|
|
554
|
+
hover: "1px solid ".concat(colors.gray[900]),
|
|
555
|
+
pressed: "1px solid ".concat(colors.gray[900]),
|
|
556
|
+
table: "1px solid ".concat(colors.gray[300]),
|
|
557
|
+
},
|
|
558
|
+
beta: {
|
|
559
|
+
default: "1px solid ".concat(colors.purple[600]),
|
|
560
|
+
extraThick: "4px solid ".concat(colors.purple[600]),
|
|
561
|
+
thick: "2px solid ".concat(colors.purple[600]),
|
|
562
|
+
},
|
|
563
|
+
info: {
|
|
564
|
+
default: "1px solid ".concat(colors.blue[600]),
|
|
565
|
+
extraThick: "4px solid ".concat(colors.blue[600]),
|
|
566
|
+
thick: "2px solid ".concat(colors.blue[600]),
|
|
567
|
+
},
|
|
568
|
+
link: {
|
|
569
|
+
dashed: "1px dashed",
|
|
570
|
+
solid: "1px solid",
|
|
571
|
+
},
|
|
572
|
+
negative: {
|
|
573
|
+
default: "1px solid ".concat(colors.red[600]),
|
|
574
|
+
extraThick: "4px solid ".concat(colors.red[600]),
|
|
575
|
+
thick: "2px solid ".concat(colors.red[600]),
|
|
576
|
+
},
|
|
577
|
+
neutral: {
|
|
578
|
+
default: "1px solid ".concat(colors.gray[500]),
|
|
579
|
+
extraThick: "4px solid ".concat(colors.gray[500]),
|
|
580
|
+
thick: "2px solid ".concat(colors.gray[500]),
|
|
581
|
+
},
|
|
582
|
+
none: "none",
|
|
583
|
+
notice: {
|
|
584
|
+
default: "1px solid ".concat(colors.yellow[600]),
|
|
585
|
+
extraThick: "4px solid ".concat(colors.yellow[600]),
|
|
586
|
+
thick: "2px solid ".concat(colors.yellow[600]),
|
|
587
|
+
},
|
|
588
|
+
positive: {
|
|
589
|
+
default: "1px solid ".concat(colors.green[600]),
|
|
590
|
+
extraThick: "4px solid ".concat(colors.green[600]),
|
|
591
|
+
thick: "2px solid ".concat(colors.green[600]),
|
|
592
|
+
},
|
|
593
|
+
}, colors: colors })); };
|
|
594
|
+
var SDSLightAppTheme = makeSdsSemanticAppTheme(SDSLightThemeColors);
|
|
595
|
+
var SDSDarkAppTheme = makeSdsSemanticAppTheme(SDSDarkThemeColors);
|
|
645
596
|
/**
|
|
646
597
|
* Helper function to select the appropriate theme settings.
|
|
647
598
|
*
|
|
@@ -7075,16 +7026,12 @@ var InputToggle = function (props) {
|
|
|
7075
7026
|
|
|
7076
7027
|
var doNotForwardProps$a = ["sdsStyle", "sdsSize", "fontWeight"];
|
|
7077
7028
|
var defaultStyle = function (props) {
|
|
7078
|
-
var _a, _b, _c, _d
|
|
7079
|
-
var _h = props.sdsSize, sdsSize = _h === void 0 ? "s" : _h;
|
|
7029
|
+
var _a, _b, _c, _d;
|
|
7080
7030
|
var semanticColors = getSemanticColors(props);
|
|
7081
|
-
return css(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n color: ", ";\n position: relative;\n
|
|
7031
|
+
return css(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n color: ", ";\n position: relative;\n text-decoration: none;\n text-underline-offset: 2.5px;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:focus {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n text-decoration: underline;\n }\n "], ["\n color: ", ";\n position: relative;\n text-decoration: none;\n text-underline-offset: 2.5px;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:focus {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n text-decoration: underline;\n }\n "])), (_a = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.accent) === null || _a === void 0 ? void 0 : _a.textAction, (_b = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.accent) === null || _b === void 0 ? void 0 : _b.textActionHover, (_c = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.accent) === null || _c === void 0 ? void 0 : _c.textActionHover, (_d = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.accent) === null || _d === void 0 ? void 0 : _d.textActionPressed);
|
|
7082
7032
|
};
|
|
7083
|
-
var dashedStyle = function (
|
|
7084
|
-
|
|
7085
|
-
var _d = props.sdsSize, sdsSize = _d === void 0 ? "s" : _d;
|
|
7086
|
-
var semanticColors = getSemanticColors(props);
|
|
7087
|
-
return css(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n color: inherit;\n position: relative;\n\n &::after {\n content: \"\";\n display: block;\n position: absolute;\n height: 1px;\n margin-top: ", "px;\n margin-left: 1px;\n width: 100%;\n background-image: linear-gradient(\n to right,\n ", " 60%,\n transparent 60%\n );\n background-size: 5px 100%;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n &::after {\n background-image: linear-gradient(\n to right,\n ", " 60%,\n ", " 60%\n );\n }\n }\n "], ["\n color: inherit;\n position: relative;\n\n &::after {\n content: \"\";\n display: block;\n position: absolute;\n height: 1px;\n margin-top: ", "px;\n margin-left: 1px;\n width: 100%;\n background-image: linear-gradient(\n to right,\n ", " 60%,\n transparent 60%\n );\n background-size: 5px 100%;\n }\n\n &:hover,\n &:focus {\n text-decoration: none;\n &::after {\n background-image: linear-gradient(\n to right,\n ", " 60%,\n ", " 60%\n );\n }\n }\n "])), sdsSize === "s" ? -4 : -3, (_a = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _a === void 0 ? void 0 : _a.borderHover, (_b = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _b === void 0 ? void 0 : _b.borderHover, (_c = semanticColors === null || semanticColors === void 0 ? void 0 : semanticColors.base) === null || _c === void 0 ? void 0 : _c.borderHover);
|
|
7033
|
+
var dashedStyle = function () {
|
|
7034
|
+
return css(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n color: inherit;\n position: relative;\n text-decoration: underline dashed;\n text-underline-offset: 2.5px;\n\n &:hover,\n &:focus,\n &:active,\n &:focus-visible {\n text-decoration-style: solid;\n }\n "], ["\n color: inherit;\n position: relative;\n text-decoration: underline dashed;\n text-underline-offset: 2.5px;\n\n &:hover,\n &:focus,\n &:active,\n &:focus-visible {\n text-decoration-style: solid;\n }\n "])));
|
|
7088
7035
|
};
|
|
7089
7036
|
var smallStyle = function (props) {
|
|
7090
7037
|
return fontBodyS$1(props);
|
|
@@ -7098,7 +7045,7 @@ var StyledLink = styled(Link$1, {
|
|
|
7098
7045
|
},
|
|
7099
7046
|
})(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n all: unset;\n\n ", "\n\n ", "\n"], ["\n all: unset;\n\n ", "\n\n ", "\n"])), focusVisibleA11yStyle, function (props) {
|
|
7100
7047
|
var _a = props.fontWeight, fontWeight = _a === void 0 ? "normal" : _a, sdsStyle = props.sdsStyle, _b = props.sdsSize, sdsSize = _b === void 0 ? "s" : _b;
|
|
7101
|
-
return css(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n\n font-weight: ", ";\n display: inline-block;\n cursor: pointer;\n "], ["\n ", "\n ", "\n ", "\n ", "\n\n font-weight: ", ";\n display: inline-block;\n cursor: pointer;\n "])), sdsStyle === "default" && defaultStyle(props), sdsStyle === "dashed" && dashedStyle(
|
|
7048
|
+
return css(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n\n font-weight: ", ";\n display: inline-block;\n cursor: pointer;\n "], ["\n ", "\n ", "\n ", "\n ", "\n\n font-weight: ", ";\n display: inline-block;\n cursor: pointer;\n "])), sdsStyle === "default" && defaultStyle(props), sdsStyle === "dashed" && dashedStyle(), sdsSize === "s" && smallStyle(props), sdsSize === "xs" && extraSmallStyle(props), fontWeight === "normal" ? "400" : "600");
|
|
7102
7049
|
});
|
|
7103
7050
|
var templateObject_1$m, templateObject_2$b, templateObject_3$6, templateObject_4$5;
|
|
7104
7051
|
|
|
@@ -8205,4 +8152,4 @@ var TooltipTableContent = function (props) {
|
|
|
8205
8152
|
return (jsxs(TableContainer, __assign({}, rest, { children: [contentAlert && jsx(Alert, { children: contentAlert }), data === null || data === void 0 ? void 0 : data.map(function (section, index) { return (jsxs(Section, { disabled: section.disabled, children: [jsx(SectionLabel, { disabled: section.disabled, label: section.label, children: section.label }), jsx(Table$1, { size: "small", children: jsx(TableBody, { children: section.dataRows.map(function (row, rowIndex) { return (jsxs(TableRow$1, { children: [jsx(RowLabel, { disabled: section.disabled, align: "left", children: row.label }), jsx(RowValue, { disabled: section.disabled, align: itemAlign, children: row.value })] }, row.label + String(rowIndex))); }) }) })] }, "".concat(section.label + String(index)))); })] })));
|
|
8206
8153
|
};
|
|
8207
8154
|
|
|
8208
|
-
export { Accordion, AccordionDetails, AccordionHeader, Alert$1 as Alert, Autocomplete, StyledPopper$2 as AutocompleteMultiColumnStyledPopper, StyledPaper$3 as AutocompleteSingleColumnStyledPaper, Banner, Button, ButtonDropdown, ButtonIcon, ButtonToggle, Callout, CalloutTitle, CellBasic, CellComponent, CellHeader, Chip, ComplexFilter, InputDropdown as ComplexFilterInputDropdown, StyledPopper as ComplexFilterPopper, Dialog, DialogActions, index as DialogContent, DialogContext, DialogPaper, DialogTitle, Overline as DialogTitleOverline, Subtitle as DialogTitleSubtitle, Title as DialogTitleTitle, Dropdown, InputDropdown as DropdownInputDropdown, DropdownMenu, StyledPaper$1 as DropdownPaper, StyledPopper as DropdownPopper, Icon, InputCheckbox, InputDropdown, InputRadio, InputSearch, InputSlider, InputText, InputToggle, Link, List, ListItem, ListItemLabel, ListSubheader, LoadingIndicator, MINIMUM_DROPDOWN_MENU_POPPER_WIDTH, Menu, MenuItem, MenuSelect, NavigationJumpTo, Notification, PANEL_BASIC_MIN_WIDTH_PX, PANEL_OVERLAY_MIN_WIDTH_PX, Pagination, Panel, SDSChooseTheme, SDSDarkAppTheme, SDSLightAppTheme, SegmentedControl, Tab, Table, TableHeader, TableRow, Tabs, Tag, TagFilter, Theme, Tooltip, TooltipCondensed, TooltipTableContent as TooltipTable, defaultAppTheme, defaultTheme, focusVisibleA11yStyle, fontBody, fontBodyL$1 as fontBodyL, fontBodyM$1 as fontBodyM, fontBodyS$1 as fontBodyS, fontBodySemiboldL, fontBodySemiboldM, fontBodySemiboldS, fontBodySemiboldXs, fontBodySemiboldXxs, fontBodySemiboldXxxs, fontBodyXs$2 as fontBodyXs, fontBodyXxs$1 as fontBodyXxs, fontBodyXxxs$1 as fontBodyXxxs, fontCaps, fontCapsXxs, fontCapsXxxs, fontCapsXxxxs, fontCode, fontCodeS, fontCodeSemiboldS, fontCodeSemiboldXs, fontCodeXs, fontHeader, fontHeaderL, fontHeaderM$1 as fontHeaderM, fontHeaderS, fontHeaderXl, fontHeaderXs, fontHeaderXxl, fontHeaderXxs, fontHeaderXxxs, fontTabular, fontTabularS, fontTabularSemiboldS, fontTabularSemiboldXs, fontTabularXs, getBorders, getColors, getCorners, getFontWeights, getIconSizes, getMode, getPalette, getSemanticColors, getShadows, getSpaces, getSpacings, getTypography, makeThemeOptions };
|
|
8155
|
+
export { Accordion, AccordionDetails, AccordionHeader, Alert$1 as Alert, Autocomplete, StyledPopper$2 as AutocompleteMultiColumnStyledPopper, StyledPaper$3 as AutocompleteSingleColumnStyledPaper, Banner, Button, ButtonDropdown, ButtonIcon, ButtonToggle, Callout, CalloutTitle, CellBasic, CellComponent, CellHeader, Chip, ComplexFilter, InputDropdown as ComplexFilterInputDropdown, StyledPopper as ComplexFilterPopper, Dialog, DialogActions, index as DialogContent, DialogContext, DialogPaper, DialogTitle, Overline as DialogTitleOverline, Subtitle as DialogTitleSubtitle, Title as DialogTitleTitle, Dropdown, InputDropdown as DropdownInputDropdown, DropdownMenu, StyledPaper$1 as DropdownPaper, StyledPopper as DropdownPopper, Icon, InputCheckbox, InputDropdown, InputRadio, InputSearch, InputSlider, InputText, InputToggle, Link, List, ListItem, ListItemLabel, ListSubheader, LoadingIndicator, MINIMUM_DROPDOWN_MENU_POPPER_WIDTH, Menu, MenuItem, MenuSelect, NavigationJumpTo, Notification, PANEL_BASIC_MIN_WIDTH_PX, PANEL_OVERLAY_MIN_WIDTH_PX, Pagination, Panel, SDSChooseTheme, SDSDarkAppTheme, SDSLightAppTheme, SegmentedControl, Tab, Table, TableHeader, TableRow, Tabs, Tag, TagFilter, Theme, Tooltip, TooltipCondensed, TooltipTableContent as TooltipTable, defaultAppTheme, defaultTheme, focusVisibleA11yStyle, fontBody, fontBodyL$1 as fontBodyL, fontBodyM$1 as fontBodyM, fontBodyS$1 as fontBodyS, fontBodySemiboldL, fontBodySemiboldM, fontBodySemiboldS, fontBodySemiboldXs, fontBodySemiboldXxs, fontBodySemiboldXxxs, fontBodyXs$2 as fontBodyXs, fontBodyXxs$1 as fontBodyXxs, fontBodyXxxs$1 as fontBodyXxxs, fontCaps, fontCapsXxs, fontCapsXxxs, fontCapsXxxxs, fontCode, fontCodeS, fontCodeSemiboldS, fontCodeSemiboldXs, fontCodeXs, fontHeader, fontHeaderL, fontHeaderM$1 as fontHeaderM, fontHeaderS, fontHeaderXl, fontHeaderXs, fontHeaderXxl, fontHeaderXxs, fontHeaderXxxs, fontTabular, fontTabularS, fontTabularSemiboldS, fontTabularSemiboldXs, fontTabularXs, getBorders, getColors, getCorners, getFontWeights, getIconSizes, getMode, getPalette, getSemanticColors, getShadows, getSpaces, getSpacings, getTypography, makeSdsSemanticAppTheme, makeThemeOptions };
|