@elastic/eui 71.1.0 → 72.1.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/dist/eui_charts_theme.js +13 -1
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +20 -176
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +20 -176
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/basic_table.js +2 -2
- package/es/components/basic_table/in_memory_table.js +3 -6
- package/es/components/basic_table/table.a11y.js +128 -0
- package/es/components/color_picker/color_picker.styles.js +16 -0
- package/es/components/color_picker/color_stops/color_stop_thumb.js +19 -7
- package/es/components/color_picker/color_stops/color_stop_thumb.styles.js +59 -0
- package/es/components/color_picker/color_stops/color_stops.js +25 -15
- package/es/components/color_picker/color_stops/color_stops.styles.js +65 -0
- package/es/components/date_picker/auto_refresh/refresh_interval.js +3 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +160 -173
- package/es/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.js +16 -0
- package/es/components/error_boundary/error_boundary.a11y.js +67 -0
- package/es/components/expression/expression.a11y.js +254 -0
- package/es/components/filter_group/filter_group.a11y.js +281 -0
- package/es/components/focus_trap/focus_trap.a11y.js +131 -0
- package/es/components/form/file_picker/file_picker.js +1 -0
- package/es/components/form/range/range_highlight.styles.js +1 -1
- package/es/components/form/range/range_levels.styles.js +1 -1
- package/es/components/form/range/range_track.js +5 -2
- package/es/components/header/header.a11y.js +374 -0
- package/es/components/icon/icon_ML.a11y.js +33 -0
- package/es/components/icon/icon_apps.a11y.js +33 -0
- package/es/components/icon/icon_editor.a11y.js +33 -0
- package/es/components/icon/icon_elastic.a11y.js +33 -0
- package/es/components/icon/icon_glyphs.a11y.js +33 -0
- package/es/components/icon/icon_tokens.a11y.js +33 -0
- package/es/components/image/image.a11y.js +55 -0
- package/es/components/key_pad_menu/key_pad_menu.a11y.js +158 -0
- package/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +1 -1
- package/es/components/popover/popover.js +2 -2
- package/es/components/selectable/selectable.js +4 -3
- package/es/components/selectable/selectable_list/selectable_list.js +17 -5
- package/es/components/table/table_footer_cell.js +1 -1
- package/es/components/table/table_header_cell.js +1 -1
- package/es/components/table/table_row_cell.js +2 -2
- package/es/components/tabs/tab.js +7 -17
- package/es/components/tabs/tabbed_content/tabbed_content.js +0 -16
- package/es/components/tabs/tabs.js +7 -11
- package/es/components/tabs/tabs_context.js +13 -0
- package/es/services/color/manipulation.js +9 -0
- package/es/services/index.js +11 -11
- package/eui.d.ts +195 -138
- package/i18ntokens.json +46 -30
- package/lib/components/basic_table/basic_table.js +2 -2
- package/lib/components/basic_table/in_memory_table.js +3 -6
- package/lib/components/basic_table/table.a11y.js +139 -0
- package/lib/components/color_picker/color_picker.styles.js +26 -0
- package/lib/components/color_picker/color_stops/color_stop_thumb.js +19 -6
- package/lib/components/color_picker/color_stops/color_stop_thumb.styles.js +69 -0
- package/lib/components/color_picker/color_stops/color_stops.js +25 -14
- package/lib/components/color_picker/color_stops/color_stops.styles.js +73 -0
- package/lib/components/date_picker/auto_refresh/refresh_interval.js +3 -1
- package/lib/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +155 -168
- package/lib/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +16 -0
- package/lib/components/error_boundary/error_boundary.a11y.js +75 -0
- package/lib/components/expression/expression.a11y.js +262 -0
- package/lib/components/filter_group/filter_group.a11y.js +287 -0
- package/lib/components/focus_trap/focus_trap.a11y.js +140 -0
- package/lib/components/form/file_picker/file_picker.js +1 -0
- package/lib/components/form/range/range_highlight.styles.js +1 -1
- package/lib/components/form/range/range_levels.styles.js +1 -1
- package/lib/components/form/range/range_track.js +6 -2
- package/lib/components/header/header.a11y.js +385 -0
- package/lib/components/icon/icon_ML.a11y.js +40 -0
- package/lib/components/icon/icon_apps.a11y.js +40 -0
- package/lib/components/icon/icon_editor.a11y.js +40 -0
- package/lib/components/icon/icon_elastic.a11y.js +40 -0
- package/lib/components/icon/icon_glyphs.a11y.js +40 -0
- package/lib/components/icon/icon_tokens.a11y.js +40 -0
- package/lib/components/image/image.a11y.js +61 -0
- package/lib/components/key_pad_menu/key_pad_menu.a11y.js +163 -0
- package/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -2
- package/lib/components/popover/popover.js +2 -2
- package/lib/components/selectable/selectable.js +4 -3
- package/lib/components/selectable/selectable_list/selectable_list.js +17 -5
- package/lib/components/table/table_footer_cell.js +1 -1
- package/lib/components/table/table_header_cell.js +1 -1
- package/lib/components/table/table_row_cell.js +2 -2
- package/lib/components/tabs/tab.js +14 -17
- package/lib/components/tabs/tabbed_content/tabbed_content.js +0 -16
- package/lib/components/tabs/tabs.js +8 -14
- package/lib/components/tabs/tabs_context.js +23 -0
- package/lib/services/color/manipulation.js +14 -2
- package/lib/services/index.js +65 -58
- package/optimize/es/components/basic_table/table.a11y.js +128 -0
- package/optimize/es/components/color_picker/color_picker.styles.js +16 -0
- package/optimize/es/components/color_picker/color_stops/color_stop_thumb.js +19 -7
- package/optimize/es/components/color_picker/color_stops/color_stop_thumb.styles.js +59 -0
- package/optimize/es/components/color_picker/color_stops/color_stops.js +25 -15
- package/optimize/es/components/color_picker/color_stops/color_stops.styles.js +65 -0
- package/optimize/es/components/date_picker/auto_refresh/refresh_interval.js +3 -1
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +145 -169
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +2 -0
- package/optimize/es/components/error_boundary/error_boundary.a11y.js +67 -0
- package/optimize/es/components/expression/expression.a11y.js +243 -0
- package/optimize/es/components/filter_group/filter_group.a11y.js +271 -0
- package/optimize/es/components/focus_trap/focus_trap.a11y.js +120 -0
- package/optimize/es/components/form/file_picker/file_picker.js +1 -0
- package/optimize/es/components/form/range/range_highlight.styles.js +1 -1
- package/optimize/es/components/form/range/range_levels.styles.js +1 -1
- package/optimize/es/components/form/range/range_track.js +5 -2
- package/optimize/es/components/header/header.a11y.js +364 -0
- package/optimize/es/components/icon/icon_ML.a11y.js +33 -0
- package/optimize/es/components/icon/icon_apps.a11y.js +33 -0
- package/optimize/es/components/icon/icon_editor.a11y.js +33 -0
- package/optimize/es/components/icon/icon_elastic.a11y.js +33 -0
- package/optimize/es/components/icon/icon_glyphs.a11y.js +33 -0
- package/optimize/es/components/icon/icon_tokens.a11y.js +33 -0
- package/optimize/es/components/image/image.a11y.js +55 -0
- package/optimize/es/components/key_pad_menu/key_pad_menu.a11y.js +148 -0
- package/optimize/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +1 -1
- package/optimize/es/components/popover/popover.js +2 -2
- package/optimize/es/components/selectable/selectable.js +2 -2
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +15 -4
- package/optimize/es/components/tabs/tab.js +7 -5
- package/optimize/es/components/tabs/tabs.js +7 -11
- package/optimize/es/components/tabs/tabs_context.js +13 -0
- package/optimize/es/services/color/manipulation.js +9 -0
- package/optimize/es/services/index.js +11 -11
- package/optimize/lib/components/basic_table/table.a11y.js +139 -0
- package/optimize/lib/components/color_picker/color_picker.styles.js +26 -0
- package/optimize/lib/components/color_picker/color_stops/color_stop_thumb.js +19 -6
- package/optimize/lib/components/color_picker/color_stops/color_stop_thumb.styles.js +69 -0
- package/optimize/lib/components/color_picker/color_stops/color_stops.js +25 -14
- package/optimize/lib/components/color_picker/color_stops/color_stops.styles.js +73 -0
- package/optimize/lib/components/date_picker/auto_refresh/refresh_interval.js +3 -1
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +146 -167
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +2 -0
- package/optimize/lib/components/error_boundary/error_boundary.a11y.js +75 -0
- package/optimize/lib/components/expression/expression.a11y.js +254 -0
- package/optimize/lib/components/filter_group/filter_group.a11y.js +287 -0
- package/optimize/lib/components/focus_trap/focus_trap.a11y.js +140 -0
- package/optimize/lib/components/form/file_picker/file_picker.js +1 -0
- package/optimize/lib/components/form/range/range_highlight.styles.js +1 -1
- package/optimize/lib/components/form/range/range_levels.styles.js +1 -1
- package/optimize/lib/components/form/range/range_track.js +6 -2
- package/optimize/lib/components/header/header.a11y.js +385 -0
- package/optimize/lib/components/icon/icon_ML.a11y.js +40 -0
- package/optimize/lib/components/icon/icon_apps.a11y.js +40 -0
- package/optimize/lib/components/icon/icon_editor.a11y.js +40 -0
- package/optimize/lib/components/icon/icon_elastic.a11y.js +40 -0
- package/optimize/lib/components/icon/icon_glyphs.a11y.js +40 -0
- package/optimize/lib/components/icon/icon_tokens.a11y.js +40 -0
- package/optimize/lib/components/image/image.a11y.js +61 -0
- package/optimize/lib/components/key_pad_menu/key_pad_menu.a11y.js +163 -0
- package/optimize/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -2
- package/optimize/lib/components/popover/popover.js +2 -2
- package/optimize/lib/components/selectable/selectable.js +2 -2
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +15 -4
- package/optimize/lib/components/tabs/tab.js +15 -5
- package/optimize/lib/components/tabs/tabs.js +8 -14
- package/optimize/lib/components/tabs/tabs_context.js +23 -0
- package/optimize/lib/services/color/manipulation.js +14 -2
- package/optimize/lib/services/index.js +65 -58
- package/package.json +4 -6
- package/src/components/color_picker/_index.scss +0 -1
- package/src/components/date_picker/super_date_picker/quick_select_popover/_quick_select_popover.scss +14 -0
- package/src/components/form/file_picker/_file_picker.scss +14 -14
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/basic_table/basic_table.js +2 -2
- package/test-env/components/basic_table/in_memory_table.js +3 -6
- package/test-env/components/basic_table/table.a11y.js +139 -0
- package/test-env/components/color_picker/color_picker.styles.js +26 -0
- package/test-env/components/color_picker/color_stops/color_stop_thumb.js +19 -6
- package/test-env/components/color_picker/color_stops/color_stop_thumb.styles.js +69 -0
- package/test-env/components/color_picker/color_stops/color_stops.js +25 -14
- package/test-env/components/color_picker/color_stops/color_stops.styles.js +73 -0
- package/test-env/components/date_picker/auto_refresh/refresh_interval.js +3 -1
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +153 -166
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +16 -0
- package/test-env/components/error_boundary/error_boundary.a11y.js +75 -0
- package/test-env/components/expression/expression.a11y.js +254 -0
- package/test-env/components/filter_group/filter_group.a11y.js +287 -0
- package/test-env/components/focus_trap/focus_trap.a11y.js +140 -0
- package/test-env/components/form/file_picker/file_picker.js +1 -0
- package/test-env/components/form/range/range_highlight.styles.js +1 -1
- package/test-env/components/form/range/range_levels.styles.js +1 -1
- package/test-env/components/form/range/range_track.js +6 -2
- package/test-env/components/header/header.a11y.js +385 -0
- package/test-env/components/icon/icon_ML.a11y.js +40 -0
- package/test-env/components/icon/icon_apps.a11y.js +40 -0
- package/test-env/components/icon/icon_editor.a11y.js +40 -0
- package/test-env/components/icon/icon_elastic.a11y.js +40 -0
- package/test-env/components/icon/icon_glyphs.a11y.js +40 -0
- package/test-env/components/icon/icon_tokens.a11y.js +40 -0
- package/test-env/components/image/image.a11y.js +61 -0
- package/test-env/components/key_pad_menu/key_pad_menu.a11y.js +163 -0
- package/test-env/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -2
- package/test-env/components/popover/popover.js +2 -2
- package/test-env/components/selectable/selectable.js +4 -3
- package/test-env/components/selectable/selectable_list/selectable_list.js +17 -5
- package/test-env/components/table/table_footer_cell.js +1 -1
- package/test-env/components/table/table_header_cell.js +1 -1
- package/test-env/components/table/table_row_cell.js +2 -2
- package/test-env/components/tabs/tab.js +15 -17
- package/test-env/components/tabs/tabbed_content/tabbed_content.js +0 -16
- package/test-env/components/tabs/tabs.js +8 -14
- package/test-env/components/tabs/tabs_context.js +23 -0
- package/test-env/services/color/manipulation.js +14 -2
- package/test-env/services/index.js +65 -58
- package/src/components/color_picker/color_stops/_color_stops.scss +0 -101
- package/src/components/color_picker/color_stops/_index.scss +0 -1
- package/src/themes/amsterdam/overrides/_color_stops.scss +0 -58
package/i18ntokens.json
CHANGED
|
@@ -485,11 +485,11 @@
|
|
|
485
485
|
"highlighting": "string",
|
|
486
486
|
"loc": {
|
|
487
487
|
"start": {
|
|
488
|
-
"line":
|
|
488
|
+
"line": 290,
|
|
489
489
|
"column": 8
|
|
490
490
|
},
|
|
491
491
|
"end": {
|
|
492
|
-
"line":
|
|
492
|
+
"line": 299,
|
|
493
493
|
"column": 9
|
|
494
494
|
}
|
|
495
495
|
},
|
|
@@ -501,11 +501,11 @@
|
|
|
501
501
|
"highlighting": "string",
|
|
502
502
|
"loc": {
|
|
503
503
|
"start": {
|
|
504
|
-
"line":
|
|
504
|
+
"line": 290,
|
|
505
505
|
"column": 8
|
|
506
506
|
},
|
|
507
507
|
"end": {
|
|
508
|
-
"line":
|
|
508
|
+
"line": 299,
|
|
509
509
|
"column": 9
|
|
510
510
|
}
|
|
511
511
|
},
|
|
@@ -517,11 +517,11 @@
|
|
|
517
517
|
"highlighting": "string",
|
|
518
518
|
"loc": {
|
|
519
519
|
"start": {
|
|
520
|
-
"line":
|
|
520
|
+
"line": 341,
|
|
521
521
|
"column": 12
|
|
522
522
|
},
|
|
523
523
|
"end": {
|
|
524
|
-
"line":
|
|
524
|
+
"line": 346,
|
|
525
525
|
"column": 14
|
|
526
526
|
}
|
|
527
527
|
},
|
|
@@ -533,11 +533,11 @@
|
|
|
533
533
|
"highlighting": "string",
|
|
534
534
|
"loc": {
|
|
535
535
|
"start": {
|
|
536
|
-
"line":
|
|
536
|
+
"line": 351,
|
|
537
537
|
"column": 12
|
|
538
538
|
},
|
|
539
539
|
"end": {
|
|
540
|
-
"line":
|
|
540
|
+
"line": 357,
|
|
541
541
|
"column": 13
|
|
542
542
|
}
|
|
543
543
|
},
|
|
@@ -549,11 +549,11 @@
|
|
|
549
549
|
"highlighting": "string",
|
|
550
550
|
"loc": {
|
|
551
551
|
"start": {
|
|
552
|
-
"line":
|
|
552
|
+
"line": 351,
|
|
553
553
|
"column": 12
|
|
554
554
|
},
|
|
555
555
|
"end": {
|
|
556
|
-
"line":
|
|
556
|
+
"line": 357,
|
|
557
557
|
"column": 13
|
|
558
558
|
}
|
|
559
559
|
},
|
|
@@ -565,11 +565,11 @@
|
|
|
565
565
|
"highlighting": "string",
|
|
566
566
|
"loc": {
|
|
567
567
|
"start": {
|
|
568
|
-
"line":
|
|
568
|
+
"line": 383,
|
|
569
569
|
"column": 16
|
|
570
570
|
},
|
|
571
571
|
"end": {
|
|
572
|
-
"line":
|
|
572
|
+
"line": 386,
|
|
573
573
|
"column": 17
|
|
574
574
|
}
|
|
575
575
|
},
|
|
@@ -581,11 +581,11 @@
|
|
|
581
581
|
"highlighting": "string",
|
|
582
582
|
"loc": {
|
|
583
583
|
"start": {
|
|
584
|
-
"line":
|
|
584
|
+
"line": 534,
|
|
585
585
|
"column": 10
|
|
586
586
|
},
|
|
587
587
|
"end": {
|
|
588
|
-
"line":
|
|
588
|
+
"line": 542,
|
|
589
589
|
"column": 12
|
|
590
590
|
}
|
|
591
591
|
},
|
|
@@ -3151,6 +3151,22 @@
|
|
|
3151
3151
|
},
|
|
3152
3152
|
"filepath": "src/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.tsx"
|
|
3153
3153
|
},
|
|
3154
|
+
{
|
|
3155
|
+
"token": "euiQuickSelectPopover.buttonLabel",
|
|
3156
|
+
"defString": "Date quick select",
|
|
3157
|
+
"highlighting": "string",
|
|
3158
|
+
"loc": {
|
|
3159
|
+
"start": {
|
|
3160
|
+
"line": 86,
|
|
3161
|
+
"column": 22
|
|
3162
|
+
},
|
|
3163
|
+
"end": {
|
|
3164
|
+
"line": 89,
|
|
3165
|
+
"column": 3
|
|
3166
|
+
}
|
|
3167
|
+
},
|
|
3168
|
+
"filepath": "src/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.tsx"
|
|
3169
|
+
},
|
|
3154
3170
|
{
|
|
3155
3171
|
"token": "euiQuickSelect.legendText",
|
|
3156
3172
|
"defString": "Quick select a time range",
|
|
@@ -5093,11 +5109,11 @@
|
|
|
5093
5109
|
"highlighting": "string",
|
|
5094
5110
|
"loc": {
|
|
5095
5111
|
"start": {
|
|
5096
|
-
"line":
|
|
5112
|
+
"line": 688,
|
|
5097
5113
|
"column": 16
|
|
5098
5114
|
},
|
|
5099
5115
|
"end": {
|
|
5100
|
-
"line":
|
|
5116
|
+
"line": 691,
|
|
5101
5117
|
"column": 18
|
|
5102
5118
|
}
|
|
5103
5119
|
},
|
|
@@ -5349,11 +5365,11 @@
|
|
|
5349
5365
|
"highlighting": "string",
|
|
5350
5366
|
"loc": {
|
|
5351
5367
|
"start": {
|
|
5352
|
-
"line":
|
|
5368
|
+
"line": 570,
|
|
5353
5369
|
"column": 16
|
|
5354
5370
|
},
|
|
5355
5371
|
"end": {
|
|
5356
|
-
"line":
|
|
5372
|
+
"line": 573,
|
|
5357
5373
|
"column": 18
|
|
5358
5374
|
}
|
|
5359
5375
|
},
|
|
@@ -5365,11 +5381,11 @@
|
|
|
5365
5381
|
"highlighting": "string",
|
|
5366
5382
|
"loc": {
|
|
5367
5383
|
"start": {
|
|
5368
|
-
"line":
|
|
5384
|
+
"line": 592,
|
|
5369
5385
|
"column": 14
|
|
5370
5386
|
},
|
|
5371
5387
|
"end": {
|
|
5372
|
-
"line":
|
|
5388
|
+
"line": 596,
|
|
5373
5389
|
"column": 16
|
|
5374
5390
|
}
|
|
5375
5391
|
},
|
|
@@ -5381,11 +5397,11 @@
|
|
|
5381
5397
|
"highlighting": "string",
|
|
5382
5398
|
"loc": {
|
|
5383
5399
|
"start": {
|
|
5384
|
-
"line":
|
|
5400
|
+
"line": 611,
|
|
5385
5401
|
"column": 14
|
|
5386
5402
|
},
|
|
5387
5403
|
"end": {
|
|
5388
|
-
"line":
|
|
5404
|
+
"line": 614,
|
|
5389
5405
|
"column": 16
|
|
5390
5406
|
}
|
|
5391
5407
|
},
|
|
@@ -5397,11 +5413,11 @@
|
|
|
5397
5413
|
"highlighting": "string",
|
|
5398
5414
|
"loc": {
|
|
5399
5415
|
"start": {
|
|
5400
|
-
"line":
|
|
5416
|
+
"line": 676,
|
|
5401
5417
|
"column": 6
|
|
5402
5418
|
},
|
|
5403
5419
|
"end": {
|
|
5404
|
-
"line":
|
|
5420
|
+
"line": 676,
|
|
5405
5421
|
"column": 78
|
|
5406
5422
|
}
|
|
5407
5423
|
},
|
|
@@ -5413,11 +5429,11 @@
|
|
|
5413
5429
|
"highlighting": "code",
|
|
5414
5430
|
"loc": {
|
|
5415
5431
|
"start": {
|
|
5416
|
-
"line":
|
|
5432
|
+
"line": 703,
|
|
5417
5433
|
"column": 6
|
|
5418
5434
|
},
|
|
5419
5435
|
"end": {
|
|
5420
|
-
"line":
|
|
5436
|
+
"line": 709,
|
|
5421
5437
|
"column": 8
|
|
5422
5438
|
}
|
|
5423
5439
|
},
|
|
@@ -5429,11 +5445,11 @@
|
|
|
5429
5445
|
"highlighting": "string",
|
|
5430
5446
|
"loc": {
|
|
5431
5447
|
"start": {
|
|
5432
|
-
"line":
|
|
5448
|
+
"line": 721,
|
|
5433
5449
|
"column": 6
|
|
5434
5450
|
},
|
|
5435
5451
|
"end": {
|
|
5436
|
-
"line":
|
|
5452
|
+
"line": 730,
|
|
5437
5453
|
"column": 7
|
|
5438
5454
|
}
|
|
5439
5455
|
},
|
|
@@ -5445,11 +5461,11 @@
|
|
|
5445
5461
|
"highlighting": "string",
|
|
5446
5462
|
"loc": {
|
|
5447
5463
|
"start": {
|
|
5448
|
-
"line":
|
|
5464
|
+
"line": 721,
|
|
5449
5465
|
"column": 6
|
|
5450
5466
|
},
|
|
5451
5467
|
"end": {
|
|
5452
|
-
"line":
|
|
5468
|
+
"line": 730,
|
|
5453
5469
|
"column": 7
|
|
5454
5470
|
}
|
|
5455
5471
|
},
|
|
@@ -1261,7 +1261,7 @@ EuiBasicTable.propTypes = {
|
|
|
1261
1261
|
/**
|
|
1262
1262
|
* Defines the horizontal alignment of the column
|
|
1263
1263
|
*/
|
|
1264
|
-
align: _propTypes.default.
|
|
1264
|
+
align: _propTypes.default.any,
|
|
1265
1265
|
|
|
1266
1266
|
/**
|
|
1267
1267
|
* Indicates whether this column should truncate its content when it doesn't fit
|
|
@@ -1320,7 +1320,7 @@ EuiBasicTable.propTypes = {
|
|
|
1320
1320
|
*/
|
|
1321
1321
|
truncateText: _propTypes.default.bool,
|
|
1322
1322
|
isExpander: _propTypes.default.bool,
|
|
1323
|
-
align: _propTypes.default.
|
|
1323
|
+
align: _propTypes.default.any,
|
|
1324
1324
|
|
|
1325
1325
|
/**
|
|
1326
1326
|
* Disables the user's ability to change the sort but still shows the current direction
|
|
@@ -686,7 +686,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
686
686
|
/**
|
|
687
687
|
* Defines the horizontal alignment of the column
|
|
688
688
|
*/
|
|
689
|
-
align: _propTypes.default.
|
|
689
|
+
align: _propTypes.default.any,
|
|
690
690
|
|
|
691
691
|
/**
|
|
692
692
|
* Indicates whether this column should truncate its content when it doesn't fit
|
|
@@ -745,7 +745,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
745
745
|
*/
|
|
746
746
|
truncateText: _propTypes.default.bool,
|
|
747
747
|
isExpander: _propTypes.default.bool,
|
|
748
|
-
align: _propTypes.default.
|
|
748
|
+
align: _propTypes.default.any,
|
|
749
749
|
|
|
750
750
|
/**
|
|
751
751
|
* Disables the user's ability to change the sort but still shows the current direction
|
|
@@ -1200,10 +1200,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
1200
1200
|
"aria-label": _propTypes.default.string
|
|
1201
1201
|
}).isRequired])]),
|
|
1202
1202
|
sorting: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.shape({
|
|
1203
|
-
sort: _propTypes.default.
|
|
1204
|
-
field: _propTypes.default.string.isRequired,
|
|
1205
|
-
direction: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.any.isRequired]).isRequired
|
|
1206
|
-
}).isRequired
|
|
1203
|
+
sort: _propTypes.default.any.isRequired
|
|
1207
1204
|
}).isRequired]),
|
|
1208
1205
|
|
|
1209
1206
|
/**
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _in_memory_table = require("./in_memory_table");
|
|
6
|
+
|
|
7
|
+
var _health = require("../health");
|
|
8
|
+
|
|
9
|
+
var _link = require("../link");
|
|
10
|
+
|
|
11
|
+
var _services = require("../../services");
|
|
12
|
+
|
|
13
|
+
var _data_store = require("../../../src-docs/src/views/tables/data_store");
|
|
14
|
+
|
|
15
|
+
var _react2 = require("@emotion/react");
|
|
16
|
+
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
21
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
22
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
23
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
24
|
+
* Side Public License, v 1.
|
|
25
|
+
*/
|
|
26
|
+
/// <reference types="../../../cypress/support"/>
|
|
27
|
+
var store = (0, _data_store.createDataStore)();
|
|
28
|
+
|
|
29
|
+
var InMemoryTable = function InMemoryTable() {
|
|
30
|
+
var columns = [{
|
|
31
|
+
field: 'firstName',
|
|
32
|
+
name: 'First Name',
|
|
33
|
+
sortable: true,
|
|
34
|
+
truncateText: true
|
|
35
|
+
}, {
|
|
36
|
+
field: 'lastName',
|
|
37
|
+
name: 'Last Name',
|
|
38
|
+
truncateText: true
|
|
39
|
+
}, {
|
|
40
|
+
field: 'github',
|
|
41
|
+
name: 'Github',
|
|
42
|
+
render: function render(username) {
|
|
43
|
+
return (0, _react2.jsx)(_link.EuiLink, {
|
|
44
|
+
href: "https://github.com/".concat(username),
|
|
45
|
+
target: "_blank"
|
|
46
|
+
}, username);
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
field: 'dateOfBirth',
|
|
50
|
+
name: 'Date of Birth',
|
|
51
|
+
dataType: 'date',
|
|
52
|
+
render: function render(date) {
|
|
53
|
+
return (0, _services.formatDate)(date, 'dobLong');
|
|
54
|
+
},
|
|
55
|
+
sortable: true
|
|
56
|
+
}, {
|
|
57
|
+
field: 'nationality',
|
|
58
|
+
name: 'Nationality',
|
|
59
|
+
render: function render(countryCode) {
|
|
60
|
+
var country = store.getCountry(countryCode);
|
|
61
|
+
return "".concat(country.flag, " ").concat(country.name);
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
field: 'online',
|
|
65
|
+
name: 'Online',
|
|
66
|
+
dataType: 'boolean',
|
|
67
|
+
render: function render(online) {
|
|
68
|
+
var color = online ? 'success' : 'danger';
|
|
69
|
+
var label = online ? 'Online' : 'Offline';
|
|
70
|
+
return (0, _react2.jsx)(_health.EuiHealth, {
|
|
71
|
+
color: color
|
|
72
|
+
}, label);
|
|
73
|
+
},
|
|
74
|
+
sortable: true
|
|
75
|
+
}];
|
|
76
|
+
var sorting = {
|
|
77
|
+
sort: {
|
|
78
|
+
field: 'dateOfBirth',
|
|
79
|
+
direction: 'desc'
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
return (0, _react2.jsx)(_in_memory_table.EuiInMemoryTable, {
|
|
83
|
+
"data-test-subj": "cy-in-memory-table",
|
|
84
|
+
tableCaption: "Demo of EuiInMemoryTable",
|
|
85
|
+
items: store.users,
|
|
86
|
+
columns: columns,
|
|
87
|
+
pagination: true,
|
|
88
|
+
sorting: sorting
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
beforeEach(function () {
|
|
93
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
94
|
+
|
|
95
|
+
cy.realMount((0, _react2.jsx)(InMemoryTable, null));
|
|
96
|
+
cy.get('div[data-test-subj="cy-in-memory-table"]').should('exist');
|
|
97
|
+
});
|
|
98
|
+
describe('EuiInMemoryTable', function () {
|
|
99
|
+
describe('Automated accessibility check', function () {
|
|
100
|
+
it('has zero violations on first render', function () {
|
|
101
|
+
cy.checkAxe();
|
|
102
|
+
});
|
|
103
|
+
it('has zero violations on pagination click', function () {
|
|
104
|
+
cy.get('a[data-test-subj="pagination-button-1"]').realClick();
|
|
105
|
+
cy.get('button[data-test-subj="pagination-button-1"]').should('be.disabled');
|
|
106
|
+
cy.checkAxe();
|
|
107
|
+
});
|
|
108
|
+
it('has zero violations after number of rows is increased', function () {
|
|
109
|
+
cy.get('button[data-test-subj="tablePaginationPopoverButton"]').realClick();
|
|
110
|
+
cy.get('div[data-popover-open="true"]').should('exist');
|
|
111
|
+
cy.get('button[data-test-subj="tablePagination-25-rows"]').realClick();
|
|
112
|
+
cy.get('table.euiTable').find('tr.euiTableRow').should('have.length', 20);
|
|
113
|
+
cy.checkAxe();
|
|
114
|
+
});
|
|
115
|
+
it('has zero violations after sorting on a column', function () {
|
|
116
|
+
cy.realPress('Tab');
|
|
117
|
+
cy.get('button[data-test-subj="tableHeaderSortButton"]').first().should('have.focus');
|
|
118
|
+
cy.realPress('Enter');
|
|
119
|
+
cy.get('tbody tr.euiTableRow span.euiTableCellContent__text').first().contains('Another very long first name which will wrap or be truncated');
|
|
120
|
+
});
|
|
121
|
+
it('has zero violations when number of rows is increased by keyboard', function () {
|
|
122
|
+
cy.repeatRealPress('Tab', 14);
|
|
123
|
+
cy.get('button[data-test-subj="tablePaginationPopoverButton"]').should('have.focus').realPress('Space');
|
|
124
|
+
cy.get('div[data-popover-open="true"]').should('exist');
|
|
125
|
+
cy.get('div[data-popover-open="true"]').should('have.focus');
|
|
126
|
+
cy.repeatRealPress('Tab'); // Switched to Tab from ArrowDown because of flaky test runs
|
|
127
|
+
|
|
128
|
+
cy.get('button[data-test-subj="tablePagination-25-rows"]').realPress('Space');
|
|
129
|
+
cy.get('table.euiTable').find('tr.euiTableRow').should('have.length', 20);
|
|
130
|
+
cy.checkAxe();
|
|
131
|
+
});
|
|
132
|
+
it('has zero violations when pagination is pressed', function () {
|
|
133
|
+
cy.repeatRealPress('Tab', 15);
|
|
134
|
+
cy.get('a[data-test-subj="pagination-button-1"]').should('have.focus').realPress('Enter');
|
|
135
|
+
cy.get('button[data-test-subj="pagination-button-1"]').should('be.disabled');
|
|
136
|
+
cy.checkAxe();
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiColorPickerVariables = void 0;
|
|
7
|
+
|
|
8
|
+
var _global_styling = require("../../global_styling");
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
var euiColorPickerVariables = function euiColorPickerVariables(euiThemeContext) {
|
|
18
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
19
|
+
return {
|
|
20
|
+
width: (0, _global_styling.mathWithUnits)([euiTheme.size.l, euiTheme.size.s], function (x, y) {
|
|
21
|
+
return x * 5 + y * 4;
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.euiColorPickerVariables = euiColorPickerVariables;
|
|
@@ -37,6 +37,8 @@ var _spacer = require("../../spacer");
|
|
|
37
37
|
|
|
38
38
|
var _range_thumb = require("../../form/range/range_thumb");
|
|
39
39
|
|
|
40
|
+
var _color_stop_thumb = require("./color_stop_thumb.styles");
|
|
41
|
+
|
|
40
42
|
var _react2 = require("@emotion/react");
|
|
41
43
|
|
|
42
44
|
var _excluded = ["className", "stop", "color", "onChange", "onFocus", "onRemove", "globalMin", "globalMax", "localMin", "localMax", "min", "max", "isRangeMin", "isRangeMax", "parentRef", "colorPickerMode", "colorPickerShowAlpha", "colorPickerSwatches", "disabled", "readOnly", "isPopoverOpen", "openPopover", "closePopover", "data-index", "aria-valuetext", "style", "valueInputProps"];
|
|
@@ -277,13 +279,20 @@ var EuiColorStopThumb = function EuiColorStopThumb(_ref) {
|
|
|
277
279
|
}
|
|
278
280
|
};
|
|
279
281
|
|
|
280
|
-
var
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
283
|
+
var popoverStyles = (0, _color_stop_thumb.euiColorStopThumbPopoverStyles)(euiTheme);
|
|
284
|
+
var cssPopoverStyles = [popoverStyles.euiColorStopThumbPopover, (hasFocus || isPopoverOpen) && popoverStyles.hasFocus];
|
|
285
|
+
var thumbStyles = (0, _color_stop_thumb.euiColorStopThumbStyles)(euiTheme);
|
|
286
|
+
var cssThumbStyles = [thumbStyles.euiColorStopThumb, isPopoverOpen && thumbStyles.isPopoverOpen];
|
|
287
|
+
var colorStopStyles = (0, _color_stop_thumb.euiColorStopStyles)(euiTheme);
|
|
288
|
+
var cssColorStopStyles = colorStopStyles.euiColorStop;
|
|
289
|
+
var classes = (0, _classnames.default)('euiColorStopPopover', className);
|
|
290
|
+
return (0, _react2.jsx)(_popover.EuiPopover, _extends({
|
|
291
|
+
css: cssPopoverStyles
|
|
292
|
+
}, rest, {
|
|
284
293
|
ref: popoverRef,
|
|
285
294
|
className: classes,
|
|
286
|
-
anchorClassName: "
|
|
295
|
+
anchorClassName: "euiColorStopThumbPopover__anchor",
|
|
287
296
|
panelPaddingSize: "s",
|
|
288
297
|
isOpen: isPopoverOpen,
|
|
289
298
|
closePopover: closePopover,
|
|
@@ -291,7 +300,9 @@ var EuiColorStopThumb = function EuiColorStopThumb(_ref) {
|
|
|
291
300
|
focusTrapProps: {
|
|
292
301
|
clickOutsideDisables: false
|
|
293
302
|
},
|
|
294
|
-
|
|
303
|
+
panelProps: {
|
|
304
|
+
css: numberInputRef ? undefined : popoverStyles.isLoadingPanel
|
|
305
|
+
},
|
|
295
306
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
296
307
|
left: "".concat(getPositionFromStopFn(stop), "%")
|
|
297
308
|
}),
|
|
@@ -323,6 +334,7 @@ var EuiColorStopThumb = function EuiColorStopThumb(_ref) {
|
|
|
323
334
|
"aria-label": ariaLabel,
|
|
324
335
|
title: title,
|
|
325
336
|
className: "euiColorStopThumb",
|
|
337
|
+
css: cssThumbStyles,
|
|
326
338
|
tabIndex: -1,
|
|
327
339
|
style: {
|
|
328
340
|
background: background
|
|
@@ -332,6 +344,7 @@ var EuiColorStopThumb = function EuiColorStopThumb(_ref) {
|
|
|
332
344
|
})
|
|
333
345
|
}), (0, _react2.jsx)("div", {
|
|
334
346
|
className: "euiColorStop",
|
|
347
|
+
css: cssColorStopStyles,
|
|
335
348
|
"data-test-subj": "euiColorStopPopover"
|
|
336
349
|
}, (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", {
|
|
337
350
|
"aria-live": "polite"
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiColorStopThumbStyles = exports.euiColorStopThumbPopoverStyles = exports.euiColorStopStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../../global_styling");
|
|
11
|
+
|
|
12
|
+
var _range = require("../../form/range/range.styles");
|
|
13
|
+
|
|
14
|
+
var _color_picker = require("../color_picker.styles");
|
|
15
|
+
|
|
16
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
17
|
+
|
|
18
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
19
|
+
name: "zrzkfg-euiColorStopThumb",
|
|
20
|
+
styles: "&:not(:disabled){inset-block-start:0;margin-block-start:0;pointer-events:auto;cursor:grab;&:active{cursor:grabbing;}};label:euiColorStopThumb;"
|
|
21
|
+
} : {
|
|
22
|
+
name: "zrzkfg-euiColorStopThumb",
|
|
23
|
+
styles: "&:not(:disabled){inset-block-start:0;margin-block-start:0;pointer-events:auto;cursor:grab;&:active{cursor:grabbing;}};label:euiColorStopThumb;",
|
|
24
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var euiColorStopThumbStyles = function euiColorStopThumbStyles(euiThemeContext) {
|
|
28
|
+
return {
|
|
29
|
+
// Base
|
|
30
|
+
euiColorStopThumb: _ref2,
|
|
31
|
+
isPopoverOpen: /*#__PURE__*/(0, _react.css)((0, _range.euiRangeThumbFocus)(euiThemeContext), ";;label:isPopoverOpen;")
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.euiColorStopThumbStyles = euiColorStopThumbStyles;
|
|
36
|
+
|
|
37
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
38
|
+
name: "1wndm4s-isLoadingPanel",
|
|
39
|
+
styles: "visibility:hidden!important;label:isLoadingPanel;"
|
|
40
|
+
} : {
|
|
41
|
+
name: "1wndm4s-isLoadingPanel",
|
|
42
|
+
styles: "visibility:hidden!important;label:isLoadingPanel;",
|
|
43
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var euiColorStopThumbPopoverStyles = function euiColorStopThumbPopoverStyles(euiThemeContext) {
|
|
47
|
+
var range = (0, _range.euiRangeVariables)(euiThemeContext);
|
|
48
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
49
|
+
return {
|
|
50
|
+
// Base
|
|
51
|
+
euiColorStopThumbPopover: /*#__PURE__*/(0, _react.css)("position:absolute;inset-block-start:50%;inline-size:", range.thumbWidth, ";block-size:", range.thumbHeight, ";margin-block-start:", (0, _global_styling.mathWithUnits)(range.thumbHeight, function (x) {
|
|
52
|
+
return x * -0.5;
|
|
53
|
+
}), ";.euiColorStopThumbPopover__anchor{position:absolute;inline-size:100%;block-size:100%;&::before{content:'';display:block;position:absolute;inset-inline-start:0;inset-block-start:0;block-size:", range.thumbHeight, ";inline-size:", range.thumbWidth, ";border-radius:", range.thumbHeight, ";background:", euiTheme.colors.emptyShade, ";}};label:euiColorStopThumbPopover;"),
|
|
54
|
+
isLoadingPanel: _ref,
|
|
55
|
+
hasFocus: /*#__PURE__*/(0, _react.css)("z-index:", range.thumbZIndex, ";;label:hasFocus;")
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
exports.euiColorStopThumbPopoverStyles = euiColorStopThumbPopoverStyles;
|
|
60
|
+
|
|
61
|
+
var euiColorStopStyles = function euiColorStopStyles(euiThemeContext) {
|
|
62
|
+
var colorPicker = (0, _color_picker.euiColorPickerVariables)(euiThemeContext);
|
|
63
|
+
return {
|
|
64
|
+
// Base
|
|
65
|
+
euiColorStop: /*#__PURE__*/(0, _react.css)("inline-size:", colorPicker.width, ";;label:euiColorStop;")
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
exports.euiColorStopStyles = euiColorStopStyles;
|
|
@@ -31,6 +31,8 @@ var _range_track = require("../../form/range/range_track");
|
|
|
31
31
|
|
|
32
32
|
var _range_wrapper = require("../../form/range/range_wrapper");
|
|
33
33
|
|
|
34
|
+
var _color_stops = require("./color_stops.styles");
|
|
35
|
+
|
|
34
36
|
var _react2 = require("@emotion/react");
|
|
35
37
|
|
|
36
38
|
var _excluded = ["addColor", "max", "min", "mode", "colorStops", "onChange", "disabled", "readOnly", "compressed", "fullWidth", "className", "label", "stopType", "stepNumber", "swatches", "showAlpha", "valueInputProps"];
|
|
@@ -210,11 +212,16 @@ var EuiColorStops = function EuiColorStops(_ref) {
|
|
|
210
212
|
setFocusStopOnUpdate = _useState14[1];
|
|
211
213
|
|
|
212
214
|
var isNotInteractive = disabled || readOnly;
|
|
213
|
-
var
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
var isDragging = isHoverDisabled && !isNotInteractive;
|
|
216
|
+
var addContainerIsDisabled = isHoverDisabled || isNotInteractive;
|
|
217
|
+
var classes = (0, _classnames.default)('euiColorStops', className);
|
|
218
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
219
|
+
var styles = (0, _color_stops.euiColorStopsStyles)(euiTheme);
|
|
220
|
+
var cssPopoverStyles = [styles.euiColorStops, !disabled ? styles.isEnabled : styles.isDisabled, readOnly && styles.isReadOnly, isDragging && styles.isDragging];
|
|
221
|
+
var cssTrackStyles = [styles.euiColorStops__track];
|
|
222
|
+
var cssAddTargetStyles = [styles.euiColorStops__addTarget];
|
|
223
|
+
var addContainerStyles = (0, _color_stops.euiColorStopsAddContainerStyles)(euiTheme);
|
|
224
|
+
var cssAddContainerStyles = [addContainerStyles.euiColorStopsAddContainer, !addContainerIsDisabled ? addContainerStyles.isEnabled : addContainerStyles.isDisabled];
|
|
218
225
|
|
|
219
226
|
var getStopFromMouseLocationFn = function getStopFromMouseLocationFn(location) {
|
|
220
227
|
// Guard against `null` ref in usage
|
|
@@ -415,7 +422,7 @@ var EuiColorStops = function EuiColorStops(_ref) {
|
|
|
415
422
|
disabled: disabled,
|
|
416
423
|
readOnly: readOnly,
|
|
417
424
|
"aria-valuetext": "Stop: ".concat(colorStop.stop, ", Color: ").concat(colorStop.color, " (").concat(index + 1, " of ").concat(colorStops.length, ")"),
|
|
418
|
-
isPopoverOpen: colorStop.id === openedStopId,
|
|
425
|
+
isPopoverOpen: !isDragging && colorStop.id === openedStopId,
|
|
419
426
|
openPopover: function openPopover() {
|
|
420
427
|
setOpenedStopId(colorStop.id);
|
|
421
428
|
},
|
|
@@ -425,7 +432,7 @@ var EuiColorStops = function EuiColorStops(_ref) {
|
|
|
425
432
|
valueInputProps: valueInputProps
|
|
426
433
|
});
|
|
427
434
|
});
|
|
428
|
-
}, [colorStops, disabled, handleOnChange, max, min, mode, onRemove, openedStopId, rangeMax, rangeMin, readOnly, showAlpha, sortedStops, swatches, wrapperRef, valueInputProps]);
|
|
435
|
+
}, [colorStops, disabled, handleOnChange, isDragging, max, min, mode, onRemove, openedStopId, rangeMax, rangeMin, readOnly, showAlpha, sortedStops, swatches, wrapperRef, valueInputProps]);
|
|
429
436
|
var positions = wrapperRef ? sortedStops.map(function (_ref3) {
|
|
430
437
|
var stop = _ref3.stop;
|
|
431
438
|
return getPositionFromStopFn(stop);
|
|
@@ -433,10 +440,10 @@ var EuiColorStops = function EuiColorStops(_ref) {
|
|
|
433
440
|
|
|
434
441
|
var gradientStop = function gradientStop(colorStop, index) {
|
|
435
442
|
var color = (0, _utils2.getChromaColor)(colorStop.color, showAlpha);
|
|
436
|
-
var rgba = color ? color.css() : '
|
|
443
|
+
var rgba = color ? color.css() : 'transparent';
|
|
437
444
|
|
|
438
445
|
if (index === 0) {
|
|
439
|
-
return "
|
|
446
|
+
return "transparent, transparent ".concat(positions[index], "%, ").concat(rgba, " ").concat(positions[index], "%");
|
|
440
447
|
}
|
|
441
448
|
|
|
442
449
|
return "".concat(rgba, " ").concat(positions[index], "%");
|
|
@@ -464,13 +471,15 @@ var EuiColorStops = function EuiColorStops(_ref) {
|
|
|
464
471
|
percentageSteps = percentageSteps + percentage;
|
|
465
472
|
});
|
|
466
473
|
steppedGradient = steppedGradient.substring(0, steppedGradient.length - 2);
|
|
467
|
-
gradient = "linear-gradient(to right,
|
|
474
|
+
gradient = "linear-gradient(to right, transparent ".concat(trailingPercentage, "%, ").concat(steppedGradient, ")");
|
|
468
475
|
} else {
|
|
469
476
|
var linearGradient = sortedStops.map(stopType === 'gradient' ? gradientStop : fixedStop);
|
|
470
477
|
gradient = "linear-gradient(to right,".concat(linearGradient, ")");
|
|
471
478
|
}
|
|
472
479
|
|
|
473
|
-
return (0, _react2.jsx)(_range_wrapper.EuiRangeWrapper, _extends({
|
|
480
|
+
return (0, _react2.jsx)(_range_wrapper.EuiRangeWrapper, _extends({
|
|
481
|
+
css: cssPopoverStyles
|
|
482
|
+
}, rest, {
|
|
474
483
|
"data-test-subj": (0, _classnames.default)('euiColorStops', rest['data-test-subj']),
|
|
475
484
|
ref: setWrapperRef,
|
|
476
485
|
className: classes,
|
|
@@ -493,6 +502,8 @@ var EuiColorStops = function EuiColorStops(_ref) {
|
|
|
493
502
|
token: "euiColorStops.screenReaderAnnouncement",
|
|
494
503
|
default: "{label}: {readOnly} {disabled} Color stop picker. Each stop consists of a number and corresponding color value. Use the Down and Up arrow keys to select individual stops. Press the Enter key to create a new stop."
|
|
495
504
|
}))), (0, _react2.jsx)(_range_track.EuiRangeTrack, {
|
|
505
|
+
className: "euiColorStops__track",
|
|
506
|
+
css: cssTrackStyles,
|
|
496
507
|
min: min || rangeMin,
|
|
497
508
|
max: max || rangeMax,
|
|
498
509
|
compressed: compressed,
|
|
@@ -509,13 +520,13 @@ var EuiColorStops = function EuiColorStops(_ref) {
|
|
|
509
520
|
trackWidth: trackWidth
|
|
510
521
|
}), (0, _react2.jsx)("div", {
|
|
511
522
|
"data-test-subj": "euiColorStopsAdd",
|
|
512
|
-
className:
|
|
513
|
-
|
|
514
|
-
}),
|
|
523
|
+
className: "euiColorStops__addContainer",
|
|
524
|
+
css: cssAddContainerStyles,
|
|
515
525
|
onClick: handleAddClick,
|
|
516
526
|
onMouseMove: handleAddHover
|
|
517
527
|
}, (0, _react2.jsx)("div", {
|
|
518
528
|
className: "euiColorStops__addTarget",
|
|
529
|
+
css: cssAddTargetStyles,
|
|
519
530
|
style: {
|
|
520
531
|
left: "".concat(addTargetPosition, "%")
|
|
521
532
|
}
|