@elastic/eui 65.0.0 → 66.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.
Files changed (169) hide show
  1. package/dist/eui_theme_dark.css +28 -197
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +28 -197
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/basic_table.js +13 -2
  6. package/es/components/basic_table/in_memory_table.js +13 -2
  7. package/es/components/card/card.styles.js +2 -2
  8. package/es/components/combo_box/combo_box.js +2 -15
  9. package/es/components/datagrid/body/data_grid_body.js +17 -6
  10. package/es/components/datagrid/body/data_grid_cell.js +29 -12
  11. package/es/components/datagrid/body/header/data_grid_header_cell.js +17 -6
  12. package/es/components/datagrid/body/header/data_grid_header_row.js +17 -6
  13. package/es/components/datagrid/data_grid.js +17 -6
  14. package/es/components/datagrid/utils/in_memory.js +17 -6
  15. package/es/components/date_picker/react-datepicker/original.package.json +124 -0
  16. package/es/components/description_list/description_list.js +11 -3
  17. package/es/components/description_list/description_list_context.js +2 -1
  18. package/es/components/description_list/description_list_description.js +3 -1
  19. package/es/components/description_list/description_list_description.styles.js +5 -2
  20. package/es/components/description_list/description_list_title.js +4 -3
  21. package/es/components/description_list/description_list_title.styles.js +7 -3
  22. package/es/components/description_list/description_list_types.js +2 -1
  23. package/es/components/form/field_search/field_search.js +6 -16
  24. package/es/components/form/range/range_input.js +1 -1
  25. package/es/components/header/header_section/header_section_item.js +4 -3
  26. package/es/components/icon/icon.js +3 -10
  27. package/es/components/list_group/list_group.js +7 -1
  28. package/es/components/list_group/list_group_item.js +10 -3
  29. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
  30. package/es/components/modal/modal.js +1 -3
  31. package/es/components/observer/mutation_observer/mutation_observer.js +1 -1
  32. package/es/components/page/page_sidebar/page_sidebar.js +5 -1
  33. package/es/components/table/table_row_cell.js +4 -6
  34. package/es/components/tabs/tabbed_content/tabbed_content.js +2 -19
  35. package/es/global_styling/functions/logicals.json +56 -0
  36. package/es/global_styling/mixins/_typography.js +1 -1
  37. package/es/services/theme/hooks.js +11 -16
  38. package/eui.d.ts +29 -10
  39. package/i18ntokens.json +18 -18
  40. package/lib/components/basic_table/basic_table.js +13 -2
  41. package/lib/components/basic_table/in_memory_table.js +13 -2
  42. package/lib/components/card/card.styles.js +2 -2
  43. package/lib/components/combo_box/combo_box.js +2 -15
  44. package/lib/components/datagrid/body/data_grid_body.js +17 -6
  45. package/lib/components/datagrid/body/data_grid_cell.js +29 -12
  46. package/lib/components/datagrid/body/header/data_grid_header_cell.js +17 -6
  47. package/lib/components/datagrid/body/header/data_grid_header_row.js +17 -6
  48. package/lib/components/datagrid/data_grid.js +17 -6
  49. package/lib/components/datagrid/utils/in_memory.js +17 -6
  50. package/lib/components/date_picker/react-datepicker/original.package.json +124 -0
  51. package/lib/components/description_list/description_list.js +11 -3
  52. package/lib/components/description_list/description_list_context.js +2 -1
  53. package/lib/components/description_list/description_list_description.js +3 -1
  54. package/lib/components/description_list/description_list_description.styles.js +5 -2
  55. package/lib/components/description_list/description_list_title.js +4 -3
  56. package/lib/components/description_list/description_list_title.styles.js +7 -3
  57. package/lib/components/description_list/description_list_types.js +4 -2
  58. package/lib/components/form/field_search/field_search.js +6 -16
  59. package/lib/components/form/range/range_input.js +1 -1
  60. package/lib/components/header/header_section/header_section_item.js +4 -3
  61. package/lib/components/icon/icon.js +3 -10
  62. package/lib/components/list_group/list_group.js +7 -1
  63. package/lib/components/list_group/list_group_item.js +10 -3
  64. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
  65. package/lib/components/modal/modal.js +1 -3
  66. package/lib/components/observer/mutation_observer/mutation_observer.js +1 -1
  67. package/lib/components/page/page_sidebar/page_sidebar.js +5 -1
  68. package/lib/components/table/table_row_cell.js +4 -6
  69. package/lib/components/tabs/tabbed_content/tabbed_content.js +2 -19
  70. package/lib/global_styling/functions/logicals.json +56 -0
  71. package/lib/global_styling/mixins/_typography.js +1 -1
  72. package/lib/services/theme/hooks.js +10 -15
  73. package/optimize/es/components/card/card.styles.js +2 -2
  74. package/optimize/es/components/combo_box/combo_box.js +2 -15
  75. package/optimize/es/components/date_picker/react-datepicker/original.package.json +124 -0
  76. package/optimize/es/components/description_list/description_list.js +5 -2
  77. package/optimize/es/components/description_list/description_list_context.js +2 -1
  78. package/optimize/es/components/description_list/description_list_description.js +3 -1
  79. package/optimize/es/components/description_list/description_list_description.styles.js +5 -2
  80. package/optimize/es/components/description_list/description_list_title.js +4 -3
  81. package/optimize/es/components/description_list/description_list_title.styles.js +7 -3
  82. package/optimize/es/components/description_list/description_list_types.js +2 -1
  83. package/optimize/es/components/form/field_search/field_search.js +6 -16
  84. package/optimize/es/components/form/range/range_input.js +1 -1
  85. package/optimize/es/components/header/header_section/header_section_item.js +4 -3
  86. package/optimize/es/components/icon/icon.js +3 -10
  87. package/optimize/es/components/list_group/list_group_item.js +3 -2
  88. package/optimize/es/components/modal/modal.js +1 -3
  89. package/optimize/es/components/observer/mutation_observer/mutation_observer.js +1 -1
  90. package/optimize/es/components/page/page_sidebar/page_sidebar.js +5 -1
  91. package/optimize/es/components/tabs/tabbed_content/tabbed_content.js +2 -19
  92. package/optimize/es/global_styling/functions/logicals.json +56 -0
  93. package/optimize/es/global_styling/mixins/_typography.js +1 -1
  94. package/optimize/es/services/theme/hooks.js +11 -16
  95. package/optimize/lib/components/card/card.styles.js +2 -2
  96. package/optimize/lib/components/combo_box/combo_box.js +2 -15
  97. package/optimize/lib/components/date_picker/react-datepicker/original.package.json +124 -0
  98. package/optimize/lib/components/description_list/description_list.js +5 -2
  99. package/optimize/lib/components/description_list/description_list_context.js +2 -1
  100. package/optimize/lib/components/description_list/description_list_description.js +3 -1
  101. package/optimize/lib/components/description_list/description_list_description.styles.js +5 -2
  102. package/optimize/lib/components/description_list/description_list_title.js +4 -3
  103. package/optimize/lib/components/description_list/description_list_title.styles.js +7 -3
  104. package/optimize/lib/components/description_list/description_list_types.js +4 -2
  105. package/optimize/lib/components/form/field_search/field_search.js +6 -16
  106. package/optimize/lib/components/form/range/range_input.js +1 -1
  107. package/optimize/lib/components/header/header_section/header_section_item.js +4 -3
  108. package/optimize/lib/components/icon/icon.js +3 -10
  109. package/optimize/lib/components/list_group/list_group_item.js +3 -2
  110. package/optimize/lib/components/modal/modal.js +1 -3
  111. package/optimize/lib/components/observer/mutation_observer/mutation_observer.js +1 -1
  112. package/optimize/lib/components/page/page_sidebar/page_sidebar.js +5 -1
  113. package/optimize/lib/components/tabs/tabbed_content/tabbed_content.js +2 -19
  114. package/optimize/lib/global_styling/functions/logicals.json +56 -0
  115. package/optimize/lib/global_styling/mixins/_typography.js +1 -1
  116. package/optimize/lib/services/theme/hooks.js +10 -15
  117. package/package.json +1 -1
  118. package/src/components/badge/_badge.scss +0 -5
  119. package/src/components/datagrid/_data_grid_data_row.scss +7 -0
  120. package/src/components/datagrid/body/header/_data_grid_header_row.scss +1 -1
  121. package/src/components/filter_group/_filter_group.scss +3 -1
  122. package/src/components/flex/_flex_group.scss +2 -11
  123. package/src/components/flex/_flex_item.scss +0 -6
  124. package/src/components/form/field_search/_field_search.scss +0 -5
  125. package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +0 -3
  126. package/src/components/form/form_row/_form_row.scss +0 -1
  127. package/src/components/header/header_section/_header_section_item.scss +1 -1
  128. package/src/components/list_group/_list_group_item.scss +3 -25
  129. package/src/components/modal/_modal.scss +5 -20
  130. package/src/components/page/page_content/_page_content.scss +0 -1
  131. package/src/components/table/_responsive.scss +0 -1
  132. package/src/components/table/_table.scss +0 -5
  133. package/src/global_styling/mixins/_form.scss +0 -4
  134. package/src/global_styling/mixins/_helpers.scss +0 -8
  135. package/src/global_styling/mixins/_typography.scss +1 -5
  136. package/src/global_styling/utility/_index.scss +0 -1
  137. package/test-env/components/basic_table/basic_table.js +13 -2
  138. package/test-env/components/basic_table/in_memory_table.js +13 -2
  139. package/test-env/components/card/card.styles.js +2 -2
  140. package/test-env/components/combo_box/combo_box.js +2 -15
  141. package/test-env/components/datagrid/body/data_grid_body.js +17 -6
  142. package/test-env/components/datagrid/body/data_grid_cell.js +29 -12
  143. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +17 -6
  144. package/test-env/components/datagrid/body/header/data_grid_header_row.js +17 -6
  145. package/test-env/components/datagrid/data_grid.js +17 -6
  146. package/test-env/components/datagrid/utils/in_memory.js +17 -6
  147. package/test-env/components/date_picker/react-datepicker/original.package.json +124 -0
  148. package/test-env/components/description_list/description_list.js +11 -3
  149. package/test-env/components/description_list/description_list_context.js +2 -1
  150. package/test-env/components/description_list/description_list_description.js +3 -1
  151. package/test-env/components/description_list/description_list_description.styles.js +5 -2
  152. package/test-env/components/description_list/description_list_title.js +4 -3
  153. package/test-env/components/description_list/description_list_title.styles.js +7 -3
  154. package/test-env/components/description_list/description_list_types.js +4 -2
  155. package/test-env/components/form/field_search/field_search.js +6 -16
  156. package/test-env/components/form/range/range_input.js +1 -1
  157. package/test-env/components/header/header_section/header_section_item.js +4 -3
  158. package/test-env/components/list_group/list_group.js +7 -1
  159. package/test-env/components/list_group/list_group_item.js +10 -3
  160. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
  161. package/test-env/components/modal/modal.js +1 -3
  162. package/test-env/components/observer/mutation_observer/mutation_observer.js +1 -1
  163. package/test-env/components/page/page_sidebar/page_sidebar.js +5 -1
  164. package/test-env/components/table/table_row_cell.js +4 -6
  165. package/test-env/components/tabs/tabbed_content/tabbed_content.js +2 -19
  166. package/test-env/global_styling/functions/logicals.json +56 -0
  167. package/test-env/global_styling/mixins/_typography.js +1 -1
  168. package/test-env/services/theme/hooks.js +10 -15
  169. package/src/global_styling/utility/_utility.scss +0 -15
@@ -326,7 +326,13 @@ EuiDataGridHeaderRow.propTypes = {
326
326
  * Pass-through ref reference specifically for targeting
327
327
  * instances where the item content is rendered as a `button`
328
328
  */
329
- buttonRef: _propTypes.default.any
329
+ buttonRef: _propTypes.default.any,
330
+
331
+ /**
332
+ * Text to be displayed in the tooltip when `showToolTip` is true.
333
+ * By default the text will be same as the label text.
334
+ */
335
+ toolTipText: _propTypes.default.string
330
336
  }).isRequired]),
331
337
 
332
338
  /**
@@ -370,7 +376,8 @@ EuiDataGridHeaderRow.propTypes = {
370
376
  }),
371
377
  onClick: _propTypes.default.func,
372
378
  wrapText: _propTypes.default.bool,
373
- buttonRef: _propTypes.default.any
379
+ buttonRef: _propTypes.default.any,
380
+ toolTipText: _propTypes.default.string
374
381
  }).isRequired]),
375
382
 
376
383
  /**
@@ -414,7 +421,8 @@ EuiDataGridHeaderRow.propTypes = {
414
421
  }),
415
422
  onClick: _propTypes.default.func,
416
423
  wrapText: _propTypes.default.bool,
417
- buttonRef: _propTypes.default.any
424
+ buttonRef: _propTypes.default.any,
425
+ toolTipText: _propTypes.default.string
418
426
  }).isRequired]),
419
427
 
420
428
  /**
@@ -458,7 +466,8 @@ EuiDataGridHeaderRow.propTypes = {
458
466
  }),
459
467
  onClick: _propTypes.default.func,
460
468
  wrapText: _propTypes.default.bool,
461
- buttonRef: _propTypes.default.any
469
+ buttonRef: _propTypes.default.any,
470
+ toolTipText: _propTypes.default.string
462
471
  }).isRequired]),
463
472
 
464
473
  /**
@@ -502,7 +511,8 @@ EuiDataGridHeaderRow.propTypes = {
502
511
  }),
503
512
  onClick: _propTypes.default.func,
504
513
  wrapText: _propTypes.default.bool,
505
- buttonRef: _propTypes.default.any
514
+ buttonRef: _propTypes.default.any,
515
+ toolTipText: _propTypes.default.string
506
516
  }).isRequired]),
507
517
 
508
518
  /**
@@ -546,7 +556,8 @@ EuiDataGridHeaderRow.propTypes = {
546
556
  }),
547
557
  onClick: _propTypes.default.func,
548
558
  wrapText: _propTypes.default.bool,
549
- buttonRef: _propTypes.default.any
559
+ buttonRef: _propTypes.default.any,
560
+ toolTipText: _propTypes.default.string
550
561
  }).isRequired)
551
562
  }).isRequired]),
552
563
 
@@ -632,7 +632,13 @@ EuiDataGrid.propTypes = {
632
632
  * Pass-through ref reference specifically for targeting
633
633
  * instances where the item content is rendered as a `button`
634
634
  */
635
- buttonRef: _propTypes.default.any
635
+ buttonRef: _propTypes.default.any,
636
+
637
+ /**
638
+ * Text to be displayed in the tooltip when `showToolTip` is true.
639
+ * By default the text will be same as the label text.
640
+ */
641
+ toolTipText: _propTypes.default.string
636
642
  }).isRequired]),
637
643
 
638
644
  /**
@@ -676,7 +682,8 @@ EuiDataGrid.propTypes = {
676
682
  }),
677
683
  onClick: _propTypes.default.func,
678
684
  wrapText: _propTypes.default.bool,
679
- buttonRef: _propTypes.default.any
685
+ buttonRef: _propTypes.default.any,
686
+ toolTipText: _propTypes.default.string
680
687
  }).isRequired]),
681
688
 
682
689
  /**
@@ -720,7 +727,8 @@ EuiDataGrid.propTypes = {
720
727
  }),
721
728
  onClick: _propTypes.default.func,
722
729
  wrapText: _propTypes.default.bool,
723
- buttonRef: _propTypes.default.any
730
+ buttonRef: _propTypes.default.any,
731
+ toolTipText: _propTypes.default.string
724
732
  }).isRequired]),
725
733
 
726
734
  /**
@@ -764,7 +772,8 @@ EuiDataGrid.propTypes = {
764
772
  }),
765
773
  onClick: _propTypes.default.func,
766
774
  wrapText: _propTypes.default.bool,
767
- buttonRef: _propTypes.default.any
775
+ buttonRef: _propTypes.default.any,
776
+ toolTipText: _propTypes.default.string
768
777
  }).isRequired]),
769
778
 
770
779
  /**
@@ -808,7 +817,8 @@ EuiDataGrid.propTypes = {
808
817
  }),
809
818
  onClick: _propTypes.default.func,
810
819
  wrapText: _propTypes.default.bool,
811
- buttonRef: _propTypes.default.any
820
+ buttonRef: _propTypes.default.any,
821
+ toolTipText: _propTypes.default.string
812
822
  }).isRequired]),
813
823
 
814
824
  /**
@@ -852,7 +862,8 @@ EuiDataGrid.propTypes = {
852
862
  }),
853
863
  onClick: _propTypes.default.func,
854
864
  wrapText: _propTypes.default.bool,
855
- buttonRef: _propTypes.default.any
865
+ buttonRef: _propTypes.default.any,
866
+ toolTipText: _propTypes.default.string
856
867
  }).isRequired)
857
868
  }).isRequired]),
858
869
 
@@ -426,7 +426,13 @@ EuiDataGridInMemoryRenderer.propTypes = {
426
426
  * Pass-through ref reference specifically for targeting
427
427
  * instances where the item content is rendered as a `button`
428
428
  */
429
- buttonRef: _propTypes.default.any
429
+ buttonRef: _propTypes.default.any,
430
+
431
+ /**
432
+ * Text to be displayed in the tooltip when `showToolTip` is true.
433
+ * By default the text will be same as the label text.
434
+ */
435
+ toolTipText: _propTypes.default.string
430
436
  }).isRequired]),
431
437
 
432
438
  /**
@@ -470,7 +476,8 @@ EuiDataGridInMemoryRenderer.propTypes = {
470
476
  }),
471
477
  onClick: _propTypes.default.func,
472
478
  wrapText: _propTypes.default.bool,
473
- buttonRef: _propTypes.default.any
479
+ buttonRef: _propTypes.default.any,
480
+ toolTipText: _propTypes.default.string
474
481
  }).isRequired]),
475
482
 
476
483
  /**
@@ -514,7 +521,8 @@ EuiDataGridInMemoryRenderer.propTypes = {
514
521
  }),
515
522
  onClick: _propTypes.default.func,
516
523
  wrapText: _propTypes.default.bool,
517
- buttonRef: _propTypes.default.any
524
+ buttonRef: _propTypes.default.any,
525
+ toolTipText: _propTypes.default.string
518
526
  }).isRequired]),
519
527
 
520
528
  /**
@@ -558,7 +566,8 @@ EuiDataGridInMemoryRenderer.propTypes = {
558
566
  }),
559
567
  onClick: _propTypes.default.func,
560
568
  wrapText: _propTypes.default.bool,
561
- buttonRef: _propTypes.default.any
569
+ buttonRef: _propTypes.default.any,
570
+ toolTipText: _propTypes.default.string
562
571
  }).isRequired]),
563
572
 
564
573
  /**
@@ -602,7 +611,8 @@ EuiDataGridInMemoryRenderer.propTypes = {
602
611
  }),
603
612
  onClick: _propTypes.default.func,
604
613
  wrapText: _propTypes.default.bool,
605
- buttonRef: _propTypes.default.any
614
+ buttonRef: _propTypes.default.any,
615
+ toolTipText: _propTypes.default.string
606
616
  }).isRequired]),
607
617
 
608
618
  /**
@@ -646,7 +656,8 @@ EuiDataGridInMemoryRenderer.propTypes = {
646
656
  }),
647
657
  onClick: _propTypes.default.func,
648
658
  wrapText: _propTypes.default.bool,
649
- buttonRef: _propTypes.default.any
659
+ buttonRef: _propTypes.default.any,
660
+ toolTipText: _propTypes.default.string
650
661
  }).isRequired)
651
662
  }).isRequired]),
652
663
 
@@ -0,0 +1,124 @@
1
+ {
2
+ "author": "HackerOne",
3
+ "name": "@elastic/react-datepicker",
4
+ "description": "Forked from Hacker0x01/react-datepicker for accessibility - simple and reusable datepicker component for React",
5
+ "private": true,
6
+ "version": "2.0.0",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/Hacker0x01/react-datepicker",
9
+ "main": "lib",
10
+ "files": [
11
+ "*.md",
12
+ "dist",
13
+ "datepicker-lib",
14
+ "es",
15
+ "src/stylesheets"
16
+ ],
17
+ "resolutions": {
18
+ "**/diff": "^3.5.0"
19
+ },
20
+ "devDependencies": {
21
+ "babel-core": "^6.26.0",
22
+ "babel-eslint": "^8.0.2",
23
+ "babel-loader": "^6.2.10",
24
+ "babel-plugin-add-react-displayname": "^0.0.4",
25
+ "babel-plugin-external-helpers": "^6.22.0",
26
+ "babel-plugin-react-transform": "^3.0.0",
27
+ "babel-plugin-transform-class-properties": "^6.24.1",
28
+ "babel-plugin-transform-react-remove-prop-types": "^0.4.10",
29
+ "babel-polyfill": "^6.26.0",
30
+ "babel-preset-airbnb": "^2.4.0",
31
+ "babel-preset-env": "^1.6.1",
32
+ "babel-preset-react": "^6.24.1",
33
+ "babel-preset-stage-0": "^6.24.1",
34
+ "chai": "^3.5.0",
35
+ "cross-env": "^5.1.1",
36
+ "css-loader": "^1.0.0",
37
+ "enzyme": "^3.10.0",
38
+ "enzyme-adapter-react-16": "^1.14.0",
39
+ "eslint": "^4.18.2",
40
+ "eslint-plugin-import": "^2.8.0",
41
+ "eslint-plugin-node": "^5.2.1",
42
+ "eslint-plugin-promise": "^3.6.0",
43
+ "eslint-plugin-react": "^7.4.0",
44
+ "express": "^4.16.2",
45
+ "extract-text-webpack-plugin": "^1.0.1",
46
+ "flow-bin": "^0.68.0",
47
+ "highlight.js": "^9.12.0",
48
+ "husky": "^0.14.3",
49
+ "isparta-loader": "^2.0.0",
50
+ "karma": "^1.7.1",
51
+ "karma-chai": "^0.1.0",
52
+ "karma-coverage": "^1.1.1",
53
+ "karma-firefox-launcher": "^1.0.1",
54
+ "karma-mocha": "^1.3.0",
55
+ "karma-sinon": "^1.0.5",
56
+ "karma-sourcemap-loader": "^0.3.7",
57
+ "karma-webpack": "^2.0.5",
58
+ "lint-staged": "^6.0.0",
59
+ "lodash": "^4.17.13",
60
+ "mocha": "^4.0.1",
61
+ "moment": "^2.20.1",
62
+ "node-sass": "^4.13.1",
63
+ "npm-run-all": "^4.1.2",
64
+ "prettier": "^1.9.2",
65
+ "react": "^16.2.0",
66
+ "react-docgen": "^2.20.0",
67
+ "react-dom": "^16.2.0",
68
+ "react-test-renderer": "^16.8.6",
69
+ "react-transform-hmr": "^1.0.4",
70
+ "rimraf": "^2.6.2",
71
+ "rollup": "^0.62.0",
72
+ "rollup-plugin-babel": "^3.0.2",
73
+ "rollup-plugin-commonjs": "^8.2.6",
74
+ "rollup-plugin-node-resolve": "^3.0.0",
75
+ "rollup-plugin-uglify": "^2.0.1",
76
+ "sass-lint": "^1.12.1",
77
+ "sass-loader": "^4.1.1",
78
+ "sinon": "^4.1.2",
79
+ "style-loader": "^0.19.0",
80
+ "webpack": "^1.13.0",
81
+ "webpack-dev-middleware": "^1.12.0",
82
+ "webpack-dev-server": "^3.1.14",
83
+ "webpack-hot-middleware": "^2.20.0"
84
+ },
85
+ "peerDependencies": {
86
+ "moment": "^2.20.0",
87
+ "react": "^16.0.0",
88
+ "react-dom": "^16.0.0"
89
+ },
90
+ "dependencies": {
91
+ "classnames": "^2.2.5",
92
+ "focus-trap-react": "^4.0.0",
93
+ "json-loader": "^0.5.7",
94
+ "prop-types": "^15.6.0",
95
+ "react-onclickoutside": "^6.7.1",
96
+ "react-popper": "^1.0.2"
97
+ },
98
+ "scripts": {
99
+ "eslint": "eslint {src,test,docs-site/src}/**/*.{js,jsx} *.js",
100
+ "flow": "flow",
101
+ "precommit": "lint-staged",
102
+ "sass-lint": "sass-lint --config .sass-lint.yml 'src/stylesheets/*.scss, docs-site/src/*.scss' -i 'docs-site/src/higlight.scss, docs-site/src/reset.scss'",
103
+ "lint": "run-p eslint flow sass-lint",
104
+ "start": "cross-env MODULES=false node server.js",
105
+ "test": "cross-env NODE_ENV=test karma start karma.conf.js --single-run",
106
+ "prepublish": "test $(npm -v | tr . '\\n' | head -n 1) -ge '4' || exit 1",
107
+ "prepare": "npm run build",
108
+ "prebuild": "rimraf es lib dist",
109
+ "build": "cross-env NODE_ENV=production run-p build:** && run-p css:**",
110
+ "build-dev": "cross-env NODE_ENV=development run-p build:** && run-p css:**",
111
+ "css:prod": "mkdir -p lib && node-sass --output-style compressed src/stylesheets/datepicker.scss > lib/react-datepicker.min.css",
112
+ "css:modules:prod": "mkdir -p lib && node-sass --output-style compressed src/stylesheets/datepicker-cssmodules.scss > lib/react-datepicker-cssmodules.min.css",
113
+ "css:dev": "mkdir -p lib && node-sass --output-style expanded src/stylesheets/datepicker.scss > lib/react-datepicker.css",
114
+ "css:modules:dev": "mkdir -p lib && node-sass --output-style expanded src/stylesheets/datepicker-cssmodules.scss > lib/react-datepicker-cssmodules.css",
115
+ "build:es": "cross-env BABEL_ENV=cjs rollup -c -i src/index.jsx -o ../react-datepicker.js",
116
+ "build:docs": "cross-env MODULES=false webpack --config webpack.docs.config.js"
117
+ },
118
+ "lint-staged": {
119
+ "*.{js,jsx,json,css,scss,md}": [
120
+ "prettier --write",
121
+ "git add"
122
+ ]
123
+ }
124
+ }
@@ -23,7 +23,7 @@ var _description_list_context = require("./description_list_context");
23
23
 
24
24
  var _react2 = require("@emotion/react");
25
25
 
26
- var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type"];
26
+ var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type", "gutterSize"];
27
27
 
28
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
29
 
@@ -47,6 +47,8 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
47
47
  titleProps = _ref.titleProps,
48
48
  _ref$type = _ref.type,
49
49
  type = _ref$type === void 0 ? 'row' : _ref$type,
50
+ _ref$gutterSize = _ref.gutterSize,
51
+ gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
50
52
  rest = _objectWithoutProperties(_ref, _excluded);
51
53
 
52
54
  var euiTheme = (0, _services.useEuiTheme)();
@@ -72,7 +74,8 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
72
74
  type: type,
73
75
  compressed: compressed,
74
76
  textStyle: textStyle,
75
- align: align
77
+ align: align,
78
+ gutterSize: gutterSize
76
79
  }
77
80
  }, (0, _react2.jsx)("dl", _extends({
78
81
  className: classes,
@@ -132,5 +135,10 @@ EuiDescriptionList.propTypes = {
132
135
  "aria-label": _propTypes.default.string,
133
136
  "data-test-subj": _propTypes.default.string,
134
137
  css: _propTypes.default.any
135
- })
138
+ }),
139
+
140
+ /**
141
+ * Vertical spacing added between `EuiDescriptionList` elements
142
+ */
143
+ gutterSize: _propTypes.default.any
136
144
  };
@@ -17,7 +17,8 @@ var _react = require("react");
17
17
  var contextDefaults = {
18
18
  type: 'row',
19
19
  textStyle: 'normal',
20
- align: 'left'
20
+ align: 'left',
21
+ gutterSize: 'm'
21
22
  };
22
23
  exports.contextDefaults = contextDefaults;
23
24
  var EuiDescriptionListContext = /*#__PURE__*/(0, _react.createContext)(contextDefaults);
@@ -56,7 +56,8 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
56
56
  type = _useContext.type,
57
57
  textStyle = _useContext.textStyle,
58
58
  compressed = _useContext.compressed,
59
- align = _useContext.align;
59
+ align = _useContext.align,
60
+ gutterSize = _useContext.gutterSize;
60
61
 
61
62
  var theme = (0, _services.useEuiTheme)();
62
63
  var styles = (0, _description_list_description.euiDescriptionListDescriptionStyles)(theme);
@@ -73,6 +74,7 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
73
74
  conditionalStyles.push(styles.left);
74
75
  }
75
76
 
77
+ conditionalStyles.push(styles[gutterSize]);
76
78
  break;
77
79
  }
78
80
 
@@ -24,7 +24,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
24
24
 
25
25
  var euiDescriptionListDescriptionStyles = function euiDescriptionListDescriptionStyles(euiThemeContext) {
26
26
  var euiTheme = euiThemeContext.euiTheme;
27
- var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), " // Flex-basis doesn't work in IE with padding\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n &:not(:first-of-type) {\n ").concat((0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), "\n }\n ");
27
+ var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), "\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n ");
28
28
  return {
29
29
  euiDescriptionList__description: /*#__PURE__*/(0, _react.css)(";label:euiDescriptionList__description;"),
30
30
  // Types
@@ -44,7 +44,10 @@ var euiDescriptionListDescriptionStyles = function euiDescriptionListDescription
44
44
  normal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";;label:normal;")
45
45
  },
46
46
  // Column types should align description text to the left when EuiDecriptionList is centered
47
- left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;")
47
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;"),
48
+ // Gutter
49
+ s: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), ";};label:s;"),
50
+ m: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";};label:m;")
48
51
  };
49
52
  };
50
53
 
@@ -56,11 +56,12 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
56
56
  type = _useContext.type,
57
57
  textStyle = _useContext.textStyle,
58
58
  compressed = _useContext.compressed,
59
- align = _useContext.align;
59
+ align = _useContext.align,
60
+ gutterSize = _useContext.gutterSize;
60
61
 
61
62
  var theme = (0, _services.useEuiTheme)();
62
63
  var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
63
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
64
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
64
65
 
65
66
  switch (type) {
66
67
  case 'inline':
@@ -76,7 +77,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
76
77
  break;
77
78
  }
78
79
 
79
- var cssStyles = [styles.euiDescriptionList__title, styles[type]].concat(_toConsumableArray(conditionalStyles));
80
+ var cssStyles = [styles.euiDescriptionList__title, styles[type], styles[gutterSize]].concat(_toConsumableArray(conditionalStyles));
80
81
  var classes = (0, _classnames.default)('euiDescriptionList__title', className);
81
82
  return (0, _react2.jsx)("dt", _extends({
82
83
  className: classes,
@@ -23,9 +23,9 @@ var _title = require("../title/title.styles");
23
23
  var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiThemeContext) {
24
24
  var euiTheme = euiThemeContext.euiTheme,
25
25
  colorMode = euiThemeContext.colorMode;
26
- var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), " // Flex-basis doesn't work in IE with padding\n ").concat((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.s), "\n ");
26
+ var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), "\n ").concat((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.s), "\n ");
27
27
  return {
28
- euiDescriptionList__title: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), "&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";};label:euiDescriptionList__title;"),
28
+ euiDescriptionList__title: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), ";;label:euiDescriptionList__title;"),
29
29
  // Types
30
30
  row: /*#__PURE__*/(0, _react.css)(";label:row;"),
31
31
  column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
@@ -43,7 +43,11 @@ var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiTh
43
43
  compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";", (0, _global_styling.logicalCSS)('padding-vertical', '0'), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), ";;label:compressed;")
44
44
  },
45
45
  // Alignment
46
- right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;")
46
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;"),
47
+ // Gutter
48
+ // Add margin only to the non-first <dt>.
49
+ s: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), ";};label:s;"),
50
+ m: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";};label:m;")
47
51
  };
48
52
  };
49
53
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TYPES = exports.TEXT_STYLES = exports.ALIGNMENTS = void 0;
6
+ exports.TYPES = exports.TEXT_STYLES = exports.GUTTER_SIZES = exports.ALIGNMENTS = void 0;
7
7
 
8
8
  /*
9
9
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -17,4 +17,6 @@ exports.TYPES = TYPES;
17
17
  var ALIGNMENTS = ['center', 'left'];
18
18
  exports.ALIGNMENTS = ALIGNMENTS;
19
19
  var TEXT_STYLES = ['normal', 'reverse'];
20
- exports.TEXT_STYLES = TEXT_STYLES;
20
+ exports.TEXT_STYLES = TEXT_STYLES;
21
+ var GUTTER_SIZES = ['s', 'm'];
22
+ exports.GUTTER_SIZES = GUTTER_SIZES;
@@ -102,26 +102,16 @@ var EuiFieldSearch = /*#__PURE__*/function (_Component) {
102
102
 
103
103
  if (nativeInputValueSetter) {
104
104
  nativeInputValueSetter.call(_this.inputElement, '');
105
- } // dispatch input event, with IE11 support/fallback
105
+ } // dispatch input event
106
106
 
107
107
 
108
- var event;
109
-
110
- if ('Event' in window && typeof Event === 'function') {
111
- event = new Event('input', {
112
- bubbles: true,
113
- cancelable: false
114
- });
115
- } else {
116
- // IE11
117
- event = document.createEvent('Event');
118
- event.initEvent('input', true, false);
119
- }
108
+ var event = new Event('input', {
109
+ bubbles: true,
110
+ cancelable: false
111
+ });
120
112
 
121
113
  if (_this.inputElement) {
122
- if (event) {
123
- _this.inputElement.dispatchEvent(event);
124
- } // set focus on the search field
114
+ _this.inputElement.dispatchEvent(event); // set focus on the search field
125
115
 
126
116
 
127
117
  _this.inputElement.focus();
@@ -40,7 +40,7 @@ var EuiRangeInput = function EuiRangeInput(_ref) {
40
40
  autoSize = _ref$autoSize === void 0 ? true : _ref$autoSize,
41
41
  rest = _objectWithoutProperties(_ref, _excluded);
42
42
 
43
- // Chrome will properly size the input based on the max value, but FF & IE do not.
43
+ // Chrome will properly size the input based on the max value, but FF does not.
44
44
  // Calculate the width of the input based on highest number of characters.
45
45
  // Add 2 to accommodate for input stepper
46
46
  var widthStyle = autoSize ? {
@@ -36,10 +36,11 @@ var EuiHeaderSectionItem = function EuiHeaderSectionItem(_ref) {
36
36
  className = _ref.className,
37
37
  rest = _objectWithoutProperties(_ref, _excluded);
38
38
 
39
- var classes = (0, _classnames.default)('euiHeaderSectionItem', borderToClassNameMap[border], className);
40
- return (0, _react2.jsx)("div", _extends({
39
+ var classes = (0, _classnames.default)('euiHeaderSectionItem', borderToClassNameMap[border], className); // we check if there is any children and if not, we don't render anything
40
+
41
+ return children ? (0, _react2.jsx)("div", _extends({
41
42
  className: classes
42
- }, rest), children);
43
+ }, rest), children) : null;
43
44
  };
44
45
 
45
46
  exports.EuiHeaderSectionItem = EuiHeaderSectionItem;
@@ -144,7 +144,7 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
144
144
 
145
145
  _this = _super.call(this, props);
146
146
 
147
- _defineProperty(_assertThisInitialized(_this), "isMounted", true);
147
+ _defineProperty(_assertThisInitialized(_this), "isMounted", false);
148
148
 
149
149
  _defineProperty(_assertThisInitialized(_this), "loadIconComponent", function (iconType) {
150
150
  if (iconComponentCache.hasOwnProperty(iconType)) {
@@ -204,6 +204,7 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
204
204
  _createClass(EuiIconClass, [{
205
205
  key: "componentDidMount",
206
206
  value: function componentDidMount() {
207
+ this.isMounted = true;
207
208
  var type = this.props.type;
208
209
 
209
210
  if (isEuiIconType(type) && this.state.icon == null) {
@@ -280,14 +281,7 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
280
281
 
281
282
  var styles = (0, _icon.euiIconStyles)(theme);
282
283
  var cssStyles = [styles.euiIcon, styles[size], color && (0, _named_colors.isNamedColor)(color) && styles[color], isCustomColor && styles.customColor, isElasticLogoOutline && styles.logoElasticOutline, isAppIcon && !appIconHasColor && styles.app, isLoading && styles.isLoading, !isLoading && neededLoading && styles.isLoaded];
283
- var icon = this.state.icon || _empty.icon; // This is a fix for IE and Edge, which ignores tabindex="-1" on an SVG, but respects
284
- // focusable="false".
285
- // - If there's no tabindex specified, we'll default the icon to not be focusable,
286
- // which is how SVGs behave in Chrome, Safari, and FF.
287
- // - If tabindex is -1, then the consumer wants the icon to be focusable by JavaScript only.
288
- // - If the tabindex is 0, the consumer wants the icon to be keyboard focusable.
289
-
290
- var focusable = tabIndex == null || tabIndex === -1 ? 'false' : 'true';
284
+ var icon = this.state.icon || _empty.icon;
291
285
 
292
286
  if (typeof icon === 'string') {
293
287
  return (0, _react3.jsx)("img", _extends({
@@ -319,7 +313,6 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
319
313
  style: optionalCustomStyles,
320
314
  css: cssStyles,
321
315
  tabIndex: tabIndex,
322
- focusable: focusable,
323
316
  role: "img",
324
317
  title: title,
325
318
  "data-icon-type": iconTitle,
@@ -273,7 +273,13 @@ EuiListGroup.propTypes = {
273
273
  * Pass-through ref reference specifically for targeting
274
274
  * instances where the item content is rendered as a `button`
275
275
  */
276
- buttonRef: _propTypes.default.any
276
+ buttonRef: _propTypes.default.any,
277
+
278
+ /**
279
+ * Text to be displayed in the tooltip when `showToolTip` is true.
280
+ * By default the text will be same as the label text.
281
+ */
282
+ toolTipText: _propTypes.default.string
277
283
  }).isRequired),
278
284
 
279
285
  /**
@@ -27,7 +27,7 @@ var _href_validator = require("../../services/security/href_validator");
27
27
 
28
28
  var _react2 = require("@emotion/react");
29
29
 
30
- var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef"],
30
+ var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef", "toolTipText"],
31
31
  _excluded2 = ["iconType", "alwaysShow", "className", "isDisabled"];
32
32
 
33
33
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -95,6 +95,7 @@ var EuiListGroupItem = function EuiListGroupItem(_ref) {
95
95
  showToolTip = _ref$showToolTip === void 0 ? false : _ref$showToolTip,
96
96
  wrapText = _ref.wrapText,
97
97
  buttonRef = _ref.buttonRef,
98
+ toolTipText = _ref.toolTipText,
98
99
  rest = _objectWithoutProperties(_ref, _excluded);
99
100
 
100
101
  var isHrefValid = !href || (0, _href_validator.validateHref)(href);
@@ -196,7 +197,7 @@ var EuiListGroupItem = function EuiListGroupItem(_ref) {
196
197
  className: classes
197
198
  }, (0, _react2.jsx)(_tool_tip.EuiToolTip, {
198
199
  anchorClassName: "euiListGroupItem__tooltip",
199
- content: label,
200
+ content: toolTipText !== null && toolTipText !== void 0 ? toolTipText : label,
200
201
  position: "right",
201
202
  delay: "long"
202
203
  }, itemContent));
@@ -341,5 +342,11 @@ EuiListGroupItem.propTypes = {
341
342
  * Pass-through ref reference specifically for targeting
342
343
  * instances where the item content is rendered as a `button`
343
344
  */
344
- buttonRef: _propTypes.default.any
345
+ buttonRef: _propTypes.default.any,
346
+
347
+ /**
348
+ * Text to be displayed in the tooltip when `showToolTip` is true.
349
+ * By default the text will be same as the label text.
350
+ */
351
+ toolTipText: _propTypes.default.string
345
352
  };
@@ -263,6 +263,12 @@ EuiPinnableListGroup.propTypes = {
263
263
  */
264
264
  buttonRef: _propTypes.default.any,
265
265
 
266
+ /**
267
+ * Text to be displayed in the tooltip when `showToolTip` is true.
268
+ * By default the text will be same as the label text.
269
+ */
270
+ toolTipText: _propTypes.default.string,
271
+
266
272
  /**
267
273
  * Saves the pinned status and changes the visibility of the pin icon
268
274
  */
@@ -373,7 +379,13 @@ EuiPinnableListGroup.propTypes = {
373
379
  * Pass-through ref reference specifically for targeting
374
380
  * instances where the item content is rendered as a `button`
375
381
  */
376
- buttonRef: _propTypes.default.any
382
+ buttonRef: _propTypes.default.any,
383
+
384
+ /**
385
+ * Text to be displayed in the tooltip when `showToolTip` is true.
386
+ * By default the text will be same as the label text.
387
+ */
388
+ toolTipText: _propTypes.default.string
377
389
  }).isRequired)]),
378
390
 
379
391
  /**