@czi-sds/components 23.3.4 → 23.5.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/dist/index.cjs.d.ts +84 -23
- package/dist/index.cjs.js +1979 -1301
- package/dist/index.esm.d.ts +84 -23
- package/dist/index.esm.js +1979 -1304
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import React__default, { forwardRef, Children, isValidElement, useEffect, useRef, useState, useCallback, createElement, cloneElement, useMemo,
|
|
4
|
+
import React__default, { forwardRef, Children, isValidElement, useEffect, useRef, useState, useCallback, createElement, cloneElement, useMemo, createContext, Fragment as Fragment$1, useContext, memo } from 'react';
|
|
5
5
|
import { css as css$1 } from '@emotion/react';
|
|
6
|
-
import { createTheme, AccordionDetails as AccordionDetails$1, accordionSummaryClasses, AccordionSummary, SvgIcon, accordionClasses, accordionDetailsClasses, Accordion as Accordion$1, Alert as Alert$2, Button as Button$1, buttonClasses, outlinedInputClasses, inputBaseClasses, buttonBaseClasses, inputAdornmentClasses, TextField, InputAdornment, menuItemClasses, MenuItem as MenuItem$1, autocompleteClasses, Autocomplete as Autocomplete$1, Paper, useTheme, Popper, styled as styled$1, ClickAwayListener, ButtonGroup as ButtonGroup$1, buttonGroupClasses, IconButton, alertClasses, alertTitleClasses, AlertTitle, Grow, Tooltip as Tooltip$1, Chip as Chip$1, alpha, darken as darken$1, Card, CardContent, CardActions, css as css$3, CardMedia, DialogTitle as DialogTitle$1, Typography, dialogActionsClasses, DialogActions as DialogActions$1, Dialog as Dialog$1, DialogContent,
|
|
6
|
+
import { createTheme, AccordionDetails as AccordionDetails$1, accordionSummaryClasses, AccordionSummary, SvgIcon, accordionClasses, accordionDetailsClasses, Accordion as Accordion$1, Alert as Alert$2, Button as Button$1, buttonClasses, outlinedInputClasses, inputBaseClasses, buttonBaseClasses, inputAdornmentClasses, TextField, InputAdornment, menuItemClasses, MenuItem as MenuItem$1, autocompleteClasses, Autocomplete as Autocomplete$1, Paper, useTheme, Popper, styled as styled$1, ClickAwayListener, ButtonGroup as ButtonGroup$1, buttonGroupClasses, IconButton, alertClasses, alertTitleClasses, AlertTitle, Grow, Tooltip as Tooltip$1, menuClasses, Menu as Menu$1, checkboxClasses, Checkbox, FormControlLabel, Link as Link$1, Chip as Chip$1, alpha, darken as darken$1, Card, CardContent, CardActions, css as css$3, CardMedia, DialogTitle as DialogTitle$1, Typography, dialogActionsClasses, DialogActions as DialogActions$1, Dialog as Dialog$1, DialogContent, radioClasses, Radio, Slider, sliderClasses, Switch, switchClasses, List as List$1, ListItem as ListItem$1, ListSubheader as ListSubheader$1, Divider, useMediaQuery, AppBar, Toolbar, Drawer, useScrollTrigger, tabsClasses, Tabs as Tabs$1, Tab as Tab$1, Slide, Box, drawerClasses, popoverClasses, Popover as Popover$1, toggleButtonClasses, ToggleButtonGroup, ToggleButton, TableContainer, TableCell, Table as Table$1, TableBody, TableRow as TableRow$1 } from '@mui/material';
|
|
7
7
|
export { CardMedia as ContentCardMedia } from '@mui/material';
|
|
8
8
|
import styled from '@emotion/styled';
|
|
9
9
|
import { Remove, Clear } from '@mui/icons-material';
|
|
10
10
|
import { css as css$2 } from '@emotion/css';
|
|
11
|
+
import { useReactTable, getSortedRowModel, getPaginationRowModel, getFilteredRowModel, getCoreRowModel, flexRender } from '@tanstack/react-table';
|
|
11
12
|
import Button$2 from '@mui/material/Button';
|
|
12
13
|
import { useTheme as useTheme$1 } from '@mui/material/styles';
|
|
13
14
|
|
|
@@ -1664,9 +1665,9 @@ const AccordionDetails = (props) => {
|
|
|
1664
1665
|
return (jsx(StyledAccordionDetails$1, __assign({ id: id }, rest, { children: children })));
|
|
1665
1666
|
};
|
|
1666
1667
|
|
|
1667
|
-
const doNotForwardProps$
|
|
1668
|
+
const doNotForwardProps$M = ["chevronSize", "hasInvertedStyle"];
|
|
1668
1669
|
const StyledAccordionHeader = styled(AccordionSummary, {
|
|
1669
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
1670
|
+
shouldForwardProp: (prop) => !doNotForwardProps$M.includes(prop)
|
|
1670
1671
|
}) `
|
|
1671
1672
|
${fontBodySemiboldL}
|
|
1672
1673
|
${(props) => {
|
|
@@ -4921,12 +4922,12 @@ const iconMap = {
|
|
|
4921
4922
|
}
|
|
4922
4923
|
};
|
|
4923
4924
|
|
|
4924
|
-
const doNotForwardProps$
|
|
4925
|
+
const doNotForwardProps$L = ["sdsIcon", "sdsSize", "iconColor"];
|
|
4925
4926
|
/**
|
|
4926
4927
|
* @see https://mui.com/material-ui/icons/#svgicon
|
|
4927
4928
|
*/
|
|
4928
4929
|
const StyledSvgIcon = styled(SvgIcon, {
|
|
4929
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
4930
|
+
shouldForwardProp: (prop) => !doNotForwardProps$L.includes(prop)
|
|
4930
4931
|
}) `
|
|
4931
4932
|
${(props) => {
|
|
4932
4933
|
const mode = getMode(props);
|
|
@@ -5199,7 +5200,7 @@ const mergeRefs = (refs) => {
|
|
|
5199
5200
|
};
|
|
5200
5201
|
|
|
5201
5202
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
5202
|
-
const doNotForwardProps$
|
|
5203
|
+
const doNotForwardProps$K = [
|
|
5203
5204
|
"sdsType",
|
|
5204
5205
|
"sdsSize",
|
|
5205
5206
|
"backgroundOnHover",
|
|
@@ -5839,7 +5840,7 @@ const DestructiveButtonStyles = (props) => {
|
|
|
5839
5840
|
`;
|
|
5840
5841
|
};
|
|
5841
5842
|
const StyledButton$4 = styled(Button$1, {
|
|
5842
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
5843
|
+
shouldForwardProp: (prop) => !doNotForwardProps$K.includes(prop)
|
|
5843
5844
|
}) `
|
|
5844
5845
|
${focusVisibleA11yStyle}
|
|
5845
5846
|
|
|
@@ -5917,7 +5918,7 @@ const Button = React__default.forwardRef((props, ref) => {
|
|
|
5917
5918
|
return (jsx(StyledButton$4, __assign({ variant: MUI_VARIANT_MAP$1[sdsStyle] || variant, sdsType: sdsType, size: size, iconOnlyChild: iconOnlyChild, ref: ref }, rest, { children: children ? (jsx(StyledChildren, { size: size, children: children })) : null })));
|
|
5918
5919
|
});
|
|
5919
5920
|
|
|
5920
|
-
const doNotForwardProps$
|
|
5921
|
+
const doNotForwardProps$J = [
|
|
5921
5922
|
"sdsStyle",
|
|
5922
5923
|
"intent",
|
|
5923
5924
|
"handleSubmit",
|
|
@@ -6015,7 +6016,7 @@ const StyledLabel$4 = styled("label") `
|
|
|
6015
6016
|
`;
|
|
6016
6017
|
const StyledSearchBase = styled(TextField, {
|
|
6017
6018
|
shouldForwardProp: (prop) => {
|
|
6018
|
-
return !doNotForwardProps$
|
|
6019
|
+
return !doNotForwardProps$J.includes(prop.toString());
|
|
6019
6020
|
}
|
|
6020
6021
|
}) `
|
|
6021
6022
|
${(props) => {
|
|
@@ -6027,6 +6028,8 @@ const StyledSearchBase = styled(TextField, {
|
|
|
6027
6028
|
return css$1 `
|
|
6028
6029
|
min-width: 120px;
|
|
6029
6030
|
display: block;
|
|
6031
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
6032
|
+
border-radius: ${corners?.l}px;
|
|
6030
6033
|
|
|
6031
6034
|
[type="search"]::-webkit-search-cancel-button {
|
|
6032
6035
|
-webkit-appearance: none;
|
|
@@ -6511,7 +6514,7 @@ const InputSearch = forwardRef(function InputSearch(props, ref) {
|
|
|
6511
6514
|
autoComplete: "one-time-code" }, rest))] }));
|
|
6512
6515
|
});
|
|
6513
6516
|
|
|
6514
|
-
const doNotForwardProps$
|
|
6517
|
+
const doNotForwardProps$I = [
|
|
6515
6518
|
"count",
|
|
6516
6519
|
"keepSearchOnSelect",
|
|
6517
6520
|
"search",
|
|
@@ -6521,7 +6524,7 @@ const doNotForwardProps$J = [
|
|
|
6521
6524
|
"hasGroupBy",
|
|
6522
6525
|
];
|
|
6523
6526
|
const StyledAutocompleteBase = styled(Autocomplete$1, {
|
|
6524
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6527
|
+
shouldForwardProp: (prop) => !doNotForwardProps$I.includes(prop)
|
|
6525
6528
|
}) `
|
|
6526
6529
|
+ .${autocompleteClasses.popper}
|
|
6527
6530
|
> .${autocompleteClasses.paper}
|
|
@@ -6620,7 +6623,7 @@ const StyledAutocompleteBase = styled(Autocomplete$1, {
|
|
|
6620
6623
|
}}
|
|
6621
6624
|
`;
|
|
6622
6625
|
const InputBaseWrapper$1 = styled("div", {
|
|
6623
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6626
|
+
shouldForwardProp: (prop) => !doNotForwardProps$I.includes(prop)
|
|
6624
6627
|
}) `
|
|
6625
6628
|
${(props) => {
|
|
6626
6629
|
const { search } = props;
|
|
@@ -6642,7 +6645,7 @@ const InputBaseWrapper$1 = styled("div", {
|
|
|
6642
6645
|
}}
|
|
6643
6646
|
`;
|
|
6644
6647
|
const StyledMenuInputSearch$1 = styled(InputSearch, {
|
|
6645
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6648
|
+
shouldForwardProp: (prop) => !doNotForwardProps$I.includes(prop)
|
|
6646
6649
|
}) `
|
|
6647
6650
|
margin: 0;
|
|
6648
6651
|
.MuiInputBase-root {
|
|
@@ -6912,7 +6915,7 @@ const AutocompleteGroup = (props) => {
|
|
|
6912
6915
|
}
|
|
6913
6916
|
};
|
|
6914
6917
|
|
|
6915
|
-
const doNotForwardProps$
|
|
6918
|
+
const doNotForwardProps$H = [
|
|
6916
6919
|
"anchorEl",
|
|
6917
6920
|
"count",
|
|
6918
6921
|
"keepSearchOnSelect",
|
|
@@ -6924,7 +6927,7 @@ const doNotForwardProps$I = [
|
|
|
6924
6927
|
"ClickAwayListenerProps",
|
|
6925
6928
|
];
|
|
6926
6929
|
const StyledPopper$2 = styled(Popper, {
|
|
6927
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6930
|
+
shouldForwardProp: (prop) => !doNotForwardProps$H.includes(prop) || prop === "anchorEl"
|
|
6928
6931
|
}) `
|
|
6929
6932
|
${(props) => {
|
|
6930
6933
|
const corners = getCorners(props);
|
|
@@ -6954,7 +6957,7 @@ const StyledPopper$2 = styled(Popper, {
|
|
|
6954
6957
|
}}
|
|
6955
6958
|
`;
|
|
6956
6959
|
const StyledPaper$2 = styled(Paper, {
|
|
6957
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6960
|
+
shouldForwardProp: (prop) => !doNotForwardProps$H.includes(prop)
|
|
6958
6961
|
}) `
|
|
6959
6962
|
${(props) => {
|
|
6960
6963
|
const shadows = getShadows(props);
|
|
@@ -6974,7 +6977,7 @@ const StyledAutocompleteGroupWrapper = styled("div") `
|
|
|
6974
6977
|
display: flex;
|
|
6975
6978
|
`;
|
|
6976
6979
|
const StyledAutocompleteInput = styled(InputSearch, {
|
|
6977
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6980
|
+
shouldForwardProp: (prop) => !doNotForwardProps$H.includes(prop)
|
|
6978
6981
|
}) `
|
|
6979
6982
|
${({ search }) => !search && "height: 0; display: none; margin: 0 !important;"}
|
|
6980
6983
|
|
|
@@ -7296,9 +7299,9 @@ const secondary$2 = (props) => {
|
|
|
7296
7299
|
color: ${semanticColors?.base?.textPrimary};
|
|
7297
7300
|
`;
|
|
7298
7301
|
};
|
|
7299
|
-
const doNotForwardProps$
|
|
7302
|
+
const doNotForwardProps$G = ["sdsType", "textChild", "intent"];
|
|
7300
7303
|
const StyledBanner = styled("div", {
|
|
7301
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
7304
|
+
shouldForwardProp: (prop) => !doNotForwardProps$G.includes(prop)
|
|
7302
7305
|
}) `
|
|
7303
7306
|
${fontBodyS$1}
|
|
7304
7307
|
|
|
@@ -7370,6 +7373,9 @@ var SDSWarningTypes;
|
|
|
7370
7373
|
SDSWarningTypes["TooltipInvertStyle"] = "tooltipInvertStyle";
|
|
7371
7374
|
SDSWarningTypes["ContentCardActionsOnlyButtons"] = "contentCardActionsOnlyButtons";
|
|
7372
7375
|
SDSWarningTypes["ClickableContentCardNumberOfButtons"] = "clickableContentCardNumberOfButtons";
|
|
7376
|
+
SDSWarningTypes["SegmentedControlTooltipTextDeprecated"] = "segmentedControlTooltipTextDeprecated";
|
|
7377
|
+
SDSWarningTypes["SegmentedControlMissingIconOrLabel"] = "segmentedControlMissingIconOrLabel";
|
|
7378
|
+
SDSWarningTypes["SegmentedControlIconAndLabelConflict"] = "segmentedControlIconAndLabelConflict";
|
|
7373
7379
|
})(SDSWarningTypes || (SDSWarningTypes = {}));
|
|
7374
7380
|
const SDS_WARNINGS = {
|
|
7375
7381
|
[SDSWarningTypes.ButtonMinimalIsAllCaps]: {
|
|
@@ -7427,6 +7433,21 @@ const SDS_WARNINGS = {
|
|
|
7427
7433
|
[SDSWarningTypes.ClickableContentCardNumberOfButtons]: {
|
|
7428
7434
|
hasWarned: false,
|
|
7429
7435
|
message: "Warning: Clickable Content Cards can only have one or no buttons!"
|
|
7436
|
+
},
|
|
7437
|
+
[SDSWarningTypes.SegmentedControlTooltipTextDeprecated]: {
|
|
7438
|
+
hasWarned: false,
|
|
7439
|
+
message: 'Warning: "tooltipText" in SegmentedControl buttonDefinition is deprecated. ' +
|
|
7440
|
+
'Please use "tooltipProps" instead. Example: { tooltipProps: { title: "My tooltip" } }'
|
|
7441
|
+
},
|
|
7442
|
+
[SDSWarningTypes.SegmentedControlMissingIconOrLabel]: {
|
|
7443
|
+
hasWarned: false,
|
|
7444
|
+
message: 'Warning: Each SegmentedControl button must have either an "icon" or a "label" prop. ' +
|
|
7445
|
+
"A button was found with neither."
|
|
7446
|
+
},
|
|
7447
|
+
[SDSWarningTypes.SegmentedControlIconAndLabelConflict]: {
|
|
7448
|
+
hasWarned: false,
|
|
7449
|
+
message: 'Warning: Each SegmentedControl button should have either an "icon" or a "label", ' +
|
|
7450
|
+
"not both. Please use only one per button."
|
|
7430
7451
|
}
|
|
7431
7452
|
};
|
|
7432
7453
|
const showWarningIfFirstOccurence = (warningType) => {
|
|
@@ -7460,7 +7481,7 @@ const ButtonDropdown = React__default.forwardRef((props, ref) => {
|
|
|
7460
7481
|
});
|
|
7461
7482
|
|
|
7462
7483
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
7463
|
-
const doNotForwardProps$
|
|
7484
|
+
const doNotForwardProps$F = ["sdsType", "sdsStyle", "backgroundAppearance"];
|
|
7464
7485
|
/**
|
|
7465
7486
|
* General styles for the ButtonGroup component
|
|
7466
7487
|
* Uses CSS borders for styling (with box-sizing: border-box to maintain dimensions)
|
|
@@ -7474,6 +7495,10 @@ const GeneralButtonGroupStyles = (props) => {
|
|
|
7474
7495
|
min-width: fit-content;
|
|
7475
7496
|
z-index: 1;
|
|
7476
7497
|
|
|
7498
|
+
&::before {
|
|
7499
|
+
border-radius: inherit;
|
|
7500
|
+
}
|
|
7501
|
+
|
|
7477
7502
|
&:hover,
|
|
7478
7503
|
&:active,
|
|
7479
7504
|
&:focus {
|
|
@@ -7580,10 +7605,11 @@ const LargeButtonGroupStyles = (props) => {
|
|
|
7580
7605
|
}
|
|
7581
7606
|
}
|
|
7582
7607
|
|
|
7583
|
-
/* Icon-only buttons: has svg but no startIcon/endIcon slots */
|
|
7608
|
+
/* Icon-only buttons: has svg but no startIcon/endIcon slots, or startIcon is the only child (e.g. ButtonToggle) */
|
|
7584
7609
|
.${buttonGroupClasses.grouped}:has(svg):not(
|
|
7585
7610
|
:has(.${buttonClasses.startIcon})
|
|
7586
|
-
):not(:has(.${buttonClasses.endIcon}))
|
|
7611
|
+
):not(:has(.${buttonClasses.endIcon})),
|
|
7612
|
+
.${buttonGroupClasses.grouped}:has(> .${buttonClasses.startIcon}:only-child) {
|
|
7587
7613
|
padding: ${iconOnlyPaddingWide};
|
|
7588
7614
|
|
|
7589
7615
|
${theme?.breakpoints?.down("md")} {
|
|
@@ -7591,8 +7617,10 @@ const LargeButtonGroupStyles = (props) => {
|
|
|
7591
7617
|
}
|
|
7592
7618
|
}
|
|
7593
7619
|
|
|
7594
|
-
/* Text + icon buttons: has startIcon or endIcon */
|
|
7595
|
-
.${buttonGroupClasses.grouped}:has(.${buttonClasses.startIcon})
|
|
7620
|
+
/* Text + icon buttons: has startIcon or endIcon (excluding icon-only ButtonToggle) */
|
|
7621
|
+
.${buttonGroupClasses.grouped}:has(.${buttonClasses.startIcon}):not(
|
|
7622
|
+
:has(> .${buttonClasses.startIcon}:only-child)
|
|
7623
|
+
),
|
|
7596
7624
|
.${buttonGroupClasses.grouped}:has(.${buttonClasses.endIcon}) {
|
|
7597
7625
|
${theme?.breakpoints?.down("md")} {
|
|
7598
7626
|
padding: 0 14px;
|
|
@@ -7658,10 +7686,11 @@ const MediumButtonGroupStyles = (props) => {
|
|
|
7658
7686
|
}
|
|
7659
7687
|
}
|
|
7660
7688
|
|
|
7661
|
-
/* Icon-only buttons: has svg but no startIcon/endIcon slots */
|
|
7689
|
+
/* Icon-only buttons: has svg but no startIcon/endIcon slots, or startIcon is the only child (e.g. ButtonToggle) */
|
|
7662
7690
|
.${buttonGroupClasses.grouped}:has(svg):not(
|
|
7663
7691
|
:has(.${buttonClasses.startIcon})
|
|
7664
|
-
):not(:has(.${buttonClasses.endIcon}))
|
|
7692
|
+
):not(:has(.${buttonClasses.endIcon})),
|
|
7693
|
+
.${buttonGroupClasses.grouped}:has(> .${buttonClasses.startIcon}:only-child) {
|
|
7665
7694
|
padding: ${iconOnlyPaddingWide};
|
|
7666
7695
|
|
|
7667
7696
|
${theme?.breakpoints?.down("md")} {
|
|
@@ -7669,8 +7698,10 @@ const MediumButtonGroupStyles = (props) => {
|
|
|
7669
7698
|
}
|
|
7670
7699
|
}
|
|
7671
7700
|
|
|
7672
|
-
/* Text + icon buttons: has startIcon or endIcon -
|
|
7673
|
-
.${buttonGroupClasses.grouped}:has(.${buttonClasses.startIcon})
|
|
7701
|
+
/* Text + icon buttons: has startIcon or endIcon (excluding icon-only ButtonToggle) */
|
|
7702
|
+
.${buttonGroupClasses.grouped}:has(.${buttonClasses.startIcon}):not(
|
|
7703
|
+
:has(> .${buttonClasses.startIcon}:only-child)
|
|
7704
|
+
),
|
|
7674
7705
|
.${buttonGroupClasses.grouped}:has(.${buttonClasses.endIcon}) {
|
|
7675
7706
|
padding: 0 10px;
|
|
7676
7707
|
}
|
|
@@ -7734,10 +7765,11 @@ const SmallButtonGroupStyles = (props) => {
|
|
|
7734
7765
|
}
|
|
7735
7766
|
}
|
|
7736
7767
|
|
|
7737
|
-
/* Icon-only buttons: has svg but no startIcon/endIcon slots */
|
|
7768
|
+
/* Icon-only buttons: has svg but no startIcon/endIcon slots, or startIcon is the only child (e.g. ButtonToggle) */
|
|
7738
7769
|
.${buttonGroupClasses.grouped}:has(svg):not(
|
|
7739
7770
|
:has(.${buttonClasses.startIcon})
|
|
7740
|
-
):not(:has(.${buttonClasses.endIcon}))
|
|
7771
|
+
):not(:has(.${buttonClasses.endIcon})),
|
|
7772
|
+
.${buttonGroupClasses.grouped}:has(> .${buttonClasses.startIcon}:only-child) {
|
|
7741
7773
|
padding: ${iconOnlyPaddingWide};
|
|
7742
7774
|
|
|
7743
7775
|
${theme?.breakpoints?.down("md")} {
|
|
@@ -7745,8 +7777,10 @@ const SmallButtonGroupStyles = (props) => {
|
|
|
7745
7777
|
}
|
|
7746
7778
|
}
|
|
7747
7779
|
|
|
7748
|
-
/* Text + icon buttons: has startIcon or endIcon -
|
|
7749
|
-
.${buttonGroupClasses.grouped}:has(.${buttonClasses.startIcon})
|
|
7780
|
+
/* Text + icon buttons: has startIcon or endIcon (excluding icon-only ButtonToggle) */
|
|
7781
|
+
.${buttonGroupClasses.grouped}:has(.${buttonClasses.startIcon}):not(
|
|
7782
|
+
:has(> .${buttonClasses.startIcon}:only-child)
|
|
7783
|
+
),
|
|
7750
7784
|
.${buttonGroupClasses.grouped}:has(.${buttonClasses.endIcon}) {
|
|
7751
7785
|
padding: 0 ${spaces?.s}px;
|
|
7752
7786
|
}
|
|
@@ -7795,6 +7829,7 @@ const PrimaryButtonGroupStyles = (props) => {
|
|
|
7795
7829
|
&& .${buttonGroupClasses.grouped} {
|
|
7796
7830
|
background-color: transparent;
|
|
7797
7831
|
border: 1px solid ${defaultColor};
|
|
7832
|
+
box-shadow: none;
|
|
7798
7833
|
color: ${defaultColor};
|
|
7799
7834
|
|
|
7800
7835
|
svg {
|
|
@@ -7806,6 +7841,7 @@ const PrimaryButtonGroupStyles = (props) => {
|
|
|
7806
7841
|
color: ${hoverColor};
|
|
7807
7842
|
background-color: ${hoverBgColor};
|
|
7808
7843
|
border: 1px solid ${hoverColor};
|
|
7844
|
+
box-shadow: none;
|
|
7809
7845
|
|
|
7810
7846
|
svg {
|
|
7811
7847
|
color: ${hoverColor};
|
|
@@ -7816,6 +7852,7 @@ const PrimaryButtonGroupStyles = (props) => {
|
|
|
7816
7852
|
color: ${pressedColor};
|
|
7817
7853
|
background-color: ${hoverBgColor};
|
|
7818
7854
|
border: 1px solid ${pressedColor};
|
|
7855
|
+
box-shadow: none;
|
|
7819
7856
|
|
|
7820
7857
|
svg {
|
|
7821
7858
|
color: ${pressedColor};
|
|
@@ -7830,6 +7867,7 @@ const PrimaryButtonGroupStyles = (props) => {
|
|
|
7830
7867
|
color: ${textDisabledColor};
|
|
7831
7868
|
background-color: transparent;
|
|
7832
7869
|
border: 1px solid ${disabledColor};
|
|
7870
|
+
box-shadow: none;
|
|
7833
7871
|
|
|
7834
7872
|
svg {
|
|
7835
7873
|
color: ${ornamentDisabledColor};
|
|
@@ -7883,6 +7921,7 @@ const SecondaryButtonGroupStyles = (props) => {
|
|
|
7883
7921
|
&& .${buttonGroupClasses.grouped} {
|
|
7884
7922
|
background-color: transparent;
|
|
7885
7923
|
border: 1px solid ${defaultColor};
|
|
7924
|
+
box-shadow: none;
|
|
7886
7925
|
color: ${textColor};
|
|
7887
7926
|
|
|
7888
7927
|
svg {
|
|
@@ -7894,6 +7933,7 @@ const SecondaryButtonGroupStyles = (props) => {
|
|
|
7894
7933
|
color: ${textColor};
|
|
7895
7934
|
background-color: ${hoverBgColor};
|
|
7896
7935
|
border: 1px solid ${defaultColor};
|
|
7936
|
+
box-shadow: none;
|
|
7897
7937
|
|
|
7898
7938
|
svg {
|
|
7899
7939
|
color: ${ornamentColor};
|
|
@@ -7904,6 +7944,7 @@ const SecondaryButtonGroupStyles = (props) => {
|
|
|
7904
7944
|
color: ${textColor};
|
|
7905
7945
|
background-color: ${pressedBgColor};
|
|
7906
7946
|
border: 1px solid ${defaultColor};
|
|
7947
|
+
box-shadow: none;
|
|
7907
7948
|
|
|
7908
7949
|
svg {
|
|
7909
7950
|
color: ${ornamentColor};
|
|
@@ -7918,6 +7959,7 @@ const SecondaryButtonGroupStyles = (props) => {
|
|
|
7918
7959
|
color: ${textDisabledColor};
|
|
7919
7960
|
background-color: transparent;
|
|
7920
7961
|
border: 1px solid ${disabledColor};
|
|
7962
|
+
box-shadow: none;
|
|
7921
7963
|
|
|
7922
7964
|
svg {
|
|
7923
7965
|
color: ${ornamentDisabledColor};
|
|
@@ -7926,7 +7968,7 @@ const SecondaryButtonGroupStyles = (props) => {
|
|
|
7926
7968
|
`;
|
|
7927
7969
|
};
|
|
7928
7970
|
const StyledButtonGroup = styled(ButtonGroup$1, {
|
|
7929
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
7971
|
+
shouldForwardProp: (prop) => !doNotForwardProps$F.includes(prop)
|
|
7930
7972
|
}) `
|
|
7931
7973
|
${(props) => {
|
|
7932
7974
|
const { sdsType = "primary", size = "large" } = props;
|
|
@@ -8114,10 +8156,6 @@ const small$1 = (props) => {
|
|
|
8114
8156
|
const iconSizes = getIconSizes(props);
|
|
8115
8157
|
const spaces = getSpaces(props);
|
|
8116
8158
|
return css$1 `
|
|
8117
|
-
${sdsType !== "tertiary"
|
|
8118
|
-
? `margin: 0 ${spaces?.xxs}px ${spaces?.xxs}px 0;`
|
|
8119
|
-
: ""}
|
|
8120
|
-
|
|
8121
8159
|
.MuiSvgIcon-root {
|
|
8122
8160
|
height: ${iconSizes?.s.height}px;
|
|
8123
8161
|
width: ${iconSizes?.s.width}px;
|
|
@@ -8157,7 +8195,7 @@ const large = (props) => {
|
|
|
8157
8195
|
}
|
|
8158
8196
|
`;
|
|
8159
8197
|
};
|
|
8160
|
-
const doNotForwardProps$
|
|
8198
|
+
const doNotForwardProps$E = [
|
|
8161
8199
|
"on",
|
|
8162
8200
|
"sdsSize",
|
|
8163
8201
|
"sdsType",
|
|
@@ -8167,7 +8205,7 @@ const doNotForwardProps$F = [
|
|
|
8167
8205
|
"customTheme",
|
|
8168
8206
|
];
|
|
8169
8207
|
const StyledButtonIcon = styled(IconButton, {
|
|
8170
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8208
|
+
shouldForwardProp: (prop) => !doNotForwardProps$E.includes(prop)
|
|
8171
8209
|
}) `
|
|
8172
8210
|
padding: 0;
|
|
8173
8211
|
${focusVisibleA11yStyle}
|
|
@@ -8232,7 +8270,7 @@ const ButtonIcon = forwardRef(function ButtonIcon(props, ref) {
|
|
|
8232
8270
|
* All other props should be passed down to Button; otherwise,
|
|
8233
8271
|
* the component won’t function as expected.
|
|
8234
8272
|
*/
|
|
8235
|
-
const doNotForwardProps$
|
|
8273
|
+
const doNotForwardProps$D = ["sdsStage"];
|
|
8236
8274
|
/**
|
|
8237
8275
|
* Utility to select the appropriate color based on background appearance.
|
|
8238
8276
|
* Returns the dark variant when backgroundAppearance is "dark", otherwise returns the light variant.
|
|
@@ -8260,34 +8298,49 @@ const StageOnStyles = (props) => {
|
|
|
8260
8298
|
// So we need to apply the "on" state background to ::before as well
|
|
8261
8299
|
const isSecondary = sdsType === "secondary";
|
|
8262
8300
|
if (isSecondary) {
|
|
8301
|
+
/**
|
|
8302
|
+
* Specificity boost via Emotion's `&&&&` technique.
|
|
8303
|
+
*
|
|
8304
|
+
* Each `&` repeats the component's generated class, producing a selector
|
|
8305
|
+
* like `.css-abc123.css-abc123.css-abc123.css-abc123` — specificity (0,4,0).
|
|
8306
|
+
*
|
|
8307
|
+
* This is needed because ButtonGroup styles its children with
|
|
8308
|
+
* `&& .MuiButtonGroup-grouped` which has specificity (0,3,0).
|
|
8309
|
+
* Without the boost, the sdsStage="on" styles would always lose
|
|
8310
|
+
* the cascade to the ButtonGroup's parent-level overrides.
|
|
8311
|
+
*/
|
|
8263
8312
|
return css$1 `
|
|
8264
|
-
|
|
8313
|
+
&&&& {
|
|
8314
|
+
color: ${contentColor};
|
|
8265
8315
|
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8316
|
+
svg {
|
|
8317
|
+
color: ${ornamentColor};
|
|
8318
|
+
}
|
|
8269
8319
|
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8320
|
+
/* Apply "on" state background via ::before to match Button's hover pattern */
|
|
8321
|
+
&::before {
|
|
8322
|
+
background-color: ${sdsStyle === "minimal" && !backgroundOnHover
|
|
8273
8323
|
? "transparent"
|
|
8274
8324
|
: backgroundColor};
|
|
8325
|
+
}
|
|
8275
8326
|
}
|
|
8276
8327
|
`;
|
|
8277
8328
|
}
|
|
8278
8329
|
return css$1 `
|
|
8279
|
-
|
|
8330
|
+
&&&& {
|
|
8331
|
+
background-color: ${sdsStyle === "minimal" && !backgroundOnHover
|
|
8280
8332
|
? "transparent"
|
|
8281
8333
|
: backgroundColor};
|
|
8282
|
-
|
|
8334
|
+
color: ${contentColor};
|
|
8283
8335
|
|
|
8284
|
-
|
|
8285
|
-
|
|
8336
|
+
svg {
|
|
8337
|
+
color: ${ornamentColor};
|
|
8338
|
+
}
|
|
8286
8339
|
}
|
|
8287
8340
|
`;
|
|
8288
8341
|
};
|
|
8289
8342
|
const StyledButtonToggle = styled(Button, {
|
|
8290
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8343
|
+
shouldForwardProp: (prop) => !doNotForwardProps$D.includes(prop)
|
|
8291
8344
|
}) `
|
|
8292
8345
|
${(props) => {
|
|
8293
8346
|
const { sdsStage } = props;
|
|
@@ -8306,7 +8359,7 @@ const ButtonToggle = React__default.forwardRef((props, ref) => {
|
|
|
8306
8359
|
return (jsx(StyledButtonToggle, __assign({}, rest, { startIcon: startIcon, endIcon: null, backgroundOnHover: true, ref: ref })));
|
|
8307
8360
|
});
|
|
8308
8361
|
|
|
8309
|
-
const doNotForwardProps$
|
|
8362
|
+
const doNotForwardProps$C = [
|
|
8310
8363
|
"isAllCaps",
|
|
8311
8364
|
"isRounded",
|
|
8312
8365
|
"sdsStyle",
|
|
@@ -8497,7 +8550,7 @@ const DestructiveButton = (props) => {
|
|
|
8497
8550
|
`;
|
|
8498
8551
|
};
|
|
8499
8552
|
const StyledButton$2 = styled(Button$1, {
|
|
8500
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8553
|
+
shouldForwardProp: (prop) => !doNotForwardProps$C.includes(prop)
|
|
8501
8554
|
}) `
|
|
8502
8555
|
${focusVisibleA11yStyle}
|
|
8503
8556
|
|
|
@@ -8603,7 +8656,7 @@ const SecondaryMinimalButton = (props) => {
|
|
|
8603
8656
|
`;
|
|
8604
8657
|
};
|
|
8605
8658
|
const StyledMinimalButton = styled(Button$1, {
|
|
8606
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8659
|
+
shouldForwardProp: (prop) => !doNotForwardProps$C.includes(prop)
|
|
8607
8660
|
}) `
|
|
8608
8661
|
${(props) => {
|
|
8609
8662
|
const { sdsType } = props;
|
|
@@ -8614,7 +8667,7 @@ const StyledMinimalButton = styled(Button$1, {
|
|
|
8614
8667
|
}}
|
|
8615
8668
|
`;
|
|
8616
8669
|
const StyledButtonLegacy = styled(Button$1, {
|
|
8617
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8670
|
+
shouldForwardProp: (prop) => !doNotForwardProps$C.includes(prop)
|
|
8618
8671
|
}) `
|
|
8619
8672
|
${focusVisibleA11yStyle}
|
|
8620
8673
|
${(props) => {
|
|
@@ -8721,9 +8774,9 @@ const ButtonDropdownLegacy = React__default.forwardRef((props, ref) => {
|
|
|
8721
8774
|
* All other props should be passed down to ButtonIcon; otherwise,
|
|
8722
8775
|
* the component won’t function as expected.
|
|
8723
8776
|
*/
|
|
8724
|
-
const doNotForwardProps$
|
|
8777
|
+
const doNotForwardProps$B = ["sdsStage"];
|
|
8725
8778
|
const StyledButtonToggleLegacy = styled(ButtonIcon, {
|
|
8726
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8779
|
+
shouldForwardProp: (prop) => !doNotForwardProps$B.includes(prop)
|
|
8727
8780
|
}) `
|
|
8728
8781
|
${(props) => {
|
|
8729
8782
|
const { sdsStage } = props;
|
|
@@ -8749,7 +8802,7 @@ const ButtonToggleLegacy = React__default.forwardRef((props, ref) => {
|
|
|
8749
8802
|
}
|
|
8750
8803
|
});
|
|
8751
8804
|
|
|
8752
|
-
const doNotForwardProps$
|
|
8805
|
+
const doNotForwardProps$A = [
|
|
8753
8806
|
"calloutTitle",
|
|
8754
8807
|
"collapsed",
|
|
8755
8808
|
"severity",
|
|
@@ -8757,7 +8810,7 @@ const doNotForwardProps$B = [
|
|
|
8757
8810
|
"hideBody",
|
|
8758
8811
|
];
|
|
8759
8812
|
const StyledCallout = styled(Alert$2, {
|
|
8760
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8813
|
+
shouldForwardProp: (prop) => !doNotForwardProps$A.includes(prop)
|
|
8761
8814
|
}) `
|
|
8762
8815
|
${fontBodyXs$2}
|
|
8763
8816
|
|
|
@@ -8938,9 +8991,9 @@ const tableStyles = (props) => {
|
|
|
8938
8991
|
padding: ${spaces?.m}px;
|
|
8939
8992
|
`;
|
|
8940
8993
|
};
|
|
8941
|
-
const doNotForwardProps$
|
|
8994
|
+
const doNotForwardProps$z = ["hasInvertedStyle", "textAlign"];
|
|
8942
8995
|
const StyledTitle = styled("p", {
|
|
8943
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8996
|
+
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
8944
8997
|
}) `
|
|
8945
8998
|
${fontBodyMediumXs}
|
|
8946
8999
|
|
|
@@ -8954,7 +9007,7 @@ const StyledTitle = styled("p", {
|
|
|
8954
9007
|
}}
|
|
8955
9008
|
`;
|
|
8956
9009
|
const StyledSubtitle = styled("p", {
|
|
8957
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
9010
|
+
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
8958
9011
|
}) `
|
|
8959
9012
|
${fontBodyXxs$1}
|
|
8960
9013
|
|
|
@@ -9145,209 +9198,176 @@ function mergeClass$1({ props, className, key, }) {
|
|
|
9145
9198
|
return propClassName ? `${propClassName} ${className}` : className;
|
|
9146
9199
|
}
|
|
9147
9200
|
|
|
9148
|
-
const
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9201
|
+
const StyledTable = styled("table") `
|
|
9202
|
+
width: 100%;
|
|
9203
|
+
border-collapse: collapse;
|
|
9204
|
+
border-spacing: 0;
|
|
9205
|
+
table-layout: auto;
|
|
9206
|
+
`;
|
|
9207
|
+
|
|
9208
|
+
const Table = forwardRef((props, ref) => {
|
|
9209
|
+
const { children } = props;
|
|
9210
|
+
return (jsx(StyledTable, __assign({ ref: ref }, props, { children: children })));
|
|
9211
|
+
});
|
|
9212
|
+
|
|
9213
|
+
const doNotForwardProps$y = [
|
|
9214
|
+
"rowHeight",
|
|
9215
|
+
"useDivider",
|
|
9157
9216
|
"shouldShowTooltipOnHover",
|
|
9158
9217
|
"tooltipProps",
|
|
9159
|
-
"
|
|
9160
|
-
"
|
|
9161
|
-
"
|
|
9162
|
-
"primaryTextComponentSlotBottom",
|
|
9163
|
-
"primaryTextComponentSlotRight",
|
|
9164
|
-
"tabularNums",
|
|
9218
|
+
"tooltipSubtitle",
|
|
9219
|
+
"tooltipText",
|
|
9220
|
+
"hover",
|
|
9165
9221
|
];
|
|
9166
|
-
const
|
|
9167
|
-
const
|
|
9168
|
-
bottom: "bottom",
|
|
9169
|
-
center: "middle",
|
|
9170
|
-
top: "top"
|
|
9171
|
-
};
|
|
9172
|
-
const verticalAlignToFlexMap = {
|
|
9173
|
-
bottom: "flex-end",
|
|
9174
|
-
center: "center",
|
|
9175
|
-
top: "flex-start"
|
|
9176
|
-
};
|
|
9177
|
-
const StyledTableData = styled("td", {
|
|
9178
|
-
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
9179
|
-
}) `
|
|
9180
|
-
${fontBodyS$1}
|
|
9181
|
-
${focusVisibleA11yStyle}
|
|
9182
|
-
|
|
9183
|
-
${(props) => {
|
|
9184
|
-
const { horizontalAlign = "left", verticalAlign = "top" } = props;
|
|
9185
|
-
const spaces = getSpaces(props);
|
|
9186
|
-
return `
|
|
9187
|
-
padding: ${spaces?.l}px ${spaces?.m}px;
|
|
9188
|
-
text-align: ${horizontalAlign};
|
|
9189
|
-
vertical-align: ${verticalAlignCSSMap[verticalAlign]};
|
|
9190
|
-
overflow: hidden;
|
|
9191
|
-
`;
|
|
9192
|
-
}}
|
|
9193
|
-
`;
|
|
9194
|
-
const ShouldWrap = (lineCount) => {
|
|
9222
|
+
const disabledStyled$1 = (props) => {
|
|
9223
|
+
const semanticColors = getSemanticColors(props);
|
|
9195
9224
|
return `
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9225
|
+
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
9226
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9227
|
+
user-select: none;
|
|
9228
|
+
|
|
9229
|
+
&:hover {
|
|
9230
|
+
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
9231
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9232
|
+
}
|
|
9233
|
+
|
|
9234
|
+
& span, & div {
|
|
9235
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9236
|
+
background-color: transparent !important;
|
|
9237
|
+
}
|
|
9238
|
+
|
|
9239
|
+
.cell-component {
|
|
9240
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9241
|
+
pointer-events: none;
|
|
9242
|
+
user-select: none;
|
|
9243
|
+
& div {
|
|
9244
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9245
|
+
background-color: transparent;
|
|
9246
|
+
}
|
|
9247
|
+
|
|
9248
|
+
& .MuiChip-root {
|
|
9249
|
+
background-color: ${semanticColors?.base?.fillDisabled};
|
|
9250
|
+
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderPrimaryDisabled} !important;
|
|
9251
|
+
|
|
9252
|
+
& span {
|
|
9253
|
+
color: ${semanticColors?.base?.textDisabled} !important;
|
|
9254
|
+
}
|
|
9255
|
+
}
|
|
9256
|
+
|
|
9257
|
+
svg {
|
|
9258
|
+
fill: ${semanticColors?.base?.ornamentDisabled};
|
|
9259
|
+
}
|
|
9260
|
+
|
|
9261
|
+
filter: grayscale(100%);
|
|
9262
|
+
}
|
|
9201
9263
|
`;
|
|
9202
9264
|
};
|
|
9203
|
-
const
|
|
9265
|
+
const hoverStyled = (props) => {
|
|
9266
|
+
const { selected } = props;
|
|
9267
|
+
const semanticColors = getSemanticColors(props);
|
|
9204
9268
|
return `
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
|
|
9208
|
-
|
|
9269
|
+
&:hover {
|
|
9270
|
+
td, th {
|
|
9271
|
+
position: relative;
|
|
9272
|
+
background-color: ${selected ? semanticColors?.accent?.surfaceSecondary : semanticColors?.base?.backgroundPrimary};
|
|
9273
|
+
|
|
9274
|
+
&:before {
|
|
9275
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
9276
|
+
}
|
|
9277
|
+
}
|
|
9278
|
+
}
|
|
9209
9279
|
`;
|
|
9210
9280
|
};
|
|
9211
|
-
const
|
|
9212
|
-
|
|
9213
|
-
`;
|
|
9214
|
-
const StyledCellContentWrapper = styled("div") `
|
|
9215
|
-
width: 100%;
|
|
9216
|
-
`;
|
|
9217
|
-
const StyledCellIconWrapper = styled("div", {
|
|
9218
|
-
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
9219
|
-
}) `
|
|
9220
|
-
${(props) => {
|
|
9221
|
-
const { iconVerticalAlign = "top" } = props;
|
|
9222
|
-
const spaces = getSpaces(props);
|
|
9223
|
-
return `
|
|
9224
|
-
padding-right: ${spaces?.l}px;
|
|
9225
|
-
display: flex;
|
|
9226
|
-
flex-direction: column;
|
|
9227
|
-
justify-content: ${verticalAlignToFlexMap[iconVerticalAlign]};
|
|
9228
|
-
`;
|
|
9229
|
-
}}
|
|
9230
|
-
`;
|
|
9231
|
-
const PrimaryTextWrapper = styled("div") `
|
|
9232
|
-
${(props) => {
|
|
9233
|
-
const { horizontalAlign } = props;
|
|
9281
|
+
const selectedStyled = (props) => {
|
|
9282
|
+
const semanticColors = getSemanticColors(props);
|
|
9234
9283
|
return `
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
}
|
|
9239
|
-
`;
|
|
9240
|
-
const PrimaryText = styled("div", {
|
|
9241
|
-
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
9242
|
-
}) `
|
|
9243
|
-
${fontBodyS$1}
|
|
9284
|
+
td, th {
|
|
9285
|
+
&:before {
|
|
9286
|
+
background-color: ${semanticColors?.accent?.surfaceSecondary};
|
|
9287
|
+
}
|
|
9244
9288
|
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
${props.shouldTextWrap
|
|
9252
|
-
? ShouldWrap(primaryTextWrapLineCount)
|
|
9253
|
-
: ShouldTruncate$1()}
|
|
9254
|
-
`;
|
|
9255
|
-
}}
|
|
9256
|
-
`;
|
|
9257
|
-
const SecondaryText = styled("span", {
|
|
9258
|
-
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
9289
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
9290
|
+
}
|
|
9291
|
+
`;
|
|
9292
|
+
};
|
|
9293
|
+
const StyledTableRow = styled("tr", {
|
|
9294
|
+
shouldForwardProp: (prop) => !doNotForwardProps$y.includes(prop)
|
|
9259
9295
|
}) `
|
|
9260
|
-
${
|
|
9296
|
+
${fontHeaderS}
|
|
9297
|
+
${focusVisibleA11yStyle}
|
|
9261
9298
|
|
|
9262
9299
|
${(props) => {
|
|
9263
|
-
const {
|
|
9264
|
-
const spaces = getSpaces(props);
|
|
9300
|
+
const { rowHeight, useDivider = true, selected = false, disabled = false, hover = true, } = props;
|
|
9265
9301
|
const semanticColors = getSemanticColors(props);
|
|
9266
9302
|
return `
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9303
|
+
align-items: center;
|
|
9304
|
+
position: relative;
|
|
9305
|
+
margin: 0;
|
|
9306
|
+
padding: 0;
|
|
9307
|
+
display: table-row;
|
|
9271
9308
|
|
|
9272
|
-
${
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9309
|
+
${useDivider &&
|
|
9310
|
+
`
|
|
9311
|
+
&:after {
|
|
9312
|
+
content: "";
|
|
9313
|
+
position: absolute;
|
|
9314
|
+
bottom: 0;
|
|
9315
|
+
left: 0;
|
|
9316
|
+
width: 100%;
|
|
9317
|
+
height: 1px;
|
|
9318
|
+
background-color: ${semanticColors?.base?.borderSecondary};
|
|
9319
|
+
z-index: 1;
|
|
9320
|
+
}
|
|
9321
|
+
`}
|
|
9282
9322
|
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
display: block;
|
|
9289
|
-
color: ${semanticColors?.base?.textSecondary};
|
|
9290
|
-
padding-top: ${spaces?.s}px;
|
|
9291
|
-
font-variant-numeric: ${tabularNums ? TABULAR_NUMS : "normal"};
|
|
9323
|
+
td, th {
|
|
9324
|
+
margin: 0;
|
|
9325
|
+
padding: 0;
|
|
9326
|
+
position: sticky !important;
|
|
9327
|
+
background-color: ${semanticColors?.base?.backgroundPrimary};
|
|
9292
9328
|
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
}}
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
const spaces = getSpaces(props);
|
|
9310
|
-
return `
|
|
9311
|
-
margin-left: ${spaces?.xs}px;
|
|
9329
|
+
&:before {
|
|
9330
|
+
content: "";
|
|
9331
|
+
position: absolute;
|
|
9332
|
+
top: 0;
|
|
9333
|
+
left: 0;
|
|
9334
|
+
width: 100%;
|
|
9335
|
+
height: 100%;
|
|
9336
|
+
z-index: -1;
|
|
9337
|
+
background-color: ${semanticColors?.base?.backgroundPrimary};
|
|
9338
|
+
}
|
|
9339
|
+
}
|
|
9340
|
+
|
|
9341
|
+
${rowHeight ? `max-height: ${rowHeight}px;` : ""}
|
|
9342
|
+
${hover && hoverStyled(props)};
|
|
9343
|
+
${selected && selectedStyled(props)};
|
|
9344
|
+
${disabled && disabledStyled$1(props)}
|
|
9312
9345
|
`;
|
|
9313
9346
|
}}
|
|
9314
9347
|
`;
|
|
9315
9348
|
|
|
9316
|
-
const
|
|
9317
|
-
const {
|
|
9318
|
-
|
|
9319
|
-
};
|
|
9320
|
-
const CellBasic = forwardRef((props, ref) => {
|
|
9321
|
-
const { primaryText, secondaryText, shouldShowTooltipOnHover = true, tooltipProps, } = props;
|
|
9322
|
-
if (shouldShowTooltipOnHover) {
|
|
9323
|
-
return (jsx(Tooltip, __assign({ title: primaryText, subtitle: secondaryText, arrow: true, leaveDelay: 0, leaveTouchDelay: 0, sdsStyle: "dark" }, tooltipProps, { children: jsx(StyledTableData, __assign({ ref: ref }, props, { children: jsx(CellBasicContent, __assign({}, props)) })) })));
|
|
9349
|
+
const TableRow = forwardRef((props, ref) => {
|
|
9350
|
+
const { children, shouldShowTooltipOnHover = true, tooltipProps, tooltipText = false, tooltipSubtitle, hover = true, } = props;
|
|
9351
|
+
if (shouldShowTooltipOnHover && hover) {
|
|
9352
|
+
return (jsx(Tooltip, __assign({ arrow: true, sdsStyle: "dark", subtitle: tooltipSubtitle, title: tooltipText }, tooltipProps, { children: jsx(StyledTableRow, __assign({ ref: ref }, props, { children: children })) })));
|
|
9324
9353
|
}
|
|
9325
|
-
return (jsx(
|
|
9354
|
+
return (jsx(StyledTableRow, __assign({ ref: ref }, props, { children: children })));
|
|
9326
9355
|
});
|
|
9327
9356
|
|
|
9328
|
-
const
|
|
9329
|
-
const StyledCellComponentData = styled("td", {
|
|
9330
|
-
shouldForwardProp: (prop) => !doNotForwardProps$y.includes(prop)
|
|
9331
|
-
}) `
|
|
9332
|
-
${fontBodyS$1}
|
|
9333
|
-
${focusVisibleA11yStyle}
|
|
9334
|
-
|
|
9357
|
+
const StyledTableHeader$1 = styled("thead") `
|
|
9335
9358
|
${(props) => {
|
|
9336
|
-
const
|
|
9337
|
-
const { horizontalAlign = "left", verticalAlign = "top" } = props;
|
|
9359
|
+
const semanticColors = getSemanticColors(props);
|
|
9338
9360
|
return `
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
overflow: hidden;
|
|
9343
|
-
padding: ${spaces?.l}px ${spaces?.m}px;
|
|
9361
|
+
border-bottom: solid 2px ${semanticColors?.base?.borderSecondary};
|
|
9362
|
+
margin: 0;
|
|
9363
|
+
padding: 0;
|
|
9344
9364
|
`;
|
|
9345
9365
|
}}
|
|
9346
9366
|
`;
|
|
9347
9367
|
|
|
9348
|
-
const
|
|
9349
|
-
const { children
|
|
9350
|
-
return (jsx(
|
|
9368
|
+
const TableHeader = forwardRef((props, ref) => {
|
|
9369
|
+
const { children } = props;
|
|
9370
|
+
return (jsx(StyledTableHeader$1, __assign({ ref: ref }, props, { children: jsx(TableRow, { hover: false, shouldShowTooltipOnHover: false, children: children }) })));
|
|
9351
9371
|
});
|
|
9352
9372
|
|
|
9353
9373
|
const contentPositionMapping = {
|
|
@@ -9381,7 +9401,7 @@ const StyledSortingIcon = styled(Icon, {
|
|
|
9381
9401
|
`;
|
|
9382
9402
|
}}
|
|
9383
9403
|
`;
|
|
9384
|
-
const ShouldTruncate = () => {
|
|
9404
|
+
const ShouldTruncate$1 = () => {
|
|
9385
9405
|
return `
|
|
9386
9406
|
text-overflow: ellipsis;
|
|
9387
9407
|
white-space: nowrap;
|
|
@@ -9389,9 +9409,7 @@ const ShouldTruncate = () => {
|
|
|
9389
9409
|
word-break: break-all;
|
|
9390
9410
|
`;
|
|
9391
9411
|
};
|
|
9392
|
-
const StyledTableHeader
|
|
9393
|
-
shouldForwardProp: (prop) => !doNotForwardProps$x.includes(prop)
|
|
9394
|
-
}) `
|
|
9412
|
+
const StyledTableHeader = styled.div `
|
|
9395
9413
|
${fontHeaderS}
|
|
9396
9414
|
${focusVisibleA11yStyle}
|
|
9397
9415
|
|
|
@@ -9407,9 +9425,8 @@ const StyledTableHeader$1 = styled("th", {
|
|
|
9407
9425
|
: semanticColors?.base?.textPrimary;
|
|
9408
9426
|
return `
|
|
9409
9427
|
color: ${defaultColor};
|
|
9410
|
-
padding: ${spaces?.
|
|
9428
|
+
padding: ${spaces?.m}px !important;
|
|
9411
9429
|
text-align: ${horizontalAlign};
|
|
9412
|
-
min-width: 96px;
|
|
9413
9430
|
cursor: ${hover ? "pointer" : "default"};
|
|
9414
9431
|
vertical-align: bottom;
|
|
9415
9432
|
|
|
@@ -9439,7 +9456,7 @@ const StyledCellHeaderText = styled("div", {
|
|
|
9439
9456
|
${(props) => {
|
|
9440
9457
|
const { shouldTruncate = false } = props;
|
|
9441
9458
|
return `
|
|
9442
|
-
${shouldTruncate && ShouldTruncate()}
|
|
9459
|
+
${shouldTruncate && ShouldTruncate$1()}
|
|
9443
9460
|
`;
|
|
9444
9461
|
}}
|
|
9445
9462
|
`;
|
|
@@ -9463,86 +9480,1298 @@ const CellHeaderContent = (props) => {
|
|
|
9463
9480
|
const sortIcon = (jsx(StyledSortingIcon, { "aria-label": direction === "asc"
|
|
9464
9481
|
? "Change sort direction from ascending to descending"
|
|
9465
9482
|
: "Change sort direction from descending to ascending", sdsIcon: sdsIconName, sdsSize: "xs", active: active, hideSortIcon: hideSortIcon }));
|
|
9466
|
-
return (jsxs(StyledCellHeaderContainer, { horizontalAlign: horizontalAlign, children: [jsx(StyledCellHeaderText, { shouldTruncate: shouldTruncate, children: children }), (!hideSortIcon || active) && hover && sortIcon] }));
|
|
9483
|
+
return (jsxs(StyledCellHeaderContainer, { horizontalAlign: horizontalAlign, children: [typeof children === "string" || typeof children === "number" ? (jsx(StyledCellHeaderText, { shouldTruncate: shouldTruncate, children: children })) : (children), (!hideSortIcon || active) && hover && sortIcon] }));
|
|
9467
9484
|
};
|
|
9468
9485
|
const CellHeader = forwardRef((props, ref) => {
|
|
9469
|
-
const { children, shouldShowTooltipOnHover = false, tooltipProps, tooltipText = "", tooltipSubtitle, hover = false, ...rest } = props;
|
|
9486
|
+
const { as = "th", children, shouldShowTooltipOnHover = false, tooltipProps, tooltipText = "", tooltipSubtitle, hover = false, ...rest } = props;
|
|
9470
9487
|
if (shouldShowTooltipOnHover && hover) {
|
|
9471
|
-
return (jsx(Tooltip, __assign({ arrow: true, placement: "top-start", sdsStyle: "dark", subtitle: tooltipSubtitle, title: tooltipText }, tooltipProps, { children: jsx(StyledTableHeader
|
|
9488
|
+
return (jsx(Tooltip, __assign({ arrow: true, placement: "top-start", sdsStyle: "dark", subtitle: tooltipSubtitle, title: tooltipText }, tooltipProps, { children: jsx(StyledTableHeader, __assign({ as: as, ref: ref, hover: hover }, rest, { children: jsx(CellHeaderContent, __assign({}, props, { hover: hover, children: children })) })) })));
|
|
9472
9489
|
}
|
|
9473
|
-
return (jsx(StyledTableHeader
|
|
9490
|
+
return (jsx(StyledTableHeader, __assign({ as: as, ref: ref, hover: hover }, rest, { children: jsx(CellHeaderContent, __assign({ hover: hover }, props, { children: children })) })));
|
|
9474
9491
|
});
|
|
9475
9492
|
|
|
9476
|
-
const
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
|
|
9493
|
+
const doNotForwardProps$w = [
|
|
9494
|
+
"sdsStyle",
|
|
9495
|
+
"selected",
|
|
9496
|
+
"onPageChange",
|
|
9497
|
+
"onNextPage",
|
|
9498
|
+
"onPreviousPage",
|
|
9499
|
+
"goToPage",
|
|
9500
|
+
"totalCount",
|
|
9501
|
+
"siblingCount",
|
|
9502
|
+
"currentPage",
|
|
9503
|
+
"pageSize",
|
|
9504
|
+
"truncateDropdown",
|
|
9505
|
+
];
|
|
9506
|
+
const StyledPaginationButton = styled(Button) `
|
|
9507
|
+
${(props) => {
|
|
9508
|
+
const semanticColors = getSemanticColors(props);
|
|
9509
|
+
return `
|
|
9510
|
+
width: 28px;
|
|
9511
|
+
height: 28px;
|
|
9512
|
+
cursor: "pointer";
|
|
9481
9513
|
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
`;
|
|
9487
|
-
};
|
|
9488
|
-
const medium = (props) => {
|
|
9489
|
-
const spaces = getSpaces(props);
|
|
9490
|
-
const colors = getColors(props);
|
|
9491
|
-
return css$1 `
|
|
9492
|
-
margin: 0 ${spaces?.s}px;
|
|
9493
|
-
height: 24px;
|
|
9514
|
+
& .MuiSvgIcon-root {
|
|
9515
|
+
width: 12px;
|
|
9516
|
+
color: ${semanticColors?.base?.ornamentSecondary};
|
|
9517
|
+
}
|
|
9494
9518
|
|
|
9495
|
-
|
|
9519
|
+
&:hover {
|
|
9520
|
+
& .MuiSvgIcon-root {
|
|
9521
|
+
color: ${semanticColors?.base?.ornamentSecondaryInteraction}
|
|
9522
|
+
}
|
|
9523
|
+
}
|
|
9524
|
+
`;
|
|
9525
|
+
}}
|
|
9526
|
+
`;
|
|
9527
|
+
const StyledPaginationChevronList = styled("li", {
|
|
9528
|
+
shouldForwardProp: (prop) => !doNotForwardProps$w.includes(prop)
|
|
9529
|
+
}) `
|
|
9530
|
+
${(props) => {
|
|
9531
|
+
const { disabled, sdsStyle } = props;
|
|
9532
|
+
const spaces = getSpaces(props);
|
|
9533
|
+
const semanticColors = getSemanticColors(props);
|
|
9534
|
+
const corners = getCorners(props);
|
|
9535
|
+
return `
|
|
9536
|
+
width: 28px;
|
|
9537
|
+
height: 28px;
|
|
9538
|
+
cursor: ${disabled ? "auto" : "pointer"};
|
|
9539
|
+
display: flex;
|
|
9540
|
+
justify-content: center;
|
|
9541
|
+
align-items: center;
|
|
9542
|
+
border-radius: ${sdsStyle === "round" ? corners?.rounded : corners?.m}px;
|
|
9496
9543
|
|
|
9497
|
-
|
|
9498
|
-
|
|
9499
|
-
|
|
9544
|
+
&[data-order="first"] {
|
|
9545
|
+
margin-right: ${spaces?.m}px;
|
|
9546
|
+
}
|
|
9500
9547
|
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9548
|
+
&[data-order="last"] {
|
|
9549
|
+
margin-left: ${spaces?.m}px;
|
|
9550
|
+
}
|
|
9504
9551
|
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
padding-left: ${spaces?.s}px;
|
|
9509
|
-
}
|
|
9552
|
+
& .MuiSvgIcon-root {
|
|
9553
|
+
color: ${disabled ? semanticColors?.base?.ornamentDisabled : semanticColors?.base?.ornamentSecondary};
|
|
9554
|
+
}
|
|
9510
9555
|
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
padding-right: ${spaces?.xxs}px;
|
|
9514
|
-
margin: 0 0 0 -${spaces?.s}px;
|
|
9515
|
-
height: ${spaces?.l}px;
|
|
9516
|
-
width: ${spaces?.l}px;
|
|
9556
|
+
&:hover {
|
|
9557
|
+
background-color: ${disabled ? "transparent" : semanticColors?.base?.fillPrimaryInteraction};
|
|
9517
9558
|
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9559
|
+
& .MuiSvgIcon-root {
|
|
9560
|
+
color: ${disabled ? semanticColors?.base?.ornamentDisabled : semanticColors?.base?.ornamentSecondaryInteraction}
|
|
9561
|
+
}
|
|
9521
9562
|
}
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9563
|
+
|
|
9564
|
+
${focusVisibleA11yStyle(props)}
|
|
9565
|
+
`;
|
|
9566
|
+
}}
|
|
9567
|
+
`;
|
|
9568
|
+
const StyledPagination = styled("ul", {
|
|
9569
|
+
shouldForwardProp: (prop) => !doNotForwardProps$w.includes(prop)
|
|
9570
|
+
}) `
|
|
9571
|
+
${fontBodyS$1}
|
|
9572
|
+
display: flex;
|
|
9573
|
+
flex-wrap: wrap;
|
|
9574
|
+
padding: 0;
|
|
9575
|
+
margin: 0;
|
|
9576
|
+
& li {
|
|
9577
|
+
list-style: none;
|
|
9578
|
+
}
|
|
9579
|
+
`;
|
|
9580
|
+
const selectedPageStyle = (props) => {
|
|
9581
|
+
const semanticColors = getSemanticColors(props);
|
|
9527
9582
|
return css$1 `
|
|
9528
|
-
|
|
9583
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
9584
|
+
color: ${semanticColors?.base?.textPrimary};
|
|
9585
|
+
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderSecondary};
|
|
9586
|
+
|
|
9587
|
+
&:hover {
|
|
9588
|
+
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderSecondary};
|
|
9589
|
+
}
|
|
9590
|
+
|
|
9591
|
+
${fontTabularSemiboldS(props)}
|
|
9529
9592
|
`;
|
|
9530
9593
|
};
|
|
9531
|
-
const
|
|
9594
|
+
const Page = styled("li", {
|
|
9595
|
+
shouldForwardProp: (prop) => !doNotForwardProps$w.includes(prop)
|
|
9596
|
+
}) `
|
|
9597
|
+
${fontTabularMediumS}
|
|
9598
|
+
|
|
9599
|
+
${(props) => {
|
|
9600
|
+
const { selected, sdsStyle } = props;
|
|
9601
|
+
const spaces = getSpaces(props);
|
|
9532
9602
|
const corners = getCorners(props);
|
|
9603
|
+
const semanticColors = getSemanticColors(props);
|
|
9533
9604
|
return css$1 `
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9605
|
+
color: ${semanticColors?.base?.textSecondary};
|
|
9606
|
+
cursor: pointer;
|
|
9607
|
+
list-style: none;
|
|
9608
|
+
padding: 0 ${spaces?.s}px;
|
|
9609
|
+
min-width: 28px;
|
|
9610
|
+
height: 28px;
|
|
9611
|
+
margin-right: ${spaces?.s}px;
|
|
9612
|
+
display: flex;
|
|
9613
|
+
justify-content: center;
|
|
9614
|
+
align-items: center;
|
|
9615
|
+
border-radius: ${sdsStyle === "round" ? corners?.rounded : corners?.l}px;
|
|
9616
|
+
user-select: none;
|
|
9617
|
+
&:hover {
|
|
9618
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
9619
|
+
color: ${semanticColors?.base?.textPrimary};
|
|
9620
|
+
}
|
|
9621
|
+
|
|
9622
|
+
&:nth-last-of-type(-n + 2) {
|
|
9623
|
+
margin-right: 0;
|
|
9624
|
+
}
|
|
9625
|
+
|
|
9626
|
+
${selected && selectedPageStyle(props)}
|
|
9627
|
+
${focusVisibleA11yStyle(props)}
|
|
9628
|
+
`;
|
|
9629
|
+
}}
|
|
9630
|
+
`;
|
|
9631
|
+
const StyledPage = styled(Page) `
|
|
9632
|
+
width: 28px;
|
|
9633
|
+
max-width: 28px;
|
|
9634
|
+
`;
|
|
9635
|
+
|
|
9636
|
+
const StyledMenu = styled(Menu$1) `
|
|
9637
|
+
& {
|
|
9638
|
+
.${menuClasses.paper} {
|
|
9639
|
+
${(props) => {
|
|
9640
|
+
const spaces = getSpaces(props);
|
|
9641
|
+
const corners = getCorners(props);
|
|
9642
|
+
const semanticColors = getSemanticColors(props);
|
|
9643
|
+
return `
|
|
9644
|
+
background-color: ${semanticColors?.base?.surfacePrimary};
|
|
9645
|
+
background-image: none;
|
|
9646
|
+
padding: ${spaces?.xs}px;
|
|
9647
|
+
border-radius: ${corners?.l}px;
|
|
9648
|
+
`;
|
|
9649
|
+
}}
|
|
9650
|
+
}
|
|
9651
|
+
|
|
9652
|
+
.MuiList-padding {
|
|
9653
|
+
padding: 0;
|
|
9654
|
+
}
|
|
9655
|
+
}
|
|
9656
|
+
`;
|
|
9657
|
+
|
|
9658
|
+
const ANCHOR_ORIGIN = {
|
|
9659
|
+
horizontal: "center",
|
|
9660
|
+
vertical: "bottom"
|
|
9661
|
+
};
|
|
9662
|
+
const TRANSFORM_ORIGIN = {
|
|
9663
|
+
horizontal: "center",
|
|
9664
|
+
vertical: "top"
|
|
9665
|
+
};
|
|
9666
|
+
/**
|
|
9667
|
+
* @see https://mui.com/material-ui/react-menu/
|
|
9668
|
+
*/
|
|
9669
|
+
const Menu = (props) => {
|
|
9670
|
+
return (jsx(StyledMenu, __assign({ anchorOrigin: ANCHOR_ORIGIN, transformOrigin: TRANSFORM_ORIGIN }, props)));
|
|
9671
|
+
};
|
|
9672
|
+
|
|
9673
|
+
const StyledPaginationDropdownMenu = styled(Menu) `
|
|
9674
|
+
& .MuiPaper-root {
|
|
9675
|
+
max-height: 120px;
|
|
9676
|
+
}
|
|
9677
|
+
`;
|
|
9678
|
+
|
|
9679
|
+
const PageListDropdown = (props) => {
|
|
9680
|
+
const { pageList, onPageChange, sdsStyle } = props;
|
|
9681
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
9682
|
+
const handleClick = (event) => {
|
|
9683
|
+
setAnchorEl(event.currentTarget);
|
|
9684
|
+
};
|
|
9685
|
+
const handleClose = () => {
|
|
9686
|
+
setAnchorEl(null);
|
|
9687
|
+
};
|
|
9688
|
+
return (jsxs(StyledPage, { sdsStyle: sdsStyle, children: [jsx(StyledPaginationButton, { "aria-label": "Go to a page", onClick: handleClick, size: "small", sdsStyle: "minimal", sdsType: "secondary", backgroundOnHover: false, children: jsx(Icon, { sdsIcon: "DotsHorizontal", sdsSize: "s" }) }), jsx(StyledPaginationDropdownMenu, { anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: pageList.map((page) => {
|
|
9689
|
+
return (jsx(MenuItem, { onClick: () => {
|
|
9690
|
+
onPageChange(page);
|
|
9691
|
+
handleClose();
|
|
9692
|
+
}, sdsType: "action", children: page }, page));
|
|
9693
|
+
}) })] }));
|
|
9694
|
+
};
|
|
9695
|
+
|
|
9696
|
+
const range = (start, end) => {
|
|
9697
|
+
const length = end - start + 1;
|
|
9698
|
+
return Array.from({ length }, (_, idx) => idx + start);
|
|
9699
|
+
};
|
|
9700
|
+
const usePagination = ({ totalCount, pageSize, siblingCount = 1, currentPage, }) => {
|
|
9701
|
+
return useMemo(() => {
|
|
9702
|
+
const totalPageCount = Math.ceil(totalCount / pageSize);
|
|
9703
|
+
// Pages count is determined as siblingCount + firstPage + lastPage + currentPage + 2*DOTS
|
|
9704
|
+
const totalPageNumbers = siblingCount + 5;
|
|
9705
|
+
/*
|
|
9706
|
+
If the number of pages is less than the page numbers we want to show in our
|
|
9707
|
+
paginationComponent, we return the range [1..totalPageCount]
|
|
9708
|
+
*/
|
|
9709
|
+
if (totalPageNumbers >= totalPageCount) {
|
|
9710
|
+
return range(1, totalPageCount);
|
|
9711
|
+
}
|
|
9712
|
+
const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
|
|
9713
|
+
const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPageCount);
|
|
9714
|
+
/*
|
|
9715
|
+
We do not want to show dots if there is only one position left
|
|
9716
|
+
after/before the left/right page count as that would lead to a change of our Pagination
|
|
9717
|
+
component size which we do not want
|
|
9718
|
+
*/
|
|
9719
|
+
const shouldShowLeftDots = leftSiblingIndex > 2;
|
|
9720
|
+
const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
|
|
9721
|
+
const firstPageIndex = 1;
|
|
9722
|
+
const lastPageIndex = totalPageCount;
|
|
9723
|
+
if (!shouldShowLeftDots && shouldShowRightDots) {
|
|
9724
|
+
const leftItemCount = 3 + 2 * siblingCount;
|
|
9725
|
+
const leftRange = range(1, leftItemCount);
|
|
9726
|
+
const rightDotsRange = range(leftItemCount + 1, totalPageCount - 1);
|
|
9727
|
+
return [...leftRange, rightDotsRange, totalPageCount];
|
|
9728
|
+
}
|
|
9729
|
+
if (shouldShowLeftDots && !shouldShowRightDots) {
|
|
9730
|
+
const rightItemCount = 3 + 2 * siblingCount;
|
|
9731
|
+
const rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);
|
|
9732
|
+
const leftDotsRange = range(2, totalPageCount - rightItemCount);
|
|
9733
|
+
return [firstPageIndex, leftDotsRange, ...rightRange];
|
|
9734
|
+
}
|
|
9735
|
+
if (shouldShowLeftDots && shouldShowRightDots) {
|
|
9736
|
+
const middleRange = range(leftSiblingIndex, rightSiblingIndex);
|
|
9737
|
+
const leftDotsRange = range(2, leftSiblingIndex - 1);
|
|
9738
|
+
const rightDotsRange = range(rightSiblingIndex + 1, totalPageCount - 1);
|
|
9739
|
+
return [
|
|
9740
|
+
firstPageIndex,
|
|
9741
|
+
leftDotsRange,
|
|
9742
|
+
...middleRange,
|
|
9743
|
+
rightDotsRange,
|
|
9744
|
+
lastPageIndex,
|
|
9745
|
+
];
|
|
9746
|
+
}
|
|
9747
|
+
}, [totalCount, pageSize, siblingCount, currentPage]);
|
|
9748
|
+
};
|
|
9749
|
+
|
|
9750
|
+
const PaginationPageList = (paginationRange, truncateDropdown, sdsStyle, onPageChange, currentPage) => {
|
|
9751
|
+
function handlePageKeyDown(event, pageNumber) {
|
|
9752
|
+
if (event.key === "Enter" || event.code === "Space") {
|
|
9753
|
+
onPageChange(pageNumber);
|
|
9754
|
+
}
|
|
9755
|
+
}
|
|
9756
|
+
return paginationRange.map((pageNumber) => {
|
|
9757
|
+
if (Array.isArray(pageNumber)) {
|
|
9758
|
+
if (truncateDropdown) {
|
|
9759
|
+
return (jsx(PageListDropdown, { pageList: pageNumber, onPageChange: onPageChange, sdsStyle: sdsStyle }, pageNumber.join("-")));
|
|
9760
|
+
}
|
|
9761
|
+
return (jsx(Page, { sdsStyle: sdsStyle, children: jsx(StyledPaginationButton, { "aria-label": "Go to a page", disabled: true, size: "small", sdsStyle: "minimal", sdsType: "primary", children: jsx(Icon, { sdsIcon: "DotsHorizontal", sdsSize: "s" }) }) }, pageNumber.join("-")));
|
|
9762
|
+
}
|
|
9763
|
+
return (jsx(Page, { onClick: () => onPageChange(pageNumber), onKeyDown: (event) => handlePageKeyDown(event, pageNumber), selected: pageNumber === currentPage, sdsStyle: sdsStyle, tabIndex: 0, children: pageNumber }, pageNumber));
|
|
9764
|
+
});
|
|
9765
|
+
};
|
|
9766
|
+
const Pagination = forwardRef((props, ref) => {
|
|
9767
|
+
const { sdsStyle = "round", onPageChange, onNextPage, onPreviousPage, totalCount, siblingCount = 1, currentPage, pageSize, truncateDropdown = true, } = props;
|
|
9768
|
+
if (pageSize < 1) {
|
|
9769
|
+
throw new Error("PageSize can not be smaller than 1!");
|
|
9770
|
+
}
|
|
9771
|
+
const paginationRange = usePagination({
|
|
9772
|
+
currentPage,
|
|
9773
|
+
pageSize,
|
|
9774
|
+
siblingCount,
|
|
9775
|
+
totalCount
|
|
9776
|
+
}) || [];
|
|
9777
|
+
if (currentPage === 0 || paginationRange.length < 2) {
|
|
9778
|
+
return null;
|
|
9779
|
+
}
|
|
9780
|
+
const lastPage = paginationRange[paginationRange.length - 1];
|
|
9781
|
+
return (jsxs(StyledPagination, __assign({ ref: ref }, props, { children: [jsx(StyledPaginationChevronList, { "data-order": "first", disabled: currentPage === 1, onClick: () => currentPage > 1 && onPreviousPage(), onKeyDown: handleGoBackButtonKeyDown, tabIndex: 0, sdsStyle: sdsStyle, children: jsx(Icon, { "aria-label": "Previous page", sdsIcon: "ChevronLeft", sdsSize: "xs" }) }, "prevPage"), PaginationPageList(paginationRange, truncateDropdown, sdsStyle, onPageChange, currentPage), jsx(StyledPaginationChevronList, { "data-order": "last", disabled: currentPage === lastPage, onClick: () => currentPage !== lastPage && onNextPage(), onKeyDown: handleGoNextButtonKeyDown, tabIndex: 0, sdsStyle: sdsStyle, children: jsx(Icon, { "aria-label": "Next page", sdsIcon: "ChevronRight", sdsSize: "xs" }) }, "onNextPage")] })));
|
|
9782
|
+
function handleGoBackButtonKeyDown(event) {
|
|
9783
|
+
if ((event.key === "Enter" || event.code === "Space") &&
|
|
9784
|
+
currentPage > 1) {
|
|
9785
|
+
onPreviousPage();
|
|
9786
|
+
}
|
|
9787
|
+
}
|
|
9788
|
+
function handleGoNextButtonKeyDown(event) {
|
|
9789
|
+
if ((event.key === "Enter" || event.code === "Space") &&
|
|
9790
|
+
currentPage !== lastPage) {
|
|
9791
|
+
onNextPage();
|
|
9792
|
+
}
|
|
9793
|
+
}
|
|
9794
|
+
});
|
|
9795
|
+
|
|
9796
|
+
const intentToColor$2 = {
|
|
9797
|
+
default: "base",
|
|
9798
|
+
negative: "negative",
|
|
9799
|
+
notice: "notice",
|
|
9800
|
+
positive: "positive"
|
|
9801
|
+
};
|
|
9802
|
+
const StyledIcon = styled(Icon) `
|
|
9803
|
+
${(props) => {
|
|
9804
|
+
const iconSizes = getIconSizes(props);
|
|
9805
|
+
return `
|
|
9806
|
+
height: ${iconSizes?.xs.height}px;
|
|
9807
|
+
width: ${iconSizes?.xs.width}px;
|
|
9808
|
+
`;
|
|
9809
|
+
}}
|
|
9810
|
+
`;
|
|
9811
|
+
const StyledCheckboxDefaultIcon = styled("span") `
|
|
9812
|
+
${(props) => {
|
|
9813
|
+
const { intent = "default" } = props;
|
|
9814
|
+
const iconSizes = getIconSizes(props);
|
|
9815
|
+
const borders = getBorders(props);
|
|
9816
|
+
const borderColor = intentToColor$2[intent];
|
|
9817
|
+
return `
|
|
9818
|
+
height: ${iconSizes?.s.height}px;
|
|
9819
|
+
width: ${iconSizes?.s.width}px;
|
|
9820
|
+
border: ${borders?.[borderColor]?.default};
|
|
9821
|
+
border-radius: 2px;
|
|
9822
|
+
`;
|
|
9823
|
+
}}
|
|
9824
|
+
`;
|
|
9825
|
+
const StyledCheckboxCheckedIcon = styled("div") `
|
|
9826
|
+
${(props) => {
|
|
9827
|
+
const iconSizes = getIconSizes(props);
|
|
9828
|
+
const semanticColors = getSemanticColors(props);
|
|
9829
|
+
return `
|
|
9830
|
+
display: flex;
|
|
9831
|
+
align-items: center;
|
|
9832
|
+
justify-content: center;
|
|
9833
|
+
height: ${iconSizes?.s.height}px;
|
|
9834
|
+
width: ${iconSizes?.s.width}px;
|
|
9835
|
+
border-radius: 2px;
|
|
9836
|
+
background-color: ${semanticColors?.accent?.foreground};
|
|
9837
|
+
|
|
9838
|
+
${StyledIcon} {
|
|
9839
|
+
fill: ${semanticColors?.base?.ornamentPrimaryInverse};
|
|
9840
|
+
}
|
|
9841
|
+
`;
|
|
9842
|
+
}}
|
|
9843
|
+
`;
|
|
9844
|
+
const StyledCheckbox = styled(Checkbox) `
|
|
9845
|
+
${(props) => {
|
|
9846
|
+
const { label } = props;
|
|
9847
|
+
const spaces = getSpaces(props);
|
|
9848
|
+
const corners = getCorners(props);
|
|
9849
|
+
const semanticColors = getSemanticColors(props);
|
|
9850
|
+
return `
|
|
9851
|
+
&.${checkboxClasses.root} {
|
|
9852
|
+
${focusVisibleA11yStyle(props)}
|
|
9853
|
+
|
|
9854
|
+
padding: 0;
|
|
9855
|
+
margin-right: ${label ? spaces?.s : 0}px;
|
|
9856
|
+
border-radius: ${corners?.s}px;
|
|
9857
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
9858
|
+
|
|
9859
|
+
&:hover {
|
|
9860
|
+
background-color: transparent;
|
|
9861
|
+
}
|
|
9862
|
+
}
|
|
9863
|
+
`;
|
|
9864
|
+
}}
|
|
9865
|
+
`;
|
|
9866
|
+
const StyledLabelContainer$1 = styled("span") `
|
|
9867
|
+
display: flex;
|
|
9868
|
+
justify-content: start;
|
|
9869
|
+
flex-direction: column;
|
|
9870
|
+
`;
|
|
9871
|
+
const StyledCheckboxLabel = styled("span") `
|
|
9872
|
+
${fontBodyXs$2}
|
|
9873
|
+
|
|
9874
|
+
${(props) => {
|
|
9875
|
+
const spaces = getSpaces(props);
|
|
9876
|
+
return `
|
|
9877
|
+
margin-top: -${spaces?.xxxs}px !important;
|
|
9878
|
+
`;
|
|
9879
|
+
}}
|
|
9880
|
+
`;
|
|
9881
|
+
const StyledCheckboxCaption = styled("span") `
|
|
9882
|
+
${fontBodyXxs$1}
|
|
9883
|
+
|
|
9884
|
+
${(props) => {
|
|
9885
|
+
const semanticColors = getSemanticColors(props);
|
|
9886
|
+
return `
|
|
9887
|
+
color: ${semanticColors?.base?.textSecondary};
|
|
9888
|
+
`;
|
|
9889
|
+
}}
|
|
9890
|
+
`;
|
|
9891
|
+
const disabledStyles$1 = (props) => {
|
|
9892
|
+
const semanticColors = getSemanticColors(props);
|
|
9893
|
+
const borders = getBorders(props);
|
|
9894
|
+
return `
|
|
9895
|
+
user-select: none;
|
|
9896
|
+
|
|
9897
|
+
${StyledCheckboxDefaultIcon} {
|
|
9898
|
+
border: ${borders?.base?.disabled};
|
|
9899
|
+
}
|
|
9900
|
+
|
|
9901
|
+
${StyledCheckboxCheckedIcon} {
|
|
9902
|
+
background-color: ${semanticColors?.base?.ornamentDisabled};
|
|
9903
|
+
}
|
|
9904
|
+
|
|
9905
|
+
${StyledCheckboxCaption} {
|
|
9906
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9907
|
+
}
|
|
9908
|
+
|
|
9909
|
+
&:hover, &:active {
|
|
9910
|
+
${StyledCheckboxDefaultIcon} {
|
|
9911
|
+
border: ${borders?.base?.disabled};
|
|
9912
|
+
}
|
|
9913
|
+
|
|
9914
|
+
${StyledCheckboxCheckedIcon} {
|
|
9915
|
+
background-color: ${semanticColors?.base?.ornamentDisabled};
|
|
9916
|
+
}
|
|
9917
|
+
}
|
|
9918
|
+
`;
|
|
9919
|
+
};
|
|
9920
|
+
const StyledFormControlLabel$1 = styled(FormControlLabel) `
|
|
9921
|
+
${(props) => {
|
|
9922
|
+
const { disabled } = props;
|
|
9923
|
+
const semanticColors = getSemanticColors(props);
|
|
9924
|
+
const borders = getBorders(props);
|
|
9925
|
+
return `
|
|
9926
|
+
align-items: start;
|
|
9927
|
+
margin-bottom: 0;
|
|
9928
|
+
margin-left: 0;
|
|
9929
|
+
margin-right: 0;
|
|
9930
|
+
width: fit-content;
|
|
9931
|
+
|
|
9932
|
+
&:hover {
|
|
9933
|
+
${StyledCheckboxDefaultIcon} {
|
|
9934
|
+
border: ${borders?.base?.hover};
|
|
9935
|
+
background-color: ${disabled ? "transparent" : semanticColors?.base?.fillPrimaryInteraction};
|
|
9936
|
+
}
|
|
9937
|
+
|
|
9938
|
+
${StyledCheckboxCheckedIcon} {
|
|
9939
|
+
background-color: ${semanticColors?.accent?.fillInteraction};
|
|
9940
|
+
}
|
|
9941
|
+
}
|
|
9942
|
+
|
|
9943
|
+
&:active {
|
|
9944
|
+
${StyledCheckboxDefaultIcon} {
|
|
9945
|
+
border: ${borders?.base?.pressed};
|
|
9946
|
+
}
|
|
9947
|
+
|
|
9948
|
+
${StyledCheckboxCheckedIcon} {
|
|
9949
|
+
background-color: ${semanticColors?.accent?.fillPressed};
|
|
9950
|
+
}
|
|
9951
|
+
}
|
|
9952
|
+
|
|
9953
|
+
${disabled && disabledStyles$1(props)}
|
|
9954
|
+
`;
|
|
9955
|
+
}}
|
|
9956
|
+
`;
|
|
9957
|
+
|
|
9958
|
+
/**
|
|
9959
|
+
* @see https://mui.com/material-ui/react-checkbox/
|
|
9960
|
+
*/
|
|
9961
|
+
const InputCheckbox = (props) => {
|
|
9962
|
+
const { caption, checkboxProps, disabled, intent = "default", label, stage, value, classes = EMPTY_OBJECT, className, ...rest } = props;
|
|
9963
|
+
const { root: rootClassName, labelCaptionContainer: labelCaptionContainerClassName, label: labelClassName, caption: captionClassName, checkbox: checkboxClassName, checkboxCheckedIcon: checkboxCheckedIconClassName, checkboxDefaultIcon: checkboxDefaultIconClassName, checkboxIndeterminateIcon: checkboxIndeterminateIconClassName, } = classes;
|
|
9964
|
+
let newProps;
|
|
9965
|
+
switch (stage) {
|
|
9966
|
+
case "checked":
|
|
9967
|
+
newProps = {
|
|
9968
|
+
...rest,
|
|
9969
|
+
checked: true,
|
|
9970
|
+
color: "primary"
|
|
9971
|
+
};
|
|
9972
|
+
break;
|
|
9973
|
+
case "unchecked":
|
|
9974
|
+
newProps = {
|
|
9975
|
+
...rest,
|
|
9976
|
+
checked: false,
|
|
9977
|
+
color: "default"
|
|
9978
|
+
};
|
|
9979
|
+
break;
|
|
9980
|
+
case "indeterminate":
|
|
9981
|
+
newProps = {
|
|
9982
|
+
...rest,
|
|
9983
|
+
checked: true,
|
|
9984
|
+
color: "primary",
|
|
9985
|
+
indeterminate: true
|
|
9986
|
+
};
|
|
9987
|
+
break;
|
|
9988
|
+
default:
|
|
9989
|
+
newProps = rest;
|
|
9990
|
+
}
|
|
9991
|
+
const finalLabel = caption ? (jsxs(StyledLabelContainer$1, { className: cn(labelCaptionContainerClassName), children: [jsx(StyledCheckboxLabel, { className: cn(labelClassName), children: label }), jsx(StyledCheckboxCaption, { className: cn(captionClassName), children: caption })] })) : (jsx(StyledLabelContainer$1, { className: cn(labelCaptionContainerClassName), children: jsx(StyledCheckboxLabel, { className: cn(labelClassName), children: label }) }));
|
|
9992
|
+
return (jsx(StyledFormControlLabel$1, { control: jsx(StyledCheckbox, __assign({ className: cn(checkboxClassName), checkedIcon: jsx(StyledCheckboxCheckedIcon, { className: cn(checkboxCheckedIconClassName), children: jsx(StyledIcon, { sdsIcon: "Check", sdsSize: "xs" }) }), icon: jsx(StyledCheckboxDefaultIcon, { intent: intent, className: cn(checkboxDefaultIconClassName) }), indeterminateIcon: jsx(StyledCheckboxCheckedIcon, { className: cn(checkboxIndeterminateIconClassName), children: jsx(StyledIcon, { sdsIcon: "Minus", sdsSize: "xs" }) }), intent: intent, label: label }, checkboxProps, newProps)), disabled: disabled, label: label ? finalLabel : null, value: value, className: cn(rootClassName, className) }));
|
|
9993
|
+
};
|
|
9994
|
+
|
|
9995
|
+
const StyledCellComponentData = styled.div `
|
|
9996
|
+
${fontBodyS$1}
|
|
9997
|
+
${focusVisibleA11yStyle}
|
|
9998
|
+
|
|
9999
|
+
${(props) => {
|
|
10000
|
+
const spaces = getSpaces(props);
|
|
10001
|
+
const { horizontalAlign = "left", verticalAlign = "top" } = props;
|
|
10002
|
+
return `
|
|
10003
|
+
align-items: center;
|
|
10004
|
+
text-align: ${horizontalAlign};
|
|
10005
|
+
vertical-align: ${verticalAlign};
|
|
10006
|
+
overflow: hidden;
|
|
10007
|
+
padding: ${spaces?.m}px !important;
|
|
10008
|
+
`;
|
|
10009
|
+
}}
|
|
10010
|
+
`;
|
|
10011
|
+
|
|
10012
|
+
const CellComponent = forwardRef((props, ref) => {
|
|
10013
|
+
const { children, as = "td", ...rest } = props;
|
|
10014
|
+
return (jsx(StyledCellComponentData, __assign({ ref: ref, className: "cell-component", as: as }, rest, { children: children })));
|
|
10015
|
+
});
|
|
10016
|
+
|
|
10017
|
+
const StyledTableContainer$1 = styled.div `
|
|
10018
|
+
width: 100%;
|
|
10019
|
+
overflow: hidden;
|
|
10020
|
+
`;
|
|
10021
|
+
const stripedStyle = (props) => {
|
|
10022
|
+
const semanticColors = getSemanticColors(props);
|
|
10023
|
+
return `
|
|
10024
|
+
tr {
|
|
10025
|
+
border: none !important;
|
|
10026
|
+
box-shadow: none !important;
|
|
10027
|
+
&:after {
|
|
10028
|
+
display: none !important;
|
|
10029
|
+
}
|
|
10030
|
+
}
|
|
10031
|
+
|
|
10032
|
+
tr:nth-of-type(odd) {
|
|
10033
|
+
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
10034
|
+
|
|
10035
|
+
td, th {
|
|
10036
|
+
background-color: ${semanticColors?.base?.backgroundPrimary};
|
|
10037
|
+
|
|
10038
|
+
&::before {
|
|
10039
|
+
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
10040
|
+
}
|
|
10041
|
+
}
|
|
10042
|
+
|
|
10043
|
+
&:hover {
|
|
10044
|
+
td, th {
|
|
10045
|
+
position: relative;
|
|
10046
|
+
background-color: ${semanticColors?.base?.backgroundPrimary};
|
|
10047
|
+
|
|
10048
|
+
&:before {
|
|
10049
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
10050
|
+
}
|
|
10051
|
+
}
|
|
10052
|
+
}
|
|
10053
|
+
}
|
|
10054
|
+
|
|
10055
|
+
tr[aria-selected="true"]:nth-of-type(odd) {
|
|
10056
|
+
background-color: ${semanticColors?.accent?.surfaceSecondary};
|
|
10057
|
+
|
|
10058
|
+
td, th {
|
|
10059
|
+
background-color: ${semanticColors?.accent?.surfaceSecondary};
|
|
10060
|
+
|
|
10061
|
+
&::before {
|
|
10062
|
+
background-color: ${semanticColors?.accent?.surfaceSecondary};
|
|
10063
|
+
}
|
|
10064
|
+
}
|
|
10065
|
+
|
|
10066
|
+
&:hover {
|
|
10067
|
+
td, th {
|
|
10068
|
+
position: relative;
|
|
10069
|
+
background-color: ${semanticColors?.accent?.surfaceSecondary};
|
|
10070
|
+
|
|
10071
|
+
&:before {
|
|
10072
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
10073
|
+
}
|
|
10074
|
+
}
|
|
10075
|
+
}
|
|
10076
|
+
}
|
|
10077
|
+
`;
|
|
10078
|
+
};
|
|
10079
|
+
const StyledInputCheckbox = styled(InputCheckbox) `
|
|
10080
|
+
${(props) => {
|
|
10081
|
+
const semanticColors = getSemanticColors(props);
|
|
10082
|
+
const corners = getCorners(props);
|
|
10083
|
+
return `
|
|
10084
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
10085
|
+
border-radius: ${corners?.s}px !important;
|
|
10086
|
+
`;
|
|
10087
|
+
}}
|
|
10088
|
+
`;
|
|
10089
|
+
const StyledTableWrapper = styled.div `
|
|
10090
|
+
${(props) => {
|
|
10091
|
+
const { border = true, sdsStyle = "lined" } = props;
|
|
10092
|
+
const semanticColors = getSemanticColors(props);
|
|
10093
|
+
const corners = getCorners(props);
|
|
10094
|
+
return css$1 `
|
|
10095
|
+
width: 100%;
|
|
10096
|
+
overflow-x: auto;
|
|
10097
|
+
border: 1px solid
|
|
10098
|
+
${border ? semanticColors?.base?.borderSecondary : "transparent"};
|
|
10099
|
+
border-radius: ${border ? corners?.xl : 0}px;
|
|
10100
|
+
|
|
10101
|
+
tbody {
|
|
10102
|
+
width: 100%;
|
|
10103
|
+
min-width: max-content;
|
|
10104
|
+
|
|
10105
|
+
${sdsStyle === "striped" && stripedStyle(props)}
|
|
10106
|
+
|
|
10107
|
+
tr:last-child {
|
|
10108
|
+
border-bottom: none;
|
|
10109
|
+
&:after {
|
|
10110
|
+
display: none !important;
|
|
10111
|
+
}
|
|
10112
|
+
}
|
|
10113
|
+
}
|
|
10114
|
+
`;
|
|
10115
|
+
}}
|
|
10116
|
+
`;
|
|
10117
|
+
styled("th") `
|
|
10118
|
+
${(props) => {
|
|
10119
|
+
const { selected, hover } = props;
|
|
10120
|
+
const semanticColors = getSemanticColors(props);
|
|
10121
|
+
return `
|
|
10122
|
+
position: relative;
|
|
10123
|
+
|
|
10124
|
+
&:before {
|
|
10125
|
+
content: "";
|
|
10126
|
+
position: absolute;
|
|
10127
|
+
top: 0;
|
|
10128
|
+
left: 0;
|
|
10129
|
+
width: 100%;
|
|
10130
|
+
height: 100%;
|
|
10131
|
+
z-index: -2;
|
|
10132
|
+
background-color: ${selected ? semanticColors?.accent?.surfaceSecondary : semanticColors?.base?.backgroundPrimary};
|
|
10133
|
+
}
|
|
10134
|
+
|
|
10135
|
+
&:after {
|
|
10136
|
+
content: "";
|
|
10137
|
+
position: absolute;
|
|
10138
|
+
top: 0;
|
|
10139
|
+
left: 0;
|
|
10140
|
+
width: 100%;
|
|
10141
|
+
height: 100%;
|
|
10142
|
+
z-index: -1;
|
|
10143
|
+
background-color: ${hover ? semanticColors?.base?.fillPrimaryInteraction : "transparent"};
|
|
10144
|
+
}
|
|
10145
|
+
`;
|
|
10146
|
+
}}
|
|
10147
|
+
`;
|
|
10148
|
+
const StyledInputSearch = styled(InputSearch) `
|
|
10149
|
+
margin-right: 0;
|
|
10150
|
+
`;
|
|
10151
|
+
const StyledPaginationWrapper = styled.div `
|
|
10152
|
+
${(props) => {
|
|
10153
|
+
const { placement = "right" } = props;
|
|
10154
|
+
const spaces = getSpaces(props);
|
|
10155
|
+
return `
|
|
10156
|
+
display: flex;
|
|
10157
|
+
justify-content: ${placement};
|
|
10158
|
+
margin-top: ${spaces?.m}px;
|
|
10159
|
+
`;
|
|
10160
|
+
}}
|
|
10161
|
+
`;
|
|
10162
|
+
const StyledSelectionCell = styled(CellComponent) `
|
|
10163
|
+
line-height: 22px !important;
|
|
10164
|
+
`;
|
|
10165
|
+
|
|
10166
|
+
const SELECT_COLUMN_ID = "SdsTableSelectColumn";
|
|
10167
|
+
function getSize(size = 100, max = Number.MAX_SAFE_INTEGER, min = 40) {
|
|
10168
|
+
return Math.max(Math.min(size, max), min);
|
|
10169
|
+
}
|
|
10170
|
+
/**
|
|
10171
|
+
* Calculates the sizing of table columns and distributes available width proportionally.
|
|
10172
|
+
* This function acts as an extension for TanStack Table, ensuring proper column sizing
|
|
10173
|
+
* based on provided metadata, including `isGrow`, `widthPercentage`, and size constraints.
|
|
10174
|
+
*
|
|
10175
|
+
* https://github.com/TanStack/table/discussions/4179#discussioncomment-11895847
|
|
10176
|
+
*/
|
|
10177
|
+
const calculateTableSizing = (columns, totalWidth) => {
|
|
10178
|
+
let totalAvailableWidth = totalWidth;
|
|
10179
|
+
let totalIsGrow = 0;
|
|
10180
|
+
columns.forEach((header) => {
|
|
10181
|
+
const column = header.column.columnDef;
|
|
10182
|
+
if (!column.size && !column.meta?.isGrow) {
|
|
10183
|
+
let calculatedSize = 100;
|
|
10184
|
+
if (column?.meta?.widthPercentage) {
|
|
10185
|
+
calculatedSize = column.meta.widthPercentage * totalWidth * 0.01;
|
|
10186
|
+
}
|
|
10187
|
+
else {
|
|
10188
|
+
calculatedSize = totalWidth / columns.length;
|
|
10189
|
+
}
|
|
10190
|
+
const size = getSize(calculatedSize, column.maxSize, column.minSize);
|
|
10191
|
+
column.size = size;
|
|
10192
|
+
}
|
|
10193
|
+
if (column.meta?.isGrow)
|
|
10194
|
+
totalIsGrow += 1;
|
|
10195
|
+
else
|
|
10196
|
+
totalAvailableWidth -= getSize(column.size, column.maxSize, column.minSize);
|
|
10197
|
+
});
|
|
10198
|
+
const sizing = {};
|
|
10199
|
+
columns.forEach((header) => {
|
|
10200
|
+
const column = header.column.columnDef;
|
|
10201
|
+
if (column.meta?.isGrow) {
|
|
10202
|
+
let calculatedSize = 100;
|
|
10203
|
+
calculatedSize = Math.floor(totalAvailableWidth / totalIsGrow);
|
|
10204
|
+
const size = getSize(calculatedSize, column.maxSize, column.minSize);
|
|
10205
|
+
column.size = size;
|
|
10206
|
+
}
|
|
10207
|
+
sizing[`${column.id}`] = Number(column.size);
|
|
10208
|
+
});
|
|
10209
|
+
return sizing;
|
|
10210
|
+
};
|
|
10211
|
+
const calculateLeftPosition = (column, table) => {
|
|
10212
|
+
if (column.id === SELECT_COLUMN_ID)
|
|
10213
|
+
return 0;
|
|
10214
|
+
const allColumns = table.getAllColumns();
|
|
10215
|
+
const currentIndex = allColumns.findIndex((col) => col.id === column.id);
|
|
10216
|
+
let leftPosition = 0;
|
|
10217
|
+
// Add widths of other left-pinned columns before this one
|
|
10218
|
+
for (let i = 0; i < currentIndex; i++) {
|
|
10219
|
+
const col = allColumns[i];
|
|
10220
|
+
const colDef = col.columnDef;
|
|
10221
|
+
if (colDef.meta?.pinning === "left") {
|
|
10222
|
+
leftPosition += col.getSize();
|
|
10223
|
+
}
|
|
10224
|
+
}
|
|
10225
|
+
return leftPosition;
|
|
10226
|
+
};
|
|
10227
|
+
const calculateRightPosition = (column, table) => {
|
|
10228
|
+
const allColumns = table.getAllColumns();
|
|
10229
|
+
const currentIndex = allColumns.findIndex((col) => col.id === column.id);
|
|
10230
|
+
let rightPosition = 0;
|
|
10231
|
+
for (let i = currentIndex + 1; i < allColumns.length; i++) {
|
|
10232
|
+
const col = allColumns[i];
|
|
10233
|
+
const colDef = col.columnDef;
|
|
10234
|
+
if (colDef.meta?.pinning === "right") {
|
|
10235
|
+
rightPosition += col.getSize();
|
|
10236
|
+
}
|
|
10237
|
+
}
|
|
10238
|
+
return rightPosition;
|
|
10239
|
+
};
|
|
10240
|
+
const getCommonPinningStyles = (column, table) => {
|
|
10241
|
+
const columnWithPinning = column.columnDef;
|
|
10242
|
+
const shouldPin = columnWithPinning.meta?.pinning;
|
|
10243
|
+
if (!shouldPin) {
|
|
10244
|
+
return {
|
|
10245
|
+
position: "relative",
|
|
10246
|
+
width: column.getSize()
|
|
10247
|
+
};
|
|
10248
|
+
}
|
|
10249
|
+
const leftPosition = shouldPin === "left" ? calculateLeftPosition(column, table) : 0;
|
|
10250
|
+
const rightPosition = shouldPin === "right" ? calculateRightPosition(column, table) : 0;
|
|
10251
|
+
return {
|
|
10252
|
+
left: shouldPin === "left" ? `${leftPosition}px` : undefined,
|
|
10253
|
+
position: "sticky",
|
|
10254
|
+
right: shouldPin === "right" ? `${rightPosition}px` : undefined,
|
|
10255
|
+
width: column.getSize(),
|
|
10256
|
+
zIndex: 1
|
|
10257
|
+
};
|
|
10258
|
+
};
|
|
10259
|
+
|
|
10260
|
+
// Create context for row hover state
|
|
10261
|
+
const RowHoverContext = createContext({
|
|
10262
|
+
isRowHovered: false
|
|
10263
|
+
});
|
|
10264
|
+
const PreComposedTable = ({ data, columns, border = true, enableSorting = false, enableRowSelection = false, shouldPinSelectRowToLeft = true, enablePagination = false, enableColumnFiltering = false, enableGlobalFiltering = false, paginationConfig, className, style, tableWidth = "100%", onRowSelect, tableRowProps, sdsStyle = "lined", }) => {
|
|
10265
|
+
const [sorting, setSorting] = useState([]);
|
|
10266
|
+
const [rowSelection, setRowSelection] = useState({});
|
|
10267
|
+
const [columnVisibility, setColumnVisibility] = useState({});
|
|
10268
|
+
const [globalFilter, setGlobalFilter] = useState("");
|
|
10269
|
+
const [pagination, setPagination] = useState({
|
|
10270
|
+
pageIndex: 0,
|
|
10271
|
+
pageSize: paginationConfig?.pageSize ?? 10
|
|
10272
|
+
});
|
|
10273
|
+
const [columnPinning, setColumnPinning] = useState({});
|
|
10274
|
+
const [hoveredRowId, setHoveredRowId] = useState(null);
|
|
10275
|
+
const tableContainerRef = useRef(null);
|
|
10276
|
+
/** Determines the final set of columns based on two conditions:
|
|
10277
|
+
* - hasCustomSelectColumn: whether the user provided a column with id === SELECT_COLUMN_ID
|
|
10278
|
+
* - enableRowSelection: whether row selection is enabled via props
|
|
10279
|
+
*
|
|
10280
|
+
* The four possible states:
|
|
10281
|
+
* hasCustomSelectColumn | enableRowSelection | Behavior
|
|
10282
|
+
* --------------------- | ------------------ | -------------------------------------------------------------
|
|
10283
|
+
* true | true | Return columns as-is (user already provided their own custom select column)
|
|
10284
|
+
* true | false | Return columnsWithoutSelection (no selection column needed)
|
|
10285
|
+
* false | true | Prepend our default select column to columnsWithoutSelection
|
|
10286
|
+
* false | false | Return columnsWithoutSelection (no selection column needed)
|
|
10287
|
+
*/
|
|
10288
|
+
const tableColumns = useMemo(() => {
|
|
10289
|
+
const customSelectionColumn = columns.find((col) => col.id === SELECT_COLUMN_ID);
|
|
10290
|
+
if (customSelectionColumn && enableRowSelection) {
|
|
10291
|
+
return columns;
|
|
10292
|
+
}
|
|
10293
|
+
const columnsWithoutSelection = columns.filter((col) => col.id !== SELECT_COLUMN_ID);
|
|
10294
|
+
if (!enableRowSelection) {
|
|
10295
|
+
return columnsWithoutSelection;
|
|
10296
|
+
}
|
|
10297
|
+
return [
|
|
10298
|
+
{
|
|
10299
|
+
accessorFn: () => null,
|
|
10300
|
+
cell: (props) => {
|
|
10301
|
+
const { row, cell, table } = props;
|
|
10302
|
+
const pinnedStyle = getCommonPinningStyles(cell.column, table);
|
|
10303
|
+
return (jsx(StyledSelectionCell, __assign({ horizontalAlign: "center", verticalAlign: "top" }, props, { style: {
|
|
10304
|
+
width: `${cell.column.getSize()}px`,
|
|
10305
|
+
...pinnedStyle
|
|
10306
|
+
}, children: jsx(StyledInputCheckbox, { stage: row.getIsSelected() ? "checked" : "unchecked", disabled: !row.getCanSelect(), onChange: () => row.toggleSelected(), "aria-label": "Select row" }) })));
|
|
10307
|
+
},
|
|
10308
|
+
enableFiltering: false,
|
|
10309
|
+
enablePinning: false,
|
|
10310
|
+
enableSorting: false,
|
|
10311
|
+
header: ({ table, header, }) => {
|
|
10312
|
+
const pinnedStyle = getCommonPinningStyles(header.column, table);
|
|
10313
|
+
let stage = "unchecked";
|
|
10314
|
+
if (table.getIsAllPageRowsSelected()) {
|
|
10315
|
+
stage = "checked";
|
|
10316
|
+
}
|
|
10317
|
+
else if (table.getIsSomePageRowsSelected()) {
|
|
10318
|
+
stage = "indeterminate";
|
|
10319
|
+
}
|
|
10320
|
+
return (jsx(CellHeader, { horizontalAlign: "center", style: {
|
|
10321
|
+
verticalAlign: "middle",
|
|
10322
|
+
width: `${header.getSize()}px`,
|
|
10323
|
+
...pinnedStyle
|
|
10324
|
+
}, children: jsx(StyledInputCheckbox, { stage: stage, onChange: () => table.toggleAllPageRowsSelected(), "aria-label": "Select all rows" }) }));
|
|
10325
|
+
},
|
|
10326
|
+
id: SELECT_COLUMN_ID,
|
|
10327
|
+
meta: {
|
|
10328
|
+
pinning: shouldPinSelectRowToLeft ? "left" : undefined,
|
|
10329
|
+
verticalAlign: "top"
|
|
10330
|
+
},
|
|
10331
|
+
size: 40
|
|
10332
|
+
},
|
|
10333
|
+
...columnsWithoutSelection,
|
|
10334
|
+
];
|
|
10335
|
+
}, [columns, enableRowSelection, shouldPinSelectRowToLeft]);
|
|
10336
|
+
const table = useReactTable({
|
|
10337
|
+
columns: tableColumns,
|
|
10338
|
+
data,
|
|
10339
|
+
debugTable: true,
|
|
10340
|
+
enableColumnFilters: enableColumnFiltering,
|
|
10341
|
+
enableGlobalFilter: enableGlobalFiltering,
|
|
10342
|
+
enableRowSelection: enableRowSelection,
|
|
10343
|
+
enableSorting,
|
|
10344
|
+
getCoreRowModel: getCoreRowModel(),
|
|
10345
|
+
getFilteredRowModel: getFilteredRowModel(),
|
|
10346
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
10347
|
+
getSortedRowModel: getSortedRowModel(),
|
|
10348
|
+
onColumnPinningChange: setColumnPinning,
|
|
10349
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
10350
|
+
onGlobalFilterChange: setGlobalFilter,
|
|
10351
|
+
onPaginationChange: setPagination,
|
|
10352
|
+
onRowSelectionChange: setRowSelection,
|
|
10353
|
+
onSortingChange: setSorting,
|
|
10354
|
+
state: {
|
|
10355
|
+
columnPinning,
|
|
10356
|
+
columnVisibility,
|
|
10357
|
+
globalFilter,
|
|
10358
|
+
pagination,
|
|
10359
|
+
rowSelection,
|
|
10360
|
+
sorting
|
|
10361
|
+
}
|
|
10362
|
+
});
|
|
10363
|
+
const createInitialPinning = useCallback(() => {
|
|
10364
|
+
const initialPinning = {};
|
|
10365
|
+
tableColumns.forEach((column) => {
|
|
10366
|
+
const columnWithPinning = column;
|
|
10367
|
+
if (columnWithPinning.meta?.pinning) {
|
|
10368
|
+
const columnId = column.id || column.accessorKey;
|
|
10369
|
+
if (columnId) {
|
|
10370
|
+
const side = columnWithPinning.meta.pinning;
|
|
10371
|
+
if (!initialPinning[side]) {
|
|
10372
|
+
initialPinning[side] = [];
|
|
10373
|
+
}
|
|
10374
|
+
initialPinning[side].push(columnId);
|
|
10375
|
+
}
|
|
10376
|
+
}
|
|
10377
|
+
});
|
|
10378
|
+
return initialPinning;
|
|
10379
|
+
}, [tableColumns]);
|
|
10380
|
+
// Initialize column pinning from column definitions
|
|
10381
|
+
useEffect(() => {
|
|
10382
|
+
setColumnPinning(createInitialPinning());
|
|
10383
|
+
}, [createInitialPinning]);
|
|
10384
|
+
// Call onRowSelect callback when row selection changes
|
|
10385
|
+
useEffect(() => {
|
|
10386
|
+
if (onRowSelect && enableRowSelection) {
|
|
10387
|
+
const selectedRows = table
|
|
10388
|
+
.getSelectedRowModel()
|
|
10389
|
+
.rows.map((row) => row.original);
|
|
10390
|
+
onRowSelect(selectedRows);
|
|
10391
|
+
}
|
|
10392
|
+
}, [rowSelection, onRowSelect, enableRowSelection, table]);
|
|
10393
|
+
useEffect(() => {
|
|
10394
|
+
setPagination({
|
|
10395
|
+
pageIndex: 0,
|
|
10396
|
+
pageSize: paginationConfig?.pageSize ?? 10
|
|
10397
|
+
});
|
|
10398
|
+
}, [paginationConfig]);
|
|
10399
|
+
const headers = table.getFlatHeaders();
|
|
10400
|
+
useEffect(() => {
|
|
10401
|
+
if (!tableContainerRef.current)
|
|
10402
|
+
return;
|
|
10403
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
10404
|
+
const entry = entries[0];
|
|
10405
|
+
if (entry) {
|
|
10406
|
+
const initialColumnSizing = calculateTableSizing(headers, entry.contentRect.width);
|
|
10407
|
+
table.setColumnSizing(initialColumnSizing);
|
|
10408
|
+
}
|
|
10409
|
+
});
|
|
10410
|
+
resizeObserver.observe(tableContainerRef.current);
|
|
10411
|
+
return () => {
|
|
10412
|
+
resizeObserver.disconnect();
|
|
10413
|
+
};
|
|
10414
|
+
}, [headers, table]);
|
|
10415
|
+
const renderCell = (cell, row) => {
|
|
10416
|
+
const isRowHovered = hoveredRowId === row.id;
|
|
10417
|
+
const isPinned = cell.column.columnDef.meta?.pinning;
|
|
10418
|
+
const pinnedStyle = getCommonPinningStyles(cell.column, table);
|
|
10419
|
+
let cellContent;
|
|
10420
|
+
if (typeof cell.column.columnDef.cell === "string") {
|
|
10421
|
+
cellContent = (jsx(CellBasic, { as: "div", primaryText: cell.getValue(), shouldShowTooltipOnHover: false, shouldShowUnderlineOnHover: false, verticalAlign: cell.column.columnDef.meta?.verticalAlign === "middle"
|
|
10422
|
+
? "center"
|
|
10423
|
+
: cell.column.columnDef.meta?.verticalAlign, style: {
|
|
10424
|
+
width: `${cell.column.getSize()}px`
|
|
10425
|
+
} }));
|
|
10426
|
+
}
|
|
10427
|
+
else if (cell.column.columnDef.cell) {
|
|
10428
|
+
cellContent = flexRender(cell.column.columnDef.cell, {
|
|
10429
|
+
...cell.getContext(),
|
|
10430
|
+
as: "div",
|
|
10431
|
+
style: {
|
|
10432
|
+
width: `${cell.column.getSize()}px`
|
|
10433
|
+
}
|
|
10434
|
+
});
|
|
10435
|
+
}
|
|
10436
|
+
else {
|
|
10437
|
+
// Fallback for undefined cell content
|
|
10438
|
+
cellContent = (jsx(CellBasic, { as: "div", primaryText: String(cell.getValue() || ""), shouldShowTooltipOnHover: false, shouldShowUnderlineOnHover: false, style: {
|
|
10439
|
+
width: `${cell.column.getSize()}px`
|
|
10440
|
+
}, verticalAlign: cell.column.columnDef.meta?.verticalAlign === "middle"
|
|
10441
|
+
? "center"
|
|
10442
|
+
: cell.column.columnDef.meta?.verticalAlign }));
|
|
10443
|
+
}
|
|
10444
|
+
if (isPinned) {
|
|
10445
|
+
return (jsx(RowHoverContext.Provider, { value: { isRowHovered }, children: jsx("td", { style: {
|
|
10446
|
+
...pinnedStyle,
|
|
10447
|
+
width: `${cell.column.getSize()}px`,
|
|
10448
|
+
verticalAlign: cell.column.columnDef.meta?.verticalAlign
|
|
10449
|
+
}, children: cellContent }) }, cell.id));
|
|
10450
|
+
}
|
|
10451
|
+
return (jsx(RowHoverContext.Provider, { value: { isRowHovered }, children: jsx("td", { style: {
|
|
10452
|
+
verticalAlign: cell.column.columnDef.meta?.verticalAlign,
|
|
10453
|
+
width: `${cell.column.getSize()}px`
|
|
10454
|
+
}, children: cellContent }) }, cell.id));
|
|
10455
|
+
};
|
|
10456
|
+
const renderHeader = (header) => {
|
|
10457
|
+
const isSortable = enableSorting && header.column.getCanSort();
|
|
10458
|
+
const isSorted = header.column.getIsSorted();
|
|
10459
|
+
const sortDirection = header.column.getIsSorted();
|
|
10460
|
+
const isPinned = header.column.columnDef.meta?.pinning;
|
|
10461
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10462
|
+
const { ref, ...headerCellProps } = header.column.columnDef.meta?.headerCellProps || {};
|
|
10463
|
+
const pinnedStyle = getCommonPinningStyles(header.column, table);
|
|
10464
|
+
if (typeof header.column.columnDef.header === "string") {
|
|
10465
|
+
return (jsx(CellHeader, __assign({ colSpan: header.colSpan, style: {
|
|
10466
|
+
...(isPinned ? pinnedStyle : {}),
|
|
10467
|
+
width: `${header.getSize()}px`
|
|
10468
|
+
}, active: !!isSorted, direction: sortDirection || undefined, hover: isSortable, onClick: header.column.getToggleSortingHandler() }, headerCellProps, { children: header.isPlaceholder ? null : header.column.columnDef.header }), header.id));
|
|
10469
|
+
}
|
|
10470
|
+
else if (header.column.columnDef.header) {
|
|
10471
|
+
return flexRender(header.column.columnDef.header, {
|
|
10472
|
+
...header.getContext(),
|
|
10473
|
+
key: header.id,
|
|
10474
|
+
style: {
|
|
10475
|
+
...(isPinned ? pinnedStyle : {}),
|
|
10476
|
+
width: `${header.getSize()}px`
|
|
10477
|
+
}
|
|
10478
|
+
});
|
|
10479
|
+
}
|
|
10480
|
+
else {
|
|
10481
|
+
// Fallback for undefined header content
|
|
10482
|
+
return (jsx(CellHeader, { colSpan: header.colSpan, style: {
|
|
10483
|
+
...(isPinned ? pinnedStyle : {}),
|
|
10484
|
+
width: `${header.getSize()}px`
|
|
10485
|
+
}, active: !!isSorted, direction: sortDirection || undefined, hover: isSortable, onClick: header.column.getToggleSortingHandler(), children: header.column.id || "Header" }, header.id));
|
|
10486
|
+
}
|
|
10487
|
+
};
|
|
10488
|
+
return (jsxs(StyledTableContainer$1, { ref: tableContainerRef, className: className, style: { width: tableWidth, ...style }, children: [enableGlobalFiltering && (jsx("div", { style: { marginBottom: "16px" }, children: jsx(StyledInputSearch, { id: "global-search", label: "Search", placeholder: "Search all columns...", value: globalFilter, onChange: (e) => setGlobalFilter(e.target.value) }) })), jsx(StyledTableWrapper, { border: border, sdsStyle: sdsStyle, children: jsxs(Table, { children: [jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => {
|
|
10489
|
+
return (jsx(Fragment$1, { children: headerGroup.headers.map((header) => {
|
|
10490
|
+
return renderHeader(header);
|
|
10491
|
+
}) }, headerGroup.id));
|
|
10492
|
+
}) }), jsx("tbody", { children: table.getRowModel().rows.map((row) => (jsx(TableRow, __assign({ onMouseEnter: () => setHoveredRowId(row.id), onMouseLeave: () => setHoveredRowId(null), selected: row.getIsSelected(), "aria-selected": row.getIsSelected() }, tableRowProps, { children: row.getVisibleCells().map((cell) => {
|
|
10493
|
+
return renderCell(cell, row);
|
|
10494
|
+
}) }), row.id))) })] }) }), enablePagination && (jsx(StyledPaginationWrapper, { placement: paginationConfig?.placement, children: jsx(Pagination, __assign({ currentPage: table.getState().pagination.pageIndex + 1, onPageChange: (page) => table.setPageIndex(page - 1), onNextPage: () => table.nextPage(), onPreviousPage: () => table.previousPage(), pageSize: table.getState().pagination.pageSize, totalCount: table.getFilteredRowModel().rows.length }, paginationConfig)) }))] }, `table-${columns.length}-${columns.map((col) => col.id || "col").join("-")}`));
|
|
10495
|
+
};
|
|
10496
|
+
|
|
10497
|
+
const doNotForwardProps$v = [
|
|
10498
|
+
"icon",
|
|
10499
|
+
"iconVerticalAlign",
|
|
10500
|
+
"horizontalAlign",
|
|
10501
|
+
"verticalAlign",
|
|
10502
|
+
"primaryText",
|
|
10503
|
+
"secondaryText",
|
|
10504
|
+
"tertiaryText",
|
|
10505
|
+
"shouldTextWrap",
|
|
10506
|
+
"shouldShowTooltipOnHover",
|
|
10507
|
+
"shouldShowUnderlineOnHover",
|
|
10508
|
+
"isRowHovered",
|
|
10509
|
+
"tooltipProps",
|
|
10510
|
+
"primaryTextWrapLineCount",
|
|
10511
|
+
"secondaryTextWrapLineCount",
|
|
10512
|
+
"tertiaryTextWrapLineCount",
|
|
10513
|
+
"primaryTextComponentSlotBottom",
|
|
10514
|
+
"primaryTextComponentSlotRight",
|
|
10515
|
+
"tabularNums",
|
|
10516
|
+
];
|
|
10517
|
+
const TABULAR_NUMS = "tabular-nums";
|
|
10518
|
+
const verticalAlignCSSMap = {
|
|
10519
|
+
bottom: "bottom",
|
|
10520
|
+
center: "middle",
|
|
10521
|
+
top: "top"
|
|
10522
|
+
};
|
|
10523
|
+
const verticalAlignToFlexMap = {
|
|
10524
|
+
bottom: "flex-end",
|
|
10525
|
+
center: "center",
|
|
10526
|
+
top: "flex-start"
|
|
10527
|
+
};
|
|
10528
|
+
const ShouldWrap = (lineCount) => {
|
|
10529
|
+
return `
|
|
10530
|
+
overflow: hidden;
|
|
10531
|
+
display: -webkit-box;
|
|
10532
|
+
-webkit-line-clamp: ${lineCount};
|
|
10533
|
+
-webkit-box-orient: vertical;
|
|
10534
|
+
word-break: break-all;
|
|
10535
|
+
`;
|
|
10536
|
+
};
|
|
10537
|
+
const ShouldTruncate = () => {
|
|
10538
|
+
return `
|
|
10539
|
+
text-overflow: ellipsis;
|
|
10540
|
+
white-space: nowrap;
|
|
10541
|
+
overflow: hidden;
|
|
10542
|
+
word-break: break-all;
|
|
10543
|
+
`;
|
|
10544
|
+
};
|
|
10545
|
+
const StyledCellContent = styled("div") `
|
|
10546
|
+
display: flex;
|
|
10547
|
+
`;
|
|
10548
|
+
const StyledCellContentWrapper = styled("div") `
|
|
10549
|
+
width: 100%;
|
|
10550
|
+
`;
|
|
10551
|
+
const StyledCellIconWrapper = styled("div", {
|
|
10552
|
+
shouldForwardProp: (prop) => !doNotForwardProps$v.includes(prop)
|
|
10553
|
+
}) `
|
|
10554
|
+
${(props) => {
|
|
10555
|
+
const { iconVerticalAlign = "top" } = props;
|
|
10556
|
+
const spaces = getSpaces(props);
|
|
10557
|
+
return `
|
|
10558
|
+
padding-right: ${spaces?.m}px;
|
|
10559
|
+
display: flex;
|
|
10560
|
+
flex-direction: column;
|
|
10561
|
+
justify-content: ${verticalAlignToFlexMap[iconVerticalAlign]};
|
|
10562
|
+
`;
|
|
10563
|
+
}}
|
|
10564
|
+
`;
|
|
10565
|
+
const PrimaryTextWrapper = styled("div") `
|
|
10566
|
+
${(props) => {
|
|
10567
|
+
const { horizontalAlign } = props;
|
|
10568
|
+
return `
|
|
10569
|
+
display: flex;
|
|
10570
|
+
justify-content: ${horizontalAlign === "left" ? "flex-start" : "flex-end"};
|
|
10571
|
+
`;
|
|
10572
|
+
}}
|
|
10573
|
+
`;
|
|
10574
|
+
const PrimaryText = styled("div", {
|
|
10575
|
+
shouldForwardProp: (prop) => !doNotForwardProps$v.includes(prop)
|
|
10576
|
+
}) `
|
|
10577
|
+
${fontBodyS$1}
|
|
10578
|
+
|
|
10579
|
+
${(props) => {
|
|
10580
|
+
const { primaryTextWrapLineCount = 3, tabularNums = false } = props;
|
|
10581
|
+
return `
|
|
10582
|
+
display: block;
|
|
10583
|
+
font-variant-numeric: ${tabularNums ? TABULAR_NUMS : "normal"};
|
|
10584
|
+
|
|
10585
|
+
${props.shouldTextWrap
|
|
10586
|
+
? ShouldWrap(primaryTextWrapLineCount)
|
|
10587
|
+
: ShouldTruncate()}
|
|
10588
|
+
`;
|
|
10589
|
+
}}
|
|
10590
|
+
`;
|
|
10591
|
+
const SecondaryText = styled("span", {
|
|
10592
|
+
shouldForwardProp: (prop) => !doNotForwardProps$v.includes(prop)
|
|
10593
|
+
}) `
|
|
10594
|
+
${fontBodyXxs$1}
|
|
10595
|
+
|
|
10596
|
+
${(props) => {
|
|
10597
|
+
const { secondaryTextWrapLineCount = 1, tabularNums = false } = props;
|
|
10598
|
+
const semanticColors = getSemanticColors(props);
|
|
10599
|
+
return `
|
|
10600
|
+
display: block;
|
|
10601
|
+
color: ${semanticColors?.base?.textSecondary};
|
|
10602
|
+
padding-top: 0px;
|
|
10603
|
+
font-variant-numeric: ${tabularNums ? TABULAR_NUMS : "normal"};
|
|
10604
|
+
|
|
10605
|
+
${props.shouldTextWrap
|
|
10606
|
+
? ShouldWrap(secondaryTextWrapLineCount)
|
|
10607
|
+
: ShouldTruncate()}
|
|
10608
|
+
`;
|
|
10609
|
+
}}
|
|
10610
|
+
`;
|
|
10611
|
+
const TertiaryText = styled("span", {
|
|
10612
|
+
shouldForwardProp: (prop) => !doNotForwardProps$v.includes(prop)
|
|
10613
|
+
}) `
|
|
10614
|
+
${fontBodyXxs$1}
|
|
10615
|
+
|
|
10616
|
+
${(props) => {
|
|
10617
|
+
const { tertiaryTextWrapLineCount = 1, tabularNums = false } = props;
|
|
10618
|
+
const spaces = getSpaces(props);
|
|
10619
|
+
const semanticColors = getSemanticColors(props);
|
|
10620
|
+
return `
|
|
10621
|
+
display: block;
|
|
10622
|
+
color: ${semanticColors?.base?.textSecondary};
|
|
10623
|
+
padding-top: ${spaces?.xxxs}px;
|
|
10624
|
+
font-variant-numeric: ${tabularNums ? TABULAR_NUMS : "normal"};
|
|
10625
|
+
|
|
10626
|
+
${props.shouldTextWrap
|
|
10627
|
+
? ShouldWrap(tertiaryTextWrapLineCount)
|
|
10628
|
+
: ShouldTruncate()}
|
|
10629
|
+
`;
|
|
10630
|
+
}}
|
|
10631
|
+
`;
|
|
10632
|
+
const PrimaryTextComponentSlotBottomWrapper = styled("div") `
|
|
10633
|
+
${(props) => {
|
|
10634
|
+
const spaces = getSpaces(props);
|
|
10635
|
+
return `
|
|
10636
|
+
margin-top: ${spaces?.xxs}px;
|
|
10637
|
+
`;
|
|
10638
|
+
}}
|
|
10639
|
+
`;
|
|
10640
|
+
const PrimaryTextComponentSlotRightWrapper = styled("div") `
|
|
10641
|
+
${(props) => {
|
|
10642
|
+
const spaces = getSpaces(props);
|
|
10643
|
+
return `
|
|
10644
|
+
margin-left: ${spaces?.xs}px;
|
|
10645
|
+
`;
|
|
10646
|
+
}}
|
|
10647
|
+
`;
|
|
10648
|
+
const StyledTableData = styled.div `
|
|
10649
|
+
${fontBodyS$1}
|
|
10650
|
+
${focusVisibleA11yStyle}
|
|
10651
|
+
|
|
10652
|
+
${(props) => {
|
|
10653
|
+
const { horizontalAlign = "left", verticalAlign = "top", shouldShowUnderlineOnHover = false, isRowHovered = false, extraRightPadding = 0, } = props;
|
|
10654
|
+
const spaces = getSpaces(props);
|
|
10655
|
+
const paddingRight = horizontalAlign === "right"
|
|
10656
|
+
? (spaces?.m ?? 0) + extraRightPadding
|
|
10657
|
+
: spaces?.m;
|
|
10658
|
+
return `
|
|
10659
|
+
padding: ${spaces?.m}px ${paddingRight}px ${spaces?.m}px ${spaces?.m}px !important;
|
|
10660
|
+
text-align: ${horizontalAlign};
|
|
10661
|
+
vertical-align: ${verticalAlignCSSMap[verticalAlign]};
|
|
10662
|
+
overflow: hidden;
|
|
10663
|
+
|
|
10664
|
+
&:hover {
|
|
10665
|
+
${PrimaryText} {
|
|
10666
|
+
${shouldShowUnderlineOnHover ? "text-decoration: underline;" : ""}
|
|
10667
|
+
}
|
|
10668
|
+
}
|
|
10669
|
+
|
|
10670
|
+
${PrimaryText} {
|
|
10671
|
+
${isRowHovered && shouldShowUnderlineOnHover ? "text-decoration: underline;" : ""}
|
|
10672
|
+
}
|
|
10673
|
+
`;
|
|
10674
|
+
}}
|
|
10675
|
+
`;
|
|
10676
|
+
const StyledCellBasicLink = styled("a") `
|
|
10677
|
+
${(props) => {
|
|
10678
|
+
const semanticColors = getSemanticColors(props);
|
|
10679
|
+
return `
|
|
10680
|
+
text-decoration: none;
|
|
10681
|
+
color: ${semanticColors?.base?.textPrimary};
|
|
10682
|
+
`;
|
|
10683
|
+
}}
|
|
10684
|
+
`;
|
|
10685
|
+
|
|
10686
|
+
const CellBasicContent = (props) => {
|
|
10687
|
+
const { primaryText, primaryTextWrapLineCount, secondaryText, secondaryTextWrapLineCount, tertiaryText, tertiaryTextWrapLineCount, shouldTextWrap = true, icon, iconVerticalAlign, primaryTextComponentSlotRight, primaryTextComponentSlotBottom, horizontalAlign = "left", tabularNums = false, } = props;
|
|
10688
|
+
return (jsxs(StyledCellContent, { children: [icon && (jsx(StyledCellIconWrapper, { iconVerticalAlign: iconVerticalAlign, children: icon })), jsxs(StyledCellContentWrapper, { children: [jsxs(PrimaryTextWrapper, { horizontalAlign: horizontalAlign, children: [jsx(PrimaryText, { shouldTextWrap: shouldTextWrap, primaryTextWrapLineCount: primaryTextWrapLineCount, tabularNums: tabularNums, children: primaryText }), primaryTextComponentSlotRight && (jsx(PrimaryTextComponentSlotRightWrapper, { children: primaryTextComponentSlotRight }))] }), !secondaryText && !tertiaryText && primaryTextComponentSlotBottom && (jsx(PrimaryTextComponentSlotBottomWrapper, { children: primaryTextComponentSlotBottom })), secondaryText && (jsx(SecondaryText, { shouldTextWrap: shouldTextWrap, secondaryTextWrapLineCount: secondaryTextWrapLineCount, tabularNums: tabularNums, children: secondaryText })), tertiaryText && (jsx(TertiaryText, { shouldTextWrap: shouldTextWrap, tertiaryTextWrapLineCount: tertiaryTextWrapLineCount, tabularNums: tabularNums, children: tertiaryText }))] })] }));
|
|
10689
|
+
};
|
|
10690
|
+
const CellBasic = forwardRef((props, ref) => {
|
|
10691
|
+
const { primaryText, secondaryText, shouldShowTooltipOnHover = true, tooltipProps, as = "td", link, linkProps, linkComponent, } = props;
|
|
10692
|
+
// Get row hover state from context (fallback to false if not available)
|
|
10693
|
+
const { isRowHovered } = useContext(RowHoverContext) || {
|
|
10694
|
+
isRowHovered: false
|
|
10695
|
+
};
|
|
10696
|
+
// Pass the row hover state to the styled component
|
|
10697
|
+
const enhancedProps = { ...props, isRowHovered };
|
|
10698
|
+
if (shouldShowTooltipOnHover) {
|
|
10699
|
+
return (jsx(Tooltip, __assign({ title: primaryText, subtitle: secondaryText, arrow: true, leaveDelay: 0, leaveTouchDelay: 0, sdsStyle: "dark" }, tooltipProps, { children: jsx(StyledTableData, __assign({ ref: ref, as: as }, enhancedProps, { children: link ? (jsx(StyledCellBasicLink, __assign({ href: link }, linkProps, { component: linkComponent, children: jsx(CellBasicContent, __assign({}, props)) }))) : (jsx(CellBasicContent, __assign({}, props))) })) })));
|
|
10700
|
+
}
|
|
10701
|
+
return (jsx(StyledTableData, __assign({ ref: ref, as: as }, enhancedProps, { children: link ? (jsx(Link$1, __assign({ href: link }, linkProps, { underline: "none", color: "inherit", component: linkComponent, children: jsx(CellBasicContent, __assign({}, props)) }))) : (jsx(CellBasicContent, __assign({}, props))) })));
|
|
10702
|
+
});
|
|
10703
|
+
CellBasic.displayName = "CellBasic";
|
|
10704
|
+
|
|
10705
|
+
const small = (props) => {
|
|
10706
|
+
const spaces = getSpaces(props);
|
|
10707
|
+
return css$1 `
|
|
10708
|
+
height: ${spaces?.l}px;
|
|
10709
|
+
padding: ${spaces?.xxs}px ${spaces?.xs}px;
|
|
10710
|
+
|
|
10711
|
+
.MuiChip-label {
|
|
10712
|
+
${fontCapsXxxxs(props)}
|
|
10713
|
+
padding: 0;
|
|
10714
|
+
}
|
|
10715
|
+
`;
|
|
10716
|
+
};
|
|
10717
|
+
const medium = (props) => {
|
|
10718
|
+
const spaces = getSpaces(props);
|
|
10719
|
+
const colors = getColors(props);
|
|
10720
|
+
return css$1 `
|
|
10721
|
+
margin: 0 ${spaces?.s}px;
|
|
10722
|
+
height: 24px;
|
|
10723
|
+
|
|
10724
|
+
background-color: ${colors?.blue[400]};
|
|
10725
|
+
|
|
10726
|
+
&:hover {
|
|
10727
|
+
background-color: ${colors?.blue[500]};
|
|
10728
|
+
}
|
|
10729
|
+
|
|
10730
|
+
&:active {
|
|
10731
|
+
background-color: ${colors?.blue[600]};
|
|
10732
|
+
}
|
|
10733
|
+
|
|
10734
|
+
.MuiChip-label {
|
|
10735
|
+
${fontHeaderXs(props)}
|
|
10736
|
+
color: white;
|
|
10737
|
+
padding-left: ${spaces?.s}px;
|
|
10738
|
+
}
|
|
10739
|
+
|
|
10740
|
+
.MuiChip-deleteIcon {
|
|
10741
|
+
color: white;
|
|
10742
|
+
padding-right: ${spaces?.xxs}px;
|
|
10743
|
+
margin: 0 0 0 -${spaces?.s}px;
|
|
10744
|
+
height: ${spaces?.l}px;
|
|
10745
|
+
width: ${spaces?.l}px;
|
|
10746
|
+
|
|
10747
|
+
&:hover,
|
|
10748
|
+
&:focus-visible {
|
|
10749
|
+
color: white;
|
|
10750
|
+
}
|
|
10751
|
+
}
|
|
10752
|
+
`;
|
|
10753
|
+
};
|
|
10754
|
+
const rounded$2 = (props) => {
|
|
10755
|
+
const corners = getCorners(props);
|
|
10756
|
+
return css$1 `
|
|
10757
|
+
border-radius: ${corners?.rounded}px;
|
|
10758
|
+
`;
|
|
10759
|
+
};
|
|
10760
|
+
const square$2 = (props) => {
|
|
10761
|
+
const corners = getCorners(props);
|
|
10762
|
+
return css$1 `
|
|
10763
|
+
border-radius: ${corners?.m}px;
|
|
10764
|
+
`;
|
|
10765
|
+
};
|
|
10766
|
+
const success = (props) => {
|
|
10767
|
+
return createStatusCss(props, "success");
|
|
10768
|
+
};
|
|
10769
|
+
const error = (props) => {
|
|
10770
|
+
return createStatusCss(props, "error");
|
|
10771
|
+
};
|
|
10772
|
+
const beta = (props) => {
|
|
10773
|
+
return createStatusCss(props, "beta");
|
|
10774
|
+
};
|
|
9546
10775
|
const pending = (props) => {
|
|
9547
10776
|
return createStatusCss(props, "pending");
|
|
9548
10777
|
};
|
|
@@ -9600,9 +10829,9 @@ const statusToCss = {
|
|
|
9600
10829
|
success,
|
|
9601
10830
|
warning
|
|
9602
10831
|
};
|
|
9603
|
-
const doNotForwardProps$
|
|
10832
|
+
const doNotForwardProps$u = ["isRounded"];
|
|
9604
10833
|
const StyledChip = styled(Chip$1, {
|
|
9605
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10834
|
+
shouldForwardProp: (prop) => !doNotForwardProps$u.includes(prop)
|
|
9606
10835
|
}) `
|
|
9607
10836
|
border: none;
|
|
9608
10837
|
|
|
@@ -9634,7 +10863,7 @@ const Chip = (props) => {
|
|
|
9634
10863
|
return jsx(StyledChip, __assign({}, props));
|
|
9635
10864
|
};
|
|
9636
10865
|
|
|
9637
|
-
const doNotForwardProps$
|
|
10866
|
+
const doNotForwardProps$t = [
|
|
9638
10867
|
"anchorEl",
|
|
9639
10868
|
"count",
|
|
9640
10869
|
"keepSearchOnSelect",
|
|
@@ -9649,7 +10878,7 @@ const doNotForwardProps$v = [
|
|
|
9649
10878
|
"titleValue",
|
|
9650
10879
|
];
|
|
9651
10880
|
const StyledHeaderTitle = styled("div", {
|
|
9652
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10881
|
+
shouldForwardProp: (prop) => !doNotForwardProps$t.includes(prop)
|
|
9653
10882
|
}) `
|
|
9654
10883
|
${fontBodyMediumXs}
|
|
9655
10884
|
|
|
@@ -9663,7 +10892,7 @@ const StyledHeaderTitle = styled("div", {
|
|
|
9663
10892
|
}}
|
|
9664
10893
|
`;
|
|
9665
10894
|
const StyledHeaderSubTitle = styled("div", {
|
|
9666
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10895
|
+
shouldForwardProp: (prop) => !doNotForwardProps$t.includes(prop)
|
|
9667
10896
|
}) `
|
|
9668
10897
|
${fontBodyXxs$1}
|
|
9669
10898
|
|
|
@@ -9678,7 +10907,7 @@ const StyledHeaderSubTitle = styled("div", {
|
|
|
9678
10907
|
}}
|
|
9679
10908
|
`;
|
|
9680
10909
|
const StyledDropdownMenuAutocompleteWrapper = styled("div", {
|
|
9681
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10910
|
+
shouldForwardProp: (prop) => !doNotForwardProps$t.includes(prop)
|
|
9682
10911
|
}) `
|
|
9683
10912
|
${(props) => {
|
|
9684
10913
|
const { search, titleValue } = props;
|
|
@@ -9715,7 +10944,7 @@ const StyledDropdownMenuAutocompleteWrapper = styled("div", {
|
|
|
9715
10944
|
}}
|
|
9716
10945
|
`;
|
|
9717
10946
|
const StyledPopper = styled(Popper, {
|
|
9718
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10947
|
+
shouldForwardProp: (prop) => !doNotForwardProps$t.includes(prop) || prop === "anchorEl"
|
|
9719
10948
|
}) `
|
|
9720
10949
|
${(props) => {
|
|
9721
10950
|
const borders = getBorders(props);
|
|
@@ -9734,7 +10963,7 @@ const StyledPopper = styled(Popper, {
|
|
|
9734
10963
|
}}
|
|
9735
10964
|
`;
|
|
9736
10965
|
const StyledPaper$1 = styled(Paper, {
|
|
9737
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10966
|
+
shouldForwardProp: (prop) => !doNotForwardProps$t.includes(prop)
|
|
9738
10967
|
}) `
|
|
9739
10968
|
${(props) => {
|
|
9740
10969
|
const spaces = getSpaces(props);
|
|
@@ -9841,7 +11070,7 @@ const DropdownMenu = (props) => {
|
|
|
9841
11070
|
sx: dropdownMenuPopperSx, children: jsx(PaperComponent, { children: jsx(ClickAwayListener, __assign({ onClickAway: onClickAway }, ClickAwayListenerProps, { children: jsxs(StyledDropdownMenuAutocompleteWrapper, { search: search, titleValue: !!(title || headerComponentSlot), children: [(title || headerComponentSlot) && (jsxs(StyledDropdownMenuHeader, { search: search, children: [jsxs("div", { children: [title && jsx(StyledHeaderTitle, { children: title }), headerComponentSlot && jsx(Fragment, { children: headerComponentSlot })] }), title && subTitle && (jsx(StyledHeaderSubTitle, { children: subTitle }))] })), anchorEl && (jsx(Autocomplete, __assign({ label: label, search: search, title: title, open: open, options: options, PopperBaseProps: DEFAULT_POPPER_BASE_PROPS, disablePortal: true, onClickAway: noop, onClick: noop, onOpen: onOpen, onClose: onClose }, rest, { InputBaseProps: DefaultInputBaseProps }))), children] }) })) }) })));
|
|
9842
11071
|
};
|
|
9843
11072
|
|
|
9844
|
-
const doNotForwardProps$
|
|
11073
|
+
const doNotForwardProps$s = [
|
|
9845
11074
|
"intent",
|
|
9846
11075
|
"state",
|
|
9847
11076
|
"sdsType",
|
|
@@ -9852,7 +11081,7 @@ const doNotForwardProps$u = [
|
|
|
9852
11081
|
"sdsStyle",
|
|
9853
11082
|
"multiple",
|
|
9854
11083
|
];
|
|
9855
|
-
const intentToColor$
|
|
11084
|
+
const intentToColor$1 = {
|
|
9856
11085
|
default: "accent",
|
|
9857
11086
|
negative: "negative",
|
|
9858
11087
|
notice: "notice",
|
|
@@ -9867,6 +11096,7 @@ const inputDropdownStyles = (props) => {
|
|
|
9867
11096
|
return css$1 `
|
|
9868
11097
|
${labelStyle(props)}
|
|
9869
11098
|
|
|
11099
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
9870
11100
|
border: none;
|
|
9871
11101
|
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderPrimary};
|
|
9872
11102
|
cursor: pointer;
|
|
@@ -10032,7 +11262,7 @@ const userInput = (props) => {
|
|
|
10032
11262
|
const isOpen = (props) => {
|
|
10033
11263
|
const { sdsStyle = "square", intent = "default" } = props;
|
|
10034
11264
|
const semanticColors = getSemanticColors(props);
|
|
10035
|
-
const inputColor = intentToColor$
|
|
11265
|
+
const inputColor = intentToColor$1[intent];
|
|
10036
11266
|
return css$1 `
|
|
10037
11267
|
&.MuiButton-text {
|
|
10038
11268
|
.styled-label {
|
|
@@ -10124,7 +11354,7 @@ const isDisabled = (props) => {
|
|
|
10124
11354
|
* to the InputDropdownProps interface.
|
|
10125
11355
|
*/
|
|
10126
11356
|
const StyledInputDropdown = styled(Button$2, {
|
|
10127
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11357
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10128
11358
|
}) `
|
|
10129
11359
|
${labelFontBodyXs}
|
|
10130
11360
|
${focusVisibleA11yStyle}
|
|
@@ -10160,7 +11390,7 @@ const StyledInputDropdown = styled(Button$2, {
|
|
|
10160
11390
|
}}
|
|
10161
11391
|
`;
|
|
10162
11392
|
const StyledDetail = styled("span", {
|
|
10163
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11393
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10164
11394
|
}) `
|
|
10165
11395
|
${(props) => {
|
|
10166
11396
|
const spaces = getSpaces(props);
|
|
@@ -10175,7 +11405,7 @@ const StyledDetail = styled("span", {
|
|
|
10175
11405
|
}}
|
|
10176
11406
|
`;
|
|
10177
11407
|
const StyledLabel$3 = styled("span", {
|
|
10178
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11408
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10179
11409
|
}) `
|
|
10180
11410
|
${(props) => {
|
|
10181
11411
|
const { details, counter, sdsType } = props;
|
|
@@ -10192,7 +11422,7 @@ const StyledLabel$3 = styled("span", {
|
|
|
10192
11422
|
}}
|
|
10193
11423
|
`;
|
|
10194
11424
|
const StyledCounter = styled("span", {
|
|
10195
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11425
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10196
11426
|
}) `
|
|
10197
11427
|
${(props) => {
|
|
10198
11428
|
const corners = getCorners(props);
|
|
@@ -10213,7 +11443,7 @@ const StyledCounter = styled("span", {
|
|
|
10213
11443
|
}}
|
|
10214
11444
|
`;
|
|
10215
11445
|
const MinimalDetails = styled("div", {
|
|
10216
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11446
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10217
11447
|
}) `
|
|
10218
11448
|
${labelFontBodyS}
|
|
10219
11449
|
text-align: left;
|
|
@@ -10233,7 +11463,7 @@ const MinimalDetails = styled("div", {
|
|
|
10233
11463
|
}}
|
|
10234
11464
|
`;
|
|
10235
11465
|
const LabelWrapper = styled("span", {
|
|
10236
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11466
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10237
11467
|
}) `
|
|
10238
11468
|
align-items: center;
|
|
10239
11469
|
display: inline-flex;
|
|
@@ -10249,7 +11479,7 @@ const LabelWrapper = styled("span", {
|
|
|
10249
11479
|
}
|
|
10250
11480
|
`;
|
|
10251
11481
|
const IconWrapper = styled("span", {
|
|
10252
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11482
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10253
11483
|
}) `
|
|
10254
11484
|
margin-left: auto;
|
|
10255
11485
|
display: flex;
|
|
@@ -10335,9 +11565,9 @@ function renderDetailsText({ details, sdsType, value, }) {
|
|
|
10335
11565
|
}
|
|
10336
11566
|
}
|
|
10337
11567
|
|
|
10338
|
-
const doNotForwardProps$
|
|
11568
|
+
const doNotForwardProps$r = ["buttonPosition"];
|
|
10339
11569
|
const StyledButtonsWrapper = styled("div", {
|
|
10340
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11570
|
+
shouldForwardProp: (prop) => !doNotForwardProps$r.includes(prop)
|
|
10341
11571
|
}) `
|
|
10342
11572
|
${(props) => {
|
|
10343
11573
|
const { buttonPosition } = props;
|
|
@@ -10850,7 +12080,7 @@ const typeToCss = {
|
|
|
10850
12080
|
primary,
|
|
10851
12081
|
secondary
|
|
10852
12082
|
};
|
|
10853
|
-
const doNotForwardProps$
|
|
12083
|
+
const doNotForwardProps$q = [
|
|
10854
12084
|
"sdsType",
|
|
10855
12085
|
"sdsStyle",
|
|
10856
12086
|
"sdsSize",
|
|
@@ -10858,7 +12088,7 @@ const doNotForwardProps$s = [
|
|
|
10858
12088
|
"hover",
|
|
10859
12089
|
];
|
|
10860
12090
|
const StyledTag$4 = styled(Chip$1, {
|
|
10861
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12091
|
+
shouldForwardProp: (prop) => !doNotForwardProps$q.includes(prop)
|
|
10862
12092
|
}) `
|
|
10863
12093
|
border: none;
|
|
10864
12094
|
|
|
@@ -11149,7 +12379,7 @@ const ComplexFilter = ({ label = "", multiple = false, search = false, onChange:
|
|
|
11149
12379
|
}, buttons: true }, rest)), jsx(StyledChipsWrapper, { children: jsx(Chips, { value: value, multiple: multiple, onDelete: handleDelete }) })] }));
|
|
11150
12380
|
};
|
|
11151
12381
|
|
|
11152
|
-
const doNotForwardProps$
|
|
12382
|
+
const doNotForwardProps$p = [
|
|
11153
12383
|
"visualElement",
|
|
11154
12384
|
"sdsType",
|
|
11155
12385
|
"imagePosition",
|
|
@@ -11190,7 +12420,7 @@ const getShowDecorativeBorder = (visualElementType, boundingBox, decorativeBorde
|
|
|
11190
12420
|
: boundingBox && decorativeBorder;
|
|
11191
12421
|
};
|
|
11192
12422
|
const StyledCard = styled(Card, {
|
|
11193
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12423
|
+
shouldForwardProp: (prop) => !doNotForwardProps$p.includes(prop)
|
|
11194
12424
|
}) `
|
|
11195
12425
|
${(props) => {
|
|
11196
12426
|
const { imagePosition = "left", sdsType = "wide", boundingBox = true, decorativeBorder = false, imagePadding = false, visualElementType, clickableCard = false, } = props;
|
|
@@ -11272,7 +12502,7 @@ const StyledCard = styled(Card, {
|
|
|
11272
12502
|
}}
|
|
11273
12503
|
`;
|
|
11274
12504
|
const StyledCardActionArea = styled(Button$2, {
|
|
11275
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12505
|
+
shouldForwardProp: (prop) => !doNotForwardProps$p.includes(prop)
|
|
11276
12506
|
}) `
|
|
11277
12507
|
${(props) => {
|
|
11278
12508
|
const { imagePosition = "left", cardSdsType = "wide", visualElementType, } = props;
|
|
@@ -11301,7 +12531,7 @@ const StyledCardActionArea = styled(Button$2, {
|
|
|
11301
12531
|
}}
|
|
11302
12532
|
`;
|
|
11303
12533
|
const StyledIconMediaWrapper = styled("div", {
|
|
11304
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12534
|
+
shouldForwardProp: (prop) => !doNotForwardProps$p.includes(prop)
|
|
11305
12535
|
}) `
|
|
11306
12536
|
${(props) => {
|
|
11307
12537
|
const { boundingBox = true } = props;
|
|
@@ -11318,7 +12548,7 @@ const StyledIconMediaWrapper = styled("div", {
|
|
|
11318
12548
|
}}
|
|
11319
12549
|
`;
|
|
11320
12550
|
const StyledCardContent = styled("div", {
|
|
11321
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12551
|
+
shouldForwardProp: (prop) => !doNotForwardProps$p.includes(prop)
|
|
11322
12552
|
}) `
|
|
11323
12553
|
${(props) => {
|
|
11324
12554
|
const { boundingBox = true, sdsType = "wide", visualElementType } = props;
|
|
@@ -11346,7 +12576,7 @@ const StyledCardContent = styled("div", {
|
|
|
11346
12576
|
}}
|
|
11347
12577
|
`;
|
|
11348
12578
|
const StyledContentCardBody = styled(CardContent, {
|
|
11349
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12579
|
+
shouldForwardProp: (prop) => !doNotForwardProps$p.includes(prop)
|
|
11350
12580
|
}) `
|
|
11351
12581
|
${fontBodyS$1}
|
|
11352
12582
|
${(props) => {
|
|
@@ -11367,7 +12597,7 @@ const StyledCardContentAligner = styled("div") `
|
|
|
11367
12597
|
height: 100%;
|
|
11368
12598
|
`;
|
|
11369
12599
|
|
|
11370
|
-
const doNotForwardProps$
|
|
12600
|
+
const doNotForwardProps$o = [
|
|
11371
12601
|
"visualElement",
|
|
11372
12602
|
"sdsType",
|
|
11373
12603
|
"imagePosition",
|
|
@@ -11379,7 +12609,7 @@ const doNotForwardProps$q = [
|
|
|
11379
12609
|
"contentBlock",
|
|
11380
12610
|
];
|
|
11381
12611
|
const StyledTitleWrapper = styled$1("div", {
|
|
11382
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12612
|
+
shouldForwardProp: (prop) => !doNotForwardProps$o.includes(prop)
|
|
11383
12613
|
}) `
|
|
11384
12614
|
${(props) => {
|
|
11385
12615
|
const spaces = getSpaces(props);
|
|
@@ -11391,7 +12621,7 @@ const StyledTitleWrapper = styled$1("div", {
|
|
|
11391
12621
|
}}
|
|
11392
12622
|
`;
|
|
11393
12623
|
const StyledOverlineText = styled$1("p", {
|
|
11394
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12624
|
+
shouldForwardProp: (prop) => !doNotForwardProps$o.includes(prop)
|
|
11395
12625
|
}) `
|
|
11396
12626
|
${fontCapsXxxs}
|
|
11397
12627
|
${(props) => {
|
|
@@ -11403,7 +12633,7 @@ const StyledOverlineText = styled$1("p", {
|
|
|
11403
12633
|
}}
|
|
11404
12634
|
`;
|
|
11405
12635
|
const StyledTitleText = styled$1("p", {
|
|
11406
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12636
|
+
shouldForwardProp: (prop) => !doNotForwardProps$o.includes(prop)
|
|
11407
12637
|
}) `
|
|
11408
12638
|
${fontHeaderXl}
|
|
11409
12639
|
${(props) => {
|
|
@@ -11415,7 +12645,7 @@ const StyledTitleText = styled$1("p", {
|
|
|
11415
12645
|
}}
|
|
11416
12646
|
`;
|
|
11417
12647
|
const StyledSubtitleText = styled$1("p", {
|
|
11418
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12648
|
+
shouldForwardProp: (prop) => !doNotForwardProps$o.includes(prop)
|
|
11419
12649
|
}) `
|
|
11420
12650
|
${fontHeaderM$1}
|
|
11421
12651
|
${(props) => {
|
|
@@ -11427,7 +12657,7 @@ const StyledSubtitleText = styled$1("p", {
|
|
|
11427
12657
|
}}
|
|
11428
12658
|
`;
|
|
11429
12659
|
const StyledMetadataText = styled$1("p", {
|
|
11430
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12660
|
+
shouldForwardProp: (prop) => !doNotForwardProps$o.includes(prop)
|
|
11431
12661
|
}) `
|
|
11432
12662
|
${fontBodyXxs$1}
|
|
11433
12663
|
${(props) => {
|
|
@@ -11457,9 +12687,9 @@ const ContentCardTitle = forwardRef(function ContentCardTitle(props, ref) {
|
|
|
11457
12687
|
return (jsxs("div", { ref: ref, children: [jsxs(StyledTitleWrapper, { className: cn(cardHeader), children: [jsx(OverlineText, { text: overlineText, className: cardOverline }), jsx(TitleText, { text: titleText, className: cardTitle }), jsx(SubtitleText, { text: subtitleText, className: cardSubtitle })] }), jsx(MetadataText, { text: metadataText, className: cardMetadata })] }));
|
|
11458
12688
|
});
|
|
11459
12689
|
|
|
11460
|
-
const doNotForwardProps$
|
|
12690
|
+
const doNotForwardProps$n = ["buttonsPosition"];
|
|
11461
12691
|
const StyledCardActions = styled(CardActions, {
|
|
11462
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12692
|
+
shouldForwardProp: (prop) => !doNotForwardProps$n.includes(prop)
|
|
11463
12693
|
}) `
|
|
11464
12694
|
${(props) => {
|
|
11465
12695
|
const { buttonsPosition = "left" } = props;
|
|
@@ -11531,7 +12761,7 @@ const ContentCardActions = forwardRef(function ContentCardActions(props, ref) {
|
|
|
11531
12761
|
});
|
|
11532
12762
|
|
|
11533
12763
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
11534
|
-
const doNotForwardProps$
|
|
12764
|
+
const doNotForwardProps$m = [
|
|
11535
12765
|
"imagePadding",
|
|
11536
12766
|
"boundingBox",
|
|
11537
12767
|
"sdsType",
|
|
@@ -11540,7 +12770,7 @@ const doNotForwardProps$o = [
|
|
|
11540
12770
|
"imagePosition",
|
|
11541
12771
|
];
|
|
11542
12772
|
const StyledImageMediaWrapper = styled$1("div", {
|
|
11543
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12773
|
+
shouldForwardProp: (prop) => !doNotForwardProps$m.includes(prop)
|
|
11544
12774
|
}) `
|
|
11545
12775
|
${(props) => {
|
|
11546
12776
|
const { imagePadding = false, boundingBox = true, sdsType = "wide", imagePosition = "left", } = props;
|
|
@@ -11708,9 +12938,9 @@ const ContentCard = React__default.forwardRef((props, ref) => {
|
|
|
11708
12938
|
});
|
|
11709
12939
|
|
|
11710
12940
|
// (thuang): Please keep this in sync with the props used in `ExtraProps`
|
|
11711
|
-
const doNotForwardProps$
|
|
12941
|
+
const doNotForwardProps$l = ["sdsSize"];
|
|
11712
12942
|
const StyledPaper = styled(Paper, {
|
|
11713
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12943
|
+
shouldForwardProp: (prop) => !doNotForwardProps$l.includes(prop)
|
|
11714
12944
|
}) `
|
|
11715
12945
|
& {
|
|
11716
12946
|
${paperDimensions}
|
|
@@ -11816,9 +13046,9 @@ const CloseButton = forwardRef(function CloseButton(props, ref) {
|
|
|
11816
13046
|
return (jsx(StyledButton$1, __assign({ "aria-label": "Close", ref: ref, onClick: onClick, size: size, sdsStyle: "minimal", sdsType: "secondary", backgroundOnHover: false, className: className }, rest, { children: jsx(Icon, { sdsIcon: "XMark", sdsSize: iconSize }) })));
|
|
11817
13047
|
});
|
|
11818
13048
|
|
|
11819
|
-
const doNotForwardProps$
|
|
13049
|
+
const doNotForwardProps$k = ["sdsSize"];
|
|
11820
13050
|
const StyledDialogTitle = styled(DialogTitle$1, {
|
|
11821
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13051
|
+
shouldForwardProp: (prop) => !doNotForwardProps$k.includes(prop)
|
|
11822
13052
|
}) `
|
|
11823
13053
|
padding: 0;
|
|
11824
13054
|
${(props) => {
|
|
@@ -11831,7 +13061,7 @@ const StyledDialogTitle = styled(DialogTitle$1, {
|
|
|
11831
13061
|
}}
|
|
11832
13062
|
`;
|
|
11833
13063
|
const Title = styled(Typography, {
|
|
11834
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13064
|
+
shouldForwardProp: (prop) => !doNotForwardProps$k.includes(prop)
|
|
11835
13065
|
}) `
|
|
11836
13066
|
${(props) => {
|
|
11837
13067
|
const { sdsSize } = props;
|
|
@@ -11844,7 +13074,7 @@ const Title = styled(Typography, {
|
|
|
11844
13074
|
}}
|
|
11845
13075
|
`;
|
|
11846
13076
|
const Subtitle = styled(Typography, {
|
|
11847
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13077
|
+
shouldForwardProp: (prop) => !doNotForwardProps$k.includes(prop)
|
|
11848
13078
|
}) `
|
|
11849
13079
|
${(props) => {
|
|
11850
13080
|
const { sdsSize } = props;
|
|
@@ -11860,7 +13090,7 @@ const Subtitle = styled(Typography, {
|
|
|
11860
13090
|
}}
|
|
11861
13091
|
`;
|
|
11862
13092
|
const Overline = styled(Typography, {
|
|
11863
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13093
|
+
shouldForwardProp: (prop) => !doNotForwardProps$k.includes(prop)
|
|
11864
13094
|
}) `
|
|
11865
13095
|
${(props) => {
|
|
11866
13096
|
const { sdsSize } = props;
|
|
@@ -11884,9 +13114,9 @@ const DialogTitle = forwardRef(function DialogTitle(props, ref) {
|
|
|
11884
13114
|
});
|
|
11885
13115
|
|
|
11886
13116
|
// (thuang): Please keep this in sync with the props used in `DialogActionsExtraProps`
|
|
11887
|
-
const doNotForwardProps$
|
|
13117
|
+
const doNotForwardProps$j = ["buttonPosition", "sdsSize"];
|
|
11888
13118
|
const StyledDialogActions = styled(DialogActions$1, {
|
|
11889
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13119
|
+
shouldForwardProp: (prop) => !doNotForwardProps$j.includes(prop)
|
|
11890
13120
|
}) `
|
|
11891
13121
|
padding: 0;
|
|
11892
13122
|
|
|
@@ -11941,9 +13171,9 @@ const Dialog = forwardRef(function Dialog(props, ref) {
|
|
|
11941
13171
|
}) })));
|
|
11942
13172
|
});
|
|
11943
13173
|
|
|
11944
|
-
const doNotForwardProps$
|
|
13174
|
+
const doNotForwardProps$i = ["sdsSize"];
|
|
11945
13175
|
const StyledDialogContent = styled(DialogContent, {
|
|
11946
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13176
|
+
shouldForwardProp: (prop) => !doNotForwardProps$i.includes(prop)
|
|
11947
13177
|
}) `
|
|
11948
13178
|
${fontBodyS$1}
|
|
11949
13179
|
padding: 0;
|
|
@@ -11993,7 +13223,7 @@ const overlayContentPositionJustifyMapping = {
|
|
|
11993
13223
|
};
|
|
11994
13224
|
|
|
11995
13225
|
/* eslint-disable sonarjs/no-duplicate-string */
|
|
11996
|
-
const doNotForwardProps$
|
|
13226
|
+
const doNotForwardProps$h = [
|
|
11997
13227
|
"heroHeight",
|
|
11998
13228
|
"overlayContainerMinMargin",
|
|
11999
13229
|
"backgroundFillColor",
|
|
@@ -12020,7 +13250,7 @@ const getResponsivePadding = (props) => {
|
|
|
12020
13250
|
};
|
|
12021
13251
|
// Main Hero Container
|
|
12022
13252
|
const StyledHeroContainer = styled("section", {
|
|
12023
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13253
|
+
shouldForwardProp: (prop) => !doNotForwardProps$h.includes(prop)
|
|
12024
13254
|
}) `
|
|
12025
13255
|
${(props) => {
|
|
12026
13256
|
const { heroHeight = "fit-content", overlayContentPosition, backgroundFillColor, } = props;
|
|
@@ -12155,306 +13385,111 @@ styled("div") `
|
|
|
12155
13385
|
const semanticColors = getSemanticColors(props);
|
|
12156
13386
|
return css$1 `
|
|
12157
13387
|
color: ${semanticColors?.base?.textSecondary};
|
|
12158
|
-
border: 1px dashed ${semanticColors?.base?.borderSecondary};
|
|
12159
|
-
display: flex;
|
|
12160
|
-
justify-content: center;
|
|
12161
|
-
align-items: center;
|
|
12162
|
-
height: 100px;
|
|
12163
|
-
width: 100%;
|
|
12164
|
-
`;
|
|
12165
|
-
}}
|
|
12166
|
-
`;
|
|
12167
|
-
const DarkeningVignette = styled("div") `
|
|
12168
|
-
position: absolute;
|
|
12169
|
-
top: 0;
|
|
12170
|
-
left: 0;
|
|
12171
|
-
width: 100%;
|
|
12172
|
-
height: 40px;
|
|
12173
|
-
z-index: 1;
|
|
12174
|
-
background-image: linear-gradient(
|
|
12175
|
-
to bottom,
|
|
12176
|
-
black 0%,
|
|
12177
|
-
rgba(0, 0, 0, 0.738) 19%,
|
|
12178
|
-
rgba(0, 0, 0, 0.541) 34%,
|
|
12179
|
-
rgba(0, 0, 0, 0.382) 47%,
|
|
12180
|
-
rgba(0, 0, 0, 0.278) 56.5%,
|
|
12181
|
-
rgba(0, 0, 0, 0.194) 65%,
|
|
12182
|
-
rgba(0, 0, 0, 0.126) 73%,
|
|
12183
|
-
rgba(0, 0, 0, 0.075) 80.2%,
|
|
12184
|
-
rgba(0, 0, 0, 0.042) 86.1%,
|
|
12185
|
-
rgba(0, 0, 0, 0.021) 91%,
|
|
12186
|
-
rgba(0, 0, 0, 0.008) 95.2%,
|
|
12187
|
-
rgba(0, 0, 0, 0.002) 98.2%,
|
|
12188
|
-
transparent 100%
|
|
12189
|
-
);
|
|
12190
|
-
`;
|
|
12191
|
-
const OverlayMediaWrapper = styled("div") `
|
|
12192
|
-
${(props) => {
|
|
12193
|
-
const { overlayMediaPosition } = props;
|
|
12194
|
-
return css$1 `
|
|
12195
|
-
display: flex;
|
|
12196
|
-
position: absolute;
|
|
12197
|
-
top: 0;
|
|
12198
|
-
left: 0;
|
|
12199
|
-
right: 0;
|
|
12200
|
-
bottom: 0;
|
|
12201
|
-
width: 100%;
|
|
12202
|
-
flex-direction: column;
|
|
12203
|
-
align-items: ${overlayMediaPosition
|
|
12204
|
-
? overlayContentPositionAlignMapping[overlayMediaPosition]
|
|
12205
|
-
: "center"};
|
|
12206
|
-
justify-content: ${overlayMediaPosition
|
|
12207
|
-
? overlayContentPositionJustifyMapping[overlayMediaPosition]
|
|
12208
|
-
: "center"};
|
|
12209
|
-
height: 100%;
|
|
12210
|
-
`;
|
|
12211
|
-
}}
|
|
12212
|
-
`;
|
|
12213
|
-
const OverlayMedia = styled("div") `
|
|
12214
|
-
${(props) => {
|
|
12215
|
-
const { overlayMediaMaxHeight, overlayMediaMaxWidth, overlayMediaMargin } = props;
|
|
12216
|
-
const breakpoints = getBreakpoints(props);
|
|
12217
|
-
return css$1 `
|
|
12218
|
-
position: absolute;
|
|
12219
|
-
z-index: 1;
|
|
12220
|
-
width: ${overlayMediaMaxWidth};
|
|
12221
|
-
height: ${overlayMediaMaxHeight};
|
|
12222
|
-
margin: ${overlayMediaMargin
|
|
12223
|
-
? typeof overlayMediaMargin === "string"
|
|
12224
|
-
? overlayMediaMargin
|
|
12225
|
-
: overlayMediaMargin?.large
|
|
12226
|
-
: "0"};
|
|
12227
|
-
|
|
12228
|
-
${breakpoints?.down("lg")} {
|
|
12229
|
-
margin: ${overlayMediaMargin
|
|
12230
|
-
? typeof overlayMediaMargin === "string"
|
|
12231
|
-
? overlayMediaMargin
|
|
12232
|
-
: overlayMediaMargin?.medium
|
|
12233
|
-
: "0"};
|
|
12234
|
-
}
|
|
12235
|
-
|
|
12236
|
-
${breakpoints?.down("md")} {
|
|
12237
|
-
margin: ${overlayMediaMargin
|
|
12238
|
-
? typeof overlayMediaMargin === "string"
|
|
12239
|
-
? overlayMediaMargin
|
|
12240
|
-
: overlayMediaMargin?.small
|
|
12241
|
-
: "0"};
|
|
12242
|
-
}
|
|
12243
|
-
|
|
12244
|
-
img,
|
|
12245
|
-
video {
|
|
12246
|
-
width: 100%;
|
|
12247
|
-
height: 100%;
|
|
12248
|
-
object-fit: cover;
|
|
12249
|
-
object-position: center;
|
|
12250
|
-
}
|
|
12251
|
-
`;
|
|
12252
|
-
}}
|
|
12253
|
-
`;
|
|
12254
|
-
|
|
12255
|
-
const Hero = React__default.forwardRef((props, ref) => {
|
|
12256
|
-
const { heroHeight, children, headerText, captionText, headerFontSize, hasInvertTextColor, overlayContentWidth, textAlignment, darkeningMask, darkeningMaskColor = "#000000", darkeningMaskOpacity = 0, darkeningVignette, overlayMedia, overlayMediaPosition, overlayMediaMaxHeight, overlayMediaMaxWidth, overlayMediaMargin, backgroundFill, ...rest } = props;
|
|
12257
|
-
// Determine if backgroundFill is a color string or a React node
|
|
12258
|
-
const isBackgroundFillColorString = typeof backgroundFill === "string" && !isValidElement(backgroundFill);
|
|
12259
|
-
const isBackgroundFillReactNode = isValidElement(backgroundFill);
|
|
12260
|
-
return (jsxs(StyledHeroContainer, __assign({ ref: ref, heroHeight: heroHeight, backgroundFillColor: isBackgroundFillColorString ? backgroundFill : undefined }, rest, { children: [isBackgroundFillReactNode && (jsx(BackgroundFillContainer, { children: backgroundFill })), darkeningMask && (jsx(DarkeningMask, { darkeningMaskColor: darkeningMaskColor, darkeningMaskOpacity: darkeningMaskOpacity })), overlayMedia && (jsx(OverlayMediaWrapper, { overlayMediaPosition: overlayMediaPosition, children: jsx(OverlayMedia, { overlayMediaPosition: overlayMediaPosition, overlayMediaMaxHeight: overlayMediaMaxHeight, overlayMediaMaxWidth: overlayMediaMaxWidth, overlayMediaMargin: overlayMediaMargin, children: overlayMedia }) })), jsxs(OverlayContent, { overlayContentWidth: overlayContentWidth, textAlignment: textAlignment, children: [headerText && (jsx(HeroTitle, { headerFontSize: headerFontSize, hasInvertTextColor: hasInvertTextColor, children: headerText })), captionText && (jsx(HeroCaption, { hasInvertTextColor: hasInvertTextColor, children: captionText })), children && jsx(ContentSlot, { children: children })] }), darkeningVignette && jsx(DarkeningVignette, {})] })));
|
|
12261
|
-
});
|
|
12262
|
-
Hero.displayName = "Hero";
|
|
12263
|
-
|
|
12264
|
-
const intentToColor$1 = {
|
|
12265
|
-
default: "base",
|
|
12266
|
-
negative: "negative",
|
|
12267
|
-
notice: "notice",
|
|
12268
|
-
positive: "positive"
|
|
12269
|
-
};
|
|
12270
|
-
const StyledIcon = styled(Icon) `
|
|
12271
|
-
${(props) => {
|
|
12272
|
-
const iconSizes = getIconSizes(props);
|
|
12273
|
-
return `
|
|
12274
|
-
height: ${iconSizes?.xs.height}px;
|
|
12275
|
-
width: ${iconSizes?.xs.width}px;
|
|
12276
|
-
`;
|
|
12277
|
-
}}
|
|
12278
|
-
`;
|
|
12279
|
-
const StyledCheckboxDefaultIcon = styled("span") `
|
|
12280
|
-
${(props) => {
|
|
12281
|
-
const { intent = "default" } = props;
|
|
12282
|
-
const iconSizes = getIconSizes(props);
|
|
12283
|
-
const borders = getBorders(props);
|
|
12284
|
-
const borderColor = intentToColor$1[intent];
|
|
12285
|
-
return `
|
|
12286
|
-
height: ${iconSizes?.s.height}px;
|
|
12287
|
-
width: ${iconSizes?.s.width}px;
|
|
12288
|
-
border: ${borders?.[borderColor]?.default};
|
|
12289
|
-
border-radius: 2px;
|
|
12290
|
-
`;
|
|
12291
|
-
}}
|
|
12292
|
-
`;
|
|
12293
|
-
const StyledCheckboxCheckedIcon = styled("div") `
|
|
12294
|
-
${(props) => {
|
|
12295
|
-
const iconSizes = getIconSizes(props);
|
|
12296
|
-
const semanticColors = getSemanticColors(props);
|
|
12297
|
-
return `
|
|
12298
|
-
display: flex;
|
|
12299
|
-
align-items: center;
|
|
12300
|
-
justify-content: center;
|
|
12301
|
-
height: ${iconSizes?.s.height}px;
|
|
12302
|
-
width: ${iconSizes?.s.width}px;
|
|
12303
|
-
border-radius: 2px;
|
|
12304
|
-
background-color: ${semanticColors?.accent?.foreground};
|
|
12305
|
-
|
|
12306
|
-
${StyledIcon} {
|
|
12307
|
-
fill: ${semanticColors?.base?.ornamentPrimaryInverse};
|
|
12308
|
-
}
|
|
12309
|
-
`;
|
|
12310
|
-
}}
|
|
12311
|
-
`;
|
|
12312
|
-
const StyledCheckbox = styled(Checkbox) `
|
|
12313
|
-
${(props) => {
|
|
12314
|
-
const spaces = getSpaces(props);
|
|
12315
|
-
return `
|
|
12316
|
-
&.${checkboxClasses.root} {
|
|
12317
|
-
${focusVisibleA11yStyle(props)}
|
|
12318
|
-
|
|
12319
|
-
padding: 0;
|
|
12320
|
-
margin-right: ${spaces?.s}px;
|
|
12321
|
-
border-radius: 0;
|
|
12322
|
-
|
|
12323
|
-
&:hover {
|
|
12324
|
-
background-color: transparent;
|
|
12325
|
-
}
|
|
12326
|
-
}
|
|
12327
|
-
`;
|
|
12328
|
-
}}
|
|
12329
|
-
`;
|
|
12330
|
-
const StyledLabelContainer$1 = styled("span") `
|
|
12331
|
-
display: flex;
|
|
12332
|
-
justify-content: start;
|
|
12333
|
-
flex-direction: column;
|
|
12334
|
-
`;
|
|
12335
|
-
const StyledCheckboxLabel = styled("span") `
|
|
12336
|
-
${fontBodyXs$2}
|
|
12337
|
-
|
|
12338
|
-
${(props) => {
|
|
12339
|
-
const spaces = getSpaces(props);
|
|
12340
|
-
return `
|
|
12341
|
-
margin-top: -${spaces?.xxxs}px !important;
|
|
13388
|
+
border: 1px dashed ${semanticColors?.base?.borderSecondary};
|
|
13389
|
+
display: flex;
|
|
13390
|
+
justify-content: center;
|
|
13391
|
+
align-items: center;
|
|
13392
|
+
height: 100px;
|
|
13393
|
+
width: 100%;
|
|
12342
13394
|
`;
|
|
12343
13395
|
}}
|
|
12344
13396
|
`;
|
|
12345
|
-
const
|
|
12346
|
-
|
|
12347
|
-
|
|
13397
|
+
const DarkeningVignette = styled("div") `
|
|
13398
|
+
position: absolute;
|
|
13399
|
+
top: 0;
|
|
13400
|
+
left: 0;
|
|
13401
|
+
width: 100%;
|
|
13402
|
+
height: 40px;
|
|
13403
|
+
z-index: 1;
|
|
13404
|
+
background-image: linear-gradient(
|
|
13405
|
+
to bottom,
|
|
13406
|
+
black 0%,
|
|
13407
|
+
rgba(0, 0, 0, 0.738) 19%,
|
|
13408
|
+
rgba(0, 0, 0, 0.541) 34%,
|
|
13409
|
+
rgba(0, 0, 0, 0.382) 47%,
|
|
13410
|
+
rgba(0, 0, 0, 0.278) 56.5%,
|
|
13411
|
+
rgba(0, 0, 0, 0.194) 65%,
|
|
13412
|
+
rgba(0, 0, 0, 0.126) 73%,
|
|
13413
|
+
rgba(0, 0, 0, 0.075) 80.2%,
|
|
13414
|
+
rgba(0, 0, 0, 0.042) 86.1%,
|
|
13415
|
+
rgba(0, 0, 0, 0.021) 91%,
|
|
13416
|
+
rgba(0, 0, 0, 0.008) 95.2%,
|
|
13417
|
+
rgba(0, 0, 0, 0.002) 98.2%,
|
|
13418
|
+
transparent 100%
|
|
13419
|
+
);
|
|
13420
|
+
`;
|
|
13421
|
+
const OverlayMediaWrapper = styled("div") `
|
|
12348
13422
|
${(props) => {
|
|
12349
|
-
const
|
|
12350
|
-
return `
|
|
12351
|
-
|
|
13423
|
+
const { overlayMediaPosition } = props;
|
|
13424
|
+
return css$1 `
|
|
13425
|
+
display: flex;
|
|
13426
|
+
position: absolute;
|
|
13427
|
+
top: 0;
|
|
13428
|
+
left: 0;
|
|
13429
|
+
right: 0;
|
|
13430
|
+
bottom: 0;
|
|
13431
|
+
width: 100%;
|
|
13432
|
+
flex-direction: column;
|
|
13433
|
+
align-items: ${overlayMediaPosition
|
|
13434
|
+
? overlayContentPositionAlignMapping[overlayMediaPosition]
|
|
13435
|
+
: "center"};
|
|
13436
|
+
justify-content: ${overlayMediaPosition
|
|
13437
|
+
? overlayContentPositionJustifyMapping[overlayMediaPosition]
|
|
13438
|
+
: "center"};
|
|
13439
|
+
height: 100%;
|
|
12352
13440
|
`;
|
|
12353
13441
|
}}
|
|
12354
13442
|
`;
|
|
12355
|
-
const
|
|
12356
|
-
const semanticColors = getSemanticColors(props);
|
|
12357
|
-
const borders = getBorders(props);
|
|
12358
|
-
return `
|
|
12359
|
-
user-select: none;
|
|
12360
|
-
|
|
12361
|
-
${StyledCheckboxDefaultIcon} {
|
|
12362
|
-
border: ${borders?.base?.disabled};
|
|
12363
|
-
}
|
|
12364
|
-
|
|
12365
|
-
${StyledCheckboxCheckedIcon} {
|
|
12366
|
-
background-color: ${semanticColors?.base?.ornamentDisabled};
|
|
12367
|
-
}
|
|
12368
|
-
|
|
12369
|
-
${StyledCheckboxCaption} {
|
|
12370
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
12371
|
-
}
|
|
12372
|
-
|
|
12373
|
-
&:hover, &:active {
|
|
12374
|
-
${StyledCheckboxDefaultIcon} {
|
|
12375
|
-
border: ${borders?.base?.disabled};
|
|
12376
|
-
}
|
|
12377
|
-
|
|
12378
|
-
${StyledCheckboxCheckedIcon} {
|
|
12379
|
-
background-color: ${semanticColors?.base?.ornamentDisabled};
|
|
12380
|
-
}
|
|
12381
|
-
}
|
|
12382
|
-
`;
|
|
12383
|
-
};
|
|
12384
|
-
const StyledFormControlLabel$1 = styled(FormControlLabel) `
|
|
13443
|
+
const OverlayMedia = styled("div") `
|
|
12385
13444
|
${(props) => {
|
|
12386
|
-
const {
|
|
12387
|
-
const
|
|
12388
|
-
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
margin
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
border: ${borders?.base?.hover};
|
|
12399
|
-
background-color: ${disabled ? "transparent" : semanticColors?.base?.fillPrimaryInteraction};
|
|
12400
|
-
}
|
|
13445
|
+
const { overlayMediaMaxHeight, overlayMediaMaxWidth, overlayMediaMargin } = props;
|
|
13446
|
+
const breakpoints = getBreakpoints(props);
|
|
13447
|
+
return css$1 `
|
|
13448
|
+
position: absolute;
|
|
13449
|
+
z-index: 1;
|
|
13450
|
+
width: ${overlayMediaMaxWidth};
|
|
13451
|
+
height: ${overlayMediaMaxHeight};
|
|
13452
|
+
margin: ${overlayMediaMargin
|
|
13453
|
+
? typeof overlayMediaMargin === "string"
|
|
13454
|
+
? overlayMediaMargin
|
|
13455
|
+
: overlayMediaMargin?.large
|
|
13456
|
+
: "0"};
|
|
12401
13457
|
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
13458
|
+
${breakpoints?.down("lg")} {
|
|
13459
|
+
margin: ${overlayMediaMargin
|
|
13460
|
+
? typeof overlayMediaMargin === "string"
|
|
13461
|
+
? overlayMediaMargin
|
|
13462
|
+
: overlayMediaMargin?.medium
|
|
13463
|
+
: "0"};
|
|
12405
13464
|
}
|
|
12406
13465
|
|
|
12407
|
-
|
|
12408
|
-
${
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
background-color: ${semanticColors?.accent?.fillPressed};
|
|
12414
|
-
}
|
|
13466
|
+
${breakpoints?.down("md")} {
|
|
13467
|
+
margin: ${overlayMediaMargin
|
|
13468
|
+
? typeof overlayMediaMargin === "string"
|
|
13469
|
+
? overlayMediaMargin
|
|
13470
|
+
: overlayMediaMargin?.small
|
|
13471
|
+
: "0"};
|
|
12415
13472
|
}
|
|
12416
13473
|
|
|
12417
|
-
|
|
13474
|
+
img,
|
|
13475
|
+
video {
|
|
13476
|
+
width: 100%;
|
|
13477
|
+
height: 100%;
|
|
13478
|
+
object-fit: cover;
|
|
13479
|
+
object-position: center;
|
|
13480
|
+
}
|
|
12418
13481
|
`;
|
|
12419
13482
|
}}
|
|
12420
13483
|
`;
|
|
12421
13484
|
|
|
12422
|
-
|
|
12423
|
-
|
|
12424
|
-
|
|
12425
|
-
const
|
|
12426
|
-
const
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
case "checked":
|
|
12431
|
-
newProps = {
|
|
12432
|
-
...rest,
|
|
12433
|
-
checked: true,
|
|
12434
|
-
color: "primary"
|
|
12435
|
-
};
|
|
12436
|
-
break;
|
|
12437
|
-
case "unchecked":
|
|
12438
|
-
newProps = {
|
|
12439
|
-
...rest,
|
|
12440
|
-
checked: false,
|
|
12441
|
-
color: "default"
|
|
12442
|
-
};
|
|
12443
|
-
break;
|
|
12444
|
-
case "indeterminate":
|
|
12445
|
-
newProps = {
|
|
12446
|
-
...rest,
|
|
12447
|
-
checked: true,
|
|
12448
|
-
color: "primary",
|
|
12449
|
-
indeterminate: true
|
|
12450
|
-
};
|
|
12451
|
-
break;
|
|
12452
|
-
default:
|
|
12453
|
-
newProps = rest;
|
|
12454
|
-
}
|
|
12455
|
-
const finalLabel = caption ? (jsxs(StyledLabelContainer$1, { className: cn(labelCaptionContainerClassName), children: [jsx(StyledCheckboxLabel, { className: cn(labelClassName), children: label }), jsx(StyledCheckboxCaption, { className: cn(captionClassName), children: caption })] })) : (jsx(StyledLabelContainer$1, { className: cn(labelCaptionContainerClassName), children: jsx(StyledCheckboxLabel, { className: cn(labelClassName), children: label }) }));
|
|
12456
|
-
return (jsx(StyledFormControlLabel$1, { control: jsx(StyledCheckbox, __assign({ className: cn(checkboxClassName), checkedIcon: jsx(StyledCheckboxCheckedIcon, { className: cn(checkboxCheckedIconClassName), children: jsx(StyledIcon, { sdsIcon: "Check", sdsSize: "xs" }) }), icon: jsx(StyledCheckboxDefaultIcon, { intent: intent, className: cn(checkboxDefaultIconClassName) }), indeterminateIcon: jsx(StyledCheckboxCheckedIcon, { className: cn(checkboxIndeterminateIconClassName), children: jsx(StyledIcon, { sdsIcon: "Minus", sdsSize: "xs" }) }), intent: intent }, checkboxProps, newProps)), disabled: disabled, label: finalLabel, value: value, className: cn(rootClassName, className) }));
|
|
12457
|
-
};
|
|
13485
|
+
const Hero = React__default.forwardRef((props, ref) => {
|
|
13486
|
+
const { heroHeight, children, headerText, captionText, headerFontSize, hasInvertTextColor, overlayContentWidth, textAlignment, darkeningMask, darkeningMaskColor = "#000000", darkeningMaskOpacity = 0, darkeningVignette, overlayMedia, overlayMediaPosition, overlayMediaMaxHeight, overlayMediaMaxWidth, overlayMediaMargin, backgroundFill, ...rest } = props;
|
|
13487
|
+
// Determine if backgroundFill is a color string or a React node
|
|
13488
|
+
const isBackgroundFillColorString = typeof backgroundFill === "string" && !isValidElement(backgroundFill);
|
|
13489
|
+
const isBackgroundFillReactNode = isValidElement(backgroundFill);
|
|
13490
|
+
return (jsxs(StyledHeroContainer, __assign({ ref: ref, heroHeight: heroHeight, backgroundFillColor: isBackgroundFillColorString ? backgroundFill : undefined }, rest, { children: [isBackgroundFillReactNode && (jsx(BackgroundFillContainer, { children: backgroundFill })), darkeningMask && (jsx(DarkeningMask, { darkeningMaskColor: darkeningMaskColor, darkeningMaskOpacity: darkeningMaskOpacity })), overlayMedia && (jsx(OverlayMediaWrapper, { overlayMediaPosition: overlayMediaPosition, children: jsx(OverlayMedia, { overlayMediaPosition: overlayMediaPosition, overlayMediaMaxHeight: overlayMediaMaxHeight, overlayMediaMaxWidth: overlayMediaMaxWidth, overlayMediaMargin: overlayMediaMargin, children: overlayMedia }) })), jsxs(OverlayContent, { overlayContentWidth: overlayContentWidth, textAlignment: textAlignment, children: [headerText && (jsx(HeroTitle, { headerFontSize: headerFontSize, hasInvertTextColor: hasInvertTextColor, children: headerText })), captionText && (jsx(HeroCaption, { hasInvertTextColor: hasInvertTextColor, children: captionText })), children && jsx(ContentSlot, { children: children })] }), darkeningVignette && jsx(DarkeningVignette, {})] })));
|
|
13491
|
+
});
|
|
13492
|
+
Hero.displayName = "Hero";
|
|
12458
13493
|
|
|
12459
13494
|
const intentToColor = {
|
|
12460
13495
|
default: "base",
|
|
@@ -12505,11 +13540,13 @@ const StyledRadioCheckedIcon = styled("div") `
|
|
|
12505
13540
|
const StyledRadioButton = styled(Radio) `
|
|
12506
13541
|
${(props) => {
|
|
12507
13542
|
const spaces = getSpaces(props);
|
|
13543
|
+
const semanticColors = getSemanticColors(props);
|
|
12508
13544
|
return `
|
|
12509
13545
|
&.${radioClasses.root} {
|
|
12510
13546
|
${focusVisibleA11yStyle(props)}
|
|
12511
13547
|
margin: 0 ${spaces?.s}px 0 0;
|
|
12512
13548
|
padding: 0;
|
|
13549
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
12513
13550
|
}
|
|
12514
13551
|
`;
|
|
12515
13552
|
}}
|
|
@@ -12847,7 +13884,7 @@ const applyIntentColor = (props, intent) => {
|
|
|
12847
13884
|
}
|
|
12848
13885
|
`;
|
|
12849
13886
|
};
|
|
12850
|
-
const disabledStyled
|
|
13887
|
+
const disabledStyled = (props) => {
|
|
12851
13888
|
const borders = getBorders(props);
|
|
12852
13889
|
const semanticColors = getSemanticColors(props);
|
|
12853
13890
|
return css$1 `
|
|
@@ -12907,6 +13944,8 @@ const StyledInputBase = styled(TextField, {
|
|
|
12907
13944
|
const semanticColors = getSemanticColors(props);
|
|
12908
13945
|
return css$1 `
|
|
12909
13946
|
display: block;
|
|
13947
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
13948
|
+
border-radius: ${corners?.l}px;
|
|
12910
13949
|
|
|
12911
13950
|
.${outlinedInputClasses.root} {
|
|
12912
13951
|
width: 100%;
|
|
@@ -12954,7 +13993,7 @@ const StyledInputBase = styled(TextField, {
|
|
|
12954
13993
|
${intent === "negative" && applyIntentColor(props, "negative")}
|
|
12955
13994
|
${intent === "notice" && applyIntentColor(props, "notice")}
|
|
12956
13995
|
${intent === "positive" && applyIntentColor(props, "positive")}
|
|
12957
|
-
${disabled && disabledStyled
|
|
13996
|
+
${disabled && disabledStyled(props)}
|
|
12958
13997
|
`;
|
|
12959
13998
|
}}
|
|
12960
13999
|
`;
|
|
@@ -12995,6 +14034,7 @@ const toggle = (props) => {
|
|
|
12995
14034
|
const corners = getCorners(props);
|
|
12996
14035
|
const shadows = getShadows(props);
|
|
12997
14036
|
const iconSizes = getIconSizes(props);
|
|
14037
|
+
const semanticColors = getSemanticColors(props);
|
|
12998
14038
|
return `
|
|
12999
14039
|
cursor: ${disabled ? "default" : "pointer"};
|
|
13000
14040
|
border-radius: ${corners?.rounded}px;
|
|
@@ -13003,6 +14043,7 @@ const toggle = (props) => {
|
|
|
13003
14043
|
line-height: 18px;
|
|
13004
14044
|
padding: 0;
|
|
13005
14045
|
overflow: visible;
|
|
14046
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
13006
14047
|
|
|
13007
14048
|
.${switchClasses.switchBase} {
|
|
13008
14049
|
${focusVisibleA11yStyle(props)}
|
|
@@ -13423,7 +14464,7 @@ const Legend = (props) => {
|
|
|
13423
14464
|
}) })));
|
|
13424
14465
|
};
|
|
13425
14466
|
|
|
13426
|
-
const doNotForwardProps$
|
|
14467
|
+
const doNotForwardProps$g = ["sdsStyle", "sdsSize", "fontWeight"];
|
|
13427
14468
|
const defaultStyle = (props) => {
|
|
13428
14469
|
const semanticColors = getSemanticColors(props);
|
|
13429
14470
|
return css$1 `
|
|
@@ -13471,7 +14512,7 @@ const extraSmallStyle = (props) => {
|
|
|
13471
14512
|
};
|
|
13472
14513
|
const StyledLink = styled(Link$1, {
|
|
13473
14514
|
shouldForwardProp: (prop) => {
|
|
13474
|
-
return !doNotForwardProps$
|
|
14515
|
+
return !doNotForwardProps$g.includes(prop.toString());
|
|
13475
14516
|
}
|
|
13476
14517
|
}) `
|
|
13477
14518
|
all: unset;
|
|
@@ -13502,9 +14543,9 @@ const Link = forwardRef((props, ref) => {
|
|
|
13502
14543
|
});
|
|
13503
14544
|
|
|
13504
14545
|
// (thuang): Please keep this in sync with the props used in `ListExtraProps`
|
|
13505
|
-
const doNotForwardProps$
|
|
14546
|
+
const doNotForwardProps$f = ["marginBottom", "ordered"];
|
|
13506
14547
|
const StyledList = styled(List$1, {
|
|
13507
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14548
|
+
shouldForwardProp: (prop) => !doNotForwardProps$f.includes(prop)
|
|
13508
14549
|
}) `
|
|
13509
14550
|
.MuiListSubheader-root {
|
|
13510
14551
|
${propsToMarginBottom$1}
|
|
@@ -13549,9 +14590,9 @@ const fontBodyXs$1 = fontBody("xs");
|
|
|
13549
14590
|
const fontBodyXxs = fontBody("xxs");
|
|
13550
14591
|
const fontBodyXxxs = fontBody("xxxs");
|
|
13551
14592
|
// (thuang): Please keep this in sync with the props used in `ListItemExtraProps`
|
|
13552
|
-
const doNotForwardProps$
|
|
14593
|
+
const doNotForwardProps$e = ["marginBottom", "fontSize", "ordered"];
|
|
13553
14594
|
const StyledListItem = styled(ListItem$1, {
|
|
13554
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14595
|
+
shouldForwardProp: (prop) => !doNotForwardProps$e.includes(prop)
|
|
13555
14596
|
}) `
|
|
13556
14597
|
${propsToMarginBottom}
|
|
13557
14598
|
${propsToFontBody}
|
|
@@ -13701,9 +14742,9 @@ const tag = (props) => {
|
|
|
13701
14742
|
}
|
|
13702
14743
|
`;
|
|
13703
14744
|
};
|
|
13704
|
-
const doNotForwardProps$
|
|
14745
|
+
const doNotForwardProps$d = ["sdsStyle"];
|
|
13705
14746
|
const StyledLoadingIndicator = styled("div", {
|
|
13706
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14747
|
+
shouldForwardProp: (prop) => !doNotForwardProps$d.includes(prop)
|
|
13707
14748
|
}) `
|
|
13708
14749
|
${(props) => {
|
|
13709
14750
|
const { sdsStyle } = props;
|
|
@@ -13725,57 +14766,20 @@ const LoadingIndicator = ({ "aria-label": ariaLabel, sdsStyle, }) => {
|
|
|
13725
14766
|
return (jsxs(StyledLoadingIndicator, { sdsStyle: sdsStyle, "aria-label": "Loading", children: [jsx(Icon, { sdsIcon: "Loading", sdsSize: "l" }), jsx(StyledText, { "aria-label": ariaLabel, "aria-live": "polite", role: "status", children: "Loading" })] }));
|
|
13726
14767
|
};
|
|
13727
14768
|
|
|
13728
|
-
const StyledMenu = styled(Menu$1) `
|
|
13729
|
-
& {
|
|
13730
|
-
.${menuClasses.paper} {
|
|
13731
|
-
${(props) => {
|
|
13732
|
-
const spaces = getSpaces(props);
|
|
13733
|
-
const corners = getCorners(props);
|
|
13734
|
-
const semanticColors = getSemanticColors(props);
|
|
13735
|
-
return `
|
|
13736
|
-
background-color: ${semanticColors?.base?.surfacePrimary};
|
|
13737
|
-
background-image: none;
|
|
13738
|
-
padding: ${spaces?.xs}px;
|
|
13739
|
-
border-radius: ${corners?.l}px;
|
|
13740
|
-
`;
|
|
13741
|
-
}}
|
|
13742
|
-
}
|
|
13743
|
-
|
|
13744
|
-
.MuiList-padding {
|
|
13745
|
-
padding: 0;
|
|
13746
|
-
}
|
|
13747
|
-
}
|
|
13748
|
-
`;
|
|
13749
|
-
|
|
13750
|
-
const ANCHOR_ORIGIN = {
|
|
13751
|
-
horizontal: "center",
|
|
13752
|
-
vertical: "bottom"
|
|
13753
|
-
};
|
|
13754
|
-
const TRANSFORM_ORIGIN = {
|
|
13755
|
-
horizontal: "center",
|
|
13756
|
-
vertical: "top"
|
|
13757
|
-
};
|
|
13758
|
-
/**
|
|
13759
|
-
* @see https://mui.com/material-ui/react-menu/
|
|
13760
|
-
*/
|
|
13761
|
-
const Menu = (props) => {
|
|
13762
|
-
return (jsx(StyledMenu, __assign({ anchorOrigin: ANCHOR_ORIGIN, transformOrigin: TRANSFORM_ORIGIN }, props)));
|
|
13763
|
-
};
|
|
13764
|
-
|
|
13765
14769
|
const StyledMenuItem = styled(MenuItem) `
|
|
13766
14770
|
width: 100%;
|
|
13767
14771
|
`;
|
|
13768
|
-
const doNotForwardProps$
|
|
14772
|
+
const doNotForwardProps$c = ["search", "InputBaseProps", "keepSearchOnSelect"];
|
|
13769
14773
|
// (thuang): Casting the type to `Autocomplete`
|
|
13770
14774
|
// per https://github.com/mui-org/material-ui/issues/21727#issuecomment-880263271
|
|
13771
14775
|
const StyledAutocomplete = styled(Autocomplete$1, {
|
|
13772
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14776
|
+
shouldForwardProp: (prop) => !doNotForwardProps$c.includes(prop)
|
|
13773
14777
|
}) `
|
|
13774
14778
|
${({ search }) => !search && "height: 0; margin: 0 !important;"}
|
|
13775
14779
|
width: 100%;
|
|
13776
14780
|
`;
|
|
13777
14781
|
const InputBaseWrapper = styled("div", {
|
|
13778
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14782
|
+
shouldForwardProp: (prop) => !doNotForwardProps$c.includes(prop)
|
|
13779
14783
|
}) `
|
|
13780
14784
|
${(props) => {
|
|
13781
14785
|
const { search } = props;
|
|
@@ -13802,7 +14806,7 @@ const InputBaseWrapper = styled("div", {
|
|
|
13802
14806
|
}}
|
|
13803
14807
|
`;
|
|
13804
14808
|
const StyledMenuInputSearch = styled(InputSearch, {
|
|
13805
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14809
|
+
shouldForwardProp: (prop) => !doNotForwardProps$c.includes(prop)
|
|
13806
14810
|
}) `
|
|
13807
14811
|
&& {
|
|
13808
14812
|
margin: 0;
|
|
@@ -13875,9 +14879,9 @@ const MenuSelect = (props) => {
|
|
|
13875
14879
|
}
|
|
13876
14880
|
};
|
|
13877
14881
|
|
|
13878
|
-
const doNotForwardProps$
|
|
14882
|
+
const doNotForwardProps$b = ["hasInvertedStyle", "isNarrow"];
|
|
13879
14883
|
const StyledFooter = styled("footer", {
|
|
13880
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14884
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
13881
14885
|
}) `
|
|
13882
14886
|
${(props) => {
|
|
13883
14887
|
const { isNarrow } = props;
|
|
@@ -13901,7 +14905,7 @@ const StyledFooter = styled("footer", {
|
|
|
13901
14905
|
}}
|
|
13902
14906
|
`;
|
|
13903
14907
|
const StyledLogoWrapper$1 = styled("div", {
|
|
13904
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14908
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
13905
14909
|
}) `
|
|
13906
14910
|
${(props) => {
|
|
13907
14911
|
const spaces = getSpaces(props);
|
|
@@ -13939,7 +14943,7 @@ const StyledLogoWrapper$1 = styled("div", {
|
|
|
13939
14943
|
}
|
|
13940
14944
|
`;
|
|
13941
14945
|
const StyledNavSection = styled("div", {
|
|
13942
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14946
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
13943
14947
|
}) `
|
|
13944
14948
|
${(props) => {
|
|
13945
14949
|
const { isNarrow } = props;
|
|
@@ -13962,7 +14966,7 @@ const StyledNavSection = styled("div", {
|
|
|
13962
14966
|
}}
|
|
13963
14967
|
`;
|
|
13964
14968
|
const StyledTopSection = styled("div", {
|
|
13965
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14969
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
13966
14970
|
}) `
|
|
13967
14971
|
${(props) => {
|
|
13968
14972
|
const { isNarrow } = props;
|
|
@@ -13997,7 +15001,7 @@ const StyledTopSection = styled("div", {
|
|
|
13997
15001
|
}}
|
|
13998
15002
|
`;
|
|
13999
15003
|
const StyledLinkSection = styled("div", {
|
|
14000
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15004
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
14001
15005
|
}) `
|
|
14002
15006
|
align-items: center;
|
|
14003
15007
|
display: flex;
|
|
@@ -14034,7 +15038,7 @@ const StyledMobileLinkRow = styled.div `
|
|
|
14034
15038
|
}}
|
|
14035
15039
|
`;
|
|
14036
15040
|
const StyledImageSection = styled("div", {
|
|
14037
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15041
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
14038
15042
|
}) `
|
|
14039
15043
|
align-items: center;
|
|
14040
15044
|
display: flex;
|
|
@@ -14070,7 +15074,7 @@ const StyledMobileImageRow = styled.div `
|
|
|
14070
15074
|
}}
|
|
14071
15075
|
`;
|
|
14072
15076
|
const StyledBottomSection = styled("div", {
|
|
14073
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15077
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
14074
15078
|
}) `
|
|
14075
15079
|
align-items: center;
|
|
14076
15080
|
display: flex;
|
|
@@ -14094,7 +15098,7 @@ const StyledBottomSection = styled("div", {
|
|
|
14094
15098
|
}}
|
|
14095
15099
|
`;
|
|
14096
15100
|
|
|
14097
|
-
const doNotForwardProps$
|
|
15101
|
+
const doNotForwardProps$a = ["hasInvertedStyle", "isNarrow"];
|
|
14098
15102
|
const NarrowNavItemLinkStyles = (props) => {
|
|
14099
15103
|
const semanticColors = getSemanticColors(props);
|
|
14100
15104
|
const spaces = getSpaces(props);
|
|
@@ -14117,7 +15121,7 @@ const NarrowNavItemLinkStyles = (props) => {
|
|
|
14117
15121
|
`;
|
|
14118
15122
|
};
|
|
14119
15123
|
const StyledNavItemLink = styled(Link, {
|
|
14120
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15124
|
+
shouldForwardProp: (prop) => !doNotForwardProps$a.includes(prop)
|
|
14121
15125
|
}) `
|
|
14122
15126
|
${fontBodyMediumS}
|
|
14123
15127
|
|
|
@@ -14160,9 +15164,9 @@ const StyledNavItemLink = styled(Link, {
|
|
|
14160
15164
|
const NavItem = memo(({ item, hasInvertedStyle, isNarrow }) => (jsx(StyledNavItemLink, __assign({ href: item.url, hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow, component: item.component }, item.linkProps, { children: item.label }), item.label)));
|
|
14161
15165
|
NavItem.displayName = "NavItem";
|
|
14162
15166
|
|
|
14163
|
-
const doNotForwardProps$
|
|
15167
|
+
const doNotForwardProps$9 = ["hasInvertedStyle", "showDivider"];
|
|
14164
15168
|
const StyledLinkItemLink = styled(Link, {
|
|
14165
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15169
|
+
shouldForwardProp: (prop) => !doNotForwardProps$9.includes(prop)
|
|
14166
15170
|
}) `
|
|
14167
15171
|
${fontBodyXxs$1}
|
|
14168
15172
|
|
|
@@ -14211,7 +15215,7 @@ const StyledLinkItemLink = styled(Link, {
|
|
|
14211
15215
|
}}
|
|
14212
15216
|
`;
|
|
14213
15217
|
const StyledDivider$1 = styled(Divider, {
|
|
14214
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15218
|
+
shouldForwardProp: (prop) => !doNotForwardProps$9.includes(prop)
|
|
14215
15219
|
}) `
|
|
14216
15220
|
${(props) => {
|
|
14217
15221
|
const semanticColors = getSemanticColors(props);
|
|
@@ -14379,7 +15383,7 @@ function NavigationFooter({ backgroundAppearance = "matchBackground", images, lo
|
|
|
14379
15383
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
14380
15384
|
/* eslint-disable sonarjs/no-duplicate-string */
|
|
14381
15385
|
const TOOLBAR_HEIGHT = 48;
|
|
14382
|
-
const doNotForwardProps$
|
|
15386
|
+
const doNotForwardProps$8 = [
|
|
14383
15387
|
"hasInvertedStyle",
|
|
14384
15388
|
"isNarrow",
|
|
14385
15389
|
"primaryNavPosition",
|
|
@@ -14397,7 +15401,7 @@ const StyledTopComponentSlot = styled("div") `
|
|
|
14397
15401
|
z-index: 2100;
|
|
14398
15402
|
`;
|
|
14399
15403
|
const StyledAppBar = styled(AppBar, {
|
|
14400
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15404
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14401
15405
|
}) `
|
|
14402
15406
|
${(props) => {
|
|
14403
15407
|
const colors = getSemanticColors(props);
|
|
@@ -14428,7 +15432,7 @@ const NarrowToolbar = (props) => {
|
|
|
14428
15432
|
`;
|
|
14429
15433
|
};
|
|
14430
15434
|
const StyledToolbar = styled(Toolbar, {
|
|
14431
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15435
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14432
15436
|
}) `
|
|
14433
15437
|
${(props) => {
|
|
14434
15438
|
const { isNarrow } = props;
|
|
@@ -14445,7 +15449,7 @@ const StyledToolbar = styled(Toolbar, {
|
|
|
14445
15449
|
}}
|
|
14446
15450
|
`;
|
|
14447
15451
|
styled("div", {
|
|
14448
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15452
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14449
15453
|
}) `
|
|
14450
15454
|
${(props) => {
|
|
14451
15455
|
const shadows = getShadows(props);
|
|
@@ -14461,7 +15465,7 @@ styled("div", {
|
|
|
14461
15465
|
}}
|
|
14462
15466
|
`;
|
|
14463
15467
|
styled("div", {
|
|
14464
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15468
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14465
15469
|
}) `
|
|
14466
15470
|
${(props) => {
|
|
14467
15471
|
const colors = getSemanticColors(props);
|
|
@@ -14477,7 +15481,7 @@ styled("div", {
|
|
|
14477
15481
|
}}
|
|
14478
15482
|
`;
|
|
14479
15483
|
const StyledHeaderButton = styled(Button, {
|
|
14480
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15484
|
+
shouldForwardProp: (prop) => !doNotForwardProps$8.includes(prop)
|
|
14481
15485
|
}) `
|
|
14482
15486
|
${(props) => {
|
|
14483
15487
|
const { sdsType, hasInvertedStyle } = props;
|
|
@@ -14519,7 +15523,7 @@ const invertedNarrowButtonStyles = (props) => {
|
|
|
14519
15523
|
`;
|
|
14520
15524
|
};
|
|
14521
15525
|
const StyledNarrowIconButton = styled(Button, {
|
|
14522
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15526
|
+
shouldForwardProp: (prop) => !doNotForwardProps$8.includes(prop)
|
|
14523
15527
|
}) `
|
|
14524
15528
|
${(props) => {
|
|
14525
15529
|
const { hasInvertedStyle, isNarrow } = props;
|
|
@@ -14547,7 +15551,7 @@ const invertedWideButtonStyles = (props) => {
|
|
|
14547
15551
|
`;
|
|
14548
15552
|
};
|
|
14549
15553
|
const StyledWideIconButton = styled(Button, {
|
|
14550
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15554
|
+
shouldForwardProp: (prop) => !doNotForwardProps$8.includes(prop)
|
|
14551
15555
|
}) `
|
|
14552
15556
|
${(props) => {
|
|
14553
15557
|
const { hasInvertedStyle } = props;
|
|
@@ -14558,7 +15562,7 @@ const StyledWideIconButton = styled(Button, {
|
|
|
14558
15562
|
}}
|
|
14559
15563
|
`;
|
|
14560
15564
|
const StyledLogoLinkWrapper = styled(Link, {
|
|
14561
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15565
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14562
15566
|
}) `
|
|
14563
15567
|
align-items: center;
|
|
14564
15568
|
display: flex;
|
|
@@ -14584,7 +15588,7 @@ const NarrowTitleContainer = () => {
|
|
|
14584
15588
|
`;
|
|
14585
15589
|
};
|
|
14586
15590
|
const StyledTitleContainer = styled("div", {
|
|
14587
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15591
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14588
15592
|
}) `
|
|
14589
15593
|
display: flex;
|
|
14590
15594
|
align-items: center;
|
|
@@ -14606,7 +15610,7 @@ const StyledTitleContainer = styled("div", {
|
|
|
14606
15610
|
}}
|
|
14607
15611
|
`;
|
|
14608
15612
|
const StyledTitleTagWrapper = styled("div", {
|
|
14609
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15613
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14610
15614
|
}) `
|
|
14611
15615
|
${(props) => {
|
|
14612
15616
|
const spaces = getSpaces(props);
|
|
@@ -14627,7 +15631,7 @@ const StyledTag$2 = styled(Tag) `
|
|
|
14627
15631
|
margin: 0;
|
|
14628
15632
|
`;
|
|
14629
15633
|
const StyledPrimaryNavContainer = styled("div", {
|
|
14630
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15634
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14631
15635
|
}) `
|
|
14632
15636
|
align-items: center;
|
|
14633
15637
|
display: flex;
|
|
@@ -14650,7 +15654,7 @@ const StyledPrimaryNavContainer = styled("div", {
|
|
|
14650
15654
|
}}
|
|
14651
15655
|
`;
|
|
14652
15656
|
const StyledSearch = styled(InputSearch, {
|
|
14653
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15657
|
+
shouldForwardProp: (prop) => !doNotForwardProps$8.includes(prop)
|
|
14654
15658
|
}) `
|
|
14655
15659
|
margin: 0;
|
|
14656
15660
|
width: 100%;
|
|
@@ -14785,7 +15789,7 @@ const NarrowButtonStyles = (props) => {
|
|
|
14785
15789
|
`;
|
|
14786
15790
|
};
|
|
14787
15791
|
const StyledButtonSection = styled("section", {
|
|
14788
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15792
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14789
15793
|
}) `
|
|
14790
15794
|
display: flex;
|
|
14791
15795
|
align-items: center;
|
|
@@ -14803,7 +15807,7 @@ const StyledButtonSection = styled("section", {
|
|
|
14803
15807
|
}}
|
|
14804
15808
|
`;
|
|
14805
15809
|
const StyledDrawer$1 = styled(Drawer, {
|
|
14806
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15810
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle", "topOffset"].includes(prop)
|
|
14807
15811
|
}) `
|
|
14808
15812
|
${(props) => {
|
|
14809
15813
|
const colors = getSemanticColors(props);
|
|
@@ -14824,7 +15828,7 @@ const StyledDrawer$1 = styled(Drawer, {
|
|
|
14824
15828
|
}}
|
|
14825
15829
|
`;
|
|
14826
15830
|
const StyledDrawerContent = styled("div", {
|
|
14827
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15831
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14828
15832
|
}) `
|
|
14829
15833
|
${(props) => {
|
|
14830
15834
|
const spaces = getSpaces(props);
|
|
@@ -14838,7 +15842,7 @@ const StyledDrawerContent = styled("div", {
|
|
|
14838
15842
|
}}
|
|
14839
15843
|
`;
|
|
14840
15844
|
const StyledNarrowHamburgerMenuButton = styled(Button, {
|
|
14841
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15845
|
+
shouldForwardProp: (prop) => !doNotForwardProps$8.includes(prop)
|
|
14842
15846
|
}) `
|
|
14843
15847
|
${(props) => {
|
|
14844
15848
|
const { hasInvertedStyle } = props;
|
|
@@ -14883,7 +15887,7 @@ const DrawerAccordionStyles = (props) => {
|
|
|
14883
15887
|
`;
|
|
14884
15888
|
};
|
|
14885
15889
|
const StyledAccordion = styled(Accordion, {
|
|
14886
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15890
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14887
15891
|
}) `
|
|
14888
15892
|
padding: 0 !important;
|
|
14889
15893
|
width: 100%;
|
|
@@ -15033,7 +16037,7 @@ const StyledAccordion = styled(Accordion, {
|
|
|
15033
16037
|
}}
|
|
15034
16038
|
`;
|
|
15035
16039
|
const StyledSectionDivider = styled(Divider, {
|
|
15036
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16040
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15037
16041
|
}) `
|
|
15038
16042
|
${(props) => {
|
|
15039
16043
|
const semanticColors = getSemanticColors(props);
|
|
@@ -15048,7 +16052,7 @@ const StyledSectionDivider = styled(Divider, {
|
|
|
15048
16052
|
`;
|
|
15049
16053
|
// Hover Drawer Components for sdsStyle="drawer"
|
|
15050
16054
|
const StyledMegaMenuDrawer = styled(Drawer, {
|
|
15051
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16055
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle", "topOffset"].includes(prop)
|
|
15052
16056
|
}) `
|
|
15053
16057
|
${(props) => {
|
|
15054
16058
|
const { hasInvertedStyle, topOffset = 0 } = props;
|
|
@@ -15084,7 +16088,7 @@ const StyledMegaMenuDrawer = styled(Drawer, {
|
|
|
15084
16088
|
}}
|
|
15085
16089
|
`;
|
|
15086
16090
|
const StyledMegaMenuContent = styled("div", {
|
|
15087
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16091
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15088
16092
|
}) `
|
|
15089
16093
|
${(props) => {
|
|
15090
16094
|
const { hasInvertedStyle } = props;
|
|
@@ -15106,7 +16110,7 @@ const StyledMegaMenuContent = styled("div", {
|
|
|
15106
16110
|
}}
|
|
15107
16111
|
`;
|
|
15108
16112
|
const StyledHoverDrawerColumn = styled("div", {
|
|
15109
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16113
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle", "totalColumns"].includes(prop)
|
|
15110
16114
|
}) `
|
|
15111
16115
|
${(props) => {
|
|
15112
16116
|
const spaces = getSpaces(props);
|
|
@@ -15145,7 +16149,7 @@ const StyledContentWrapper = styled("div") `
|
|
|
15145
16149
|
}}
|
|
15146
16150
|
`;
|
|
15147
16151
|
const StyledHoverDrawerColumnHeader = styled("div", {
|
|
15148
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16152
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15149
16153
|
}) `
|
|
15150
16154
|
${(props) => {
|
|
15151
16155
|
const { hasInvertedStyle } = props;
|
|
@@ -15163,7 +16167,7 @@ const StyledHoverDrawerColumnHeader = styled("div", {
|
|
|
15163
16167
|
}}
|
|
15164
16168
|
`;
|
|
15165
16169
|
const StyledHoverDrawerItem = styled(Button, {
|
|
15166
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16170
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15167
16171
|
}) `
|
|
15168
16172
|
${(props) => {
|
|
15169
16173
|
const { hasInvertedStyle, hasDetails } = props;
|
|
@@ -15207,7 +16211,7 @@ const StyledHoverDrawerItem = styled(Button, {
|
|
|
15207
16211
|
}}
|
|
15208
16212
|
`;
|
|
15209
16213
|
const StyledHoverDrawerItemContent = styled("div", {
|
|
15210
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16214
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15211
16215
|
}) `
|
|
15212
16216
|
${(props) => {
|
|
15213
16217
|
const spaces = getSpaces(props);
|
|
@@ -15220,7 +16224,7 @@ const StyledHoverDrawerItemContent = styled("div", {
|
|
|
15220
16224
|
}}
|
|
15221
16225
|
`;
|
|
15222
16226
|
const StyledHoverDrawerItemIcon = styled("div", {
|
|
15223
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16227
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15224
16228
|
}) `
|
|
15225
16229
|
${(props) => {
|
|
15226
16230
|
const semanticColors = getSemanticColors(props);
|
|
@@ -15240,7 +16244,7 @@ const StyledHoverDrawerItemIcon = styled("div", {
|
|
|
15240
16244
|
}}
|
|
15241
16245
|
`;
|
|
15242
16246
|
const StyledHoverDrawerItemText = styled("div", {
|
|
15243
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16247
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15244
16248
|
}) `
|
|
15245
16249
|
${() => {
|
|
15246
16250
|
return css$3 `
|
|
@@ -15253,7 +16257,7 @@ const StyledHoverDrawerItemText = styled("div", {
|
|
|
15253
16257
|
}}
|
|
15254
16258
|
`;
|
|
15255
16259
|
const EmptyIcon = styled("div", {
|
|
15256
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16260
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15257
16261
|
}) `
|
|
15258
16262
|
${(props) => {
|
|
15259
16263
|
const { hasDetails } = props;
|
|
@@ -15268,7 +16272,7 @@ const EmptyIcon = styled("div", {
|
|
|
15268
16272
|
}}
|
|
15269
16273
|
`;
|
|
15270
16274
|
const StyledHoverDrawerItemTitle = styled("div", {
|
|
15271
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16275
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15272
16276
|
}) `
|
|
15273
16277
|
${(props) => {
|
|
15274
16278
|
const { hasInvertedStyle, hasDetails } = props;
|
|
@@ -15293,7 +16297,7 @@ const StyledHoverDrawerItemTitle = styled("div", {
|
|
|
15293
16297
|
}}
|
|
15294
16298
|
`;
|
|
15295
16299
|
const StyledHoverDrawerItemDetails = styled("div", {
|
|
15296
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16300
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15297
16301
|
}) `
|
|
15298
16302
|
${(props) => {
|
|
15299
16303
|
const { hasInvertedStyle } = props;
|
|
@@ -15311,7 +16315,7 @@ const StyledHoverDrawerItemDetails = styled("div", {
|
|
|
15311
16315
|
}}
|
|
15312
16316
|
`;
|
|
15313
16317
|
const StyledHoverDrawerActions = styled("div", {
|
|
15314
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16318
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15315
16319
|
}) `
|
|
15316
16320
|
${(props) => {
|
|
15317
16321
|
const spaces = getSpaces(props);
|
|
@@ -15350,12 +16354,12 @@ const StyledButton = styled(Button) `
|
|
|
15350
16354
|
}}
|
|
15351
16355
|
`;
|
|
15352
16356
|
const StyledHoverDrawerContainer = styled("div", {
|
|
15353
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16357
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15354
16358
|
}) `
|
|
15355
16359
|
position: relative;
|
|
15356
16360
|
`;
|
|
15357
16361
|
|
|
15358
|
-
const doNotForwardProps$
|
|
16362
|
+
const doNotForwardProps$7 = [
|
|
15359
16363
|
"active",
|
|
15360
16364
|
"hasInvertedStyle",
|
|
15361
16365
|
"isNarrow",
|
|
@@ -15416,7 +16420,7 @@ const NarrowPrimaryNavItem = (props) => {
|
|
|
15416
16420
|
`;
|
|
15417
16421
|
};
|
|
15418
16422
|
styled(Button, {
|
|
15419
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16423
|
+
shouldForwardProp: (prop) => !doNotForwardProps$7.includes(prop)
|
|
15420
16424
|
}) `
|
|
15421
16425
|
display: flex;
|
|
15422
16426
|
align-items: center;
|
|
@@ -15481,7 +16485,7 @@ const NarrowStyledLabel = (props) => {
|
|
|
15481
16485
|
`;
|
|
15482
16486
|
};
|
|
15483
16487
|
const StyledLabel$1 = styled("span", {
|
|
15484
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16488
|
+
shouldForwardProp: (prop) => !doNotForwardProps$7.includes(prop)
|
|
15485
16489
|
}) `
|
|
15486
16490
|
${(props) => {
|
|
15487
16491
|
const { hasInvertedStyle, active, isNarrow } = props;
|
|
@@ -15514,7 +16518,7 @@ const StyledLabel$1 = styled("span", {
|
|
|
15514
16518
|
`;
|
|
15515
16519
|
|
|
15516
16520
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
15517
|
-
const doNotForwardProps$
|
|
16521
|
+
const doNotForwardProps$6 = [
|
|
15518
16522
|
"active",
|
|
15519
16523
|
"hasInvertedStyle",
|
|
15520
16524
|
"isNarrow",
|
|
@@ -15580,7 +16584,7 @@ const NarrowNavItemStyles = (props) => {
|
|
|
15580
16584
|
`;
|
|
15581
16585
|
};
|
|
15582
16586
|
const UnifiedNavItem = styled(Button, {
|
|
15583
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16587
|
+
shouldForwardProp: (prop) => !doNotForwardProps$6.includes(prop)
|
|
15584
16588
|
}) `
|
|
15585
16589
|
display: flex;
|
|
15586
16590
|
align-items: center;
|
|
@@ -15662,7 +16666,7 @@ const UnifiedNavItem = styled(Button, {
|
|
|
15662
16666
|
`;
|
|
15663
16667
|
// StyledLabel for primary nav items (secondary nav doesn't use this)
|
|
15664
16668
|
const StyledLabel = styled("span", {
|
|
15665
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16669
|
+
shouldForwardProp: (prop) => !doNotForwardProps$6.includes(prop)
|
|
15666
16670
|
}) `
|
|
15667
16671
|
${(props) => {
|
|
15668
16672
|
const { hasInvertedStyle, active, isNarrow } = props;
|
|
@@ -15692,7 +16696,7 @@ const StyledLabel = styled("span", {
|
|
|
15692
16696
|
}}
|
|
15693
16697
|
`;
|
|
15694
16698
|
|
|
15695
|
-
const doNotForwardProps$
|
|
16699
|
+
const doNotForwardProps$5 = [
|
|
15696
16700
|
"isNarrow",
|
|
15697
16701
|
"hasSection",
|
|
15698
16702
|
"hasInvertedStyle",
|
|
@@ -15708,7 +16712,7 @@ const NarrowStyledSection = (props) => {
|
|
|
15708
16712
|
`;
|
|
15709
16713
|
};
|
|
15710
16714
|
const StyledSection = styled("section", {
|
|
15711
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16715
|
+
shouldForwardProp: (prop) => !doNotForwardProps$5.includes(prop)
|
|
15712
16716
|
}) `
|
|
15713
16717
|
display: flex;
|
|
15714
16718
|
align-items: center;
|
|
@@ -15724,7 +16728,7 @@ const StyledSection = styled("section", {
|
|
|
15724
16728
|
}}
|
|
15725
16729
|
`;
|
|
15726
16730
|
const StyledSectionHeader = styled(ListSubheader, {
|
|
15727
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16731
|
+
shouldForwardProp: (prop) => !doNotForwardProps$5.includes(prop)
|
|
15728
16732
|
}) `
|
|
15729
16733
|
${(props) => {
|
|
15730
16734
|
const { isNarrow, hasInvertedStyle, sdsStyle } = props;
|
|
@@ -15769,7 +16773,7 @@ const StyledSectionHeader = styled(ListSubheader, {
|
|
|
15769
16773
|
}}
|
|
15770
16774
|
`;
|
|
15771
16775
|
const StyledAccordionDetails = styled(AccordionDetails, {
|
|
15772
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16776
|
+
shouldForwardProp: (prop) => !doNotForwardProps$5.includes(prop)
|
|
15773
16777
|
}) `
|
|
15774
16778
|
${(props) => {
|
|
15775
16779
|
const { sdsStyle } = props;
|
|
@@ -15785,7 +16789,7 @@ const StyledAccordionDetails = styled(AccordionDetails, {
|
|
|
15785
16789
|
}}
|
|
15786
16790
|
`;
|
|
15787
16791
|
const StyledAccordionSection = styled("div", {
|
|
15788
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16792
|
+
shouldForwardProp: (prop) => !doNotForwardProps$5.includes(prop)
|
|
15789
16793
|
}) `
|
|
15790
16794
|
${(props) => {
|
|
15791
16795
|
const { sdsStyle, hasInvertedStyle } = props;
|
|
@@ -15807,7 +16811,7 @@ const StyledAccordionSection = styled("div", {
|
|
|
15807
16811
|
}}
|
|
15808
16812
|
`;
|
|
15809
16813
|
const StyledDivider = styled(Divider, {
|
|
15810
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16814
|
+
shouldForwardProp: (prop) => !doNotForwardProps$5.includes(prop)
|
|
15811
16815
|
}) `
|
|
15812
16816
|
${(props) => {
|
|
15813
16817
|
const { hasSection, isNarrow, hasInvertedStyle } = props;
|
|
@@ -15916,7 +16920,7 @@ function DrawerContent({ drawerItems, sectionProps, section, hasMultipleSections
|
|
|
15916
16920
|
}) }))] }));
|
|
15917
16921
|
}
|
|
15918
16922
|
|
|
15919
|
-
const doNotForwardProps$
|
|
16923
|
+
const doNotForwardProps$4 = [
|
|
15920
16924
|
"hasInvertedStyle",
|
|
15921
16925
|
"hasCaption",
|
|
15922
16926
|
"iconSize",
|
|
@@ -15925,7 +16929,7 @@ const doNotForwardProps$6 = [
|
|
|
15925
16929
|
"sdsStyle",
|
|
15926
16930
|
];
|
|
15927
16931
|
const StyledDrawerNavItem = styled(Button, {
|
|
15928
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16932
|
+
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
15929
16933
|
}) `
|
|
15930
16934
|
${(props) => {
|
|
15931
16935
|
const spaces = getSpaces(props);
|
|
@@ -15977,7 +16981,7 @@ const StyledDrawerNavItem = styled(Button, {
|
|
|
15977
16981
|
}}
|
|
15978
16982
|
`;
|
|
15979
16983
|
const StyledDrawerNavItemContent = styled("div", {
|
|
15980
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16984
|
+
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
15981
16985
|
}) `
|
|
15982
16986
|
${(props) => {
|
|
15983
16987
|
const spaces = getSpaces(props);
|
|
@@ -15992,7 +16996,7 @@ const StyledDrawerNavItemContent = styled("div", {
|
|
|
15992
16996
|
}}
|
|
15993
16997
|
`;
|
|
15994
16998
|
const StyledDrawerNavItemText = styled("div", {
|
|
15995
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16999
|
+
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
15996
17000
|
}) `
|
|
15997
17001
|
${(props) => {
|
|
15998
17002
|
const { hasDetails, hasInvertedStyle } = props;
|
|
@@ -16011,7 +17015,7 @@ const StyledDrawerNavItemText = styled("div", {
|
|
|
16011
17015
|
}}
|
|
16012
17016
|
`;
|
|
16013
17017
|
const StyledDrawerNavItemCaption = styled("div", {
|
|
16014
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
17018
|
+
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
16015
17019
|
}) `
|
|
16016
17020
|
${(props) => {
|
|
16017
17021
|
const semanticColors = getSemanticColors(props);
|
|
@@ -16031,7 +17035,7 @@ const StyledDrawerNavItemCaption = styled("div", {
|
|
|
16031
17035
|
}}
|
|
16032
17036
|
`;
|
|
16033
17037
|
const StyledIconWrapper = styled("div", {
|
|
16034
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
17038
|
+
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
16035
17039
|
}) `
|
|
16036
17040
|
${(props) => {
|
|
16037
17041
|
const { iconSize } = props;
|
|
@@ -17021,9 +18025,9 @@ const useScrollStopListener = (callback, timeout = 50) => {
|
|
|
17021
18025
|
}, [timeout]);
|
|
17022
18026
|
};
|
|
17023
18027
|
|
|
17024
|
-
const doNotForwardProps$
|
|
18028
|
+
const doNotForwardProps$3 = ["items", "sdsIndicatorColor", "width", "isSubItem"];
|
|
17025
18029
|
const StyledTabs$1 = styled(Tabs$1, {
|
|
17026
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
18030
|
+
shouldForwardProp: (prop) => !doNotForwardProps$3.includes(prop)
|
|
17027
18031
|
}) `
|
|
17028
18032
|
${(props) => {
|
|
17029
18033
|
const { width = "100%" } = props;
|
|
@@ -17062,7 +18066,7 @@ const StyledTabs$1 = styled(Tabs$1, {
|
|
|
17062
18066
|
}}
|
|
17063
18067
|
`;
|
|
17064
18068
|
const StyledTab$1 = styled(Tab$1, {
|
|
17065
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
18069
|
+
shouldForwardProp: (prop) => !doNotForwardProps$3.includes(prop)
|
|
17066
18070
|
}) `
|
|
17067
18071
|
${fontBodyMediumXs}
|
|
17068
18072
|
|
|
@@ -17258,451 +18262,185 @@ const NavigationJumpTo = forwardRef((props, ref) => {
|
|
|
17258
18262
|
targetItem?.elementRef?.current?.scrollIntoView({
|
|
17259
18263
|
behavior: "smooth",
|
|
17260
18264
|
block: "start"
|
|
17261
|
-
});
|
|
17262
|
-
}
|
|
17263
|
-
// Update the tab value to newValue to adjust the position of the tabsIndicator
|
|
17264
|
-
setFirstTabIndexInview(newValue);
|
|
17265
|
-
// Invoke the custom onChange prop
|
|
17266
|
-
handleOnChange(newValue, event, "click");
|
|
17267
|
-
};
|
|
17268
|
-
// Observe changes in the sectionIsInView object to update the tabs value
|
|
17269
|
-
// based on the index of the visible sections in the viewport.
|
|
17270
|
-
useEffect(() => {
|
|
17271
|
-
// Retrieve the index of the first section that is intersecting with the viewport.
|
|
17272
|
-
const flattenedSectionInView = Object.values(sectionIsInView).findIndex((section) => section.isInView);
|
|
17273
|
-
// Convert flattened index back to tab index
|
|
17274
|
-
const tabSectionInView = tabToFlattenedIndexMap.findIndex((flatIndex) => flatIndex === flattenedSectionInView);
|
|
17275
|
-
// Update the tabs value only if a section is present in the viewport
|
|
17276
|
-
// and no navigation item has been clicked, preventing updates during window scroll
|
|
17277
|
-
// and unnecessary movement of the tabs indicator.
|
|
17278
|
-
if (tabSectionInView > -1 && !navItemClicked) {
|
|
17279
|
-
setFirstTabIndexInview(tabSectionInView);
|
|
17280
|
-
// Invoke the custom onChange prop
|
|
17281
|
-
handleOnChange(tabSectionInView, {
|
|
17282
|
-
target: flattenedItems[flattenedSectionInView],
|
|
17283
|
-
type: "scroll"
|
|
17284
|
-
}, "scroll");
|
|
17285
|
-
}
|
|
17286
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17287
|
-
}, [
|
|
17288
|
-
handleOnChange,
|
|
17289
|
-
flattenedItems,
|
|
17290
|
-
sectionIsInView,
|
|
17291
|
-
tabToFlattenedIndexMap,
|
|
17292
|
-
]);
|
|
17293
|
-
// Set navItemClicked to false to re-enable the option
|
|
17294
|
-
// to update the tab value based on scroll.
|
|
17295
|
-
useScrollStopListener(() => {
|
|
17296
|
-
setNavItemClicked(false);
|
|
17297
|
-
});
|
|
17298
|
-
return (jsx(StyledTabs$1, __assign({ ref: ref, orientation: "vertical", variant: "fullWidth", value: firstTabIndexInview, onChange: handleChange, "aria-label": "navigation-jump-to", width: width }, rest, { children: items.map((item, itemIndex) => createTabsForItem(item, itemIndex)) })));
|
|
17299
|
-
});
|
|
17300
|
-
|
|
17301
|
-
const fontBodyXs = fontBody("xs");
|
|
17302
|
-
const doNotForwardProps$4 = ["slideDirection"];
|
|
17303
|
-
const StyledNotification = styled(Alert$2, {
|
|
17304
|
-
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
17305
|
-
}) `
|
|
17306
|
-
${fontBodyXs}
|
|
17307
|
-
|
|
17308
|
-
${(props) => {
|
|
17309
|
-
const { intent = "info" } = props;
|
|
17310
|
-
const spaces = getSpaces(props);
|
|
17311
|
-
const shadows = getShadows(props);
|
|
17312
|
-
const corners = getCorners(props);
|
|
17313
|
-
const semanticColors = getSemanticColors(props);
|
|
17314
|
-
const iconColor = semanticColors?.[intent]?.ornament ?? "black";
|
|
17315
|
-
const backgroundColor = semanticColors?.[intent]?.surfaceSecondary ?? "white";
|
|
17316
|
-
return `
|
|
17317
|
-
position: relative;
|
|
17318
|
-
overflow: hidden;
|
|
17319
|
-
background-color: ${backgroundColor};
|
|
17320
|
-
max-width: 480px;
|
|
17321
|
-
min-width: 280px;
|
|
17322
|
-
box-sizing: border-box;
|
|
17323
|
-
margin: ${spaces?.m}px 0;
|
|
17324
|
-
border-radius: ${corners?.xl}px;
|
|
17325
|
-
color: ${semanticColors?.base?.textPrimary};
|
|
17326
|
-
padding: ${spaces?.m}px ${spaces?.m}px ${spaces?.m}px ${spaces?.l}px;
|
|
17327
|
-
align-items: flex-start;
|
|
17328
|
-
box-shadow: ${shadows?.s};
|
|
17329
|
-
|
|
17330
|
-
&:before {
|
|
17331
|
-
content: "";
|
|
17332
|
-
position: absolute;
|
|
17333
|
-
top: 0;
|
|
17334
|
-
left: 0;
|
|
17335
|
-
width: ${spaces?.xxs}px;
|
|
17336
|
-
height: 100%;
|
|
17337
|
-
background-color: ${semanticColors?.[intent]?.ornament};
|
|
17338
|
-
}
|
|
17339
|
-
|
|
17340
|
-
.MuiAlert-icon {
|
|
17341
|
-
margin-top: ${spaces?.xxxs}px;
|
|
17342
|
-
margin-right: ${spaces?.s}px;
|
|
17343
|
-
padding: 0;
|
|
17344
|
-
path {
|
|
17345
|
-
fill: ${iconColor};
|
|
17346
|
-
}
|
|
17347
|
-
}
|
|
17348
|
-
|
|
17349
|
-
.MuiAlert-message {
|
|
17350
|
-
padding: 0;
|
|
17351
|
-
margin-right: ${spaces?.m}px;
|
|
17352
|
-
width: 100%;
|
|
17353
|
-
|
|
17354
|
-
> * {
|
|
17355
|
-
margin: ${spaces?.m}px 0px;
|
|
17356
|
-
|
|
17357
|
-
&:last-child {
|
|
17358
|
-
margin-bottom: 0;
|
|
17359
|
-
}
|
|
17360
|
-
}
|
|
17361
|
-
|
|
17362
|
-
button {
|
|
17363
|
-
display: block;
|
|
17364
|
-
}
|
|
17365
|
-
}
|
|
17366
|
-
|
|
17367
|
-
.MuiAlert-action {
|
|
17368
|
-
margin-right: 0;
|
|
17369
|
-
padding: 0;
|
|
17370
|
-
align-items: flex-start;
|
|
17371
|
-
margin-top: ${spaces?.xxs}px;
|
|
17372
|
-
|
|
17373
|
-
> button {
|
|
17374
|
-
padding: 0;
|
|
17375
|
-
}
|
|
17376
|
-
}
|
|
17377
|
-
}
|
|
17378
|
-
`;
|
|
17379
|
-
}}
|
|
17380
|
-
`;
|
|
17381
|
-
const StyledButtonWrapper = styled("div") `
|
|
17382
|
-
${(props) => {
|
|
17383
|
-
const { buttonPosition = "right" } = props;
|
|
17384
|
-
return `
|
|
17385
|
-
display: flex;
|
|
17386
|
-
justify-content: ${buttonPosition === "left" ? "flex-start" : "flex-end"};
|
|
17387
|
-
`;
|
|
17388
|
-
}}
|
|
17389
|
-
`;
|
|
17390
|
-
|
|
17391
|
-
/**
|
|
17392
|
-
* @see https://mui.com/material-ui/react-alert/
|
|
17393
|
-
*/
|
|
17394
|
-
const Notification = ({ autoDismiss, children, dismissed, slideDirection = "left", intent, onClose, buttonOnClick, buttonText, buttonPosition, icon, sdsIconProps, ...rest }) => {
|
|
17395
|
-
const [hide, setHide] = useState(dismissed);
|
|
17396
|
-
// remove prop used only for stories
|
|
17397
|
-
const passedProps = { ...rest };
|
|
17398
|
-
delete passedProps.extraContent;
|
|
17399
|
-
useEffect(() => {
|
|
17400
|
-
setHide(dismissed);
|
|
17401
|
-
if (autoDismiss) {
|
|
17402
|
-
const timeout = typeof autoDismiss === "boolean" ? 8000 : autoDismiss;
|
|
17403
|
-
setTimeout(() => {
|
|
17404
|
-
setHide(true);
|
|
17405
|
-
}, timeout);
|
|
17406
|
-
}
|
|
17407
|
-
}, [dismissed, autoDismiss]);
|
|
17408
|
-
const handleClose = (event) => {
|
|
17409
|
-
setHide(true);
|
|
17410
|
-
if (onClose)
|
|
17411
|
-
onClose(event);
|
|
17412
|
-
};
|
|
17413
|
-
const getIcon = () => {
|
|
17414
|
-
if (icon !== undefined) {
|
|
17415
|
-
if (typeof icon !== "string") {
|
|
17416
|
-
return icon;
|
|
17417
|
-
}
|
|
17418
|
-
else {
|
|
17419
|
-
return (jsx(Icon, __assign({ sdsSize: "s", sdsIcon: icon }, sdsIconProps)));
|
|
17420
|
-
}
|
|
17421
|
-
}
|
|
17422
|
-
else {
|
|
17423
|
-
switch (intent) {
|
|
17424
|
-
case "positive":
|
|
17425
|
-
return jsx(Icon, { sdsSize: "s", sdsIcon: "CheckCircle" });
|
|
17426
|
-
case "info":
|
|
17427
|
-
return jsx(Icon, { sdsSize: "s", sdsIcon: "InfoCircle" });
|
|
17428
|
-
default:
|
|
17429
|
-
return jsx(Icon, { sdsSize: "s", sdsIcon: "ExclamationMarkCircle" });
|
|
17430
|
-
}
|
|
17431
|
-
}
|
|
17432
|
-
};
|
|
17433
|
-
return (jsx(Fragment, { children: jsx(Slide, { in: !hide, direction: slideDirection, mountOnEnter: true, unmountOnExit: true, timeout: 250, children: jsx(Box, { children: jsxs(StyledNotification, __assign({ onClose: onClose ? handleClose : undefined, action: onClose ? (jsx(Button, { onClick: handleClose, sdsStyle: "minimal", sdsType: "secondary", "data-testid": "notificationCloseButton", children: jsx(Icon, { sdsIcon: "XMark", sdsSize: "s" }) })) : null, icon: getIcon(), className: "elevated", intent: intent, slideDirection: slideDirection }, passedProps, { children: [children, buttonOnClick !== undefined && (jsx(StyledButtonWrapper, { buttonPosition: buttonPosition, children: jsx(Button, { sdsStyle: "minimal", sdsType: "secondary", size: "medium", onClick: buttonOnClick, children: buttonText }) }))] })) }) }) }));
|
|
17434
|
-
};
|
|
17435
|
-
|
|
17436
|
-
const doNotForwardProps$3 = [
|
|
17437
|
-
"sdsStyle",
|
|
17438
|
-
"selected",
|
|
17439
|
-
"onPageChange",
|
|
17440
|
-
"onNextPage",
|
|
17441
|
-
"onPreviousPage",
|
|
17442
|
-
"goToPage",
|
|
17443
|
-
"totalCount",
|
|
17444
|
-
"siblingCount",
|
|
17445
|
-
"currentPage",
|
|
17446
|
-
"pageSize",
|
|
17447
|
-
"truncateDropdown",
|
|
17448
|
-
];
|
|
17449
|
-
const StyledPaginationButton = styled(Button) `
|
|
17450
|
-
${(props) => {
|
|
17451
|
-
const semanticColors = getSemanticColors(props);
|
|
17452
|
-
return `
|
|
17453
|
-
width: 28px;
|
|
17454
|
-
height: 28px;
|
|
17455
|
-
cursor: "pointer";
|
|
17456
|
-
|
|
17457
|
-
& .MuiSvgIcon-root {
|
|
17458
|
-
width: 12px;
|
|
17459
|
-
color: ${semanticColors?.base?.ornamentSecondary};
|
|
17460
|
-
}
|
|
17461
|
-
|
|
17462
|
-
&:hover {
|
|
17463
|
-
& .MuiSvgIcon-root {
|
|
17464
|
-
color: ${semanticColors?.base?.ornamentSecondaryInteraction}
|
|
18265
|
+
});
|
|
17465
18266
|
}
|
|
17466
|
-
|
|
17467
|
-
|
|
17468
|
-
|
|
17469
|
-
|
|
17470
|
-
|
|
17471
|
-
|
|
17472
|
-
|
|
17473
|
-
|
|
17474
|
-
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
|
|
17478
|
-
|
|
17479
|
-
|
|
17480
|
-
|
|
17481
|
-
|
|
17482
|
-
|
|
17483
|
-
|
|
17484
|
-
|
|
17485
|
-
|
|
17486
|
-
|
|
17487
|
-
|
|
17488
|
-
margin-right: ${spaces?.m}px;
|
|
17489
|
-
}
|
|
17490
|
-
|
|
17491
|
-
&[data-order="last"] {
|
|
17492
|
-
margin-left: ${spaces?.m}px;
|
|
17493
|
-
}
|
|
17494
|
-
|
|
17495
|
-
& .MuiSvgIcon-root {
|
|
17496
|
-
color: ${disabled ? semanticColors?.base?.ornamentDisabled : semanticColors?.base?.ornamentSecondary};
|
|
17497
|
-
}
|
|
17498
|
-
|
|
17499
|
-
&:hover {
|
|
17500
|
-
background-color: ${disabled ? "transparent" : semanticColors?.base?.fillPrimaryInteraction};
|
|
17501
|
-
|
|
17502
|
-
& .MuiSvgIcon-root {
|
|
17503
|
-
color: ${disabled ? semanticColors?.base?.ornamentDisabled : semanticColors?.base?.ornamentSecondaryInteraction}
|
|
18267
|
+
// Update the tab value to newValue to adjust the position of the tabsIndicator
|
|
18268
|
+
setFirstTabIndexInview(newValue);
|
|
18269
|
+
// Invoke the custom onChange prop
|
|
18270
|
+
handleOnChange(newValue, event, "click");
|
|
18271
|
+
};
|
|
18272
|
+
// Observe changes in the sectionIsInView object to update the tabs value
|
|
18273
|
+
// based on the index of the visible sections in the viewport.
|
|
18274
|
+
useEffect(() => {
|
|
18275
|
+
// Retrieve the index of the first section that is intersecting with the viewport.
|
|
18276
|
+
const flattenedSectionInView = Object.values(sectionIsInView).findIndex((section) => section.isInView);
|
|
18277
|
+
// Convert flattened index back to tab index
|
|
18278
|
+
const tabSectionInView = tabToFlattenedIndexMap.findIndex((flatIndex) => flatIndex === flattenedSectionInView);
|
|
18279
|
+
// Update the tabs value only if a section is present in the viewport
|
|
18280
|
+
// and no navigation item has been clicked, preventing updates during window scroll
|
|
18281
|
+
// and unnecessary movement of the tabs indicator.
|
|
18282
|
+
if (tabSectionInView > -1 && !navItemClicked) {
|
|
18283
|
+
setFirstTabIndexInview(tabSectionInView);
|
|
18284
|
+
// Invoke the custom onChange prop
|
|
18285
|
+
handleOnChange(tabSectionInView, {
|
|
18286
|
+
target: flattenedItems[flattenedSectionInView],
|
|
18287
|
+
type: "scroll"
|
|
18288
|
+
}, "scroll");
|
|
17504
18289
|
}
|
|
17505
|
-
|
|
17506
|
-
|
|
17507
|
-
|
|
17508
|
-
|
|
17509
|
-
|
|
17510
|
-
|
|
17511
|
-
|
|
17512
|
-
|
|
17513
|
-
|
|
17514
|
-
|
|
17515
|
-
|
|
17516
|
-
|
|
17517
|
-
|
|
17518
|
-
|
|
17519
|
-
& li {
|
|
17520
|
-
list-style: none;
|
|
17521
|
-
}
|
|
17522
|
-
`;
|
|
17523
|
-
const selectedPageStyle = (props) => {
|
|
17524
|
-
const semanticColors = getSemanticColors(props);
|
|
17525
|
-
return css$1 `
|
|
17526
|
-
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
17527
|
-
color: ${semanticColors?.base?.textPrimary};
|
|
17528
|
-
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderSecondary};
|
|
17529
|
-
|
|
17530
|
-
&:hover {
|
|
17531
|
-
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderSecondary};
|
|
17532
|
-
}
|
|
18290
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18291
|
+
}, [
|
|
18292
|
+
handleOnChange,
|
|
18293
|
+
flattenedItems,
|
|
18294
|
+
sectionIsInView,
|
|
18295
|
+
tabToFlattenedIndexMap,
|
|
18296
|
+
]);
|
|
18297
|
+
// Set navItemClicked to false to re-enable the option
|
|
18298
|
+
// to update the tab value based on scroll.
|
|
18299
|
+
useScrollStopListener(() => {
|
|
18300
|
+
setNavItemClicked(false);
|
|
18301
|
+
});
|
|
18302
|
+
return (jsx(StyledTabs$1, __assign({ ref: ref, orientation: "vertical", variant: "fullWidth", value: firstTabIndexInview, onChange: handleChange, "aria-label": "navigation-jump-to", width: width }, rest, { children: items.map((item, itemIndex) => createTabsForItem(item, itemIndex)) })));
|
|
18303
|
+
});
|
|
17533
18304
|
|
|
17534
|
-
|
|
17535
|
-
|
|
17536
|
-
|
|
17537
|
-
|
|
17538
|
-
shouldForwardProp: (prop) => !doNotForwardProps$3.includes(prop)
|
|
18305
|
+
const fontBodyXs = fontBody("xs");
|
|
18306
|
+
const doNotForwardProps$2 = ["slideDirection"];
|
|
18307
|
+
const StyledNotification = styled(Alert$2, {
|
|
18308
|
+
shouldForwardProp: (prop) => !doNotForwardProps$2.includes(prop)
|
|
17539
18309
|
}) `
|
|
17540
|
-
${
|
|
18310
|
+
${fontBodyXs}
|
|
17541
18311
|
|
|
17542
18312
|
${(props) => {
|
|
17543
|
-
const {
|
|
18313
|
+
const { intent = "info" } = props;
|
|
17544
18314
|
const spaces = getSpaces(props);
|
|
18315
|
+
const shadows = getShadows(props);
|
|
17545
18316
|
const corners = getCorners(props);
|
|
17546
18317
|
const semanticColors = getSemanticColors(props);
|
|
17547
|
-
|
|
17548
|
-
|
|
17549
|
-
|
|
17550
|
-
|
|
17551
|
-
|
|
17552
|
-
|
|
17553
|
-
|
|
17554
|
-
|
|
17555
|
-
|
|
17556
|
-
|
|
17557
|
-
|
|
17558
|
-
|
|
17559
|
-
|
|
17560
|
-
|
|
17561
|
-
|
|
17562
|
-
color: ${semanticColors?.base?.textPrimary};
|
|
17563
|
-
}
|
|
18318
|
+
const iconColor = semanticColors?.[intent]?.ornament ?? "black";
|
|
18319
|
+
const backgroundColor = semanticColors?.[intent]?.surfaceSecondary ?? "white";
|
|
18320
|
+
return `
|
|
18321
|
+
position: relative;
|
|
18322
|
+
overflow: hidden;
|
|
18323
|
+
background-color: ${backgroundColor};
|
|
18324
|
+
max-width: 480px;
|
|
18325
|
+
min-width: 280px;
|
|
18326
|
+
box-sizing: border-box;
|
|
18327
|
+
margin: ${spaces?.m}px 0;
|
|
18328
|
+
border-radius: ${corners?.xl}px;
|
|
18329
|
+
color: ${semanticColors?.base?.textPrimary};
|
|
18330
|
+
padding: ${spaces?.m}px ${spaces?.m}px ${spaces?.m}px ${spaces?.l}px;
|
|
18331
|
+
align-items: flex-start;
|
|
18332
|
+
box-shadow: ${shadows?.s};
|
|
17564
18333
|
|
|
17565
|
-
&:
|
|
17566
|
-
|
|
18334
|
+
&:before {
|
|
18335
|
+
content: "";
|
|
18336
|
+
position: absolute;
|
|
18337
|
+
top: 0;
|
|
18338
|
+
left: 0;
|
|
18339
|
+
width: ${spaces?.xxs}px;
|
|
18340
|
+
height: 100%;
|
|
18341
|
+
background-color: ${semanticColors?.[intent]?.ornament};
|
|
17567
18342
|
}
|
|
17568
18343
|
|
|
17569
|
-
|
|
17570
|
-
|
|
17571
|
-
|
|
17572
|
-
|
|
17573
|
-
|
|
17574
|
-
|
|
17575
|
-
|
|
17576
|
-
|
|
17577
|
-
`;
|
|
18344
|
+
.MuiAlert-icon {
|
|
18345
|
+
margin-top: ${spaces?.xxxs}px;
|
|
18346
|
+
margin-right: ${spaces?.s}px;
|
|
18347
|
+
padding: 0;
|
|
18348
|
+
path {
|
|
18349
|
+
fill: ${iconColor};
|
|
18350
|
+
}
|
|
18351
|
+
}
|
|
17578
18352
|
|
|
17579
|
-
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
|
|
17583
|
-
`;
|
|
18353
|
+
.MuiAlert-message {
|
|
18354
|
+
padding: 0;
|
|
18355
|
+
margin-right: ${spaces?.m}px;
|
|
18356
|
+
width: 100%;
|
|
17584
18357
|
|
|
17585
|
-
|
|
17586
|
-
|
|
17587
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
17588
|
-
const handleClick = (event) => {
|
|
17589
|
-
setAnchorEl(event.currentTarget);
|
|
17590
|
-
};
|
|
17591
|
-
const handleClose = () => {
|
|
17592
|
-
setAnchorEl(null);
|
|
17593
|
-
};
|
|
17594
|
-
return (jsxs(StyledPage, { sdsStyle: sdsStyle, children: [jsx(StyledPaginationButton, { "aria-label": "Go to a page", onClick: handleClick, size: "small", sdsStyle: "minimal", sdsType: "secondary", backgroundOnHover: false, children: jsx(Icon, { sdsIcon: "DotsHorizontal", sdsSize: "s" }) }), jsx(StyledPaginationDropdownMenu, { anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: pageList.map((page) => {
|
|
17595
|
-
return (jsx(MenuItem, { onClick: () => {
|
|
17596
|
-
onPageChange(page);
|
|
17597
|
-
handleClose();
|
|
17598
|
-
}, sdsType: "action", children: page }, page));
|
|
17599
|
-
}) })] }));
|
|
17600
|
-
};
|
|
18358
|
+
> * {
|
|
18359
|
+
margin: ${spaces?.m}px 0px;
|
|
17601
18360
|
|
|
17602
|
-
|
|
17603
|
-
|
|
17604
|
-
|
|
17605
|
-
};
|
|
17606
|
-
const usePagination = ({ totalCount, pageSize, siblingCount = 1, currentPage, }) => {
|
|
17607
|
-
return useMemo(() => {
|
|
17608
|
-
const totalPageCount = Math.ceil(totalCount / pageSize);
|
|
17609
|
-
// Pages count is determined as siblingCount + firstPage + lastPage + currentPage + 2*DOTS
|
|
17610
|
-
const totalPageNumbers = siblingCount + 5;
|
|
17611
|
-
/*
|
|
17612
|
-
If the number of pages is less than the page numbers we want to show in our
|
|
17613
|
-
paginationComponent, we return the range [1..totalPageCount]
|
|
17614
|
-
*/
|
|
17615
|
-
if (totalPageNumbers >= totalPageCount) {
|
|
17616
|
-
return range(1, totalPageCount);
|
|
17617
|
-
}
|
|
17618
|
-
const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
|
|
17619
|
-
const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPageCount);
|
|
17620
|
-
/*
|
|
17621
|
-
We do not want to show dots if there is only one position left
|
|
17622
|
-
after/before the left/right page count as that would lead to a change of our Pagination
|
|
17623
|
-
component size which we do not want
|
|
17624
|
-
*/
|
|
17625
|
-
const shouldShowLeftDots = leftSiblingIndex > 2;
|
|
17626
|
-
const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
|
|
17627
|
-
const firstPageIndex = 1;
|
|
17628
|
-
const lastPageIndex = totalPageCount;
|
|
17629
|
-
if (!shouldShowLeftDots && shouldShowRightDots) {
|
|
17630
|
-
const leftItemCount = 3 + 2 * siblingCount;
|
|
17631
|
-
const leftRange = range(1, leftItemCount);
|
|
17632
|
-
const rightDotsRange = range(leftItemCount + 1, totalPageCount - 1);
|
|
17633
|
-
return [...leftRange, rightDotsRange, totalPageCount];
|
|
18361
|
+
&:last-child {
|
|
18362
|
+
margin-bottom: 0;
|
|
18363
|
+
}
|
|
17634
18364
|
}
|
|
17635
|
-
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
const leftDotsRange = range(2, totalPageCount - rightItemCount);
|
|
17639
|
-
return [firstPageIndex, leftDotsRange, ...rightRange];
|
|
18365
|
+
|
|
18366
|
+
button {
|
|
18367
|
+
display: block;
|
|
17640
18368
|
}
|
|
17641
|
-
|
|
17642
|
-
|
|
17643
|
-
|
|
17644
|
-
|
|
17645
|
-
|
|
17646
|
-
|
|
17647
|
-
|
|
17648
|
-
|
|
17649
|
-
|
|
17650
|
-
|
|
17651
|
-
|
|
18369
|
+
}
|
|
18370
|
+
|
|
18371
|
+
.MuiAlert-action {
|
|
18372
|
+
margin-right: 0;
|
|
18373
|
+
padding: 0;
|
|
18374
|
+
align-items: flex-start;
|
|
18375
|
+
margin-top: ${spaces?.xxs}px;
|
|
18376
|
+
|
|
18377
|
+
> button {
|
|
18378
|
+
padding: 0;
|
|
18379
|
+
}
|
|
17652
18380
|
}
|
|
17653
|
-
|
|
17654
|
-
|
|
18381
|
+
}
|
|
18382
|
+
`;
|
|
18383
|
+
}}
|
|
18384
|
+
`;
|
|
18385
|
+
const StyledButtonWrapper = styled("div") `
|
|
18386
|
+
${(props) => {
|
|
18387
|
+
const { buttonPosition = "right" } = props;
|
|
18388
|
+
return `
|
|
18389
|
+
display: flex;
|
|
18390
|
+
justify-content: ${buttonPosition === "left" ? "flex-start" : "flex-end"};
|
|
18391
|
+
`;
|
|
18392
|
+
}}
|
|
18393
|
+
`;
|
|
17655
18394
|
|
|
17656
|
-
|
|
17657
|
-
|
|
17658
|
-
|
|
17659
|
-
|
|
18395
|
+
/**
|
|
18396
|
+
* @see https://mui.com/material-ui/react-alert/
|
|
18397
|
+
*/
|
|
18398
|
+
const Notification = ({ autoDismiss, children, dismissed, slideDirection = "left", intent, onClose, buttonOnClick, buttonText, buttonPosition, icon, sdsIconProps, ...rest }) => {
|
|
18399
|
+
const [hide, setHide] = useState(dismissed);
|
|
18400
|
+
// remove prop used only for stories
|
|
18401
|
+
const passedProps = { ...rest };
|
|
18402
|
+
delete passedProps.extraContent;
|
|
18403
|
+
useEffect(() => {
|
|
18404
|
+
setHide(dismissed);
|
|
18405
|
+
if (autoDismiss) {
|
|
18406
|
+
const timeout = typeof autoDismiss === "boolean" ? 8000 : autoDismiss;
|
|
18407
|
+
setTimeout(() => {
|
|
18408
|
+
setHide(true);
|
|
18409
|
+
}, timeout);
|
|
17660
18410
|
}
|
|
17661
|
-
}
|
|
17662
|
-
|
|
17663
|
-
|
|
17664
|
-
|
|
17665
|
-
|
|
18411
|
+
}, [dismissed, autoDismiss]);
|
|
18412
|
+
const handleClose = (event) => {
|
|
18413
|
+
setHide(true);
|
|
18414
|
+
if (onClose)
|
|
18415
|
+
onClose(event);
|
|
18416
|
+
};
|
|
18417
|
+
const getIcon = () => {
|
|
18418
|
+
if (icon !== undefined) {
|
|
18419
|
+
if (typeof icon !== "string") {
|
|
18420
|
+
return icon;
|
|
18421
|
+
}
|
|
18422
|
+
else {
|
|
18423
|
+
return (jsx(Icon, __assign({ sdsSize: "s", sdsIcon: icon }, sdsIconProps)));
|
|
17666
18424
|
}
|
|
17667
|
-
return (jsx(Page, { sdsStyle: sdsStyle, children: jsx(StyledPaginationButton, { "aria-label": "Go to a page", disabled: true, size: "small", sdsStyle: "minimal", sdsType: "primary", children: jsx(Icon, { sdsIcon: "DotsHorizontal", sdsSize: "s" }) }) }, pageNumber.join("-")));
|
|
17668
|
-
}
|
|
17669
|
-
return (jsx(Page, { onClick: () => onPageChange(pageNumber), onKeyDown: (event) => handlePageKeyDown(event, pageNumber), selected: pageNumber === currentPage, sdsStyle: sdsStyle, tabIndex: 0, children: pageNumber }, pageNumber));
|
|
17670
|
-
});
|
|
17671
|
-
};
|
|
17672
|
-
const Pagination = forwardRef((props, ref) => {
|
|
17673
|
-
const { sdsStyle = "round", onPageChange, onNextPage, onPreviousPage, totalCount, siblingCount = 1, currentPage, pageSize, truncateDropdown = true, } = props;
|
|
17674
|
-
if (pageSize < 1) {
|
|
17675
|
-
throw new Error("PageSize can not be smaller than 1!");
|
|
17676
|
-
}
|
|
17677
|
-
const paginationRange = usePagination({
|
|
17678
|
-
currentPage,
|
|
17679
|
-
pageSize,
|
|
17680
|
-
siblingCount,
|
|
17681
|
-
totalCount
|
|
17682
|
-
}) || [];
|
|
17683
|
-
if (currentPage === 0 || paginationRange.length < 2) {
|
|
17684
|
-
return null;
|
|
17685
|
-
}
|
|
17686
|
-
const lastPage = paginationRange[paginationRange.length - 1];
|
|
17687
|
-
return (jsxs(StyledPagination, __assign({ ref: ref }, props, { children: [jsx(StyledPaginationChevronList, { "data-order": "first", disabled: currentPage === 1, onClick: () => currentPage > 1 && onPreviousPage(), onKeyDown: handleGoBackButtonKeyDown, tabIndex: 0, sdsStyle: sdsStyle, children: jsx(Icon, { "aria-label": "Previous page", sdsIcon: "ChevronLeft", sdsSize: "xs" }) }, "prevPage"), PaginationPageList(paginationRange, truncateDropdown, sdsStyle, onPageChange, currentPage), jsx(StyledPaginationChevronList, { "data-order": "last", disabled: currentPage === lastPage, onClick: () => currentPage !== lastPage && onNextPage(), onKeyDown: handleGoNextButtonKeyDown, tabIndex: 0, sdsStyle: sdsStyle, children: jsx(Icon, { "aria-label": "Next page", sdsIcon: "ChevronRight", sdsSize: "xs" }) }, "onNextPage")] })));
|
|
17688
|
-
function handleGoBackButtonKeyDown(event) {
|
|
17689
|
-
if ((event.key === "Enter" || event.code === "Space") &&
|
|
17690
|
-
currentPage > 1) {
|
|
17691
|
-
onPreviousPage();
|
|
17692
18425
|
}
|
|
17693
|
-
|
|
17694
|
-
|
|
17695
|
-
|
|
17696
|
-
|
|
17697
|
-
|
|
18426
|
+
else {
|
|
18427
|
+
switch (intent) {
|
|
18428
|
+
case "positive":
|
|
18429
|
+
return jsx(Icon, { sdsSize: "s", sdsIcon: "CheckCircle" });
|
|
18430
|
+
case "info":
|
|
18431
|
+
return jsx(Icon, { sdsSize: "s", sdsIcon: "InfoCircle" });
|
|
18432
|
+
default:
|
|
18433
|
+
return jsx(Icon, { sdsSize: "s", sdsIcon: "ExclamationMarkCircle" });
|
|
18434
|
+
}
|
|
17698
18435
|
}
|
|
17699
|
-
}
|
|
17700
|
-
});
|
|
18436
|
+
};
|
|
18437
|
+
return (jsx(Fragment, { children: jsx(Slide, { in: !hide, direction: slideDirection, mountOnEnter: true, unmountOnExit: true, timeout: 250, children: jsx(Box, { children: jsxs(StyledNotification, __assign({ onClose: onClose ? handleClose : undefined, action: onClose ? (jsx(Button, { onClick: handleClose, sdsStyle: "minimal", sdsType: "secondary", "data-testid": "notificationCloseButton", children: jsx(Icon, { sdsIcon: "XMark", sdsSize: "s" }) })) : null, icon: getIcon(), className: "elevated", intent: intent, slideDirection: slideDirection }, passedProps, { children: [children, buttonOnClick !== undefined && (jsx(StyledButtonWrapper, { buttonPosition: buttonPosition, children: jsx(Button, { sdsStyle: "minimal", sdsType: "secondary", size: "medium", onClick: buttonOnClick, children: buttonText }) }))] })) }) }) }));
|
|
18438
|
+
};
|
|
17701
18439
|
|
|
17702
18440
|
const PANEL_BASIC_MIN_WIDTH_PX = 240;
|
|
17703
18441
|
const PANEL_OVERLAY_MIN_WIDTH_PX = 320;
|
|
17704
18442
|
|
|
17705
|
-
const doNotForwardProps$
|
|
18443
|
+
const doNotForwardProps$1 = [
|
|
17706
18444
|
"sdsType",
|
|
17707
18445
|
"position",
|
|
17708
18446
|
"width",
|
|
@@ -17755,7 +18493,7 @@ const overlayPanelStyles = (props) => {
|
|
|
17755
18493
|
`;
|
|
17756
18494
|
};
|
|
17757
18495
|
const StyledDrawer = styled(Drawer, {
|
|
17758
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
18496
|
+
shouldForwardProp: (prop) => !doNotForwardProps$1.includes(prop)
|
|
17759
18497
|
}) `
|
|
17760
18498
|
${(props) => {
|
|
17761
18499
|
const { sdsType = "basic", anchor = "left", width } = props;
|
|
@@ -17882,9 +18620,44 @@ const Panel = React__default.forwardRef((props, ref) => {
|
|
|
17882
18620
|
}, slotProps: SLOT_PROPS, hideBackdrop: !isBackdropClickEnabled, children: [isOverlayPanelProps(props) && (jsxs(StyledHeaderComponent, { children: [props?.HeaderComponent && (jsx(PanelHeader, { children: props?.HeaderComponent })), jsx(PanelHeaderClose, { onClick: props?.closeButtonOnClick, CloseButtonComponent: props?.CloseButtonComponent })] })), children] })));
|
|
17883
18621
|
});
|
|
17884
18622
|
|
|
17885
|
-
const
|
|
18623
|
+
const StyledPopover = styled(Popover$1) `
|
|
18624
|
+
& .${popoverClasses.paper} {
|
|
18625
|
+
${(props) => {
|
|
18626
|
+
const corners = getCorners(props);
|
|
18627
|
+
const shadows = getShadows(props);
|
|
18628
|
+
const semanticColors = getSemanticColors(props);
|
|
18629
|
+
const borders = getBorders(props);
|
|
18630
|
+
const spaces = getSpaces(props);
|
|
18631
|
+
return `
|
|
18632
|
+
background-color: ${semanticColors?.base?.surfacePrimary};
|
|
18633
|
+
background-image: none;
|
|
18634
|
+
border-radius: ${corners?.l}px;
|
|
18635
|
+
padding: ${spaces?.xs}px ${spaces?.m}px;
|
|
18636
|
+
border: ${borders?.none};
|
|
18637
|
+
outline: 1px solid ${addOpacityToHex(semanticColors?.base?.borderSecondary || "#000000", 15)};
|
|
18638
|
+
box-shadow: ${shadows?.m};
|
|
18639
|
+
box-sizing: border-box;
|
|
18640
|
+
z-index: ${props?.theme?.zIndex?.tooltip ?? 1400};
|
|
18641
|
+
`;
|
|
18642
|
+
}}
|
|
18643
|
+
}
|
|
18644
|
+
`;
|
|
18645
|
+
|
|
18646
|
+
/**
|
|
18647
|
+
* @see https://mui.com/material-ui/react-popover/
|
|
18648
|
+
*/
|
|
18649
|
+
const Popover = forwardRef(function Popover(props, ref) {
|
|
18650
|
+
const theme = useTheme();
|
|
18651
|
+
const spaces = getSpaces({ theme });
|
|
18652
|
+
return (jsx(StyledPopover, __assign({ ref: ref, anchorOrigin: {
|
|
18653
|
+
horizontal: "left",
|
|
18654
|
+
vertical: "bottom"
|
|
18655
|
+
}, transformOrigin: { vertical: -(spaces?.s || 8), horizontal: 0 } }, props)));
|
|
18656
|
+
});
|
|
18657
|
+
|
|
18658
|
+
const doNotForwardProps = ["buttonDefinition"];
|
|
17886
18659
|
const StyledSegmentedControl = styled(ToggleButtonGroup, {
|
|
17887
|
-
shouldForwardProp: (prop) => !doNotForwardProps
|
|
18660
|
+
shouldForwardProp: (prop) => !doNotForwardProps.includes(prop)
|
|
17888
18661
|
}) `
|
|
17889
18662
|
${(props) => {
|
|
17890
18663
|
const spaces = getSpaces(props);
|
|
@@ -17923,7 +18696,6 @@ const StyledSegmentedControl = styled(ToggleButtonGroup, {
|
|
|
17923
18696
|
${focusVisibleA11yStyle(props)}
|
|
17924
18697
|
background-color: transparent;
|
|
17925
18698
|
border: none;
|
|
17926
|
-
line-height: 0px;
|
|
17927
18699
|
color: ${semanticColors?.base?.ornamentSecondary};
|
|
17928
18700
|
padding: ${spaces?.xxs}px ${spaces?.m}px;
|
|
17929
18701
|
border-radius: ${corners?.m}px;
|
|
@@ -17939,7 +18711,7 @@ const StyledSegmentedControl = styled(ToggleButtonGroup, {
|
|
|
17939
18711
|
}}
|
|
17940
18712
|
`;
|
|
17941
18713
|
const StyledToggleButton = styled(ToggleButton, {
|
|
17942
|
-
shouldForwardProp: (prop) => !doNotForwardProps
|
|
18714
|
+
shouldForwardProp: (prop) => !doNotForwardProps.includes(prop)
|
|
17943
18715
|
}) `
|
|
17944
18716
|
${(props) => {
|
|
17945
18717
|
const { disabled } = props;
|
|
@@ -17952,6 +18724,14 @@ const StyledToggleButton = styled(ToggleButton, {
|
|
|
17952
18724
|
`;
|
|
17953
18725
|
}}
|
|
17954
18726
|
`;
|
|
18727
|
+
const StyledToggleButtonIcon = styled("div") `
|
|
18728
|
+
line-height: 0px;
|
|
18729
|
+
`;
|
|
18730
|
+
const StyledToggleButtonLabel = styled("div") `
|
|
18731
|
+
${fontBodyMediumS}
|
|
18732
|
+
white-space: nowrap;
|
|
18733
|
+
line-height: 16px !important;
|
|
18734
|
+
`;
|
|
17955
18735
|
|
|
17956
18736
|
/**
|
|
17957
18737
|
* @see https://mui.com/material-ui/react-toggle-button/
|
|
@@ -17971,133 +18751,28 @@ const SegmentedControl = (props) => {
|
|
|
17971
18751
|
onChangeProp(event, newActive);
|
|
17972
18752
|
}
|
|
17973
18753
|
};
|
|
17974
|
-
return (
|
|
17975
|
-
|
|
17976
|
-
|
|
17977
|
-
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
}
|
|
17982
|
-
|
|
17983
|
-
|
|
17984
|
-
|
|
17985
|
-
|
|
17986
|
-
|
|
17987
|
-
|
|
17988
|
-
|
|
17989
|
-
|
|
17990
|
-
const
|
|
17991
|
-
|
|
17992
|
-
|
|
17993
|
-
});
|
|
17994
|
-
|
|
17995
|
-
const doNotForwardProps = [
|
|
17996
|
-
"rowHeight",
|
|
17997
|
-
"useDivider",
|
|
17998
|
-
"shouldShowTooltipOnHover",
|
|
17999
|
-
"tooltipProps",
|
|
18000
|
-
"tooltipSubtitle",
|
|
18001
|
-
"tooltipText",
|
|
18002
|
-
"hover",
|
|
18003
|
-
];
|
|
18004
|
-
const disabledStyled = (props) => {
|
|
18005
|
-
const semanticColors = getSemanticColors(props);
|
|
18006
|
-
return `
|
|
18007
|
-
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
18008
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
18009
|
-
user-select: none;
|
|
18010
|
-
|
|
18011
|
-
&:hover {
|
|
18012
|
-
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
18013
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
18014
|
-
}
|
|
18015
|
-
|
|
18016
|
-
& span, & div {
|
|
18017
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
18018
|
-
background-color: transparent !important;
|
|
18019
|
-
}
|
|
18020
|
-
|
|
18021
|
-
.cell-component {
|
|
18022
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
18023
|
-
pointer-events: none;
|
|
18024
|
-
user-select: none;
|
|
18025
|
-
& div {
|
|
18026
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
18027
|
-
background-color: transparent;
|
|
18028
|
-
}
|
|
18029
|
-
|
|
18030
|
-
& .MuiChip-root {
|
|
18031
|
-
background-color: ${semanticColors?.base?.fillDisabled};
|
|
18032
|
-
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderPrimaryDisabled} !important;
|
|
18033
|
-
|
|
18034
|
-
& span {
|
|
18035
|
-
color: ${semanticColors?.base?.textDisabled} !important;
|
|
18036
|
-
}
|
|
18037
|
-
}
|
|
18038
|
-
|
|
18039
|
-
svg {
|
|
18040
|
-
fill: ${semanticColors?.base?.ornamentDisabled};
|
|
18041
|
-
}
|
|
18042
|
-
|
|
18043
|
-
filter: grayscale(100%);
|
|
18044
|
-
}
|
|
18045
|
-
`;
|
|
18046
|
-
};
|
|
18047
|
-
const hoverStyled = (props) => {
|
|
18048
|
-
const semanticColors = getSemanticColors(props);
|
|
18049
|
-
return `
|
|
18050
|
-
&:hover {
|
|
18051
|
-
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
18052
|
-
}
|
|
18053
|
-
`;
|
|
18754
|
+
return (jsx(StyledSegmentedControl, __assign({ "aria-label": "Segmented Control", size: "small", value: value, exclusive: true, onChange: handleActive }, restProps, { children: buttonDefinition.map((button) => {
|
|
18755
|
+
const { icon, label, shouldShowTooltip = true, tooltipProps, tooltipText, value: buttonValue, disabled = false, } = button;
|
|
18756
|
+
if (tooltipText) {
|
|
18757
|
+
showWarningIfFirstOccurence(SDSWarningTypes.SegmentedControlTooltipTextDeprecated);
|
|
18758
|
+
}
|
|
18759
|
+
if (!icon && !label) {
|
|
18760
|
+
showWarningIfFirstOccurence(SDSWarningTypes.SegmentedControlMissingIconOrLabel);
|
|
18761
|
+
}
|
|
18762
|
+
if (icon && label) {
|
|
18763
|
+
showWarningIfFirstOccurence(SDSWarningTypes.SegmentedControlIconAndLabelConflict);
|
|
18764
|
+
}
|
|
18765
|
+
const iconItem = icon ? (typeof icon !== "string" ? (icon) : (jsx(Icon, { sdsIcon: icon, sdsSize: "s" }))) : null;
|
|
18766
|
+
const buttonContent = label ? (jsx(StyledToggleButtonLabel, { children: label })) : iconItem ? (jsx(StyledToggleButtonIcon, { children: iconItem })) : (jsx(StyledToggleButtonLabel, { children: buttonValue }));
|
|
18767
|
+
const toggleButton = (jsx(StyledToggleButton, { "aria-label": tooltipText ?? label ?? buttonValue, value: buttonValue, disabled: disabled, children: jsx("span", { tabIndex: -1, children: buttonContent }) }, buttonValue));
|
|
18768
|
+
// Resolve the tooltip title: tooltipText takes priority,
|
|
18769
|
+
// then tooltipProps.title, then label, then falls back to buttonValue.
|
|
18770
|
+
const resolvedTitle = tooltipText ?? tooltipProps?.title ?? label ?? buttonValue;
|
|
18771
|
+
// (masoudmanson): If the button is disabled or shouldShowTooltip
|
|
18772
|
+
// is false, we don't render the tooltip.
|
|
18773
|
+
return disabled || !shouldShowTooltip ? (toggleButton) : (createElement(Tooltip, __assign({ arrow: true }, tooltipProps, { title: resolvedTitle, key: buttonValue }), toggleButton));
|
|
18774
|
+
}) })));
|
|
18054
18775
|
};
|
|
18055
|
-
const StyledTableRow = styled("tr", {
|
|
18056
|
-
shouldForwardProp: (prop) => !doNotForwardProps.includes(prop)
|
|
18057
|
-
}) `
|
|
18058
|
-
${fontHeaderS}
|
|
18059
|
-
${focusVisibleA11yStyle}
|
|
18060
|
-
|
|
18061
|
-
${(props) => {
|
|
18062
|
-
const { rowHeight, useDivider = true, selected = false, disabled = false, hover = true, } = props;
|
|
18063
|
-
const semanticColors = getSemanticColors(props);
|
|
18064
|
-
const borders = getBorders(props);
|
|
18065
|
-
return `
|
|
18066
|
-
align-items: center;
|
|
18067
|
-
border-bottom: ${useDivider ? borders?.base?.table : borders?.none};
|
|
18068
|
-
|
|
18069
|
-
${rowHeight ? `max-height: ${rowHeight}px;` : ""}
|
|
18070
|
-
|
|
18071
|
-
${selected ? `background-color: ${semanticColors?.accent?.surfacePrimary};` : ""}
|
|
18072
|
-
|
|
18073
|
-
${hover && hoverStyled(props)};
|
|
18074
|
-
|
|
18075
|
-
${disabled && disabledStyled(props)}
|
|
18076
|
-
`;
|
|
18077
|
-
}}
|
|
18078
|
-
`;
|
|
18079
|
-
|
|
18080
|
-
const TableRow = forwardRef((props, ref) => {
|
|
18081
|
-
const { children, shouldShowTooltipOnHover = true, tooltipProps, tooltipText = false, tooltipSubtitle, hover = true, } = props;
|
|
18082
|
-
if (shouldShowTooltipOnHover && hover) {
|
|
18083
|
-
return (jsx(Tooltip, __assign({ arrow: true, sdsStyle: "dark", subtitle: tooltipSubtitle, title: tooltipText }, tooltipProps, { children: jsx(StyledTableRow, __assign({ ref: ref }, props, { children: children })) })));
|
|
18084
|
-
}
|
|
18085
|
-
return (jsx(StyledTableRow, __assign({ ref: ref }, props, { children: children })));
|
|
18086
|
-
});
|
|
18087
|
-
|
|
18088
|
-
const StyledTableHeader = styled("thead") `
|
|
18089
|
-
${(props) => {
|
|
18090
|
-
const semanticColors = getSemanticColors(props);
|
|
18091
|
-
return `
|
|
18092
|
-
border-bottom: solid 2px ${semanticColors?.base?.borderSecondary};
|
|
18093
|
-
`;
|
|
18094
|
-
}}
|
|
18095
|
-
`;
|
|
18096
|
-
|
|
18097
|
-
const TableHeader = forwardRef((props, ref) => {
|
|
18098
|
-
const { children } = props;
|
|
18099
|
-
return (jsx(StyledTableHeader, __assign({ ref: ref }, props, { children: jsx(TableRow, { hover: false, shouldShowTooltipOnHover: false, children: children }) })));
|
|
18100
|
-
});
|
|
18101
18776
|
|
|
18102
18777
|
const TabsContext = createContext({ sdsSize: "large" });
|
|
18103
18778
|
|
|
@@ -21925,4 +22600,4 @@ const generateDiscreteColors = (count, options = {}) => {
|
|
|
21925
22600
|
return isDarkMode ? colors.reverse() : colors;
|
|
21926
22601
|
};
|
|
21927
22602
|
|
|
21928
|
-
export { Accordion, AccordionDetails, AccordionHeader, Alert$1 as Alert, Autocomplete, StyledPopper$2 as AutocompleteMultiColumnStyledPopper, StyledPaper$3 as AutocompleteSingleColumnStyledPaper, Banner, Button, ButtonDropdown, ButtonDropdownLegacy, ButtonGroup, ButtonIcon, ButtonLegacy, ButtonToggle, ButtonToggleLegacy, Callout, CalloutTitle, CellBasic, CellComponent, CellHeader, Chip, ComplexFilter, InputDropdown as ComplexFilterInputDropdown, StyledPopper as ComplexFilterPopper, ContentCard, ContentCardActions, StyledContentCardBody as ContentCardBody, StyledMetadataText as ContentCardMetadata, StyledOverlineText as ContentCardOverline, StyledSubtitleText as ContentCardSubtitle, StyledTitleText as ContentCardTitle, Dialog, DialogActions, index$1 as DialogContent, DialogPaper, DialogTitle, Overline as DialogTitleOverline, Subtitle as DialogTitleSubtitle, Title as DialogTitleTitle, Dropdown, InputDropdown as DropdownInputDropdown, DropdownMenu, StyledPaper$1 as DropdownPaper, StyledPopper as DropdownPopper, Hero, Icon, InputCheckbox, InputDropdown, InputRadio, InputSearch, InputSlider, InputText, InputToggle, IntentMessage, Legend, Link, List, ListItem, ListItemLabel, ListSubheader, LoadingIndicator, MINIMUM_DROPDOWN_MENU_POPPER_WIDTH, Menu, MenuItem, MenuSelect, NavigationFooter, NavigationHeader, NavigationJumpTo, Notification, Pagination, Panel, SDSChooseTheme, SDSDarkAppTheme, SDSDarkThemeColors, SDSLightAppTheme, SDSLightThemeColors, SDSPaletteDark, SDSPaletteLight, 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, fontBodyMediumL, fontBodyMediumM, fontBodyMediumS, fontBodyMediumXs, fontBodyMediumXxs, fontBodyMediumXxxs, fontBodyMediumXxxxs, fontBodyS$1 as fontBodyS, fontBodySemiboldL, fontBodySemiboldM, fontBodySemiboldS, fontBodySemiboldXs, fontBodySemiboldXxs, fontBodySemiboldXxxs, fontBodySemiboldXxxxs, fontBodyXs$2 as fontBodyXs, fontBodyXxs$1 as fontBodyXxs, fontBodyXxxs$1 as fontBodyXxxs, fontBodyXxxxs, fontCaps, fontCapsXxs, fontCapsXxxs, fontCapsXxxxs, fontCode, fontCodeMediumS, fontCodeMediumXs, fontCodeS, fontCodeSemiboldS, fontCodeSemiboldXs, fontCodeXs, fontHeader, fontHeaderL, fontHeaderM$1 as fontHeaderM, fontHeaderS, fontHeaderXl, fontHeaderXs, fontHeaderXxl, fontHeaderXxs, fontHeaderXxxs, fontLink, fontLinkL, fontLinkM, fontLinkMediumL, fontLinkMediumM, fontLinkMediumS, fontLinkMediumXs, fontLinkMediumXxs, fontLinkMediumXxxs, fontLinkMediumXxxxs, fontLinkS, fontLinkSemiboldL, fontLinkSemiboldM, fontLinkSemiboldS, fontLinkSemiboldXs, fontLinkSemiboldXxs, fontLinkSemiboldXxxs, fontLinkSemiboldXxxxs, fontLinkXs, fontLinkXxs, fontLinkXxxs, fontLinkXxxxs, fontTabular, fontTabularMediumS, fontTabularMediumXs, fontTabularMediumXxs, fontTabularMediumXxxs, fontTabularMediumXxxxs, fontTabularS, fontTabularSemiboldS, fontTabularSemiboldXs, fontTabularSemiboldXxs, fontTabularSemiboldXxxs, fontTabularSemiboldXxxxs, fontTabularXs, fontTabularXxs, fontTabularXxxs, fontTabularXxxxs, fontTitle, fontTitleBoldL, fontTitleBoldM, fontTitleBoldS, generateDiscreteColors, getBorders, getBreakpoints, getColors, getCorners, getFontWeights, getIconSizes, getMode, getPalette, getSemanticColors, getShadows, getSpaces, getSpacings, getTypography, isIconOnlyButton, makeSdsSemanticAppTheme, makeThemeOptions };
|
|
22603
|
+
export { Accordion, AccordionDetails, AccordionHeader, Alert$1 as Alert, Autocomplete, StyledPopper$2 as AutocompleteMultiColumnStyledPopper, StyledPaper$3 as AutocompleteSingleColumnStyledPaper, Banner, Button, ButtonDropdown, ButtonDropdownLegacy, ButtonGroup, ButtonIcon, ButtonLegacy, ButtonToggle, ButtonToggleLegacy, Callout, CalloutTitle, CellBasic, CellComponent, CellHeader, Chip, ComplexFilter, InputDropdown as ComplexFilterInputDropdown, StyledPopper as ComplexFilterPopper, ContentCard, ContentCardActions, StyledContentCardBody as ContentCardBody, StyledMetadataText as ContentCardMetadata, StyledOverlineText as ContentCardOverline, StyledSubtitleText as ContentCardSubtitle, StyledTitleText as ContentCardTitle, Dialog, DialogActions, index$1 as DialogContent, DialogPaper, DialogTitle, Overline as DialogTitleOverline, Subtitle as DialogTitleSubtitle, Title as DialogTitleTitle, Dropdown, InputDropdown as DropdownInputDropdown, DropdownMenu, StyledPaper$1 as DropdownPaper, StyledPopper as DropdownPopper, Hero, Icon, InputCheckbox, InputDropdown, InputRadio, InputSearch, InputSlider, InputText, InputToggle, IntentMessage, Legend, Link, List, ListItem, ListItemLabel, ListSubheader, LoadingIndicator, MINIMUM_DROPDOWN_MENU_POPPER_WIDTH, Menu, MenuItem, MenuSelect, NavigationFooter, NavigationHeader, NavigationJumpTo, Notification, Pagination, Panel, Popover, PreComposedTable, RowHoverContext, SDSChooseTheme, SDSDarkAppTheme, SDSDarkThemeColors, SDSLightAppTheme, SDSLightThemeColors, SDSPaletteDark, SDSPaletteLight, 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, fontBodyMediumL, fontBodyMediumM, fontBodyMediumS, fontBodyMediumXs, fontBodyMediumXxs, fontBodyMediumXxxs, fontBodyMediumXxxxs, fontBodyS$1 as fontBodyS, fontBodySemiboldL, fontBodySemiboldM, fontBodySemiboldS, fontBodySemiboldXs, fontBodySemiboldXxs, fontBodySemiboldXxxs, fontBodySemiboldXxxxs, fontBodyXs$2 as fontBodyXs, fontBodyXxs$1 as fontBodyXxs, fontBodyXxxs$1 as fontBodyXxxs, fontBodyXxxxs, fontCaps, fontCapsXxs, fontCapsXxxs, fontCapsXxxxs, fontCode, fontCodeMediumS, fontCodeMediumXs, fontCodeS, fontCodeSemiboldS, fontCodeSemiboldXs, fontCodeXs, fontHeader, fontHeaderL, fontHeaderM$1 as fontHeaderM, fontHeaderS, fontHeaderXl, fontHeaderXs, fontHeaderXxl, fontHeaderXxs, fontHeaderXxxs, fontLink, fontLinkL, fontLinkM, fontLinkMediumL, fontLinkMediumM, fontLinkMediumS, fontLinkMediumXs, fontLinkMediumXxs, fontLinkMediumXxxs, fontLinkMediumXxxxs, fontLinkS, fontLinkSemiboldL, fontLinkSemiboldM, fontLinkSemiboldS, fontLinkSemiboldXs, fontLinkSemiboldXxs, fontLinkSemiboldXxxs, fontLinkSemiboldXxxxs, fontLinkXs, fontLinkXxs, fontLinkXxxs, fontLinkXxxxs, fontTabular, fontTabularMediumS, fontTabularMediumXs, fontTabularMediumXxs, fontTabularMediumXxxs, fontTabularMediumXxxxs, fontTabularS, fontTabularSemiboldS, fontTabularSemiboldXs, fontTabularSemiboldXxs, fontTabularSemiboldXxxs, fontTabularSemiboldXxxxs, fontTabularXs, fontTabularXxs, fontTabularXxxs, fontTabularXxxxs, fontTitle, fontTitleBoldL, fontTitleBoldM, fontTitleBoldS, generateDiscreteColors, getBorders, getBreakpoints, getColors, getCorners, getFontWeights, getIconSizes, getMode, getPalette, getSemanticColors, getShadows, getSpaces, getSpacings, getTypography, isIconOnlyButton, makeSdsSemanticAppTheme, makeThemeOptions };
|