@equinor/eds-core-react 0.28.0-dev12152022 → 0.28.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.
@@ -56,11 +56,11 @@ var buttonTypography = edsTokens.tokens.typography.navigation.button,
56
56
  disabledBorderColor$2 = _tokens$colors$intera$l.disabled__border.rgba,
57
57
  disabledColor$3 = _tokens$colors$intera$l.disabled__fill.rgba,
58
58
  medium$7 = edsTokens.tokens.spacings.comfortable.medium,
59
- _tokens$shape$2 = edsTokens.tokens.shape,
60
- _tokens$shape$button = _tokens$shape$2.button,
59
+ _tokens$shape$1 = edsTokens.tokens.shape,
60
+ _tokens$shape$button = _tokens$shape$1.button,
61
61
  buttonHeight = _tokens$shape$button.minHeight,
62
62
  buttonBorderRadius$2 = _tokens$shape$button.borderRadius,
63
- compactButtonHeight = _tokens$shape$2._modes.compact.button.minHeight,
63
+ compactButtonHeight = _tokens$shape$1._modes.compact.button.minHeight,
64
64
  outline = edsTokens.tokens.interactions.focused,
65
65
  _tokens$clickbounds$4 = edsTokens.tokens.clickbounds,
66
66
  clicboundHeight$2 = _tokens$clickbounds$4.default__base,
@@ -4008,16 +4008,16 @@ var _tokens$colors$c = edsTokens.tokens.colors,
4008
4008
  borderRadius$5 = edsTokens.tokens.shape.corners.borderRadius,
4009
4009
  _tokens$spacings$comf$b = edsTokens.tokens.spacings.comfortable,
4010
4010
  small$4 = _tokens$spacings$comf$b.small,
4011
- x_large = _tokens$spacings$comf$b.x_large,
4012
- xxx_large = _tokens$spacings$comf$b.xxx_large,
4011
+ x_large$1 = _tokens$spacings$comf$b.x_large,
4012
+ xxx_large$1 = _tokens$spacings$comf$b.xxx_large,
4013
4013
  typography$9 = edsTokens.tokens.typography;
4014
4014
  var tableOfContents = {
4015
4015
  typography: _objectSpread__default["default"](_objectSpread__default["default"]({}, typography$9.navigation.button), {}, {
4016
4016
  color: labelColor
4017
4017
  }),
4018
4018
  spacings: {
4019
- top: xxx_large,
4020
- bottom: x_large
4019
+ top: xxx_large$1,
4020
+ bottom: x_large$1
4021
4021
  },
4022
4022
  entities: {
4023
4023
  icon: {
@@ -4043,8 +4043,8 @@ var tableOfContents = {
4043
4043
  },
4044
4044
  sticky: {
4045
4045
  spacings: {
4046
- top: x_large,
4047
- right: x_large
4046
+ top: x_large$1,
4047
+ right: x_large$1
4048
4048
  }
4049
4049
  }
4050
4050
  },
@@ -7829,9 +7829,9 @@ var _tokens$colors$1 = edsTokens.tokens.colors,
7829
7829
  clickbounds = edsTokens.tokens.clickbounds,
7830
7830
  boxShadow$1 = edsTokens.tokens.elevation.raised,
7831
7831
  medium_small = edsTokens.tokens.spacings.comfortable.medium_small,
7832
- _tokens$shape$1 = edsTokens.tokens.shape,
7833
- circle = _tokens$shape$1.circle,
7834
- compactIconButton = _tokens$shape$1._modes.compact.icon_button,
7832
+ _tokens$shape = edsTokens.tokens.shape,
7833
+ circle = _tokens$shape.circle,
7834
+ compactIconButton = _tokens$shape._modes.compact.icon_button,
7835
7835
  focusOutlineWidth = edsTokens.tokens.interactions.focused.width;
7836
7836
  var comfortable = {
7837
7837
  typography: labelTypography,
@@ -8005,20 +8005,18 @@ Switch.displayName = 'Switch';
8005
8005
 
8006
8006
  var typography = edsTokens.tokens.typography,
8007
8007
  colors = edsTokens.tokens.colors,
8008
- _tokens$shape = edsTokens.tokens.shape,
8009
- straight = _tokens$shape.straight,
8010
- borderRadius = _tokens$shape.corners.borderRadius,
8008
+ borderRadius = edsTokens.tokens.shape.corners.borderRadius,
8011
8009
  _tokens$spacings$comf$1 = edsTokens.tokens.spacings.comfortable,
8012
8010
  spacingSmall = _tokens$spacings$comf$1.small,
8013
8011
  spacingMediumSmall = _tokens$spacings$comf$1.medium_small,
8014
8012
  spacingMedium = _tokens$spacings$comf$1.medium,
8015
8013
  spacingLarge = _tokens$spacings$comf$1.large,
8016
- xx_small = _tokens$spacings$comf$1.xx_small,
8014
+ x_large = _tokens$spacings$comf$1.x_large,
8015
+ xxx_large = _tokens$spacings$comf$1.xxx_large,
8017
8016
  boxShadow = edsTokens.tokens.elevation.temporary_nav;
8018
8017
  var selectTokens = {
8019
8018
  background: colors.ui.background__default.rgba,
8020
8019
  boxShadow: boxShadow,
8021
- minHeight: straight.minHeight,
8022
8020
  spacings: {
8023
8021
  top: '0',
8024
8022
  right: spacingLarge,
@@ -8056,6 +8054,7 @@ var selectTokens = {
8056
8054
  }
8057
8055
  },
8058
8056
  label: {
8057
+ minHeight: xxx_large,
8059
8058
  spacings: {
8060
8059
  left: '0',
8061
8060
  right: '0',
@@ -8081,6 +8080,7 @@ var selectTokens = {
8081
8080
  }
8082
8081
  },
8083
8082
  label: {
8083
+ minHeight: x_large,
8084
8084
  spacings: {
8085
8085
  left: '0',
8086
8086
  right: '0',
@@ -8102,7 +8102,8 @@ var multiSelect = mergeDeepRight$1(selectTokens, {
8102
8102
  modes: {
8103
8103
  compact: {
8104
8104
  spacings: {
8105
- top: xx_small,
8105
+ top: '0',
8106
+ //xx_small,
8106
8107
  bottom: '0'
8107
8108
  }
8108
8109
  }
@@ -8359,10 +8360,16 @@ function AutocompleteInner(props, ref) {
8359
8360
  return scrollContainer.current;
8360
8361
  },
8361
8362
  estimateSize: react.useCallback(function () {
8362
- return 48;
8363
- }, []),
8363
+ return parseInt(token().entities.label.minHeight);
8364
+ }, [token]),
8364
8365
  overscan: 25
8365
8366
  });
8367
+
8368
+ //https://github.com/TanStack/virtual/discussions/379#discussioncomment-3501037
8369
+ edsUtils.useIsomorphicLayoutEffect(function () {
8370
+ var _rowVirtualizer$measu;
8371
+ rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : (_rowVirtualizer$measu = rowVirtualizer.measure) === null || _rowVirtualizer$measu === void 0 ? void 0 : _rowVirtualizer$measu.call(rowVirtualizer);
8372
+ }, [rowVirtualizer, density]);
8366
8373
  var comboBoxProps = {
8367
8374
  items: availableItems,
8368
8375
  initialSelectedItem: initialSelectedOptions[0],
@@ -11,7 +11,7 @@ import { List } from '../List/index.js';
11
11
  import { Icon } from '../Icon/index.js';
12
12
  import { close, arrow_drop_up, arrow_drop_down } from '@equinor/eds-icons';
13
13
  import { multiSelect, selectTokens } from './Autocomplete.tokens.js';
14
- import { bordersTemplate, useToken } from '@equinor/eds-utils';
14
+ import { bordersTemplate, useToken, useIsomorphicLayoutEffect } from '@equinor/eds-utils';
15
15
  import { AutocompleteOption } from './Option.js';
16
16
  import { useFloating, offset, flip, shift, size, useInteractions, autoUpdate, FloatingPortal } from '@floating-ui/react-dom-interactions';
17
17
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -216,10 +216,16 @@ function AutocompleteInner(props, ref) {
216
216
  return scrollContainer.current;
217
217
  },
218
218
  estimateSize: useCallback(function () {
219
- return 48;
220
- }, []),
219
+ return parseInt(token().entities.label.minHeight);
220
+ }, [token]),
221
221
  overscan: 25
222
222
  });
223
+
224
+ //https://github.com/TanStack/virtual/discussions/379#discussioncomment-3501037
225
+ useIsomorphicLayoutEffect(function () {
226
+ var _rowVirtualizer$measu;
227
+ rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : (_rowVirtualizer$measu = rowVirtualizer.measure) === null || _rowVirtualizer$measu === void 0 ? void 0 : _rowVirtualizer$measu.call(rowVirtualizer);
228
+ }, [rowVirtualizer, density]);
223
229
  var comboBoxProps = {
224
230
  items: availableItems,
225
231
  initialSelectedItem: initialSelectedOptions[0],
@@ -4,20 +4,18 @@ import mergeDeepRight from '../../node_modules/.pnpm/ramda@0.28.0/node_modules/r
4
4
 
5
5
  var typography = tokens.typography,
6
6
  colors = tokens.colors,
7
- _tokens$shape = tokens.shape,
8
- straight = _tokens$shape.straight,
9
- borderRadius = _tokens$shape.corners.borderRadius,
7
+ borderRadius = tokens.shape.corners.borderRadius,
10
8
  _tokens$spacings$comf = tokens.spacings.comfortable,
11
9
  spacingSmall = _tokens$spacings$comf.small,
12
10
  spacingMediumSmall = _tokens$spacings$comf.medium_small,
13
11
  spacingMedium = _tokens$spacings$comf.medium,
14
12
  spacingLarge = _tokens$spacings$comf.large,
15
- xx_small = _tokens$spacings$comf.xx_small,
13
+ x_large = _tokens$spacings$comf.x_large,
14
+ xxx_large = _tokens$spacings$comf.xxx_large,
16
15
  boxShadow = tokens.elevation.temporary_nav;
17
16
  var selectTokens = {
18
17
  background: colors.ui.background__default.rgba,
19
18
  boxShadow: boxShadow,
20
- minHeight: straight.minHeight,
21
19
  spacings: {
22
20
  top: '0',
23
21
  right: spacingLarge,
@@ -55,6 +53,7 @@ var selectTokens = {
55
53
  }
56
54
  },
57
55
  label: {
56
+ minHeight: xxx_large,
58
57
  spacings: {
59
58
  left: '0',
60
59
  right: '0',
@@ -80,6 +79,7 @@ var selectTokens = {
80
79
  }
81
80
  },
82
81
  label: {
82
+ minHeight: x_large,
83
83
  spacings: {
84
84
  left: '0',
85
85
  right: '0',
@@ -101,7 +101,8 @@ var multiSelect = mergeDeepRight(selectTokens, {
101
101
  modes: {
102
102
  compact: {
103
103
  spacings: {
104
- top: xx_small,
104
+ top: '0',
105
+ //xx_small,
105
106
  bottom: '0'
106
107
  }
107
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/eds-core-react",
3
- "version": "0.28.0-dev12152022",
3
+ "version": "0.28.0",
4
4
  "description": "The React implementation of the Equinor Design System",
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -81,7 +81,7 @@
81
81
  "@babel/runtime": "^7.19.0",
82
82
  "@floating-ui/react-dom-interactions": "^0.10.1",
83
83
  "@tanstack/react-virtual": "3.0.0-beta.30",
84
- "downshift": "^7.0.1",
84
+ "downshift": "^7.0.5",
85
85
  "@equinor/eds-icons": "0.17.0",
86
86
  "@equinor/eds-tokens": "0.9.0",
87
87
  "@equinor/eds-utils": "0.7.0"