@equinor/eds-core-react 0.15.0-dev.20211116 → 0.15.0-dev.20211116v2
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/core-react.cjs.js +1226 -933
- package/dist/esm/components/Accordion/Accordion.js +5 -4
- package/dist/esm/components/Accordion/AccordionHeader.js +14 -12
- package/dist/esm/components/Accordion/AccordionHeaderTitle.js +5 -3
- package/dist/esm/components/Accordion/AccordionItem.js +5 -4
- package/dist/esm/components/Accordion/AccordionPanel.js +7 -6
- package/dist/esm/components/Avatar/Avatar.js +10 -8
- package/dist/esm/components/Banner/Banner.js +10 -8
- package/dist/esm/components/Banner/BannerActions.js +6 -4
- package/dist/esm/components/Banner/BannerIcon.js +6 -4
- package/dist/esm/components/Banner/BannerMessage.js +6 -4
- package/dist/esm/components/Breadcrumbs/Breadcrumb.js +12 -7
- package/dist/esm/components/Breadcrumbs/Breadcrumbs.js +37 -25
- package/dist/esm/components/Button/Button.js +11 -3
- package/dist/esm/components/Button/InnerFullWidth.js +8 -4
- package/dist/esm/components/Card/Card.js +5 -4
- package/dist/esm/components/Card/CardActions.js +7 -3
- package/dist/esm/components/Card/CardHeader.js +4 -1
- package/dist/esm/components/Card/CardHeaderTitle.js +4 -1
- package/dist/esm/components/Card/CardMedia.js +4 -1
- package/dist/esm/components/Checkbox/Checkbox.js +13 -9
- package/dist/esm/components/Checkbox/Input.js +34 -27
- package/dist/esm/components/Chip/Chip.js +12 -11
- package/dist/esm/components/Dialog/Actions.js +6 -4
- package/dist/esm/components/Dialog/CustomContent.js +11 -7
- package/dist/esm/components/Dialog/Dialog.js +7 -6
- package/dist/esm/components/Dialog/Title.js +12 -8
- package/dist/esm/components/Divider/Divider.js +3 -3
- package/dist/esm/components/EdsProvider/eds.context.js +5 -3
- package/dist/esm/components/Icon/Icon.js +12 -8
- package/dist/esm/components/Input/Input.js +6 -3
- package/dist/esm/components/Label/Label.js +10 -4
- package/dist/esm/components/List/List.js +6 -4
- package/dist/esm/components/List/ListItem.js +5 -4
- package/dist/esm/components/Menu/Menu.context.js +5 -3
- package/dist/esm/components/Menu/Menu.js +20 -12
- package/dist/esm/components/Menu/MenuItem.js +7 -4
- package/dist/esm/components/Menu/MenuList.js +7 -6
- package/dist/esm/components/Menu/MenuSection.js +14 -6
- package/dist/esm/components/Pagination/Pagination.js +62 -51
- package/dist/esm/components/Pagination/PaginationItem.js +6 -4
- package/dist/esm/components/Paper/Paper.js +3 -3
- package/dist/esm/components/Popover/Popover.js +26 -21
- package/dist/esm/components/Popover/PopoverContent.js +4 -1
- package/dist/esm/components/Popover/PopoverTitle.js +8 -3
- package/dist/esm/components/Progress/Circular/CircularProgress.js +23 -22
- package/dist/esm/components/Progress/Dots/DotProgress.js +17 -16
- package/dist/esm/components/Progress/Linear/LinearProgress.js +7 -6
- package/dist/esm/components/Progress/Star/StarProgress.js +17 -16
- package/dist/esm/components/Radio/Radio.js +36 -28
- package/dist/esm/components/Scrim/Scrim.js +9 -6
- package/dist/esm/components/Search/Search.js +15 -11
- package/dist/esm/components/Select/MultiSelect/MultiSelect.js +64 -52
- package/dist/esm/components/Select/NativeSelect/NativeSelect.js +10 -3
- package/dist/esm/components/Select/SingleSelect/SingleSelect.js +56 -46
- package/dist/esm/components/SideSheet/SideSheet.js +19 -14
- package/dist/esm/components/Slider/MinMax.js +5 -3
- package/dist/esm/components/Slider/Output.js +5 -3
- package/dist/esm/components/Slider/Slider.js +92 -73
- package/dist/esm/components/Slider/SliderInput.js +3 -3
- package/dist/esm/components/Snackbar/Snackbar.js +8 -4
- package/dist/esm/components/Snackbar/SnackbarAction.js +4 -1
- package/dist/esm/components/Switch/Switch.js +27 -23
- package/dist/esm/components/Switch/SwitchDefault.js +13 -9
- package/dist/esm/components/Switch/SwitchSmall.js +11 -7
- package/dist/esm/components/Table/Body.js +8 -6
- package/dist/esm/components/Table/Caption.js +3 -3
- package/dist/esm/components/Table/Cell.js +20 -16
- package/dist/esm/components/Table/DataCell/DataCell.js +8 -6
- package/dist/esm/components/Table/Head/Head.js +8 -6
- package/dist/esm/components/Table/HeaderCell/HeaderCell.js +12 -8
- package/dist/esm/components/Table/Row/Row.js +5 -4
- package/dist/esm/components/Table/Table.js +5 -4
- package/dist/esm/components/TableOfContents/LinkItem.js +5 -4
- package/dist/esm/components/TableOfContents/TableOfContents.js +11 -6
- package/dist/esm/components/Tabs/Tab.js +5 -4
- package/dist/esm/components/Tabs/TabList.js +7 -6
- package/dist/esm/components/Tabs/TabPanel.js +6 -4
- package/dist/esm/components/Tabs/TabPanels.js +6 -4
- package/dist/esm/components/Tabs/Tabs.js +10 -9
- package/dist/esm/components/TextField/Field.js +17 -9
- package/dist/esm/components/TextField/HelperText/HelperText.js +18 -15
- package/dist/esm/components/TextField/Icon/Icon.js +7 -4
- package/dist/esm/components/TextField/TextField.context.js +5 -3
- package/dist/esm/components/TextField/TextField.js +12 -3
- package/dist/esm/components/Textarea/Textarea.js +3 -1
- package/dist/esm/components/Tooltip/Tooltip.js +21 -15
- package/dist/esm/components/TopBar/Actions.js +6 -4
- package/dist/esm/components/TopBar/CustomContent.js +6 -4
- package/dist/esm/components/TopBar/Header.js +6 -4
- package/dist/esm/components/TopBar/TopBar.js +5 -4
- package/dist/esm/components/Typography/Typography.js +6 -4
- package/package.json +1 -1
package/dist/core-react.cjs.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('focus-visible');
|
|
6
|
-
var
|
|
7
|
-
var React$1 = require('react');
|
|
6
|
+
var React = require('react');
|
|
8
7
|
var styled = require('styled-components');
|
|
9
8
|
var edsTokens = require('@equinor/eds-tokens');
|
|
10
9
|
var R = require('ramda');
|
|
10
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
11
11
|
var edsIcons = require('@equinor/eds-icons');
|
|
12
12
|
var ReactDom = require('react-dom');
|
|
13
13
|
var reactPopper = require('react-popper');
|
|
@@ -35,8 +35,7 @@ function _interopNamespace(e) {
|
|
|
35
35
|
return Object.freeze(n);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
var
|
|
39
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React$1);
|
|
38
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
40
39
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
41
40
|
var R__namespace = /*#__PURE__*/_interopNamespace(R);
|
|
42
41
|
var ReactDom__namespace = /*#__PURE__*/_interopNamespace(ReactDom);
|
|
@@ -732,7 +731,7 @@ const setReactInputValue = (input, value) => {
|
|
|
732
731
|
};
|
|
733
732
|
|
|
734
733
|
const useOutsideClick = (el, callback) => {
|
|
735
|
-
React
|
|
734
|
+
React.useEffect(() => {
|
|
736
735
|
const handleClick = e => {
|
|
737
736
|
if (el && !el.contains(e.target)) {
|
|
738
737
|
callback(e);
|
|
@@ -748,7 +747,7 @@ const useOutsideClick = (el, callback) => {
|
|
|
748
747
|
|
|
749
748
|
/** Returns a memoized function that calls passed refs sequentially with passed element */
|
|
750
749
|
const useCombinedRefs = (...refs) => {
|
|
751
|
-
return React
|
|
750
|
+
return React.useCallback(element => refs.forEach(ref => {
|
|
752
751
|
if (typeof ref === 'function') {
|
|
753
752
|
ref(element);
|
|
754
753
|
} else if (ref && typeof ref === 'object') {
|
|
@@ -796,7 +795,7 @@ var KEY;
|
|
|
796
795
|
})(KEY || (KEY = {}));
|
|
797
796
|
|
|
798
797
|
const useGlobalKeyPress = (targetKey, callback) => {
|
|
799
|
-
React
|
|
798
|
+
React.useEffect(() => {
|
|
800
799
|
const handleGlobalKeyPress = e => {
|
|
801
800
|
const {
|
|
802
801
|
key
|
|
@@ -817,9 +816,9 @@ const useGlobalKeyPress = (targetKey, callback) => {
|
|
|
817
816
|
};
|
|
818
817
|
|
|
819
818
|
const useId = (idOverride, type) => {
|
|
820
|
-
const [defaultId, setDefaultId] = React
|
|
819
|
+
const [defaultId, setDefaultId] = React.useState(idOverride);
|
|
821
820
|
const id = idOverride || defaultId;
|
|
822
|
-
React
|
|
821
|
+
React.useEffect(() => {
|
|
823
822
|
if (defaultId == null) {
|
|
824
823
|
setDefaultId(`eds-${type ? type + `-` : ''}${Math.round(Math.random() * 1e5)}`);
|
|
825
824
|
}
|
|
@@ -828,8 +827,8 @@ const useId = (idOverride, type) => {
|
|
|
828
827
|
};
|
|
829
828
|
|
|
830
829
|
const useIsMounted = () => {
|
|
831
|
-
const [isMounted, setIsMounted] = React
|
|
832
|
-
React
|
|
830
|
+
const [isMounted, setIsMounted] = React.useState(null);
|
|
831
|
+
React.useEffect(() => {
|
|
833
832
|
setIsMounted(true);
|
|
834
833
|
return () => setIsMounted(false);
|
|
835
834
|
}, []);
|
|
@@ -837,7 +836,7 @@ const useIsMounted = () => {
|
|
|
837
836
|
};
|
|
838
837
|
|
|
839
838
|
const useAutoResize = (targetEl, maxHeight) => {
|
|
840
|
-
React
|
|
839
|
+
React.useEffect(() => {
|
|
841
840
|
const handleResize = () => {
|
|
842
841
|
targetEl.style.height = 'auto';
|
|
843
842
|
const {
|
|
@@ -872,7 +871,7 @@ const useAutoResize = (targetEl, maxHeight) => {
|
|
|
872
871
|
}, [targetEl, maxHeight]);
|
|
873
872
|
};
|
|
874
873
|
|
|
875
|
-
const useToken = (options, token) => React
|
|
874
|
+
const useToken = (options, token) => React.useCallback(() => {
|
|
876
875
|
const {
|
|
877
876
|
density
|
|
878
877
|
} = options;
|
|
@@ -885,7 +884,7 @@ const useToken = (options, token) => React$1.useCallback(() => {
|
|
|
885
884
|
}, [options, token]);
|
|
886
885
|
|
|
887
886
|
const useHideBodyScroll = overflowState => {
|
|
888
|
-
React
|
|
887
|
+
React.useEffect(() => {
|
|
889
888
|
document.body.style.overflow = 'hidden';
|
|
890
889
|
return () => {
|
|
891
890
|
document.body.style.overflow = overflowState;
|
|
@@ -901,25 +900,28 @@ const FullWidthInner = styled__default['default'].span.withConfig({
|
|
|
901
900
|
displayName: "InnerFullWidth__FullWidthInner",
|
|
902
901
|
componentId: "sc-qeawkb-1"
|
|
903
902
|
})(["height:100%;display:flex;align-items:center;> img:first-child,> svg:first-child{margin-right:8px;}> img:last-child,> svg:last-child{margin-left:8px;}> img:only-child,> svg:only-child{margin-left:auto;margin-right:auto;}> span:first-child{margin-left:32px;}> span:last-child{margin-right:32px;}> span:only-child{margin-right:0;margin-left:0;}"]);
|
|
904
|
-
const InnerFullWidth = /*#__PURE__*/React
|
|
903
|
+
const InnerFullWidth = /*#__PURE__*/React.forwardRef(function InnerFullWidth({
|
|
905
904
|
children
|
|
906
905
|
}, ref) {
|
|
907
906
|
// We need everything in elements for proper flexing 💪
|
|
908
|
-
const updatedChildren = React
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
907
|
+
const updatedChildren = React.Children.map(children, child => typeof child !== 'object' ? /*#__PURE__*/jsxRuntime.jsx(FullWidthCenterContent, {
|
|
908
|
+
children: child
|
|
909
|
+
}) : child);
|
|
910
|
+
return /*#__PURE__*/jsxRuntime.jsx(FullWidthInner, {
|
|
911
|
+
ref: ref,
|
|
912
|
+
children: updatedChildren
|
|
913
|
+
});
|
|
912
914
|
});
|
|
913
915
|
|
|
914
916
|
const initalState$3 = {
|
|
915
917
|
density: 'comfortable'
|
|
916
918
|
};
|
|
917
|
-
const EdsContext = /*#__PURE__*/React
|
|
919
|
+
const EdsContext = /*#__PURE__*/React.createContext(initalState$3);
|
|
918
920
|
const EdsProvider = ({
|
|
919
921
|
children,
|
|
920
922
|
density = 'comfortable'
|
|
921
923
|
}) => {
|
|
922
|
-
const [state, setState] = React
|
|
924
|
+
const [state, setState] = React.useState({ ...initalState$3,
|
|
923
925
|
density
|
|
924
926
|
});
|
|
925
927
|
|
|
@@ -927,7 +929,7 @@ const EdsProvider = ({
|
|
|
927
929
|
density
|
|
928
930
|
}));
|
|
929
931
|
|
|
930
|
-
React
|
|
932
|
+
React.useEffect(() => {
|
|
931
933
|
if (typeof density !== 'undefined' && density !== state.density) {
|
|
932
934
|
setDensity(density);
|
|
933
935
|
}
|
|
@@ -935,11 +937,12 @@ const EdsProvider = ({
|
|
|
935
937
|
const value = {
|
|
936
938
|
density: state.density
|
|
937
939
|
};
|
|
938
|
-
return /*#__PURE__*/
|
|
939
|
-
value: value
|
|
940
|
-
|
|
940
|
+
return /*#__PURE__*/jsxRuntime.jsx(EdsContext.Provider, {
|
|
941
|
+
value: value,
|
|
942
|
+
children: children
|
|
943
|
+
});
|
|
941
944
|
};
|
|
942
|
-
const useEds = () => React
|
|
945
|
+
const useEds = () => React.useContext(EdsContext);
|
|
943
946
|
|
|
944
947
|
const getVariant = (tokenSet, variant) => {
|
|
945
948
|
switch (variant) {
|
|
@@ -995,7 +998,7 @@ const ButtonBase = styled__default['default'].button.withConfig({
|
|
|
995
998
|
} = states;
|
|
996
999
|
return styled.css(["margin:0;padding:0;text-decoration:none;position:relative;cursor:pointer;display:inline-block;background:", ";height:", ";width:", ";svg{justify-self:center;}", " ", " ", " &::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}&::after{position:absolute;top:-", ";left:-", ";width:", ";height:", ";content:'';}@media (hover:hover) and (pointer:fine){&:hover{background:", ";color:", ";", ";}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&::-moz-focus-inner{border:0;}&:disabled{cursor:not-allowed;background:", ";", ";", ";@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}}"], theme.background, theme.height, theme.width, spacingsTemplate(theme.spacings), bordersTemplate(theme.border), typographyTemplate(theme.typography), clickbound === null || clickbound === void 0 ? void 0 : (_clickbound$offset = clickbound.offset) === null || _clickbound$offset === void 0 ? void 0 : _clickbound$offset.top, clickbound === null || clickbound === void 0 ? void 0 : (_clickbound$offset2 = clickbound.offset) === null || _clickbound$offset2 === void 0 ? void 0 : _clickbound$offset2.left, clickbound === null || clickbound === void 0 ? void 0 : clickbound.width, clickbound === null || clickbound === void 0 ? void 0 : clickbound.height, hover.background, (_hover$typography = hover.typography) === null || _hover$typography === void 0 ? void 0 : _hover$typography.color, bordersTemplate(hover === null || hover === void 0 ? void 0 : hover.border), outlineTemplate(focus.outline), disabled.background, bordersTemplate(disabled.border), typographyTemplate(disabled.typography), disabled.background);
|
|
997
1000
|
});
|
|
998
|
-
const Button = /*#__PURE__*/React
|
|
1001
|
+
const Button = /*#__PURE__*/React.forwardRef(function Button({
|
|
999
1002
|
color = 'primary',
|
|
1000
1003
|
variant = 'contained',
|
|
1001
1004
|
children,
|
|
@@ -1023,9 +1026,16 @@ const Button = /*#__PURE__*/React$1.forwardRef(function Button({
|
|
|
1023
1026
|
tabIndex,
|
|
1024
1027
|
...other
|
|
1025
1028
|
};
|
|
1026
|
-
return /*#__PURE__*/
|
|
1027
|
-
theme: token
|
|
1028
|
-
|
|
1029
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
1030
|
+
theme: token,
|
|
1031
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ButtonBase, { ...buttonProps,
|
|
1032
|
+
children: fullWidth ? /*#__PURE__*/jsxRuntime.jsx(InnerFullWidth, {
|
|
1033
|
+
children: children
|
|
1034
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Inner, {
|
|
1035
|
+
children: children
|
|
1036
|
+
})
|
|
1037
|
+
})
|
|
1038
|
+
});
|
|
1029
1039
|
});
|
|
1030
1040
|
|
|
1031
1041
|
const {
|
|
@@ -1140,7 +1150,7 @@ const StyledTypography$1 = styled__default['default'].p.withConfig({
|
|
|
1140
1150
|
lines > 0 && styled.css(["&{display:-webkit-box;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;}"], lines), ({
|
|
1141
1151
|
link: link$1
|
|
1142
1152
|
}) => link$1 && styled.css(["&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}"], outlineTemplate(link.states.focus.outline)));
|
|
1143
|
-
const Typography = /*#__PURE__*/React
|
|
1153
|
+
const Typography = /*#__PURE__*/React.forwardRef(function Typography({
|
|
1144
1154
|
variant = 'body_short',
|
|
1145
1155
|
children,
|
|
1146
1156
|
bold,
|
|
@@ -1159,14 +1169,16 @@ const Typography = /*#__PURE__*/React$1.forwardRef(function Typography({
|
|
|
1159
1169
|
throw new Error(`Typography variant not found for variant "${variantName}" ("${variant}") & group "${group || ''}"`);
|
|
1160
1170
|
}
|
|
1161
1171
|
|
|
1162
|
-
return /*#__PURE__*/
|
|
1172
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledTypography$1, {
|
|
1163
1173
|
as: as,
|
|
1164
1174
|
typography: { ...typography,
|
|
1165
1175
|
...token
|
|
1166
1176
|
},
|
|
1167
1177
|
link: link,
|
|
1168
|
-
ref: ref
|
|
1169
|
-
|
|
1178
|
+
ref: ref,
|
|
1179
|
+
...other,
|
|
1180
|
+
children: children
|
|
1181
|
+
});
|
|
1170
1182
|
}); // Typography.displayName = 'EdsTypography'
|
|
1171
1183
|
|
|
1172
1184
|
const {
|
|
@@ -1320,35 +1332,38 @@ const TableBase$1 = styled__default['default'].table.withConfig({
|
|
|
1320
1332
|
displayName: "Table__TableBase",
|
|
1321
1333
|
componentId: "sc-14kktwc-0"
|
|
1322
1334
|
})(["border-spacing:0;background:", ";"], tableCell.background);
|
|
1323
|
-
const Table$1 = /*#__PURE__*/React
|
|
1335
|
+
const Table$1 = /*#__PURE__*/React.forwardRef(function Table({
|
|
1324
1336
|
children,
|
|
1325
1337
|
...props
|
|
1326
1338
|
}, ref) {
|
|
1327
|
-
return /*#__PURE__*/
|
|
1328
|
-
ref: ref
|
|
1329
|
-
|
|
1339
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableBase$1, { ...props,
|
|
1340
|
+
ref: ref,
|
|
1341
|
+
children: children
|
|
1342
|
+
});
|
|
1330
1343
|
}); // Table.displayName = 'EdsTable'
|
|
1331
1344
|
|
|
1332
1345
|
const initalState$2 = {
|
|
1333
1346
|
variant: 'body'
|
|
1334
1347
|
};
|
|
1335
|
-
const InnerContext = /*#__PURE__*/React
|
|
1348
|
+
const InnerContext = /*#__PURE__*/React.createContext(initalState$2);
|
|
1336
1349
|
|
|
1337
1350
|
const TableBase = styled__default['default'].tbody.withConfig({
|
|
1338
1351
|
displayName: "Body__TableBase",
|
|
1339
1352
|
componentId: "sc-1pdmiku-0"
|
|
1340
1353
|
})([""]);
|
|
1341
|
-
const Body = /*#__PURE__*/React
|
|
1354
|
+
const Body = /*#__PURE__*/React.forwardRef(function Body({
|
|
1342
1355
|
children,
|
|
1343
1356
|
...props
|
|
1344
1357
|
}, ref) {
|
|
1345
|
-
return /*#__PURE__*/
|
|
1358
|
+
return /*#__PURE__*/jsxRuntime.jsx(InnerContext.Provider, {
|
|
1346
1359
|
value: {
|
|
1347
1360
|
variant: 'body'
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1361
|
+
},
|
|
1362
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TableBase, { ...props,
|
|
1363
|
+
ref: ref,
|
|
1364
|
+
children: children
|
|
1365
|
+
})
|
|
1366
|
+
});
|
|
1352
1367
|
});
|
|
1353
1368
|
|
|
1354
1369
|
const StyledTableCell$1 = styled__default['default'].td.withConfig({
|
|
@@ -1370,7 +1385,7 @@ const StyledTableCell$1 = styled__default['default'].td.withConfig({
|
|
|
1370
1385
|
const base = styled.css(["min-height:", ";height:", ";background:", ";", " ", " ", ""], height, height, backgroundColor, spacingsTemplate(spacings), typographyTemplate(typography), bordersTemplate(border));
|
|
1371
1386
|
return base;
|
|
1372
1387
|
});
|
|
1373
|
-
const TableDataCell = /*#__PURE__*/React
|
|
1388
|
+
const TableDataCell = /*#__PURE__*/React.forwardRef(function TableDataCell({
|
|
1374
1389
|
children,
|
|
1375
1390
|
variant = 'text',
|
|
1376
1391
|
...rest
|
|
@@ -1381,11 +1396,13 @@ const TableDataCell = /*#__PURE__*/React$1.forwardRef(function TableDataCell({
|
|
|
1381
1396
|
const token = useToken({
|
|
1382
1397
|
density
|
|
1383
1398
|
}, applyVariant(variant, tableCell));
|
|
1384
|
-
return /*#__PURE__*/
|
|
1385
|
-
theme: token
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1399
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
1400
|
+
theme: token,
|
|
1401
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledTableCell$1, { ...rest,
|
|
1402
|
+
ref: ref,
|
|
1403
|
+
children: children
|
|
1404
|
+
})
|
|
1405
|
+
});
|
|
1389
1406
|
});
|
|
1390
1407
|
|
|
1391
1408
|
const {
|
|
@@ -1536,7 +1553,7 @@ const CellInner = styled__default['default'].div.withConfig({
|
|
|
1536
1553
|
displayName: "HeaderCell__CellInner",
|
|
1537
1554
|
componentId: "sc-18w2o3a-1"
|
|
1538
1555
|
})(["display:flex;align-items:center;"]);
|
|
1539
|
-
const TableHeaderCell = /*#__PURE__*/React
|
|
1556
|
+
const TableHeaderCell = /*#__PURE__*/React.forwardRef(function TableHeaderCell({
|
|
1540
1557
|
children,
|
|
1541
1558
|
sort,
|
|
1542
1559
|
...rest
|
|
@@ -1547,33 +1564,41 @@ const TableHeaderCell = /*#__PURE__*/React$1.forwardRef(function TableHeaderCell
|
|
|
1547
1564
|
const token = useToken({
|
|
1548
1565
|
density
|
|
1549
1566
|
}, token$5);
|
|
1550
|
-
return /*#__PURE__*/
|
|
1551
|
-
theme: token
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1567
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
1568
|
+
theme: token,
|
|
1569
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledTableCell, {
|
|
1570
|
+
"aria-sort": sort,
|
|
1571
|
+
...rest,
|
|
1572
|
+
ref: ref,
|
|
1573
|
+
children: /*#__PURE__*/jsxRuntime.jsx(CellInner, {
|
|
1574
|
+
children: children
|
|
1575
|
+
})
|
|
1576
|
+
})
|
|
1577
|
+
});
|
|
1557
1578
|
});
|
|
1558
1579
|
|
|
1559
|
-
const Cell = /*#__PURE__*/React
|
|
1580
|
+
const Cell = /*#__PURE__*/React.forwardRef(function Cell({ ...rest
|
|
1560
1581
|
}, ref) {
|
|
1561
|
-
return /*#__PURE__*/
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1582
|
+
return /*#__PURE__*/jsxRuntime.jsx(InnerContext.Consumer, {
|
|
1583
|
+
children: ({
|
|
1584
|
+
variant,
|
|
1585
|
+
sticky
|
|
1586
|
+
}) => {
|
|
1587
|
+
switch (variant) {
|
|
1588
|
+
case 'head':
|
|
1589
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableHeaderCell, {
|
|
1590
|
+
ref: ref,
|
|
1591
|
+
sticky: sticky,
|
|
1592
|
+
...rest
|
|
1593
|
+
});
|
|
1571
1594
|
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1595
|
+
default:
|
|
1596
|
+
case 'body':
|
|
1597
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableDataCell, {
|
|
1598
|
+
ref: ref,
|
|
1599
|
+
...rest
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1577
1602
|
}
|
|
1578
1603
|
});
|
|
1579
1604
|
});
|
|
@@ -1609,19 +1634,21 @@ const StyledTableHead = styled__default['default'].thead.withConfig({
|
|
|
1609
1634
|
displayName: "Head__StyledTableHead",
|
|
1610
1635
|
componentId: "sc-g9tch7-0"
|
|
1611
1636
|
})(["", " background:", ";"], bordersTemplate(token$4.border), token$4.background);
|
|
1612
|
-
const Head = /*#__PURE__*/React
|
|
1637
|
+
const Head = /*#__PURE__*/React.forwardRef(function Head({
|
|
1613
1638
|
children,
|
|
1614
1639
|
sticky,
|
|
1615
1640
|
...props
|
|
1616
1641
|
}, ref) {
|
|
1617
|
-
return /*#__PURE__*/
|
|
1642
|
+
return /*#__PURE__*/jsxRuntime.jsx(InnerContext.Provider, {
|
|
1618
1643
|
value: {
|
|
1619
1644
|
variant: 'head',
|
|
1620
1645
|
sticky
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1646
|
+
},
|
|
1647
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledTableHead, { ...props,
|
|
1648
|
+
ref: ref,
|
|
1649
|
+
children: children
|
|
1650
|
+
})
|
|
1651
|
+
});
|
|
1625
1652
|
});
|
|
1626
1653
|
|
|
1627
1654
|
const {
|
|
@@ -1664,14 +1691,15 @@ const StyledRow = styled__default['default'].tr.withConfig({
|
|
|
1664
1691
|
}
|
|
1665
1692
|
};
|
|
1666
1693
|
});
|
|
1667
|
-
const Row = /*#__PURE__*/React
|
|
1694
|
+
const Row = /*#__PURE__*/React.forwardRef(function Row({ ...props
|
|
1668
1695
|
}, ref) {
|
|
1669
1696
|
const {
|
|
1670
1697
|
children
|
|
1671
1698
|
} = props;
|
|
1672
|
-
return /*#__PURE__*/
|
|
1673
|
-
ref: ref
|
|
1674
|
-
|
|
1699
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledRow, { ...props,
|
|
1700
|
+
ref: ref,
|
|
1701
|
+
children: children
|
|
1702
|
+
});
|
|
1675
1703
|
});
|
|
1676
1704
|
|
|
1677
1705
|
const StyledCaption = styled__default['default'].caption.withConfig({
|
|
@@ -1682,10 +1710,10 @@ const StyledCaption = styled__default['default'].caption.withConfig({
|
|
|
1682
1710
|
}) => ({
|
|
1683
1711
|
captionSide
|
|
1684
1712
|
}));
|
|
1685
|
-
const Caption = /*#__PURE__*/React
|
|
1686
|
-
return /*#__PURE__*/
|
|
1713
|
+
const Caption = /*#__PURE__*/React.forwardRef(function Caption(props, ref) {
|
|
1714
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledCaption, { ...props,
|
|
1687
1715
|
ref: ref
|
|
1688
|
-
})
|
|
1716
|
+
});
|
|
1689
1717
|
});
|
|
1690
1718
|
|
|
1691
1719
|
const Table = Table$1;
|
|
@@ -1772,7 +1800,7 @@ const StyledDivider$3 = styled__default['default'].hr.withConfig({
|
|
|
1772
1800
|
displayName: "Divider__StyledDivider",
|
|
1773
1801
|
componentId: "sc-1d8osde-0"
|
|
1774
1802
|
})(["border:none;background-color:", ";margin-top:", ";margin-bottom:", ";height:", ";"], props => props.backgroundColor, props => props.marginTop, props => props.marginBottom, props => props.dividerHeight);
|
|
1775
|
-
const Divider = /*#__PURE__*/React
|
|
1803
|
+
const Divider = /*#__PURE__*/React.forwardRef(function Divider({
|
|
1776
1804
|
color = 'medium',
|
|
1777
1805
|
variant = 'medium',
|
|
1778
1806
|
...rest
|
|
@@ -1785,19 +1813,19 @@ const Divider = /*#__PURE__*/React$1.forwardRef(function Divider({
|
|
|
1785
1813
|
dividerHeight: baseDivider.height,
|
|
1786
1814
|
...rest
|
|
1787
1815
|
};
|
|
1788
|
-
return /*#__PURE__*/
|
|
1816
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledDivider$3, { ...props,
|
|
1789
1817
|
ref: ref
|
|
1790
|
-
})
|
|
1818
|
+
});
|
|
1791
1819
|
});
|
|
1792
1820
|
|
|
1793
1821
|
const initalState$1 = {
|
|
1794
1822
|
isFocused: false
|
|
1795
1823
|
};
|
|
1796
|
-
const TextFieldContext = /*#__PURE__*/React
|
|
1824
|
+
const TextFieldContext = /*#__PURE__*/React.createContext(initalState$1);
|
|
1797
1825
|
const TextFieldProvider = ({
|
|
1798
1826
|
children
|
|
1799
1827
|
}) => {
|
|
1800
|
-
const [state, setState] = React
|
|
1828
|
+
const [state, setState] = React.useState(initalState$1);
|
|
1801
1829
|
|
|
1802
1830
|
const handleFocus = () => {
|
|
1803
1831
|
setState(prevState => ({ ...prevState,
|
|
@@ -1816,11 +1844,12 @@ const TextFieldProvider = ({
|
|
|
1816
1844
|
handleBlur,
|
|
1817
1845
|
isFocused: state.isFocused
|
|
1818
1846
|
};
|
|
1819
|
-
return /*#__PURE__*/
|
|
1820
|
-
value: value
|
|
1821
|
-
|
|
1847
|
+
return /*#__PURE__*/jsxRuntime.jsx(TextFieldContext.Provider, {
|
|
1848
|
+
value: value,
|
|
1849
|
+
children: children
|
|
1850
|
+
});
|
|
1822
1851
|
};
|
|
1823
|
-
const useTextField = () => React
|
|
1852
|
+
const useTextField = () => React.useContext(TextFieldContext);
|
|
1824
1853
|
|
|
1825
1854
|
const {
|
|
1826
1855
|
colors: {
|
|
@@ -2020,7 +2049,7 @@ const StyledInput = styled__default['default'].input.withConfig({
|
|
|
2020
2049
|
} = theme;
|
|
2021
2050
|
return styled.css(["width:100%;box-sizing:border-box;margin:0;appearance:none;background:", ";border:none;height:", ";box-shadow:", ";", " ", " ", ";&::placeholder{color:", ";}&:active,&:focus{outline-offset:0;box-shadow:none;", "}&:disabled{color:", ";cursor:not-allowed;box-shadow:none;outline:none;&:focus,&:active{outline:none;}}&[readOnly]{background:", ";box-shadow:", ";}"], theme.background, theme.minHeight, boxShadow, outlineTemplate(activeOutline), typographyTemplate(theme.typography), spacingsTemplate(theme.spacings), theme.entities.placeholder.typography.color, outlineTemplate(focusOutline), disabled.typography.color, readOnly.background, readOnly.boxShadow);
|
|
2022
2051
|
});
|
|
2023
|
-
const Input$5 = /*#__PURE__*/React
|
|
2052
|
+
const Input$5 = /*#__PURE__*/React.forwardRef(function Input({
|
|
2024
2053
|
variant = 'default',
|
|
2025
2054
|
disabled = false,
|
|
2026
2055
|
type = 'text',
|
|
@@ -2040,9 +2069,11 @@ const Input$5 = /*#__PURE__*/React$1.forwardRef(function Input({
|
|
|
2040
2069
|
disabled,
|
|
2041
2070
|
...other
|
|
2042
2071
|
};
|
|
2043
|
-
return /*#__PURE__*/
|
|
2044
|
-
theme: token
|
|
2045
|
-
|
|
2072
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
2073
|
+
theme: token,
|
|
2074
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledInput, { ...inputProps
|
|
2075
|
+
})
|
|
2076
|
+
});
|
|
2046
2077
|
});
|
|
2047
2078
|
|
|
2048
2079
|
const {
|
|
@@ -2114,7 +2145,7 @@ const StyledIcon$2 = styled__default['default'].div.withConfig({
|
|
|
2114
2145
|
|
|
2115
2146
|
return styled.css(["&,svg{fill:", ";width:", "px;height:", "px;}"], fill, size, size);
|
|
2116
2147
|
});
|
|
2117
|
-
const InputIcon = /*#__PURE__*/React
|
|
2148
|
+
const InputIcon = /*#__PURE__*/React.forwardRef(function InputIcon({
|
|
2118
2149
|
size = 24,
|
|
2119
2150
|
variant = 'default',
|
|
2120
2151
|
isDisabled = false,
|
|
@@ -2135,9 +2166,12 @@ const InputIcon = /*#__PURE__*/React$1.forwardRef(function InputIcon({
|
|
|
2135
2166
|
isFocused,
|
|
2136
2167
|
size
|
|
2137
2168
|
};
|
|
2138
|
-
return /*#__PURE__*/
|
|
2139
|
-
ref: ref
|
|
2140
|
-
|
|
2169
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledIcon$2, {
|
|
2170
|
+
ref: ref,
|
|
2171
|
+
...iconProps,
|
|
2172
|
+
...other,
|
|
2173
|
+
children: children
|
|
2174
|
+
});
|
|
2141
2175
|
});
|
|
2142
2176
|
|
|
2143
2177
|
const {
|
|
@@ -2306,7 +2340,7 @@ const StyledTextarea = styled__default['default'].textarea.withConfig({
|
|
|
2306
2340
|
displayName: "Textarea__StyledTextarea",
|
|
2307
2341
|
componentId: "sc-2yjdcc-0"
|
|
2308
2342
|
})(["width:100%;box-sizing:border-box;margin:0;border:none;appearance:none;background:", ";height:auto;", " ", " &::placeholder{color:", ";}&:disabled{color:", ";}&[readOnly]{box-shadow:", ";background:", ";}"], input.background, typographyTemplate(input.typography), Variation$2, input.entities.placeholder.typography.color, input.states.disabled.typography.color, input.states.readOnly.boxShadow, input.states.readOnly.background);
|
|
2309
|
-
const Textarea = /*#__PURE__*/React
|
|
2343
|
+
const Textarea = /*#__PURE__*/React.forwardRef(function Textarea({
|
|
2310
2344
|
variant = 'default',
|
|
2311
2345
|
disabled = false,
|
|
2312
2346
|
type = 'text',
|
|
@@ -2315,7 +2349,7 @@ const Textarea = /*#__PURE__*/React$1.forwardRef(function Textarea({
|
|
|
2315
2349
|
}, ref) {
|
|
2316
2350
|
const actualVariant = variant === 'default' ? 'input' : variant;
|
|
2317
2351
|
const inputVariant = tokens$6[actualVariant];
|
|
2318
|
-
const [textareaEl, setTextareaEl] = React
|
|
2352
|
+
const [textareaEl, setTextareaEl] = React.useState(null);
|
|
2319
2353
|
const {
|
|
2320
2354
|
density
|
|
2321
2355
|
} = useEds();
|
|
@@ -2345,7 +2379,8 @@ const Textarea = /*#__PURE__*/React$1.forwardRef(function Textarea({
|
|
|
2345
2379
|
density,
|
|
2346
2380
|
...other
|
|
2347
2381
|
};
|
|
2348
|
-
return /*#__PURE__*/
|
|
2382
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledTextarea, { ...inputProps
|
|
2383
|
+
});
|
|
2349
2384
|
});
|
|
2350
2385
|
|
|
2351
2386
|
const {
|
|
@@ -2403,7 +2438,7 @@ const Adornments = styled__default['default'].div.withConfig({
|
|
|
2403
2438
|
marginTop: theme.spacings.top,
|
|
2404
2439
|
alignSelf: 'start'
|
|
2405
2440
|
});
|
|
2406
|
-
const Field = /*#__PURE__*/React
|
|
2441
|
+
const Field = /*#__PURE__*/React.forwardRef(function Field({
|
|
2407
2442
|
multiline,
|
|
2408
2443
|
variant,
|
|
2409
2444
|
disabled,
|
|
@@ -2462,15 +2497,22 @@ const Field = /*#__PURE__*/React$1.forwardRef(function Field({
|
|
|
2462
2497
|
rowsMax,
|
|
2463
2498
|
ref: ref
|
|
2464
2499
|
};
|
|
2465
|
-
return /*#__PURE__*/
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2500
|
+
return /*#__PURE__*/jsxRuntime.jsxs(InputWrapper$2, { ...inputWrapperProps,
|
|
2501
|
+
children: [multiline ? /*#__PURE__*/jsxRuntime.jsx(StrippedTextarea, { ...textareaProps
|
|
2502
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(StrippedInput, { ...inputProps
|
|
2503
|
+
}), (inputIcon || unit) && /*#__PURE__*/jsxRuntime.jsxs(Adornments, {
|
|
2504
|
+
multiline: multiline,
|
|
2505
|
+
children: [unit && /*#__PURE__*/jsxRuntime.jsx(Unit, {
|
|
2506
|
+
isDisabled: disabled,
|
|
2507
|
+
children: unit
|
|
2508
|
+
}), inputIcon && /*#__PURE__*/jsxRuntime.jsx(InputIcon, {
|
|
2509
|
+
isDisabled: disabled,
|
|
2510
|
+
variant: variant,
|
|
2511
|
+
size: iconSize,
|
|
2512
|
+
children: inputIcon
|
|
2513
|
+
})]
|
|
2514
|
+
})]
|
|
2515
|
+
});
|
|
2474
2516
|
});
|
|
2475
2517
|
|
|
2476
2518
|
const {
|
|
@@ -2510,7 +2552,7 @@ const Text$2 = styled__default['default'].span.withConfig({
|
|
|
2510
2552
|
displayName: "Label__Text",
|
|
2511
2553
|
componentId: "sc-1gi2bcn-1"
|
|
2512
2554
|
})(["margin:0;"]);
|
|
2513
|
-
const Label$1 = /*#__PURE__*/React
|
|
2555
|
+
const Label$1 = /*#__PURE__*/React.forwardRef(function Label(props, ref) {
|
|
2514
2556
|
const {
|
|
2515
2557
|
label = '',
|
|
2516
2558
|
meta,
|
|
@@ -2521,10 +2563,16 @@ const Label$1 = /*#__PURE__*/React$1.forwardRef(function Label(props, ref) {
|
|
|
2521
2563
|
/*#__PURE__*/
|
|
2522
2564
|
|
|
2523
2565
|
/* @TODO: Other props spread has to be at the end for downshift to create the for attribute */
|
|
2524
|
-
|
|
2566
|
+
jsxRuntime.jsxs(LabelBase, {
|
|
2525
2567
|
ref: ref,
|
|
2526
|
-
disabledText: disabled
|
|
2527
|
-
|
|
2568
|
+
disabledText: disabled,
|
|
2569
|
+
...other,
|
|
2570
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Text$2, {
|
|
2571
|
+
children: label
|
|
2572
|
+
}), meta && /*#__PURE__*/jsxRuntime.jsx(Text$2, {
|
|
2573
|
+
children: meta
|
|
2574
|
+
})]
|
|
2575
|
+
})
|
|
2528
2576
|
);
|
|
2529
2577
|
}); // Label.displayName = 'eds-text-field-label'
|
|
2530
2578
|
|
|
@@ -2612,7 +2660,7 @@ const Text$1 = styled__default['default'].p.withConfig({
|
|
|
2612
2660
|
})(["", " margin:0 0 0 ", ";", ""], typographyTemplate(helperText.typography), ({
|
|
2613
2661
|
spacings
|
|
2614
2662
|
}) => spacings.left, Variation);
|
|
2615
|
-
const TextfieldHelperText = /*#__PURE__*/React
|
|
2663
|
+
const TextfieldHelperText = /*#__PURE__*/React.forwardRef(function TextfieldHelperText({
|
|
2616
2664
|
helperText: helperText$1,
|
|
2617
2665
|
icon,
|
|
2618
2666
|
variant = 'default',
|
|
@@ -2629,27 +2677,30 @@ const TextfieldHelperText = /*#__PURE__*/React$1.forwardRef(function TextfieldHe
|
|
|
2629
2677
|
disabledColor: helperVariant.disabledColor,
|
|
2630
2678
|
focusColor: helperVariant.focusColor
|
|
2631
2679
|
};
|
|
2632
|
-
return /*#__PURE__*/
|
|
2633
|
-
ref: ref
|
|
2634
|
-
|
|
2635
|
-
spacings: spacings
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2680
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Container$4, {
|
|
2681
|
+
ref: ref,
|
|
2682
|
+
...rest,
|
|
2683
|
+
spacings: spacings,
|
|
2684
|
+
children: [icon && /*#__PURE__*/jsxRuntime.jsx(InputIcon, {
|
|
2685
|
+
isDisabled: isDisabled,
|
|
2686
|
+
colors: colors,
|
|
2687
|
+
size: 16,
|
|
2688
|
+
children: icon
|
|
2689
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Text$1, {
|
|
2690
|
+
variant: helperVariant,
|
|
2691
|
+
isFocused: isFocused,
|
|
2692
|
+
isDisabled: isDisabled,
|
|
2693
|
+
spacings: spacings,
|
|
2694
|
+
children: helperText$1
|
|
2695
|
+
})]
|
|
2696
|
+
});
|
|
2646
2697
|
});
|
|
2647
2698
|
|
|
2648
2699
|
const Container$3 = styled__default['default'].div.withConfig({
|
|
2649
2700
|
displayName: "TextField__Container",
|
|
2650
2701
|
componentId: "sc-o1nc07-0"
|
|
2651
2702
|
})(["min-width:100px;width:100%;"]);
|
|
2652
|
-
const TextField = /*#__PURE__*/React
|
|
2703
|
+
const TextField = /*#__PURE__*/React.forwardRef(function TextField({
|
|
2653
2704
|
id,
|
|
2654
2705
|
label,
|
|
2655
2706
|
meta,
|
|
@@ -2703,9 +2754,17 @@ const TextField = /*#__PURE__*/React$1.forwardRef(function TextField({
|
|
|
2703
2754
|
const token = useToken({
|
|
2704
2755
|
density
|
|
2705
2756
|
}, textfield$1);
|
|
2706
|
-
return /*#__PURE__*/
|
|
2707
|
-
theme: token
|
|
2708
|
-
|
|
2757
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
2758
|
+
theme: token,
|
|
2759
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Container$3, { ...containerProps,
|
|
2760
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(TextFieldProvider, {
|
|
2761
|
+
children: [showLabel && /*#__PURE__*/jsxRuntime.jsx(Label$1, { ...labelProps
|
|
2762
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Field, { ...inputProps
|
|
2763
|
+
}), showHelperText && /*#__PURE__*/jsxRuntime.jsx(TextfieldHelperText, { ...helperProps
|
|
2764
|
+
})]
|
|
2765
|
+
})
|
|
2766
|
+
})
|
|
2767
|
+
});
|
|
2709
2768
|
});
|
|
2710
2769
|
|
|
2711
2770
|
let _icons = {};
|
|
@@ -2761,7 +2820,7 @@ const StyledPath$2 = styled__default['default'].path.attrs(({
|
|
|
2761
2820
|
displayName: "Icon__StyledPath",
|
|
2762
2821
|
componentId: "sc-6evbi1-1"
|
|
2763
2822
|
})([""]);
|
|
2764
|
-
const Icon$2 = /*#__PURE__*/React
|
|
2823
|
+
const Icon$2 = /*#__PURE__*/React.forwardRef(function Icon({
|
|
2765
2824
|
size = 24,
|
|
2766
2825
|
color = 'currentColor',
|
|
2767
2826
|
name,
|
|
@@ -2809,13 +2868,17 @@ const Icon$2 = /*#__PURE__*/React$1.forwardRef(function Icon({
|
|
|
2809
2868
|
};
|
|
2810
2869
|
}
|
|
2811
2870
|
|
|
2812
|
-
return /*#__PURE__*/
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2871
|
+
return /*#__PURE__*/jsxRuntime.jsxs(StyledSvg, { ...svgProps,
|
|
2872
|
+
...rest,
|
|
2873
|
+
ref: ref,
|
|
2874
|
+
children: [title && /*#__PURE__*/jsxRuntime.jsx("title", {
|
|
2875
|
+
id: titleId,
|
|
2876
|
+
children: title
|
|
2877
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledPath$2, {
|
|
2878
|
+
"data-testid": "eds-icon-path",
|
|
2879
|
+
...pathProps
|
|
2880
|
+
})]
|
|
2881
|
+
});
|
|
2819
2882
|
}); // Icon.displayName = 'EdsIcon'
|
|
2820
2883
|
|
|
2821
2884
|
const Icon$1 = Icon$2;
|
|
@@ -2839,32 +2902,35 @@ const StyledList$1 = styled__default['default'].ul.withConfig({
|
|
|
2839
2902
|
})(["", " ", ""], ({
|
|
2840
2903
|
as
|
|
2841
2904
|
}) => as === 'ol' ? styled.css(["& ol{list-style-type:lower-alpha;}"]) : '', typographyTemplate(typography$d));
|
|
2842
|
-
const List$2 = /*#__PURE__*/React
|
|
2905
|
+
const List$2 = /*#__PURE__*/React.forwardRef(function List({
|
|
2843
2906
|
children,
|
|
2844
2907
|
variant = 'bullet',
|
|
2845
2908
|
...props
|
|
2846
2909
|
}, ref) {
|
|
2847
2910
|
const as = variant === 'numbered' ? 'ol' : 'ul';
|
|
2848
|
-
return /*#__PURE__*/
|
|
2911
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledList$1, {
|
|
2849
2912
|
as: as,
|
|
2850
|
-
ref: ref
|
|
2851
|
-
|
|
2913
|
+
ref: ref,
|
|
2914
|
+
...props,
|
|
2915
|
+
children: children
|
|
2916
|
+
});
|
|
2852
2917
|
}); // List.displayName = 'List'
|
|
2853
2918
|
|
|
2854
|
-
const ListItem$4 = /*#__PURE__*/React
|
|
2919
|
+
const ListItem$4 = /*#__PURE__*/React.forwardRef(function ListItem({
|
|
2855
2920
|
children,
|
|
2856
2921
|
...props
|
|
2857
2922
|
}, ref) {
|
|
2858
|
-
return /*#__PURE__*/
|
|
2859
|
-
ref: ref
|
|
2860
|
-
|
|
2923
|
+
return /*#__PURE__*/jsxRuntime.jsx("li", { ...props,
|
|
2924
|
+
ref: ref,
|
|
2925
|
+
children: children
|
|
2926
|
+
});
|
|
2861
2927
|
}); // ListItem.displayName = 'ListItem'
|
|
2862
2928
|
|
|
2863
2929
|
const List$1 = List$2;
|
|
2864
2930
|
List$1.Item = ListItem$4;
|
|
2865
2931
|
List$1.Item.displayName = 'List.Item';
|
|
2866
2932
|
|
|
2867
|
-
const Accordion$1 = /*#__PURE__*/React
|
|
2933
|
+
const Accordion$1 = /*#__PURE__*/React.forwardRef(function Accordion({
|
|
2868
2934
|
headerLevel = 'h2',
|
|
2869
2935
|
chevronPosition = 'left',
|
|
2870
2936
|
children,
|
|
@@ -2872,21 +2938,22 @@ const Accordion$1 = /*#__PURE__*/React$1.forwardRef(function Accordion({
|
|
|
2872
2938
|
...props
|
|
2873
2939
|
}, ref) {
|
|
2874
2940
|
const accordionId = useId(id, 'accordion');
|
|
2875
|
-
const AccordionItems = React
|
|
2941
|
+
const AccordionItems = React.Children.map(children, (child, index) => {
|
|
2876
2942
|
if (!child) return null;
|
|
2877
|
-
return /*#__PURE__*/React
|
|
2943
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
2878
2944
|
accordionId,
|
|
2879
2945
|
index,
|
|
2880
2946
|
headerLevel,
|
|
2881
2947
|
chevronPosition
|
|
2882
2948
|
});
|
|
2883
2949
|
});
|
|
2884
|
-
return /*#__PURE__*/
|
|
2885
|
-
ref: ref
|
|
2886
|
-
|
|
2950
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", { ...props,
|
|
2951
|
+
ref: ref,
|
|
2952
|
+
children: AccordionItems
|
|
2953
|
+
});
|
|
2887
2954
|
}); // Accordion.displayName = 'Accordion'
|
|
2888
2955
|
|
|
2889
|
-
const AccordionItem = /*#__PURE__*/React
|
|
2956
|
+
const AccordionItem = /*#__PURE__*/React.forwardRef(function AccordionItem({
|
|
2890
2957
|
headerLevel,
|
|
2891
2958
|
chevronPosition,
|
|
2892
2959
|
index = 0,
|
|
@@ -2896,16 +2963,16 @@ const AccordionItem = /*#__PURE__*/React$1.forwardRef(function AccordionItem({
|
|
|
2896
2963
|
disabled,
|
|
2897
2964
|
...props
|
|
2898
2965
|
}, ref) {
|
|
2899
|
-
const [expanded, setExpanded] = React
|
|
2966
|
+
const [expanded, setExpanded] = React.useState(isExpanded);
|
|
2900
2967
|
|
|
2901
2968
|
const toggleExpanded = () => {
|
|
2902
2969
|
setExpanded(!expanded);
|
|
2903
2970
|
};
|
|
2904
2971
|
|
|
2905
|
-
const Children = React
|
|
2972
|
+
const Children = React.Children.map(children, (child, childIndex) => {
|
|
2906
2973
|
const headerId = `${accordionId}-header-${index + 1}`;
|
|
2907
2974
|
const panelId = `${accordionId}-panel-${index + 1}`;
|
|
2908
|
-
return childIndex === 0 ? /*#__PURE__*/React
|
|
2975
|
+
return childIndex === 0 ? /*#__PURE__*/React.cloneElement(child, {
|
|
2909
2976
|
isExpanded: expanded,
|
|
2910
2977
|
toggleExpanded,
|
|
2911
2978
|
id: headerId,
|
|
@@ -2914,18 +2981,19 @@ const AccordionItem = /*#__PURE__*/React$1.forwardRef(function AccordionItem({
|
|
|
2914
2981
|
chevronPosition,
|
|
2915
2982
|
parentIndex: index,
|
|
2916
2983
|
disabled
|
|
2917
|
-
}) : /*#__PURE__*/React
|
|
2984
|
+
}) : /*#__PURE__*/React.cloneElement(child, {
|
|
2918
2985
|
hidden: !expanded,
|
|
2919
2986
|
id: panelId,
|
|
2920
2987
|
headerId
|
|
2921
2988
|
});
|
|
2922
2989
|
});
|
|
2923
|
-
React
|
|
2990
|
+
React.useEffect(() => {
|
|
2924
2991
|
setExpanded(isExpanded);
|
|
2925
2992
|
}, [isExpanded]);
|
|
2926
|
-
return /*#__PURE__*/
|
|
2927
|
-
ref: ref
|
|
2928
|
-
|
|
2993
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", { ...props,
|
|
2994
|
+
ref: ref,
|
|
2995
|
+
children: Children
|
|
2996
|
+
});
|
|
2929
2997
|
}); // AccordionItem.displayName = 'AccordionItem'
|
|
2930
2998
|
|
|
2931
2999
|
const {
|
|
@@ -3048,16 +3116,17 @@ const StyledAccordionHeaderTitle = styled__default['default'].span.withConfig({
|
|
|
3048
3116
|
|
|
3049
3117
|
return isExpanded && !disabled ? (_tokens$entities$head = accordion.entities.header.states.active.typography) === null || _tokens$entities$head === void 0 ? void 0 : _tokens$entities$head.color : 'inherit';
|
|
3050
3118
|
});
|
|
3051
|
-
const AccordionHeaderTitle = /*#__PURE__*/React
|
|
3119
|
+
const AccordionHeaderTitle = /*#__PURE__*/React.forwardRef(function AccordionHeaderTitle({
|
|
3052
3120
|
isExpanded,
|
|
3053
3121
|
disabled,
|
|
3054
3122
|
children
|
|
3055
3123
|
}, ref) {
|
|
3056
|
-
return /*#__PURE__*/
|
|
3124
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledAccordionHeaderTitle, {
|
|
3057
3125
|
ref: ref,
|
|
3058
3126
|
isExpanded: isExpanded,
|
|
3059
|
-
disabled: disabled
|
|
3060
|
-
|
|
3127
|
+
disabled: disabled,
|
|
3128
|
+
children: children
|
|
3129
|
+
});
|
|
3061
3130
|
}); // AccordionHeaderTitle.displayName = 'AccordionHeaderTitle'
|
|
3062
3131
|
|
|
3063
3132
|
const {
|
|
@@ -3107,7 +3176,7 @@ const StyledIcon$1 = styled__default['default'](Icon$1).withConfig({
|
|
|
3107
3176
|
} : {
|
|
3108
3177
|
marginLeft: '16px'
|
|
3109
3178
|
});
|
|
3110
|
-
const AccordionHeader = /*#__PURE__*/React
|
|
3179
|
+
const AccordionHeader = /*#__PURE__*/React.forwardRef(function AccordionHeader({
|
|
3111
3180
|
parentIndex,
|
|
3112
3181
|
headerLevel,
|
|
3113
3182
|
chevronPosition,
|
|
@@ -3145,23 +3214,24 @@ const AccordionHeader = /*#__PURE__*/React$1.forwardRef(function AccordionHeader
|
|
|
3145
3214
|
}
|
|
3146
3215
|
};
|
|
3147
3216
|
|
|
3148
|
-
const chevron = /*#__PURE__*/
|
|
3149
|
-
key: `${id}-icon`,
|
|
3217
|
+
const chevron = /*#__PURE__*/jsxRuntime.jsx(StyledIcon$1, {
|
|
3150
3218
|
data: isExpanded ? edsIcons.chevron_up : edsIcons.chevron_down,
|
|
3151
3219
|
size: 24,
|
|
3152
3220
|
chevronPosition: chevronPosition,
|
|
3153
3221
|
color: disabled ? chevronToken.states.disabled.background : chevronToken.background
|
|
3154
|
-
});
|
|
3155
|
-
|
|
3222
|
+
}, `${id}-icon`);
|
|
3223
|
+
|
|
3224
|
+
const headerChildren = React.Children.map(children, child => {
|
|
3156
3225
|
if (typeof child === 'string') {
|
|
3157
|
-
return /*#__PURE__*/
|
|
3226
|
+
return /*#__PURE__*/jsxRuntime.jsx(AccordionHeaderTitle, {
|
|
3158
3227
|
isExpanded: isExpanded,
|
|
3159
|
-
disabled: disabled
|
|
3160
|
-
|
|
3228
|
+
disabled: disabled,
|
|
3229
|
+
children: child
|
|
3230
|
+
});
|
|
3161
3231
|
}
|
|
3162
3232
|
|
|
3163
|
-
if ( /*#__PURE__*/React
|
|
3164
|
-
return /*#__PURE__*/React
|
|
3233
|
+
if ( /*#__PURE__*/React.isValidElement(child) && child.type === AccordionHeaderTitle) {
|
|
3234
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
3165
3235
|
isExpanded,
|
|
3166
3236
|
disabled
|
|
3167
3237
|
});
|
|
@@ -3170,17 +3240,18 @@ const AccordionHeader = /*#__PURE__*/React$1.forwardRef(function AccordionHeader
|
|
|
3170
3240
|
return child;
|
|
3171
3241
|
});
|
|
3172
3242
|
const newChildren = [chevron, headerChildren];
|
|
3173
|
-
return /*#__PURE__*/
|
|
3243
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledAccordionHeader, {
|
|
3174
3244
|
isExpanded: isExpanded,
|
|
3175
3245
|
parentIndex: parentIndex,
|
|
3176
3246
|
as: headerLevel,
|
|
3177
|
-
disabled: disabled
|
|
3178
|
-
|
|
3247
|
+
disabled: disabled,
|
|
3248
|
+
...props,
|
|
3179
3249
|
panelId: panelId,
|
|
3180
3250
|
onClick: handleClick,
|
|
3181
3251
|
onKeyDown: handleKeyDown,
|
|
3182
|
-
ref: ref
|
|
3183
|
-
|
|
3252
|
+
ref: ref,
|
|
3253
|
+
children: chevronPosition === 'left' ? newChildren : newChildren.reverse()
|
|
3254
|
+
});
|
|
3184
3255
|
}); // AccordionHeader.displayName = 'EdsAccordionHeader'
|
|
3185
3256
|
|
|
3186
3257
|
const {
|
|
@@ -3198,20 +3269,21 @@ const StyledAccordionPanel = styled__default['default'].div.attrs(({
|
|
|
3198
3269
|
displayName: "AccordionPanel__StyledAccordionPanel",
|
|
3199
3270
|
componentId: "sc-suplv4-0"
|
|
3200
3271
|
})(["", " ", " background:", ";min-height:96px;box-sizing:border-box;"], bordersTemplate(accordion.border), spacingsTemplate(panel$1.spacings), header$1.background);
|
|
3201
|
-
const AccordionPanel = /*#__PURE__*/React
|
|
3272
|
+
const AccordionPanel = /*#__PURE__*/React.forwardRef(function AccordionPanel({
|
|
3202
3273
|
id,
|
|
3203
3274
|
headerId,
|
|
3204
3275
|
hidden,
|
|
3205
3276
|
children,
|
|
3206
3277
|
...props
|
|
3207
3278
|
}, ref) {
|
|
3208
|
-
return /*#__PURE__*/
|
|
3279
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledAccordionPanel, {
|
|
3209
3280
|
headerId: headerId,
|
|
3210
3281
|
id: id,
|
|
3211
|
-
hidden: hidden
|
|
3212
|
-
|
|
3213
|
-
ref: ref
|
|
3214
|
-
|
|
3282
|
+
hidden: hidden,
|
|
3283
|
+
...props,
|
|
3284
|
+
ref: ref,
|
|
3285
|
+
children: children
|
|
3286
|
+
});
|
|
3215
3287
|
}); // AccordionPanel.displayName = 'eds-accordion-panel'
|
|
3216
3288
|
|
|
3217
3289
|
const Accordion = Accordion$1;
|
|
@@ -3224,7 +3296,7 @@ Accordion.Header.displayName = 'Accordion.Header';
|
|
|
3224
3296
|
Accordion.HeaderTitle.displayName = 'Accordion.HeaderTitle';
|
|
3225
3297
|
Accordion.Panel.displayName = 'Accordion.Panel';
|
|
3226
3298
|
|
|
3227
|
-
const TabsContext = /*#__PURE__*/React
|
|
3299
|
+
const TabsContext = /*#__PURE__*/React.createContext({
|
|
3228
3300
|
variant: 'minWidth',
|
|
3229
3301
|
handleChange: () => null,
|
|
3230
3302
|
activeTab: 0,
|
|
@@ -3234,7 +3306,7 @@ const TabsContext = /*#__PURE__*/React$1.createContext({
|
|
|
3234
3306
|
const TabsProvider = TabsContext.Provider;
|
|
3235
3307
|
TabsContext.Consumer;
|
|
3236
3308
|
|
|
3237
|
-
const Tabs$1 = /*#__PURE__*/React
|
|
3309
|
+
const Tabs$1 = /*#__PURE__*/React.forwardRef(function Tabs({
|
|
3238
3310
|
activeTab = 0,
|
|
3239
3311
|
onChange,
|
|
3240
3312
|
onBlur,
|
|
@@ -3244,7 +3316,7 @@ const Tabs$1 = /*#__PURE__*/React$1.forwardRef(function Tabs({
|
|
|
3244
3316
|
...props
|
|
3245
3317
|
}, ref) {
|
|
3246
3318
|
const tabsId = useId(id, 'tabs');
|
|
3247
|
-
const [tabsFocused, setTabsFocused] = React
|
|
3319
|
+
const [tabsFocused, setTabsFocused] = React.useState(false);
|
|
3248
3320
|
let blurTimer;
|
|
3249
3321
|
|
|
3250
3322
|
const handleBlur = e => {
|
|
@@ -3270,20 +3342,21 @@ const Tabs$1 = /*#__PURE__*/React$1.forwardRef(function Tabs({
|
|
|
3270
3342
|
onFocus && onFocus(e);
|
|
3271
3343
|
};
|
|
3272
3344
|
|
|
3273
|
-
return /*#__PURE__*/
|
|
3345
|
+
return /*#__PURE__*/jsxRuntime.jsx(TabsProvider, {
|
|
3274
3346
|
value: {
|
|
3275
3347
|
activeTab,
|
|
3276
3348
|
handleChange: onChange,
|
|
3277
3349
|
tabsId,
|
|
3278
3350
|
variant,
|
|
3279
3351
|
tabsFocused
|
|
3280
|
-
}
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3352
|
+
},
|
|
3353
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3354
|
+
ref: ref,
|
|
3355
|
+
...props,
|
|
3356
|
+
onBlur: handleBlur,
|
|
3357
|
+
onFocus: handleFocus
|
|
3358
|
+
})
|
|
3359
|
+
});
|
|
3287
3360
|
});
|
|
3288
3361
|
|
|
3289
3362
|
const variants$1 = {
|
|
@@ -3298,7 +3371,7 @@ const StyledTabList = styled__default['default'].div.attrs(() => ({
|
|
|
3298
3371
|
})(["display:grid;grid-auto-flow:column;grid-auto-columns:", ";"], ({
|
|
3299
3372
|
variant
|
|
3300
3373
|
}) => variants$1[variant]);
|
|
3301
|
-
const TabList = /*#__PURE__*/React
|
|
3374
|
+
const TabList = /*#__PURE__*/React.forwardRef(function TabsList({
|
|
3302
3375
|
children = [],
|
|
3303
3376
|
...props
|
|
3304
3377
|
}, ref) {
|
|
@@ -3308,20 +3381,20 @@ const TabList = /*#__PURE__*/React$1.forwardRef(function TabsList({
|
|
|
3308
3381
|
tabsId,
|
|
3309
3382
|
variant = 'minWidth',
|
|
3310
3383
|
tabsFocused
|
|
3311
|
-
} = React
|
|
3312
|
-
const currentTab = React
|
|
3313
|
-
const selectedTabRef = React
|
|
3384
|
+
} = React.useContext(TabsContext);
|
|
3385
|
+
const currentTab = React.useRef(activeTab);
|
|
3386
|
+
const selectedTabRef = React.useCallback(node => {
|
|
3314
3387
|
if (node !== null && tabsFocused) {
|
|
3315
3388
|
node.focus();
|
|
3316
3389
|
}
|
|
3317
3390
|
}, [tabsFocused]);
|
|
3318
|
-
React
|
|
3391
|
+
React.useEffect(() => {
|
|
3319
3392
|
currentTab.current = activeTab;
|
|
3320
3393
|
}, [activeTab]);
|
|
3321
|
-
const Tabs = React
|
|
3394
|
+
const Tabs = React.Children.map(children, (child, index) => {
|
|
3322
3395
|
const tabRef = index === activeTab ? // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
3323
3396
|
useCombinedRefs(child.ref, selectedTabRef) : child.ref;
|
|
3324
|
-
return /*#__PURE__*/React
|
|
3397
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
3325
3398
|
id: `${tabsId}-tab-${index + 1}`,
|
|
3326
3399
|
'aria-controls': `${tabsId}-panel-${index + 1}`,
|
|
3327
3400
|
active: index === activeTab,
|
|
@@ -3360,12 +3433,13 @@ const TabList = /*#__PURE__*/React$1.forwardRef(function TabsList({
|
|
|
3360
3433
|
}
|
|
3361
3434
|
};
|
|
3362
3435
|
|
|
3363
|
-
return /*#__PURE__*/
|
|
3436
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledTabList, {
|
|
3364
3437
|
onKeyDown: handleKeyPress,
|
|
3365
|
-
ref: ref
|
|
3366
|
-
|
|
3367
|
-
variant: variant
|
|
3368
|
-
|
|
3438
|
+
ref: ref,
|
|
3439
|
+
...props,
|
|
3440
|
+
variant: variant,
|
|
3441
|
+
children: Tabs
|
|
3442
|
+
});
|
|
3369
3443
|
});
|
|
3370
3444
|
|
|
3371
3445
|
const {
|
|
@@ -3520,28 +3594,31 @@ const StyledTab = styled__default['default'].button.attrs(({
|
|
|
3520
3594
|
}) => disabled ? bordersTemplate(tab.states.disabled.border) : bordersTemplate(tab.border), ({
|
|
3521
3595
|
active
|
|
3522
3596
|
}) => active && bordersTemplate(tab.states.active.border));
|
|
3523
|
-
const Tab = /*#__PURE__*/React
|
|
3524
|
-
return /*#__PURE__*/
|
|
3525
|
-
ref: ref
|
|
3526
|
-
|
|
3597
|
+
const Tab = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {
|
|
3598
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledTab, {
|
|
3599
|
+
ref: ref,
|
|
3600
|
+
...props
|
|
3601
|
+
});
|
|
3527
3602
|
});
|
|
3528
3603
|
|
|
3529
|
-
const TabPanels = /*#__PURE__*/React
|
|
3604
|
+
const TabPanels = /*#__PURE__*/React.forwardRef(function TabPanels({
|
|
3530
3605
|
children,
|
|
3531
3606
|
...props
|
|
3532
3607
|
}, ref) {
|
|
3533
3608
|
const {
|
|
3534
3609
|
activeTab,
|
|
3535
3610
|
tabsId
|
|
3536
|
-
} = React
|
|
3537
|
-
const Panels = React
|
|
3611
|
+
} = React.useContext(TabsContext);
|
|
3612
|
+
const Panels = React.Children.map(children, (child, index) => /*#__PURE__*/React.cloneElement(child, {
|
|
3538
3613
|
id: `${tabsId}-panel-${index + 1}`,
|
|
3539
3614
|
'aria-labelledby': `${tabsId}-tab-${index + 1}`,
|
|
3540
3615
|
hidden: activeTab !== index
|
|
3541
3616
|
}));
|
|
3542
|
-
return /*#__PURE__*/
|
|
3543
|
-
ref: ref
|
|
3544
|
-
|
|
3617
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
3618
|
+
ref: ref,
|
|
3619
|
+
...props,
|
|
3620
|
+
children: Panels
|
|
3621
|
+
});
|
|
3545
3622
|
});
|
|
3546
3623
|
|
|
3547
3624
|
const {
|
|
@@ -3556,11 +3633,13 @@ const StyledTabPanel = styled__default['default'].div.attrs(() => ({
|
|
|
3556
3633
|
displayName: "TabPanel__StyledTabPanel",
|
|
3557
3634
|
componentId: "sc-e8v1d4-0"
|
|
3558
3635
|
})(["", " &:focus{outline:none;}&[data-focus-visible-added]:focus{", "}"], spacingsTemplate(panel.spacings), outlineTemplate(panel.states.focus.outline));
|
|
3559
|
-
const TabPanel = /*#__PURE__*/React
|
|
3636
|
+
const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel({ ...props
|
|
3560
3637
|
}, ref) {
|
|
3561
|
-
return /*#__PURE__*/
|
|
3562
|
-
ref: ref
|
|
3563
|
-
|
|
3638
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledTabPanel, {
|
|
3639
|
+
ref: ref,
|
|
3640
|
+
...props,
|
|
3641
|
+
children: props.children
|
|
3642
|
+
});
|
|
3564
3643
|
});
|
|
3565
3644
|
|
|
3566
3645
|
const Tabs = Tabs$1;
|
|
@@ -3643,7 +3722,7 @@ const StyledCard = styled__default['default'].div.withConfig({
|
|
|
3643
3722
|
}) => background, ({
|
|
3644
3723
|
cursor
|
|
3645
3724
|
}) => cursor, bordersTemplate(primary$3.border), spacingsTemplate(primary$3.spacings));
|
|
3646
|
-
const Card$1 = /*#__PURE__*/React
|
|
3725
|
+
const Card$1 = /*#__PURE__*/React.forwardRef(function Card({
|
|
3647
3726
|
children,
|
|
3648
3727
|
variant = 'default',
|
|
3649
3728
|
onClick,
|
|
@@ -3658,9 +3737,10 @@ const Card$1 = /*#__PURE__*/React$1.forwardRef(function Card({
|
|
|
3658
3737
|
cursor,
|
|
3659
3738
|
...rest
|
|
3660
3739
|
};
|
|
3661
|
-
return /*#__PURE__*/
|
|
3662
|
-
onClick: onClick
|
|
3663
|
-
|
|
3740
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledCard, { ...props,
|
|
3741
|
+
onClick: onClick,
|
|
3742
|
+
children: children
|
|
3743
|
+
});
|
|
3664
3744
|
});
|
|
3665
3745
|
|
|
3666
3746
|
const StyledCardActions = styled__default['default'].div.withConfig({
|
|
@@ -3669,7 +3749,7 @@ const StyledCardActions = styled__default['default'].div.withConfig({
|
|
|
3669
3749
|
})(["display:grid;grid-gap:8px;grid-auto-flow:column;align-items:center;justify-content:", ";"], ({
|
|
3670
3750
|
justifyContent
|
|
3671
3751
|
}) => justifyContent);
|
|
3672
|
-
const CardActions = /*#__PURE__*/React
|
|
3752
|
+
const CardActions = /*#__PURE__*/React.forwardRef(function CardActions({
|
|
3673
3753
|
children,
|
|
3674
3754
|
alignRight = false,
|
|
3675
3755
|
meta = '',
|
|
@@ -3681,9 +3761,12 @@ const CardActions = /*#__PURE__*/React$1.forwardRef(function CardActions({
|
|
|
3681
3761
|
justifyContent,
|
|
3682
3762
|
...rest
|
|
3683
3763
|
};
|
|
3684
|
-
return /*#__PURE__*/
|
|
3685
|
-
|
|
3686
|
-
|
|
3764
|
+
return /*#__PURE__*/jsxRuntime.jsxs(StyledCardActions, { ...props,
|
|
3765
|
+
children: [children, meta !== '' && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
3766
|
+
variant: "caption",
|
|
3767
|
+
children: meta
|
|
3768
|
+
})]
|
|
3769
|
+
});
|
|
3687
3770
|
});
|
|
3688
3771
|
|
|
3689
3772
|
const {
|
|
@@ -3696,7 +3779,7 @@ const StyledCardMedia = styled__default['default'].div.withConfig({
|
|
|
3696
3779
|
})(["display:flex;width:100%;&:last-child{margin-bottom:8px;}", ""], ({
|
|
3697
3780
|
fullWidth
|
|
3698
3781
|
}) => fullWidth ? styled.css(["> *{width:calc(100% + ", " + ", ");margin-left:-", ";margin-right:-", ";}&:first-child{margin-top:-", ";img{border-top-right-radius:", ";border-top-left-radius:", ";}}"], spacings$6.left, spacings$6.right, spacings$6.left, spacings$6.right, spacings$6.top, border$5.type === 'border' && border$5.radius, border$5.type === 'border' && border$5.radius) : styled.css(["> *{width:100%;}"]));
|
|
3699
|
-
const CardMedia = /*#__PURE__*/React
|
|
3782
|
+
const CardMedia = /*#__PURE__*/React.forwardRef(function CardMedia({
|
|
3700
3783
|
children,
|
|
3701
3784
|
fullWidth = false,
|
|
3702
3785
|
...rest
|
|
@@ -3705,7 +3788,9 @@ const CardMedia = /*#__PURE__*/React$1.forwardRef(function CardMedia({
|
|
|
3705
3788
|
ref,
|
|
3706
3789
|
fullWidth
|
|
3707
3790
|
};
|
|
3708
|
-
return /*#__PURE__*/
|
|
3791
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledCardMedia, { ...props,
|
|
3792
|
+
children: children
|
|
3793
|
+
});
|
|
3709
3794
|
});
|
|
3710
3795
|
|
|
3711
3796
|
const {
|
|
@@ -3715,28 +3800,32 @@ const StyledCardHeader = styled__default['default'].div.withConfig({
|
|
|
3715
3800
|
displayName: "CardHeader__StyledCardHeader",
|
|
3716
3801
|
componentId: "sc-15k8edh-0"
|
|
3717
3802
|
})(["display:flex;justify-content:space-between;align-items:center;>:not(:first-child){margin-left:", ";}"], spacings$5.left);
|
|
3718
|
-
const CardHeader = /*#__PURE__*/React
|
|
3803
|
+
const CardHeader = /*#__PURE__*/React.forwardRef(function CardHeader({
|
|
3719
3804
|
children,
|
|
3720
3805
|
...rest
|
|
3721
3806
|
}, ref) {
|
|
3722
3807
|
const props = { ...rest,
|
|
3723
3808
|
ref
|
|
3724
3809
|
};
|
|
3725
|
-
return /*#__PURE__*/
|
|
3810
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledCardHeader, { ...props,
|
|
3811
|
+
children: children
|
|
3812
|
+
});
|
|
3726
3813
|
});
|
|
3727
3814
|
|
|
3728
3815
|
const StyledCardHeaderTitle = styled__default['default'].div.withConfig({
|
|
3729
3816
|
displayName: "CardHeaderTitle__StyledCardHeaderTitle",
|
|
3730
3817
|
componentId: "sc-11m80r3-0"
|
|
3731
3818
|
})(["display:grid;flex-grow:2;grid-auto-columns:auto;"]);
|
|
3732
|
-
const CardHeaderTitle = /*#__PURE__*/React
|
|
3819
|
+
const CardHeaderTitle = /*#__PURE__*/React.forwardRef(function CardHeaderTitle({
|
|
3733
3820
|
children,
|
|
3734
3821
|
...rest
|
|
3735
3822
|
}, ref) {
|
|
3736
3823
|
const props = { ...rest,
|
|
3737
3824
|
ref
|
|
3738
3825
|
};
|
|
3739
|
-
return /*#__PURE__*/
|
|
3826
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledCardHeaderTitle, { ...props,
|
|
3827
|
+
children: children
|
|
3828
|
+
});
|
|
3740
3829
|
});
|
|
3741
3830
|
|
|
3742
3831
|
const Card = Card$1;
|
|
@@ -3789,52 +3878,59 @@ const StyledTopBar = styled__default['default'].header.withConfig({
|
|
|
3789
3878
|
displayName: "TopBar__StyledTopBar",
|
|
3790
3879
|
componentId: "sc-1yj236q-0"
|
|
3791
3880
|
})(["height:", ";top:0;position:sticky;background:", ";box-sizing:border-box;z-index:250;display:grid;grid-column-gap:", ";grid-template-columns:auto 1fr auto;grid-template-areas:'left center right';align-items:center;", " ", ";", ""], height$3, background$d, spacings$4.left, bordersTemplate(border$4), spacingsTemplate(spacings$4), typographyTemplate(typography$b));
|
|
3792
|
-
const TopBar$1 = /*#__PURE__*/React
|
|
3881
|
+
const TopBar$1 = /*#__PURE__*/React.forwardRef(function TopBar({
|
|
3793
3882
|
children,
|
|
3794
3883
|
...props
|
|
3795
3884
|
}, ref) {
|
|
3796
|
-
return /*#__PURE__*/
|
|
3797
|
-
ref: ref
|
|
3798
|
-
|
|
3885
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledTopBar, { ...props,
|
|
3886
|
+
ref: ref,
|
|
3887
|
+
children: children
|
|
3888
|
+
});
|
|
3799
3889
|
}); // TopBar.displayName = 'eds-topbar'
|
|
3800
3890
|
|
|
3801
3891
|
const StyledActions$1 = styled__default['default'].div.withConfig({
|
|
3802
3892
|
displayName: "Actions__StyledActions",
|
|
3803
3893
|
componentId: "sc-1251ang-0"
|
|
3804
3894
|
})(["grid-area:right;text-align:right;"]);
|
|
3805
|
-
const Actions$1 = /*#__PURE__*/React
|
|
3895
|
+
const Actions$1 = /*#__PURE__*/React.forwardRef(function Actions({
|
|
3806
3896
|
children,
|
|
3807
3897
|
...props
|
|
3808
3898
|
}, ref) {
|
|
3809
|
-
return /*#__PURE__*/
|
|
3810
|
-
ref: ref
|
|
3811
|
-
|
|
3899
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledActions$1, {
|
|
3900
|
+
ref: ref,
|
|
3901
|
+
...props,
|
|
3902
|
+
children: children
|
|
3903
|
+
});
|
|
3812
3904
|
}); // Actions.displayName = 'eds-topbar-actions'
|
|
3813
3905
|
|
|
3814
3906
|
const StyledHeader = styled__default['default'].div.withConfig({
|
|
3815
3907
|
displayName: "Header__StyledHeader",
|
|
3816
3908
|
componentId: "sc-1fpllve-0"
|
|
3817
3909
|
})(["grid-area:left;display:grid;grid-template-columns:auto auto;grid-gap:24px;align-items:center;"]);
|
|
3818
|
-
const Header$1 = /*#__PURE__*/React
|
|
3910
|
+
const Header$1 = /*#__PURE__*/React.forwardRef(function Header({
|
|
3819
3911
|
children,
|
|
3820
3912
|
...props
|
|
3821
3913
|
}, ref) {
|
|
3822
|
-
return /*#__PURE__*/
|
|
3823
|
-
ref: ref
|
|
3824
|
-
|
|
3914
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledHeader, {
|
|
3915
|
+
ref: ref,
|
|
3916
|
+
...props,
|
|
3917
|
+
children: children
|
|
3918
|
+
});
|
|
3825
3919
|
}); // Header.displayName = 'eds-topbar-header'
|
|
3826
3920
|
|
|
3827
3921
|
const StyledCustomContent$1 = styled__default['default'].div.withConfig({
|
|
3828
3922
|
displayName: "CustomContent__StyledCustomContent",
|
|
3829
3923
|
componentId: "sc-d0e83a-0"
|
|
3830
3924
|
})(["grid-area:center;"]);
|
|
3831
|
-
const CustomContent$1 = /*#__PURE__*/React
|
|
3925
|
+
const CustomContent$1 = /*#__PURE__*/React.forwardRef(function CustomContent({
|
|
3832
3926
|
children,
|
|
3833
3927
|
...props
|
|
3834
3928
|
}, ref) {
|
|
3835
|
-
return /*#__PURE__*/
|
|
3836
|
-
ref: ref
|
|
3837
|
-
|
|
3929
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledCustomContent$1, {
|
|
3930
|
+
ref: ref,
|
|
3931
|
+
...props,
|
|
3932
|
+
children: children
|
|
3933
|
+
});
|
|
3838
3934
|
}); // CustomContent.displayName = 'eds-topbar-customcontent'
|
|
3839
3935
|
|
|
3840
3936
|
const TopBar = TopBar$1;
|
|
@@ -3937,16 +4033,16 @@ const StyledPaper = styled__default['default'].div.withConfig({
|
|
|
3937
4033
|
})(["min-width:", ";max-width:", ";background:", ";box-shadow:", ";"], paper.minWidth, paper.maxWidth, paper.background, ({
|
|
3938
4034
|
elevation
|
|
3939
4035
|
}) => elevation);
|
|
3940
|
-
const Paper = /*#__PURE__*/React
|
|
4036
|
+
const Paper = /*#__PURE__*/React.forwardRef(function Paper({
|
|
3941
4037
|
elevation: elevation$1,
|
|
3942
4038
|
...rest
|
|
3943
4039
|
}, ref) {
|
|
3944
4040
|
const props = { ...rest,
|
|
3945
4041
|
elevation: elevation[elevation$1] || 'none'
|
|
3946
4042
|
};
|
|
3947
|
-
return /*#__PURE__*/
|
|
4043
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledPaper, { ...props,
|
|
3948
4044
|
ref: ref
|
|
3949
|
-
})
|
|
4045
|
+
});
|
|
3950
4046
|
});
|
|
3951
4047
|
|
|
3952
4048
|
const StyledDialog = styled__default['default'](Paper).attrs(() => ({
|
|
@@ -3959,15 +4055,16 @@ const StyledDialog = styled__default['default'](Paper).attrs(() => ({
|
|
|
3959
4055
|
displayName: "Dialog__StyledDialog",
|
|
3960
4056
|
componentId: "sc-1mewo3f-0"
|
|
3961
4057
|
})(["width:", ";background:", ";display:grid;", " ", " ", ""], dialog.width, dialog.background, typographyTemplate(dialog.typography), spacingsTemplate(dialog.spacings), bordersTemplate(dialog.border));
|
|
3962
|
-
const Dialog$1 = /*#__PURE__*/React
|
|
4058
|
+
const Dialog$1 = /*#__PURE__*/React.forwardRef(function Dialog({
|
|
3963
4059
|
children,
|
|
3964
4060
|
...props
|
|
3965
4061
|
}, ref) {
|
|
3966
|
-
return /*#__PURE__*/
|
|
3967
|
-
elevation: "above_scrim"
|
|
3968
|
-
|
|
3969
|
-
ref: ref
|
|
3970
|
-
|
|
4062
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledDialog, {
|
|
4063
|
+
elevation: "above_scrim",
|
|
4064
|
+
...props,
|
|
4065
|
+
ref: ref,
|
|
4066
|
+
children: children
|
|
4067
|
+
});
|
|
3971
4068
|
}); // Dialog.displayName = 'EdsDialog'
|
|
3972
4069
|
|
|
3973
4070
|
const StyledActions = styled__default['default'].div.withConfig({
|
|
@@ -3976,13 +4073,15 @@ const StyledActions = styled__default['default'].div.withConfig({
|
|
|
3976
4073
|
})(["min-height:", ";", " align-self:end;justify-self:start;", ""], dialog.entities.actions.minHeight, spacingsTemplate(dialog.entities.children.spacings), ({
|
|
3977
4074
|
children
|
|
3978
4075
|
}) => !children && styled.css(["min-height:initial;height:'8px';"]));
|
|
3979
|
-
const Actions = /*#__PURE__*/React
|
|
4076
|
+
const Actions = /*#__PURE__*/React.forwardRef(function Actions({
|
|
3980
4077
|
children,
|
|
3981
4078
|
...props
|
|
3982
4079
|
}, ref) {
|
|
3983
|
-
return /*#__PURE__*/
|
|
3984
|
-
ref: ref
|
|
3985
|
-
|
|
4080
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledActions, {
|
|
4081
|
+
ref: ref,
|
|
4082
|
+
...props,
|
|
4083
|
+
children: children
|
|
4084
|
+
});
|
|
3986
4085
|
}); // Actions.displayName = 'EdsDialogActions'
|
|
3987
4086
|
|
|
3988
4087
|
const StyledTitle = styled__default['default'].div.withConfig({
|
|
@@ -3995,17 +4094,21 @@ const StyledDivider$2 = styled__default['default'](Divider).withConfig({
|
|
|
3995
4094
|
displayName: "Title__StyledDivider",
|
|
3996
4095
|
componentId: "sc-i4qfl5-1"
|
|
3997
4096
|
})(["width:100%;margin-bottom:", ";"], dialog.entities.divider.spacings.bottom);
|
|
3998
|
-
const Title = /*#__PURE__*/React
|
|
4097
|
+
const Title = /*#__PURE__*/React.forwardRef(function Title({
|
|
3999
4098
|
children,
|
|
4000
4099
|
...rest
|
|
4001
4100
|
}, ref) {
|
|
4002
|
-
return /*#__PURE__*/
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4101
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4102
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(StyledTitle, {
|
|
4103
|
+
id: "eds-dialog-title",
|
|
4104
|
+
ref: ref,
|
|
4105
|
+
...rest,
|
|
4106
|
+
children: children
|
|
4107
|
+
}), children && /*#__PURE__*/jsxRuntime.jsx(StyledDivider$2, {
|
|
4108
|
+
color: "medium",
|
|
4109
|
+
variant: "small"
|
|
4110
|
+
})]
|
|
4111
|
+
});
|
|
4009
4112
|
});
|
|
4010
4113
|
|
|
4011
4114
|
const StyledCustomContent = styled__default['default'].div.withConfig({
|
|
@@ -4018,7 +4121,7 @@ const StyledDivider$1 = styled__default['default'](Divider).withConfig({
|
|
|
4018
4121
|
displayName: "CustomContent__StyledDivider",
|
|
4019
4122
|
componentId: "sc-17fsw6x-1"
|
|
4020
4123
|
})(["width:100%;margin-bottom:", ";"], dialog.entities.divider.spacings.bottom);
|
|
4021
|
-
const CustomContent = /*#__PURE__*/React
|
|
4124
|
+
const CustomContent = /*#__PURE__*/React.forwardRef(function CustomContent({
|
|
4022
4125
|
children,
|
|
4023
4126
|
scrollable = false,
|
|
4024
4127
|
...rest
|
|
@@ -4028,12 +4131,16 @@ const CustomContent = /*#__PURE__*/React$1.forwardRef(function CustomContent({
|
|
|
4028
4131
|
ref,
|
|
4029
4132
|
...rest
|
|
4030
4133
|
};
|
|
4031
|
-
return /*#__PURE__*/
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4134
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4135
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(StyledCustomContent, {
|
|
4136
|
+
id: "eds-dialog-customcontent",
|
|
4137
|
+
...props,
|
|
4138
|
+
children: children
|
|
4139
|
+
}), children && scrollable && /*#__PURE__*/jsxRuntime.jsx(StyledDivider$1, {
|
|
4140
|
+
color: "medium",
|
|
4141
|
+
variant: "small"
|
|
4142
|
+
})]
|
|
4143
|
+
});
|
|
4037
4144
|
});
|
|
4038
4145
|
|
|
4039
4146
|
const Dialog = Dialog$1;
|
|
@@ -4072,7 +4179,7 @@ const ScrimContent = styled__default['default'].div.withConfig({
|
|
|
4072
4179
|
displayName: "Scrim__ScrimContent",
|
|
4073
4180
|
componentId: "sc-1fr7uvy-1"
|
|
4074
4181
|
})(["width:auto;height:auto;"]);
|
|
4075
|
-
const Scrim = /*#__PURE__*/React
|
|
4182
|
+
const Scrim = /*#__PURE__*/React.forwardRef(function Scrim({
|
|
4076
4183
|
children,
|
|
4077
4184
|
onClose,
|
|
4078
4185
|
isDismissable = false,
|
|
@@ -4103,11 +4210,14 @@ const Scrim = /*#__PURE__*/React$1.forwardRef(function Scrim({
|
|
|
4103
4210
|
event.stopPropagation();
|
|
4104
4211
|
};
|
|
4105
4212
|
|
|
4106
|
-
return /*#__PURE__*/
|
|
4107
|
-
onClick: handleMouseClose
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4213
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledScrim, {
|
|
4214
|
+
onClick: handleMouseClose,
|
|
4215
|
+
...props,
|
|
4216
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ScrimContent, {
|
|
4217
|
+
onClick: handleContentClick,
|
|
4218
|
+
children: children
|
|
4219
|
+
})
|
|
4220
|
+
});
|
|
4111
4221
|
});
|
|
4112
4222
|
|
|
4113
4223
|
const {
|
|
@@ -4224,32 +4334,38 @@ const TocLabel = styled__default['default'](Typography).withConfig({
|
|
|
4224
4334
|
displayName: "TableOfContents__TocLabel",
|
|
4225
4335
|
componentId: "sc-q23s6y-2"
|
|
4226
4336
|
})(["", ""], typographyTemplate(tableOfContents.typography));
|
|
4227
|
-
const TableOfContents$1 = /*#__PURE__*/React
|
|
4337
|
+
const TableOfContents$1 = /*#__PURE__*/React.forwardRef(function TableOfContents({
|
|
4228
4338
|
children,
|
|
4229
4339
|
sticky = false,
|
|
4230
4340
|
label = '',
|
|
4231
4341
|
...rest
|
|
4232
4342
|
}, ref) {
|
|
4233
|
-
return /*#__PURE__*/
|
|
4343
|
+
return /*#__PURE__*/jsxRuntime.jsxs(StyledTableOfContents, {
|
|
4234
4344
|
ref: ref,
|
|
4235
4345
|
label: label,
|
|
4236
|
-
sticky: sticky
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4346
|
+
sticky: sticky,
|
|
4347
|
+
...rest,
|
|
4348
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(TocLabel, {
|
|
4349
|
+
variant: "overline",
|
|
4350
|
+
children: label
|
|
4351
|
+
}), /*#__PURE__*/jsxRuntime.jsx(TocList, {
|
|
4352
|
+
children: children
|
|
4353
|
+
})]
|
|
4354
|
+
});
|
|
4240
4355
|
});
|
|
4241
4356
|
|
|
4242
4357
|
const StyledLinkItem = styled__default['default'].li.withConfig({
|
|
4243
4358
|
displayName: "LinkItem__StyledLinkItem",
|
|
4244
4359
|
componentId: "sc-1tfuad4-0"
|
|
4245
4360
|
})(["list-style:none;margin:0;padding:0;a{text-decoration:none;", " ", " height:", ";width:", ";display:block;position:relative;svg{fill:", ";margin-right:", ";vertical-align:text-bottom;}span{max-width:", ";overflow:hidden;white-space:nowrap;text-overflow:ellipsis;vertical-align:text-bottom;display:inline-block;}&:focus{", ";}@media (hover:hover) and (pointer:fine){&:hover{", " background:", ";", " svg{fill:", ";}}}&:active{outline:none;}}"], typographyTemplate(tableOfContents.entities.links.typography), spacingsTemplate(tableOfContents.entities.links.spacings), tableOfContents.entities.links.typography.lineHeight, tableOfContents.entities.links.width, tableOfContents.entities.icon.background, tableOfContents.entities.icon.spacings.right, tableOfContents.entities.span.maxWidth, outlineTemplate(tableOfContents.states.focus.outline), typographyTemplate(tableOfContents.states.hover.typography), tableOfContents.states.hover.background, bordersTemplate(tableOfContents.states.hover.border), tableOfContents.states.hover.entities.icon.background);
|
|
4246
|
-
const LinkItem = /*#__PURE__*/React
|
|
4361
|
+
const LinkItem = /*#__PURE__*/React.forwardRef(function LinkItem({
|
|
4247
4362
|
children,
|
|
4248
4363
|
...props
|
|
4249
4364
|
}, ref) {
|
|
4250
|
-
return /*#__PURE__*/
|
|
4251
|
-
ref: ref
|
|
4252
|
-
|
|
4365
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledLinkItem, { ...props,
|
|
4366
|
+
ref: ref,
|
|
4367
|
+
children: children
|
|
4368
|
+
});
|
|
4253
4369
|
});
|
|
4254
4370
|
|
|
4255
4371
|
const TableOfContents = TableOfContents$1;
|
|
@@ -4313,7 +4429,7 @@ const Header = styled__default['default'].div.withConfig({
|
|
|
4313
4429
|
displayName: "SideSheet__Header",
|
|
4314
4430
|
componentId: "sc-wkzlnn-1"
|
|
4315
4431
|
})(["display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;padding-bottom:24px;padding-right:10px;"]);
|
|
4316
|
-
const SideSheet = /*#__PURE__*/React
|
|
4432
|
+
const SideSheet = /*#__PURE__*/React.forwardRef(function SideSheet({
|
|
4317
4433
|
variant = 'medium',
|
|
4318
4434
|
title = '',
|
|
4319
4435
|
children,
|
|
@@ -4326,19 +4442,24 @@ const SideSheet = /*#__PURE__*/React$1.forwardRef(function SideSheet({
|
|
|
4326
4442
|
width: variants[variant]
|
|
4327
4443
|
}; // Controller must set open={false} when pressing the close button
|
|
4328
4444
|
|
|
4329
|
-
return open && /*#__PURE__*/
|
|
4330
|
-
id: "side-sheet"
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4445
|
+
return open && /*#__PURE__*/jsxRuntime.jsxs(StyledSideSheet, { ...props,
|
|
4446
|
+
id: "side-sheet",
|
|
4447
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Header, {
|
|
4448
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
4449
|
+
variant: "h2",
|
|
4450
|
+
children: title
|
|
4451
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
4452
|
+
variant: "ghost_icon",
|
|
4453
|
+
onClick: onClose,
|
|
4454
|
+
title: "Close",
|
|
4455
|
+
"aria-label": "Close sidesheet",
|
|
4456
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
4457
|
+
name: "clear",
|
|
4458
|
+
data: edsIcons.clear
|
|
4459
|
+
})
|
|
4460
|
+
})]
|
|
4461
|
+
}), children]
|
|
4462
|
+
});
|
|
4342
4463
|
});
|
|
4343
4464
|
|
|
4344
4465
|
const {
|
|
@@ -4559,7 +4680,7 @@ const StyledChips = styled__default['default'].div.attrs(({
|
|
|
4559
4680
|
}) => deletable && styled.css(["padding-right:4px;"]), ({
|
|
4560
4681
|
onlyChild
|
|
4561
4682
|
}) => onlyChild ? styled.css(["padding-left:8px;"]) : '');
|
|
4562
|
-
const Chip = /*#__PURE__*/React
|
|
4683
|
+
const Chip = /*#__PURE__*/React.forwardRef(function Chip({
|
|
4563
4684
|
children,
|
|
4564
4685
|
onDelete,
|
|
4565
4686
|
disabled = false,
|
|
@@ -4598,10 +4719,10 @@ const Chip = /*#__PURE__*/React$1.forwardRef(function Chip({
|
|
|
4598
4719
|
}
|
|
4599
4720
|
};
|
|
4600
4721
|
|
|
4601
|
-
const resizedChildren = React
|
|
4722
|
+
const resizedChildren = React.Children.map(children, child => {
|
|
4602
4723
|
// We force size on Icon & Avatar component
|
|
4603
4724
|
if (child.props) {
|
|
4604
|
-
return /*#__PURE__*/React
|
|
4725
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
4605
4726
|
size: 16,
|
|
4606
4727
|
disabled
|
|
4607
4728
|
});
|
|
@@ -4618,17 +4739,18 @@ const Chip = /*#__PURE__*/React$1.forwardRef(function Chip({
|
|
|
4618
4739
|
}
|
|
4619
4740
|
};
|
|
4620
4741
|
|
|
4621
|
-
return /*#__PURE__*/
|
|
4742
|
+
return /*#__PURE__*/jsxRuntime.jsxs(StyledChips, { ...chipProps,
|
|
4622
4743
|
onClick: event => clickable && handleClick(event),
|
|
4623
|
-
onKeyPress: handleKeyPress
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4744
|
+
onKeyPress: handleKeyPress,
|
|
4745
|
+
children: [resizedChildren, onDelete && /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
4746
|
+
name: "close",
|
|
4747
|
+
title: "close",
|
|
4748
|
+
disabled: disabled,
|
|
4749
|
+
variant: variant,
|
|
4750
|
+
onClick: onDeleteClick,
|
|
4751
|
+
size: 16
|
|
4752
|
+
})]
|
|
4753
|
+
});
|
|
4632
4754
|
}); // Chip.displayName = 'eds-chip'
|
|
4633
4755
|
|
|
4634
4756
|
const avatar = {
|
|
@@ -4655,22 +4777,24 @@ const StyledImage = styled__default['default'].img.withConfig({
|
|
|
4655
4777
|
})(["height:100%;text-align:center;color:transparent;", ";"], ({
|
|
4656
4778
|
disabled
|
|
4657
4779
|
}) => disabled && styled.css(["opacity:", ";"], avatar.states.disabled.opacity));
|
|
4658
|
-
const Avatar = /*#__PURE__*/React
|
|
4780
|
+
const Avatar = /*#__PURE__*/React.forwardRef(function Avatar({
|
|
4659
4781
|
src = null,
|
|
4660
4782
|
alt,
|
|
4661
4783
|
size = 24,
|
|
4662
4784
|
disabled = false,
|
|
4663
4785
|
...rest
|
|
4664
4786
|
}, ref) {
|
|
4665
|
-
return /*#__PURE__*/
|
|
4787
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledAvatar, {
|
|
4666
4788
|
size: size,
|
|
4667
4789
|
disabled: disabled,
|
|
4668
|
-
ref: ref
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4790
|
+
ref: ref,
|
|
4791
|
+
...rest,
|
|
4792
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledImage, {
|
|
4793
|
+
src: src,
|
|
4794
|
+
alt: alt,
|
|
4795
|
+
disabled: disabled
|
|
4796
|
+
})
|
|
4797
|
+
});
|
|
4674
4798
|
});
|
|
4675
4799
|
Avatar.displayName = 'Avatar';
|
|
4676
4800
|
|
|
@@ -4800,7 +4924,7 @@ const InsideButton = styled__default['default'].div.withConfig({
|
|
|
4800
4924
|
})(["", " display:flex;align-items:center;visibility:hidden;z-index:1;padding:4px;height:16px;width:16px;position:relative;&::after{z-index:-1;position:absolute;top:-", ";left:0;width:100%;height:", ";content:'';}&::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}", ""], bordersTemplate(icon$1.border), icon$1.clickbound.offset.top, icon$1.clickbound.height, ({
|
|
4801
4925
|
isActive
|
|
4802
4926
|
}) => isActive && styled.css(["visibility:visible;@media (hover:hover) and (pointer:fine){&:hover{cursor:pointer;background:", ";}}"], icon$1.states.hover.background));
|
|
4803
|
-
const Search = /*#__PURE__*/React
|
|
4927
|
+
const Search = /*#__PURE__*/React.forwardRef(function Search({
|
|
4804
4928
|
onChange,
|
|
4805
4929
|
defaultValue = '',
|
|
4806
4930
|
value,
|
|
@@ -4812,12 +4936,12 @@ const Search = /*#__PURE__*/React$1.forwardRef(function Search({
|
|
|
4812
4936
|
}, ref) {
|
|
4813
4937
|
const isControlled = typeof value !== 'undefined';
|
|
4814
4938
|
const isActive = isControlled && value !== '' || defaultValue !== '';
|
|
4815
|
-
const inputRef = React
|
|
4816
|
-
const [state, setState] = React
|
|
4939
|
+
const inputRef = React.useRef(null);
|
|
4940
|
+
const [state, setState] = React.useState({
|
|
4817
4941
|
isActive,
|
|
4818
4942
|
isFocused: false
|
|
4819
4943
|
});
|
|
4820
|
-
React
|
|
4944
|
+
React.useEffect(() => {
|
|
4821
4945
|
setState(prevState => ({ ...prevState,
|
|
4822
4946
|
isActive
|
|
4823
4947
|
}));
|
|
@@ -4919,16 +5043,20 @@ const Search = /*#__PURE__*/React$1.forwardRef(function Search({
|
|
|
4919
5043
|
}
|
|
4920
5044
|
}
|
|
4921
5045
|
};
|
|
4922
|
-
return /*#__PURE__*/
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
5046
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Container$2, { ...containerProps,
|
|
5047
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
5048
|
+
data: edsIcons.search,
|
|
5049
|
+
"aria-hidden": true,
|
|
5050
|
+
size: size
|
|
5051
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Input$4, { ...inputProps
|
|
5052
|
+
}), /*#__PURE__*/jsxRuntime.jsx(InsideButton, { ...clearButtonProps,
|
|
5053
|
+
"aria-label": "Clear search",
|
|
5054
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
5055
|
+
data: edsIcons.close,
|
|
5056
|
+
size: size
|
|
5057
|
+
})
|
|
5058
|
+
})]
|
|
5059
|
+
});
|
|
4932
5060
|
}); // Search.displayName = 'eds-search'
|
|
4933
5061
|
|
|
4934
5062
|
const {
|
|
@@ -5074,12 +5202,13 @@ const StyledMinMax = styled__default['default'].span.withConfig({
|
|
|
5074
5202
|
displayName: "MinMax__StyledMinMax",
|
|
5075
5203
|
componentId: "sc-lxmlid-0"
|
|
5076
5204
|
})(["grid-row:2;", " position:absolute;left:2px;top:", ";pointer-events:none;text-align:left;transform:translate(calc(-1 * calc((100% - 8px) / 2)));&:last-child{left:auto;right:2px;transform:translate(calc((100% - 8px) / 2));}"], typographyTemplate(output$1.typography), track$3.spacings.top);
|
|
5077
|
-
const MinMax = /*#__PURE__*/React
|
|
5205
|
+
const MinMax = /*#__PURE__*/React.forwardRef(function MinMax({
|
|
5078
5206
|
children
|
|
5079
5207
|
}, ref) {
|
|
5080
|
-
return /*#__PURE__*/
|
|
5081
|
-
ref: ref
|
|
5082
|
-
|
|
5208
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledMinMax, {
|
|
5209
|
+
ref: ref,
|
|
5210
|
+
children: children
|
|
5211
|
+
});
|
|
5083
5212
|
});
|
|
5084
5213
|
|
|
5085
5214
|
const {
|
|
@@ -5094,16 +5223,17 @@ const StyledOutput = styled__default['default'].output.withConfig({
|
|
|
5094
5223
|
})(["--val:", ";--realWidth:calc(100% - 12px);width:fit-content;position:relative;z-index:1;", " background:", ";padding:0 5px;top:", ";pointer-events:none;margin-left:calc((var(--val) - var(--min)) / var(--dif) * var(--realWidth));transform:translate(calc(-1 * calc(var(--realWidth) / 2)));grid-row:2;grid-column:1 / -1;"], ({
|
|
5095
5224
|
value
|
|
5096
5225
|
}) => value, typographyTemplate(output.typography), slider.background, track$2.spacings.top);
|
|
5097
|
-
const Output = /*#__PURE__*/React
|
|
5226
|
+
const Output = /*#__PURE__*/React.forwardRef(function Output({
|
|
5098
5227
|
children,
|
|
5099
5228
|
value,
|
|
5100
5229
|
htmlFor
|
|
5101
5230
|
}, ref) {
|
|
5102
|
-
return /*#__PURE__*/
|
|
5231
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledOutput, {
|
|
5103
5232
|
ref: ref,
|
|
5104
5233
|
value: value,
|
|
5105
|
-
htmlFor: htmlFor
|
|
5106
|
-
|
|
5234
|
+
htmlFor: htmlFor,
|
|
5235
|
+
children: children
|
|
5236
|
+
});
|
|
5107
5237
|
});
|
|
5108
5238
|
|
|
5109
5239
|
const {
|
|
@@ -5125,7 +5255,7 @@ const StyledSliderInput = styled__default['default'].input.attrs(() => ({
|
|
|
5125
5255
|
displayName: "SliderInput__StyledSliderInput",
|
|
5126
5256
|
componentId: "sc-17orw4f-0"
|
|
5127
5257
|
})(["&::-webkit-slider-runnable-track,&::-webkit-slider-thumb,&{-webkit-appearance:none;}::-moz-focus-outer{border:0;}width:100%;background:transparent;background:none;grid-column:1 / -1;grid-row:2;font:inherit;margin:0;z-index:2;outline:none;&[data-focus-visible-added]:focus{z-index:2;&::-webkit-slider-thumb{", ";}&::-moz-range-thumb{", ";}}&:hover,&:active{&::-webkit-slider-thumb{", "}&::-moz-range-thumb{", "}}&:disabled{&::-webkit-slider-thumb{", "}&::-moz-range-thumb{", "}}&:disabled:hover,&:disabled:active{&::-webkit-slider-thumb{", "}&::-moz-range-thumb{", "}&::-webkit-slider-runnable-track{cursor:not-allowed;}&::-moz-range-track{cursor:not-allowed;}}&:before,&:after{}&:after{right:0;}&::-webkit-slider-thumb{", " margin-top:6px;}&::-moz-range-thumb{", " height:8px;width:8px;}&::-webkit-slider-runnable-track{", "}&::-moz-range-track{", "}"], outlineTemplate(handle$1.states.focus.outline), outlineTemplate(handle$1.states.focus.outline), thumbHover, thumbHover, thumbDisabled, thumbDisabled, thumbHoverAndDisabled, thumbHoverAndDisabled, thumb, thumb, track$1, track$1);
|
|
5128
|
-
const SliderInput = /*#__PURE__*/React
|
|
5258
|
+
const SliderInput = /*#__PURE__*/React.forwardRef(function SliderInput({
|
|
5129
5259
|
value,
|
|
5130
5260
|
min,
|
|
5131
5261
|
max,
|
|
@@ -5137,7 +5267,7 @@ const SliderInput = /*#__PURE__*/React$1.forwardRef(function SliderInput({
|
|
|
5137
5267
|
disabled,
|
|
5138
5268
|
...restProps
|
|
5139
5269
|
}, ref) {
|
|
5140
|
-
return /*#__PURE__*/
|
|
5270
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledSliderInput, { ...restProps,
|
|
5141
5271
|
value: value,
|
|
5142
5272
|
ref: ref,
|
|
5143
5273
|
min: min,
|
|
@@ -5154,7 +5284,7 @@ const SliderInput = /*#__PURE__*/React$1.forwardRef(function SliderInput({
|
|
|
5154
5284
|
onKeyUp(event);
|
|
5155
5285
|
},
|
|
5156
5286
|
disabled: disabled
|
|
5157
|
-
})
|
|
5287
|
+
});
|
|
5158
5288
|
});
|
|
5159
5289
|
SliderInput.displayName = 'SliderInput';
|
|
5160
5290
|
|
|
@@ -5209,7 +5339,7 @@ const SrOnlyLabel = styled__default['default'].label.withConfig({
|
|
|
5209
5339
|
displayName: "Slider__SrOnlyLabel",
|
|
5210
5340
|
componentId: "sc-n1grrg-4"
|
|
5211
5341
|
})(["position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;"]);
|
|
5212
|
-
const Slider = /*#__PURE__*/React
|
|
5342
|
+
const Slider = /*#__PURE__*/React.forwardRef(function Slider({
|
|
5213
5343
|
min = 0,
|
|
5214
5344
|
max = 100,
|
|
5215
5345
|
value = [40, 60],
|
|
@@ -5224,9 +5354,9 @@ const Slider = /*#__PURE__*/React$1.forwardRef(function Slider({
|
|
|
5224
5354
|
...rest
|
|
5225
5355
|
}, ref) {
|
|
5226
5356
|
const isRangeSlider = Array.isArray(value);
|
|
5227
|
-
const [sliderValue, setSliderValue] = React
|
|
5228
|
-
const minRange = React
|
|
5229
|
-
const maxRange = React
|
|
5357
|
+
const [sliderValue, setSliderValue] = React.useState(isRangeSlider ? value : [value]);
|
|
5358
|
+
const minRange = React.useRef(null);
|
|
5359
|
+
const maxRange = React.useRef(null);
|
|
5230
5360
|
|
|
5231
5361
|
const onValueChange = (event, valueArrIdx) => {
|
|
5232
5362
|
const target = event.target;
|
|
@@ -5298,78 +5428,97 @@ const Slider = /*#__PURE__*/React$1.forwardRef(function Slider({
|
|
|
5298
5428
|
const inputIdA = `${ariaLabelledby}-thumb-a`;
|
|
5299
5429
|
const inputIdB = `${ariaLabelledby}-thumb-b`;
|
|
5300
5430
|
const inputId = `${ariaLabelledby}-thumb`;
|
|
5301
|
-
return /*#__PURE__*/
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5431
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
5432
|
+
children: isRangeSlider ? /*#__PURE__*/jsxRuntime.jsxs(RangeWrapper, { ...rest,
|
|
5433
|
+
ref: ref,
|
|
5434
|
+
role: "group",
|
|
5435
|
+
"aria-labelledby": ariaLabelledby,
|
|
5436
|
+
valA: sliderValue[0],
|
|
5437
|
+
valB: sliderValue[1],
|
|
5438
|
+
max: max,
|
|
5439
|
+
min: min,
|
|
5440
|
+
disabled: disabled,
|
|
5441
|
+
onMouseMove: findClosestRange,
|
|
5442
|
+
children: [minMaxDots && /*#__PURE__*/jsxRuntime.jsx(WrapperGroupLabelDots, {}), /*#__PURE__*/jsxRuntime.jsx(SrOnlyLabel, {
|
|
5443
|
+
htmlFor: inputIdA,
|
|
5444
|
+
children: "Value A"
|
|
5445
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SliderInput, {
|
|
5446
|
+
type: "range",
|
|
5447
|
+
ref: minRange,
|
|
5448
|
+
value: sliderValue[0],
|
|
5449
|
+
max: max,
|
|
5450
|
+
min: min,
|
|
5451
|
+
id: inputIdA,
|
|
5452
|
+
step: step,
|
|
5453
|
+
onChange: event => {
|
|
5454
|
+
onValueChange(event, 0);
|
|
5455
|
+
},
|
|
5456
|
+
onMouseUp: event => handleCommitedValue(event),
|
|
5457
|
+
onKeyUp: event => handleKeyUp(event),
|
|
5458
|
+
disabled: disabled
|
|
5459
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Output, {
|
|
5460
|
+
htmlFor: inputIdA,
|
|
5461
|
+
value: sliderValue[0],
|
|
5462
|
+
children: getFormattedText(sliderValue[0])
|
|
5463
|
+
}), minMaxValues && /*#__PURE__*/jsxRuntime.jsx(MinMax, {
|
|
5464
|
+
children: getFormattedText(min)
|
|
5465
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SrOnlyLabel, {
|
|
5466
|
+
htmlFor: inputIdB,
|
|
5467
|
+
children: "Value B"
|
|
5468
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SliderInput, {
|
|
5469
|
+
type: "range",
|
|
5470
|
+
value: sliderValue[1],
|
|
5471
|
+
min: min,
|
|
5472
|
+
max: max,
|
|
5473
|
+
id: inputIdB,
|
|
5474
|
+
step: step,
|
|
5475
|
+
ref: maxRange,
|
|
5476
|
+
onChange: event => {
|
|
5477
|
+
onValueChange(event, 1);
|
|
5478
|
+
},
|
|
5479
|
+
onMouseUp: event => handleCommitedValue(event),
|
|
5480
|
+
onKeyUp: event => handleKeyUp(event),
|
|
5481
|
+
disabled: disabled
|
|
5482
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Output, {
|
|
5483
|
+
htmlFor: inputIdB,
|
|
5484
|
+
value: sliderValue[1],
|
|
5485
|
+
children: getFormattedText(sliderValue[1])
|
|
5486
|
+
}), minMaxValues && /*#__PURE__*/jsxRuntime.jsx(MinMax, {
|
|
5487
|
+
children: getFormattedText(max)
|
|
5488
|
+
})]
|
|
5489
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs(Wrapper, { ...rest,
|
|
5490
|
+
ref: ref,
|
|
5491
|
+
max: max,
|
|
5492
|
+
min: min,
|
|
5493
|
+
value: sliderValue[0],
|
|
5494
|
+
disabled: disabled,
|
|
5495
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(SliderInput, {
|
|
5496
|
+
type: "range",
|
|
5497
|
+
value: sliderValue[0],
|
|
5498
|
+
min: min,
|
|
5499
|
+
max: max,
|
|
5500
|
+
step: step,
|
|
5501
|
+
id: inputId,
|
|
5502
|
+
onChange: event => {
|
|
5503
|
+
onValueChange(event);
|
|
5504
|
+
},
|
|
5505
|
+
disabled: disabled,
|
|
5506
|
+
"aria-labelledby": ariaLabelledby,
|
|
5507
|
+
onMouseUp: event => handleCommitedValue(event),
|
|
5508
|
+
onKeyUp: event => handleKeyUp(event)
|
|
5509
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Output, {
|
|
5510
|
+
htmlFor: inputId,
|
|
5511
|
+
value: sliderValue[0],
|
|
5512
|
+
children: getFormattedText(sliderValue[0])
|
|
5513
|
+
}), minMaxDots && /*#__PURE__*/jsxRuntime.jsx(WrapperGroupLabelDots, {}), minMaxValues && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5514
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(MinMax, {
|
|
5515
|
+
children: getFormattedText(min)
|
|
5516
|
+
}), /*#__PURE__*/jsxRuntime.jsx(MinMax, {
|
|
5517
|
+
children: getFormattedText(max)
|
|
5518
|
+
})]
|
|
5519
|
+
})]
|
|
5520
|
+
})
|
|
5521
|
+
});
|
|
5373
5522
|
});
|
|
5374
5523
|
|
|
5375
5524
|
const {
|
|
@@ -5444,7 +5593,7 @@ const TooltipArrow = styled__default['default'].svg.withConfig({
|
|
|
5444
5593
|
displayName: "Tooltip__TooltipArrow",
|
|
5445
5594
|
componentId: "sc-m2im2p-2"
|
|
5446
5595
|
})(["width:", ";height:", ";position:absolute;fill:", ";"], tooltip.entities.arrow.width, tooltip.entities.arrow.height, tooltip.background);
|
|
5447
|
-
const Tooltip = /*#__PURE__*/React
|
|
5596
|
+
const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip({
|
|
5448
5597
|
title,
|
|
5449
5598
|
placement = 'bottom',
|
|
5450
5599
|
children,
|
|
@@ -5453,12 +5602,12 @@ const Tooltip = /*#__PURE__*/React$1.forwardRef(function Tooltip({
|
|
|
5453
5602
|
...rest
|
|
5454
5603
|
}, ref) {
|
|
5455
5604
|
const isMounted = useIsMounted();
|
|
5456
|
-
const [popperEl, setPopperEl] = React
|
|
5457
|
-
const [arrowRef, setArrowRef] = React
|
|
5458
|
-
const [open, setOpen] = React
|
|
5459
|
-
const openTimer = React
|
|
5605
|
+
const [popperEl, setPopperEl] = React.useState(null);
|
|
5606
|
+
const [arrowRef, setArrowRef] = React.useState(null);
|
|
5607
|
+
const [open, setOpen] = React.useState(false);
|
|
5608
|
+
const openTimer = React.useRef();
|
|
5460
5609
|
const tooltipRef = useCombinedRefs(setPopperEl, ref);
|
|
5461
|
-
const anchorRef = React
|
|
5610
|
+
const anchorRef = React.useRef();
|
|
5462
5611
|
const combinedChilddRef = useCombinedRefs(anchorRef, children === null || children === void 0 ? void 0 : children.ref);
|
|
5463
5612
|
const tooltipId = useId(id, 'tooltip');
|
|
5464
5613
|
const containerId = 'eds-tooltip-container';
|
|
@@ -5467,7 +5616,7 @@ const Tooltip = /*#__PURE__*/React$1.forwardRef(function Tooltip({
|
|
|
5467
5616
|
setTimeout,
|
|
5468
5617
|
clearTimeout
|
|
5469
5618
|
} = window;
|
|
5470
|
-
React
|
|
5619
|
+
React.useEffect(() => {
|
|
5471
5620
|
if (document.getElementById(containerId) === null) {
|
|
5472
5621
|
const tooltipContainerElement = document.createElement('div');
|
|
5473
5622
|
tooltipContainerElement.id = containerId;
|
|
@@ -5504,7 +5653,7 @@ const Tooltip = /*#__PURE__*/React$1.forwardRef(function Tooltip({
|
|
|
5504
5653
|
...attributes.popper
|
|
5505
5654
|
};
|
|
5506
5655
|
const childProps = children.props;
|
|
5507
|
-
const updatedChildren = /*#__PURE__*/React
|
|
5656
|
+
const updatedChildren = /*#__PURE__*/React.cloneElement(children, {
|
|
5508
5657
|
ref: combinedChilddRef,
|
|
5509
5658
|
'aria-describedby': open ? tooltipId : null,
|
|
5510
5659
|
onMouseOver: joinHandlers(openTooltip, childProps.onMouseOver),
|
|
@@ -5514,20 +5663,26 @@ const Tooltip = /*#__PURE__*/React$1.forwardRef(function Tooltip({
|
|
|
5514
5663
|
onBlur: joinHandlers(closeTooltip, childProps.onBlur),
|
|
5515
5664
|
onFocus: joinHandlers(openTooltip, childProps.onFocus)
|
|
5516
5665
|
});
|
|
5517
|
-
return /*#__PURE__*/
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5666
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5667
|
+
children: [shouldOpen && open && /*#__PURE__*/ReactDom__namespace.createPortal( /*#__PURE__*/jsxRuntime.jsxs(StyledTooltip, {
|
|
5668
|
+
id: tooltipId,
|
|
5669
|
+
role: "tooltip",
|
|
5670
|
+
ref: tooltipRef,
|
|
5671
|
+
style: styles.popper,
|
|
5672
|
+
...props,
|
|
5673
|
+
children: [title, /*#__PURE__*/jsxRuntime.jsx(ArrowWrapper$1, {
|
|
5674
|
+
ref: setArrowRef,
|
|
5675
|
+
style: styles.arrow,
|
|
5676
|
+
className: "arrow",
|
|
5677
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TooltipArrow, {
|
|
5678
|
+
className: "arrowSvg",
|
|
5679
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
5680
|
+
d: "M0.504838 4.86885C-0.168399 4.48524 -0.168399 3.51476 0.504838 3.13115L6 8.59227e-08L6 8L0.504838 4.86885Z"
|
|
5681
|
+
})
|
|
5682
|
+
})
|
|
5683
|
+
})]
|
|
5684
|
+
}), document.getElementById(containerId)), updatedChildren]
|
|
5685
|
+
});
|
|
5531
5686
|
});
|
|
5532
5687
|
|
|
5533
5688
|
const {
|
|
@@ -5605,14 +5760,16 @@ const StyledSnackbarAction = styled__default['default'].div.withConfig({
|
|
|
5605
5760
|
displayName: "SnackbarAction__StyledSnackbarAction",
|
|
5606
5761
|
componentId: "sc-1v5mjvd-0"
|
|
5607
5762
|
})(["display:inline-flex;margin-left:", ";margin-top:", ";margin-bottom:", ";"], snackbar.entities.actions.spacings.left, snackbar.entities.actions.spacings.top, snackbar.entities.actions.spacings.bottom);
|
|
5608
|
-
const SnackbarAction = /*#__PURE__*/React
|
|
5763
|
+
const SnackbarAction = /*#__PURE__*/React.forwardRef(function SnackbarAction({
|
|
5609
5764
|
children,
|
|
5610
5765
|
...rest
|
|
5611
5766
|
}, ref) {
|
|
5612
5767
|
const props = { ...rest,
|
|
5613
5768
|
ref
|
|
5614
5769
|
};
|
|
5615
|
-
return /*#__PURE__*/
|
|
5770
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledSnackbarAction, { ...props,
|
|
5771
|
+
children: React.Children.only(children)
|
|
5772
|
+
});
|
|
5616
5773
|
});
|
|
5617
5774
|
|
|
5618
5775
|
const StyledSnackbar = styled__default['default'](Paper).attrs(() => ({
|
|
@@ -5629,7 +5786,7 @@ const StyledSnackbar = styled__default['default'](Paper).attrs(() => ({
|
|
|
5629
5786
|
left: placement.includes('left') ? snackbar.spacings.left : placement === 'top' || placement === 'bottom' ? '50%' : undefined,
|
|
5630
5787
|
transform: placement === 'left' || placement === 'right' ? 'translateY(-50%)' : placement === 'top' || placement === 'bottom' ? 'translateX(-50%)' : undefined
|
|
5631
5788
|
}), snackbar.entities.button.typography.color);
|
|
5632
|
-
const Snackbar$1 = /*#__PURE__*/React
|
|
5789
|
+
const Snackbar$1 = /*#__PURE__*/React.forwardRef(function Snackbar({
|
|
5633
5790
|
open = false,
|
|
5634
5791
|
autoHideDuration = 7000,
|
|
5635
5792
|
onClose,
|
|
@@ -5637,13 +5794,13 @@ const Snackbar$1 = /*#__PURE__*/React$1.forwardRef(function Snackbar({
|
|
|
5637
5794
|
children,
|
|
5638
5795
|
...rest
|
|
5639
5796
|
}, ref) {
|
|
5640
|
-
const [visible, setVisible] = React
|
|
5641
|
-
const timer = React
|
|
5797
|
+
const [visible, setVisible] = React.useState(open);
|
|
5798
|
+
const timer = React.useRef();
|
|
5642
5799
|
const {
|
|
5643
5800
|
setTimeout,
|
|
5644
5801
|
clearTimeout
|
|
5645
5802
|
} = window;
|
|
5646
|
-
React
|
|
5803
|
+
React.useEffect(() => {
|
|
5647
5804
|
setVisible(open);
|
|
5648
5805
|
timer.current = setTimeout(() => {
|
|
5649
5806
|
setVisible(false);
|
|
@@ -5659,9 +5816,13 @@ const Snackbar$1 = /*#__PURE__*/React$1.forwardRef(function Snackbar({
|
|
|
5659
5816
|
placement,
|
|
5660
5817
|
...rest
|
|
5661
5818
|
};
|
|
5662
|
-
return /*#__PURE__*/
|
|
5663
|
-
|
|
5664
|
-
|
|
5819
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
5820
|
+
children: visible && /*#__PURE__*/ReactDom__namespace.createPortal( /*#__PURE__*/jsxRuntime.jsx(StyledSnackbar, {
|
|
5821
|
+
elevation: "overlay",
|
|
5822
|
+
...props,
|
|
5823
|
+
children: children
|
|
5824
|
+
}), document.body)
|
|
5825
|
+
});
|
|
5665
5826
|
});
|
|
5666
5827
|
|
|
5667
5828
|
const Snackbar = Snackbar$1;
|
|
@@ -5757,7 +5918,7 @@ const PopoverArrow = styled__default['default'].svg.withConfig({
|
|
|
5757
5918
|
displayName: "Popover__PopoverArrow",
|
|
5758
5919
|
componentId: "sc-b7p1is-3"
|
|
5759
5920
|
})(["width:", ";height:", ";position:absolute;fill:", ";filter:drop-shadow(-4px 0px 2px rgba(0,0,0,0.2));"], popover.entities.arrow.width, popover.entities.arrow.height, popover.background);
|
|
5760
|
-
const Popover$1 = /*#__PURE__*/React
|
|
5921
|
+
const Popover$1 = /*#__PURE__*/React.forwardRef(function Popover({
|
|
5761
5922
|
children,
|
|
5762
5923
|
placement = 'bottom',
|
|
5763
5924
|
anchorEl,
|
|
@@ -5765,8 +5926,8 @@ const Popover$1 = /*#__PURE__*/React$1.forwardRef(function Popover({
|
|
|
5765
5926
|
onClose,
|
|
5766
5927
|
...rest
|
|
5767
5928
|
}, ref) {
|
|
5768
|
-
const [popperEl, setPopperEl] = React
|
|
5769
|
-
const [arrowRef, setArrowRef] = React
|
|
5929
|
+
const [popperEl, setPopperEl] = React.useState(null);
|
|
5930
|
+
const [arrowRef, setArrowRef] = React.useState(null);
|
|
5770
5931
|
const popoverRef = useCombinedRefs(ref, setPopperEl);
|
|
5771
5932
|
useOutsideClick(popperEl, e => {
|
|
5772
5933
|
if (open && onClose !== null && anchorEl && !anchorEl.contains(e.target)) {
|
|
@@ -5787,29 +5948,34 @@ const Popover$1 = /*#__PURE__*/React$1.forwardRef(function Popover({
|
|
|
5787
5948
|
...rest,
|
|
5788
5949
|
...attributes.popper
|
|
5789
5950
|
};
|
|
5790
|
-
return /*#__PURE__*/
|
|
5951
|
+
return /*#__PURE__*/jsxRuntime.jsxs(PopoverPaper, {
|
|
5791
5952
|
ref: popoverRef,
|
|
5792
5953
|
elevation: "overlay",
|
|
5793
5954
|
style: styles.popper,
|
|
5794
|
-
"data-testid": "popover"
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5955
|
+
"data-testid": "popover",
|
|
5956
|
+
...props,
|
|
5957
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ArrowWrapper, {
|
|
5958
|
+
ref: setArrowRef,
|
|
5959
|
+
style: styles.arrow,
|
|
5960
|
+
className: "arrow",
|
|
5961
|
+
children: /*#__PURE__*/jsxRuntime.jsx(PopoverArrow, {
|
|
5962
|
+
className: "arrowSvg",
|
|
5963
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
5964
|
+
d: "M0.504838 4.86885C-0.168399 4.48524 -0.168399 3.51476 0.504838 3.13115L6 8.59227e-08L6 8L0.504838 4.86885Z"
|
|
5965
|
+
})
|
|
5966
|
+
})
|
|
5967
|
+
}), children, /*#__PURE__*/jsxRuntime.jsx(StyledCloseButton, {
|
|
5968
|
+
onClick: onClose,
|
|
5969
|
+
variant: "ghost_icon",
|
|
5970
|
+
"data-testid": "popover-close",
|
|
5971
|
+
"aria-label": "Close popover",
|
|
5972
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
5973
|
+
name: "close",
|
|
5974
|
+
data: edsIcons.close,
|
|
5975
|
+
size: 24
|
|
5976
|
+
})
|
|
5977
|
+
})]
|
|
5978
|
+
});
|
|
5813
5979
|
});
|
|
5814
5980
|
|
|
5815
5981
|
const StyledPopoverTitle = styled__default['default'].div.withConfig({
|
|
@@ -5820,30 +5986,36 @@ const StyledDivider = styled__default['default'](Divider).withConfig({
|
|
|
5820
5986
|
displayName: "PopoverTitle__StyledDivider",
|
|
5821
5987
|
componentId: "sc-1ben8su-1"
|
|
5822
5988
|
})(["margin-left:-", ";margin-right:-", ";margin-bottom:0;width:auto;max-width:", ";"], popover.spacings.left, popover.spacings.right, popover.maxWidth);
|
|
5823
|
-
const PopoverTitle = /*#__PURE__*/React
|
|
5989
|
+
const PopoverTitle = /*#__PURE__*/React.forwardRef(function PopoverTitle({
|
|
5824
5990
|
children,
|
|
5825
5991
|
...rest
|
|
5826
5992
|
}, ref) {
|
|
5827
5993
|
const props = { ...rest,
|
|
5828
5994
|
ref
|
|
5829
5995
|
};
|
|
5830
|
-
return /*#__PURE__*/
|
|
5831
|
-
|
|
5832
|
-
|
|
5996
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", { ...props,
|
|
5997
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(StyledPopoverTitle, {
|
|
5998
|
+
children: children
|
|
5999
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledDivider, {
|
|
6000
|
+
variant: "small"
|
|
6001
|
+
})]
|
|
6002
|
+
});
|
|
5833
6003
|
});
|
|
5834
6004
|
|
|
5835
6005
|
const ContentWrapper = styled__default['default'].div.withConfig({
|
|
5836
6006
|
displayName: "PopoverContent__ContentWrapper",
|
|
5837
6007
|
componentId: "sc-vwww9h-0"
|
|
5838
6008
|
})(["overflow:hidden;"]);
|
|
5839
|
-
const PopoverContent = /*#__PURE__*/React
|
|
6009
|
+
const PopoverContent = /*#__PURE__*/React.forwardRef(function PopoverContent({
|
|
5840
6010
|
children,
|
|
5841
6011
|
...rest
|
|
5842
6012
|
}, ref) {
|
|
5843
6013
|
const props = { ...rest,
|
|
5844
6014
|
ref
|
|
5845
6015
|
};
|
|
5846
|
-
return /*#__PURE__*/
|
|
6016
|
+
return /*#__PURE__*/jsxRuntime.jsx(ContentWrapper, { ...props,
|
|
6017
|
+
children: children
|
|
6018
|
+
});
|
|
5847
6019
|
}); // PopoverContent.displayName = 'eds-popover-content'
|
|
5848
6020
|
|
|
5849
6021
|
const Popover = Popover$1;
|
|
@@ -5953,14 +6125,14 @@ const StyledBannerIcon = styled__default['default'].span.withConfig({
|
|
|
5953
6125
|
})(["display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;", ";background-color:", ";width:", ";height:", ";margin-right:", ";"], bordersTemplate(enabled$2.entities.icon.border), ({
|
|
5954
6126
|
variant
|
|
5955
6127
|
}) => variant === 'warning' ? warning.entities.icon.background : info.entities.icon.background, enabled$2.entities.icon.width, enabled$2.entities.icon.height, enabled$2.spacings.right);
|
|
5956
|
-
const BannerIcon = /*#__PURE__*/React
|
|
6128
|
+
const BannerIcon = /*#__PURE__*/React.forwardRef(function BannerIcon({
|
|
5957
6129
|
children,
|
|
5958
6130
|
variant = 'info',
|
|
5959
6131
|
...rest
|
|
5960
6132
|
}, ref) {
|
|
5961
|
-
const childrenWithColor = React
|
|
6133
|
+
const childrenWithColor = React.Children.map(children, child => {
|
|
5962
6134
|
const color = variant === 'warning' ? warning.entities.icon.typography.color : info.entities.icon.typography.color;
|
|
5963
|
-
return /*#__PURE__*/React
|
|
6135
|
+
return /*#__PURE__*/React.isValidElement(child) && child.type === Icon$1 && /*#__PURE__*/React.cloneElement(child, {
|
|
5964
6136
|
color
|
|
5965
6137
|
}) || child;
|
|
5966
6138
|
});
|
|
@@ -5968,9 +6140,11 @@ const BannerIcon = /*#__PURE__*/React$1.forwardRef(function BannerIcon({
|
|
|
5968
6140
|
ref,
|
|
5969
6141
|
...rest
|
|
5970
6142
|
};
|
|
5971
|
-
return /*#__PURE__*/
|
|
5972
|
-
variant: variant
|
|
5973
|
-
|
|
6143
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledBannerIcon, {
|
|
6144
|
+
variant: variant,
|
|
6145
|
+
...props,
|
|
6146
|
+
children: childrenWithColor
|
|
6147
|
+
});
|
|
5974
6148
|
});
|
|
5975
6149
|
|
|
5976
6150
|
const StyledBanner = styled__default['default'].div.withConfig({
|
|
@@ -5990,34 +6164,36 @@ const NonMarginDivider = styled__default['default'](Divider).withConfig({
|
|
|
5990
6164
|
displayName: "Banner__NonMarginDivider",
|
|
5991
6165
|
componentId: "sc-1ju451i-2"
|
|
5992
6166
|
})(["margin:0;height:2px;"]);
|
|
5993
|
-
const Banner$1 = /*#__PURE__*/React
|
|
6167
|
+
const Banner$1 = /*#__PURE__*/React.forwardRef(function Banner({
|
|
5994
6168
|
children,
|
|
5995
6169
|
className,
|
|
5996
6170
|
...rest
|
|
5997
6171
|
}, ref) {
|
|
5998
|
-
const childrenWhereBannerIcon = React
|
|
5999
|
-
return /*#__PURE__*/React
|
|
6172
|
+
const childrenWhereBannerIcon = React.Children.map(children, child => {
|
|
6173
|
+
return /*#__PURE__*/React.isValidElement(child) && child.type === BannerIcon;
|
|
6000
6174
|
});
|
|
6001
6175
|
const hasIcon = childrenWhereBannerIcon.some(bool => bool);
|
|
6002
6176
|
const props = {
|
|
6003
6177
|
ref,
|
|
6004
6178
|
...rest
|
|
6005
6179
|
};
|
|
6006
|
-
return /*#__PURE__*/
|
|
6180
|
+
return /*#__PURE__*/jsxRuntime.jsxs(StyledBanner, { ...props,
|
|
6007
6181
|
className: className,
|
|
6008
|
-
role: "alert"
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6182
|
+
role: "alert",
|
|
6183
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Content$1, {
|
|
6184
|
+
hasIcon: hasIcon,
|
|
6185
|
+
children: children
|
|
6186
|
+
}), /*#__PURE__*/jsxRuntime.jsx(NonMarginDivider, {
|
|
6187
|
+
color: "light"
|
|
6188
|
+
})]
|
|
6189
|
+
});
|
|
6014
6190
|
});
|
|
6015
6191
|
|
|
6016
6192
|
const StyledBannerMessage = styled__default['default'](Typography).withConfig({
|
|
6017
6193
|
displayName: "BannerMessage__StyledBannerMessage",
|
|
6018
6194
|
componentId: "sc-1lfqos1-0"
|
|
6019
6195
|
})([""]);
|
|
6020
|
-
const BannerMessage = /*#__PURE__*/React
|
|
6196
|
+
const BannerMessage = /*#__PURE__*/React.forwardRef(function BannerMessage({
|
|
6021
6197
|
children,
|
|
6022
6198
|
...rest
|
|
6023
6199
|
}, ref) {
|
|
@@ -6025,9 +6201,11 @@ const BannerMessage = /*#__PURE__*/React$1.forwardRef(function BannerMessage({
|
|
|
6025
6201
|
ref,
|
|
6026
6202
|
...rest
|
|
6027
6203
|
};
|
|
6028
|
-
return /*#__PURE__*/
|
|
6029
|
-
variant: "body_long"
|
|
6030
|
-
|
|
6204
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledBannerMessage, {
|
|
6205
|
+
variant: "body_long",
|
|
6206
|
+
...props,
|
|
6207
|
+
children: children
|
|
6208
|
+
});
|
|
6031
6209
|
});
|
|
6032
6210
|
|
|
6033
6211
|
const {
|
|
@@ -6044,7 +6222,7 @@ const StyledBannerActions = styled__default['default'].div.withConfig({
|
|
|
6044
6222
|
marginTop: enabled.spacings.top,
|
|
6045
6223
|
marginLeft: '0'
|
|
6046
6224
|
});
|
|
6047
|
-
const BannerActions = /*#__PURE__*/React
|
|
6225
|
+
const BannerActions = /*#__PURE__*/React.forwardRef(function BannerActions({
|
|
6048
6226
|
children,
|
|
6049
6227
|
placement = 'left',
|
|
6050
6228
|
...rest
|
|
@@ -6053,9 +6231,11 @@ const BannerActions = /*#__PURE__*/React$1.forwardRef(function BannerActions({
|
|
|
6053
6231
|
ref,
|
|
6054
6232
|
...rest
|
|
6055
6233
|
};
|
|
6056
|
-
return /*#__PURE__*/
|
|
6057
|
-
placement: placement
|
|
6058
|
-
|
|
6234
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledBannerActions, {
|
|
6235
|
+
placement: placement,
|
|
6236
|
+
...props,
|
|
6237
|
+
children: children
|
|
6238
|
+
});
|
|
6059
6239
|
});
|
|
6060
6240
|
|
|
6061
6241
|
const Banner = Banner$1;
|
|
@@ -6100,7 +6280,7 @@ const IndeterminateProgressBar = styled__default['default'].div.withConfig({
|
|
|
6100
6280
|
displayName: "LinearProgress__IndeterminateProgressBar",
|
|
6101
6281
|
componentId: "sc-5orxpi-2"
|
|
6102
6282
|
})(["width:75%;border-radius:50px;position:absolute;left:0;bottom:0;top:0;transition:transform 0.2s linear;transform-origin:left;background-color:", ";animation:", " 1.5s cubic-bezier(0.165,0.84,0.44,1) 1s infinite;"], primary$2.entities.progress.background, indeterminate$2);
|
|
6103
|
-
const LinearProgress = /*#__PURE__*/React
|
|
6283
|
+
const LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress({
|
|
6104
6284
|
variant = 'indeterminate',
|
|
6105
6285
|
value = null,
|
|
6106
6286
|
...rest
|
|
@@ -6123,11 +6303,12 @@ const LinearProgress = /*#__PURE__*/React$1.forwardRef(function LinearProgress({
|
|
|
6123
6303
|
const transformStyle = {
|
|
6124
6304
|
transform: barStyle
|
|
6125
6305
|
};
|
|
6126
|
-
return /*#__PURE__*/
|
|
6127
|
-
role: "progressbar"
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6306
|
+
return /*#__PURE__*/jsxRuntime.jsx(Track$2, { ...props,
|
|
6307
|
+
role: "progressbar",
|
|
6308
|
+
children: variant === 'indeterminate' ? /*#__PURE__*/jsxRuntime.jsx(IndeterminateProgressBar, {}) : /*#__PURE__*/jsxRuntime.jsx(ProgressBar, {
|
|
6309
|
+
style: transformStyle
|
|
6310
|
+
})
|
|
6311
|
+
});
|
|
6131
6312
|
}); // LinearProgress.displayName = 'eds-linear-progress'
|
|
6132
6313
|
|
|
6133
6314
|
const {
|
|
@@ -6206,7 +6387,7 @@ const getToken = color => {
|
|
|
6206
6387
|
};
|
|
6207
6388
|
};
|
|
6208
6389
|
|
|
6209
|
-
const CircularProgress = /*#__PURE__*/React
|
|
6390
|
+
const CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress({
|
|
6210
6391
|
variant = 'indeterminate',
|
|
6211
6392
|
value = null,
|
|
6212
6393
|
size = 48,
|
|
@@ -6235,31 +6416,32 @@ const CircularProgress = /*#__PURE__*/React$1.forwardRef(function CircularProgre
|
|
|
6235
6416
|
}
|
|
6236
6417
|
}
|
|
6237
6418
|
|
|
6238
|
-
return /*#__PURE__*/
|
|
6419
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Svg$4, { ...props,
|
|
6239
6420
|
viewBox: "24 24 48 48",
|
|
6240
6421
|
role: "progressbar",
|
|
6241
6422
|
height: size,
|
|
6242
6423
|
width: size,
|
|
6243
|
-
preserveAspectRatio: "xMidYMid meet"
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6424
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
6425
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(TrackCircle, {
|
|
6426
|
+
style: trackStyle,
|
|
6427
|
+
cx: 48,
|
|
6428
|
+
cy: 48,
|
|
6429
|
+
r: (48 - thickness) / 2,
|
|
6430
|
+
fill: "none",
|
|
6431
|
+
strokeWidth: thickness,
|
|
6432
|
+
stroke: token.background
|
|
6433
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ProgressCircle, {
|
|
6434
|
+
style: trackStyle,
|
|
6435
|
+
cx: 48,
|
|
6436
|
+
cy: 48,
|
|
6437
|
+
r: (48 - thickness) / 2,
|
|
6438
|
+
fill: "none",
|
|
6439
|
+
strokeLinecap: "round",
|
|
6440
|
+
strokeWidth: thickness,
|
|
6441
|
+
strokeDasharray: variant === 'determinate' ? circumference : 48,
|
|
6442
|
+
stroke: token.entities.progress.background
|
|
6443
|
+
})]
|
|
6444
|
+
});
|
|
6263
6445
|
}); // CircularProgress.displayName = 'eds-circular-progress'
|
|
6264
6446
|
|
|
6265
6447
|
const {
|
|
@@ -6284,7 +6466,7 @@ const Svg$3 = styled__default['default'].svg.withConfig({
|
|
|
6284
6466
|
variant,
|
|
6285
6467
|
progress
|
|
6286
6468
|
}) => variant === 'indeterminate' ? styled.css(["path{&:nth-child(1){animation:", " 1.3s linear infinite;}&:nth-child(2){animation:", " 1.3s linear 0.3s infinite;}&:nth-child(3){animation:", " 1.3s linear 0.4s infinite;}&:nth-child(4){animation:", " 1.3s linear 0.6s infinite;}&:nth-child(5){animation:", " 1.3s linear 0.8s infinite;}&:nth-child(6){animation:", " 1.3s linear 1s infinite;}}"], indeterminate, indeterminate, indeterminate, indeterminate, indeterminate, indeterminate) : styled.css(["path{animation:", " 1.3s linear;&:nth-child(6){animation-play-state:", ";}&:nth-child(5){animation-play-state:", ";}&:nth-child(4){animation-play-state:", ";}&:nth-child(3){animation-play-state:", ";}&:nth-child(2){animation-play-state:", ";}&:nth-child(1){animation-play-state:", ";}}"], determinate, progress > 90 ? 'running' : 'paused', progress > 80 ? 'running' : 'paused', progress > 60 ? 'running' : 'paused', progress > 40 ? 'running' : 'paused', progress > 20 ? 'running' : 'paused', progress <= 20 ? 'running' : 'paused'));
|
|
6287
|
-
const StarProgress = /*#__PURE__*/React
|
|
6469
|
+
const StarProgress = /*#__PURE__*/React.forwardRef(function StarProgress({
|
|
6288
6470
|
variant = 'indeterminate',
|
|
6289
6471
|
value = null,
|
|
6290
6472
|
size = 48,
|
|
@@ -6307,27 +6489,28 @@ const StarProgress = /*#__PURE__*/React$1.forwardRef(function StarProgress({
|
|
|
6307
6489
|
}
|
|
6308
6490
|
}
|
|
6309
6491
|
|
|
6310
|
-
return /*#__PURE__*/
|
|
6492
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Svg$3, { ...props,
|
|
6311
6493
|
role: "progressbar",
|
|
6312
6494
|
width: width,
|
|
6313
6495
|
height: height,
|
|
6314
6496
|
viewBox: "0 0 40 48",
|
|
6315
6497
|
fill: "none",
|
|
6316
6498
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6317
|
-
preserveAspectRatio: "xMidYMid meet"
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6499
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
6500
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
6501
|
+
d: "M32.756 34.6798L29.482 36.5817C29.4139 36.6219 29.3295 36.6227 29.2606 36.5829L25.9476 34.7151C25.7975 34.6306 25.7967 34.4149 25.9456 34.3284L29.2397 32.4256C29.3077 32.3858 29.3914 32.3858 29.4603 32.4248L32.754 34.2931C32.9033 34.3784 32.9041 34.5929 32.756 34.6798Z"
|
|
6502
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
6503
|
+
d: "M25.9596 45.4706L22.6655 43.5867C22.5966 43.5469 22.554 43.4744 22.554 43.396V41.4289V39.5922C22.5519 39.4204 22.7381 39.3109 22.8878 39.397L26.1819 41.2981C26.25 41.3379 26.2926 41.4104 26.2934 41.4896V43.4268V45.2762C26.2947 45.4472 26.1085 45.5559 25.9596 45.4706Z"
|
|
6504
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
6505
|
+
d: "M12.3022 47.7037V44.9795V42.6544C12.3022 42.5495 12.3576 42.4515 12.4482 42.3986L14.1262 41.4062L16.8143 39.8188C17.0119 39.7019 17.2617 39.8442 17.2625 40.0739L17.2633 42.7627V45.1456C17.2633 45.251 17.2079 45.3486 17.1165 45.4015L12.7496 47.9587C12.552 48.0748 12.3031 47.9325 12.3022 47.7037Z"
|
|
6506
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
6507
|
+
d: "M0.221343 34.2106L6.76939 30.4056C6.90636 30.326 7.07449 30.3256 7.21227 30.4023L13.8378 34.1401C14.138 34.3095 14.14 34.7413 13.8415 34.9131L7.25492 38.7182C7.11795 38.7977 6.94941 38.7985 6.81204 38.7206L0.225854 34.9836C-0.0734986 34.8139 -0.075549 34.3833 0.221343 34.2106Z"
|
|
6508
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
6509
|
+
d: "M6.03876 9.125L16.9237 15.5151C17.1513 15.6484 17.2903 15.8912 17.2903 16.1549V28.8331C17.2903 29.4076 16.665 29.7647 16.1704 29.4728L5.28546 23.0264C5.05869 22.8919 4.92008 22.6479 4.9209 22.3855V9.76307C4.92254 9.1902 5.54503 8.83467 6.03876 9.125Z"
|
|
6510
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
6511
|
+
d: "M39.6262 1.07261V11.7603V19.3368C39.627 19.7178 39.4265 20.0709 39.0988 20.2644L31.4145 24.8195L23.3545 29.5964C22.6385 30.0192 21.7339 29.5029 21.7339 28.6717V10.3259C21.7339 9.94495 21.9356 9.5927 22.2641 9.39955L38.008 0.149533C38.7232 -0.270381 39.6241 0.24385 39.6262 1.07261Z"
|
|
6512
|
+
})]
|
|
6513
|
+
});
|
|
6331
6514
|
}); // StarProgress.displayName = 'eds-star-progress'
|
|
6332
6515
|
|
|
6333
6516
|
const {
|
|
@@ -6380,7 +6563,7 @@ const getColor = color => {
|
|
|
6380
6563
|
return color;
|
|
6381
6564
|
};
|
|
6382
6565
|
|
|
6383
|
-
const DotProgress = /*#__PURE__*/React
|
|
6566
|
+
const DotProgress = /*#__PURE__*/React.forwardRef(function DotProgress({
|
|
6384
6567
|
color = 'neutral',
|
|
6385
6568
|
size = 32,
|
|
6386
6569
|
...rest
|
|
@@ -6391,25 +6574,26 @@ const DotProgress = /*#__PURE__*/React$1.forwardRef(function DotProgress({
|
|
|
6391
6574
|
};
|
|
6392
6575
|
const height = size / 4;
|
|
6393
6576
|
const width = size;
|
|
6394
|
-
return /*#__PURE__*/
|
|
6577
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Svg$2, { ...props,
|
|
6395
6578
|
role: "progressbar",
|
|
6396
6579
|
viewBox: "0 0 16 4",
|
|
6397
6580
|
height: height,
|
|
6398
6581
|
width: width,
|
|
6399
|
-
preserveAspectRatio: "xMidYMid meet"
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6582
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
6583
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
6584
|
+
cx: 2,
|
|
6585
|
+
cy: 2,
|
|
6586
|
+
r: 2
|
|
6587
|
+
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
6588
|
+
cx: 8,
|
|
6589
|
+
cy: 2,
|
|
6590
|
+
r: 2
|
|
6591
|
+
}), /*#__PURE__*/jsxRuntime.jsx("circle", {
|
|
6592
|
+
cx: 14,
|
|
6593
|
+
cy: 2,
|
|
6594
|
+
r: 2
|
|
6595
|
+
})]
|
|
6596
|
+
});
|
|
6413
6597
|
});
|
|
6414
6598
|
|
|
6415
6599
|
const Progress = {
|
|
@@ -6476,7 +6660,7 @@ const Collapsed = styled__default['default'](Typography).withConfig({
|
|
|
6476
6660
|
displayName: "Breadcrumbs__Collapsed",
|
|
6477
6661
|
componentId: "sc-12awlbz-3"
|
|
6478
6662
|
})(["@media (hover:hover) and (pointer:fine){&:hover{text-decoration:underline;color:", ";}}color:", ";text-decoration:none;"], states$1.hover.typography.color, typography$5.color);
|
|
6479
|
-
const Breadcrumbs$1 = /*#__PURE__*/React
|
|
6663
|
+
const Breadcrumbs$1 = /*#__PURE__*/React.forwardRef(function Breadcrumbs({
|
|
6480
6664
|
children,
|
|
6481
6665
|
collapse,
|
|
6482
6666
|
...rest
|
|
@@ -6484,7 +6668,7 @@ const Breadcrumbs$1 = /*#__PURE__*/React$1.forwardRef(function Breadcrumbs({
|
|
|
6484
6668
|
const props = { ...rest,
|
|
6485
6669
|
ref
|
|
6486
6670
|
};
|
|
6487
|
-
const [expanded, setExpanded] = React
|
|
6671
|
+
const [expanded, setExpanded] = React.useState(false);
|
|
6488
6672
|
|
|
6489
6673
|
const collapsedCrumbs = allCrumbs => {
|
|
6490
6674
|
const handleExpandClick = e => {
|
|
@@ -6502,35 +6686,47 @@ const Breadcrumbs$1 = /*#__PURE__*/React$1.forwardRef(function Breadcrumbs({
|
|
|
6502
6686
|
return allCrumbs;
|
|
6503
6687
|
}
|
|
6504
6688
|
|
|
6505
|
-
return [allCrumbs[0], /*#__PURE__*/
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6689
|
+
return [allCrumbs[0], /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
|
|
6690
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ListItem$3, {
|
|
6691
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Collapsed, {
|
|
6692
|
+
link: true,
|
|
6693
|
+
role: "button",
|
|
6694
|
+
variant: "body_short",
|
|
6695
|
+
onClick: handleExpandClick,
|
|
6696
|
+
onKeyPress: handleExpandClick,
|
|
6697
|
+
tabIndex: 0,
|
|
6698
|
+
children: "\u2026"
|
|
6699
|
+
})
|
|
6700
|
+
}), /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
6701
|
+
"aria-hidden": true,
|
|
6702
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Separator, {
|
|
6703
|
+
variant: "body_short",
|
|
6704
|
+
children: "/"
|
|
6705
|
+
})
|
|
6706
|
+
})]
|
|
6707
|
+
}, "collapsed"), allCrumbs[allCrumbs.length - 1]];
|
|
6519
6708
|
};
|
|
6520
6709
|
|
|
6521
|
-
const allCrumbs = React
|
|
6710
|
+
const allCrumbs = React.Children.toArray(children).map((child, index) =>
|
|
6522
6711
|
/*#__PURE__*/
|
|
6523
6712
|
// eslint-disable-next-line react/no-array-index-key
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6713
|
+
jsxRuntime.jsxs(React.Fragment, {
|
|
6714
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ListItem$3, {
|
|
6715
|
+
children: child
|
|
6716
|
+
}), index !== React.Children.toArray(children).length - 1 && /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
6717
|
+
"aria-hidden": true,
|
|
6718
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Separator, {
|
|
6719
|
+
variant: "body_short",
|
|
6720
|
+
children: "/"
|
|
6721
|
+
})
|
|
6722
|
+
})]
|
|
6723
|
+
}, `breadcrumb-${index}`));
|
|
6724
|
+
return /*#__PURE__*/jsxRuntime.jsx("nav", { ...props,
|
|
6725
|
+
"aria-label": "breadcrumbs",
|
|
6726
|
+
children: /*#__PURE__*/jsxRuntime.jsx(OrderedList$1, {
|
|
6727
|
+
children: collapse && !expanded ? collapsedCrumbs(allCrumbs) : allCrumbs
|
|
6728
|
+
})
|
|
6729
|
+
});
|
|
6534
6730
|
}); // Breadcrumbs.displayName = 'eds-breadcrumbs'
|
|
6535
6731
|
|
|
6536
6732
|
const {
|
|
@@ -6545,7 +6741,7 @@ const StyledTypography = styled__default['default'](Typography).withConfig({
|
|
|
6545
6741
|
}) => styled.css({
|
|
6546
6742
|
maxWidth
|
|
6547
6743
|
}));
|
|
6548
|
-
const Breadcrumb = /*#__PURE__*/React
|
|
6744
|
+
const Breadcrumb = /*#__PURE__*/React.forwardRef(function Breadcrumb({
|
|
6549
6745
|
children,
|
|
6550
6746
|
maxWidth,
|
|
6551
6747
|
href,
|
|
@@ -6558,15 +6754,20 @@ const Breadcrumb = /*#__PURE__*/React$1.forwardRef(function Breadcrumb({
|
|
|
6558
6754
|
};
|
|
6559
6755
|
const showTooltip = maxWidth > 0;
|
|
6560
6756
|
const isHrefDefined = href !== undefined;
|
|
6561
|
-
|
|
6757
|
+
|
|
6758
|
+
const crumb = /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
|
|
6562
6759
|
link: isHrefDefined,
|
|
6563
6760
|
as: isHrefDefined ? null : 'span',
|
|
6564
|
-
variant: "body_short"
|
|
6565
|
-
|
|
6566
|
-
|
|
6761
|
+
variant: "body_short",
|
|
6762
|
+
...props,
|
|
6763
|
+
children: children
|
|
6764
|
+
});
|
|
6765
|
+
|
|
6766
|
+
return showTooltip ? /*#__PURE__*/jsxRuntime.jsx(Tooltip, {
|
|
6567
6767
|
title: children,
|
|
6568
|
-
placement: "top"
|
|
6569
|
-
|
|
6768
|
+
placement: "top",
|
|
6769
|
+
children: crumb
|
|
6770
|
+
}) : crumb;
|
|
6570
6771
|
});
|
|
6571
6772
|
|
|
6572
6773
|
const Breadcrumbs = Breadcrumbs$1;
|
|
@@ -6577,11 +6778,11 @@ const initalState = {
|
|
|
6577
6778
|
focusedIndex: -1,
|
|
6578
6779
|
onClose: null
|
|
6579
6780
|
};
|
|
6580
|
-
const MenuContext = /*#__PURE__*/React
|
|
6781
|
+
const MenuContext = /*#__PURE__*/React.createContext(initalState);
|
|
6581
6782
|
const MenuProvider = ({
|
|
6582
6783
|
children
|
|
6583
6784
|
}) => {
|
|
6584
|
-
const [state, setState] = React
|
|
6785
|
+
const [state, setState] = React.useState(initalState);
|
|
6585
6786
|
const {
|
|
6586
6787
|
focusedIndex,
|
|
6587
6788
|
onClose
|
|
@@ -6605,11 +6806,12 @@ const MenuProvider = ({
|
|
|
6605
6806
|
setOnClose,
|
|
6606
6807
|
onClose
|
|
6607
6808
|
};
|
|
6608
|
-
return /*#__PURE__*/
|
|
6609
|
-
value: value
|
|
6610
|
-
|
|
6809
|
+
return /*#__PURE__*/jsxRuntime.jsx(MenuContext.Provider, {
|
|
6810
|
+
value: value,
|
|
6811
|
+
children: children
|
|
6812
|
+
});
|
|
6611
6813
|
};
|
|
6612
|
-
const useMenu = () => React
|
|
6814
|
+
const useMenu = () => React.useContext(MenuContext);
|
|
6613
6815
|
|
|
6614
6816
|
const {
|
|
6615
6817
|
colors: {
|
|
@@ -6773,7 +6975,7 @@ const Content = styled__default['default'].div.withConfig({
|
|
|
6773
6975
|
displayName: "MenuItem__Content",
|
|
6774
6976
|
componentId: "sc-1g9fpbe-1"
|
|
6775
6977
|
})(["width:auto;display:grid;grid-gap:16px;grid-auto-flow:column;grid-auto-columns:max-content auto max-content;align-items:center;"]);
|
|
6776
|
-
const MenuItem = /*#__PURE__*/React
|
|
6978
|
+
const MenuItem = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function MenuItem({
|
|
6777
6979
|
children,
|
|
6778
6980
|
disabled,
|
|
6779
6981
|
index = 0,
|
|
@@ -6797,7 +6999,7 @@ const MenuItem = /*#__PURE__*/React$1.memo( /*#__PURE__*/React$1.forwardRef(func
|
|
|
6797
6999
|
disabled,
|
|
6798
7000
|
isFocused
|
|
6799
7001
|
};
|
|
6800
|
-
return /*#__PURE__*/
|
|
7002
|
+
return /*#__PURE__*/jsxRuntime.jsx(ListItem$2, { ...props,
|
|
6801
7003
|
ref: useCombinedRefs(ref, el => {
|
|
6802
7004
|
if (el !== null && isFocused) {
|
|
6803
7005
|
el.focus();
|
|
@@ -6812,8 +7014,11 @@ const MenuItem = /*#__PURE__*/React$1.memo( /*#__PURE__*/React$1.forwardRef(func
|
|
|
6812
7014
|
onClose(e);
|
|
6813
7015
|
}
|
|
6814
7016
|
}
|
|
6815
|
-
}
|
|
6816
|
-
|
|
7017
|
+
},
|
|
7018
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Content, {
|
|
7019
|
+
children: children
|
|
7020
|
+
})
|
|
7021
|
+
});
|
|
6817
7022
|
}));
|
|
6818
7023
|
MenuItem.displayName = 'MenuItem';
|
|
6819
7024
|
|
|
@@ -6829,12 +7034,19 @@ const MenuSection = /*#__PURE__*/React__namespace.memo(function MenuSection(prop
|
|
|
6829
7034
|
title,
|
|
6830
7035
|
index
|
|
6831
7036
|
} = props;
|
|
6832
|
-
return /*#__PURE__*/
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
7037
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7038
|
+
children: [index !== 0 && /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
7039
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Divider, {
|
|
7040
|
+
variant: "small"
|
|
7041
|
+
})
|
|
7042
|
+
}), title && /*#__PURE__*/jsxRuntime.jsx(ListItem$1, {
|
|
7043
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
7044
|
+
group: "navigation",
|
|
7045
|
+
variant: "label",
|
|
7046
|
+
children: title
|
|
7047
|
+
})
|
|
7048
|
+
}), children]
|
|
7049
|
+
});
|
|
6838
7050
|
}); // MenuSection.displayName = 'EdsMenuSection'
|
|
6839
7051
|
|
|
6840
7052
|
const List = styled__default['default'].ul.withConfig({
|
|
@@ -6843,11 +7055,11 @@ const List = styled__default['default'].ul.withConfig({
|
|
|
6843
7055
|
})(["position:relative;list-style:none;margin:0;", " li:first-child{z-index:3;}"], spacingsTemplate(menu.spacings));
|
|
6844
7056
|
|
|
6845
7057
|
function isIndexable(item) {
|
|
6846
|
-
if ( /*#__PURE__*/React
|
|
7058
|
+
if ( /*#__PURE__*/React.isValidElement(item) && !item.props.disabled && item.type === MenuItem) return true;
|
|
6847
7059
|
return false;
|
|
6848
7060
|
}
|
|
6849
7061
|
|
|
6850
|
-
const MenuList = /*#__PURE__*/React
|
|
7062
|
+
const MenuList = /*#__PURE__*/React.forwardRef(function MenuList({
|
|
6851
7063
|
children,
|
|
6852
7064
|
focus,
|
|
6853
7065
|
...rest
|
|
@@ -6857,28 +7069,28 @@ const MenuList = /*#__PURE__*/React$1.forwardRef(function MenuList({
|
|
|
6857
7069
|
setFocusedIndex
|
|
6858
7070
|
} = useMenu();
|
|
6859
7071
|
let index = -1;
|
|
6860
|
-
const focusableIndexs = React
|
|
6861
|
-
const updatedChildren = React
|
|
7072
|
+
const focusableIndexs = React.useMemo(() => [], []);
|
|
7073
|
+
const updatedChildren = React.useMemo(() => React.Children.map(children, child => {
|
|
6862
7074
|
if (child.type === MenuSection) {
|
|
6863
|
-
const updatedGrandChildren = React
|
|
7075
|
+
const updatedGrandChildren = React.Children.map(child.props.children, grandChild => {
|
|
6864
7076
|
index++;
|
|
6865
7077
|
if (isIndexable(grandChild)) focusableIndexs.push(index);
|
|
6866
|
-
return /*#__PURE__*/React
|
|
7078
|
+
return /*#__PURE__*/React.cloneElement(grandChild, {
|
|
6867
7079
|
index
|
|
6868
7080
|
});
|
|
6869
7081
|
});
|
|
6870
|
-
return /*#__PURE__*/React
|
|
7082
|
+
return /*#__PURE__*/React.cloneElement(child, null, updatedGrandChildren);
|
|
6871
7083
|
} else {
|
|
6872
7084
|
index++;
|
|
6873
7085
|
if (isIndexable(child)) focusableIndexs.push(index);
|
|
6874
|
-
return /*#__PURE__*/React
|
|
7086
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
6875
7087
|
index
|
|
6876
7088
|
});
|
|
6877
7089
|
}
|
|
6878
7090
|
}), [children, focusableIndexs, index]);
|
|
6879
7091
|
const firstFocusIndex = focusableIndexs[0];
|
|
6880
7092
|
const lastFocusIndex = focusableIndexs[focusableIndexs.length - 1];
|
|
6881
|
-
React
|
|
7093
|
+
React.useEffect(() => {
|
|
6882
7094
|
if (focus === 'first') {
|
|
6883
7095
|
setFocusedIndex(firstFocusIndex);
|
|
6884
7096
|
}
|
|
@@ -6914,12 +7126,13 @@ const MenuList = /*#__PURE__*/React$1.forwardRef(function MenuList({
|
|
|
6914
7126
|
}
|
|
6915
7127
|
};
|
|
6916
7128
|
|
|
6917
|
-
return /*#__PURE__*/
|
|
7129
|
+
return /*#__PURE__*/jsxRuntime.jsx(List, {
|
|
6918
7130
|
onKeyDown: handleKeyPress,
|
|
6919
|
-
role: "menu"
|
|
6920
|
-
|
|
6921
|
-
ref: ref
|
|
6922
|
-
|
|
7131
|
+
role: "menu",
|
|
7132
|
+
...rest,
|
|
7133
|
+
ref: ref,
|
|
7134
|
+
children: updatedChildren
|
|
7135
|
+
});
|
|
6923
7136
|
}); // MenuList.displayName = 'EdsMenuList'
|
|
6924
7137
|
|
|
6925
7138
|
const {
|
|
@@ -6933,7 +7146,7 @@ const MenuPaper = styled__default['default'](Paper).withConfig({
|
|
|
6933
7146
|
}) => styled.css({
|
|
6934
7147
|
visibility: open ? null : 'hidden'
|
|
6935
7148
|
}));
|
|
6936
|
-
const MenuContainer = /*#__PURE__*/React
|
|
7149
|
+
const MenuContainer = /*#__PURE__*/React.forwardRef(function MenuContainer({
|
|
6937
7150
|
children,
|
|
6938
7151
|
anchorEl,
|
|
6939
7152
|
onClose: onCloseCallback,
|
|
@@ -6945,7 +7158,7 @@ const MenuContainer = /*#__PURE__*/React$1.forwardRef(function MenuContainer({
|
|
|
6945
7158
|
setOnClose,
|
|
6946
7159
|
onClose
|
|
6947
7160
|
} = useMenu();
|
|
6948
|
-
React
|
|
7161
|
+
React.useEffect(() => {
|
|
6949
7162
|
if (onClose === null && onCloseCallback) {
|
|
6950
7163
|
setOnClose(onCloseCallback);
|
|
6951
7164
|
}
|
|
@@ -6960,11 +7173,12 @@ const MenuContainer = /*#__PURE__*/React$1.forwardRef(function MenuContainer({
|
|
|
6960
7173
|
onClose();
|
|
6961
7174
|
}
|
|
6962
7175
|
});
|
|
6963
|
-
return /*#__PURE__*/
|
|
6964
|
-
ref: ref
|
|
6965
|
-
|
|
7176
|
+
return /*#__PURE__*/jsxRuntime.jsx(MenuList, { ...rest,
|
|
7177
|
+
ref: ref,
|
|
7178
|
+
children: children
|
|
7179
|
+
});
|
|
6966
7180
|
});
|
|
6967
|
-
const Menu$1 = /*#__PURE__*/React
|
|
7181
|
+
const Menu$1 = /*#__PURE__*/React.forwardRef(function Menu({
|
|
6968
7182
|
anchorEl,
|
|
6969
7183
|
open,
|
|
6970
7184
|
placement = 'auto',
|
|
@@ -6972,7 +7186,7 @@ const Menu$1 = /*#__PURE__*/React$1.forwardRef(function Menu({
|
|
|
6972
7186
|
className,
|
|
6973
7187
|
...rest
|
|
6974
7188
|
}, ref) {
|
|
6975
|
-
const [containerEl, setContainerEl] = React
|
|
7189
|
+
const [containerEl, setContainerEl] = React.useState(null);
|
|
6976
7190
|
const isMounted = useIsMounted();
|
|
6977
7191
|
const {
|
|
6978
7192
|
density
|
|
@@ -6997,14 +7211,21 @@ const Menu$1 = /*#__PURE__*/React$1.forwardRef(function Menu({
|
|
|
6997
7211
|
open,
|
|
6998
7212
|
containerEl
|
|
6999
7213
|
};
|
|
7000
|
-
return /*#__PURE__*/
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7214
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
7215
|
+
children: isMounted && /*#__PURE__*/ReactDom__namespace.createPortal( /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
7216
|
+
theme: token,
|
|
7217
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuPaper, {
|
|
7218
|
+
elevation: "raised",
|
|
7219
|
+
ref: setContainerEl,
|
|
7220
|
+
...props,
|
|
7221
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuProvider, {
|
|
7222
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuContainer, { ...menuProps,
|
|
7223
|
+
ref: ref
|
|
7224
|
+
})
|
|
7225
|
+
})
|
|
7226
|
+
})
|
|
7227
|
+
}), document.body)
|
|
7228
|
+
});
|
|
7008
7229
|
});
|
|
7009
7230
|
|
|
7010
7231
|
const Menu = Menu$1;
|
|
@@ -7050,7 +7271,7 @@ const pagination = {
|
|
|
7050
7271
|
}
|
|
7051
7272
|
};
|
|
7052
7273
|
|
|
7053
|
-
const PaginationItem = /*#__PURE__*/React
|
|
7274
|
+
const PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem({
|
|
7054
7275
|
page,
|
|
7055
7276
|
selected,
|
|
7056
7277
|
onClick,
|
|
@@ -7063,13 +7284,15 @@ const PaginationItem = /*#__PURE__*/React$1.forwardRef(function PaginationItem({
|
|
|
7063
7284
|
...rest
|
|
7064
7285
|
};
|
|
7065
7286
|
const background = selected ? pagination.entities.item.states.active.background : null;
|
|
7066
|
-
return /*#__PURE__*/
|
|
7287
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
7067
7288
|
style: {
|
|
7068
7289
|
background
|
|
7069
7290
|
},
|
|
7070
7291
|
variant: "ghost_icon",
|
|
7071
|
-
onClick: onClick ? onClick : undefined
|
|
7072
|
-
|
|
7292
|
+
onClick: onClick ? onClick : undefined,
|
|
7293
|
+
...props,
|
|
7294
|
+
children: page
|
|
7295
|
+
});
|
|
7073
7296
|
});
|
|
7074
7297
|
|
|
7075
7298
|
function PaginationControl(pages, activePage) {
|
|
@@ -7154,7 +7377,7 @@ function getAriaLabel(page, selected) {
|
|
|
7154
7377
|
return `${selected === page ? 'Current page, ' : 'Go to '}page ${page}`;
|
|
7155
7378
|
}
|
|
7156
7379
|
|
|
7157
|
-
const Pagination = /*#__PURE__*/React
|
|
7380
|
+
const Pagination = /*#__PURE__*/React.forwardRef(function Pagination({
|
|
7158
7381
|
totalItems,
|
|
7159
7382
|
defaultPage = 1,
|
|
7160
7383
|
withItemIndicator,
|
|
@@ -7166,7 +7389,7 @@ const Pagination = /*#__PURE__*/React$1.forwardRef(function Pagination({
|
|
|
7166
7389
|
|
|
7167
7390
|
const columns = pages < 5 ? pages + 2 : 7; // Total pages to display on the control + 2: < and >
|
|
7168
7391
|
|
|
7169
|
-
const [activePage, setActivePage] = React
|
|
7392
|
+
const [activePage, setActivePage] = React.useState(defaultPage);
|
|
7170
7393
|
const currentItemFirst = activePage === 1 ? 1 : activePage * itemsPerPage - itemsPerPage + 1; // First number of range of items at current page
|
|
7171
7394
|
|
|
7172
7395
|
const currentItemLast = activePage === pages ? totalItems : activePage * itemsPerPage; // Last number of range of items at current page
|
|
@@ -7184,7 +7407,7 @@ const Pagination = /*#__PURE__*/React$1.forwardRef(function Pagination({
|
|
|
7184
7407
|
|
|
7185
7408
|
const isMounted = useIsMounted();
|
|
7186
7409
|
const items = PaginationControl(pages, activePage);
|
|
7187
|
-
React
|
|
7410
|
+
React.useLayoutEffect(() => {
|
|
7188
7411
|
if (isMounted) {
|
|
7189
7412
|
setActivePage(1);
|
|
7190
7413
|
onChange === null || onChange === void 0 ? void 0 : onChange(null, 1);
|
|
@@ -7196,60 +7419,71 @@ const Pagination = /*#__PURE__*/React$1.forwardRef(function Pagination({
|
|
|
7196
7419
|
withItemIndicator,
|
|
7197
7420
|
...rest
|
|
7198
7421
|
};
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7422
|
+
|
|
7423
|
+
const pagination = /*#__PURE__*/jsxRuntime.jsx(Navigation, {
|
|
7424
|
+
"aria-label": "pagination",
|
|
7425
|
+
...props,
|
|
7426
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(OrderedList, {
|
|
7427
|
+
style: {
|
|
7428
|
+
gridTemplateColumns: `repeat(${columns}, 48px)`
|
|
7429
|
+
},
|
|
7430
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ListItem, {
|
|
7431
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
7432
|
+
variant: "ghost_icon",
|
|
7433
|
+
onClick: activePage > 1 ? event => {
|
|
7434
|
+
onPageChange(event, activePage - 1);
|
|
7435
|
+
} : undefined,
|
|
7436
|
+
disabled: activePage === 1,
|
|
7437
|
+
"aria-label": "Go to previous page",
|
|
7438
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
7439
|
+
name: "chevron_left"
|
|
7440
|
+
})
|
|
7441
|
+
})
|
|
7442
|
+
}, "previous"), items.length > 0 ? items.map((page, index) => page !== 'ELLIPSIS' ?
|
|
7443
|
+
/*#__PURE__*/
|
|
7444
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
7445
|
+
jsxRuntime.jsx(ListItem, {
|
|
7446
|
+
children: /*#__PURE__*/jsxRuntime.jsx(PaginationItem, { ...page,
|
|
7447
|
+
"aria-label": getAriaLabel(page, activePage),
|
|
7448
|
+
"aria-current": activePage,
|
|
7449
|
+
page: page,
|
|
7450
|
+
selected: page === activePage,
|
|
7451
|
+
onClick: event => {
|
|
7452
|
+
onPageChange(event, page);
|
|
7453
|
+
}
|
|
7454
|
+
})
|
|
7455
|
+
}, `list-item ${index}`) : /*#__PURE__*/jsxRuntime.jsx(ListItem // eslint-disable-next-line react/no-array-index-key
|
|
7456
|
+
, {
|
|
7457
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledIcon, {
|
|
7458
|
+
name: "more_horizontal",
|
|
7459
|
+
"aria-label": "Ellipsis of pages"
|
|
7460
|
+
})
|
|
7461
|
+
}, `ellipsis-${index}`)) : undefined, /*#__PURE__*/jsxRuntime.jsx(ListItem, {
|
|
7462
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
7463
|
+
variant: "ghost_icon",
|
|
7464
|
+
onClick: activePage < pages ? event => {
|
|
7465
|
+
onPageChange(event, activePage + 1);
|
|
7466
|
+
} : undefined,
|
|
7467
|
+
"aria-label": "Go to next page",
|
|
7468
|
+
disabled: activePage === pages,
|
|
7469
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
7470
|
+
name: "chevron_right"
|
|
7471
|
+
})
|
|
7472
|
+
})
|
|
7473
|
+
}, "next")]
|
|
7474
|
+
})
|
|
7475
|
+
});
|
|
7476
|
+
|
|
7477
|
+
return withItemIndicator ? /*#__PURE__*/jsxRuntime.jsxs(FlexContainer, {
|
|
7478
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Text, {
|
|
7479
|
+
children: currentItemFirst !== currentItemLast ? `${currentItemFirst}
|
|
7248
7480
|
${' - '}
|
|
7249
7481
|
${currentItemLast}
|
|
7250
7482
|
${' of '}
|
|
7251
7483
|
${totalItems}
|
|
7252
|
-
${' items'}` : `${currentItemFirst} ${' of '} ${totalItems} ${' items'}`
|
|
7484
|
+
${' items'}` : `${currentItemFirst} ${' of '} ${totalItems} ${' items'}`
|
|
7485
|
+
}), pagination]
|
|
7486
|
+
}) : pagination;
|
|
7253
7487
|
});
|
|
7254
7488
|
|
|
7255
7489
|
const {
|
|
@@ -7325,7 +7559,7 @@ const StyledSelect = styled__default['default'].select.withConfig({
|
|
|
7325
7559
|
})(["border:none;border-radius:0;box-shadow:", ";", " ", " padding-right:calc(", " *2 + ", ");display:block;margin:0;appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%236f6f6f' d='M7 9.5l5 5 5-5H7z'/%3E%3C/svg%3E\"),linear-gradient( to bottom,", " 0%,", " 100% );background-repeat:no-repeat,repeat;background-position:right ", " top 50%;width:100%;&:active,&:focus{box-shadow:none;", "}&:disabled{color:", ";background-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23bebebe' d='M7 9.5l5 5 5-5H7z'/%3E%3C/svg%3E\"),linear-gradient( to bottom,", " 0%,", " 100% );cursor:not-allowed;box-shadow:none;outline:none;.arrow-icon{fill:red;}&:focus,&:active{outline:none;}}"], nativeselect.boxShadow, typographyTemplate(nativeselect.typography), ({
|
|
7326
7560
|
theme
|
|
7327
7561
|
}) => styled.css(["height:", ";", ""], theme.minHeight, spacingsTemplate(theme.entities.input.spacings)), nativeselect.entities.input.spacings.right, nativeselect.entities.icon.width, nativeselect.background, nativeselect.background, nativeselect.entities.input.spacings.right, outlineTemplate(nativeselect.states.focus.outline), nativeselect.states.disabled.typography.color, nativeselect.background, nativeselect.background);
|
|
7328
|
-
const NativeSelect = /*#__PURE__*/React
|
|
7562
|
+
const NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect({
|
|
7329
7563
|
label,
|
|
7330
7564
|
children,
|
|
7331
7565
|
className,
|
|
@@ -7359,9 +7593,15 @@ const NativeSelect = /*#__PURE__*/React$1.forwardRef(function NativeSelect({
|
|
|
7359
7593
|
meta
|
|
7360
7594
|
};
|
|
7361
7595
|
const showLabel = label || meta;
|
|
7362
|
-
return /*#__PURE__*/
|
|
7363
|
-
theme: token
|
|
7364
|
-
|
|
7596
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
7597
|
+
theme: token,
|
|
7598
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Container$1, { ...containerProps,
|
|
7599
|
+
children: [showLabel && /*#__PURE__*/jsxRuntime.jsx(Label$1, { ...labelProps
|
|
7600
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledSelect, { ...selectProps,
|
|
7601
|
+
children: children
|
|
7602
|
+
})]
|
|
7603
|
+
})
|
|
7604
|
+
});
|
|
7365
7605
|
});
|
|
7366
7606
|
|
|
7367
7607
|
const {
|
|
@@ -7509,7 +7749,7 @@ const PaddedStyledListItem$1 = styled__default['default'](StyledListItem).withCo
|
|
|
7509
7749
|
})(["", ""], ({
|
|
7510
7750
|
theme
|
|
7511
7751
|
}) => spacingsTemplate(theme.spacings));
|
|
7512
|
-
const SingleSelect = /*#__PURE__*/React
|
|
7752
|
+
const SingleSelect = /*#__PURE__*/React.forwardRef(function SingleSelect({
|
|
7513
7753
|
items = [],
|
|
7514
7754
|
label,
|
|
7515
7755
|
meta,
|
|
@@ -7521,7 +7761,7 @@ const SingleSelect = /*#__PURE__*/React$1.forwardRef(function SingleSelect({
|
|
|
7521
7761
|
handleSelectedItemChange,
|
|
7522
7762
|
...other
|
|
7523
7763
|
}, ref) {
|
|
7524
|
-
const [inputItems, setInputItems] = React
|
|
7764
|
+
const [inputItems, setInputItems] = React.useState(items);
|
|
7525
7765
|
const isControlled = selectedOption !== undefined ? true : false;
|
|
7526
7766
|
const {
|
|
7527
7767
|
density
|
|
@@ -7529,7 +7769,7 @@ const SingleSelect = /*#__PURE__*/React$1.forwardRef(function SingleSelect({
|
|
|
7529
7769
|
const token = useToken({
|
|
7530
7770
|
density
|
|
7531
7771
|
}, select);
|
|
7532
|
-
React
|
|
7772
|
+
React.useEffect(() => {
|
|
7533
7773
|
setInputItems(items);
|
|
7534
7774
|
}, [items]);
|
|
7535
7775
|
let comboboxProps = {
|
|
@@ -7577,51 +7817,61 @@ const SingleSelect = /*#__PURE__*/React$1.forwardRef(function SingleSelect({
|
|
|
7577
7817
|
}
|
|
7578
7818
|
};
|
|
7579
7819
|
|
|
7580
|
-
return /*#__PURE__*/
|
|
7581
|
-
theme: token
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7820
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
7821
|
+
theme: token,
|
|
7822
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
7823
|
+
className: className,
|
|
7824
|
+
ref: ref,
|
|
7825
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Label$1, { ...getLabelProps(),
|
|
7826
|
+
label: label,
|
|
7827
|
+
meta: meta,
|
|
7828
|
+
disabled: disabled
|
|
7829
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(StyledInputWrapper, { ...getComboboxProps(),
|
|
7830
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(PaddedInput, { ...getInputProps({
|
|
7831
|
+
disabled: disabled
|
|
7832
|
+
}),
|
|
7833
|
+
readOnly: readOnly,
|
|
7834
|
+
onFocus: openSelect,
|
|
7835
|
+
onClick: openSelect,
|
|
7836
|
+
...other
|
|
7837
|
+
}), Boolean(inputValue) && /*#__PURE__*/jsxRuntime.jsx(StyledButton, {
|
|
7838
|
+
variant: "ghost_icon",
|
|
7839
|
+
disabled: disabled || readOnly,
|
|
7840
|
+
"aria-label": 'clear options',
|
|
7841
|
+
title: "clear",
|
|
7842
|
+
onClick: reset,
|
|
7843
|
+
style: {
|
|
7844
|
+
right: 32
|
|
7845
|
+
},
|
|
7846
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
7847
|
+
data: edsIcons.close,
|
|
7848
|
+
size: 16
|
|
7849
|
+
})
|
|
7850
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledButton, {
|
|
7851
|
+
variant: "ghost_icon",
|
|
7852
|
+
...getToggleButtonProps({
|
|
7853
|
+
disabled: disabled || readOnly
|
|
7854
|
+
}),
|
|
7855
|
+
"aria-label": 'toggle options',
|
|
7856
|
+
title: "open",
|
|
7857
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
7858
|
+
data: isOpen ? edsIcons.arrow_drop_up : edsIcons.arrow_drop_down
|
|
7859
|
+
})
|
|
7860
|
+
})]
|
|
7861
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledList, { ...getMenuProps(),
|
|
7862
|
+
children: isOpen && inputItems.map((item, index) => /*#__PURE__*/jsxRuntime.jsx(PaddedStyledListItem$1, {
|
|
7863
|
+
highlighted: highlightedIndex === index ? 'true' : 'false',
|
|
7864
|
+
active: selectedItem === item ? 'true' : 'false',
|
|
7865
|
+
...getItemProps({
|
|
7866
|
+
item,
|
|
7867
|
+
index,
|
|
7868
|
+
disabled: disabled
|
|
7869
|
+
}),
|
|
7870
|
+
children: item
|
|
7871
|
+
}, `${item}`))
|
|
7872
|
+
})]
|
|
7873
|
+
})
|
|
7874
|
+
});
|
|
7625
7875
|
});
|
|
7626
7876
|
|
|
7627
7877
|
const {
|
|
@@ -7712,6 +7962,7 @@ const checkbox = {
|
|
|
7712
7962
|
}
|
|
7713
7963
|
};
|
|
7714
7964
|
|
|
7965
|
+
/* eslint camelcase: "off" */
|
|
7715
7966
|
const StyledPath$1 = styled__default['default'].path.attrs(({
|
|
7716
7967
|
icon
|
|
7717
7968
|
}) => ({
|
|
@@ -7759,7 +8010,7 @@ const InputWrapper$1 = styled__default['default'].span.withConfig({
|
|
|
7759
8010
|
}) => spacingsTemplate(theme.spacings), ({
|
|
7760
8011
|
disabled
|
|
7761
8012
|
}) => disabled ? 'transparent' : checkbox.states.hover.background);
|
|
7762
|
-
const CheckboxInput = /*#__PURE__*/React
|
|
8013
|
+
const CheckboxInput = /*#__PURE__*/React.forwardRef(function CheckboxInput({
|
|
7763
8014
|
disabled = false,
|
|
7764
8015
|
indeterminate,
|
|
7765
8016
|
...rest
|
|
@@ -7781,32 +8032,38 @@ const CheckboxInput = /*#__PURE__*/React$1.forwardRef(function CheckboxInput({
|
|
|
7781
8032
|
['data-indeterminate']: indeterminate,
|
|
7782
8033
|
...rest
|
|
7783
8034
|
};
|
|
7784
|
-
return /*#__PURE__*/
|
|
7785
|
-
theme: token
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
8035
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
8036
|
+
theme: token,
|
|
8037
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(InputWrapper$1, { ...inputWrapperProps,
|
|
8038
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input$3, {
|
|
8039
|
+
iconSize: iconSize,
|
|
8040
|
+
...inputProps
|
|
8041
|
+
}), indeterminate ? /*#__PURE__*/jsxRuntime.jsx(Svg$1, {
|
|
8042
|
+
width: iconSize,
|
|
8043
|
+
height: iconSize,
|
|
8044
|
+
viewBox: `0 0 ${iconSize} ${iconSize}`,
|
|
8045
|
+
fill: fill,
|
|
8046
|
+
"aria-hidden": true,
|
|
8047
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledPath$1, {
|
|
8048
|
+
icon: edsIcons.checkbox_indeterminate,
|
|
8049
|
+
name: "indeterminate"
|
|
8050
|
+
})
|
|
8051
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs(Svg$1, {
|
|
8052
|
+
width: iconSize,
|
|
8053
|
+
height: iconSize,
|
|
8054
|
+
viewBox: `0 0 ${iconSize} ${iconSize}`,
|
|
8055
|
+
fill: fill,
|
|
8056
|
+
"aria-hidden": true,
|
|
8057
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(StyledPath$1, {
|
|
8058
|
+
icon: edsIcons.checkbox,
|
|
8059
|
+
name: "checked"
|
|
8060
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledPath$1, {
|
|
8061
|
+
icon: edsIcons.checkbox_outline,
|
|
8062
|
+
name: "not-checked"
|
|
8063
|
+
})]
|
|
8064
|
+
})]
|
|
8065
|
+
})
|
|
8066
|
+
});
|
|
7810
8067
|
});
|
|
7811
8068
|
|
|
7812
8069
|
const PaddedStyledListItem = styled__default['default'](StyledListItem).withConfig({
|
|
@@ -7815,7 +8072,7 @@ const PaddedStyledListItem = styled__default['default'](StyledListItem).withConf
|
|
|
7815
8072
|
})(["display:flex;align-items:center;", ""], ({
|
|
7816
8073
|
theme
|
|
7817
8074
|
}) => spacingsTemplate(theme.spacings));
|
|
7818
|
-
const MultiSelect = /*#__PURE__*/React
|
|
8075
|
+
const MultiSelect = /*#__PURE__*/React.forwardRef(function MultiSelect({
|
|
7819
8076
|
items = [],
|
|
7820
8077
|
initialSelectedItems = [],
|
|
7821
8078
|
label,
|
|
@@ -7828,7 +8085,7 @@ const MultiSelect = /*#__PURE__*/React$1.forwardRef(function MultiSelect({
|
|
|
7828
8085
|
...other
|
|
7829
8086
|
}, ref) {
|
|
7830
8087
|
const isControlled = selectedOptions ? true : false;
|
|
7831
|
-
const [inputValue, setInputValue] = React
|
|
8088
|
+
const [inputValue, setInputValue] = React.useState('');
|
|
7832
8089
|
const {
|
|
7833
8090
|
density
|
|
7834
8091
|
} = useEds();
|
|
@@ -7931,59 +8188,72 @@ const MultiSelect = /*#__PURE__*/React$1.forwardRef(function MultiSelect({
|
|
|
7931
8188
|
}
|
|
7932
8189
|
};
|
|
7933
8190
|
|
|
7934
|
-
return /*#__PURE__*/
|
|
7935
|
-
theme: token
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
8191
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
8192
|
+
theme: token,
|
|
8193
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
8194
|
+
className: className,
|
|
8195
|
+
ref: ref,
|
|
8196
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Label$1, { ...getLabelProps(),
|
|
8197
|
+
label: label,
|
|
8198
|
+
meta: meta,
|
|
8199
|
+
disabled: disabled
|
|
8200
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(StyledInputWrapper, { ...getComboboxProps(),
|
|
8201
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(PaddedInput, { ...getInputProps(getDropdownProps({
|
|
8202
|
+
preventKeyAction: isOpen,
|
|
8203
|
+
disabled: disabled
|
|
8204
|
+
})),
|
|
8205
|
+
placeholder: placeholderText,
|
|
8206
|
+
readOnly: readOnly,
|
|
8207
|
+
onFocus: openSelect,
|
|
8208
|
+
...other
|
|
8209
|
+
}), Boolean(selectedItems.length || inputValue) && /*#__PURE__*/jsxRuntime.jsx(StyledButton, {
|
|
8210
|
+
variant: "ghost_icon",
|
|
8211
|
+
disabled: disabled || readOnly,
|
|
8212
|
+
"aria-label": 'clear options',
|
|
8213
|
+
title: "clear",
|
|
8214
|
+
onClick: reset,
|
|
8215
|
+
style: {
|
|
8216
|
+
right: 32
|
|
8217
|
+
},
|
|
8218
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
8219
|
+
data: edsIcons.close,
|
|
8220
|
+
size: 16
|
|
8221
|
+
})
|
|
8222
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledButton, {
|
|
8223
|
+
variant: "ghost_icon",
|
|
8224
|
+
...getToggleButtonProps({
|
|
8225
|
+
disabled: disabled || readOnly
|
|
8226
|
+
}),
|
|
8227
|
+
"aria-label": 'toggle options',
|
|
8228
|
+
title: "open",
|
|
8229
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
8230
|
+
data: isOpen ? edsIcons.arrow_drop_up : edsIcons.arrow_drop_down
|
|
8231
|
+
})
|
|
8232
|
+
})]
|
|
8233
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledList, { ...getMenuProps(),
|
|
8234
|
+
children: isOpen && getFilteredItems(items).map((item, index) => /*#__PURE__*/jsxRuntime.jsxs(PaddedStyledListItem, {
|
|
8235
|
+
highlighted: highlightedIndex === index ? 'true' : 'false',
|
|
8236
|
+
...getItemProps({
|
|
8237
|
+
item,
|
|
8238
|
+
index,
|
|
8239
|
+
disabled: disabled
|
|
8240
|
+
}),
|
|
8241
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CheckboxInput, {
|
|
8242
|
+
checked: selectedItems.includes(item),
|
|
8243
|
+
value: item,
|
|
8244
|
+
onChange: () => {
|
|
8245
|
+
return null;
|
|
8246
|
+
}
|
|
8247
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8248
|
+
children: item
|
|
8249
|
+
})]
|
|
8250
|
+
}, `${item}`))
|
|
8251
|
+
})]
|
|
8252
|
+
})
|
|
8253
|
+
});
|
|
7985
8254
|
});
|
|
7986
8255
|
|
|
8256
|
+
/* eslint camelcase: "off" */
|
|
7987
8257
|
const StyledLabel$2 = styled__default['default'].label.withConfig({
|
|
7988
8258
|
displayName: "Checkbox__StyledLabel",
|
|
7989
8259
|
componentId: "sc-yg6l8h-0"
|
|
@@ -7994,25 +8264,28 @@ const LabelText$1 = styled__default['default'].span.withConfig({
|
|
|
7994
8264
|
displayName: "Checkbox__LabelText",
|
|
7995
8265
|
componentId: "sc-yg6l8h-1"
|
|
7996
8266
|
})(["", ";"], typographyTemplate(checkbox.typography));
|
|
7997
|
-
const Checkbox = /*#__PURE__*/React
|
|
8267
|
+
const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox({
|
|
7998
8268
|
label,
|
|
7999
8269
|
disabled = false,
|
|
8000
8270
|
indeterminate,
|
|
8001
8271
|
className,
|
|
8002
8272
|
...rest
|
|
8003
8273
|
}, ref) {
|
|
8004
|
-
return label ? /*#__PURE__*/
|
|
8274
|
+
return label ? /*#__PURE__*/jsxRuntime.jsxs(StyledLabel$2, {
|
|
8005
8275
|
disabled: disabled,
|
|
8006
|
-
className: className
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8276
|
+
className: className,
|
|
8277
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CheckboxInput, { ...rest,
|
|
8278
|
+
disabled: disabled,
|
|
8279
|
+
ref: ref,
|
|
8280
|
+
indeterminate: indeterminate
|
|
8281
|
+
}), /*#__PURE__*/jsxRuntime.jsx(LabelText$1, {
|
|
8282
|
+
children: label
|
|
8283
|
+
})]
|
|
8284
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(CheckboxInput, { ...rest,
|
|
8012
8285
|
disabled: disabled,
|
|
8013
8286
|
ref: ref,
|
|
8014
8287
|
indeterminate: indeterminate
|
|
8015
|
-
})
|
|
8288
|
+
});
|
|
8016
8289
|
});
|
|
8017
8290
|
Checkbox.displayName = 'Checkbox';
|
|
8018
8291
|
|
|
@@ -8104,6 +8377,7 @@ const comfortable$1 = {
|
|
|
8104
8377
|
}
|
|
8105
8378
|
};
|
|
8106
8379
|
|
|
8380
|
+
/* eslint camelcase: "off" */
|
|
8107
8381
|
const Input$2 = styled__default['default'].input.attrs(({
|
|
8108
8382
|
type = 'radio'
|
|
8109
8383
|
}) => ({
|
|
@@ -8163,7 +8437,7 @@ const InputWrapper = styled__default['default'].span.withConfig({
|
|
|
8163
8437
|
}) => disabled ? 'not-allowed' : 'pointer', ({
|
|
8164
8438
|
disabled
|
|
8165
8439
|
}) => disabled ? 'transparent' : comfortable$1.states.hover.background);
|
|
8166
|
-
const Radio = /*#__PURE__*/React
|
|
8440
|
+
const Radio = /*#__PURE__*/React.forwardRef(function Radio({
|
|
8167
8441
|
label,
|
|
8168
8442
|
disabled = false,
|
|
8169
8443
|
className,
|
|
@@ -8177,39 +8451,46 @@ const Radio = /*#__PURE__*/React$1.forwardRef(function Radio({
|
|
|
8177
8451
|
}, comfortable$1);
|
|
8178
8452
|
const iconSize = 24;
|
|
8179
8453
|
const fill = disabled ? comfortable$1.states.disabled.background : comfortable$1.background;
|
|
8180
|
-
const renderSVG = React
|
|
8181
|
-
return /*#__PURE__*/
|
|
8454
|
+
const renderSVG = React.useMemo(() => {
|
|
8455
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Svg, {
|
|
8182
8456
|
width: iconSize,
|
|
8183
8457
|
height: iconSize,
|
|
8184
8458
|
viewBox: `0 0 ${iconSize} ${iconSize}`,
|
|
8185
8459
|
fill: fill,
|
|
8186
|
-
"aria-hidden": true
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
|
|
8193
|
-
|
|
8460
|
+
"aria-hidden": true,
|
|
8461
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(StyledPath, {
|
|
8462
|
+
icon: edsIcons.radio_button_selected,
|
|
8463
|
+
name: "selected"
|
|
8464
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledPath, {
|
|
8465
|
+
icon: edsIcons.radio_button_unselected,
|
|
8466
|
+
name: "unselected"
|
|
8467
|
+
})]
|
|
8468
|
+
});
|
|
8194
8469
|
}, [fill]);
|
|
8195
|
-
return /*#__PURE__*/
|
|
8196
|
-
theme: token
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8470
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
8471
|
+
theme: token,
|
|
8472
|
+
children: label ? /*#__PURE__*/jsxRuntime.jsxs(StyledLabel$1, {
|
|
8473
|
+
disabled: disabled,
|
|
8474
|
+
className: className,
|
|
8475
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(InputWrapper, {
|
|
8476
|
+
disabled: disabled,
|
|
8477
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input$2, { ...rest,
|
|
8478
|
+
ref: ref,
|
|
8479
|
+
disabled: disabled,
|
|
8480
|
+
iconSize: iconSize
|
|
8481
|
+
}), renderSVG]
|
|
8482
|
+
}), /*#__PURE__*/jsxRuntime.jsx(LabelText, {
|
|
8483
|
+
children: label
|
|
8484
|
+
})]
|
|
8485
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs(InputWrapper, {
|
|
8486
|
+
disabled: disabled,
|
|
8487
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input$2, { ...rest,
|
|
8488
|
+
ref: ref,
|
|
8489
|
+
disabled: disabled,
|
|
8490
|
+
iconSize: iconSize
|
|
8491
|
+
}), renderSVG]
|
|
8492
|
+
})
|
|
8493
|
+
});
|
|
8213
8494
|
});
|
|
8214
8495
|
Radio.displayName = 'Radio';
|
|
8215
8496
|
|
|
@@ -8278,16 +8559,20 @@ const Handle$1 = styled__default['default'].span.withConfig({
|
|
|
8278
8559
|
}
|
|
8279
8560
|
}
|
|
8280
8561
|
}) => styled.css(["background-color:", ";width:", ";height:", ";border-radius:50%;display:inline-block;position:absolute;top:50%;transform:translate(11%,-50%);left:7px;transition:transform 0.36s cubic-bezier(0.78,0.14,0.15,0.86);"], handle.background, handle.width, handle.height));
|
|
8281
|
-
const SwitchSmall = /*#__PURE__*/React
|
|
8562
|
+
const SwitchSmall = /*#__PURE__*/React.forwardRef(function SwitchSmall({
|
|
8282
8563
|
disabled,
|
|
8283
8564
|
...rest
|
|
8284
8565
|
}, ref) {
|
|
8285
|
-
return /*#__PURE__*/
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8566
|
+
return /*#__PURE__*/jsxRuntime.jsxs(GridWrapper, {
|
|
8567
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input$1, { ...rest,
|
|
8568
|
+
ref: ref,
|
|
8569
|
+
disabled: disabled
|
|
8570
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(BaseInputWrapper, {
|
|
8571
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Track$1, {
|
|
8572
|
+
isDisabled: disabled
|
|
8573
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Handle$1, {})]
|
|
8574
|
+
})]
|
|
8575
|
+
});
|
|
8291
8576
|
});
|
|
8292
8577
|
SwitchSmall.displayName = 'SwitchSmall';
|
|
8293
8578
|
|
|
@@ -8326,18 +8611,22 @@ const Handle = styled__default['default'].span.withConfig({
|
|
|
8326
8611
|
}) => styled.css(["background-color:", ";", " box-shadow:", ";width:", ";height:", ";border-radius:50%;display:inline-block;position:absolute;top:50%;transform:translate(0,-50%);left:4px;transition:transform 0.36s cubic-bezier(0.78,0.14,0.15,0.86);"], handle.background, isDisabled && {
|
|
8327
8612
|
backgroundColor: states.disabled.background
|
|
8328
8613
|
}, handle.boxShadow, handle.width, handle.height));
|
|
8329
|
-
const SwitchDefault = /*#__PURE__*/React
|
|
8614
|
+
const SwitchDefault = /*#__PURE__*/React.forwardRef(function SwitchDefault({
|
|
8330
8615
|
disabled,
|
|
8331
8616
|
...rest
|
|
8332
8617
|
}, ref) {
|
|
8333
|
-
return /*#__PURE__*/
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8618
|
+
return /*#__PURE__*/jsxRuntime.jsxs(GridWrapper, {
|
|
8619
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input, { ...rest,
|
|
8620
|
+
ref: ref,
|
|
8621
|
+
disabled: disabled
|
|
8622
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(BaseInputWrapper, {
|
|
8623
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Track, {
|
|
8624
|
+
isDisabled: disabled
|
|
8625
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Handle, {
|
|
8626
|
+
isDisabled: disabled
|
|
8627
|
+
})]
|
|
8628
|
+
})]
|
|
8629
|
+
});
|
|
8341
8630
|
});
|
|
8342
8631
|
SwitchDefault.displayName = 'SwitchDefault';
|
|
8343
8632
|
|
|
@@ -8518,7 +8807,7 @@ const Label = styled__default['default'].span.withConfig({
|
|
|
8518
8807
|
})(({
|
|
8519
8808
|
theme
|
|
8520
8809
|
}) => styled.css(["", " margin-left:", ";"], typographyTemplate(theme.typography), theme.entities.label.spacings.left));
|
|
8521
|
-
const Switch = /*#__PURE__*/React
|
|
8810
|
+
const Switch = /*#__PURE__*/React.forwardRef(function Switch({
|
|
8522
8811
|
size = 'default',
|
|
8523
8812
|
disabled,
|
|
8524
8813
|
label,
|
|
@@ -8533,28 +8822,32 @@ const Switch = /*#__PURE__*/React$1.forwardRef(function Switch({
|
|
|
8533
8822
|
const token = useToken({
|
|
8534
8823
|
density: overrideDensity
|
|
8535
8824
|
}, comfortable);
|
|
8536
|
-
return /*#__PURE__*/
|
|
8537
|
-
theme: token
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8825
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
8826
|
+
theme: token,
|
|
8827
|
+
children: label ? /*#__PURE__*/jsxRuntime.jsxs(StyledLabel, {
|
|
8828
|
+
isDisabled: disabled,
|
|
8829
|
+
className: className,
|
|
8830
|
+
children: [size === 'small' ? /*#__PURE__*/jsxRuntime.jsx(SwitchSmall, {
|
|
8831
|
+
disabled: disabled,
|
|
8832
|
+
...rest,
|
|
8833
|
+
ref: ref
|
|
8834
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(SwitchDefault, {
|
|
8835
|
+
disabled: disabled,
|
|
8836
|
+
...rest,
|
|
8837
|
+
ref: ref
|
|
8838
|
+
}), label && /*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
8839
|
+
children: label
|
|
8840
|
+
})]
|
|
8841
|
+
}) : size === 'small' ? /*#__PURE__*/jsxRuntime.jsx(SwitchSmall, {
|
|
8842
|
+
disabled: disabled,
|
|
8843
|
+
...rest,
|
|
8844
|
+
ref: ref
|
|
8845
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(SwitchDefault, {
|
|
8846
|
+
disabled: disabled,
|
|
8847
|
+
...rest,
|
|
8848
|
+
ref: ref
|
|
8849
|
+
})
|
|
8850
|
+
});
|
|
8558
8851
|
});
|
|
8559
8852
|
Switch.displayName = 'Switch';
|
|
8560
8853
|
|