@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.cjs.js
CHANGED
|
@@ -8,6 +8,7 @@ var material = require('@mui/material');
|
|
|
8
8
|
var styled = require('@emotion/styled');
|
|
9
9
|
var iconsMaterial = require('@mui/icons-material');
|
|
10
10
|
var css$1 = require('@emotion/css');
|
|
11
|
+
var reactTable = require('@tanstack/react-table');
|
|
11
12
|
var Button$1 = require('@mui/material/Button');
|
|
12
13
|
var styles = require('@mui/material/styles');
|
|
13
14
|
|
|
@@ -1688,9 +1689,9 @@ const AccordionDetails = (props) => {
|
|
|
1688
1689
|
return (jsxRuntime.jsx(StyledAccordionDetails$1, __assign({ id: id }, rest, { children: children })));
|
|
1689
1690
|
};
|
|
1690
1691
|
|
|
1691
|
-
const doNotForwardProps$
|
|
1692
|
+
const doNotForwardProps$M = ["chevronSize", "hasInvertedStyle"];
|
|
1692
1693
|
const StyledAccordionHeader = styled__default.default(material.AccordionSummary, {
|
|
1693
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
1694
|
+
shouldForwardProp: (prop) => !doNotForwardProps$M.includes(prop)
|
|
1694
1695
|
}) `
|
|
1695
1696
|
${fontBodySemiboldL}
|
|
1696
1697
|
${(props) => {
|
|
@@ -4945,12 +4946,12 @@ const iconMap = {
|
|
|
4945
4946
|
}
|
|
4946
4947
|
};
|
|
4947
4948
|
|
|
4948
|
-
const doNotForwardProps$
|
|
4949
|
+
const doNotForwardProps$L = ["sdsIcon", "sdsSize", "iconColor"];
|
|
4949
4950
|
/**
|
|
4950
4951
|
* @see https://mui.com/material-ui/icons/#svgicon
|
|
4951
4952
|
*/
|
|
4952
4953
|
const StyledSvgIcon = styled__default.default(material.SvgIcon, {
|
|
4953
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
4954
|
+
shouldForwardProp: (prop) => !doNotForwardProps$L.includes(prop)
|
|
4954
4955
|
}) `
|
|
4955
4956
|
${(props) => {
|
|
4956
4957
|
const mode = getMode(props);
|
|
@@ -5223,7 +5224,7 @@ const mergeRefs = (refs) => {
|
|
|
5223
5224
|
};
|
|
5224
5225
|
|
|
5225
5226
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
5226
|
-
const doNotForwardProps$
|
|
5227
|
+
const doNotForwardProps$K = [
|
|
5227
5228
|
"sdsType",
|
|
5228
5229
|
"sdsSize",
|
|
5229
5230
|
"backgroundOnHover",
|
|
@@ -5863,7 +5864,7 @@ const DestructiveButtonStyles = (props) => {
|
|
|
5863
5864
|
`;
|
|
5864
5865
|
};
|
|
5865
5866
|
const StyledButton$4 = styled__default.default(material.Button, {
|
|
5866
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
5867
|
+
shouldForwardProp: (prop) => !doNotForwardProps$K.includes(prop)
|
|
5867
5868
|
}) `
|
|
5868
5869
|
${focusVisibleA11yStyle}
|
|
5869
5870
|
|
|
@@ -5941,7 +5942,7 @@ const Button = React__namespace.default.forwardRef((props, ref) => {
|
|
|
5941
5942
|
return (jsxRuntime.jsx(StyledButton$4, __assign({ variant: MUI_VARIANT_MAP$1[sdsStyle] || variant, sdsType: sdsType, size: size, iconOnlyChild: iconOnlyChild, ref: ref }, rest, { children: children ? (jsxRuntime.jsx(StyledChildren, { size: size, children: children })) : null })));
|
|
5942
5943
|
});
|
|
5943
5944
|
|
|
5944
|
-
const doNotForwardProps$
|
|
5945
|
+
const doNotForwardProps$J = [
|
|
5945
5946
|
"sdsStyle",
|
|
5946
5947
|
"intent",
|
|
5947
5948
|
"handleSubmit",
|
|
@@ -6039,7 +6040,7 @@ const StyledLabel$4 = styled__default.default("label") `
|
|
|
6039
6040
|
`;
|
|
6040
6041
|
const StyledSearchBase = styled__default.default(material.TextField, {
|
|
6041
6042
|
shouldForwardProp: (prop) => {
|
|
6042
|
-
return !doNotForwardProps$
|
|
6043
|
+
return !doNotForwardProps$J.includes(prop.toString());
|
|
6043
6044
|
}
|
|
6044
6045
|
}) `
|
|
6045
6046
|
${(props) => {
|
|
@@ -6051,6 +6052,8 @@ const StyledSearchBase = styled__default.default(material.TextField, {
|
|
|
6051
6052
|
return react.css `
|
|
6052
6053
|
min-width: 120px;
|
|
6053
6054
|
display: block;
|
|
6055
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
6056
|
+
border-radius: ${corners?.l}px;
|
|
6054
6057
|
|
|
6055
6058
|
[type="search"]::-webkit-search-cancel-button {
|
|
6056
6059
|
-webkit-appearance: none;
|
|
@@ -6535,7 +6538,7 @@ const InputSearch = React.forwardRef(function InputSearch(props, ref) {
|
|
|
6535
6538
|
autoComplete: "one-time-code" }, rest))] }));
|
|
6536
6539
|
});
|
|
6537
6540
|
|
|
6538
|
-
const doNotForwardProps$
|
|
6541
|
+
const doNotForwardProps$I = [
|
|
6539
6542
|
"count",
|
|
6540
6543
|
"keepSearchOnSelect",
|
|
6541
6544
|
"search",
|
|
@@ -6545,7 +6548,7 @@ const doNotForwardProps$J = [
|
|
|
6545
6548
|
"hasGroupBy",
|
|
6546
6549
|
];
|
|
6547
6550
|
const StyledAutocompleteBase = styled__default.default(material.Autocomplete, {
|
|
6548
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6551
|
+
shouldForwardProp: (prop) => !doNotForwardProps$I.includes(prop)
|
|
6549
6552
|
}) `
|
|
6550
6553
|
+ .${material.autocompleteClasses.popper}
|
|
6551
6554
|
> .${material.autocompleteClasses.paper}
|
|
@@ -6644,7 +6647,7 @@ const StyledAutocompleteBase = styled__default.default(material.Autocomplete, {
|
|
|
6644
6647
|
}}
|
|
6645
6648
|
`;
|
|
6646
6649
|
const InputBaseWrapper$1 = styled__default.default("div", {
|
|
6647
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6650
|
+
shouldForwardProp: (prop) => !doNotForwardProps$I.includes(prop)
|
|
6648
6651
|
}) `
|
|
6649
6652
|
${(props) => {
|
|
6650
6653
|
const { search } = props;
|
|
@@ -6666,7 +6669,7 @@ const InputBaseWrapper$1 = styled__default.default("div", {
|
|
|
6666
6669
|
}}
|
|
6667
6670
|
`;
|
|
6668
6671
|
const StyledMenuInputSearch$1 = styled__default.default(InputSearch, {
|
|
6669
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6672
|
+
shouldForwardProp: (prop) => !doNotForwardProps$I.includes(prop)
|
|
6670
6673
|
}) `
|
|
6671
6674
|
margin: 0;
|
|
6672
6675
|
.MuiInputBase-root {
|
|
@@ -6936,7 +6939,7 @@ const AutocompleteGroup = (props) => {
|
|
|
6936
6939
|
}
|
|
6937
6940
|
};
|
|
6938
6941
|
|
|
6939
|
-
const doNotForwardProps$
|
|
6942
|
+
const doNotForwardProps$H = [
|
|
6940
6943
|
"anchorEl",
|
|
6941
6944
|
"count",
|
|
6942
6945
|
"keepSearchOnSelect",
|
|
@@ -6948,7 +6951,7 @@ const doNotForwardProps$I = [
|
|
|
6948
6951
|
"ClickAwayListenerProps",
|
|
6949
6952
|
];
|
|
6950
6953
|
const StyledPopper$2 = styled__default.default(material.Popper, {
|
|
6951
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6954
|
+
shouldForwardProp: (prop) => !doNotForwardProps$H.includes(prop) || prop === "anchorEl"
|
|
6952
6955
|
}) `
|
|
6953
6956
|
${(props) => {
|
|
6954
6957
|
const corners = getCorners(props);
|
|
@@ -6978,7 +6981,7 @@ const StyledPopper$2 = styled__default.default(material.Popper, {
|
|
|
6978
6981
|
}}
|
|
6979
6982
|
`;
|
|
6980
6983
|
const StyledPaper$2 = styled__default.default(material.Paper, {
|
|
6981
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
6984
|
+
shouldForwardProp: (prop) => !doNotForwardProps$H.includes(prop)
|
|
6982
6985
|
}) `
|
|
6983
6986
|
${(props) => {
|
|
6984
6987
|
const shadows = getShadows(props);
|
|
@@ -6998,7 +7001,7 @@ const StyledAutocompleteGroupWrapper = styled__default.default("div") `
|
|
|
6998
7001
|
display: flex;
|
|
6999
7002
|
`;
|
|
7000
7003
|
const StyledAutocompleteInput = styled__default.default(InputSearch, {
|
|
7001
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
7004
|
+
shouldForwardProp: (prop) => !doNotForwardProps$H.includes(prop)
|
|
7002
7005
|
}) `
|
|
7003
7006
|
${({ search }) => !search && "height: 0; display: none; margin: 0 !important;"}
|
|
7004
7007
|
|
|
@@ -7320,9 +7323,9 @@ const secondary$2 = (props) => {
|
|
|
7320
7323
|
color: ${semanticColors?.base?.textPrimary};
|
|
7321
7324
|
`;
|
|
7322
7325
|
};
|
|
7323
|
-
const doNotForwardProps$
|
|
7326
|
+
const doNotForwardProps$G = ["sdsType", "textChild", "intent"];
|
|
7324
7327
|
const StyledBanner = styled__default.default("div", {
|
|
7325
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
7328
|
+
shouldForwardProp: (prop) => !doNotForwardProps$G.includes(prop)
|
|
7326
7329
|
}) `
|
|
7327
7330
|
${fontBodyS$1}
|
|
7328
7331
|
|
|
@@ -7394,6 +7397,9 @@ var SDSWarningTypes;
|
|
|
7394
7397
|
SDSWarningTypes["TooltipInvertStyle"] = "tooltipInvertStyle";
|
|
7395
7398
|
SDSWarningTypes["ContentCardActionsOnlyButtons"] = "contentCardActionsOnlyButtons";
|
|
7396
7399
|
SDSWarningTypes["ClickableContentCardNumberOfButtons"] = "clickableContentCardNumberOfButtons";
|
|
7400
|
+
SDSWarningTypes["SegmentedControlTooltipTextDeprecated"] = "segmentedControlTooltipTextDeprecated";
|
|
7401
|
+
SDSWarningTypes["SegmentedControlMissingIconOrLabel"] = "segmentedControlMissingIconOrLabel";
|
|
7402
|
+
SDSWarningTypes["SegmentedControlIconAndLabelConflict"] = "segmentedControlIconAndLabelConflict";
|
|
7397
7403
|
})(SDSWarningTypes || (SDSWarningTypes = {}));
|
|
7398
7404
|
const SDS_WARNINGS = {
|
|
7399
7405
|
[SDSWarningTypes.ButtonMinimalIsAllCaps]: {
|
|
@@ -7451,6 +7457,21 @@ const SDS_WARNINGS = {
|
|
|
7451
7457
|
[SDSWarningTypes.ClickableContentCardNumberOfButtons]: {
|
|
7452
7458
|
hasWarned: false,
|
|
7453
7459
|
message: "Warning: Clickable Content Cards can only have one or no buttons!"
|
|
7460
|
+
},
|
|
7461
|
+
[SDSWarningTypes.SegmentedControlTooltipTextDeprecated]: {
|
|
7462
|
+
hasWarned: false,
|
|
7463
|
+
message: 'Warning: "tooltipText" in SegmentedControl buttonDefinition is deprecated. ' +
|
|
7464
|
+
'Please use "tooltipProps" instead. Example: { tooltipProps: { title: "My tooltip" } }'
|
|
7465
|
+
},
|
|
7466
|
+
[SDSWarningTypes.SegmentedControlMissingIconOrLabel]: {
|
|
7467
|
+
hasWarned: false,
|
|
7468
|
+
message: 'Warning: Each SegmentedControl button must have either an "icon" or a "label" prop. ' +
|
|
7469
|
+
"A button was found with neither."
|
|
7470
|
+
},
|
|
7471
|
+
[SDSWarningTypes.SegmentedControlIconAndLabelConflict]: {
|
|
7472
|
+
hasWarned: false,
|
|
7473
|
+
message: 'Warning: Each SegmentedControl button should have either an "icon" or a "label", ' +
|
|
7474
|
+
"not both. Please use only one per button."
|
|
7454
7475
|
}
|
|
7455
7476
|
};
|
|
7456
7477
|
const showWarningIfFirstOccurence = (warningType) => {
|
|
@@ -7484,7 +7505,7 @@ const ButtonDropdown = React__namespace.default.forwardRef((props, ref) => {
|
|
|
7484
7505
|
});
|
|
7485
7506
|
|
|
7486
7507
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
7487
|
-
const doNotForwardProps$
|
|
7508
|
+
const doNotForwardProps$F = ["sdsType", "sdsStyle", "backgroundAppearance"];
|
|
7488
7509
|
/**
|
|
7489
7510
|
* General styles for the ButtonGroup component
|
|
7490
7511
|
* Uses CSS borders for styling (with box-sizing: border-box to maintain dimensions)
|
|
@@ -7498,6 +7519,10 @@ const GeneralButtonGroupStyles = (props) => {
|
|
|
7498
7519
|
min-width: fit-content;
|
|
7499
7520
|
z-index: 1;
|
|
7500
7521
|
|
|
7522
|
+
&::before {
|
|
7523
|
+
border-radius: inherit;
|
|
7524
|
+
}
|
|
7525
|
+
|
|
7501
7526
|
&:hover,
|
|
7502
7527
|
&:active,
|
|
7503
7528
|
&:focus {
|
|
@@ -7604,10 +7629,11 @@ const LargeButtonGroupStyles = (props) => {
|
|
|
7604
7629
|
}
|
|
7605
7630
|
}
|
|
7606
7631
|
|
|
7607
|
-
/* Icon-only buttons: has svg but no startIcon/endIcon slots */
|
|
7632
|
+
/* Icon-only buttons: has svg but no startIcon/endIcon slots, or startIcon is the only child (e.g. ButtonToggle) */
|
|
7608
7633
|
.${material.buttonGroupClasses.grouped}:has(svg):not(
|
|
7609
7634
|
:has(.${material.buttonClasses.startIcon})
|
|
7610
|
-
):not(:has(.${material.buttonClasses.endIcon}))
|
|
7635
|
+
):not(:has(.${material.buttonClasses.endIcon})),
|
|
7636
|
+
.${material.buttonGroupClasses.grouped}:has(> .${material.buttonClasses.startIcon}:only-child) {
|
|
7611
7637
|
padding: ${iconOnlyPaddingWide};
|
|
7612
7638
|
|
|
7613
7639
|
${theme?.breakpoints?.down("md")} {
|
|
@@ -7615,8 +7641,10 @@ const LargeButtonGroupStyles = (props) => {
|
|
|
7615
7641
|
}
|
|
7616
7642
|
}
|
|
7617
7643
|
|
|
7618
|
-
/* Text + icon buttons: has startIcon or endIcon */
|
|
7619
|
-
.${material.buttonGroupClasses.grouped}:has(.${material.buttonClasses.startIcon})
|
|
7644
|
+
/* Text + icon buttons: has startIcon or endIcon (excluding icon-only ButtonToggle) */
|
|
7645
|
+
.${material.buttonGroupClasses.grouped}:has(.${material.buttonClasses.startIcon}):not(
|
|
7646
|
+
:has(> .${material.buttonClasses.startIcon}:only-child)
|
|
7647
|
+
),
|
|
7620
7648
|
.${material.buttonGroupClasses.grouped}:has(.${material.buttonClasses.endIcon}) {
|
|
7621
7649
|
${theme?.breakpoints?.down("md")} {
|
|
7622
7650
|
padding: 0 14px;
|
|
@@ -7682,10 +7710,11 @@ const MediumButtonGroupStyles = (props) => {
|
|
|
7682
7710
|
}
|
|
7683
7711
|
}
|
|
7684
7712
|
|
|
7685
|
-
/* Icon-only buttons: has svg but no startIcon/endIcon slots */
|
|
7713
|
+
/* Icon-only buttons: has svg but no startIcon/endIcon slots, or startIcon is the only child (e.g. ButtonToggle) */
|
|
7686
7714
|
.${material.buttonGroupClasses.grouped}:has(svg):not(
|
|
7687
7715
|
:has(.${material.buttonClasses.startIcon})
|
|
7688
|
-
):not(:has(.${material.buttonClasses.endIcon}))
|
|
7716
|
+
):not(:has(.${material.buttonClasses.endIcon})),
|
|
7717
|
+
.${material.buttonGroupClasses.grouped}:has(> .${material.buttonClasses.startIcon}:only-child) {
|
|
7689
7718
|
padding: ${iconOnlyPaddingWide};
|
|
7690
7719
|
|
|
7691
7720
|
${theme?.breakpoints?.down("md")} {
|
|
@@ -7693,8 +7722,10 @@ const MediumButtonGroupStyles = (props) => {
|
|
|
7693
7722
|
}
|
|
7694
7723
|
}
|
|
7695
7724
|
|
|
7696
|
-
/* Text + icon buttons: has startIcon or endIcon -
|
|
7697
|
-
.${material.buttonGroupClasses.grouped}:has(.${material.buttonClasses.startIcon})
|
|
7725
|
+
/* Text + icon buttons: has startIcon or endIcon (excluding icon-only ButtonToggle) */
|
|
7726
|
+
.${material.buttonGroupClasses.grouped}:has(.${material.buttonClasses.startIcon}):not(
|
|
7727
|
+
:has(> .${material.buttonClasses.startIcon}:only-child)
|
|
7728
|
+
),
|
|
7698
7729
|
.${material.buttonGroupClasses.grouped}:has(.${material.buttonClasses.endIcon}) {
|
|
7699
7730
|
padding: 0 10px;
|
|
7700
7731
|
}
|
|
@@ -7758,10 +7789,11 @@ const SmallButtonGroupStyles = (props) => {
|
|
|
7758
7789
|
}
|
|
7759
7790
|
}
|
|
7760
7791
|
|
|
7761
|
-
/* Icon-only buttons: has svg but no startIcon/endIcon slots */
|
|
7792
|
+
/* Icon-only buttons: has svg but no startIcon/endIcon slots, or startIcon is the only child (e.g. ButtonToggle) */
|
|
7762
7793
|
.${material.buttonGroupClasses.grouped}:has(svg):not(
|
|
7763
7794
|
:has(.${material.buttonClasses.startIcon})
|
|
7764
|
-
):not(:has(.${material.buttonClasses.endIcon}))
|
|
7795
|
+
):not(:has(.${material.buttonClasses.endIcon})),
|
|
7796
|
+
.${material.buttonGroupClasses.grouped}:has(> .${material.buttonClasses.startIcon}:only-child) {
|
|
7765
7797
|
padding: ${iconOnlyPaddingWide};
|
|
7766
7798
|
|
|
7767
7799
|
${theme?.breakpoints?.down("md")} {
|
|
@@ -7769,8 +7801,10 @@ const SmallButtonGroupStyles = (props) => {
|
|
|
7769
7801
|
}
|
|
7770
7802
|
}
|
|
7771
7803
|
|
|
7772
|
-
/* Text + icon buttons: has startIcon or endIcon -
|
|
7773
|
-
.${material.buttonGroupClasses.grouped}:has(.${material.buttonClasses.startIcon})
|
|
7804
|
+
/* Text + icon buttons: has startIcon or endIcon (excluding icon-only ButtonToggle) */
|
|
7805
|
+
.${material.buttonGroupClasses.grouped}:has(.${material.buttonClasses.startIcon}):not(
|
|
7806
|
+
:has(> .${material.buttonClasses.startIcon}:only-child)
|
|
7807
|
+
),
|
|
7774
7808
|
.${material.buttonGroupClasses.grouped}:has(.${material.buttonClasses.endIcon}) {
|
|
7775
7809
|
padding: 0 ${spaces?.s}px;
|
|
7776
7810
|
}
|
|
@@ -7819,6 +7853,7 @@ const PrimaryButtonGroupStyles = (props) => {
|
|
|
7819
7853
|
&& .${material.buttonGroupClasses.grouped} {
|
|
7820
7854
|
background-color: transparent;
|
|
7821
7855
|
border: 1px solid ${defaultColor};
|
|
7856
|
+
box-shadow: none;
|
|
7822
7857
|
color: ${defaultColor};
|
|
7823
7858
|
|
|
7824
7859
|
svg {
|
|
@@ -7830,6 +7865,7 @@ const PrimaryButtonGroupStyles = (props) => {
|
|
|
7830
7865
|
color: ${hoverColor};
|
|
7831
7866
|
background-color: ${hoverBgColor};
|
|
7832
7867
|
border: 1px solid ${hoverColor};
|
|
7868
|
+
box-shadow: none;
|
|
7833
7869
|
|
|
7834
7870
|
svg {
|
|
7835
7871
|
color: ${hoverColor};
|
|
@@ -7840,6 +7876,7 @@ const PrimaryButtonGroupStyles = (props) => {
|
|
|
7840
7876
|
color: ${pressedColor};
|
|
7841
7877
|
background-color: ${hoverBgColor};
|
|
7842
7878
|
border: 1px solid ${pressedColor};
|
|
7879
|
+
box-shadow: none;
|
|
7843
7880
|
|
|
7844
7881
|
svg {
|
|
7845
7882
|
color: ${pressedColor};
|
|
@@ -7854,6 +7891,7 @@ const PrimaryButtonGroupStyles = (props) => {
|
|
|
7854
7891
|
color: ${textDisabledColor};
|
|
7855
7892
|
background-color: transparent;
|
|
7856
7893
|
border: 1px solid ${disabledColor};
|
|
7894
|
+
box-shadow: none;
|
|
7857
7895
|
|
|
7858
7896
|
svg {
|
|
7859
7897
|
color: ${ornamentDisabledColor};
|
|
@@ -7907,6 +7945,7 @@ const SecondaryButtonGroupStyles = (props) => {
|
|
|
7907
7945
|
&& .${material.buttonGroupClasses.grouped} {
|
|
7908
7946
|
background-color: transparent;
|
|
7909
7947
|
border: 1px solid ${defaultColor};
|
|
7948
|
+
box-shadow: none;
|
|
7910
7949
|
color: ${textColor};
|
|
7911
7950
|
|
|
7912
7951
|
svg {
|
|
@@ -7918,6 +7957,7 @@ const SecondaryButtonGroupStyles = (props) => {
|
|
|
7918
7957
|
color: ${textColor};
|
|
7919
7958
|
background-color: ${hoverBgColor};
|
|
7920
7959
|
border: 1px solid ${defaultColor};
|
|
7960
|
+
box-shadow: none;
|
|
7921
7961
|
|
|
7922
7962
|
svg {
|
|
7923
7963
|
color: ${ornamentColor};
|
|
@@ -7928,6 +7968,7 @@ const SecondaryButtonGroupStyles = (props) => {
|
|
|
7928
7968
|
color: ${textColor};
|
|
7929
7969
|
background-color: ${pressedBgColor};
|
|
7930
7970
|
border: 1px solid ${defaultColor};
|
|
7971
|
+
box-shadow: none;
|
|
7931
7972
|
|
|
7932
7973
|
svg {
|
|
7933
7974
|
color: ${ornamentColor};
|
|
@@ -7942,6 +7983,7 @@ const SecondaryButtonGroupStyles = (props) => {
|
|
|
7942
7983
|
color: ${textDisabledColor};
|
|
7943
7984
|
background-color: transparent;
|
|
7944
7985
|
border: 1px solid ${disabledColor};
|
|
7986
|
+
box-shadow: none;
|
|
7945
7987
|
|
|
7946
7988
|
svg {
|
|
7947
7989
|
color: ${ornamentDisabledColor};
|
|
@@ -7950,7 +7992,7 @@ const SecondaryButtonGroupStyles = (props) => {
|
|
|
7950
7992
|
`;
|
|
7951
7993
|
};
|
|
7952
7994
|
const StyledButtonGroup = styled__default.default(material.ButtonGroup, {
|
|
7953
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
7995
|
+
shouldForwardProp: (prop) => !doNotForwardProps$F.includes(prop)
|
|
7954
7996
|
}) `
|
|
7955
7997
|
${(props) => {
|
|
7956
7998
|
const { sdsType = "primary", size = "large" } = props;
|
|
@@ -8138,10 +8180,6 @@ const small$1 = (props) => {
|
|
|
8138
8180
|
const iconSizes = getIconSizes(props);
|
|
8139
8181
|
const spaces = getSpaces(props);
|
|
8140
8182
|
return react.css `
|
|
8141
|
-
${sdsType !== "tertiary"
|
|
8142
|
-
? `margin: 0 ${spaces?.xxs}px ${spaces?.xxs}px 0;`
|
|
8143
|
-
: ""}
|
|
8144
|
-
|
|
8145
8183
|
.MuiSvgIcon-root {
|
|
8146
8184
|
height: ${iconSizes?.s.height}px;
|
|
8147
8185
|
width: ${iconSizes?.s.width}px;
|
|
@@ -8181,7 +8219,7 @@ const large = (props) => {
|
|
|
8181
8219
|
}
|
|
8182
8220
|
`;
|
|
8183
8221
|
};
|
|
8184
|
-
const doNotForwardProps$
|
|
8222
|
+
const doNotForwardProps$E = [
|
|
8185
8223
|
"on",
|
|
8186
8224
|
"sdsSize",
|
|
8187
8225
|
"sdsType",
|
|
@@ -8191,7 +8229,7 @@ const doNotForwardProps$F = [
|
|
|
8191
8229
|
"customTheme",
|
|
8192
8230
|
];
|
|
8193
8231
|
const StyledButtonIcon = styled__default.default(material.IconButton, {
|
|
8194
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8232
|
+
shouldForwardProp: (prop) => !doNotForwardProps$E.includes(prop)
|
|
8195
8233
|
}) `
|
|
8196
8234
|
padding: 0;
|
|
8197
8235
|
${focusVisibleA11yStyle}
|
|
@@ -8256,7 +8294,7 @@ const ButtonIcon = React.forwardRef(function ButtonIcon(props, ref) {
|
|
|
8256
8294
|
* All other props should be passed down to Button; otherwise,
|
|
8257
8295
|
* the component won’t function as expected.
|
|
8258
8296
|
*/
|
|
8259
|
-
const doNotForwardProps$
|
|
8297
|
+
const doNotForwardProps$D = ["sdsStage"];
|
|
8260
8298
|
/**
|
|
8261
8299
|
* Utility to select the appropriate color based on background appearance.
|
|
8262
8300
|
* Returns the dark variant when backgroundAppearance is "dark", otherwise returns the light variant.
|
|
@@ -8284,34 +8322,49 @@ const StageOnStyles = (props) => {
|
|
|
8284
8322
|
// So we need to apply the "on" state background to ::before as well
|
|
8285
8323
|
const isSecondary = sdsType === "secondary";
|
|
8286
8324
|
if (isSecondary) {
|
|
8325
|
+
/**
|
|
8326
|
+
* Specificity boost via Emotion's `&&&&` technique.
|
|
8327
|
+
*
|
|
8328
|
+
* Each `&` repeats the component's generated class, producing a selector
|
|
8329
|
+
* like `.css-abc123.css-abc123.css-abc123.css-abc123` — specificity (0,4,0).
|
|
8330
|
+
*
|
|
8331
|
+
* This is needed because ButtonGroup styles its children with
|
|
8332
|
+
* `&& .MuiButtonGroup-grouped` which has specificity (0,3,0).
|
|
8333
|
+
* Without the boost, the sdsStage="on" styles would always lose
|
|
8334
|
+
* the cascade to the ButtonGroup's parent-level overrides.
|
|
8335
|
+
*/
|
|
8287
8336
|
return react.css `
|
|
8288
|
-
|
|
8337
|
+
&&&& {
|
|
8338
|
+
color: ${contentColor};
|
|
8289
8339
|
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8340
|
+
svg {
|
|
8341
|
+
color: ${ornamentColor};
|
|
8342
|
+
}
|
|
8293
8343
|
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8344
|
+
/* Apply "on" state background via ::before to match Button's hover pattern */
|
|
8345
|
+
&::before {
|
|
8346
|
+
background-color: ${sdsStyle === "minimal" && !backgroundOnHover
|
|
8297
8347
|
? "transparent"
|
|
8298
8348
|
: backgroundColor};
|
|
8349
|
+
}
|
|
8299
8350
|
}
|
|
8300
8351
|
`;
|
|
8301
8352
|
}
|
|
8302
8353
|
return react.css `
|
|
8303
|
-
|
|
8354
|
+
&&&& {
|
|
8355
|
+
background-color: ${sdsStyle === "minimal" && !backgroundOnHover
|
|
8304
8356
|
? "transparent"
|
|
8305
8357
|
: backgroundColor};
|
|
8306
|
-
|
|
8358
|
+
color: ${contentColor};
|
|
8307
8359
|
|
|
8308
|
-
|
|
8309
|
-
|
|
8360
|
+
svg {
|
|
8361
|
+
color: ${ornamentColor};
|
|
8362
|
+
}
|
|
8310
8363
|
}
|
|
8311
8364
|
`;
|
|
8312
8365
|
};
|
|
8313
8366
|
const StyledButtonToggle = styled__default.default(Button, {
|
|
8314
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8367
|
+
shouldForwardProp: (prop) => !doNotForwardProps$D.includes(prop)
|
|
8315
8368
|
}) `
|
|
8316
8369
|
${(props) => {
|
|
8317
8370
|
const { sdsStage } = props;
|
|
@@ -8330,7 +8383,7 @@ const ButtonToggle = React__namespace.default.forwardRef((props, ref) => {
|
|
|
8330
8383
|
return (jsxRuntime.jsx(StyledButtonToggle, __assign({}, rest, { startIcon: startIcon, endIcon: null, backgroundOnHover: true, ref: ref })));
|
|
8331
8384
|
});
|
|
8332
8385
|
|
|
8333
|
-
const doNotForwardProps$
|
|
8386
|
+
const doNotForwardProps$C = [
|
|
8334
8387
|
"isAllCaps",
|
|
8335
8388
|
"isRounded",
|
|
8336
8389
|
"sdsStyle",
|
|
@@ -8521,7 +8574,7 @@ const DestructiveButton = (props) => {
|
|
|
8521
8574
|
`;
|
|
8522
8575
|
};
|
|
8523
8576
|
const StyledButton$2 = styled__default.default(material.Button, {
|
|
8524
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8577
|
+
shouldForwardProp: (prop) => !doNotForwardProps$C.includes(prop)
|
|
8525
8578
|
}) `
|
|
8526
8579
|
${focusVisibleA11yStyle}
|
|
8527
8580
|
|
|
@@ -8627,7 +8680,7 @@ const SecondaryMinimalButton = (props) => {
|
|
|
8627
8680
|
`;
|
|
8628
8681
|
};
|
|
8629
8682
|
const StyledMinimalButton = styled__default.default(material.Button, {
|
|
8630
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8683
|
+
shouldForwardProp: (prop) => !doNotForwardProps$C.includes(prop)
|
|
8631
8684
|
}) `
|
|
8632
8685
|
${(props) => {
|
|
8633
8686
|
const { sdsType } = props;
|
|
@@ -8638,7 +8691,7 @@ const StyledMinimalButton = styled__default.default(material.Button, {
|
|
|
8638
8691
|
}}
|
|
8639
8692
|
`;
|
|
8640
8693
|
const StyledButtonLegacy = styled__default.default(material.Button, {
|
|
8641
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8694
|
+
shouldForwardProp: (prop) => !doNotForwardProps$C.includes(prop)
|
|
8642
8695
|
}) `
|
|
8643
8696
|
${focusVisibleA11yStyle}
|
|
8644
8697
|
${(props) => {
|
|
@@ -8745,9 +8798,9 @@ const ButtonDropdownLegacy = React__namespace.default.forwardRef((props, ref) =>
|
|
|
8745
8798
|
* All other props should be passed down to ButtonIcon; otherwise,
|
|
8746
8799
|
* the component won’t function as expected.
|
|
8747
8800
|
*/
|
|
8748
|
-
const doNotForwardProps$
|
|
8801
|
+
const doNotForwardProps$B = ["sdsStage"];
|
|
8749
8802
|
const StyledButtonToggleLegacy = styled__default.default(ButtonIcon, {
|
|
8750
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8803
|
+
shouldForwardProp: (prop) => !doNotForwardProps$B.includes(prop)
|
|
8751
8804
|
}) `
|
|
8752
8805
|
${(props) => {
|
|
8753
8806
|
const { sdsStage } = props;
|
|
@@ -8773,7 +8826,7 @@ const ButtonToggleLegacy = React__namespace.default.forwardRef((props, ref) => {
|
|
|
8773
8826
|
}
|
|
8774
8827
|
});
|
|
8775
8828
|
|
|
8776
|
-
const doNotForwardProps$
|
|
8829
|
+
const doNotForwardProps$A = [
|
|
8777
8830
|
"calloutTitle",
|
|
8778
8831
|
"collapsed",
|
|
8779
8832
|
"severity",
|
|
@@ -8781,7 +8834,7 @@ const doNotForwardProps$B = [
|
|
|
8781
8834
|
"hideBody",
|
|
8782
8835
|
];
|
|
8783
8836
|
const StyledCallout = styled__default.default(material.Alert, {
|
|
8784
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
8837
|
+
shouldForwardProp: (prop) => !doNotForwardProps$A.includes(prop)
|
|
8785
8838
|
}) `
|
|
8786
8839
|
${fontBodyXs$2}
|
|
8787
8840
|
|
|
@@ -8962,9 +9015,9 @@ const tableStyles = (props) => {
|
|
|
8962
9015
|
padding: ${spaces?.m}px;
|
|
8963
9016
|
`;
|
|
8964
9017
|
};
|
|
8965
|
-
const doNotForwardProps$
|
|
9018
|
+
const doNotForwardProps$z = ["hasInvertedStyle", "textAlign"];
|
|
8966
9019
|
const StyledTitle = styled__default.default("p", {
|
|
8967
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
9020
|
+
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
8968
9021
|
}) `
|
|
8969
9022
|
${fontBodyMediumXs}
|
|
8970
9023
|
|
|
@@ -8978,7 +9031,7 @@ const StyledTitle = styled__default.default("p", {
|
|
|
8978
9031
|
}}
|
|
8979
9032
|
`;
|
|
8980
9033
|
const StyledSubtitle = styled__default.default("p", {
|
|
8981
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
9034
|
+
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
8982
9035
|
}) `
|
|
8983
9036
|
${fontBodyXxs$1}
|
|
8984
9037
|
|
|
@@ -9169,209 +9222,176 @@ function mergeClass$1({ props, className, key, }) {
|
|
|
9169
9222
|
return propClassName ? `${propClassName} ${className}` : className;
|
|
9170
9223
|
}
|
|
9171
9224
|
|
|
9172
|
-
const
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9225
|
+
const StyledTable = styled__default.default("table") `
|
|
9226
|
+
width: 100%;
|
|
9227
|
+
border-collapse: collapse;
|
|
9228
|
+
border-spacing: 0;
|
|
9229
|
+
table-layout: auto;
|
|
9230
|
+
`;
|
|
9231
|
+
|
|
9232
|
+
const Table = React.forwardRef((props, ref) => {
|
|
9233
|
+
const { children } = props;
|
|
9234
|
+
return (jsxRuntime.jsx(StyledTable, __assign({ ref: ref }, props, { children: children })));
|
|
9235
|
+
});
|
|
9236
|
+
|
|
9237
|
+
const doNotForwardProps$y = [
|
|
9238
|
+
"rowHeight",
|
|
9239
|
+
"useDivider",
|
|
9181
9240
|
"shouldShowTooltipOnHover",
|
|
9182
9241
|
"tooltipProps",
|
|
9183
|
-
"
|
|
9184
|
-
"
|
|
9185
|
-
"
|
|
9186
|
-
"primaryTextComponentSlotBottom",
|
|
9187
|
-
"primaryTextComponentSlotRight",
|
|
9188
|
-
"tabularNums",
|
|
9242
|
+
"tooltipSubtitle",
|
|
9243
|
+
"tooltipText",
|
|
9244
|
+
"hover",
|
|
9189
9245
|
];
|
|
9190
|
-
const
|
|
9191
|
-
const
|
|
9192
|
-
bottom: "bottom",
|
|
9193
|
-
center: "middle",
|
|
9194
|
-
top: "top"
|
|
9195
|
-
};
|
|
9196
|
-
const verticalAlignToFlexMap = {
|
|
9197
|
-
bottom: "flex-end",
|
|
9198
|
-
center: "center",
|
|
9199
|
-
top: "flex-start"
|
|
9200
|
-
};
|
|
9201
|
-
const StyledTableData = styled__default.default("td", {
|
|
9202
|
-
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
9203
|
-
}) `
|
|
9204
|
-
${fontBodyS$1}
|
|
9205
|
-
${focusVisibleA11yStyle}
|
|
9206
|
-
|
|
9207
|
-
${(props) => {
|
|
9208
|
-
const { horizontalAlign = "left", verticalAlign = "top" } = props;
|
|
9209
|
-
const spaces = getSpaces(props);
|
|
9210
|
-
return `
|
|
9211
|
-
padding: ${spaces?.l}px ${spaces?.m}px;
|
|
9212
|
-
text-align: ${horizontalAlign};
|
|
9213
|
-
vertical-align: ${verticalAlignCSSMap[verticalAlign]};
|
|
9214
|
-
overflow: hidden;
|
|
9215
|
-
`;
|
|
9216
|
-
}}
|
|
9217
|
-
`;
|
|
9218
|
-
const ShouldWrap = (lineCount) => {
|
|
9246
|
+
const disabledStyled$1 = (props) => {
|
|
9247
|
+
const semanticColors = getSemanticColors(props);
|
|
9219
9248
|
return `
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9249
|
+
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
9250
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9251
|
+
user-select: none;
|
|
9252
|
+
|
|
9253
|
+
&:hover {
|
|
9254
|
+
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
9255
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9256
|
+
}
|
|
9257
|
+
|
|
9258
|
+
& span, & div {
|
|
9259
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9260
|
+
background-color: transparent !important;
|
|
9261
|
+
}
|
|
9262
|
+
|
|
9263
|
+
.cell-component {
|
|
9264
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9265
|
+
pointer-events: none;
|
|
9266
|
+
user-select: none;
|
|
9267
|
+
& div {
|
|
9268
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9269
|
+
background-color: transparent;
|
|
9270
|
+
}
|
|
9271
|
+
|
|
9272
|
+
& .MuiChip-root {
|
|
9273
|
+
background-color: ${semanticColors?.base?.fillDisabled};
|
|
9274
|
+
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderPrimaryDisabled} !important;
|
|
9275
|
+
|
|
9276
|
+
& span {
|
|
9277
|
+
color: ${semanticColors?.base?.textDisabled} !important;
|
|
9278
|
+
}
|
|
9279
|
+
}
|
|
9280
|
+
|
|
9281
|
+
svg {
|
|
9282
|
+
fill: ${semanticColors?.base?.ornamentDisabled};
|
|
9283
|
+
}
|
|
9284
|
+
|
|
9285
|
+
filter: grayscale(100%);
|
|
9286
|
+
}
|
|
9225
9287
|
`;
|
|
9226
9288
|
};
|
|
9227
|
-
const
|
|
9289
|
+
const hoverStyled = (props) => {
|
|
9290
|
+
const { selected } = props;
|
|
9291
|
+
const semanticColors = getSemanticColors(props);
|
|
9228
9292
|
return `
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9293
|
+
&:hover {
|
|
9294
|
+
td, th {
|
|
9295
|
+
position: relative;
|
|
9296
|
+
background-color: ${selected ? semanticColors?.accent?.surfaceSecondary : semanticColors?.base?.backgroundPrimary};
|
|
9297
|
+
|
|
9298
|
+
&:before {
|
|
9299
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
9300
|
+
}
|
|
9301
|
+
}
|
|
9302
|
+
}
|
|
9233
9303
|
`;
|
|
9234
9304
|
};
|
|
9235
|
-
const
|
|
9236
|
-
|
|
9237
|
-
`;
|
|
9238
|
-
const StyledCellContentWrapper = styled__default.default("div") `
|
|
9239
|
-
width: 100%;
|
|
9240
|
-
`;
|
|
9241
|
-
const StyledCellIconWrapper = styled__default.default("div", {
|
|
9242
|
-
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
9243
|
-
}) `
|
|
9244
|
-
${(props) => {
|
|
9245
|
-
const { iconVerticalAlign = "top" } = props;
|
|
9246
|
-
const spaces = getSpaces(props);
|
|
9247
|
-
return `
|
|
9248
|
-
padding-right: ${spaces?.l}px;
|
|
9249
|
-
display: flex;
|
|
9250
|
-
flex-direction: column;
|
|
9251
|
-
justify-content: ${verticalAlignToFlexMap[iconVerticalAlign]};
|
|
9252
|
-
`;
|
|
9253
|
-
}}
|
|
9254
|
-
`;
|
|
9255
|
-
const PrimaryTextWrapper = styled__default.default("div") `
|
|
9256
|
-
${(props) => {
|
|
9257
|
-
const { horizontalAlign } = props;
|
|
9305
|
+
const selectedStyled = (props) => {
|
|
9306
|
+
const semanticColors = getSemanticColors(props);
|
|
9258
9307
|
return `
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
}
|
|
9263
|
-
`;
|
|
9264
|
-
const PrimaryText = styled__default.default("div", {
|
|
9265
|
-
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
9266
|
-
}) `
|
|
9267
|
-
${fontBodyS$1}
|
|
9308
|
+
td, th {
|
|
9309
|
+
&:before {
|
|
9310
|
+
background-color: ${semanticColors?.accent?.surfaceSecondary};
|
|
9311
|
+
}
|
|
9268
9312
|
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
${props.shouldTextWrap
|
|
9276
|
-
? ShouldWrap(primaryTextWrapLineCount)
|
|
9277
|
-
: ShouldTruncate$1()}
|
|
9278
|
-
`;
|
|
9279
|
-
}}
|
|
9280
|
-
`;
|
|
9281
|
-
const SecondaryText = styled__default.default("span", {
|
|
9282
|
-
shouldForwardProp: (prop) => !doNotForwardProps$z.includes(prop)
|
|
9313
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
9314
|
+
}
|
|
9315
|
+
`;
|
|
9316
|
+
};
|
|
9317
|
+
const StyledTableRow = styled__default.default("tr", {
|
|
9318
|
+
shouldForwardProp: (prop) => !doNotForwardProps$y.includes(prop)
|
|
9283
9319
|
}) `
|
|
9284
|
-
${
|
|
9320
|
+
${fontHeaderS}
|
|
9321
|
+
${focusVisibleA11yStyle}
|
|
9285
9322
|
|
|
9286
9323
|
${(props) => {
|
|
9287
|
-
const {
|
|
9288
|
-
const spaces = getSpaces(props);
|
|
9324
|
+
const { rowHeight, useDivider = true, selected = false, disabled = false, hover = true, } = props;
|
|
9289
9325
|
const semanticColors = getSemanticColors(props);
|
|
9290
9326
|
return `
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9327
|
+
align-items: center;
|
|
9328
|
+
position: relative;
|
|
9329
|
+
margin: 0;
|
|
9330
|
+
padding: 0;
|
|
9331
|
+
display: table-row;
|
|
9295
9332
|
|
|
9296
|
-
${
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9333
|
+
${useDivider &&
|
|
9334
|
+
`
|
|
9335
|
+
&:after {
|
|
9336
|
+
content: "";
|
|
9337
|
+
position: absolute;
|
|
9338
|
+
bottom: 0;
|
|
9339
|
+
left: 0;
|
|
9340
|
+
width: 100%;
|
|
9341
|
+
height: 1px;
|
|
9342
|
+
background-color: ${semanticColors?.base?.borderSecondary};
|
|
9343
|
+
z-index: 1;
|
|
9344
|
+
}
|
|
9345
|
+
`}
|
|
9306
9346
|
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
display: block;
|
|
9313
|
-
color: ${semanticColors?.base?.textSecondary};
|
|
9314
|
-
padding-top: ${spaces?.s}px;
|
|
9315
|
-
font-variant-numeric: ${tabularNums ? TABULAR_NUMS : "normal"};
|
|
9347
|
+
td, th {
|
|
9348
|
+
margin: 0;
|
|
9349
|
+
padding: 0;
|
|
9350
|
+
position: sticky !important;
|
|
9351
|
+
background-color: ${semanticColors?.base?.backgroundPrimary};
|
|
9316
9352
|
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
}}
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
const spaces = getSpaces(props);
|
|
9334
|
-
return `
|
|
9335
|
-
margin-left: ${spaces?.xs}px;
|
|
9353
|
+
&:before {
|
|
9354
|
+
content: "";
|
|
9355
|
+
position: absolute;
|
|
9356
|
+
top: 0;
|
|
9357
|
+
left: 0;
|
|
9358
|
+
width: 100%;
|
|
9359
|
+
height: 100%;
|
|
9360
|
+
z-index: -1;
|
|
9361
|
+
background-color: ${semanticColors?.base?.backgroundPrimary};
|
|
9362
|
+
}
|
|
9363
|
+
}
|
|
9364
|
+
|
|
9365
|
+
${rowHeight ? `max-height: ${rowHeight}px;` : ""}
|
|
9366
|
+
${hover && hoverStyled(props)};
|
|
9367
|
+
${selected && selectedStyled(props)};
|
|
9368
|
+
${disabled && disabledStyled$1(props)}
|
|
9336
9369
|
`;
|
|
9337
9370
|
}}
|
|
9338
9371
|
`;
|
|
9339
9372
|
|
|
9340
|
-
const
|
|
9341
|
-
const {
|
|
9342
|
-
|
|
9343
|
-
};
|
|
9344
|
-
const CellBasic = React.forwardRef((props, ref) => {
|
|
9345
|
-
const { primaryText, secondaryText, shouldShowTooltipOnHover = true, tooltipProps, } = props;
|
|
9346
|
-
if (shouldShowTooltipOnHover) {
|
|
9347
|
-
return (jsxRuntime.jsx(Tooltip, __assign({ title: primaryText, subtitle: secondaryText, arrow: true, leaveDelay: 0, leaveTouchDelay: 0, sdsStyle: "dark" }, tooltipProps, { children: jsxRuntime.jsx(StyledTableData, __assign({ ref: ref }, props, { children: jsxRuntime.jsx(CellBasicContent, __assign({}, props)) })) })));
|
|
9373
|
+
const TableRow = React.forwardRef((props, ref) => {
|
|
9374
|
+
const { children, shouldShowTooltipOnHover = true, tooltipProps, tooltipText = false, tooltipSubtitle, hover = true, } = props;
|
|
9375
|
+
if (shouldShowTooltipOnHover && hover) {
|
|
9376
|
+
return (jsxRuntime.jsx(Tooltip, __assign({ arrow: true, sdsStyle: "dark", subtitle: tooltipSubtitle, title: tooltipText }, tooltipProps, { children: jsxRuntime.jsx(StyledTableRow, __assign({ ref: ref }, props, { children: children })) })));
|
|
9348
9377
|
}
|
|
9349
|
-
return (jsxRuntime.jsx(
|
|
9378
|
+
return (jsxRuntime.jsx(StyledTableRow, __assign({ ref: ref }, props, { children: children })));
|
|
9350
9379
|
});
|
|
9351
9380
|
|
|
9352
|
-
const
|
|
9353
|
-
const StyledCellComponentData = styled__default.default("td", {
|
|
9354
|
-
shouldForwardProp: (prop) => !doNotForwardProps$y.includes(prop)
|
|
9355
|
-
}) `
|
|
9356
|
-
${fontBodyS$1}
|
|
9357
|
-
${focusVisibleA11yStyle}
|
|
9358
|
-
|
|
9381
|
+
const StyledTableHeader$1 = styled__default.default("thead") `
|
|
9359
9382
|
${(props) => {
|
|
9360
|
-
const
|
|
9361
|
-
const { horizontalAlign = "left", verticalAlign = "top" } = props;
|
|
9383
|
+
const semanticColors = getSemanticColors(props);
|
|
9362
9384
|
return `
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
overflow: hidden;
|
|
9367
|
-
padding: ${spaces?.l}px ${spaces?.m}px;
|
|
9385
|
+
border-bottom: solid 2px ${semanticColors?.base?.borderSecondary};
|
|
9386
|
+
margin: 0;
|
|
9387
|
+
padding: 0;
|
|
9368
9388
|
`;
|
|
9369
9389
|
}}
|
|
9370
9390
|
`;
|
|
9371
9391
|
|
|
9372
|
-
const
|
|
9373
|
-
const { children
|
|
9374
|
-
return (jsxRuntime.jsx(
|
|
9392
|
+
const TableHeader = React.forwardRef((props, ref) => {
|
|
9393
|
+
const { children } = props;
|
|
9394
|
+
return (jsxRuntime.jsx(StyledTableHeader$1, __assign({ ref: ref }, props, { children: jsxRuntime.jsx(TableRow, { hover: false, shouldShowTooltipOnHover: false, children: children }) })));
|
|
9375
9395
|
});
|
|
9376
9396
|
|
|
9377
9397
|
const contentPositionMapping = {
|
|
@@ -9405,7 +9425,7 @@ const StyledSortingIcon = styled__default.default(Icon, {
|
|
|
9405
9425
|
`;
|
|
9406
9426
|
}}
|
|
9407
9427
|
`;
|
|
9408
|
-
const ShouldTruncate = () => {
|
|
9428
|
+
const ShouldTruncate$1 = () => {
|
|
9409
9429
|
return `
|
|
9410
9430
|
text-overflow: ellipsis;
|
|
9411
9431
|
white-space: nowrap;
|
|
@@ -9413,9 +9433,7 @@ const ShouldTruncate = () => {
|
|
|
9413
9433
|
word-break: break-all;
|
|
9414
9434
|
`;
|
|
9415
9435
|
};
|
|
9416
|
-
const StyledTableHeader
|
|
9417
|
-
shouldForwardProp: (prop) => !doNotForwardProps$x.includes(prop)
|
|
9418
|
-
}) `
|
|
9436
|
+
const StyledTableHeader = styled__default.default.div `
|
|
9419
9437
|
${fontHeaderS}
|
|
9420
9438
|
${focusVisibleA11yStyle}
|
|
9421
9439
|
|
|
@@ -9431,9 +9449,8 @@ const StyledTableHeader$1 = styled__default.default("th", {
|
|
|
9431
9449
|
: semanticColors?.base?.textPrimary;
|
|
9432
9450
|
return `
|
|
9433
9451
|
color: ${defaultColor};
|
|
9434
|
-
padding: ${spaces?.
|
|
9452
|
+
padding: ${spaces?.m}px !important;
|
|
9435
9453
|
text-align: ${horizontalAlign};
|
|
9436
|
-
min-width: 96px;
|
|
9437
9454
|
cursor: ${hover ? "pointer" : "default"};
|
|
9438
9455
|
vertical-align: bottom;
|
|
9439
9456
|
|
|
@@ -9463,7 +9480,7 @@ const StyledCellHeaderText = styled__default.default("div", {
|
|
|
9463
9480
|
${(props) => {
|
|
9464
9481
|
const { shouldTruncate = false } = props;
|
|
9465
9482
|
return `
|
|
9466
|
-
${shouldTruncate && ShouldTruncate()}
|
|
9483
|
+
${shouldTruncate && ShouldTruncate$1()}
|
|
9467
9484
|
`;
|
|
9468
9485
|
}}
|
|
9469
9486
|
`;
|
|
@@ -9487,86 +9504,1298 @@ const CellHeaderContent = (props) => {
|
|
|
9487
9504
|
const sortIcon = (jsxRuntime.jsx(StyledSortingIcon, { "aria-label": direction === "asc"
|
|
9488
9505
|
? "Change sort direction from ascending to descending"
|
|
9489
9506
|
: "Change sort direction from descending to ascending", sdsIcon: sdsIconName, sdsSize: "xs", active: active, hideSortIcon: hideSortIcon }));
|
|
9490
|
-
return (jsxRuntime.jsxs(StyledCellHeaderContainer, { horizontalAlign: horizontalAlign, children: [jsxRuntime.jsx(StyledCellHeaderText, { shouldTruncate: shouldTruncate, children: children }), (!hideSortIcon || active) && hover && sortIcon] }));
|
|
9507
|
+
return (jsxRuntime.jsxs(StyledCellHeaderContainer, { horizontalAlign: horizontalAlign, children: [typeof children === "string" || typeof children === "number" ? (jsxRuntime.jsx(StyledCellHeaderText, { shouldTruncate: shouldTruncate, children: children })) : (children), (!hideSortIcon || active) && hover && sortIcon] }));
|
|
9491
9508
|
};
|
|
9492
9509
|
const CellHeader = React.forwardRef((props, ref) => {
|
|
9493
|
-
const { children, shouldShowTooltipOnHover = false, tooltipProps, tooltipText = "", tooltipSubtitle, hover = false, ...rest } = props;
|
|
9510
|
+
const { as = "th", children, shouldShowTooltipOnHover = false, tooltipProps, tooltipText = "", tooltipSubtitle, hover = false, ...rest } = props;
|
|
9494
9511
|
if (shouldShowTooltipOnHover && hover) {
|
|
9495
|
-
return (jsxRuntime.jsx(Tooltip, __assign({ arrow: true, placement: "top-start", sdsStyle: "dark", subtitle: tooltipSubtitle, title: tooltipText }, tooltipProps, { children: jsxRuntime.jsx(StyledTableHeader
|
|
9512
|
+
return (jsxRuntime.jsx(Tooltip, __assign({ arrow: true, placement: "top-start", sdsStyle: "dark", subtitle: tooltipSubtitle, title: tooltipText }, tooltipProps, { children: jsxRuntime.jsx(StyledTableHeader, __assign({ as: as, ref: ref, hover: hover }, rest, { children: jsxRuntime.jsx(CellHeaderContent, __assign({}, props, { hover: hover, children: children })) })) })));
|
|
9496
9513
|
}
|
|
9497
|
-
return (jsxRuntime.jsx(StyledTableHeader
|
|
9514
|
+
return (jsxRuntime.jsx(StyledTableHeader, __assign({ as: as, ref: ref, hover: hover }, rest, { children: jsxRuntime.jsx(CellHeaderContent, __assign({ hover: hover }, props, { children: children })) })));
|
|
9498
9515
|
});
|
|
9499
9516
|
|
|
9500
|
-
const
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9517
|
+
const doNotForwardProps$w = [
|
|
9518
|
+
"sdsStyle",
|
|
9519
|
+
"selected",
|
|
9520
|
+
"onPageChange",
|
|
9521
|
+
"onNextPage",
|
|
9522
|
+
"onPreviousPage",
|
|
9523
|
+
"goToPage",
|
|
9524
|
+
"totalCount",
|
|
9525
|
+
"siblingCount",
|
|
9526
|
+
"currentPage",
|
|
9527
|
+
"pageSize",
|
|
9528
|
+
"truncateDropdown",
|
|
9529
|
+
];
|
|
9530
|
+
const StyledPaginationButton = styled__default.default(Button) `
|
|
9531
|
+
${(props) => {
|
|
9532
|
+
const semanticColors = getSemanticColors(props);
|
|
9533
|
+
return `
|
|
9534
|
+
width: 28px;
|
|
9535
|
+
height: 28px;
|
|
9536
|
+
cursor: "pointer";
|
|
9505
9537
|
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
`;
|
|
9511
|
-
};
|
|
9512
|
-
const medium = (props) => {
|
|
9513
|
-
const spaces = getSpaces(props);
|
|
9514
|
-
const colors = getColors(props);
|
|
9515
|
-
return react.css `
|
|
9516
|
-
margin: 0 ${spaces?.s}px;
|
|
9517
|
-
height: 24px;
|
|
9538
|
+
& .MuiSvgIcon-root {
|
|
9539
|
+
width: 12px;
|
|
9540
|
+
color: ${semanticColors?.base?.ornamentSecondary};
|
|
9541
|
+
}
|
|
9518
9542
|
|
|
9519
|
-
|
|
9543
|
+
&:hover {
|
|
9544
|
+
& .MuiSvgIcon-root {
|
|
9545
|
+
color: ${semanticColors?.base?.ornamentSecondaryInteraction}
|
|
9546
|
+
}
|
|
9547
|
+
}
|
|
9548
|
+
`;
|
|
9549
|
+
}}
|
|
9550
|
+
`;
|
|
9551
|
+
const StyledPaginationChevronList = styled__default.default("li", {
|
|
9552
|
+
shouldForwardProp: (prop) => !doNotForwardProps$w.includes(prop)
|
|
9553
|
+
}) `
|
|
9554
|
+
${(props) => {
|
|
9555
|
+
const { disabled, sdsStyle } = props;
|
|
9556
|
+
const spaces = getSpaces(props);
|
|
9557
|
+
const semanticColors = getSemanticColors(props);
|
|
9558
|
+
const corners = getCorners(props);
|
|
9559
|
+
return `
|
|
9560
|
+
width: 28px;
|
|
9561
|
+
height: 28px;
|
|
9562
|
+
cursor: ${disabled ? "auto" : "pointer"};
|
|
9563
|
+
display: flex;
|
|
9564
|
+
justify-content: center;
|
|
9565
|
+
align-items: center;
|
|
9566
|
+
border-radius: ${sdsStyle === "round" ? corners?.rounded : corners?.m}px;
|
|
9520
9567
|
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9568
|
+
&[data-order="first"] {
|
|
9569
|
+
margin-right: ${spaces?.m}px;
|
|
9570
|
+
}
|
|
9524
9571
|
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9572
|
+
&[data-order="last"] {
|
|
9573
|
+
margin-left: ${spaces?.m}px;
|
|
9574
|
+
}
|
|
9528
9575
|
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
padding-left: ${spaces?.s}px;
|
|
9533
|
-
}
|
|
9576
|
+
& .MuiSvgIcon-root {
|
|
9577
|
+
color: ${disabled ? semanticColors?.base?.ornamentDisabled : semanticColors?.base?.ornamentSecondary};
|
|
9578
|
+
}
|
|
9534
9579
|
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
padding-right: ${spaces?.xxs}px;
|
|
9538
|
-
margin: 0 0 0 -${spaces?.s}px;
|
|
9539
|
-
height: ${spaces?.l}px;
|
|
9540
|
-
width: ${spaces?.l}px;
|
|
9580
|
+
&:hover {
|
|
9581
|
+
background-color: ${disabled ? "transparent" : semanticColors?.base?.fillPrimaryInteraction};
|
|
9541
9582
|
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9583
|
+
& .MuiSvgIcon-root {
|
|
9584
|
+
color: ${disabled ? semanticColors?.base?.ornamentDisabled : semanticColors?.base?.ornamentSecondaryInteraction}
|
|
9585
|
+
}
|
|
9545
9586
|
}
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9587
|
+
|
|
9588
|
+
${focusVisibleA11yStyle(props)}
|
|
9589
|
+
`;
|
|
9590
|
+
}}
|
|
9591
|
+
`;
|
|
9592
|
+
const StyledPagination = styled__default.default("ul", {
|
|
9593
|
+
shouldForwardProp: (prop) => !doNotForwardProps$w.includes(prop)
|
|
9594
|
+
}) `
|
|
9595
|
+
${fontBodyS$1}
|
|
9596
|
+
display: flex;
|
|
9597
|
+
flex-wrap: wrap;
|
|
9598
|
+
padding: 0;
|
|
9599
|
+
margin: 0;
|
|
9600
|
+
& li {
|
|
9601
|
+
list-style: none;
|
|
9602
|
+
}
|
|
9603
|
+
`;
|
|
9604
|
+
const selectedPageStyle = (props) => {
|
|
9605
|
+
const semanticColors = getSemanticColors(props);
|
|
9551
9606
|
return react.css `
|
|
9552
|
-
|
|
9607
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
9608
|
+
color: ${semanticColors?.base?.textPrimary};
|
|
9609
|
+
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderSecondary};
|
|
9610
|
+
|
|
9611
|
+
&:hover {
|
|
9612
|
+
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderSecondary};
|
|
9613
|
+
}
|
|
9614
|
+
|
|
9615
|
+
${fontTabularSemiboldS(props)}
|
|
9553
9616
|
`;
|
|
9554
9617
|
};
|
|
9555
|
-
const
|
|
9618
|
+
const Page = styled__default.default("li", {
|
|
9619
|
+
shouldForwardProp: (prop) => !doNotForwardProps$w.includes(prop)
|
|
9620
|
+
}) `
|
|
9621
|
+
${fontTabularMediumS}
|
|
9622
|
+
|
|
9623
|
+
${(props) => {
|
|
9624
|
+
const { selected, sdsStyle } = props;
|
|
9625
|
+
const spaces = getSpaces(props);
|
|
9556
9626
|
const corners = getCorners(props);
|
|
9627
|
+
const semanticColors = getSemanticColors(props);
|
|
9557
9628
|
return react.css `
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9629
|
+
color: ${semanticColors?.base?.textSecondary};
|
|
9630
|
+
cursor: pointer;
|
|
9631
|
+
list-style: none;
|
|
9632
|
+
padding: 0 ${spaces?.s}px;
|
|
9633
|
+
min-width: 28px;
|
|
9634
|
+
height: 28px;
|
|
9635
|
+
margin-right: ${spaces?.s}px;
|
|
9636
|
+
display: flex;
|
|
9637
|
+
justify-content: center;
|
|
9638
|
+
align-items: center;
|
|
9639
|
+
border-radius: ${sdsStyle === "round" ? corners?.rounded : corners?.l}px;
|
|
9640
|
+
user-select: none;
|
|
9641
|
+
&:hover {
|
|
9642
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
9643
|
+
color: ${semanticColors?.base?.textPrimary};
|
|
9644
|
+
}
|
|
9645
|
+
|
|
9646
|
+
&:nth-last-of-type(-n + 2) {
|
|
9647
|
+
margin-right: 0;
|
|
9648
|
+
}
|
|
9649
|
+
|
|
9650
|
+
${selected && selectedPageStyle(props)}
|
|
9651
|
+
${focusVisibleA11yStyle(props)}
|
|
9652
|
+
`;
|
|
9653
|
+
}}
|
|
9654
|
+
`;
|
|
9655
|
+
const StyledPage = styled__default.default(Page) `
|
|
9656
|
+
width: 28px;
|
|
9657
|
+
max-width: 28px;
|
|
9658
|
+
`;
|
|
9659
|
+
|
|
9660
|
+
const StyledMenu = styled__default.default(material.Menu) `
|
|
9661
|
+
& {
|
|
9662
|
+
.${material.menuClasses.paper} {
|
|
9663
|
+
${(props) => {
|
|
9664
|
+
const spaces = getSpaces(props);
|
|
9665
|
+
const corners = getCorners(props);
|
|
9666
|
+
const semanticColors = getSemanticColors(props);
|
|
9667
|
+
return `
|
|
9668
|
+
background-color: ${semanticColors?.base?.surfacePrimary};
|
|
9669
|
+
background-image: none;
|
|
9670
|
+
padding: ${spaces?.xs}px;
|
|
9671
|
+
border-radius: ${corners?.l}px;
|
|
9672
|
+
`;
|
|
9673
|
+
}}
|
|
9674
|
+
}
|
|
9675
|
+
|
|
9676
|
+
.MuiList-padding {
|
|
9677
|
+
padding: 0;
|
|
9678
|
+
}
|
|
9679
|
+
}
|
|
9680
|
+
`;
|
|
9681
|
+
|
|
9682
|
+
const ANCHOR_ORIGIN = {
|
|
9683
|
+
horizontal: "center",
|
|
9684
|
+
vertical: "bottom"
|
|
9685
|
+
};
|
|
9686
|
+
const TRANSFORM_ORIGIN = {
|
|
9687
|
+
horizontal: "center",
|
|
9688
|
+
vertical: "top"
|
|
9689
|
+
};
|
|
9690
|
+
/**
|
|
9691
|
+
* @see https://mui.com/material-ui/react-menu/
|
|
9692
|
+
*/
|
|
9693
|
+
const Menu = (props) => {
|
|
9694
|
+
return (jsxRuntime.jsx(StyledMenu, __assign({ anchorOrigin: ANCHOR_ORIGIN, transformOrigin: TRANSFORM_ORIGIN }, props)));
|
|
9695
|
+
};
|
|
9696
|
+
|
|
9697
|
+
const StyledPaginationDropdownMenu = styled__default.default(Menu) `
|
|
9698
|
+
& .MuiPaper-root {
|
|
9699
|
+
max-height: 120px;
|
|
9700
|
+
}
|
|
9701
|
+
`;
|
|
9702
|
+
|
|
9703
|
+
const PageListDropdown = (props) => {
|
|
9704
|
+
const { pageList, onPageChange, sdsStyle } = props;
|
|
9705
|
+
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
9706
|
+
const handleClick = (event) => {
|
|
9707
|
+
setAnchorEl(event.currentTarget);
|
|
9708
|
+
};
|
|
9709
|
+
const handleClose = () => {
|
|
9710
|
+
setAnchorEl(null);
|
|
9711
|
+
};
|
|
9712
|
+
return (jsxRuntime.jsxs(StyledPage, { sdsStyle: sdsStyle, children: [jsxRuntime.jsx(StyledPaginationButton, { "aria-label": "Go to a page", onClick: handleClick, size: "small", sdsStyle: "minimal", sdsType: "secondary", backgroundOnHover: false, children: jsxRuntime.jsx(Icon, { sdsIcon: "DotsHorizontal", sdsSize: "s" }) }), jsxRuntime.jsx(StyledPaginationDropdownMenu, { anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: pageList.map((page) => {
|
|
9713
|
+
return (jsxRuntime.jsx(MenuItem, { onClick: () => {
|
|
9714
|
+
onPageChange(page);
|
|
9715
|
+
handleClose();
|
|
9716
|
+
}, sdsType: "action", children: page }, page));
|
|
9717
|
+
}) })] }));
|
|
9718
|
+
};
|
|
9719
|
+
|
|
9720
|
+
const range = (start, end) => {
|
|
9721
|
+
const length = end - start + 1;
|
|
9722
|
+
return Array.from({ length }, (_, idx) => idx + start);
|
|
9723
|
+
};
|
|
9724
|
+
const usePagination = ({ totalCount, pageSize, siblingCount = 1, currentPage, }) => {
|
|
9725
|
+
return React.useMemo(() => {
|
|
9726
|
+
const totalPageCount = Math.ceil(totalCount / pageSize);
|
|
9727
|
+
// Pages count is determined as siblingCount + firstPage + lastPage + currentPage + 2*DOTS
|
|
9728
|
+
const totalPageNumbers = siblingCount + 5;
|
|
9729
|
+
/*
|
|
9730
|
+
If the number of pages is less than the page numbers we want to show in our
|
|
9731
|
+
paginationComponent, we return the range [1..totalPageCount]
|
|
9732
|
+
*/
|
|
9733
|
+
if (totalPageNumbers >= totalPageCount) {
|
|
9734
|
+
return range(1, totalPageCount);
|
|
9735
|
+
}
|
|
9736
|
+
const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
|
|
9737
|
+
const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPageCount);
|
|
9738
|
+
/*
|
|
9739
|
+
We do not want to show dots if there is only one position left
|
|
9740
|
+
after/before the left/right page count as that would lead to a change of our Pagination
|
|
9741
|
+
component size which we do not want
|
|
9742
|
+
*/
|
|
9743
|
+
const shouldShowLeftDots = leftSiblingIndex > 2;
|
|
9744
|
+
const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
|
|
9745
|
+
const firstPageIndex = 1;
|
|
9746
|
+
const lastPageIndex = totalPageCount;
|
|
9747
|
+
if (!shouldShowLeftDots && shouldShowRightDots) {
|
|
9748
|
+
const leftItemCount = 3 + 2 * siblingCount;
|
|
9749
|
+
const leftRange = range(1, leftItemCount);
|
|
9750
|
+
const rightDotsRange = range(leftItemCount + 1, totalPageCount - 1);
|
|
9751
|
+
return [...leftRange, rightDotsRange, totalPageCount];
|
|
9752
|
+
}
|
|
9753
|
+
if (shouldShowLeftDots && !shouldShowRightDots) {
|
|
9754
|
+
const rightItemCount = 3 + 2 * siblingCount;
|
|
9755
|
+
const rightRange = range(totalPageCount - rightItemCount + 1, totalPageCount);
|
|
9756
|
+
const leftDotsRange = range(2, totalPageCount - rightItemCount);
|
|
9757
|
+
return [firstPageIndex, leftDotsRange, ...rightRange];
|
|
9758
|
+
}
|
|
9759
|
+
if (shouldShowLeftDots && shouldShowRightDots) {
|
|
9760
|
+
const middleRange = range(leftSiblingIndex, rightSiblingIndex);
|
|
9761
|
+
const leftDotsRange = range(2, leftSiblingIndex - 1);
|
|
9762
|
+
const rightDotsRange = range(rightSiblingIndex + 1, totalPageCount - 1);
|
|
9763
|
+
return [
|
|
9764
|
+
firstPageIndex,
|
|
9765
|
+
leftDotsRange,
|
|
9766
|
+
...middleRange,
|
|
9767
|
+
rightDotsRange,
|
|
9768
|
+
lastPageIndex,
|
|
9769
|
+
];
|
|
9770
|
+
}
|
|
9771
|
+
}, [totalCount, pageSize, siblingCount, currentPage]);
|
|
9772
|
+
};
|
|
9773
|
+
|
|
9774
|
+
const PaginationPageList = (paginationRange, truncateDropdown, sdsStyle, onPageChange, currentPage) => {
|
|
9775
|
+
function handlePageKeyDown(event, pageNumber) {
|
|
9776
|
+
if (event.key === "Enter" || event.code === "Space") {
|
|
9777
|
+
onPageChange(pageNumber);
|
|
9778
|
+
}
|
|
9779
|
+
}
|
|
9780
|
+
return paginationRange.map((pageNumber) => {
|
|
9781
|
+
if (Array.isArray(pageNumber)) {
|
|
9782
|
+
if (truncateDropdown) {
|
|
9783
|
+
return (jsxRuntime.jsx(PageListDropdown, { pageList: pageNumber, onPageChange: onPageChange, sdsStyle: sdsStyle }, pageNumber.join("-")));
|
|
9784
|
+
}
|
|
9785
|
+
return (jsxRuntime.jsx(Page, { sdsStyle: sdsStyle, children: jsxRuntime.jsx(StyledPaginationButton, { "aria-label": "Go to a page", disabled: true, size: "small", sdsStyle: "minimal", sdsType: "primary", children: jsxRuntime.jsx(Icon, { sdsIcon: "DotsHorizontal", sdsSize: "s" }) }) }, pageNumber.join("-")));
|
|
9786
|
+
}
|
|
9787
|
+
return (jsxRuntime.jsx(Page, { onClick: () => onPageChange(pageNumber), onKeyDown: (event) => handlePageKeyDown(event, pageNumber), selected: pageNumber === currentPage, sdsStyle: sdsStyle, tabIndex: 0, children: pageNumber }, pageNumber));
|
|
9788
|
+
});
|
|
9789
|
+
};
|
|
9790
|
+
const Pagination = React.forwardRef((props, ref) => {
|
|
9791
|
+
const { sdsStyle = "round", onPageChange, onNextPage, onPreviousPage, totalCount, siblingCount = 1, currentPage, pageSize, truncateDropdown = true, } = props;
|
|
9792
|
+
if (pageSize < 1) {
|
|
9793
|
+
throw new Error("PageSize can not be smaller than 1!");
|
|
9794
|
+
}
|
|
9795
|
+
const paginationRange = usePagination({
|
|
9796
|
+
currentPage,
|
|
9797
|
+
pageSize,
|
|
9798
|
+
siblingCount,
|
|
9799
|
+
totalCount
|
|
9800
|
+
}) || [];
|
|
9801
|
+
if (currentPage === 0 || paginationRange.length < 2) {
|
|
9802
|
+
return null;
|
|
9803
|
+
}
|
|
9804
|
+
const lastPage = paginationRange[paginationRange.length - 1];
|
|
9805
|
+
return (jsxRuntime.jsxs(StyledPagination, __assign({ ref: ref }, props, { children: [jsxRuntime.jsx(StyledPaginationChevronList, { "data-order": "first", disabled: currentPage === 1, onClick: () => currentPage > 1 && onPreviousPage(), onKeyDown: handleGoBackButtonKeyDown, tabIndex: 0, sdsStyle: sdsStyle, children: jsxRuntime.jsx(Icon, { "aria-label": "Previous page", sdsIcon: "ChevronLeft", sdsSize: "xs" }) }, "prevPage"), PaginationPageList(paginationRange, truncateDropdown, sdsStyle, onPageChange, currentPage), jsxRuntime.jsx(StyledPaginationChevronList, { "data-order": "last", disabled: currentPage === lastPage, onClick: () => currentPage !== lastPage && onNextPage(), onKeyDown: handleGoNextButtonKeyDown, tabIndex: 0, sdsStyle: sdsStyle, children: jsxRuntime.jsx(Icon, { "aria-label": "Next page", sdsIcon: "ChevronRight", sdsSize: "xs" }) }, "onNextPage")] })));
|
|
9806
|
+
function handleGoBackButtonKeyDown(event) {
|
|
9807
|
+
if ((event.key === "Enter" || event.code === "Space") &&
|
|
9808
|
+
currentPage > 1) {
|
|
9809
|
+
onPreviousPage();
|
|
9810
|
+
}
|
|
9811
|
+
}
|
|
9812
|
+
function handleGoNextButtonKeyDown(event) {
|
|
9813
|
+
if ((event.key === "Enter" || event.code === "Space") &&
|
|
9814
|
+
currentPage !== lastPage) {
|
|
9815
|
+
onNextPage();
|
|
9816
|
+
}
|
|
9817
|
+
}
|
|
9818
|
+
});
|
|
9819
|
+
|
|
9820
|
+
const intentToColor$2 = {
|
|
9821
|
+
default: "base",
|
|
9822
|
+
negative: "negative",
|
|
9823
|
+
notice: "notice",
|
|
9824
|
+
positive: "positive"
|
|
9825
|
+
};
|
|
9826
|
+
const StyledIcon = styled__default.default(Icon) `
|
|
9827
|
+
${(props) => {
|
|
9828
|
+
const iconSizes = getIconSizes(props);
|
|
9829
|
+
return `
|
|
9830
|
+
height: ${iconSizes?.xs.height}px;
|
|
9831
|
+
width: ${iconSizes?.xs.width}px;
|
|
9832
|
+
`;
|
|
9833
|
+
}}
|
|
9834
|
+
`;
|
|
9835
|
+
const StyledCheckboxDefaultIcon = styled__default.default("span") `
|
|
9836
|
+
${(props) => {
|
|
9837
|
+
const { intent = "default" } = props;
|
|
9838
|
+
const iconSizes = getIconSizes(props);
|
|
9839
|
+
const borders = getBorders(props);
|
|
9840
|
+
const borderColor = intentToColor$2[intent];
|
|
9841
|
+
return `
|
|
9842
|
+
height: ${iconSizes?.s.height}px;
|
|
9843
|
+
width: ${iconSizes?.s.width}px;
|
|
9844
|
+
border: ${borders?.[borderColor]?.default};
|
|
9845
|
+
border-radius: 2px;
|
|
9846
|
+
`;
|
|
9847
|
+
}}
|
|
9848
|
+
`;
|
|
9849
|
+
const StyledCheckboxCheckedIcon = styled__default.default("div") `
|
|
9850
|
+
${(props) => {
|
|
9851
|
+
const iconSizes = getIconSizes(props);
|
|
9852
|
+
const semanticColors = getSemanticColors(props);
|
|
9853
|
+
return `
|
|
9854
|
+
display: flex;
|
|
9855
|
+
align-items: center;
|
|
9856
|
+
justify-content: center;
|
|
9857
|
+
height: ${iconSizes?.s.height}px;
|
|
9858
|
+
width: ${iconSizes?.s.width}px;
|
|
9859
|
+
border-radius: 2px;
|
|
9860
|
+
background-color: ${semanticColors?.accent?.foreground};
|
|
9861
|
+
|
|
9862
|
+
${StyledIcon} {
|
|
9863
|
+
fill: ${semanticColors?.base?.ornamentPrimaryInverse};
|
|
9864
|
+
}
|
|
9865
|
+
`;
|
|
9866
|
+
}}
|
|
9867
|
+
`;
|
|
9868
|
+
const StyledCheckbox = styled__default.default(material.Checkbox) `
|
|
9869
|
+
${(props) => {
|
|
9870
|
+
const { label } = props;
|
|
9871
|
+
const spaces = getSpaces(props);
|
|
9872
|
+
const corners = getCorners(props);
|
|
9873
|
+
const semanticColors = getSemanticColors(props);
|
|
9874
|
+
return `
|
|
9875
|
+
&.${material.checkboxClasses.root} {
|
|
9876
|
+
${focusVisibleA11yStyle(props)}
|
|
9877
|
+
|
|
9878
|
+
padding: 0;
|
|
9879
|
+
margin-right: ${label ? spaces?.s : 0}px;
|
|
9880
|
+
border-radius: ${corners?.s}px;
|
|
9881
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
9882
|
+
|
|
9883
|
+
&:hover {
|
|
9884
|
+
background-color: transparent;
|
|
9885
|
+
}
|
|
9886
|
+
}
|
|
9887
|
+
`;
|
|
9888
|
+
}}
|
|
9889
|
+
`;
|
|
9890
|
+
const StyledLabelContainer$1 = styled__default.default("span") `
|
|
9891
|
+
display: flex;
|
|
9892
|
+
justify-content: start;
|
|
9893
|
+
flex-direction: column;
|
|
9894
|
+
`;
|
|
9895
|
+
const StyledCheckboxLabel = styled__default.default("span") `
|
|
9896
|
+
${fontBodyXs$2}
|
|
9897
|
+
|
|
9898
|
+
${(props) => {
|
|
9899
|
+
const spaces = getSpaces(props);
|
|
9900
|
+
return `
|
|
9901
|
+
margin-top: -${spaces?.xxxs}px !important;
|
|
9902
|
+
`;
|
|
9903
|
+
}}
|
|
9904
|
+
`;
|
|
9905
|
+
const StyledCheckboxCaption = styled__default.default("span") `
|
|
9906
|
+
${fontBodyXxs$1}
|
|
9907
|
+
|
|
9908
|
+
${(props) => {
|
|
9909
|
+
const semanticColors = getSemanticColors(props);
|
|
9910
|
+
return `
|
|
9911
|
+
color: ${semanticColors?.base?.textSecondary};
|
|
9912
|
+
`;
|
|
9913
|
+
}}
|
|
9914
|
+
`;
|
|
9915
|
+
const disabledStyles$1 = (props) => {
|
|
9916
|
+
const semanticColors = getSemanticColors(props);
|
|
9917
|
+
const borders = getBorders(props);
|
|
9918
|
+
return `
|
|
9919
|
+
user-select: none;
|
|
9920
|
+
|
|
9921
|
+
${StyledCheckboxDefaultIcon} {
|
|
9922
|
+
border: ${borders?.base?.disabled};
|
|
9923
|
+
}
|
|
9924
|
+
|
|
9925
|
+
${StyledCheckboxCheckedIcon} {
|
|
9926
|
+
background-color: ${semanticColors?.base?.ornamentDisabled};
|
|
9927
|
+
}
|
|
9928
|
+
|
|
9929
|
+
${StyledCheckboxCaption} {
|
|
9930
|
+
color: ${semanticColors?.base?.textDisabled};
|
|
9931
|
+
}
|
|
9932
|
+
|
|
9933
|
+
&:hover, &:active {
|
|
9934
|
+
${StyledCheckboxDefaultIcon} {
|
|
9935
|
+
border: ${borders?.base?.disabled};
|
|
9936
|
+
}
|
|
9937
|
+
|
|
9938
|
+
${StyledCheckboxCheckedIcon} {
|
|
9939
|
+
background-color: ${semanticColors?.base?.ornamentDisabled};
|
|
9940
|
+
}
|
|
9941
|
+
}
|
|
9942
|
+
`;
|
|
9943
|
+
};
|
|
9944
|
+
const StyledFormControlLabel$1 = styled__default.default(material.FormControlLabel) `
|
|
9945
|
+
${(props) => {
|
|
9946
|
+
const { disabled } = props;
|
|
9947
|
+
const semanticColors = getSemanticColors(props);
|
|
9948
|
+
const borders = getBorders(props);
|
|
9949
|
+
return `
|
|
9950
|
+
align-items: start;
|
|
9951
|
+
margin-bottom: 0;
|
|
9952
|
+
margin-left: 0;
|
|
9953
|
+
margin-right: 0;
|
|
9954
|
+
width: fit-content;
|
|
9955
|
+
|
|
9956
|
+
&:hover {
|
|
9957
|
+
${StyledCheckboxDefaultIcon} {
|
|
9958
|
+
border: ${borders?.base?.hover};
|
|
9959
|
+
background-color: ${disabled ? "transparent" : semanticColors?.base?.fillPrimaryInteraction};
|
|
9960
|
+
}
|
|
9961
|
+
|
|
9962
|
+
${StyledCheckboxCheckedIcon} {
|
|
9963
|
+
background-color: ${semanticColors?.accent?.fillInteraction};
|
|
9964
|
+
}
|
|
9965
|
+
}
|
|
9966
|
+
|
|
9967
|
+
&:active {
|
|
9968
|
+
${StyledCheckboxDefaultIcon} {
|
|
9969
|
+
border: ${borders?.base?.pressed};
|
|
9970
|
+
}
|
|
9971
|
+
|
|
9972
|
+
${StyledCheckboxCheckedIcon} {
|
|
9973
|
+
background-color: ${semanticColors?.accent?.fillPressed};
|
|
9974
|
+
}
|
|
9975
|
+
}
|
|
9976
|
+
|
|
9977
|
+
${disabled && disabledStyles$1(props)}
|
|
9978
|
+
`;
|
|
9979
|
+
}}
|
|
9980
|
+
`;
|
|
9981
|
+
|
|
9982
|
+
/**
|
|
9983
|
+
* @see https://mui.com/material-ui/react-checkbox/
|
|
9984
|
+
*/
|
|
9985
|
+
const InputCheckbox = (props) => {
|
|
9986
|
+
const { caption, checkboxProps, disabled, intent = "default", label, stage, value, classes = EMPTY_OBJECT, className, ...rest } = props;
|
|
9987
|
+
const { root: rootClassName, labelCaptionContainer: labelCaptionContainerClassName, label: labelClassName, caption: captionClassName, checkbox: checkboxClassName, checkboxCheckedIcon: checkboxCheckedIconClassName, checkboxDefaultIcon: checkboxDefaultIconClassName, checkboxIndeterminateIcon: checkboxIndeterminateIconClassName, } = classes;
|
|
9988
|
+
let newProps;
|
|
9989
|
+
switch (stage) {
|
|
9990
|
+
case "checked":
|
|
9991
|
+
newProps = {
|
|
9992
|
+
...rest,
|
|
9993
|
+
checked: true,
|
|
9994
|
+
color: "primary"
|
|
9995
|
+
};
|
|
9996
|
+
break;
|
|
9997
|
+
case "unchecked":
|
|
9998
|
+
newProps = {
|
|
9999
|
+
...rest,
|
|
10000
|
+
checked: false,
|
|
10001
|
+
color: "default"
|
|
10002
|
+
};
|
|
10003
|
+
break;
|
|
10004
|
+
case "indeterminate":
|
|
10005
|
+
newProps = {
|
|
10006
|
+
...rest,
|
|
10007
|
+
checked: true,
|
|
10008
|
+
color: "primary",
|
|
10009
|
+
indeterminate: true
|
|
10010
|
+
};
|
|
10011
|
+
break;
|
|
10012
|
+
default:
|
|
10013
|
+
newProps = rest;
|
|
10014
|
+
}
|
|
10015
|
+
const finalLabel = caption ? (jsxRuntime.jsxs(StyledLabelContainer$1, { className: cn(labelCaptionContainerClassName), children: [jsxRuntime.jsx(StyledCheckboxLabel, { className: cn(labelClassName), children: label }), jsxRuntime.jsx(StyledCheckboxCaption, { className: cn(captionClassName), children: caption })] })) : (jsxRuntime.jsx(StyledLabelContainer$1, { className: cn(labelCaptionContainerClassName), children: jsxRuntime.jsx(StyledCheckboxLabel, { className: cn(labelClassName), children: label }) }));
|
|
10016
|
+
return (jsxRuntime.jsx(StyledFormControlLabel$1, { control: jsxRuntime.jsx(StyledCheckbox, __assign({ className: cn(checkboxClassName), checkedIcon: jsxRuntime.jsx(StyledCheckboxCheckedIcon, { className: cn(checkboxCheckedIconClassName), children: jsxRuntime.jsx(StyledIcon, { sdsIcon: "Check", sdsSize: "xs" }) }), icon: jsxRuntime.jsx(StyledCheckboxDefaultIcon, { intent: intent, className: cn(checkboxDefaultIconClassName) }), indeterminateIcon: jsxRuntime.jsx(StyledCheckboxCheckedIcon, { className: cn(checkboxIndeterminateIconClassName), children: jsxRuntime.jsx(StyledIcon, { sdsIcon: "Minus", sdsSize: "xs" }) }), intent: intent, label: label }, checkboxProps, newProps)), disabled: disabled, label: label ? finalLabel : null, value: value, className: cn(rootClassName, className) }));
|
|
10017
|
+
};
|
|
10018
|
+
|
|
10019
|
+
const StyledCellComponentData = styled__default.default.div `
|
|
10020
|
+
${fontBodyS$1}
|
|
10021
|
+
${focusVisibleA11yStyle}
|
|
10022
|
+
|
|
10023
|
+
${(props) => {
|
|
10024
|
+
const spaces = getSpaces(props);
|
|
10025
|
+
const { horizontalAlign = "left", verticalAlign = "top" } = props;
|
|
10026
|
+
return `
|
|
10027
|
+
align-items: center;
|
|
10028
|
+
text-align: ${horizontalAlign};
|
|
10029
|
+
vertical-align: ${verticalAlign};
|
|
10030
|
+
overflow: hidden;
|
|
10031
|
+
padding: ${spaces?.m}px !important;
|
|
10032
|
+
`;
|
|
10033
|
+
}}
|
|
10034
|
+
`;
|
|
10035
|
+
|
|
10036
|
+
const CellComponent = React.forwardRef((props, ref) => {
|
|
10037
|
+
const { children, as = "td", ...rest } = props;
|
|
10038
|
+
return (jsxRuntime.jsx(StyledCellComponentData, __assign({ ref: ref, className: "cell-component", as: as }, rest, { children: children })));
|
|
10039
|
+
});
|
|
10040
|
+
|
|
10041
|
+
const StyledTableContainer$1 = styled__default.default.div `
|
|
10042
|
+
width: 100%;
|
|
10043
|
+
overflow: hidden;
|
|
10044
|
+
`;
|
|
10045
|
+
const stripedStyle = (props) => {
|
|
10046
|
+
const semanticColors = getSemanticColors(props);
|
|
10047
|
+
return `
|
|
10048
|
+
tr {
|
|
10049
|
+
border: none !important;
|
|
10050
|
+
box-shadow: none !important;
|
|
10051
|
+
&:after {
|
|
10052
|
+
display: none !important;
|
|
10053
|
+
}
|
|
10054
|
+
}
|
|
10055
|
+
|
|
10056
|
+
tr:nth-of-type(odd) {
|
|
10057
|
+
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
10058
|
+
|
|
10059
|
+
td, th {
|
|
10060
|
+
background-color: ${semanticColors?.base?.backgroundPrimary};
|
|
10061
|
+
|
|
10062
|
+
&::before {
|
|
10063
|
+
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
10064
|
+
}
|
|
10065
|
+
}
|
|
10066
|
+
|
|
10067
|
+
&:hover {
|
|
10068
|
+
td, th {
|
|
10069
|
+
position: relative;
|
|
10070
|
+
background-color: ${semanticColors?.base?.backgroundPrimary};
|
|
10071
|
+
|
|
10072
|
+
&:before {
|
|
10073
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
10074
|
+
}
|
|
10075
|
+
}
|
|
10076
|
+
}
|
|
10077
|
+
}
|
|
10078
|
+
|
|
10079
|
+
tr[aria-selected="true"]:nth-of-type(odd) {
|
|
10080
|
+
background-color: ${semanticColors?.accent?.surfaceSecondary};
|
|
10081
|
+
|
|
10082
|
+
td, th {
|
|
10083
|
+
background-color: ${semanticColors?.accent?.surfaceSecondary};
|
|
10084
|
+
|
|
10085
|
+
&::before {
|
|
10086
|
+
background-color: ${semanticColors?.accent?.surfaceSecondary};
|
|
10087
|
+
}
|
|
10088
|
+
}
|
|
10089
|
+
|
|
10090
|
+
&:hover {
|
|
10091
|
+
td, th {
|
|
10092
|
+
position: relative;
|
|
10093
|
+
background-color: ${semanticColors?.accent?.surfaceSecondary};
|
|
10094
|
+
|
|
10095
|
+
&:before {
|
|
10096
|
+
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
10097
|
+
}
|
|
10098
|
+
}
|
|
10099
|
+
}
|
|
10100
|
+
}
|
|
10101
|
+
`;
|
|
10102
|
+
};
|
|
10103
|
+
const StyledInputCheckbox = styled__default.default(InputCheckbox) `
|
|
10104
|
+
${(props) => {
|
|
10105
|
+
const semanticColors = getSemanticColors(props);
|
|
10106
|
+
const corners = getCorners(props);
|
|
10107
|
+
return `
|
|
10108
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
10109
|
+
border-radius: ${corners?.s}px !important;
|
|
10110
|
+
`;
|
|
10111
|
+
}}
|
|
10112
|
+
`;
|
|
10113
|
+
const StyledTableWrapper = styled__default.default.div `
|
|
10114
|
+
${(props) => {
|
|
10115
|
+
const { border = true, sdsStyle = "lined" } = props;
|
|
10116
|
+
const semanticColors = getSemanticColors(props);
|
|
10117
|
+
const corners = getCorners(props);
|
|
10118
|
+
return react.css `
|
|
10119
|
+
width: 100%;
|
|
10120
|
+
overflow-x: auto;
|
|
10121
|
+
border: 1px solid
|
|
10122
|
+
${border ? semanticColors?.base?.borderSecondary : "transparent"};
|
|
10123
|
+
border-radius: ${border ? corners?.xl : 0}px;
|
|
10124
|
+
|
|
10125
|
+
tbody {
|
|
10126
|
+
width: 100%;
|
|
10127
|
+
min-width: max-content;
|
|
10128
|
+
|
|
10129
|
+
${sdsStyle === "striped" && stripedStyle(props)}
|
|
10130
|
+
|
|
10131
|
+
tr:last-child {
|
|
10132
|
+
border-bottom: none;
|
|
10133
|
+
&:after {
|
|
10134
|
+
display: none !important;
|
|
10135
|
+
}
|
|
10136
|
+
}
|
|
10137
|
+
}
|
|
10138
|
+
`;
|
|
10139
|
+
}}
|
|
10140
|
+
`;
|
|
10141
|
+
styled__default.default("th") `
|
|
10142
|
+
${(props) => {
|
|
10143
|
+
const { selected, hover } = props;
|
|
10144
|
+
const semanticColors = getSemanticColors(props);
|
|
10145
|
+
return `
|
|
10146
|
+
position: relative;
|
|
10147
|
+
|
|
10148
|
+
&:before {
|
|
10149
|
+
content: "";
|
|
10150
|
+
position: absolute;
|
|
10151
|
+
top: 0;
|
|
10152
|
+
left: 0;
|
|
10153
|
+
width: 100%;
|
|
10154
|
+
height: 100%;
|
|
10155
|
+
z-index: -2;
|
|
10156
|
+
background-color: ${selected ? semanticColors?.accent?.surfaceSecondary : semanticColors?.base?.backgroundPrimary};
|
|
10157
|
+
}
|
|
10158
|
+
|
|
10159
|
+
&:after {
|
|
10160
|
+
content: "";
|
|
10161
|
+
position: absolute;
|
|
10162
|
+
top: 0;
|
|
10163
|
+
left: 0;
|
|
10164
|
+
width: 100%;
|
|
10165
|
+
height: 100%;
|
|
10166
|
+
z-index: -1;
|
|
10167
|
+
background-color: ${hover ? semanticColors?.base?.fillPrimaryInteraction : "transparent"};
|
|
10168
|
+
}
|
|
10169
|
+
`;
|
|
10170
|
+
}}
|
|
10171
|
+
`;
|
|
10172
|
+
const StyledInputSearch = styled__default.default(InputSearch) `
|
|
10173
|
+
margin-right: 0;
|
|
10174
|
+
`;
|
|
10175
|
+
const StyledPaginationWrapper = styled__default.default.div `
|
|
10176
|
+
${(props) => {
|
|
10177
|
+
const { placement = "right" } = props;
|
|
10178
|
+
const spaces = getSpaces(props);
|
|
10179
|
+
return `
|
|
10180
|
+
display: flex;
|
|
10181
|
+
justify-content: ${placement};
|
|
10182
|
+
margin-top: ${spaces?.m}px;
|
|
10183
|
+
`;
|
|
10184
|
+
}}
|
|
10185
|
+
`;
|
|
10186
|
+
const StyledSelectionCell = styled__default.default(CellComponent) `
|
|
10187
|
+
line-height: 22px !important;
|
|
10188
|
+
`;
|
|
10189
|
+
|
|
10190
|
+
const SELECT_COLUMN_ID = "SdsTableSelectColumn";
|
|
10191
|
+
function getSize(size = 100, max = Number.MAX_SAFE_INTEGER, min = 40) {
|
|
10192
|
+
return Math.max(Math.min(size, max), min);
|
|
10193
|
+
}
|
|
10194
|
+
/**
|
|
10195
|
+
* Calculates the sizing of table columns and distributes available width proportionally.
|
|
10196
|
+
* This function acts as an extension for TanStack Table, ensuring proper column sizing
|
|
10197
|
+
* based on provided metadata, including `isGrow`, `widthPercentage`, and size constraints.
|
|
10198
|
+
*
|
|
10199
|
+
* https://github.com/TanStack/table/discussions/4179#discussioncomment-11895847
|
|
10200
|
+
*/
|
|
10201
|
+
const calculateTableSizing = (columns, totalWidth) => {
|
|
10202
|
+
let totalAvailableWidth = totalWidth;
|
|
10203
|
+
let totalIsGrow = 0;
|
|
10204
|
+
columns.forEach((header) => {
|
|
10205
|
+
const column = header.column.columnDef;
|
|
10206
|
+
if (!column.size && !column.meta?.isGrow) {
|
|
10207
|
+
let calculatedSize = 100;
|
|
10208
|
+
if (column?.meta?.widthPercentage) {
|
|
10209
|
+
calculatedSize = column.meta.widthPercentage * totalWidth * 0.01;
|
|
10210
|
+
}
|
|
10211
|
+
else {
|
|
10212
|
+
calculatedSize = totalWidth / columns.length;
|
|
10213
|
+
}
|
|
10214
|
+
const size = getSize(calculatedSize, column.maxSize, column.minSize);
|
|
10215
|
+
column.size = size;
|
|
10216
|
+
}
|
|
10217
|
+
if (column.meta?.isGrow)
|
|
10218
|
+
totalIsGrow += 1;
|
|
10219
|
+
else
|
|
10220
|
+
totalAvailableWidth -= getSize(column.size, column.maxSize, column.minSize);
|
|
10221
|
+
});
|
|
10222
|
+
const sizing = {};
|
|
10223
|
+
columns.forEach((header) => {
|
|
10224
|
+
const column = header.column.columnDef;
|
|
10225
|
+
if (column.meta?.isGrow) {
|
|
10226
|
+
let calculatedSize = 100;
|
|
10227
|
+
calculatedSize = Math.floor(totalAvailableWidth / totalIsGrow);
|
|
10228
|
+
const size = getSize(calculatedSize, column.maxSize, column.minSize);
|
|
10229
|
+
column.size = size;
|
|
10230
|
+
}
|
|
10231
|
+
sizing[`${column.id}`] = Number(column.size);
|
|
10232
|
+
});
|
|
10233
|
+
return sizing;
|
|
10234
|
+
};
|
|
10235
|
+
const calculateLeftPosition = (column, table) => {
|
|
10236
|
+
if (column.id === SELECT_COLUMN_ID)
|
|
10237
|
+
return 0;
|
|
10238
|
+
const allColumns = table.getAllColumns();
|
|
10239
|
+
const currentIndex = allColumns.findIndex((col) => col.id === column.id);
|
|
10240
|
+
let leftPosition = 0;
|
|
10241
|
+
// Add widths of other left-pinned columns before this one
|
|
10242
|
+
for (let i = 0; i < currentIndex; i++) {
|
|
10243
|
+
const col = allColumns[i];
|
|
10244
|
+
const colDef = col.columnDef;
|
|
10245
|
+
if (colDef.meta?.pinning === "left") {
|
|
10246
|
+
leftPosition += col.getSize();
|
|
10247
|
+
}
|
|
10248
|
+
}
|
|
10249
|
+
return leftPosition;
|
|
10250
|
+
};
|
|
10251
|
+
const calculateRightPosition = (column, table) => {
|
|
10252
|
+
const allColumns = table.getAllColumns();
|
|
10253
|
+
const currentIndex = allColumns.findIndex((col) => col.id === column.id);
|
|
10254
|
+
let rightPosition = 0;
|
|
10255
|
+
for (let i = currentIndex + 1; i < allColumns.length; i++) {
|
|
10256
|
+
const col = allColumns[i];
|
|
10257
|
+
const colDef = col.columnDef;
|
|
10258
|
+
if (colDef.meta?.pinning === "right") {
|
|
10259
|
+
rightPosition += col.getSize();
|
|
10260
|
+
}
|
|
10261
|
+
}
|
|
10262
|
+
return rightPosition;
|
|
10263
|
+
};
|
|
10264
|
+
const getCommonPinningStyles = (column, table) => {
|
|
10265
|
+
const columnWithPinning = column.columnDef;
|
|
10266
|
+
const shouldPin = columnWithPinning.meta?.pinning;
|
|
10267
|
+
if (!shouldPin) {
|
|
10268
|
+
return {
|
|
10269
|
+
position: "relative",
|
|
10270
|
+
width: column.getSize()
|
|
10271
|
+
};
|
|
10272
|
+
}
|
|
10273
|
+
const leftPosition = shouldPin === "left" ? calculateLeftPosition(column, table) : 0;
|
|
10274
|
+
const rightPosition = shouldPin === "right" ? calculateRightPosition(column, table) : 0;
|
|
10275
|
+
return {
|
|
10276
|
+
left: shouldPin === "left" ? `${leftPosition}px` : undefined,
|
|
10277
|
+
position: "sticky",
|
|
10278
|
+
right: shouldPin === "right" ? `${rightPosition}px` : undefined,
|
|
10279
|
+
width: column.getSize(),
|
|
10280
|
+
zIndex: 1
|
|
10281
|
+
};
|
|
10282
|
+
};
|
|
10283
|
+
|
|
10284
|
+
// Create context for row hover state
|
|
10285
|
+
const RowHoverContext = React.createContext({
|
|
10286
|
+
isRowHovered: false
|
|
10287
|
+
});
|
|
10288
|
+
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", }) => {
|
|
10289
|
+
const [sorting, setSorting] = React.useState([]);
|
|
10290
|
+
const [rowSelection, setRowSelection] = React.useState({});
|
|
10291
|
+
const [columnVisibility, setColumnVisibility] = React.useState({});
|
|
10292
|
+
const [globalFilter, setGlobalFilter] = React.useState("");
|
|
10293
|
+
const [pagination, setPagination] = React.useState({
|
|
10294
|
+
pageIndex: 0,
|
|
10295
|
+
pageSize: paginationConfig?.pageSize ?? 10
|
|
10296
|
+
});
|
|
10297
|
+
const [columnPinning, setColumnPinning] = React.useState({});
|
|
10298
|
+
const [hoveredRowId, setHoveredRowId] = React.useState(null);
|
|
10299
|
+
const tableContainerRef = React.useRef(null);
|
|
10300
|
+
/** Determines the final set of columns based on two conditions:
|
|
10301
|
+
* - hasCustomSelectColumn: whether the user provided a column with id === SELECT_COLUMN_ID
|
|
10302
|
+
* - enableRowSelection: whether row selection is enabled via props
|
|
10303
|
+
*
|
|
10304
|
+
* The four possible states:
|
|
10305
|
+
* hasCustomSelectColumn | enableRowSelection | Behavior
|
|
10306
|
+
* --------------------- | ------------------ | -------------------------------------------------------------
|
|
10307
|
+
* true | true | Return columns as-is (user already provided their own custom select column)
|
|
10308
|
+
* true | false | Return columnsWithoutSelection (no selection column needed)
|
|
10309
|
+
* false | true | Prepend our default select column to columnsWithoutSelection
|
|
10310
|
+
* false | false | Return columnsWithoutSelection (no selection column needed)
|
|
10311
|
+
*/
|
|
10312
|
+
const tableColumns = React.useMemo(() => {
|
|
10313
|
+
const customSelectionColumn = columns.find((col) => col.id === SELECT_COLUMN_ID);
|
|
10314
|
+
if (customSelectionColumn && enableRowSelection) {
|
|
10315
|
+
return columns;
|
|
10316
|
+
}
|
|
10317
|
+
const columnsWithoutSelection = columns.filter((col) => col.id !== SELECT_COLUMN_ID);
|
|
10318
|
+
if (!enableRowSelection) {
|
|
10319
|
+
return columnsWithoutSelection;
|
|
10320
|
+
}
|
|
10321
|
+
return [
|
|
10322
|
+
{
|
|
10323
|
+
accessorFn: () => null,
|
|
10324
|
+
cell: (props) => {
|
|
10325
|
+
const { row, cell, table } = props;
|
|
10326
|
+
const pinnedStyle = getCommonPinningStyles(cell.column, table);
|
|
10327
|
+
return (jsxRuntime.jsx(StyledSelectionCell, __assign({ horizontalAlign: "center", verticalAlign: "top" }, props, { style: {
|
|
10328
|
+
width: `${cell.column.getSize()}px`,
|
|
10329
|
+
...pinnedStyle
|
|
10330
|
+
}, children: jsxRuntime.jsx(StyledInputCheckbox, { stage: row.getIsSelected() ? "checked" : "unchecked", disabled: !row.getCanSelect(), onChange: () => row.toggleSelected(), "aria-label": "Select row" }) })));
|
|
10331
|
+
},
|
|
10332
|
+
enableFiltering: false,
|
|
10333
|
+
enablePinning: false,
|
|
10334
|
+
enableSorting: false,
|
|
10335
|
+
header: ({ table, header, }) => {
|
|
10336
|
+
const pinnedStyle = getCommonPinningStyles(header.column, table);
|
|
10337
|
+
let stage = "unchecked";
|
|
10338
|
+
if (table.getIsAllPageRowsSelected()) {
|
|
10339
|
+
stage = "checked";
|
|
10340
|
+
}
|
|
10341
|
+
else if (table.getIsSomePageRowsSelected()) {
|
|
10342
|
+
stage = "indeterminate";
|
|
10343
|
+
}
|
|
10344
|
+
return (jsxRuntime.jsx(CellHeader, { horizontalAlign: "center", style: {
|
|
10345
|
+
verticalAlign: "middle",
|
|
10346
|
+
width: `${header.getSize()}px`,
|
|
10347
|
+
...pinnedStyle
|
|
10348
|
+
}, children: jsxRuntime.jsx(StyledInputCheckbox, { stage: stage, onChange: () => table.toggleAllPageRowsSelected(), "aria-label": "Select all rows" }) }));
|
|
10349
|
+
},
|
|
10350
|
+
id: SELECT_COLUMN_ID,
|
|
10351
|
+
meta: {
|
|
10352
|
+
pinning: shouldPinSelectRowToLeft ? "left" : undefined,
|
|
10353
|
+
verticalAlign: "top"
|
|
10354
|
+
},
|
|
10355
|
+
size: 40
|
|
10356
|
+
},
|
|
10357
|
+
...columnsWithoutSelection,
|
|
10358
|
+
];
|
|
10359
|
+
}, [columns, enableRowSelection, shouldPinSelectRowToLeft]);
|
|
10360
|
+
const table = reactTable.useReactTable({
|
|
10361
|
+
columns: tableColumns,
|
|
10362
|
+
data,
|
|
10363
|
+
debugTable: true,
|
|
10364
|
+
enableColumnFilters: enableColumnFiltering,
|
|
10365
|
+
enableGlobalFilter: enableGlobalFiltering,
|
|
10366
|
+
enableRowSelection: enableRowSelection,
|
|
10367
|
+
enableSorting,
|
|
10368
|
+
getCoreRowModel: reactTable.getCoreRowModel(),
|
|
10369
|
+
getFilteredRowModel: reactTable.getFilteredRowModel(),
|
|
10370
|
+
getPaginationRowModel: reactTable.getPaginationRowModel(),
|
|
10371
|
+
getSortedRowModel: reactTable.getSortedRowModel(),
|
|
10372
|
+
onColumnPinningChange: setColumnPinning,
|
|
10373
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
10374
|
+
onGlobalFilterChange: setGlobalFilter,
|
|
10375
|
+
onPaginationChange: setPagination,
|
|
10376
|
+
onRowSelectionChange: setRowSelection,
|
|
10377
|
+
onSortingChange: setSorting,
|
|
10378
|
+
state: {
|
|
10379
|
+
columnPinning,
|
|
10380
|
+
columnVisibility,
|
|
10381
|
+
globalFilter,
|
|
10382
|
+
pagination,
|
|
10383
|
+
rowSelection,
|
|
10384
|
+
sorting
|
|
10385
|
+
}
|
|
10386
|
+
});
|
|
10387
|
+
const createInitialPinning = React.useCallback(() => {
|
|
10388
|
+
const initialPinning = {};
|
|
10389
|
+
tableColumns.forEach((column) => {
|
|
10390
|
+
const columnWithPinning = column;
|
|
10391
|
+
if (columnWithPinning.meta?.pinning) {
|
|
10392
|
+
const columnId = column.id || column.accessorKey;
|
|
10393
|
+
if (columnId) {
|
|
10394
|
+
const side = columnWithPinning.meta.pinning;
|
|
10395
|
+
if (!initialPinning[side]) {
|
|
10396
|
+
initialPinning[side] = [];
|
|
10397
|
+
}
|
|
10398
|
+
initialPinning[side].push(columnId);
|
|
10399
|
+
}
|
|
10400
|
+
}
|
|
10401
|
+
});
|
|
10402
|
+
return initialPinning;
|
|
10403
|
+
}, [tableColumns]);
|
|
10404
|
+
// Initialize column pinning from column definitions
|
|
10405
|
+
React.useEffect(() => {
|
|
10406
|
+
setColumnPinning(createInitialPinning());
|
|
10407
|
+
}, [createInitialPinning]);
|
|
10408
|
+
// Call onRowSelect callback when row selection changes
|
|
10409
|
+
React.useEffect(() => {
|
|
10410
|
+
if (onRowSelect && enableRowSelection) {
|
|
10411
|
+
const selectedRows = table
|
|
10412
|
+
.getSelectedRowModel()
|
|
10413
|
+
.rows.map((row) => row.original);
|
|
10414
|
+
onRowSelect(selectedRows);
|
|
10415
|
+
}
|
|
10416
|
+
}, [rowSelection, onRowSelect, enableRowSelection, table]);
|
|
10417
|
+
React.useEffect(() => {
|
|
10418
|
+
setPagination({
|
|
10419
|
+
pageIndex: 0,
|
|
10420
|
+
pageSize: paginationConfig?.pageSize ?? 10
|
|
10421
|
+
});
|
|
10422
|
+
}, [paginationConfig]);
|
|
10423
|
+
const headers = table.getFlatHeaders();
|
|
10424
|
+
React.useEffect(() => {
|
|
10425
|
+
if (!tableContainerRef.current)
|
|
10426
|
+
return;
|
|
10427
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
10428
|
+
const entry = entries[0];
|
|
10429
|
+
if (entry) {
|
|
10430
|
+
const initialColumnSizing = calculateTableSizing(headers, entry.contentRect.width);
|
|
10431
|
+
table.setColumnSizing(initialColumnSizing);
|
|
10432
|
+
}
|
|
10433
|
+
});
|
|
10434
|
+
resizeObserver.observe(tableContainerRef.current);
|
|
10435
|
+
return () => {
|
|
10436
|
+
resizeObserver.disconnect();
|
|
10437
|
+
};
|
|
10438
|
+
}, [headers, table]);
|
|
10439
|
+
const renderCell = (cell, row) => {
|
|
10440
|
+
const isRowHovered = hoveredRowId === row.id;
|
|
10441
|
+
const isPinned = cell.column.columnDef.meta?.pinning;
|
|
10442
|
+
const pinnedStyle = getCommonPinningStyles(cell.column, table);
|
|
10443
|
+
let cellContent;
|
|
10444
|
+
if (typeof cell.column.columnDef.cell === "string") {
|
|
10445
|
+
cellContent = (jsxRuntime.jsx(CellBasic, { as: "div", primaryText: cell.getValue(), shouldShowTooltipOnHover: false, shouldShowUnderlineOnHover: false, verticalAlign: cell.column.columnDef.meta?.verticalAlign === "middle"
|
|
10446
|
+
? "center"
|
|
10447
|
+
: cell.column.columnDef.meta?.verticalAlign, style: {
|
|
10448
|
+
width: `${cell.column.getSize()}px`
|
|
10449
|
+
} }));
|
|
10450
|
+
}
|
|
10451
|
+
else if (cell.column.columnDef.cell) {
|
|
10452
|
+
cellContent = reactTable.flexRender(cell.column.columnDef.cell, {
|
|
10453
|
+
...cell.getContext(),
|
|
10454
|
+
as: "div",
|
|
10455
|
+
style: {
|
|
10456
|
+
width: `${cell.column.getSize()}px`
|
|
10457
|
+
}
|
|
10458
|
+
});
|
|
10459
|
+
}
|
|
10460
|
+
else {
|
|
10461
|
+
// Fallback for undefined cell content
|
|
10462
|
+
cellContent = (jsxRuntime.jsx(CellBasic, { as: "div", primaryText: String(cell.getValue() || ""), shouldShowTooltipOnHover: false, shouldShowUnderlineOnHover: false, style: {
|
|
10463
|
+
width: `${cell.column.getSize()}px`
|
|
10464
|
+
}, verticalAlign: cell.column.columnDef.meta?.verticalAlign === "middle"
|
|
10465
|
+
? "center"
|
|
10466
|
+
: cell.column.columnDef.meta?.verticalAlign }));
|
|
10467
|
+
}
|
|
10468
|
+
if (isPinned) {
|
|
10469
|
+
return (jsxRuntime.jsx(RowHoverContext.Provider, { value: { isRowHovered }, children: jsxRuntime.jsx("td", { style: {
|
|
10470
|
+
...pinnedStyle,
|
|
10471
|
+
width: `${cell.column.getSize()}px`,
|
|
10472
|
+
verticalAlign: cell.column.columnDef.meta?.verticalAlign
|
|
10473
|
+
}, children: cellContent }) }, cell.id));
|
|
10474
|
+
}
|
|
10475
|
+
return (jsxRuntime.jsx(RowHoverContext.Provider, { value: { isRowHovered }, children: jsxRuntime.jsx("td", { style: {
|
|
10476
|
+
verticalAlign: cell.column.columnDef.meta?.verticalAlign,
|
|
10477
|
+
width: `${cell.column.getSize()}px`
|
|
10478
|
+
}, children: cellContent }) }, cell.id));
|
|
10479
|
+
};
|
|
10480
|
+
const renderHeader = (header) => {
|
|
10481
|
+
const isSortable = enableSorting && header.column.getCanSort();
|
|
10482
|
+
const isSorted = header.column.getIsSorted();
|
|
10483
|
+
const sortDirection = header.column.getIsSorted();
|
|
10484
|
+
const isPinned = header.column.columnDef.meta?.pinning;
|
|
10485
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10486
|
+
const { ref, ...headerCellProps } = header.column.columnDef.meta?.headerCellProps || {};
|
|
10487
|
+
const pinnedStyle = getCommonPinningStyles(header.column, table);
|
|
10488
|
+
if (typeof header.column.columnDef.header === "string") {
|
|
10489
|
+
return (jsxRuntime.jsx(CellHeader, __assign({ colSpan: header.colSpan, style: {
|
|
10490
|
+
...(isPinned ? pinnedStyle : {}),
|
|
10491
|
+
width: `${header.getSize()}px`
|
|
10492
|
+
}, active: !!isSorted, direction: sortDirection || undefined, hover: isSortable, onClick: header.column.getToggleSortingHandler() }, headerCellProps, { children: header.isPlaceholder ? null : header.column.columnDef.header }), header.id));
|
|
10493
|
+
}
|
|
10494
|
+
else if (header.column.columnDef.header) {
|
|
10495
|
+
return reactTable.flexRender(header.column.columnDef.header, {
|
|
10496
|
+
...header.getContext(),
|
|
10497
|
+
key: header.id,
|
|
10498
|
+
style: {
|
|
10499
|
+
...(isPinned ? pinnedStyle : {}),
|
|
10500
|
+
width: `${header.getSize()}px`
|
|
10501
|
+
}
|
|
10502
|
+
});
|
|
10503
|
+
}
|
|
10504
|
+
else {
|
|
10505
|
+
// Fallback for undefined header content
|
|
10506
|
+
return (jsxRuntime.jsx(CellHeader, { colSpan: header.colSpan, style: {
|
|
10507
|
+
...(isPinned ? pinnedStyle : {}),
|
|
10508
|
+
width: `${header.getSize()}px`
|
|
10509
|
+
}, active: !!isSorted, direction: sortDirection || undefined, hover: isSortable, onClick: header.column.getToggleSortingHandler(), children: header.column.id || "Header" }, header.id));
|
|
10510
|
+
}
|
|
10511
|
+
};
|
|
10512
|
+
return (jsxRuntime.jsxs(StyledTableContainer$1, { ref: tableContainerRef, className: className, style: { width: tableWidth, ...style }, children: [enableGlobalFiltering && (jsxRuntime.jsx("div", { style: { marginBottom: "16px" }, children: jsxRuntime.jsx(StyledInputSearch, { id: "global-search", label: "Search", placeholder: "Search all columns...", value: globalFilter, onChange: (e) => setGlobalFilter(e.target.value) }) })), jsxRuntime.jsx(StyledTableWrapper, { border: border, sdsStyle: sdsStyle, children: jsxRuntime.jsxs(Table, { children: [jsxRuntime.jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => {
|
|
10513
|
+
return (jsxRuntime.jsx(React.Fragment, { children: headerGroup.headers.map((header) => {
|
|
10514
|
+
return renderHeader(header);
|
|
10515
|
+
}) }, headerGroup.id));
|
|
10516
|
+
}) }), jsxRuntime.jsx("tbody", { children: table.getRowModel().rows.map((row) => (jsxRuntime.jsx(TableRow, __assign({ onMouseEnter: () => setHoveredRowId(row.id), onMouseLeave: () => setHoveredRowId(null), selected: row.getIsSelected(), "aria-selected": row.getIsSelected() }, tableRowProps, { children: row.getVisibleCells().map((cell) => {
|
|
10517
|
+
return renderCell(cell, row);
|
|
10518
|
+
}) }), row.id))) })] }) }), enablePagination && (jsxRuntime.jsx(StyledPaginationWrapper, { placement: paginationConfig?.placement, children: jsxRuntime.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("-")}`));
|
|
10519
|
+
};
|
|
10520
|
+
|
|
10521
|
+
const doNotForwardProps$v = [
|
|
10522
|
+
"icon",
|
|
10523
|
+
"iconVerticalAlign",
|
|
10524
|
+
"horizontalAlign",
|
|
10525
|
+
"verticalAlign",
|
|
10526
|
+
"primaryText",
|
|
10527
|
+
"secondaryText",
|
|
10528
|
+
"tertiaryText",
|
|
10529
|
+
"shouldTextWrap",
|
|
10530
|
+
"shouldShowTooltipOnHover",
|
|
10531
|
+
"shouldShowUnderlineOnHover",
|
|
10532
|
+
"isRowHovered",
|
|
10533
|
+
"tooltipProps",
|
|
10534
|
+
"primaryTextWrapLineCount",
|
|
10535
|
+
"secondaryTextWrapLineCount",
|
|
10536
|
+
"tertiaryTextWrapLineCount",
|
|
10537
|
+
"primaryTextComponentSlotBottom",
|
|
10538
|
+
"primaryTextComponentSlotRight",
|
|
10539
|
+
"tabularNums",
|
|
10540
|
+
];
|
|
10541
|
+
const TABULAR_NUMS = "tabular-nums";
|
|
10542
|
+
const verticalAlignCSSMap = {
|
|
10543
|
+
bottom: "bottom",
|
|
10544
|
+
center: "middle",
|
|
10545
|
+
top: "top"
|
|
10546
|
+
};
|
|
10547
|
+
const verticalAlignToFlexMap = {
|
|
10548
|
+
bottom: "flex-end",
|
|
10549
|
+
center: "center",
|
|
10550
|
+
top: "flex-start"
|
|
10551
|
+
};
|
|
10552
|
+
const ShouldWrap = (lineCount) => {
|
|
10553
|
+
return `
|
|
10554
|
+
overflow: hidden;
|
|
10555
|
+
display: -webkit-box;
|
|
10556
|
+
-webkit-line-clamp: ${lineCount};
|
|
10557
|
+
-webkit-box-orient: vertical;
|
|
10558
|
+
word-break: break-all;
|
|
10559
|
+
`;
|
|
10560
|
+
};
|
|
10561
|
+
const ShouldTruncate = () => {
|
|
10562
|
+
return `
|
|
10563
|
+
text-overflow: ellipsis;
|
|
10564
|
+
white-space: nowrap;
|
|
10565
|
+
overflow: hidden;
|
|
10566
|
+
word-break: break-all;
|
|
10567
|
+
`;
|
|
10568
|
+
};
|
|
10569
|
+
const StyledCellContent = styled__default.default("div") `
|
|
10570
|
+
display: flex;
|
|
10571
|
+
`;
|
|
10572
|
+
const StyledCellContentWrapper = styled__default.default("div") `
|
|
10573
|
+
width: 100%;
|
|
10574
|
+
`;
|
|
10575
|
+
const StyledCellIconWrapper = styled__default.default("div", {
|
|
10576
|
+
shouldForwardProp: (prop) => !doNotForwardProps$v.includes(prop)
|
|
10577
|
+
}) `
|
|
10578
|
+
${(props) => {
|
|
10579
|
+
const { iconVerticalAlign = "top" } = props;
|
|
10580
|
+
const spaces = getSpaces(props);
|
|
10581
|
+
return `
|
|
10582
|
+
padding-right: ${spaces?.m}px;
|
|
10583
|
+
display: flex;
|
|
10584
|
+
flex-direction: column;
|
|
10585
|
+
justify-content: ${verticalAlignToFlexMap[iconVerticalAlign]};
|
|
10586
|
+
`;
|
|
10587
|
+
}}
|
|
10588
|
+
`;
|
|
10589
|
+
const PrimaryTextWrapper = styled__default.default("div") `
|
|
10590
|
+
${(props) => {
|
|
10591
|
+
const { horizontalAlign } = props;
|
|
10592
|
+
return `
|
|
10593
|
+
display: flex;
|
|
10594
|
+
justify-content: ${horizontalAlign === "left" ? "flex-start" : "flex-end"};
|
|
10595
|
+
`;
|
|
10596
|
+
}}
|
|
10597
|
+
`;
|
|
10598
|
+
const PrimaryText = styled__default.default("div", {
|
|
10599
|
+
shouldForwardProp: (prop) => !doNotForwardProps$v.includes(prop)
|
|
10600
|
+
}) `
|
|
10601
|
+
${fontBodyS$1}
|
|
10602
|
+
|
|
10603
|
+
${(props) => {
|
|
10604
|
+
const { primaryTextWrapLineCount = 3, tabularNums = false } = props;
|
|
10605
|
+
return `
|
|
10606
|
+
display: block;
|
|
10607
|
+
font-variant-numeric: ${tabularNums ? TABULAR_NUMS : "normal"};
|
|
10608
|
+
|
|
10609
|
+
${props.shouldTextWrap
|
|
10610
|
+
? ShouldWrap(primaryTextWrapLineCount)
|
|
10611
|
+
: ShouldTruncate()}
|
|
10612
|
+
`;
|
|
10613
|
+
}}
|
|
10614
|
+
`;
|
|
10615
|
+
const SecondaryText = styled__default.default("span", {
|
|
10616
|
+
shouldForwardProp: (prop) => !doNotForwardProps$v.includes(prop)
|
|
10617
|
+
}) `
|
|
10618
|
+
${fontBodyXxs$1}
|
|
10619
|
+
|
|
10620
|
+
${(props) => {
|
|
10621
|
+
const { secondaryTextWrapLineCount = 1, tabularNums = false } = props;
|
|
10622
|
+
const semanticColors = getSemanticColors(props);
|
|
10623
|
+
return `
|
|
10624
|
+
display: block;
|
|
10625
|
+
color: ${semanticColors?.base?.textSecondary};
|
|
10626
|
+
padding-top: 0px;
|
|
10627
|
+
font-variant-numeric: ${tabularNums ? TABULAR_NUMS : "normal"};
|
|
10628
|
+
|
|
10629
|
+
${props.shouldTextWrap
|
|
10630
|
+
? ShouldWrap(secondaryTextWrapLineCount)
|
|
10631
|
+
: ShouldTruncate()}
|
|
10632
|
+
`;
|
|
10633
|
+
}}
|
|
10634
|
+
`;
|
|
10635
|
+
const TertiaryText = styled__default.default("span", {
|
|
10636
|
+
shouldForwardProp: (prop) => !doNotForwardProps$v.includes(prop)
|
|
10637
|
+
}) `
|
|
10638
|
+
${fontBodyXxs$1}
|
|
10639
|
+
|
|
10640
|
+
${(props) => {
|
|
10641
|
+
const { tertiaryTextWrapLineCount = 1, tabularNums = false } = props;
|
|
10642
|
+
const spaces = getSpaces(props);
|
|
10643
|
+
const semanticColors = getSemanticColors(props);
|
|
10644
|
+
return `
|
|
10645
|
+
display: block;
|
|
10646
|
+
color: ${semanticColors?.base?.textSecondary};
|
|
10647
|
+
padding-top: ${spaces?.xxxs}px;
|
|
10648
|
+
font-variant-numeric: ${tabularNums ? TABULAR_NUMS : "normal"};
|
|
10649
|
+
|
|
10650
|
+
${props.shouldTextWrap
|
|
10651
|
+
? ShouldWrap(tertiaryTextWrapLineCount)
|
|
10652
|
+
: ShouldTruncate()}
|
|
10653
|
+
`;
|
|
10654
|
+
}}
|
|
10655
|
+
`;
|
|
10656
|
+
const PrimaryTextComponentSlotBottomWrapper = styled__default.default("div") `
|
|
10657
|
+
${(props) => {
|
|
10658
|
+
const spaces = getSpaces(props);
|
|
10659
|
+
return `
|
|
10660
|
+
margin-top: ${spaces?.xxs}px;
|
|
10661
|
+
`;
|
|
10662
|
+
}}
|
|
10663
|
+
`;
|
|
10664
|
+
const PrimaryTextComponentSlotRightWrapper = styled__default.default("div") `
|
|
10665
|
+
${(props) => {
|
|
10666
|
+
const spaces = getSpaces(props);
|
|
10667
|
+
return `
|
|
10668
|
+
margin-left: ${spaces?.xs}px;
|
|
10669
|
+
`;
|
|
10670
|
+
}}
|
|
10671
|
+
`;
|
|
10672
|
+
const StyledTableData = styled__default.default.div `
|
|
10673
|
+
${fontBodyS$1}
|
|
10674
|
+
${focusVisibleA11yStyle}
|
|
10675
|
+
|
|
10676
|
+
${(props) => {
|
|
10677
|
+
const { horizontalAlign = "left", verticalAlign = "top", shouldShowUnderlineOnHover = false, isRowHovered = false, extraRightPadding = 0, } = props;
|
|
10678
|
+
const spaces = getSpaces(props);
|
|
10679
|
+
const paddingRight = horizontalAlign === "right"
|
|
10680
|
+
? (spaces?.m ?? 0) + extraRightPadding
|
|
10681
|
+
: spaces?.m;
|
|
10682
|
+
return `
|
|
10683
|
+
padding: ${spaces?.m}px ${paddingRight}px ${spaces?.m}px ${spaces?.m}px !important;
|
|
10684
|
+
text-align: ${horizontalAlign};
|
|
10685
|
+
vertical-align: ${verticalAlignCSSMap[verticalAlign]};
|
|
10686
|
+
overflow: hidden;
|
|
10687
|
+
|
|
10688
|
+
&:hover {
|
|
10689
|
+
${PrimaryText} {
|
|
10690
|
+
${shouldShowUnderlineOnHover ? "text-decoration: underline;" : ""}
|
|
10691
|
+
}
|
|
10692
|
+
}
|
|
10693
|
+
|
|
10694
|
+
${PrimaryText} {
|
|
10695
|
+
${isRowHovered && shouldShowUnderlineOnHover ? "text-decoration: underline;" : ""}
|
|
10696
|
+
}
|
|
10697
|
+
`;
|
|
10698
|
+
}}
|
|
10699
|
+
`;
|
|
10700
|
+
const StyledCellBasicLink = styled__default.default("a") `
|
|
10701
|
+
${(props) => {
|
|
10702
|
+
const semanticColors = getSemanticColors(props);
|
|
10703
|
+
return `
|
|
10704
|
+
text-decoration: none;
|
|
10705
|
+
color: ${semanticColors?.base?.textPrimary};
|
|
10706
|
+
`;
|
|
10707
|
+
}}
|
|
10708
|
+
`;
|
|
10709
|
+
|
|
10710
|
+
const CellBasicContent = (props) => {
|
|
10711
|
+
const { primaryText, primaryTextWrapLineCount, secondaryText, secondaryTextWrapLineCount, tertiaryText, tertiaryTextWrapLineCount, shouldTextWrap = true, icon, iconVerticalAlign, primaryTextComponentSlotRight, primaryTextComponentSlotBottom, horizontalAlign = "left", tabularNums = false, } = props;
|
|
10712
|
+
return (jsxRuntime.jsxs(StyledCellContent, { children: [icon && (jsxRuntime.jsx(StyledCellIconWrapper, { iconVerticalAlign: iconVerticalAlign, children: icon })), jsxRuntime.jsxs(StyledCellContentWrapper, { children: [jsxRuntime.jsxs(PrimaryTextWrapper, { horizontalAlign: horizontalAlign, children: [jsxRuntime.jsx(PrimaryText, { shouldTextWrap: shouldTextWrap, primaryTextWrapLineCount: primaryTextWrapLineCount, tabularNums: tabularNums, children: primaryText }), primaryTextComponentSlotRight && (jsxRuntime.jsx(PrimaryTextComponentSlotRightWrapper, { children: primaryTextComponentSlotRight }))] }), !secondaryText && !tertiaryText && primaryTextComponentSlotBottom && (jsxRuntime.jsx(PrimaryTextComponentSlotBottomWrapper, { children: primaryTextComponentSlotBottom })), secondaryText && (jsxRuntime.jsx(SecondaryText, { shouldTextWrap: shouldTextWrap, secondaryTextWrapLineCount: secondaryTextWrapLineCount, tabularNums: tabularNums, children: secondaryText })), tertiaryText && (jsxRuntime.jsx(TertiaryText, { shouldTextWrap: shouldTextWrap, tertiaryTextWrapLineCount: tertiaryTextWrapLineCount, tabularNums: tabularNums, children: tertiaryText }))] })] }));
|
|
10713
|
+
};
|
|
10714
|
+
const CellBasic = React.forwardRef((props, ref) => {
|
|
10715
|
+
const { primaryText, secondaryText, shouldShowTooltipOnHover = true, tooltipProps, as = "td", link, linkProps, linkComponent, } = props;
|
|
10716
|
+
// Get row hover state from context (fallback to false if not available)
|
|
10717
|
+
const { isRowHovered } = React.useContext(RowHoverContext) || {
|
|
10718
|
+
isRowHovered: false
|
|
10719
|
+
};
|
|
10720
|
+
// Pass the row hover state to the styled component
|
|
10721
|
+
const enhancedProps = { ...props, isRowHovered };
|
|
10722
|
+
if (shouldShowTooltipOnHover) {
|
|
10723
|
+
return (jsxRuntime.jsx(Tooltip, __assign({ title: primaryText, subtitle: secondaryText, arrow: true, leaveDelay: 0, leaveTouchDelay: 0, sdsStyle: "dark" }, tooltipProps, { children: jsxRuntime.jsx(StyledTableData, __assign({ ref: ref, as: as }, enhancedProps, { children: link ? (jsxRuntime.jsx(StyledCellBasicLink, __assign({ href: link }, linkProps, { component: linkComponent, children: jsxRuntime.jsx(CellBasicContent, __assign({}, props)) }))) : (jsxRuntime.jsx(CellBasicContent, __assign({}, props))) })) })));
|
|
10724
|
+
}
|
|
10725
|
+
return (jsxRuntime.jsx(StyledTableData, __assign({ ref: ref, as: as }, enhancedProps, { children: link ? (jsxRuntime.jsx(material.Link, __assign({ href: link }, linkProps, { underline: "none", color: "inherit", component: linkComponent, children: jsxRuntime.jsx(CellBasicContent, __assign({}, props)) }))) : (jsxRuntime.jsx(CellBasicContent, __assign({}, props))) })));
|
|
10726
|
+
});
|
|
10727
|
+
CellBasic.displayName = "CellBasic";
|
|
10728
|
+
|
|
10729
|
+
const small = (props) => {
|
|
10730
|
+
const spaces = getSpaces(props);
|
|
10731
|
+
return react.css `
|
|
10732
|
+
height: ${spaces?.l}px;
|
|
10733
|
+
padding: ${spaces?.xxs}px ${spaces?.xs}px;
|
|
10734
|
+
|
|
10735
|
+
.MuiChip-label {
|
|
10736
|
+
${fontCapsXxxxs(props)}
|
|
10737
|
+
padding: 0;
|
|
10738
|
+
}
|
|
10739
|
+
`;
|
|
10740
|
+
};
|
|
10741
|
+
const medium = (props) => {
|
|
10742
|
+
const spaces = getSpaces(props);
|
|
10743
|
+
const colors = getColors(props);
|
|
10744
|
+
return react.css `
|
|
10745
|
+
margin: 0 ${spaces?.s}px;
|
|
10746
|
+
height: 24px;
|
|
10747
|
+
|
|
10748
|
+
background-color: ${colors?.blue[400]};
|
|
10749
|
+
|
|
10750
|
+
&:hover {
|
|
10751
|
+
background-color: ${colors?.blue[500]};
|
|
10752
|
+
}
|
|
10753
|
+
|
|
10754
|
+
&:active {
|
|
10755
|
+
background-color: ${colors?.blue[600]};
|
|
10756
|
+
}
|
|
10757
|
+
|
|
10758
|
+
.MuiChip-label {
|
|
10759
|
+
${fontHeaderXs(props)}
|
|
10760
|
+
color: white;
|
|
10761
|
+
padding-left: ${spaces?.s}px;
|
|
10762
|
+
}
|
|
10763
|
+
|
|
10764
|
+
.MuiChip-deleteIcon {
|
|
10765
|
+
color: white;
|
|
10766
|
+
padding-right: ${spaces?.xxs}px;
|
|
10767
|
+
margin: 0 0 0 -${spaces?.s}px;
|
|
10768
|
+
height: ${spaces?.l}px;
|
|
10769
|
+
width: ${spaces?.l}px;
|
|
10770
|
+
|
|
10771
|
+
&:hover,
|
|
10772
|
+
&:focus-visible {
|
|
10773
|
+
color: white;
|
|
10774
|
+
}
|
|
10775
|
+
}
|
|
10776
|
+
`;
|
|
10777
|
+
};
|
|
10778
|
+
const rounded$2 = (props) => {
|
|
10779
|
+
const corners = getCorners(props);
|
|
10780
|
+
return react.css `
|
|
10781
|
+
border-radius: ${corners?.rounded}px;
|
|
10782
|
+
`;
|
|
10783
|
+
};
|
|
10784
|
+
const square$2 = (props) => {
|
|
10785
|
+
const corners = getCorners(props);
|
|
10786
|
+
return react.css `
|
|
10787
|
+
border-radius: ${corners?.m}px;
|
|
10788
|
+
`;
|
|
10789
|
+
};
|
|
10790
|
+
const success = (props) => {
|
|
10791
|
+
return createStatusCss(props, "success");
|
|
10792
|
+
};
|
|
10793
|
+
const error = (props) => {
|
|
10794
|
+
return createStatusCss(props, "error");
|
|
10795
|
+
};
|
|
10796
|
+
const beta = (props) => {
|
|
10797
|
+
return createStatusCss(props, "beta");
|
|
10798
|
+
};
|
|
9570
10799
|
const pending = (props) => {
|
|
9571
10800
|
return createStatusCss(props, "pending");
|
|
9572
10801
|
};
|
|
@@ -9624,9 +10853,9 @@ const statusToCss = {
|
|
|
9624
10853
|
success,
|
|
9625
10854
|
warning
|
|
9626
10855
|
};
|
|
9627
|
-
const doNotForwardProps$
|
|
10856
|
+
const doNotForwardProps$u = ["isRounded"];
|
|
9628
10857
|
const StyledChip = styled__default.default(material.Chip, {
|
|
9629
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10858
|
+
shouldForwardProp: (prop) => !doNotForwardProps$u.includes(prop)
|
|
9630
10859
|
}) `
|
|
9631
10860
|
border: none;
|
|
9632
10861
|
|
|
@@ -9658,7 +10887,7 @@ const Chip = (props) => {
|
|
|
9658
10887
|
return jsxRuntime.jsx(StyledChip, __assign({}, props));
|
|
9659
10888
|
};
|
|
9660
10889
|
|
|
9661
|
-
const doNotForwardProps$
|
|
10890
|
+
const doNotForwardProps$t = [
|
|
9662
10891
|
"anchorEl",
|
|
9663
10892
|
"count",
|
|
9664
10893
|
"keepSearchOnSelect",
|
|
@@ -9673,7 +10902,7 @@ const doNotForwardProps$v = [
|
|
|
9673
10902
|
"titleValue",
|
|
9674
10903
|
];
|
|
9675
10904
|
const StyledHeaderTitle = styled__default.default("div", {
|
|
9676
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10905
|
+
shouldForwardProp: (prop) => !doNotForwardProps$t.includes(prop)
|
|
9677
10906
|
}) `
|
|
9678
10907
|
${fontBodyMediumXs}
|
|
9679
10908
|
|
|
@@ -9687,7 +10916,7 @@ const StyledHeaderTitle = styled__default.default("div", {
|
|
|
9687
10916
|
}}
|
|
9688
10917
|
`;
|
|
9689
10918
|
const StyledHeaderSubTitle = styled__default.default("div", {
|
|
9690
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10919
|
+
shouldForwardProp: (prop) => !doNotForwardProps$t.includes(prop)
|
|
9691
10920
|
}) `
|
|
9692
10921
|
${fontBodyXxs$1}
|
|
9693
10922
|
|
|
@@ -9702,7 +10931,7 @@ const StyledHeaderSubTitle = styled__default.default("div", {
|
|
|
9702
10931
|
}}
|
|
9703
10932
|
`;
|
|
9704
10933
|
const StyledDropdownMenuAutocompleteWrapper = styled__default.default("div", {
|
|
9705
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10934
|
+
shouldForwardProp: (prop) => !doNotForwardProps$t.includes(prop)
|
|
9706
10935
|
}) `
|
|
9707
10936
|
${(props) => {
|
|
9708
10937
|
const { search, titleValue } = props;
|
|
@@ -9739,7 +10968,7 @@ const StyledDropdownMenuAutocompleteWrapper = styled__default.default("div", {
|
|
|
9739
10968
|
}}
|
|
9740
10969
|
`;
|
|
9741
10970
|
const StyledPopper = styled__default.default(material.Popper, {
|
|
9742
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10971
|
+
shouldForwardProp: (prop) => !doNotForwardProps$t.includes(prop) || prop === "anchorEl"
|
|
9743
10972
|
}) `
|
|
9744
10973
|
${(props) => {
|
|
9745
10974
|
const borders = getBorders(props);
|
|
@@ -9758,7 +10987,7 @@ const StyledPopper = styled__default.default(material.Popper, {
|
|
|
9758
10987
|
}}
|
|
9759
10988
|
`;
|
|
9760
10989
|
const StyledPaper$1 = styled__default.default(material.Paper, {
|
|
9761
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
10990
|
+
shouldForwardProp: (prop) => !doNotForwardProps$t.includes(prop)
|
|
9762
10991
|
}) `
|
|
9763
10992
|
${(props) => {
|
|
9764
10993
|
const spaces = getSpaces(props);
|
|
@@ -9865,7 +11094,7 @@ const DropdownMenu = (props) => {
|
|
|
9865
11094
|
sx: dropdownMenuPopperSx, children: jsxRuntime.jsx(PaperComponent, { children: jsxRuntime.jsx(material.ClickAwayListener, __assign({ onClickAway: onClickAway }, ClickAwayListenerProps, { children: jsxRuntime.jsxs(StyledDropdownMenuAutocompleteWrapper, { search: search, titleValue: !!(title || headerComponentSlot), children: [(title || headerComponentSlot) && (jsxRuntime.jsxs(StyledDropdownMenuHeader, { search: search, children: [jsxRuntime.jsxs("div", { children: [title && jsxRuntime.jsx(StyledHeaderTitle, { children: title }), headerComponentSlot && jsxRuntime.jsx(jsxRuntime.Fragment, { children: headerComponentSlot })] }), title && subTitle && (jsxRuntime.jsx(StyledHeaderSubTitle, { children: subTitle }))] })), anchorEl && (jsxRuntime.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] }) })) }) })));
|
|
9866
11095
|
};
|
|
9867
11096
|
|
|
9868
|
-
const doNotForwardProps$
|
|
11097
|
+
const doNotForwardProps$s = [
|
|
9869
11098
|
"intent",
|
|
9870
11099
|
"state",
|
|
9871
11100
|
"sdsType",
|
|
@@ -9876,7 +11105,7 @@ const doNotForwardProps$u = [
|
|
|
9876
11105
|
"sdsStyle",
|
|
9877
11106
|
"multiple",
|
|
9878
11107
|
];
|
|
9879
|
-
const intentToColor$
|
|
11108
|
+
const intentToColor$1 = {
|
|
9880
11109
|
default: "accent",
|
|
9881
11110
|
negative: "negative",
|
|
9882
11111
|
notice: "notice",
|
|
@@ -9891,6 +11120,7 @@ const inputDropdownStyles = (props) => {
|
|
|
9891
11120
|
return react.css `
|
|
9892
11121
|
${labelStyle(props)}
|
|
9893
11122
|
|
|
11123
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
9894
11124
|
border: none;
|
|
9895
11125
|
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderPrimary};
|
|
9896
11126
|
cursor: pointer;
|
|
@@ -10056,7 +11286,7 @@ const userInput = (props) => {
|
|
|
10056
11286
|
const isOpen = (props) => {
|
|
10057
11287
|
const { sdsStyle = "square", intent = "default" } = props;
|
|
10058
11288
|
const semanticColors = getSemanticColors(props);
|
|
10059
|
-
const inputColor = intentToColor$
|
|
11289
|
+
const inputColor = intentToColor$1[intent];
|
|
10060
11290
|
return react.css `
|
|
10061
11291
|
&.MuiButton-text {
|
|
10062
11292
|
.styled-label {
|
|
@@ -10148,7 +11378,7 @@ const isDisabled = (props) => {
|
|
|
10148
11378
|
* to the InputDropdownProps interface.
|
|
10149
11379
|
*/
|
|
10150
11380
|
const StyledInputDropdown = styled__default.default(Button__default.default, {
|
|
10151
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11381
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10152
11382
|
}) `
|
|
10153
11383
|
${labelFontBodyXs}
|
|
10154
11384
|
${focusVisibleA11yStyle}
|
|
@@ -10184,7 +11414,7 @@ const StyledInputDropdown = styled__default.default(Button__default.default, {
|
|
|
10184
11414
|
}}
|
|
10185
11415
|
`;
|
|
10186
11416
|
const StyledDetail = styled__default.default("span", {
|
|
10187
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11417
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10188
11418
|
}) `
|
|
10189
11419
|
${(props) => {
|
|
10190
11420
|
const spaces = getSpaces(props);
|
|
@@ -10199,7 +11429,7 @@ const StyledDetail = styled__default.default("span", {
|
|
|
10199
11429
|
}}
|
|
10200
11430
|
`;
|
|
10201
11431
|
const StyledLabel$3 = styled__default.default("span", {
|
|
10202
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11432
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10203
11433
|
}) `
|
|
10204
11434
|
${(props) => {
|
|
10205
11435
|
const { details, counter, sdsType } = props;
|
|
@@ -10216,7 +11446,7 @@ const StyledLabel$3 = styled__default.default("span", {
|
|
|
10216
11446
|
}}
|
|
10217
11447
|
`;
|
|
10218
11448
|
const StyledCounter = styled__default.default("span", {
|
|
10219
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11449
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10220
11450
|
}) `
|
|
10221
11451
|
${(props) => {
|
|
10222
11452
|
const corners = getCorners(props);
|
|
@@ -10237,7 +11467,7 @@ const StyledCounter = styled__default.default("span", {
|
|
|
10237
11467
|
}}
|
|
10238
11468
|
`;
|
|
10239
11469
|
const MinimalDetails = styled__default.default("div", {
|
|
10240
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11470
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10241
11471
|
}) `
|
|
10242
11472
|
${labelFontBodyS}
|
|
10243
11473
|
text-align: left;
|
|
@@ -10257,7 +11487,7 @@ const MinimalDetails = styled__default.default("div", {
|
|
|
10257
11487
|
}}
|
|
10258
11488
|
`;
|
|
10259
11489
|
const LabelWrapper = styled__default.default("span", {
|
|
10260
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11490
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10261
11491
|
}) `
|
|
10262
11492
|
align-items: center;
|
|
10263
11493
|
display: inline-flex;
|
|
@@ -10273,7 +11503,7 @@ const LabelWrapper = styled__default.default("span", {
|
|
|
10273
11503
|
}
|
|
10274
11504
|
`;
|
|
10275
11505
|
const IconWrapper = styled__default.default("span", {
|
|
10276
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11506
|
+
shouldForwardProp: (prop) => !doNotForwardProps$s.includes(prop)
|
|
10277
11507
|
}) `
|
|
10278
11508
|
margin-left: auto;
|
|
10279
11509
|
display: flex;
|
|
@@ -10359,9 +11589,9 @@ function renderDetailsText({ details, sdsType, value, }) {
|
|
|
10359
11589
|
}
|
|
10360
11590
|
}
|
|
10361
11591
|
|
|
10362
|
-
const doNotForwardProps$
|
|
11592
|
+
const doNotForwardProps$r = ["buttonPosition"];
|
|
10363
11593
|
const StyledButtonsWrapper = styled__default.default("div", {
|
|
10364
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
11594
|
+
shouldForwardProp: (prop) => !doNotForwardProps$r.includes(prop)
|
|
10365
11595
|
}) `
|
|
10366
11596
|
${(props) => {
|
|
10367
11597
|
const { buttonPosition } = props;
|
|
@@ -10874,7 +12104,7 @@ const typeToCss = {
|
|
|
10874
12104
|
primary,
|
|
10875
12105
|
secondary
|
|
10876
12106
|
};
|
|
10877
|
-
const doNotForwardProps$
|
|
12107
|
+
const doNotForwardProps$q = [
|
|
10878
12108
|
"sdsType",
|
|
10879
12109
|
"sdsStyle",
|
|
10880
12110
|
"sdsSize",
|
|
@@ -10882,7 +12112,7 @@ const doNotForwardProps$s = [
|
|
|
10882
12112
|
"hover",
|
|
10883
12113
|
];
|
|
10884
12114
|
const StyledTag$4 = styled__default.default(material.Chip, {
|
|
10885
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12115
|
+
shouldForwardProp: (prop) => !doNotForwardProps$q.includes(prop)
|
|
10886
12116
|
}) `
|
|
10887
12117
|
border: none;
|
|
10888
12118
|
|
|
@@ -11173,7 +12403,7 @@ const ComplexFilter = ({ label = "", multiple = false, search = false, onChange:
|
|
|
11173
12403
|
}, buttons: true }, rest)), jsxRuntime.jsx(StyledChipsWrapper, { children: jsxRuntime.jsx(Chips, { value: value, multiple: multiple, onDelete: handleDelete }) })] }));
|
|
11174
12404
|
};
|
|
11175
12405
|
|
|
11176
|
-
const doNotForwardProps$
|
|
12406
|
+
const doNotForwardProps$p = [
|
|
11177
12407
|
"visualElement",
|
|
11178
12408
|
"sdsType",
|
|
11179
12409
|
"imagePosition",
|
|
@@ -11214,7 +12444,7 @@ const getShowDecorativeBorder = (visualElementType, boundingBox, decorativeBorde
|
|
|
11214
12444
|
: boundingBox && decorativeBorder;
|
|
11215
12445
|
};
|
|
11216
12446
|
const StyledCard = styled__default.default(material.Card, {
|
|
11217
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12447
|
+
shouldForwardProp: (prop) => !doNotForwardProps$p.includes(prop)
|
|
11218
12448
|
}) `
|
|
11219
12449
|
${(props) => {
|
|
11220
12450
|
const { imagePosition = "left", sdsType = "wide", boundingBox = true, decorativeBorder = false, imagePadding = false, visualElementType, clickableCard = false, } = props;
|
|
@@ -11296,7 +12526,7 @@ const StyledCard = styled__default.default(material.Card, {
|
|
|
11296
12526
|
}}
|
|
11297
12527
|
`;
|
|
11298
12528
|
const StyledCardActionArea = styled__default.default(Button__default.default, {
|
|
11299
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12529
|
+
shouldForwardProp: (prop) => !doNotForwardProps$p.includes(prop)
|
|
11300
12530
|
}) `
|
|
11301
12531
|
${(props) => {
|
|
11302
12532
|
const { imagePosition = "left", cardSdsType = "wide", visualElementType, } = props;
|
|
@@ -11325,7 +12555,7 @@ const StyledCardActionArea = styled__default.default(Button__default.default, {
|
|
|
11325
12555
|
}}
|
|
11326
12556
|
`;
|
|
11327
12557
|
const StyledIconMediaWrapper = styled__default.default("div", {
|
|
11328
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12558
|
+
shouldForwardProp: (prop) => !doNotForwardProps$p.includes(prop)
|
|
11329
12559
|
}) `
|
|
11330
12560
|
${(props) => {
|
|
11331
12561
|
const { boundingBox = true } = props;
|
|
@@ -11342,7 +12572,7 @@ const StyledIconMediaWrapper = styled__default.default("div", {
|
|
|
11342
12572
|
}}
|
|
11343
12573
|
`;
|
|
11344
12574
|
const StyledCardContent = styled__default.default("div", {
|
|
11345
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12575
|
+
shouldForwardProp: (prop) => !doNotForwardProps$p.includes(prop)
|
|
11346
12576
|
}) `
|
|
11347
12577
|
${(props) => {
|
|
11348
12578
|
const { boundingBox = true, sdsType = "wide", visualElementType } = props;
|
|
@@ -11370,7 +12600,7 @@ const StyledCardContent = styled__default.default("div", {
|
|
|
11370
12600
|
}}
|
|
11371
12601
|
`;
|
|
11372
12602
|
const StyledContentCardBody = styled__default.default(material.CardContent, {
|
|
11373
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12603
|
+
shouldForwardProp: (prop) => !doNotForwardProps$p.includes(prop)
|
|
11374
12604
|
}) `
|
|
11375
12605
|
${fontBodyS$1}
|
|
11376
12606
|
${(props) => {
|
|
@@ -11391,7 +12621,7 @@ const StyledCardContentAligner = styled__default.default("div") `
|
|
|
11391
12621
|
height: 100%;
|
|
11392
12622
|
`;
|
|
11393
12623
|
|
|
11394
|
-
const doNotForwardProps$
|
|
12624
|
+
const doNotForwardProps$o = [
|
|
11395
12625
|
"visualElement",
|
|
11396
12626
|
"sdsType",
|
|
11397
12627
|
"imagePosition",
|
|
@@ -11403,7 +12633,7 @@ const doNotForwardProps$q = [
|
|
|
11403
12633
|
"contentBlock",
|
|
11404
12634
|
];
|
|
11405
12635
|
const StyledTitleWrapper = material.styled("div", {
|
|
11406
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12636
|
+
shouldForwardProp: (prop) => !doNotForwardProps$o.includes(prop)
|
|
11407
12637
|
}) `
|
|
11408
12638
|
${(props) => {
|
|
11409
12639
|
const spaces = getSpaces(props);
|
|
@@ -11415,7 +12645,7 @@ const StyledTitleWrapper = material.styled("div", {
|
|
|
11415
12645
|
}}
|
|
11416
12646
|
`;
|
|
11417
12647
|
const StyledOverlineText = material.styled("p", {
|
|
11418
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12648
|
+
shouldForwardProp: (prop) => !doNotForwardProps$o.includes(prop)
|
|
11419
12649
|
}) `
|
|
11420
12650
|
${fontCapsXxxs}
|
|
11421
12651
|
${(props) => {
|
|
@@ -11427,7 +12657,7 @@ const StyledOverlineText = material.styled("p", {
|
|
|
11427
12657
|
}}
|
|
11428
12658
|
`;
|
|
11429
12659
|
const StyledTitleText = material.styled("p", {
|
|
11430
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12660
|
+
shouldForwardProp: (prop) => !doNotForwardProps$o.includes(prop)
|
|
11431
12661
|
}) `
|
|
11432
12662
|
${fontHeaderXl}
|
|
11433
12663
|
${(props) => {
|
|
@@ -11439,7 +12669,7 @@ const StyledTitleText = material.styled("p", {
|
|
|
11439
12669
|
}}
|
|
11440
12670
|
`;
|
|
11441
12671
|
const StyledSubtitleText = material.styled("p", {
|
|
11442
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12672
|
+
shouldForwardProp: (prop) => !doNotForwardProps$o.includes(prop)
|
|
11443
12673
|
}) `
|
|
11444
12674
|
${fontHeaderM$1}
|
|
11445
12675
|
${(props) => {
|
|
@@ -11451,7 +12681,7 @@ const StyledSubtitleText = material.styled("p", {
|
|
|
11451
12681
|
}}
|
|
11452
12682
|
`;
|
|
11453
12683
|
const StyledMetadataText = material.styled("p", {
|
|
11454
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12684
|
+
shouldForwardProp: (prop) => !doNotForwardProps$o.includes(prop)
|
|
11455
12685
|
}) `
|
|
11456
12686
|
${fontBodyXxs$1}
|
|
11457
12687
|
${(props) => {
|
|
@@ -11481,9 +12711,9 @@ const ContentCardTitle = React.forwardRef(function ContentCardTitle(props, ref)
|
|
|
11481
12711
|
return (jsxRuntime.jsxs("div", { ref: ref, children: [jsxRuntime.jsxs(StyledTitleWrapper, { className: cn(cardHeader), children: [jsxRuntime.jsx(OverlineText, { text: overlineText, className: cardOverline }), jsxRuntime.jsx(TitleText, { text: titleText, className: cardTitle }), jsxRuntime.jsx(SubtitleText, { text: subtitleText, className: cardSubtitle })] }), jsxRuntime.jsx(MetadataText, { text: metadataText, className: cardMetadata })] }));
|
|
11482
12712
|
});
|
|
11483
12713
|
|
|
11484
|
-
const doNotForwardProps$
|
|
12714
|
+
const doNotForwardProps$n = ["buttonsPosition"];
|
|
11485
12715
|
const StyledCardActions = styled__default.default(material.CardActions, {
|
|
11486
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12716
|
+
shouldForwardProp: (prop) => !doNotForwardProps$n.includes(prop)
|
|
11487
12717
|
}) `
|
|
11488
12718
|
${(props) => {
|
|
11489
12719
|
const { buttonsPosition = "left" } = props;
|
|
@@ -11555,7 +12785,7 @@ const ContentCardActions = React.forwardRef(function ContentCardActions(props, r
|
|
|
11555
12785
|
});
|
|
11556
12786
|
|
|
11557
12787
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
11558
|
-
const doNotForwardProps$
|
|
12788
|
+
const doNotForwardProps$m = [
|
|
11559
12789
|
"imagePadding",
|
|
11560
12790
|
"boundingBox",
|
|
11561
12791
|
"sdsType",
|
|
@@ -11564,7 +12794,7 @@ const doNotForwardProps$o = [
|
|
|
11564
12794
|
"imagePosition",
|
|
11565
12795
|
];
|
|
11566
12796
|
const StyledImageMediaWrapper = material.styled("div", {
|
|
11567
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12797
|
+
shouldForwardProp: (prop) => !doNotForwardProps$m.includes(prop)
|
|
11568
12798
|
}) `
|
|
11569
12799
|
${(props) => {
|
|
11570
12800
|
const { imagePadding = false, boundingBox = true, sdsType = "wide", imagePosition = "left", } = props;
|
|
@@ -11732,9 +12962,9 @@ const ContentCard = React__namespace.default.forwardRef((props, ref) => {
|
|
|
11732
12962
|
});
|
|
11733
12963
|
|
|
11734
12964
|
// (thuang): Please keep this in sync with the props used in `ExtraProps`
|
|
11735
|
-
const doNotForwardProps$
|
|
12965
|
+
const doNotForwardProps$l = ["sdsSize"];
|
|
11736
12966
|
const StyledPaper = styled__default.default(material.Paper, {
|
|
11737
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
12967
|
+
shouldForwardProp: (prop) => !doNotForwardProps$l.includes(prop)
|
|
11738
12968
|
}) `
|
|
11739
12969
|
& {
|
|
11740
12970
|
${paperDimensions}
|
|
@@ -11840,9 +13070,9 @@ const CloseButton = React.forwardRef(function CloseButton(props, ref) {
|
|
|
11840
13070
|
return (jsxRuntime.jsx(StyledButton$1, __assign({ "aria-label": "Close", ref: ref, onClick: onClick, size: size, sdsStyle: "minimal", sdsType: "secondary", backgroundOnHover: false, className: className }, rest, { children: jsxRuntime.jsx(Icon, { sdsIcon: "XMark", sdsSize: iconSize }) })));
|
|
11841
13071
|
});
|
|
11842
13072
|
|
|
11843
|
-
const doNotForwardProps$
|
|
13073
|
+
const doNotForwardProps$k = ["sdsSize"];
|
|
11844
13074
|
const StyledDialogTitle = styled__default.default(material.DialogTitle, {
|
|
11845
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13075
|
+
shouldForwardProp: (prop) => !doNotForwardProps$k.includes(prop)
|
|
11846
13076
|
}) `
|
|
11847
13077
|
padding: 0;
|
|
11848
13078
|
${(props) => {
|
|
@@ -11855,7 +13085,7 @@ const StyledDialogTitle = styled__default.default(material.DialogTitle, {
|
|
|
11855
13085
|
}}
|
|
11856
13086
|
`;
|
|
11857
13087
|
const Title = styled__default.default(material.Typography, {
|
|
11858
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13088
|
+
shouldForwardProp: (prop) => !doNotForwardProps$k.includes(prop)
|
|
11859
13089
|
}) `
|
|
11860
13090
|
${(props) => {
|
|
11861
13091
|
const { sdsSize } = props;
|
|
@@ -11868,7 +13098,7 @@ const Title = styled__default.default(material.Typography, {
|
|
|
11868
13098
|
}}
|
|
11869
13099
|
`;
|
|
11870
13100
|
const Subtitle = styled__default.default(material.Typography, {
|
|
11871
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13101
|
+
shouldForwardProp: (prop) => !doNotForwardProps$k.includes(prop)
|
|
11872
13102
|
}) `
|
|
11873
13103
|
${(props) => {
|
|
11874
13104
|
const { sdsSize } = props;
|
|
@@ -11884,7 +13114,7 @@ const Subtitle = styled__default.default(material.Typography, {
|
|
|
11884
13114
|
}}
|
|
11885
13115
|
`;
|
|
11886
13116
|
const Overline = styled__default.default(material.Typography, {
|
|
11887
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13117
|
+
shouldForwardProp: (prop) => !doNotForwardProps$k.includes(prop)
|
|
11888
13118
|
}) `
|
|
11889
13119
|
${(props) => {
|
|
11890
13120
|
const { sdsSize } = props;
|
|
@@ -11908,9 +13138,9 @@ const DialogTitle = React.forwardRef(function DialogTitle(props, ref) {
|
|
|
11908
13138
|
});
|
|
11909
13139
|
|
|
11910
13140
|
// (thuang): Please keep this in sync with the props used in `DialogActionsExtraProps`
|
|
11911
|
-
const doNotForwardProps$
|
|
13141
|
+
const doNotForwardProps$j = ["buttonPosition", "sdsSize"];
|
|
11912
13142
|
const StyledDialogActions = styled__default.default(material.DialogActions, {
|
|
11913
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13143
|
+
shouldForwardProp: (prop) => !doNotForwardProps$j.includes(prop)
|
|
11914
13144
|
}) `
|
|
11915
13145
|
padding: 0;
|
|
11916
13146
|
|
|
@@ -11965,9 +13195,9 @@ const Dialog = React.forwardRef(function Dialog(props, ref) {
|
|
|
11965
13195
|
}) })));
|
|
11966
13196
|
});
|
|
11967
13197
|
|
|
11968
|
-
const doNotForwardProps$
|
|
13198
|
+
const doNotForwardProps$i = ["sdsSize"];
|
|
11969
13199
|
const StyledDialogContent = styled__default.default(material.DialogContent, {
|
|
11970
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13200
|
+
shouldForwardProp: (prop) => !doNotForwardProps$i.includes(prop)
|
|
11971
13201
|
}) `
|
|
11972
13202
|
${fontBodyS$1}
|
|
11973
13203
|
padding: 0;
|
|
@@ -12017,7 +13247,7 @@ const overlayContentPositionJustifyMapping = {
|
|
|
12017
13247
|
};
|
|
12018
13248
|
|
|
12019
13249
|
/* eslint-disable sonarjs/no-duplicate-string */
|
|
12020
|
-
const doNotForwardProps$
|
|
13250
|
+
const doNotForwardProps$h = [
|
|
12021
13251
|
"heroHeight",
|
|
12022
13252
|
"overlayContainerMinMargin",
|
|
12023
13253
|
"backgroundFillColor",
|
|
@@ -12044,7 +13274,7 @@ const getResponsivePadding = (props) => {
|
|
|
12044
13274
|
};
|
|
12045
13275
|
// Main Hero Container
|
|
12046
13276
|
const StyledHeroContainer = styled__default.default("section", {
|
|
12047
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
13277
|
+
shouldForwardProp: (prop) => !doNotForwardProps$h.includes(prop)
|
|
12048
13278
|
}) `
|
|
12049
13279
|
${(props) => {
|
|
12050
13280
|
const { heroHeight = "fit-content", overlayContentPosition, backgroundFillColor, } = props;
|
|
@@ -12179,306 +13409,111 @@ styled__default.default("div") `
|
|
|
12179
13409
|
const semanticColors = getSemanticColors(props);
|
|
12180
13410
|
return react.css `
|
|
12181
13411
|
color: ${semanticColors?.base?.textSecondary};
|
|
12182
|
-
border: 1px dashed ${semanticColors?.base?.borderSecondary};
|
|
12183
|
-
display: flex;
|
|
12184
|
-
justify-content: center;
|
|
12185
|
-
align-items: center;
|
|
12186
|
-
height: 100px;
|
|
12187
|
-
width: 100%;
|
|
12188
|
-
`;
|
|
12189
|
-
}}
|
|
12190
|
-
`;
|
|
12191
|
-
const DarkeningVignette = styled__default.default("div") `
|
|
12192
|
-
position: absolute;
|
|
12193
|
-
top: 0;
|
|
12194
|
-
left: 0;
|
|
12195
|
-
width: 100%;
|
|
12196
|
-
height: 40px;
|
|
12197
|
-
z-index: 1;
|
|
12198
|
-
background-image: linear-gradient(
|
|
12199
|
-
to bottom,
|
|
12200
|
-
black 0%,
|
|
12201
|
-
rgba(0, 0, 0, 0.738) 19%,
|
|
12202
|
-
rgba(0, 0, 0, 0.541) 34%,
|
|
12203
|
-
rgba(0, 0, 0, 0.382) 47%,
|
|
12204
|
-
rgba(0, 0, 0, 0.278) 56.5%,
|
|
12205
|
-
rgba(0, 0, 0, 0.194) 65%,
|
|
12206
|
-
rgba(0, 0, 0, 0.126) 73%,
|
|
12207
|
-
rgba(0, 0, 0, 0.075) 80.2%,
|
|
12208
|
-
rgba(0, 0, 0, 0.042) 86.1%,
|
|
12209
|
-
rgba(0, 0, 0, 0.021) 91%,
|
|
12210
|
-
rgba(0, 0, 0, 0.008) 95.2%,
|
|
12211
|
-
rgba(0, 0, 0, 0.002) 98.2%,
|
|
12212
|
-
transparent 100%
|
|
12213
|
-
);
|
|
12214
|
-
`;
|
|
12215
|
-
const OverlayMediaWrapper = styled__default.default("div") `
|
|
12216
|
-
${(props) => {
|
|
12217
|
-
const { overlayMediaPosition } = props;
|
|
12218
|
-
return react.css `
|
|
12219
|
-
display: flex;
|
|
12220
|
-
position: absolute;
|
|
12221
|
-
top: 0;
|
|
12222
|
-
left: 0;
|
|
12223
|
-
right: 0;
|
|
12224
|
-
bottom: 0;
|
|
12225
|
-
width: 100%;
|
|
12226
|
-
flex-direction: column;
|
|
12227
|
-
align-items: ${overlayMediaPosition
|
|
12228
|
-
? overlayContentPositionAlignMapping[overlayMediaPosition]
|
|
12229
|
-
: "center"};
|
|
12230
|
-
justify-content: ${overlayMediaPosition
|
|
12231
|
-
? overlayContentPositionJustifyMapping[overlayMediaPosition]
|
|
12232
|
-
: "center"};
|
|
12233
|
-
height: 100%;
|
|
12234
|
-
`;
|
|
12235
|
-
}}
|
|
12236
|
-
`;
|
|
12237
|
-
const OverlayMedia = styled__default.default("div") `
|
|
12238
|
-
${(props) => {
|
|
12239
|
-
const { overlayMediaMaxHeight, overlayMediaMaxWidth, overlayMediaMargin } = props;
|
|
12240
|
-
const breakpoints = getBreakpoints(props);
|
|
12241
|
-
return react.css `
|
|
12242
|
-
position: absolute;
|
|
12243
|
-
z-index: 1;
|
|
12244
|
-
width: ${overlayMediaMaxWidth};
|
|
12245
|
-
height: ${overlayMediaMaxHeight};
|
|
12246
|
-
margin: ${overlayMediaMargin
|
|
12247
|
-
? typeof overlayMediaMargin === "string"
|
|
12248
|
-
? overlayMediaMargin
|
|
12249
|
-
: overlayMediaMargin?.large
|
|
12250
|
-
: "0"};
|
|
12251
|
-
|
|
12252
|
-
${breakpoints?.down("lg")} {
|
|
12253
|
-
margin: ${overlayMediaMargin
|
|
12254
|
-
? typeof overlayMediaMargin === "string"
|
|
12255
|
-
? overlayMediaMargin
|
|
12256
|
-
: overlayMediaMargin?.medium
|
|
12257
|
-
: "0"};
|
|
12258
|
-
}
|
|
12259
|
-
|
|
12260
|
-
${breakpoints?.down("md")} {
|
|
12261
|
-
margin: ${overlayMediaMargin
|
|
12262
|
-
? typeof overlayMediaMargin === "string"
|
|
12263
|
-
? overlayMediaMargin
|
|
12264
|
-
: overlayMediaMargin?.small
|
|
12265
|
-
: "0"};
|
|
12266
|
-
}
|
|
12267
|
-
|
|
12268
|
-
img,
|
|
12269
|
-
video {
|
|
12270
|
-
width: 100%;
|
|
12271
|
-
height: 100%;
|
|
12272
|
-
object-fit: cover;
|
|
12273
|
-
object-position: center;
|
|
12274
|
-
}
|
|
12275
|
-
`;
|
|
12276
|
-
}}
|
|
12277
|
-
`;
|
|
12278
|
-
|
|
12279
|
-
const Hero = React__namespace.default.forwardRef((props, ref) => {
|
|
12280
|
-
const { heroHeight, children, headerText, captionText, headerFontSize, hasInvertTextColor, overlayContentWidth, textAlignment, darkeningMask, darkeningMaskColor = "#000000", darkeningMaskOpacity = 0, darkeningVignette, overlayMedia, overlayMediaPosition, overlayMediaMaxHeight, overlayMediaMaxWidth, overlayMediaMargin, backgroundFill, ...rest } = props;
|
|
12281
|
-
// Determine if backgroundFill is a color string or a React node
|
|
12282
|
-
const isBackgroundFillColorString = typeof backgroundFill === "string" && !React.isValidElement(backgroundFill);
|
|
12283
|
-
const isBackgroundFillReactNode = React.isValidElement(backgroundFill);
|
|
12284
|
-
return (jsxRuntime.jsxs(StyledHeroContainer, __assign({ ref: ref, heroHeight: heroHeight, backgroundFillColor: isBackgroundFillColorString ? backgroundFill : undefined }, rest, { children: [isBackgroundFillReactNode && (jsxRuntime.jsx(BackgroundFillContainer, { children: backgroundFill })), darkeningMask && (jsxRuntime.jsx(DarkeningMask, { darkeningMaskColor: darkeningMaskColor, darkeningMaskOpacity: darkeningMaskOpacity })), overlayMedia && (jsxRuntime.jsx(OverlayMediaWrapper, { overlayMediaPosition: overlayMediaPosition, children: jsxRuntime.jsx(OverlayMedia, { overlayMediaPosition: overlayMediaPosition, overlayMediaMaxHeight: overlayMediaMaxHeight, overlayMediaMaxWidth: overlayMediaMaxWidth, overlayMediaMargin: overlayMediaMargin, children: overlayMedia }) })), jsxRuntime.jsxs(OverlayContent, { overlayContentWidth: overlayContentWidth, textAlignment: textAlignment, children: [headerText && (jsxRuntime.jsx(HeroTitle, { headerFontSize: headerFontSize, hasInvertTextColor: hasInvertTextColor, children: headerText })), captionText && (jsxRuntime.jsx(HeroCaption, { hasInvertTextColor: hasInvertTextColor, children: captionText })), children && jsxRuntime.jsx(ContentSlot, { children: children })] }), darkeningVignette && jsxRuntime.jsx(DarkeningVignette, {})] })));
|
|
12285
|
-
});
|
|
12286
|
-
Hero.displayName = "Hero";
|
|
12287
|
-
|
|
12288
|
-
const intentToColor$1 = {
|
|
12289
|
-
default: "base",
|
|
12290
|
-
negative: "negative",
|
|
12291
|
-
notice: "notice",
|
|
12292
|
-
positive: "positive"
|
|
12293
|
-
};
|
|
12294
|
-
const StyledIcon = styled__default.default(Icon) `
|
|
12295
|
-
${(props) => {
|
|
12296
|
-
const iconSizes = getIconSizes(props);
|
|
12297
|
-
return `
|
|
12298
|
-
height: ${iconSizes?.xs.height}px;
|
|
12299
|
-
width: ${iconSizes?.xs.width}px;
|
|
12300
|
-
`;
|
|
12301
|
-
}}
|
|
12302
|
-
`;
|
|
12303
|
-
const StyledCheckboxDefaultIcon = styled__default.default("span") `
|
|
12304
|
-
${(props) => {
|
|
12305
|
-
const { intent = "default" } = props;
|
|
12306
|
-
const iconSizes = getIconSizes(props);
|
|
12307
|
-
const borders = getBorders(props);
|
|
12308
|
-
const borderColor = intentToColor$1[intent];
|
|
12309
|
-
return `
|
|
12310
|
-
height: ${iconSizes?.s.height}px;
|
|
12311
|
-
width: ${iconSizes?.s.width}px;
|
|
12312
|
-
border: ${borders?.[borderColor]?.default};
|
|
12313
|
-
border-radius: 2px;
|
|
12314
|
-
`;
|
|
12315
|
-
}}
|
|
12316
|
-
`;
|
|
12317
|
-
const StyledCheckboxCheckedIcon = styled__default.default("div") `
|
|
12318
|
-
${(props) => {
|
|
12319
|
-
const iconSizes = getIconSizes(props);
|
|
12320
|
-
const semanticColors = getSemanticColors(props);
|
|
12321
|
-
return `
|
|
12322
|
-
display: flex;
|
|
12323
|
-
align-items: center;
|
|
12324
|
-
justify-content: center;
|
|
12325
|
-
height: ${iconSizes?.s.height}px;
|
|
12326
|
-
width: ${iconSizes?.s.width}px;
|
|
12327
|
-
border-radius: 2px;
|
|
12328
|
-
background-color: ${semanticColors?.accent?.foreground};
|
|
12329
|
-
|
|
12330
|
-
${StyledIcon} {
|
|
12331
|
-
fill: ${semanticColors?.base?.ornamentPrimaryInverse};
|
|
12332
|
-
}
|
|
12333
|
-
`;
|
|
12334
|
-
}}
|
|
12335
|
-
`;
|
|
12336
|
-
const StyledCheckbox = styled__default.default(material.Checkbox) `
|
|
12337
|
-
${(props) => {
|
|
12338
|
-
const spaces = getSpaces(props);
|
|
12339
|
-
return `
|
|
12340
|
-
&.${material.checkboxClasses.root} {
|
|
12341
|
-
${focusVisibleA11yStyle(props)}
|
|
12342
|
-
|
|
12343
|
-
padding: 0;
|
|
12344
|
-
margin-right: ${spaces?.s}px;
|
|
12345
|
-
border-radius: 0;
|
|
12346
|
-
|
|
12347
|
-
&:hover {
|
|
12348
|
-
background-color: transparent;
|
|
12349
|
-
}
|
|
12350
|
-
}
|
|
12351
|
-
`;
|
|
12352
|
-
}}
|
|
12353
|
-
`;
|
|
12354
|
-
const StyledLabelContainer$1 = styled__default.default("span") `
|
|
12355
|
-
display: flex;
|
|
12356
|
-
justify-content: start;
|
|
12357
|
-
flex-direction: column;
|
|
12358
|
-
`;
|
|
12359
|
-
const StyledCheckboxLabel = styled__default.default("span") `
|
|
12360
|
-
${fontBodyXs$2}
|
|
12361
|
-
|
|
12362
|
-
${(props) => {
|
|
12363
|
-
const spaces = getSpaces(props);
|
|
12364
|
-
return `
|
|
12365
|
-
margin-top: -${spaces?.xxxs}px !important;
|
|
13412
|
+
border: 1px dashed ${semanticColors?.base?.borderSecondary};
|
|
13413
|
+
display: flex;
|
|
13414
|
+
justify-content: center;
|
|
13415
|
+
align-items: center;
|
|
13416
|
+
height: 100px;
|
|
13417
|
+
width: 100%;
|
|
12366
13418
|
`;
|
|
12367
13419
|
}}
|
|
12368
13420
|
`;
|
|
12369
|
-
const
|
|
12370
|
-
|
|
12371
|
-
|
|
13421
|
+
const DarkeningVignette = styled__default.default("div") `
|
|
13422
|
+
position: absolute;
|
|
13423
|
+
top: 0;
|
|
13424
|
+
left: 0;
|
|
13425
|
+
width: 100%;
|
|
13426
|
+
height: 40px;
|
|
13427
|
+
z-index: 1;
|
|
13428
|
+
background-image: linear-gradient(
|
|
13429
|
+
to bottom,
|
|
13430
|
+
black 0%,
|
|
13431
|
+
rgba(0, 0, 0, 0.738) 19%,
|
|
13432
|
+
rgba(0, 0, 0, 0.541) 34%,
|
|
13433
|
+
rgba(0, 0, 0, 0.382) 47%,
|
|
13434
|
+
rgba(0, 0, 0, 0.278) 56.5%,
|
|
13435
|
+
rgba(0, 0, 0, 0.194) 65%,
|
|
13436
|
+
rgba(0, 0, 0, 0.126) 73%,
|
|
13437
|
+
rgba(0, 0, 0, 0.075) 80.2%,
|
|
13438
|
+
rgba(0, 0, 0, 0.042) 86.1%,
|
|
13439
|
+
rgba(0, 0, 0, 0.021) 91%,
|
|
13440
|
+
rgba(0, 0, 0, 0.008) 95.2%,
|
|
13441
|
+
rgba(0, 0, 0, 0.002) 98.2%,
|
|
13442
|
+
transparent 100%
|
|
13443
|
+
);
|
|
13444
|
+
`;
|
|
13445
|
+
const OverlayMediaWrapper = styled__default.default("div") `
|
|
12372
13446
|
${(props) => {
|
|
12373
|
-
const
|
|
12374
|
-
return `
|
|
12375
|
-
|
|
13447
|
+
const { overlayMediaPosition } = props;
|
|
13448
|
+
return react.css `
|
|
13449
|
+
display: flex;
|
|
13450
|
+
position: absolute;
|
|
13451
|
+
top: 0;
|
|
13452
|
+
left: 0;
|
|
13453
|
+
right: 0;
|
|
13454
|
+
bottom: 0;
|
|
13455
|
+
width: 100%;
|
|
13456
|
+
flex-direction: column;
|
|
13457
|
+
align-items: ${overlayMediaPosition
|
|
13458
|
+
? overlayContentPositionAlignMapping[overlayMediaPosition]
|
|
13459
|
+
: "center"};
|
|
13460
|
+
justify-content: ${overlayMediaPosition
|
|
13461
|
+
? overlayContentPositionJustifyMapping[overlayMediaPosition]
|
|
13462
|
+
: "center"};
|
|
13463
|
+
height: 100%;
|
|
12376
13464
|
`;
|
|
12377
13465
|
}}
|
|
12378
13466
|
`;
|
|
12379
|
-
const
|
|
12380
|
-
const semanticColors = getSemanticColors(props);
|
|
12381
|
-
const borders = getBorders(props);
|
|
12382
|
-
return `
|
|
12383
|
-
user-select: none;
|
|
12384
|
-
|
|
12385
|
-
${StyledCheckboxDefaultIcon} {
|
|
12386
|
-
border: ${borders?.base?.disabled};
|
|
12387
|
-
}
|
|
12388
|
-
|
|
12389
|
-
${StyledCheckboxCheckedIcon} {
|
|
12390
|
-
background-color: ${semanticColors?.base?.ornamentDisabled};
|
|
12391
|
-
}
|
|
12392
|
-
|
|
12393
|
-
${StyledCheckboxCaption} {
|
|
12394
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
12395
|
-
}
|
|
12396
|
-
|
|
12397
|
-
&:hover, &:active {
|
|
12398
|
-
${StyledCheckboxDefaultIcon} {
|
|
12399
|
-
border: ${borders?.base?.disabled};
|
|
12400
|
-
}
|
|
12401
|
-
|
|
12402
|
-
${StyledCheckboxCheckedIcon} {
|
|
12403
|
-
background-color: ${semanticColors?.base?.ornamentDisabled};
|
|
12404
|
-
}
|
|
12405
|
-
}
|
|
12406
|
-
`;
|
|
12407
|
-
};
|
|
12408
|
-
const StyledFormControlLabel$1 = styled__default.default(material.FormControlLabel) `
|
|
13467
|
+
const OverlayMedia = styled__default.default("div") `
|
|
12409
13468
|
${(props) => {
|
|
12410
|
-
const {
|
|
12411
|
-
const
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
margin
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
border: ${borders?.base?.hover};
|
|
12423
|
-
background-color: ${disabled ? "transparent" : semanticColors?.base?.fillPrimaryInteraction};
|
|
12424
|
-
}
|
|
13469
|
+
const { overlayMediaMaxHeight, overlayMediaMaxWidth, overlayMediaMargin } = props;
|
|
13470
|
+
const breakpoints = getBreakpoints(props);
|
|
13471
|
+
return react.css `
|
|
13472
|
+
position: absolute;
|
|
13473
|
+
z-index: 1;
|
|
13474
|
+
width: ${overlayMediaMaxWidth};
|
|
13475
|
+
height: ${overlayMediaMaxHeight};
|
|
13476
|
+
margin: ${overlayMediaMargin
|
|
13477
|
+
? typeof overlayMediaMargin === "string"
|
|
13478
|
+
? overlayMediaMargin
|
|
13479
|
+
: overlayMediaMargin?.large
|
|
13480
|
+
: "0"};
|
|
12425
13481
|
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
13482
|
+
${breakpoints?.down("lg")} {
|
|
13483
|
+
margin: ${overlayMediaMargin
|
|
13484
|
+
? typeof overlayMediaMargin === "string"
|
|
13485
|
+
? overlayMediaMargin
|
|
13486
|
+
: overlayMediaMargin?.medium
|
|
13487
|
+
: "0"};
|
|
12429
13488
|
}
|
|
12430
13489
|
|
|
12431
|
-
|
|
12432
|
-
${
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
background-color: ${semanticColors?.accent?.fillPressed};
|
|
12438
|
-
}
|
|
13490
|
+
${breakpoints?.down("md")} {
|
|
13491
|
+
margin: ${overlayMediaMargin
|
|
13492
|
+
? typeof overlayMediaMargin === "string"
|
|
13493
|
+
? overlayMediaMargin
|
|
13494
|
+
: overlayMediaMargin?.small
|
|
13495
|
+
: "0"};
|
|
12439
13496
|
}
|
|
12440
13497
|
|
|
12441
|
-
|
|
13498
|
+
img,
|
|
13499
|
+
video {
|
|
13500
|
+
width: 100%;
|
|
13501
|
+
height: 100%;
|
|
13502
|
+
object-fit: cover;
|
|
13503
|
+
object-position: center;
|
|
13504
|
+
}
|
|
12442
13505
|
`;
|
|
12443
13506
|
}}
|
|
12444
13507
|
`;
|
|
12445
13508
|
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
const
|
|
12450
|
-
const
|
|
12451
|
-
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
case "checked":
|
|
12455
|
-
newProps = {
|
|
12456
|
-
...rest,
|
|
12457
|
-
checked: true,
|
|
12458
|
-
color: "primary"
|
|
12459
|
-
};
|
|
12460
|
-
break;
|
|
12461
|
-
case "unchecked":
|
|
12462
|
-
newProps = {
|
|
12463
|
-
...rest,
|
|
12464
|
-
checked: false,
|
|
12465
|
-
color: "default"
|
|
12466
|
-
};
|
|
12467
|
-
break;
|
|
12468
|
-
case "indeterminate":
|
|
12469
|
-
newProps = {
|
|
12470
|
-
...rest,
|
|
12471
|
-
checked: true,
|
|
12472
|
-
color: "primary",
|
|
12473
|
-
indeterminate: true
|
|
12474
|
-
};
|
|
12475
|
-
break;
|
|
12476
|
-
default:
|
|
12477
|
-
newProps = rest;
|
|
12478
|
-
}
|
|
12479
|
-
const finalLabel = caption ? (jsxRuntime.jsxs(StyledLabelContainer$1, { className: cn(labelCaptionContainerClassName), children: [jsxRuntime.jsx(StyledCheckboxLabel, { className: cn(labelClassName), children: label }), jsxRuntime.jsx(StyledCheckboxCaption, { className: cn(captionClassName), children: caption })] })) : (jsxRuntime.jsx(StyledLabelContainer$1, { className: cn(labelCaptionContainerClassName), children: jsxRuntime.jsx(StyledCheckboxLabel, { className: cn(labelClassName), children: label }) }));
|
|
12480
|
-
return (jsxRuntime.jsx(StyledFormControlLabel$1, { control: jsxRuntime.jsx(StyledCheckbox, __assign({ className: cn(checkboxClassName), checkedIcon: jsxRuntime.jsx(StyledCheckboxCheckedIcon, { className: cn(checkboxCheckedIconClassName), children: jsxRuntime.jsx(StyledIcon, { sdsIcon: "Check", sdsSize: "xs" }) }), icon: jsxRuntime.jsx(StyledCheckboxDefaultIcon, { intent: intent, className: cn(checkboxDefaultIconClassName) }), indeterminateIcon: jsxRuntime.jsx(StyledCheckboxCheckedIcon, { className: cn(checkboxIndeterminateIconClassName), children: jsxRuntime.jsx(StyledIcon, { sdsIcon: "Minus", sdsSize: "xs" }) }), intent: intent }, checkboxProps, newProps)), disabled: disabled, label: finalLabel, value: value, className: cn(rootClassName, className) }));
|
|
12481
|
-
};
|
|
13509
|
+
const Hero = React__namespace.default.forwardRef((props, ref) => {
|
|
13510
|
+
const { heroHeight, children, headerText, captionText, headerFontSize, hasInvertTextColor, overlayContentWidth, textAlignment, darkeningMask, darkeningMaskColor = "#000000", darkeningMaskOpacity = 0, darkeningVignette, overlayMedia, overlayMediaPosition, overlayMediaMaxHeight, overlayMediaMaxWidth, overlayMediaMargin, backgroundFill, ...rest } = props;
|
|
13511
|
+
// Determine if backgroundFill is a color string or a React node
|
|
13512
|
+
const isBackgroundFillColorString = typeof backgroundFill === "string" && !React.isValidElement(backgroundFill);
|
|
13513
|
+
const isBackgroundFillReactNode = React.isValidElement(backgroundFill);
|
|
13514
|
+
return (jsxRuntime.jsxs(StyledHeroContainer, __assign({ ref: ref, heroHeight: heroHeight, backgroundFillColor: isBackgroundFillColorString ? backgroundFill : undefined }, rest, { children: [isBackgroundFillReactNode && (jsxRuntime.jsx(BackgroundFillContainer, { children: backgroundFill })), darkeningMask && (jsxRuntime.jsx(DarkeningMask, { darkeningMaskColor: darkeningMaskColor, darkeningMaskOpacity: darkeningMaskOpacity })), overlayMedia && (jsxRuntime.jsx(OverlayMediaWrapper, { overlayMediaPosition: overlayMediaPosition, children: jsxRuntime.jsx(OverlayMedia, { overlayMediaPosition: overlayMediaPosition, overlayMediaMaxHeight: overlayMediaMaxHeight, overlayMediaMaxWidth: overlayMediaMaxWidth, overlayMediaMargin: overlayMediaMargin, children: overlayMedia }) })), jsxRuntime.jsxs(OverlayContent, { overlayContentWidth: overlayContentWidth, textAlignment: textAlignment, children: [headerText && (jsxRuntime.jsx(HeroTitle, { headerFontSize: headerFontSize, hasInvertTextColor: hasInvertTextColor, children: headerText })), captionText && (jsxRuntime.jsx(HeroCaption, { hasInvertTextColor: hasInvertTextColor, children: captionText })), children && jsxRuntime.jsx(ContentSlot, { children: children })] }), darkeningVignette && jsxRuntime.jsx(DarkeningVignette, {})] })));
|
|
13515
|
+
});
|
|
13516
|
+
Hero.displayName = "Hero";
|
|
12482
13517
|
|
|
12483
13518
|
const intentToColor = {
|
|
12484
13519
|
default: "base",
|
|
@@ -12529,11 +13564,13 @@ const StyledRadioCheckedIcon = styled__default.default("div") `
|
|
|
12529
13564
|
const StyledRadioButton = styled__default.default(material.Radio) `
|
|
12530
13565
|
${(props) => {
|
|
12531
13566
|
const spaces = getSpaces(props);
|
|
13567
|
+
const semanticColors = getSemanticColors(props);
|
|
12532
13568
|
return `
|
|
12533
13569
|
&.${material.radioClasses.root} {
|
|
12534
13570
|
${focusVisibleA11yStyle(props)}
|
|
12535
13571
|
margin: 0 ${spaces?.s}px 0 0;
|
|
12536
13572
|
padding: 0;
|
|
13573
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
12537
13574
|
}
|
|
12538
13575
|
`;
|
|
12539
13576
|
}}
|
|
@@ -12871,7 +13908,7 @@ const applyIntentColor = (props, intent) => {
|
|
|
12871
13908
|
}
|
|
12872
13909
|
`;
|
|
12873
13910
|
};
|
|
12874
|
-
const disabledStyled
|
|
13911
|
+
const disabledStyled = (props) => {
|
|
12875
13912
|
const borders = getBorders(props);
|
|
12876
13913
|
const semanticColors = getSemanticColors(props);
|
|
12877
13914
|
return react.css `
|
|
@@ -12931,6 +13968,8 @@ const StyledInputBase = styled__default.default(material.TextField, {
|
|
|
12931
13968
|
const semanticColors = getSemanticColors(props);
|
|
12932
13969
|
return react.css `
|
|
12933
13970
|
display: block;
|
|
13971
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
13972
|
+
border-radius: ${corners?.l}px;
|
|
12934
13973
|
|
|
12935
13974
|
.${material.outlinedInputClasses.root} {
|
|
12936
13975
|
width: 100%;
|
|
@@ -12978,7 +14017,7 @@ const StyledInputBase = styled__default.default(material.TextField, {
|
|
|
12978
14017
|
${intent === "negative" && applyIntentColor(props, "negative")}
|
|
12979
14018
|
${intent === "notice" && applyIntentColor(props, "notice")}
|
|
12980
14019
|
${intent === "positive" && applyIntentColor(props, "positive")}
|
|
12981
|
-
${disabled && disabledStyled
|
|
14020
|
+
${disabled && disabledStyled(props)}
|
|
12982
14021
|
`;
|
|
12983
14022
|
}}
|
|
12984
14023
|
`;
|
|
@@ -13019,6 +14058,7 @@ const toggle = (props) => {
|
|
|
13019
14058
|
const corners = getCorners(props);
|
|
13020
14059
|
const shadows = getShadows(props);
|
|
13021
14060
|
const iconSizes = getIconSizes(props);
|
|
14061
|
+
const semanticColors = getSemanticColors(props);
|
|
13022
14062
|
return `
|
|
13023
14063
|
cursor: ${disabled ? "default" : "pointer"};
|
|
13024
14064
|
border-radius: ${corners?.rounded}px;
|
|
@@ -13027,6 +14067,7 @@ const toggle = (props) => {
|
|
|
13027
14067
|
line-height: 18px;
|
|
13028
14068
|
padding: 0;
|
|
13029
14069
|
overflow: visible;
|
|
14070
|
+
background-color: ${semanticColors?.base?.backgroundPrimary} !important;
|
|
13030
14071
|
|
|
13031
14072
|
.${material.switchClasses.switchBase} {
|
|
13032
14073
|
${focusVisibleA11yStyle(props)}
|
|
@@ -13447,7 +14488,7 @@ const Legend = (props) => {
|
|
|
13447
14488
|
}) })));
|
|
13448
14489
|
};
|
|
13449
14490
|
|
|
13450
|
-
const doNotForwardProps$
|
|
14491
|
+
const doNotForwardProps$g = ["sdsStyle", "sdsSize", "fontWeight"];
|
|
13451
14492
|
const defaultStyle = (props) => {
|
|
13452
14493
|
const semanticColors = getSemanticColors(props);
|
|
13453
14494
|
return react.css `
|
|
@@ -13495,7 +14536,7 @@ const extraSmallStyle = (props) => {
|
|
|
13495
14536
|
};
|
|
13496
14537
|
const StyledLink = styled__default.default(material.Link, {
|
|
13497
14538
|
shouldForwardProp: (prop) => {
|
|
13498
|
-
return !doNotForwardProps$
|
|
14539
|
+
return !doNotForwardProps$g.includes(prop.toString());
|
|
13499
14540
|
}
|
|
13500
14541
|
}) `
|
|
13501
14542
|
all: unset;
|
|
@@ -13526,9 +14567,9 @@ const Link = React.forwardRef((props, ref) => {
|
|
|
13526
14567
|
});
|
|
13527
14568
|
|
|
13528
14569
|
// (thuang): Please keep this in sync with the props used in `ListExtraProps`
|
|
13529
|
-
const doNotForwardProps$
|
|
14570
|
+
const doNotForwardProps$f = ["marginBottom", "ordered"];
|
|
13530
14571
|
const StyledList = styled__default.default(material.List, {
|
|
13531
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14572
|
+
shouldForwardProp: (prop) => !doNotForwardProps$f.includes(prop)
|
|
13532
14573
|
}) `
|
|
13533
14574
|
.MuiListSubheader-root {
|
|
13534
14575
|
${propsToMarginBottom$1}
|
|
@@ -13573,9 +14614,9 @@ const fontBodyXs$1 = fontBody("xs");
|
|
|
13573
14614
|
const fontBodyXxs = fontBody("xxs");
|
|
13574
14615
|
const fontBodyXxxs = fontBody("xxxs");
|
|
13575
14616
|
// (thuang): Please keep this in sync with the props used in `ListItemExtraProps`
|
|
13576
|
-
const doNotForwardProps$
|
|
14617
|
+
const doNotForwardProps$e = ["marginBottom", "fontSize", "ordered"];
|
|
13577
14618
|
const StyledListItem = styled__default.default(material.ListItem, {
|
|
13578
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14619
|
+
shouldForwardProp: (prop) => !doNotForwardProps$e.includes(prop)
|
|
13579
14620
|
}) `
|
|
13580
14621
|
${propsToMarginBottom}
|
|
13581
14622
|
${propsToFontBody}
|
|
@@ -13725,9 +14766,9 @@ const tag = (props) => {
|
|
|
13725
14766
|
}
|
|
13726
14767
|
`;
|
|
13727
14768
|
};
|
|
13728
|
-
const doNotForwardProps$
|
|
14769
|
+
const doNotForwardProps$d = ["sdsStyle"];
|
|
13729
14770
|
const StyledLoadingIndicator = styled__default.default("div", {
|
|
13730
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14771
|
+
shouldForwardProp: (prop) => !doNotForwardProps$d.includes(prop)
|
|
13731
14772
|
}) `
|
|
13732
14773
|
${(props) => {
|
|
13733
14774
|
const { sdsStyle } = props;
|
|
@@ -13749,57 +14790,20 @@ const LoadingIndicator = ({ "aria-label": ariaLabel, sdsStyle, }) => {
|
|
|
13749
14790
|
return (jsxRuntime.jsxs(StyledLoadingIndicator, { sdsStyle: sdsStyle, "aria-label": "Loading", children: [jsxRuntime.jsx(Icon, { sdsIcon: "Loading", sdsSize: "l" }), jsxRuntime.jsx(StyledText, { "aria-label": ariaLabel, "aria-live": "polite", role: "status", children: "Loading" })] }));
|
|
13750
14791
|
};
|
|
13751
14792
|
|
|
13752
|
-
const StyledMenu = styled__default.default(material.Menu) `
|
|
13753
|
-
& {
|
|
13754
|
-
.${material.menuClasses.paper} {
|
|
13755
|
-
${(props) => {
|
|
13756
|
-
const spaces = getSpaces(props);
|
|
13757
|
-
const corners = getCorners(props);
|
|
13758
|
-
const semanticColors = getSemanticColors(props);
|
|
13759
|
-
return `
|
|
13760
|
-
background-color: ${semanticColors?.base?.surfacePrimary};
|
|
13761
|
-
background-image: none;
|
|
13762
|
-
padding: ${spaces?.xs}px;
|
|
13763
|
-
border-radius: ${corners?.l}px;
|
|
13764
|
-
`;
|
|
13765
|
-
}}
|
|
13766
|
-
}
|
|
13767
|
-
|
|
13768
|
-
.MuiList-padding {
|
|
13769
|
-
padding: 0;
|
|
13770
|
-
}
|
|
13771
|
-
}
|
|
13772
|
-
`;
|
|
13773
|
-
|
|
13774
|
-
const ANCHOR_ORIGIN = {
|
|
13775
|
-
horizontal: "center",
|
|
13776
|
-
vertical: "bottom"
|
|
13777
|
-
};
|
|
13778
|
-
const TRANSFORM_ORIGIN = {
|
|
13779
|
-
horizontal: "center",
|
|
13780
|
-
vertical: "top"
|
|
13781
|
-
};
|
|
13782
|
-
/**
|
|
13783
|
-
* @see https://mui.com/material-ui/react-menu/
|
|
13784
|
-
*/
|
|
13785
|
-
const Menu = (props) => {
|
|
13786
|
-
return (jsxRuntime.jsx(StyledMenu, __assign({ anchorOrigin: ANCHOR_ORIGIN, transformOrigin: TRANSFORM_ORIGIN }, props)));
|
|
13787
|
-
};
|
|
13788
|
-
|
|
13789
14793
|
const StyledMenuItem = styled__default.default(MenuItem) `
|
|
13790
14794
|
width: 100%;
|
|
13791
14795
|
`;
|
|
13792
|
-
const doNotForwardProps$
|
|
14796
|
+
const doNotForwardProps$c = ["search", "InputBaseProps", "keepSearchOnSelect"];
|
|
13793
14797
|
// (thuang): Casting the type to `Autocomplete`
|
|
13794
14798
|
// per https://github.com/mui-org/material-ui/issues/21727#issuecomment-880263271
|
|
13795
14799
|
const StyledAutocomplete = styled__default.default(material.Autocomplete, {
|
|
13796
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14800
|
+
shouldForwardProp: (prop) => !doNotForwardProps$c.includes(prop)
|
|
13797
14801
|
}) `
|
|
13798
14802
|
${({ search }) => !search && "height: 0; margin: 0 !important;"}
|
|
13799
14803
|
width: 100%;
|
|
13800
14804
|
`;
|
|
13801
14805
|
const InputBaseWrapper = styled__default.default("div", {
|
|
13802
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14806
|
+
shouldForwardProp: (prop) => !doNotForwardProps$c.includes(prop)
|
|
13803
14807
|
}) `
|
|
13804
14808
|
${(props) => {
|
|
13805
14809
|
const { search } = props;
|
|
@@ -13826,7 +14830,7 @@ const InputBaseWrapper = styled__default.default("div", {
|
|
|
13826
14830
|
}}
|
|
13827
14831
|
`;
|
|
13828
14832
|
const StyledMenuInputSearch = styled__default.default(InputSearch, {
|
|
13829
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14833
|
+
shouldForwardProp: (prop) => !doNotForwardProps$c.includes(prop)
|
|
13830
14834
|
}) `
|
|
13831
14835
|
&& {
|
|
13832
14836
|
margin: 0;
|
|
@@ -13899,9 +14903,9 @@ const MenuSelect = (props) => {
|
|
|
13899
14903
|
}
|
|
13900
14904
|
};
|
|
13901
14905
|
|
|
13902
|
-
const doNotForwardProps$
|
|
14906
|
+
const doNotForwardProps$b = ["hasInvertedStyle", "isNarrow"];
|
|
13903
14907
|
const StyledFooter = styled__default.default("footer", {
|
|
13904
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14908
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
13905
14909
|
}) `
|
|
13906
14910
|
${(props) => {
|
|
13907
14911
|
const { isNarrow } = props;
|
|
@@ -13925,7 +14929,7 @@ const StyledFooter = styled__default.default("footer", {
|
|
|
13925
14929
|
}}
|
|
13926
14930
|
`;
|
|
13927
14931
|
const StyledLogoWrapper$1 = styled__default.default("div", {
|
|
13928
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14932
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
13929
14933
|
}) `
|
|
13930
14934
|
${(props) => {
|
|
13931
14935
|
const spaces = getSpaces(props);
|
|
@@ -13963,7 +14967,7 @@ const StyledLogoWrapper$1 = styled__default.default("div", {
|
|
|
13963
14967
|
}
|
|
13964
14968
|
`;
|
|
13965
14969
|
const StyledNavSection = styled__default.default("div", {
|
|
13966
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14970
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
13967
14971
|
}) `
|
|
13968
14972
|
${(props) => {
|
|
13969
14973
|
const { isNarrow } = props;
|
|
@@ -13986,7 +14990,7 @@ const StyledNavSection = styled__default.default("div", {
|
|
|
13986
14990
|
}}
|
|
13987
14991
|
`;
|
|
13988
14992
|
const StyledTopSection = styled__default.default("div", {
|
|
13989
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
14993
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
13990
14994
|
}) `
|
|
13991
14995
|
${(props) => {
|
|
13992
14996
|
const { isNarrow } = props;
|
|
@@ -14021,7 +15025,7 @@ const StyledTopSection = styled__default.default("div", {
|
|
|
14021
15025
|
}}
|
|
14022
15026
|
`;
|
|
14023
15027
|
const StyledLinkSection = styled__default.default("div", {
|
|
14024
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15028
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
14025
15029
|
}) `
|
|
14026
15030
|
align-items: center;
|
|
14027
15031
|
display: flex;
|
|
@@ -14058,7 +15062,7 @@ const StyledMobileLinkRow = styled__default.default.div `
|
|
|
14058
15062
|
}}
|
|
14059
15063
|
`;
|
|
14060
15064
|
const StyledImageSection = styled__default.default("div", {
|
|
14061
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15065
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
14062
15066
|
}) `
|
|
14063
15067
|
align-items: center;
|
|
14064
15068
|
display: flex;
|
|
@@ -14094,7 +15098,7 @@ const StyledMobileImageRow = styled__default.default.div `
|
|
|
14094
15098
|
}}
|
|
14095
15099
|
`;
|
|
14096
15100
|
const StyledBottomSection = styled__default.default("div", {
|
|
14097
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15101
|
+
shouldForwardProp: (prop) => !doNotForwardProps$b.includes(prop)
|
|
14098
15102
|
}) `
|
|
14099
15103
|
align-items: center;
|
|
14100
15104
|
display: flex;
|
|
@@ -14118,7 +15122,7 @@ const StyledBottomSection = styled__default.default("div", {
|
|
|
14118
15122
|
}}
|
|
14119
15123
|
`;
|
|
14120
15124
|
|
|
14121
|
-
const doNotForwardProps$
|
|
15125
|
+
const doNotForwardProps$a = ["hasInvertedStyle", "isNarrow"];
|
|
14122
15126
|
const NarrowNavItemLinkStyles = (props) => {
|
|
14123
15127
|
const semanticColors = getSemanticColors(props);
|
|
14124
15128
|
const spaces = getSpaces(props);
|
|
@@ -14141,7 +15145,7 @@ const NarrowNavItemLinkStyles = (props) => {
|
|
|
14141
15145
|
`;
|
|
14142
15146
|
};
|
|
14143
15147
|
const StyledNavItemLink = styled__default.default(Link, {
|
|
14144
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15148
|
+
shouldForwardProp: (prop) => !doNotForwardProps$a.includes(prop)
|
|
14145
15149
|
}) `
|
|
14146
15150
|
${fontBodyMediumS}
|
|
14147
15151
|
|
|
@@ -14184,9 +15188,9 @@ const StyledNavItemLink = styled__default.default(Link, {
|
|
|
14184
15188
|
const NavItem = React.memo(({ item, hasInvertedStyle, isNarrow }) => (jsxRuntime.jsx(StyledNavItemLink, __assign({ href: item.url, hasInvertedStyle: hasInvertedStyle, isNarrow: isNarrow, component: item.component }, item.linkProps, { children: item.label }), item.label)));
|
|
14185
15189
|
NavItem.displayName = "NavItem";
|
|
14186
15190
|
|
|
14187
|
-
const doNotForwardProps$
|
|
15191
|
+
const doNotForwardProps$9 = ["hasInvertedStyle", "showDivider"];
|
|
14188
15192
|
const StyledLinkItemLink = styled__default.default(Link, {
|
|
14189
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15193
|
+
shouldForwardProp: (prop) => !doNotForwardProps$9.includes(prop)
|
|
14190
15194
|
}) `
|
|
14191
15195
|
${fontBodyXxs$1}
|
|
14192
15196
|
|
|
@@ -14235,7 +15239,7 @@ const StyledLinkItemLink = styled__default.default(Link, {
|
|
|
14235
15239
|
}}
|
|
14236
15240
|
`;
|
|
14237
15241
|
const StyledDivider$1 = styled__default.default(material.Divider, {
|
|
14238
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15242
|
+
shouldForwardProp: (prop) => !doNotForwardProps$9.includes(prop)
|
|
14239
15243
|
}) `
|
|
14240
15244
|
${(props) => {
|
|
14241
15245
|
const semanticColors = getSemanticColors(props);
|
|
@@ -14403,7 +15407,7 @@ function NavigationFooter({ backgroundAppearance = "matchBackground", images, lo
|
|
|
14403
15407
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
14404
15408
|
/* eslint-disable sonarjs/no-duplicate-string */
|
|
14405
15409
|
const TOOLBAR_HEIGHT = 48;
|
|
14406
|
-
const doNotForwardProps$
|
|
15410
|
+
const doNotForwardProps$8 = [
|
|
14407
15411
|
"hasInvertedStyle",
|
|
14408
15412
|
"isNarrow",
|
|
14409
15413
|
"primaryNavPosition",
|
|
@@ -14421,7 +15425,7 @@ const StyledTopComponentSlot = styled__default.default("div") `
|
|
|
14421
15425
|
z-index: 2100;
|
|
14422
15426
|
`;
|
|
14423
15427
|
const StyledAppBar = styled__default.default(material.AppBar, {
|
|
14424
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15428
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14425
15429
|
}) `
|
|
14426
15430
|
${(props) => {
|
|
14427
15431
|
const colors = getSemanticColors(props);
|
|
@@ -14452,7 +15456,7 @@ const NarrowToolbar = (props) => {
|
|
|
14452
15456
|
`;
|
|
14453
15457
|
};
|
|
14454
15458
|
const StyledToolbar = styled__default.default(material.Toolbar, {
|
|
14455
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15459
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14456
15460
|
}) `
|
|
14457
15461
|
${(props) => {
|
|
14458
15462
|
const { isNarrow } = props;
|
|
@@ -14469,7 +15473,7 @@ const StyledToolbar = styled__default.default(material.Toolbar, {
|
|
|
14469
15473
|
}}
|
|
14470
15474
|
`;
|
|
14471
15475
|
styled__default.default("div", {
|
|
14472
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15476
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14473
15477
|
}) `
|
|
14474
15478
|
${(props) => {
|
|
14475
15479
|
const shadows = getShadows(props);
|
|
@@ -14485,7 +15489,7 @@ styled__default.default("div", {
|
|
|
14485
15489
|
}}
|
|
14486
15490
|
`;
|
|
14487
15491
|
styled__default.default("div", {
|
|
14488
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15492
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14489
15493
|
}) `
|
|
14490
15494
|
${(props) => {
|
|
14491
15495
|
const colors = getSemanticColors(props);
|
|
@@ -14501,7 +15505,7 @@ styled__default.default("div", {
|
|
|
14501
15505
|
}}
|
|
14502
15506
|
`;
|
|
14503
15507
|
const StyledHeaderButton = styled__default.default(Button, {
|
|
14504
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15508
|
+
shouldForwardProp: (prop) => !doNotForwardProps$8.includes(prop)
|
|
14505
15509
|
}) `
|
|
14506
15510
|
${(props) => {
|
|
14507
15511
|
const { sdsType, hasInvertedStyle } = props;
|
|
@@ -14543,7 +15547,7 @@ const invertedNarrowButtonStyles = (props) => {
|
|
|
14543
15547
|
`;
|
|
14544
15548
|
};
|
|
14545
15549
|
const StyledNarrowIconButton = styled__default.default(Button, {
|
|
14546
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15550
|
+
shouldForwardProp: (prop) => !doNotForwardProps$8.includes(prop)
|
|
14547
15551
|
}) `
|
|
14548
15552
|
${(props) => {
|
|
14549
15553
|
const { hasInvertedStyle, isNarrow } = props;
|
|
@@ -14571,7 +15575,7 @@ const invertedWideButtonStyles = (props) => {
|
|
|
14571
15575
|
`;
|
|
14572
15576
|
};
|
|
14573
15577
|
const StyledWideIconButton = styled__default.default(Button, {
|
|
14574
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15578
|
+
shouldForwardProp: (prop) => !doNotForwardProps$8.includes(prop)
|
|
14575
15579
|
}) `
|
|
14576
15580
|
${(props) => {
|
|
14577
15581
|
const { hasInvertedStyle } = props;
|
|
@@ -14582,7 +15586,7 @@ const StyledWideIconButton = styled__default.default(Button, {
|
|
|
14582
15586
|
}}
|
|
14583
15587
|
`;
|
|
14584
15588
|
const StyledLogoLinkWrapper = styled__default.default(Link, {
|
|
14585
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15589
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14586
15590
|
}) `
|
|
14587
15591
|
align-items: center;
|
|
14588
15592
|
display: flex;
|
|
@@ -14608,7 +15612,7 @@ const NarrowTitleContainer = () => {
|
|
|
14608
15612
|
`;
|
|
14609
15613
|
};
|
|
14610
15614
|
const StyledTitleContainer = styled__default.default("div", {
|
|
14611
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15615
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14612
15616
|
}) `
|
|
14613
15617
|
display: flex;
|
|
14614
15618
|
align-items: center;
|
|
@@ -14630,7 +15634,7 @@ const StyledTitleContainer = styled__default.default("div", {
|
|
|
14630
15634
|
}}
|
|
14631
15635
|
`;
|
|
14632
15636
|
const StyledTitleTagWrapper = styled__default.default("div", {
|
|
14633
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15637
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14634
15638
|
}) `
|
|
14635
15639
|
${(props) => {
|
|
14636
15640
|
const spaces = getSpaces(props);
|
|
@@ -14651,7 +15655,7 @@ const StyledTag$2 = styled__default.default(Tag) `
|
|
|
14651
15655
|
margin: 0;
|
|
14652
15656
|
`;
|
|
14653
15657
|
const StyledPrimaryNavContainer = styled__default.default("div", {
|
|
14654
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15658
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14655
15659
|
}) `
|
|
14656
15660
|
align-items: center;
|
|
14657
15661
|
display: flex;
|
|
@@ -14674,7 +15678,7 @@ const StyledPrimaryNavContainer = styled__default.default("div", {
|
|
|
14674
15678
|
}}
|
|
14675
15679
|
`;
|
|
14676
15680
|
const StyledSearch = styled__default.default(InputSearch, {
|
|
14677
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15681
|
+
shouldForwardProp: (prop) => !doNotForwardProps$8.includes(prop)
|
|
14678
15682
|
}) `
|
|
14679
15683
|
margin: 0;
|
|
14680
15684
|
width: 100%;
|
|
@@ -14809,7 +15813,7 @@ const NarrowButtonStyles = (props) => {
|
|
|
14809
15813
|
`;
|
|
14810
15814
|
};
|
|
14811
15815
|
const StyledButtonSection = styled__default.default("section", {
|
|
14812
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15816
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14813
15817
|
}) `
|
|
14814
15818
|
display: flex;
|
|
14815
15819
|
align-items: center;
|
|
@@ -14827,7 +15831,7 @@ const StyledButtonSection = styled__default.default("section", {
|
|
|
14827
15831
|
}}
|
|
14828
15832
|
`;
|
|
14829
15833
|
const StyledDrawer$1 = styled__default.default(material.Drawer, {
|
|
14830
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15834
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle", "topOffset"].includes(prop)
|
|
14831
15835
|
}) `
|
|
14832
15836
|
${(props) => {
|
|
14833
15837
|
const colors = getSemanticColors(props);
|
|
@@ -14848,7 +15852,7 @@ const StyledDrawer$1 = styled__default.default(material.Drawer, {
|
|
|
14848
15852
|
}}
|
|
14849
15853
|
`;
|
|
14850
15854
|
const StyledDrawerContent = styled__default.default("div", {
|
|
14851
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15855
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14852
15856
|
}) `
|
|
14853
15857
|
${(props) => {
|
|
14854
15858
|
const spaces = getSpaces(props);
|
|
@@ -14862,7 +15866,7 @@ const StyledDrawerContent = styled__default.default("div", {
|
|
|
14862
15866
|
}}
|
|
14863
15867
|
`;
|
|
14864
15868
|
const StyledNarrowHamburgerMenuButton = styled__default.default(Button, {
|
|
14865
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
15869
|
+
shouldForwardProp: (prop) => !doNotForwardProps$8.includes(prop)
|
|
14866
15870
|
}) `
|
|
14867
15871
|
${(props) => {
|
|
14868
15872
|
const { hasInvertedStyle } = props;
|
|
@@ -14907,7 +15911,7 @@ const DrawerAccordionStyles = (props) => {
|
|
|
14907
15911
|
`;
|
|
14908
15912
|
};
|
|
14909
15913
|
const StyledAccordion = styled__default.default(Accordion, {
|
|
14910
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
15914
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
14911
15915
|
}) `
|
|
14912
15916
|
padding: 0 !important;
|
|
14913
15917
|
width: 100%;
|
|
@@ -15057,7 +16061,7 @@ const StyledAccordion = styled__default.default(Accordion, {
|
|
|
15057
16061
|
}}
|
|
15058
16062
|
`;
|
|
15059
16063
|
const StyledSectionDivider = styled__default.default(material.Divider, {
|
|
15060
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16064
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15061
16065
|
}) `
|
|
15062
16066
|
${(props) => {
|
|
15063
16067
|
const semanticColors = getSemanticColors(props);
|
|
@@ -15072,7 +16076,7 @@ const StyledSectionDivider = styled__default.default(material.Divider, {
|
|
|
15072
16076
|
`;
|
|
15073
16077
|
// Hover Drawer Components for sdsStyle="drawer"
|
|
15074
16078
|
const StyledMegaMenuDrawer = styled__default.default(material.Drawer, {
|
|
15075
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16079
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle", "topOffset"].includes(prop)
|
|
15076
16080
|
}) `
|
|
15077
16081
|
${(props) => {
|
|
15078
16082
|
const { hasInvertedStyle, topOffset = 0 } = props;
|
|
@@ -15108,7 +16112,7 @@ const StyledMegaMenuDrawer = styled__default.default(material.Drawer, {
|
|
|
15108
16112
|
}}
|
|
15109
16113
|
`;
|
|
15110
16114
|
const StyledMegaMenuContent = styled__default.default("div", {
|
|
15111
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16115
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15112
16116
|
}) `
|
|
15113
16117
|
${(props) => {
|
|
15114
16118
|
const { hasInvertedStyle } = props;
|
|
@@ -15130,7 +16134,7 @@ const StyledMegaMenuContent = styled__default.default("div", {
|
|
|
15130
16134
|
}}
|
|
15131
16135
|
`;
|
|
15132
16136
|
const StyledHoverDrawerColumn = styled__default.default("div", {
|
|
15133
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16137
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle", "totalColumns"].includes(prop)
|
|
15134
16138
|
}) `
|
|
15135
16139
|
${(props) => {
|
|
15136
16140
|
const spaces = getSpaces(props);
|
|
@@ -15169,7 +16173,7 @@ const StyledContentWrapper = styled__default.default("div") `
|
|
|
15169
16173
|
}}
|
|
15170
16174
|
`;
|
|
15171
16175
|
const StyledHoverDrawerColumnHeader = styled__default.default("div", {
|
|
15172
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16176
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15173
16177
|
}) `
|
|
15174
16178
|
${(props) => {
|
|
15175
16179
|
const { hasInvertedStyle } = props;
|
|
@@ -15187,7 +16191,7 @@ const StyledHoverDrawerColumnHeader = styled__default.default("div", {
|
|
|
15187
16191
|
}}
|
|
15188
16192
|
`;
|
|
15189
16193
|
const StyledHoverDrawerItem = styled__default.default(Button, {
|
|
15190
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16194
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15191
16195
|
}) `
|
|
15192
16196
|
${(props) => {
|
|
15193
16197
|
const { hasInvertedStyle, hasDetails } = props;
|
|
@@ -15231,7 +16235,7 @@ const StyledHoverDrawerItem = styled__default.default(Button, {
|
|
|
15231
16235
|
}}
|
|
15232
16236
|
`;
|
|
15233
16237
|
const StyledHoverDrawerItemContent = styled__default.default("div", {
|
|
15234
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16238
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15235
16239
|
}) `
|
|
15236
16240
|
${(props) => {
|
|
15237
16241
|
const spaces = getSpaces(props);
|
|
@@ -15244,7 +16248,7 @@ const StyledHoverDrawerItemContent = styled__default.default("div", {
|
|
|
15244
16248
|
}}
|
|
15245
16249
|
`;
|
|
15246
16250
|
const StyledHoverDrawerItemIcon = styled__default.default("div", {
|
|
15247
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16251
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15248
16252
|
}) `
|
|
15249
16253
|
${(props) => {
|
|
15250
16254
|
const semanticColors = getSemanticColors(props);
|
|
@@ -15264,7 +16268,7 @@ const StyledHoverDrawerItemIcon = styled__default.default("div", {
|
|
|
15264
16268
|
}}
|
|
15265
16269
|
`;
|
|
15266
16270
|
const StyledHoverDrawerItemText = styled__default.default("div", {
|
|
15267
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16271
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15268
16272
|
}) `
|
|
15269
16273
|
${() => {
|
|
15270
16274
|
return material.css `
|
|
@@ -15277,7 +16281,7 @@ const StyledHoverDrawerItemText = styled__default.default("div", {
|
|
|
15277
16281
|
}}
|
|
15278
16282
|
`;
|
|
15279
16283
|
const EmptyIcon = styled__default.default("div", {
|
|
15280
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16284
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15281
16285
|
}) `
|
|
15282
16286
|
${(props) => {
|
|
15283
16287
|
const { hasDetails } = props;
|
|
@@ -15292,7 +16296,7 @@ const EmptyIcon = styled__default.default("div", {
|
|
|
15292
16296
|
}}
|
|
15293
16297
|
`;
|
|
15294
16298
|
const StyledHoverDrawerItemTitle = styled__default.default("div", {
|
|
15295
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16299
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15296
16300
|
}) `
|
|
15297
16301
|
${(props) => {
|
|
15298
16302
|
const { hasInvertedStyle, hasDetails } = props;
|
|
@@ -15317,7 +16321,7 @@ const StyledHoverDrawerItemTitle = styled__default.default("div", {
|
|
|
15317
16321
|
}}
|
|
15318
16322
|
`;
|
|
15319
16323
|
const StyledHoverDrawerItemDetails = styled__default.default("div", {
|
|
15320
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16324
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15321
16325
|
}) `
|
|
15322
16326
|
${(props) => {
|
|
15323
16327
|
const { hasInvertedStyle } = props;
|
|
@@ -15335,7 +16339,7 @@ const StyledHoverDrawerItemDetails = styled__default.default("div", {
|
|
|
15335
16339
|
}}
|
|
15336
16340
|
`;
|
|
15337
16341
|
const StyledHoverDrawerActions = styled__default.default("div", {
|
|
15338
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16342
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15339
16343
|
}) `
|
|
15340
16344
|
${(props) => {
|
|
15341
16345
|
const spaces = getSpaces(props);
|
|
@@ -15374,12 +16378,12 @@ const StyledButton = styled__default.default(Button) `
|
|
|
15374
16378
|
}}
|
|
15375
16379
|
`;
|
|
15376
16380
|
const StyledHoverDrawerContainer = styled__default.default("div", {
|
|
15377
|
-
shouldForwardProp: (prop) => ![...doNotForwardProps$
|
|
16381
|
+
shouldForwardProp: (prop) => ![...doNotForwardProps$8, "sdsStyle"].includes(prop)
|
|
15378
16382
|
}) `
|
|
15379
16383
|
position: relative;
|
|
15380
16384
|
`;
|
|
15381
16385
|
|
|
15382
|
-
const doNotForwardProps$
|
|
16386
|
+
const doNotForwardProps$7 = [
|
|
15383
16387
|
"active",
|
|
15384
16388
|
"hasInvertedStyle",
|
|
15385
16389
|
"isNarrow",
|
|
@@ -15440,7 +16444,7 @@ const NarrowPrimaryNavItem = (props) => {
|
|
|
15440
16444
|
`;
|
|
15441
16445
|
};
|
|
15442
16446
|
styled__default.default(Button, {
|
|
15443
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16447
|
+
shouldForwardProp: (prop) => !doNotForwardProps$7.includes(prop)
|
|
15444
16448
|
}) `
|
|
15445
16449
|
display: flex;
|
|
15446
16450
|
align-items: center;
|
|
@@ -15505,7 +16509,7 @@ const NarrowStyledLabel = (props) => {
|
|
|
15505
16509
|
`;
|
|
15506
16510
|
};
|
|
15507
16511
|
const StyledLabel$1 = styled__default.default("span", {
|
|
15508
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16512
|
+
shouldForwardProp: (prop) => !doNotForwardProps$7.includes(prop)
|
|
15509
16513
|
}) `
|
|
15510
16514
|
${(props) => {
|
|
15511
16515
|
const { hasInvertedStyle, active, isNarrow } = props;
|
|
@@ -15538,7 +16542,7 @@ const StyledLabel$1 = styled__default.default("span", {
|
|
|
15538
16542
|
`;
|
|
15539
16543
|
|
|
15540
16544
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
15541
|
-
const doNotForwardProps$
|
|
16545
|
+
const doNotForwardProps$6 = [
|
|
15542
16546
|
"active",
|
|
15543
16547
|
"hasInvertedStyle",
|
|
15544
16548
|
"isNarrow",
|
|
@@ -15604,7 +16608,7 @@ const NarrowNavItemStyles = (props) => {
|
|
|
15604
16608
|
`;
|
|
15605
16609
|
};
|
|
15606
16610
|
const UnifiedNavItem = styled__default.default(Button, {
|
|
15607
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16611
|
+
shouldForwardProp: (prop) => !doNotForwardProps$6.includes(prop)
|
|
15608
16612
|
}) `
|
|
15609
16613
|
display: flex;
|
|
15610
16614
|
align-items: center;
|
|
@@ -15686,7 +16690,7 @@ const UnifiedNavItem = styled__default.default(Button, {
|
|
|
15686
16690
|
`;
|
|
15687
16691
|
// StyledLabel for primary nav items (secondary nav doesn't use this)
|
|
15688
16692
|
const StyledLabel = styled__default.default("span", {
|
|
15689
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16693
|
+
shouldForwardProp: (prop) => !doNotForwardProps$6.includes(prop)
|
|
15690
16694
|
}) `
|
|
15691
16695
|
${(props) => {
|
|
15692
16696
|
const { hasInvertedStyle, active, isNarrow } = props;
|
|
@@ -15716,7 +16720,7 @@ const StyledLabel = styled__default.default("span", {
|
|
|
15716
16720
|
}}
|
|
15717
16721
|
`;
|
|
15718
16722
|
|
|
15719
|
-
const doNotForwardProps$
|
|
16723
|
+
const doNotForwardProps$5 = [
|
|
15720
16724
|
"isNarrow",
|
|
15721
16725
|
"hasSection",
|
|
15722
16726
|
"hasInvertedStyle",
|
|
@@ -15732,7 +16736,7 @@ const NarrowStyledSection = (props) => {
|
|
|
15732
16736
|
`;
|
|
15733
16737
|
};
|
|
15734
16738
|
const StyledSection = styled__default.default("section", {
|
|
15735
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16739
|
+
shouldForwardProp: (prop) => !doNotForwardProps$5.includes(prop)
|
|
15736
16740
|
}) `
|
|
15737
16741
|
display: flex;
|
|
15738
16742
|
align-items: center;
|
|
@@ -15748,7 +16752,7 @@ const StyledSection = styled__default.default("section", {
|
|
|
15748
16752
|
}}
|
|
15749
16753
|
`;
|
|
15750
16754
|
const StyledSectionHeader = styled__default.default(ListSubheader, {
|
|
15751
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16755
|
+
shouldForwardProp: (prop) => !doNotForwardProps$5.includes(prop)
|
|
15752
16756
|
}) `
|
|
15753
16757
|
${(props) => {
|
|
15754
16758
|
const { isNarrow, hasInvertedStyle, sdsStyle } = props;
|
|
@@ -15793,7 +16797,7 @@ const StyledSectionHeader = styled__default.default(ListSubheader, {
|
|
|
15793
16797
|
}}
|
|
15794
16798
|
`;
|
|
15795
16799
|
const StyledAccordionDetails = styled__default.default(AccordionDetails, {
|
|
15796
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16800
|
+
shouldForwardProp: (prop) => !doNotForwardProps$5.includes(prop)
|
|
15797
16801
|
}) `
|
|
15798
16802
|
${(props) => {
|
|
15799
16803
|
const { sdsStyle } = props;
|
|
@@ -15809,7 +16813,7 @@ const StyledAccordionDetails = styled__default.default(AccordionDetails, {
|
|
|
15809
16813
|
}}
|
|
15810
16814
|
`;
|
|
15811
16815
|
const StyledAccordionSection = styled__default.default("div", {
|
|
15812
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16816
|
+
shouldForwardProp: (prop) => !doNotForwardProps$5.includes(prop)
|
|
15813
16817
|
}) `
|
|
15814
16818
|
${(props) => {
|
|
15815
16819
|
const { sdsStyle, hasInvertedStyle } = props;
|
|
@@ -15831,7 +16835,7 @@ const StyledAccordionSection = styled__default.default("div", {
|
|
|
15831
16835
|
}}
|
|
15832
16836
|
`;
|
|
15833
16837
|
const StyledDivider = styled__default.default(material.Divider, {
|
|
15834
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16838
|
+
shouldForwardProp: (prop) => !doNotForwardProps$5.includes(prop)
|
|
15835
16839
|
}) `
|
|
15836
16840
|
${(props) => {
|
|
15837
16841
|
const { hasSection, isNarrow, hasInvertedStyle } = props;
|
|
@@ -15940,7 +16944,7 @@ function DrawerContent({ drawerItems, sectionProps, section, hasMultipleSections
|
|
|
15940
16944
|
}) }))] }));
|
|
15941
16945
|
}
|
|
15942
16946
|
|
|
15943
|
-
const doNotForwardProps$
|
|
16947
|
+
const doNotForwardProps$4 = [
|
|
15944
16948
|
"hasInvertedStyle",
|
|
15945
16949
|
"hasCaption",
|
|
15946
16950
|
"iconSize",
|
|
@@ -15949,7 +16953,7 @@ const doNotForwardProps$6 = [
|
|
|
15949
16953
|
"sdsStyle",
|
|
15950
16954
|
];
|
|
15951
16955
|
const StyledDrawerNavItem = styled__default.default(Button, {
|
|
15952
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
16956
|
+
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
15953
16957
|
}) `
|
|
15954
16958
|
${(props) => {
|
|
15955
16959
|
const spaces = getSpaces(props);
|
|
@@ -16001,7 +17005,7 @@ const StyledDrawerNavItem = styled__default.default(Button, {
|
|
|
16001
17005
|
}}
|
|
16002
17006
|
`;
|
|
16003
17007
|
const StyledDrawerNavItemContent = styled__default.default("div", {
|
|
16004
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
17008
|
+
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
16005
17009
|
}) `
|
|
16006
17010
|
${(props) => {
|
|
16007
17011
|
const spaces = getSpaces(props);
|
|
@@ -16016,7 +17020,7 @@ const StyledDrawerNavItemContent = styled__default.default("div", {
|
|
|
16016
17020
|
}}
|
|
16017
17021
|
`;
|
|
16018
17022
|
const StyledDrawerNavItemText = styled__default.default("div", {
|
|
16019
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
17023
|
+
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
16020
17024
|
}) `
|
|
16021
17025
|
${(props) => {
|
|
16022
17026
|
const { hasDetails, hasInvertedStyle } = props;
|
|
@@ -16035,7 +17039,7 @@ const StyledDrawerNavItemText = styled__default.default("div", {
|
|
|
16035
17039
|
}}
|
|
16036
17040
|
`;
|
|
16037
17041
|
const StyledDrawerNavItemCaption = styled__default.default("div", {
|
|
16038
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
17042
|
+
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
16039
17043
|
}) `
|
|
16040
17044
|
${(props) => {
|
|
16041
17045
|
const semanticColors = getSemanticColors(props);
|
|
@@ -16055,7 +17059,7 @@ const StyledDrawerNavItemCaption = styled__default.default("div", {
|
|
|
16055
17059
|
}}
|
|
16056
17060
|
`;
|
|
16057
17061
|
const StyledIconWrapper = styled__default.default("div", {
|
|
16058
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
17062
|
+
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
16059
17063
|
}) `
|
|
16060
17064
|
${(props) => {
|
|
16061
17065
|
const { iconSize } = props;
|
|
@@ -17045,9 +18049,9 @@ const useScrollStopListener = (callback, timeout = 50) => {
|
|
|
17045
18049
|
}, [timeout]);
|
|
17046
18050
|
};
|
|
17047
18051
|
|
|
17048
|
-
const doNotForwardProps$
|
|
18052
|
+
const doNotForwardProps$3 = ["items", "sdsIndicatorColor", "width", "isSubItem"];
|
|
17049
18053
|
const StyledTabs$1 = styled__default.default(material.Tabs, {
|
|
17050
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
18054
|
+
shouldForwardProp: (prop) => !doNotForwardProps$3.includes(prop)
|
|
17051
18055
|
}) `
|
|
17052
18056
|
${(props) => {
|
|
17053
18057
|
const { width = "100%" } = props;
|
|
@@ -17086,7 +18090,7 @@ const StyledTabs$1 = styled__default.default(material.Tabs, {
|
|
|
17086
18090
|
}}
|
|
17087
18091
|
`;
|
|
17088
18092
|
const StyledTab$1 = styled__default.default(material.Tab, {
|
|
17089
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
18093
|
+
shouldForwardProp: (prop) => !doNotForwardProps$3.includes(prop)
|
|
17090
18094
|
}) `
|
|
17091
18095
|
${fontBodyMediumXs}
|
|
17092
18096
|
|
|
@@ -17282,451 +18286,185 @@ const NavigationJumpTo = React.forwardRef((props, ref) => {
|
|
|
17282
18286
|
targetItem?.elementRef?.current?.scrollIntoView({
|
|
17283
18287
|
behavior: "smooth",
|
|
17284
18288
|
block: "start"
|
|
17285
|
-
});
|
|
17286
|
-
}
|
|
17287
|
-
// Update the tab value to newValue to adjust the position of the tabsIndicator
|
|
17288
|
-
setFirstTabIndexInview(newValue);
|
|
17289
|
-
// Invoke the custom onChange prop
|
|
17290
|
-
handleOnChange(newValue, event, "click");
|
|
17291
|
-
};
|
|
17292
|
-
// Observe changes in the sectionIsInView object to update the tabs value
|
|
17293
|
-
// based on the index of the visible sections in the viewport.
|
|
17294
|
-
React.useEffect(() => {
|
|
17295
|
-
// Retrieve the index of the first section that is intersecting with the viewport.
|
|
17296
|
-
const flattenedSectionInView = Object.values(sectionIsInView).findIndex((section) => section.isInView);
|
|
17297
|
-
// Convert flattened index back to tab index
|
|
17298
|
-
const tabSectionInView = tabToFlattenedIndexMap.findIndex((flatIndex) => flatIndex === flattenedSectionInView);
|
|
17299
|
-
// Update the tabs value only if a section is present in the viewport
|
|
17300
|
-
// and no navigation item has been clicked, preventing updates during window scroll
|
|
17301
|
-
// and unnecessary movement of the tabs indicator.
|
|
17302
|
-
if (tabSectionInView > -1 && !navItemClicked) {
|
|
17303
|
-
setFirstTabIndexInview(tabSectionInView);
|
|
17304
|
-
// Invoke the custom onChange prop
|
|
17305
|
-
handleOnChange(tabSectionInView, {
|
|
17306
|
-
target: flattenedItems[flattenedSectionInView],
|
|
17307
|
-
type: "scroll"
|
|
17308
|
-
}, "scroll");
|
|
17309
|
-
}
|
|
17310
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17311
|
-
}, [
|
|
17312
|
-
handleOnChange,
|
|
17313
|
-
flattenedItems,
|
|
17314
|
-
sectionIsInView,
|
|
17315
|
-
tabToFlattenedIndexMap,
|
|
17316
|
-
]);
|
|
17317
|
-
// Set navItemClicked to false to re-enable the option
|
|
17318
|
-
// to update the tab value based on scroll.
|
|
17319
|
-
useScrollStopListener(() => {
|
|
17320
|
-
setNavItemClicked(false);
|
|
17321
|
-
});
|
|
17322
|
-
return (jsxRuntime.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)) })));
|
|
17323
|
-
});
|
|
17324
|
-
|
|
17325
|
-
const fontBodyXs = fontBody("xs");
|
|
17326
|
-
const doNotForwardProps$4 = ["slideDirection"];
|
|
17327
|
-
const StyledNotification = styled__default.default(material.Alert, {
|
|
17328
|
-
shouldForwardProp: (prop) => !doNotForwardProps$4.includes(prop)
|
|
17329
|
-
}) `
|
|
17330
|
-
${fontBodyXs}
|
|
17331
|
-
|
|
17332
|
-
${(props) => {
|
|
17333
|
-
const { intent = "info" } = props;
|
|
17334
|
-
const spaces = getSpaces(props);
|
|
17335
|
-
const shadows = getShadows(props);
|
|
17336
|
-
const corners = getCorners(props);
|
|
17337
|
-
const semanticColors = getSemanticColors(props);
|
|
17338
|
-
const iconColor = semanticColors?.[intent]?.ornament ?? "black";
|
|
17339
|
-
const backgroundColor = semanticColors?.[intent]?.surfaceSecondary ?? "white";
|
|
17340
|
-
return `
|
|
17341
|
-
position: relative;
|
|
17342
|
-
overflow: hidden;
|
|
17343
|
-
background-color: ${backgroundColor};
|
|
17344
|
-
max-width: 480px;
|
|
17345
|
-
min-width: 280px;
|
|
17346
|
-
box-sizing: border-box;
|
|
17347
|
-
margin: ${spaces?.m}px 0;
|
|
17348
|
-
border-radius: ${corners?.xl}px;
|
|
17349
|
-
color: ${semanticColors?.base?.textPrimary};
|
|
17350
|
-
padding: ${spaces?.m}px ${spaces?.m}px ${spaces?.m}px ${spaces?.l}px;
|
|
17351
|
-
align-items: flex-start;
|
|
17352
|
-
box-shadow: ${shadows?.s};
|
|
17353
|
-
|
|
17354
|
-
&:before {
|
|
17355
|
-
content: "";
|
|
17356
|
-
position: absolute;
|
|
17357
|
-
top: 0;
|
|
17358
|
-
left: 0;
|
|
17359
|
-
width: ${spaces?.xxs}px;
|
|
17360
|
-
height: 100%;
|
|
17361
|
-
background-color: ${semanticColors?.[intent]?.ornament};
|
|
17362
|
-
}
|
|
17363
|
-
|
|
17364
|
-
.MuiAlert-icon {
|
|
17365
|
-
margin-top: ${spaces?.xxxs}px;
|
|
17366
|
-
margin-right: ${spaces?.s}px;
|
|
17367
|
-
padding: 0;
|
|
17368
|
-
path {
|
|
17369
|
-
fill: ${iconColor};
|
|
17370
|
-
}
|
|
17371
|
-
}
|
|
17372
|
-
|
|
17373
|
-
.MuiAlert-message {
|
|
17374
|
-
padding: 0;
|
|
17375
|
-
margin-right: ${spaces?.m}px;
|
|
17376
|
-
width: 100%;
|
|
17377
|
-
|
|
17378
|
-
> * {
|
|
17379
|
-
margin: ${spaces?.m}px 0px;
|
|
17380
|
-
|
|
17381
|
-
&:last-child {
|
|
17382
|
-
margin-bottom: 0;
|
|
17383
|
-
}
|
|
17384
|
-
}
|
|
17385
|
-
|
|
17386
|
-
button {
|
|
17387
|
-
display: block;
|
|
17388
|
-
}
|
|
17389
|
-
}
|
|
17390
|
-
|
|
17391
|
-
.MuiAlert-action {
|
|
17392
|
-
margin-right: 0;
|
|
17393
|
-
padding: 0;
|
|
17394
|
-
align-items: flex-start;
|
|
17395
|
-
margin-top: ${spaces?.xxs}px;
|
|
17396
|
-
|
|
17397
|
-
> button {
|
|
17398
|
-
padding: 0;
|
|
17399
|
-
}
|
|
17400
|
-
}
|
|
17401
|
-
}
|
|
17402
|
-
`;
|
|
17403
|
-
}}
|
|
17404
|
-
`;
|
|
17405
|
-
const StyledButtonWrapper = styled__default.default("div") `
|
|
17406
|
-
${(props) => {
|
|
17407
|
-
const { buttonPosition = "right" } = props;
|
|
17408
|
-
return `
|
|
17409
|
-
display: flex;
|
|
17410
|
-
justify-content: ${buttonPosition === "left" ? "flex-start" : "flex-end"};
|
|
17411
|
-
`;
|
|
17412
|
-
}}
|
|
17413
|
-
`;
|
|
17414
|
-
|
|
17415
|
-
/**
|
|
17416
|
-
* @see https://mui.com/material-ui/react-alert/
|
|
17417
|
-
*/
|
|
17418
|
-
const Notification = ({ autoDismiss, children, dismissed, slideDirection = "left", intent, onClose, buttonOnClick, buttonText, buttonPosition, icon, sdsIconProps, ...rest }) => {
|
|
17419
|
-
const [hide, setHide] = React.useState(dismissed);
|
|
17420
|
-
// remove prop used only for stories
|
|
17421
|
-
const passedProps = { ...rest };
|
|
17422
|
-
delete passedProps.extraContent;
|
|
17423
|
-
React.useEffect(() => {
|
|
17424
|
-
setHide(dismissed);
|
|
17425
|
-
if (autoDismiss) {
|
|
17426
|
-
const timeout = typeof autoDismiss === "boolean" ? 8000 : autoDismiss;
|
|
17427
|
-
setTimeout(() => {
|
|
17428
|
-
setHide(true);
|
|
17429
|
-
}, timeout);
|
|
17430
|
-
}
|
|
17431
|
-
}, [dismissed, autoDismiss]);
|
|
17432
|
-
const handleClose = (event) => {
|
|
17433
|
-
setHide(true);
|
|
17434
|
-
if (onClose)
|
|
17435
|
-
onClose(event);
|
|
17436
|
-
};
|
|
17437
|
-
const getIcon = () => {
|
|
17438
|
-
if (icon !== undefined) {
|
|
17439
|
-
if (typeof icon !== "string") {
|
|
17440
|
-
return icon;
|
|
17441
|
-
}
|
|
17442
|
-
else {
|
|
17443
|
-
return (jsxRuntime.jsx(Icon, __assign({ sdsSize: "s", sdsIcon: icon }, sdsIconProps)));
|
|
17444
|
-
}
|
|
17445
|
-
}
|
|
17446
|
-
else {
|
|
17447
|
-
switch (intent) {
|
|
17448
|
-
case "positive":
|
|
17449
|
-
return jsxRuntime.jsx(Icon, { sdsSize: "s", sdsIcon: "CheckCircle" });
|
|
17450
|
-
case "info":
|
|
17451
|
-
return jsxRuntime.jsx(Icon, { sdsSize: "s", sdsIcon: "InfoCircle" });
|
|
17452
|
-
default:
|
|
17453
|
-
return jsxRuntime.jsx(Icon, { sdsSize: "s", sdsIcon: "ExclamationMarkCircle" });
|
|
17454
|
-
}
|
|
17455
|
-
}
|
|
17456
|
-
};
|
|
17457
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(material.Slide, { in: !hide, direction: slideDirection, mountOnEnter: true, unmountOnExit: true, timeout: 250, children: jsxRuntime.jsx(material.Box, { children: jsxRuntime.jsxs(StyledNotification, __assign({ onClose: onClose ? handleClose : undefined, action: onClose ? (jsxRuntime.jsx(Button, { onClick: handleClose, sdsStyle: "minimal", sdsType: "secondary", "data-testid": "notificationCloseButton", children: jsxRuntime.jsx(Icon, { sdsIcon: "XMark", sdsSize: "s" }) })) : null, icon: getIcon(), className: "elevated", intent: intent, slideDirection: slideDirection }, passedProps, { children: [children, buttonOnClick !== undefined && (jsxRuntime.jsx(StyledButtonWrapper, { buttonPosition: buttonPosition, children: jsxRuntime.jsx(Button, { sdsStyle: "minimal", sdsType: "secondary", size: "medium", onClick: buttonOnClick, children: buttonText }) }))] })) }) }) }));
|
|
17458
|
-
};
|
|
17459
|
-
|
|
17460
|
-
const doNotForwardProps$3 = [
|
|
17461
|
-
"sdsStyle",
|
|
17462
|
-
"selected",
|
|
17463
|
-
"onPageChange",
|
|
17464
|
-
"onNextPage",
|
|
17465
|
-
"onPreviousPage",
|
|
17466
|
-
"goToPage",
|
|
17467
|
-
"totalCount",
|
|
17468
|
-
"siblingCount",
|
|
17469
|
-
"currentPage",
|
|
17470
|
-
"pageSize",
|
|
17471
|
-
"truncateDropdown",
|
|
17472
|
-
];
|
|
17473
|
-
const StyledPaginationButton = styled__default.default(Button) `
|
|
17474
|
-
${(props) => {
|
|
17475
|
-
const semanticColors = getSemanticColors(props);
|
|
17476
|
-
return `
|
|
17477
|
-
width: 28px;
|
|
17478
|
-
height: 28px;
|
|
17479
|
-
cursor: "pointer";
|
|
17480
|
-
|
|
17481
|
-
& .MuiSvgIcon-root {
|
|
17482
|
-
width: 12px;
|
|
17483
|
-
color: ${semanticColors?.base?.ornamentSecondary};
|
|
17484
|
-
}
|
|
17485
|
-
|
|
17486
|
-
&:hover {
|
|
17487
|
-
& .MuiSvgIcon-root {
|
|
17488
|
-
color: ${semanticColors?.base?.ornamentSecondaryInteraction}
|
|
18289
|
+
});
|
|
17489
18290
|
}
|
|
17490
|
-
|
|
17491
|
-
|
|
17492
|
-
|
|
17493
|
-
|
|
17494
|
-
|
|
17495
|
-
|
|
17496
|
-
|
|
17497
|
-
|
|
17498
|
-
|
|
17499
|
-
|
|
17500
|
-
|
|
17501
|
-
|
|
17502
|
-
|
|
17503
|
-
|
|
17504
|
-
|
|
17505
|
-
|
|
17506
|
-
|
|
17507
|
-
|
|
17508
|
-
|
|
17509
|
-
|
|
17510
|
-
|
|
17511
|
-
|
|
17512
|
-
margin-right: ${spaces?.m}px;
|
|
17513
|
-
}
|
|
17514
|
-
|
|
17515
|
-
&[data-order="last"] {
|
|
17516
|
-
margin-left: ${spaces?.m}px;
|
|
17517
|
-
}
|
|
17518
|
-
|
|
17519
|
-
& .MuiSvgIcon-root {
|
|
17520
|
-
color: ${disabled ? semanticColors?.base?.ornamentDisabled : semanticColors?.base?.ornamentSecondary};
|
|
17521
|
-
}
|
|
17522
|
-
|
|
17523
|
-
&:hover {
|
|
17524
|
-
background-color: ${disabled ? "transparent" : semanticColors?.base?.fillPrimaryInteraction};
|
|
17525
|
-
|
|
17526
|
-
& .MuiSvgIcon-root {
|
|
17527
|
-
color: ${disabled ? semanticColors?.base?.ornamentDisabled : semanticColors?.base?.ornamentSecondaryInteraction}
|
|
18291
|
+
// Update the tab value to newValue to adjust the position of the tabsIndicator
|
|
18292
|
+
setFirstTabIndexInview(newValue);
|
|
18293
|
+
// Invoke the custom onChange prop
|
|
18294
|
+
handleOnChange(newValue, event, "click");
|
|
18295
|
+
};
|
|
18296
|
+
// Observe changes in the sectionIsInView object to update the tabs value
|
|
18297
|
+
// based on the index of the visible sections in the viewport.
|
|
18298
|
+
React.useEffect(() => {
|
|
18299
|
+
// Retrieve the index of the first section that is intersecting with the viewport.
|
|
18300
|
+
const flattenedSectionInView = Object.values(sectionIsInView).findIndex((section) => section.isInView);
|
|
18301
|
+
// Convert flattened index back to tab index
|
|
18302
|
+
const tabSectionInView = tabToFlattenedIndexMap.findIndex((flatIndex) => flatIndex === flattenedSectionInView);
|
|
18303
|
+
// Update the tabs value only if a section is present in the viewport
|
|
18304
|
+
// and no navigation item has been clicked, preventing updates during window scroll
|
|
18305
|
+
// and unnecessary movement of the tabs indicator.
|
|
18306
|
+
if (tabSectionInView > -1 && !navItemClicked) {
|
|
18307
|
+
setFirstTabIndexInview(tabSectionInView);
|
|
18308
|
+
// Invoke the custom onChange prop
|
|
18309
|
+
handleOnChange(tabSectionInView, {
|
|
18310
|
+
target: flattenedItems[flattenedSectionInView],
|
|
18311
|
+
type: "scroll"
|
|
18312
|
+
}, "scroll");
|
|
17528
18313
|
}
|
|
17529
|
-
|
|
17530
|
-
|
|
17531
|
-
|
|
17532
|
-
|
|
17533
|
-
|
|
17534
|
-
|
|
17535
|
-
|
|
17536
|
-
|
|
17537
|
-
|
|
17538
|
-
|
|
17539
|
-
|
|
17540
|
-
|
|
17541
|
-
|
|
17542
|
-
|
|
17543
|
-
& li {
|
|
17544
|
-
list-style: none;
|
|
17545
|
-
}
|
|
17546
|
-
`;
|
|
17547
|
-
const selectedPageStyle = (props) => {
|
|
17548
|
-
const semanticColors = getSemanticColors(props);
|
|
17549
|
-
return react.css `
|
|
17550
|
-
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
17551
|
-
color: ${semanticColors?.base?.textPrimary};
|
|
17552
|
-
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderSecondary};
|
|
17553
|
-
|
|
17554
|
-
&:hover {
|
|
17555
|
-
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderSecondary};
|
|
17556
|
-
}
|
|
18314
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18315
|
+
}, [
|
|
18316
|
+
handleOnChange,
|
|
18317
|
+
flattenedItems,
|
|
18318
|
+
sectionIsInView,
|
|
18319
|
+
tabToFlattenedIndexMap,
|
|
18320
|
+
]);
|
|
18321
|
+
// Set navItemClicked to false to re-enable the option
|
|
18322
|
+
// to update the tab value based on scroll.
|
|
18323
|
+
useScrollStopListener(() => {
|
|
18324
|
+
setNavItemClicked(false);
|
|
18325
|
+
});
|
|
18326
|
+
return (jsxRuntime.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)) })));
|
|
18327
|
+
});
|
|
17557
18328
|
|
|
17558
|
-
|
|
17559
|
-
|
|
17560
|
-
|
|
17561
|
-
|
|
17562
|
-
shouldForwardProp: (prop) => !doNotForwardProps$3.includes(prop)
|
|
18329
|
+
const fontBodyXs = fontBody("xs");
|
|
18330
|
+
const doNotForwardProps$2 = ["slideDirection"];
|
|
18331
|
+
const StyledNotification = styled__default.default(material.Alert, {
|
|
18332
|
+
shouldForwardProp: (prop) => !doNotForwardProps$2.includes(prop)
|
|
17563
18333
|
}) `
|
|
17564
|
-
${
|
|
18334
|
+
${fontBodyXs}
|
|
17565
18335
|
|
|
17566
18336
|
${(props) => {
|
|
17567
|
-
const {
|
|
18337
|
+
const { intent = "info" } = props;
|
|
17568
18338
|
const spaces = getSpaces(props);
|
|
18339
|
+
const shadows = getShadows(props);
|
|
17569
18340
|
const corners = getCorners(props);
|
|
17570
18341
|
const semanticColors = getSemanticColors(props);
|
|
17571
|
-
|
|
17572
|
-
|
|
17573
|
-
|
|
17574
|
-
|
|
17575
|
-
|
|
17576
|
-
|
|
17577
|
-
|
|
17578
|
-
|
|
17579
|
-
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
|
|
17583
|
-
|
|
17584
|
-
|
|
17585
|
-
|
|
17586
|
-
color: ${semanticColors?.base?.textPrimary};
|
|
17587
|
-
}
|
|
18342
|
+
const iconColor = semanticColors?.[intent]?.ornament ?? "black";
|
|
18343
|
+
const backgroundColor = semanticColors?.[intent]?.surfaceSecondary ?? "white";
|
|
18344
|
+
return `
|
|
18345
|
+
position: relative;
|
|
18346
|
+
overflow: hidden;
|
|
18347
|
+
background-color: ${backgroundColor};
|
|
18348
|
+
max-width: 480px;
|
|
18349
|
+
min-width: 280px;
|
|
18350
|
+
box-sizing: border-box;
|
|
18351
|
+
margin: ${spaces?.m}px 0;
|
|
18352
|
+
border-radius: ${corners?.xl}px;
|
|
18353
|
+
color: ${semanticColors?.base?.textPrimary};
|
|
18354
|
+
padding: ${spaces?.m}px ${spaces?.m}px ${spaces?.m}px ${spaces?.l}px;
|
|
18355
|
+
align-items: flex-start;
|
|
18356
|
+
box-shadow: ${shadows?.s};
|
|
17588
18357
|
|
|
17589
|
-
&:
|
|
17590
|
-
|
|
18358
|
+
&:before {
|
|
18359
|
+
content: "";
|
|
18360
|
+
position: absolute;
|
|
18361
|
+
top: 0;
|
|
18362
|
+
left: 0;
|
|
18363
|
+
width: ${spaces?.xxs}px;
|
|
18364
|
+
height: 100%;
|
|
18365
|
+
background-color: ${semanticColors?.[intent]?.ornament};
|
|
17591
18366
|
}
|
|
17592
18367
|
|
|
17593
|
-
|
|
17594
|
-
|
|
17595
|
-
|
|
17596
|
-
|
|
17597
|
-
|
|
17598
|
-
|
|
17599
|
-
|
|
17600
|
-
|
|
17601
|
-
`;
|
|
18368
|
+
.MuiAlert-icon {
|
|
18369
|
+
margin-top: ${spaces?.xxxs}px;
|
|
18370
|
+
margin-right: ${spaces?.s}px;
|
|
18371
|
+
padding: 0;
|
|
18372
|
+
path {
|
|
18373
|
+
fill: ${iconColor};
|
|
18374
|
+
}
|
|
18375
|
+
}
|
|
17602
18376
|
|
|
17603
|
-
|
|
17604
|
-
|
|
17605
|
-
|
|
17606
|
-
|
|
17607
|
-
`;
|
|
18377
|
+
.MuiAlert-message {
|
|
18378
|
+
padding: 0;
|
|
18379
|
+
margin-right: ${spaces?.m}px;
|
|
18380
|
+
width: 100%;
|
|
17608
18381
|
|
|
17609
|
-
|
|
17610
|
-
|
|
17611
|
-
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
17612
|
-
const handleClick = (event) => {
|
|
17613
|
-
setAnchorEl(event.currentTarget);
|
|
17614
|
-
};
|
|
17615
|
-
const handleClose = () => {
|
|
17616
|
-
setAnchorEl(null);
|
|
17617
|
-
};
|
|
17618
|
-
return (jsxRuntime.jsxs(StyledPage, { sdsStyle: sdsStyle, children: [jsxRuntime.jsx(StyledPaginationButton, { "aria-label": "Go to a page", onClick: handleClick, size: "small", sdsStyle: "minimal", sdsType: "secondary", backgroundOnHover: false, children: jsxRuntime.jsx(Icon, { sdsIcon: "DotsHorizontal", sdsSize: "s" }) }), jsxRuntime.jsx(StyledPaginationDropdownMenu, { anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: pageList.map((page) => {
|
|
17619
|
-
return (jsxRuntime.jsx(MenuItem, { onClick: () => {
|
|
17620
|
-
onPageChange(page);
|
|
17621
|
-
handleClose();
|
|
17622
|
-
}, sdsType: "action", children: page }, page));
|
|
17623
|
-
}) })] }));
|
|
17624
|
-
};
|
|
18382
|
+
> * {
|
|
18383
|
+
margin: ${spaces?.m}px 0px;
|
|
17625
18384
|
|
|
17626
|
-
|
|
17627
|
-
|
|
17628
|
-
|
|
17629
|
-
};
|
|
17630
|
-
const usePagination = ({ totalCount, pageSize, siblingCount = 1, currentPage, }) => {
|
|
17631
|
-
return React.useMemo(() => {
|
|
17632
|
-
const totalPageCount = Math.ceil(totalCount / pageSize);
|
|
17633
|
-
// Pages count is determined as siblingCount + firstPage + lastPage + currentPage + 2*DOTS
|
|
17634
|
-
const totalPageNumbers = siblingCount + 5;
|
|
17635
|
-
/*
|
|
17636
|
-
If the number of pages is less than the page numbers we want to show in our
|
|
17637
|
-
paginationComponent, we return the range [1..totalPageCount]
|
|
17638
|
-
*/
|
|
17639
|
-
if (totalPageNumbers >= totalPageCount) {
|
|
17640
|
-
return range(1, totalPageCount);
|
|
17641
|
-
}
|
|
17642
|
-
const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
|
|
17643
|
-
const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPageCount);
|
|
17644
|
-
/*
|
|
17645
|
-
We do not want to show dots if there is only one position left
|
|
17646
|
-
after/before the left/right page count as that would lead to a change of our Pagination
|
|
17647
|
-
component size which we do not want
|
|
17648
|
-
*/
|
|
17649
|
-
const shouldShowLeftDots = leftSiblingIndex > 2;
|
|
17650
|
-
const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
|
|
17651
|
-
const firstPageIndex = 1;
|
|
17652
|
-
const lastPageIndex = totalPageCount;
|
|
17653
|
-
if (!shouldShowLeftDots && shouldShowRightDots) {
|
|
17654
|
-
const leftItemCount = 3 + 2 * siblingCount;
|
|
17655
|
-
const leftRange = range(1, leftItemCount);
|
|
17656
|
-
const rightDotsRange = range(leftItemCount + 1, totalPageCount - 1);
|
|
17657
|
-
return [...leftRange, rightDotsRange, totalPageCount];
|
|
18385
|
+
&:last-child {
|
|
18386
|
+
margin-bottom: 0;
|
|
18387
|
+
}
|
|
17658
18388
|
}
|
|
17659
|
-
|
|
17660
|
-
|
|
17661
|
-
|
|
17662
|
-
const leftDotsRange = range(2, totalPageCount - rightItemCount);
|
|
17663
|
-
return [firstPageIndex, leftDotsRange, ...rightRange];
|
|
18389
|
+
|
|
18390
|
+
button {
|
|
18391
|
+
display: block;
|
|
17664
18392
|
}
|
|
17665
|
-
|
|
17666
|
-
|
|
17667
|
-
|
|
17668
|
-
|
|
17669
|
-
|
|
17670
|
-
|
|
17671
|
-
|
|
17672
|
-
|
|
17673
|
-
|
|
17674
|
-
|
|
17675
|
-
|
|
18393
|
+
}
|
|
18394
|
+
|
|
18395
|
+
.MuiAlert-action {
|
|
18396
|
+
margin-right: 0;
|
|
18397
|
+
padding: 0;
|
|
18398
|
+
align-items: flex-start;
|
|
18399
|
+
margin-top: ${spaces?.xxs}px;
|
|
18400
|
+
|
|
18401
|
+
> button {
|
|
18402
|
+
padding: 0;
|
|
18403
|
+
}
|
|
17676
18404
|
}
|
|
17677
|
-
|
|
17678
|
-
|
|
18405
|
+
}
|
|
18406
|
+
`;
|
|
18407
|
+
}}
|
|
18408
|
+
`;
|
|
18409
|
+
const StyledButtonWrapper = styled__default.default("div") `
|
|
18410
|
+
${(props) => {
|
|
18411
|
+
const { buttonPosition = "right" } = props;
|
|
18412
|
+
return `
|
|
18413
|
+
display: flex;
|
|
18414
|
+
justify-content: ${buttonPosition === "left" ? "flex-start" : "flex-end"};
|
|
18415
|
+
`;
|
|
18416
|
+
}}
|
|
18417
|
+
`;
|
|
17679
18418
|
|
|
17680
|
-
|
|
17681
|
-
|
|
17682
|
-
|
|
17683
|
-
|
|
18419
|
+
/**
|
|
18420
|
+
* @see https://mui.com/material-ui/react-alert/
|
|
18421
|
+
*/
|
|
18422
|
+
const Notification = ({ autoDismiss, children, dismissed, slideDirection = "left", intent, onClose, buttonOnClick, buttonText, buttonPosition, icon, sdsIconProps, ...rest }) => {
|
|
18423
|
+
const [hide, setHide] = React.useState(dismissed);
|
|
18424
|
+
// remove prop used only for stories
|
|
18425
|
+
const passedProps = { ...rest };
|
|
18426
|
+
delete passedProps.extraContent;
|
|
18427
|
+
React.useEffect(() => {
|
|
18428
|
+
setHide(dismissed);
|
|
18429
|
+
if (autoDismiss) {
|
|
18430
|
+
const timeout = typeof autoDismiss === "boolean" ? 8000 : autoDismiss;
|
|
18431
|
+
setTimeout(() => {
|
|
18432
|
+
setHide(true);
|
|
18433
|
+
}, timeout);
|
|
17684
18434
|
}
|
|
17685
|
-
}
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
18435
|
+
}, [dismissed, autoDismiss]);
|
|
18436
|
+
const handleClose = (event) => {
|
|
18437
|
+
setHide(true);
|
|
18438
|
+
if (onClose)
|
|
18439
|
+
onClose(event);
|
|
18440
|
+
};
|
|
18441
|
+
const getIcon = () => {
|
|
18442
|
+
if (icon !== undefined) {
|
|
18443
|
+
if (typeof icon !== "string") {
|
|
18444
|
+
return icon;
|
|
18445
|
+
}
|
|
18446
|
+
else {
|
|
18447
|
+
return (jsxRuntime.jsx(Icon, __assign({ sdsSize: "s", sdsIcon: icon }, sdsIconProps)));
|
|
17690
18448
|
}
|
|
17691
|
-
return (jsxRuntime.jsx(Page, { sdsStyle: sdsStyle, children: jsxRuntime.jsx(StyledPaginationButton, { "aria-label": "Go to a page", disabled: true, size: "small", sdsStyle: "minimal", sdsType: "primary", children: jsxRuntime.jsx(Icon, { sdsIcon: "DotsHorizontal", sdsSize: "s" }) }) }, pageNumber.join("-")));
|
|
17692
|
-
}
|
|
17693
|
-
return (jsxRuntime.jsx(Page, { onClick: () => onPageChange(pageNumber), onKeyDown: (event) => handlePageKeyDown(event, pageNumber), selected: pageNumber === currentPage, sdsStyle: sdsStyle, tabIndex: 0, children: pageNumber }, pageNumber));
|
|
17694
|
-
});
|
|
17695
|
-
};
|
|
17696
|
-
const Pagination = React.forwardRef((props, ref) => {
|
|
17697
|
-
const { sdsStyle = "round", onPageChange, onNextPage, onPreviousPage, totalCount, siblingCount = 1, currentPage, pageSize, truncateDropdown = true, } = props;
|
|
17698
|
-
if (pageSize < 1) {
|
|
17699
|
-
throw new Error("PageSize can not be smaller than 1!");
|
|
17700
|
-
}
|
|
17701
|
-
const paginationRange = usePagination({
|
|
17702
|
-
currentPage,
|
|
17703
|
-
pageSize,
|
|
17704
|
-
siblingCount,
|
|
17705
|
-
totalCount
|
|
17706
|
-
}) || [];
|
|
17707
|
-
if (currentPage === 0 || paginationRange.length < 2) {
|
|
17708
|
-
return null;
|
|
17709
|
-
}
|
|
17710
|
-
const lastPage = paginationRange[paginationRange.length - 1];
|
|
17711
|
-
return (jsxRuntime.jsxs(StyledPagination, __assign({ ref: ref }, props, { children: [jsxRuntime.jsx(StyledPaginationChevronList, { "data-order": "first", disabled: currentPage === 1, onClick: () => currentPage > 1 && onPreviousPage(), onKeyDown: handleGoBackButtonKeyDown, tabIndex: 0, sdsStyle: sdsStyle, children: jsxRuntime.jsx(Icon, { "aria-label": "Previous page", sdsIcon: "ChevronLeft", sdsSize: "xs" }) }, "prevPage"), PaginationPageList(paginationRange, truncateDropdown, sdsStyle, onPageChange, currentPage), jsxRuntime.jsx(StyledPaginationChevronList, { "data-order": "last", disabled: currentPage === lastPage, onClick: () => currentPage !== lastPage && onNextPage(), onKeyDown: handleGoNextButtonKeyDown, tabIndex: 0, sdsStyle: sdsStyle, children: jsxRuntime.jsx(Icon, { "aria-label": "Next page", sdsIcon: "ChevronRight", sdsSize: "xs" }) }, "onNextPage")] })));
|
|
17712
|
-
function handleGoBackButtonKeyDown(event) {
|
|
17713
|
-
if ((event.key === "Enter" || event.code === "Space") &&
|
|
17714
|
-
currentPage > 1) {
|
|
17715
|
-
onPreviousPage();
|
|
17716
18449
|
}
|
|
17717
|
-
|
|
17718
|
-
|
|
17719
|
-
|
|
17720
|
-
|
|
17721
|
-
|
|
18450
|
+
else {
|
|
18451
|
+
switch (intent) {
|
|
18452
|
+
case "positive":
|
|
18453
|
+
return jsxRuntime.jsx(Icon, { sdsSize: "s", sdsIcon: "CheckCircle" });
|
|
18454
|
+
case "info":
|
|
18455
|
+
return jsxRuntime.jsx(Icon, { sdsSize: "s", sdsIcon: "InfoCircle" });
|
|
18456
|
+
default:
|
|
18457
|
+
return jsxRuntime.jsx(Icon, { sdsSize: "s", sdsIcon: "ExclamationMarkCircle" });
|
|
18458
|
+
}
|
|
17722
18459
|
}
|
|
17723
|
-
}
|
|
17724
|
-
});
|
|
18460
|
+
};
|
|
18461
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(material.Slide, { in: !hide, direction: slideDirection, mountOnEnter: true, unmountOnExit: true, timeout: 250, children: jsxRuntime.jsx(material.Box, { children: jsxRuntime.jsxs(StyledNotification, __assign({ onClose: onClose ? handleClose : undefined, action: onClose ? (jsxRuntime.jsx(Button, { onClick: handleClose, sdsStyle: "minimal", sdsType: "secondary", "data-testid": "notificationCloseButton", children: jsxRuntime.jsx(Icon, { sdsIcon: "XMark", sdsSize: "s" }) })) : null, icon: getIcon(), className: "elevated", intent: intent, slideDirection: slideDirection }, passedProps, { children: [children, buttonOnClick !== undefined && (jsxRuntime.jsx(StyledButtonWrapper, { buttonPosition: buttonPosition, children: jsxRuntime.jsx(Button, { sdsStyle: "minimal", sdsType: "secondary", size: "medium", onClick: buttonOnClick, children: buttonText }) }))] })) }) }) }));
|
|
18462
|
+
};
|
|
17725
18463
|
|
|
17726
18464
|
const PANEL_BASIC_MIN_WIDTH_PX = 240;
|
|
17727
18465
|
const PANEL_OVERLAY_MIN_WIDTH_PX = 320;
|
|
17728
18466
|
|
|
17729
|
-
const doNotForwardProps$
|
|
18467
|
+
const doNotForwardProps$1 = [
|
|
17730
18468
|
"sdsType",
|
|
17731
18469
|
"position",
|
|
17732
18470
|
"width",
|
|
@@ -17779,7 +18517,7 @@ const overlayPanelStyles = (props) => {
|
|
|
17779
18517
|
`;
|
|
17780
18518
|
};
|
|
17781
18519
|
const StyledDrawer = styled__default.default(material.Drawer, {
|
|
17782
|
-
shouldForwardProp: (prop) => !doNotForwardProps$
|
|
18520
|
+
shouldForwardProp: (prop) => !doNotForwardProps$1.includes(prop)
|
|
17783
18521
|
}) `
|
|
17784
18522
|
${(props) => {
|
|
17785
18523
|
const { sdsType = "basic", anchor = "left", width } = props;
|
|
@@ -17906,9 +18644,44 @@ const Panel = React__namespace.default.forwardRef((props, ref) => {
|
|
|
17906
18644
|
}, slotProps: SLOT_PROPS, hideBackdrop: !isBackdropClickEnabled, children: [isOverlayPanelProps(props) && (jsxRuntime.jsxs(StyledHeaderComponent, { children: [props?.HeaderComponent && (jsxRuntime.jsx(PanelHeader, { children: props?.HeaderComponent })), jsxRuntime.jsx(PanelHeaderClose, { onClick: props?.closeButtonOnClick, CloseButtonComponent: props?.CloseButtonComponent })] })), children] })));
|
|
17907
18645
|
});
|
|
17908
18646
|
|
|
17909
|
-
const
|
|
18647
|
+
const StyledPopover = styled__default.default(material.Popover) `
|
|
18648
|
+
& .${material.popoverClasses.paper} {
|
|
18649
|
+
${(props) => {
|
|
18650
|
+
const corners = getCorners(props);
|
|
18651
|
+
const shadows = getShadows(props);
|
|
18652
|
+
const semanticColors = getSemanticColors(props);
|
|
18653
|
+
const borders = getBorders(props);
|
|
18654
|
+
const spaces = getSpaces(props);
|
|
18655
|
+
return `
|
|
18656
|
+
background-color: ${semanticColors?.base?.surfacePrimary};
|
|
18657
|
+
background-image: none;
|
|
18658
|
+
border-radius: ${corners?.l}px;
|
|
18659
|
+
padding: ${spaces?.xs}px ${spaces?.m}px;
|
|
18660
|
+
border: ${borders?.none};
|
|
18661
|
+
outline: 1px solid ${addOpacityToHex(semanticColors?.base?.borderSecondary || "#000000", 15)};
|
|
18662
|
+
box-shadow: ${shadows?.m};
|
|
18663
|
+
box-sizing: border-box;
|
|
18664
|
+
z-index: ${props?.theme?.zIndex?.tooltip ?? 1400};
|
|
18665
|
+
`;
|
|
18666
|
+
}}
|
|
18667
|
+
}
|
|
18668
|
+
`;
|
|
18669
|
+
|
|
18670
|
+
/**
|
|
18671
|
+
* @see https://mui.com/material-ui/react-popover/
|
|
18672
|
+
*/
|
|
18673
|
+
const Popover = React.forwardRef(function Popover(props, ref) {
|
|
18674
|
+
const theme = material.useTheme();
|
|
18675
|
+
const spaces = getSpaces({ theme });
|
|
18676
|
+
return (jsxRuntime.jsx(StyledPopover, __assign({ ref: ref, anchorOrigin: {
|
|
18677
|
+
horizontal: "left",
|
|
18678
|
+
vertical: "bottom"
|
|
18679
|
+
}, transformOrigin: { vertical: -(spaces?.s || 8), horizontal: 0 } }, props)));
|
|
18680
|
+
});
|
|
18681
|
+
|
|
18682
|
+
const doNotForwardProps = ["buttonDefinition"];
|
|
17910
18683
|
const StyledSegmentedControl = styled__default.default(material.ToggleButtonGroup, {
|
|
17911
|
-
shouldForwardProp: (prop) => !doNotForwardProps
|
|
18684
|
+
shouldForwardProp: (prop) => !doNotForwardProps.includes(prop)
|
|
17912
18685
|
}) `
|
|
17913
18686
|
${(props) => {
|
|
17914
18687
|
const spaces = getSpaces(props);
|
|
@@ -17947,7 +18720,6 @@ const StyledSegmentedControl = styled__default.default(material.ToggleButtonGrou
|
|
|
17947
18720
|
${focusVisibleA11yStyle(props)}
|
|
17948
18721
|
background-color: transparent;
|
|
17949
18722
|
border: none;
|
|
17950
|
-
line-height: 0px;
|
|
17951
18723
|
color: ${semanticColors?.base?.ornamentSecondary};
|
|
17952
18724
|
padding: ${spaces?.xxs}px ${spaces?.m}px;
|
|
17953
18725
|
border-radius: ${corners?.m}px;
|
|
@@ -17963,7 +18735,7 @@ const StyledSegmentedControl = styled__default.default(material.ToggleButtonGrou
|
|
|
17963
18735
|
}}
|
|
17964
18736
|
`;
|
|
17965
18737
|
const StyledToggleButton = styled__default.default(material.ToggleButton, {
|
|
17966
|
-
shouldForwardProp: (prop) => !doNotForwardProps
|
|
18738
|
+
shouldForwardProp: (prop) => !doNotForwardProps.includes(prop)
|
|
17967
18739
|
}) `
|
|
17968
18740
|
${(props) => {
|
|
17969
18741
|
const { disabled } = props;
|
|
@@ -17976,6 +18748,14 @@ const StyledToggleButton = styled__default.default(material.ToggleButton, {
|
|
|
17976
18748
|
`;
|
|
17977
18749
|
}}
|
|
17978
18750
|
`;
|
|
18751
|
+
const StyledToggleButtonIcon = styled__default.default("div") `
|
|
18752
|
+
line-height: 0px;
|
|
18753
|
+
`;
|
|
18754
|
+
const StyledToggleButtonLabel = styled__default.default("div") `
|
|
18755
|
+
${fontBodyMediumS}
|
|
18756
|
+
white-space: nowrap;
|
|
18757
|
+
line-height: 16px !important;
|
|
18758
|
+
`;
|
|
17979
18759
|
|
|
17980
18760
|
/**
|
|
17981
18761
|
* @see https://mui.com/material-ui/react-toggle-button/
|
|
@@ -17995,133 +18775,28 @@ const SegmentedControl = (props) => {
|
|
|
17995
18775
|
onChangeProp(event, newActive);
|
|
17996
18776
|
}
|
|
17997
18777
|
};
|
|
17998
|
-
return (jsxRuntime.
|
|
17999
|
-
|
|
18000
|
-
|
|
18001
|
-
|
|
18002
|
-
|
|
18003
|
-
|
|
18004
|
-
|
|
18005
|
-
}
|
|
18006
|
-
|
|
18007
|
-
|
|
18008
|
-
|
|
18009
|
-
|
|
18010
|
-
|
|
18011
|
-
|
|
18012
|
-
|
|
18013
|
-
|
|
18014
|
-
const
|
|
18015
|
-
|
|
18016
|
-
|
|
18017
|
-
});
|
|
18018
|
-
|
|
18019
|
-
const doNotForwardProps = [
|
|
18020
|
-
"rowHeight",
|
|
18021
|
-
"useDivider",
|
|
18022
|
-
"shouldShowTooltipOnHover",
|
|
18023
|
-
"tooltipProps",
|
|
18024
|
-
"tooltipSubtitle",
|
|
18025
|
-
"tooltipText",
|
|
18026
|
-
"hover",
|
|
18027
|
-
];
|
|
18028
|
-
const disabledStyled = (props) => {
|
|
18029
|
-
const semanticColors = getSemanticColors(props);
|
|
18030
|
-
return `
|
|
18031
|
-
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
18032
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
18033
|
-
user-select: none;
|
|
18034
|
-
|
|
18035
|
-
&:hover {
|
|
18036
|
-
background-color: ${semanticColors?.base?.backgroundSecondary};
|
|
18037
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
18038
|
-
}
|
|
18039
|
-
|
|
18040
|
-
& span, & div {
|
|
18041
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
18042
|
-
background-color: transparent !important;
|
|
18043
|
-
}
|
|
18044
|
-
|
|
18045
|
-
.cell-component {
|
|
18046
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
18047
|
-
pointer-events: none;
|
|
18048
|
-
user-select: none;
|
|
18049
|
-
& div {
|
|
18050
|
-
color: ${semanticColors?.base?.textDisabled};
|
|
18051
|
-
background-color: transparent;
|
|
18052
|
-
}
|
|
18053
|
-
|
|
18054
|
-
& .MuiChip-root {
|
|
18055
|
-
background-color: ${semanticColors?.base?.fillDisabled};
|
|
18056
|
-
box-shadow: inset 0 0 0 1px ${semanticColors?.base?.borderPrimaryDisabled} !important;
|
|
18057
|
-
|
|
18058
|
-
& span {
|
|
18059
|
-
color: ${semanticColors?.base?.textDisabled} !important;
|
|
18060
|
-
}
|
|
18061
|
-
}
|
|
18062
|
-
|
|
18063
|
-
svg {
|
|
18064
|
-
fill: ${semanticColors?.base?.ornamentDisabled};
|
|
18065
|
-
}
|
|
18066
|
-
|
|
18067
|
-
filter: grayscale(100%);
|
|
18068
|
-
}
|
|
18069
|
-
`;
|
|
18070
|
-
};
|
|
18071
|
-
const hoverStyled = (props) => {
|
|
18072
|
-
const semanticColors = getSemanticColors(props);
|
|
18073
|
-
return `
|
|
18074
|
-
&:hover {
|
|
18075
|
-
background-color: ${semanticColors?.base?.fillPrimaryInteraction};
|
|
18076
|
-
}
|
|
18077
|
-
`;
|
|
18778
|
+
return (jsxRuntime.jsx(StyledSegmentedControl, __assign({ "aria-label": "Segmented Control", size: "small", value: value, exclusive: true, onChange: handleActive }, restProps, { children: buttonDefinition.map((button) => {
|
|
18779
|
+
const { icon, label, shouldShowTooltip = true, tooltipProps, tooltipText, value: buttonValue, disabled = false, } = button;
|
|
18780
|
+
if (tooltipText) {
|
|
18781
|
+
showWarningIfFirstOccurence(SDSWarningTypes.SegmentedControlTooltipTextDeprecated);
|
|
18782
|
+
}
|
|
18783
|
+
if (!icon && !label) {
|
|
18784
|
+
showWarningIfFirstOccurence(SDSWarningTypes.SegmentedControlMissingIconOrLabel);
|
|
18785
|
+
}
|
|
18786
|
+
if (icon && label) {
|
|
18787
|
+
showWarningIfFirstOccurence(SDSWarningTypes.SegmentedControlIconAndLabelConflict);
|
|
18788
|
+
}
|
|
18789
|
+
const iconItem = icon ? (typeof icon !== "string" ? (icon) : (jsxRuntime.jsx(Icon, { sdsIcon: icon, sdsSize: "s" }))) : null;
|
|
18790
|
+
const buttonContent = label ? (jsxRuntime.jsx(StyledToggleButtonLabel, { children: label })) : iconItem ? (jsxRuntime.jsx(StyledToggleButtonIcon, { children: iconItem })) : (jsxRuntime.jsx(StyledToggleButtonLabel, { children: buttonValue }));
|
|
18791
|
+
const toggleButton = (jsxRuntime.jsx(StyledToggleButton, { "aria-label": tooltipText ?? label ?? buttonValue, value: buttonValue, disabled: disabled, children: jsxRuntime.jsx("span", { tabIndex: -1, children: buttonContent }) }, buttonValue));
|
|
18792
|
+
// Resolve the tooltip title: tooltipText takes priority,
|
|
18793
|
+
// then tooltipProps.title, then label, then falls back to buttonValue.
|
|
18794
|
+
const resolvedTitle = tooltipText ?? tooltipProps?.title ?? label ?? buttonValue;
|
|
18795
|
+
// (masoudmanson): If the button is disabled or shouldShowTooltip
|
|
18796
|
+
// is false, we don't render the tooltip.
|
|
18797
|
+
return disabled || !shouldShowTooltip ? (toggleButton) : (React.createElement(Tooltip, __assign({ arrow: true }, tooltipProps, { title: resolvedTitle, key: buttonValue }), toggleButton));
|
|
18798
|
+
}) })));
|
|
18078
18799
|
};
|
|
18079
|
-
const StyledTableRow = styled__default.default("tr", {
|
|
18080
|
-
shouldForwardProp: (prop) => !doNotForwardProps.includes(prop)
|
|
18081
|
-
}) `
|
|
18082
|
-
${fontHeaderS}
|
|
18083
|
-
${focusVisibleA11yStyle}
|
|
18084
|
-
|
|
18085
|
-
${(props) => {
|
|
18086
|
-
const { rowHeight, useDivider = true, selected = false, disabled = false, hover = true, } = props;
|
|
18087
|
-
const semanticColors = getSemanticColors(props);
|
|
18088
|
-
const borders = getBorders(props);
|
|
18089
|
-
return `
|
|
18090
|
-
align-items: center;
|
|
18091
|
-
border-bottom: ${useDivider ? borders?.base?.table : borders?.none};
|
|
18092
|
-
|
|
18093
|
-
${rowHeight ? `max-height: ${rowHeight}px;` : ""}
|
|
18094
|
-
|
|
18095
|
-
${selected ? `background-color: ${semanticColors?.accent?.surfacePrimary};` : ""}
|
|
18096
|
-
|
|
18097
|
-
${hover && hoverStyled(props)};
|
|
18098
|
-
|
|
18099
|
-
${disabled && disabledStyled(props)}
|
|
18100
|
-
`;
|
|
18101
|
-
}}
|
|
18102
|
-
`;
|
|
18103
|
-
|
|
18104
|
-
const TableRow = React.forwardRef((props, ref) => {
|
|
18105
|
-
const { children, shouldShowTooltipOnHover = true, tooltipProps, tooltipText = false, tooltipSubtitle, hover = true, } = props;
|
|
18106
|
-
if (shouldShowTooltipOnHover && hover) {
|
|
18107
|
-
return (jsxRuntime.jsx(Tooltip, __assign({ arrow: true, sdsStyle: "dark", subtitle: tooltipSubtitle, title: tooltipText }, tooltipProps, { children: jsxRuntime.jsx(StyledTableRow, __assign({ ref: ref }, props, { children: children })) })));
|
|
18108
|
-
}
|
|
18109
|
-
return (jsxRuntime.jsx(StyledTableRow, __assign({ ref: ref }, props, { children: children })));
|
|
18110
|
-
});
|
|
18111
|
-
|
|
18112
|
-
const StyledTableHeader = styled__default.default("thead") `
|
|
18113
|
-
${(props) => {
|
|
18114
|
-
const semanticColors = getSemanticColors(props);
|
|
18115
|
-
return `
|
|
18116
|
-
border-bottom: solid 2px ${semanticColors?.base?.borderSecondary};
|
|
18117
|
-
`;
|
|
18118
|
-
}}
|
|
18119
|
-
`;
|
|
18120
|
-
|
|
18121
|
-
const TableHeader = React.forwardRef((props, ref) => {
|
|
18122
|
-
const { children } = props;
|
|
18123
|
-
return (jsxRuntime.jsx(StyledTableHeader, __assign({ ref: ref }, props, { children: jsxRuntime.jsx(TableRow, { hover: false, shouldShowTooltipOnHover: false, children: children }) })));
|
|
18124
|
-
});
|
|
18125
18800
|
|
|
18126
18801
|
const TabsContext = React.createContext({ sdsSize: "large" });
|
|
18127
18802
|
|
|
@@ -22025,6 +22700,9 @@ exports.NavigationJumpTo = NavigationJumpTo;
|
|
|
22025
22700
|
exports.Notification = Notification;
|
|
22026
22701
|
exports.Pagination = Pagination;
|
|
22027
22702
|
exports.Panel = Panel;
|
|
22703
|
+
exports.Popover = Popover;
|
|
22704
|
+
exports.PreComposedTable = PreComposedTable;
|
|
22705
|
+
exports.RowHoverContext = RowHoverContext;
|
|
22028
22706
|
exports.SDSChooseTheme = SDSChooseTheme;
|
|
22029
22707
|
exports.SDSDarkAppTheme = SDSDarkAppTheme;
|
|
22030
22708
|
exports.SDSDarkThemeColors = SDSDarkThemeColors;
|