@elastic/eui 77.1.0 → 77.2.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.
Files changed (138) hide show
  1. package/README.md +30 -29
  2. package/dist/eui_theme_dark.css +70 -158
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +70 -158
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/basic_table/basic_table.a11y.js +202 -0
  7. package/es/components/basic_table/{table.a11y.js → in_memory_table.a11y.js} +1 -1
  8. package/es/components/date_picker/date_picker.js +23 -15
  9. package/es/components/date_picker/date_picker_range.js +36 -42
  10. package/es/components/date_picker/super_date_picker/super_date_picker.js +99 -84
  11. package/es/components/form/field_number/field_number.js +39 -8
  12. package/es/components/form/field_text/field_text.js +1 -1
  13. package/es/components/form/form_control_layout/form_control_layout.js +67 -30
  14. package/es/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
  15. package/es/components/form/form_control_layout/form_control_layout_icons.js +12 -20
  16. package/es/components/form/range/dual_range.js +2 -4
  17. package/es/components/form/range/range.js +0 -2
  18. package/es/components/form/range/range_input.js +54 -13
  19. package/es/components/form/validatable_control/validatable_control.js +15 -5
  20. package/es/components/index.js +0 -1
  21. package/es/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
  22. package/es/components/search_bar/query/ast_to_es_query_string.js +3 -0
  23. package/es/components/suggest/suggest.a11y.js +70 -0
  24. package/es/components/table/table.a11y.js +75 -0
  25. package/eui.d.ts +55 -173
  26. package/i18ntokens.json +26 -44
  27. package/lib/components/basic_table/basic_table.a11y.js +194 -0
  28. package/lib/components/basic_table/{table.a11y.js → in_memory_table.a11y.js} +2 -2
  29. package/lib/components/date_picker/date_picker.js +23 -15
  30. package/lib/components/date_picker/date_picker_range.js +35 -41
  31. package/lib/components/date_picker/super_date_picker/super_date_picker.js +99 -84
  32. package/lib/components/form/field_number/field_number.js +42 -8
  33. package/lib/components/form/field_text/field_text.js +1 -1
  34. package/lib/components/form/form_control_layout/form_control_layout.js +67 -35
  35. package/lib/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
  36. package/lib/components/form/form_control_layout/form_control_layout_icons.js +11 -19
  37. package/lib/components/form/range/dual_range.js +2 -4
  38. package/lib/components/form/range/range.js +0 -2
  39. package/lib/components/form/range/range_input.js +52 -11
  40. package/lib/components/form/validatable_control/validatable_control.js +14 -12
  41. package/lib/components/index.js +0 -11
  42. package/lib/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
  43. package/lib/components/search_bar/query/ast_to_es_query_string.js +3 -0
  44. package/lib/components/suggest/suggest.a11y.js +73 -0
  45. package/lib/components/table/table.a11y.js +78 -0
  46. package/optimize/es/components/basic_table/basic_table.a11y.js +194 -0
  47. package/optimize/es/components/basic_table/{table.a11y.js → in_memory_table.a11y.js} +1 -1
  48. package/optimize/es/components/date_picker/date_picker.js +17 -14
  49. package/optimize/es/components/date_picker/date_picker_range.js +20 -14
  50. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +99 -84
  51. package/optimize/es/components/form/field_number/field_number.js +34 -8
  52. package/optimize/es/components/form/field_text/field_text.js +1 -1
  53. package/optimize/es/components/form/form_control_layout/form_control_layout.js +67 -30
  54. package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
  55. package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +10 -20
  56. package/optimize/es/components/form/range/dual_range.js +2 -4
  57. package/optimize/es/components/form/range/range.js +0 -2
  58. package/optimize/es/components/form/range/range_input.js +49 -12
  59. package/optimize/es/components/form/validatable_control/validatable_control.js +10 -5
  60. package/optimize/es/components/index.js +0 -1
  61. package/optimize/es/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
  62. package/optimize/es/components/search_bar/query/ast_to_es_query_string.js +3 -0
  63. package/optimize/es/components/suggest/suggest.a11y.js +70 -0
  64. package/optimize/es/components/table/table.a11y.js +75 -0
  65. package/optimize/lib/components/basic_table/basic_table.a11y.js +188 -0
  66. package/{test-env/components/basic_table/table.a11y.js → optimize/lib/components/basic_table/in_memory_table.a11y.js} +2 -2
  67. package/optimize/lib/components/date_picker/date_picker.js +17 -14
  68. package/optimize/lib/components/date_picker/date_picker_range.js +19 -13
  69. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +99 -84
  70. package/optimize/lib/components/form/field_number/field_number.js +37 -8
  71. package/optimize/lib/components/form/field_text/field_text.js +1 -1
  72. package/optimize/lib/components/form/form_control_layout/form_control_layout.js +67 -35
  73. package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
  74. package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +9 -19
  75. package/optimize/lib/components/form/range/dual_range.js +2 -4
  76. package/optimize/lib/components/form/range/range.js +0 -2
  77. package/optimize/lib/components/form/range/range_input.js +47 -10
  78. package/optimize/lib/components/form/validatable_control/validatable_control.js +10 -4
  79. package/optimize/lib/components/index.js +0 -11
  80. package/optimize/lib/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
  81. package/optimize/lib/components/search_bar/query/ast_to_es_query_string.js +3 -0
  82. package/optimize/lib/components/suggest/suggest.a11y.js +73 -0
  83. package/optimize/lib/components/table/table.a11y.js +78 -0
  84. package/package.json +1 -1
  85. package/src/components/date_picker/_date_picker_range.scss +0 -60
  86. package/src/components/date_picker/super_date_picker/_super_date_picker.scss +23 -11
  87. package/src/components/date_picker/super_date_picker/_variables.scss +3 -0
  88. package/src/components/date_picker/super_date_picker/date_popover/_date_popover_button.scss +5 -7
  89. package/src/components/form/form_control_layout/_form_control_layout.scss +2 -2
  90. package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +12 -36
  91. package/src/components/form/form_control_layout/_form_control_layout_icons.scss +27 -6
  92. package/src/themes/amsterdam/overrides/_date_picker.scss +0 -14
  93. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  94. package/test-env/components/basic_table/basic_table.a11y.js +188 -0
  95. package/{optimize/lib/components/basic_table/table.a11y.js → test-env/components/basic_table/in_memory_table.a11y.js} +2 -2
  96. package/test-env/components/date_picker/date_picker.js +23 -15
  97. package/test-env/components/date_picker/date_picker_range.js +35 -41
  98. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +99 -84
  99. package/test-env/components/form/field_number/field_number.js +37 -8
  100. package/test-env/components/form/field_text/field_text.js +1 -1
  101. package/test-env/components/form/form_control_layout/form_control_layout.js +68 -35
  102. package/test-env/components/form/form_control_layout/form_control_layout_delimited.js +31 -11
  103. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +11 -19
  104. package/test-env/components/form/range/dual_range.js +2 -4
  105. package/test-env/components/form/range/range.js +0 -2
  106. package/test-env/components/form/range/range_input.js +47 -11
  107. package/test-env/components/form/validatable_control/validatable_control.js +9 -4
  108. package/test-env/components/index.js +0 -11
  109. package/test-env/components/search_bar/query/ast_to_es_query_dsl.js +6 -1
  110. package/test-env/components/search_bar/query/ast_to_es_query_string.js +3 -0
  111. package/test-env/components/suggest/suggest.a11y.js +73 -0
  112. package/test-env/components/table/table.a11y.js +78 -0
  113. package/es/components/inline_edit/index.js +0 -10
  114. package/es/components/inline_edit/inline_edit.styles.js +0 -15
  115. package/es/components/inline_edit/inline_edit_form.js +0 -190
  116. package/es/components/inline_edit/inline_edit_text.js +0 -97
  117. package/es/components/inline_edit/inline_edit_title.js +0 -105
  118. package/lib/components/inline_edit/index.js +0 -19
  119. package/lib/components/inline_edit/inline_edit.styles.js +0 -22
  120. package/lib/components/inline_edit/inline_edit_form.js +0 -193
  121. package/lib/components/inline_edit/inline_edit_text.js +0 -97
  122. package/lib/components/inline_edit/inline_edit_title.js +0 -106
  123. package/optimize/es/components/inline_edit/index.js +0 -10
  124. package/optimize/es/components/inline_edit/inline_edit.styles.js +0 -15
  125. package/optimize/es/components/inline_edit/inline_edit_form.js +0 -133
  126. package/optimize/es/components/inline_edit/inline_edit_text.js +0 -52
  127. package/optimize/es/components/inline_edit/inline_edit_title.js +0 -56
  128. package/optimize/lib/components/inline_edit/index.js +0 -19
  129. package/optimize/lib/components/inline_edit/inline_edit.styles.js +0 -22
  130. package/optimize/lib/components/inline_edit/inline_edit_form.js +0 -144
  131. package/optimize/lib/components/inline_edit/inline_edit_text.js +0 -52
  132. package/optimize/lib/components/inline_edit/inline_edit_title.js +0 -57
  133. package/src/themes/amsterdam/overrides/_date_popover_button.scss +0 -14
  134. package/test-env/components/inline_edit/index.js +0 -19
  135. package/test-env/components/inline_edit/inline_edit.styles.js +0 -22
  136. package/test-env/components/inline_edit/inline_edit_form.js +0 -196
  137. package/test-env/components/inline_edit/inline_edit_text.js +0 -96
  138. package/test-env/components/inline_edit/inline_edit_title.js +0 -105
@@ -204,6 +204,36 @@ export var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
204
204
  _this.asyncInterval = new AsyncInterval(handler, refreshInterval);
205
205
  }
206
206
  });
207
+ _defineProperty(_assertThisInitialized(_this), "renderQuickSelect", function () {
208
+ var _this$props2 = _this.props,
209
+ start = _this$props2.start,
210
+ end = _this$props2.end,
211
+ customQuickSelectPanels = _this$props2.customQuickSelectPanels,
212
+ customQuickSelectRender = _this$props2.customQuickSelectRender,
213
+ commonlyUsedRanges = _this$props2.commonlyUsedRanges,
214
+ timeOptions = _this$props2.timeOptions,
215
+ dateFormat = _this$props2.dateFormat,
216
+ onRefreshChange = _this$props2.onRefreshChange,
217
+ recentlyUsedRanges = _this$props2.recentlyUsedRanges,
218
+ refreshInterval = _this$props2.refreshInterval,
219
+ isPaused = _this$props2.isPaused,
220
+ isDisabled = _this$props2.isDisabled;
221
+ return ___EmotionJSX(EuiQuickSelectPopover, {
222
+ applyRefreshInterval: onRefreshChange ? _this.onRefreshChange : undefined,
223
+ applyTime: _this.applyQuickTime,
224
+ commonlyUsedRanges: commonlyUsedRanges,
225
+ customQuickSelectPanels: customQuickSelectPanels,
226
+ customQuickSelectRender: customQuickSelectRender,
227
+ dateFormat: dateFormat,
228
+ end: end,
229
+ isDisabled: isDisabled,
230
+ isPaused: isPaused,
231
+ recentlyUsedRanges: recentlyUsedRanges,
232
+ refreshInterval: refreshInterval,
233
+ start: start,
234
+ timeOptions: timeOptions
235
+ });
236
+ });
207
237
  _defineProperty(_assertThisInitialized(_this), "renderDatePickerRange", function () {
208
238
  var _this$state = _this.state,
209
239
  end = _this$state.end,
@@ -213,24 +243,47 @@ export var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
213
243
  isStartDatePopoverOpen = _this$state.isStartDatePopoverOpen,
214
244
  showPrettyDuration = _this$state.showPrettyDuration,
215
245
  start = _this$state.start;
216
- var _this$props2 = _this.props,
217
- commonlyUsedRanges = _this$props2.commonlyUsedRanges,
218
- timeOptions = _this$props2.timeOptions,
219
- dateFormat = _this$props2.dateFormat,
220
- isDisabled = _this$props2.isDisabled,
221
- locale = _this$props2.locale,
222
- timeFormat = _this$props2.timeFormat,
223
- utcOffset = _this$props2.utcOffset,
224
- compressed = _this$props2.compressed,
225
- onFocus = _this$props2.onFocus;
246
+ var _this$props3 = _this.props,
247
+ isQuickSelectOnly = _this$props3.isQuickSelectOnly,
248
+ showUpdateButton = _this$props3.showUpdateButton,
249
+ commonlyUsedRanges = _this$props3.commonlyUsedRanges,
250
+ timeOptions = _this$props3.timeOptions,
251
+ dateFormat = _this$props3.dateFormat,
252
+ refreshInterval = _this$props3.refreshInterval,
253
+ isPaused = _this$props3.isPaused,
254
+ isDisabled = _this$props3.isDisabled,
255
+ isLoading = _this$props3.isLoading,
256
+ locale = _this$props3.locale,
257
+ timeFormat = _this$props3.timeFormat,
258
+ utcOffset = _this$props3.utcOffset,
259
+ compressed = _this$props3.compressed,
260
+ onFocus = _this$props3.onFocus,
261
+ className = _this$props3.className,
262
+ dataTestSubj = _this$props3['data-test-subj'];
263
+ var autoRefreshAppend = !isPaused ? ___EmotionJSX(EuiAutoRefreshButton, {
264
+ refreshInterval: refreshInterval,
265
+ isDisabled: isDisabled,
266
+ isPaused: isPaused,
267
+ onRefreshChange: _this.onRefreshChange,
268
+ shortHand: true
269
+ }) : undefined;
270
+ var formControlLayoutProps = {
271
+ className: classNames('euiSuperDatePicker', className),
272
+ compressed: compressed,
273
+ isInvalid: isInvalid,
274
+ isLoading: isLoading && !showUpdateButton,
275
+ disabled: isDisabled,
276
+ prepend: _this.renderQuickSelect(),
277
+ append: autoRefreshAppend,
278
+ 'data-test-subj': dataTestSubj
279
+ };
280
+ if (isQuickSelectOnly) {
281
+ return ___EmotionJSX(EuiFormControlLayout, _extends({
282
+ iconsPosition: "static"
283
+ }, formControlLayoutProps));
284
+ }
226
285
  if (showPrettyDuration && !isStartDatePopoverOpen && !isEndDatePopoverOpen) {
227
- return ___EmotionJSX(EuiDatePickerRange, {
228
- className: "euiDatePickerRange--inGroup",
229
- iconType: false,
230
- isCustom: true,
231
- startDateControl: ___EmotionJSX("div", null),
232
- endDateControl: ___EmotionJSX("div", null)
233
- }, ___EmotionJSX("button", {
286
+ return ___EmotionJSX(EuiFormControlLayout, formControlLayoutProps, ___EmotionJSX("button", {
234
287
  className: classNames('euiSuperDatePicker__prettyFormat', {
235
288
  'euiSuperDatePicker__prettyFormat--disabled': isDisabled
236
289
  }),
@@ -247,12 +300,12 @@ export var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
247
300
  }
248
301
  return ___EmotionJSX(EuiI18nConsumer, null, function (_ref4) {
249
302
  var contextLocale = _ref4.locale;
250
- return ___EmotionJSX(EuiDatePickerRange, {
251
- className: "euiDatePickerRange--inGroup",
252
- iconType: false,
253
- isInvalid: isInvalid,
254
- disabled: isDisabled,
303
+ return ___EmotionJSX(EuiDatePickerRange, _extends({}, formControlLayoutProps, {
304
+ className: classNames(formControlLayoutProps.className, {
305
+ 'euiSuperDatePicker--needsUpdating': hasChanged && !isDisabled && !isInvalid
306
+ }),
255
307
  isCustom: true,
308
+ iconType: false,
256
309
  startDateControl: ___EmotionJSX(EuiDatePopoverButton, {
257
310
  className: "euiSuperDatePicker__startPopoverButton",
258
311
  compressed: compressed,
@@ -295,15 +348,15 @@ export var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
295
348
  onFocus: onFocus
296
349
  }
297
350
  })
298
- });
351
+ }));
299
352
  });
300
353
  });
301
354
  _defineProperty(_assertThisInitialized(_this), "handleClickUpdateButton", function () {
302
355
  if (!_this.state.hasChanged && _this.props.onRefresh) {
303
- var _this$props3 = _this.props,
304
- start = _this$props3.start,
305
- end = _this$props3.end,
306
- refreshInterval = _this$props3.refreshInterval;
356
+ var _this$props4 = _this.props,
357
+ start = _this$props4.start,
358
+ end = _this$props4.end,
359
+ refreshInterval = _this$props4.refreshInterval;
307
360
  _this.props.onRefresh({
308
361
  start: start,
309
362
  end: end,
@@ -314,12 +367,12 @@ export var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
314
367
  }
315
368
  });
316
369
  _defineProperty(_assertThisInitialized(_this), "renderUpdateButton", function () {
317
- var _this$props4 = _this.props,
318
- isLoading = _this$props4.isLoading,
319
- isDisabled = _this$props4.isDisabled,
320
- updateButtonProps = _this$props4.updateButtonProps,
321
- showUpdateButton = _this$props4.showUpdateButton,
322
- compressed = _this$props4.compressed;
370
+ var _this$props5 = _this.props,
371
+ isLoading = _this$props5.isLoading,
372
+ isDisabled = _this$props5.isDisabled,
373
+ updateButtonProps = _this$props5.updateButtonProps,
374
+ showUpdateButton = _this$props5.showUpdateButton,
375
+ compressed = _this$props5.compressed;
323
376
  if (!showUpdateButton) return null;
324
377
  return ___EmotionJSX(EuiFlexItem, {
325
378
  grow: false
@@ -339,52 +392,21 @@ export var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
339
392
  _createClass(EuiSuperDatePickerInternal, [{
340
393
  key: "render",
341
394
  value: function render() {
342
- var _this$props5 = this.props,
343
- commonlyUsedRanges = _this$props5.commonlyUsedRanges,
344
- timeOptions = _this$props5.timeOptions,
345
- customQuickSelectPanels = _this$props5.customQuickSelectPanels,
346
- customQuickSelectRender = _this$props5.customQuickSelectRender,
347
- dateFormat = _this$props5.dateFormat,
348
- end = _this$props5.end,
349
- isAutoRefreshOnly = _this$props5.isAutoRefreshOnly,
350
- isDisabled = _this$props5.isDisabled,
351
- isPaused = _this$props5.isPaused,
352
- onRefreshChange = _this$props5.onRefreshChange,
353
- recentlyUsedRanges = _this$props5.recentlyUsedRanges,
354
- refreshInterval = _this$props5.refreshInterval,
355
- showUpdateButton = _this$props5.showUpdateButton,
356
- start = _this$props5.start,
357
- dataTestSubj = _this$props5['data-test-subj'],
358
- _width = _this$props5.width,
359
- isQuickSelectOnly = _this$props5.isQuickSelectOnly,
360
- compressed = _this$props5.compressed,
361
- className = _this$props5.className;
395
+ var _this$props6 = this.props,
396
+ isAutoRefreshOnly = _this$props6.isAutoRefreshOnly,
397
+ isDisabled = _this$props6.isDisabled,
398
+ isPaused = _this$props6.isPaused,
399
+ onRefreshChange = _this$props6.onRefreshChange,
400
+ refreshInterval = _this$props6.refreshInterval,
401
+ showUpdateButton = _this$props6.showUpdateButton,
402
+ dataTestSubj = _this$props6['data-test-subj'],
403
+ _width = _this$props6.width,
404
+ isQuickSelectOnly = _this$props6.isQuickSelectOnly,
405
+ compressed = _this$props6.compressed,
406
+ className = _this$props6.className;
362
407
 
363
408
  // Force reduction in width if showing quick select only
364
409
  var width = isQuickSelectOnly ? 'auto' : _width;
365
- var autoRefreshAppend = !isPaused ? ___EmotionJSX(EuiAutoRefreshButton, {
366
- className: "euiFormControlLayout__append",
367
- refreshInterval: refreshInterval,
368
- isDisabled: isDisabled,
369
- isPaused: isPaused,
370
- onRefreshChange: this.onRefreshChange,
371
- shortHand: true
372
- }) : undefined;
373
- var quickSelect = ___EmotionJSX(EuiQuickSelectPopover, {
374
- applyRefreshInterval: onRefreshChange ? this.onRefreshChange : undefined,
375
- applyTime: this.applyQuickTime,
376
- commonlyUsedRanges: commonlyUsedRanges,
377
- customQuickSelectPanels: customQuickSelectPanels,
378
- customQuickSelectRender: customQuickSelectRender,
379
- dateFormat: dateFormat,
380
- end: end,
381
- isDisabled: isDisabled,
382
- isPaused: isPaused,
383
- recentlyUsedRanges: recentlyUsedRanges,
384
- refreshInterval: refreshInterval,
385
- start: start,
386
- timeOptions: timeOptions
387
- });
388
410
  var flexWrapperClasses = classNames('euiSuperDatePicker__flexWrapper', {
389
411
  'euiSuperDatePicker__flexWrapper--noUpdateButton': !showUpdateButton,
390
412
  'euiSuperDatePicker__flexWrapper--isAutoRefreshOnly': isAutoRefreshOnly,
@@ -405,14 +427,7 @@ export var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
405
427
  isDisabled: isDisabled,
406
428
  "data-test-subj": dataTestSubj,
407
429
  className: className
408
- })) : ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiFormControlLayout, {
409
- className: classNames('euiSuperDatePicker', className),
410
- compressed: compressed,
411
- isDisabled: isDisabled,
412
- prepend: quickSelect,
413
- append: autoRefreshAppend,
414
- "data-test-subj": dataTestSubj
415
- }, !isQuickSelectOnly && this.renderDatePickerRange())), this.renderUpdateButton()));
430
+ })) : ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiFlexItem, null, this.renderDatePickerRange()), this.renderUpdateButton()));
416
431
  }
417
432
  }], [{
418
433
  key: "getDerivedStateFromProps",
@@ -1,5 +1,11 @@
1
- var _excluded = ["className", "icon", "id", "placeholder", "name", "min", "max", "value", "isInvalid", "fullWidth", "isLoading", "compressed", "prepend", "append", "inputRef", "readOnly", "controlOnly"];
1
+ var _excluded = ["className", "icon", "id", "placeholder", "name", "min", "max", "value", "isInvalid", "fullWidth", "isLoading", "compressed", "prepend", "append", "inputRef", "readOnly", "controlOnly", "onKeyDown"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
3
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
8
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
3
9
  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; }
4
10
  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; }
5
11
  /*
@@ -10,13 +16,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
10
16
  * Side Public License, v 1.
11
17
  */
12
18
 
13
- import React from 'react';
19
+ import React, { useState, useRef, useCallback } from 'react';
14
20
  import PropTypes from "prop-types";
15
21
  import classNames from 'classnames';
16
- import { EuiFormControlLayout } from '../form_control_layout';
22
+ import { useCombinedRefs } from '../../../services';
17
23
  import { EuiValidatableControl } from '../validatable_control';
18
- import { useFormContext } from '../eui_form_context';
24
+ import { EuiFormControlLayout } from '../form_control_layout';
19
25
  import { getFormControlClassNameForIconCount } from '../form_control_layout/_num_icons';
26
+ import { useFormContext } from '../eui_form_context';
20
27
  import { jsx as ___EmotionJSX } from "@emotion/react";
21
28
  export var EuiFieldNumber = function EuiFieldNumber(props) {
22
29
  var _useFormContext = useFormContext(),
@@ -41,9 +48,31 @@ export var EuiFieldNumber = function EuiFieldNumber(props) {
41
48
  inputRef = props.inputRef,
42
49
  readOnly = props.readOnly,
43
50
  controlOnly = props.controlOnly,
51
+ _onKeyDown = props.onKeyDown,
44
52
  rest = _objectWithoutProperties(props, _excluded);
45
- var numIconsClass = getFormControlClassNameForIconCount({
46
- isInvalid: isInvalid,
53
+
54
+ // Attempt to determine additional invalid state. The native number input
55
+ // will set :invalid state automatically, but we need to also set
56
+ // `aria-invalid` as well as display an icon. We also want to *not* set this on
57
+ // EuiValidatableControl, in order to not override custom validity messages
58
+ var _useState = useState(false),
59
+ _useState2 = _slicedToArray(_useState, 2),
60
+ isNativelyInvalid = _useState2[0],
61
+ setIsNativelyInvalid = _useState2[1];
62
+ var validityRef = useRef(null);
63
+ var setRefs = useCombinedRefs([validityRef, inputRef]);
64
+
65
+ // Note that we can't use hook into `onChange` because browsers don't emit change events
66
+ // for invalid values - see https://github.com/facebook/react/issues/16554
67
+ var onKeyDown = useCallback(function (e) {
68
+ _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e);
69
+ // Wait a beat before checking validity - we can't use `e.target` as it's stale
70
+ requestAnimationFrame(function () {
71
+ setIsNativelyInvalid(!validityRef.current.validity.valid);
72
+ });
73
+ }, [_onKeyDown]);
74
+ var numIconsClass = controlOnly ? false : getFormControlClassNameForIconCount({
75
+ isInvalid: isInvalid || isNativelyInvalid,
47
76
  isLoading: isLoading
48
77
  });
49
78
  var classes = classNames('euiFieldNumber', className, numIconsClass, {
@@ -65,7 +94,9 @@ export var EuiFieldNumber = function EuiFieldNumber(props) {
65
94
  placeholder: placeholder,
66
95
  readOnly: readOnly,
67
96
  className: classes,
68
- ref: inputRef
97
+ ref: setRefs,
98
+ onKeyDown: onKeyDown,
99
+ "aria-invalid": isInvalid || isNativelyInvalid
69
100
  }, rest)));
70
101
  if (controlOnly) {
71
102
  return control;
@@ -74,7 +105,7 @@ export var EuiFieldNumber = function EuiFieldNumber(props) {
74
105
  icon: icon,
75
106
  fullWidth: fullWidth,
76
107
  isLoading: isLoading,
77
- isInvalid: isInvalid,
108
+ isInvalid: isInvalid || isNativelyInvalid,
78
109
  compressed: compressed,
79
110
  readOnly: readOnly,
80
111
  prepend: prepend,
@@ -38,7 +38,7 @@ export var EuiFieldText = function EuiFieldText(props) {
38
38
  readOnly = props.readOnly,
39
39
  controlOnly = props.controlOnly,
40
40
  rest = _objectWithoutProperties(props, _excluded);
41
- var numIconsClass = getFormControlClassNameForIconCount({
41
+ var numIconsClass = controlOnly ? false : getFormControlClassNameForIconCount({
42
42
  isInvalid: isInvalid,
43
43
  isLoading: isLoading
44
44
  });
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "icon", "clear", "fullWidth", "isLoading", "isDisabled", "compressed", "className", "prepend", "append", "readOnly", "isInvalid", "isDropdown", "inputId"];
1
+ var _excluded = ["children", "icon", "iconsPosition", "clear", "fullWidth", "isLoading", "isDisabled", "compressed", "className", "prepend", "append", "readOnly", "isInvalid", "isDropdown", "inputId"];
2
2
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
4
4
  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,36 +31,79 @@ import { EuiFormControlLayoutIcons } from './form_control_layout_icons';
31
31
  import { EuiFormLabel } from '../form_label';
32
32
  import { FormContext } from '../eui_form_context';
33
33
  import { jsx as ___EmotionJSX } from "@emotion/react";
34
- export { ICON_SIDES } from './form_control_layout_icons';
35
34
  export var EuiFormControlLayout = /*#__PURE__*/function (_Component) {
36
35
  _inherits(EuiFormControlLayout, _Component);
37
36
  var _super = _createSuper(EuiFormControlLayout);
38
37
  function EuiFormControlLayout() {
38
+ var _this;
39
39
  _classCallCheck(this, EuiFormControlLayout);
40
- return _super.apply(this, arguments);
40
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
41
+ args[_key] = arguments[_key];
42
+ }
43
+ _this = _super.call.apply(_super, [this].concat(args));
44
+ _defineProperty(_assertThisInitialized(_this), "renderLeftIcons", function () {
45
+ var _this$props = _this.props,
46
+ icon = _this$props.icon,
47
+ iconsPosition = _this$props.iconsPosition,
48
+ compressed = _this$props.compressed;
49
+ var leftCustomIcon = icon && (icon === null || icon === void 0 ? void 0 : icon.side) !== 'right' ? icon : undefined;
50
+ return leftCustomIcon ? ___EmotionJSX(EuiFormControlLayoutIcons, {
51
+ side: "left",
52
+ icon: leftCustomIcon,
53
+ iconsPosition: iconsPosition,
54
+ compressed: compressed
55
+ }) : null;
56
+ });
57
+ _defineProperty(_assertThisInitialized(_this), "renderRightIcons", function () {
58
+ var _this$props2 = _this.props,
59
+ icon = _this$props2.icon,
60
+ iconsPosition = _this$props2.iconsPosition,
61
+ clear = _this$props2.clear,
62
+ compressed = _this$props2.compressed,
63
+ isLoading = _this$props2.isLoading,
64
+ isInvalid = _this$props2.isInvalid,
65
+ isDisabled = _this$props2.isDisabled,
66
+ readOnly = _this$props2.readOnly,
67
+ isDropdown = _this$props2.isDropdown;
68
+ var hasDropdownIcon = !readOnly && !isDisabled && isDropdown;
69
+ var rightCustomIcon = icon && (icon === null || icon === void 0 ? void 0 : icon.side) === 'right' ? icon : undefined;
70
+ var hasRightIcons = rightCustomIcon || clear || isLoading || isInvalid || hasDropdownIcon;
71
+ return hasRightIcons ? ___EmotionJSX(EuiFormControlLayoutIcons, {
72
+ side: "right",
73
+ icon: rightCustomIcon,
74
+ iconsPosition: iconsPosition,
75
+ compressed: compressed,
76
+ clear: clear,
77
+ isLoading: isLoading,
78
+ isInvalid: isInvalid,
79
+ isDropdown: hasDropdownIcon
80
+ }) : null;
81
+ });
82
+ return _this;
41
83
  }
42
84
  _createClass(EuiFormControlLayout, [{
43
85
  key: "render",
44
86
  value: function render() {
45
87
  var _ref = this.context,
46
88
  defaultFullWidth = _ref.defaultFullWidth;
47
- var _this$props = this.props,
48
- children = _this$props.children,
49
- icon = _this$props.icon,
50
- clear = _this$props.clear,
51
- _this$props$fullWidth = _this$props.fullWidth,
52
- fullWidth = _this$props$fullWidth === void 0 ? defaultFullWidth : _this$props$fullWidth,
53
- isLoading = _this$props.isLoading,
54
- isDisabled = _this$props.isDisabled,
55
- compressed = _this$props.compressed,
56
- className = _this$props.className,
57
- prepend = _this$props.prepend,
58
- append = _this$props.append,
59
- readOnly = _this$props.readOnly,
60
- invalid = _this$props.isInvalid,
61
- isDropdown = _this$props.isDropdown,
62
- inputId = _this$props.inputId,
63
- rest = _objectWithoutProperties(_this$props, _excluded);
89
+ var _this$props3 = this.props,
90
+ children = _this$props3.children,
91
+ icon = _this$props3.icon,
92
+ iconsPosition = _this$props3.iconsPosition,
93
+ clear = _this$props3.clear,
94
+ _this$props3$fullWidt = _this$props3.fullWidth,
95
+ fullWidth = _this$props3$fullWidt === void 0 ? defaultFullWidth : _this$props3$fullWidt,
96
+ isLoading = _this$props3.isLoading,
97
+ isDisabled = _this$props3.isDisabled,
98
+ compressed = _this$props3.compressed,
99
+ className = _this$props3.className,
100
+ prepend = _this$props3.prepend,
101
+ append = _this$props3.append,
102
+ readOnly = _this$props3.readOnly,
103
+ isInvalid = _this$props3.isInvalid,
104
+ isDropdown = _this$props3.isDropdown,
105
+ inputId = _this$props3.inputId,
106
+ rest = _objectWithoutProperties(_this$props3, _excluded);
64
107
  var classes = classNames('euiFormControlLayout', {
65
108
  'euiFormControlLayout--fullWidth': fullWidth,
66
109
  'euiFormControlLayout--compressed': compressed,
@@ -74,19 +117,12 @@ export var EuiFormControlLayout = /*#__PURE__*/function (_Component) {
74
117
  className: classes
75
118
  }, rest), prependNodes, ___EmotionJSX("div", {
76
119
  className: "euiFormControlLayout__childrenWrapper"
77
- }, children, ___EmotionJSX(EuiFormControlLayoutIcons, {
78
- icon: icon,
79
- clear: clear,
80
- compressed: compressed,
81
- isLoading: isLoading,
82
- isInvalid: invalid,
83
- isDropdown: !readOnly && !isDisabled && isDropdown
84
- })), appendNodes);
120
+ }, this.renderLeftIcons(), children, this.renderRightIcons()), appendNodes);
85
121
  }
86
122
  }, {
87
123
  key: "renderSideNode",
88
124
  value: function renderSideNode(side, nodes, inputId) {
89
- var _this = this;
125
+ var _this2 = this;
90
126
  if (!nodes) {
91
127
  return;
92
128
  }
@@ -94,7 +130,7 @@ export var EuiFormControlLayout = /*#__PURE__*/function (_Component) {
94
130
  return this.createFormLabel(side, nodes, inputId);
95
131
  }
96
132
  var appendNodes = React.Children.map(nodes, function (item, index) {
97
- return typeof item === 'string' ? _this.createFormLabel(side, item, inputId) : _this.createSideNode(side, item, index);
133
+ return typeof item === 'string' ? _this2.createFormLabel(side, item, inputId) : _this2.createSideNode(side, item, index);
98
134
  });
99
135
  return appendNodes;
100
136
  }
@@ -140,6 +176,7 @@ EuiFormControlLayout.propTypes = {
140
176
  color: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.any.isRequired]),
141
177
  ref: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.func.isRequired])
142
178
  }).isRequired]),
179
+ iconsPosition: PropTypes.oneOf(["absolute", "static"]),
143
180
  clear: PropTypes.shape({
144
181
  className: PropTypes.string,
145
182
  "aria-label": PropTypes.string,
@@ -13,24 +13,31 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
13
13
  import React, { cloneElement } from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
+ import { useEuiI18n } from '../../i18n';
17
+ import { EuiIcon } from '../../icon';
16
18
  import { EuiText } from '../../text';
17
19
  import { EuiFormControlLayout } from './form_control_layout';
18
20
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
21
  export var EuiFormControlLayoutDelimited = function EuiFormControlLayoutDelimited(_ref) {
20
22
  var startControl = _ref.startControl,
21
23
  endControl = _ref.endControl,
22
- _ref$delimiter = _ref.delimiter,
23
- delimiter = _ref$delimiter === void 0 ? '→' : _ref$delimiter,
24
+ delimiter = _ref.delimiter,
24
25
  className = _ref.className,
25
26
  rest = _objectWithoutProperties(_ref, _excluded);
26
- var classes = classNames('euiFormControlLayoutDelimited', className);
27
+ var isInvalid = rest.isInvalid,
28
+ isDisabled = rest.isDisabled,
29
+ readOnly = rest.readOnly;
30
+ var showInvalidState = isInvalid && !isDisabled && !readOnly;
31
+ var classes = classNames('euiFormControlLayoutDelimited', className, {
32
+ 'euiFormControlLayoutDelimited--isInvalid': showInvalidState
33
+ });
27
34
  return ___EmotionJSX(EuiFormControlLayout, _extends({
28
- className: classes
29
- }, rest), addClassesToControl(startControl), ___EmotionJSX(EuiText, {
30
- className: "euiFormControlLayoutDelimited__delimeter",
31
- size: "s",
32
- color: "subdued"
33
- }, delimiter), addClassesToControl(endControl));
35
+ className: classes,
36
+ iconsPosition: "static"
37
+ }, rest), addClassesToControl(startControl), ___EmotionJSX(EuiFormControlDelimiter, {
38
+ delimiter: delimiter,
39
+ isInvalid: showInvalidState
40
+ }), addClassesToControl(endControl));
34
41
  };
35
42
  EuiFormControlLayoutDelimited.propTypes = {
36
43
  /**
@@ -48,8 +55,21 @@ EuiFormControlLayoutDelimited.propTypes = {
48
55
  delimiter: PropTypes.node,
49
56
  className: PropTypes.string
50
57
  };
51
- function addClassesToControl(control) {
58
+ var addClassesToControl = function addClassesToControl(control) {
52
59
  return /*#__PURE__*/cloneElement(control, {
53
60
  className: classNames(control.props.className, 'euiFormControlLayoutDelimited__input')
54
61
  });
55
- }
62
+ };
63
+ var EuiFormControlDelimiter = function EuiFormControlDelimiter(_ref2) {
64
+ var delimiter = _ref2.delimiter,
65
+ isInvalid = _ref2.isInvalid;
66
+ var defaultAriaLabel = useEuiI18n('euiFormControlLayoutDelimited.delimiterLabel', 'to');
67
+ return ___EmotionJSX(EuiText, {
68
+ className: "euiFormControlLayoutDelimited__delimiter",
69
+ size: "s",
70
+ color: isInvalid ? 'danger' : 'subdued'
71
+ }, delimiter !== null && delimiter !== void 0 ? delimiter : ___EmotionJSX(EuiIcon, {
72
+ type: "sortRight",
73
+ "aria-label": defaultAriaLabel
74
+ }));
75
+ };
@@ -23,8 +23,9 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
23
23
  * Side Public License, v 1.
24
24
  */
25
25
 
26
- import React, { Fragment, Component } from 'react';
26
+ import React, { Component } from 'react';
27
27
  import PropTypes from "prop-types";
28
+ import classNames from 'classnames';
28
29
  import { EuiLoadingSpinner } from '../../loading';
29
30
  import { EuiFormControlLayoutClearButton } from './form_control_layout_clear_button';
30
31
  import { EuiFormControlLayoutCustomIcon } from './form_control_layout_custom_icon';
@@ -45,30 +46,19 @@ export var EuiFormControlLayoutIcons = /*#__PURE__*/function (_Component) {
45
46
  key: "render",
46
47
  value: function render() {
47
48
  var _this$props = this.props,
48
- icon = _this$props.icon,
49
- isInvalid = _this$props.isInvalid,
50
- isDropdown = _this$props.isDropdown;
51
- var iconSide = isIconShape(icon) && icon.side ? icon.side : 'left';
49
+ _this$props$side = _this$props.side,
50
+ side = _this$props$side === void 0 ? 'left' : _this$props$side,
51
+ _this$props$iconsPosi = _this$props.iconsPosition,
52
+ iconsPosition = _this$props$iconsPosi === void 0 ? 'absolute' : _this$props$iconsPosi;
52
53
  var customIcon = this.renderCustomIcon();
53
54
  var loadingSpinner = this.renderLoadingSpinner();
54
55
  var clearButton = this.renderClearButton();
55
56
  var invalidIcon = this.renderInvalidIcon();
56
57
  var dropdownIcon = this.renderDropdownIcon();
57
- var leftIcons;
58
- if (customIcon && iconSide === 'left') {
59
- leftIcons = ___EmotionJSX("div", {
60
- className: "euiFormControlLayoutIcons"
61
- }, customIcon);
62
- }
63
- var rightIcons;
64
-
65
- // If the icon is on the right, it should be placed after the clear button in the DOM.
66
- if (clearButton || loadingSpinner || isInvalid || isDropdown || customIcon && iconSide === 'right') {
67
- rightIcons = ___EmotionJSX("div", {
68
- className: "euiFormControlLayoutIcons euiFormControlLayoutIcons--right"
69
- }, clearButton, loadingSpinner, invalidIcon, iconSide === 'right' ? customIcon : undefined, dropdownIcon);
70
- }
71
- return ___EmotionJSX(Fragment, null, leftIcons, rightIcons);
58
+ var classes = classNames('euiFormControlLayoutIcons', "euiFormControlLayoutIcons--".concat(side), "euiFormControlLayoutIcons--".concat(iconsPosition));
59
+ return ___EmotionJSX("div", {
60
+ className: classes
61
+ }, clearButton, loadingSpinner, invalidIcon, customIcon, dropdownIcon);
72
62
  }
73
63
  }, {
74
64
  key: "renderCustomIcon",
@@ -157,6 +147,8 @@ EuiFormControlLayoutIcons.propTypes = {
157
147
  color: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.any.isRequired]),
158
148
  ref: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.func.isRequired])
159
149
  }).isRequired]),
150
+ side: PropTypes.any,
151
+ iconsPosition: PropTypes.oneOf(["absolute", "static"]),
160
152
  clear: PropTypes.shape({
161
153
  className: PropTypes.string,
162
154
  "aria-label": PropTypes.string,
@@ -397,7 +397,6 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
397
397
  var min = minProps;
398
398
  var max = maxProps;
399
399
  var id = this.state.id;
400
- var digitTolerance = Math.max(String(min).length, String(max).length);
401
400
  var showInputOnly = showInput === 'inputWithPopover';
402
401
  var canShowDropdown = showInputOnly && !readOnly && !disabled;
403
402
  var rangeStyles = euiRangeStyles(theme);
@@ -408,7 +407,6 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
408
407
  "aria-label": this.props['aria-label']
409
408
  }, minInputProps, {
410
409
  // Non-overridable props
411
- digitTolerance: digitTolerance,
412
410
  side: "min",
413
411
  min: min,
414
412
  max: Number(this.upperValue),
@@ -437,7 +435,6 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
437
435
  "aria-label": this.props['aria-label']
438
436
  }, maxInputProps, {
439
437
  // Non-overridable props
440
- digitTolerance: digitTolerance,
441
438
  side: "max",
442
439
  min: Number(this.lowerValue),
443
440
  max: max,
@@ -589,7 +586,8 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
589
586
  readOnly: readOnly,
590
587
  append: append,
591
588
  prepend: prepend,
592
- isLoading: isLoading
589
+ isLoading: isLoading,
590
+ isInvalid: isInvalid
593
591
  }),
594
592
  fullWidth: fullWidth,
595
593
  isOpen: this.state.isPopoverOpen,