@elastic/eui 97.1.0 → 97.3.0-borealis.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/es/components/badge/badge.js +1 -1
- package/es/components/badge/badge.styles.js +2 -2
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/es/components/badge/color_utils.js +8 -7
- package/es/components/badge/notification_badge/badge_notification.js +1 -1
- package/es/components/badge/notification_badge/badge_notification.styles.js +1 -0
- package/es/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
- 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 +4 -4
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/card/card.styles.js +1 -1
- package/es/components/code/code_block_annotations.js +1 -1
- package/es/components/code/code_block_line.styles.js +1 -2
- 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.styles.js +1 -2
- package/es/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/es/components/combo_box/combo_box.js +9 -6
- package/es/components/common.js +0 -28
- package/es/components/context_menu/context_menu_panel.js +17 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +31 -8
- package/es/components/datagrid/body/data_grid_body.js +8 -0
- package/es/components/datagrid/body/data_grid_body_custom.js +8 -1
- package/es/components/datagrid/body/data_grid_body_virtualized.js +8 -1
- package/es/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
- package/es/components/datagrid/controls/display_selector.js +277 -207
- package/es/components/datagrid/data_grid.stories.utils.js +28 -2
- package/es/components/datagrid/data_grid.styles.js +4 -6
- package/es/components/datagrid/utils/col_widths.js +7 -13
- package/es/components/datagrid/utils/grid_height_width.js +1 -1
- package/es/components/datagrid/utils/row_heights.js +29 -13
- 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 +3 -4
- package/es/components/drag_and_drop/droppable.styles.js +2 -4
- package/es/components/empty_prompt/empty_prompt.styles.js +5 -2
- package/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/es/components/flyout/_flyout_close_button.styles.js +1 -2
- package/es/components/form/form.styles.js +21 -28
- package/es/components/form/range/range_tooltip.styles.js +3 -7
- 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 +12 -6
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_links/header_links.styles.js +1 -0
- package/es/components/icon/icon.styles.js +9 -8
- package/es/components/icon/named_colors.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 +1 -2
- package/es/components/list_group/list_group_item.styles.js +9 -11
- 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/overlay_mask/overlay_mask.styles.js +1 -2
- package/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/es/components/popover/popover_footer.styles.js +1 -1
- package/es/components/popover/popover_panel/_popover_panel.styles.js +3 -4
- package/es/components/progress/progress.js +1 -1
- package/es/components/progress/progress.styles.js +8 -6
- package/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/es/components/side_nav/side_nav_item.styles.js +1 -2
- package/es/components/skeleton/utils.js +3 -5
- package/es/components/steps/step_number.styles.js +1 -1
- package/es/components/table/table_cells_shared.styles.js +2 -7
- package/es/components/table/table_row.styles.js +8 -10
- 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/tool_tip/tool_tip.styles.js +8 -10
- package/es/components/tour/_tour_footer.styles.js +2 -4
- package/es/components/tree_view/tree_view_item.styles.js +1 -2
- 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 +40 -31
- package/es/global_styling/mixins/index.js +2 -1
- package/es/global_styling/reset/global_styles.js +2 -2
- package/es/global_styling/variables/_colors_vis.js +1 -53
- 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/hooks/useDeepEqual.js +18 -6
- package/es/services/theme/provider.js +11 -0
- package/es/services/theme/types.js +1 -6
- package/es/services/theme/utils.js +1 -303
- package/es/themes/amsterdam/global_styling/mixins/button.js +1 -203
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +281 -0
- package/es/themes/amsterdam/global_styling/variables/_colors.js +587 -18
- package/es/themes/amsterdam/global_styling/variables/_components.js +442 -0
- package/es/themes/amsterdam/global_styling/variables/_forms.js +149 -0
- package/es/themes/amsterdam/theme.js +3 -1
- package/es/themes/index.js +1 -1
- package/es/themes/themes.js +7 -0
- package/eui.d.ts +2121 -2627
- package/i18ntokens.json +92 -110
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/badge.styles.js +2 -2
- package/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/lib/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/lib/components/badge/color_utils.js +13 -12
- package/lib/components/badge/notification_badge/badge_notification.js +1 -1
- package/lib/components/badge/notification_badge/badge_notification.styles.js +1 -0
- package/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
- 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 +3 -3
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/card/card.styles.js +1 -1
- package/lib/components/code/code_block_annotations.js +1 -1
- package/lib/components/code/code_block_line.styles.js +1 -2
- 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.styles.js +1 -2
- package/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
- package/lib/components/combo_box/combo_box.js +9 -6
- package/lib/components/common.js +0 -28
- package/lib/components/context_menu/context_menu_panel.js +17 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +31 -8
- package/lib/components/datagrid/body/data_grid_body.js +8 -0
- package/lib/components/datagrid/body/data_grid_body_custom.js +8 -1
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +8 -1
- package/lib/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
- package/lib/components/datagrid/controls/display_selector.js +275 -204
- package/lib/components/datagrid/data_grid.stories.utils.js +28 -2
- package/lib/components/datagrid/data_grid.styles.js +4 -6
- package/lib/components/datagrid/utils/col_widths.js +7 -13
- package/lib/components/datagrid/utils/grid_height_width.js +1 -1
- package/lib/components/datagrid/utils/row_heights.js +29 -13
- 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 +2 -3
- package/lib/components/drag_and_drop/droppable.styles.js +2 -4
- package/lib/components/empty_prompt/empty_prompt.styles.js +4 -1
- package/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/lib/components/flyout/_flyout_close_button.styles.js +1 -2
- package/lib/components/form/form.styles.js +20 -27
- package/lib/components/form/range/range_tooltip.styles.js +3 -7
- 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 +11 -5
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_links/header_links.styles.js +1 -0
- package/lib/components/icon/icon.styles.js +9 -8
- package/lib/components/icon/named_colors.js +1 -1
- package/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
- package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
- package/lib/components/list_group/list_group_item.styles.js +8 -10
- 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/overlay_mask/overlay_mask.styles.js +1 -2
- package/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/lib/components/popover/popover_footer.styles.js +1 -1
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +3 -4
- package/lib/components/progress/progress.js +1 -1
- package/lib/components/progress/progress.styles.js +8 -6
- package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/lib/components/side_nav/side_nav_item.styles.js +1 -2
- package/lib/components/skeleton/utils.js +3 -5
- package/lib/components/steps/step_number.styles.js +1 -1
- package/lib/components/table/table_cells_shared.styles.js +2 -7
- package/lib/components/table/table_row.styles.js +7 -9
- 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/tool_tip/tool_tip.styles.js +8 -10
- package/lib/components/tour/_tour_footer.styles.js +2 -4
- package/lib/components/tree_view/tree_view_item.styles.js +1 -2
- 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 +39 -30
- package/lib/global_styling/mixins/index.js +11 -0
- package/lib/global_styling/reset/global_styles.js +1 -1
- package/lib/global_styling/variables/_colors_vis.js +6 -61
- 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/hooks/useDeepEqual.js +17 -7
- package/lib/services/theme/provider.js +11 -0
- package/lib/services/theme/types.js +13 -14
- package/lib/services/theme/utils.js +54 -303
- package/lib/themes/amsterdam/global_styling/mixins/button.js +45 -206
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +285 -0
- package/lib/themes/amsterdam/global_styling/variables/_colors.js +586 -18
- package/lib/themes/amsterdam/global_styling/variables/_components.js +446 -0
- package/lib/themes/amsterdam/global_styling/variables/_forms.js +153 -0
- package/lib/themes/amsterdam/theme.js +3 -1
- package/lib/themes/index.js +7 -0
- package/lib/themes/themes.js +8 -1
- package/optimize/es/components/badge/badge.js +1 -1
- package/optimize/es/components/badge/badge.styles.js +2 -2
- package/optimize/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/optimize/es/components/badge/color_utils.js +8 -7
- package/optimize/es/components/badge/notification_badge/badge_notification.js +1 -1
- package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +1 -0
- package/optimize/es/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
- 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 +4 -4
- package/optimize/es/components/button/button_icon/button_icon.js +1 -1
- package/optimize/es/components/card/card.styles.js +1 -1
- 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/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.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 +9 -6
- package/optimize/es/components/common.js +0 -28
- package/optimize/es/components/context_menu/context_menu_panel.js +11 -1
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +15 -8
- package/optimize/es/components/datagrid/body/data_grid_body_custom.js +0 -1
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +0 -1
- package/optimize/es/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
- package/optimize/es/components/datagrid/controls/display_selector.js +277 -207
- package/optimize/es/components/datagrid/data_grid.styles.js +4 -6
- package/optimize/es/components/datagrid/utils/col_widths.js +7 -13
- package/optimize/es/components/datagrid/utils/grid_height_width.js +1 -1
- package/optimize/es/components/datagrid/utils/row_heights.js +29 -13
- 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 +3 -4
- package/optimize/es/components/drag_and_drop/droppable.styles.js +2 -4
- package/optimize/es/components/empty_prompt/empty_prompt.styles.js +5 -2
- package/optimize/es/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/es/components/flyout/_flyout_close_button.styles.js +1 -2
- package/optimize/es/components/form/form.styles.js +21 -28
- package/optimize/es/components/form/range/range_tooltip.styles.js +3 -7
- 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 +12 -6
- package/optimize/es/components/header/header_links/header_links.js +1 -1
- package/optimize/es/components/header/header_links/header_links.styles.js +1 -0
- package/optimize/es/components/icon/icon.styles.js +9 -8
- package/optimize/es/components/icon/named_colors.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 +1 -2
- package/optimize/es/components/list_group/list_group_item.styles.js +9 -11
- 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/overlay_mask/overlay_mask.styles.js +1 -2
- package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
- package/optimize/es/components/popover/popover_footer.styles.js +1 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +3 -4
- package/optimize/es/components/progress/progress.js +1 -1
- package/optimize/es/components/progress/progress.styles.js +8 -6
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/optimize/es/components/side_nav/side_nav_item.styles.js +1 -2
- package/optimize/es/components/skeleton/utils.js +3 -5
- package/optimize/es/components/steps/step_number.styles.js +1 -1
- package/optimize/es/components/table/table_cells_shared.styles.js +2 -7
- package/optimize/es/components/table/table_row.styles.js +8 -10
- 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/tool_tip/tool_tip.styles.js +8 -10
- package/optimize/es/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -2
- 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 +40 -31
- package/optimize/es/global_styling/mixins/index.js +2 -1
- package/optimize/es/global_styling/reset/global_styles.js +2 -2
- package/optimize/es/global_styling/variables/_colors_vis.js +1 -53
- 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/hooks/useDeepEqual.js +13 -6
- package/optimize/es/services/theme/provider.js +11 -0
- 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/mixins/button.js +1 -198
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +270 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +587 -18
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +434 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +141 -0
- package/optimize/es/themes/amsterdam/theme.js +3 -1
- package/optimize/es/themes/index.js +1 -1
- package/optimize/es/themes/themes.js +7 -0
- package/optimize/lib/components/badge/badge.js +1 -1
- package/optimize/lib/components/badge/badge.styles.js +2 -2
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/optimize/lib/components/badge/color_utils.js +13 -12
- package/optimize/lib/components/badge/notification_badge/badge_notification.js +1 -1
- package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +1 -0
- package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
- 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 +3 -3
- package/optimize/lib/components/button/button_icon/button_icon.js +1 -1
- package/optimize/lib/components/card/card.styles.js +1 -1
- 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/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.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 +9 -6
- package/optimize/lib/components/common.js +0 -28
- package/optimize/lib/components/context_menu/context_menu_panel.js +11 -1
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +15 -8
- package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +0 -1
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +0 -1
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
- package/optimize/lib/components/datagrid/controls/display_selector.js +274 -204
- package/optimize/lib/components/datagrid/data_grid.styles.js +4 -6
- package/optimize/lib/components/datagrid/utils/col_widths.js +7 -13
- package/optimize/lib/components/datagrid/utils/grid_height_width.js +1 -1
- package/optimize/lib/components/datagrid/utils/row_heights.js +29 -13
- 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 +2 -3
- package/optimize/lib/components/drag_and_drop/droppable.styles.js +2 -4
- package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +4 -1
- package/optimize/lib/components/filter_group/filter_select_item.styles.js +1 -2
- package/optimize/lib/components/flyout/_flyout_close_button.styles.js +1 -2
- package/optimize/lib/components/form/form.styles.js +20 -27
- package/optimize/lib/components/form/range/range_tooltip.styles.js +3 -7
- 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 +11 -5
- package/optimize/lib/components/header/header_links/header_links.js +1 -1
- package/optimize/lib/components/header/header_links/header_links.styles.js +1 -0
- package/optimize/lib/components/icon/icon.styles.js +9 -8
- package/optimize/lib/components/icon/named_colors.js +1 -1
- 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 +1 -2
- package/optimize/lib/components/list_group/list_group_item.styles.js +8 -10
- 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/overlay_mask/overlay_mask.styles.js +1 -2
- package/optimize/lib/components/page_template/inner/page_inner.styles.js +1 -1
- package/optimize/lib/components/popover/popover_footer.styles.js +1 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +3 -4
- package/optimize/lib/components/progress/progress.js +1 -1
- package/optimize/lib/components/progress/progress.styles.js +8 -6
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/optimize/lib/components/side_nav/side_nav_item.styles.js +1 -2
- package/optimize/lib/components/skeleton/utils.js +3 -5
- package/optimize/lib/components/steps/step_number.styles.js +1 -1
- package/optimize/lib/components/table/table_cells_shared.styles.js +2 -7
- package/optimize/lib/components/table/table_row.styles.js +7 -9
- 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/tool_tip/tool_tip.styles.js +8 -10
- package/optimize/lib/components/tour/_tour_footer.styles.js +2 -4
- package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -2
- 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 +39 -30
- package/optimize/lib/global_styling/mixins/index.js +11 -0
- package/optimize/lib/global_styling/reset/global_styles.js +1 -1
- package/optimize/lib/global_styling/variables/_colors_vis.js +6 -61
- 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/hooks/useDeepEqual.js +12 -5
- package/optimize/lib/services/theme/provider.js +11 -0
- 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/mixins/button.js +45 -203
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +586 -18
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +439 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +146 -0
- package/optimize/lib/themes/amsterdam/theme.js +3 -1
- package/optimize/lib/themes/index.js +7 -0
- package/optimize/lib/themes/themes.js +8 -1
- package/package.json +8 -3
- package/src/global_styling/functions/_index.scss +1 -5
- package/src/global_styling/index.scss +1 -16
- 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/_colors_vis.scss +1 -70
- package/src/global_styling/variables/_font_weight.scss +1 -7
- package/src/global_styling/variables/_form.scss +2 -21
- 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 -15
- 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 +1 -0
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/badge.styles.js +2 -2
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/test-env/components/badge/color_utils.js +13 -12
- package/test-env/components/badge/notification_badge/badge_notification.js +1 -1
- package/test-env/components/badge/notification_badge/badge_notification.styles.js +1 -0
- package/test-env/components/bottom_bar/bottom_bar.styles.js +1 -2
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
- 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 +3 -3
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/card/card.styles.js +1 -1
- 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/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.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 +9 -6
- package/test-env/components/common.js +0 -28
- package/test-env/components/context_menu/context_menu_panel.js +17 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +31 -8
- package/test-env/components/datagrid/body/data_grid_body.js +8 -0
- package/test-env/components/datagrid/body/data_grid_body_custom.js +8 -1
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +8 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
- package/test-env/components/datagrid/controls/display_selector.js +274 -204
- package/test-env/components/datagrid/data_grid.stories.utils.js +28 -2
- package/test-env/components/datagrid/data_grid.styles.js +4 -6
- package/test-env/components/datagrid/utils/col_widths.js +7 -13
- package/test-env/components/datagrid/utils/grid_height_width.js +1 -1
- package/test-env/components/datagrid/utils/row_heights.js +29 -13
- 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 +2 -3
- package/test-env/components/drag_and_drop/droppable.styles.js +2 -4
- package/test-env/components/empty_prompt/empty_prompt.styles.js +4 -1
- package/test-env/components/filter_group/filter_select_item.styles.js +1 -2
- package/test-env/components/flyout/_flyout_close_button.styles.js +1 -2
- package/test-env/components/form/form.styles.js +20 -27
- package/test-env/components/form/range/range_tooltip.styles.js +3 -7
- 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 +11 -5
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_links/header_links.styles.js +1 -0
- package/test-env/components/icon/icon.styles.js +9 -8
- package/test-env/components/icon/named_colors.js +1 -1
- 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 +1 -2
- package/test-env/components/list_group/list_group_item.styles.js +8 -10
- 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/overlay_mask/overlay_mask.styles.js +1 -2
- package/test-env/components/page_template/inner/page_inner.styles.js +1 -1
- package/test-env/components/popover/popover_footer.styles.js +1 -1
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +3 -4
- package/test-env/components/progress/progress.js +1 -1
- package/test-env/components/progress/progress.styles.js +8 -6
- package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
- package/test-env/components/side_nav/side_nav_item.styles.js +1 -2
- package/test-env/components/skeleton/utils.js +3 -5
- package/test-env/components/steps/step_number.styles.js +1 -1
- package/test-env/components/table/table_cells_shared.styles.js +2 -7
- package/test-env/components/table/table_row.styles.js +7 -9
- 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/tool_tip/tool_tip.styles.js +8 -10
- package/test-env/components/tour/_tour_footer.styles.js +2 -4
- package/test-env/components/tree_view/tree_view_item.styles.js +1 -2
- 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 +39 -30
- package/test-env/global_styling/mixins/index.js +11 -0
- package/test-env/global_styling/reset/global_styles.js +1 -1
- package/test-env/global_styling/variables/_colors_vis.js +6 -61
- 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/hooks/useDeepEqual.js +12 -5
- package/test-env/services/theme/provider.js +11 -0
- 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/mixins/button.js +45 -203
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
- package/test-env/themes/amsterdam/global_styling/variables/_colors.js +586 -18
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +439 -0
- package/test-env/themes/amsterdam/global_styling/variables/_forms.js +146 -0
- package/test-env/themes/amsterdam/theme.js +3 -1
- package/test-env/themes/index.js +7 -0
- package/test-env/themes/themes.js +8 -1
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
|
-
import { tintOrShade } from '../../services';
|
|
11
10
|
import { euiFontSize, logicalCSS, logicalSizeCSS, mathWithUnits } from '../../global_styling';
|
|
12
11
|
export var euiDataGridVariables = function euiDataGridVariables(euiThemeContext) {
|
|
13
12
|
var euiTheme = euiThemeContext.euiTheme;
|
|
@@ -37,17 +36,16 @@ export var euiDataGridVariables = function euiDataGridVariables(euiThemeContext)
|
|
|
37
36
|
};
|
|
38
37
|
};
|
|
39
38
|
export var euiDataGridStyles = function euiDataGridStyles(euiThemeContext) {
|
|
40
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
41
|
-
colorMode = euiThemeContext.colorMode;
|
|
39
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
42
40
|
var _euiDataGridVariables = euiDataGridVariables(euiThemeContext),
|
|
43
41
|
_cellPadding = _euiDataGridVariables.cellPadding,
|
|
44
42
|
lineHeight = _euiDataGridVariables.lineHeight,
|
|
45
43
|
_fontSize = _euiDataGridVariables.fontSize;
|
|
46
44
|
return {
|
|
47
|
-
euiDataGrid: /*#__PURE__*/css("display:flex;flex-direction:column;align-items:stretch;", logicalCSS('height', '100%'), " overflow:hidden;*:where(& .euiDataGridRow){background-color:", euiTheme.colors.emptyShade, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow--striped){background-color:", euiTheme.
|
|
45
|
+
euiDataGrid: /*#__PURE__*/css("display:flex;flex-direction:column;align-items:stretch;", logicalCSS('height', '100%'), " overflow:hidden;*:where(& .euiDataGridRow){background-color:", euiTheme.colors.emptyShade, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow--striped){background-color:", euiTheme.components.dataGridRowBackgroundStriped, ";}*:where(&.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover){background-color:", euiTheme.components.dataGridRowBackgroundHover, ";};label:euiDataGrid;"),
|
|
48
46
|
cellPadding: {
|
|
49
47
|
cellPadding: function cellPadding(size) {
|
|
50
|
-
return /*#__PURE__*/css(".euiDataGridHeaderCell,.euiDataGridRowCell__content{padding:", _cellPadding[size], ";}/* Workaround to trim line-clamp and padding - @see https://github.com/elastic/eui/issues/7780 */.euiDataGridRowCell__content--lineCountHeight{", logicalCSS('padding-bottom', 0), " ", logicalCSS('border-bottom', "".concat(_cellPadding[size], " solid transparent")), ";}.euiDataGridHeaderCell__button{margin-block:-", _cellPadding[size], ";};label:cellPadding;");
|
|
48
|
+
return /*#__PURE__*/css(".euiDataGridHeaderCell,.euiDataGridRowCell__content{padding:", _cellPadding[size], ";}/* Workaround to trim line-clamp and padding - @see https://github.com/elastic/eui/issues/7780 */.euiDataGridRowCell__content--lineCountHeight,.euiDataGridRowCell__content--autoBelowLineCountHeight{", logicalCSS('padding-bottom', 0), " ", logicalCSS('border-bottom', "".concat(_cellPadding[size], " solid transparent")), ";}.euiDataGridHeaderCell__button{margin-block:-", _cellPadding[size], ";};label:cellPadding;");
|
|
51
49
|
},
|
|
52
50
|
get s() {
|
|
53
51
|
return /*#__PURE__*/css(this.cellPadding('s'), ";label:s;");
|
|
@@ -78,7 +76,7 @@ export var euiDataGridStyles = function euiDataGridStyles(euiThemeContext) {
|
|
|
78
76
|
none: null,
|
|
79
77
|
horizontal: /*#__PURE__*/css("label:borders;.euiDataGridRowCell:not(.euiDataGridFooterCell),.euiDataGridFooter,&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", logicalCSS('border-bottom', euiTheme.border.thin), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", logicalCSS('border-top', euiTheme.border.thin), " ", logicalCSS('margin-top', "-".concat(euiTheme.border.width.thin)), ";}.euiDataGridHeader{", logicalCSS('border-top', euiTheme.border.thin), ";};label:horizontal;"),
|
|
80
78
|
all: /*#__PURE__*/css("label:borders;.euiDataGridRowCell{&:not(.euiDataGridFooterCell){", logicalCSS('border-bottom', euiTheme.border.thin), " ", logicalCSS('border-right', // Visually lighten vertical borders
|
|
81
|
-
"".concat(euiTheme.border.width.thin, " solid ").concat(
|
|
79
|
+
"".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.components.dataGridVerticalLineBorderColor)), ";}&--firstColumn{", logicalCSS('border-left', euiTheme.border.thin), ";}&--lastColumn{", logicalCSS('border-right-color', euiTheme.border.color), ";}}.euiDataGridFooterCell,.euiDataGridHeaderCell{", logicalCSS('border-right', euiTheme.border.thin), " &:first-of-type{", logicalCSS('border-left', euiTheme.border.thin), ";}}.euiDataGridFooter{", logicalCSS('border-bottom', euiTheme.border.thin), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", logicalCSS('border-top', euiTheme.border.thin), " ", logicalCSS('margin-top', "-".concat(euiTheme.border.width.thin)), ";}&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", logicalCSS('border-bottom', euiTheme.border.thin), ";}&:is(.euiDataGrid--noControls) .euiDataGridHeader{", logicalCSS('border-top', euiTheme.border.thin), ";}.euiDataGrid__controls{border:", euiTheme.border.thin, ";background-color:", euiTheme.colors.body, ";};label:all;")
|
|
82
80
|
},
|
|
83
81
|
// Sits below the controls above it and pagination below it
|
|
84
82
|
euiDataGrid__content: /*#__PURE__*/css("z-index:1;position:relative;flex-grow:1;", logicalSizeCSS('100%'), " ", logicalCSS('max-width', '100%'), " overflow:hidden;background-color:", euiTheme.colors.body, ";font-feature-settings:'tnum' 1;;label:euiDataGrid__content;"),
|
|
@@ -57,27 +57,21 @@ export var useColumnWidths = function useColumnWidths(_ref) {
|
|
|
57
57
|
trailingControlColumns = _ref.trailingControlColumns,
|
|
58
58
|
defaultColumnWidth = _ref.defaultColumnWidth,
|
|
59
59
|
onColumnResize = _ref.onColumnResize;
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
initialWidth = _ref2.initialWidth;
|
|
65
|
-
if (columnWidths[id] == null) {
|
|
66
|
-
columnWidths[id] = initialWidth;
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
return columnWidths;
|
|
60
|
+
var computeColumnWidths = useCallback(function () {
|
|
61
|
+
return columns.filter(doesColumnHaveAnInitialWidth).reduce(function (initialWidths, column) {
|
|
62
|
+
return _objectSpread(_objectSpread({}, initialWidths), {}, _defineProperty({}, column.id, column.initialWidth));
|
|
63
|
+
}, {});
|
|
70
64
|
}, [columns]);
|
|
71
65
|
|
|
72
66
|
// Passes initializer function for performance, so computing only runs once on init
|
|
73
67
|
// @see https://react.dev/reference/react/useState#examples-initializer
|
|
74
|
-
var _useState = useState(
|
|
68
|
+
var _useState = useState(computeColumnWidths),
|
|
75
69
|
_useState2 = _slicedToArray(_useState, 2),
|
|
76
70
|
columnWidths = _useState2[0],
|
|
77
71
|
setColumnWidths = _useState2[1];
|
|
78
72
|
useUpdateEffect(function () {
|
|
79
|
-
setColumnWidths(
|
|
80
|
-
}, [
|
|
73
|
+
setColumnWidths(computeColumnWidths());
|
|
74
|
+
}, [computeColumnWidths]);
|
|
81
75
|
var setColumnWidth = useCallback(function (columnId, width) {
|
|
82
76
|
setColumnWidths(function (prevColumnWidths) {
|
|
83
77
|
return _objectSpread(_objectSpread({}, prevColumnWidths), {}, _defineProperty({}, columnId, width));
|
|
@@ -107,7 +107,7 @@ export var useUnconstrainedHeight = function useUnconstrainedHeight(_ref2) {
|
|
|
107
107
|
if (rowHeightOption) {
|
|
108
108
|
// this row's height is known
|
|
109
109
|
knownRowCount++;
|
|
110
|
-
knownHeight += rowHeightUtils.getCalculatedHeight(rowHeightOption, defaultRowHeight, correctRowIndex,
|
|
110
|
+
knownHeight += rowHeightUtils.getCalculatedHeight(rowHeightOption, defaultRowHeight, correctRowIndex, rowHeightsOptions);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -74,7 +74,7 @@ export var RowHeightUtils = /*#__PURE__*/function () {
|
|
|
74
74
|
}
|
|
75
75
|
}, {
|
|
76
76
|
key: "getCalculatedHeight",
|
|
77
|
-
value: function getCalculatedHeight(heightOption, defaultHeight, rowIndex,
|
|
77
|
+
value: function getCalculatedHeight(heightOption, defaultHeight, rowIndex, rowHeightsOptions) {
|
|
78
78
|
if (isObject(heightOption) && heightOption.height) {
|
|
79
79
|
return Math.max(heightOption.height, defaultHeight);
|
|
80
80
|
}
|
|
@@ -82,8 +82,13 @@ export var RowHeightUtils = /*#__PURE__*/function () {
|
|
|
82
82
|
return Math.max(heightOption, defaultHeight);
|
|
83
83
|
}
|
|
84
84
|
if (isObject(heightOption) && heightOption.lineCount) {
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
var _ref = rowHeightsOptions || {},
|
|
86
|
+
autoBelowLineCount = _ref.autoBelowLineCount; // uses auto height cache
|
|
87
|
+
var isRowHeightOverride =
|
|
88
|
+
// lineCount overrides are stored in the heights cache
|
|
89
|
+
rowIndex != null && this.isRowHeightOverride(rowIndex, rowHeightsOptions);
|
|
90
|
+
if (autoBelowLineCount || isRowHeightOverride) {
|
|
91
|
+
return this.getRowHeight(rowIndex) || defaultHeight;
|
|
87
92
|
} else {
|
|
88
93
|
return defaultHeight; // default lineCount height is set in minRowHeight state in grid_row_body
|
|
89
94
|
}
|
|
@@ -114,6 +119,14 @@ export var RowHeightUtils = /*#__PURE__*/function () {
|
|
|
114
119
|
// Assumes both padding-top and bottom are the same
|
|
115
120
|
return contentHeight + padding * 2;
|
|
116
121
|
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "isAutoBelowLineCount",
|
|
124
|
+
value: function isAutoBelowLineCount(options, option) {
|
|
125
|
+
var _this$getLineCount;
|
|
126
|
+
if (!(options !== null && options !== void 0 && options.autoBelowLineCount)) return false;
|
|
127
|
+
if (((_this$getLineCount = this.getLineCount(option)) !== null && _this$getLineCount !== void 0 ? _this$getLineCount : 0) > 1) return true;
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
117
130
|
|
|
118
131
|
/**
|
|
119
132
|
* Auto height utils
|
|
@@ -125,6 +138,9 @@ export var RowHeightUtils = /*#__PURE__*/function () {
|
|
|
125
138
|
if (height === AUTO_HEIGHT) {
|
|
126
139
|
return true;
|
|
127
140
|
}
|
|
141
|
+
if (this.isAutoBelowLineCount(rowHeightsOptions, height)) {
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
128
144
|
return false;
|
|
129
145
|
}
|
|
130
146
|
}, {
|
|
@@ -154,8 +170,8 @@ export var RowHeightUtils = /*#__PURE__*/function () {
|
|
|
154
170
|
}, {
|
|
155
171
|
key: "pruneHiddenColumnHeights",
|
|
156
172
|
value: function pruneHiddenColumnHeights(visibleColumns) {
|
|
157
|
-
var visibleColumnIds = new Set(visibleColumns.map(function (
|
|
158
|
-
var id =
|
|
173
|
+
var visibleColumnIds = new Set(visibleColumns.map(function (_ref2) {
|
|
174
|
+
var id = _ref2.id;
|
|
159
175
|
return id;
|
|
160
176
|
}));
|
|
161
177
|
var didModify = false;
|
|
@@ -267,10 +283,10 @@ export var RowHeightVirtualizationUtils = /*#__PURE__*/function (_RowHeightUtils
|
|
|
267
283
|
* Hook for instantiating RowHeightUtils, setting internal class vars,
|
|
268
284
|
* and setting up various row-height-related side effects
|
|
269
285
|
*/
|
|
270
|
-
export var useRowHeightUtils = function useRowHeightUtils(
|
|
271
|
-
var virtualization =
|
|
272
|
-
rowHeightsOptions =
|
|
273
|
-
columns =
|
|
286
|
+
export var useRowHeightUtils = function useRowHeightUtils(_ref3) {
|
|
287
|
+
var virtualization = _ref3.virtualization,
|
|
288
|
+
rowHeightsOptions = _ref3.rowHeightsOptions,
|
|
289
|
+
columns = _ref3.columns;
|
|
274
290
|
var forceRenderRef = useLatest(useForceRender());
|
|
275
291
|
var _useState = useState(function () {
|
|
276
292
|
if (virtualization) {
|
|
@@ -303,9 +319,9 @@ export var useRowHeightUtils = function useRowHeightUtils(_ref2) {
|
|
|
303
319
|
}, [rowHeightUtils, columns]);
|
|
304
320
|
return rowHeightUtils;
|
|
305
321
|
};
|
|
306
|
-
export var useDefaultRowHeight = function useDefaultRowHeight(
|
|
307
|
-
var rowHeightsOptions =
|
|
308
|
-
rowHeightUtils =
|
|
322
|
+
export var useDefaultRowHeight = function useDefaultRowHeight(_ref4) {
|
|
323
|
+
var rowHeightsOptions = _ref4.rowHeightsOptions,
|
|
324
|
+
rowHeightUtils = _ref4.rowHeightUtils;
|
|
309
325
|
var _useContext = useContext(DataGridSortedContext),
|
|
310
326
|
getCorrectRowIndex = _useContext.getCorrectRowIndex;
|
|
311
327
|
|
|
@@ -329,7 +345,7 @@ export var useDefaultRowHeight = function useDefaultRowHeight(_ref3) {
|
|
|
329
345
|
// Account for row-specific height overrides
|
|
330
346
|
var rowHeightOption = rowHeightUtils.getRowHeightOption(correctRowIndex, rowHeightsOptions);
|
|
331
347
|
if (rowHeightOption) {
|
|
332
|
-
rowHeight = rowHeightUtils.getCalculatedHeight(rowHeightOption, minRowHeight, correctRowIndex,
|
|
348
|
+
rowHeight = rowHeightUtils.getCalculatedHeight(rowHeightOption, minRowHeight, correctRowIndex, rowHeightsOptions);
|
|
333
349
|
}
|
|
334
350
|
|
|
335
351
|
// Use the row-specific height if it exists, if not, fall back to the default
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
// Needs to use vanilla `css` to pass a className directly to react-datepicker
|
|
10
10
|
import { css } from '@emotion/css';
|
|
11
11
|
import { euiCanAnimate, euiMaxBreakpoint, euiFontSize, euiYScroll, logicalCSS, mathWithUnits } from '../../global_styling';
|
|
12
|
-
import { euiButtonColor, euiButtonEmptyColor, euiButtonFillColor
|
|
12
|
+
import { euiButtonColor, euiButtonEmptyColor, euiButtonFillColor } from '../../global_styling/mixins';
|
|
13
|
+
import { euiShadowSmall } from '../../themes/amsterdam/global_styling/mixins';
|
|
13
14
|
import { euiFormControlStyles, euiFormControlText, euiFormControlDefaultShadow } from '../form/form.styles';
|
|
14
15
|
export var euiDatePickerVariables = function euiDatePickerVariables(_ref) {
|
|
15
16
|
var euiTheme = _ref.euiTheme;
|
|
@@ -8,7 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import {
|
|
11
|
+
import { makeHighContrastColor } from '../../../services';
|
|
12
12
|
import { euiFontSize, euiMaxBreakpoint, logicalCSS, mathWithUnits } from '../../../global_styling';
|
|
13
13
|
import { euiFormVariables, euiFormControlDefaultShadow, euiFormControlInvalidStyles, euiFormControlDisabledStyles } from '../../form/form.styles';
|
|
14
14
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -20,8 +20,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
20
20
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
21
|
};
|
|
22
22
|
export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiThemeContext) {
|
|
23
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
24
|
-
colorMode = euiThemeContext.colorMode;
|
|
23
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
25
24
|
var forms = euiFormVariables(euiThemeContext);
|
|
26
25
|
var inputWidth = euiTheme.base * 30;
|
|
27
26
|
var buttonWidth = euiTheme.base * 7; // @see _button_display.styles.ts
|
|
@@ -39,7 +38,7 @@ export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiTheme
|
|
|
39
38
|
});
|
|
40
39
|
|
|
41
40
|
// Needs updating colors
|
|
42
|
-
var needsUpdatingBackgroundColor =
|
|
41
|
+
var needsUpdatingBackgroundColor = euiTheme.components.superDatePickerBackgroundSuccees;
|
|
43
42
|
var needsUpdatingTextColor = makeHighContrastColor(euiTheme.colors.success)(needsUpdatingBackgroundColor);
|
|
44
43
|
return {
|
|
45
44
|
euiSuperDatePicker: /*#__PURE__*/css("display:flex;gap:", gap, ";", logicalCSS('max-width', '100%'), " ", euiMaxBreakpoint(euiThemeContext, 'm'), "{", logicalCSS('width', '100%'), ";};label:euiSuperDatePicker;"),
|
|
@@ -8,7 +8,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { transparentize } from '../../services';
|
|
12
11
|
import { euiCanAnimate } from '../../global_styling';
|
|
13
12
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
13
|
name: "jkp921-noGrow",
|
|
@@ -28,11 +27,10 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
28
27
|
};
|
|
29
28
|
export var euiDroppableStyles = function euiDroppableStyles(euiThemeContext) {
|
|
30
29
|
var euiTheme = euiThemeContext.euiTheme;
|
|
31
|
-
var droppableColor = euiTheme.colors.success;
|
|
32
30
|
return {
|
|
33
31
|
euiDroppable: /*#__PURE__*/css(euiCanAnimate, "{transition:background-color ", euiTheme.animation.slow, " ease;};label:euiDroppable;"),
|
|
34
|
-
isDragging: /*#__PURE__*/css("background-color:",
|
|
35
|
-
isDraggingOver: /*#__PURE__*/css("background-color:",
|
|
32
|
+
isDragging: /*#__PURE__*/css("background-color:", euiTheme.components.dragDropDraggingBackground, ";;label:isDragging;"),
|
|
33
|
+
isDraggingOver: /*#__PURE__*/css("background-color:", euiTheme.components.dragDropDraggingOverBackground, ";;label:isDraggingOver;"),
|
|
36
34
|
grow: _ref2,
|
|
37
35
|
noGrow: _ref,
|
|
38
36
|
spacing: sharedSpacingPadding(euiThemeContext)
|
|
@@ -14,7 +14,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import { css } from '@emotion/react';
|
|
17
|
-
import { euiMinBreakpoint, euiPaddingSize,
|
|
17
|
+
import { euiMinBreakpoint, euiPaddingSize, logicalCSS, mathWithUnits } from '../../global_styling';
|
|
18
|
+
import { getTokenName } from '@elastic/eui-theme-common';
|
|
18
19
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
19
20
|
name: "x4698b-roundedBorders",
|
|
20
21
|
styles: "border-radius:inherit;label:roundedBorders;"
|
|
@@ -70,7 +71,8 @@ export var euiEmptyPromptStyles = function euiEmptyPromptStyles(euiThemeContext)
|
|
|
70
71
|
};
|
|
71
72
|
};
|
|
72
73
|
var generateFooterBorder = function generateFooterBorder(color) {
|
|
73
|
-
|
|
74
|
+
var borderToken = getTokenName('borderStrong', color);
|
|
75
|
+
return "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors[borderToken]);
|
|
74
76
|
};
|
|
75
77
|
return {
|
|
76
78
|
euiEmptyPrompt: /*#__PURE__*/css("text-align:center;margin:auto;", euiMinBreakpoint(euiThemeContext, 'l'), "{", logicalCSS('max-width', 'max-content'), ";};label:euiEmptyPrompt;"),
|
|
@@ -107,6 +109,7 @@ export var euiEmptyPromptStyles = function euiEmptyPromptStyles(euiThemeContext)
|
|
|
107
109
|
subdued: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('subdued')), ";;label:subdued;"),
|
|
108
110
|
primary: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('primary')), ";;label:primary;"),
|
|
109
111
|
accent: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('accent')), ";;label:accent;"),
|
|
112
|
+
accentSecondary: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('accentSecondary')), ";;label:accentSecondary;"),
|
|
110
113
|
danger: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('danger')), ";;label:danger;"),
|
|
111
114
|
warning: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('warning')), ";;label:warning;"),
|
|
112
115
|
success: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('success')), ";;label:success;")
|
|
@@ -7,11 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
|
-
import { transparentize } from '../../services';
|
|
11
10
|
import { logicalCSS, logicalShorthandCSS, logicalTextAlignCSS, euiFontSize } from '../../global_styling';
|
|
12
11
|
export var euiFilterSelectItemStyles = function euiFilterSelectItemStyles(euiThemeContext) {
|
|
13
12
|
var euiTheme = euiThemeContext.euiTheme;
|
|
14
|
-
var focusStyles = "\n color: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(euiTheme.focus.backgroundColor, ";\n outline-offset: -").concat(euiTheme.focus.width, ";\n text-decoration: underline;\n\n &:disabled {\n background-color: ").concat(
|
|
13
|
+
var focusStyles = "\n color: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(euiTheme.focus.backgroundColor, ";\n outline-offset: -").concat(euiTheme.focus.width, ";\n text-decoration: underline;\n\n &:disabled {\n background-color: ").concat(euiTheme.components.filterSelectItemBackgroundFocusDisabled, ";\n }\n ");
|
|
15
14
|
return {
|
|
16
15
|
euiFilterSelectItem: /*#__PURE__*/css("display:block;", logicalCSS('width', '100%'), " ", logicalShorthandCSS('padding', "".concat(euiTheme.size.xs, " ").concat(euiTheme.size.m)), " ", euiFontSize(euiThemeContext, 's'), " ", logicalTextAlignCSS('left'), " color:", euiTheme.colors.text, ";", logicalCSS('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.lightestShade)), " &:hover{cursor:pointer;text-decoration:underline;}&:focus{", focusStyles, ";}&:disabled{cursor:not-allowed;text-decoration:none;color:", euiTheme.colors.disabledText, ";};label:euiFilterSelectItem;"),
|
|
17
16
|
isFocused: /*#__PURE__*/css(focusStyles, ";;label:isFocused;")
|
|
@@ -9,13 +9,12 @@
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
10
|
import { euiMaxBreakpoint, euiMinBreakpoint, logicalCSS } from '../../global_styling';
|
|
11
11
|
import { euiShadowXLarge } from '../../themes/amsterdam/global_styling/mixins';
|
|
12
|
-
import { transparentize } from '../../services';
|
|
13
12
|
import { FLYOUT_BREAKPOINT } from './flyout.styles';
|
|
14
13
|
export var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeContext) {
|
|
15
14
|
var euiTheme = euiThemeContext.euiTheme;
|
|
16
15
|
return {
|
|
17
16
|
euiFlyout__closeButton: /*#__PURE__*/css("position:absolute;", logicalCSS('right', euiTheme.size.s), " ", logicalCSS('top', euiTheme.size.s), " z-index:3;;label:euiFlyout__closeButton;"),
|
|
18
|
-
inside: /*#__PURE__*/css("background-color:",
|
|
17
|
+
inside: /*#__PURE__*/css("background-color:", euiTheme.components.flyoutCloseButtonInsideBackground, ";;label:inside;"),
|
|
19
18
|
outside: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext), "animation:none!important;;label:outside;"),
|
|
20
19
|
outsideSide: {
|
|
21
20
|
// `transforms` pull in close buttons a little
|
|
@@ -12,9 +12,8 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { makeHighContrastColor } from '../../services';
|
|
16
16
|
import { logicalCSS, mathWithUnits, euiCanAnimate, euiFontSize } from '../../global_styling';
|
|
17
|
-
import { euiButtonColor } from '../../themes/amsterdam/global_styling/mixins';
|
|
18
17
|
|
|
19
18
|
// There are multiple components that only need the form max-width size &
|
|
20
19
|
// don't need the extra overhead/color computing expense of every form var.
|
|
@@ -26,10 +25,8 @@ export var euiFormMaxWidth = function euiFormMaxWidth(_ref) {
|
|
|
26
25
|
});
|
|
27
26
|
};
|
|
28
27
|
export var euiFormVariables = function euiFormVariables(euiThemeContext) {
|
|
29
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
30
|
-
|
|
31
|
-
var isColorDark = colorMode === 'DARK';
|
|
32
|
-
var backgroundColor = isColorDark ? shade(euiTheme.colors.lightestShade, 0.4) : tint(euiTheme.colors.lightestShade, 0.6);
|
|
28
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
29
|
+
var backgroundColor = euiTheme.components.forms.background;
|
|
33
30
|
var controlHeight = euiTheme.size.xxl;
|
|
34
31
|
var controlCompressedHeight = euiTheme.size.xl;
|
|
35
32
|
var sizes = {
|
|
@@ -48,15 +45,15 @@ export var euiFormVariables = function euiFormVariables(euiThemeContext) {
|
|
|
48
45
|
})
|
|
49
46
|
};
|
|
50
47
|
var colors = {
|
|
51
|
-
textColor: euiTheme.colors.
|
|
48
|
+
textColor: euiTheme.colors.textParagraph,
|
|
52
49
|
backgroundColor: backgroundColor,
|
|
53
|
-
backgroundDisabledColor:
|
|
54
|
-
backgroundReadOnlyColor: euiTheme.
|
|
55
|
-
borderColor:
|
|
56
|
-
controlDisabledColor: euiTheme.
|
|
50
|
+
backgroundDisabledColor: euiTheme.components.forms.backgroundDisabled,
|
|
51
|
+
backgroundReadOnlyColor: euiTheme.components.forms.backgroundReadOnly,
|
|
52
|
+
borderColor: euiTheme.components.forms.border,
|
|
53
|
+
controlDisabledColor: euiTheme.components.forms.controlBackgroundDisabled,
|
|
57
54
|
controlBoxShadow: '0 0 transparent',
|
|
58
55
|
controlPlaceholderText: makeHighContrastColor(euiTheme.colors.subduedText)(backgroundColor),
|
|
59
|
-
appendPrependBackground:
|
|
56
|
+
appendPrependBackground: euiTheme.components.forms.prependBackground
|
|
60
57
|
};
|
|
61
58
|
var controlLayout = {
|
|
62
59
|
controlLayoutGroupInputHeight: mathWithUnits(controlHeight, function (x) {
|
|
@@ -128,9 +125,8 @@ export var euiFormControlDefaultShadow = function euiFormControlDefaultShadow(eu
|
|
|
128
125
|
return "\n ".concat(withBorder ? border : '', "\n ").concat(withBackgroundColor ? backgroundColor : '', "\n ").concat(withBackground ? backgroundGradient : '', "\n ").concat(withBackgroundAnimation ? backgroundAnimation : '', "\n ");
|
|
129
126
|
};
|
|
130
127
|
export var euiFormControlFocusStyles = function euiFormControlFocusStyles(_ref3) {
|
|
131
|
-
var euiTheme = _ref3.euiTheme
|
|
132
|
-
|
|
133
|
-
return "\n --euiFormControlStateColor: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(colorMode === 'DARK' ? shade(euiTheme.colors.emptyShade, 0.4) : euiTheme.colors.emptyShade, ";\n background-size: 100% 100%;\n outline: none; /* Remove all outlines and rely on our own bottom border gradient */\n");
|
|
128
|
+
var euiTheme = _ref3.euiTheme;
|
|
129
|
+
return "\n --euiFormControlStateColor: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(euiTheme.components.forms.backgroundFocused, ";\n background-size: 100% 100%;\n outline: none; /* Remove all outlines and rely on our own bottom border gradient */\n");
|
|
134
130
|
};
|
|
135
131
|
export var euiFormControlInvalidStyles = function euiFormControlInvalidStyles(_ref4) {
|
|
136
132
|
var euiTheme = _ref4.euiTheme;
|
|
@@ -145,21 +141,18 @@ export var euiFormControlReadOnlyStyles = function euiFormControlReadOnlyStyles(
|
|
|
145
141
|
return "\n cursor: default;\n color: ".concat(form.textColor, ";\n -webkit-text-fill-color: ").concat(form.textColor, "; /* Required for Safari */\n\n background-color: ").concat(form.backgroundReadOnlyColor, ";\n --euiFormControlStateColor: transparent;\n ");
|
|
146
142
|
};
|
|
147
143
|
export var euiFormControlAutoFillStyles = function euiFormControlAutoFillStyles(euiThemeContext) {
|
|
148
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
149
|
-
colorMode = euiThemeContext.colorMode;
|
|
144
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
150
145
|
|
|
151
146
|
// Make the text color slightly less prominent than the default colors.text
|
|
152
147
|
var textColor = euiTheme.colors.darkestShade;
|
|
153
|
-
var
|
|
154
|
-
backgroundColor = _euiButtonColor.backgroundColor;
|
|
155
|
-
var tintedBackgroundColor = colorMode === 'DARK' ? shade(backgroundColor, 0.5) : tint(backgroundColor, 0.7);
|
|
148
|
+
var tintedBackgroundColor = euiTheme.components.forms.backgroundAutofilled;
|
|
156
149
|
// Hacky workaround to background-color, since Chrome doesn't normally allow overriding its styles
|
|
157
150
|
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill#sect1
|
|
158
151
|
var backgroundShadow = "inset 0 0 0 100vw ".concat(tintedBackgroundColor);
|
|
159
152
|
|
|
160
153
|
// Re-create the border, since the above webkit box shadow overrides the default border box-shadow
|
|
161
154
|
// + change the border color to match states, since the underline background gradient no longer works
|
|
162
|
-
var borderColor =
|
|
155
|
+
var borderColor = euiTheme.components.forms.borderAutofilled;
|
|
163
156
|
var invalidBorder = euiTheme.colors.danger;
|
|
164
157
|
var borderShadow = function borderShadow(color) {
|
|
165
158
|
return "inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(color);
|
|
@@ -177,21 +170,21 @@ var euiPlaceholderPerBrowser = function euiPlaceholderPerBrowser(content) {
|
|
|
177
170
|
*/
|
|
178
171
|
|
|
179
172
|
export var euiFormCustomControlVariables = function euiFormCustomControlVariables(euiThemeContext) {
|
|
180
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
181
|
-
colorMode = euiThemeContext.colorMode;
|
|
173
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
182
174
|
var sizes = {
|
|
183
175
|
control: euiTheme.size.base,
|
|
184
176
|
lineHeight: euiTheme.size.l,
|
|
185
177
|
labelGap: euiTheme.size.s
|
|
186
178
|
};
|
|
187
179
|
var colors = {
|
|
188
|
-
unselected: euiTheme.
|
|
189
|
-
unselectedBorder:
|
|
190
|
-
: shade(euiTheme.colors.lightestShade, 0.4),
|
|
180
|
+
unselected: euiTheme.components.forms.controlBackgroundUnselected,
|
|
181
|
+
unselectedBorder: euiTheme.components.forms.controlBorder,
|
|
191
182
|
selected: euiTheme.colors.primary,
|
|
183
|
+
selectedBorder: euiTheme.components.forms.controlBorderSelected,
|
|
192
184
|
selectedIcon: euiTheme.colors.emptyShade,
|
|
193
|
-
disabled: euiTheme.
|
|
194
|
-
|
|
185
|
+
disabled: euiTheme.components.forms.colorDisabled,
|
|
186
|
+
disabledBorder: euiTheme.components.forms.controlBorderDisabled,
|
|
187
|
+
disabledIcon: euiTheme.components.forms.iconDisabled,
|
|
195
188
|
disabledLabel: euiTheme.colors.disabledText // Lighter than formVars.disabledColor because it typically doesn't have as dark a background
|
|
196
189
|
};
|
|
197
190
|
var animation = {
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
|
-
import { COLOR_MODES_STANDARD, tint, shade } from '../../../services';
|
|
11
10
|
import { euiRangeVariables } from './range.styles';
|
|
12
11
|
import { euiFontSize, mathWithUnits } from '../../../global_styling';
|
|
13
12
|
export var euiRangeTooltipStyles = function euiRangeTooltipStyles(euiThemeContext) {
|
|
@@ -19,21 +18,18 @@ export var euiRangeTooltipStyles = function euiRangeTooltipStyles(euiThemeContex
|
|
|
19
18
|
}), ";pointer-events:none;z-index:", range.thumbZIndex, ";;label:euiRangeTooltip;")
|
|
20
19
|
};
|
|
21
20
|
};
|
|
22
|
-
var euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme, colorMode) {
|
|
23
|
-
return colorMode === COLOR_MODES_STANDARD.dark ? shade(euiTheme.colors.emptyShade, 1) : tint(euiTheme.colors.fullShade, 0.25);
|
|
24
|
-
};
|
|
25
21
|
export var euiRangeTooltipValueStyles = function euiRangeTooltipValueStyles(euiThemeContext) {
|
|
26
22
|
var range = euiRangeVariables(euiThemeContext);
|
|
27
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
28
|
-
colorMode = euiThemeContext.colorMode;
|
|
23
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
29
24
|
var arrowSize = euiTheme.size.m;
|
|
30
25
|
var arrowSizeInt = parseInt(arrowSize, 10);
|
|
31
26
|
var arrowMinusSize = "".concat((arrowSizeInt / 2 - 1) * -1, "px"); // Shift arrow 1px more than half its size to account for border radius
|
|
32
27
|
|
|
28
|
+
var toolTipBackgroundColor = euiTheme.components.tooltipBackground;
|
|
33
29
|
return {
|
|
34
30
|
euiRangeTooltip__value: /*#__PURE__*/css("position:absolute;inset-block-start:50%;max-inline-size:", mathWithUnits(euiTheme.size.base, function (x) {
|
|
35
31
|
return x * 16;
|
|
36
|
-
}), ";padding-block:", euiTheme.size.xxs, ";padding-inline:", euiTheme.size.s, ";transform:translateX(0) translateY(-50%);", euiFontSize(euiThemeContext, 's'), " line-height:", euiFontSize(euiThemeContext, 's').lineHeight, ";color:", euiTheme.colors.ghost, ";background-color:",
|
|
32
|
+
}), ";padding-block:", euiTheme.size.xxs, ";padding-inline:", euiTheme.size.s, ";transform:translateX(0) translateY(-50%);", euiFontSize(euiThemeContext, 's'), " line-height:", euiFontSize(euiThemeContext, 's').lineHeight, ";color:", euiTheme.colors.ghost, ";background-color:", toolTipBackgroundColor, ";border:", euiTheme.border.width.thin, " solid ", toolTipBackgroundColor, ";border-radius:", euiTheme.border.radius.small, ";&::before{content:'';position:absolute;inset-block-end:50%;inline-size:", arrowSize, ";block-size:", arrowSize, ";transform-origin:center;transform:translateY(50%) rotateZ(45deg);background-color:", toolTipBackgroundColor, ";border-radius:", mathWithUnits(euiTheme.border.radius.small, function (x) {
|
|
37
33
|
return x / 2;
|
|
38
34
|
}), ";};label:euiRangeTooltip__value;"),
|
|
39
35
|
left: /*#__PURE__*/css("margin-inline-end:", euiTheme.size.l, ";&::before{inset-inline-end:", arrowMinusSize, ";};label:left;"),
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
var _excluded = ["label", "id", "checked", "disabled", "compressed", "mini", "onChange", "className", "showLabel", "type", "labelProps"];
|
|
2
2
|
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); }
|
|
3
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
4
|
-
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."); }
|
|
5
|
-
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; } }
|
|
6
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
7
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
8
|
-
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; }
|
|
9
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; }
|
|
10
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; }
|
|
11
5
|
/*
|
|
@@ -63,7 +57,9 @@ export var EuiSwitch = function EuiSwitch(_ref) {
|
|
|
63
57
|
var buttonStyles = [styles.button.euiSwitch__button, styles.button[size]];
|
|
64
58
|
var bodyStyles = [styles.body.euiSwitch__body, disabled ? styles.body.disabled[size] : checked ? styles.body.on : styles.body.off];
|
|
65
59
|
var iconsStyles = [styles.icons.euiSwitch__icons, checked ? styles.icons.on : styles.icons.off, disabled ? styles.icons.disabled : styles.icons.enabled];
|
|
66
|
-
var thumbStyles = [styles.thumb.euiSwitch__thumb,
|
|
60
|
+
var thumbStyles = [styles.thumb.euiSwitch__thumb, !disabled && [styles.thumb.enabled.enabled, styles.thumb.enabled[size]],
|
|
61
|
+
// keep checked styles after enabled styles to ensure checked overrides enabled.off state
|
|
62
|
+
checked ? styles.thumb.on[size] : styles.thumb.off, disabled && [styles.thumb.disabled.disabled, styles.thumb.disabled[size]]];
|
|
67
63
|
var labelStyles = [styles.label.euiSwitch__label, styles.label[size], disabled && styles.label.disabled, labelProps === null || labelProps === void 0 ? void 0 : labelProps.css];
|
|
68
64
|
return ___EmotionJSX("div", {
|
|
69
65
|
css: cssStyles,
|
|
@@ -8,19 +8,21 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { tint } from '../../../services';
|
|
12
11
|
import { euiCanAnimate, euiFocusRing, euiFontSize, logicalCSS, logicalSizeCSS, mathWithUnits } from '../../../global_styling';
|
|
13
12
|
import { euiFormCustomControlVariables } from '../form.styles';
|
|
14
13
|
var euiSwitchVars = function euiSwitchVars(euiThemeContext) {
|
|
15
14
|
var euiTheme = euiThemeContext.euiTheme;
|
|
16
15
|
var formVars = euiFormCustomControlVariables(euiThemeContext);
|
|
17
16
|
var colors = {
|
|
18
|
-
on:
|
|
19
|
-
off:
|
|
17
|
+
on: euiTheme.components.switchBackgroundOn,
|
|
18
|
+
off: euiTheme.components.switchBackgroundOff,
|
|
20
19
|
disabled: formVars.colors.disabled,
|
|
21
20
|
thumb: formVars.colors.selectedIcon,
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
thumbDisabled: euiTheme.components.switchThumbBackgroundDisabled,
|
|
22
|
+
thumbBorder: euiTheme.components.switchThumbBorderOff,
|
|
23
|
+
thumbBorderOn: euiTheme.components.switchThumbBorderOn,
|
|
24
|
+
thumbBorderDisabled: formVars.colors.disabledBorder,
|
|
25
|
+
iconDisabled: euiTheme.components.switchIconDisabled
|
|
24
26
|
};
|
|
25
27
|
var sizes = {
|
|
26
28
|
uncompressed: {
|
|
@@ -132,23 +134,16 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
132
134
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
133
135
|
};
|
|
134
136
|
var bodyStyles = function bodyStyles(_ref4, _ref5) {
|
|
135
|
-
var
|
|
137
|
+
var euiTheme = _ref4.euiTheme;
|
|
136
138
|
var colors = _ref5.colors;
|
|
137
|
-
// This is probably very extra, but the visual weight of the default
|
|
138
|
-
// disabled custom control feels different in light mode depending
|
|
139
|
-
// on the size of the switch, so I'm tinting it based on that.
|
|
140
|
-
// Gotta justify my stupidly expensive art degree!
|
|
141
|
-
var _calculateDisabledColor = function _calculateDisabledColor(tintAmount) {
|
|
142
|
-
return /*#__PURE__*/css("label:disabled;background-color:", colorMode === 'DARK' ? colors.disabled : tint(colors.disabled, tintAmount), ";");
|
|
143
|
-
};
|
|
144
139
|
return {
|
|
145
140
|
euiSwitch__body: _ref,
|
|
146
141
|
on: /*#__PURE__*/css("background-color:", colors.on, ";;label:on;"),
|
|
147
142
|
off: /*#__PURE__*/css("background-color:", colors.off, ";;label:off;"),
|
|
148
143
|
disabled: {
|
|
149
|
-
uncompressed:
|
|
150
|
-
compressed:
|
|
151
|
-
mini:
|
|
144
|
+
uncompressed: /*#__PURE__*/css("background-color:", euiTheme.components.switchUncompressedBackgroundDisabled, ";;label:uncompressed;"),
|
|
145
|
+
compressed: /*#__PURE__*/css("background-color:", euiTheme.components.switchCompressedBackgroundDisabled, ";;label:compressed;"),
|
|
146
|
+
mini: /*#__PURE__*/css("background-color:", euiTheme.components.switchMiniBackgroundDisabled, ";;label:mini;")
|
|
152
147
|
}
|
|
153
148
|
};
|
|
154
149
|
};
|
|
@@ -161,7 +156,7 @@ var iconStyles = function iconStyles(_ref6, _ref7) {
|
|
|
161
156
|
on: /*#__PURE__*/css(logicalCSS('left', '-25%'), ";;label:on;"),
|
|
162
157
|
off: /*#__PURE__*/css(logicalCSS('left', '-75%'), ";;label:off;"),
|
|
163
158
|
enabled: /*#__PURE__*/css("color:", colors.thumb, ";;label:enabled;"),
|
|
164
|
-
disabled: /*#__PURE__*/css("color:", colors.
|
|
159
|
+
disabled: /*#__PURE__*/css("color:", colors.iconDisabled, ";;label:disabled;")
|
|
165
160
|
};
|
|
166
161
|
};
|
|
167
162
|
var thumbStyles = function thumbStyles(_ref8, switchVars) {
|
|
@@ -181,13 +176,15 @@ var thumbStyles = function thumbStyles(_ref8, switchVars) {
|
|
|
181
176
|
euiSwitch__thumb: /*#__PURE__*/css("position:absolute;", logicalCSS('vertical', 0), " aspect-ratio:1;", logicalCSS('width', 'fit-content'), " ", logicalCSS('height', '100%'), " border-radius:50%;pointer-events:none;", euiCanAnimate, "{transition-property:inset-inline-start,transform,background-color,border-color;transition-duration:", animation.speed, ";transition-timing-function:", animation.easing, ";};label:euiSwitch__thumb;"),
|
|
182
177
|
off: /*#__PURE__*/css(logicalCSS('left', 0), ";;label:off;"),
|
|
183
178
|
get on() {
|
|
179
|
+
var baseStyles = "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(colors.thumbBorderOn, ";\n ");
|
|
180
|
+
|
|
184
181
|
// right: 0 works but doesn't transition/animate, so we need to
|
|
185
182
|
// manually calculate the left position per switch size
|
|
186
183
|
var _calculateLeft = function _calculateLeft(bodyWidth, thumbWidth) {
|
|
187
184
|
var leftPosition = mathWithUnits([bodyWidth, thumbWidth], function (x, y) {
|
|
188
185
|
return x - y;
|
|
189
186
|
});
|
|
190
|
-
return /*#__PURE__*/css("label:on;", logicalCSS('left', leftPosition), ";");
|
|
187
|
+
return /*#__PURE__*/css("label:on;", logicalCSS('left', leftPosition), " ", baseStyles, ";");
|
|
191
188
|
};
|
|
192
189
|
return {
|
|
193
190
|
uncompressed: _calculateLeft(uncompressed.width, uncompressed.height),
|
|
@@ -202,7 +199,7 @@ var thumbStyles = function thumbStyles(_ref8, switchVars) {
|
|
|
202
199
|
mini: _calculateScale('mini', false)
|
|
203
200
|
},
|
|
204
201
|
disabled: {
|
|
205
|
-
disabled: /*#__PURE__*/css("background-color:
|
|
202
|
+
disabled: /*#__PURE__*/css("background-color:", colors.thumbDisabled, ";border:", euiTheme.border.width.thin, " solid ", colors.thumbBorderDisabled, ";;label:disabled;"),
|
|
206
203
|
uncompressed: _calculateScale('uncompressed', false),
|
|
207
204
|
compressed: _calculateScale('compressed', false),
|
|
208
205
|
mini: _calculateScale('mini', false)
|