@elastic/eui 102.0.0 → 102.1.0-snapshot.1746441787383
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_theme_borealis_dark.json +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +7 -0
- package/es/components/badge/color_utils.js +1 -3
- package/es/components/badge/notification_badge/badge_notification.styles.js +6 -1
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +6 -3
- package/es/components/button/button.js +7 -0
- package/es/components/button/button_display/_button_display.js +1 -1
- package/es/components/button/button_display/_button_display.styles.js +11 -2
- package/es/components/button/button_display/_button_display_content.styles.js +6 -3
- package/es/components/button/button_empty/button_empty.js +7 -0
- package/es/components/button/button_empty/button_empty.styles.js +9 -12
- package/es/components/button/button_group/button_group.js +5 -0
- package/es/components/button/button_group/button_group.styles.js +5 -3
- package/es/components/button/button_group/button_group_button.js +19 -9
- package/es/components/button/button_group/button_group_button.styles.js +43 -19
- package/es/components/button/button_icon/button_icon.js +11 -2
- package/es/components/card/card.js +7 -0
- package/es/components/card/card_select/card_select.js +7 -0
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +7 -0
- package/es/components/color_picker/color_picker.js +13 -8
- package/es/components/color_picker/hue.js +27 -6
- package/es/components/color_picker/hue.styles.js +3 -2
- package/es/components/color_picker/saturation.js +16 -11
- package/es/components/color_picker/saturation.styles.js +2 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +7 -0
- package/es/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
- package/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +7 -0
- package/es/components/datagrid/body/data_grid_body_custom.js +7 -0
- package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -0
- package/es/components/datagrid/body/header/data_grid_header_cell.js +7 -0
- package/es/components/datagrid/controls/column_sorting.js +7 -0
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +18 -1
- package/es/components/datagrid/utils/in_memory.js +7 -0
- package/es/components/date_picker/auto_refresh/auto_refresh.js +7 -0
- package/es/components/filter_group/filter_button.js +98 -24
- package/es/components/filter_group/filter_button.styles.js +51 -15
- package/es/components/filter_group/filter_group.styles.js +18 -6
- package/es/components/header/header_links/header_link.js +7 -0
- package/es/components/header/header_section/header_section_item_button.js +7 -0
- package/es/components/list_group/list_group.js +7 -0
- package/es/components/list_group/list_group_item.js +7 -0
- package/es/components/list_group/list_group_item_extra_action.js +7 -0
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +7 -0
- package/es/components/pagination/pagination_button.js +7 -0
- package/es/components/search_bar/filters/field_value_selection_filter.js +1 -0
- package/es/components/search_bar/filters/field_value_toggle_filter.js +3 -1
- package/es/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
- package/es/components/search_bar/filters/is_filter.js +3 -1
- package/es/components/search_bar/search_bar.a11y.js +3 -3
- package/es/components/table/table_header_cell.js +30 -12
- package/es/components/tool_tip/tool_tip.js +4 -1
- package/es/global_styling/mixins/_button.js +108 -31
- package/es/global_styling/mixins/_color.js +9 -2
- package/es/services/theme/index.js +2 -1
- package/es/services/theme/provider.js +28 -2
- package/es/services/theme/theme_variant.js +22 -0
- package/es/test/index.d.ts +2 -1
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
- package/es/themes/amsterdam/global_styling/variables/_components.js +229 -224
- package/es/themes/amsterdam/theme.js +2 -1
- package/eui.d.ts +919 -701
- package/lib/components/accessibility/skip_link/skip_link.js +7 -0
- package/lib/components/badge/color_utils.js +1 -3
- package/lib/components/badge/notification_badge/badge_notification.styles.js +6 -1
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -2
- package/lib/components/button/button.js +7 -0
- package/lib/components/button/button_display/_button_display.js +1 -1
- package/lib/components/button/button_display/_button_display.styles.js +11 -2
- package/lib/components/button/button_display/_button_display_content.styles.js +6 -3
- package/lib/components/button/button_empty/button_empty.js +7 -0
- package/lib/components/button/button_empty/button_empty.styles.js +10 -11
- package/lib/components/button/button_group/button_group.js +5 -0
- package/lib/components/button/button_group/button_group.styles.js +5 -3
- package/lib/components/button/button_group/button_group_button.js +18 -8
- package/lib/components/button/button_group/button_group_button.styles.js +41 -17
- package/lib/components/button/button_icon/button_icon.js +10 -1
- package/lib/components/card/card.js +7 -0
- package/lib/components/card/card_select/card_select.js +7 -0
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +7 -0
- package/lib/components/color_picker/color_picker.js +13 -8
- package/lib/components/color_picker/hue.js +26 -5
- package/lib/components/color_picker/hue.styles.js +3 -2
- package/lib/components/color_picker/saturation.js +16 -11
- package/lib/components/color_picker/saturation.styles.js +2 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +7 -0
- package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
- package/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
- package/lib/components/datagrid/body/data_grid_body.js +7 -0
- package/lib/components/datagrid/body/data_grid_body_custom.js +7 -0
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -0
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +7 -0
- package/lib/components/datagrid/controls/column_sorting.js +7 -0
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +18 -1
- package/lib/components/datagrid/utils/in_memory.js +7 -0
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +7 -0
- package/lib/components/filter_group/filter_button.js +96 -22
- package/lib/components/filter_group/filter_button.styles.js +51 -15
- package/lib/components/filter_group/filter_group.styles.js +18 -6
- package/lib/components/header/header_links/header_link.js +7 -0
- package/lib/components/header/header_section/header_section_item_button.js +7 -0
- package/lib/components/list_group/list_group.js +7 -0
- package/lib/components/list_group/list_group_item.js +7 -0
- package/lib/components/list_group/list_group_item_extra_action.js +7 -0
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +7 -0
- package/lib/components/pagination/pagination_button.js +7 -0
- package/lib/components/search_bar/filters/field_value_selection_filter.js +1 -0
- package/lib/components/search_bar/filters/field_value_toggle_filter.js +3 -1
- package/lib/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
- package/lib/components/search_bar/filters/is_filter.js +3 -1
- package/lib/components/search_bar/search_bar.a11y.js +3 -3
- package/lib/components/table/table_header_cell.js +28 -10
- package/lib/components/tool_tip/tool_tip.js +4 -1
- package/lib/global_styling/mixins/_button.js +106 -30
- package/lib/global_styling/mixins/_color.js +11 -4
- package/lib/services/theme/index.js +41 -1
- package/lib/services/theme/provider.js +28 -2
- package/lib/services/theme/theme_variant.js +28 -0
- package/lib/test/index.d.ts +2 -1
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
- package/lib/themes/amsterdam/global_styling/variables/_components.js +229 -224
- package/lib/themes/amsterdam/theme.js +2 -1
- package/optimize/es/components/badge/color_utils.js +1 -3
- package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +6 -1
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +6 -3
- package/optimize/es/components/button/button_display/_button_display.js +1 -1
- package/optimize/es/components/button/button_display/_button_display.styles.js +11 -2
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +6 -3
- package/optimize/es/components/button/button_empty/button_empty.styles.js +9 -12
- package/optimize/es/components/button/button_group/button_group.styles.js +5 -3
- package/optimize/es/components/button/button_group/button_group_button.js +12 -8
- package/optimize/es/components/button/button_group/button_group_button.styles.js +43 -19
- package/optimize/es/components/button/button_icon/button_icon.js +4 -2
- package/optimize/es/components/color_picker/color_picker.js +13 -8
- package/optimize/es/components/color_picker/hue.js +22 -6
- package/optimize/es/components/color_picker/hue.styles.js +3 -2
- package/optimize/es/components/color_picker/saturation.js +16 -11
- package/optimize/es/components/color_picker/saturation.styles.js +2 -1
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
- package/optimize/es/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
- package/optimize/es/components/filter_group/filter_button.js +78 -21
- package/optimize/es/components/filter_group/filter_button.styles.js +51 -15
- package/optimize/es/components/filter_group/filter_group.styles.js +18 -6
- package/optimize/es/components/search_bar/filters/field_value_selection_filter.js +1 -0
- package/optimize/es/components/search_bar/filters/field_value_toggle_filter.js +3 -1
- package/optimize/es/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
- package/optimize/es/components/search_bar/filters/is_filter.js +3 -1
- package/optimize/es/components/search_bar/search_bar.a11y.js +3 -3
- package/optimize/es/components/table/table_header_cell.js +26 -11
- package/optimize/es/components/tool_tip/tool_tip.js +4 -1
- package/optimize/es/global_styling/mixins/_button.js +103 -31
- package/optimize/es/global_styling/mixins/_color.js +4 -2
- package/optimize/es/services/theme/index.js +2 -1
- package/optimize/es/services/theme/provider.js +28 -2
- package/optimize/es/services/theme/theme_variant.js +22 -0
- package/optimize/es/test/index.d.ts +2 -1
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +229 -224
- package/optimize/es/themes/amsterdam/theme.js +2 -1
- package/optimize/lib/components/badge/color_utils.js +1 -3
- package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +6 -1
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -2
- package/optimize/lib/components/button/button_display/_button_display.js +1 -1
- package/optimize/lib/components/button/button_display/_button_display.styles.js +11 -2
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +6 -3
- package/optimize/lib/components/button/button_empty/button_empty.styles.js +10 -11
- package/optimize/lib/components/button/button_group/button_group.styles.js +5 -3
- package/optimize/lib/components/button/button_group/button_group_button.js +11 -7
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +41 -17
- package/optimize/lib/components/button/button_icon/button_icon.js +3 -1
- package/optimize/lib/components/color_picker/color_picker.js +13 -8
- package/optimize/lib/components/color_picker/hue.js +21 -5
- package/optimize/lib/components/color_picker/hue.styles.js +3 -2
- package/optimize/lib/components/color_picker/saturation.js +16 -11
- package/optimize/lib/components/color_picker/saturation.styles.js +2 -1
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
- package/optimize/lib/components/filter_group/filter_button.js +76 -19
- package/optimize/lib/components/filter_group/filter_button.styles.js +51 -15
- package/optimize/lib/components/filter_group/filter_group.styles.js +18 -6
- package/optimize/lib/components/search_bar/filters/field_value_selection_filter.js +1 -0
- package/optimize/lib/components/search_bar/filters/field_value_toggle_filter.js +3 -1
- package/optimize/lib/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
- package/optimize/lib/components/search_bar/filters/is_filter.js +3 -1
- package/optimize/lib/components/search_bar/search_bar.a11y.js +3 -3
- package/optimize/lib/components/table/table_header_cell.js +25 -11
- package/optimize/lib/components/tool_tip/tool_tip.js +4 -1
- package/optimize/lib/global_styling/mixins/_button.js +101 -30
- package/optimize/lib/global_styling/mixins/_color.js +4 -2
- package/optimize/lib/services/theme/index.js +41 -1
- package/optimize/lib/services/theme/provider.js +28 -2
- package/optimize/lib/services/theme/theme_variant.js +28 -0
- package/optimize/lib/test/index.d.ts +2 -1
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +229 -224
- package/optimize/lib/themes/amsterdam/theme.js +2 -1
- package/package.json +7 -6
- package/test-env/components/accessibility/skip_link/skip_link.js +7 -0
- package/test-env/components/badge/color_utils.js +1 -3
- package/test-env/components/badge/notification_badge/badge_notification.styles.js +6 -1
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +5 -2
- package/test-env/components/button/button.js +7 -0
- package/test-env/components/button/button_display/_button_display.js +1 -1
- package/test-env/components/button/button_display/_button_display.styles.js +11 -2
- package/test-env/components/button/button_display/_button_display_content.styles.js +6 -3
- package/test-env/components/button/button_empty/button_empty.js +7 -0
- package/test-env/components/button/button_empty/button_empty.styles.js +10 -11
- package/test-env/components/button/button_group/button_group.js +5 -0
- package/test-env/components/button/button_group/button_group.styles.js +5 -3
- package/test-env/components/button/button_group/button_group_button.js +18 -8
- package/test-env/components/button/button_group/button_group_button.styles.js +41 -17
- package/test-env/components/button/button_icon/button_icon.js +10 -1
- package/test-env/components/card/card.js +7 -0
- package/test-env/components/card/card_select/card_select.js +7 -0
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +7 -0
- package/test-env/components/color_picker/color_picker.js +13 -8
- package/test-env/components/color_picker/hue.js +21 -5
- package/test-env/components/color_picker/hue.styles.js +3 -2
- package/test-env/components/color_picker/saturation.js +16 -11
- package/test-env/components/color_picker/saturation.styles.js +2 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +7 -0
- package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
- package/test-env/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
- package/test-env/components/datagrid/body/data_grid_body.js +7 -0
- package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -0
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -0
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +7 -0
- package/test-env/components/datagrid/controls/column_sorting.js +7 -0
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +18 -1
- package/test-env/components/datagrid/utils/in_memory.js +7 -0
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +7 -0
- package/test-env/components/filter_group/filter_button.js +96 -22
- package/test-env/components/filter_group/filter_button.styles.js +51 -15
- package/test-env/components/filter_group/filter_group.styles.js +18 -6
- package/test-env/components/header/header_links/header_link.js +7 -0
- package/test-env/components/header/header_section/header_section_item_button.js +7 -0
- package/test-env/components/list_group/list_group.js +7 -0
- package/test-env/components/list_group/list_group_item.js +7 -0
- package/test-env/components/list_group/list_group_item_extra_action.js +7 -0
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +7 -0
- package/test-env/components/pagination/pagination_button.js +7 -0
- package/test-env/components/search_bar/filters/field_value_selection_filter.js +1 -0
- package/test-env/components/search_bar/filters/field_value_toggle_filter.js +3 -1
- package/test-env/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
- package/test-env/components/search_bar/filters/is_filter.js +3 -1
- package/test-env/components/search_bar/search_bar.a11y.js +3 -3
- package/test-env/components/table/table_header_cell.js +26 -12
- package/test-env/components/tool_tip/tool_tip.js +4 -1
- package/test-env/global_styling/mixins/_button.js +101 -30
- package/test-env/global_styling/mixins/_color.js +4 -2
- package/test-env/services/theme/index.js +41 -1
- package/test-env/services/theme/provider.js +28 -2
- package/test-env/services/theme/theme_variant.js +28 -0
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +229 -224
- package/test-env/themes/amsterdam/theme.js +2 -1
|
@@ -16,6 +16,7 @@ var _services = require("../../services");
|
|
|
16
16
|
var _predicate = require("../../services/predicate");
|
|
17
17
|
var _global_styling = require("../../global_styling");
|
|
18
18
|
var _i18n = require("../i18n");
|
|
19
|
+
var _tool_tip = require("../tool_tip");
|
|
19
20
|
var _utils = require("./utils");
|
|
20
21
|
var _saturation = require("./saturation.styles");
|
|
21
22
|
var _react2 = require("@emotion/react");
|
|
@@ -50,10 +51,11 @@ var EuiSaturation = exports.EuiSaturation = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
50
51
|
});
|
|
51
52
|
var instructionsId = "".concat(id, "-instructions");
|
|
52
53
|
var indicatorId = "".concat(id, "-saturationIndicator");
|
|
53
|
-
var _useEuiI18n = (0, _i18n.useEuiI18n)(['euiSaturation.ariaLabel', 'euiSaturation.screenReaderInstructions'], ['HSV color mode saturation and value 2-axis slider', "Arrow keys to navigate the square color gradient. Coordinates will be used to calculate HSV color mode 'saturation' and 'value' numbers, in the range of 0 to 1. Left and right to change the saturation. Up and down change the value."]),
|
|
54
|
-
_useEuiI18n2 = (0, _slicedToArray2.default)(_useEuiI18n,
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
var _useEuiI18n = (0, _i18n.useEuiI18n)(['euiSaturation.ariaLabel', 'euiSaturation.roleDescription', 'euiSaturation.screenReaderInstructions'], ['Select a color', 'HSV color mode saturation and value 2-axis slider.', "Arrow keys to navigate the square color gradient. Coordinates will be used to calculate HSV color mode 'saturation' and 'value' numbers, in the range of 0 to 1. Left and right to change the saturation. Up and down change the value."]),
|
|
55
|
+
_useEuiI18n2 = (0, _slicedToArray2.default)(_useEuiI18n, 3),
|
|
56
|
+
ariaLabel = _useEuiI18n2[0],
|
|
57
|
+
roleDescString = _useEuiI18n2[1],
|
|
58
|
+
instructionsString = _useEuiI18n2[2];
|
|
57
59
|
var _useState = (0, _react.useState)({
|
|
58
60
|
left: 0,
|
|
59
61
|
top: 0
|
|
@@ -175,18 +177,21 @@ var EuiSaturation = exports.EuiSaturation = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
175
177
|
}, (0, _react2.jsx)("div", {
|
|
176
178
|
css: styles.euiSaturation__saturation,
|
|
177
179
|
className: "euiSaturation__saturation"
|
|
178
|
-
})), (0, _react2.jsx)(
|
|
180
|
+
})), (0, _react2.jsx)(_tool_tip.EuiToolTip, {
|
|
181
|
+
content: hex,
|
|
182
|
+
anchorProps: {
|
|
183
|
+
css: styles.euiSaturation__tooltip,
|
|
184
|
+
style: (0, _global_styling.logicalStyles)(indicator)
|
|
185
|
+
},
|
|
186
|
+
disableScreenReaderOutput: true // required to prevent verbose screen reader output
|
|
187
|
+
}, (0, _react2.jsx)("button", {
|
|
179
188
|
id: indicatorId,
|
|
180
189
|
css: styles.euiSaturation__indicator,
|
|
181
190
|
className: "euiSaturation__indicator",
|
|
182
|
-
style: (0, _global_styling.logicalStyles)(indicator),
|
|
183
191
|
"aria-roledescription": roleDescString,
|
|
184
|
-
"aria-label":
|
|
192
|
+
"aria-label": ariaLabel,
|
|
185
193
|
"aria-describedby": instructionsId
|
|
186
|
-
}), (0, _react2.jsx)("span", {
|
|
187
|
-
hidden: true,
|
|
188
|
-
"aria-live": "assertive"
|
|
189
|
-
}, hex), (0, _react2.jsx)("span", {
|
|
194
|
+
})), (0, _react2.jsx)("span", {
|
|
190
195
|
hidden: true,
|
|
191
196
|
id: instructionsId
|
|
192
197
|
}, instructionsString));
|
|
@@ -36,7 +36,8 @@ var euiSaturationStyles = exports.euiSaturationStyles = function euiSaturationSt
|
|
|
36
36
|
}), ";;label:euiSaturation;"),
|
|
37
37
|
euiSaturation__lightness: /*#__PURE__*/(0, _react.css)("position:absolute;inset:0;border-radius:", gradientBorderRadius, ";background:linear-gradient(\n to right,\n rgba(255, 255, 255, 1),\n rgba(255, 255, 255, 0)\n );;label:euiSaturation__lightness;"),
|
|
38
38
|
euiSaturation__saturation: /*#__PURE__*/(0, _react.css)("position:absolute;inset:0;border-radius:", gradientBorderRadius, ";background:linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));;label:euiSaturation__saturation;"),
|
|
39
|
-
|
|
39
|
+
euiSaturation__tooltip: /*#__PURE__*/(0, _react.css)("z-index:2;position:absolute;", (0, _global_styling.logicalSizeCSS)(indicatorSize), " transform:translateX(-50%) translateY(-50%);border-radius:100%;;label:euiSaturation__tooltip;"),
|
|
40
|
+
euiSaturation__indicator: /*#__PURE__*/(0, _react.css)("position:absolute;inset:0;", (0, _global_styling.logicalSizeCSS)(indicatorSize), " border-radius:100%;", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
40
41
|
none: "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.darkestShade, ";\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: 100%;\n border: ").concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.lightestShade, ";\n }\n "),
|
|
41
42
|
preferred: "\n border: ".concat(euiTheme.border.width.thick, " solid ").concat(euiTheme.colors.ink, ";\n background-color: ").concat(euiTheme.colors.ghost, ";\n ")
|
|
42
43
|
}), ";;label:euiSaturation__indicator;")
|
|
@@ -52,8 +52,8 @@ var EuiDataGridCellActions = exports.EuiDataGridCellActions = function EuiDataGr
|
|
|
52
52
|
"data-test-subj": "euiDataGridCellExpandButton",
|
|
53
53
|
display: "fill",
|
|
54
54
|
color: "primary",
|
|
55
|
-
iconSize: "
|
|
56
|
-
iconType: "
|
|
55
|
+
iconSize: "s",
|
|
56
|
+
iconType: "expand",
|
|
57
57
|
"aria-hidden": true,
|
|
58
58
|
onClick: onExpandClick,
|
|
59
59
|
title: expandButtonTitle
|
|
@@ -34,7 +34,7 @@ var euiDataGridCellActionsStyles = exports.euiDataGridCellActionsStyles = functi
|
|
|
34
34
|
})), " background-color:inherit;}", cellSelectors.hoverColor, " &{background-color:", cellOutline.hoverColor, ";border-color:", cellOutline.hoverColor, ";}", _global_styling.euiCanAnimate, "{transform:scaleY(0);transform-origin:bottom;", cellSelectors.showAnimation, " &{animation-duration:", euiTheme.animation.fast, ";animation-name:", slideUp, ";animation-iteration-count:1;animation-fill-mode:forwards;}", cellSelectors.hoverAnimation, " &{animation-delay:", euiTheme.animation.slow, ";}};label:euiDataGridRowCell__actions;"),
|
|
35
35
|
euiDataGridRowCell__actionButtonIcon: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', euiTheme.size.base), " ", (0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)([euiTheme.size.base, euiTheme.size.xs], function (x, y) {
|
|
36
36
|
return x + y;
|
|
37
|
-
})), " border-radius:0;&,svg{background-color:transparent!important;color:currentColor!important;fill:currentColor!important;}
|
|
37
|
+
})), " border-radius:0;&,svg{background-color:transparent!important;color:currentColor!important;fill:currentColor!important;}", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
38
38
|
preferred: 'border: none;'
|
|
39
39
|
}), ";;label:euiDataGridRowCell__actionButtonIcon;")
|
|
40
40
|
};
|
|
@@ -10,6 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
|
+
var _services = require("../../../services");
|
|
13
14
|
var _button = require("../../button");
|
|
14
15
|
var _badge = require("../../badge");
|
|
15
16
|
var _i18n = require("../../i18n");
|
|
@@ -27,7 +28,12 @@ var EuiDataGridToolbarControl = exports.EuiDataGridToolbarControl = function Eui
|
|
|
27
28
|
badgeContent = _ref.badgeContent,
|
|
28
29
|
textProps = _ref.textProps,
|
|
29
30
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
31
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
32
|
+
var isRefreshVariant = (0, _services.useEuiThemeRefreshVariant)('buttonVariant');
|
|
30
33
|
var classes = (0, _classnames.default)('euiDataGridToolbarControl', className);
|
|
34
|
+
var cssStyles = isRefreshVariant ?
|
|
35
|
+
// passes euiThemeContext here instead via `css` to ensure legacy Enzyme tests work
|
|
36
|
+
interactiveStyles(euiThemeContext) : underlineStyles;
|
|
31
37
|
var badgeAriaLabel = (0, _i18n.useEuiI18n)('euiDataGridToolbarControl.badgeAriaLabel', 'Active: {count}', {
|
|
32
38
|
count: typeof badgeContent === 'string' ? betterScreenReaderSlashes(badgeContent) : badgeContent
|
|
33
39
|
});
|
|
@@ -36,7 +42,7 @@ var EuiDataGridToolbarControl = exports.EuiDataGridToolbarControl = function Eui
|
|
|
36
42
|
size: "xs",
|
|
37
43
|
color: "text",
|
|
38
44
|
textProps: false,
|
|
39
|
-
css:
|
|
45
|
+
css: cssStyles
|
|
40
46
|
}, rest), (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
41
47
|
className: (0, _classnames.default)('euiDataGridToolbarControl__text', 'eui-textTruncate', textProps && textProps.className)
|
|
42
48
|
}), children), Boolean(badgeContent) && (0, _react2.jsx)(_badge.EuiNotificationBadge, {
|
|
@@ -64,6 +70,10 @@ var underlineStyles = process.env.NODE_ENV === "production" ? {
|
|
|
64
70
|
styles: "&:focus,&:hover:not(:disabled){text-decoration:none;.euiDataGridToolbarControl__text{text-decoration:underline;}};label:underlineStyles;",
|
|
65
71
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
66
72
|
};
|
|
73
|
+
var interactiveStyles = function interactiveStyles(_ref2) {
|
|
74
|
+
var euiTheme = _ref2.euiTheme;
|
|
75
|
+
return /*#__PURE__*/(0, _react2.css)("&:focus,&:hover:not(:disabled){.euiDataGridToolbarControl__badge{background-color:", euiTheme.components.filterButtonBadgeBackgroundHover, ";}};label:interactiveStyles;");
|
|
76
|
+
};
|
|
67
77
|
var badgeStyles = process.env.NODE_ENV === "production" ? {
|
|
68
78
|
name: "1968nw3-badgeStyles",
|
|
69
79
|
styles: "cursor:inherit;label:badgeStyles;"
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.EuiFilterButton = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -17,8 +17,10 @@ var _inner_text = require("../inner_text");
|
|
|
17
17
|
var _badge = require("../badge");
|
|
18
18
|
var _button_empty = require("../button/button_empty");
|
|
19
19
|
var _filter_button = require("./filter_button.styles");
|
|
20
|
+
var _button_group_button = require("../button/button_group/button_group_button");
|
|
21
|
+
var _button_group_button2 = require("../button/button_group/button_group_button.styles");
|
|
20
22
|
var _react2 = require("@emotion/react");
|
|
21
|
-
var _excluded = ["children", "className", "iconType", "iconSide", "color", "badgeColor", "hasActiveFilters", "numFilters", "numActiveFilters", "isDisabled", "isSelected", "type", "grow", "withNext", "textProps", "contentProps"];
|
|
23
|
+
var _excluded = ["children", "className", "iconType", "iconSide", "color", "badgeColor", "hasActiveFilters", "numFilters", "numActiveFilters", "isToggle", "isDisabled", "isSelected", "type", "grow", "withNext", "textProps", "contentProps"];
|
|
22
24
|
/*
|
|
23
25
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
24
26
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -41,6 +43,7 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
41
43
|
hasActiveFilters = _ref.hasActiveFilters,
|
|
42
44
|
numFilters = _ref.numFilters,
|
|
43
45
|
numActiveFilters = _ref.numActiveFilters,
|
|
46
|
+
isToggle = _ref.isToggle,
|
|
44
47
|
isDisabled = _ref.isDisabled,
|
|
45
48
|
isSelected = _ref.isSelected,
|
|
46
49
|
_ref$type = _ref.type,
|
|
@@ -51,18 +54,37 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
51
54
|
textProps = _ref.textProps,
|
|
52
55
|
contentProps = _ref.contentProps,
|
|
53
56
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
57
|
+
var id = (0, _services.useGeneratedHtmlId)({
|
|
58
|
+
prefix: 'filter-button'
|
|
59
|
+
});
|
|
54
60
|
var numFiltersDefined = numFilters != null; // != instead of !== to allow for null and undefined
|
|
55
61
|
var numActiveFiltersDefined = numActiveFilters != null && numActiveFilters > 0;
|
|
62
|
+
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
63
|
+
var colorMode = euiThemeContext.colorMode;
|
|
64
|
+
var isRefreshVariant = (0, _services.useEuiThemeRefreshVariant)('buttonVariant');
|
|
65
|
+
|
|
66
|
+
// assumption about type of usage based on icon usage
|
|
67
|
+
// requires manual override to apply correct aria attributes for more custom usages
|
|
68
|
+
var isCollapsible = !isToggle && iconType === 'arrowDown';
|
|
69
|
+
// NOTE: in Amsterdam `hasActiveFilters` applies selected styling while `isSelected` does not.
|
|
70
|
+
// With Borealis this is more granular as EuiFilterButton now supports proper toggle buttons next to regular buttons
|
|
71
|
+
var isExpanded = isCollapsible && (isSelected !== null && isSelected !== void 0 ? isSelected : hasActiveFilters);
|
|
56
72
|
var styles = (0, _services.useEuiMemoizedStyles)(_filter_button.euiFilterButtonStyles);
|
|
57
|
-
var
|
|
73
|
+
var focusColorStyles = (0, _services.useEuiMemoizedStyles)(_button_group_button2._compressedButtonFocusColors);
|
|
74
|
+
var toggleVariantStyles = isRefreshVariant ? [isToggle && styles.buttonType.toggle, !isToggle && !isDisabled && focusColorStyles[color], !isToggle && styles.buttonType.default] : [isToggle && styles.buttonType.toggle];
|
|
75
|
+
var cssStyles = [styles.euiFilterButton, !isRefreshVariant && withNext && styles.withNext, hasActiveFilters && styles.hasActiveFilters].concat(toggleVariantStyles);
|
|
76
|
+
var wrapperStyles = (0, _services.useEuiMemoizedStyles)(_filter_button.euiFilterButtonWrapperStyles);
|
|
77
|
+
var wrapperCssStyles = [wrapperStyles.wrapper, isRefreshVariant && withNext && styles.withNext, numFiltersDefined && styles.hasNotification, isToggle && wrapperStyles.hasToggle, !grow && styles.noGrow];
|
|
58
78
|
var _useEuiMemoizedStyles = (0, _services.useEuiMemoizedStyles)(_filter_button.euiFilterButtonChildStyles),
|
|
59
79
|
contentStyles = _useEuiMemoizedStyles.content,
|
|
60
80
|
textStyles = _useEuiMemoizedStyles.text,
|
|
61
81
|
notificationStyles = _useEuiMemoizedStyles.notification;
|
|
82
|
+
var wrapperClasses = (0, _classnames.default)('euiFilterButton__wrapper');
|
|
62
83
|
var classes = (0, _classnames.default)('euiFilterButton', {
|
|
63
84
|
'euiFilterButton-isSelected': isSelected,
|
|
64
85
|
'euiFilterButton-hasActiveFilters': hasActiveFilters,
|
|
65
|
-
'euiFilterButton-hasNotification': numFiltersDefined
|
|
86
|
+
'euiFilterButton-hasNotification': numFiltersDefined,
|
|
87
|
+
'euiFilterButton-isToggle': isRefreshVariant && isToggle
|
|
66
88
|
}, className);
|
|
67
89
|
|
|
68
90
|
/**
|
|
@@ -77,6 +99,16 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
77
99
|
count: badgeCount
|
|
78
100
|
});
|
|
79
101
|
var badgeStyles = [notificationStyles.euiFilterButton__notification, isDisabled && notificationStyles.disabled];
|
|
102
|
+
var badgeContent = (0, _react2.jsx)(_badge.EuiNotificationBadge, {
|
|
103
|
+
className: "euiFilterButton__notification",
|
|
104
|
+
css: badgeStyles,
|
|
105
|
+
"aria-label": hasActiveFilters ? activeBadgeLabel : availableBadgeLabel,
|
|
106
|
+
color: isDisabled || !hasActiveFilters ? 'subdued' : badgeColor,
|
|
107
|
+
role: "marquee" // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/marquee_role
|
|
108
|
+
}, badgeCount);
|
|
109
|
+
var badgeElement = showBadge && (isRefreshVariant ? (0, _react2.jsx)(_services.EuiThemeProvider, {
|
|
110
|
+
colorMode: isToggle && isSelected ? 'INVERSE' : colorMode
|
|
111
|
+
}, badgeContent) : badgeContent);
|
|
80
112
|
|
|
81
113
|
/**
|
|
82
114
|
* Text
|
|
@@ -90,7 +122,17 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
90
122
|
ref = _useInnerText2[0],
|
|
91
123
|
innerText = _useInnerText2[1];
|
|
92
124
|
var dataText = children && typeof children === 'string' ? children : innerText;
|
|
93
|
-
|
|
125
|
+
var textContent = (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
126
|
+
ref: ref,
|
|
127
|
+
"data-text": dataText,
|
|
128
|
+
title: dataText
|
|
129
|
+
}, textProps, {
|
|
130
|
+
className: buttonTextClassNames,
|
|
131
|
+
css: textCssStyles
|
|
132
|
+
}), children);
|
|
133
|
+
|
|
134
|
+
/** Button element */
|
|
135
|
+
var button = (0, _react2.jsx)(_button_empty.EuiButtonEmpty, (0, _extends2.default)({
|
|
94
136
|
className: classes,
|
|
95
137
|
css: cssStyles,
|
|
96
138
|
color: color,
|
|
@@ -99,21 +141,36 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
99
141
|
iconType: iconType,
|
|
100
142
|
type: type,
|
|
101
143
|
textProps: false,
|
|
144
|
+
contentProps: _objectSpread(_objectSpread({}, contentProps), {}, {
|
|
145
|
+
css: [contentStyles.euiFilterButton__content, iconType && contentStyles.hasIcon, contentProps === null || contentProps === void 0 ? void 0 : contentProps.css]
|
|
146
|
+
}),
|
|
147
|
+
"aria-expanded": isCollapsible ? isExpanded : undefined
|
|
148
|
+
}, rest), textContent, badgeElement);
|
|
149
|
+
var onToggleClick = function onToggleClick(e) {
|
|
150
|
+
var _rest$onClick;
|
|
151
|
+
rest === null || rest === void 0 || (_rest$onClick = rest.onClick) === null || _rest$onClick === void 0 || _rest$onClick.call(rest, e);
|
|
152
|
+
};
|
|
153
|
+
return (0, _react2.jsx)("div", {
|
|
154
|
+
className: wrapperClasses,
|
|
155
|
+
css: wrapperCssStyles
|
|
156
|
+
}, isToggle && !isCollapsible ? (0, _react2.jsx)(_button_group_button.EuiButtonGroupButton, (0, _extends2.default)({
|
|
157
|
+
id: id,
|
|
158
|
+
label: (0, _react2.jsx)(_react.default.Fragment, null, textContent, badgeElement),
|
|
159
|
+
className: classes,
|
|
160
|
+
css: cssStyles,
|
|
161
|
+
color: color,
|
|
162
|
+
isSelected: isSelected,
|
|
163
|
+
size: "compressed",
|
|
164
|
+
isDisabled: isDisabled,
|
|
165
|
+
iconSide: iconSide,
|
|
166
|
+
iconType: iconType,
|
|
167
|
+
isIconOnly: false,
|
|
168
|
+
type: type,
|
|
169
|
+
textProps: false,
|
|
102
170
|
contentProps: _objectSpread(_objectSpread({}, contentProps), {}, {
|
|
103
171
|
css: [contentStyles.euiFilterButton__content, iconType && contentStyles.hasIcon, contentProps === null || contentProps === void 0 ? void 0 : contentProps.css]
|
|
104
172
|
})
|
|
105
|
-
}, rest
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
title: dataText
|
|
109
|
-
}, textProps, {
|
|
110
|
-
className: buttonTextClassNames,
|
|
111
|
-
css: textCssStyles
|
|
112
|
-
}), children), showBadge && (0, _react2.jsx)(_badge.EuiNotificationBadge, {
|
|
113
|
-
className: "euiFilterButton__notification",
|
|
114
|
-
css: badgeStyles,
|
|
115
|
-
"aria-label": hasActiveFilters ? activeBadgeLabel : availableBadgeLabel,
|
|
116
|
-
color: isDisabled || !hasActiveFilters ? 'subdued' : badgeColor,
|
|
117
|
-
role: "marquee" // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/marquee_role
|
|
118
|
-
}, badgeCount));
|
|
173
|
+
}, rest, {
|
|
174
|
+
onClick: onToggleClick
|
|
175
|
+
})) : button);
|
|
119
176
|
};
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.euiFilterButtonStyles = exports.euiFilterButtonDisplay = exports.euiFilterButtonChildStyles = void 0;
|
|
6
|
+
exports.euiFilterButtonWrapperStyles = exports.euiFilterButtonStyles = exports.euiFilterButtonDisplay = exports.euiFilterButtonChildStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
var _services = require("../../services");
|
|
8
9
|
var _global_styling = require("../../global_styling");
|
|
10
|
+
var _supports = require("../../global_styling/functions/supports");
|
|
9
11
|
var _form = require("../form/form.styles");
|
|
10
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)."; } /*
|
|
11
13
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -14,12 +16,13 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
16
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
17
|
* Side Public License, v 1.
|
|
16
18
|
*/
|
|
17
|
-
var euiFilterButtonDisplay = exports.euiFilterButtonDisplay = function euiFilterButtonDisplay(
|
|
18
|
-
var euiTheme =
|
|
19
|
+
var euiFilterButtonDisplay = exports.euiFilterButtonDisplay = function euiFilterButtonDisplay(euiThemeContext) {
|
|
20
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
21
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'buttonVariant');
|
|
19
22
|
return {
|
|
20
23
|
flex: '1 1 auto',
|
|
21
24
|
minInlineSize: (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
22
|
-
return x * 3;
|
|
25
|
+
return x * (isRefreshVariant ? 2.75 : 3);
|
|
23
26
|
})
|
|
24
27
|
};
|
|
25
28
|
};
|
|
@@ -33,9 +36,11 @@ var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
|
33
36
|
};
|
|
34
37
|
var euiFilterButtonStyles = exports.euiFilterButtonStyles = function euiFilterButtonStyles(euiThemeContext) {
|
|
35
38
|
var euiTheme = euiThemeContext.euiTheme;
|
|
39
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'buttonVariant');
|
|
36
40
|
var _euiFormVariables = (0, _form.euiFormVariables)(euiThemeContext),
|
|
37
41
|
controlHeight = _euiFormVariables.controlHeight,
|
|
38
42
|
borderColor = _euiFormVariables.borderColor;
|
|
43
|
+
var selectedSelector = '.euiFilterButton-isSelected';
|
|
39
44
|
var border = "".concat(euiTheme.border.width.thin, " solid ").concat(borderColor);
|
|
40
45
|
|
|
41
46
|
// Pseudo elements create borders without affecting width. We also prefer them
|
|
@@ -43,14 +48,44 @@ var euiFilterButtonStyles = exports.euiFilterButtonStyles = function euiFilterBu
|
|
|
43
48
|
var leftBorder = "\n &::before {\n content: '';\n position: absolute;\n ".concat((0, _global_styling.logicalCSS)('right', '100%'), "\n ").concat((0, _global_styling.logicalCSS)('vertical', 0), "\n ").concat((0, _global_styling.logicalCSS)('border-left', border), "\n }\n ");
|
|
44
49
|
// Bottom borders are needed for responsive flex-wrap behavior
|
|
45
50
|
var bottomBorder = "\n &::after {\n content: '';\n position: absolute;\n ".concat((0, _global_styling.logicalCSS)('top', '100%'), "\n ").concat((0, _global_styling.logicalCSS)('horizontal', 0), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom', border), "\n }\n ");
|
|
51
|
+
var buttonStyles = isRefreshVariant ? "\n ".concat((0, _global_styling.logicalCSS)('width', '100%'), "\n\n &:not(").concat(selectedSelector, ") {\n &:hover,\n &:active {\n .euiFilterButton__notification[class*=\"subdued\"] {\n background-color: ").concat(euiTheme.components.filterButtonBadgeBackgroundHover, "\n }\n }\n }\n ") : "\n ".concat((0, _global_styling.logicalCSS)('height', controlHeight), "\n border-radius: 0;\n ").concat(leftBorder, "\n ").concat(bottomBorder, "\n\n /* :not(:disabled) specificity needed to override EuiButtonEmpty styles */\n &:hover:not(:disabled),\n &:focus:not(:disabled) {\n /* Remove underline from whole button so notifications don't get the underline */\n text-decoration: none;\n\n .euiFilterButton__text {\n /* And put it only on the actual text part */\n text-decoration: underline;\n }\n }\n ");
|
|
52
|
+
var toggleTypeStyles = isRefreshVariant ? "\n ".concat(euiFilterButtonDisplay(euiThemeContext), ";\n\n ").concat((0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
53
|
+
forced: "\n &:is(".concat(selectedSelector, ") {\n ").concat((0, _global_styling.preventForcedColors)(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n background-color: ").concat(euiTheme.colors.fullShade, ";\n }\n ")
|
|
54
|
+
}), "\n ") : "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n padding: 0;\n\n &:is(").concat(selectedSelector, ") {\n color: ").concat((0, _global_styling.euiButtonEmptyColor)(euiThemeContext, 'text').color, ";\n background-color: transparent;\n font-weight: ").concat(euiTheme.font.weight.bold, ";\n }\n ");
|
|
55
|
+
var withNextSelector = isRefreshVariant ? '& + .euiFilterButton__wrapper' : '.euiFilterButton__wrapper:has(&) + .euiFilterButton__wrapper';
|
|
56
|
+
// handles display of borders between buttons
|
|
57
|
+
var withNextStyles = isRefreshVariant ? "\n &::before {\n border: none;\n }\n\n ".concat((0, _supports.cssSupportsHasWithNextSibling)("\n &:has(+ :not(&)) {\n ".concat((0, _global_styling.logicalCSS)('padding-right', '0'), "\n }\n ")), "\n ") : "\n .euiFilterButton {\n &::before {\n border: none;\n }\n }\n ";
|
|
46
58
|
return {
|
|
47
|
-
euiFilterButton: /*#__PURE__*/(0, _react.css)(
|
|
48
|
-
|
|
59
|
+
euiFilterButton: /*#__PURE__*/(0, _react.css)(!isRefreshVariant && euiFilterButtonDisplay(euiThemeContext), ";position:relative;", buttonStyles, ";;label:euiFilterButton;"),
|
|
60
|
+
buttonType: {
|
|
61
|
+
default: /*#__PURE__*/(0, _react.css)(isRefreshVariant && "\n border-radius: 0;\n\n &:focus-visible {\n z-index: 1;\n outline-offset: -".concat(euiTheme.border.width.thick, ";\n border-radius: ").concat(euiTheme.border.radius.small, ";\n transition: none;\n }\n "), ";;label:default;"),
|
|
62
|
+
toggle: /*#__PURE__*/(0, _react.css)("&:focus-visible{outline-offset:", (0, _global_styling.mathWithUnits)(euiTheme.focus.width, function (x) {
|
|
63
|
+
return isRefreshVariant ? x / 2 : x * -1;
|
|
64
|
+
}), ";}", toggleTypeStyles, ";;label:toggle;")
|
|
65
|
+
},
|
|
66
|
+
withNext: /*#__PURE__*/(0, _react.css)(withNextSelector, "{", (0, _global_styling.logicalCSS)('margin-left', "-".concat(euiTheme.size.xs)), withNextStyles, ";};label:withNext;"),
|
|
49
67
|
noGrow: _ref3,
|
|
50
68
|
hasNotification: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
51
69
|
return x * 6;
|
|
52
70
|
})), ";;label:hasNotification;"),
|
|
53
|
-
hasActiveFilters: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.bold, ";;label:hasActiveFilters;")
|
|
71
|
+
hasActiveFilters: /*#__PURE__*/(0, _react.css)("font-weight:", isRefreshVariant ? euiTheme.font.weight.regular : euiTheme.font.weight.bold, ";;label:hasActiveFilters;")
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
var euiFilterButtonWrapperStyles = exports.euiFilterButtonWrapperStyles = function euiFilterButtonWrapperStyles(euiThemeContext) {
|
|
75
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
76
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'buttonVariant');
|
|
77
|
+
var _euiFormVariables2 = (0, _form.euiFormVariables)(euiThemeContext),
|
|
78
|
+
borderColor = _euiFormVariables2.borderColor;
|
|
79
|
+
var border = "".concat(euiTheme.border.width.thin, " solid ").concat(borderColor);
|
|
80
|
+
|
|
81
|
+
// Pseudo elements create borders without affecting width. We also prefer them
|
|
82
|
+
// over box-shadow for Windows high contrast theme compatibility
|
|
83
|
+
var leftBorder = "\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n ".concat((0, _global_styling.logicalCSS)('border-left', border), "\n\n pointer-events: none;\n }\n ");
|
|
84
|
+
// Bottom borders are needed for responsive flex-wrap behavior
|
|
85
|
+
var bottomBorder = "\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n ".concat((0, _global_styling.logicalCSS)('border-bottom', border), "\n pointer-events: none;\n }\n ");
|
|
86
|
+
return {
|
|
87
|
+
wrapper: /*#__PURE__*/(0, _react.css)(euiFilterButtonDisplay(euiThemeContext), " position:relative;display:flex;align-items:center;", isRefreshVariant && "\n ".concat(leftBorder, "\n ").concat(bottomBorder, "\n "), " ", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.border.width.thin), ";;label:wrapper;"),
|
|
88
|
+
hasToggle: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-horizontal', isRefreshVariant ? euiTheme.border.width.thin : '0'), (0, _supports.cssSupportsHasWithNextSibling)("\n &:not([class*=\"withNext\"]):has(+ :not(&)) {\n ".concat((0, _global_styling.logicalCSS)('padding-right', '0'), "\n }\n ")), ";;label:hasToggle;")
|
|
54
89
|
};
|
|
55
90
|
};
|
|
56
91
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -62,24 +97,25 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
62
97
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
63
98
|
};
|
|
64
99
|
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
65
|
-
name: "
|
|
66
|
-
styles: "cursor:inherit;label:euiFilterButton__notification;"
|
|
100
|
+
name: "zxesfz-euiFilterButton__notification",
|
|
101
|
+
styles: "cursor:inherit;forced-color-adjust:auto;&{transition:none;};label:euiFilterButton__notification;"
|
|
67
102
|
} : {
|
|
68
|
-
name: "
|
|
69
|
-
styles: "cursor:inherit;label:euiFilterButton__notification;",
|
|
103
|
+
name: "zxesfz-euiFilterButton__notification",
|
|
104
|
+
styles: "cursor:inherit;forced-color-adjust:auto;&{transition:none;};label:euiFilterButton__notification;",
|
|
70
105
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
71
106
|
};
|
|
72
|
-
var euiFilterButtonChildStyles = exports.euiFilterButtonChildStyles = function euiFilterButtonChildStyles(
|
|
73
|
-
var euiTheme =
|
|
107
|
+
var euiFilterButtonChildStyles = exports.euiFilterButtonChildStyles = function euiFilterButtonChildStyles(euiThemeContext) {
|
|
108
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
109
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'buttonVariant');
|
|
74
110
|
return {
|
|
75
111
|
content: {
|
|
76
|
-
euiFilterButton__content: /*#__PURE__*/(0, _react.css)("
|
|
112
|
+
euiFilterButton__content: /*#__PURE__*/(0, _react.css)(isRefreshVariant && "\n .euiThemeProvider {\n display: inline-flex;\n }\n ", ";;label:euiFilterButton__content;"),
|
|
77
113
|
hasIcon: /*#__PURE__*/(0, _react.css)("&>.euiIcon:last-child{", (0, _global_styling.logicalCSS)('margin-left', 'auto'), ";};label:hasIcon;")
|
|
78
114
|
},
|
|
79
115
|
text: {
|
|
80
116
|
euiFilterButton__text: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextShift)('bold', 'data-text', euiTheme), " ", (0, _global_styling.euiTextTruncate)(), ";;label:euiFilterButton__text;"),
|
|
81
117
|
hasNotification: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
82
|
-
return x * 3;
|
|
118
|
+
return x * (isRefreshVariant ? 2 : 3);
|
|
83
119
|
})), ";;label:hasNotification;")
|
|
84
120
|
},
|
|
85
121
|
notification: {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.euiFilterGroupStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
var _services = require("../../services");
|
|
8
9
|
var _global_styling = require("../../global_styling");
|
|
9
10
|
var _high_contrast = require("../../global_styling/functions/high_contrast");
|
|
10
11
|
var _form = require("../form/form.styles");
|
|
@@ -26,20 +27,31 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
26
27
|
};
|
|
27
28
|
var euiFilterGroupStyles = exports.euiFilterGroupStyles = function euiFilterGroupStyles(euiThemeContext) {
|
|
28
29
|
var euiTheme = euiThemeContext.euiTheme;
|
|
30
|
+
var isRefreshVariant = (0, _services.isEuiThemeRefreshVariant)(euiThemeContext, 'buttonVariant');
|
|
29
31
|
var _euiFormVariables = (0, _form.euiFormVariables)(euiThemeContext),
|
|
30
32
|
backgroundColor = _euiFormVariables.backgroundColor,
|
|
31
33
|
borderColor = _euiFormVariables.borderColor,
|
|
32
34
|
controlBorderRadius = _euiFormVariables.controlBorderRadius,
|
|
35
|
+
controlHeight = _euiFormVariables.controlHeight,
|
|
33
36
|
controlCompressedBorderRadius = _euiFormVariables.controlCompressedBorderRadius,
|
|
34
37
|
controlCompressedHeight = _euiFormVariables.controlCompressedHeight;
|
|
38
|
+
var borderRadius = isRefreshVariant ? euiTheme.border.radius.small : controlBorderRadius;
|
|
39
|
+
var borderRadiusCompressed = isRefreshVariant ? euiTheme.border.radius.small : controlCompressedBorderRadius;
|
|
40
|
+
var borderStyle = isRefreshVariant ? "\n /* Adds the border on a pseudo element to prevent height differences between wrapper and buttons.\n Uses ::after to ensure overlap and prevents blocking by setting pointer-events: none */\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.borderBasePlain, ";\n border-radius: inherit;\n pointer-events: none;\n }\n ") : "\n ".concat((0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
41
|
+
none: "box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(borderColor, ";"),
|
|
42
|
+
forced: "border: ".concat(euiTheme.border.thin, ";")
|
|
43
|
+
}), "\n ");
|
|
35
44
|
return {
|
|
36
|
-
euiFilterGroup: /*#__PURE__*/(0, _react.css)("display:inline-flex;", (0, _global_styling.logicalCSS)('max-width', '100%'), " overflow:hidden;background-color:", backgroundColor, ";", (0,
|
|
37
|
-
none: "box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(borderColor, ";"),
|
|
38
|
-
forced: "border: ".concat(euiTheme.border.thin, ";")
|
|
39
|
-
}), ">*:not(.euiFilterButton){", (0, _filter_button.euiFilterButtonDisplay)(euiThemeContext), ";}.euiPopover>.euiFilterButton{", (0, _global_styling.logicalCSS)('width', '100%'), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{flex-wrap:wrap;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs']), "{display:flex;.euiFilterButton{flex-grow:1;}};label:euiFilterGroup;"),
|
|
45
|
+
euiFilterGroup: /*#__PURE__*/(0, _react.css)(isRefreshVariant && "position: relative;", " display:inline-flex;", (0, _global_styling.logicalCSS)('max-width', '100%'), " overflow:hidden;background-color:", backgroundColor, ";", borderStyle, ">*:not(.euiFilterButton__wrapper, .euiFilterButton){", (0, _filter_button.euiFilterButtonDisplay)(euiThemeContext), ";}.euiPopover>.euiFilterButton{", (0, _global_styling.logicalCSS)('width', '100%'), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{flex-wrap:wrap;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs']), "{display:flex;", isRefreshVariant && "\n .euiPopover:focus-within {\n z-index: 1;\n }\n \n .euiFilterButton__wrapper {\n flex-grow: 1;\n }\n ", ";.euiFilterButton__wrapper{flex-grow:1;}};label:euiFilterGroup;"),
|
|
40
46
|
fullWidth: _ref,
|
|
41
|
-
uncompressed: /*#__PURE__*/(0, _react.css)("border-radius:",
|
|
42
|
-
|
|
47
|
+
uncompressed: /*#__PURE__*/(0, _react.css)("border-radius:", borderRadius, ";.euiFilterButton__wrapper{", (0, _global_styling.logicalCSS)('height', controlHeight), ";}.euiFilterButton{", (0, _global_styling.logicalCSS)('height', controlHeight), ";}", !isRefreshVariant && buttonChildrenBorderRadii(borderRadius), " ", isRefreshVariant && "\n .euiFilterButton-isToggle {\n ".concat((0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)([controlHeight, euiTheme.size.xxs], function (x, y) {
|
|
48
|
+
return x - 3 * y;
|
|
49
|
+
})), "\n }\n "), ";;label:uncompressed;"),
|
|
50
|
+
compressed: /*#__PURE__*/(0, _react.css)("border-radius:", borderRadiusCompressed, ";", !isRefreshVariant && buttonChildrenBorderRadii(borderRadiusCompressed), " .euiFilterButton{", (0, _global_styling.logicalCSS)('height', isRefreshVariant ? (0, _global_styling.mathWithUnits)([controlCompressedHeight, euiTheme.border.width.thin], function (x, y) {
|
|
51
|
+
return x - 2 * y;
|
|
52
|
+
}) : controlCompressedHeight), ";}", isRefreshVariant && "\n .euiFilterButton-isToggle {\n ".concat((0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)([controlCompressedHeight, euiTheme.size.xxs], function (x, y) {
|
|
53
|
+
return x - 3 * y;
|
|
54
|
+
})), "\n }\n "), ";;label:compressed;"),
|
|
43
55
|
/**
|
|
44
56
|
* Not used in EuiFilterGroup directly, but used by EuiSearchBar and consumers
|
|
45
57
|
* A fixed width is required because of the shift in widths that can be caused
|
|
@@ -292,6 +292,7 @@ var FieldValueSelectionFilter = exports.FieldValueSelectionFilter = /*#__PURE__*
|
|
|
292
292
|
return (0, _react2.jsx)(_filter_group.EuiFilterButton, {
|
|
293
293
|
iconType: "arrowDown",
|
|
294
294
|
iconSide: "right",
|
|
295
|
+
isSelected: active,
|
|
295
296
|
hasActiveFilters: active,
|
|
296
297
|
numActiveFilters: active ? activeItemsCount : undefined,
|
|
297
298
|
grow: true,
|
|
@@ -79,8 +79,10 @@ var FieldValueToggleFilter = exports.FieldValueToggleFilter = /*#__PURE__*/funct
|
|
|
79
79
|
};
|
|
80
80
|
return (0, _react2.jsx)(_filter_group.EuiFilterButton, {
|
|
81
81
|
onClick: onClick,
|
|
82
|
+
isSelected: hasActiveFilters,
|
|
82
83
|
hasActiveFilters: hasActiveFilters,
|
|
83
|
-
"aria-pressed": !!hasActiveFilters
|
|
84
|
+
"aria-pressed": !!hasActiveFilters,
|
|
85
|
+
isToggle: true
|
|
84
86
|
}, name);
|
|
85
87
|
}
|
|
86
88
|
}]);
|
|
@@ -80,9 +80,11 @@ var FieldValueToggleGroupFilter = exports.FieldValueToggleGroupFilter = /*#__PUR
|
|
|
80
80
|
return (0, _react2.jsx)(_filter_group.EuiFilterButton, {
|
|
81
81
|
key: key,
|
|
82
82
|
onClick: onClick,
|
|
83
|
+
isSelected: active,
|
|
83
84
|
hasActiveFilters: active,
|
|
84
85
|
"aria-pressed": !!active,
|
|
85
|
-
withNext: !isLastItem
|
|
86
|
+
withNext: !isLastItem,
|
|
87
|
+
isToggle: true
|
|
86
88
|
}, name);
|
|
87
89
|
});
|
|
88
90
|
}
|
|
@@ -75,8 +75,10 @@ var IsFilter = exports.IsFilter = /*#__PURE__*/function (_Component) {
|
|
|
75
75
|
};
|
|
76
76
|
return (0, _react2.jsx)(_filter_group.EuiFilterButton, {
|
|
77
77
|
onClick: onClick,
|
|
78
|
+
isSelected: hasActiveFilters,
|
|
78
79
|
hasActiveFilters: hasActiveFilters,
|
|
79
|
-
"aria-pressed": !!hasActiveFilters
|
|
80
|
+
"aria-pressed": !!hasActiveFilters,
|
|
81
|
+
isToggle: true
|
|
80
82
|
}, name);
|
|
81
83
|
}
|
|
82
84
|
}]);
|
|
@@ -194,7 +194,7 @@ describe('EuiSearchBar', function () {
|
|
|
194
194
|
cy.checkAxe();
|
|
195
195
|
});
|
|
196
196
|
it('has zero violations after filtering on Open items', function () {
|
|
197
|
-
cy.get('button.
|
|
197
|
+
cy.get('button.euiFilterButton').first().focus();
|
|
198
198
|
cy.realPress('Enter');
|
|
199
199
|
cy.get('table.euiTable tbody').find('tr').should('have.length', 3);
|
|
200
200
|
cy.checkAxe();
|
|
@@ -205,12 +205,12 @@ describe('EuiSearchBar', function () {
|
|
|
205
205
|
cy.checkAxe();
|
|
206
206
|
});
|
|
207
207
|
it('has zero violations after filtering by Tags', function () {
|
|
208
|
-
cy.get('button.
|
|
208
|
+
cy.get('button.euiFilterButton').last().focus();
|
|
209
209
|
cy.realPress('Enter');
|
|
210
210
|
cy.realPress('ArrowDown');
|
|
211
211
|
cy.realPress('Enter');
|
|
212
212
|
cy.realPress('Escape');
|
|
213
|
-
cy.get('button.
|
|
213
|
+
cy.get('button.euiFilterButton').last().should('have.focus');
|
|
214
214
|
cy.get('table.euiTable tbody').find('tr').should('have.length', 3);
|
|
215
215
|
cy.checkAxe();
|
|
216
216
|
cy.repeatRealPress(['Shift', 'Tab'], 3);
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.EuiTableHeaderCell = void 0;
|
|
8
8
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
11
|
var _react = _interopRequireDefault(require("react"));
|
|
11
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -21,7 +22,8 @@ var _table_cell_content = require("./_table_cell_content");
|
|
|
21
22
|
var _table_cells_shared = require("./table_cells_shared.styles");
|
|
22
23
|
var _react2 = require("@emotion/react");
|
|
23
24
|
var _excluded = ["children", "align", "onSort", "isSorted", "isSortAscending", "className", "scope", "mobileOptions", "width", "style", "readOnly", "tooltipProps", "description", "append"];
|
|
24
|
-
|
|
25
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /*
|
|
25
27
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
26
28
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
27
29
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
@@ -37,6 +39,21 @@ var CellContents = function CellContents(_ref) {
|
|
|
37
39
|
canSort = _ref.canSort,
|
|
38
40
|
isSorted = _ref.isSorted,
|
|
39
41
|
isSortAscending = _ref.isSortAscending;
|
|
42
|
+
var tooltipIcon = tooltipProps ? canSort ? (0, _react2.jsx)(_icon.EuiIcon, (0, _extends2.default)({
|
|
43
|
+
className: "euiTableSortIcon",
|
|
44
|
+
type: tooltipProps.icon || 'questionInCircle',
|
|
45
|
+
size: "m",
|
|
46
|
+
color: "subdued"
|
|
47
|
+
}, tooltipProps.iconProps)) : (0, _react2.jsx)(_tool_tip.EuiIconTip, (0, _extends2.default)({
|
|
48
|
+
content: tooltipProps.content,
|
|
49
|
+
type: tooltipProps.icon || 'questionInCircle',
|
|
50
|
+
size: "m",
|
|
51
|
+
color: "subdued",
|
|
52
|
+
position: "top",
|
|
53
|
+
iconProps: _objectSpread({
|
|
54
|
+
role: 'button'
|
|
55
|
+
}, tooltipProps.iconProps)
|
|
56
|
+
}, tooltipProps.tooltipProps)) : null;
|
|
40
57
|
return (0, _react2.jsx)(_table_cell_content.EuiTableCellContent, {
|
|
41
58
|
className: className,
|
|
42
59
|
align: align,
|
|
@@ -57,14 +74,7 @@ var CellContents = function CellContents(_ref) {
|
|
|
57
74
|
className: "eui-textTruncate"
|
|
58
75
|
}, children);
|
|
59
76
|
});
|
|
60
|
-
}), description && (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("span", null, description)),
|
|
61
|
-
content: tooltipProps.content,
|
|
62
|
-
type: tooltipProps.icon || 'questionInCircle',
|
|
63
|
-
size: "m",
|
|
64
|
-
color: "subdued",
|
|
65
|
-
position: "top",
|
|
66
|
-
iconProps: tooltipProps.iconProps
|
|
67
|
-
}, tooltipProps.tooltipProps)), isSorted ? (0, _react2.jsx)(_icon.EuiIcon, {
|
|
77
|
+
}), description && (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("span", null, description)), tooltipIcon, isSorted ? (0, _react2.jsx)(_icon.EuiIcon, {
|
|
68
78
|
className: "euiTableSortIcon",
|
|
69
79
|
type: isSortAscending ? 'sortUp' : 'sortDown',
|
|
70
80
|
size: "m"
|
|
@@ -126,7 +136,11 @@ var EuiTableHeaderCell = exports.EuiTableHeaderCell = function EuiTableHeaderCel
|
|
|
126
136
|
role: "columnheader",
|
|
127
137
|
"aria-sort": ariaSortValue,
|
|
128
138
|
style: inlineStyles
|
|
129
|
-
}, rest), canSort ? (0, _react2.jsx)(
|
|
139
|
+
}, rest), canSort ? (0, _react2.jsx)(_tool_tip.EuiToolTip, (0, _extends2.default)({
|
|
140
|
+
content: tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.content
|
|
141
|
+
}, tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.tooltipProps, {
|
|
142
|
+
display: "block"
|
|
143
|
+
}), (0, _react2.jsx)("button", {
|
|
130
144
|
type: "button",
|
|
131
145
|
css: styles.euiTableHeaderCell__button,
|
|
132
146
|
className: (0, _classnames.default)('euiTableHeaderButton', {
|
|
@@ -134,5 +148,5 @@ var EuiTableHeaderCell = exports.EuiTableHeaderCell = function EuiTableHeaderCel
|
|
|
134
148
|
}),
|
|
135
149
|
onClick: onSort,
|
|
136
150
|
"data-test-subj": "tableHeaderSortButton"
|
|
137
|
-
}, (0, _react2.jsx)(CellContents, cellContentsProps)) : (0, _react2.jsx)(CellContents, cellContentsProps), append);
|
|
151
|
+
}, (0, _react2.jsx)(CellContents, cellContentsProps))) : (0, _react2.jsx)(CellContents, cellContentsProps), append);
|
|
138
152
|
};
|