@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
|
@@ -157,6 +157,13 @@ EuiPinnableListGroup.propTypes = {
|
|
|
157
157
|
iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "anomalyChart", "anomalySwimLane", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "changePointDetection", "check", "checkCircle", "checkInCircleFilled", "cheer", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "code", "codeApp", "color", "comment", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "contrast", "contrastHigh", "controls", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInCircle", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "diff", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "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", "endpoint", "eql", "eraser", "error", "errorFilled", "esqlVis", "exit", "expand", "expandMini", "export", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "fieldStatistics", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flask", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logPatternAnalysis", "logRateAnalysis", "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", "logoVulnerabilityManagement", "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", "minusInSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plugs", "plus", "plusInCircle", "plusInCircleFilled", "plusInSquare", "popout", "push", "questionInCircle", "quote", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "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", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "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", "vulnerabilityManagementApp", "warning", "warningFilled", "alert", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]).isRequired,
|
|
158
158
|
/**
|
|
159
159
|
* Any of the named color palette options.
|
|
160
|
+
*
|
|
161
|
+
* Do not use the following colors for standalone buttons directly,
|
|
162
|
+
* they exist to serve other components:
|
|
163
|
+
* - accent
|
|
164
|
+
* - warning
|
|
165
|
+
* - neutral
|
|
166
|
+
* - risk
|
|
160
167
|
*/
|
|
161
168
|
color: PropTypes.any,
|
|
162
169
|
"aria-label": PropTypes.string,
|
|
@@ -73,6 +73,13 @@ EuiPaginationButton.propTypes = {
|
|
|
73
73
|
onClick: PropTypes.func,
|
|
74
74
|
/**
|
|
75
75
|
* Any of the named color palette options.
|
|
76
|
+
*
|
|
77
|
+
* Do not use the following colors for standalone buttons directly,
|
|
78
|
+
* they exist to serve other components:
|
|
79
|
+
* - accent
|
|
80
|
+
* - warning
|
|
81
|
+
* - neutral
|
|
82
|
+
* - risk
|
|
76
83
|
*/
|
|
77
84
|
color: PropTypes.any,
|
|
78
85
|
size: PropTypes.any,
|
|
@@ -297,6 +297,7 @@ export var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
|
|
|
297
297
|
return ___EmotionJSX(EuiFilterButton, {
|
|
298
298
|
iconType: "arrowDown",
|
|
299
299
|
iconSide: "right",
|
|
300
|
+
isSelected: active,
|
|
300
301
|
hasActiveFilters: active,
|
|
301
302
|
numActiveFilters: active ? activeItemsCount : undefined,
|
|
302
303
|
grow: true,
|
|
@@ -78,8 +78,10 @@ export var FieldValueToggleFilter = /*#__PURE__*/function (_Component) {
|
|
|
78
78
|
};
|
|
79
79
|
return ___EmotionJSX(EuiFilterButton, {
|
|
80
80
|
onClick: onClick,
|
|
81
|
+
isSelected: hasActiveFilters,
|
|
81
82
|
hasActiveFilters: hasActiveFilters,
|
|
82
|
-
"aria-pressed": !!hasActiveFilters
|
|
83
|
+
"aria-pressed": !!hasActiveFilters,
|
|
84
|
+
isToggle: true
|
|
83
85
|
}, name);
|
|
84
86
|
}
|
|
85
87
|
}]);
|
|
@@ -79,9 +79,11 @@ export var FieldValueToggleGroupFilter = /*#__PURE__*/function (_Component) {
|
|
|
79
79
|
return ___EmotionJSX(EuiFilterButton, {
|
|
80
80
|
key: key,
|
|
81
81
|
onClick: onClick,
|
|
82
|
+
isSelected: active,
|
|
82
83
|
hasActiveFilters: active,
|
|
83
84
|
"aria-pressed": !!active,
|
|
84
|
-
withNext: !isLastItem
|
|
85
|
+
withNext: !isLastItem,
|
|
86
|
+
isToggle: true
|
|
85
87
|
}, name);
|
|
86
88
|
});
|
|
87
89
|
}
|
|
@@ -74,8 +74,10 @@ export var IsFilter = /*#__PURE__*/function (_Component) {
|
|
|
74
74
|
};
|
|
75
75
|
return ___EmotionJSX(EuiFilterButton, {
|
|
76
76
|
onClick: onClick,
|
|
77
|
+
isSelected: hasActiveFilters,
|
|
77
78
|
hasActiveFilters: hasActiveFilters,
|
|
78
|
-
"aria-pressed": !!hasActiveFilters
|
|
79
|
+
"aria-pressed": !!hasActiveFilters,
|
|
80
|
+
isToggle: true
|
|
79
81
|
}, name);
|
|
80
82
|
}
|
|
81
83
|
}]);
|
|
@@ -189,7 +189,7 @@ describe('EuiSearchBar', function () {
|
|
|
189
189
|
cy.checkAxe();
|
|
190
190
|
});
|
|
191
191
|
it('has zero violations after filtering on Open items', function () {
|
|
192
|
-
cy.get('button.
|
|
192
|
+
cy.get('button.euiFilterButton').first().focus();
|
|
193
193
|
cy.realPress('Enter');
|
|
194
194
|
cy.get('table.euiTable tbody').find('tr').should('have.length', 3);
|
|
195
195
|
cy.checkAxe();
|
|
@@ -200,12 +200,12 @@ describe('EuiSearchBar', function () {
|
|
|
200
200
|
cy.checkAxe();
|
|
201
201
|
});
|
|
202
202
|
it('has zero violations after filtering by Tags', function () {
|
|
203
|
-
cy.get('button.
|
|
203
|
+
cy.get('button.euiFilterButton').last().focus();
|
|
204
204
|
cy.realPress('Enter');
|
|
205
205
|
cy.realPress('ArrowDown');
|
|
206
206
|
cy.realPress('Enter');
|
|
207
207
|
cy.realPress('Escape');
|
|
208
|
-
cy.get('button.
|
|
208
|
+
cy.get('button.euiFilterButton').last().should('have.focus');
|
|
209
209
|
cy.get('table.euiTable tbody').find('tr').should('have.length', 3);
|
|
210
210
|
cy.checkAxe();
|
|
211
211
|
cy.repeatRealPress(['Shift', 'Tab'], 3);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
var _excluded = ["children", "align", "onSort", "isSorted", "isSortAscending", "className", "scope", "mobileOptions", "width", "style", "readOnly", "tooltipProps", "description", "append"];
|
|
2
3
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
3
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
4
|
-
function
|
|
5
|
+
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; }
|
|
5
6
|
import PropTypes from "prop-types";
|
|
7
|
+
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) { _defineProperty(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; }
|
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
6
12
|
/*
|
|
7
13
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
8
14
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -18,7 +24,7 @@ import { EuiI18n } from '../i18n';
|
|
|
18
24
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
19
25
|
import { EuiIcon } from '../icon';
|
|
20
26
|
import { EuiInnerText } from '../inner_text';
|
|
21
|
-
import { EuiIconTip } from '../tool_tip';
|
|
27
|
+
import { EuiIconTip, EuiToolTip } from '../tool_tip';
|
|
22
28
|
import { resolveWidthAsStyle } from './utils';
|
|
23
29
|
import { useEuiTableIsResponsive } from './mobile/responsive_context';
|
|
24
30
|
import { EuiTableCellContent } from './_table_cell_content';
|
|
@@ -33,6 +39,21 @@ var CellContents = function CellContents(_ref) {
|
|
|
33
39
|
canSort = _ref.canSort,
|
|
34
40
|
isSorted = _ref.isSorted,
|
|
35
41
|
isSortAscending = _ref.isSortAscending;
|
|
42
|
+
var tooltipIcon = tooltipProps ? canSort ? ___EmotionJSX(EuiIcon, _extends({
|
|
43
|
+
className: "euiTableSortIcon",
|
|
44
|
+
type: tooltipProps.icon || 'questionInCircle',
|
|
45
|
+
size: "m",
|
|
46
|
+
color: "subdued"
|
|
47
|
+
}, tooltipProps.iconProps)) : ___EmotionJSX(EuiIconTip, _extends({
|
|
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;
|
|
36
57
|
return ___EmotionJSX(EuiTableCellContent, {
|
|
37
58
|
className: className,
|
|
38
59
|
align: align,
|
|
@@ -53,14 +74,7 @@ var CellContents = function CellContents(_ref) {
|
|
|
53
74
|
className: "eui-textTruncate"
|
|
54
75
|
}, children);
|
|
55
76
|
});
|
|
56
|
-
}), description && ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", null, description)),
|
|
57
|
-
content: tooltipProps.content,
|
|
58
|
-
type: tooltipProps.icon || 'questionInCircle',
|
|
59
|
-
size: "m",
|
|
60
|
-
color: "subdued",
|
|
61
|
-
position: "top",
|
|
62
|
-
iconProps: tooltipProps.iconProps
|
|
63
|
-
}, tooltipProps.tooltipProps)), isSorted ? ___EmotionJSX(EuiIcon, {
|
|
77
|
+
}), description && ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", null, description)), tooltipIcon, isSorted ? ___EmotionJSX(EuiIcon, {
|
|
64
78
|
className: "euiTableSortIcon",
|
|
65
79
|
type: isSortAscending ? 'sortUp' : 'sortDown',
|
|
66
80
|
size: "m"
|
|
@@ -122,7 +136,11 @@ export var EuiTableHeaderCell = function EuiTableHeaderCell(_ref2) {
|
|
|
122
136
|
role: "columnheader",
|
|
123
137
|
"aria-sort": ariaSortValue,
|
|
124
138
|
style: inlineStyles
|
|
125
|
-
}, rest), canSort ? ___EmotionJSX(
|
|
139
|
+
}, rest), canSort ? ___EmotionJSX(EuiToolTip, _extends({
|
|
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
|
+
}), ___EmotionJSX("button", {
|
|
126
144
|
type: "button",
|
|
127
145
|
css: styles.euiTableHeaderCell__button,
|
|
128
146
|
className: classNames('euiTableHeaderButton', {
|
|
@@ -130,7 +148,7 @@ export var EuiTableHeaderCell = function EuiTableHeaderCell(_ref2) {
|
|
|
130
148
|
}),
|
|
131
149
|
onClick: onSort,
|
|
132
150
|
"data-test-subj": "tableHeaderSortButton"
|
|
133
|
-
}, ___EmotionJSX(CellContents, cellContentsProps)) : ___EmotionJSX(CellContents, cellContentsProps), append);
|
|
151
|
+
}, ___EmotionJSX(CellContents, cellContentsProps))) : ___EmotionJSX(CellContents, cellContentsProps), append);
|
|
134
152
|
};
|
|
135
153
|
EuiTableHeaderCell.propTypes = {
|
|
136
154
|
className: PropTypes.string,
|
|
@@ -179,7 +179,10 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
179
179
|
});
|
|
180
180
|
_defineProperty(_this, "onEscapeKey", function (event) {
|
|
181
181
|
if (event.key === keys.ESCAPE) {
|
|
182
|
-
|
|
182
|
+
// when the tooltip is only visual, we don't want it to add an additional key stop
|
|
183
|
+
if (!_this.props.disableScreenReaderOutput) {
|
|
184
|
+
if (_this.state.visible) event.stopPropagation();
|
|
185
|
+
}
|
|
183
186
|
_this.setState({
|
|
184
187
|
hasFocus: false
|
|
185
188
|
}); // Allows mousing over back into the tooltip to work correctly
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
3
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
4
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
7
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
8
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
9
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
4
10
|
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; }
|
|
5
11
|
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) { _defineProperty(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; }
|
|
6
12
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -15,10 +21,34 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
15
21
|
*/
|
|
16
22
|
|
|
17
23
|
import { css, keyframes } from '@emotion/react';
|
|
18
|
-
import { getTokenName, euiCanAnimate } from '@elastic/eui-theme-common';
|
|
19
|
-
import { makeHighContrastColor, useEuiMemoizedStyles } from '../../services';
|
|
20
|
-
|
|
24
|
+
import { getTokenName, euiCanAnimate, mathWithUnits } from '@elastic/eui-theme-common';
|
|
25
|
+
import { makeHighContrastColor, useEuiMemoizedStyles, isEuiThemeRefreshVariant } from '../../services';
|
|
26
|
+
import { highContrastModeStyles, logicalCSS } from '../functions';
|
|
27
|
+
|
|
28
|
+
/** Tentative usage; these exist only to be used as button directly when used within other components */
|
|
29
|
+
export var SEVERITY_COLORS = ['neutral', 'risk'];
|
|
30
|
+
export var BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
|
|
31
|
+
export var EXTENDED_BUTTON_COLORS = [].concat(BUTTON_COLORS, SEVERITY_COLORS);
|
|
21
32
|
export var BUTTON_DISPLAYS = ['base', 'fill', 'empty'];
|
|
33
|
+
var getButtonVariantTokenValues = function getButtonVariantTokenValues(_ref, color, variant) {
|
|
34
|
+
var euiTheme = _ref.euiTheme,
|
|
35
|
+
highContrastMode = _ref.highContrastMode;
|
|
36
|
+
var backgroundTokenBase = variant === 'base' ? 'background' : "background".concat(variant.charAt(0).toUpperCase() + variant.slice(1));
|
|
37
|
+
var textTokenBase = variant === 'filled' ? 'textColorFilled' : 'textColor';
|
|
38
|
+
var backgroundTokenName = getTokenName(backgroundTokenBase, color);
|
|
39
|
+
var textTokenName = getTokenName(textTokenBase, color);
|
|
40
|
+
var backgroundHoverTokenName = getTokenName(backgroundTokenBase, color, 'hover');
|
|
41
|
+
var backgroundActiveTokenName = getTokenName(backgroundTokenBase, color, 'active');
|
|
42
|
+
var highContrastForeground = ['warning', 'neutral', 'risk'].includes(color) ? euiTheme.colors.ink : color === 'disabled' ? euiTheme.components.buttons[textTokenName] : euiTheme.colors.textInverse;
|
|
43
|
+
var foreground = variant === 'filled' ? highContrastMode ? highContrastForeground : euiTheme.components.buttons[textTokenName] : euiTheme.components.buttons[textTokenName];
|
|
44
|
+
return {
|
|
45
|
+
color: foreground,
|
|
46
|
+
background: euiTheme.components.buttons[backgroundTokenName],
|
|
47
|
+
backgroundHover: euiTheme.components.buttons[backgroundHoverTokenName],
|
|
48
|
+
backgroundActive: euiTheme.components.buttons[backgroundActiveTokenName]
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
|
|
22
52
|
/**
|
|
23
53
|
* Creates the `base` version of button styles with proper text contrast.
|
|
24
54
|
* @param euiThemeContext
|
|
@@ -26,11 +56,9 @@ export var BUTTON_DISPLAYS = ['base', 'fill', 'empty'];
|
|
|
26
56
|
* @returns Style object `{ backgroundColor, color }`
|
|
27
57
|
*/
|
|
28
58
|
export var euiButtonColor = function euiButtonColor(euiThemeContext, color) {
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var foreground = euiTheme.components.buttons[textTokenName];
|
|
33
|
-
var background = euiTheme.components.buttons[backgroundTokenName];
|
|
59
|
+
var buttonColors = getButtonVariantTokenValues(euiThemeContext, color, 'base');
|
|
60
|
+
var foreground = buttonColors.color;
|
|
61
|
+
var background = buttonColors.background;
|
|
34
62
|
return _objectSpread({
|
|
35
63
|
color: background === 'transparent' || color === 'disabled' ? foreground : makeHighContrastColor(foreground)(background),
|
|
36
64
|
backgroundColor: background
|
|
@@ -44,13 +72,9 @@ export var euiButtonColor = function euiButtonColor(euiThemeContext, color) {
|
|
|
44
72
|
* @returns Style object `{ backgroundColor, color }`
|
|
45
73
|
*/
|
|
46
74
|
export var euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
var
|
|
50
|
-
var textColorTokenName = getTokenName('textColorFilled', color);
|
|
51
|
-
var highContrastForeground = ['warning', 'neutral', 'risk'].includes(color) ? euiTheme.colors.ink : color === 'disabled' ? euiTheme.components.buttons[textColorTokenName] : euiTheme.colors.textInverse;
|
|
52
|
-
var foreground = highContrastMode ? highContrastForeground : euiTheme.components.buttons[textColorTokenName];
|
|
53
|
-
var background = euiTheme.components.buttons[backgroundTokenName];
|
|
75
|
+
var buttonColors = getButtonVariantTokenValues(euiThemeContext, color, 'filled');
|
|
76
|
+
var foreground = buttonColors.color;
|
|
77
|
+
var background = buttonColors.background;
|
|
54
78
|
return _objectSpread({
|
|
55
79
|
color: foreground,
|
|
56
80
|
backgroundColor: background
|
|
@@ -74,9 +98,9 @@ export var euiButtonEmptyColor = function euiButtonEmptyColor(euiThemeContext, c
|
|
|
74
98
|
break;
|
|
75
99
|
default:
|
|
76
100
|
{
|
|
77
|
-
var
|
|
101
|
+
var buttonColors = getButtonVariantTokenValues(euiThemeContext, color, 'empty');
|
|
78
102
|
foreground = euiButtonColor(euiThemeContext, color).color;
|
|
79
|
-
background =
|
|
103
|
+
background = buttonColors.backgroundHover;
|
|
80
104
|
break;
|
|
81
105
|
}
|
|
82
106
|
}
|
|
@@ -89,7 +113,7 @@ export var euiButtonEmptyColor = function euiButtonEmptyColor(euiThemeContext, c
|
|
|
89
113
|
/**
|
|
90
114
|
* Given the button display type, returns the Emotion based color keys.
|
|
91
115
|
* @param options Button display type
|
|
92
|
-
* @returns An object of `
|
|
116
|
+
* @returns An object of `_EuiExtendedButtonColor` keys including `disabled`
|
|
93
117
|
*/
|
|
94
118
|
export var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
|
|
95
119
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -99,21 +123,37 @@ export var useEuiButtonColorCSS = function useEuiButtonColorCSS() {
|
|
|
99
123
|
return colorsDisplaysMap[display];
|
|
100
124
|
};
|
|
101
125
|
var euiButtonDisplaysColors = function euiButtonDisplaysColors(euiThemeContext) {
|
|
102
|
-
var
|
|
126
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
127
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
128
|
+
var COLORS = [].concat(_toConsumableArray(EXTENDED_BUTTON_COLORS), ['disabled']);
|
|
103
129
|
var displaysColorsMap = {};
|
|
104
130
|
BUTTON_DISPLAYS.forEach(function (display) {
|
|
105
131
|
displaysColorsMap[display] = {};
|
|
106
132
|
COLORS.forEach(function (color) {
|
|
107
133
|
switch (display) {
|
|
108
134
|
case 'base':
|
|
109
|
-
|
|
110
|
-
|
|
135
|
+
{
|
|
136
|
+
var buttonColors = getButtonVariantTokenValues(euiThemeContext, color, 'base');
|
|
137
|
+
var borderStyle = color === 'text' && "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.borderBasePlain, ";\n ");
|
|
138
|
+
var refreshVariantStyles = isRefreshVariant && "\n ".concat(_interactionStyles(euiThemeContext, buttonColors, 'overlay'), "\n ").concat(borderStyle, "\n ");
|
|
139
|
+
displaysColorsMap[display][color] = /*#__PURE__*/css(euiButtonColor(euiThemeContext, color), " ", refreshVariantStyles, ";;label:displaysColorsMap-display-color;");
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
111
142
|
case 'fill':
|
|
112
|
-
|
|
113
|
-
|
|
143
|
+
{
|
|
144
|
+
var _buttonColors = getButtonVariantTokenValues(euiThemeContext, color, 'filled');
|
|
145
|
+
var _refreshVariantStyles = isRefreshVariant && _interactionStyles(euiThemeContext, _buttonColors);
|
|
146
|
+
displaysColorsMap[display][color] = /*#__PURE__*/css(euiButtonFillColor(euiThemeContext, color), "outline-color:", euiThemeContext.colorMode === 'DARK' && color === 'text' ? 'currentColor' : euiThemeContext.euiTheme.colors.fullShade, ";", _refreshVariantStyles, ";;label:displaysColorsMap-display-color;");
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
114
149
|
case 'empty':
|
|
115
|
-
|
|
116
|
-
|
|
150
|
+
{
|
|
151
|
+
var _buttonColors2 = getButtonVariantTokenValues(euiThemeContext, color, 'empty');
|
|
152
|
+
var classicVariantStyles = !isRefreshVariant && "\n &:focus,\n &:active {\n background-color: ".concat(euiButtonEmptyColor(euiThemeContext, color).backgroundColor, ";\n }\n ");
|
|
153
|
+
var _refreshVariantStyles2 = isRefreshVariant && _interactionStyles(euiThemeContext, _buttonColors2, 'overlay');
|
|
154
|
+
displaysColorsMap[display][color] = /*#__PURE__*/css("color:", euiButtonEmptyColor(euiThemeContext, color).color, ";", classicVariantStyles, " ", _refreshVariantStyles2, ";;label:displaysColorsMap-display-color;");
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
117
157
|
}
|
|
118
158
|
|
|
119
159
|
// Tweak auto-generated Emotion label/className output
|
|
@@ -132,9 +172,10 @@ export var useEuiButtonFocusCSS = function useEuiButtonFocusCSS() {
|
|
|
132
172
|
return useEuiMemoizedStyles(euiButtonFocusCSS);
|
|
133
173
|
};
|
|
134
174
|
var euiButtonFocusAnimation = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 50% {\n transform: translateY(1px);\n }\n"])));
|
|
135
|
-
var euiButtonFocusCSS = function euiButtonFocusCSS(
|
|
136
|
-
var euiTheme =
|
|
137
|
-
var
|
|
175
|
+
var euiButtonFocusCSS = function euiButtonFocusCSS(euiThemeContext) {
|
|
176
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
177
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
178
|
+
var focusCSS = isRefreshVariant ? /*#__PURE__*/css(";label:focusCSS;") : /*#__PURE__*/css(euiCanAnimate, "{transition:transform ", euiTheme.animation.normal, " ease-in-out,background-color ", euiTheme.animation.normal, " ease-in-out;&:hover:not(:disabled){transform:translateY(-1px);}&:focus{animation:", euiButtonFocusAnimation, " ", euiTheme.animation.normal, " ", euiTheme.animation.bounce, ";}&:active:not(:disabled){transform:translateY(1px);}};label:focusCSS;");
|
|
138
179
|
// Remove the auto-generated label.
|
|
139
180
|
// We could typically avoid a label by using a plain string `` instead of css``,
|
|
140
181
|
// but we need css`` for keyframes`` to work for the focus animation
|
|
@@ -146,27 +187,63 @@ var euiButtonFocusCSS = function euiButtonFocusCSS(_ref) {
|
|
|
146
187
|
* Map of `size` props to various sizings/scales
|
|
147
188
|
* that should remain consistent across all buttons
|
|
148
189
|
*/
|
|
149
|
-
export var euiButtonSizeMap = function euiButtonSizeMap(
|
|
150
|
-
var euiTheme =
|
|
190
|
+
export var euiButtonSizeMap = function euiButtonSizeMap(euiThemeContext) {
|
|
191
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
192
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
151
193
|
return {
|
|
152
194
|
xs: {
|
|
195
|
+
minWidth: euiTheme.base * (isRefreshVariant ? 6 : 7),
|
|
153
196
|
height: euiTheme.size.l,
|
|
154
197
|
radius: euiTheme.border.radius.small,
|
|
155
198
|
fontScale: 'xs'
|
|
156
199
|
},
|
|
157
200
|
s: {
|
|
201
|
+
minWidth: euiTheme.base * (isRefreshVariant ? 6 : 7),
|
|
158
202
|
height: euiTheme.size.xl,
|
|
159
203
|
radius: euiTheme.border.radius.small,
|
|
160
204
|
fontScale: 's'
|
|
161
205
|
},
|
|
162
206
|
m: {
|
|
207
|
+
minWidth: euiTheme.base * 7,
|
|
163
208
|
height: euiTheme.size.xxl,
|
|
164
|
-
radius: euiTheme.border.radius.medium,
|
|
209
|
+
radius: isRefreshVariant ? euiTheme.border.radius.small : euiTheme.border.radius.medium,
|
|
165
210
|
fontScale: 's'
|
|
166
211
|
}
|
|
167
212
|
};
|
|
168
213
|
};
|
|
169
214
|
|
|
215
|
+
/**
|
|
216
|
+
* internal styles util for applying button background color on hover
|
|
217
|
+
*/
|
|
218
|
+
var _interactionStyles = function _interactionStyles(euiThemeContext, buttonColors) {
|
|
219
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'fill';
|
|
220
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
221
|
+
if (!isRefreshVariant) return "";
|
|
222
|
+
var baseStyles = function baseStyles() {
|
|
223
|
+
// button hover is applied as pseudo element with a transparent background-color
|
|
224
|
+
if (type === 'overlay') {
|
|
225
|
+
return "\n position: relative;\n overflow: hidden;\n\n &:hover:not(:disabled) {\n &::before {\n content: '';\n position: absolute;\n /* should stay under the content */\n z-index: 0;\n inset: 0;\n background-color: ".concat(buttonColors.backgroundHover, ";\n pointer-events: none;\n }\n }\n\n &:active:not(:disabled) {\n &::before {\n ").concat(logicalCSS('width', '100%'), "\n ").concat(logicalCSS('height', '100%'), "\n\n content: '';\n position: absolute;\n inset: 0;\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n }\n ");
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// button hover is applied as opaque color
|
|
229
|
+
return "\n &:hover:not(:disabled) {\n background-color: ".concat(buttonColors.backgroundHover, ";\n }\n\n &:active:not(:disabled) {\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n ");
|
|
230
|
+
};
|
|
231
|
+
return " \n ".concat(highContrastModeStyles(euiThemeContext, {
|
|
232
|
+
none: baseStyles(),
|
|
233
|
+
forced: "\n position: relative;\n overflow: hidden;\n\n ".concat(highContrastHoverIndicatorStyles(euiThemeContext), "\n ")
|
|
234
|
+
}), "\n ");
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* creates a bottom border on hover/focus to ensure a visible change as forced mode removed background colors
|
|
239
|
+
*/
|
|
240
|
+
export var highContrastHoverIndicatorStyles = function highContrastHoverIndicatorStyles(_ref2) {
|
|
241
|
+
var euiTheme = _ref2.euiTheme;
|
|
242
|
+
return "\n &:hover:not(:disabled) {\n transition: none;\n\n /* using pseudo border to be able to control the color */\n &::after {\n content: '';\n position: absolute;\n inset: ".concat(euiTheme.border.width.thin, ";\n border: ").concat(euiTheme.border.width.thick, " solid var(--highContrastHoverIndicatorColor, ").concat(euiTheme.border.color, ");\n border-radius: ").concat(mathWithUnits(euiTheme.border.radius.small, function (x) {
|
|
243
|
+
return x / 2;
|
|
244
|
+
}), ";\n background-color: transparent;\n pointer-events: none;\n }\n }\n");
|
|
245
|
+
};
|
|
246
|
+
|
|
170
247
|
/**
|
|
171
248
|
* Internal util for high contrast button borders
|
|
172
249
|
*/
|
|
@@ -4,6 +4,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
13
|
/*
|
|
8
14
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
15
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -13,9 +19,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
13
19
|
*/
|
|
14
20
|
|
|
15
21
|
import { css } from '@emotion/react';
|
|
16
|
-
import { useEuiMemoizedStyles } from '../../services';
|
|
17
22
|
import { getTokenName } from '@elastic/eui-theme-common';
|
|
18
|
-
|
|
23
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
24
|
+
import { SEVERITY_COLORS } from './_button';
|
|
25
|
+
export var BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'].concat(_toConsumableArray(SEVERITY_COLORS));
|
|
19
26
|
/**
|
|
20
27
|
* @deprecated - use background tokens directly
|
|
21
28
|
* @returns A single background color with optional alpha transparency
|
|
@@ -12,4 +12,5 @@ export { EuiThemeProvider } from './provider';
|
|
|
12
12
|
export { useEuiMemoizedStyles, withEuiStylesMemoizer, RenderWithEuiStylesMemoizer } from './style_memoization';
|
|
13
13
|
export { getEuiDevProviderWarning, setEuiDevProviderWarning } from './warning';
|
|
14
14
|
export { buildTheme, computed, isInverseColorMode, getColorMode, getComputed, getOn, mergeDeep, setOn, Computed } from './utils';
|
|
15
|
-
export { COLOR_MODES_STANDARD } from './types';
|
|
15
|
+
export { COLOR_MODES_STANDARD } from './types';
|
|
16
|
+
export * from './theme_variant';
|
|
@@ -143,9 +143,35 @@ export var EuiThemeProvider = function EuiThemeProvider(_ref) {
|
|
|
143
143
|
}, [highContrastMode]);
|
|
144
144
|
useEffect(function () {
|
|
145
145
|
if (!isParentTheme.current) {
|
|
146
|
-
|
|
146
|
+
/* Enables recomputation of component colors when flags are overridden on the provider
|
|
147
|
+
by adding the respective key to modifications to trigger a recomputation. */
|
|
148
|
+
// TODO: remove once visual refresh is completed and flags are obsolete
|
|
149
|
+
var flagsToRecompute = [{
|
|
150
|
+
flag: 'buttonVariant',
|
|
151
|
+
componentKey: 'buttons'
|
|
152
|
+
}];
|
|
153
|
+
var keys = {};
|
|
154
|
+
var forceRecomputeComponents = flagsToRecompute.some(function (item) {
|
|
155
|
+
var _modifications$flags, _modifications$compon;
|
|
156
|
+
if (Object.keys((_modifications$flags = modifications.flags) !== null && _modifications$flags !== void 0 ? _modifications$flags : {}).includes(item.flag) && !Object.keys((_modifications$compon = modifications.components) !== null && _modifications$compon !== void 0 ? _modifications$compon : {}).includes(item.componentKey)) {
|
|
157
|
+
keys[item.componentKey] = {
|
|
158
|
+
LIGHT: {},
|
|
159
|
+
DARK: {}
|
|
160
|
+
};
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
return false;
|
|
164
|
+
});
|
|
165
|
+
var componentModifications = forceRecomputeComponents ? {
|
|
166
|
+
components: keys
|
|
167
|
+
} : {};
|
|
168
|
+
|
|
169
|
+
// force recomputing of color & component tokens based on flag changes
|
|
170
|
+
var enhancedModifications = _objectSpread(_objectSpread({}, modificationsWithHighContrast), componentModifications);
|
|
171
|
+
var rebuiltTheme = getComputed(system, buildTheme(enhancedModifications, "_".concat(system.key)), colorMode, highContrastMode);
|
|
172
|
+
setTheme(rebuiltTheme);
|
|
147
173
|
}
|
|
148
|
-
}, [colorMode, highContrastMode, system, modificationsWithHighContrast]);
|
|
174
|
+
}, [colorMode, highContrastMode, system, modificationsWithHighContrast, modifications]);
|
|
149
175
|
var _useState9 = useState(),
|
|
150
176
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
151
177
|
themeCSSVariables = _useState10[0],
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useEuiTheme } from './hooks';
|
|
10
|
+
export var isEuiThemeRefreshVariant = function isEuiThemeRefreshVariant(_ref, flag) {
|
|
11
|
+
var euiTheme = _ref.euiTheme;
|
|
12
|
+
return euiTheme.flags[flag] === 'refresh';
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Util to retrieve visual variant for UI elements
|
|
17
|
+
* Note: Temporary only - will be removed once the visual refresh is completed.
|
|
18
|
+
*/
|
|
19
|
+
export var useEuiThemeRefreshVariant = function useEuiThemeRefreshVariant(flag) {
|
|
20
|
+
var euiThemeContext = useEuiTheme();
|
|
21
|
+
return isEuiThemeRefreshVariant(euiThemeContext, flag);
|
|
22
|
+
};
|
package/es/test/index.d.ts
CHANGED
|
@@ -24,7 +24,8 @@ declare module '@elastic/eui/es/test/take_mounted_snapshot' {
|
|
|
24
24
|
|
|
25
25
|
}
|
|
26
26
|
declare module '@elastic/eui/es/test/find_test_subject' {
|
|
27
|
-
import { ReactWrapper, ShallowWrapper } from 'enzyme'; const MATCHERS: readonly ["=", "~=", "|=", "^=", "$=", "*="];
|
|
27
|
+
import { ReactWrapper, ShallowWrapper } from 'enzyme'; const MATCHERS: readonly ["=", "~=", "|=", "^=", "$=", "*="];
|
|
28
|
+
type FindTestSubject<T extends ShallowWrapper | ReactWrapper> = (mountedComponent: T, testSubjectSelector: string, matcher?: (typeof MATCHERS)[number]) => ReturnType<T['find']>;
|
|
28
29
|
export const findTestSubject: FindTestSubject<ShallowWrapper<any> | ReactWrapper<any>>;
|
|
29
30
|
export {};
|
|
30
31
|
|