@elastic/eui 59.1.0-rc1 → 60.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +0 -48
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -48
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +42 -7
- package/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/es/components/avatar/avatar.js +7 -9
- package/es/components/bottom_bar/bottom_bar.js +9 -8
- package/es/components/breadcrumbs/breadcrumbs.js +1 -2
- package/es/components/call_out/call_out.js +8 -9
- package/es/components/combo_box/matching_options.js +3 -2
- package/es/components/expression/expression.js +10 -11
- package/es/components/facet/facet_button.js +8 -9
- package/es/components/facet/facet_group.js +7 -8
- package/es/components/health/health.js +6 -7
- package/es/components/horizontal_rule/horizontal_rule.js +6 -7
- package/es/components/link/link.js +7 -8
- package/es/components/loading/loading_chart.js +6 -7
- package/es/components/loading/loading_content.js +6 -7
- package/es/components/loading/loading_logo.js +6 -7
- package/es/components/loading/loading_spinner.js +6 -7
- package/es/components/mark/mark.js +8 -9
- package/es/components/markdown_editor/markdown_format.js +6 -7
- package/es/components/panel/panel.js +7 -8
- package/es/components/provider/cache/index.js +0 -1
- package/es/components/provider/index.js +1 -1
- package/es/components/provider/provider.js +3 -7
- package/es/components/selectable/selectable.js +39 -22
- package/es/components/spacer/spacer.js +6 -7
- package/es/components/stat/stat.js +28 -35
- package/es/components/stat/stat.styles.js +38 -0
- package/es/components/text/text.js +6 -7
- package/es/components/text/text_color.js +6 -7
- package/es/components/timeline/timeline.js +15 -8
- package/es/components/timeline/timeline.styles.js +29 -0
- package/es/components/timeline/timeline_item.js +7 -20
- package/es/components/timeline/timeline_item.styles.js +18 -3
- package/es/components/timeline/timeline_item_icon.js +6 -7
- package/es/components/timeline/timeline_item_icon.styles.js +14 -4
- package/es/components/title/title.js +6 -7
- package/es/global_styling/functions/logicals.js +2 -2
- package/es/global_styling/utility/utility.js +1 -13
- package/es/test/emotion-prefix.js +29 -0
- package/es/test/index.d.ts +5 -0
- package/es/test/index.js +2 -1
- package/es/{components/provider/system → themes/amsterdam}/index.js +2 -1
- package/es/themes/index.js +2 -1
- package/eui.d.ts +507 -941
- package/i18ntokens.json +28 -28
- package/lib/components/accessibility/skip_link/skip_link.js +45 -11
- package/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/lib/components/avatar/avatar.js +8 -12
- package/lib/components/bottom_bar/bottom_bar.js +6 -9
- package/lib/components/breadcrumbs/breadcrumbs.js +1 -2
- package/lib/components/call_out/call_out.js +10 -14
- package/lib/components/combo_box/matching_options.js +3 -2
- package/lib/components/expression/expression.js +12 -14
- package/lib/components/facet/facet_button.js +10 -12
- package/lib/components/facet/facet_group.js +9 -11
- package/lib/components/health/health.js +8 -10
- package/lib/components/horizontal_rule/horizontal_rule.js +8 -10
- package/lib/components/link/link.js +7 -13
- package/lib/components/loading/loading_chart.js +8 -10
- package/lib/components/loading/loading_content.js +8 -10
- package/lib/components/loading/loading_logo.js +8 -10
- package/lib/components/loading/loading_spinner.js +8 -10
- package/lib/components/mark/mark.js +10 -12
- package/lib/components/markdown_editor/markdown_format.js +8 -10
- package/lib/components/panel/panel.js +9 -11
- package/lib/components/provider/cache/index.js +0 -13
- package/lib/components/provider/index.js +7 -12
- package/lib/components/provider/provider.js +2 -6
- package/lib/components/selectable/selectable.js +39 -22
- package/lib/components/spacer/spacer.js +8 -10
- package/lib/components/stat/stat.js +30 -40
- package/lib/components/stat/stat.styles.js +45 -0
- package/lib/components/text/text.js +8 -10
- package/lib/components/text/text_color.js +8 -10
- package/lib/components/timeline/timeline.js +20 -9
- package/lib/components/timeline/timeline.styles.js +39 -0
- package/lib/components/timeline/timeline_item.js +9 -24
- package/lib/components/timeline/timeline_item.styles.js +17 -10
- package/lib/components/timeline/timeline_item_icon.js +8 -10
- package/lib/components/timeline/timeline_item_icon.styles.js +15 -4
- package/lib/components/title/title.js +9 -11
- package/lib/global_styling/functions/logicals.js +2 -2
- package/lib/global_styling/utility/utility.js +8 -12
- package/lib/test/emotion-prefix.js +38 -0
- package/lib/test/index.d.ts +5 -0
- package/lib/test/index.js +23 -1
- package/lib/{components/provider/system → themes/amsterdam}/index.js +4 -4
- package/lib/themes/index.js +21 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.js +27 -6
- package/optimize/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/es/components/avatar/avatar.js +5 -7
- package/optimize/es/components/bottom_bar/bottom_bar.js +9 -8
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +1 -2
- package/optimize/es/components/call_out/call_out.js +7 -8
- package/optimize/es/components/combo_box/matching_options.js +3 -2
- package/optimize/es/components/expression/expression.js +9 -10
- package/optimize/es/components/facet/facet_button.js +7 -8
- package/optimize/es/components/facet/facet_group.js +6 -7
- package/optimize/es/components/health/health.js +5 -6
- package/optimize/es/components/horizontal_rule/horizontal_rule.js +5 -6
- package/optimize/es/components/link/link.js +6 -7
- package/optimize/es/components/loading/loading_chart.js +5 -6
- package/optimize/es/components/loading/loading_content.js +5 -6
- package/optimize/es/components/loading/loading_logo.js +5 -6
- package/optimize/es/components/loading/loading_spinner.js +5 -6
- package/optimize/es/components/mark/mark.js +7 -8
- package/optimize/es/components/markdown_editor/markdown_format.js +5 -6
- package/optimize/es/components/panel/panel.js +6 -7
- package/optimize/es/components/provider/cache/index.js +0 -1
- package/optimize/es/components/provider/index.js +1 -1
- package/optimize/es/components/provider/provider.js +3 -7
- package/optimize/es/components/selectable/selectable.js +33 -22
- package/optimize/es/components/spacer/spacer.js +5 -6
- package/optimize/es/components/stat/stat.js +25 -33
- package/optimize/es/components/stat/stat.styles.js +38 -0
- package/optimize/es/components/text/text.js +5 -6
- package/optimize/es/components/text/text_color.js +5 -6
- package/optimize/es/components/timeline/timeline.js +10 -1
- package/optimize/es/components/timeline/timeline.styles.js +29 -0
- package/optimize/es/components/timeline/timeline_item.js +6 -12
- package/optimize/es/components/timeline/timeline_item.styles.js +18 -3
- package/optimize/es/components/timeline/timeline_item_icon.js +5 -6
- package/optimize/es/components/timeline/timeline_item_icon.styles.js +14 -4
- package/optimize/es/components/title/title.js +5 -6
- package/optimize/es/global_styling/functions/logicals.js +2 -2
- package/optimize/es/global_styling/utility/utility.js +1 -13
- package/optimize/es/test/emotion-prefix.js +27 -0
- package/optimize/es/test/index.d.ts +5 -0
- package/optimize/es/test/index.js +2 -1
- package/optimize/es/{components/provider/system → themes/amsterdam}/index.js +2 -1
- package/optimize/es/themes/index.js +2 -1
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +30 -8
- package/optimize/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/lib/components/avatar/avatar.js +5 -9
- package/optimize/lib/components/bottom_bar/bottom_bar.js +6 -9
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +1 -2
- package/optimize/lib/components/call_out/call_out.js +9 -13
- package/optimize/lib/components/combo_box/matching_options.js +3 -2
- package/optimize/lib/components/expression/expression.js +9 -11
- package/optimize/lib/components/facet/facet_button.js +7 -9
- package/optimize/lib/components/facet/facet_group.js +6 -8
- package/optimize/lib/components/health/health.js +5 -7
- package/optimize/lib/components/horizontal_rule/horizontal_rule.js +5 -7
- package/optimize/lib/components/link/link.js +6 -12
- package/optimize/lib/components/loading/loading_chart.js +5 -7
- package/optimize/lib/components/loading/loading_content.js +5 -7
- package/optimize/lib/components/loading/loading_logo.js +5 -7
- package/optimize/lib/components/loading/loading_spinner.js +5 -7
- package/optimize/lib/components/mark/mark.js +7 -9
- package/optimize/lib/components/markdown_editor/markdown_format.js +5 -7
- package/optimize/lib/components/panel/panel.js +6 -8
- package/optimize/lib/components/provider/cache/index.js +0 -13
- package/optimize/lib/components/provider/index.js +7 -12
- package/optimize/lib/components/provider/provider.js +2 -6
- package/optimize/lib/components/selectable/selectable.js +33 -22
- package/optimize/lib/components/spacer/spacer.js +5 -7
- package/optimize/lib/components/stat/stat.js +27 -37
- package/optimize/lib/components/stat/stat.styles.js +47 -0
- package/optimize/lib/components/text/text.js +5 -7
- package/optimize/lib/components/text/text_color.js +5 -7
- package/optimize/lib/components/timeline/timeline.js +14 -2
- package/optimize/lib/components/timeline/timeline.styles.js +39 -0
- package/optimize/lib/components/timeline/timeline_item.js +6 -14
- package/optimize/lib/components/timeline/timeline_item.styles.js +17 -10
- package/optimize/lib/components/timeline/timeline_item_icon.js +5 -7
- package/optimize/lib/components/timeline/timeline_item_icon.styles.js +15 -4
- package/optimize/lib/components/title/title.js +6 -8
- package/optimize/lib/global_styling/functions/logicals.js +2 -2
- package/optimize/lib/global_styling/utility/utility.js +8 -12
- package/optimize/lib/test/emotion-prefix.js +40 -0
- package/optimize/lib/test/index.d.ts +5 -0
- package/optimize/lib/test/index.js +23 -1
- package/{test-env/components/provider/system → optimize/lib/themes/amsterdam}/index.js +4 -4
- package/optimize/lib/themes/index.js +21 -1
- package/package.json +2 -2
- package/src/components/index.scss +0 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +46 -11
- package/test-env/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/test-env/components/avatar/avatar.js +8 -12
- package/test-env/components/bottom_bar/bottom_bar.js +6 -9
- package/test-env/components/breadcrumbs/breadcrumbs.js +1 -2
- package/test-env/components/call_out/call_out.js +10 -14
- package/test-env/components/combo_box/matching_options.js +3 -2
- package/test-env/components/expression/expression.js +12 -14
- package/test-env/components/facet/facet_button.js +10 -12
- package/test-env/components/facet/facet_group.js +9 -11
- package/test-env/components/health/health.js +8 -10
- package/test-env/components/horizontal_rule/horizontal_rule.js +8 -10
- package/test-env/components/link/link.js +7 -13
- package/test-env/components/loading/loading_chart.js +8 -10
- package/test-env/components/loading/loading_content.js +8 -10
- package/test-env/components/loading/loading_logo.js +8 -10
- package/test-env/components/loading/loading_spinner.js +8 -10
- package/test-env/components/mark/mark.js +10 -12
- package/test-env/components/markdown_editor/markdown_format.js +8 -10
- package/test-env/components/panel/panel.js +9 -11
- package/test-env/components/provider/cache/index.js +0 -13
- package/test-env/components/provider/index.js +7 -12
- package/test-env/components/provider/provider.js +2 -6
- package/test-env/components/selectable/selectable.js +39 -22
- package/test-env/components/spacer/spacer.js +8 -10
- package/test-env/components/stat/stat.js +29 -39
- package/test-env/components/stat/stat.styles.js +47 -0
- package/test-env/components/text/text.js +8 -10
- package/test-env/components/text/text_color.js +8 -10
- package/test-env/components/timeline/timeline.js +19 -9
- package/test-env/components/timeline/timeline.styles.js +39 -0
- package/test-env/components/timeline/timeline_item.js +9 -24
- package/test-env/components/timeline/timeline_item.styles.js +17 -10
- package/test-env/components/timeline/timeline_item_icon.js +8 -10
- package/test-env/components/timeline/timeline_item_icon.styles.js +15 -4
- package/test-env/components/title/title.js +9 -11
- package/test-env/global_styling/functions/logicals.js +2 -2
- package/test-env/global_styling/utility/utility.js +8 -12
- package/test-env/test/emotion-prefix.js +40 -0
- package/test-env/test/index.js +23 -1
- package/{optimize/lib/components/provider/system → test-env/themes/amsterdam}/index.js +4 -4
- package/test-env/themes/index.js +21 -1
- package/es/components/provider/cache/cache_context.js +0 -12
- package/es/components/provider/system/system.js +0 -33
- package/lib/components/provider/cache/cache_context.js +0 -24
- package/lib/components/provider/system/system.js +0 -45
- package/optimize/es/components/provider/cache/cache_context.js +0 -12
- package/optimize/es/components/provider/system/system.js +0 -33
- package/optimize/lib/components/provider/cache/cache_context.js +0 -24
- package/optimize/lib/components/provider/system/system.js +0 -54
- package/src/components/stat/_index.scss +0 -1
- package/src/components/stat/_stat.scss +0 -50
- package/test-env/components/provider/cache/cache_context.js +0 -24
- package/test-env/components/provider/system/system.js +0 -54
package/i18ntokens.json
CHANGED
|
@@ -181,11 +181,11 @@
|
|
|
181
181
|
"highlighting": "string",
|
|
182
182
|
"loc": {
|
|
183
183
|
"start": {
|
|
184
|
-
"line":
|
|
184
|
+
"line": 181,
|
|
185
185
|
"column": 8
|
|
186
186
|
},
|
|
187
187
|
"end": {
|
|
188
|
-
"line":
|
|
188
|
+
"line": 184,
|
|
189
189
|
"column": 9
|
|
190
190
|
}
|
|
191
191
|
},
|
|
@@ -197,11 +197,11 @@
|
|
|
197
197
|
"highlighting": "string",
|
|
198
198
|
"loc": {
|
|
199
199
|
"start": {
|
|
200
|
-
"line":
|
|
200
|
+
"line": 211,
|
|
201
201
|
"column": 14
|
|
202
202
|
},
|
|
203
203
|
"end": {
|
|
204
|
-
"line":
|
|
204
|
+
"line": 215,
|
|
205
205
|
"column": 16
|
|
206
206
|
}
|
|
207
207
|
},
|
|
@@ -213,11 +213,11 @@
|
|
|
213
213
|
"highlighting": "string",
|
|
214
214
|
"loc": {
|
|
215
215
|
"start": {
|
|
216
|
-
"line":
|
|
216
|
+
"line": 217,
|
|
217
217
|
"column": 14
|
|
218
218
|
},
|
|
219
219
|
"end": {
|
|
220
|
-
"line":
|
|
220
|
+
"line": 220,
|
|
221
221
|
"column": 16
|
|
222
222
|
}
|
|
223
223
|
},
|
|
@@ -3749,11 +3749,11 @@
|
|
|
3749
3749
|
"highlighting": "string",
|
|
3750
3750
|
"loc": {
|
|
3751
3751
|
"start": {
|
|
3752
|
-
"line":
|
|
3752
|
+
"line": 107,
|
|
3753
3753
|
"column": 10
|
|
3754
3754
|
},
|
|
3755
3755
|
"end": {
|
|
3756
|
-
"line":
|
|
3756
|
+
"line": 110,
|
|
3757
3757
|
"column": 12
|
|
3758
3758
|
}
|
|
3759
3759
|
},
|
|
@@ -3765,11 +3765,11 @@
|
|
|
3765
3765
|
"highlighting": "string",
|
|
3766
3766
|
"loc": {
|
|
3767
3767
|
"start": {
|
|
3768
|
-
"line":
|
|
3768
|
+
"line": 117,
|
|
3769
3769
|
"column": 20
|
|
3770
3770
|
},
|
|
3771
3771
|
"end": {
|
|
3772
|
-
"line":
|
|
3772
|
+
"line": 117,
|
|
3773
3773
|
"column": 77
|
|
3774
3774
|
}
|
|
3775
3775
|
},
|
|
@@ -3829,11 +3829,11 @@
|
|
|
3829
3829
|
"highlighting": "string",
|
|
3830
3830
|
"loc": {
|
|
3831
3831
|
"start": {
|
|
3832
|
-
"line":
|
|
3832
|
+
"line": 37,
|
|
3833
3833
|
"column": 27
|
|
3834
3834
|
},
|
|
3835
3835
|
"end": {
|
|
3836
|
-
"line":
|
|
3836
|
+
"line": 37,
|
|
3837
3837
|
"column": 77
|
|
3838
3838
|
}
|
|
3839
3839
|
},
|
|
@@ -4805,11 +4805,11 @@
|
|
|
4805
4805
|
"highlighting": "string",
|
|
4806
4806
|
"loc": {
|
|
4807
4807
|
"start": {
|
|
4808
|
-
"line":
|
|
4808
|
+
"line": 568,
|
|
4809
4809
|
"column": 16
|
|
4810
4810
|
},
|
|
4811
4811
|
"end": {
|
|
4812
|
-
"line":
|
|
4812
|
+
"line": 571,
|
|
4813
4813
|
"column": 18
|
|
4814
4814
|
}
|
|
4815
4815
|
},
|
|
@@ -4821,11 +4821,11 @@
|
|
|
4821
4821
|
"highlighting": "string",
|
|
4822
4822
|
"loc": {
|
|
4823
4823
|
"start": {
|
|
4824
|
-
"line":
|
|
4824
|
+
"line": 590,
|
|
4825
4825
|
"column": 14
|
|
4826
4826
|
},
|
|
4827
4827
|
"end": {
|
|
4828
|
-
"line":
|
|
4828
|
+
"line": 594,
|
|
4829
4829
|
"column": 16
|
|
4830
4830
|
}
|
|
4831
4831
|
},
|
|
@@ -4837,11 +4837,11 @@
|
|
|
4837
4837
|
"highlighting": "string",
|
|
4838
4838
|
"loc": {
|
|
4839
4839
|
"start": {
|
|
4840
|
-
"line":
|
|
4840
|
+
"line": 609,
|
|
4841
4841
|
"column": 14
|
|
4842
4842
|
},
|
|
4843
4843
|
"end": {
|
|
4844
|
-
"line":
|
|
4844
|
+
"line": 612,
|
|
4845
4845
|
"column": 16
|
|
4846
4846
|
}
|
|
4847
4847
|
},
|
|
@@ -4853,11 +4853,11 @@
|
|
|
4853
4853
|
"highlighting": "string",
|
|
4854
4854
|
"loc": {
|
|
4855
4855
|
"start": {
|
|
4856
|
-
"line":
|
|
4856
|
+
"line": 674,
|
|
4857
4857
|
"column": 6
|
|
4858
4858
|
},
|
|
4859
4859
|
"end": {
|
|
4860
|
-
"line":
|
|
4860
|
+
"line": 674,
|
|
4861
4861
|
"column": 78
|
|
4862
4862
|
}
|
|
4863
4863
|
},
|
|
@@ -4869,11 +4869,11 @@
|
|
|
4869
4869
|
"highlighting": "code",
|
|
4870
4870
|
"loc": {
|
|
4871
4871
|
"start": {
|
|
4872
|
-
"line":
|
|
4872
|
+
"line": 701,
|
|
4873
4873
|
"column": 6
|
|
4874
4874
|
},
|
|
4875
4875
|
"end": {
|
|
4876
|
-
"line":
|
|
4876
|
+
"line": 707,
|
|
4877
4877
|
"column": 8
|
|
4878
4878
|
}
|
|
4879
4879
|
},
|
|
@@ -4885,11 +4885,11 @@
|
|
|
4885
4885
|
"highlighting": "string",
|
|
4886
4886
|
"loc": {
|
|
4887
4887
|
"start": {
|
|
4888
|
-
"line":
|
|
4888
|
+
"line": 719,
|
|
4889
4889
|
"column": 6
|
|
4890
4890
|
},
|
|
4891
4891
|
"end": {
|
|
4892
|
-
"line":
|
|
4892
|
+
"line": 728,
|
|
4893
4893
|
"column": 7
|
|
4894
4894
|
}
|
|
4895
4895
|
},
|
|
@@ -4901,11 +4901,11 @@
|
|
|
4901
4901
|
"highlighting": "string",
|
|
4902
4902
|
"loc": {
|
|
4903
4903
|
"start": {
|
|
4904
|
-
"line":
|
|
4904
|
+
"line": 719,
|
|
4905
4905
|
"column": 6
|
|
4906
4906
|
},
|
|
4907
4907
|
"end": {
|
|
4908
|
-
"line":
|
|
4908
|
+
"line": 728,
|
|
4909
4909
|
"column": 7
|
|
4910
4910
|
}
|
|
4911
4911
|
},
|
|
@@ -4917,11 +4917,11 @@
|
|
|
4917
4917
|
"highlighting": "string",
|
|
4918
4918
|
"loc": {
|
|
4919
4919
|
"start": {
|
|
4920
|
-
"line":
|
|
4920
|
+
"line": 128,
|
|
4921
4921
|
"column": 10
|
|
4922
4922
|
},
|
|
4923
4923
|
"end": {
|
|
4924
|
-
"line":
|
|
4924
|
+
"line": 128,
|
|
4925
4925
|
"column": 80
|
|
4926
4926
|
}
|
|
4927
4927
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.POSITIONS = exports.EuiSkipLink = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,9 +11,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _services = require("../../../services");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _button = require("../../button/button");
|
|
17
17
|
|
|
18
18
|
var _screen_reader_only = require("../screen_reader_only");
|
|
19
19
|
|
|
@@ -21,12 +21,18 @@ var _skip_link = require("./skip_link.styles");
|
|
|
21
21
|
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
23
|
|
|
24
|
-
var _excluded = ["destinationId", "tabIndex", "position", "children", "className"
|
|
24
|
+
var _excluded = ["destinationId", "overrideLinkBehavior", "tabIndex", "position", "children", "className"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
28
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
29
|
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
33
|
+
|
|
34
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
|
|
30
36
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
37
|
|
|
32
38
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -34,16 +40,17 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
34
40
|
var POSITIONS = ['static', 'fixed', 'absolute'];
|
|
35
41
|
exports.POSITIONS = POSITIONS;
|
|
36
42
|
|
|
37
|
-
var
|
|
43
|
+
var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
38
44
|
var destinationId = _ref.destinationId,
|
|
45
|
+
overrideLinkBehavior = _ref.overrideLinkBehavior,
|
|
39
46
|
tabIndex = _ref.tabIndex,
|
|
40
47
|
_ref$position = _ref.position,
|
|
41
48
|
position = _ref$position === void 0 ? 'static' : _ref$position,
|
|
42
49
|
children = _ref.children,
|
|
43
50
|
className = _ref.className,
|
|
44
|
-
euiTheme = _ref.euiTheme,
|
|
45
51
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
46
52
|
|
|
53
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
47
54
|
var styles = (0, _skip_link.euiSkipLinkStyles)(euiTheme);
|
|
48
55
|
var classes = (0, _classnames.default)('euiSkipLink', className);
|
|
49
56
|
var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined]; // Create the `href` from `destinationId`
|
|
@@ -56,6 +63,22 @@ var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
|
56
63
|
};
|
|
57
64
|
}
|
|
58
65
|
|
|
66
|
+
if (overrideLinkBehavior) {
|
|
67
|
+
optionalProps = _objectSpread(_objectSpread({}, optionalProps), {}, {
|
|
68
|
+
onClick: function onClick(e) {
|
|
69
|
+
e.preventDefault();
|
|
70
|
+
var destinationEl = document.getElementById(destinationId);
|
|
71
|
+
if (!destinationEl) return;
|
|
72
|
+
destinationEl.scrollIntoView();
|
|
73
|
+
destinationEl.tabIndex = -1; // Ensure the destination content is focusable
|
|
74
|
+
|
|
75
|
+
destinationEl.focus({
|
|
76
|
+
preventScroll: true
|
|
77
|
+
}); // Scrolling is already handled above, and focus's autoscroll behaves oddly around fixed headers
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
59
82
|
return (0, _react2.jsx)(_screen_reader_only.EuiScreenReaderOnly, {
|
|
60
83
|
showOnFocus: true
|
|
61
84
|
}, (0, _react2.jsx)(_button.EuiButton, _extends({
|
|
@@ -67,8 +90,8 @@ var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
|
67
90
|
}, optionalProps, rest), children));
|
|
68
91
|
};
|
|
69
92
|
|
|
70
|
-
exports.
|
|
71
|
-
|
|
93
|
+
exports.EuiSkipLink = EuiSkipLink;
|
|
94
|
+
EuiSkipLink.propTypes = {
|
|
72
95
|
href: _propTypes.default.string,
|
|
73
96
|
onClick: _propTypes.default.func,
|
|
74
97
|
|
|
@@ -94,6 +117,19 @@ _EuiSkipLink.propTypes = {
|
|
|
94
117
|
*/
|
|
95
118
|
destinationId: _propTypes.default.string.isRequired,
|
|
96
119
|
|
|
120
|
+
/**
|
|
121
|
+
* If default HTML anchor link behavior is not desired (e.g. for SPAs with hash routing),
|
|
122
|
+
* setting this flag to true will manually scroll to and focus the destination element
|
|
123
|
+
* without changing the browser URL's hash
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* If default HTML anchor link behavior is not desired (e.g. for SPAs with hash routing),
|
|
128
|
+
* setting this flag to true will manually scroll to and focus the destination element
|
|
129
|
+
* without changing the browser URL's hash
|
|
130
|
+
*/
|
|
131
|
+
overrideLinkBehavior: _propTypes.default.bool,
|
|
132
|
+
|
|
97
133
|
/**
|
|
98
134
|
* When position is fixed, this is forced to `0`
|
|
99
135
|
*/
|
|
@@ -177,6 +213,4 @@ _EuiSkipLink.propTypes = {
|
|
|
177
213
|
"aria-label": _propTypes.default.string,
|
|
178
214
|
"data-test-subj": _propTypes.default.string,
|
|
179
215
|
buttonRef: _propTypes.default.any
|
|
180
|
-
};
|
|
181
|
-
var EuiSkipLink = (0, _system.withEuiSystem)(_EuiSkipLink);
|
|
182
|
-
exports.EuiSkipLink = EuiSkipLink;
|
|
216
|
+
};
|
|
@@ -35,7 +35,7 @@ var euiSkipLinkStyles = function euiSkipLinkStyles(_ref3) {
|
|
|
35
35
|
// Set positions on focus only as to not override screenReaderOnly position
|
|
36
36
|
// When positioned absolutely, consumers still need to tell it WHERE (top,left,etc...)
|
|
37
37
|
absolute: _ref,
|
|
38
|
-
fixed: /*#__PURE__*/(0, _react.css)("
|
|
38
|
+
fixed: /*#__PURE__*/(0, _react.css)("position:fixed!important;&:focus{inset-block-start:", euiTheme.size.xs, ";inset-inline-start:", euiTheme.size.xs, ";z-index:", Number(euiTheme.levels.header) + 1, ";};label:fixed;")
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.checkValidColor = exports.
|
|
6
|
+
exports.checkValidColor = exports.TYPES = exports.SIZES = exports.EuiAvatar = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -13,8 +13,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _color = require("../../services/color");
|
|
15
15
|
|
|
16
|
-
var _system = require("../provider/system");
|
|
17
|
-
|
|
18
16
|
var _services = require("../../services");
|
|
19
17
|
|
|
20
18
|
var _icon = require("../icon");
|
|
@@ -23,7 +21,7 @@ var _avatar = require("./avatar.styles");
|
|
|
23
21
|
|
|
24
22
|
var _react2 = require("@emotion/react");
|
|
25
23
|
|
|
26
|
-
var _excluded = ["className", "color", "
|
|
24
|
+
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
27
25
|
|
|
28
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
27
|
|
|
@@ -52,12 +50,11 @@ exports.SIZES = SIZES;
|
|
|
52
50
|
var TYPES = ['space', 'user'];
|
|
53
51
|
exports.TYPES = TYPES;
|
|
54
52
|
|
|
55
|
-
var
|
|
53
|
+
var EuiAvatar = function EuiAvatar(_ref) {
|
|
56
54
|
var _classNames;
|
|
57
55
|
|
|
58
56
|
var className = _ref.className,
|
|
59
57
|
color = _ref.color,
|
|
60
|
-
euiTheme = _ref.euiTheme,
|
|
61
58
|
imageUrl = _ref.imageUrl,
|
|
62
59
|
initials = _ref.initials,
|
|
63
60
|
initialsLength = _ref.initialsLength,
|
|
@@ -74,6 +71,7 @@ var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
|
74
71
|
style = _ref.style,
|
|
75
72
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
76
73
|
|
|
74
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
77
75
|
var styles = (0, _avatar.euiAvatarStyles)(euiTheme);
|
|
78
76
|
var visColors = (0, _services.euiPaletteColorBlindBehindText)();
|
|
79
77
|
var isPlain = color === 'plain';
|
|
@@ -126,10 +124,11 @@ var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
|
126
124
|
role: isDisabled ? 'presentation' : 'img',
|
|
127
125
|
title: name
|
|
128
126
|
}, rest), content);
|
|
129
|
-
};
|
|
127
|
+
}; // TODO: Migrate to a service
|
|
128
|
+
|
|
130
129
|
|
|
131
|
-
exports.
|
|
132
|
-
|
|
130
|
+
exports.EuiAvatar = EuiAvatar;
|
|
131
|
+
EuiAvatar.propTypes = {
|
|
133
132
|
className: _propTypes.default.string,
|
|
134
133
|
"aria-label": _propTypes.default.string,
|
|
135
134
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -190,9 +189,6 @@ _EuiAvatar.propTypes = {
|
|
|
190
189
|
*/
|
|
191
190
|
isDisabled: _propTypes.default.bool
|
|
192
191
|
};
|
|
193
|
-
var EuiAvatar = (0, _system.withEuiSystem)(_EuiAvatar); // TODO: Migrate to a service
|
|
194
|
-
|
|
195
|
-
exports.EuiAvatar = EuiAvatar;
|
|
196
192
|
|
|
197
193
|
var checkValidColor = function checkValidColor(color) {
|
|
198
194
|
var validHex = color && (0, _color.isValidHex)(color) || color === 'plain' || color === 'subdued';
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.paddingSizeToClassNameMap = exports.
|
|
8
|
+
exports.paddingSizeToClassNameMap = exports.POSITIONS = exports.EuiBottomBar = void 0;
|
|
9
9
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
|
|
@@ -23,15 +23,13 @@ var _resize_observer = require("../observer/resize_observer");
|
|
|
23
23
|
|
|
24
24
|
var _portal = require("../portal");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _bottom_bar = require("./bottom_bar.styles");
|
|
27
27
|
|
|
28
28
|
var _provider = require("../../services/theme/provider");
|
|
29
29
|
|
|
30
|
-
var _bottom_bar = require("./bottom_bar.styles");
|
|
31
|
-
|
|
32
30
|
var _react2 = require("@emotion/react");
|
|
33
31
|
|
|
34
|
-
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"
|
|
32
|
+
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"];
|
|
35
33
|
|
|
36
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
35
|
|
|
@@ -95,9 +93,9 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
95
93
|
bottom = _ref$bottom === void 0 ? 0 : _ref$bottom,
|
|
96
94
|
top = _ref.top,
|
|
97
95
|
style = _ref.style,
|
|
98
|
-
euiTheme = _ref.euiTheme,
|
|
99
96
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
100
97
|
|
|
98
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
101
99
|
var styles = (0, _bottom_bar.euiBottomBarStyles)(euiTheme); // Force some props if `fixed` position, but not if the user has supplied these
|
|
102
100
|
|
|
103
101
|
affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
|
|
@@ -171,7 +169,6 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
171
169
|
return usePortal ? (0, _react2.jsx)(_portal.EuiPortal, null, bar) : bar;
|
|
172
170
|
});
|
|
173
171
|
|
|
174
|
-
exports._EuiBottomBar = _EuiBottomBar;
|
|
175
172
|
_EuiBottomBar.propTypes = {
|
|
176
173
|
className: _propTypes.default.string,
|
|
177
174
|
"aria-label": _propTypes.default.string,
|
|
@@ -236,9 +233,9 @@ _EuiBottomBar.propTypes = {
|
|
|
236
233
|
left: _propTypes.default.any
|
|
237
234
|
};
|
|
238
235
|
var EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
239
|
-
var BottomBar =
|
|
236
|
+
var BottomBar = _EuiBottomBar;
|
|
240
237
|
return (0, _react2.jsx)(_provider.EuiThemeProvider, {
|
|
241
|
-
colorMode:
|
|
238
|
+
colorMode: 'dark'
|
|
242
239
|
}, (0, _react2.jsx)(BottomBar, _extends({
|
|
243
240
|
ref: ref
|
|
244
241
|
}, props)));
|
|
@@ -197,8 +197,7 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
197
197
|
}, linkProps, breadcrumbRest), text);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
return (0, _react2.jsx)(_link.EuiLink
|
|
201
|
-
, _extends({
|
|
200
|
+
return (0, _react2.jsx)(_link.EuiLink, _extends({
|
|
202
201
|
ref: ref,
|
|
203
202
|
color: isLastBreadcrumb ? 'text' : 'subdued',
|
|
204
203
|
onClick: onClick,
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.HEADINGS = exports.EuiCallOut = exports.COLORS = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ var _icon = require("../icon");
|
|
|
17
17
|
|
|
18
18
|
var _text = require("../text");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _services = require("../../services");
|
|
21
21
|
|
|
22
22
|
var _panel = require("../panel");
|
|
23
23
|
|
|
@@ -27,7 +27,7 @@ var _call_out = require("./call_out.styles");
|
|
|
27
27
|
|
|
28
28
|
var _react2 = require("@emotion/react");
|
|
29
29
|
|
|
30
|
-
var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading"
|
|
30
|
+
var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading"];
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
@@ -47,8 +47,7 @@ var COLORS = ['primary', 'success', 'warning', 'danger'];
|
|
|
47
47
|
exports.COLORS = COLORS;
|
|
48
48
|
var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
|
|
49
49
|
exports.HEADINGS = HEADINGS;
|
|
50
|
-
|
|
51
|
-
var _EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
50
|
+
var EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
52
51
|
var title = _ref.title,
|
|
53
52
|
_ref$color = _ref.color,
|
|
54
53
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
@@ -59,14 +58,14 @@ var _EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
59
58
|
className = _ref.className,
|
|
60
59
|
_ref$heading = _ref.heading,
|
|
61
60
|
heading = _ref$heading === void 0 ? 'p' : _ref$heading,
|
|
62
|
-
euiTheme = _ref.euiTheme,
|
|
63
61
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
64
62
|
|
|
65
|
-
var
|
|
63
|
+
var theme = (0, _services.useEuiTheme)();
|
|
64
|
+
var styles = (0, _call_out.euiCallOutStyles)(theme);
|
|
66
65
|
var cssStyles = [styles.euiCallOut];
|
|
67
66
|
var cssIconStyle = [styles.euiCallOut__icon];
|
|
68
67
|
var cssDescriptionStyle = [styles.euiCallOut__description];
|
|
69
|
-
var headerStyles = (0, _call_out.euiCallOutHeadingStyles)(
|
|
68
|
+
var headerStyles = (0, _call_out.euiCallOutHeadingStyles)(theme);
|
|
70
69
|
var cssHeaderStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
|
|
71
70
|
var classes = (0, _classnames.default)('euiCallOut', _defineProperty({}, "euiCallOut--".concat(color), color), className);
|
|
72
71
|
var headerIcon;
|
|
@@ -114,9 +113,8 @@ var _EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
114
113
|
grow: false
|
|
115
114
|
}, rest), header, optionalChildren);
|
|
116
115
|
});
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
_EuiCallOut.propTypes = {
|
|
116
|
+
exports.EuiCallOut = EuiCallOut;
|
|
117
|
+
EuiCallOut.propTypes = {
|
|
120
118
|
className: _propTypes.default.string,
|
|
121
119
|
"aria-label": _propTypes.default.string,
|
|
122
120
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -126,6 +124,4 @@ _EuiCallOut.propTypes = {
|
|
|
126
124
|
size: _propTypes.default.oneOf(["s", "m"]),
|
|
127
125
|
heading: _propTypes.default.any
|
|
128
126
|
};
|
|
129
|
-
|
|
130
|
-
var EuiCallOut = (0, _system.withEuiSystem)(_EuiCallOut);
|
|
131
|
-
exports.EuiCallOut = EuiCallOut;
|
|
127
|
+
EuiCallOut.displayName = 'EuiCallOut';
|
|
@@ -27,7 +27,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
27
27
|
var flattenOptionGroups = function flattenOptionGroups(optionsOrGroups) {
|
|
28
28
|
return optionsOrGroups.reduce(function (options, optionOrGroup) {
|
|
29
29
|
if (optionOrGroup.options) {
|
|
30
|
-
options.
|
|
30
|
+
options = options.concat(optionOrGroup.options);
|
|
31
31
|
} else {
|
|
32
32
|
options.push(optionOrGroup);
|
|
33
33
|
}
|
|
@@ -90,8 +90,9 @@ var getMatchingOptions = function getMatchingOptions(options, selectedOptions, s
|
|
|
90
90
|
label: option.label,
|
|
91
91
|
isGroupLabelOption: true
|
|
92
92
|
}); // Add matching options for group
|
|
93
|
+
// use concat over spreading to support large arrays - https://mathiasbynens.be/demo/javascript-argument-count
|
|
93
94
|
|
|
94
|
-
matchingOptions.
|
|
95
|
+
matchingOptions = matchingOptions.concat(matchingOptionsForGroup);
|
|
95
96
|
}
|
|
96
97
|
} else {
|
|
97
98
|
collectMatchingOption(matchingOptions, option, selectedOptions, normalizedSearchValue, isPreFiltered, showPrevSelected);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.EuiExpression = exports.COLORS = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -13,13 +13,13 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _icon = require("../icon");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _services = require("../../services");
|
|
17
17
|
|
|
18
18
|
var _expression = require("./expression.styles");
|
|
19
19
|
|
|
20
20
|
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap"
|
|
22
|
+
var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -38,7 +38,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
38
38
|
var COLORS = ['subdued', 'primary', 'success', 'accent', 'warning', 'danger'];
|
|
39
39
|
exports.COLORS = COLORS;
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var EuiExpression = function EuiExpression(_ref) {
|
|
42
42
|
var className = _ref.className,
|
|
43
43
|
description = _ref.description,
|
|
44
44
|
descriptionProps = _ref.descriptionProps,
|
|
@@ -59,17 +59,17 @@ var _EuiExpression = function _EuiExpression(_ref) {
|
|
|
59
59
|
isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
|
|
60
60
|
_ref$textWrap = _ref.textWrap,
|
|
61
61
|
textWrap = _ref$textWrap === void 0 ? 'break-word' : _ref$textWrap,
|
|
62
|
-
euiTheme = _ref.euiTheme,
|
|
63
62
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
64
63
|
|
|
65
64
|
var calculatedColor = isInvalid ? 'danger' : color;
|
|
66
|
-
var
|
|
65
|
+
var theme = (0, _services.useEuiTheme)();
|
|
66
|
+
var styles = (0, _expression.euiExpressionStyles)(theme);
|
|
67
67
|
var cssStyles = [styles.euiExpression, onClick && styles.isClickable, styles[color], isActive && styles.isActive.base, isActive && styles.isActive[color], display === 'columns' && styles.columns, textWrap === 'truncate' && styles.truncate];
|
|
68
|
-
var descriptionStyles = (0, _expression.euiExpressionDescriptionStyles)(
|
|
68
|
+
var descriptionStyles = (0, _expression.euiExpressionDescriptionStyles)(theme);
|
|
69
69
|
var cssDescriptionStyles = [descriptionStyles.euiExpression__description, isInvalid ? descriptionStyles.danger : descriptionStyles[color], uppercase && descriptionStyles.isUppercase, textWrap === 'truncate' && descriptionStyles.truncate, display === 'columns' && descriptionStyles.columns];
|
|
70
|
-
var valueStyles = (0, _expression.euiExpressionValueStyles)(
|
|
70
|
+
var valueStyles = (0, _expression.euiExpressionValueStyles)(theme);
|
|
71
71
|
var cssValueStyles = [valueStyles.euiExpression__value, textWrap === 'truncate' && valueStyles.truncate, display === 'columns' && valueStyles.columns];
|
|
72
|
-
var iconStyles = (0, _expression.euiExpressionIconStyles)(
|
|
72
|
+
var iconStyles = (0, _expression.euiExpressionIconStyles)(theme);
|
|
73
73
|
var cssIconStyles = [iconStyles.euiExpression__icon, display === 'columns' && iconStyles.columns];
|
|
74
74
|
var classes = (0, _classnames.default)('euiExpression', className);
|
|
75
75
|
var Component = onClick ? 'button' : 'span';
|
|
@@ -97,8 +97,8 @@ var _EuiExpression = function _EuiExpression(_ref) {
|
|
|
97
97
|
}, valueProps), value), invalidIcon);
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
exports.
|
|
101
|
-
|
|
100
|
+
exports.EuiExpression = EuiExpression;
|
|
101
|
+
EuiExpression.propTypes = {
|
|
102
102
|
className: _propTypes.default.string,
|
|
103
103
|
"aria-label": _propTypes.default.string,
|
|
104
104
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -200,6 +200,4 @@ _EuiExpression.propTypes = {
|
|
|
200
200
|
* Sets how to handle the wrapping of long text.
|
|
201
201
|
*/
|
|
202
202
|
textWrap: _propTypes.default.oneOf(["break-word", "truncate"])
|
|
203
|
-
};
|
|
204
|
-
var EuiExpression = (0, _system.withEuiSystem)(_EuiExpression);
|
|
205
|
-
exports.EuiExpression = EuiExpression;
|
|
203
|
+
};
|