@elastic/eui 59.0.1 → 59.2.0-rc1
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 +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +2 -184
- package/dist/eui_theme_dark.json +0 -6
- package/dist/eui_theme_dark.json.d.ts +0 -6
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +2 -184
- package/dist/eui_theme_light.json +0 -6
- package/dist/eui_theme_light.json.d.ts +0 -6
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +39 -2
- package/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/es/components/button/{button_content.js → _button_content_deprecated.js} +4 -3
- package/es/components/button/button.js +16 -10
- package/es/components/button/button_display/_button_display.js +141 -0
- package/es/components/button/button_display/_button_display.styles.js +53 -0
- package/es/components/button/button_display/_button_display_content.js +100 -0
- package/es/components/button/button_display/_button_display_content.styles.js +61 -0
- package/es/components/button/button_empty/button_empty.js +3 -2
- package/es/components/button/button_group/button_group.js +2 -1
- package/es/components/button/button_group/button_group_button.js +3 -2
- package/es/components/card/card.js +2 -1
- package/es/components/card/card_select.js +2 -1
- package/es/components/combo_box/matching_options.js +3 -2
- package/es/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/es/components/facet/facet_button.js +31 -15
- package/es/components/facet/facet_button.styles.js +64 -0
- package/es/components/facet/facet_group.js +12 -23
- package/es/components/facet/facet_group.styles.js +79 -0
- package/es/components/header/header_links/header_link.js +2 -1
- package/es/components/loading/loading_spinner.js +14 -3
- package/es/components/loading/loading_spinner.styles.js +4 -4
- package/es/components/notification/notification_event.js +2 -1
- package/es/components/pagination/pagination_button.js +2 -1
- package/es/components/provider/cache/cache_provider.js +17 -0
- package/es/components/provider/cache/index.js +8 -0
- package/es/components/provider/index.js +1 -1
- package/es/components/provider/provider.js +35 -5
- package/es/components/selectable/selectable.js +39 -22
- package/es/components/stat/stat.js +28 -35
- package/es/components/stat/stat.styles.js +38 -0
- package/es/components/timeline/timeline.js +15 -8
- package/es/components/timeline/timeline.styles.js +29 -0
- package/es/components/timeline/timeline_item.js +4 -16
- package/es/components/timeline/timeline_item.styles.js +18 -3
- package/es/components/timeline/timeline_item_icon.styles.js +14 -4
- package/es/global_styling/functions/logicals.js +2 -2
- package/es/global_styling/utility/utility.js +27 -0
- package/es/services/theme/hooks.js +2 -2
- package/es/services/theme/provider.js +1 -5
- package/es/test/emotion-prefix.js +29 -0
- package/es/test/index.d.ts +5 -0
- package/es/test/index.js +2 -1
- package/es/themes/amsterdam/index.js +9 -0
- package/es/themes/index.js +2 -1
- package/eui.d.ts +290 -52
- package/i18ntokens.json +16 -16
- package/lib/components/accessibility/skip_link/skip_link.js +39 -2
- package/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/lib/components/button/{button_content.js → _button_content_deprecated.js} +6 -5
- package/lib/components/button/button.js +19 -13
- package/lib/components/button/button_display/_button_display.js +146 -0
- package/lib/components/button/button_display/_button_display.styles.js +59 -0
- package/lib/components/button/button_display/_button_display_content.js +111 -0
- package/lib/components/button/button_display/_button_display_content.styles.js +64 -0
- package/lib/components/button/button_empty/button_empty.js +4 -3
- package/lib/components/button/button_group/button_group.js +2 -1
- package/lib/components/button/button_group/button_group_button.js +3 -2
- package/lib/components/card/card.js +2 -1
- package/lib/components/card/card_select.js +2 -1
- package/lib/components/combo_box/matching_options.js +3 -2
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/lib/components/facet/facet_button.js +35 -15
- package/lib/components/facet/facet_button.styles.js +79 -0
- package/lib/components/facet/facet_group.js +12 -23
- package/lib/components/facet/facet_group.styles.js +82 -0
- package/lib/components/header/header_links/header_link.js +2 -1
- package/lib/components/loading/loading_spinner.js +14 -3
- package/lib/components/loading/loading_spinner.styles.js +4 -4
- package/lib/components/notification/notification_event.js +2 -1
- package/lib/components/provider/cache/cache_provider.js +29 -0
- package/lib/components/provider/cache/index.js +18 -0
- package/lib/components/provider/index.js +12 -7
- package/lib/components/provider/provider.js +36 -5
- package/lib/components/selectable/selectable.js +39 -22
- package/lib/components/stat/stat.js +30 -40
- package/lib/components/stat/stat.styles.js +45 -0
- package/lib/components/timeline/timeline.js +20 -9
- package/lib/components/timeline/timeline.styles.js +39 -0
- package/lib/components/timeline/timeline_item.js +4 -17
- package/lib/components/timeline/timeline_item.styles.js +17 -10
- package/lib/components/timeline/timeline_item_icon.styles.js +15 -4
- package/lib/global_styling/functions/logicals.js +2 -2
- package/lib/global_styling/utility/utility.js +31 -0
- package/lib/services/theme/hooks.js +2 -2
- package/lib/services/theme/provider.js +3 -6
- package/lib/test/emotion-prefix.js +38 -0
- package/lib/test/index.d.ts +5 -0
- package/lib/test/index.js +23 -1
- package/lib/themes/amsterdam/index.js +18 -0
- package/lib/themes/index.js +21 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.js +23 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/es/components/button/{button_content.js → _button_content_deprecated.js} +1 -1
- package/optimize/es/components/button/button.js +13 -8
- package/optimize/es/components/button/button_display/_button_display.js +73 -0
- package/optimize/es/components/button/button_display/_button_display.styles.js +53 -0
- package/optimize/es/components/button/button_display/_button_display_content.js +67 -0
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +61 -0
- package/optimize/es/components/button/button_empty/button_empty.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +1 -1
- package/optimize/es/components/combo_box/matching_options.js +3 -2
- package/optimize/es/components/facet/facet_button.js +31 -15
- package/optimize/es/components/facet/facet_button.styles.js +64 -0
- package/optimize/es/components/facet/facet_group.js +10 -21
- package/optimize/es/components/facet/facet_group.styles.js +79 -0
- package/optimize/es/components/loading/loading_spinner.js +3 -2
- package/optimize/es/components/loading/loading_spinner.styles.js +4 -4
- package/optimize/es/components/provider/cache/cache_provider.js +17 -0
- package/optimize/es/components/provider/cache/index.js +8 -0
- package/optimize/es/components/provider/index.js +1 -1
- package/optimize/es/components/provider/provider.js +35 -5
- package/optimize/es/components/selectable/selectable.js +33 -22
- package/optimize/es/components/stat/stat.js +25 -33
- package/optimize/es/components/stat/stat.styles.js +38 -0
- package/optimize/es/components/timeline/timeline.js +10 -1
- package/optimize/es/components/timeline/timeline.styles.js +29 -0
- package/optimize/es/components/timeline/timeline_item.js +4 -9
- package/optimize/es/components/timeline/timeline_item.styles.js +18 -3
- package/optimize/es/components/timeline/timeline_item_icon.styles.js +14 -4
- package/optimize/es/global_styling/functions/logicals.js +2 -2
- package/optimize/es/global_styling/utility/utility.js +27 -0
- package/optimize/es/services/theme/hooks.js +2 -2
- package/optimize/es/services/theme/provider.js +1 -5
- package/optimize/es/test/emotion-prefix.js +27 -0
- package/optimize/es/test/index.d.ts +5 -0
- package/optimize/es/test/index.js +2 -1
- package/optimize/es/themes/amsterdam/index.js +9 -0
- package/optimize/es/themes/index.js +2 -1
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +25 -1
- package/optimize/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/lib/components/button/{button_content.js → _button_content_deprecated.js} +3 -3
- package/optimize/lib/components/button/button.js +16 -11
- package/optimize/lib/components/button/button_display/_button_display.js +79 -0
- package/optimize/lib/components/button/button_display/_button_display.styles.js +59 -0
- package/optimize/lib/components/button/button_display/_button_display_content.js +78 -0
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +64 -0
- package/optimize/lib/components/button/button_empty/button_empty.js +2 -2
- package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
- package/optimize/lib/components/combo_box/matching_options.js +3 -2
- package/optimize/lib/components/facet/facet_button.js +35 -15
- package/optimize/lib/components/facet/facet_button.styles.js +79 -0
- package/optimize/lib/components/facet/facet_group.js +10 -21
- package/optimize/lib/components/facet/facet_group.styles.js +82 -0
- package/optimize/lib/components/loading/loading_spinner.js +3 -2
- package/optimize/lib/components/loading/loading_spinner.styles.js +4 -4
- package/optimize/lib/components/provider/cache/cache_provider.js +29 -0
- package/optimize/lib/components/provider/cache/index.js +18 -0
- package/optimize/lib/components/provider/index.js +12 -7
- package/optimize/lib/components/provider/provider.js +36 -5
- package/optimize/lib/components/selectable/selectable.js +33 -22
- package/optimize/lib/components/stat/stat.js +27 -37
- package/optimize/lib/components/stat/stat.styles.js +47 -0
- package/optimize/lib/components/timeline/timeline.js +14 -2
- package/optimize/lib/components/timeline/timeline.styles.js +39 -0
- package/optimize/lib/components/timeline/timeline_item.js +4 -10
- package/optimize/lib/components/timeline/timeline_item.styles.js +17 -10
- package/optimize/lib/components/timeline/timeline_item_icon.styles.js +15 -4
- package/optimize/lib/global_styling/functions/logicals.js +2 -2
- package/optimize/lib/global_styling/utility/utility.js +31 -0
- package/optimize/lib/services/theme/hooks.js +2 -2
- package/optimize/lib/services/theme/provider.js +3 -6
- package/optimize/lib/test/emotion-prefix.js +40 -0
- package/optimize/lib/test/index.d.ts +5 -0
- package/optimize/lib/test/index.js +23 -1
- package/optimize/lib/themes/amsterdam/index.js +18 -0
- package/optimize/lib/themes/index.js +21 -1
- package/package.json +1 -1
- package/src/components/index.scss +0 -2
- package/src/components/selectable/selectable_message/_selectable_message.scss +1 -0
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +40 -2
- package/test-env/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/test-env/components/button/{button_content.js → _button_content_deprecated.js} +6 -5
- package/test-env/components/button/button.js +19 -13
- package/test-env/components/button/button_display/_button_display.js +143 -0
- package/test-env/components/button/button_display/_button_display.styles.js +59 -0
- package/test-env/components/button/button_display/_button_display_content.js +108 -0
- package/test-env/components/button/button_display/_button_display_content.styles.js +64 -0
- package/test-env/components/button/button_empty/button_empty.js +4 -3
- package/test-env/components/button/button_group/button_group.js +2 -1
- package/test-env/components/button/button_group/button_group_button.js +3 -2
- package/test-env/components/card/card.js +2 -1
- package/test-env/components/card/card_select.js +2 -1
- package/test-env/components/combo_box/matching_options.js +3 -2
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/test-env/components/facet/facet_button.js +35 -15
- package/test-env/components/facet/facet_button.styles.js +79 -0
- package/test-env/components/facet/facet_group.js +12 -23
- package/test-env/components/facet/facet_group.styles.js +82 -0
- package/test-env/components/header/header_links/header_link.js +2 -1
- package/test-env/components/loading/loading_spinner.js +14 -3
- package/test-env/components/loading/loading_spinner.styles.js +4 -4
- package/test-env/components/notification/notification_event.js +2 -1
- package/test-env/components/provider/cache/cache_provider.js +29 -0
- package/test-env/components/provider/cache/index.js +18 -0
- package/test-env/components/provider/index.js +12 -7
- package/test-env/components/provider/provider.js +36 -5
- package/test-env/components/selectable/selectable.js +39 -22
- package/test-env/components/stat/stat.js +29 -39
- package/test-env/components/stat/stat.styles.js +47 -0
- package/test-env/components/timeline/timeline.js +19 -9
- package/test-env/components/timeline/timeline.styles.js +39 -0
- package/test-env/components/timeline/timeline_item.js +4 -17
- package/test-env/components/timeline/timeline_item.styles.js +17 -10
- package/test-env/components/timeline/timeline_item_icon.styles.js +15 -4
- package/test-env/global_styling/functions/logicals.js +2 -2
- package/test-env/global_styling/utility/utility.js +31 -0
- package/test-env/services/theme/hooks.js +2 -2
- package/test-env/services/theme/provider.js +3 -6
- package/test-env/test/emotion-prefix.js +40 -0
- package/test-env/test/index.js +23 -1
- package/test-env/themes/amsterdam/index.js +18 -0
- package/test-env/themes/index.js +21 -1
- package/src/components/facet/_facet_button.scss +0 -69
- package/src/components/facet/_facet_group.scss +0 -24
- package/src/components/facet/_index.scss +0 -4
- package/src/components/facet/_variables.scss +0 -6
- package/src/components/stat/_index.scss +0 -1
- package/src/components/stat/_stat.scss +0 -50
- package/src/themes/amsterdam/overrides/_facet.scss +0 -10
package/i18ntokens.json
CHANGED
|
@@ -4805,11 +4805,11 @@
|
|
|
4805
4805
|
"highlighting": "string",
|
|
4806
4806
|
"loc": {
|
|
4807
4807
|
"start": {
|
|
4808
|
-
"line":
|
|
4808
|
+
"line": 568,
|
|
4809
4809
|
"column": 16
|
|
4810
4810
|
},
|
|
4811
4811
|
"end": {
|
|
4812
|
-
"line":
|
|
4812
|
+
"line": 571,
|
|
4813
4813
|
"column": 18
|
|
4814
4814
|
}
|
|
4815
4815
|
},
|
|
@@ -4821,11 +4821,11 @@
|
|
|
4821
4821
|
"highlighting": "string",
|
|
4822
4822
|
"loc": {
|
|
4823
4823
|
"start": {
|
|
4824
|
-
"line":
|
|
4824
|
+
"line": 590,
|
|
4825
4825
|
"column": 14
|
|
4826
4826
|
},
|
|
4827
4827
|
"end": {
|
|
4828
|
-
"line":
|
|
4828
|
+
"line": 594,
|
|
4829
4829
|
"column": 16
|
|
4830
4830
|
}
|
|
4831
4831
|
},
|
|
@@ -4837,11 +4837,11 @@
|
|
|
4837
4837
|
"highlighting": "string",
|
|
4838
4838
|
"loc": {
|
|
4839
4839
|
"start": {
|
|
4840
|
-
"line":
|
|
4840
|
+
"line": 609,
|
|
4841
4841
|
"column": 14
|
|
4842
4842
|
},
|
|
4843
4843
|
"end": {
|
|
4844
|
-
"line":
|
|
4844
|
+
"line": 612,
|
|
4845
4845
|
"column": 16
|
|
4846
4846
|
}
|
|
4847
4847
|
},
|
|
@@ -4853,11 +4853,11 @@
|
|
|
4853
4853
|
"highlighting": "string",
|
|
4854
4854
|
"loc": {
|
|
4855
4855
|
"start": {
|
|
4856
|
-
"line":
|
|
4856
|
+
"line": 674,
|
|
4857
4857
|
"column": 6
|
|
4858
4858
|
},
|
|
4859
4859
|
"end": {
|
|
4860
|
-
"line":
|
|
4860
|
+
"line": 674,
|
|
4861
4861
|
"column": 78
|
|
4862
4862
|
}
|
|
4863
4863
|
},
|
|
@@ -4869,11 +4869,11 @@
|
|
|
4869
4869
|
"highlighting": "code",
|
|
4870
4870
|
"loc": {
|
|
4871
4871
|
"start": {
|
|
4872
|
-
"line":
|
|
4872
|
+
"line": 701,
|
|
4873
4873
|
"column": 6
|
|
4874
4874
|
},
|
|
4875
4875
|
"end": {
|
|
4876
|
-
"line":
|
|
4876
|
+
"line": 707,
|
|
4877
4877
|
"column": 8
|
|
4878
4878
|
}
|
|
4879
4879
|
},
|
|
@@ -4885,11 +4885,11 @@
|
|
|
4885
4885
|
"highlighting": "string",
|
|
4886
4886
|
"loc": {
|
|
4887
4887
|
"start": {
|
|
4888
|
-
"line":
|
|
4888
|
+
"line": 719,
|
|
4889
4889
|
"column": 6
|
|
4890
4890
|
},
|
|
4891
4891
|
"end": {
|
|
4892
|
-
"line":
|
|
4892
|
+
"line": 728,
|
|
4893
4893
|
"column": 7
|
|
4894
4894
|
}
|
|
4895
4895
|
},
|
|
@@ -4901,11 +4901,11 @@
|
|
|
4901
4901
|
"highlighting": "string",
|
|
4902
4902
|
"loc": {
|
|
4903
4903
|
"start": {
|
|
4904
|
-
"line":
|
|
4904
|
+
"line": 719,
|
|
4905
4905
|
"column": 6
|
|
4906
4906
|
},
|
|
4907
4907
|
"end": {
|
|
4908
|
-
"line":
|
|
4908
|
+
"line": 728,
|
|
4909
4909
|
"column": 7
|
|
4910
4910
|
}
|
|
4911
4911
|
},
|
|
@@ -4917,11 +4917,11 @@
|
|
|
4917
4917
|
"highlighting": "string",
|
|
4918
4918
|
"loc": {
|
|
4919
4919
|
"start": {
|
|
4920
|
-
"line":
|
|
4920
|
+
"line": 128,
|
|
4921
4921
|
"column": 10
|
|
4922
4922
|
},
|
|
4923
4923
|
"end": {
|
|
4924
|
-
"line":
|
|
4924
|
+
"line": 128,
|
|
4925
4925
|
"column": 80
|
|
4926
4926
|
}
|
|
4927
4927
|
},
|
|
@@ -21,12 +21,18 @@ var _skip_link = require("./skip_link.styles");
|
|
|
21
21
|
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
23
|
|
|
24
|
-
var _excluded = ["destinationId", "tabIndex", "position", "children", "className"];
|
|
24
|
+
var _excluded = ["destinationId", "overrideLinkBehavior", "tabIndex", "position", "children", "className"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
28
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
29
|
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
33
|
+
|
|
34
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
|
|
30
36
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
37
|
|
|
32
38
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -36,6 +42,7 @@ exports.POSITIONS = POSITIONS;
|
|
|
36
42
|
|
|
37
43
|
var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
38
44
|
var destinationId = _ref.destinationId,
|
|
45
|
+
overrideLinkBehavior = _ref.overrideLinkBehavior,
|
|
39
46
|
tabIndex = _ref.tabIndex,
|
|
40
47
|
_ref$position = _ref.position,
|
|
41
48
|
position = _ref$position === void 0 ? 'static' : _ref$position,
|
|
@@ -56,6 +63,22 @@ var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
|
56
63
|
};
|
|
57
64
|
}
|
|
58
65
|
|
|
66
|
+
if (overrideLinkBehavior) {
|
|
67
|
+
optionalProps = _objectSpread(_objectSpread({}, optionalProps), {}, {
|
|
68
|
+
onClick: function onClick(e) {
|
|
69
|
+
e.preventDefault();
|
|
70
|
+
var destinationEl = document.getElementById(destinationId);
|
|
71
|
+
if (!destinationEl) return;
|
|
72
|
+
destinationEl.scrollIntoView();
|
|
73
|
+
destinationEl.tabIndex = -1; // Ensure the destination content is focusable
|
|
74
|
+
|
|
75
|
+
destinationEl.focus({
|
|
76
|
+
preventScroll: true
|
|
77
|
+
}); // Scrolling is already handled above, and focus's autoscroll behaves oddly around fixed headers
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
59
82
|
return (0, _react2.jsx)(_screen_reader_only.EuiScreenReaderOnly, {
|
|
60
83
|
showOnFocus: true
|
|
61
84
|
}, (0, _react2.jsx)(_button.EuiButton, _extends({
|
|
@@ -94,6 +117,19 @@ EuiSkipLink.propTypes = {
|
|
|
94
117
|
*/
|
|
95
118
|
destinationId: _propTypes.default.string.isRequired,
|
|
96
119
|
|
|
120
|
+
/**
|
|
121
|
+
* If default HTML anchor link behavior is not desired (e.g. for SPAs with hash routing),
|
|
122
|
+
* setting this flag to true will manually scroll to and focus the destination element
|
|
123
|
+
* without changing the browser URL's hash
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* If default HTML anchor link behavior is not desired (e.g. for SPAs with hash routing),
|
|
128
|
+
* setting this flag to true will manually scroll to and focus the destination element
|
|
129
|
+
* without changing the browser URL's hash
|
|
130
|
+
*/
|
|
131
|
+
overrideLinkBehavior: _propTypes.default.bool,
|
|
132
|
+
|
|
97
133
|
/**
|
|
98
134
|
* When position is fixed, this is forced to `0`
|
|
99
135
|
*/
|
|
@@ -162,7 +198,8 @@ EuiSkipLink.propTypes = {
|
|
|
162
198
|
iconSide: _propTypes.default.oneOf(["left", "right"]),
|
|
163
199
|
|
|
164
200
|
/**
|
|
165
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
201
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
202
|
+
* It doesn't apply to the icon.
|
|
166
203
|
*/
|
|
167
204
|
textProps: _propTypes.default.shape({
|
|
168
205
|
className: _propTypes.default.string,
|
|
@@ -35,7 +35,7 @@ var euiSkipLinkStyles = function euiSkipLinkStyles(_ref3) {
|
|
|
35
35
|
// Set positions on focus only as to not override screenReaderOnly position
|
|
36
36
|
// When positioned absolutely, consumers still need to tell it WHERE (top,left,etc...)
|
|
37
37
|
absolute: _ref,
|
|
38
|
-
fixed: /*#__PURE__*/(0, _react.css)("
|
|
38
|
+
fixed: /*#__PURE__*/(0, _react.css)("position:fixed!important;&:focus{inset-block-start:", euiTheme.size.xs, ";inset-inline-start:", euiTheme.size.xs, ";z-index:", Number(euiTheme.levels.header) + 1, ";};label:fixed;")
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ICON_SIDES = exports.
|
|
6
|
+
exports.ICON_SIDES = exports.EuiButtonContentDeprecated = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -36,7 +36,7 @@ var iconSideToClassNameMap = {
|
|
|
36
36
|
var ICON_SIDES = (0, _common.keysOf)(iconSideToClassNameMap);
|
|
37
37
|
exports.ICON_SIDES = ICON_SIDES;
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var EuiButtonContentDeprecated = function EuiButtonContentDeprecated(_ref) {
|
|
40
40
|
var children = _ref.children,
|
|
41
41
|
textProps = _ref.textProps,
|
|
42
42
|
_ref$isLoading = _ref.isLoading,
|
|
@@ -72,8 +72,8 @@ var EuiButtonContent = function EuiButtonContent(_ref) {
|
|
|
72
72
|
}), buttonIcon, (0, _react2.jsx)("span", textProps, children));
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
exports.
|
|
76
|
-
|
|
75
|
+
exports.EuiButtonContentDeprecated = EuiButtonContentDeprecated;
|
|
76
|
+
EuiButtonContentDeprecated.propTypes = {
|
|
77
77
|
/**
|
|
78
78
|
* Any `type` accepted by EuiIcon
|
|
79
79
|
*/
|
|
@@ -86,7 +86,8 @@ EuiButtonContent.propTypes = {
|
|
|
86
86
|
isLoading: _propTypes.default.bool,
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
89
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
90
|
+
* It doesn't apply to the icon.
|
|
90
91
|
*/
|
|
91
92
|
textProps: _propTypes.default.shape({
|
|
92
93
|
className: _propTypes.default.string,
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.sizeToClassNameMap = exports.colorToClassNameMap = exports.SIZES = exports.
|
|
8
|
+
exports.sizeToClassNameMap = exports.colorToClassNameMap = exports.SIZES = exports.EuiButtonDisplayDeprecated = exports.EuiButton = exports.COLORS = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ var _common = require("../common");
|
|
|
17
17
|
|
|
18
18
|
var _services = require("../../services");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _button_content_deprecated = require("./_button_content_deprecated");
|
|
21
21
|
|
|
22
22
|
var _href_validator = require("../../services/security/href_validator");
|
|
23
23
|
|
|
@@ -115,11 +115,13 @@ var EuiButton = function EuiButton(_ref) {
|
|
|
115
115
|
relObj.type = type;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
return (
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
return (// eslint-disable-next-line react/jsx-pascal-case
|
|
119
|
+
(0, _react2.jsx)(EuiButtonDisplayDeprecated, _extends({
|
|
120
|
+
element: element,
|
|
121
|
+
baseClassName: "euiButton",
|
|
122
|
+
ref: buttonRef
|
|
123
|
+
}, elementProps, relObj, rest))
|
|
124
|
+
);
|
|
123
125
|
};
|
|
124
126
|
|
|
125
127
|
exports.EuiButton = EuiButton;
|
|
@@ -219,7 +221,8 @@ EuiButton.propTypes = {
|
|
|
219
221
|
iconSide: _propTypes.default.oneOf(["left", "right"]),
|
|
220
222
|
|
|
221
223
|
/**
|
|
222
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
224
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
225
|
+
* It doesn't apply to the icon.
|
|
223
226
|
*/
|
|
224
227
|
textProps: _propTypes.default.shape({
|
|
225
228
|
className: _propTypes.default.string,
|
|
@@ -237,13 +240,16 @@ EuiButton.propTypes = {
|
|
|
237
240
|
EuiButton.displayName = 'EuiButton';
|
|
238
241
|
|
|
239
242
|
/**
|
|
243
|
+
* *DEPRECATED*
|
|
240
244
|
* EuiButtonDisplay is an internal-only component used for displaying
|
|
241
245
|
* any element as a button.
|
|
242
246
|
* NOTE: This component *must* be below EuiButton in the file and
|
|
243
247
|
* EuiButton must also set a displayName for react-docgen-typescript
|
|
244
248
|
* to correctly set EuiButton's docgenInfo and display a props table.
|
|
249
|
+
* This component has been deprecated in favor of the new EuiButtonDisplay
|
|
250
|
+
* that can be found in `src/components/button/button_display/_button_display.tsx`
|
|
245
251
|
*/
|
|
246
|
-
var
|
|
252
|
+
var EuiButtonDisplayDeprecated = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
247
253
|
var _ref2$element = _ref2.element,
|
|
248
254
|
element = _ref2$element === void 0 ? 'button' : _ref2$element,
|
|
249
255
|
baseClassName = _ref2.baseClassName,
|
|
@@ -277,7 +283,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
277
283
|
|
|
278
284
|
var contentClassNames = (0, _classnames.default)('euiButton__content', contentProps && contentProps.className);
|
|
279
285
|
var textClassNames = (0, _classnames.default)('euiButton__text', textProps && textProps.className);
|
|
280
|
-
var innerNode = (0, _react2.jsx)(
|
|
286
|
+
var innerNode = (0, _react2.jsx)(_button_content_deprecated.EuiButtonContentDeprecated, _extends({
|
|
281
287
|
isLoading: isLoading,
|
|
282
288
|
iconType: iconType,
|
|
283
289
|
iconSide: iconSide,
|
|
@@ -304,8 +310,8 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
304
310
|
ref: ref
|
|
305
311
|
}, rest), innerNode);
|
|
306
312
|
});
|
|
307
|
-
exports.
|
|
308
|
-
|
|
313
|
+
exports.EuiButtonDisplayDeprecated = EuiButtonDisplayDeprecated;
|
|
314
|
+
EuiButtonDisplayDeprecated.propTypes = {
|
|
309
315
|
children: _propTypes.default.node,
|
|
310
316
|
|
|
311
317
|
/**
|
|
@@ -378,4 +384,4 @@ EuiButtonDisplay.propTypes = {
|
|
|
378
384
|
*/
|
|
379
385
|
baseClassName: _propTypes.default.string.isRequired
|
|
380
386
|
};
|
|
381
|
-
|
|
387
|
+
EuiButtonDisplayDeprecated.displayName = 'EuiButtonDisplay';
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.EuiButtonDisplay = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _react2 = require("@emotion/react");
|
|
15
|
+
|
|
16
|
+
var _services = require("../../../services");
|
|
17
|
+
|
|
18
|
+
var _button_display = require("./_button_display.styles");
|
|
19
|
+
|
|
20
|
+
var _button_display_content = require("./_button_display_content");
|
|
21
|
+
|
|
22
|
+
var _excluded = ["element", "children", "iconType", "iconSide", "size", "isDisabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps"];
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
+
|
|
32
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
+
|
|
34
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
35
|
+
|
|
36
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
|
+
|
|
38
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
39
|
+
|
|
40
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* EuiButtonDisplay is an internal-only component used for displaying
|
|
44
|
+
* any element as a button.
|
|
45
|
+
*/
|
|
46
|
+
var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
47
|
+
var _ref$element = _ref.element,
|
|
48
|
+
element = _ref$element === void 0 ? 'button' : _ref$element,
|
|
49
|
+
children = _ref.children,
|
|
50
|
+
iconType = _ref.iconType,
|
|
51
|
+
iconSide = _ref.iconSide,
|
|
52
|
+
_ref$size = _ref.size,
|
|
53
|
+
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
54
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
55
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
56
|
+
isLoading = _ref.isLoading,
|
|
57
|
+
isSelected = _ref.isSelected,
|
|
58
|
+
fullWidth = _ref.fullWidth,
|
|
59
|
+
minWidth = _ref.minWidth,
|
|
60
|
+
contentProps = _ref.contentProps,
|
|
61
|
+
textProps = _ref.textProps,
|
|
62
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
63
|
+
|
|
64
|
+
var buttonIsDisabled = isLoading || isDisabled;
|
|
65
|
+
var minWidthPx = minWidth === 'number' ? "".concat(minWidth, "px") : minWidth;
|
|
66
|
+
var theme = (0, _services.useEuiTheme)();
|
|
67
|
+
var styles = (0, _button_display.euiButtonDisplayStyles)(theme, minWidthPx);
|
|
68
|
+
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, isDisabled && styles.isDisabled];
|
|
69
|
+
var innerNode = (0, _react2.jsx)(_button_display_content.EuiButtonDisplayContent, _extends({
|
|
70
|
+
isLoading: isLoading,
|
|
71
|
+
isDisabled: buttonIsDisabled,
|
|
72
|
+
iconType: iconType,
|
|
73
|
+
iconSide: iconSide,
|
|
74
|
+
textProps: _objectSpread({}, textProps)
|
|
75
|
+
}, contentProps), children);
|
|
76
|
+
return (0, _react2.createElement)(element, _objectSpread({
|
|
77
|
+
css: cssStyles,
|
|
78
|
+
disabled: element === 'button' && buttonIsDisabled,
|
|
79
|
+
'aria-pressed': element === 'button' ? isSelected : undefined,
|
|
80
|
+
ref: ref
|
|
81
|
+
}, rest), innerNode);
|
|
82
|
+
});
|
|
83
|
+
exports.EuiButtonDisplay = EuiButtonDisplay;
|
|
84
|
+
EuiButtonDisplay.propTypes = {
|
|
85
|
+
children: _propTypes.default.node,
|
|
86
|
+
size: _propTypes.default.oneOf(["xs", "s", "m"]),
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
90
|
+
* *Only use when the readable text does not change between states.*
|
|
91
|
+
*/
|
|
92
|
+
isSelected: _propTypes.default.bool,
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Extends the button to 100% width
|
|
96
|
+
*/
|
|
97
|
+
fullWidth: _propTypes.default.bool,
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Override the default minimum width
|
|
101
|
+
*/
|
|
102
|
+
minWidth: _propTypes.default.any,
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Force disables the button and changes the icon to a loading spinner
|
|
106
|
+
*/
|
|
107
|
+
isLoading: _propTypes.default.bool,
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
111
|
+
*/
|
|
112
|
+
contentProps: _propTypes.default.any,
|
|
113
|
+
style: _propTypes.default.any,
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Any `type` accepted by EuiIcon
|
|
117
|
+
*/
|
|
118
|
+
iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "codeApp", "color", "compute", "console", "consoleApp", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboardShortcut", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenClass", "tokenProperty", "tokenEnum", "tokenVariable", "tokenMethod", "tokenAnnotation", "tokenException", "tokenInterface", "tokenParameter", "tokenField", "tokenElement", "tokenFunction", "tokenBoolean", "tokenString", "tokenArray", "tokenNumber", "tokenConstant", "tokenObject", "tokenEvent", "tokenKey", "tokenNull", "tokenStruct", "tokenPackage", "tokenOperator", "tokenEnumMember", "tokenRepo", "tokenSymbol", "tokenFile", "tokenModule", "tokenNamespace", "tokenDate", "tokenIP", "tokenNested", "tokenAlias", "tokenShape", "tokenGeo", "tokenRange", "tokenBinary", "tokenJoin", "tokenPercolator", "tokenFlattened", "tokenRankFeature", "tokenRankFeatures", "tokenKeyword", "tokenTag", "tokenCompletionSuggester", "tokenDenseVector", "tokenText", "tokenTokenCount", "tokenSearchType", "tokenHistogram"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Can only be one side `left` or `right`
|
|
122
|
+
*/
|
|
123
|
+
iconSide: _propTypes.default.oneOf(["left", "right", undefined]),
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Object of props passed to the <span/> wrapping the content's text/children only (not icon)
|
|
127
|
+
*/
|
|
128
|
+
textProps: _propTypes.default.shape({
|
|
129
|
+
className: _propTypes.default.string,
|
|
130
|
+
"aria-label": _propTypes.default.string,
|
|
131
|
+
"data-test-subj": _propTypes.default.string,
|
|
132
|
+
ref: _propTypes.default.any,
|
|
133
|
+
"data-text": _propTypes.default.string
|
|
134
|
+
}),
|
|
135
|
+
iconSize: _propTypes.default.oneOf(["s", "m"]),
|
|
136
|
+
isDisabled: _propTypes.default.bool.isRequired,
|
|
137
|
+
className: _propTypes.default.string,
|
|
138
|
+
"aria-label": _propTypes.default.string,
|
|
139
|
+
"data-test-subj": _propTypes.default.string,
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Provide a valid element to render the element as
|
|
143
|
+
*/
|
|
144
|
+
element: _propTypes.default.oneOf(["a", "button", "span", "label"])
|
|
145
|
+
};
|
|
146
|
+
EuiButtonDisplay.displayName = 'EuiButtonDisplay';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiButtonDisplayStyles = exports.euiButtonBaseCSS = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../../global_styling");
|
|
11
|
+
|
|
12
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
13
|
+
|
|
14
|
+
// Provides a solid reset and base for handling sizing layout
|
|
15
|
+
// Does not include any visual styles
|
|
16
|
+
var euiButtonBaseCSS = function euiButtonBaseCSS() {
|
|
17
|
+
return "\n display: inline-block;\n appearance: none;\n cursor: pointer;\n ".concat((0, _global_styling.logicalTextAlignStyle)('center'), ";\n white-space: nowrap;\n ").concat((0, _global_styling.logicalCSS)('max-width', '100%'), ";\n vertical-align: middle;\n ");
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.euiButtonBaseCSS = euiButtonBaseCSS;
|
|
21
|
+
|
|
22
|
+
var _buttonSize = function _buttonSize(size) {
|
|
23
|
+
return "\n ".concat((0, _global_styling.logicalCSS)('height', size), ";\n // prevents descenders from getting cut off\n line-height: ").concat(size, ";\n ");
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
27
|
+
name: "15xpz7k-fullWidth",
|
|
28
|
+
styles: "display:block;width:100%;label:fullWidth;"
|
|
29
|
+
} : {
|
|
30
|
+
name: "15xpz7k-fullWidth",
|
|
31
|
+
styles: "display:block;width:100%;label:fullWidth;",
|
|
32
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
36
|
+
name: "8595p9-isDisabled",
|
|
37
|
+
styles: "cursor:not-allowed;label:isDisabled;"
|
|
38
|
+
} : {
|
|
39
|
+
name: "8595p9-isDisabled",
|
|
40
|
+
styles: "cursor:not-allowed;label:isDisabled;",
|
|
41
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeContext, minWidth) {
|
|
45
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
46
|
+
return {
|
|
47
|
+
// Base
|
|
48
|
+
euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";", minWidth && (0, _global_styling.logicalCSS)('min-width', minWidth), ";;label:euiButtonDisplay;"),
|
|
49
|
+
// States
|
|
50
|
+
isDisabled: _ref2,
|
|
51
|
+
fullWidth: _ref,
|
|
52
|
+
// Sizes
|
|
53
|
+
xs: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.l), (0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";label:xs;"),
|
|
54
|
+
s: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.xl), (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";label:s;"),
|
|
55
|
+
m: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.xxl), (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";label:m;")
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
exports.euiButtonDisplayStyles = euiButtonDisplayStyles;
|