@equinor/eds-core-react 0.24.0-dev.20221007 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eds-core-react.cjs.js +1027 -1321
- package/dist/esm/components/Accordion/AccordionHeader.js +10 -5
- package/dist/esm/components/Autocomplete/Autocomplete.js +62 -67
- package/dist/esm/components/Autocomplete/Autocomplete.tokens.js +1 -0
- package/dist/esm/components/Input/Input.js +129 -32
- package/dist/esm/components/Input/Input.tokens.js +84 -56
- package/dist/esm/components/InputWrapper/HelperText/HelperText.js +49 -0
- package/dist/esm/components/InputWrapper/HelperText/HelperText.token.js +28 -0
- package/dist/esm/components/InputWrapper/InputWrapper.js +68 -0
- package/dist/esm/components/InputWrapper/InputWrapper.tokens.js +164 -0
- package/dist/esm/components/Popover/Popover.js +69 -54
- package/dist/esm/components/Popover/Popover.tokens.js +17 -2
- package/dist/esm/components/Search/Search.js +60 -187
- package/dist/esm/components/TextField/TextField.js +52 -46
- package/dist/esm/components/Textarea/Textarea.js +26 -43
- package/dist/esm/components/Tooltip/Tooltip.js +37 -36
- package/dist/esm/index.js +1 -0
- package/dist/types/components/Input/Input.d.ts +22 -15
- package/dist/types/components/InputWrapper/HelperText/HelperText.d.ts +18 -0
- package/dist/types/components/{TextField → InputWrapper}/HelperText/HelperText.token.d.ts +0 -5
- package/dist/types/components/InputWrapper/HelperText/index.d.ts +1 -0
- package/dist/types/components/InputWrapper/InputWrapper.d.ts +41 -0
- package/dist/types/components/InputWrapper/InputWrapper.tokens.d.ts +12 -0
- package/dist/types/components/InputWrapper/index.d.ts +2 -0
- package/dist/types/components/Popover/Popover.d.ts +10 -0
- package/dist/types/components/Search/Search.d.ts +2 -2
- package/dist/types/components/Select/commonStyles.d.ts +1 -7
- package/dist/types/components/TextField/TextField.d.ts +15 -21
- package/dist/types/components/Textarea/Textarea.d.ts +3 -3
- package/dist/types/components/types.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +4 -4
- package/dist/esm/components/Search/Search.tokens.js +0 -83
- package/dist/esm/components/TextField/Field.js +0 -151
- package/dist/esm/components/TextField/HelperText/HelperText.js +0 -89
- package/dist/esm/components/TextField/HelperText/HelperText.token.js +0 -45
- package/dist/esm/components/TextField/Icon/Icon.js +0 -65
- package/dist/esm/components/TextField/Icon/Icon.tokens.js +0 -42
- package/dist/esm/components/TextField/TextField.context.js +0 -48
- package/dist/esm/components/TextField/TextField.tokens.js +0 -120
- package/dist/types/components/Search/Search.tokens.d.ts +0 -4
- package/dist/types/components/TextField/Field.d.ts +0 -34
- package/dist/types/components/TextField/HelperText/HelperText.d.ts +0 -14
- package/dist/types/components/TextField/HelperText/index.d.ts +0 -1
- package/dist/types/components/TextField/Icon/Icon.d.ts +0 -13
- package/dist/types/components/TextField/Icon/Icon.tokens.d.ts +0 -14
- package/dist/types/components/TextField/Icon/index.d.ts +0 -1
- package/dist/types/components/TextField/TextField.context.d.ts +0 -17
- package/dist/types/components/TextField/TextField.tokens.d.ts +0 -10
- package/dist/types/components/TextField/types.d.ts +0 -6
|
@@ -372,10 +372,10 @@ var mergeDeepRight = /*#__PURE__*/_curry2(function mergeDeepRight(lObj, rObj) {
|
|
|
372
372
|
|
|
373
373
|
var mergeDeepRight$1 = mergeDeepRight;
|
|
374
374
|
|
|
375
|
-
var _tokens$colors$
|
|
376
|
-
primaryWhite = _tokens$colors$
|
|
377
|
-
_tokens$colors$intera$j = _tokens$colors$
|
|
378
|
-
primaryColor$
|
|
375
|
+
var _tokens$colors$j = edsTokens.tokens.colors,
|
|
376
|
+
primaryWhite = _tokens$colors$j.text.static_icons__primary_white.rgba,
|
|
377
|
+
_tokens$colors$intera$j = _tokens$colors$j.interactive,
|
|
378
|
+
primaryColor$7 = _tokens$colors$intera$j.primary__resting.rgba,
|
|
379
379
|
primaryHoverColor$2 = _tokens$colors$intera$j.primary__hover.rgba,
|
|
380
380
|
secondaryColor$3 = _tokens$colors$intera$j.secondary__resting.rgba,
|
|
381
381
|
secondaryHoverColor$3 = _tokens$colors$intera$j.secondary__link_hover.rgba,
|
|
@@ -383,7 +383,7 @@ var _tokens$colors$i = edsTokens.tokens.colors,
|
|
|
383
383
|
dangerHoverColor$3 = _tokens$colors$intera$j.danger__hover.rgba,
|
|
384
384
|
buttonBorderRadius$1 = edsTokens.tokens.shape.button.borderRadius;
|
|
385
385
|
var primary$a = mergeDeepRight$1(button, {
|
|
386
|
-
background: primaryColor$
|
|
386
|
+
background: primaryColor$7,
|
|
387
387
|
typography: {
|
|
388
388
|
color: primaryWhite
|
|
389
389
|
},
|
|
@@ -391,7 +391,7 @@ var primary$a = mergeDeepRight$1(button, {
|
|
|
391
391
|
type: 'border',
|
|
392
392
|
style: 'solid',
|
|
393
393
|
width: '1px',
|
|
394
|
-
color: primaryColor$
|
|
394
|
+
color: primaryColor$7,
|
|
395
395
|
radius: "var(--eds_button__radius, ".concat(buttonBorderRadius$1, ")")
|
|
396
396
|
},
|
|
397
397
|
states: {
|
|
@@ -430,7 +430,7 @@ var danger$6 = mergeDeepRight$1(primary$a, {
|
|
|
430
430
|
});
|
|
431
431
|
|
|
432
432
|
var _tokens$colors$intera$i = edsTokens.tokens.colors.interactive,
|
|
433
|
-
primaryColor$
|
|
433
|
+
primaryColor$6 = _tokens$colors$intera$i.primary__resting.rgba,
|
|
434
434
|
primaryHoverColor$1 = _tokens$colors$intera$i.primary__hover.rgba,
|
|
435
435
|
primaryHoverAltColor$2 = _tokens$colors$intera$i.primary__hover_alt.rgba,
|
|
436
436
|
secondaryColor$2 = _tokens$colors$intera$i.secondary__resting.rgba,
|
|
@@ -442,13 +442,13 @@ var _tokens$colors$intera$i = edsTokens.tokens.colors.interactive,
|
|
|
442
442
|
buttonBorderRadius = edsTokens.tokens.shape.button.borderRadius;
|
|
443
443
|
var primary$9 = mergeDeepRight$1(button, {
|
|
444
444
|
typography: {
|
|
445
|
-
color: primaryColor$
|
|
445
|
+
color: primaryColor$6
|
|
446
446
|
},
|
|
447
447
|
border: {
|
|
448
448
|
type: 'border',
|
|
449
449
|
style: 'solid',
|
|
450
450
|
width: '1px',
|
|
451
|
-
color: primaryColor$
|
|
451
|
+
color: primaryColor$6,
|
|
452
452
|
radius: "var(--eds_button__radius, ".concat(buttonBorderRadius, ")")
|
|
453
453
|
},
|
|
454
454
|
states: {
|
|
@@ -509,7 +509,7 @@ var danger$5 = mergeDeepRight$1(primary$9, {
|
|
|
509
509
|
});
|
|
510
510
|
|
|
511
511
|
var _tokens$colors$intera$h = edsTokens.tokens.colors.interactive,
|
|
512
|
-
primaryColor$
|
|
512
|
+
primaryColor$5 = _tokens$colors$intera$h.primary__resting.rgba,
|
|
513
513
|
primaryHoverColor = _tokens$colors$intera$h.primary__hover.rgba,
|
|
514
514
|
primaryHoverAltColor$1 = _tokens$colors$intera$h.primary__hover_alt.rgba,
|
|
515
515
|
secondaryColor$1 = _tokens$colors$intera$h.secondary__resting.rgba,
|
|
@@ -520,7 +520,7 @@ var _tokens$colors$intera$h = edsTokens.tokens.colors.interactive,
|
|
|
520
520
|
dangerHoverAltColor$1 = _tokens$colors$intera$h.danger__highlight.rgba;
|
|
521
521
|
var primary$8 = mergeDeepRight$1(button, {
|
|
522
522
|
typography: {
|
|
523
|
-
color: primaryColor$
|
|
523
|
+
color: primaryColor$5
|
|
524
524
|
},
|
|
525
525
|
states: {
|
|
526
526
|
hover: {
|
|
@@ -565,7 +565,7 @@ var danger$4 = mergeDeepRight$1(primary$8, {
|
|
|
565
565
|
});
|
|
566
566
|
|
|
567
567
|
var _tokens$colors$intera$g = edsTokens.tokens.colors.interactive,
|
|
568
|
-
primaryColor$
|
|
568
|
+
primaryColor$4 = _tokens$colors$intera$g.primary__resting.rgba,
|
|
569
569
|
primaryHoverAltColor = _tokens$colors$intera$g.primary__hover_alt.rgba,
|
|
570
570
|
secondaryColor = _tokens$colors$intera$g.secondary__resting.rgba,
|
|
571
571
|
secondaryHoverColor = _tokens$colors$intera$g.secondary__link_hover.rgba,
|
|
@@ -577,12 +577,12 @@ var _tokens$colors$intera$g = edsTokens.tokens.colors.interactive,
|
|
|
577
577
|
clicboundHeight$1 = _tokens$clickbounds$3.default__base,
|
|
578
578
|
compactClickboundHeight$1 = _tokens$clickbounds$3.compact__standard,
|
|
579
579
|
shape$4 = edsTokens.tokens.shape,
|
|
580
|
-
focusOutlineWidth$
|
|
580
|
+
focusOutlineWidth$9 = edsTokens.tokens.interactions.focused.width;
|
|
581
581
|
var primary$7 = mergeDeepRight$1(button, {
|
|
582
582
|
height: shape$4.icon_button.minHeight,
|
|
583
583
|
width: shape$4.icon_button.minWidth,
|
|
584
584
|
typography: {
|
|
585
|
-
color: primaryColor$
|
|
585
|
+
color: primaryColor$4
|
|
586
586
|
},
|
|
587
587
|
border: {
|
|
588
588
|
width: '0px',
|
|
@@ -616,7 +616,7 @@ var primary$7 = mergeDeepRight$1(button, {
|
|
|
616
616
|
},
|
|
617
617
|
focus: {
|
|
618
618
|
outline: {
|
|
619
|
-
offset: "-".concat(parseInt(focusOutlineWidth$
|
|
619
|
+
offset: "-".concat(parseInt(focusOutlineWidth$9), "px")
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
},
|
|
@@ -755,16 +755,16 @@ var InnerFullWidth = /*#__PURE__*/react.forwardRef(function InnerFullWidth(_ref,
|
|
|
755
755
|
});
|
|
756
756
|
});
|
|
757
757
|
|
|
758
|
-
var initalState$
|
|
758
|
+
var initalState$2 = {
|
|
759
759
|
/** Density for all components inside `EdsProvider` */
|
|
760
760
|
density: 'comfortable'
|
|
761
761
|
};
|
|
762
|
-
var EdsContext = /*#__PURE__*/react.createContext(initalState$
|
|
762
|
+
var EdsContext = /*#__PURE__*/react.createContext(initalState$2);
|
|
763
763
|
var EdsProvider = function EdsProvider(_ref) {
|
|
764
764
|
var children = _ref.children,
|
|
765
765
|
density = _ref.density;
|
|
766
766
|
|
|
767
|
-
var _useState = react.useState(_objectSpread__default["default"](_objectSpread__default["default"]({}, initalState$
|
|
767
|
+
var _useState = react.useState(_objectSpread__default["default"](_objectSpread__default["default"]({}, initalState$2), {}, {
|
|
768
768
|
density: density || 'comfortable'
|
|
769
769
|
})),
|
|
770
770
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
@@ -797,7 +797,7 @@ var useEds = function useEds() {
|
|
|
797
797
|
return react.useContext(EdsContext);
|
|
798
798
|
};
|
|
799
799
|
|
|
800
|
-
var _excluded$
|
|
800
|
+
var _excluded$1n = ["color", "variant", "children", "disabled", "href", "tabIndex", "fullWidth"];
|
|
801
801
|
|
|
802
802
|
var getVariant = function getVariant(tokenSet, variant) {
|
|
803
803
|
switch (variant) {
|
|
@@ -864,7 +864,7 @@ var Button$1 = /*#__PURE__*/react.forwardRef(function Button(_ref2, ref) {
|
|
|
864
864
|
tabIndex = _ref2$tabIndex === void 0 ? 0 : _ref2$tabIndex,
|
|
865
865
|
_ref2$fullWidth = _ref2.fullWidth,
|
|
866
866
|
fullWidth = _ref2$fullWidth === void 0 ? false : _ref2$fullWidth,
|
|
867
|
-
other = _objectWithoutProperties__default["default"](_ref2, _excluded$
|
|
867
|
+
other = _objectWithoutProperties__default["default"](_ref2, _excluded$1n);
|
|
868
868
|
|
|
869
869
|
var _useEds = useEds(),
|
|
870
870
|
density = _useEds.density;
|
|
@@ -905,7 +905,7 @@ var group = {
|
|
|
905
905
|
}
|
|
906
906
|
};
|
|
907
907
|
|
|
908
|
-
var _excluded$
|
|
908
|
+
var _excluded$1m = ["children", "vertical"];
|
|
909
909
|
var border$4 = group.border;
|
|
910
910
|
var radius$1 = border$4.type === 'border' && border$4.radius;
|
|
911
911
|
var ButtonGroupBase = styled__default["default"].div.withConfig({
|
|
@@ -918,7 +918,7 @@ var ButtonGroupBase = styled__default["default"].div.withConfig({
|
|
|
918
918
|
var ButtonGroup = /*#__PURE__*/react.forwardRef(function ButtonGroup(_ref2, ref) {
|
|
919
919
|
var children = _ref2.children,
|
|
920
920
|
vertical = _ref2.vertical,
|
|
921
|
-
rest = _objectWithoutProperties__default["default"](_ref2, _excluded$
|
|
921
|
+
rest = _objectWithoutProperties__default["default"](_ref2, _excluded$1m);
|
|
922
922
|
|
|
923
923
|
var props = _objectSpread__default["default"]({
|
|
924
924
|
ref: ref,
|
|
@@ -932,13 +932,13 @@ var ButtonGroup = /*#__PURE__*/react.forwardRef(function ButtonGroup(_ref2, ref)
|
|
|
932
932
|
}));
|
|
933
933
|
});
|
|
934
934
|
|
|
935
|
-
var _excluded$
|
|
935
|
+
var _excluded$1l = ["children", "multiple", "selectedIndexes", "onChange"];
|
|
936
936
|
var ToggleButton = /*#__PURE__*/react.forwardRef(function ToggleButton(_ref, ref) {
|
|
937
937
|
var children = _ref.children,
|
|
938
938
|
multiple = _ref.multiple,
|
|
939
939
|
selectedIndexes = _ref.selectedIndexes,
|
|
940
940
|
onChange = _ref.onChange,
|
|
941
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded$
|
|
941
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$1l);
|
|
942
942
|
|
|
943
943
|
var _useState = react.useState(selectedIndexes || []),
|
|
944
944
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
@@ -993,11 +993,11 @@ Button.Toggle = ToggleButton;
|
|
|
993
993
|
Button.Group.displayName = 'Button.Group';
|
|
994
994
|
Button.Toggle.displayName = 'Button.Toggle';
|
|
995
995
|
|
|
996
|
-
var typography$
|
|
996
|
+
var typography$h = edsTokens.tokens.typography,
|
|
997
997
|
colorsToken = edsTokens.tokens.colors,
|
|
998
|
-
focusOutlineWidth$
|
|
999
|
-
var heading = typography$
|
|
1000
|
-
paragraph$2 = typography$
|
|
998
|
+
focusOutlineWidth$8 = edsTokens.tokens.interactions.focused.width;
|
|
999
|
+
var heading = typography$h.heading,
|
|
1000
|
+
paragraph$2 = typography$h.paragraph;
|
|
1001
1001
|
var _colorsToken$interact = colorsToken.interactive,
|
|
1002
1002
|
primary$5 = _colorsToken$interact.primary__resting.rgba,
|
|
1003
1003
|
secondary = _colorsToken$interact.secondary__resting.rgba,
|
|
@@ -1006,7 +1006,7 @@ var _colorsToken$interact = colorsToken.interactive,
|
|
|
1006
1006
|
success$2 = _colorsToken$interact.success__resting.rgba,
|
|
1007
1007
|
disabled = _colorsToken$interact.disabled__text.rgba,
|
|
1008
1008
|
focus$1 = _colorsToken$interact.focus.rgba;
|
|
1009
|
-
var colors$
|
|
1009
|
+
var colors$6 = {
|
|
1010
1010
|
primary: primary$5,
|
|
1011
1011
|
secondary: secondary,
|
|
1012
1012
|
danger: danger$1,
|
|
@@ -1021,7 +1021,7 @@ var link = {
|
|
|
1021
1021
|
states: {
|
|
1022
1022
|
focus: {
|
|
1023
1023
|
outline: {
|
|
1024
|
-
width: focusOutlineWidth$
|
|
1024
|
+
width: focusOutlineWidth$8,
|
|
1025
1025
|
color: focus$1,
|
|
1026
1026
|
style: 'dashed',
|
|
1027
1027
|
type: 'outline',
|
|
@@ -1031,7 +1031,7 @@ var link = {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
};
|
|
1033
1033
|
|
|
1034
|
-
var _excluded$
|
|
1034
|
+
var _excluded$1k = ["variant", "children", "bold", "italic", "link", "group", "token", "as"];
|
|
1035
1035
|
|
|
1036
1036
|
var getElementType = function getElementType(variant, link) {
|
|
1037
1037
|
if (link) {
|
|
@@ -1064,12 +1064,12 @@ var findTypography = function findTypography(variantName, group) {
|
|
|
1064
1064
|
return quickVariants[variantName];
|
|
1065
1065
|
}
|
|
1066
1066
|
|
|
1067
|
-
return typography$
|
|
1067
|
+
return typography$h[group][variantName];
|
|
1068
1068
|
};
|
|
1069
1069
|
|
|
1070
1070
|
var findColor = function findColor() {
|
|
1071
1071
|
var inputColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1072
|
-
return typeof colors$
|
|
1072
|
+
return typeof colors$6[inputColor] === 'undefined' ? inputColor : colors$6[inputColor];
|
|
1073
1073
|
};
|
|
1074
1074
|
|
|
1075
1075
|
var toVariantName = function toVariantName(variant) {
|
|
@@ -1110,7 +1110,7 @@ var Typography = /*#__PURE__*/react.forwardRef(function Typography(_ref5, ref) {
|
|
|
1110
1110
|
group = _ref5.group,
|
|
1111
1111
|
token = _ref5.token,
|
|
1112
1112
|
providedAs = _ref5.as,
|
|
1113
|
-
other = _objectWithoutProperties__default["default"](_ref5, _excluded$
|
|
1113
|
+
other = _objectWithoutProperties__default["default"](_ref5, _excluded$1k);
|
|
1114
1114
|
|
|
1115
1115
|
var as = providedAs ? providedAs : getElementType(variant, link);
|
|
1116
1116
|
var variantName = toVariantName(variant, bold, italic, link);
|
|
@@ -1135,10 +1135,10 @@ var _tokens$typography$2 = edsTokens.tokens.typography,
|
|
|
1135
1135
|
cellTypography$1 = _tokens$typography$ta.cell_text,
|
|
1136
1136
|
cellNumericTypography = _tokens$typography$ta.cell_numeric_monospaced,
|
|
1137
1137
|
compactTypography$1 = _tokens$typography$2._modes.compact,
|
|
1138
|
-
_tokens$colors$
|
|
1139
|
-
typographyColor$1 = _tokens$colors$
|
|
1140
|
-
borderColor$4 = _tokens$colors$
|
|
1141
|
-
_tokens$colors$intera$f = _tokens$colors$
|
|
1138
|
+
_tokens$colors$i = edsTokens.tokens.colors,
|
|
1139
|
+
typographyColor$1 = _tokens$colors$i.text.static_icons__default.rgba,
|
|
1140
|
+
borderColor$4 = _tokens$colors$i.ui.background__medium.rgba,
|
|
1141
|
+
_tokens$colors$intera$f = _tokens$colors$i.interactive,
|
|
1142
1142
|
backgroundColor$5 = _tokens$colors$intera$f.table__cell__fill_resting.rgba,
|
|
1143
1143
|
hoverBackgroundColor$3 = _tokens$colors$intera$f.table__cell__fill_hover.rgba,
|
|
1144
1144
|
activeBackgroundColor$2 = _tokens$colors$intera$f.table__cell__fill_activated.rgba,
|
|
@@ -1251,14 +1251,14 @@ var applyVariant = function applyVariant(variant, token) {
|
|
|
1251
1251
|
}
|
|
1252
1252
|
};
|
|
1253
1253
|
|
|
1254
|
-
var _excluded$
|
|
1254
|
+
var _excluded$1j = ["children"];
|
|
1255
1255
|
var TableBase$1 = styled__default["default"].table.withConfig({
|
|
1256
1256
|
displayName: "Table__TableBase",
|
|
1257
1257
|
componentId: "sc-14kktwc-0"
|
|
1258
1258
|
})(["border-spacing:0;background:", ";"], tableCell.background);
|
|
1259
1259
|
var Table$1 = /*#__PURE__*/react.forwardRef(function Table(_ref, ref) {
|
|
1260
1260
|
var children = _ref.children,
|
|
1261
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded$
|
|
1261
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$1j);
|
|
1262
1262
|
|
|
1263
1263
|
return /*#__PURE__*/jsxRuntime.jsx(TableBase$1, _objectSpread__default["default"](_objectSpread__default["default"]({}, props), {}, {
|
|
1264
1264
|
ref: ref,
|
|
@@ -1266,19 +1266,19 @@ var Table$1 = /*#__PURE__*/react.forwardRef(function Table(_ref, ref) {
|
|
|
1266
1266
|
}));
|
|
1267
1267
|
}); // Table.displayName = 'EdsTable'
|
|
1268
1268
|
|
|
1269
|
-
var initalState$
|
|
1269
|
+
var initalState$1 = {
|
|
1270
1270
|
variant: 'body'
|
|
1271
1271
|
};
|
|
1272
|
-
var InnerContext = /*#__PURE__*/react.createContext(initalState$
|
|
1272
|
+
var InnerContext = /*#__PURE__*/react.createContext(initalState$1);
|
|
1273
1273
|
|
|
1274
|
-
var _excluded$
|
|
1274
|
+
var _excluded$1i = ["children"];
|
|
1275
1275
|
var TableBase = styled__default["default"].tbody.withConfig({
|
|
1276
1276
|
displayName: "Body__TableBase",
|
|
1277
1277
|
componentId: "sc-1pdmiku-0"
|
|
1278
1278
|
})([""]);
|
|
1279
1279
|
var Body = /*#__PURE__*/react.forwardRef(function Body(_ref, ref) {
|
|
1280
1280
|
var children = _ref.children,
|
|
1281
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded$
|
|
1281
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$1i);
|
|
1282
1282
|
|
|
1283
1283
|
return /*#__PURE__*/jsxRuntime.jsx(InnerContext.Provider, {
|
|
1284
1284
|
value: {
|
|
@@ -1291,7 +1291,7 @@ var Body = /*#__PURE__*/react.forwardRef(function Body(_ref, ref) {
|
|
|
1291
1291
|
});
|
|
1292
1292
|
});
|
|
1293
1293
|
|
|
1294
|
-
var _excluded$
|
|
1294
|
+
var _excluded$1h = ["children", "variant"];
|
|
1295
1295
|
var StyledTableCell$1 = styled__default["default"].td.withConfig({
|
|
1296
1296
|
displayName: "DataCell__StyledTableCell",
|
|
1297
1297
|
componentId: "sc-15tuitc-0"
|
|
@@ -1313,7 +1313,7 @@ var TableDataCell = /*#__PURE__*/react.forwardRef(function TableDataCell(_ref2,
|
|
|
1313
1313
|
var children = _ref2.children,
|
|
1314
1314
|
_ref2$variant = _ref2.variant,
|
|
1315
1315
|
variant = _ref2$variant === void 0 ? 'text' : _ref2$variant,
|
|
1316
|
-
rest = _objectWithoutProperties__default["default"](_ref2, _excluded$
|
|
1316
|
+
rest = _objectWithoutProperties__default["default"](_ref2, _excluded$1h);
|
|
1317
1317
|
|
|
1318
1318
|
var _useEds = useEds(),
|
|
1319
1319
|
density = _useEds.density;
|
|
@@ -1333,10 +1333,10 @@ var TableDataCell = /*#__PURE__*/react.forwardRef(function TableDataCell(_ref2,
|
|
|
1333
1333
|
var _tokens$typography$1 = edsTokens.tokens.typography,
|
|
1334
1334
|
cellTypography = _tokens$typography$1.table.cell_header,
|
|
1335
1335
|
compactTypography = _tokens$typography$1._modes.compact,
|
|
1336
|
-
_tokens$colors$
|
|
1337
|
-
typographyColor = _tokens$colors$
|
|
1338
|
-
borderColor$3 = _tokens$colors$
|
|
1339
|
-
_tokens$colors$intera$e = _tokens$colors$
|
|
1336
|
+
_tokens$colors$h = edsTokens.tokens.colors,
|
|
1337
|
+
typographyColor = _tokens$colors$h.text.static_icons__default.rgba,
|
|
1338
|
+
borderColor$3 = _tokens$colors$h.ui.background__medium.rgba,
|
|
1339
|
+
_tokens$colors$intera$e = _tokens$colors$h.interactive,
|
|
1340
1340
|
backgroundColor$4 = _tokens$colors$intera$e.table__header__fill_resting.rgba,
|
|
1341
1341
|
hoverBackgroundColor$2 = _tokens$colors$intera$e.table__header__fill_hover.rgba,
|
|
1342
1342
|
activeBackgroundColor$1 = _tokens$colors$intera$e.table__header__fill_activated.rgba,
|
|
@@ -1420,7 +1420,7 @@ var token$4 = {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
};
|
|
1422
1422
|
|
|
1423
|
-
var _excluded$
|
|
1423
|
+
var _excluded$1g = ["children", "sort"];
|
|
1424
1424
|
var StyledTableCell = styled__default["default"].th.withConfig({
|
|
1425
1425
|
displayName: "HeaderCell__StyledTableCell",
|
|
1426
1426
|
componentId: "sc-18w2o3a-0"
|
|
@@ -1453,7 +1453,7 @@ var CellInner = styled__default["default"].div.withConfig({
|
|
|
1453
1453
|
var TableHeaderCell = /*#__PURE__*/react.forwardRef(function TableHeaderCell(_ref, ref) {
|
|
1454
1454
|
var children = _ref.children,
|
|
1455
1455
|
sort = _ref.sort,
|
|
1456
|
-
rest = _objectWithoutProperties__default["default"](_ref, _excluded$
|
|
1456
|
+
rest = _objectWithoutProperties__default["default"](_ref, _excluded$1g);
|
|
1457
1457
|
|
|
1458
1458
|
var _useEds = useEds(),
|
|
1459
1459
|
density = _useEds.density;
|
|
@@ -1499,9 +1499,9 @@ var Cell = /*#__PURE__*/react.forwardRef(function Cell(_ref, ref) {
|
|
|
1499
1499
|
});
|
|
1500
1500
|
});
|
|
1501
1501
|
|
|
1502
|
-
var _tokens$colors$
|
|
1503
|
-
borderColor$2 = _tokens$colors$
|
|
1504
|
-
backgroundColor$3 = _tokens$colors$
|
|
1502
|
+
var _tokens$colors$g = edsTokens.tokens.colors,
|
|
1503
|
+
borderColor$2 = _tokens$colors$g.ui.background__medium.rgba,
|
|
1504
|
+
backgroundColor$3 = _tokens$colors$g.interactive.table__header__fill_resting.rgba;
|
|
1505
1505
|
var token$3 = {
|
|
1506
1506
|
background: backgroundColor$3,
|
|
1507
1507
|
border: {
|
|
@@ -1515,7 +1515,7 @@ var token$3 = {
|
|
|
1515
1515
|
}
|
|
1516
1516
|
};
|
|
1517
1517
|
|
|
1518
|
-
var _excluded$
|
|
1518
|
+
var _excluded$1f = ["children", "sticky"];
|
|
1519
1519
|
var StyledTableHead = styled__default["default"].thead.withConfig({
|
|
1520
1520
|
displayName: "Head__StyledTableHead",
|
|
1521
1521
|
componentId: "sc-g9tch7-0"
|
|
@@ -1523,7 +1523,7 @@ var StyledTableHead = styled__default["default"].thead.withConfig({
|
|
|
1523
1523
|
var Head = /*#__PURE__*/react.forwardRef(function Head(_ref, ref) {
|
|
1524
1524
|
var children = _ref.children,
|
|
1525
1525
|
sticky = _ref.sticky,
|
|
1526
|
-
props = _objectWithoutProperties__default["default"](_ref, _excluded$
|
|
1526
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded$1f);
|
|
1527
1527
|
|
|
1528
1528
|
return /*#__PURE__*/jsxRuntime.jsx(InnerContext.Provider, {
|
|
1529
1529
|
value: {
|
|
@@ -1623,7 +1623,7 @@ var divider$1 = {
|
|
|
1623
1623
|
background: mediumColor
|
|
1624
1624
|
}
|
|
1625
1625
|
};
|
|
1626
|
-
var small$
|
|
1626
|
+
var small$6 = {
|
|
1627
1627
|
spacings: {
|
|
1628
1628
|
top: spacingSmall$5,
|
|
1629
1629
|
bottom: spacingSmall$5
|
|
@@ -1636,14 +1636,14 @@ var medium$3 = {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
};
|
|
1638
1638
|
|
|
1639
|
-
var tokens$
|
|
1639
|
+
var tokens$4 = /*#__PURE__*/Object.freeze({
|
|
1640
1640
|
__proto__: null,
|
|
1641
1641
|
divider: divider$1,
|
|
1642
|
-
small: small$
|
|
1642
|
+
small: small$6,
|
|
1643
1643
|
medium: medium$3
|
|
1644
1644
|
});
|
|
1645
1645
|
|
|
1646
|
-
var _excluded$
|
|
1646
|
+
var _excluded$1e = ["color", "variant", "size"];
|
|
1647
1647
|
var divider = divider$1;
|
|
1648
1648
|
var StyledDivider$3 = styled__default["default"].hr.withConfig({
|
|
1649
1649
|
displayName: "Divider__StyledDivider",
|
|
@@ -1662,14 +1662,14 @@ var Divider = /*#__PURE__*/react.forwardRef(function Divider(_ref2, ref) {
|
|
|
1662
1662
|
variant = _ref2$variant === void 0 ? 'medium' : _ref2$variant,
|
|
1663
1663
|
_ref2$size = _ref2.size,
|
|
1664
1664
|
size = _ref2$size === void 0 ? '1' : _ref2$size,
|
|
1665
|
-
rest = _objectWithoutProperties__default["default"](_ref2, _excluded$
|
|
1665
|
+
rest = _objectWithoutProperties__default["default"](_ref2, _excluded$1e);
|
|
1666
1666
|
|
|
1667
1667
|
var colorValue = color === 'medium' ? 'mediumColor' : color;
|
|
1668
1668
|
|
|
1669
1669
|
var props = _objectSpread__default["default"]({
|
|
1670
1670
|
backgroundColor: divider[colorValue].background,
|
|
1671
|
-
marginTop: tokens$
|
|
1672
|
-
marginBottom: tokens$
|
|
1671
|
+
marginTop: tokens$4[variant].spacings.top,
|
|
1672
|
+
marginBottom: tokens$4[variant].spacings.bottom,
|
|
1673
1673
|
dividerHeight: parseInt(size)
|
|
1674
1674
|
}, rest);
|
|
1675
1675
|
|
|
@@ -1678,90 +1678,184 @@ var Divider = /*#__PURE__*/react.forwardRef(function Divider(_ref2, ref) {
|
|
|
1678
1678
|
}));
|
|
1679
1679
|
});
|
|
1680
1680
|
|
|
1681
|
-
var
|
|
1682
|
-
|
|
1681
|
+
var colors$5 = edsTokens.tokens.colors,
|
|
1682
|
+
comfortable$5 = edsTokens.tokens.spacings.comfortable,
|
|
1683
|
+
typography$g = edsTokens.tokens.typography;
|
|
1684
|
+
var label = {
|
|
1685
|
+
background: colors$5.ui.background__light.rgba,
|
|
1686
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$g.input.label), {}, {
|
|
1687
|
+
color: colors$5.text.static_icons__tertiary.rgba
|
|
1688
|
+
}),
|
|
1689
|
+
spacings: {
|
|
1690
|
+
left: comfortable$5.small,
|
|
1691
|
+
right: comfortable$5.small,
|
|
1692
|
+
top: '6px',
|
|
1693
|
+
bottom: '6px'
|
|
1694
|
+
},
|
|
1695
|
+
states: {
|
|
1696
|
+
disabled: {
|
|
1697
|
+
typography: {
|
|
1698
|
+
color: colors$5.interactive.disabled__text.rgba
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1683
1702
|
};
|
|
1684
|
-
var TextFieldContext = /*#__PURE__*/react.createContext(initalState$1);
|
|
1685
|
-
var TextFieldProvider = function TextFieldProvider(_ref) {
|
|
1686
|
-
var children = _ref.children;
|
|
1687
1703
|
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1704
|
+
var _excluded$1d = ["label", "meta", "disabled"];
|
|
1705
|
+
var LabelBase = styled__default["default"].label.withConfig({
|
|
1706
|
+
displayName: "Label__LabelBase",
|
|
1707
|
+
componentId: "sc-1gi2bcn-0"
|
|
1708
|
+
})(["display:flex;justify-content:space-between;position:relative;", " margin-left:", ";margin-right:", ";color:", ";"], edsUtils.typographyTemplate(label.typography), label.spacings.left, label.spacings.right, function (_ref) {
|
|
1709
|
+
var disabledText = _ref.disabledText;
|
|
1710
|
+
return disabledText ? label.states.disabled.typography.color : label.typography.color;
|
|
1711
|
+
});
|
|
1712
|
+
var Text$2 = styled__default["default"].span.withConfig({
|
|
1713
|
+
displayName: "Label__Text",
|
|
1714
|
+
componentId: "sc-1gi2bcn-1"
|
|
1715
|
+
})(["margin:0;"]);
|
|
1716
|
+
var Label$2 = /*#__PURE__*/react.forwardRef(function Label(props, ref) {
|
|
1717
|
+
var _props$label = props.label,
|
|
1718
|
+
label = _props$label === void 0 ? '' : _props$label,
|
|
1719
|
+
meta = props.meta,
|
|
1720
|
+
_props$disabled = props.disabled,
|
|
1721
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1722
|
+
other = _objectWithoutProperties__default["default"](props, _excluded$1d);
|
|
1692
1723
|
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
return _objectSpread__default["default"](_objectSpread__default["default"]({}, prevState), {}, {
|
|
1696
|
-
isFocused: true
|
|
1697
|
-
});
|
|
1698
|
-
});
|
|
1699
|
-
};
|
|
1724
|
+
return (
|
|
1725
|
+
/*#__PURE__*/
|
|
1700
1726
|
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1727
|
+
/* @TODO: Other props spread has to be at the end for downshift to create the for attribute */
|
|
1728
|
+
jsxRuntime.jsxs(LabelBase, _objectSpread__default["default"](_objectSpread__default["default"]({
|
|
1729
|
+
ref: ref,
|
|
1730
|
+
disabledText: disabled
|
|
1731
|
+
}, other), {}, {
|
|
1732
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Text$2, {
|
|
1733
|
+
children: label
|
|
1734
|
+
}), meta && /*#__PURE__*/jsxRuntime.jsx(Text$2, {
|
|
1735
|
+
children: meta
|
|
1736
|
+
})]
|
|
1737
|
+
}))
|
|
1738
|
+
);
|
|
1739
|
+
}); // Label.displayName = 'eds-text-field-label'
|
|
1708
1740
|
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1741
|
+
var colors$4 = edsTokens.tokens.colors,
|
|
1742
|
+
comfortable$4 = edsTokens.tokens.spacings.comfortable,
|
|
1743
|
+
typography$f = edsTokens.tokens.typography;
|
|
1744
|
+
var helperText = {
|
|
1745
|
+
background: colors$4.ui.background__light.hex,
|
|
1746
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$f.input.helper), {}, {
|
|
1747
|
+
color: colors$4.text.static_icons__tertiary.rgba
|
|
1748
|
+
}),
|
|
1749
|
+
spacings: {
|
|
1750
|
+
comfortable: {
|
|
1751
|
+
left: comfortable$4.small,
|
|
1752
|
+
right: comfortable$4.small,
|
|
1753
|
+
top: comfortable$4.small,
|
|
1754
|
+
bottom: '6px'
|
|
1755
|
+
},
|
|
1756
|
+
compact: {
|
|
1757
|
+
left: comfortable$4.small,
|
|
1758
|
+
right: comfortable$4.small,
|
|
1759
|
+
top: comfortable$4.xx_small,
|
|
1760
|
+
bottom: '6px'
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1721
1763
|
};
|
|
1722
1764
|
|
|
1723
|
-
var
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1765
|
+
var _excluded$1c = ["text", "icon", "color"];
|
|
1766
|
+
var Container$5 = styled__default["default"].div.withConfig({
|
|
1767
|
+
displayName: "HelperText__Container",
|
|
1768
|
+
componentId: "sc-189ug61-0"
|
|
1769
|
+
})(function (_ref) {
|
|
1770
|
+
var color = _ref.color;
|
|
1771
|
+
return styled.css({
|
|
1772
|
+
display: 'grid',
|
|
1773
|
+
gap: '8px',
|
|
1774
|
+
gridAutoFlow: 'column',
|
|
1775
|
+
alignItems: 'start',
|
|
1776
|
+
justifyContent: 'start',
|
|
1777
|
+
color: color
|
|
1778
|
+
});
|
|
1779
|
+
});
|
|
1780
|
+
var Text$1 = styled__default["default"].p.withConfig({
|
|
1781
|
+
displayName: "HelperText__Text",
|
|
1782
|
+
componentId: "sc-189ug61-1"
|
|
1783
|
+
})(["margin:0;", ";"], edsUtils.typographyMixin(helperText.typography));
|
|
1784
|
+
var TextfieldHelperText = /*#__PURE__*/react.forwardRef(function TextfieldHelperText(_ref2, ref) {
|
|
1785
|
+
var text = _ref2.text,
|
|
1786
|
+
icon = _ref2.icon,
|
|
1787
|
+
_ref2$color = _ref2.color,
|
|
1788
|
+
color = _ref2$color === void 0 ? helperText.typography.color : _ref2$color,
|
|
1789
|
+
rest = _objectWithoutProperties__default["default"](_ref2, _excluded$1c);
|
|
1790
|
+
|
|
1791
|
+
if (!text) {
|
|
1792
|
+
return null;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Container$5, _objectSpread__default["default"](_objectSpread__default["default"]({}, _objectSpread__default["default"](_objectSpread__default["default"]({}, rest), {}, {
|
|
1796
|
+
color: color,
|
|
1797
|
+
ref: ref
|
|
1798
|
+
})), {}, {
|
|
1799
|
+
children: [icon, /*#__PURE__*/jsxRuntime.jsx(Text$1, {
|
|
1800
|
+
children: text
|
|
1801
|
+
})]
|
|
1802
|
+
}));
|
|
1803
|
+
});
|
|
1804
|
+
|
|
1805
|
+
var _tokens$colors$f = edsTokens.tokens.colors,
|
|
1806
|
+
background$d = _tokens$colors$f.ui.background__light.rgba,
|
|
1807
|
+
_tokens$colors$text$1 = _tokens$colors$f.text,
|
|
1808
|
+
static_icons__default$1 = _tokens$colors$text$1.static_icons__default,
|
|
1809
|
+
static_icons__tertiary$1 = _tokens$colors$text$1.static_icons__tertiary,
|
|
1810
|
+
_tokens$colors$intera$c = _tokens$colors$f.interactive,
|
|
1811
|
+
disabled__text$1 = _tokens$colors$intera$c.disabled__text,
|
|
1812
|
+
primary__resting$1 = _tokens$colors$intera$c.primary__resting,
|
|
1813
|
+
danger__resting$1 = _tokens$colors$intera$c.danger__resting,
|
|
1814
|
+
danger__hover$1 = _tokens$colors$intera$c.danger__hover,
|
|
1815
|
+
warning__resting$1 = _tokens$colors$intera$c.warning__resting,
|
|
1816
|
+
warning__hover$1 = _tokens$colors$intera$c.warning__hover,
|
|
1817
|
+
success__resting$1 = _tokens$colors$intera$c.success__resting,
|
|
1818
|
+
success__hover$1 = _tokens$colors$intera$c.success__hover,
|
|
1737
1819
|
_tokens$spacings$comf$d = edsTokens.tokens.spacings.comfortable,
|
|
1738
|
-
small$
|
|
1820
|
+
small$5 = _tokens$spacings$comf$d.small,
|
|
1739
1821
|
x_small$5 = _tokens$spacings$comf$d.x_small,
|
|
1740
|
-
typography$
|
|
1822
|
+
typography$e = edsTokens.tokens.typography,
|
|
1741
1823
|
shape$2 = edsTokens.tokens.shape;
|
|
1742
1824
|
var input$2 = {
|
|
1743
1825
|
minHeight: shape$2.straight.minHeight,
|
|
1744
1826
|
background: background$d,
|
|
1745
1827
|
spacings: {
|
|
1746
|
-
left: small$
|
|
1747
|
-
right: small$
|
|
1828
|
+
left: small$5,
|
|
1829
|
+
right: small$5,
|
|
1748
1830
|
top: '6px',
|
|
1749
1831
|
bottom: '6px'
|
|
1750
1832
|
},
|
|
1751
|
-
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$
|
|
1752
|
-
color: static_icons__default.rgba
|
|
1833
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$e.input.text), {}, {
|
|
1834
|
+
color: static_icons__default$1.rgba
|
|
1753
1835
|
}),
|
|
1754
1836
|
entities: {
|
|
1755
1837
|
placeholder: {
|
|
1756
1838
|
typography: {
|
|
1757
|
-
color: static_icons__tertiary.rgba
|
|
1839
|
+
color: static_icons__tertiary$1.rgba
|
|
1840
|
+
}
|
|
1841
|
+
},
|
|
1842
|
+
helperText: {
|
|
1843
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$e.input.label), {}, {
|
|
1844
|
+
color: static_icons__tertiary$1.rgba
|
|
1845
|
+
}),
|
|
1846
|
+
states: {
|
|
1847
|
+
disabled: {
|
|
1848
|
+
typography: {
|
|
1849
|
+
color: disabled__text$1.rgba
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1758
1852
|
}
|
|
1759
1853
|
}
|
|
1760
1854
|
},
|
|
1761
1855
|
states: {
|
|
1762
1856
|
disabled: {
|
|
1763
1857
|
typography: {
|
|
1764
|
-
color: disabled__text.rgba
|
|
1858
|
+
color: disabled__text$1.rgba
|
|
1765
1859
|
}
|
|
1766
1860
|
},
|
|
1767
1861
|
readOnly: {
|
|
@@ -1781,13 +1875,13 @@ var input$2 = {
|
|
|
1781
1875
|
outline: {
|
|
1782
1876
|
type: 'outline',
|
|
1783
1877
|
width: '2px',
|
|
1784
|
-
color: primary__resting.rgba,
|
|
1878
|
+
color: primary__resting$1.rgba,
|
|
1785
1879
|
style: 'solid',
|
|
1786
1880
|
offset: '0px'
|
|
1787
1881
|
}
|
|
1788
1882
|
}
|
|
1789
1883
|
},
|
|
1790
|
-
boxShadow: 'inset 0px -1px 0px 0px ' + static_icons__tertiary.rgba,
|
|
1884
|
+
boxShadow: 'inset 0px -1px 0px 0px ' + static_icons__tertiary$1.rgba,
|
|
1791
1885
|
modes: {
|
|
1792
1886
|
compact: {
|
|
1793
1887
|
minHeight: shape$2._modes.compact.straight.minHeight,
|
|
@@ -1801,279 +1895,215 @@ var input$2 = {
|
|
|
1801
1895
|
}
|
|
1802
1896
|
};
|
|
1803
1897
|
var error$4 = mergeDeepRight$1(input$2, {
|
|
1804
|
-
boxShadow: '
|
|
1898
|
+
boxShadow: 'none',
|
|
1899
|
+
outline: {
|
|
1900
|
+
color: danger__resting$1.rgba
|
|
1901
|
+
},
|
|
1805
1902
|
states: {
|
|
1806
|
-
active: {
|
|
1807
|
-
outline: {
|
|
1808
|
-
type: 'outline',
|
|
1809
|
-
color: danger__resting.rgba,
|
|
1810
|
-
width: '1px',
|
|
1811
|
-
style: 'solid',
|
|
1812
|
-
offset: '0px'
|
|
1813
|
-
}
|
|
1814
|
-
},
|
|
1815
1903
|
focus: {
|
|
1816
1904
|
outline: {
|
|
1817
|
-
|
|
1818
|
-
width: '2px',
|
|
1819
|
-
color: danger__hover.rgba,
|
|
1820
|
-
style: 'solid',
|
|
1821
|
-
offset: '0px'
|
|
1905
|
+
color: danger__hover$1.rgba
|
|
1822
1906
|
}
|
|
1823
1907
|
}
|
|
1908
|
+
},
|
|
1909
|
+
entities: {
|
|
1910
|
+
helperText: {
|
|
1911
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$e.input.label), {}, {
|
|
1912
|
+
color: danger__hover$1.rgba
|
|
1913
|
+
})
|
|
1914
|
+
}
|
|
1824
1915
|
}
|
|
1825
1916
|
});
|
|
1826
1917
|
var warning$4 = mergeDeepRight$1(input$2, {
|
|
1827
|
-
boxShadow: '
|
|
1918
|
+
boxShadow: 'none',
|
|
1919
|
+
outline: {
|
|
1920
|
+
color: warning__resting$1.rgba
|
|
1921
|
+
},
|
|
1828
1922
|
states: {
|
|
1829
|
-
active: {
|
|
1830
|
-
outline: {
|
|
1831
|
-
type: 'outline',
|
|
1832
|
-
color: warning__resting.rgba,
|
|
1833
|
-
width: '1px',
|
|
1834
|
-
style: 'solid',
|
|
1835
|
-
offset: '0px'
|
|
1836
|
-
}
|
|
1837
|
-
},
|
|
1838
1923
|
focus: {
|
|
1839
1924
|
outline: {
|
|
1840
|
-
|
|
1841
|
-
width: '2px',
|
|
1842
|
-
color: warning__hover.rgba,
|
|
1843
|
-
style: 'solid',
|
|
1844
|
-
offset: '0px'
|
|
1925
|
+
color: warning__hover$1.rgba
|
|
1845
1926
|
}
|
|
1846
1927
|
}
|
|
1928
|
+
},
|
|
1929
|
+
entities: {
|
|
1930
|
+
helperText: {
|
|
1931
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$e.input.label), {}, {
|
|
1932
|
+
color: warning__hover$1.rgba
|
|
1933
|
+
})
|
|
1934
|
+
}
|
|
1847
1935
|
}
|
|
1848
1936
|
});
|
|
1849
1937
|
var success$1 = mergeDeepRight$1(input$2, {
|
|
1850
|
-
boxShadow: '
|
|
1938
|
+
boxShadow: 'none',
|
|
1939
|
+
outline: {
|
|
1940
|
+
color: success__resting$1.rgba
|
|
1941
|
+
},
|
|
1851
1942
|
states: {
|
|
1852
|
-
active: {
|
|
1853
|
-
outline: {
|
|
1854
|
-
type: 'outline',
|
|
1855
|
-
color: success__resting.rgba,
|
|
1856
|
-
width: '1px',
|
|
1857
|
-
style: 'solid',
|
|
1858
|
-
offset: '0px'
|
|
1859
|
-
}
|
|
1860
|
-
},
|
|
1861
1943
|
focus: {
|
|
1862
1944
|
outline: {
|
|
1863
|
-
|
|
1864
|
-
width: '2px',
|
|
1865
|
-
color: success__hover.rgba,
|
|
1866
|
-
style: 'solid',
|
|
1867
|
-
offset: '0px'
|
|
1945
|
+
color: success__hover$1.rgba
|
|
1868
1946
|
}
|
|
1869
1947
|
}
|
|
1948
|
+
},
|
|
1949
|
+
entities: {
|
|
1950
|
+
helperText: {
|
|
1951
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$e.input.label), {}, {
|
|
1952
|
+
color: success__hover$1.rgba
|
|
1953
|
+
})
|
|
1954
|
+
}
|
|
1870
1955
|
}
|
|
1871
1956
|
});
|
|
1872
|
-
var inputToken = {
|
|
1957
|
+
var inputToken$1 = {
|
|
1873
1958
|
input: input$2,
|
|
1874
1959
|
error: error$4,
|
|
1875
1960
|
warning: warning$4,
|
|
1876
1961
|
success: success$1
|
|
1877
1962
|
};
|
|
1878
1963
|
|
|
1879
|
-
var
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
var
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
variant = _ref2$variant === void 0 ? 'default' : _ref2$variant,
|
|
1905
|
-
_ref2$disabled = _ref2.disabled,
|
|
1906
|
-
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
1907
|
-
_ref2$type = _ref2.type,
|
|
1908
|
-
type = _ref2$type === void 0 ? 'text' : _ref2$type,
|
|
1909
|
-
other = _objectWithoutProperties__default["default"](_ref2, _excluded$1e);
|
|
1910
|
-
|
|
1911
|
-
var actualVariant = variant === 'default' ? 'input' : variant;
|
|
1912
|
-
var inputVariant = inputToken[actualVariant];
|
|
1964
|
+
var _excluded$1b = ["children", "color", "label", "labelProps", "helperProps", "helperIcon"];
|
|
1965
|
+
var Container$4 = styled__default["default"].div.withConfig({
|
|
1966
|
+
displayName: "InputWrapper__Container",
|
|
1967
|
+
componentId: "sc-v6o9z1-0"
|
|
1968
|
+
})([""]);
|
|
1969
|
+
var HelperText = styled__default["default"](TextfieldHelperText).withConfig({
|
|
1970
|
+
displayName: "InputWrapper__HelperText",
|
|
1971
|
+
componentId: "sc-v6o9z1-1"
|
|
1972
|
+
})(["margin-top:8px;margin-left:8px;"]);
|
|
1973
|
+
var Label$1 = styled__default["default"](Label$2).withConfig({
|
|
1974
|
+
displayName: "InputWrapper__Label",
|
|
1975
|
+
componentId: "sc-v6o9z1-2"
|
|
1976
|
+
})(["margin-left:8px;margin-right:8px;"]);
|
|
1977
|
+
|
|
1978
|
+
/** InputWrapper is a internal skeleton component for structuring input elements */
|
|
1979
|
+
var InputWrapper$2 = /*#__PURE__*/react.forwardRef(function InputWrapper(_ref, ref) {
|
|
1980
|
+
var children = _ref.children,
|
|
1981
|
+
color = _ref.color,
|
|
1982
|
+
label = _ref.label,
|
|
1983
|
+
_ref$labelProps = _ref.labelProps,
|
|
1984
|
+
labelProps = _ref$labelProps === void 0 ? {} : _ref$labelProps,
|
|
1985
|
+
_ref$helperProps = _ref.helperProps,
|
|
1986
|
+
helperProps = _ref$helperProps === void 0 ? {} : _ref$helperProps,
|
|
1987
|
+
helperIcon = _ref.helperIcon,
|
|
1988
|
+
other = _objectWithoutProperties__default["default"](_ref, _excluded$1b);
|
|
1913
1989
|
|
|
1914
1990
|
var _useEds = useEds(),
|
|
1915
1991
|
density = _useEds.density;
|
|
1916
1992
|
|
|
1993
|
+
var actualVariant = color || 'input';
|
|
1994
|
+
var inputToken = inputToken$1[actualVariant];
|
|
1917
1995
|
var token = edsUtils.useToken({
|
|
1918
1996
|
density: density
|
|
1919
|
-
},
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1997
|
+
}, inputToken);
|
|
1998
|
+
var helperTextColor = react.useCallback(function () {
|
|
1999
|
+
var _token = token();
|
|
2000
|
+
|
|
2001
|
+
return other.disabled ? _token.entities.helperText.states.disabled.typography.color : _token.entities.helperText.typography.color;
|
|
2002
|
+
}, [token, other.disabled])();
|
|
2003
|
+
var hasHelperText = Boolean(helperProps === null || helperProps === void 0 ? void 0 : helperProps.text);
|
|
2004
|
+
var hasLabel = Boolean(label || (labelProps === null || labelProps === void 0 ? void 0 : labelProps.label));
|
|
1927
2005
|
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
1928
2006
|
theme: token,
|
|
1929
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
2007
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Container$4, _objectSpread__default["default"](_objectSpread__default["default"]({}, other), {}, {
|
|
2008
|
+
ref: ref,
|
|
2009
|
+
children: [hasLabel && /*#__PURE__*/jsxRuntime.jsx(Label$1, _objectSpread__default["default"]({}, _objectSpread__default["default"]({
|
|
2010
|
+
label: label
|
|
2011
|
+
}, labelProps))), children, hasHelperText && /*#__PURE__*/jsxRuntime.jsx(HelperText, _objectSpread__default["default"]({
|
|
2012
|
+
color: helperTextColor
|
|
2013
|
+
}, _objectSpread__default["default"]({
|
|
2014
|
+
icon: helperIcon
|
|
2015
|
+
}, helperProps)))]
|
|
2016
|
+
}))
|
|
1930
2017
|
});
|
|
1931
2018
|
});
|
|
1932
2019
|
|
|
1933
|
-
var colors$
|
|
1934
|
-
|
|
2020
|
+
var _tokens$colors$e = edsTokens.tokens.colors,
|
|
2021
|
+
background$c = _tokens$colors$e.ui.background__light.rgba,
|
|
2022
|
+
_tokens$colors$text = _tokens$colors$e.text,
|
|
2023
|
+
static_icons__default = _tokens$colors$text.static_icons__default,
|
|
2024
|
+
static_icons__tertiary = _tokens$colors$text.static_icons__tertiary,
|
|
2025
|
+
_tokens$colors$intera$b = _tokens$colors$e.interactive,
|
|
2026
|
+
disabled__text = _tokens$colors$intera$b.disabled__text,
|
|
2027
|
+
primary__resting = _tokens$colors$intera$b.primary__resting,
|
|
2028
|
+
danger__resting = _tokens$colors$intera$b.danger__resting,
|
|
2029
|
+
danger__hover = _tokens$colors$intera$b.danger__hover,
|
|
2030
|
+
warning__resting = _tokens$colors$intera$b.warning__resting,
|
|
2031
|
+
warning__hover = _tokens$colors$intera$b.warning__hover,
|
|
2032
|
+
success__resting = _tokens$colors$intera$b.success__resting,
|
|
2033
|
+
success__hover = _tokens$colors$intera$b.success__hover,
|
|
2034
|
+
_tokens$spacings$comf$c = edsTokens.tokens.spacings.comfortable,
|
|
2035
|
+
small$4 = _tokens$spacings$comf$c.small,
|
|
2036
|
+
x_small$4 = _tokens$spacings$comf$c.x_small,
|
|
2037
|
+
typography$d = edsTokens.tokens.typography,
|
|
2038
|
+
shape$1 = edsTokens.tokens.shape;
|
|
1935
2039
|
var input$1 = {
|
|
2040
|
+
height: shape$1.straight.minHeight,
|
|
2041
|
+
width: '100%',
|
|
2042
|
+
background: background$c,
|
|
1936
2043
|
spacings: {
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
bottom: '10px'
|
|
1942
|
-
},
|
|
1943
|
-
compact: {
|
|
1944
|
-
left: comfortable$6.small,
|
|
1945
|
-
right: comfortable$6.small,
|
|
1946
|
-
top: '10px',
|
|
1947
|
-
bottom: '10px'
|
|
1948
|
-
}
|
|
1949
|
-
},
|
|
1950
|
-
"default": {
|
|
1951
|
-
color: colors$7.text.static_icons__tertiary.hex,
|
|
1952
|
-
disabledColor: colors$7.interactive.disabled__fill.hex,
|
|
1953
|
-
focusColor: colors$7.interactive.primary__resting.hex
|
|
1954
|
-
},
|
|
1955
|
-
error: {
|
|
1956
|
-
color: colors$7.interactive.danger__resting.hex,
|
|
1957
|
-
disabledColor: colors$7.interactive.disabled__fill.hex,
|
|
1958
|
-
focusColor: colors$7.interactive.danger__hover.hex
|
|
1959
|
-
},
|
|
1960
|
-
warning: {
|
|
1961
|
-
color: colors$7.interactive.warning__resting.hex,
|
|
1962
|
-
disabledColor: colors$7.interactive.disabled__fill.hex,
|
|
1963
|
-
focusColor: colors$7.interactive.warning__hover.hex
|
|
2044
|
+
left: small$4,
|
|
2045
|
+
right: small$4,
|
|
2046
|
+
top: '6px',
|
|
2047
|
+
bottom: '6px'
|
|
1964
2048
|
},
|
|
1965
|
-
|
|
1966
|
-
color:
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
var _excluded$1d = ["size", "variant", "isDisabled", "colors", "children"];
|
|
1973
|
-
var StyledIcon$2 = styled__default["default"].div.withConfig({
|
|
1974
|
-
displayName: "Icon__StyledIcon",
|
|
1975
|
-
componentId: "sc-jr0rqa-0"
|
|
1976
|
-
})(function (_ref) {
|
|
1977
|
-
var colors = _ref.colors,
|
|
1978
|
-
isDisabled = _ref.isDisabled,
|
|
1979
|
-
isFocused = _ref.isFocused,
|
|
1980
|
-
size = _ref.size;
|
|
1981
|
-
var focusColor = colors.focusColor,
|
|
1982
|
-
color = colors.color,
|
|
1983
|
-
disabledColor = colors.disabledColor;
|
|
1984
|
-
var fill = color;
|
|
1985
|
-
|
|
1986
|
-
if (isDisabled) {
|
|
1987
|
-
fill = disabledColor;
|
|
1988
|
-
}
|
|
1989
|
-
|
|
1990
|
-
if (isFocused) {
|
|
1991
|
-
fill = focusColor;
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
return styled.css(["&,svg{fill:", ";width:", "px;height:", "px;}"], fill, size, size);
|
|
1995
|
-
});
|
|
1996
|
-
var InputIcon = /*#__PURE__*/react.forwardRef(function InputIcon(_ref2, ref) {
|
|
1997
|
-
var _ref2$size = _ref2.size,
|
|
1998
|
-
size = _ref2$size === void 0 ? 24 : _ref2$size,
|
|
1999
|
-
_ref2$variant = _ref2.variant,
|
|
2000
|
-
variant = _ref2$variant === void 0 ? 'default' : _ref2$variant,
|
|
2001
|
-
_ref2$isDisabled = _ref2.isDisabled,
|
|
2002
|
-
isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled,
|
|
2003
|
-
_ref2$colors = _ref2.colors,
|
|
2004
|
-
colors = _ref2$colors === void 0 ? {
|
|
2005
|
-
color: input$1[variant].color,
|
|
2006
|
-
disabledColor: input$1[variant].disabledColor,
|
|
2007
|
-
focusColor: input$1[variant].focusColor
|
|
2008
|
-
} : _ref2$colors,
|
|
2009
|
-
children = _ref2.children,
|
|
2010
|
-
other = _objectWithoutProperties__default["default"](_ref2, _excluded$1d);
|
|
2011
|
-
|
|
2012
|
-
var _useTextField = useTextField(),
|
|
2013
|
-
isFocused = _useTextField.isFocused;
|
|
2014
|
-
|
|
2015
|
-
var iconProps = {
|
|
2016
|
-
isDisabled: isDisabled,
|
|
2017
|
-
colors: colors,
|
|
2018
|
-
isFocused: isFocused,
|
|
2019
|
-
size: size
|
|
2020
|
-
};
|
|
2021
|
-
return /*#__PURE__*/jsxRuntime.jsx(StyledIcon$2, _objectSpread__default["default"](_objectSpread__default["default"](_objectSpread__default["default"]({
|
|
2022
|
-
ref: ref
|
|
2023
|
-
}, iconProps), other), {}, {
|
|
2024
|
-
children: children
|
|
2025
|
-
}));
|
|
2026
|
-
});
|
|
2027
|
-
|
|
2028
|
-
var colors$6 = edsTokens.tokens.colors,
|
|
2029
|
-
typography$g = edsTokens.tokens.typography,
|
|
2030
|
-
_tokens$spacings$comf$c = edsTokens.tokens.spacings.comfortable,
|
|
2031
|
-
small$5 = _tokens$spacings$comf$c.small,
|
|
2032
|
-
x_small$4 = _tokens$spacings$comf$c.x_small;
|
|
2033
|
-
var textfield$1 = {
|
|
2034
|
-
background: colors$6.ui.background__light.hex,
|
|
2035
|
-
border: {
|
|
2036
|
-
type: 'border',
|
|
2037
|
-
radius: 0,
|
|
2049
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$d.input.text), {}, {
|
|
2050
|
+
color: static_icons__default.rgba
|
|
2051
|
+
}),
|
|
2052
|
+
outline: {
|
|
2053
|
+
type: 'outline',
|
|
2054
|
+
color: 'transparent',
|
|
2038
2055
|
width: '1px',
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
spacings: {
|
|
2042
|
-
left: small$5,
|
|
2043
|
-
right: small$5,
|
|
2044
|
-
top: small$5
|
|
2056
|
+
style: 'solid',
|
|
2057
|
+
offset: '0px'
|
|
2045
2058
|
},
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
color: colors$6.interactive.primary__resting.hex,
|
|
2051
|
-
style: 'solid',
|
|
2052
|
-
type: 'outline',
|
|
2053
|
-
offset: '0px'
|
|
2059
|
+
entities: {
|
|
2060
|
+
placeholder: {
|
|
2061
|
+
typography: {
|
|
2062
|
+
color: static_icons__tertiary.rgba
|
|
2054
2063
|
}
|
|
2055
2064
|
},
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
}
|
|
2060
|
-
},
|
|
2061
|
-
entities: {
|
|
2062
|
-
unit: {
|
|
2063
|
-
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$g.input.label), {}, {
|
|
2064
|
-
color: colors$6.text.static_icons__tertiary.hex
|
|
2065
|
+
adornment: {
|
|
2066
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$d.input.label), {}, {
|
|
2067
|
+
color: static_icons__tertiary.rgba
|
|
2065
2068
|
}),
|
|
2069
|
+
spacings: {
|
|
2070
|
+
left: small$4,
|
|
2071
|
+
right: small$4
|
|
2072
|
+
},
|
|
2066
2073
|
states: {
|
|
2067
2074
|
disabled: {
|
|
2068
2075
|
typography: {
|
|
2069
|
-
color:
|
|
2076
|
+
color: disabled__text.rgba
|
|
2070
2077
|
}
|
|
2071
2078
|
}
|
|
2072
2079
|
}
|
|
2073
2080
|
}
|
|
2074
2081
|
},
|
|
2082
|
+
states: {
|
|
2083
|
+
disabled: {
|
|
2084
|
+
typography: {
|
|
2085
|
+
color: disabled__text.rgba
|
|
2086
|
+
}
|
|
2087
|
+
},
|
|
2088
|
+
readOnly: {
|
|
2089
|
+
background: 'transparent',
|
|
2090
|
+
boxShadow: 'none'
|
|
2091
|
+
},
|
|
2092
|
+
active: {},
|
|
2093
|
+
focus: {
|
|
2094
|
+
outline: {
|
|
2095
|
+
type: 'outline',
|
|
2096
|
+
width: '2px',
|
|
2097
|
+
color: primary__resting.rgba,
|
|
2098
|
+
style: 'solid',
|
|
2099
|
+
offset: '0px'
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
},
|
|
2103
|
+
boxShadow: 'inset 0px -1px 0px 0px ' + static_icons__tertiary.rgba,
|
|
2075
2104
|
modes: {
|
|
2076
2105
|
compact: {
|
|
2106
|
+
height: shape$1._modes.compact.straight.minHeight,
|
|
2077
2107
|
spacings: {
|
|
2078
2108
|
left: x_small$4,
|
|
2079
2109
|
right: x_small$4,
|
|
@@ -2083,472 +2113,316 @@ var textfield$1 = {
|
|
|
2083
2113
|
}
|
|
2084
2114
|
}
|
|
2085
2115
|
};
|
|
2086
|
-
var error$3 = {
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
width: '1px',
|
|
2091
|
-
color: colors$6.interactive.danger__resting.hex
|
|
2116
|
+
var error$3 = mergeDeepRight$1(input$1, {
|
|
2117
|
+
boxShadow: 'none',
|
|
2118
|
+
outline: {
|
|
2119
|
+
color: danger__resting.rgba
|
|
2092
2120
|
},
|
|
2093
2121
|
states: {
|
|
2094
2122
|
focus: {
|
|
2095
2123
|
outline: {
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2124
|
+
color: danger__hover.rgba
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
},
|
|
2128
|
+
entities: {
|
|
2129
|
+
adornment: {
|
|
2130
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$d.input.label), {}, {
|
|
2131
|
+
color: danger__resting.rgba
|
|
2132
|
+
}),
|
|
2133
|
+
states: {
|
|
2134
|
+
focus: {
|
|
2135
|
+
outline: {
|
|
2136
|
+
color: danger__hover.rgba
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2101
2139
|
}
|
|
2102
2140
|
}
|
|
2103
2141
|
}
|
|
2104
|
-
};
|
|
2105
|
-
var warning$3 = {
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
width: '1px',
|
|
2110
|
-
color: colors$6.interactive.warning__resting.hex
|
|
2142
|
+
});
|
|
2143
|
+
var warning$3 = mergeDeepRight$1(input$1, {
|
|
2144
|
+
boxShadow: 'none',
|
|
2145
|
+
outline: {
|
|
2146
|
+
color: warning__resting.rgba
|
|
2111
2147
|
},
|
|
2112
2148
|
states: {
|
|
2113
2149
|
focus: {
|
|
2114
2150
|
outline: {
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2151
|
+
color: warning__hover.rgba
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
},
|
|
2155
|
+
entities: {
|
|
2156
|
+
adornment: {
|
|
2157
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$d.input.label), {}, {
|
|
2158
|
+
color: warning__resting.rgba
|
|
2159
|
+
}),
|
|
2160
|
+
states: {
|
|
2161
|
+
focus: {
|
|
2162
|
+
outline: {
|
|
2163
|
+
color: warning__hover.rgba
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2120
2166
|
}
|
|
2121
2167
|
}
|
|
2122
2168
|
}
|
|
2123
|
-
};
|
|
2124
|
-
var success = {
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
width: '1px',
|
|
2129
|
-
color: colors$6.interactive.success__resting.hex
|
|
2169
|
+
});
|
|
2170
|
+
var success = mergeDeepRight$1(input$1, {
|
|
2171
|
+
boxShadow: 'none',
|
|
2172
|
+
outline: {
|
|
2173
|
+
color: success__resting.rgba
|
|
2130
2174
|
},
|
|
2131
2175
|
states: {
|
|
2132
2176
|
focus: {
|
|
2133
2177
|
outline: {
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2178
|
+
color: success__hover.rgba
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
},
|
|
2182
|
+
entities: {
|
|
2183
|
+
adornment: {
|
|
2184
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$d.input.label), {}, {
|
|
2185
|
+
color: success__resting.rgba
|
|
2186
|
+
}),
|
|
2187
|
+
states: {
|
|
2188
|
+
focus: {
|
|
2189
|
+
outline: {
|
|
2190
|
+
color: success__hover.rgba
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2139
2193
|
}
|
|
2140
2194
|
}
|
|
2141
2195
|
}
|
|
2196
|
+
});
|
|
2197
|
+
var inputToken = {
|
|
2198
|
+
input: input$1,
|
|
2199
|
+
error: error$3,
|
|
2200
|
+
warning: warning$3,
|
|
2201
|
+
success: success
|
|
2142
2202
|
};
|
|
2143
2203
|
|
|
2144
2204
|
var tokens$3 = /*#__PURE__*/Object.freeze({
|
|
2145
2205
|
__proto__: null,
|
|
2146
|
-
|
|
2206
|
+
input: input$1,
|
|
2147
2207
|
error: error$3,
|
|
2148
2208
|
warning: warning$3,
|
|
2149
|
-
success: success
|
|
2209
|
+
success: success,
|
|
2210
|
+
inputToken: inputToken
|
|
2150
2211
|
});
|
|
2151
2212
|
|
|
2152
|
-
var _excluded$
|
|
2153
|
-
var
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
density = _ref.density;
|
|
2159
|
-
|
|
2160
|
-
if (!variant) {
|
|
2161
|
-
return "";
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
var _token$states = token.states,
|
|
2165
|
-
focusOutline = _token$states.focus.outline,
|
|
2166
|
-
activeOutline = _token$states.active.outline,
|
|
2167
|
-
boxShadow = token.boxShadow;
|
|
2168
|
-
var spacings = input.spacings;
|
|
2169
|
-
|
|
2170
|
-
if (density === 'compact') {
|
|
2171
|
-
spacings = input.modes.compact.spacings;
|
|
2172
|
-
}
|
|
2173
|
-
|
|
2174
|
-
return styled.css(["border:none;", " ", " box-shadow:", ";&:active,&:focus{outline-offset:0;box-shadow:none;", "}&:disabled{cursor:not-allowed;box-shadow:none;outline:none;&:focus,&:active{outline:none;}}"], edsUtils.spacingsTemplate(spacings), edsUtils.outlineTemplate(activeOutline), boxShadow, edsUtils.outlineTemplate(focusOutline));
|
|
2175
|
-
};
|
|
2176
|
-
|
|
2177
|
-
var StyledTextarea = styled__default["default"].textarea.withConfig({
|
|
2178
|
-
displayName: "Textarea__StyledTextarea",
|
|
2179
|
-
componentId: "sc-2yjdcc-0"
|
|
2180
|
-
})(["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, edsUtils.typographyTemplate(input.typography), Variation$2, input.entities.placeholder.typography.color, input.states.disabled.typography.color, input.states.readOnly.boxShadow, input.states.readOnly.background);
|
|
2181
|
-
var Textarea = /*#__PURE__*/react.forwardRef(function Textarea(_ref2, ref) {
|
|
2182
|
-
var _ref2$variant = _ref2.variant,
|
|
2183
|
-
variant = _ref2$variant === void 0 ? 'default' : _ref2$variant,
|
|
2184
|
-
_ref2$disabled = _ref2.disabled,
|
|
2185
|
-
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
2186
|
-
_ref2$type = _ref2.type,
|
|
2187
|
-
type = _ref2$type === void 0 ? 'text' : _ref2$type,
|
|
2188
|
-
rowsMax = _ref2.rowsMax,
|
|
2189
|
-
other = _objectWithoutProperties__default["default"](_ref2, _excluded$1c);
|
|
2190
|
-
|
|
2191
|
-
var actualVariant = variant === 'default' ? 'input' : variant;
|
|
2192
|
-
var inputVariant = tokens$4[actualVariant];
|
|
2193
|
-
|
|
2194
|
-
var _useState = react.useState(null),
|
|
2195
|
-
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
2196
|
-
textareaEl = _useState2[0],
|
|
2197
|
-
setTextareaEl = _useState2[1];
|
|
2198
|
-
|
|
2199
|
-
var _useEds = useEds(),
|
|
2200
|
-
density = _useEds.density;
|
|
2201
|
-
|
|
2202
|
-
var spacings = density === 'compact' ? input.modes.compact.spacings : input.spacings;
|
|
2203
|
-
var lineHeight = input$2.typography.lineHeight;
|
|
2204
|
-
var top = spacings.top,
|
|
2205
|
-
bottom = spacings.bottom;
|
|
2206
|
-
var fontSize = 16;
|
|
2207
|
-
|
|
2208
|
-
if (textareaEl) {
|
|
2209
|
-
fontSize = parseInt(window.getComputedStyle(textareaEl).fontSize);
|
|
2210
|
-
}
|
|
2211
|
-
|
|
2212
|
-
var padding = parseInt(top) + parseInt(bottom);
|
|
2213
|
-
var maxHeight = parseFloat(lineHeight) * fontSize * rowsMax + padding;
|
|
2214
|
-
edsUtils.useAutoResize(textareaEl, rowsMax ? maxHeight : null);
|
|
2215
|
-
var combinedRef = react.useMemo(function () {
|
|
2216
|
-
return edsUtils.mergeRefs(ref, setTextareaEl);
|
|
2217
|
-
}, [setTextareaEl, ref]);
|
|
2218
|
-
|
|
2219
|
-
var inputProps = _objectSpread__default["default"]({
|
|
2220
|
-
ref: combinedRef,
|
|
2221
|
-
type: type,
|
|
2222
|
-
disabled: disabled,
|
|
2223
|
-
variant: variant,
|
|
2224
|
-
token: inputVariant,
|
|
2225
|
-
density: density
|
|
2226
|
-
}, other);
|
|
2213
|
+
var _excluded$1a = ["variant", "disabled", "type", "leftAdornments", "rightAdornments", "readOnly", "className", "style", "leftAdornmentsProps", "rightAdornmentsProps", "leftAdornmentsWidth", "rightAdornmentsWidth"];
|
|
2214
|
+
var Container$3 = styled__default["default"].div.withConfig({
|
|
2215
|
+
displayName: "Input__Container",
|
|
2216
|
+
componentId: "sc-1ykv024-0"
|
|
2217
|
+
})(function (_ref) {
|
|
2218
|
+
var _entities$adornment, _entities$adornment$s;
|
|
2227
2219
|
|
|
2228
|
-
|
|
2220
|
+
var token = _ref.token,
|
|
2221
|
+
disabled = _ref.disabled,
|
|
2222
|
+
readOnly = _ref.readOnly;
|
|
2223
|
+
var states = token.states,
|
|
2224
|
+
entities = token.entities;
|
|
2225
|
+
return styled.css(["--eds-input-adornment-color:", ";--eds-input-color:", ";position:relative;height:", ";width:", ";display:flex;flex-direction:row;border:none;box-sizing:border-box;box-shadow:", ";background:", ";", " &:focus-within{--eds-input-adornment-color:", ";box-shadow:none;", "}", " ", ""], entities.adornment.typography.color, token.typography.color, token.height, token.width, token.boxShadow, token.background, edsUtils.outlineTemplate(token.outline), (_entities$adornment = entities.adornment) === null || _entities$adornment === void 0 ? void 0 : (_entities$adornment$s = _entities$adornment.states.focus) === null || _entities$adornment$s === void 0 ? void 0 : _entities$adornment$s.outline.color, edsUtils.outlineTemplate(states.focus.outline), disabled && styled.css(["--eds-input-adornment-color:", ";--eds-input-color:", ";cursor:not-allowed;box-shadow:none;"], states.disabled.typography.color, states.disabled.typography.color), readOnly && styled.css({
|
|
2226
|
+
background: states.readOnly.background,
|
|
2227
|
+
boxShadow: states.readOnly.boxShadow
|
|
2228
|
+
}));
|
|
2229
2229
|
});
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
var Variation$1 = function Variation(_ref) {
|
|
2235
|
-
var _token$border, _token$border2, _token$border3, _token$border4;
|
|
2236
|
-
|
|
2237
|
-
var variant = _ref.variant,
|
|
2238
|
-
isFocused = _ref.isFocused,
|
|
2239
|
-
token = _ref.token;
|
|
2240
|
-
|
|
2241
|
-
if (!variant) {
|
|
2242
|
-
return "";
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
return styled.css(["box-shadow:", ";", ""], isFocused ? "none" : variant === 'default' ? "inset 0 -1px 0 0 ".concat(((_token$border = token.border) === null || _token$border === void 0 ? void 0 : _token$border.type) === 'border' && ((_token$border2 = token.border) === null || _token$border2 === void 0 ? void 0 : _token$border2.color)) : "0 0 0 1px ".concat(((_token$border3 = token.border) === null || _token$border3 === void 0 ? void 0 : _token$border3.type) === 'border' && ((_token$border4 = token.border) === null || _token$border4 === void 0 ? void 0 : _token$border4.color)), isFocused && edsUtils.outlineTemplate(token.states.focus.outline));
|
|
2246
|
-
};
|
|
2247
|
-
|
|
2248
|
-
var StrippedInput = styled__default["default"](Input$4).withConfig({
|
|
2249
|
-
displayName: "Field__StrippedInput",
|
|
2250
|
-
componentId: "sc-455b88-0"
|
|
2251
|
-
})(["outline:none;&:active,&:focus{outline:none;box-shadow:none;}"]);
|
|
2252
|
-
var StrippedTextarea = styled__default["default"](Textarea).withConfig({
|
|
2253
|
-
displayName: "Field__StrippedTextarea",
|
|
2254
|
-
componentId: "sc-455b88-1"
|
|
2255
|
-
})(["outline:none;&:active,&:focus{outline:none;box-shadow:none;}"]);
|
|
2256
|
-
var InputWrapper$2 = styled__default["default"].div.withConfig({
|
|
2257
|
-
displayName: "Field__InputWrapper",
|
|
2258
|
-
componentId: "sc-455b88-2"
|
|
2230
|
+
var StyledInput = styled__default["default"].input.withConfig({
|
|
2231
|
+
displayName: "Input__StyledInput",
|
|
2232
|
+
componentId: "sc-1ykv024-1"
|
|
2259
2233
|
})(function (_ref2) {
|
|
2260
|
-
var
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
multiline = _ref2.multiline,
|
|
2265
|
-
variant = _ref2.variant;
|
|
2266
|
-
return styled.css(["", " ", " ", " ", " ", ""], Variation$1, (inputIcon || unit) && styled.css(["display:flex;align-items:center;background:", ";padding-right:", ";"], textfield.background, textfield.spacings.right), isReadOnly && styled.css(["box-shadow:", ";background:", ";"], textfield.states.readOnly.boxShadow, textfield.states.readOnly.background), isDisabled && styled.css(["box-shadow:none;cursor:not-allowed;outline:none;"]), multiline && variant === 'default' && !inputIcon && !unit && styled.css(["box-shadow:none;"]));
|
|
2267
|
-
});
|
|
2268
|
-
var Unit = styled__default["default"].span.withConfig({
|
|
2269
|
-
displayName: "Field__Unit",
|
|
2270
|
-
componentId: "sc-455b88-3"
|
|
2271
|
-
})(["", ";display:inline-block;margin-top:3px;", ""], edsUtils.typographyTemplate(textfield.entities.unit.typography), function (_ref3) {
|
|
2272
|
-
var isDisabled = _ref3.isDisabled;
|
|
2273
|
-
return isDisabled && {
|
|
2274
|
-
color: textfield.entities.unit.states.disabled.typography.color
|
|
2275
|
-
};
|
|
2234
|
+
var token = _ref2.token,
|
|
2235
|
+
paddingLeft = _ref2.paddingLeft,
|
|
2236
|
+
paddingRight = _ref2.paddingRight;
|
|
2237
|
+
return styled.css(["width:100%;border:none;background:transparent;", " ", " outline:none;padding-left:", ";padding-right:", ";&::placeholder{color:", ";}&:disabled{color:var(--eds-input-color);cursor:not-allowed;}"], edsUtils.spacingsTemplate(token.spacings), edsUtils.typographyMixin(token.typography), paddingLeft, paddingRight, token.entities.placeholder.typography.color);
|
|
2276
2238
|
});
|
|
2277
2239
|
var Adornments = styled__default["default"].div.withConfig({
|
|
2278
|
-
displayName: "
|
|
2279
|
-
componentId: "sc-
|
|
2280
|
-
})(
|
|
2281
|
-
var
|
|
2282
|
-
|
|
2283
|
-
return multiline && {
|
|
2284
|
-
marginTop: theme.spacings.top,
|
|
2285
|
-
alignSelf: 'start'
|
|
2286
|
-
};
|
|
2240
|
+
displayName: "Input__Adornments",
|
|
2241
|
+
componentId: "sc-1ykv024-2"
|
|
2242
|
+
})(function (_ref3) {
|
|
2243
|
+
var token = _ref3.token;
|
|
2244
|
+
return styled.css(["position:absolute;top:", ";bottom:", ";display:flex;align-items:center;", " color:var(--eds-input-adornment-color);"], token.spacings.top, token.spacings.bottom, edsUtils.typographyMixin(token.entities.adornment.typography));
|
|
2287
2245
|
});
|
|
2288
|
-
var
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2246
|
+
var LeftAdornments = styled__default["default"](Adornments).withConfig({
|
|
2247
|
+
displayName: "Input__LeftAdornments",
|
|
2248
|
+
componentId: "sc-1ykv024-3"
|
|
2249
|
+
})(function (_ref4) {
|
|
2250
|
+
var token = _ref4.token;
|
|
2251
|
+
return styled.css(["left:0;padding-left:", ";"], token.entities.adornment.spacings.left);
|
|
2252
|
+
});
|
|
2253
|
+
var RightAdornments = styled__default["default"](Adornments).withConfig({
|
|
2254
|
+
displayName: "Input__RightAdornments",
|
|
2255
|
+
componentId: "sc-1ykv024-4"
|
|
2256
|
+
})(function (_ref5) {
|
|
2257
|
+
var token = _ref5.token;
|
|
2258
|
+
return styled.css(["right:0;padding-right:", ";"], token.entities.adornment.spacings.right);
|
|
2259
|
+
});
|
|
2260
|
+
var Input$4 = /*#__PURE__*/react.forwardRef(function Input(_ref6, ref) {
|
|
2261
|
+
var variant = _ref6.variant,
|
|
2262
|
+
_ref6$disabled = _ref6.disabled,
|
|
2263
|
+
disabled = _ref6$disabled === void 0 ? false : _ref6$disabled,
|
|
2264
|
+
_ref6$type = _ref6.type,
|
|
2265
|
+
type = _ref6$type === void 0 ? 'text' : _ref6$type,
|
|
2266
|
+
leftAdornments = _ref6.leftAdornments,
|
|
2267
|
+
rightAdornments = _ref6.rightAdornments,
|
|
2268
|
+
readOnly = _ref6.readOnly,
|
|
2269
|
+
className = _ref6.className,
|
|
2270
|
+
style = _ref6.style,
|
|
2271
|
+
leftAdornmentsProps = _ref6.leftAdornmentsProps,
|
|
2272
|
+
rightAdornmentsProps = _ref6.rightAdornmentsProps,
|
|
2273
|
+
leftAdornmentsWidth = _ref6.leftAdornmentsWidth,
|
|
2274
|
+
rightAdornmentsWidth = _ref6.rightAdornmentsWidth,
|
|
2275
|
+
other = _objectWithoutProperties__default["default"](_ref6, _excluded$1a);
|
|
2276
|
+
|
|
2277
|
+
var inputVariant = inputToken[variant] ? inputToken[variant] : inputToken.input;
|
|
2305
2278
|
|
|
2306
2279
|
var _useEds = useEds(),
|
|
2307
2280
|
density = _useEds.density;
|
|
2308
2281
|
|
|
2309
|
-
var
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
var isError = actualVariant === 'error';
|
|
2282
|
+
var _token = edsUtils.useToken({
|
|
2283
|
+
density: density
|
|
2284
|
+
}, inputVariant)();
|
|
2313
2285
|
|
|
2314
|
-
var
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2286
|
+
var _useState = react.useState(),
|
|
2287
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
2288
|
+
rightAdornmentsRef = _useState2[0],
|
|
2289
|
+
setRightAdornmentsRef = _useState2[1];
|
|
2318
2290
|
|
|
2319
|
-
var
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2291
|
+
var _useState3 = react.useState(),
|
|
2292
|
+
_useState4 = _slicedToArray__default["default"](_useState3, 2),
|
|
2293
|
+
leftAdornmentsRef = _useState4[0],
|
|
2294
|
+
setLeftAdornmentsRef = _useState4[1];
|
|
2323
2295
|
|
|
2324
|
-
var
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2296
|
+
var token = react.useCallback(function () {
|
|
2297
|
+
var _leftAdornmentsWidth = leftAdornmentsWidth || (leftAdornmentsRef ? leftAdornmentsRef.clientWidth : 0);
|
|
2298
|
+
|
|
2299
|
+
var _rightAdornmentsWidth = rightAdornmentsWidth || (rightAdornmentsRef ? rightAdornmentsRef.clientWidth : 0);
|
|
2300
|
+
|
|
2301
|
+
return _objectSpread__default["default"](_objectSpread__default["default"]({}, _token), {}, {
|
|
2302
|
+
spacings: _objectSpread__default["default"](_objectSpread__default["default"]({}, _token.spacings), {}, {
|
|
2303
|
+
left: "".concat(_leftAdornmentsWidth + parseInt(_token.spacings.left), "px"),
|
|
2304
|
+
right: "".concat(_rightAdornmentsWidth + parseInt(_token.spacings.right), "px")
|
|
2305
|
+
})
|
|
2306
|
+
});
|
|
2307
|
+
}, [leftAdornmentsWidth, leftAdornmentsRef, rightAdornmentsWidth, rightAdornmentsRef, _token])();
|
|
2334
2308
|
|
|
2335
2309
|
var inputProps = _objectSpread__default["default"]({
|
|
2336
2310
|
ref: ref,
|
|
2337
|
-
'aria-invalid': isError,
|
|
2338
2311
|
type: type,
|
|
2339
2312
|
disabled: disabled,
|
|
2340
2313
|
readOnly: readOnly,
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2314
|
+
token: token,
|
|
2315
|
+
style: {
|
|
2316
|
+
resize: 'none'
|
|
2317
|
+
}
|
|
2344
2318
|
}, other);
|
|
2345
2319
|
|
|
2346
|
-
var
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
multiline: multiline,
|
|
2354
|
-
children: [unit && /*#__PURE__*/jsxRuntime.jsx(Unit, {
|
|
2355
|
-
isDisabled: disabled,
|
|
2356
|
-
children: unit
|
|
2357
|
-
}), inputIcon && /*#__PURE__*/jsxRuntime.jsx(InputIcon, {
|
|
2358
|
-
isDisabled: disabled,
|
|
2359
|
-
variant: variant,
|
|
2360
|
-
size: iconSize,
|
|
2361
|
-
children: inputIcon
|
|
2362
|
-
})]
|
|
2363
|
-
})]
|
|
2364
|
-
}));
|
|
2365
|
-
});
|
|
2320
|
+
var containerProps = {
|
|
2321
|
+
disabled: disabled,
|
|
2322
|
+
readOnly: readOnly,
|
|
2323
|
+
className: className,
|
|
2324
|
+
style: style,
|
|
2325
|
+
token: token
|
|
2326
|
+
};
|
|
2366
2327
|
|
|
2367
|
-
var
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
background: colors$5.ui.background__light.rgba,
|
|
2372
|
-
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$f.input.label), {}, {
|
|
2373
|
-
color: colors$5.text.static_icons__tertiary.rgba
|
|
2374
|
-
}),
|
|
2375
|
-
spacings: {
|
|
2376
|
-
left: comfortable$5.small,
|
|
2377
|
-
right: comfortable$5.small,
|
|
2378
|
-
top: '6px',
|
|
2379
|
-
bottom: '6px'
|
|
2380
|
-
},
|
|
2381
|
-
states: {
|
|
2382
|
-
disabled: {
|
|
2383
|
-
typography: {
|
|
2384
|
-
color: colors$5.interactive.disabled__text.rgba
|
|
2385
|
-
}
|
|
2386
|
-
}
|
|
2387
|
-
}
|
|
2388
|
-
};
|
|
2328
|
+
var _leftAdornmentProps = _objectSpread__default["default"](_objectSpread__default["default"]({}, leftAdornmentsProps), {}, {
|
|
2329
|
+
ref: setLeftAdornmentsRef,
|
|
2330
|
+
token: token
|
|
2331
|
+
});
|
|
2389
2332
|
|
|
2390
|
-
var
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
})(["display:flex;justify-content:space-between;position:relative;", " margin-left:", ";margin-right:", ";color:", ";"], edsUtils.typographyTemplate(label.typography), label.spacings.left, label.spacings.right, function (_ref) {
|
|
2395
|
-
var disabledText = _ref.disabledText;
|
|
2396
|
-
return disabledText ? label.states.disabled.typography.color : label.typography.color;
|
|
2397
|
-
});
|
|
2398
|
-
var Text$2 = styled__default["default"].span.withConfig({
|
|
2399
|
-
displayName: "Label__Text",
|
|
2400
|
-
componentId: "sc-1gi2bcn-1"
|
|
2401
|
-
})(["margin:0;"]);
|
|
2402
|
-
var Label$1 = /*#__PURE__*/react.forwardRef(function Label(props, ref) {
|
|
2403
|
-
var _props$label = props.label,
|
|
2404
|
-
label = _props$label === void 0 ? '' : _props$label,
|
|
2405
|
-
meta = props.meta,
|
|
2406
|
-
_props$disabled = props.disabled,
|
|
2407
|
-
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
2408
|
-
other = _objectWithoutProperties__default["default"](props, _excluded$1a);
|
|
2333
|
+
var _rightAdornmentProps = _objectSpread__default["default"](_objectSpread__default["default"]({}, rightAdornmentsProps), {}, {
|
|
2334
|
+
ref: setRightAdornmentsRef,
|
|
2335
|
+
token: token
|
|
2336
|
+
});
|
|
2409
2337
|
|
|
2410
2338
|
return (
|
|
2411
2339
|
/*#__PURE__*/
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
})]
|
|
2340
|
+
// Not using <ThemeProvider> because of cascading styling messing with adornments
|
|
2341
|
+
jsxRuntime.jsxs(Container$3, _objectSpread__default["default"](_objectSpread__default["default"]({}, containerProps), {}, {
|
|
2342
|
+
children: [leftAdornments ? /*#__PURE__*/jsxRuntime.jsx(LeftAdornments, _objectSpread__default["default"](_objectSpread__default["default"]({}, _leftAdornmentProps), {}, {
|
|
2343
|
+
children: leftAdornments
|
|
2344
|
+
})) : null, /*#__PURE__*/jsxRuntime.jsx(StyledInput, _objectSpread__default["default"]({
|
|
2345
|
+
paddingLeft: token.spacings.left,
|
|
2346
|
+
paddingRight: token.spacings.right
|
|
2347
|
+
}, inputProps)), rightAdornments ? /*#__PURE__*/jsxRuntime.jsx(RightAdornments, _objectSpread__default["default"](_objectSpread__default["default"]({}, _rightAdornmentProps), {}, {
|
|
2348
|
+
children: rightAdornments
|
|
2349
|
+
})) : null]
|
|
2423
2350
|
}))
|
|
2424
2351
|
);
|
|
2425
|
-
});
|
|
2352
|
+
});
|
|
2426
2353
|
|
|
2427
|
-
var
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
var
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
top: comfortable$4.small,
|
|
2438
|
-
bottom: '6px'
|
|
2439
|
-
},
|
|
2440
|
-
compact: {
|
|
2441
|
-
left: comfortable$4.small,
|
|
2442
|
-
right: comfortable$4.small,
|
|
2443
|
-
top: comfortable$4.xx_small,
|
|
2444
|
-
bottom: '6px'
|
|
2445
|
-
}
|
|
2446
|
-
},
|
|
2447
|
-
"default": {
|
|
2448
|
-
color: colors$4.text.static_icons__tertiary.hex,
|
|
2449
|
-
disabledColor: colors$4.interactive.disabled__text.hex,
|
|
2450
|
-
focusColor: colors$4.text.static_icons__tertiary.hex
|
|
2451
|
-
},
|
|
2452
|
-
error: {
|
|
2453
|
-
color: colors$4.interactive.danger__text.hex,
|
|
2454
|
-
disabledColor: colors$4.interactive.disabled__text.hex,
|
|
2455
|
-
focusColor: colors$4.interactive.danger__hover.hex
|
|
2456
|
-
},
|
|
2457
|
-
warning: {
|
|
2458
|
-
color: colors$4.interactive.warning__text.hex,
|
|
2459
|
-
disabledColor: colors$4.interactive.disabled__text.hex,
|
|
2460
|
-
focusColor: colors$4.interactive.warning__hover.hex
|
|
2461
|
-
},
|
|
2462
|
-
success: {
|
|
2463
|
-
color: colors$4.interactive.success__text.hex,
|
|
2464
|
-
disabledColor: colors$4.interactive.disabled__text.hex,
|
|
2465
|
-
focusColor: colors$4.interactive.success__hover.hex
|
|
2466
|
-
}
|
|
2467
|
-
};
|
|
2354
|
+
var _excluded$19 = ["variant", "disabled", "type", "rowsMax"];
|
|
2355
|
+
var input = input$1;
|
|
2356
|
+
var Textarea = /*#__PURE__*/react.forwardRef(function Textarea(_ref, ref) {
|
|
2357
|
+
var variant = _ref.variant,
|
|
2358
|
+
_ref$disabled = _ref.disabled,
|
|
2359
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
2360
|
+
_ref$type = _ref.type,
|
|
2361
|
+
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
2362
|
+
rowsMax = _ref.rowsMax,
|
|
2363
|
+
other = _objectWithoutProperties__default["default"](_ref, _excluded$19);
|
|
2468
2364
|
|
|
2469
|
-
var
|
|
2365
|
+
var inputVariant = tokens$3[variant] ? tokens$3[variant] : input$1;
|
|
2470
2366
|
|
|
2471
|
-
var
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2367
|
+
var _useState = react.useState(null),
|
|
2368
|
+
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
2369
|
+
textareaEl = _useState2[0],
|
|
2370
|
+
setTextareaEl = _useState2[1];
|
|
2475
2371
|
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
}
|
|
2372
|
+
var _useEds = useEds(),
|
|
2373
|
+
density = _useEds.density;
|
|
2479
2374
|
|
|
2480
|
-
var
|
|
2481
|
-
|
|
2482
|
-
|
|
2375
|
+
var spacings = density === 'compact' ? input.modes.compact.spacings : input.spacings;
|
|
2376
|
+
var lineHeight = input$1.typography.lineHeight;
|
|
2377
|
+
var top = spacings.top,
|
|
2378
|
+
bottom = spacings.bottom;
|
|
2379
|
+
var fontSize = 16;
|
|
2483
2380
|
|
|
2484
|
-
if (
|
|
2485
|
-
|
|
2381
|
+
if (textareaEl) {
|
|
2382
|
+
fontSize = parseInt(window.getComputedStyle(textareaEl).fontSize);
|
|
2486
2383
|
}
|
|
2487
2384
|
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2385
|
+
var padding = parseInt(top) + parseInt(bottom);
|
|
2386
|
+
var maxHeight = parseFloat(lineHeight) * fontSize * rowsMax + padding;
|
|
2387
|
+
edsUtils.useAutoResize(textareaEl, rowsMax ? maxHeight : null);
|
|
2388
|
+
var combinedRef = react.useCallback(function () {
|
|
2389
|
+
return edsUtils.mergeRefs(ref, setTextareaEl);
|
|
2390
|
+
}, [setTextareaEl, ref])();
|
|
2491
2391
|
|
|
2492
|
-
|
|
2493
|
-
|
|
2392
|
+
var inputProps = _objectSpread__default["default"]({
|
|
2393
|
+
ref: combinedRef,
|
|
2394
|
+
type: type,
|
|
2395
|
+
disabled: disabled,
|
|
2396
|
+
variant: variant,
|
|
2397
|
+
token: inputVariant,
|
|
2398
|
+
density: density
|
|
2399
|
+
}, other);
|
|
2494
2400
|
|
|
2495
|
-
var
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
}
|
|
2499
|
-
|
|
2500
|
-
return
|
|
2401
|
+
var adornmentsToTop = {
|
|
2402
|
+
style: {
|
|
2403
|
+
alignItems: 'flex-start'
|
|
2404
|
+
}
|
|
2405
|
+
};
|
|
2406
|
+
return /*#__PURE__*/jsxRuntime.jsx(Input$4, _objectSpread__default["default"]({
|
|
2407
|
+
as: "textarea",
|
|
2408
|
+
rightAdornmentsProps: adornmentsToTop,
|
|
2409
|
+
leftAdornmentsProps: adornmentsToTop,
|
|
2410
|
+
style: {
|
|
2411
|
+
height: 'auto'
|
|
2412
|
+
}
|
|
2413
|
+
}, inputProps));
|
|
2501
2414
|
});
|
|
2502
|
-
var Text$1 = styled__default["default"].p.withConfig({
|
|
2503
|
-
displayName: "HelperText__Text",
|
|
2504
|
-
componentId: "sc-1kfkyxg-1"
|
|
2505
|
-
})(["", " margin:0 0 0 ", ";", ""], edsUtils.typographyTemplate(helperText.typography), function (_ref3) {
|
|
2506
|
-
var spacings = _ref3.spacings;
|
|
2507
|
-
return spacings.left;
|
|
2508
|
-
}, Variation);
|
|
2509
|
-
var TextfieldHelperText = /*#__PURE__*/react.forwardRef(function TextfieldHelperText(_ref4, ref) {
|
|
2510
|
-
var helperText$1 = _ref4.helperText,
|
|
2511
|
-
icon = _ref4.icon,
|
|
2512
|
-
_ref4$variant = _ref4.variant,
|
|
2513
|
-
variant = _ref4$variant === void 0 ? 'default' : _ref4$variant,
|
|
2514
|
-
isDisabled = _ref4.disabled,
|
|
2515
|
-
rest = _objectWithoutProperties__default["default"](_ref4, _excluded$19);
|
|
2516
|
-
|
|
2517
|
-
var helperVariant = helperText[variant];
|
|
2518
|
-
var spacings = helperText.spacings.comfortable;
|
|
2519
2415
|
|
|
2520
|
-
|
|
2521
|
-
isFocused = _useTextField.isFocused;
|
|
2416
|
+
var _excluded$18 = ["id", "label", "meta", "unit", "helperText", "placeholder", "disabled", "multiline", "className", "variant", "inputIcon", "helperIcon", "style", "rowsMax", "textareaRef", "inputRef"];
|
|
2522
2417
|
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
focusColor: helperVariant.focusColor
|
|
2527
|
-
};
|
|
2528
|
-
return /*#__PURE__*/jsxRuntime.jsxs(Container$5, _objectSpread__default["default"](_objectSpread__default["default"]({
|
|
2418
|
+
/** Proxy component for working around typescript and element type switching */
|
|
2419
|
+
var Field = /*#__PURE__*/react.forwardRef(function Field(props, ref) {
|
|
2420
|
+
return props.multiline ? /*#__PURE__*/jsxRuntime.jsx(Textarea, _objectSpread__default["default"]({
|
|
2529
2421
|
ref: ref
|
|
2530
|
-
},
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
isDisabled: isDisabled,
|
|
2534
|
-
colors: colors,
|
|
2535
|
-
size: 16,
|
|
2536
|
-
children: icon
|
|
2537
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Text$1, {
|
|
2538
|
-
variant: helperVariant,
|
|
2539
|
-
isFocused: isFocused,
|
|
2540
|
-
isDisabled: isDisabled,
|
|
2541
|
-
spacings: spacings,
|
|
2542
|
-
children: helperText$1
|
|
2543
|
-
})]
|
|
2544
|
-
}));
|
|
2422
|
+
}, props)) : /*#__PURE__*/jsxRuntime.jsx(Input$4, _objectSpread__default["default"]({
|
|
2423
|
+
ref: ref
|
|
2424
|
+
}, props));
|
|
2545
2425
|
});
|
|
2546
|
-
|
|
2547
|
-
var _excluded$18 = ["id", "label", "meta", "unit", "helperText", "placeholder", "disabled", "multiline", "className", "variant", "inputRef", "inputIcon", "helperIcon", "rowsMax", "style"];
|
|
2548
|
-
var Container$4 = styled__default["default"].div.withConfig({
|
|
2549
|
-
displayName: "TextField__Container",
|
|
2550
|
-
componentId: "sc-o1nc07-0"
|
|
2551
|
-
})(["min-width:100px;width:100%;"]);
|
|
2552
2426
|
var TextField = /*#__PURE__*/react.forwardRef(function TextField(_ref, ref) {
|
|
2553
2427
|
var id = _ref.id,
|
|
2554
2428
|
label = _ref.label,
|
|
@@ -2557,43 +2431,49 @@ var TextField = /*#__PURE__*/react.forwardRef(function TextField(_ref, ref) {
|
|
|
2557
2431
|
helperText = _ref.helperText,
|
|
2558
2432
|
placeholder = _ref.placeholder,
|
|
2559
2433
|
disabled = _ref.disabled,
|
|
2560
|
-
multiline = _ref.multiline,
|
|
2434
|
+
_ref$multiline = _ref.multiline,
|
|
2435
|
+
multiline = _ref$multiline === void 0 ? false : _ref$multiline,
|
|
2561
2436
|
className = _ref.className,
|
|
2562
|
-
|
|
2563
|
-
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
2564
|
-
inputRef = _ref.inputRef,
|
|
2437
|
+
variant = _ref.variant,
|
|
2565
2438
|
inputIcon = _ref.inputIcon,
|
|
2566
2439
|
helperIcon = _ref.helperIcon,
|
|
2567
|
-
rowsMax = _ref.rowsMax,
|
|
2568
2440
|
style = _ref.style,
|
|
2441
|
+
rowsMax = _ref.rowsMax,
|
|
2442
|
+
textareaRef = _ref.textareaRef,
|
|
2443
|
+
inputRef = _ref.inputRef,
|
|
2569
2444
|
other = _objectWithoutProperties__default["default"](_ref, _excluded$18);
|
|
2570
2445
|
|
|
2571
2446
|
var helperTextId = edsUtils.useId(null, 'helpertext');
|
|
2572
2447
|
|
|
2573
|
-
var
|
|
2574
|
-
'aria-
|
|
2575
|
-
multiline: multiline,
|
|
2448
|
+
var fieldProps = _objectSpread__default["default"]({
|
|
2449
|
+
'aria-invalid': variant === 'error' || undefined,
|
|
2576
2450
|
disabled: disabled,
|
|
2577
2451
|
placeholder: placeholder,
|
|
2578
2452
|
id: id,
|
|
2579
2453
|
variant: variant,
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2454
|
+
rightAdornments: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2455
|
+
children: [inputIcon, /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2456
|
+
children: unit
|
|
2457
|
+
})]
|
|
2458
|
+
}),
|
|
2459
|
+
rowsMax: rowsMax,
|
|
2460
|
+
ref: inputRef || textareaRef,
|
|
2461
|
+
multiline: multiline
|
|
2584
2462
|
}, other);
|
|
2585
2463
|
|
|
2586
2464
|
var helperProps = {
|
|
2587
|
-
id:
|
|
2588
|
-
|
|
2589
|
-
helperText: helperText,
|
|
2465
|
+
id: null,
|
|
2466
|
+
text: helperText,
|
|
2590
2467
|
icon: helperIcon,
|
|
2591
2468
|
disabled: disabled
|
|
2592
2469
|
};
|
|
2593
2470
|
var containerProps = {
|
|
2594
2471
|
ref: ref,
|
|
2595
2472
|
className: className,
|
|
2596
|
-
style:
|
|
2473
|
+
style: _objectSpread__default["default"]({
|
|
2474
|
+
width: '100%'
|
|
2475
|
+
}, style),
|
|
2476
|
+
color: variant
|
|
2597
2477
|
};
|
|
2598
2478
|
var labelProps = {
|
|
2599
2479
|
htmlFor: id,
|
|
@@ -2601,23 +2481,22 @@ var TextField = /*#__PURE__*/react.forwardRef(function TextField(_ref, ref) {
|
|
|
2601
2481
|
meta: meta,
|
|
2602
2482
|
disabled: disabled
|
|
2603
2483
|
};
|
|
2604
|
-
var showLabel = label || meta;
|
|
2605
|
-
var showHelperText = helperText;
|
|
2606
2484
|
|
|
2607
|
-
|
|
2608
|
-
|
|
2485
|
+
if (helperText) {
|
|
2486
|
+
fieldProps = _objectSpread__default["default"]({
|
|
2487
|
+
'aria-describedby': helperTextId
|
|
2488
|
+
}, fieldProps);
|
|
2489
|
+
helperProps = _objectSpread__default["default"]({
|
|
2490
|
+
id: helperTextId
|
|
2491
|
+
}, helperProps);
|
|
2492
|
+
}
|
|
2609
2493
|
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(TextFieldProvider, {
|
|
2617
|
-
children: [showLabel && /*#__PURE__*/jsxRuntime.jsx(Label$1, _objectSpread__default["default"]({}, labelProps)), /*#__PURE__*/jsxRuntime.jsx(Field, _objectSpread__default["default"]({}, inputProps)), showHelperText && /*#__PURE__*/jsxRuntime.jsx(TextfieldHelperText, _objectSpread__default["default"]({}, helperProps))]
|
|
2618
|
-
})
|
|
2619
|
-
}))
|
|
2620
|
-
});
|
|
2494
|
+
return /*#__PURE__*/jsxRuntime.jsx(InputWrapper$2, _objectSpread__default["default"](_objectSpread__default["default"]({
|
|
2495
|
+
helperProps: helperProps,
|
|
2496
|
+
labelProps: labelProps
|
|
2497
|
+
}, containerProps), {}, {
|
|
2498
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Field, _objectSpread__default["default"]({}, fieldProps))
|
|
2499
|
+
}));
|
|
2621
2500
|
});
|
|
2622
2501
|
|
|
2623
2502
|
var _icons = {};
|
|
@@ -2766,14 +2645,14 @@ var list = {
|
|
|
2766
2645
|
};
|
|
2767
2646
|
|
|
2768
2647
|
var _excluded$16 = ["children", "variant"];
|
|
2769
|
-
var typography$
|
|
2648
|
+
var typography$c = list.typography;
|
|
2770
2649
|
var StyledList$2 = styled__default["default"].ul.withConfig({
|
|
2771
2650
|
displayName: "List__StyledList",
|
|
2772
2651
|
componentId: "sc-v9d2hy-0"
|
|
2773
2652
|
})(["", " ", ""], function (_ref) {
|
|
2774
2653
|
var as = _ref.as;
|
|
2775
2654
|
return as === 'ol' ? styled.css(["& ol{list-style-type:lower-alpha;}"]) : '';
|
|
2776
|
-
}, edsUtils.typographyTemplate(typography$
|
|
2655
|
+
}, edsUtils.typographyTemplate(typography$c));
|
|
2777
2656
|
var List$2 = /*#__PURE__*/react.forwardRef(function List(_ref2, ref) {
|
|
2778
2657
|
var children = _ref2.children,
|
|
2779
2658
|
_ref2$variant = _ref2.variant,
|
|
@@ -2804,20 +2683,20 @@ var List$1 = List$2;
|
|
|
2804
2683
|
List$1.Item = ListItem$2;
|
|
2805
2684
|
List$1.Item.displayName = 'List.Item';
|
|
2806
2685
|
|
|
2807
|
-
var typography$
|
|
2686
|
+
var typography$b = edsTokens.tokens.typography.ui.accordion_header,
|
|
2808
2687
|
_tokens$colors$d = edsTokens.tokens.colors,
|
|
2809
2688
|
_tokens$colors$ui$4 = _tokens$colors$d.ui,
|
|
2810
2689
|
backgroundDefault = _tokens$colors$ui$4.background__default.rgba,
|
|
2811
2690
|
borderColor$1 = _tokens$colors$ui$4.background__medium.rgba,
|
|
2812
2691
|
backgroundHover = _tokens$colors$ui$4.background__light.rgba,
|
|
2813
|
-
_tokens$colors$intera$
|
|
2814
|
-
activatedColor = _tokens$colors$intera$
|
|
2815
|
-
disabledIconColor$1 = _tokens$colors$intera$
|
|
2816
|
-
disabledColor$2 = _tokens$colors$intera$
|
|
2817
|
-
focusOutlineColor$
|
|
2692
|
+
_tokens$colors$intera$a = _tokens$colors$d.interactive,
|
|
2693
|
+
activatedColor = _tokens$colors$intera$a.primary__resting.rgba,
|
|
2694
|
+
disabledIconColor$1 = _tokens$colors$intera$a.disabled__fill.rgba,
|
|
2695
|
+
disabledColor$2 = _tokens$colors$intera$a.disabled__text.rgba,
|
|
2696
|
+
focusOutlineColor$7 = _tokens$colors$intera$a.focus.rgba,
|
|
2818
2697
|
defaultIconColor = _tokens$colors$d.text.static_icons__default.rgba,
|
|
2819
2698
|
mediumSpacing = edsTokens.tokens.spacings.comfortable.medium,
|
|
2820
|
-
focusOutlineWidth$
|
|
2699
|
+
focusOutlineWidth$7 = edsTokens.tokens.interactions.focused.width,
|
|
2821
2700
|
text = edsTokens.tokens.typography.input.text;
|
|
2822
2701
|
var accordion = {
|
|
2823
2702
|
border: {
|
|
@@ -2838,7 +2717,7 @@ var accordion = {
|
|
|
2838
2717
|
header: {
|
|
2839
2718
|
height: '48px',
|
|
2840
2719
|
background: backgroundDefault,
|
|
2841
|
-
typography: typography$
|
|
2720
|
+
typography: typography$b,
|
|
2842
2721
|
spacings: {
|
|
2843
2722
|
left: mediumSpacing,
|
|
2844
2723
|
right: mediumSpacing
|
|
@@ -2847,19 +2726,19 @@ var accordion = {
|
|
|
2847
2726
|
focus: {
|
|
2848
2727
|
outline: {
|
|
2849
2728
|
type: 'outline',
|
|
2850
|
-
color: focusOutlineColor$
|
|
2729
|
+
color: focusOutlineColor$7,
|
|
2851
2730
|
style: 'dashed',
|
|
2852
|
-
width: focusOutlineWidth$
|
|
2731
|
+
width: focusOutlineWidth$7,
|
|
2853
2732
|
offset: '2px'
|
|
2854
2733
|
}
|
|
2855
2734
|
},
|
|
2856
2735
|
disabled: {
|
|
2857
|
-
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$
|
|
2736
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$b), {}, {
|
|
2858
2737
|
color: disabledColor$2
|
|
2859
2738
|
})
|
|
2860
2739
|
},
|
|
2861
2740
|
active: {
|
|
2862
|
-
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$
|
|
2741
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$b), {}, {
|
|
2863
2742
|
color: activatedColor
|
|
2864
2743
|
})
|
|
2865
2744
|
},
|
|
@@ -3112,7 +2991,10 @@ var AccordionHeader = /*#__PURE__*/react.forwardRef(function AccordionHeader(_re
|
|
|
3112
2991
|
style = _ref5.style,
|
|
3113
2992
|
props = _objectWithoutProperties__default["default"](_ref5, _excluded$10);
|
|
3114
2993
|
|
|
3115
|
-
var handleClick = function handleClick() {
|
|
2994
|
+
var handleClick = function handleClick(e) {
|
|
2995
|
+
e.preventDefault();
|
|
2996
|
+
e.stopPropagation();
|
|
2997
|
+
|
|
3116
2998
|
if (!disabled) {
|
|
3117
2999
|
toggleExpanded();
|
|
3118
3000
|
|
|
@@ -3122,8 +3004,8 @@ var AccordionHeader = /*#__PURE__*/react.forwardRef(function AccordionHeader(_re
|
|
|
3122
3004
|
}
|
|
3123
3005
|
};
|
|
3124
3006
|
|
|
3125
|
-
var handleKeyDown = function handleKeyDown(
|
|
3126
|
-
var key =
|
|
3007
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
3008
|
+
var key = e.key;
|
|
3127
3009
|
|
|
3128
3010
|
if (key === 'Enter' || key === ' ') {
|
|
3129
3011
|
toggleExpanded();
|
|
@@ -3132,7 +3014,8 @@ var AccordionHeader = /*#__PURE__*/react.forwardRef(function AccordionHeader(_re
|
|
|
3132
3014
|
props.onToggle();
|
|
3133
3015
|
}
|
|
3134
3016
|
|
|
3135
|
-
|
|
3017
|
+
e.preventDefault();
|
|
3018
|
+
e.stopPropagation();
|
|
3136
3019
|
}
|
|
3137
3020
|
};
|
|
3138
3021
|
|
|
@@ -3186,7 +3069,8 @@ var AccordionHeader = /*#__PURE__*/react.forwardRef(function AccordionHeader(_re
|
|
|
3186
3069
|
panelId: panelId,
|
|
3187
3070
|
onClick: handleClick,
|
|
3188
3071
|
onKeyDown: handleKeyDown,
|
|
3189
|
-
ref: ref
|
|
3072
|
+
ref: ref,
|
|
3073
|
+
type: "button"
|
|
3190
3074
|
}, props), {}, {
|
|
3191
3075
|
children: chevronPosition === 'left' ? newChildren : newChildren.reverse()
|
|
3192
3076
|
})), headerActions && headerActions]
|
|
@@ -3256,14 +3140,14 @@ TabsContext.Consumer;
|
|
|
3256
3140
|
var _tokens$colors$c = edsTokens.tokens.colors,
|
|
3257
3141
|
defaultColor = _tokens$colors$c.text.static_icons__tertiary.rgba,
|
|
3258
3142
|
defaultBorderColor = _tokens$colors$c.ui.background__medium.rgba,
|
|
3259
|
-
_tokens$colors$intera$
|
|
3260
|
-
focusOutlineColor$
|
|
3261
|
-
hoverBackgroundColor = _tokens$colors$intera$
|
|
3262
|
-
activeColor$2 = _tokens$colors$intera$
|
|
3263
|
-
activeHoverColor = _tokens$colors$intera$
|
|
3143
|
+
_tokens$colors$intera$9 = _tokens$colors$c.interactive,
|
|
3144
|
+
focusOutlineColor$6 = _tokens$colors$intera$9.focus.rgba,
|
|
3145
|
+
hoverBackgroundColor = _tokens$colors$intera$9.primary__hover_alt.rgba,
|
|
3146
|
+
activeColor$2 = _tokens$colors$intera$9.primary__resting.rgba,
|
|
3147
|
+
activeHoverColor = _tokens$colors$intera$9.primary__hover.rgba,
|
|
3264
3148
|
clickboundsHeight = edsTokens.tokens.clickbounds.default__base,
|
|
3265
3149
|
spacingMedium$8 = edsTokens.tokens.spacings.comfortable.medium,
|
|
3266
|
-
focusOutlineWidth$
|
|
3150
|
+
focusOutlineWidth$6 = edsTokens.tokens.interactions.focused.width,
|
|
3267
3151
|
_tokens$typography$na = edsTokens.tokens.typography.navigation,
|
|
3268
3152
|
menu_tabs = _tokens$typography$na.menu_tabs,
|
|
3269
3153
|
menu_title = _tokens$typography$na.menu_title;
|
|
@@ -3278,9 +3162,9 @@ var token$1 = {
|
|
|
3278
3162
|
focus: {
|
|
3279
3163
|
outline: {
|
|
3280
3164
|
type: 'outline',
|
|
3281
|
-
width: focusOutlineWidth$
|
|
3165
|
+
width: focusOutlineWidth$6,
|
|
3282
3166
|
style: 'dashed',
|
|
3283
|
-
color: focusOutlineColor$
|
|
3167
|
+
color: focusOutlineColor$6
|
|
3284
3168
|
}
|
|
3285
3169
|
}
|
|
3286
3170
|
},
|
|
@@ -3326,10 +3210,10 @@ var token$1 = {
|
|
|
3326
3210
|
focus: {
|
|
3327
3211
|
outline: {
|
|
3328
3212
|
type: 'outline',
|
|
3329
|
-
width: focusOutlineWidth$
|
|
3330
|
-
offset: "-".concat(parseInt(focusOutlineWidth$
|
|
3213
|
+
width: focusOutlineWidth$6,
|
|
3214
|
+
offset: "-".concat(parseInt(focusOutlineWidth$6), "px"),
|
|
3331
3215
|
style: 'dashed',
|
|
3332
|
-
color: focusOutlineColor$
|
|
3216
|
+
color: focusOutlineColor$6
|
|
3333
3217
|
}
|
|
3334
3218
|
},
|
|
3335
3219
|
active: {
|
|
@@ -3665,9 +3549,9 @@ Tabs.Panel.displayName = 'Tabs.Panel';
|
|
|
3665
3549
|
Tabs.List.displayName = 'Tabs.List';
|
|
3666
3550
|
|
|
3667
3551
|
var elevation = edsTokens.tokens.elevation,
|
|
3668
|
-
background$
|
|
3552
|
+
background$b = edsTokens.tokens.colors.ui.background__default.rgba;
|
|
3669
3553
|
var paper = {
|
|
3670
|
-
background: background$
|
|
3554
|
+
background: background$b
|
|
3671
3555
|
};
|
|
3672
3556
|
|
|
3673
3557
|
var _excluded$W = ["elevation"];
|
|
@@ -3692,14 +3576,14 @@ var Paper = /*#__PURE__*/react.forwardRef(function Paper(_ref2, ref) {
|
|
|
3692
3576
|
});
|
|
3693
3577
|
|
|
3694
3578
|
var _tokens$colors$ui$3 = edsTokens.tokens.colors.ui,
|
|
3695
|
-
background$
|
|
3579
|
+
background$a = _tokens$colors$ui$3.background__default.rgba,
|
|
3696
3580
|
backgroundInfo = _tokens$colors$ui$3.background__info.rgba,
|
|
3697
3581
|
backgroundWarning = _tokens$colors$ui$3.background__warning.rgba,
|
|
3698
3582
|
backgroundDanger = _tokens$colors$ui$3.background__danger.rgba,
|
|
3699
3583
|
spacingMedium$7 = edsTokens.tokens.spacings.comfortable.medium,
|
|
3700
3584
|
borderRadius$8 = edsTokens.tokens.shape.corners.borderRadius;
|
|
3701
3585
|
var primary$4 = {
|
|
3702
|
-
background: background$
|
|
3586
|
+
background: background$a,
|
|
3703
3587
|
border: {
|
|
3704
3588
|
type: 'border',
|
|
3705
3589
|
radius: borderRadius$8
|
|
@@ -4007,17 +3891,17 @@ TopBar.Actions.displayName = 'Topbar.Actions';
|
|
|
4007
3891
|
TopBar.Header.displayName = 'Topbar.Header';
|
|
4008
3892
|
TopBar.CustomContent.displayName = 'Topbar.CustomContent';
|
|
4009
3893
|
|
|
4010
|
-
var background$
|
|
3894
|
+
var background$9 = edsTokens.tokens.colors.ui.background__scrim.rgba;
|
|
4011
3895
|
var scrim = {
|
|
4012
|
-
background: background$
|
|
3896
|
+
background: background$9
|
|
4013
3897
|
};
|
|
4014
3898
|
|
|
4015
3899
|
var _excluded$L = ["children", "onClose", "open", "isDismissable"];
|
|
4016
|
-
var background$
|
|
3900
|
+
var background$8 = scrim.background;
|
|
4017
3901
|
var StyledScrim = styled__default["default"](reactDomInteractions.FloatingOverlay).withConfig({
|
|
4018
3902
|
displayName: "Scrim__StyledScrim",
|
|
4019
3903
|
componentId: "sc-1fr7uvy-0"
|
|
4020
|
-
})(["background:", ";z-index:1300;align-items:center;justify-content:center;display:flex;"], background$
|
|
3904
|
+
})(["background:", ";z-index:1300;align-items:center;justify-content:center;display:flex;"], background$8);
|
|
4021
3905
|
var ScrimContent = styled__default["default"].div.withConfig({
|
|
4022
3906
|
displayName: "Scrim__ScrimContent",
|
|
4023
3907
|
componentId: "sc-1fr7uvy-1"
|
|
@@ -4067,11 +3951,11 @@ var spacingMedium$6 = edsTokens.tokens.spacings.comfortable.medium,
|
|
|
4067
3951
|
_tokens$typography = edsTokens.tokens.typography,
|
|
4068
3952
|
accordion_header = _tokens$typography.ui.accordion_header,
|
|
4069
3953
|
body_long = _tokens$typography.paragraph.body_long,
|
|
4070
|
-
background$
|
|
3954
|
+
background$7 = edsTokens.tokens.colors.ui.background__default.rgba,
|
|
4071
3955
|
borderRadius$7 = edsTokens.tokens.shape.corners.borderRadius;
|
|
4072
3956
|
var dialog = {
|
|
4073
3957
|
width: '252px',
|
|
4074
|
-
background: background$
|
|
3958
|
+
background: background$7,
|
|
4075
3959
|
typography: accordion_header,
|
|
4076
3960
|
border: {
|
|
4077
3961
|
type: 'border',
|
|
@@ -4297,20 +4181,20 @@ Dialog.Content.displayName = 'Dialog.Content';
|
|
|
4297
4181
|
Dialog.Header.displayName = 'Dialog.Header';
|
|
4298
4182
|
|
|
4299
4183
|
var _tokens$colors$b = edsTokens.tokens.colors,
|
|
4300
|
-
_tokens$colors$intera$
|
|
4301
|
-
primaryColor$
|
|
4302
|
-
primaryHoverAlt$
|
|
4303
|
-
primaryHover$3 = _tokens$colors$intera$
|
|
4304
|
-
focusColor$1 = _tokens$colors$intera$
|
|
4184
|
+
_tokens$colors$intera$8 = _tokens$colors$b.interactive,
|
|
4185
|
+
primaryColor$3 = _tokens$colors$intera$8.primary__resting.rgba,
|
|
4186
|
+
primaryHoverAlt$5 = _tokens$colors$intera$8.primary__hover_alt.rgba,
|
|
4187
|
+
primaryHover$3 = _tokens$colors$intera$8.primary__hover.rgba,
|
|
4188
|
+
focusColor$1 = _tokens$colors$intera$8.focus.rgba,
|
|
4305
4189
|
labelColor = _tokens$colors$b.text.static_icons__tertiary.rgba,
|
|
4306
4190
|
borderRadius$6 = edsTokens.tokens.shape.corners.borderRadius,
|
|
4307
4191
|
_tokens$spacings$comf$b = edsTokens.tokens.spacings.comfortable,
|
|
4308
|
-
small$
|
|
4192
|
+
small$3 = _tokens$spacings$comf$b.small,
|
|
4309
4193
|
x_large = _tokens$spacings$comf$b.x_large,
|
|
4310
4194
|
xxx_large = _tokens$spacings$comf$b.xxx_large,
|
|
4311
|
-
typography$
|
|
4195
|
+
typography$a = edsTokens.tokens.typography;
|
|
4312
4196
|
var tableOfContents = {
|
|
4313
|
-
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$
|
|
4197
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$a.navigation.button), {}, {
|
|
4314
4198
|
color: labelColor
|
|
4315
4199
|
}),
|
|
4316
4200
|
spacings: {
|
|
@@ -4319,15 +4203,15 @@ var tableOfContents = {
|
|
|
4319
4203
|
},
|
|
4320
4204
|
entities: {
|
|
4321
4205
|
icon: {
|
|
4322
|
-
background: primaryColor$
|
|
4206
|
+
background: primaryColor$3,
|
|
4323
4207
|
spacings: {
|
|
4324
|
-
right: small$
|
|
4208
|
+
right: small$3
|
|
4325
4209
|
}
|
|
4326
4210
|
},
|
|
4327
4211
|
links: {
|
|
4328
4212
|
width: 'calc(189px - 36px)',
|
|
4329
|
-
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$
|
|
4330
|
-
color: primaryColor$
|
|
4213
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$a.navigation.button), {}, {
|
|
4214
|
+
color: primaryColor$3
|
|
4331
4215
|
}),
|
|
4332
4216
|
spacings: {
|
|
4333
4217
|
top: '10px',
|
|
@@ -4357,7 +4241,7 @@ var tableOfContents = {
|
|
|
4357
4241
|
}
|
|
4358
4242
|
},
|
|
4359
4243
|
hover: {
|
|
4360
|
-
background: primaryHoverAlt$
|
|
4244
|
+
background: primaryHoverAlt$5,
|
|
4361
4245
|
border: {
|
|
4362
4246
|
radius: borderRadius$6
|
|
4363
4247
|
},
|
|
@@ -4366,7 +4250,7 @@ var tableOfContents = {
|
|
|
4366
4250
|
background: primaryHover$3
|
|
4367
4251
|
}
|
|
4368
4252
|
},
|
|
4369
|
-
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$
|
|
4253
|
+
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$a.navigation.button), {}, {
|
|
4370
4254
|
color: primaryHover$3
|
|
4371
4255
|
})
|
|
4372
4256
|
}
|
|
@@ -4450,14 +4334,14 @@ TableOfContents.LinkItem = LinkItem;
|
|
|
4450
4334
|
TableOfContents.LinkItem.displayName = 'TableOfContents.LinkItem';
|
|
4451
4335
|
|
|
4452
4336
|
var _tokens$colors$ui$2 = edsTokens.tokens.colors.ui,
|
|
4453
|
-
background$
|
|
4337
|
+
background$6 = _tokens$colors$ui$2.background__default.rgba,
|
|
4454
4338
|
borderColor = _tokens$colors$ui$2.background__light.rgba,
|
|
4455
4339
|
_tokens$spacings$comf$a = edsTokens.tokens.spacings.comfortable,
|
|
4456
4340
|
spacingXXS = _tokens$spacings$comf$a.xx_small,
|
|
4457
4341
|
spacingMedium$5 = _tokens$spacings$comf$a.medium,
|
|
4458
4342
|
body_short = edsTokens.tokens.typography.paragraph.body_short;
|
|
4459
4343
|
var comfortable$2 = {
|
|
4460
|
-
background: background$
|
|
4344
|
+
background: background$6,
|
|
4461
4345
|
spacings: {
|
|
4462
4346
|
left: '14px',
|
|
4463
4347
|
// padding left is 14px, because of border-left 'steals' 2px of the padding
|
|
@@ -4482,17 +4366,17 @@ var variants = {
|
|
|
4482
4366
|
};
|
|
4483
4367
|
|
|
4484
4368
|
var _excluded$D = ["variant", "width", "title", "children", "open", "onClose"];
|
|
4485
|
-
var background$
|
|
4369
|
+
var background$5 = comfortable$2.background,
|
|
4486
4370
|
spacings$2 = comfortable$2.spacings,
|
|
4487
4371
|
border$2 = comfortable$2.border,
|
|
4488
|
-
typography$
|
|
4372
|
+
typography$9 = comfortable$2.typography;
|
|
4489
4373
|
var StyledSideSheet = styled__default["default"].div.withConfig({
|
|
4490
4374
|
displayName: "SideSheet__StyledSideSheet",
|
|
4491
4375
|
componentId: "sc-wkzlnn-0"
|
|
4492
|
-
})(["height:100%;position:absolute;z-index:1200;top:0;right:0;box-sizing:border-box;background:", ";width:", ";", " ", ";", ""], background$
|
|
4376
|
+
})(["height:100%;position:absolute;z-index:1200;top:0;right:0;box-sizing:border-box;background:", ";width:", ";", " ", ";", ""], background$5, function (_ref) {
|
|
4493
4377
|
var width = _ref.width;
|
|
4494
4378
|
return width;
|
|
4495
|
-
}, edsUtils.bordersTemplate(border$2), edsUtils.spacingsTemplate(spacings$2), edsUtils.typographyTemplate(typography$
|
|
4379
|
+
}, edsUtils.bordersTemplate(border$2), edsUtils.spacingsTemplate(spacings$2), edsUtils.typographyTemplate(typography$9));
|
|
4496
4380
|
var Header$1 = styled__default["default"].div.withConfig({
|
|
4497
4381
|
displayName: "SideSheet__Header",
|
|
4498
4382
|
componentId: "sc-wkzlnn-1"
|
|
@@ -4536,25 +4420,25 @@ var SideSheet = /*#__PURE__*/react.forwardRef(function SideSheet(_ref2, ref) {
|
|
|
4536
4420
|
|
|
4537
4421
|
var _tokens$spacings$comf$9 = edsTokens.tokens.spacings.comfortable,
|
|
4538
4422
|
x_small$3 = _tokens$spacings$comf$9.x_small,
|
|
4539
|
-
small$
|
|
4423
|
+
small$2 = _tokens$spacings$comf$9.small,
|
|
4540
4424
|
medium$2 = _tokens$spacings$comf$9.medium,
|
|
4541
4425
|
chipTypography = edsTokens.tokens.typography.ui.chip__badge,
|
|
4542
4426
|
_tokens$colors$a = edsTokens.tokens.colors,
|
|
4543
4427
|
_tokens$colors$ui$1 = _tokens$colors$a.ui,
|
|
4544
4428
|
backgroundColorDefault$1 = _tokens$colors$ui$1.background__default.rgba,
|
|
4545
4429
|
backgroundColor$2 = _tokens$colors$ui$1.background__light.rgba,
|
|
4546
|
-
_tokens$colors$intera$
|
|
4547
|
-
primaryColor$
|
|
4548
|
-
primaryHoverAlt$
|
|
4549
|
-
primaryHover$2 = _tokens$colors$intera$
|
|
4550
|
-
disabledColor$1 = _tokens$colors$intera$
|
|
4551
|
-
focusOutlineColor$
|
|
4552
|
-
activeColor$1 = _tokens$colors$intera$
|
|
4553
|
-
errorColor = _tokens$colors$intera$
|
|
4554
|
-
errorColorHover = _tokens$colors$intera$
|
|
4555
|
-
errorBackgroundHover = _tokens$colors$intera$
|
|
4430
|
+
_tokens$colors$intera$7 = _tokens$colors$a.interactive,
|
|
4431
|
+
primaryColor$2 = _tokens$colors$intera$7.primary__resting.rgba,
|
|
4432
|
+
primaryHoverAlt$4 = _tokens$colors$intera$7.primary__hover_alt.rgba,
|
|
4433
|
+
primaryHover$2 = _tokens$colors$intera$7.primary__hover.rgba,
|
|
4434
|
+
disabledColor$1 = _tokens$colors$intera$7.disabled__text.rgba,
|
|
4435
|
+
focusOutlineColor$5 = _tokens$colors$intera$7.focus.rgba,
|
|
4436
|
+
activeColor$1 = _tokens$colors$intera$7.primary__selected_highlight.rgba,
|
|
4437
|
+
errorColor = _tokens$colors$intera$7.danger__resting.rgba,
|
|
4438
|
+
errorColorHover = _tokens$colors$intera$7.danger__hover.rgba,
|
|
4439
|
+
errorBackgroundHover = _tokens$colors$intera$7.danger__highlight.rgba,
|
|
4556
4440
|
borderRadius$5 = edsTokens.tokens.shape.rounded.borderRadius,
|
|
4557
|
-
focusOutlineWidth$
|
|
4441
|
+
focusOutlineWidth$5 = edsTokens.tokens.interactions.focused.width;
|
|
4558
4442
|
var enabled$3 = {
|
|
4559
4443
|
background: backgroundColor$2,
|
|
4560
4444
|
height: '22px',
|
|
@@ -4567,10 +4451,10 @@ var enabled$3 = {
|
|
|
4567
4451
|
},
|
|
4568
4452
|
spacings: {
|
|
4569
4453
|
left: x_small$3,
|
|
4570
|
-
right: small$
|
|
4454
|
+
right: small$2
|
|
4571
4455
|
},
|
|
4572
4456
|
typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, chipTypography), {}, {
|
|
4573
|
-
color: primaryColor$
|
|
4457
|
+
color: primaryColor$2
|
|
4574
4458
|
}),
|
|
4575
4459
|
states: {
|
|
4576
4460
|
hover: {
|
|
@@ -4585,8 +4469,8 @@ var enabled$3 = {
|
|
|
4585
4469
|
},
|
|
4586
4470
|
focus: {
|
|
4587
4471
|
outline: {
|
|
4588
|
-
width: focusOutlineWidth$
|
|
4589
|
-
color: focusOutlineColor$
|
|
4472
|
+
width: focusOutlineWidth$5,
|
|
4473
|
+
color: focusOutlineColor$5,
|
|
4590
4474
|
style: 'dashed',
|
|
4591
4475
|
type: 'outline',
|
|
4592
4476
|
offset: '3px'
|
|
@@ -4607,7 +4491,7 @@ var enabled$3 = {
|
|
|
4607
4491
|
},
|
|
4608
4492
|
states: {
|
|
4609
4493
|
hover: {
|
|
4610
|
-
background: primaryHoverAlt$
|
|
4494
|
+
background: primaryHoverAlt$4
|
|
4611
4495
|
}
|
|
4612
4496
|
}
|
|
4613
4497
|
}
|
|
@@ -4668,9 +4552,9 @@ var Icon = styled__default["default"](Icon$1).withConfig({
|
|
|
4668
4552
|
var _excluded$C = ["children", "onDelete", "disabled", "onClick", "variant"];
|
|
4669
4553
|
var enabled$1 = enabled$3,
|
|
4670
4554
|
error = error$2;
|
|
4671
|
-
var background$
|
|
4555
|
+
var background$4 = enabled$1.background,
|
|
4672
4556
|
height = enabled$1.height,
|
|
4673
|
-
typography$
|
|
4557
|
+
typography$8 = enabled$1.typography,
|
|
4674
4558
|
spacings$1 = enabled$1.spacings,
|
|
4675
4559
|
border$1 = enabled$1.border,
|
|
4676
4560
|
states$2 = enabled$1.states;
|
|
@@ -4684,7 +4568,7 @@ var StyledChips = styled__default["default"].div.attrs(function (_ref) {
|
|
|
4684
4568
|
}).withConfig({
|
|
4685
4569
|
displayName: "Chip__StyledChips",
|
|
4686
4570
|
componentId: "sc-wzsllq-0"
|
|
4687
|
-
})(["background:", ";height:", ";width:fit-content;display:grid;grid-gap:8px;grid-auto-flow:column;grid-auto-columns:max-content;align-items:center;svg{fill:", ";}@media (hover:hover) and (pointer:fine){&:hover{color:", ";svg{fill:", ";}}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}", " ", " ", " ", " ", " ", " ", " ", ""], background$
|
|
4571
|
+
})(["background:", ";height:", ";width:fit-content;display:grid;grid-gap:8px;grid-auto-flow:column;grid-auto-columns:max-content;align-items:center;svg{fill:", ";}@media (hover:hover) and (pointer:fine){&:hover{color:", ";svg{fill:", ";}}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}", " ", " ", " ", " ", " ", " ", " ", ""], background$4, height, typography$8.color, states$2.hover.typography.color, states$2.hover.typography.color, edsUtils.outlineTemplate(states$2.focus.outline), edsUtils.outlineTemplate(states$2.focus.outline), edsUtils.bordersTemplate(border$1), edsUtils.spacingsTemplate(spacings$1), edsUtils.typographyTemplate(typography$8), function (_ref2) {
|
|
4688
4572
|
var clickable = _ref2.clickable;
|
|
4689
4573
|
return clickable && styled.css(["@media (hover:hover) and (pointer:fine){&:hover{cursor:pointer;}}"]);
|
|
4690
4574
|
}, function (_ref3) {
|
|
@@ -4702,7 +4586,7 @@ var StyledChips = styled__default["default"].div.attrs(function (_ref) {
|
|
|
4702
4586
|
}
|
|
4703
4587
|
}, function (_ref4) {
|
|
4704
4588
|
var disabled = _ref4.disabled;
|
|
4705
|
-
return disabled && styled.css(["cursor:not-allowed;background:", ";color:", ";svg{fill:", ";}@media (hover:hover) and (pointer:fine){&:hover{color:", ";cursor:not-allowed;svg{fill:", ";}}}"], background$
|
|
4589
|
+
return disabled && styled.css(["cursor:not-allowed;background:", ";color:", ";svg{fill:", ";}@media (hover:hover) and (pointer:fine){&:hover{color:", ";cursor:not-allowed;svg{fill:", ";}}}"], background$4, states$2.disabled.typography.color, states$2.disabled.typography.color, states$2.disabled.typography.color, states$2.disabled.typography.color);
|
|
4706
4590
|
}, function (_ref5) {
|
|
4707
4591
|
var deletable = _ref5.deletable;
|
|
4708
4592
|
return deletable && styled.css(["padding-right:4px;"]);
|
|
@@ -4787,358 +4671,152 @@ var Chip = /*#__PURE__*/react.forwardRef(function Chip(_ref7, ref) {
|
|
|
4787
4671
|
}));
|
|
4788
4672
|
}); // Chip.displayName = 'eds-chip'
|
|
4789
4673
|
|
|
4790
|
-
var avatar = {
|
|
4791
|
-
border: {
|
|
4792
|
-
type: 'border',
|
|
4793
|
-
radius: '50%'
|
|
4794
|
-
},
|
|
4795
|
-
states: {
|
|
4796
|
-
disabled: {
|
|
4797
|
-
opacity: '0.5'
|
|
4798
|
-
}
|
|
4799
|
-
}
|
|
4800
|
-
};
|
|
4801
|
-
|
|
4802
|
-
var _excluded$B = ["src", "alt", "size", "disabled"];
|
|
4803
|
-
var StyledAvatar = styled__default["default"].div.withConfig({
|
|
4804
|
-
displayName: "Avatar__StyledAvatar",
|
|
4805
|
-
componentId: "sc-r7n7on-0"
|
|
4806
|
-
})(["position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;", ";", ""], edsUtils.bordersTemplate(avatar.border), function (_ref) {
|
|
4807
|
-
var size = _ref.size;
|
|
4808
|
-
return styled.css(["height:", "px;width:", "px;"], size, size);
|
|
4809
|
-
});
|
|
4810
|
-
var StyledImage = styled__default["default"].img.withConfig({
|
|
4811
|
-
displayName: "Avatar__StyledImage",
|
|
4812
|
-
componentId: "sc-r7n7on-1"
|
|
4813
|
-
})(["height:100%;text-align:center;color:transparent;", ";"], function (_ref2) {
|
|
4814
|
-
var disabled = _ref2.disabled;
|
|
4815
|
-
return disabled && styled.css(["opacity:", ";"], avatar.states.disabled.opacity);
|
|
4816
|
-
});
|
|
4817
|
-
var Avatar = /*#__PURE__*/react.forwardRef(function Avatar(_ref3, ref) {
|
|
4818
|
-
var _ref3$src = _ref3.src,
|
|
4819
|
-
src = _ref3$src === void 0 ? null : _ref3$src,
|
|
4820
|
-
alt = _ref3.alt,
|
|
4821
|
-
_ref3$size = _ref3.size,
|
|
4822
|
-
size = _ref3$size === void 0 ? 24 : _ref3$size,
|
|
4823
|
-
_ref3$disabled = _ref3.disabled,
|
|
4824
|
-
disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
|
|
4825
|
-
rest = _objectWithoutProperties__default["default"](_ref3, _excluded$B);
|
|
4826
|
-
|
|
4827
|
-
return /*#__PURE__*/jsxRuntime.jsx(StyledAvatar, _objectSpread__default["default"](_objectSpread__default["default"]({
|
|
4828
|
-
size: size,
|
|
4829
|
-
disabled: disabled,
|
|
4830
|
-
ref: ref
|
|
4831
|
-
}, rest), {}, {
|
|
4832
|
-
children: /*#__PURE__*/jsxRuntime.jsx(StyledImage, {
|
|
4833
|
-
src: src,
|
|
4834
|
-
alt: alt,
|
|
4835
|
-
disabled: disabled
|
|
4836
|
-
})
|
|
4837
|
-
}));
|
|
4838
|
-
});
|
|
4839
|
-
Avatar.displayName = 'Avatar';
|
|
4840
|
-
|
|
4841
|
-
var _tokens$colors$9 = edsTokens.tokens.colors,
|
|
4842
|
-
background$4 = _tokens$colors$9.ui.background__light.rgba,
|
|
4843
|
-
_tokens$colors$intera$7 = _tokens$colors$9.interactive,
|
|
4844
|
-
primaryHoverAlt$4 = _tokens$colors$intera$7.primary__hover_alt.rgba,
|
|
4845
|
-
primaryColor$2 = _tokens$colors$intera$7.primary__resting.rgba,
|
|
4846
|
-
placeholderColor = _tokens$colors$9.text.static_icons__tertiary.rgba,
|
|
4847
|
-
small$2 = edsTokens.tokens.spacings.comfortable.small,
|
|
4848
|
-
typography$8 = edsTokens.tokens.typography.input.text,
|
|
4849
|
-
shape$1 = edsTokens.tokens.shape;
|
|
4850
|
-
var search = {
|
|
4851
|
-
background: background$4,
|
|
4852
|
-
typography: typography$8,
|
|
4853
|
-
height: '36px',
|
|
4854
|
-
clickbound: {
|
|
4855
|
-
offset: {
|
|
4856
|
-
top: '6px'
|
|
4857
|
-
},
|
|
4858
|
-
height: '48px'
|
|
4859
|
-
},
|
|
4860
|
-
spacings: {
|
|
4861
|
-
left: small$2,
|
|
4862
|
-
right: small$2
|
|
4863
|
-
},
|
|
4864
|
-
border: {
|
|
4865
|
-
type: 'border',
|
|
4866
|
-
width: '1px',
|
|
4867
|
-
style: 'solid',
|
|
4868
|
-
color: 'transparent'
|
|
4869
|
-
},
|
|
4870
|
-
states: {
|
|
4871
|
-
focus: {
|
|
4872
|
-
border: {
|
|
4873
|
-
type: 'border',
|
|
4874
|
-
width: '1px',
|
|
4875
|
-
style: 'solid',
|
|
4876
|
-
color: primaryColor$2
|
|
4877
|
-
}
|
|
4878
|
-
}
|
|
4879
|
-
},
|
|
4880
|
-
entities: {
|
|
4881
|
-
placeholder: {
|
|
4882
|
-
typography: {
|
|
4883
|
-
color: placeholderColor
|
|
4884
|
-
}
|
|
4885
|
-
},
|
|
4886
|
-
icon: {
|
|
4887
|
-
typography: {
|
|
4888
|
-
color: placeholderColor
|
|
4889
|
-
},
|
|
4890
|
-
border: {
|
|
4891
|
-
type: 'border',
|
|
4892
|
-
radius: '50%'
|
|
4893
|
-
},
|
|
4894
|
-
states: {
|
|
4895
|
-
hover: {
|
|
4896
|
-
background: primaryHoverAlt$4
|
|
4897
|
-
}
|
|
4898
|
-
},
|
|
4899
|
-
clickbound: {
|
|
4900
|
-
offset: {
|
|
4901
|
-
top: '6px'
|
|
4902
|
-
},
|
|
4903
|
-
height: '36px'
|
|
4904
|
-
}
|
|
4905
|
-
},
|
|
4906
|
-
button: {
|
|
4907
|
-
height: '24px',
|
|
4908
|
-
width: '24px',
|
|
4909
|
-
spacings: {
|
|
4910
|
-
right: small$2
|
|
4911
|
-
}
|
|
4912
|
-
}
|
|
4674
|
+
var avatar = {
|
|
4675
|
+
border: {
|
|
4676
|
+
type: 'border',
|
|
4677
|
+
radius: '50%'
|
|
4913
4678
|
},
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4679
|
+
states: {
|
|
4680
|
+
disabled: {
|
|
4681
|
+
opacity: '0.5'
|
|
4917
4682
|
}
|
|
4918
4683
|
}
|
|
4919
4684
|
};
|
|
4920
4685
|
|
|
4921
|
-
var _excluded$
|
|
4922
|
-
var
|
|
4923
|
-
displayName: "
|
|
4924
|
-
componentId: "sc-
|
|
4925
|
-
})(function (_ref) {
|
|
4926
|
-
var
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4686
|
+
var _excluded$B = ["src", "alt", "size", "disabled"];
|
|
4687
|
+
var StyledAvatar = styled__default["default"].div.withConfig({
|
|
4688
|
+
displayName: "Avatar__StyledAvatar",
|
|
4689
|
+
componentId: "sc-r7n7on-0"
|
|
4690
|
+
})(["position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;", ";", ""], edsUtils.bordersTemplate(avatar.border), function (_ref) {
|
|
4691
|
+
var size = _ref.size;
|
|
4692
|
+
return styled.css(["height:", "px;width:", "px;"], size, size);
|
|
4693
|
+
});
|
|
4694
|
+
var StyledImage = styled__default["default"].img.withConfig({
|
|
4695
|
+
displayName: "Avatar__StyledImage",
|
|
4696
|
+
componentId: "sc-r7n7on-1"
|
|
4697
|
+
})(["height:100%;text-align:center;color:transparent;", ";"], function (_ref2) {
|
|
4698
|
+
var disabled = _ref2.disabled;
|
|
4699
|
+
return disabled && styled.css(["opacity:", ";"], avatar.states.disabled.opacity);
|
|
4700
|
+
});
|
|
4701
|
+
var Avatar = /*#__PURE__*/react.forwardRef(function Avatar(_ref3, ref) {
|
|
4702
|
+
var _ref3$src = _ref3.src,
|
|
4703
|
+
src = _ref3$src === void 0 ? null : _ref3$src,
|
|
4704
|
+
alt = _ref3.alt,
|
|
4705
|
+
_ref3$size = _ref3.size,
|
|
4706
|
+
size = _ref3$size === void 0 ? 24 : _ref3$size,
|
|
4707
|
+
_ref3$disabled = _ref3.disabled,
|
|
4708
|
+
disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
|
|
4709
|
+
rest = _objectWithoutProperties__default["default"](_ref3, _excluded$B);
|
|
4710
|
+
|
|
4711
|
+
return /*#__PURE__*/jsxRuntime.jsx(StyledAvatar, _objectSpread__default["default"](_objectSpread__default["default"]({
|
|
4712
|
+
size: size,
|
|
4713
|
+
disabled: disabled,
|
|
4714
|
+
ref: ref
|
|
4715
|
+
}, rest), {}, {
|
|
4716
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledImage, {
|
|
4717
|
+
src: src,
|
|
4718
|
+
alt: alt,
|
|
4719
|
+
disabled: disabled
|
|
4720
|
+
})
|
|
4721
|
+
}));
|
|
4939
4722
|
});
|
|
4723
|
+
Avatar.displayName = 'Avatar';
|
|
4724
|
+
|
|
4725
|
+
var _excluded$A = ["onChange", "style", "className"];
|
|
4940
4726
|
var SearchInput = styled__default["default"](Input$4).withConfig({
|
|
4941
4727
|
displayName: "Search__SearchInput",
|
|
4942
|
-
componentId: "sc-v8l23u-
|
|
4943
|
-
})(
|
|
4944
|
-
var theme = _ref2.theme,
|
|
4945
|
-
disabled = _ref2.disabled;
|
|
4946
|
-
return styled.css(["height:calc(", " - 2px);align-self:start;box-shadow:unset;&[type='search']::-webkit-search-decoration,&[type='search']::-webkit-search-cancel-button,&[type='search']::-webkit-search-results-button,&[type='search']::-webkit-search-results-decoration{-webkit-appearance:none;}", " &:focus{outline:none;}&:-webkit-autofill{box-shadow:0 0 0px 1000px ", " inset;}&:autofill{box-shadow:0 0 0px 1000px ", " inset;}", ""], theme.height, edsUtils.typographyTemplate(theme.typography), theme.background, theme.background, disabled && styled.css(["cursor:not-allowed;"]));
|
|
4947
|
-
});
|
|
4728
|
+
componentId: "sc-v8l23u-0"
|
|
4729
|
+
})(["input{&[type='search']::-webkit-search-decoration,&[type='search']::-webkit-search-cancel-button,&[type='search']::-webkit-search-results-button,&[type='search']::-webkit-search-results-decoration{-webkit-appearance:none;}}"]);
|
|
4948
4730
|
var InsideButton = styled__default["default"](Button).withConfig({
|
|
4949
4731
|
displayName: "Search__InsideButton",
|
|
4950
|
-
componentId: "sc-v8l23u-
|
|
4951
|
-
})(
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
var Search = /*#__PURE__*/react.forwardRef(function Search(_ref4, ref) {
|
|
4958
|
-
var _onChange = _ref4.onChange,
|
|
4959
|
-
_ref4$defaultValue = _ref4.defaultValue,
|
|
4960
|
-
defaultValue = _ref4$defaultValue === void 0 ? '' : _ref4$defaultValue,
|
|
4961
|
-
value = _ref4.value,
|
|
4962
|
-
_ref4$className = _ref4.className,
|
|
4963
|
-
className = _ref4$className === void 0 ? '' : _ref4$className,
|
|
4964
|
-
style = _ref4.style,
|
|
4965
|
-
_ref4$disabled = _ref4.disabled,
|
|
4966
|
-
disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
|
4967
|
-
_onBlur = _ref4.onBlur,
|
|
4968
|
-
_onFocus = _ref4.onFocus,
|
|
4969
|
-
rest = _objectWithoutProperties__default["default"](_ref4, _excluded$A);
|
|
4970
|
-
|
|
4971
|
-
var _useEds = useEds(),
|
|
4972
|
-
density = _useEds.density;
|
|
4732
|
+
componentId: "sc-v8l23u-1"
|
|
4733
|
+
})(["height:24px;width:24px;"]);
|
|
4734
|
+
var Search = /*#__PURE__*/react.forwardRef(function Search(_ref, ref) {
|
|
4735
|
+
var _onChange = _ref.onChange,
|
|
4736
|
+
style = _ref.style,
|
|
4737
|
+
className = _ref.className,
|
|
4738
|
+
rest = _objectWithoutProperties__default["default"](_ref, _excluded$A);
|
|
4973
4739
|
|
|
4974
|
-
var token = edsUtils.useToken({
|
|
4975
|
-
density: density
|
|
4976
|
-
}, search);
|
|
4977
|
-
var isControlled = typeof value !== 'undefined';
|
|
4978
|
-
var isActive = isControlled && value !== '' || defaultValue !== '';
|
|
4979
4740
|
var inputRef = react.useRef(null);
|
|
4980
4741
|
|
|
4981
|
-
var _useState = react.useState(
|
|
4982
|
-
isActive: isActive,
|
|
4983
|
-
isFocused: false
|
|
4984
|
-
}),
|
|
4742
|
+
var _useState = react.useState(Boolean(rest.defaultValue)),
|
|
4985
4743
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
4986
|
-
|
|
4987
|
-
|
|
4744
|
+
showClear = _useState2[0],
|
|
4745
|
+
setShowClear = _useState2[1];
|
|
4988
4746
|
|
|
4989
4747
|
react.useEffect(function () {
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
});
|
|
4995
|
-
}, [value, defaultValue, isActive]);
|
|
4996
|
-
|
|
4997
|
-
var handleOnClick = function handleOnClick() {
|
|
4998
|
-
var inputEl = inputRef.current;
|
|
4999
|
-
inputEl.focus();
|
|
5000
|
-
};
|
|
5001
|
-
|
|
5002
|
-
var handleFocus = function handleFocus() {
|
|
5003
|
-
return setState(function (prevState) {
|
|
5004
|
-
return _objectSpread__default["default"](_objectSpread__default["default"]({}, prevState), {}, {
|
|
5005
|
-
isFocused: true
|
|
5006
|
-
});
|
|
5007
|
-
});
|
|
5008
|
-
};
|
|
5009
|
-
|
|
5010
|
-
var handleBlur = function handleBlur() {
|
|
5011
|
-
return setState(function (prevState) {
|
|
5012
|
-
return _objectSpread__default["default"](_objectSpread__default["default"]({}, prevState), {}, {
|
|
5013
|
-
isFocused: false
|
|
5014
|
-
});
|
|
5015
|
-
});
|
|
5016
|
-
};
|
|
5017
|
-
|
|
5018
|
-
var handleOnChange = function handleOnChange(event) {
|
|
5019
|
-
setIsActive(event.target.value);
|
|
5020
|
-
};
|
|
4748
|
+
if (rest.value) {
|
|
4749
|
+
setShowClear(Boolean(rest.value));
|
|
4750
|
+
}
|
|
4751
|
+
}, [rest.value]);
|
|
5021
4752
|
|
|
5022
|
-
var
|
|
4753
|
+
var clearInputValue = function clearInputValue() {
|
|
5023
4754
|
var input = inputRef.current;
|
|
5024
4755
|
var clearedValue = '';
|
|
5025
4756
|
edsUtils.setReactInputValue(input, clearedValue);
|
|
5026
|
-
setState(function (prevState) {
|
|
5027
|
-
return _objectSpread__default["default"](_objectSpread__default["default"]({}, prevState), {}, {
|
|
5028
|
-
isActive: false
|
|
5029
|
-
});
|
|
5030
|
-
});
|
|
5031
|
-
};
|
|
5032
|
-
|
|
5033
|
-
var setIsActive = function setIsActive(newValue) {
|
|
5034
|
-
return setState(function (prevState) {
|
|
5035
|
-
return _objectSpread__default["default"](_objectSpread__default["default"]({}, prevState), {}, {
|
|
5036
|
-
isActive: newValue !== ''
|
|
5037
|
-
});
|
|
5038
|
-
});
|
|
5039
4757
|
};
|
|
5040
|
-
/** Applying props for controlled vs. uncontrolled scnarios */
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
var applyControllingProps = function applyControllingProps(props, value, defaultValue) {
|
|
5044
|
-
if (isControlled) {
|
|
5045
|
-
return _objectSpread__default["default"](_objectSpread__default["default"]({}, props), {}, {
|
|
5046
|
-
value: value
|
|
5047
|
-
});
|
|
5048
|
-
}
|
|
5049
4758
|
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
});
|
|
4759
|
+
var handleOnChange = function handleOnChange(e) {
|
|
4760
|
+
setShowClear(Boolean(e.currentTarget.value));
|
|
5053
4761
|
};
|
|
5054
4762
|
|
|
5055
|
-
var isFocused = state.isFocused;
|
|
5056
|
-
var size = 24;
|
|
5057
|
-
var containerProps = {
|
|
5058
|
-
isFocused: isFocused,
|
|
5059
|
-
className: className,
|
|
5060
|
-
style: style,
|
|
5061
|
-
disabled: disabled,
|
|
5062
|
-
role: 'search',
|
|
5063
|
-
'aria-label': rest['aria-label'],
|
|
5064
|
-
onClick: handleOnClick
|
|
5065
|
-
};
|
|
5066
4763
|
var combinedRef = react.useMemo(function () {
|
|
5067
4764
|
return edsUtils.mergeRefs(inputRef, ref);
|
|
5068
4765
|
}, [inputRef, ref]);
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
handleBlur();
|
|
5077
|
-
|
|
5078
|
-
if (_onBlur) {
|
|
5079
|
-
_onBlur(e);
|
|
5080
|
-
}
|
|
5081
|
-
},
|
|
5082
|
-
onFocus: function onFocus(e) {
|
|
5083
|
-
handleFocus();
|
|
5084
|
-
|
|
5085
|
-
if (_onFocus) {
|
|
5086
|
-
_onFocus(e);
|
|
5087
|
-
}
|
|
5088
|
-
},
|
|
5089
|
-
onChange: function onChange(e) {
|
|
5090
|
-
handleOnChange(e);
|
|
5091
|
-
|
|
5092
|
-
if (_onChange) {
|
|
5093
|
-
_onChange(e);
|
|
5094
|
-
}
|
|
5095
|
-
}
|
|
5096
|
-
}), value, defaultValue);
|
|
5097
|
-
var clearButtonProps = {
|
|
5098
|
-
isActive: state.isActive,
|
|
5099
|
-
onClick: function onClick(e) {
|
|
5100
|
-
e.stopPropagation();
|
|
4766
|
+
return /*#__PURE__*/jsxRuntime.jsx(InputWrapper$2, {
|
|
4767
|
+
role: "search",
|
|
4768
|
+
style: style,
|
|
4769
|
+
className: className,
|
|
4770
|
+
children: /*#__PURE__*/jsxRuntime.jsx(SearchInput, _objectSpread__default["default"]({
|
|
4771
|
+
onChange: function onChange(e) {
|
|
4772
|
+
handleOnChange(e);
|
|
5101
4773
|
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(Container$3, _objectSpread__default["default"](_objectSpread__default["default"]({}, containerProps), {}, {
|
|
5110
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
4774
|
+
if (_onChange) {
|
|
4775
|
+
_onChange(e);
|
|
4776
|
+
}
|
|
4777
|
+
},
|
|
4778
|
+
ref: combinedRef,
|
|
4779
|
+
leftAdornmentsWidth: 24 + 8,
|
|
4780
|
+
leftAdornments: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
5111
4781
|
data: edsIcons.search,
|
|
5112
4782
|
"aria-hidden": true,
|
|
5113
|
-
size:
|
|
5114
|
-
}),
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
4783
|
+
size: 18
|
|
4784
|
+
}),
|
|
4785
|
+
rightAdornmentsWidth: 24 + 8,
|
|
4786
|
+
rightAdornments: /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
4787
|
+
children: showClear && /*#__PURE__*/jsxRuntime.jsx(InsideButton, {
|
|
4788
|
+
"aria-label": 'clear search',
|
|
4789
|
+
title: "clear",
|
|
4790
|
+
variant: "ghost_icon",
|
|
4791
|
+
onClick: function onClick(e) {
|
|
4792
|
+
e.stopPropagation();
|
|
4793
|
+
clearInputValue();
|
|
4794
|
+
},
|
|
4795
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
4796
|
+
data: edsIcons.close,
|
|
4797
|
+
size: 16
|
|
4798
|
+
})
|
|
5121
4799
|
})
|
|
5122
|
-
})
|
|
5123
|
-
}))
|
|
4800
|
+
})
|
|
4801
|
+
}, rest))
|
|
5124
4802
|
});
|
|
5125
|
-
});
|
|
4803
|
+
});
|
|
5126
4804
|
|
|
5127
|
-
var _tokens$colors$
|
|
5128
|
-
_tokens$colors$ui = _tokens$colors$
|
|
4805
|
+
var _tokens$colors$9 = edsTokens.tokens.colors,
|
|
4806
|
+
_tokens$colors$ui = _tokens$colors$9.ui,
|
|
5129
4807
|
backgroundColor$1 = _tokens$colors$ui.background__light.rgba,
|
|
5130
4808
|
backgroundColorDefault = _tokens$colors$ui.background__default.rgba,
|
|
5131
4809
|
backgroundColorMedium$1 = _tokens$colors$ui.background__medium.rgba,
|
|
5132
|
-
_tokens$colors$intera$6 = _tokens$colors$
|
|
4810
|
+
_tokens$colors$intera$6 = _tokens$colors$9.interactive,
|
|
5133
4811
|
indicatorColor = _tokens$colors$intera$6.primary__resting.rgba,
|
|
5134
4812
|
primaryHoverAlt$3 = _tokens$colors$intera$6.primary__hover_alt.rgba,
|
|
5135
4813
|
primaryHover$1 = _tokens$colors$intera$6.primary__hover.rgba,
|
|
5136
|
-
focusOutlineColor$
|
|
4814
|
+
focusOutlineColor$4 = _tokens$colors$intera$6.focus.rgba,
|
|
5137
4815
|
backgroundColorDisabled = _tokens$colors$intera$6.disabled__fill.rgba,
|
|
5138
4816
|
backgroundBorderDisabled = _tokens$colors$intera$6.disabled__border.rgba,
|
|
5139
|
-
textColor$1 = _tokens$colors$
|
|
4817
|
+
textColor$1 = _tokens$colors$9.text.static_icons__tertiary.rgba,
|
|
5140
4818
|
paragraph = edsTokens.tokens.typography.paragraph,
|
|
5141
|
-
focusOutlineWidth$
|
|
4819
|
+
focusOutlineWidth$4 = edsTokens.tokens.interactions.focused.width;
|
|
5142
4820
|
var slider = {
|
|
5143
4821
|
background: backgroundColorDefault,
|
|
5144
4822
|
entities: {
|
|
@@ -5188,8 +4866,8 @@ var slider = {
|
|
|
5188
4866
|
focus: {
|
|
5189
4867
|
outline: {
|
|
5190
4868
|
type: 'outline',
|
|
5191
|
-
color: focusOutlineColor$
|
|
5192
|
-
width: focusOutlineWidth$
|
|
4869
|
+
color: focusOutlineColor$4,
|
|
4870
|
+
width: focusOutlineWidth$4,
|
|
5193
4871
|
style: 'dashed',
|
|
5194
4872
|
offset: '3px'
|
|
5195
4873
|
}
|
|
@@ -5623,9 +5301,9 @@ var Slider = /*#__PURE__*/react.forwardRef(function Slider(_ref10, ref) {
|
|
|
5623
5301
|
});
|
|
5624
5302
|
});
|
|
5625
5303
|
|
|
5626
|
-
var _tokens$colors$
|
|
5627
|
-
white = _tokens$colors$
|
|
5628
|
-
background$3 = _tokens$colors$
|
|
5304
|
+
var _tokens$colors$8 = edsTokens.tokens.colors,
|
|
5305
|
+
white = _tokens$colors$8.text.static_icons__primary_white.rgba,
|
|
5306
|
+
background$3 = _tokens$colors$8.ui.background__overlay.rgba,
|
|
5629
5307
|
ui = edsTokens.tokens.typography.ui,
|
|
5630
5308
|
_tokens$spacings$comf$8 = edsTokens.tokens.spacings.comfortable,
|
|
5631
5309
|
spacingXlarge = _tokens$spacings$comf$8.x_large,
|
|
@@ -5735,43 +5413,44 @@ var Tooltip = /*#__PURE__*/react.forwardRef(function Tooltip(_ref, ref) {
|
|
|
5735
5413
|
getReferenceProps = _useInteractions.getReferenceProps,
|
|
5736
5414
|
getFloatingProps = _useInteractions.getFloatingProps;
|
|
5737
5415
|
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5416
|
+
react.useEffect(function () {
|
|
5417
|
+
var staticSide = {
|
|
5418
|
+
top: 'bottom',
|
|
5419
|
+
right: 'left',
|
|
5420
|
+
bottom: 'top',
|
|
5421
|
+
left: 'right'
|
|
5422
|
+
}[finalPlacement.split('-')[0]];
|
|
5423
|
+
var arrowTransform = 'none';
|
|
5424
|
+
|
|
5425
|
+
switch (staticSide) {
|
|
5426
|
+
case 'right':
|
|
5427
|
+
arrowTransform = 'rotateY(180deg)';
|
|
5428
|
+
break;
|
|
5429
|
+
|
|
5430
|
+
case 'left':
|
|
5431
|
+
arrowTransform = 'none';
|
|
5432
|
+
break;
|
|
5433
|
+
|
|
5434
|
+
case 'top':
|
|
5435
|
+
arrowTransform = 'rotate(90deg)';
|
|
5436
|
+
break;
|
|
5437
|
+
|
|
5438
|
+
case 'bottom':
|
|
5439
|
+
arrowTransform = 'rotate(-90deg)';
|
|
5440
|
+
break;
|
|
5441
|
+
}
|
|
5442
|
+
|
|
5443
|
+
if (arrowRef.current) {
|
|
5444
|
+
var _Object$assign;
|
|
5445
|
+
|
|
5446
|
+
Object.assign(arrowRef.current.style, (_Object$assign = {
|
|
5447
|
+
left: arrowX != null ? "".concat(arrowX, "px") : '',
|
|
5448
|
+
top: arrowY != null ? "".concat(arrowY, "px") : '',
|
|
5449
|
+
right: '',
|
|
5450
|
+
bottom: ''
|
|
5451
|
+
}, _defineProperty__default["default"](_Object$assign, staticSide, '-6px'), _defineProperty__default["default"](_Object$assign, "transform", arrowTransform), _Object$assign));
|
|
5452
|
+
}
|
|
5453
|
+
});
|
|
5775
5454
|
var updatedChildren = /*#__PURE__*/react.cloneElement(children, _objectSpread__default["default"]({}, getReferenceProps(_objectSpread__default["default"]({
|
|
5776
5455
|
ref: anchorRef
|
|
5777
5456
|
}, children.props))));
|
|
@@ -5822,10 +5501,10 @@ var SnackbarAction = /*#__PURE__*/react.forwardRef(function SnackbarAction(_ref2
|
|
|
5822
5501
|
});
|
|
5823
5502
|
|
|
5824
5503
|
var typography$7 = edsTokens.tokens.typography.ui.snackbar,
|
|
5825
|
-
_tokens$colors$
|
|
5826
|
-
background$2 = _tokens$colors$
|
|
5827
|
-
color = _tokens$colors$
|
|
5828
|
-
buttonColor = _tokens$colors$
|
|
5504
|
+
_tokens$colors$7 = edsTokens.tokens.colors,
|
|
5505
|
+
background$2 = _tokens$colors$7.ui.background__overlay.rgba,
|
|
5506
|
+
color = _tokens$colors$7.text.static_icons__primary_white.rgba,
|
|
5507
|
+
buttonColor = _tokens$colors$7.interactive.link_in_snackbars.rgba,
|
|
5829
5508
|
_tokens$spacings$comf$7 = edsTokens.tokens.spacings.comfortable,
|
|
5830
5509
|
spacingMedium$4 = _tokens$spacings$comf$7.medium,
|
|
5831
5510
|
spacingXLarge = _tokens$spacings$comf$7.x_large,
|
|
@@ -5939,11 +5618,14 @@ var Snackbar = Snackbar$1;
|
|
|
5939
5618
|
Snackbar.Action = SnackbarAction;
|
|
5940
5619
|
|
|
5941
5620
|
var header = edsTokens.tokens.typography.ui.accordion_header,
|
|
5942
|
-
|
|
5621
|
+
_tokens$colors$6 = edsTokens.tokens.colors,
|
|
5622
|
+
background$1 = _tokens$colors$6.ui.background__default.rgba,
|
|
5623
|
+
focusOutlineColor$3 = _tokens$colors$6.interactive.focus.rgba,
|
|
5943
5624
|
_tokens$spacings$comf$6 = edsTokens.tokens.spacings.comfortable,
|
|
5944
5625
|
spacingMedium$3 = _tokens$spacings$comf$6.medium,
|
|
5945
5626
|
spacingSmall$3 = _tokens$spacings$comf$6.small,
|
|
5946
|
-
borderRadius$3 = edsTokens.tokens.shape.corners.borderRadius
|
|
5627
|
+
borderRadius$3 = edsTokens.tokens.shape.corners.borderRadius,
|
|
5628
|
+
focusOutlineWidth$3 = edsTokens.tokens.interactions.focused.width;
|
|
5947
5629
|
var popover = {
|
|
5948
5630
|
background: background$1,
|
|
5949
5631
|
typography: header,
|
|
@@ -5965,6 +5647,18 @@ var popover = {
|
|
|
5965
5647
|
spacings: {
|
|
5966
5648
|
top: '12px'
|
|
5967
5649
|
}
|
|
5650
|
+
},
|
|
5651
|
+
paper: {
|
|
5652
|
+
states: {
|
|
5653
|
+
focus: {
|
|
5654
|
+
outline: {
|
|
5655
|
+
type: 'outline',
|
|
5656
|
+
width: focusOutlineWidth$3,
|
|
5657
|
+
style: 'dashed',
|
|
5658
|
+
color: focusOutlineColor$3
|
|
5659
|
+
}
|
|
5660
|
+
}
|
|
5661
|
+
}
|
|
5968
5662
|
}
|
|
5969
5663
|
},
|
|
5970
5664
|
spacings: {
|
|
@@ -5982,16 +5676,14 @@ var popover = {
|
|
|
5982
5676
|
}
|
|
5983
5677
|
};
|
|
5984
5678
|
|
|
5985
|
-
var _excluded$u = ["children", "placement", "anchorEl", "style", "open", "onClose"];
|
|
5679
|
+
var _excluded$u = ["children", "placement", "anchorEl", "style", "open", "onClose", "withinPortal", "trapFocus"];
|
|
5986
5680
|
var PopoverPaper = styled__default["default"](Paper).withConfig({
|
|
5987
5681
|
displayName: "Popover__PopoverPaper",
|
|
5988
5682
|
componentId: "sc-b7p1is-0"
|
|
5989
5683
|
})(function (_ref) {
|
|
5990
|
-
var theme = _ref.theme
|
|
5991
|
-
|
|
5992
|
-
return styled.css(["", "
|
|
5993
|
-
display: open ? 'block' : 'none'
|
|
5994
|
-
}, edsUtils.typographyTemplate(theme.typography), theme.background, edsUtils.bordersTemplate(theme.border));
|
|
5684
|
+
var theme = _ref.theme;
|
|
5685
|
+
var paper = theme.entities.paper;
|
|
5686
|
+
return styled.css(["", " background:", ";", " z-index:1400;&:focus-visible{", "}"], edsUtils.typographyTemplate(theme.typography), theme.background, edsUtils.bordersTemplate(theme.border), edsUtils.outlineTemplate(paper.states.focus.outline));
|
|
5995
5687
|
});
|
|
5996
5688
|
var ArrowWrapper = styled__default["default"].div.withConfig({
|
|
5997
5689
|
displayName: "Popover__ArrowWrapper",
|
|
@@ -6022,6 +5714,8 @@ var Popover$1 = /*#__PURE__*/react.forwardRef(function Popover(_ref5, ref) {
|
|
|
6022
5714
|
style = _ref5.style,
|
|
6023
5715
|
open = _ref5.open,
|
|
6024
5716
|
onClose = _ref5.onClose,
|
|
5717
|
+
withinPortal = _ref5.withinPortal,
|
|
5718
|
+
trapFocus = _ref5.trapFocus,
|
|
6025
5719
|
rest = _objectWithoutProperties__default["default"](_ref5, _excluded$u);
|
|
6026
5720
|
|
|
6027
5721
|
var arrowRef = react.useRef(null);
|
|
@@ -6034,14 +5728,13 @@ var Popover$1 = /*#__PURE__*/react.forwardRef(function Popover(_ref5, ref) {
|
|
|
6034
5728
|
padding: 8
|
|
6035
5729
|
}), reactDomInteractions.arrow({
|
|
6036
5730
|
element: arrowRef
|
|
6037
|
-
})]
|
|
5731
|
+
})],
|
|
5732
|
+
whileElementsMounted: reactDomInteractions.autoUpdate
|
|
6038
5733
|
}),
|
|
6039
5734
|
x = _useFloating.x,
|
|
6040
5735
|
y = _useFloating.y,
|
|
6041
5736
|
reference = _useFloating.reference,
|
|
6042
5737
|
floating = _useFloating.floating,
|
|
6043
|
-
refs = _useFloating.refs,
|
|
6044
|
-
update = _useFloating.update,
|
|
6045
5738
|
strategy = _useFloating.strategy,
|
|
6046
5739
|
context = _useFloating.context,
|
|
6047
5740
|
_useFloating$middlewa = _useFloating.middlewareData.arrow;
|
|
@@ -6056,51 +5749,49 @@ var Popover$1 = /*#__PURE__*/react.forwardRef(function Popover(_ref5, ref) {
|
|
|
6056
5749
|
var popoverRef = react.useMemo(function () {
|
|
6057
5750
|
return edsUtils.mergeRefs(floating, ref);
|
|
6058
5751
|
}, [floating, ref]);
|
|
6059
|
-
react.useEffect(function () {
|
|
6060
|
-
if (refs.reference.current && refs.floating.current && open) {
|
|
6061
|
-
return reactDomInteractions.autoUpdate(refs.reference.current, refs.floating.current, update);
|
|
6062
|
-
}
|
|
6063
|
-
}, [refs.reference, refs.floating, update, open]);
|
|
6064
5752
|
|
|
6065
5753
|
var _useInteractions = reactDomInteractions.useInteractions([reactDomInteractions.useDismiss(context)]),
|
|
6066
5754
|
getFloatingProps = _useInteractions.getFloatingProps;
|
|
6067
5755
|
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
arrowTransform = '
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
case 'bottom':
|
|
6090
|
-
arrowTransform = 'rotate(-90deg)';
|
|
6091
|
-
break;
|
|
6092
|
-
}
|
|
5756
|
+
react.useEffect(function () {
|
|
5757
|
+
if (arrowRef.current) {
|
|
5758
|
+
var _Object$assign;
|
|
5759
|
+
|
|
5760
|
+
var staticSide = {
|
|
5761
|
+
top: 'bottom',
|
|
5762
|
+
right: 'left',
|
|
5763
|
+
bottom: 'top',
|
|
5764
|
+
left: 'right'
|
|
5765
|
+
}[finalPlacement.split('-')[0]];
|
|
5766
|
+
var arrowTransform = 'none';
|
|
5767
|
+
|
|
5768
|
+
switch (staticSide) {
|
|
5769
|
+
case 'right':
|
|
5770
|
+
arrowTransform = 'rotateY(180deg)';
|
|
5771
|
+
break;
|
|
5772
|
+
|
|
5773
|
+
case 'left':
|
|
5774
|
+
arrowTransform = 'none';
|
|
5775
|
+
break;
|
|
6093
5776
|
|
|
6094
|
-
|
|
6095
|
-
|
|
5777
|
+
case 'top':
|
|
5778
|
+
arrowTransform = 'rotate(90deg)';
|
|
5779
|
+
break;
|
|
6096
5780
|
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
5781
|
+
case 'bottom':
|
|
5782
|
+
arrowTransform = 'rotate(-90deg)';
|
|
5783
|
+
break;
|
|
5784
|
+
}
|
|
5785
|
+
|
|
5786
|
+
Object.assign(arrowRef.current.style, (_Object$assign = {
|
|
5787
|
+
left: arrowX != null ? "".concat(arrowX, "px") : '',
|
|
5788
|
+
top: arrowY != null ? "".concat(arrowY, "px") : '',
|
|
5789
|
+
right: '',
|
|
5790
|
+
bottom: ''
|
|
5791
|
+
}, _defineProperty__default["default"](_Object$assign, staticSide, '-6px'), _defineProperty__default["default"](_Object$assign, "transform", arrowTransform), _Object$assign));
|
|
5792
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5793
|
+
|
|
5794
|
+
}, [arrowRef.current, arrowX, arrowY, finalPlacement]);
|
|
6104
5795
|
|
|
6105
5796
|
var props = _objectSpread__default["default"]({
|
|
6106
5797
|
open: open
|
|
@@ -6112,7 +5803,8 @@ var Popover$1 = /*#__PURE__*/react.forwardRef(function Popover(_ref5, ref) {
|
|
|
6112
5803
|
var token = edsUtils.useToken({
|
|
6113
5804
|
density: density
|
|
6114
5805
|
}, popover);
|
|
6115
|
-
|
|
5806
|
+
|
|
5807
|
+
var popover$1 = /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
6116
5808
|
theme: token,
|
|
6117
5809
|
children: /*#__PURE__*/jsxRuntime.jsxs(PopoverPaper, _objectSpread__default["default"](_objectSpread__default["default"](_objectSpread__default["default"]({
|
|
6118
5810
|
elevation: "overlay"
|
|
@@ -6138,6 +5830,23 @@ var Popover$1 = /*#__PURE__*/react.forwardRef(function Popover(_ref5, ref) {
|
|
|
6138
5830
|
})]
|
|
6139
5831
|
}))
|
|
6140
5832
|
});
|
|
5833
|
+
|
|
5834
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
5835
|
+
children: withinPortal ? /*#__PURE__*/jsxRuntime.jsx(reactDomInteractions.FloatingPortal, {
|
|
5836
|
+
id: "eds-popover-container",
|
|
5837
|
+
children: open && trapFocus ? open && /*#__PURE__*/jsxRuntime.jsx(reactDomInteractions.FloatingFocusManager, {
|
|
5838
|
+
context: context,
|
|
5839
|
+
modal: true,
|
|
5840
|
+
children: popover$1
|
|
5841
|
+
}) : open && popover$1
|
|
5842
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
5843
|
+
children: trapFocus ? open && /*#__PURE__*/jsxRuntime.jsx(reactDomInteractions.FloatingFocusManager, {
|
|
5844
|
+
context: context,
|
|
5845
|
+
modal: true,
|
|
5846
|
+
children: popover$1
|
|
5847
|
+
}) : open && popover$1
|
|
5848
|
+
})
|
|
5849
|
+
});
|
|
6141
5850
|
});
|
|
6142
5851
|
|
|
6143
5852
|
var _excluded$t = ["children"];
|
|
@@ -7915,7 +7624,7 @@ var NativeSelect = /*#__PURE__*/react.forwardRef(function NativeSelect(_ref2, re
|
|
|
7915
7624
|
return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
|
|
7916
7625
|
theme: token,
|
|
7917
7626
|
children: /*#__PURE__*/jsxRuntime.jsxs(Container$2, _objectSpread__default["default"](_objectSpread__default["default"]({}, containerProps), {}, {
|
|
7918
|
-
children: [showLabel && /*#__PURE__*/jsxRuntime.jsx(Label$
|
|
7627
|
+
children: [showLabel && /*#__PURE__*/jsxRuntime.jsx(Label$2, _objectSpread__default["default"]({}, labelProps)), /*#__PURE__*/jsxRuntime.jsx(StyledSelect, _objectSpread__default["default"](_objectSpread__default["default"]({}, selectProps), {}, {
|
|
7919
7628
|
children: children
|
|
7920
7629
|
}))]
|
|
7921
7630
|
}))
|
|
@@ -8135,7 +7844,7 @@ var SingleSelect = /*#__PURE__*/react.forwardRef(function SingleSelect(_ref2, re
|
|
|
8135
7844
|
children: /*#__PURE__*/jsxRuntime.jsxs(Container$1, {
|
|
8136
7845
|
className: className,
|
|
8137
7846
|
ref: ref,
|
|
8138
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Label$
|
|
7847
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Label$2, _objectSpread__default["default"](_objectSpread__default["default"]({}, getLabelProps()), {}, {
|
|
8139
7848
|
label: label,
|
|
8140
7849
|
meta: meta,
|
|
8141
7850
|
disabled: disabled
|
|
@@ -8523,7 +8232,7 @@ var MultiSelect = /*#__PURE__*/react.forwardRef(function MultiSelect(_ref2, ref)
|
|
|
8523
8232
|
children: /*#__PURE__*/jsxRuntime.jsxs(Container$1, {
|
|
8524
8233
|
className: className,
|
|
8525
8234
|
ref: ref,
|
|
8526
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Label$
|
|
8235
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Label$2, _objectSpread__default["default"](_objectSpread__default["default"]({}, getLabelProps()), {}, {
|
|
8527
8236
|
label: label,
|
|
8528
8237
|
meta: meta,
|
|
8529
8238
|
disabled: disabled
|
|
@@ -9205,6 +8914,7 @@ var selectTokens = {
|
|
|
9205
8914
|
entities: {
|
|
9206
8915
|
button: {
|
|
9207
8916
|
height: '24px',
|
|
8917
|
+
width: '24px',
|
|
9208
8918
|
spacings: {
|
|
9209
8919
|
left: spacingSmall,
|
|
9210
8920
|
right: spacingSmall,
|
|
@@ -9298,33 +9008,26 @@ var Container = styled__default["default"].div.withConfig({
|
|
|
9298
9008
|
displayName: "Autocomplete__Container",
|
|
9299
9009
|
componentId: "sc-yvif0e-0"
|
|
9300
9010
|
})(["position:relative;"]);
|
|
9301
|
-
var StyledInput = styled__default["default"](Input$4).withConfig({
|
|
9302
|
-
displayName: "Autocomplete__StyledInput",
|
|
9303
|
-
componentId: "sc-yvif0e-1"
|
|
9304
|
-
})(function (_ref) {
|
|
9305
|
-
var button = _ref.theme.entities.button;
|
|
9306
|
-
return styled.css(["padding-right:calc( ", " + ", " + (", " * 2) );"], button.spacings.left, button.spacings.right, button.height);
|
|
9307
|
-
});
|
|
9308
9011
|
var StyledList = styled__default["default"](List$1).withConfig({
|
|
9309
9012
|
displayName: "Autocomplete__StyledList",
|
|
9310
|
-
componentId: "sc-yvif0e-
|
|
9311
|
-
})(function (
|
|
9312
|
-
var theme =
|
|
9013
|
+
componentId: "sc-yvif0e-1"
|
|
9014
|
+
})(function (_ref) {
|
|
9015
|
+
var theme = _ref.theme;
|
|
9313
9016
|
return styled.css(["background-color:", ";box-shadow:", ";", " overflow-y:auto;max-height:300px;padding:0;"], theme.background, theme.boxShadow, edsUtils.bordersTemplate(theme.border));
|
|
9314
9017
|
});
|
|
9315
9018
|
var StyledButton = styled__default["default"](Button).withConfig({
|
|
9316
9019
|
displayName: "Autocomplete__StyledButton",
|
|
9317
|
-
componentId: "sc-yvif0e-
|
|
9318
|
-
})(function (
|
|
9319
|
-
var button =
|
|
9320
|
-
return styled.css(["
|
|
9020
|
+
componentId: "sc-yvif0e-2"
|
|
9021
|
+
})(function (_ref2) {
|
|
9022
|
+
var button = _ref2.theme.entities.button;
|
|
9023
|
+
return styled.css(["height:", ";width:", ";"], button.height, button.height);
|
|
9321
9024
|
});
|
|
9322
9025
|
|
|
9323
|
-
var findIndex = function findIndex(
|
|
9324
|
-
var calc =
|
|
9325
|
-
index =
|
|
9326
|
-
optionDisabled =
|
|
9327
|
-
availableItems =
|
|
9026
|
+
var findIndex = function findIndex(_ref3) {
|
|
9027
|
+
var calc = _ref3.calc,
|
|
9028
|
+
index = _ref3.index,
|
|
9029
|
+
optionDisabled = _ref3.optionDisabled,
|
|
9030
|
+
availableItems = _ref3.availableItems;
|
|
9328
9031
|
var nextItem = availableItems[index];
|
|
9329
9032
|
|
|
9330
9033
|
if (optionDisabled(nextItem)) {
|
|
@@ -9340,10 +9043,10 @@ var findIndex = function findIndex(_ref4) {
|
|
|
9340
9043
|
return index;
|
|
9341
9044
|
};
|
|
9342
9045
|
|
|
9343
|
-
var findNextIndex = function findNextIndex(
|
|
9344
|
-
var index =
|
|
9345
|
-
optionDisabled =
|
|
9346
|
-
availableItems =
|
|
9046
|
+
var findNextIndex = function findNextIndex(_ref4) {
|
|
9047
|
+
var index = _ref4.index,
|
|
9048
|
+
optionDisabled = _ref4.optionDisabled,
|
|
9049
|
+
availableItems = _ref4.availableItems;
|
|
9347
9050
|
var options = {
|
|
9348
9051
|
index: index,
|
|
9349
9052
|
optionDisabled: optionDisabled,
|
|
@@ -9364,10 +9067,10 @@ var findNextIndex = function findNextIndex(_ref5) {
|
|
|
9364
9067
|
return nextIndex;
|
|
9365
9068
|
};
|
|
9366
9069
|
|
|
9367
|
-
var findPrevIndex = function findPrevIndex(
|
|
9368
|
-
var index =
|
|
9369
|
-
optionDisabled =
|
|
9370
|
-
availableItems =
|
|
9070
|
+
var findPrevIndex = function findPrevIndex(_ref5) {
|
|
9071
|
+
var index = _ref5.index,
|
|
9072
|
+
optionDisabled = _ref5.optionDisabled,
|
|
9073
|
+
availableItems = _ref5.availableItems;
|
|
9371
9074
|
var options = {
|
|
9372
9075
|
index: index,
|
|
9373
9076
|
optionDisabled: optionDisabled,
|
|
@@ -9517,8 +9220,8 @@ function AutocompleteInner(props, ref) {
|
|
|
9517
9220
|
items: availableItems,
|
|
9518
9221
|
initialSelectedItem: initialSelectedOptions[0],
|
|
9519
9222
|
itemToString: getLabel,
|
|
9520
|
-
onInputValueChange: function onInputValueChange(
|
|
9521
|
-
var inputValue =
|
|
9223
|
+
onInputValueChange: function onInputValueChange(_ref6) {
|
|
9224
|
+
var inputValue = _ref6.inputValue;
|
|
9522
9225
|
setAvailableItems(options.filter(function (item) {
|
|
9523
9226
|
if (optionsFilter) {
|
|
9524
9227
|
return optionsFilter(item, inputValue);
|
|
@@ -9527,16 +9230,16 @@ function AutocompleteInner(props, ref) {
|
|
|
9527
9230
|
return getLabel(item).toLowerCase().includes(inputValue.toLowerCase());
|
|
9528
9231
|
}));
|
|
9529
9232
|
},
|
|
9530
|
-
onIsOpenChange: function onIsOpenChange(
|
|
9531
|
-
var selectedItem =
|
|
9233
|
+
onIsOpenChange: function onIsOpenChange(_ref7) {
|
|
9234
|
+
var selectedItem = _ref7.selectedItem;
|
|
9532
9235
|
|
|
9533
9236
|
if (!multiple && selectedItem !== null) {
|
|
9534
9237
|
setAvailableItems(options);
|
|
9535
9238
|
}
|
|
9536
9239
|
},
|
|
9537
|
-
onStateChange: function onStateChange(
|
|
9538
|
-
var type =
|
|
9539
|
-
selectedItem =
|
|
9240
|
+
onStateChange: function onStateChange(_ref8) {
|
|
9241
|
+
var type = _ref8.type,
|
|
9242
|
+
selectedItem = _ref8.selectedItem;
|
|
9540
9243
|
|
|
9541
9244
|
switch (type) {
|
|
9542
9245
|
case downshift.useCombobox.stateChangeTypes.InputChange:
|
|
@@ -9645,6 +9348,7 @@ function AutocompleteInner(props, ref) {
|
|
|
9645
9348
|
});
|
|
9646
9349
|
|
|
9647
9350
|
case downshift.useCombobox.stateChangeTypes.InputBlur:
|
|
9351
|
+
setTypedInputValue('');
|
|
9648
9352
|
return _objectSpread__default["default"](_objectSpread__default["default"]({}, changes), {}, {
|
|
9649
9353
|
inputValue: ''
|
|
9650
9354
|
});
|
|
@@ -9691,10 +9395,10 @@ function AutocompleteInner(props, ref) {
|
|
|
9691
9395
|
middleware: [reactDomInteractions.offset(4), reactDomInteractions.flip(), reactDomInteractions.shift({
|
|
9692
9396
|
padding: 8
|
|
9693
9397
|
}), reactDomInteractions.size({
|
|
9694
|
-
apply: function apply(
|
|
9695
|
-
var rects =
|
|
9696
|
-
availableHeight =
|
|
9697
|
-
elements =
|
|
9398
|
+
apply: function apply(_ref9) {
|
|
9399
|
+
var rects = _ref9.rects,
|
|
9400
|
+
availableHeight = _ref9.availableHeight,
|
|
9401
|
+
elements = _ref9.elements;
|
|
9698
9402
|
var anchorWidth = "".concat(rects.reference.width, "px");
|
|
9699
9403
|
Object.assign(elements.floating.style, {
|
|
9700
9404
|
width: "".concat(autoWidth ? anchorWidth : 'auto'),
|
|
@@ -9741,7 +9445,7 @@ function AutocompleteInner(props, ref) {
|
|
|
9741
9445
|
position: strategy,
|
|
9742
9446
|
top: y || 0,
|
|
9743
9447
|
left: x || 0,
|
|
9744
|
-
zIndex:
|
|
9448
|
+
zIndex: 1500
|
|
9745
9449
|
}
|
|
9746
9450
|
})), {}, {
|
|
9747
9451
|
children: /*#__PURE__*/jsxRuntime.jsx(StyledList, _objectSpread__default["default"](_objectSpread__default["default"]({}, getMenuProps({
|
|
@@ -9774,12 +9478,12 @@ function AutocompleteInner(props, ref) {
|
|
|
9774
9478
|
className: className,
|
|
9775
9479
|
style: style,
|
|
9776
9480
|
ref: ref,
|
|
9777
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Label$
|
|
9481
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Label$2, _objectSpread__default["default"](_objectSpread__default["default"]({}, getLabelProps()), {}, {
|
|
9778
9482
|
label: label,
|
|
9779
9483
|
meta: meta,
|
|
9780
9484
|
disabled: disabled
|
|
9781
|
-
})), /*#__PURE__*/jsxRuntime.
|
|
9782
|
-
children:
|
|
9485
|
+
})), /*#__PURE__*/jsxRuntime.jsx(Container, _objectSpread__default["default"](_objectSpread__default["default"]({}, getComboboxProps()), {}, {
|
|
9486
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Input$4, _objectSpread__default["default"](_objectSpread__default["default"]({}, getInputProps( // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9783
9487
|
getDropdownProps({
|
|
9784
9488
|
preventKeyAction: multiple ? isOpen : undefined,
|
|
9785
9489
|
disabled: disabled,
|
|
@@ -9793,31 +9497,32 @@ function AutocompleteInner(props, ref) {
|
|
|
9793
9497
|
placeholder: placeholderText,
|
|
9794
9498
|
readOnly: readOnly,
|
|
9795
9499
|
onFocus: openSelect,
|
|
9796
|
-
onClick: openSelect
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9500
|
+
onClick: openSelect,
|
|
9501
|
+
rightAdornmentsWidth: 24 * 2 + 8 + 8,
|
|
9502
|
+
rightAdornments: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9503
|
+
children: [showClearButton && /*#__PURE__*/jsxRuntime.jsx(StyledButton, {
|
|
9504
|
+
variant: "ghost_icon",
|
|
9505
|
+
disabled: disabled || readOnly,
|
|
9506
|
+
"aria-label": 'clear options',
|
|
9507
|
+
title: "clear",
|
|
9508
|
+
onClick: clear,
|
|
9509
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
9510
|
+
data: edsIcons.close,
|
|
9511
|
+
size: 16
|
|
9512
|
+
})
|
|
9513
|
+
}), !readOnly && /*#__PURE__*/jsxRuntime.jsx(StyledButton, _objectSpread__default["default"](_objectSpread__default["default"]({
|
|
9514
|
+
variant: "ghost_icon"
|
|
9515
|
+
}, getToggleButtonProps({
|
|
9516
|
+
disabled: disabled || readOnly
|
|
9517
|
+
})), {}, {
|
|
9518
|
+
"aria-label": 'toggle options',
|
|
9519
|
+
title: "open",
|
|
9520
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon$1, {
|
|
9521
|
+
data: isOpen ? edsIcons.arrow_drop_up : edsIcons.arrow_drop_down
|
|
9522
|
+
})
|
|
9523
|
+
}))]
|
|
9819
9524
|
})
|
|
9820
|
-
}))
|
|
9525
|
+
}, other))
|
|
9821
9526
|
})), disablePortal ? optionsList : /*#__PURE__*/jsxRuntime.jsx(reactDomInteractions.FloatingPortal, {
|
|
9822
9527
|
id: "eds-autocomplete-container",
|
|
9823
9528
|
children: optionsList
|
|
@@ -9844,7 +9549,8 @@ exports.DotProgress = DotProgress;
|
|
|
9844
9549
|
exports.EdsProvider = EdsProvider;
|
|
9845
9550
|
exports.Icon = Icon$1;
|
|
9846
9551
|
exports.Input = Input$4;
|
|
9847
|
-
exports.
|
|
9552
|
+
exports.InputWrapper = InputWrapper$2;
|
|
9553
|
+
exports.Label = Label$2;
|
|
9848
9554
|
exports.LinearProgress = LinearProgress;
|
|
9849
9555
|
exports.List = List$1;
|
|
9850
9556
|
exports.Menu = Menu;
|