@elastic/eui 99.4.0 → 100.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/{eui_theme_dark.json → eui_theme_amsterdam_dark.json} +177 -65
- package/dist/{eui_theme_light.json.d.ts → eui_theme_amsterdam_dark.json.d.ts} +178 -66
- package/dist/{eui_theme_light.json → eui_theme_amsterdam_light.json} +177 -65
- package/dist/eui_theme_amsterdam_light.json.d.ts +425 -0
- package/dist/eui_theme_borealis_dark.json +422 -0
- package/dist/{eui_theme_dark.json.d.ts → eui_theme_borealis_dark.json.d.ts} +178 -66
- package/dist/eui_theme_borealis_light.json +422 -0
- package/dist/eui_theme_borealis_light.json.d.ts +425 -0
- package/es/components/avatar/avatar.js +4 -4
- package/es/components/badge/badge.styles.js +1 -2
- package/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/es/components/badge/color_utils.js +9 -8
- package/es/components/beacon/beacon.styles.js +2 -2
- package/es/components/bottom_bar/bottom_bar.styles.js +2 -3
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/es/components/button/button.js +1 -1
- package/es/components/button/button_display/_button_display.styles.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group_button.js +1 -1
- package/es/components/button/button_group/button_group_button.styles.js +6 -6
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/button/button_icon/button_icon.styles.js +1 -1
- package/es/components/call_out/call_out.styles.js +4 -4
- package/es/components/card/card.js +1 -1
- package/es/components/card/card.styles.js +6 -3
- package/es/components/code/code_block_annotations.js +1 -1
- package/es/components/code/code_block_line.styles.js +1 -2
- package/es/components/code/code_syntax.styles.js +24 -28
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/es/components/color_picker/color_picker.js +4 -3
- package/es/components/color_picker/color_picker.styles.js +1 -2
- package/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/es/components/combo_box/combo_box.js +11 -1
- package/es/components/comment_list/comment.js +1 -1
- package/es/components/comment_list/comment_event.js +5 -4
- package/es/components/comment_list/comment_list.js +1 -1
- package/es/components/common.js +0 -28
- package/es/components/datagrid/data_grid.styles.js +6 -7
- package/es/components/date_picker/date_picker.styles.js +1 -1
- package/es/components/date_picker/date_picker_range.styles.js +1 -1
- package/es/components/date_picker/react_date_picker.styles.js +2 -1
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -5
- package/es/components/drag_and_drop/droppable.styles.js +2 -4
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/empty_prompt/empty_prompt.styles.js +6 -2
- package/es/components/expression/expression.styles.js +13 -13
- package/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/es/components/flyout/_flyout_close_button.styles.js +2 -3
- package/es/components/flyout/flyout.js +1 -1
- package/es/components/flyout/flyout.styles.js +8 -3
- package/es/components/flyout/flyout_footer.styles.js +1 -1
- package/es/components/form/form.styles.js +24 -32
- package/es/components/form/range/range_tooltip.styles.js +11 -13
- package/es/components/form/switch/switch.js +3 -7
- package/es/components/form/switch/switch.styles.js +16 -19
- package/es/components/header/header.styles.js +7 -8
- package/es/components/icon/icon.styles.js +9 -8
- package/es/components/icon/named_colors.js +1 -1
- package/es/components/image/image.styles.js +1 -1
- package/es/components/image/image_button.styles.js +1 -1
- package/es/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/es/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
- package/es/components/link/link.styles.js +6 -6
- package/es/components/list_group/list_group_item.styles.js +9 -11
- package/es/components/loading/loading_chart.styles.js +18 -5
- package/es/components/loading/loading_spinner.styles.js +2 -2
- package/es/components/mark/mark.styles.js +2 -9
- package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/es/components/modal/modal.styles.js +2 -2
- package/es/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/es/components/page_template/inner/page_inner.styles.js +3 -3
- package/es/components/pagination/pagination.styles.js +2 -2
- package/es/components/panel/panel.js +1 -1
- package/es/components/panel/panel.styles.js +3 -2
- package/es/components/panel/split_panel/split_panel.js +1 -1
- package/es/components/popover/popover.js +1 -1
- package/es/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/es/components/popover/popover_arrow/_popover_arrow.styles.js +18 -13
- package/es/components/popover/popover_footer.styles.js +1 -1
- package/es/components/popover/popover_panel/_popover_panel.styles.js +7 -6
- package/es/components/progress/progress.js +1 -1
- package/es/components/progress/progress.styles.js +30 -28
- package/es/components/provider/provider.js +2 -2
- package/es/components/resizable_container/resizable_collapse_button.styles.js +1 -1
- package/es/components/resizable_container/resizable_panel.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
- package/es/components/side_nav/side_nav_item.styles.js +6 -7
- package/es/components/skeleton/utils.js +5 -7
- package/es/components/stat/stat.styles.js +5 -5
- package/es/components/steps/step_number.styles.js +1 -1
- package/es/components/table/table_cells_shared.styles.js +3 -8
- package/es/components/table/table_row.styles.js +9 -11
- package/es/components/tabs/tab.styles.js +2 -2
- package/es/components/text/text.styles.js +2 -2
- package/es/components/text/text_color.js +1 -1
- package/es/components/text/text_color.styles.js +6 -5
- package/es/components/text_diff/text_diff.styles.js +1 -1
- package/es/components/toast/toast.styles.js +2 -2
- package/es/components/token/token.js +10 -4
- package/es/components/token/token.styles.js +14 -5
- package/es/components/token/token_map.js +243 -1
- package/es/components/tool_tip/tool_tip.styles.js +13 -25
- package/es/components/tour/_tour_footer.styles.js +2 -4
- package/es/components/tour/tour.styles.js +8 -12
- package/es/components/tree_view/tree_view_item.styles.js +1 -2
- package/es/global_styling/functions/math.js +1 -49
- package/es/global_styling/functions/size.js +1 -17
- package/es/global_styling/mixins/_button.js +159 -0
- package/es/global_styling/mixins/_color.js +39 -31
- package/es/global_styling/mixins/_shadow.js +31 -0
- package/es/global_styling/mixins/index.js +3 -1
- package/es/global_styling/reset/global_styles.js +3 -3
- package/es/global_styling/variables/animations.js +1 -22
- package/es/global_styling/variables/breakpoint.js +1 -7
- package/es/global_styling/variables/levels.js +1 -17
- package/es/global_styling/variables/shadow.js +1 -11
- package/es/global_styling/variables/size.js +1 -1
- package/es/global_styling/variables/typography.js +1 -32
- package/es/services/color/eui_palettes.js +148 -54
- package/es/services/color/eui_palettes_hooks.js +74 -0
- package/es/services/color/index.js +2 -0
- package/es/services/color/vis_color_store.js +13 -0
- package/es/services/index.js +2 -1
- package/es/services/popover/index.js +4 -1
- package/es/services/popover/popover_arrow.styles.js +31 -0
- package/es/services/popover/popover_positioning.js +6 -17
- package/es/services/theme/context.js +3 -3
- package/es/services/theme/provider.js +15 -2
- package/es/services/theme/types.js +1 -6
- package/es/services/theme/utils.js +1 -303
- package/es/themes/amsterdam/global_styling/functions/shadows.js +1 -10
- package/es/themes/amsterdam/global_styling/mixins/button.js +1 -203
- package/es/themes/amsterdam/global_styling/mixins/shadow.js +1 -146
- package/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/es/themes/amsterdam/global_styling/variables/_breakpoint.js +1 -7
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +281 -0
- package/es/themes/amsterdam/global_styling/variables/_colors.js +612 -19
- package/es/themes/amsterdam/global_styling/variables/_colors_vis.js +133 -0
- package/es/themes/amsterdam/global_styling/variables/_components.js +619 -0
- package/es/themes/amsterdam/global_styling/variables/_forms.js +161 -0
- package/es/themes/amsterdam/theme.js +7 -1
- package/es/themes/index.js +1 -2
- package/es/themes/themes.js +1 -21
- package/eui.d.ts +2726 -3183
- package/lib/components/avatar/avatar.js +2 -2
- package/lib/components/badge/badge.styles.js +1 -2
- package/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/lib/components/badge/color_utils.js +14 -13
- package/lib/components/beacon/beacon.styles.js +2 -2
- package/lib/components/bottom_bar/bottom_bar.styles.js +2 -3
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/lib/components/button/button.js +1 -1
- package/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +1 -1
- package/lib/components/button/button_group/button_group_button.styles.js +5 -5
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/button/button_icon/button_icon.styles.js +1 -1
- package/lib/components/call_out/call_out.styles.js +4 -4
- package/lib/components/card/card.js +1 -1
- package/lib/components/card/card.styles.js +5 -2
- package/lib/components/code/code_block_annotations.js +1 -1
- package/lib/components/code/code_block_line.styles.js +1 -2
- package/lib/components/code/code_syntax.styles.js +24 -28
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/lib/components/color_picker/color_picker.js +3 -2
- package/lib/components/color_picker/color_picker.styles.js +1 -2
- package/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/lib/components/combo_box/combo_box.js +11 -1
- package/lib/components/comment_list/comment.js +1 -1
- package/lib/components/comment_list/comment_event.js +5 -4
- package/lib/components/comment_list/comment_list.js +1 -1
- package/lib/components/common.js +0 -28
- package/lib/components/datagrid/data_grid.styles.js +6 -7
- package/lib/components/date_picker/date_picker.styles.js +2 -2
- package/lib/components/date_picker/date_picker_range.styles.js +2 -2
- package/lib/components/date_picker/react_date_picker.styles.js +3 -2
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
- package/lib/components/drag_and_drop/droppable.styles.js +2 -4
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/lib/components/expression/expression.styles.js +13 -13
- package/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/lib/components/flyout/_flyout_close_button.styles.js +3 -4
- package/lib/components/flyout/flyout.js +1 -1
- package/lib/components/flyout/flyout.styles.js +8 -3
- package/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/lib/components/form/form.styles.js +23 -31
- package/lib/components/form/range/range_tooltip.styles.js +11 -13
- package/lib/components/form/switch/switch.js +3 -7
- package/lib/components/form/switch/switch.styles.js +16 -19
- package/lib/components/header/header.styles.js +7 -8
- package/lib/components/icon/icon.styles.js +9 -8
- package/lib/components/icon/named_colors.js +1 -1
- package/lib/components/icon/svgs/aggregate.svg +0 -0
- package/lib/components/icon/svgs/color.svg +0 -0
- package/lib/components/icon/svgs/continuityAbove.svg +0 -0
- package/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
- package/lib/components/icon/svgs/continuityBelow.svg +0 -0
- package/lib/components/icon/svgs/continuityWithin.svg +0 -0
- package/lib/components/icon/svgs/documentation.svg +0 -0
- package/lib/components/icon/svgs/eraser.svg +0 -0
- package/lib/components/icon/svgs/folder_check.svg +0 -0
- package/lib/components/icon/svgs/folder_closed.svg +0 -0
- package/lib/components/icon/svgs/folder_exclamation.svg +0 -0
- package/lib/components/icon/svgs/folder_open.svg +0 -0
- package/lib/components/icon/svgs/fullScreenExit.svg +0 -0
- package/lib/components/icon/svgs/function.svg +0 -0
- package/lib/components/icon/svgs/layers.svg +0 -0
- package/lib/components/icon/svgs/menu.svg +0 -0
- package/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
- package/lib/components/icon/svgs/pageSelect.svg +0 -0
- package/lib/components/icon/svgs/pagesSelect.svg +0 -0
- package/lib/components/icon/svgs/percent.svg +0 -0
- package/lib/components/icon/svgs/push.svg +0 -0
- package/lib/components/icon/svgs/quote.svg +0 -0
- package/lib/components/icon/svgs/reporter.svg +0 -0
- package/lib/components/icon/svgs/securitySignal.svg +0 -0
- package/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
- package/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
- package/lib/components/icon/svgs/timeline.svg +0 -0
- package/lib/components/icon/svgs/users.svg +0 -0
- package/lib/components/icon/svgs/wordWrap.svg +0 -0
- package/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
- package/lib/components/image/image.styles.js +2 -2
- package/lib/components/image/image_button.styles.js +3 -3
- package/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
- package/lib/components/link/link.styles.js +6 -6
- package/lib/components/list_group/list_group_item.styles.js +8 -10
- package/lib/components/loading/loading_chart.styles.js +18 -5
- package/lib/components/loading/loading_spinner.styles.js +2 -2
- package/lib/components/mark/mark.styles.js +2 -9
- package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/lib/components/markdown_editor/markdown_format.styles.js +2 -2
- package/lib/components/modal/modal.styles.js +3 -3
- package/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/lib/components/page_template/inner/page_inner.styles.js +2 -2
- package/lib/components/pagination/pagination.styles.js +2 -2
- package/lib/components/panel/panel.js +1 -1
- package/lib/components/panel/panel.styles.js +4 -3
- package/lib/components/panel/split_panel/split_panel.js +1 -1
- package/lib/components/popover/popover.js +1 -1
- package/lib/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/lib/components/popover/popover_arrow/_popover_arrow.styles.js +18 -15
- package/lib/components/popover/popover_footer.styles.js +1 -1
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +10 -9
- package/lib/components/progress/progress.js +1 -1
- package/lib/components/progress/progress.styles.js +29 -27
- package/lib/components/provider/provider.js +2 -2
- package/lib/components/resizable_container/resizable_collapse_button.styles.js +2 -2
- package/lib/components/resizable_container/resizable_panel.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
- package/lib/components/side_nav/side_nav_item.styles.js +6 -7
- package/lib/components/skeleton/utils.js +4 -6
- package/lib/components/stat/stat.styles.js +5 -5
- package/lib/components/steps/step_number.styles.js +1 -1
- package/lib/components/table/table_cells_shared.styles.js +3 -8
- package/lib/components/table/table_row.styles.js +8 -10
- package/lib/components/tabs/tab.styles.js +2 -2
- package/lib/components/text/text.styles.js +1 -1
- package/lib/components/text/text_color.js +1 -1
- package/lib/components/text/text_color.styles.js +6 -5
- package/lib/components/text_diff/text_diff.styles.js +1 -1
- package/lib/components/toast/toast.styles.js +2 -2
- package/lib/components/token/token.js +12 -4
- package/lib/components/token/token.styles.js +14 -5
- package/lib/components/token/token_map.js +244 -2
- package/lib/components/tool_tip/tool_tip.styles.js +12 -24
- package/lib/components/tour/_tour_footer.styles.js +2 -4
- package/lib/components/tour/tour.styles.js +8 -12
- package/lib/components/tree_view/tree_view_item.styles.js +1 -2
- package/lib/global_styling/functions/math.js +7 -58
- package/lib/global_styling/functions/size.js +7 -26
- package/lib/global_styling/mixins/_button.js +164 -0
- package/lib/global_styling/mixins/_color.js +38 -30
- package/lib/global_styling/mixins/_shadow.js +84 -0
- package/lib/global_styling/mixins/index.js +22 -0
- package/lib/global_styling/reset/global_styles.js +2 -2
- package/lib/global_styling/variables/animations.js +25 -31
- package/lib/global_styling/variables/breakpoint.js +7 -16
- package/lib/global_styling/variables/levels.js +7 -26
- package/lib/global_styling/variables/shadow.js +13 -20
- package/lib/global_styling/variables/size.js +7 -10
- package/lib/global_styling/variables/typography.js +19 -41
- package/lib/services/color/eui_palettes.js +148 -54
- package/lib/services/color/eui_palettes_hooks.js +78 -0
- package/lib/services/color/index.js +20 -0
- package/lib/services/color/vis_color_store.js +18 -0
- package/lib/services/index.js +19 -0
- package/lib/services/popover/index.js +8 -1
- package/lib/services/popover/popover_arrow.styles.js +37 -0
- package/lib/services/popover/popover_positioning.js +6 -17
- package/lib/services/theme/context.js +3 -3
- package/lib/services/theme/provider.js +15 -2
- package/lib/services/theme/types.js +13 -14
- package/lib/services/theme/utils.js +54 -303
- package/lib/themes/amsterdam/global_styling/functions/shadows.js +7 -19
- package/lib/themes/amsterdam/global_styling/mixins/button.js +45 -206
- package/lib/themes/amsterdam/global_styling/mixins/shadow.js +10 -154
- package/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/lib/themes/amsterdam/global_styling/variables/_breakpoint.js +7 -16
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +285 -0
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +616 -24
- package/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
- package/lib/themes/amsterdam/global_styling/variables/_components.js +623 -0
- package/lib/themes/amsterdam/global_styling/variables/_forms.js +165 -0
- package/lib/themes/amsterdam/theme.js +7 -1
- package/lib/themes/index.js +4 -11
- package/lib/themes/themes.js +1 -23
- package/optimize/es/components/avatar/avatar.js +4 -4
- package/optimize/es/components/badge/badge.styles.js +1 -2
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/optimize/es/components/badge/color_utils.js +9 -8
- package/optimize/es/components/beacon/beacon.styles.js +2 -2
- package/optimize/es/components/bottom_bar/bottom_bar.styles.js +2 -3
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/optimize/es/components/button/button.js +1 -1
- package/optimize/es/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/es/components/button/button_empty/button_empty.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.styles.js +6 -6
- package/optimize/es/components/button/button_icon/button_icon.js +1 -1
- package/optimize/es/components/button/button_icon/button_icon.styles.js +1 -1
- package/optimize/es/components/call_out/call_out.styles.js +4 -4
- package/optimize/es/components/card/card.styles.js +6 -3
- package/optimize/es/components/code/code_block_annotations.js +1 -1
- package/optimize/es/components/code/code_block_line.styles.js +1 -2
- package/optimize/es/components/code/code_syntax.styles.js +24 -28
- package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/optimize/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/optimize/es/components/color_picker/color_picker.js +4 -3
- package/optimize/es/components/color_picker/color_picker.styles.js +1 -2
- package/optimize/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/es/components/combo_box/combo_box.js +6 -1
- package/optimize/es/components/comment_list/comment_event.js +4 -3
- package/optimize/es/components/common.js +0 -28
- package/optimize/es/components/datagrid/data_grid.styles.js +6 -7
- package/optimize/es/components/date_picker/date_picker.styles.js +1 -1
- package/optimize/es/components/date_picker/date_picker_range.styles.js +1 -1
- package/optimize/es/components/date_picker/react_date_picker.styles.js +2 -1
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +4 -5
- package/optimize/es/components/drag_and_drop/droppable.styles.js +2 -4
- package/optimize/es/components/empty_prompt/empty_prompt.styles.js +6 -2
- package/optimize/es/components/expression/expression.styles.js +13 -13
- package/optimize/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/es/components/flyout/_flyout_close_button.styles.js +2 -3
- package/optimize/es/components/flyout/flyout.js +1 -1
- package/optimize/es/components/flyout/flyout.styles.js +8 -3
- package/optimize/es/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/es/components/form/form.styles.js +24 -32
- package/optimize/es/components/form/range/range_tooltip.styles.js +11 -13
- package/optimize/es/components/form/switch/switch.js +3 -2
- package/optimize/es/components/form/switch/switch.styles.js +16 -19
- package/optimize/es/components/header/header.styles.js +7 -8
- package/optimize/es/components/icon/icon.styles.js +9 -8
- package/optimize/es/components/icon/named_colors.js +1 -1
- package/optimize/es/components/image/image.styles.js +1 -1
- package/optimize/es/components/image/image_button.styles.js +1 -1
- package/optimize/es/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
- package/optimize/es/components/link/link.styles.js +6 -6
- package/optimize/es/components/list_group/list_group_item.styles.js +9 -11
- package/optimize/es/components/loading/loading_chart.styles.js +13 -5
- package/optimize/es/components/loading/loading_spinner.styles.js +2 -2
- package/optimize/es/components/mark/mark.styles.js +2 -9
- package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/es/components/modal/modal.styles.js +2 -2
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/optimize/es/components/page_template/inner/page_inner.styles.js +3 -3
- package/optimize/es/components/pagination/pagination.styles.js +2 -2
- package/optimize/es/components/panel/panel.styles.js +3 -2
- package/optimize/es/components/popover/popover.js +1 -1
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.styles.js +15 -13
- package/optimize/es/components/popover/popover_footer.styles.js +1 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +7 -6
- package/optimize/es/components/progress/progress.js +1 -1
- package/optimize/es/components/progress/progress.styles.js +30 -28
- package/optimize/es/components/provider/provider.js +2 -2
- package/optimize/es/components/resizable_container/resizable_collapse_button.styles.js +1 -1
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
- package/optimize/es/components/side_nav/side_nav_item.styles.js +6 -7
- package/optimize/es/components/skeleton/utils.js +5 -7
- package/optimize/es/components/stat/stat.styles.js +5 -5
- package/optimize/es/components/steps/step_number.styles.js +1 -1
- package/optimize/es/components/table/table_cells_shared.styles.js +3 -8
- package/optimize/es/components/table/table_row.styles.js +9 -11
- package/optimize/es/components/tabs/tab.styles.js +2 -2
- package/optimize/es/components/text/text.styles.js +2 -2
- package/optimize/es/components/text/text_color.js +1 -1
- package/optimize/es/components/text/text_color.styles.js +6 -5
- package/optimize/es/components/text_diff/text_diff.styles.js +1 -1
- package/optimize/es/components/toast/toast.styles.js +2 -2
- package/optimize/es/components/token/token.js +10 -4
- package/optimize/es/components/token/token.styles.js +14 -5
- package/optimize/es/components/token/token_map.js +243 -1
- package/optimize/es/components/tool_tip/tool_tip.styles.js +13 -25
- package/optimize/es/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/es/components/tour/tour.styles.js +8 -12
- package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -2
- package/optimize/es/global_styling/functions/math.js +1 -49
- package/optimize/es/global_styling/functions/size.js +1 -17
- package/optimize/es/global_styling/mixins/_button.js +159 -0
- package/optimize/es/global_styling/mixins/_color.js +39 -31
- package/optimize/es/global_styling/mixins/_shadow.js +31 -0
- package/optimize/es/global_styling/mixins/index.js +3 -1
- package/optimize/es/global_styling/reset/global_styles.js +3 -3
- package/optimize/es/global_styling/variables/animations.js +1 -22
- package/optimize/es/global_styling/variables/breakpoint.js +1 -7
- package/optimize/es/global_styling/variables/levels.js +1 -17
- package/optimize/es/global_styling/variables/shadow.js +1 -11
- package/optimize/es/global_styling/variables/size.js +1 -1
- package/optimize/es/global_styling/variables/typography.js +1 -32
- package/optimize/es/services/color/eui_palettes.js +148 -54
- package/optimize/es/services/color/eui_palettes_hooks.js +71 -0
- package/optimize/es/services/color/index.js +2 -0
- package/optimize/es/services/color/vis_color_store.js +13 -0
- package/optimize/es/services/index.js +2 -1
- package/optimize/es/services/popover/index.js +4 -1
- package/optimize/es/services/popover/popover_arrow.styles.js +31 -0
- package/optimize/es/services/popover/popover_positioning.js +6 -17
- package/optimize/es/services/theme/context.js +3 -3
- package/optimize/es/services/theme/provider.js +15 -2
- package/optimize/es/services/theme/types.js +1 -6
- package/optimize/es/services/theme/utils.js +1 -295
- package/optimize/es/themes/amsterdam/global_styling/functions/shadows.js +1 -10
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +1 -198
- package/optimize/es/themes/amsterdam/global_styling/mixins/shadow.js +1 -146
- package/optimize/es/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/es/themes/amsterdam/global_styling/variables/_breakpoint.js +1 -7
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +270 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +612 -19
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors_vis.js +133 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +611 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +153 -0
- package/optimize/es/themes/amsterdam/theme.js +7 -1
- package/optimize/es/themes/index.js +1 -2
- package/optimize/es/themes/themes.js +1 -21
- package/optimize/lib/components/avatar/avatar.js +2 -2
- package/optimize/lib/components/badge/badge.styles.js +1 -2
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/optimize/lib/components/badge/color_utils.js +14 -13
- package/optimize/lib/components/beacon/beacon.styles.js +2 -2
- package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +2 -3
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/optimize/lib/components/button/button.js +1 -1
- package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/lib/components/button/button_empty/button_empty.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +5 -5
- package/optimize/lib/components/button/button_icon/button_icon.js +1 -1
- package/optimize/lib/components/button/button_icon/button_icon.styles.js +1 -1
- package/optimize/lib/components/call_out/call_out.styles.js +4 -4
- package/optimize/lib/components/card/card.styles.js +5 -2
- package/optimize/lib/components/code/code_block_annotations.js +1 -1
- package/optimize/lib/components/code/code_block_line.styles.js +1 -2
- package/optimize/lib/components/code/code_syntax.styles.js +24 -28
- package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/optimize/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/optimize/lib/components/color_picker/color_picker.js +3 -2
- package/optimize/lib/components/color_picker/color_picker.styles.js +1 -2
- package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/optimize/lib/components/combo_box/combo_box.js +6 -1
- package/optimize/lib/components/comment_list/comment_event.js +4 -3
- package/optimize/lib/components/common.js +0 -28
- package/optimize/lib/components/datagrid/data_grid.styles.js +6 -7
- package/optimize/lib/components/date_picker/date_picker.styles.js +2 -2
- package/optimize/lib/components/date_picker/date_picker_range.styles.js +2 -2
- package/optimize/lib/components/date_picker/react_date_picker.styles.js +3 -2
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
- package/optimize/lib/components/drag_and_drop/droppable.styles.js +2 -4
- package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/optimize/lib/components/expression/expression.styles.js +13 -13
- package/optimize/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/lib/components/flyout/_flyout_close_button.styles.js +3 -4
- package/optimize/lib/components/flyout/flyout.js +1 -1
- package/optimize/lib/components/flyout/flyout.styles.js +8 -3
- package/optimize/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/lib/components/form/form.styles.js +23 -31
- package/optimize/lib/components/form/range/range_tooltip.styles.js +11 -13
- package/optimize/lib/components/form/switch/switch.js +3 -2
- package/optimize/lib/components/form/switch/switch.styles.js +16 -19
- package/optimize/lib/components/header/header.styles.js +7 -8
- package/optimize/lib/components/icon/icon.styles.js +9 -8
- package/optimize/lib/components/icon/named_colors.js +1 -1
- package/optimize/lib/components/icon/svgs/aggregate.svg +0 -0
- package/optimize/lib/components/icon/svgs/color.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityAbove.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityBelow.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityWithin.svg +0 -0
- package/optimize/lib/components/icon/svgs/documentation.svg +0 -0
- package/optimize/lib/components/icon/svgs/eraser.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_check.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_closed.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_exclamation.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_open.svg +0 -0
- package/optimize/lib/components/icon/svgs/fullScreenExit.svg +0 -0
- package/optimize/lib/components/icon/svgs/function.svg +0 -0
- package/optimize/lib/components/icon/svgs/layers.svg +0 -0
- package/optimize/lib/components/icon/svgs/menu.svg +0 -0
- package/optimize/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
- package/optimize/lib/components/icon/svgs/pageSelect.svg +0 -0
- package/optimize/lib/components/icon/svgs/pagesSelect.svg +0 -0
- package/optimize/lib/components/icon/svgs/percent.svg +0 -0
- package/optimize/lib/components/icon/svgs/push.svg +0 -0
- package/optimize/lib/components/icon/svgs/quote.svg +0 -0
- package/optimize/lib/components/icon/svgs/reporter.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignal.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
- package/optimize/lib/components/icon/svgs/timeline.svg +0 -0
- package/optimize/lib/components/icon/svgs/users.svg +0 -0
- package/optimize/lib/components/icon/svgs/wordWrap.svg +0 -0
- package/optimize/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
- package/optimize/lib/components/image/image.styles.js +2 -2
- package/optimize/lib/components/image/image_button.styles.js +3 -3
- package/optimize/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
- package/optimize/lib/components/link/link.styles.js +6 -6
- package/optimize/lib/components/list_group/list_group_item.styles.js +8 -10
- package/optimize/lib/components/loading/loading_chart.styles.js +13 -5
- package/optimize/lib/components/loading/loading_spinner.styles.js +2 -2
- package/optimize/lib/components/mark/mark.styles.js +2 -9
- package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/lib/components/modal/modal.styles.js +3 -3
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/optimize/lib/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/lib/components/pagination/pagination.styles.js +2 -2
- package/optimize/lib/components/panel/panel.styles.js +4 -3
- package/optimize/lib/components/popover/popover.js +1 -1
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
- package/optimize/lib/components/popover/popover_footer.styles.js +1 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +10 -9
- package/optimize/lib/components/progress/progress.js +1 -1
- package/optimize/lib/components/progress/progress.styles.js +29 -27
- package/optimize/lib/components/provider/provider.js +2 -2
- package/optimize/lib/components/resizable_container/resizable_collapse_button.styles.js +2 -2
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
- package/optimize/lib/components/side_nav/side_nav_item.styles.js +6 -7
- package/optimize/lib/components/skeleton/utils.js +4 -6
- package/optimize/lib/components/stat/stat.styles.js +5 -5
- package/optimize/lib/components/steps/step_number.styles.js +1 -1
- package/optimize/lib/components/table/table_cells_shared.styles.js +3 -8
- package/optimize/lib/components/table/table_row.styles.js +8 -10
- package/optimize/lib/components/tabs/tab.styles.js +2 -2
- package/optimize/lib/components/text/text.styles.js +1 -1
- package/optimize/lib/components/text/text_color.js +1 -1
- package/optimize/lib/components/text/text_color.styles.js +6 -5
- package/optimize/lib/components/text_diff/text_diff.styles.js +1 -1
- package/optimize/lib/components/toast/toast.styles.js +2 -2
- package/optimize/lib/components/token/token.js +13 -4
- package/optimize/lib/components/token/token.styles.js +14 -5
- package/optimize/lib/components/token/token_map.js +244 -2
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +12 -24
- package/optimize/lib/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/lib/components/tour/tour.styles.js +8 -12
- package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -2
- package/optimize/lib/global_styling/functions/math.js +7 -59
- package/optimize/lib/global_styling/functions/size.js +7 -27
- package/optimize/lib/global_styling/mixins/_button.js +165 -0
- package/optimize/lib/global_styling/mixins/_color.js +38 -30
- package/optimize/lib/global_styling/mixins/_shadow.js +84 -0
- package/optimize/lib/global_styling/mixins/index.js +22 -0
- package/optimize/lib/global_styling/reset/global_styles.js +2 -2
- package/optimize/lib/global_styling/variables/animations.js +25 -31
- package/optimize/lib/global_styling/variables/breakpoint.js +7 -16
- package/optimize/lib/global_styling/variables/levels.js +7 -26
- package/optimize/lib/global_styling/variables/shadow.js +13 -20
- package/optimize/lib/global_styling/variables/size.js +7 -10
- package/optimize/lib/global_styling/variables/typography.js +19 -41
- package/optimize/lib/services/color/eui_palettes.js +148 -54
- package/optimize/lib/services/color/eui_palettes_hooks.js +76 -0
- package/optimize/lib/services/color/index.js +20 -0
- package/optimize/lib/services/color/vis_color_store.js +18 -0
- package/optimize/lib/services/index.js +19 -0
- package/optimize/lib/services/popover/index.js +8 -1
- package/optimize/lib/services/popover/popover_arrow.styles.js +37 -0
- package/optimize/lib/services/popover/popover_positioning.js +6 -17
- package/optimize/lib/services/theme/context.js +3 -3
- package/optimize/lib/services/theme/provider.js +15 -2
- package/optimize/lib/services/theme/types.js +13 -14
- package/optimize/lib/services/theme/utils.js +54 -296
- package/optimize/lib/themes/amsterdam/global_styling/functions/shadows.js +7 -19
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +45 -203
- package/optimize/lib/themes/amsterdam/global_styling/mixins/shadow.js +10 -154
- package/optimize/lib/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/optimize/lib/themes/amsterdam/global_styling/variables/_breakpoint.js +7 -16
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +616 -24
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +616 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +158 -0
- package/optimize/lib/themes/amsterdam/theme.js +7 -1
- package/optimize/lib/themes/index.js +4 -11
- package/optimize/lib/themes/themes.js +1 -23
- package/package.json +8 -4
- package/src/global_styling/functions/_colors.scss +3 -3
- package/src/global_styling/functions/_index.scss +1 -5
- package/src/global_styling/index.scss +1 -10
- package/src/global_styling/mixins/_shadow.scss +1 -1
- package/src/global_styling/mixins/_typography.scss +2 -2
- package/src/global_styling/variables/_animations.scss +1 -8
- package/src/global_styling/variables/_borders.scss +1 -9
- package/src/global_styling/variables/_buttons.scss +1 -18
- package/src/global_styling/variables/_font_weight.scss +1 -7
- package/src/global_styling/variables/_form.scss +2 -21
- package/src/global_styling/variables/_index.scss +0 -1
- package/src/global_styling/variables/_responsive.scss +1 -9
- package/src/global_styling/variables/_shadows.scss +1 -1
- package/src/global_styling/variables/_size.scss +1 -13
- package/src/global_styling/variables/_states.scss +1 -14
- package/src/global_styling/variables/_typography.scss +1 -75
- package/src/global_styling/variables/_z_index.scss +1 -33
- package/src/themes/amsterdam/_colors_dark.scss +80 -8
- package/src/themes/amsterdam/_colors_light.scss +80 -8
- package/src/themes/amsterdam/global_styling/variables/_forms.scss +12 -0
- package/src/themes/amsterdam/global_styling/variables/_index.scss +2 -0
- package/test-env/components/avatar/avatar.js +2 -2
- package/test-env/components/badge/badge.styles.js +1 -2
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +3 -1
- package/test-env/components/badge/color_utils.js +14 -13
- package/test-env/components/beacon/beacon.styles.js +2 -2
- package/test-env/components/bottom_bar/bottom_bar.styles.js +2 -3
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +5 -7
- package/test-env/components/button/button.js +1 -1
- package/test-env/components/button/button_display/_button_display.styles.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +1 -1
- package/test-env/components/button/button_group/button_group_button.styles.js +5 -5
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/button/button_icon/button_icon.styles.js +1 -1
- package/test-env/components/call_out/call_out.styles.js +4 -4
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/card/card.styles.js +5 -2
- package/test-env/components/code/code_block_annotations.js +1 -1
- package/test-env/components/code/code_block_line.styles.js +1 -2
- package/test-env/components/code/code_syntax.styles.js +24 -28
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
- package/test-env/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
- package/test-env/components/color_picker/color_picker.js +3 -2
- package/test-env/components/color_picker/color_picker.styles.js +1 -2
- package/test-env/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/test-env/components/combo_box/combo_box.js +6 -1
- package/test-env/components/comment_list/comment.js +1 -1
- package/test-env/components/comment_list/comment_event.js +5 -4
- package/test-env/components/comment_list/comment_list.js +1 -1
- package/test-env/components/common.js +0 -28
- package/test-env/components/datagrid/data_grid.styles.js +6 -7
- package/test-env/components/date_picker/date_picker.styles.js +2 -2
- package/test-env/components/date_picker/date_picker_range.styles.js +2 -2
- package/test-env/components/date_picker/react_date_picker.styles.js +3 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
- package/test-env/components/drag_and_drop/droppable.styles.js +2 -4
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.styles.js +5 -1
- package/test-env/components/expression/expression.styles.js +13 -13
- package/test-env/components/filter_group/filter_select_item.styles.js +1 -2
- package/test-env/components/flyout/_flyout_close_button.styles.js +3 -4
- package/test-env/components/flyout/flyout.styles.js +8 -3
- package/test-env/components/flyout/flyout_footer.styles.js +1 -1
- package/test-env/components/form/form.styles.js +23 -31
- package/test-env/components/form/range/range_tooltip.styles.js +11 -13
- package/test-env/components/form/switch/switch.js +3 -2
- package/test-env/components/form/switch/switch.styles.js +16 -19
- package/test-env/components/header/header.styles.js +7 -8
- package/test-env/components/icon/icon.styles.js +9 -8
- package/test-env/components/icon/named_colors.js +1 -1
- package/test-env/components/image/image.styles.js +2 -2
- package/test-env/components/image/image_button.styles.js +3 -3
- package/test-env/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +9 -7
- package/test-env/components/link/link.styles.js +6 -6
- package/test-env/components/list_group/list_group_item.styles.js +8 -10
- package/test-env/components/loading/loading_chart.styles.js +13 -5
- package/test-env/components/loading/loading_spinner.styles.js +2 -2
- package/test-env/components/mark/mark.styles.js +2 -9
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
- package/test-env/components/markdown_editor/markdown_format.styles.js +2 -2
- package/test-env/components/modal/modal.styles.js +3 -3
- package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -2
- package/test-env/components/page_template/inner/page_inner.styles.js +2 -2
- package/test-env/components/pagination/pagination.styles.js +2 -2
- package/test-env/components/panel/panel.js +1 -1
- package/test-env/components/panel/panel.styles.js +4 -3
- package/test-env/components/panel/split_panel/split_panel.js +1 -1
- package/test-env/components/popover/popover.js +1 -1
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +8 -3
- package/test-env/components/popover/popover_arrow/_popover_arrow.styles.js +16 -15
- package/test-env/components/popover/popover_footer.styles.js +1 -1
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +10 -9
- package/test-env/components/progress/progress.js +1 -1
- package/test-env/components/progress/progress.styles.js +29 -27
- package/test-env/components/provider/provider.js +2 -2
- package/test-env/components/resizable_container/resizable_collapse_button.styles.js +2 -2
- package/test-env/components/resizable_container/resizable_panel.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +2 -3
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +1 -1
- package/test-env/components/side_nav/side_nav_item.styles.js +6 -7
- package/test-env/components/skeleton/utils.js +4 -6
- package/test-env/components/stat/stat.styles.js +5 -5
- package/test-env/components/steps/step_number.styles.js +1 -1
- package/test-env/components/table/table_cells_shared.styles.js +3 -8
- package/test-env/components/table/table_row.styles.js +8 -10
- package/test-env/components/tabs/tab.styles.js +2 -2
- package/test-env/components/text/text.styles.js +1 -1
- package/test-env/components/text/text_color.js +1 -1
- package/test-env/components/text/text_color.styles.js +6 -5
- package/test-env/components/text_diff/text_diff.styles.js +1 -1
- package/test-env/components/toast/toast.styles.js +2 -2
- package/test-env/components/token/token.js +13 -4
- package/test-env/components/token/token.styles.js +14 -5
- package/test-env/components/token/token_map.js +244 -2
- package/test-env/components/tool_tip/tool_tip.styles.js +12 -24
- package/test-env/components/tour/_tour_footer.styles.js +2 -4
- package/test-env/components/tour/tour.styles.js +8 -12
- package/test-env/components/tree_view/tree_view_item.styles.js +1 -2
- package/test-env/global_styling/functions/math.js +7 -59
- package/test-env/global_styling/functions/size.js +7 -27
- package/test-env/global_styling/mixins/_button.js +165 -0
- package/test-env/global_styling/mixins/_color.js +38 -30
- package/test-env/global_styling/mixins/_shadow.js +84 -0
- package/test-env/global_styling/mixins/index.js +22 -0
- package/test-env/global_styling/reset/global_styles.js +2 -2
- package/test-env/global_styling/variables/animations.js +25 -31
- package/test-env/global_styling/variables/breakpoint.js +7 -16
- package/test-env/global_styling/variables/levels.js +7 -26
- package/test-env/global_styling/variables/shadow.js +13 -20
- package/test-env/global_styling/variables/size.js +7 -10
- package/test-env/global_styling/variables/typography.js +19 -41
- package/test-env/services/breakpoint/current_breakpoint_hook.js +3 -3
- package/test-env/services/color/eui_palettes.js +148 -54
- package/test-env/services/color/eui_palettes_hooks.js +76 -0
- package/test-env/services/color/index.js +20 -0
- package/test-env/services/color/vis_color_store.js +18 -0
- package/test-env/services/index.js +19 -0
- package/test-env/services/popover/index.js +8 -1
- package/test-env/services/popover/popover_arrow.styles.js +37 -0
- package/test-env/services/popover/popover_positioning.js +6 -17
- package/test-env/services/theme/context.js +3 -3
- package/test-env/services/theme/provider.js +15 -2
- package/test-env/services/theme/types.js +13 -14
- package/test-env/services/theme/utils.js +54 -296
- package/test-env/themes/amsterdam/global_styling/functions/shadows.js +7 -19
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +45 -203
- package/test-env/themes/amsterdam/global_styling/mixins/shadow.js +10 -154
- package/test-env/themes/amsterdam/global_styling/variables/_borders.js +3 -3
- package/test-env/themes/amsterdam/global_styling/variables/_breakpoint.js +7 -16
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +616 -24
- package/test-env/themes/amsterdam/global_styling/variables/_colors_vis.js +139 -0
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +616 -0
- package/test-env/themes/amsterdam/global_styling/variables/_forms.js +158 -0
- package/test-env/themes/amsterdam/theme.js +7 -1
- package/test-env/themes/index.js +4 -11
- package/test-env/themes/themes.js +1 -23
- package/es/global_styling/variables/_colors_vis.js +0 -61
- package/lib/global_styling/variables/_colors_vis.js +0 -67
- package/optimize/es/global_styling/variables/_colors_vis.js +0 -61
- package/optimize/lib/global_styling/variables/_colors_vis.js +0 -67
- package/test-env/global_styling/variables/_colors_vis.js +0 -67
- /package/src/{global_styling → themes/amsterdam/global_styling}/variables/_colors_vis.scss +0 -0
|
@@ -13,41 +13,29 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { css } from '@emotion/react';
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
17
|
+
import { getTokenName } from '@elastic/eui-theme-common';
|
|
18
|
+
export var BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
|
|
18
19
|
/**
|
|
20
|
+
* @deprecated - use background tokens directly
|
|
19
21
|
* @returns A single background color with optional alpha transparency
|
|
20
22
|
*/
|
|
21
23
|
export var euiBackgroundColor = function euiBackgroundColor(_ref, color) {
|
|
22
|
-
var euiTheme = _ref.euiTheme
|
|
23
|
-
colorMode = _ref.colorMode;
|
|
24
|
+
var euiTheme = _ref.euiTheme;
|
|
24
25
|
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
25
26
|
method = _ref2.method;
|
|
26
27
|
if (color === 'transparent') return 'transparent';
|
|
27
28
|
if (method === 'transparent') {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} else if (color === 'subdued') {
|
|
31
|
-
return colorMode === 'DARK' ? transparentize(euiTheme.colors.lightShade, 0.4) : transparentize(euiTheme.colors.lightShade, 0.2);
|
|
32
|
-
} else {
|
|
33
|
-
return transparentize(euiTheme.colors[color], 0.1);
|
|
34
|
-
}
|
|
29
|
+
var tokenName = getTokenName('backgroundTransparent', color);
|
|
30
|
+
return euiTheme.colors[tokenName];
|
|
35
31
|
} else {
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
switch (color) {
|
|
40
|
-
case 'plain':
|
|
41
|
-
return euiTheme.colors.emptyShade;
|
|
42
|
-
case 'subdued':
|
|
43
|
-
return euiTheme.colors.body;
|
|
44
|
-
default:
|
|
45
|
-
return _tintOrShade(euiTheme.colors[color]);
|
|
46
|
-
}
|
|
32
|
+
var _tokenName = getTokenName('backgroundBase', color);
|
|
33
|
+
return euiTheme.colors[_tokenName];
|
|
47
34
|
}
|
|
48
35
|
};
|
|
49
36
|
|
|
50
37
|
/**
|
|
38
|
+
* @deprecated
|
|
51
39
|
* @returns An object map of color keys to color values, categorized by
|
|
52
40
|
* opaque (default) vs transparency (hover/focus states) methods.
|
|
53
41
|
* e.g. {
|
|
@@ -67,6 +55,10 @@ var _euiBackgroundColorMap = function _euiBackgroundColorMap(euiThemeContext) {
|
|
|
67
55
|
}, {})
|
|
68
56
|
};
|
|
69
57
|
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated
|
|
61
|
+
*/
|
|
70
62
|
export var useEuiBackgroundColor = function useEuiBackgroundColor(color) {
|
|
71
63
|
var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
72
64
|
method = _ref3.method;
|
|
@@ -80,29 +72,37 @@ export var useEuiBackgroundColor = function useEuiBackgroundColor(color) {
|
|
|
80
72
|
*/
|
|
81
73
|
var _euiBackgroundColors = function _euiBackgroundColors(euiThemeContext) {
|
|
82
74
|
return BACKGROUND_COLORS.reduce(function (acc, color) {
|
|
83
|
-
|
|
75
|
+
var tokenName = getTokenName('backgroundBase', color);
|
|
76
|
+
var backgroundColor = color === 'transparent' ? 'transparent' : euiThemeContext.euiTheme.colors[tokenName];
|
|
77
|
+
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("background-color:", backgroundColor, ";label:", color, ";")));
|
|
84
78
|
}, {});
|
|
85
79
|
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Hook to retrieve background style for a background color variant
|
|
83
|
+
* @returns An object map of color keys to CSS,
|
|
84
|
+
* e.g. { danger: css``, success: css``, ... }
|
|
85
|
+
*/
|
|
86
86
|
export var useEuiBackgroundColorCSS = function useEuiBackgroundColorCSS() {
|
|
87
87
|
return useEuiMemoizedStyles(_euiBackgroundColors);
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Border colors
|
|
92
|
+
* @deprecated - use border tokens directly or use
|
|
93
|
+
* `useEuiBorderColorCSS()` for composed styles
|
|
92
94
|
*/
|
|
93
95
|
|
|
94
96
|
export var euiBorderColor = function euiBorderColor(_ref4, color) {
|
|
95
|
-
var euiTheme = _ref4.euiTheme
|
|
96
|
-
colorMode = _ref4.colorMode;
|
|
97
|
+
var euiTheme = _ref4.euiTheme;
|
|
97
98
|
switch (color) {
|
|
98
99
|
case 'transparent':
|
|
99
|
-
case 'plain':
|
|
100
|
-
case 'subdued':
|
|
101
100
|
return euiTheme.border.color;
|
|
102
|
-
case 'warning':
|
|
103
|
-
return tintOrShade(euiTheme.colors.warning, 0.4, colorMode);
|
|
104
101
|
default:
|
|
105
|
-
|
|
102
|
+
{
|
|
103
|
+
var tokenName = getTokenName('borderBase', color);
|
|
104
|
+
return euiTheme.colors[tokenName];
|
|
105
|
+
}
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
|
|
@@ -112,9 +112,17 @@ export var euiBorderColor = function euiBorderColor(_ref4, color) {
|
|
|
112
112
|
*/
|
|
113
113
|
var _euiBorderColors = function _euiBorderColors(euiThemeContext) {
|
|
114
114
|
return BACKGROUND_COLORS.reduce(function (acc, color) {
|
|
115
|
-
|
|
115
|
+
var borderToken = getTokenName('borderBase', color);
|
|
116
|
+
var borderColor = color === 'transparent' ? euiThemeContext.euiTheme.border.color : euiThemeContext.euiTheme.colors[borderToken];
|
|
117
|
+
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("border-color:", borderColor, ";label:", color, ";")));
|
|
116
118
|
}, {});
|
|
117
119
|
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Hook to retrieve border style for a border variant
|
|
123
|
+
* @returns An object map of color keys to CSS,
|
|
124
|
+
* e.g. { danger: css``, success: css``, ... }
|
|
125
|
+
*/
|
|
118
126
|
export var useEuiBorderColorCSS = function useEuiBorderColorCSS() {
|
|
119
127
|
return useEuiMemoizedStyles(_euiBorderColors);
|
|
120
128
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { euiShadowFlat, euiShadow, euiSlightShadowHover, euiShadowXSmall, euiShadowSmall, euiShadowMedium, euiShadowLarge, euiShadowXLarge } from '@elastic/eui-theme-common';
|
|
10
|
+
import { useEuiTheme } from '../../services/theme';
|
|
11
|
+
export { euiShadowFlat, euiShadow, euiSlightShadowHover, euiShadowXSmall, euiShadowSmall, euiShadowMedium, euiShadowLarge, euiShadowXLarge };
|
|
12
|
+
export var useEuiSlightShadowHover = function useEuiSlightShadowHover(color) {
|
|
13
|
+
var euiThemeContext = useEuiTheme();
|
|
14
|
+
return euiSlightShadowHover(euiThemeContext, {
|
|
15
|
+
color: color
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
export var useEuiShadowFlat = function useEuiShadowFlat(color) {
|
|
19
|
+
var euiThemeContext = useEuiTheme();
|
|
20
|
+
return euiShadowFlat(euiThemeContext, {
|
|
21
|
+
color: color
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
export var useEuiShadow = function useEuiShadow() {
|
|
25
|
+
var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'l';
|
|
26
|
+
var color = arguments.length > 1 ? arguments[1] : undefined;
|
|
27
|
+
var euiThemeContext = useEuiTheme();
|
|
28
|
+
return euiShadow(euiThemeContext, size, {
|
|
29
|
+
color: color
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -17,7 +17,7 @@ import React from 'react';
|
|
|
17
17
|
import { Global, css } from '@emotion/react';
|
|
18
18
|
import { euiFocusRing, euiScrollBarStyles } from '../mixins';
|
|
19
19
|
import { logicalCSS } from '../functions';
|
|
20
|
-
import {
|
|
20
|
+
import { transparentize } from '../../services/color';
|
|
21
21
|
import { useEuiTheme } from '../../services/theme';
|
|
22
22
|
import { resetStyles as reset } from './reset';
|
|
23
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -35,7 +35,7 @@ export var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
|
|
|
35
35
|
* so that it knows to use custom styles. Therefore, we just reuse the same scrollbar mixin with thick size.
|
|
36
36
|
*/
|
|
37
37
|
var scrollbarStyles = euiScrollBarStyles(euiThemeContext, {
|
|
38
|
-
trackColor:
|
|
38
|
+
trackColor: euiTheme.components.scrollbarTrackColor,
|
|
39
39
|
width: 'auto'
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -56,7 +56,7 @@ export var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
|
|
|
56
56
|
*/
|
|
57
57
|
var styles = /*#__PURE__*/css(reset, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;", logicalCSS('height', '100%'), " background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", _objectSpread(_objectSpread({}, fontReset), {}, {
|
|
58
58
|
fontSize: '1rem' // Inherit from html root
|
|
59
|
-
}), ";}select:disabled{opacity:1;}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", euiFocusRing(euiThemeContext), ";}::selection{background:", transparentize(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.
|
|
59
|
+
}), ";}select:disabled{opacity:1;}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", euiFocusRing(euiThemeContext), ";}::selection{background:", transparentize(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.textPrimary, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
|
|
60
60
|
return ___EmotionJSX(Global, {
|
|
61
61
|
styles: styles
|
|
62
62
|
});
|
|
@@ -6,25 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
* A constant storing the `prefers-reduced-motion` media query
|
|
11
|
-
* so that when it is turned off, animations are not run.
|
|
12
|
-
*/
|
|
13
|
-
export var euiCanAnimate = '@media screen and (prefers-reduced-motion: no-preference)';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* A constant storing the `prefers-reduced-motion` media query that will
|
|
17
|
-
* only apply the content if the setting is off (reduce).
|
|
18
|
-
*/
|
|
19
|
-
export var euiCantAnimate = '@media screen and (prefers-reduced-motion: reduce)';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Speeds / Durations / Delays
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
export var EuiThemeAnimationSpeeds = ['extraFast', 'fast', 'normal', 'slow', 'extraSlow'];
|
|
26
|
-
/**
|
|
27
|
-
* Easings / Timing functions
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
export var EuiThemeAnimationEasings = ['bounce', 'resistance'];
|
|
9
|
+
export { euiCanAnimate, euiCantAnimate, EuiThemeAnimationSpeeds, EuiThemeAnimationEasings } from '@elastic/eui-theme-common';
|
|
@@ -6,10 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
// This type cannot be a string enum / must be a generic string
|
|
12
|
-
// in case consumers add custom breakpoint sizes, such as xxl or xxs
|
|
13
|
-
|
|
14
|
-
// Explicitly list out each key so we can document default values
|
|
15
|
-
// via JSDoc (which is available to devs in IDE via intellisense)
|
|
9
|
+
export { EuiThemeBreakpoints } from '@elastic/eui-theme-common';
|
|
@@ -6,20 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
* Z-Index
|
|
11
|
-
*
|
|
12
|
-
* Remember that z-index is relative to parent and based on the stacking context.
|
|
13
|
-
* z-indexes only compete against other z-indexes when they exist as children of
|
|
14
|
-
* that shared parent.
|
|
15
|
-
*
|
|
16
|
-
* That means a popover with a settings of 2, will still show above a modal
|
|
17
|
-
* with a setting of 100, if it is within that modal and not besides it.
|
|
18
|
-
*
|
|
19
|
-
* Generally that means it's a good idea to consider things added to this file
|
|
20
|
-
* as competitive only as siblings.
|
|
21
|
-
*
|
|
22
|
-
* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
export var EuiThemeLevels = ['toast', 'modal', 'mask', 'navigation', 'menu', 'header', 'flyout', 'maskBelowHeader', 'content'];
|
|
9
|
+
export { EuiThemeLevels } from '@elastic/eui-theme-common';
|
|
@@ -6,14 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
/**
|
|
11
|
-
* Shadow t-shirt sizes descriptions
|
|
12
|
-
*/
|
|
13
|
-
export var _EuiShadowSizesDescriptions = {
|
|
14
|
-
xs: 'Very subtle shadow used on small components.',
|
|
15
|
-
s: 'Adds subtle depth, usually used in conjunction with a border.',
|
|
16
|
-
m: 'Used on small sized portalled content like popovers.',
|
|
17
|
-
l: 'Primary shadow used in most cases to add visible depth.',
|
|
18
|
-
xl: 'Very large shadows used for large portalled style containers like modals and flyouts.'
|
|
19
|
-
};
|
|
9
|
+
export { EuiThemeShadowSizes, _EuiShadowSizesDescriptions } from '@elastic/eui-theme-common';
|
|
@@ -6,35 +6,4 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
* Font units of measure
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
export var EuiThemeFontUnits = ['rem', 'px', 'em'];
|
|
14
|
-
/*
|
|
15
|
-
* Font scale
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
export var EuiThemeFontScales = ['xxxs', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
19
|
-
|
|
20
|
-
/*
|
|
21
|
-
* Font base settings
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
/*
|
|
25
|
-
* Font weights
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
export var EuiThemeFontWeights = ['light', 'regular', 'medium', 'semiBold', 'bold'];
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Body / Base styles
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Title styles
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
/*
|
|
39
|
-
* Font
|
|
40
|
-
*/
|
|
9
|
+
export { EuiThemeFontUnits, EuiThemeFontScales, EuiThemeFontWeights } from '@elastic/eui-theme-common';
|
|
@@ -14,6 +14,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
14
14
|
|
|
15
15
|
import chroma from 'chroma-js';
|
|
16
16
|
import { colorPalette } from './color_palette';
|
|
17
|
+
import { EUI_VIS_COLOR_STORE } from './vis_color_store';
|
|
17
18
|
var flatten = function flatten(arr) {
|
|
18
19
|
var _ref;
|
|
19
20
|
return (_ref = []).concat.apply(_ref, _toConsumableArray(arr));
|
|
@@ -29,6 +30,14 @@ var euiPalette = function euiPalette(colors, steps) {
|
|
|
29
30
|
}
|
|
30
31
|
return colorPalette(colors, steps, diverge, categorical);
|
|
31
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* NOTE: These functions rely on base vis colors of the theme which are provided via a global
|
|
35
|
+
* singleton instance `EUI_VIS_COLOR_STORE` that's updated by the EuiProvider on theme change.
|
|
36
|
+
* Make sure the function is recalled on theme change to retrieve theme-related colors.
|
|
37
|
+
*
|
|
38
|
+
* Outside of a react component you can use the `subscibe()` method on the `EUI_VIS_COLOR_STORE`
|
|
39
|
+
* to subscribe to updates and update your usages to ensure latest colors are loaded.
|
|
40
|
+
*/
|
|
32
41
|
export var euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
33
42
|
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
34
43
|
_ref2$rotations = _ref2.rotations,
|
|
@@ -40,28 +49,11 @@ export var euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
|
40
49
|
_ref2$sortBy = _ref2.sortBy,
|
|
41
50
|
sortBy = _ref2$sortBy === void 0 ? 'default' : _ref2$sortBy,
|
|
42
51
|
_ref2$sortShift = _ref2.sortShift,
|
|
43
|
-
sortShift = _ref2$sortShift === void 0 ? '-100' : _ref2$sortShift
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// 1 blue
|
|
49
|
-
'#D36086',
|
|
50
|
-
// 2 dark pink
|
|
51
|
-
'#9170B8',
|
|
52
|
-
// 3 purple
|
|
53
|
-
'#CA8EAE',
|
|
54
|
-
// 4 light pink
|
|
55
|
-
'#D6BF57',
|
|
56
|
-
// 5 yellow
|
|
57
|
-
'#B9A888',
|
|
58
|
-
// 6 tan
|
|
59
|
-
'#DA8B45',
|
|
60
|
-
// 7 orange
|
|
61
|
-
'#AA6556',
|
|
62
|
-
// 8 brown
|
|
63
|
-
'#E7664C' // 9 red
|
|
64
|
-
];
|
|
52
|
+
sortShift = _ref2$sortShift === void 0 ? '-100' : _ref2$sortShift,
|
|
53
|
+
colors = _ref2.colors;
|
|
54
|
+
var _colors = [];
|
|
55
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
56
|
+
var base = [visColors.euiColorVis0, visColors.euiColorVis1, visColors.euiColorVis2, visColors.euiColorVis3, visColors.euiColorVis4, visColors.euiColorVis5, visColors.euiColorVis6, visColors.euiColorVis7, visColors.euiColorVis8, visColors.euiColorVis9];
|
|
65
57
|
if (sortBy === 'natural') {
|
|
66
58
|
// Sort the colors based on the color wheel, but shifting the values based on sortShift
|
|
67
59
|
base = _toConsumableArray(base).sort(function (a, b) {
|
|
@@ -85,100 +77,202 @@ export var euiPaletteColorBlind = function euiPaletteColorBlind() {
|
|
|
85
77
|
}
|
|
86
78
|
});
|
|
87
79
|
if (order === 'group') {
|
|
88
|
-
|
|
80
|
+
_colors = flatten(palettes);
|
|
89
81
|
} else {
|
|
90
82
|
var _loop = function _loop(i) {
|
|
91
|
-
var
|
|
83
|
+
var _colors2;
|
|
92
84
|
var rotation = palettes.map(function (palette) {
|
|
93
85
|
return palette[i];
|
|
94
86
|
});
|
|
95
|
-
(
|
|
87
|
+
(_colors2 = _colors).push.apply(_colors2, _toConsumableArray(rotation));
|
|
96
88
|
};
|
|
97
89
|
for (var i = 0; i < rotations; i++) {
|
|
98
90
|
_loop(i);
|
|
99
91
|
}
|
|
100
92
|
}
|
|
101
93
|
} else {
|
|
102
|
-
|
|
94
|
+
_colors = base;
|
|
103
95
|
}
|
|
104
|
-
return
|
|
96
|
+
return _colors;
|
|
105
97
|
};
|
|
106
98
|
|
|
107
99
|
/**
|
|
108
100
|
* Color blind palette with text is meant for use when text is applied on top of the color.
|
|
109
101
|
* It increases the brightness of the color to give the text more contrast.
|
|
102
|
+
*
|
|
103
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
104
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
110
105
|
*/
|
|
111
106
|
export var euiPaletteColorBlindBehindText = function euiPaletteColorBlindBehindText() {
|
|
112
107
|
var paletteProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
108
|
+
var hasVisColorAdjustment = paletteProps.hasVisColorAdjustment;
|
|
109
|
+
var _hasVisColorAdjustment = hasVisColorAdjustment !== null && hasVisColorAdjustment !== void 0 ? hasVisColorAdjustment : EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
113
110
|
var originalPalette = euiPaletteColorBlind(paletteProps);
|
|
111
|
+
|
|
112
|
+
// new theme palette has required contrast, we don't need to adjust them
|
|
113
|
+
if (!_hasVisColorAdjustment) return originalPalette;
|
|
114
114
|
var newPalette = originalPalette.map(function (color) {
|
|
115
115
|
return chroma(color).brighten(0.5).hex();
|
|
116
116
|
});
|
|
117
117
|
return newPalette;
|
|
118
118
|
};
|
|
119
|
+
var _getVisColorsAsText = function _getVisColorsAsText(visColors, keys) {
|
|
120
|
+
return keys.reduce(function (colors, curr) {
|
|
121
|
+
return [].concat(_toConsumableArray(colors), [visColors[curr]]);
|
|
122
|
+
}, []);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
127
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
128
|
+
*/
|
|
119
129
|
export var euiPaletteForLightBackground = function euiPaletteForLightBackground() {
|
|
120
|
-
|
|
130
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
131
|
+
colors = _ref3.colors;
|
|
132
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
133
|
+
var visColorsAsTextKeys = Object.keys(visColors).filter(function (color) {
|
|
134
|
+
return color.includes('AsTextLight');
|
|
135
|
+
});
|
|
136
|
+
return _getVisColorsAsText(visColors, visColorsAsTextKeys);
|
|
121
137
|
};
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
141
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
142
|
+
*/
|
|
122
143
|
export var euiPaletteForDarkBackground = function euiPaletteForDarkBackground() {
|
|
123
|
-
|
|
144
|
+
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
145
|
+
colors = _ref4.colors;
|
|
146
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
147
|
+
var visColorsAsTextKeys = Object.keys(visColors).filter(function (color) {
|
|
148
|
+
return color.includes('AsTextDark');
|
|
149
|
+
});
|
|
150
|
+
return _getVisColorsAsText(visColors, visColorsAsTextKeys);
|
|
124
151
|
};
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
155
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
156
|
+
*/
|
|
130
157
|
export var euiPaletteForStatus = function euiPaletteForStatus(steps) {
|
|
158
|
+
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
159
|
+
colors = _ref5.colors;
|
|
160
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
131
161
|
if (steps === 1) {
|
|
132
|
-
return [
|
|
162
|
+
return [visColors.euiColorVisSuccess0];
|
|
133
163
|
}
|
|
134
164
|
if (steps <= 3) {
|
|
135
|
-
return euiPalette([
|
|
165
|
+
return euiPalette([visColors.euiColorVisSuccess0, visColors.euiColorVisWarning0, visColors.euiColorVisDanger0], steps, true);
|
|
136
166
|
}
|
|
137
|
-
return euiPalette([
|
|
167
|
+
return euiPalette([visColors.euiColorVisSuccess0, visColors.euiColorVisSuccess1, visColors.euiColorVisWarning0, visColors.euiColorVisDanger1, visColors.euiColorVisDanger0], steps, true);
|
|
138
168
|
};
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
172
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
173
|
+
*/
|
|
139
174
|
export var euiPaletteForTemperature = function euiPaletteForTemperature(steps) {
|
|
140
|
-
var
|
|
141
|
-
|
|
175
|
+
var _ref6 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
176
|
+
colors = _ref6.colors,
|
|
177
|
+
hasVisColorAdjustment = _ref6.hasVisColorAdjustment;
|
|
178
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
179
|
+
var _hasVisColorAdjustment = hasVisColorAdjustment !== null && hasVisColorAdjustment !== void 0 ? hasVisColorAdjustment : EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
142
180
|
if (steps === 1) {
|
|
143
|
-
return [
|
|
181
|
+
return [visColors.euiColorVisCool2];
|
|
144
182
|
} else if (steps <= 3) {
|
|
145
|
-
return euiPalette([
|
|
183
|
+
return euiPalette([visColors.euiColorVisCool2, visColors.euiColorVisWarm2], steps, true);
|
|
146
184
|
}
|
|
147
|
-
|
|
185
|
+
var cools = colorPalette([visColors.euiColorVisCool2, visColors.euiColorVisCool1, visColors.euiColorVisCool0], 3);
|
|
186
|
+
var warms = colorPalette([visColors.euiColorVisWarm0, visColors.euiColorVisWarm1, visColors.euiColorVisWarm2], 3);
|
|
187
|
+
var paletteColors = _hasVisColorAdjustment ? [].concat(_toConsumableArray(cools), _toConsumableArray(warms)) : [].concat(_toConsumableArray(cools), [visColors.euiColorVisNeutral0], _toConsumableArray(warms));
|
|
188
|
+
return euiPalette(paletteColors, steps, true);
|
|
148
189
|
};
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
193
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
194
|
+
*/
|
|
149
195
|
export var euiPaletteComplementary = function euiPaletteComplementary(steps) {
|
|
196
|
+
var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
197
|
+
colors = _ref7.colors,
|
|
198
|
+
hasVisColorAdjustment = _ref7.hasVisColorAdjustment;
|
|
199
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
200
|
+
var _hasVisColorAdjustment = hasVisColorAdjustment !== null && hasVisColorAdjustment !== void 0 ? hasVisColorAdjustment : EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
150
201
|
if (steps === 1) {
|
|
151
|
-
return [
|
|
202
|
+
return [visColors.euiColorVisComplementary0];
|
|
152
203
|
}
|
|
153
|
-
|
|
204
|
+
var paletteColors = _hasVisColorAdjustment ? [visColors.euiColorVisComplementary0, visColors.euiColorVisComplementary1] : [visColors.euiColorVisComplementary0, visColors.euiColorVisNeutral0, visColors.euiColorVisComplementary1];
|
|
205
|
+
return euiPalette(paletteColors, steps, true);
|
|
154
206
|
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
210
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
211
|
+
*/
|
|
155
212
|
export var euiPaletteRed = function euiPaletteRed(steps) {
|
|
213
|
+
var _ref8 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
214
|
+
colors = _ref8.colors;
|
|
215
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
156
216
|
if (steps === 1) {
|
|
157
|
-
return [
|
|
217
|
+
return [visColors.euiColorVisDanger1];
|
|
158
218
|
}
|
|
159
|
-
return euiPalette([
|
|
219
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisDanger0], steps);
|
|
160
220
|
};
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
224
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
225
|
+
*/
|
|
161
226
|
export var euiPaletteGreen = function euiPaletteGreen(steps) {
|
|
227
|
+
var _ref9 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
228
|
+
colors = _ref9.colors;
|
|
229
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
162
230
|
if (steps === 1) {
|
|
163
|
-
return [
|
|
231
|
+
return [visColors.euiColorVisSuccess1];
|
|
164
232
|
}
|
|
165
|
-
return euiPalette([
|
|
233
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisSuccess0], steps);
|
|
166
234
|
};
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
238
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
239
|
+
*/
|
|
167
240
|
export var euiPaletteCool = function euiPaletteCool(steps) {
|
|
241
|
+
var _ref10 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
242
|
+
colors = _ref10.colors,
|
|
243
|
+
hasVisColorAdjustment = _ref10.hasVisColorAdjustment;
|
|
244
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
245
|
+
var _hasVisColorAdjustment = hasVisColorAdjustment !== null && hasVisColorAdjustment !== void 0 ? hasVisColorAdjustment : EUI_VIS_COLOR_STORE.hasVisColorAdjustment;
|
|
168
246
|
if (steps === 1) {
|
|
169
|
-
return [
|
|
247
|
+
return [visColors.euiColorVisCool1];
|
|
170
248
|
}
|
|
171
|
-
return euiPalette([
|
|
249
|
+
return euiPalette([_hasVisColorAdjustment ? visColors.euiColorVisNeutral0 : visColors.euiColorVisCool0, visColors.euiColorVisCool1, visColors.euiColorVisCool2], steps);
|
|
172
250
|
};
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
254
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
255
|
+
*/
|
|
173
256
|
export var euiPaletteWarm = function euiPaletteWarm(steps) {
|
|
257
|
+
var _ref11 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
258
|
+
colors = _ref11.colors;
|
|
259
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
174
260
|
if (steps === 1) {
|
|
175
|
-
return [
|
|
261
|
+
return [visColors.euiColorVisWarm2];
|
|
176
262
|
}
|
|
177
|
-
return euiPalette([
|
|
263
|
+
return euiPalette([visColors.euiColorVisWarm0, visColors.euiColorVisWarm1, visColors.euiColorVisWarm2], steps);
|
|
178
264
|
};
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* NOTE: This function is not pure. It relies on `EUI_VIS_COLOR_STORE` which is updated by the
|
|
268
|
+
* EuiProvider on theme change. Ensure to recall the function on theme change or subscribe to the store.
|
|
269
|
+
*/
|
|
179
270
|
export var euiPaletteGray = function euiPaletteGray(steps) {
|
|
271
|
+
var _ref12 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
272
|
+
colors = _ref12.colors;
|
|
273
|
+
var visColors = colors !== null && colors !== void 0 ? colors : EUI_VIS_COLOR_STORE.visColors;
|
|
180
274
|
if (steps === 1) {
|
|
181
|
-
return [
|
|
275
|
+
return [visColors.euiColorVisGrey1];
|
|
182
276
|
}
|
|
183
|
-
return euiPalette([
|
|
277
|
+
return euiPalette([visColors.euiColorVisNeutral0, visColors.euiColorVisGrey0, visColors.euiColorVisGrey1, visColors.euiColorVisGrey2, visColors.euiColorVisGrey3], steps, false);
|
|
184
278
|
};
|