@elastic/eui 88.0.0 → 88.1.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.
Files changed (50) hide show
  1. package/dist/eui_charts_theme.js +9 -8
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/dist/eui_theme_dark.css +2 -5
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +2 -5
  6. package/dist/eui_theme_light.min.css +1 -1
  7. package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +9 -2
  8. package/es/components/datagrid/controls/keyboard_shortcuts.js +1 -0
  9. package/es/components/description_list/description_list.js +40 -3
  10. package/es/components/markdown_editor/markdown_format.styles.js +3 -6
  11. package/es/components/text/text.styles.js +3 -6
  12. package/es/global_styling/functions/typography.js +8 -8
  13. package/es/global_styling/variables/typography.js +1 -1
  14. package/es/themes/amsterdam/global_styling/variables/_typography.js +1 -0
  15. package/eui.d.ts +36 -7
  16. package/i18ntokens.json +108 -108
  17. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +9 -2
  18. package/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -0
  19. package/lib/components/description_list/description_list.js +39 -3
  20. package/lib/components/markdown_editor/markdown_format.styles.js +3 -6
  21. package/lib/components/text/text.styles.js +3 -6
  22. package/lib/global_styling/functions/typography.js +8 -8
  23. package/lib/global_styling/variables/typography.js +3 -3
  24. package/lib/themes/amsterdam/global_styling/variables/_typography.js +1 -0
  25. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +4 -2
  26. package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +1 -0
  27. package/optimize/es/components/description_list/description_list.js +22 -2
  28. package/optimize/es/components/markdown_editor/markdown_format.styles.js +3 -6
  29. package/optimize/es/components/text/text.styles.js +3 -6
  30. package/optimize/es/global_styling/functions/typography.js +8 -8
  31. package/optimize/es/global_styling/variables/typography.js +1 -1
  32. package/optimize/es/themes/amsterdam/global_styling/variables/_typography.js +1 -0
  33. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +4 -2
  34. package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -0
  35. package/optimize/lib/components/description_list/description_list.js +22 -2
  36. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +3 -6
  37. package/optimize/lib/components/text/text.styles.js +3 -6
  38. package/optimize/lib/global_styling/functions/typography.js +8 -8
  39. package/optimize/lib/global_styling/variables/typography.js +3 -3
  40. package/optimize/lib/themes/amsterdam/global_styling/variables/_typography.js +1 -0
  41. package/package.json +1 -1
  42. package/src/components/datagrid/controls/_data_grid_keyboard_shortcuts.scss +1 -7
  43. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +9 -2
  44. package/test-env/components/datagrid/controls/keyboard_shortcuts.js +1 -0
  45. package/test-env/components/description_list/description_list.js +37 -3
  46. package/test-env/components/markdown_editor/markdown_format.styles.js +3 -6
  47. package/test-env/components/text/text.styles.js +3 -6
  48. package/test-env/global_styling/functions/typography.js +8 -8
  49. package/test-env/global_styling/variables/typography.js +3 -3
  50. package/test-env/themes/amsterdam/global_styling/variables/_typography.js +1 -0
@@ -843,16 +843,16 @@ function euiFontSizeFromScale(scale, _ref) {
843
843
  var base = _ref.base,
844
844
  font = _ref.font;
845
845
  var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
846
- _ref2$measurement = _ref2.measurement,
847
- measurement = _ref2$measurement === void 0 ? 'rem' : _ref2$measurement,
846
+ _ref2$unit = _ref2.unit,
847
+ unit = _ref2$unit === void 0 ? font.defaultUnits : _ref2$unit,
848
848
  customScale = _ref2.customScale;
849
- if (measurement === 'em') {
849
+ if (unit === 'em') {
850
850
  return "".concat(font.scale[scale], "em");
851
851
  }
852
852
  var numerator = base * font.scale[scale];
853
853
  if (customScale) numerator *= font.scale[customScale];
854
854
  var denominator = base * font.scale[font.body.scale];
855
- return measurement === 'px' ? "".concat(numerator, "px") : "".concat((numerator / denominator).toFixed(4), "rem");
855
+ return unit === 'px' ? "".concat(numerator, "px") : "".concat((numerator / denominator).toFixed(4), "rem");
856
856
  }
857
857
 
858
858
  /**
@@ -871,8 +871,8 @@ function euiLineHeightFromBaseline(scale, _ref3) {
871
871
  var base = _ref3.base,
872
872
  font = _ref3.font;
873
873
  var _ref4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
874
- _ref4$measurement = _ref4.measurement,
875
- measurement = _ref4$measurement === void 0 ? 'rem' : _ref4$measurement,
874
+ _ref4$unit = _ref4.unit,
875
+ unit = _ref4$unit === void 0 ? font.defaultUnits : _ref4$unit,
876
876
  customScale = _ref4.customScale;
877
877
  var baseline = font.baseline,
878
878
  lineHeightMultiplier = font.lineHeightMultiplier;
@@ -880,13 +880,13 @@ function euiLineHeightFromBaseline(scale, _ref3) {
880
880
  if (customScale) numerator *= font.scale[customScale];
881
881
  var denominator = base * font.scale[font.body.scale];
882
882
  var _lineHeightMultiplier = numerator <= base ? lineHeightMultiplier : lineHeightMultiplier * 0.833;
883
- if (measurement === 'em') {
883
+ if (unit === 'em') {
884
884
  // Even though the line-height via `em` cannot be determined against the pixel baseline grid;
885
885
  // we will assume that typically larger scale font-sizes should have a shorter line-height;
886
886
  return _lineHeightMultiplier.toFixed(4).toString();
887
887
  }
888
888
  var pixelValue = Math.floor(Math.round(numerator * _lineHeightMultiplier) / baseline) * baseline;
889
- return measurement === 'px' ? "".concat(pixelValue, "px") : "".concat((pixelValue / denominator).toFixed(4), "rem");
889
+ return unit === 'px' ? "".concat(pixelValue, "px") : "".concat((pixelValue / denominator).toFixed(4), "rem");
890
890
  }
891
891
 
892
892
  /**
@@ -3220,6 +3220,7 @@ var fontBase = {
3220
3220
  familySerif: 'Georgia, Times, Times New Roman, serif',
3221
3221
  // Careful using ligatures. Code editors like ACE will often error because of width calculations
3222
3222
  featureSettings: "'calt' 1, 'kern' 1, 'liga' 1",
3223
+ defaultUnits: 'rem',
3223
3224
  baseline: (0, _utils.computed)(function (_ref) {
3224
3225
  var _ref2 = _slicedToArray(_ref, 1),
3225
3226
  base = _ref2[0];