@equinor/eds-core-react 0.20.5-dev.20220701 → 0.21.0-dev.20220905

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.
Files changed (63) hide show
  1. package/README.md +8 -0
  2. package/dist/eds-core-react.cjs.js +476 -269
  3. package/dist/esm/components/Accordion/Accordion.tokens.js +7 -0
  4. package/dist/esm/components/Accordion/AccordionHeader.js +4 -0
  5. package/dist/esm/components/Accordion/AccordionHeaderActions.js +3 -1
  6. package/dist/esm/components/Accordion/AccordionHeaderTitle.js +3 -1
  7. package/dist/esm/components/Accordion/AccordionPanel.js +2 -2
  8. package/dist/esm/components/Autocomplete/Autocomplete.js +87 -67
  9. package/dist/esm/components/Breadcrumbs/Breadcrumb.js +4 -2
  10. package/dist/esm/components/Button/Button.js +1 -1
  11. package/dist/esm/components/Button/ButtonGroup/ButtonGroup.js +37 -0
  12. package/dist/esm/components/Button/ButtonGroup/ButtonGroup.tokens.js +17 -0
  13. package/dist/esm/components/Button/index.js +8 -0
  14. package/dist/esm/components/Card/Card.js +3 -12
  15. package/dist/esm/components/Checkbox/Checkbox.js +4 -0
  16. package/dist/esm/components/Checkbox/Input.js +5 -1
  17. package/dist/esm/components/Menu/Menu.js +56 -40
  18. package/dist/esm/components/Menu/MenuItem.js +2 -2
  19. package/dist/esm/components/Pagination/Pagination.js +1 -1
  20. package/dist/esm/components/Pagination/PaginationItem.js +1 -1
  21. package/dist/esm/components/Popover/Popover.js +90 -35
  22. package/dist/esm/components/Radio/Radio.js +4 -0
  23. package/dist/esm/components/Scrim/Scrim.js +3 -3
  24. package/dist/esm/components/Search/Search.js +7 -4
  25. package/dist/esm/components/Select/NativeSelect/NativeSelect.js +3 -1
  26. package/dist/esm/components/Select/commonStyles.js +1 -1
  27. package/dist/esm/components/SideSheet/SideSheet.js +8 -6
  28. package/dist/esm/components/SideSheet/SideSheet.tokens.js +7 -0
  29. package/dist/esm/components/Switch/Switch.js +6 -0
  30. package/dist/esm/components/Switch/SwitchDefault.js +4 -0
  31. package/dist/esm/components/Switch/SwitchSmall.js +4 -0
  32. package/dist/esm/components/Tabs/TabList.js +2 -3
  33. package/dist/esm/components/Tabs/Tabs.js +3 -3
  34. package/dist/esm/components/Textarea/Textarea.js +4 -3
  35. package/dist/esm/components/Tooltip/Tooltip.js +102 -83
  36. package/dist/esm/components/TopBar/TopBar.tokens.js +2 -2
  37. package/dist/esm/index.js +1 -1
  38. package/dist/types/components/Autocomplete/Autocomplete.d.ts +4 -0
  39. package/dist/types/components/Breadcrumbs/Breadcrumb.d.ts +9 -6
  40. package/dist/types/components/Button/Button.d.ts +3 -24
  41. package/dist/types/components/Button/ButtonGroup/ButtonGroup.d.ts +9 -0
  42. package/dist/types/components/{Group/Group.tokens.d.ts → Button/ButtonGroup/ButtonGroup.tokens.d.ts} +0 -0
  43. package/dist/types/components/Button/ButtonGroup/index.d.ts +1 -0
  44. package/dist/types/components/Button/index.d.ts +8 -1
  45. package/dist/types/components/Checkbox/Checkbox.d.ts +13 -5
  46. package/dist/types/components/Checkbox/Input.d.ts +10 -5
  47. package/dist/types/components/Icon/Icon.d.ts +1 -1
  48. package/dist/types/components/Menu/Menu.d.ts +1 -1
  49. package/dist/types/components/Popover/Popover.d.ts +1 -1
  50. package/dist/types/components/Progress/Circular/CircularProgress.d.ts +1 -1
  51. package/dist/types/components/Progress/Dots/DotProgress.d.ts +1 -1
  52. package/dist/types/components/Progress/Star/StarProgress.d.ts +1 -1
  53. package/dist/types/components/Radio/Radio.d.ts +8 -5
  54. package/dist/types/components/Select/commonStyles.d.ts +5 -9
  55. package/dist/types/components/SideSheet/SideSheet.d.ts +4 -0
  56. package/dist/types/components/Switch/Switch.d.ts +10 -5
  57. package/dist/types/components/Switch/SwitchDefault.d.ts +3 -5
  58. package/dist/types/components/Switch/SwitchSmall.d.ts +3 -5
  59. package/dist/types/components/Tooltip/Tooltip.d.ts +1 -1
  60. package/dist/types/components/Typography/Typography.d.ts +11 -3
  61. package/package.json +3 -3
  62. package/dist/types/components/Group/Group.d.ts +0 -3
  63. package/dist/types/components/Group/index.d.ts +0 -1
@@ -9,6 +9,7 @@ var edsUtils = require('@equinor/eds-utils');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
  var edsIcons = require('@equinor/eds-icons');
11
11
  var ReactDom = require('react-dom');
12
+ var reactDomInteractions = require('@floating-ui/react-dom-interactions');
12
13
  var downshift = require('downshift');
13
14
 
14
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -959,9 +960,9 @@ const ButtonBase = styled__default["default"].button.withConfig({
959
960
  hover,
960
961
  disabled
961
962
  } = states;
962
- return styled.css(["margin:0;padding:0;text-decoration:none;position:relative;cursor:pointer;display:inline-block;background:", ";height:", ";width:", ";svg{justify-self:center;}", " ", " ", " &::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}&::after{position:absolute;top:-", ";left:-", ";width:", ";height:", ";content:'';}@media (hover:hover) and (pointer:fine){&:hover{background:", ";color:", ";", ";}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}&::-moz-focus-inner{border:0;}&:disabled{cursor:not-allowed;background:", ";", ";", ";@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}}"], theme.background, theme.height, theme.width, edsUtils.spacingsTemplate(theme.spacings), edsUtils.bordersTemplate(theme.border), edsUtils.typographyTemplate(theme.typography), clickbound === null || clickbound === void 0 ? void 0 : (_clickbound$offset = clickbound.offset) === null || _clickbound$offset === void 0 ? void 0 : _clickbound$offset.top, clickbound === null || clickbound === void 0 ? void 0 : (_clickbound$offset2 = clickbound.offset) === null || _clickbound$offset2 === void 0 ? void 0 : _clickbound$offset2.left, clickbound === null || clickbound === void 0 ? void 0 : clickbound.width, clickbound === null || clickbound === void 0 ? void 0 : clickbound.height, hover.background, (_hover$typography = hover.typography) === null || _hover$typography === void 0 ? void 0 : _hover$typography.color, edsUtils.bordersTemplate(hover === null || hover === void 0 ? void 0 : hover.border), edsUtils.outlineTemplate(focus.outline), edsUtils.outlineTemplate(focus.outline), disabled.background, edsUtils.bordersTemplate(disabled.border), edsUtils.typographyTemplate(disabled.typography), disabled.background);
963
+ return styled.css(["box-sizing:border-box;margin:0;padding:0;text-decoration:none;position:relative;cursor:pointer;display:inline-block;background:", ";height:", ";width:", ";svg{justify-self:center;}", " ", " ", " &::before{position:absolute;top:0;left:0;width:auto;min-height:auto;content:'';}&::after{position:absolute;top:-", ";left:-", ";width:", ";height:", ";content:'';}@media (hover:hover) and (pointer:fine){&:hover{background:", ";color:", ";", ";}}&:focus{outline:none;}&[data-focus-visible-added]:focus{", "}&:focus-visible{", "}&::-moz-focus-inner{border:0;}&:disabled{cursor:not-allowed;background:", ";", ";", ";@media (hover:hover) and (pointer:fine){&:hover{background:", ";}}}"], theme.background, theme.height, theme.width, edsUtils.spacingsTemplate(theme.spacings), edsUtils.bordersTemplate(theme.border), edsUtils.typographyTemplate(theme.typography), clickbound === null || clickbound === void 0 ? void 0 : (_clickbound$offset = clickbound.offset) === null || _clickbound$offset === void 0 ? void 0 : _clickbound$offset.top, clickbound === null || clickbound === void 0 ? void 0 : (_clickbound$offset2 = clickbound.offset) === null || _clickbound$offset2 === void 0 ? void 0 : _clickbound$offset2.left, clickbound === null || clickbound === void 0 ? void 0 : clickbound.width, clickbound === null || clickbound === void 0 ? void 0 : clickbound.height, hover.background, (_hover$typography = hover.typography) === null || _hover$typography === void 0 ? void 0 : _hover$typography.color, edsUtils.bordersTemplate(hover === null || hover === void 0 ? void 0 : hover.border), edsUtils.outlineTemplate(focus.outline), edsUtils.outlineTemplate(focus.outline), disabled.background, edsUtils.bordersTemplate(disabled.border), edsUtils.typographyTemplate(disabled.typography), disabled.background);
963
964
  });
964
- const Button = /*#__PURE__*/react.forwardRef(function Button(_ref2, ref) {
965
+ const Button$1 = /*#__PURE__*/react.forwardRef(function Button(_ref2, ref) {
965
966
  let {
966
967
  color = 'primary',
967
968
  variant = 'contained',
@@ -1003,7 +1004,56 @@ const Button = /*#__PURE__*/react.forwardRef(function Button(_ref2, ref) {
1003
1004
  });
1004
1005
 
1005
1006
  const {
1006
- typography: typography$h,
1007
+ shape: {
1008
+ corners: {
1009
+ borderRadius: borderRadius$9
1010
+ }
1011
+ }
1012
+ } = edsTokens.tokens;
1013
+ const group = {
1014
+ border: {
1015
+ type: 'border',
1016
+ radius: borderRadius$9
1017
+ }
1018
+ };
1019
+
1020
+ const {
1021
+ border: border$4
1022
+ } = group;
1023
+ const radius$1 = border$4.type === 'border' && border$4.radius;
1024
+ const ButtonGroupBase = styled__default["default"].div.withConfig({
1025
+ displayName: "ButtonGroup__ButtonGroupBase",
1026
+ componentId: "sc-1fn8jon-0"
1027
+ })(["display:inline-flex;> *{border-radius:0;@media (hover:hover) and (pointer:fine){&:hover{border-radius:0;}}}", ""], _ref => {
1028
+ let {
1029
+ vertical
1030
+ } = _ref;
1031
+ return vertical ? styled.css(["flex-direction:column;> :first-child{border-top-left-radius:", ";border-top-right-radius:", ";}> :last-child{border-bottom-left-radius:", ";border-bottom-right-radius:", ";}> :not(:last-child){border-bottom:none;}"], radius$1, radius$1, radius$1, radius$1) : styled.css(["> :first-child{border-top-left-radius:", ";border-bottom-left-radius:", ";}> :last-child{border-top-right-radius:", ";border-bottom-right-radius:", ";}> :not(:last-child){border-right:none;}"], radius$1, radius$1, radius$1, radius$1);
1032
+ });
1033
+ const ButtonGroup = /*#__PURE__*/react.forwardRef(function ButtonGroup(_ref2, ref) {
1034
+ let {
1035
+ children,
1036
+ vertical,
1037
+ ...rest
1038
+ } = _ref2;
1039
+ const props = {
1040
+ ref,
1041
+ vertical,
1042
+ ...rest
1043
+ };
1044
+ return /*#__PURE__*/jsxRuntime.jsx(ButtonGroupBase, {
1045
+ role: "group",
1046
+ ...props,
1047
+ children: children
1048
+ });
1049
+ });
1050
+
1051
+ const Button = Button$1;
1052
+ Button.Group = ButtonGroup;
1053
+ Button.Group.displayName = 'Button.Group';
1054
+
1055
+ const {
1056
+ typography: typography$i,
1007
1057
  colors: colorsToken,
1008
1058
  interactions: {
1009
1059
  focused: {
@@ -1014,7 +1064,7 @@ const {
1014
1064
  const {
1015
1065
  heading,
1016
1066
  paragraph: paragraph$2
1017
- } = typography$h;
1067
+ } = typography$i;
1018
1068
  const {
1019
1069
  interactive: {
1020
1070
  primary__resting: {
@@ -1096,7 +1146,7 @@ const findTypography = (variantName, group) => {
1096
1146
  return quickVariants[variantName];
1097
1147
  }
1098
1148
 
1099
- return typography$h[group][variantName];
1149
+ return typography$i[group][variantName];
1100
1150
  };
1101
1151
 
1102
1152
  const findColor = function () {
@@ -1907,7 +1957,7 @@ const {
1907
1957
  x_small: x_small$5
1908
1958
  }
1909
1959
  },
1910
- typography: typography$g,
1960
+ typography: typography$h,
1911
1961
  shape: shape$2
1912
1962
  } = edsTokens.tokens;
1913
1963
  const input$2 = {
@@ -1919,7 +1969,7 @@ const input$2 = {
1919
1969
  top: '6px',
1920
1970
  bottom: '6px'
1921
1971
  },
1922
- typography: { ...typography$g.input.text,
1972
+ typography: { ...typography$h.input.text,
1923
1973
  color: static_icons__default.rgba
1924
1974
  },
1925
1975
  entities: {
@@ -2208,7 +2258,7 @@ const InputIcon = /*#__PURE__*/react.forwardRef(function InputIcon(_ref2, ref) {
2208
2258
 
2209
2259
  const {
2210
2260
  colors: colors$6,
2211
- typography: typography$f,
2261
+ typography: typography$g,
2212
2262
  spacings: {
2213
2263
  comfortable: {
2214
2264
  small: small$5,
@@ -2246,7 +2296,7 @@ const textfield$1 = {
2246
2296
  },
2247
2297
  entities: {
2248
2298
  unit: {
2249
- typography: { ...typography$f.input.label,
2299
+ typography: { ...typography$g.input.label,
2250
2300
  color: colors$6.text.static_icons__tertiary.hex
2251
2301
  },
2252
2302
  states: {
@@ -2405,8 +2455,9 @@ const Textarea = /*#__PURE__*/react.forwardRef(function Textarea(_ref2, ref) {
2405
2455
  const padding = parseInt(top) + parseInt(bottom);
2406
2456
  const maxHeight = parseFloat(lineHeight) * fontSize * rowsMax + padding;
2407
2457
  edsUtils.useAutoResize(textareaEl, rowsMax ? maxHeight : null);
2458
+ const combinedRef = react.useMemo(() => edsUtils.mergeRefs(ref, setTextareaEl), [setTextareaEl, ref]);
2408
2459
  const inputProps = {
2409
- ref: edsUtils.useCombinedRefs(ref, setTextareaEl),
2460
+ ref: combinedRef,
2410
2461
  type,
2411
2462
  disabled,
2412
2463
  variant,
@@ -2569,11 +2620,11 @@ const {
2569
2620
  spacings: {
2570
2621
  comfortable: comfortable$5
2571
2622
  },
2572
- typography: typography$e
2623
+ typography: typography$f
2573
2624
  } = edsTokens.tokens;
2574
2625
  const label = {
2575
2626
  background: colors$5.ui.background__light.rgba,
2576
- typography: { ...typography$e.input.label,
2627
+ typography: { ...typography$f.input.label,
2577
2628
  color: colors$5.text.static_icons__tertiary.rgba
2578
2629
  },
2579
2630
  spacings: {
@@ -2633,11 +2684,11 @@ const {
2633
2684
  spacings: {
2634
2685
  comfortable: comfortable$4
2635
2686
  },
2636
- typography: typography$d
2687
+ typography: typography$e
2637
2688
  } = edsTokens.tokens;
2638
2689
  const helperText = {
2639
2690
  background: colors$4.ui.background__light.hex,
2640
- typography: typography$d.input.helper,
2691
+ typography: typography$e.input.helper,
2641
2692
  spacings: {
2642
2693
  comfortable: {
2643
2694
  left: comfortable$4.small,
@@ -2991,7 +3042,7 @@ const list = {
2991
3042
  };
2992
3043
 
2993
3044
  const {
2994
- typography: typography$c
3045
+ typography: typography$d
2995
3046
  } = list;
2996
3047
  const StyledList$2 = styled__default["default"].ul.withConfig({
2997
3048
  displayName: "List__StyledList",
@@ -3001,7 +3052,7 @@ const StyledList$2 = styled__default["default"].ul.withConfig({
3001
3052
  as
3002
3053
  } = _ref;
3003
3054
  return as === 'ol' ? styled.css(["& ol{list-style-type:lower-alpha;}"]) : '';
3004
- }, edsUtils.typographyTemplate(typography$c));
3055
+ }, edsUtils.typographyTemplate(typography$d));
3005
3056
  const List$2 = /*#__PURE__*/react.forwardRef(function List(_ref2, ref) {
3006
3057
  let {
3007
3058
  children,
@@ -3035,7 +3086,7 @@ List$1.Item.displayName = 'List.Item';
3035
3086
  const {
3036
3087
  typography: {
3037
3088
  ui: {
3038
- accordion_header: typography$b
3089
+ accordion_header: typography$c
3039
3090
  }
3040
3091
  },
3041
3092
  colors: {
@@ -3079,6 +3130,11 @@ const {
3079
3130
  focused: {
3080
3131
  width: focusOutlineWidth$6
3081
3132
  }
3133
+ },
3134
+ typography: {
3135
+ input: {
3136
+ text
3137
+ }
3082
3138
  }
3083
3139
  } = edsTokens.tokens;
3084
3140
  const accordion = {
@@ -3100,7 +3156,7 @@ const accordion = {
3100
3156
  header: {
3101
3157
  height: '48px',
3102
3158
  background: backgroundDefault,
3103
- typography: typography$b,
3159
+ typography: typography$c,
3104
3160
  spacings: {
3105
3161
  left: mediumSpacing,
3106
3162
  right: mediumSpacing
@@ -3116,12 +3172,12 @@ const accordion = {
3116
3172
  }
3117
3173
  },
3118
3174
  disabled: {
3119
- typography: { ...typography$b,
3175
+ typography: { ...typography$c,
3120
3176
  color: disabledColor$2
3121
3177
  }
3122
3178
  },
3123
3179
  active: {
3124
- typography: { ...typography$b,
3180
+ typography: { ...typography$c,
3125
3181
  color: activatedColor
3126
3182
  }
3127
3183
  },
@@ -3136,6 +3192,8 @@ const accordion = {
3136
3192
  left: mediumSpacing,
3137
3193
  right: mediumSpacing,
3138
3194
  top: mediumSpacing
3195
+ },
3196
+ typography: { ...text
3139
3197
  }
3140
3198
  },
3141
3199
  icon: {
@@ -3248,12 +3306,14 @@ const AccordionHeaderTitle = /*#__PURE__*/react.forwardRef(function AccordionHea
3248
3306
  let {
3249
3307
  isExpanded,
3250
3308
  disabled,
3251
- children
3309
+ children,
3310
+ ...rest
3252
3311
  } = _ref2;
3253
3312
  return /*#__PURE__*/jsxRuntime.jsx(StyledAccordionHeaderTitle, {
3254
3313
  ref: ref,
3255
3314
  isExpanded: isExpanded,
3256
3315
  disabled: disabled,
3316
+ ...rest,
3257
3317
  children: children
3258
3318
  });
3259
3319
  }); // AccordionHeaderTitle.displayName = 'AccordionHeaderTitle'
@@ -3286,12 +3346,14 @@ const AccordionHeaderActions = /*#__PURE__*/react.forwardRef(function AccordionH
3286
3346
  let {
3287
3347
  isExpanded,
3288
3348
  disabled,
3289
- children
3349
+ children,
3350
+ ...rest
3290
3351
  } = _ref2;
3291
3352
  return /*#__PURE__*/jsxRuntime.jsx(StyledAccordionHeaderActions, {
3292
3353
  ref: ref,
3293
3354
  isExpanded: isExpanded,
3294
3355
  disabled: disabled,
3356
+ ...rest,
3295
3357
  children: children
3296
3358
  });
3297
3359
  });
@@ -3388,6 +3450,8 @@ const AccordionHeader = /*#__PURE__*/react.forwardRef(function AccordionHeader(_
3388
3450
  children,
3389
3451
  toggleExpanded,
3390
3452
  disabled,
3453
+ className,
3454
+ style,
3391
3455
  ...props
3392
3456
  } = _ref5;
3393
3457
 
@@ -3459,6 +3523,8 @@ const AccordionHeader = /*#__PURE__*/react.forwardRef(function AccordionHeader(_
3459
3523
  disabled: disabled,
3460
3524
  parentIndex: parentIndex,
3461
3525
  as: headerLevel,
3526
+ className: className,
3527
+ style: style,
3462
3528
  children: [/*#__PURE__*/jsxRuntime.jsx(StyledAccordionHeaderButton, {
3463
3529
  isExpanded: isExpanded,
3464
3530
  disabled: disabled,
@@ -3494,7 +3560,7 @@ const StyledAccordionPanel = styled__default["default"].div.attrs(_ref => {
3494
3560
  },
3495
3561
  border
3496
3562
  } = theme;
3497
- return styled.css(["", " ", " background:", ";min-height:96px;box-sizing:border-box;"], edsUtils.bordersTemplate(border), edsUtils.spacingsTemplate(panel.spacings), header.background);
3563
+ return styled.css(["", " ", " ", " background:", ";min-height:96px;box-sizing:border-box;"], edsUtils.bordersTemplate(border), edsUtils.spacingsTemplate(panel.spacings), edsUtils.typographyTemplate(panel.typography), header.background);
3498
3564
  });
3499
3565
  const AccordionPanel = /*#__PURE__*/react.forwardRef(function AccordionPanel(_ref3, ref) {
3500
3566
  let {
@@ -3692,7 +3758,7 @@ const Tabs$1 = /*#__PURE__*/react.forwardRef(function Tabs(_ref, ref) {
3692
3758
  } = _ref;
3693
3759
  const tabsId = edsUtils.useId(id, 'tabs');
3694
3760
  const tabsRef = react.useRef(null);
3695
- const combinedTabsRef = edsUtils.useCombinedRefs(tabsRef, ref);
3761
+ const combinedTabsRef = react.useMemo(() => edsUtils.mergeRefs(tabsRef, ref), [tabsRef, ref]);
3696
3762
  const [tabsFocused, setTabsFocused] = react.useState(false);
3697
3763
  const [listenerAttached, setListenerAttached] = react.useState(false);
3698
3764
  let blurTimer;
@@ -3817,8 +3883,7 @@ const TabList = /*#__PURE__*/react.forwardRef(function TabsList(_ref3, ref) {
3817
3883
  currentTab.current = activeTab;
3818
3884
  }, [activeTab]);
3819
3885
  const Tabs = react.Children.map(children, (child, index) => {
3820
- const tabRef = index === activeTab ? // eslint-disable-next-line react-hooks/rules-of-hooks
3821
- edsUtils.useCombinedRefs(child.ref, selectedTabRef) : child.ref;
3886
+ const tabRef = index === activeTab ? edsUtils.mergeRefs(child.ref, selectedTabRef) : child.ref;
3822
3887
  return /*#__PURE__*/react.cloneElement(child, {
3823
3888
  id: "".concat(tabsId, "-tab-").concat(index + 1),
3824
3889
  'aria-controls': "".concat(tabsId, "-panel-").concat(index + 1),
@@ -4065,38 +4130,29 @@ const {
4065
4130
  const StyledCard = styled__default["default"](Paper).withConfig({
4066
4131
  displayName: "Card__StyledCard",
4067
4132
  componentId: "sc-bjucjn-0"
4068
- })(["width:100%;position:relative;background-color:", ";box-sizing:border-box;display:flex;flex-direction:column;grid-gap:16px;cursor:", ";", ";"], _ref => {
4133
+ })(["width:100%;position:relative;background-color:", ";box-sizing:border-box;display:flex;flex-direction:column;grid-gap:16px;", ";"], _ref => {
4069
4134
  let {
4070
4135
  background
4071
4136
  } = _ref;
4072
4137
  return background;
4073
- }, _ref2 => {
4074
- let {
4075
- cursor
4076
- } = _ref2;
4077
- return cursor;
4078
4138
  }, edsUtils.bordersTemplate(primary$3.border));
4079
- const Card$1 = /*#__PURE__*/react.forwardRef(function Card(_ref3, ref) {
4139
+ const Card$1 = /*#__PURE__*/react.forwardRef(function Card(_ref2, ref) {
4080
4140
  let {
4081
4141
  children,
4082
4142
  variant = 'default',
4083
4143
  elevation = 'none',
4084
- onClick,
4085
4144
  ...rest
4086
- } = _ref3;
4087
- const cursor = onClick ? 'pointer' : 'default';
4145
+ } = _ref2;
4088
4146
  const cardVariant = variant === 'default' ? 'primary' : variant;
4089
4147
  const token = tokens$4[cardVariant];
4090
4148
  const props = {
4091
4149
  ref,
4092
4150
  background: token.background,
4093
- cursor,
4094
4151
  ...rest
4095
4152
  };
4096
4153
  return /*#__PURE__*/jsxRuntime.jsx(StyledCard, {
4097
4154
  elevation: elevation,
4098
4155
  ...props,
4099
- onClick: onClick,
4100
4156
  children: children
4101
4157
  });
4102
4158
  });
@@ -4244,8 +4300,8 @@ const topbar = {
4244
4300
  background: colors$3.ui.background__default.rgba,
4245
4301
  typography: navigation.menu_title,
4246
4302
  spacings: {
4247
- left: comfortable$3.xx_large,
4248
- right: comfortable$3.xx_large,
4303
+ left: comfortable$3.large,
4304
+ right: comfortable$3.large,
4249
4305
  top: comfortable$3.small,
4250
4306
  bottom: comfortable$3.small
4251
4307
  },
@@ -4390,7 +4446,7 @@ const Scrim = /*#__PURE__*/react.forwardRef(function Scrim(_ref, ref) {
4390
4446
  ...rest
4391
4447
  } = _ref;
4392
4448
  const scrimRef = react.useRef(null);
4393
- const combinedScrimRef = edsUtils.useCombinedRefs(scrimRef, ref);
4449
+ const combinedScrimRef = react.useMemo(() => edsUtils.mergeRefs(scrimRef, ref), [scrimRef, ref]);
4394
4450
  const props = { ...rest,
4395
4451
  open,
4396
4452
  isDismissable
@@ -4708,10 +4764,10 @@ const {
4708
4764
  xxx_large
4709
4765
  }
4710
4766
  },
4711
- typography: typography$a
4767
+ typography: typography$b
4712
4768
  } = edsTokens.tokens;
4713
4769
  const tableOfContents = {
4714
- typography: { ...typography$a.navigation.button,
4770
+ typography: { ...typography$b.navigation.button,
4715
4771
  color: labelColor
4716
4772
  },
4717
4773
  spacings: {
@@ -4727,7 +4783,7 @@ const tableOfContents = {
4727
4783
  },
4728
4784
  links: {
4729
4785
  width: 'calc(189px - 36px)',
4730
- typography: { ...typography$a.navigation.button,
4786
+ typography: { ...typography$b.navigation.button,
4731
4787
  color: primaryColor$4
4732
4788
  },
4733
4789
  spacings: {
@@ -4767,7 +4823,7 @@ const tableOfContents = {
4767
4823
  background: primaryHover$3
4768
4824
  }
4769
4825
  },
4770
- typography: { ...typography$a.navigation.button,
4826
+ typography: { ...typography$b.navigation.button,
4771
4827
  color: primaryHover$3
4772
4828
  }
4773
4829
  }
@@ -4870,6 +4926,11 @@ const {
4870
4926
  xx_small: spacingXXS,
4871
4927
  medium: spacingMedium$5
4872
4928
  }
4929
+ },
4930
+ typography: {
4931
+ paragraph: {
4932
+ body_short
4933
+ }
4873
4934
  }
4874
4935
  } = edsTokens.tokens;
4875
4936
  const comfortable$2 = {
@@ -4887,6 +4948,8 @@ const comfortable$2 = {
4887
4948
  width: spacingXXS,
4888
4949
  style: 'solid'
4889
4950
  }
4951
+ },
4952
+ typography: { ...body_short
4890
4953
  }
4891
4954
  };
4892
4955
  const variants = {
@@ -4899,17 +4962,18 @@ const variants = {
4899
4962
  const {
4900
4963
  background: background$6,
4901
4964
  spacings: spacings$2,
4902
- border: border$2
4965
+ border: border$2,
4966
+ typography: typography$a
4903
4967
  } = comfortable$2;
4904
4968
  const StyledSideSheet = styled__default["default"].div.withConfig({
4905
4969
  displayName: "SideSheet__StyledSideSheet",
4906
4970
  componentId: "sc-wkzlnn-0"
4907
- })(["height:100%;position:absolute;z-index:1200;top:0;right:0;box-sizing:border-box;background:", ";width:", ";", " ", ";"], background$6, _ref => {
4971
+ })(["height:100%;position:absolute;z-index:1200;top:0;right:0;box-sizing:border-box;background:", ";width:", ";", " ", ";", ""], background$6, _ref => {
4908
4972
  let {
4909
4973
  width
4910
4974
  } = _ref;
4911
4975
  return width;
4912
- }, edsUtils.bordersTemplate(border$2), edsUtils.spacingsTemplate(spacings$2));
4976
+ }, edsUtils.bordersTemplate(border$2), edsUtils.spacingsTemplate(spacings$2), edsUtils.typographyTemplate(typography$a));
4913
4977
  const Header$1 = styled__default["default"].div.withConfig({
4914
4978
  displayName: "SideSheet__Header",
4915
4979
  componentId: "sc-wkzlnn-1"
@@ -4917,6 +4981,7 @@ const Header$1 = styled__default["default"].div.withConfig({
4917
4981
  const SideSheet = /*#__PURE__*/react.forwardRef(function SideSheet(_ref2, ref) {
4918
4982
  let {
4919
4983
  variant = 'medium',
4984
+ width,
4920
4985
  title = '',
4921
4986
  children,
4922
4987
  open = true,
@@ -4925,7 +4990,7 @@ const SideSheet = /*#__PURE__*/react.forwardRef(function SideSheet(_ref2, ref) {
4925
4990
  } = _ref2;
4926
4991
  const props = { ...rest,
4927
4992
  ref,
4928
- width: variants[variant]
4993
+ width: width || variants[variant]
4929
4994
  }; // Controller must set open={false} when pressing the close button
4930
4995
 
4931
4996
  return open && /*#__PURE__*/jsxRuntime.jsxs(StyledSideSheet, { ...props,
@@ -5476,6 +5541,7 @@ const Search = /*#__PURE__*/react.forwardRef(function Search(_ref4, ref) {
5476
5541
  defaultValue = '',
5477
5542
  value,
5478
5543
  className = '',
5544
+ style,
5479
5545
  disabled = false,
5480
5546
  onBlur,
5481
5547
  onFocus,
@@ -5551,14 +5617,16 @@ const Search = /*#__PURE__*/react.forwardRef(function Search(_ref4, ref) {
5551
5617
  const containerProps = {
5552
5618
  isFocused,
5553
5619
  className,
5620
+ style,
5554
5621
  disabled,
5555
5622
  role: 'search',
5556
5623
  'aria-label': rest['aria-label'],
5557
5624
  onClick: handleOnClick
5558
5625
  };
5626
+ const combinedRef = react.useMemo(() => edsUtils.mergeRefs(inputRef, ref), [inputRef, ref]);
5559
5627
  const inputProps = applyControllingProps({ ...rest,
5560
5628
  disabled,
5561
- ref: edsUtils.useCombinedRefs(inputRef, ref),
5629
+ ref: combinedRef,
5562
5630
  type: 'search',
5563
5631
  role: 'searchbox',
5564
5632
  'aria-label': 'search input',
@@ -6219,11 +6287,11 @@ const tooltip = {
6219
6287
  const StyledTooltip = styled__default["default"].div.withConfig({
6220
6288
  displayName: "Tooltip__StyledTooltip",
6221
6289
  componentId: "sc-m2im2p-0"
6222
- })(["", " ", " ", " background:", ";z-index:1500;white-space:nowrap;.arrow{z-index:-1;width:", ";height:", ";}&[data-popper-placement^='top'] > .arrow{bottom:", ";.arrowSvg{transform:rotate(-90deg);}}&[data-popper-placement^='bottom'] > .arrow{top:", ";.arrowSvg{transform:rotate(90deg);}}&[data-popper-placement^='left'] > .arrow{right:", ";.arrowSvg{transform:rotate(-180deg);}}&[data-popper-placement^='right'] > .arrow{left:", ";}"], edsUtils.typographyTemplate(tooltip.typography), edsUtils.spacingsTemplate(tooltip.spacings), edsUtils.bordersTemplate(tooltip.border), tooltip.background, tooltip.entities.arrow.width, tooltip.entities.arrow.height, tooltip.entities.arrow.spacings.bottom, tooltip.entities.arrow.spacings.top, tooltip.entities.arrow.spacings.right, tooltip.entities.arrow.spacings.left);
6290
+ })(["", " ", " ", " background:", ";z-index:1500;white-space:nowrap;"], edsUtils.typographyTemplate(tooltip.typography), edsUtils.spacingsTemplate(tooltip.spacings), edsUtils.bordersTemplate(tooltip.border), tooltip.background);
6223
6291
  const ArrowWrapper$1 = styled__default["default"].div.withConfig({
6224
6292
  displayName: "Tooltip__ArrowWrapper",
6225
6293
  componentId: "sc-m2im2p-1"
6226
- })(["&,&::before{position:absolute;width:", ";height:", ";z-index:-1;}&::before{content:'';}"], tooltip.entities.arrow.width, tooltip.entities.arrow.height);
6294
+ })(["position:absolute;width:", ";height:", ";z-index:-1;"], tooltip.entities.arrow.width, tooltip.entities.arrow.height);
6227
6295
  const TooltipArrow = styled__default["default"].svg.withConfig({
6228
6296
  displayName: "Tooltip__TooltipArrow",
6229
6297
  componentId: "sc-m2im2p-2"
@@ -6233,96 +6301,115 @@ const Tooltip = /*#__PURE__*/react.forwardRef(function Tooltip(_ref, ref) {
6233
6301
  title,
6234
6302
  placement = 'bottom',
6235
6303
  children,
6236
- enterDelay = 100,
6237
- id,
6238
6304
  style,
6305
+ enterDelay = 100,
6239
6306
  ...rest
6240
6307
  } = _ref;
6241
- const isMounted = edsUtils.useIsMounted();
6242
- const [popperEl, setPopperEl] = react.useState(null);
6243
- const [arrowRef, setArrowRef] = react.useState(null);
6308
+ const arrowRef = react.useRef(null);
6244
6309
  const [open, setOpen] = react.useState(false);
6245
- const openTimer = react.useRef();
6246
- const tooltipRef = edsUtils.useCombinedRefs(setPopperEl, ref);
6247
- const anchorRef = react.useRef();
6248
- const combinedChilddRef = edsUtils.useCombinedRefs(anchorRef, children === null || children === void 0 ? void 0 : children.ref);
6249
- const tooltipId = edsUtils.useId(id, 'tooltip');
6250
- const containerId = 'eds-tooltip-container';
6251
- const shouldOpen = isMounted && title !== '';
6252
- react.useEffect(() => {
6253
- if (document.getElementById(containerId) === null) {
6254
- const tooltipContainerElement = document.createElement('div');
6255
- tooltipContainerElement.id = containerId;
6256
- document.body.appendChild(tooltipContainerElement);
6257
- }
6258
-
6259
- return () => {
6260
- clearTimeout(openTimer.current);
6261
- };
6262
- }, []);
6263
-
6264
- const openTooltip = () => {
6265
- if (shouldOpen) {
6266
- clearTimeout(openTimer.current);
6267
- openTimer.current = setTimeout(() => {
6268
- setOpen(true);
6269
- }, enterDelay);
6270
- }
6271
- };
6272
-
6273
- const closeTooltip = () => {
6274
- clearTimeout(openTimer.current);
6275
- setOpen(false);
6276
- };
6277
-
6278
- edsUtils.useGlobalKeyPress('Escape', () => closeTooltip());
6310
+ const shouldOpen = title !== '';
6279
6311
  const {
6280
- styles,
6281
- attributes
6282
- } = edsUtils.usePopper({
6283
- anchorEl: anchorRef.current,
6284
- popperEl,
6285
- arrowRef,
6312
+ x,
6313
+ y,
6314
+ reference,
6315
+ floating,
6316
+ strategy,
6317
+ context,
6318
+ middlewareData: {
6319
+ arrow: {
6320
+ x: arrowX,
6321
+ y: arrowY
6322
+ } = {}
6323
+ },
6324
+ placement: finalPlacement
6325
+ } = reactDomInteractions.useFloating({
6286
6326
  placement,
6287
- offset: 14
6288
- });
6289
- const props = {
6290
6327
  open,
6291
- style: { ...styles.popper,
6292
- ...style
6293
- },
6294
- ...rest,
6295
- ...attributes.popper
6296
- };
6297
- const childProps = children.props;
6298
- const updatedChildren = /*#__PURE__*/react.cloneElement(children, {
6299
- ref: combinedChilddRef,
6300
- 'aria-describedby': open ? tooltipId : null,
6301
- onMouseOver: edsUtils.joinHandlers(openTooltip, childProps.onMouseOver),
6302
- onMouseLeave: edsUtils.joinHandlers(closeTooltip, childProps.onMouseLeave),
6303
- onPointerEnter: edsUtils.joinHandlers(openTooltip, childProps.onPointerEnter),
6304
- onPointerLeave: edsUtils.joinHandlers(closeTooltip, childProps.onPointerLeave),
6305
- onBlur: edsUtils.joinHandlers(closeTooltip, childProps.onBlur),
6306
- onFocus: edsUtils.joinHandlers(openTooltip, childProps.onFocus)
6328
+ onOpenChange: setOpen,
6329
+ middleware: [reactDomInteractions.offset(14), reactDomInteractions.flip(), reactDomInteractions.shift({
6330
+ padding: 8
6331
+ }), reactDomInteractions.arrow({
6332
+ element: arrowRef
6333
+ })],
6334
+ whileElementsMounted: reactDomInteractions.autoUpdate
6335
+ });
6336
+ const anchorRef = react.useMemo(() => edsUtils.mergeRefs(reference, children === null || children === void 0 ? void 0 : children.ref), [reference, children === null || children === void 0 ? void 0 : children.ref]);
6337
+ const tooltipRef = react.useMemo(() => edsUtils.mergeRefs(floating, ref), [floating, ref]);
6338
+ const {
6339
+ getReferenceProps,
6340
+ getFloatingProps
6341
+ } = reactDomInteractions.useInteractions([reactDomInteractions.useHover(context, {
6342
+ delay: {
6343
+ open: enterDelay
6344
+ }
6345
+ }), reactDomInteractions.useFocus(context), reactDomInteractions.useRole(context, {
6346
+ role: 'tooltip'
6347
+ }), reactDomInteractions.useDismiss(context)]);
6348
+ const staticSide = {
6349
+ top: 'bottom',
6350
+ right: 'left',
6351
+ bottom: 'top',
6352
+ left: 'right'
6353
+ }[finalPlacement.split('-')[0]];
6354
+ let arrowTransform = 'none';
6355
+
6356
+ switch (staticSide) {
6357
+ case 'right':
6358
+ arrowTransform = 'rotateY(180deg)';
6359
+ break;
6360
+
6361
+ case 'left':
6362
+ arrowTransform = 'none';
6363
+ break;
6364
+
6365
+ case 'top':
6366
+ arrowTransform = 'rotate(90deg)';
6367
+ break;
6368
+
6369
+ case 'bottom':
6370
+ arrowTransform = 'rotate(-90deg)';
6371
+ break;
6372
+ }
6373
+
6374
+ if (arrowRef.current) {
6375
+ Object.assign(arrowRef.current.style, {
6376
+ left: arrowX != null ? "".concat(arrowX, "px") : '',
6377
+ top: arrowY != null ? "".concat(arrowY, "px") : '',
6378
+ right: '',
6379
+ bottom: '',
6380
+ [staticSide]: '-6px',
6381
+ transform: arrowTransform
6382
+ });
6383
+ }
6384
+
6385
+ const updatedChildren = /*#__PURE__*/react.cloneElement(children, { ...getReferenceProps({
6386
+ ref: anchorRef,
6387
+ ...children.props
6388
+ })
6307
6389
  });
6308
6390
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
6309
- children: [shouldOpen && open && /*#__PURE__*/ReactDom__namespace.createPortal( /*#__PURE__*/jsxRuntime.jsxs(StyledTooltip, {
6310
- id: tooltipId,
6311
- role: "tooltip",
6312
- ref: tooltipRef,
6313
- ...props,
6314
- children: [title, /*#__PURE__*/jsxRuntime.jsx(ArrowWrapper$1, {
6315
- ref: setArrowRef,
6316
- style: styles.arrow,
6317
- className: "arrow",
6318
- children: /*#__PURE__*/jsxRuntime.jsx(TooltipArrow, {
6319
- className: "arrowSvg",
6320
- children: /*#__PURE__*/jsxRuntime.jsx("path", {
6321
- d: "M0.504838 4.86885C-0.168399 4.48524 -0.168399 3.51476 0.504838 3.13115L6 8.59227e-08L6 8L0.504838 4.86885Z"
6391
+ children: [/*#__PURE__*/jsxRuntime.jsx(reactDomInteractions.FloatingPortal, {
6392
+ id: "eds-tooltip-container",
6393
+ children: shouldOpen && open && /*#__PURE__*/jsxRuntime.jsxs(StyledTooltip, { ...rest,
6394
+ ...getFloatingProps({
6395
+ ref: tooltipRef,
6396
+ style: { ...style,
6397
+ position: strategy,
6398
+ top: y !== null && y !== void 0 ? y : 0,
6399
+ left: x !== null && x !== void 0 ? x : 0
6400
+ }
6401
+ }),
6402
+ children: [title, /*#__PURE__*/jsxRuntime.jsx(ArrowWrapper$1, {
6403
+ ref: arrowRef,
6404
+ children: /*#__PURE__*/jsxRuntime.jsx(TooltipArrow, {
6405
+ className: "arrowSvg",
6406
+ children: /*#__PURE__*/jsxRuntime.jsx("path", {
6407
+ d: "M0.504838 4.86885C-0.168399 4.48524 -0.168399 3.51476 0.504838 3.13115L6 8.59227e-08L6 8L0.504838 4.86885Z"
6408
+ })
6322
6409
  })
6323
- })
6324
- })]
6325
- }), document.getElementById(containerId)), updatedChildren]
6410
+ })]
6411
+ })
6412
+ }), updatedChildren]
6326
6413
  });
6327
6414
  });
6328
6415
 
@@ -6556,9 +6643,9 @@ const PopoverPaper = styled__default["default"](Paper).withConfig({
6556
6643
  theme,
6557
6644
  open
6558
6645
  } = _ref;
6559
- return styled.css(["", " ", " display:grid;grid-auto-columns:auto;align-items:center;align-content:start;background:", ";width:max-content;max-height:", ";max-width:", ";", " z-index:1400;.arrow{z-index:-1;width:", ";height:", ";}&[data-popper-placement^='top'] > .arrow{bottom:", ";.arrowSvg{transform:rotate(-90deg);}}&[data-popper-placement^='bottom'] > .arrow{top:", ";.arrowSvg{transform:rotate(90deg);}}&[data-popper-placement^='left'] > .arrow{right:", ";.arrowSvg{transform:rotate(-180deg);}}&[data-popper-placement^='right'] > .arrow{left:", ";}"], {
6646
+ return styled.css(["", " ", " display:grid;grid-auto-columns:auto;align-items:center;align-content:start;background:", ";width:max-content;max-height:", ";max-width:", ";", " z-index:1400;overflow:auto;"], {
6560
6647
  visibility: open ? null : 'hidden'
6561
- }, edsUtils.typographyTemplate(theme.typography), theme.background, theme.maxHeight, theme.maxWidth, edsUtils.bordersTemplate(theme.border), theme.entities.arrow.width, theme.entities.arrow.height, theme.entities.arrow.spacings.bottom, theme.entities.arrow.spacings.top, theme.entities.arrow.spacings.right, theme.entities.arrow.spacings.left);
6648
+ }, edsUtils.typographyTemplate(theme.typography), theme.background, theme.maxHeight, theme.maxWidth, edsUtils.bordersTemplate(theme.border));
6562
6649
  });
6563
6650
  const ArrowWrapper = styled__default["default"].div.withConfig({
6564
6651
  displayName: "Popover__ArrowWrapper",
@@ -6567,7 +6654,7 @@ const ArrowWrapper = styled__default["default"].div.withConfig({
6567
6654
  let {
6568
6655
  theme
6569
6656
  } = _ref2;
6570
- return styled.css(["&,&::before{position:absolute;width:", ";height:", ";z-index:-1;}&::before{content:'';}"], theme.entities.arrow.width, theme.entities.arrow.height);
6657
+ return styled.css(["position:absolute;width:", ";height:", ";z-index:-1;"], theme.entities.arrow.width, theme.entities.arrow.height);
6571
6658
  });
6572
6659
  const InnerWrapper = styled__default["default"].div.withConfig({
6573
6660
  displayName: "Popover__InnerWrapper",
@@ -6592,41 +6679,90 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover(_ref5, ref) {
6592
6679
  children,
6593
6680
  placement = 'bottom',
6594
6681
  anchorEl,
6682
+ style,
6595
6683
  open,
6596
6684
  onClose,
6597
6685
  ...rest
6598
6686
  } = _ref5;
6599
- const [popperEl, setPopperEl] = react.useState(null);
6600
- const [storedAnchorEl, setStoredAnchorEl] = react.useState(null);
6601
- const [arrowRef, setArrowRef] = react.useState(null);
6602
- const popoverRef = edsUtils.useCombinedRefs(ref, setPopperEl);
6603
- edsUtils.useOutsideClick(popperEl, e => {
6604
- if (open && onClose && anchorEl && !anchorEl.contains(e.target)) {
6605
- onClose();
6606
- }
6607
- });
6608
- edsUtils.useGlobalKeyPress('Escape', () => {
6609
- if (onClose && open) {
6610
- onClose();
6611
- }
6687
+ const arrowRef = react.useRef(null);
6688
+ const {
6689
+ x,
6690
+ y,
6691
+ reference,
6692
+ floating,
6693
+ refs,
6694
+ update,
6695
+ strategy,
6696
+ context,
6697
+ middlewareData: {
6698
+ arrow: {
6699
+ x: arrowX,
6700
+ y: arrowY
6701
+ } = {}
6702
+ },
6703
+ placement: finalPlacement
6704
+ } = reactDomInteractions.useFloating({
6705
+ placement,
6706
+ open,
6707
+ onOpenChange: onClose,
6708
+ middleware: [reactDomInteractions.offset(14), reactDomInteractions.flip(), reactDomInteractions.shift({
6709
+ padding: 8
6710
+ }), reactDomInteractions.arrow({
6711
+ element: arrowRef
6712
+ })]
6612
6713
  });
6714
+ react.useLayoutEffect(() => {
6715
+ reference(anchorEl);
6716
+ }, [anchorEl, reference]);
6717
+ const popoverRef = react.useMemo(() => edsUtils.mergeRefs(floating, ref), [floating, ref]);
6613
6718
  react.useEffect(() => {
6614
- open ? setStoredAnchorEl(anchorEl) : setStoredAnchorEl(null);
6615
- return () => setStoredAnchorEl(null);
6616
- }, [anchorEl, open]);
6719
+ if (refs.reference.current && refs.floating.current && open) {
6720
+ return reactDomInteractions.autoUpdate(refs.reference.current, refs.floating.current, update);
6721
+ }
6722
+ }, [refs.reference, refs.floating, update, open]);
6617
6723
  const {
6618
- styles,
6619
- attributes
6620
- } = edsUtils.usePopper({
6621
- anchorEl: storedAnchorEl,
6622
- popperEl,
6623
- arrowRef,
6624
- placement
6625
- });
6724
+ getFloatingProps
6725
+ } = reactDomInteractions.useInteractions([reactDomInteractions.useDismiss(context)]);
6726
+ const staticSide = {
6727
+ top: 'bottom',
6728
+ right: 'left',
6729
+ bottom: 'top',
6730
+ left: 'right'
6731
+ }[finalPlacement.split('-')[0]];
6732
+ let arrowTransform = 'none';
6733
+
6734
+ switch (staticSide) {
6735
+ case 'right':
6736
+ arrowTransform = 'rotateY(180deg)';
6737
+ break;
6738
+
6739
+ case 'left':
6740
+ arrowTransform = 'none';
6741
+ break;
6742
+
6743
+ case 'top':
6744
+ arrowTransform = 'rotate(90deg)';
6745
+ break;
6746
+
6747
+ case 'bottom':
6748
+ arrowTransform = 'rotate(-90deg)';
6749
+ break;
6750
+ }
6751
+
6752
+ if (arrowRef.current) {
6753
+ Object.assign(arrowRef.current.style, {
6754
+ left: arrowX != null ? "".concat(arrowX, "px") : '',
6755
+ top: arrowY != null ? "".concat(arrowY, "px") : '',
6756
+ right: '',
6757
+ bottom: '',
6758
+ [staticSide]: '-6px',
6759
+ transform: arrowTransform
6760
+ });
6761
+ }
6762
+
6626
6763
  const props = {
6627
6764
  open,
6628
- ...rest,
6629
- ...attributes.popper
6765
+ ...rest
6630
6766
  };
6631
6767
  const {
6632
6768
  density
@@ -6637,13 +6773,18 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover(_ref5, ref) {
6637
6773
  return /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
6638
6774
  theme: token,
6639
6775
  children: /*#__PURE__*/jsxRuntime.jsxs(PopoverPaper, {
6640
- ref: popoverRef,
6641
6776
  elevation: "overlay",
6642
- style: styles.popper,
6643
6777
  ...props,
6778
+ ...getFloatingProps({
6779
+ ref: popoverRef,
6780
+ style: { ...style,
6781
+ position: strategy,
6782
+ top: y !== null && y !== void 0 ? y : 0,
6783
+ left: x !== null && x !== void 0 ? x : 0
6784
+ }
6785
+ }),
6644
6786
  children: [/*#__PURE__*/jsxRuntime.jsx(ArrowWrapper, {
6645
- ref: setArrowRef,
6646
- style: styles.arrow,
6787
+ ref: arrowRef,
6647
6788
  className: "arrow",
6648
6789
  children: /*#__PURE__*/jsxRuntime.jsx(PopoverArrow, {
6649
6790
  className: "arrowSvg",
@@ -7581,6 +7722,7 @@ const Breadcrumb = /*#__PURE__*/react.forwardRef(function Breadcrumb(_ref2, ref)
7581
7722
  children,
7582
7723
  maxWidth,
7583
7724
  href,
7725
+ as,
7584
7726
  ...other
7585
7727
  } = _ref2;
7586
7728
  const props = { ...other,
@@ -7590,10 +7732,11 @@ const Breadcrumb = /*#__PURE__*/react.forwardRef(function Breadcrumb(_ref2, ref)
7590
7732
  };
7591
7733
  const showTooltip = maxWidth > 0;
7592
7734
  const isHrefDefined = href !== undefined;
7735
+ const forwardedAs = react.useMemo(() => as ? as : isHrefDefined ? 'a' : 'span', [as, isHrefDefined]);
7593
7736
 
7594
7737
  const crumb = /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
7595
7738
  link: isHrefDefined,
7596
- forwardedAs: isHrefDefined ? null : 'span',
7739
+ forwardedAs: forwardedAs,
7597
7740
  variant: "body_short",
7598
7741
  ...props,
7599
7742
  children: children
@@ -7866,7 +8009,7 @@ const MenuItem = /*#__PURE__*/react.forwardRef(function MenuItem(_ref5, ref) {
7866
8009
  isFocused
7867
8010
  };
7868
8011
  return /*#__PURE__*/jsxRuntime.jsx(Item, { ...props,
7869
- ref: edsUtils.useCombinedRefs(ref, el => {
8012
+ ref: edsUtils.mergeRefs(ref, el => {
7870
8013
  if (isFocused) {
7871
8014
  requestAnimationFrame(() => {
7872
8015
  if (el !== null) el.focus();
@@ -8030,7 +8173,6 @@ const MenuContainer = /*#__PURE__*/react.forwardRef(function MenuContainer(_ref2
8030
8173
  anchorEl,
8031
8174
  onClose: onCloseCallback,
8032
8175
  open,
8033
- containerEl,
8034
8176
  ...rest
8035
8177
  } = _ref2;
8036
8178
  const {
@@ -8074,11 +8216,6 @@ const MenuContainer = /*#__PURE__*/react.forwardRef(function MenuContainer(_ref2
8074
8216
  if (anchorEl) anchorEl.removeEventListener('keydown', openWithKey);
8075
8217
  }; // eslint-disable-next-line react-hooks/exhaustive-deps
8076
8218
  }, [anchorEl]);
8077
- edsUtils.useOutsideClick(containerEl, e => {
8078
- if (open && onClose !== null && !anchorEl.contains(e.target)) {
8079
- onClose();
8080
- }
8081
- });
8082
8219
  edsUtils.useGlobalKeyPress('Escape', () => {
8083
8220
  if (open && onClose !== null) {
8084
8221
  onClose();
@@ -8103,60 +8240,82 @@ const Menu$1 = /*#__PURE__*/react.forwardRef(function Menu(_ref3, ref) {
8103
8240
  let {
8104
8241
  anchorEl,
8105
8242
  open,
8106
- placement = 'auto',
8243
+ placement = 'bottom',
8244
+ onClose,
8107
8245
  style,
8108
8246
  className,
8109
8247
  ...rest
8110
8248
  } = _ref3;
8111
- const [containerEl, setContainerEl] = react.useState(null);
8112
- const [storedAnchorEl, setStoredAnchorEl] = react.useState(null);
8113
- const isMounted = edsUtils.useIsMounted();
8114
8249
  const {
8115
8250
  density
8116
8251
  } = useEds();
8117
8252
  const token = edsUtils.useToken({
8118
8253
  density
8119
8254
  }, menu);
8120
- react.useEffect(() => {
8121
- open ? setStoredAnchorEl(anchorEl) : setStoredAnchorEl(null);
8122
- return () => setStoredAnchorEl(null);
8123
- }, [anchorEl, open]);
8124
8255
  const {
8125
- styles,
8126
- attributes
8127
- } = edsUtils.usePopper({
8128
- anchorEl: storedAnchorEl,
8129
- popperEl: containerEl,
8256
+ x,
8257
+ y,
8258
+ reference,
8259
+ floating,
8260
+ refs,
8261
+ update,
8262
+ strategy,
8263
+ context
8264
+ } = reactDomInteractions.useFloating({
8130
8265
  placement,
8131
- offset: 4
8266
+ open,
8267
+ onOpenChange: onClose,
8268
+ middleware: [reactDomInteractions.offset(4), reactDomInteractions.flip(), reactDomInteractions.shift({
8269
+ padding: 8
8270
+ })]
8132
8271
  });
8272
+ react.useLayoutEffect(() => {
8273
+ reference(anchorEl);
8274
+ }, [anchorEl, reference]);
8275
+ const popoverRef = react.useMemo(() => edsUtils.mergeRefs(floating, ref), [floating, ref]);
8276
+ react.useEffect(() => {
8277
+ if (refs.reference.current && refs.floating.current && open) {
8278
+ return reactDomInteractions.autoUpdate(refs.reference.current, refs.floating.current, update);
8279
+ }
8280
+ }, [refs.reference, refs.floating, update, open]);
8281
+ const {
8282
+ getFloatingProps
8283
+ } = reactDomInteractions.useInteractions([reactDomInteractions.useDismiss(context, {
8284
+ escapeKey: false
8285
+ })]);
8133
8286
  const props = {
8134
8287
  open,
8135
- style: { ...styles.popper,
8136
- ...style
8137
- },
8138
- className,
8139
- ...attributes.popper
8288
+ className
8140
8289
  };
8141
8290
  const menuProps = { ...rest,
8291
+ onClose,
8142
8292
  anchorEl,
8143
- open,
8144
- containerEl
8293
+ open
8145
8294
  };
8146
8295
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
8147
- children: isMounted && /*#__PURE__*/ReactDom__namespace.createPortal( /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
8148
- theme: token,
8149
- children: /*#__PURE__*/jsxRuntime.jsx(MenuPaper, {
8150
- elevation: "raised",
8151
- ref: setContainerEl,
8152
- ...props,
8153
- children: /*#__PURE__*/jsxRuntime.jsx(MenuProvider, {
8154
- children: /*#__PURE__*/jsxRuntime.jsx(MenuContainer, { ...menuProps,
8155
- ref: ref
8296
+ children: /*#__PURE__*/jsxRuntime.jsx(reactDomInteractions.FloatingPortal, {
8297
+ id: "eds-menu-container",
8298
+ children: /*#__PURE__*/jsxRuntime.jsx(styled.ThemeProvider, {
8299
+ theme: token,
8300
+ children: /*#__PURE__*/jsxRuntime.jsx(MenuPaper, {
8301
+ elevation: "raised",
8302
+ ...props,
8303
+ ...getFloatingProps({
8304
+ ref: popoverRef,
8305
+ style: { ...style,
8306
+ position: strategy,
8307
+ top: y !== null && y !== void 0 ? y : 0,
8308
+ left: x !== null && x !== void 0 ? x : 0
8309
+ }
8310
+ }),
8311
+ children: /*#__PURE__*/jsxRuntime.jsx(MenuProvider, {
8312
+ children: /*#__PURE__*/jsxRuntime.jsx(MenuContainer, { ...menuProps,
8313
+ ref: ref
8314
+ })
8156
8315
  })
8157
8316
  })
8158
8317
  })
8159
- }), document.body)
8318
+ })
8160
8319
  });
8161
8320
  });
8162
8321
 
@@ -8499,6 +8658,7 @@ const NativeSelect = /*#__PURE__*/react.forwardRef(function NativeSelect(_ref2,
8499
8658
  label,
8500
8659
  children,
8501
8660
  className,
8661
+ style,
8502
8662
  selectRef,
8503
8663
  id,
8504
8664
  meta,
@@ -8514,7 +8674,8 @@ const NativeSelect = /*#__PURE__*/react.forwardRef(function NativeSelect(_ref2,
8514
8674
  }, nativeselect);
8515
8675
  const containerProps = {
8516
8676
  ref,
8517
- className
8677
+ className,
8678
+ style
8518
8679
  };
8519
8680
  const selectProps = {
8520
8681
  ref: selectRef,
@@ -8998,6 +9159,8 @@ const CheckboxInput = /*#__PURE__*/react.forwardRef(function CheckboxInput(_ref1
8998
9159
  let {
8999
9160
  disabled = false,
9000
9161
  indeterminate,
9162
+ style,
9163
+ className,
9001
9164
  ...rest
9002
9165
  } = _ref10;
9003
9166
  const {
@@ -9009,7 +9172,9 @@ const CheckboxInput = /*#__PURE__*/react.forwardRef(function CheckboxInput(_ref1
9009
9172
  const iconSize = 24;
9010
9173
  const fill = disabled ? checkbox.states.disabled.background : checkbox.background;
9011
9174
  const inputWrapperProps = {
9012
- disabled
9175
+ disabled,
9176
+ style,
9177
+ className
9013
9178
  };
9014
9179
  const inputProps = {
9015
9180
  ref,
@@ -9273,11 +9438,13 @@ const Checkbox = /*#__PURE__*/react.forwardRef(function Checkbox(_ref2, ref) {
9273
9438
  disabled = false,
9274
9439
  indeterminate,
9275
9440
  className,
9441
+ style,
9276
9442
  ...rest
9277
9443
  } = _ref2;
9278
9444
  return label ? /*#__PURE__*/jsxRuntime.jsxs(StyledLabel$2, {
9279
9445
  disabled: disabled,
9280
9446
  className: className,
9447
+ style: style,
9281
9448
  children: [/*#__PURE__*/jsxRuntime.jsx(CheckboxInput, { ...rest,
9282
9449
  disabled: disabled,
9283
9450
  ref: ref,
@@ -9286,6 +9453,8 @@ const Checkbox = /*#__PURE__*/react.forwardRef(function Checkbox(_ref2, ref) {
9286
9453
  children: label
9287
9454
  })]
9288
9455
  }) : /*#__PURE__*/jsxRuntime.jsx(CheckboxInput, { ...rest,
9456
+ className: className,
9457
+ style: style,
9289
9458
  disabled: disabled,
9290
9459
  ref: ref,
9291
9460
  indeterminate: indeterminate
@@ -9486,6 +9655,7 @@ const Radio = /*#__PURE__*/react.forwardRef(function Radio(_ref12, ref) {
9486
9655
  label,
9487
9656
  disabled = false,
9488
9657
  className,
9658
+ style,
9489
9659
  ...rest
9490
9660
  } = _ref12;
9491
9661
  const {
@@ -9517,6 +9687,7 @@ const Radio = /*#__PURE__*/react.forwardRef(function Radio(_ref12, ref) {
9517
9687
  children: label ? /*#__PURE__*/jsxRuntime.jsxs(StyledLabel$1, {
9518
9688
  disabled: disabled,
9519
9689
  className: className,
9690
+ style: style,
9520
9691
  children: [/*#__PURE__*/jsxRuntime.jsxs(InputWrapper, {
9521
9692
  disabled: disabled,
9522
9693
  children: [/*#__PURE__*/jsxRuntime.jsx(Input$2, { ...rest,
@@ -9529,6 +9700,8 @@ const Radio = /*#__PURE__*/react.forwardRef(function Radio(_ref12, ref) {
9529
9700
  })]
9530
9701
  }) : /*#__PURE__*/jsxRuntime.jsxs(InputWrapper, {
9531
9702
  disabled: disabled,
9703
+ className: className,
9704
+ style: style,
9532
9705
  children: [/*#__PURE__*/jsxRuntime.jsx(Input$2, { ...rest,
9533
9706
  ref: ref,
9534
9707
  disabled: disabled,
@@ -9623,9 +9796,13 @@ const Handle$1 = styled__default["default"].span.withConfig({
9623
9796
  const SwitchSmall = /*#__PURE__*/react.forwardRef(function SwitchSmall(_ref4, ref) {
9624
9797
  let {
9625
9798
  disabled,
9799
+ className,
9800
+ style,
9626
9801
  ...rest
9627
9802
  } = _ref4;
9628
9803
  return /*#__PURE__*/jsxRuntime.jsxs(GridWrapper, {
9804
+ className: className,
9805
+ style: style,
9629
9806
  children: [/*#__PURE__*/jsxRuntime.jsx(Input$1, { ...rest,
9630
9807
  ref: ref,
9631
9808
  disabled: disabled
@@ -9685,9 +9862,13 @@ const Handle = styled__default["default"].span.withConfig({
9685
9862
  const SwitchDefault = /*#__PURE__*/react.forwardRef(function SwitchDefault(_ref4, ref) {
9686
9863
  let {
9687
9864
  disabled,
9865
+ className,
9866
+ style,
9688
9867
  ...rest
9689
9868
  } = _ref4;
9690
9869
  return /*#__PURE__*/jsxRuntime.jsxs(GridWrapper, {
9870
+ className: className,
9871
+ style: style,
9691
9872
  children: [/*#__PURE__*/jsxRuntime.jsx(Input, { ...rest,
9692
9873
  ref: ref,
9693
9874
  disabled: disabled
@@ -9896,6 +10077,7 @@ const Switch = /*#__PURE__*/react.forwardRef(function Switch(_ref3, ref) {
9896
10077
  disabled,
9897
10078
  label,
9898
10079
  className,
10080
+ style,
9899
10081
  ...rest
9900
10082
  } = _ref3;
9901
10083
  const {
@@ -9911,6 +10093,7 @@ const Switch = /*#__PURE__*/react.forwardRef(function Switch(_ref3, ref) {
9911
10093
  children: label ? /*#__PURE__*/jsxRuntime.jsxs(StyledLabel, {
9912
10094
  isDisabled: disabled,
9913
10095
  className: className,
10096
+ style: style,
9914
10097
  children: [size === 'small' ? /*#__PURE__*/jsxRuntime.jsx(SwitchSmall, {
9915
10098
  disabled: disabled,
9916
10099
  ...rest,
@@ -9924,10 +10107,14 @@ const Switch = /*#__PURE__*/react.forwardRef(function Switch(_ref3, ref) {
9924
10107
  })]
9925
10108
  }) : size === 'small' ? /*#__PURE__*/jsxRuntime.jsx(SwitchSmall, {
9926
10109
  disabled: disabled,
10110
+ className: className,
10111
+ style: style,
9927
10112
  ...rest,
9928
10113
  ref: ref
9929
10114
  }) : /*#__PURE__*/jsxRuntime.jsx(SwitchDefault, {
9930
10115
  disabled: disabled,
10116
+ className: className,
10117
+ style: style,
9931
10118
  ...rest,
9932
10119
  ref: ref
9933
10120
  })
@@ -10102,7 +10289,7 @@ const StyledList = styled__default["default"](List$1).withConfig({
10102
10289
  let {
10103
10290
  theme
10104
10291
  } = _ref2;
10105
- return styled.css(["background-color:", ";box-shadow:", ";", " overflow-y:auto;max-height:300px;padding:0;position:absolute;right:0;left:0;z-index:1400;"], theme.background, theme.boxShadow, edsUtils.bordersTemplate(theme.border));
10292
+ return styled.css(["background-color:", ";box-shadow:", ";", " overflow-y:auto;max-height:300px;padding:0;"], theme.background, theme.boxShadow, edsUtils.bordersTemplate(theme.border));
10106
10293
  });
10107
10294
  const StyledButton = styled__default["default"](Button).withConfig({
10108
10295
  displayName: "Autocomplete__StyledButton",
@@ -10194,8 +10381,10 @@ function AutocompleteInner(props, ref) {
10194
10381
  label,
10195
10382
  meta,
10196
10383
  className,
10384
+ style,
10197
10385
  disabled = false,
10198
10386
  readOnly = false,
10387
+ hideClearButton = false,
10199
10388
  onOptionsChange,
10200
10389
  selectedOptions,
10201
10390
  multiple,
@@ -10208,10 +10397,7 @@ function AutocompleteInner(props, ref) {
10208
10397
  optionLabel,
10209
10398
  ...other
10210
10399
  } = props;
10211
- const anchorRef = react.useRef();
10212
- const [anchorEl, setAnchorEl] = react.useState();
10213
- const [containerEl, setContainerEl] = react.useState();
10214
- const isMounted = edsUtils.useIsMounted();
10400
+ const anchorRef = react.useRef(null);
10215
10401
  const isControlled = Boolean(selectedOptions);
10216
10402
  const [inputOptions, setInputOptions] = react.useState(options);
10217
10403
  react.useEffect(() => {
@@ -10315,7 +10501,7 @@ function AutocompleteInner(props, ref) {
10315
10501
  const selectedsHash = JSON.stringify(selectedItem);
10316
10502
 
10317
10503
  if (availableItems.length === 1 && selectedsHash === availableHash) {
10318
- setAvailableItems(inputOptions);
10504
+ setAvailableItems(options);
10319
10505
  }
10320
10506
  },
10321
10507
  onStateChange: _ref9 => {
@@ -10464,40 +10650,10 @@ function AutocompleteInner(props, ref) {
10464
10650
  reset: resetCombobox
10465
10651
  } = downshift.useCombobox(comboBoxProps);
10466
10652
  react.useEffect(() => {
10467
- if (anchorRef.current && isOpen) {
10468
- setAnchorEl(anchorRef.current);
10469
- } else {
10470
- setAnchorEl(null);
10471
- }
10472
-
10473
10653
  if (isControlled) {
10474
10654
  setSelectedItems(selectedOptions);
10475
10655
  }
10476
-
10477
- return () => {
10478
- setAnchorEl(null);
10479
- setContainerEl(null);
10480
- };
10481
- }, [anchorRef, isControlled, isOpen, selectedOptions, setSelectedItems]); //"Turn on" popper on load to position menu correctly and then turn it off
10482
-
10483
- react.useEffect(() => {
10484
- if (anchorRef.current) {
10485
- setAnchorEl(anchorRef.current);
10486
- setTimeout(() => {
10487
- setAnchorEl(null);
10488
- }, 1);
10489
- }
10490
- }, []);
10491
- const {
10492
- styles,
10493
- attributes
10494
- } = edsUtils.usePopper({
10495
- anchorEl,
10496
- popperEl: containerEl,
10497
- placement: 'bottom-start',
10498
- offset: 4,
10499
- autoWidth
10500
- });
10656
+ }, [isControlled, selectedOptions, setSelectedItems]);
10501
10657
 
10502
10658
  const openSelect = () => {
10503
10659
  if (!isOpen && !(disabled || readOnly)) {
@@ -10505,38 +10661,85 @@ function AutocompleteInner(props, ref) {
10505
10661
  }
10506
10662
  };
10507
10663
 
10664
+ const {
10665
+ x,
10666
+ y,
10667
+ refs,
10668
+ update,
10669
+ reference,
10670
+ floating,
10671
+ strategy
10672
+ } = reactDomInteractions.useFloating({
10673
+ placement: 'bottom-start',
10674
+ middleware: [reactDomInteractions.offset(4), reactDomInteractions.flip(), reactDomInteractions.shift({
10675
+ padding: 8
10676
+ }), reactDomInteractions.size({
10677
+ apply(_ref10) {
10678
+ let {
10679
+ rects,
10680
+ availableHeight,
10681
+ elements
10682
+ } = _ref10;
10683
+ const anchorWidth = "".concat(rects.reference.width, "px");
10684
+ Object.assign(elements.floating.style, {
10685
+ width: "".concat(autoWidth ? anchorWidth : 'auto'),
10686
+ maxHeight: "".concat(availableHeight, "px")
10687
+ });
10688
+ },
10689
+
10690
+ padding: 10
10691
+ })]
10692
+ });
10693
+ const {
10694
+ getFloatingProps
10695
+ } = reactDomInteractions.useInteractions([]);
10696
+ react.useLayoutEffect(() => {
10697
+ reference(anchorRef.current);
10698
+ }, [anchorRef, reference]);
10699
+ react.useLayoutEffect(() => {
10700
+ if (refs.reference.current && refs.floating.current && isOpen) {
10701
+ return reactDomInteractions.autoUpdate(refs.reference.current, refs.floating.current, update);
10702
+ }
10703
+ }, [refs.reference, refs.floating, update, isOpen]);
10704
+
10508
10705
  const clear = () => {
10509
10706
  resetCombobox();
10510
10707
  resetSelection();
10511
10708
  };
10512
10709
 
10513
- const showClearButton = (selectedItems.length > 0 || inputValue) && !readOnly;
10710
+ const showClearButton = (selectedItems.length > 0 || inputValue) && !readOnly && !hideClearButton;
10514
10711
  const selectedItemsLabels = react.useMemo(() => selectedItems.map(getLabel), [selectedItems, getLabel]);
10515
10712
 
10516
- const optionsList = /*#__PURE__*/jsxRuntime.jsx(StyledList, { ...getMenuProps({
10517
- ref: setContainerEl,
10518
- style: styles.popper,
10519
- 'aria-multiselectable': multiple ? 'true' : null,
10520
- ...attributes.popper
10521
- }, {
10522
- suppressRefError: true
10713
+ const optionsList = /*#__PURE__*/jsxRuntime.jsx("div", { ...getFloatingProps({
10714
+ ref: floating,
10715
+ style: {
10716
+ position: strategy,
10717
+ top: y !== null && y !== void 0 ? y : 0,
10718
+ left: x !== null && x !== void 0 ? x : 0
10719
+ }
10523
10720
  }),
10524
- children: !isOpen ? null : availableItems.map((item, index) => {
10525
- const label = getLabel(item);
10526
- const isDisabled = optionDisabled(item);
10527
- const isSelected = selectedItemsLabels.includes(label);
10528
- return /*#__PURE__*/jsxRuntime.jsx(AutocompleteOption, {
10529
- value: label,
10530
- multiple: multiple,
10531
- highlighted: highlightedIndex === index && !isDisabled ? 'true' : 'false',
10532
- isSelected: isSelected,
10533
- isDisabled: isDisabled,
10534
- ...getItemProps({
10535
- item,
10536
- index,
10537
- disabled
10538
- })
10539
- }, label);
10721
+ children: /*#__PURE__*/jsxRuntime.jsx(StyledList, { ...getMenuProps({
10722
+ 'aria-multiselectable': multiple ? 'true' : null
10723
+ }, {
10724
+ suppressRefError: true
10725
+ }),
10726
+ children: !isOpen ? null : availableItems.map((item, index) => {
10727
+ const label = getLabel(item);
10728
+ const isDisabled = optionDisabled(item);
10729
+ const isSelected = selectedItemsLabels.includes(label);
10730
+ return /*#__PURE__*/jsxRuntime.jsx(AutocompleteOption, {
10731
+ value: label,
10732
+ multiple: multiple,
10733
+ highlighted: highlightedIndex === index && !isDisabled ? 'true' : 'false',
10734
+ isSelected: isSelected,
10735
+ isDisabled: isDisabled,
10736
+ ...getItemProps({
10737
+ item,
10738
+ index,
10739
+ disabled
10740
+ })
10741
+ }, label);
10742
+ })
10540
10743
  })
10541
10744
  });
10542
10745
 
@@ -10544,6 +10747,7 @@ function AutocompleteInner(props, ref) {
10544
10747
  theme: token,
10545
10748
  children: /*#__PURE__*/jsxRuntime.jsxs(Container, {
10546
10749
  className: className,
10750
+ style: style,
10547
10751
  ref: ref,
10548
10752
  children: [/*#__PURE__*/jsxRuntime.jsx(Label$1, { ...getLabelProps(),
10549
10753
  label: label,
@@ -10554,7 +10758,7 @@ function AutocompleteInner(props, ref) {
10554
10758
  getDropdownProps({
10555
10759
  preventKeyAction: multiple ? isOpen : undefined,
10556
10760
  disabled,
10557
- ref: anchorRef
10761
+ ref: refs.reference
10558
10762
  })),
10559
10763
  placeholder: placeholderText,
10560
10764
  readOnly: readOnly,
@@ -10585,7 +10789,10 @@ function AutocompleteInner(props, ref) {
10585
10789
  data: isOpen ? edsIcons.arrow_drop_up : edsIcons.arrow_drop_down
10586
10790
  })
10587
10791
  })]
10588
- }), disablePortal ? optionsList : !isMounted ? null : /*#__PURE__*/ReactDom.createPortal(optionsList, document.body)]
10792
+ }), disablePortal ? optionsList : /*#__PURE__*/jsxRuntime.jsx(reactDomInteractions.FloatingPortal, {
10793
+ id: "eds-autocomplete-container",
10794
+ children: optionsList
10795
+ })]
10589
10796
  })
10590
10797
  });
10591
10798
  }