@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.
- package/dist/eui_charts_theme.js +9 -8
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +2 -5
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +2 -5
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +9 -2
- package/es/components/datagrid/controls/keyboard_shortcuts.js +1 -0
- package/es/components/description_list/description_list.js +40 -3
- package/es/components/markdown_editor/markdown_format.styles.js +3 -6
- package/es/components/text/text.styles.js +3 -6
- package/es/global_styling/functions/typography.js +8 -8
- package/es/global_styling/variables/typography.js +1 -1
- package/es/themes/amsterdam/global_styling/variables/_typography.js +1 -0
- package/eui.d.ts +36 -7
- package/i18ntokens.json +108 -108
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +9 -2
- package/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -0
- package/lib/components/description_list/description_list.js +39 -3
- package/lib/components/markdown_editor/markdown_format.styles.js +3 -6
- package/lib/components/text/text.styles.js +3 -6
- package/lib/global_styling/functions/typography.js +8 -8
- package/lib/global_styling/variables/typography.js +3 -3
- package/lib/themes/amsterdam/global_styling/variables/_typography.js +1 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +4 -2
- package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +1 -0
- package/optimize/es/components/description_list/description_list.js +22 -2
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +3 -6
- package/optimize/es/components/text/text.styles.js +3 -6
- package/optimize/es/global_styling/functions/typography.js +8 -8
- package/optimize/es/global_styling/variables/typography.js +1 -1
- package/optimize/es/themes/amsterdam/global_styling/variables/_typography.js +1 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +4 -2
- package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -0
- package/optimize/lib/components/description_list/description_list.js +22 -2
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +3 -6
- package/optimize/lib/components/text/text.styles.js +3 -6
- package/optimize/lib/global_styling/functions/typography.js +8 -8
- package/optimize/lib/global_styling/variables/typography.js +3 -3
- package/optimize/lib/themes/amsterdam/global_styling/variables/_typography.js +1 -0
- package/package.json +1 -1
- package/src/components/datagrid/controls/_data_grid_keyboard_shortcuts.scss +1 -7
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +9 -2
- package/test-env/components/datagrid/controls/keyboard_shortcuts.js +1 -0
- package/test-env/components/description_list/description_list.js +37 -3
- package/test-env/components/markdown_editor/markdown_format.styles.js +3 -6
- package/test-env/components/text/text.styles.js +3 -6
- package/test-env/global_styling/functions/typography.js +8 -8
- package/test-env/global_styling/variables/typography.js +3 -3
- package/test-env/themes/amsterdam/global_styling/variables/_typography.js +1 -0
package/dist/eui_charts_theme.js
CHANGED
|
@@ -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$
|
|
847
|
-
|
|
846
|
+
_ref2$unit = _ref2.unit,
|
|
847
|
+
unit = _ref2$unit === void 0 ? font.defaultUnits : _ref2$unit,
|
|
848
848
|
customScale = _ref2.customScale;
|
|
849
|
-
if (
|
|
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
|
|
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$
|
|
875
|
-
|
|
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 (
|
|
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
|
|
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];
|