@splunk/react-ui 4.11.0 → 4.12.1

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 (102) hide show
  1. package/Accordion.js +2 -2
  2. package/Anchor.js +2 -2
  3. package/Animation.js +4 -4
  4. package/Box.js +2 -2
  5. package/Button.js +23 -23
  6. package/ButtonGroup.js +2 -2
  7. package/CHANGELOG.md +35 -0
  8. package/Calendar.js +20 -20
  9. package/Card.js +17 -17
  10. package/CardLayout.js +2 -2
  11. package/Chip.js +17 -17
  12. package/Clickable.js +7 -7
  13. package/CloseButton.js +15 -15
  14. package/Code.js +4 -4
  15. package/CollapsiblePanel.js +4 -4
  16. package/Color.js +17 -17
  17. package/ColumnLayout.js +7 -7
  18. package/ComboBox.js +12 -11
  19. package/Concertina.js +11 -11
  20. package/ControlGroup.js +4 -4
  21. package/Date.js +8 -8
  22. package/DefinitionList.js +2 -2
  23. package/Dropdown.js +4 -4
  24. package/EventListener.js +4 -4
  25. package/File.js +25 -25
  26. package/FormRows.js +10 -10
  27. package/Heading.js +3 -3
  28. package/Image.js +19 -19
  29. package/Layer.js +8 -8
  30. package/Link.js +9 -9
  31. package/List.js +2 -2
  32. package/Markdown.js +22 -22
  33. package/Menu.js +34 -34
  34. package/Message.js +35 -35
  35. package/MessageBar.js +32 -32
  36. package/Modal.js +8 -8
  37. package/ModalLayer.js +6 -6
  38. package/Monogram.js +2 -2
  39. package/Multiselect.js +96 -92
  40. package/Number.js +4 -4
  41. package/Paginator.js +20 -20
  42. package/Paragraph.js +2 -2
  43. package/Popover.js +8 -8
  44. package/Progress.js +8 -8
  45. package/RadioBar.js +4 -4
  46. package/RadioList.js +2 -2
  47. package/Resize.js +2 -2
  48. package/ResultsMenu.js +60 -39
  49. package/ScreenReaderContent.js +2 -2
  50. package/Scroll.js +6 -6
  51. package/ScrollContainerContext.js +2 -2
  52. package/Search.js +17 -16
  53. package/Select.js +89 -87
  54. package/SidePanel.js +4 -4
  55. package/Slider.js +8 -8
  56. package/SlidingPanels.js +4 -4
  57. package/StaticContent.js +2 -2
  58. package/StepBar.js +8 -8
  59. package/Switch.js +6 -6
  60. package/TabBar.js +6 -6
  61. package/TabLayout.js +4 -4
  62. package/Table.js +115 -83
  63. package/Text.js +132 -263
  64. package/TextArea.js +1447 -0
  65. package/Tooltip.js +4 -4
  66. package/TransitionOpen.js +10 -9
  67. package/Typography.js +225 -0
  68. package/WaitSpinner.js +4 -4
  69. package/cypress.json +1 -0
  70. package/package.json +14 -3
  71. package/test-runner-jest.config.js +38 -0
  72. package/types/src/ComboBox/ComboBox.d.ts +13 -4
  73. package/types/src/Multiselect/Compact.d.ts +11 -4
  74. package/types/src/Multiselect/Multiselect.d.ts +14 -5
  75. package/types/src/Multiselect/Normal.d.ts +11 -4
  76. package/types/src/ResultsMenu/ResultsMenu.d.ts +8 -2
  77. package/types/src/Search/Search.d.ts +4 -0
  78. package/types/src/Select/Select.d.ts +13 -4
  79. package/types/src/Select/SelectBase.d.ts +12 -4
  80. package/types/src/SidePanel/SidePanel.d.ts +2 -1
  81. package/types/src/Table/HeadCell.d.ts +7 -3
  82. package/types/src/Table/Table.d.ts +2 -3
  83. package/types/src/Table/TableContext.d.ts +5 -0
  84. package/types/src/Text/Text.d.ts +21 -12
  85. package/types/src/TextArea/TextArea.d.ts +190 -0
  86. package/types/src/TextArea/docs/examples/Basic.d.ts +2 -0
  87. package/types/src/TextArea/docs/examples/Disabled.d.ts +2 -0
  88. package/types/src/TextArea/docs/examples/Error.d.ts +2 -0
  89. package/types/src/TextArea/docs/examples/Inline.d.ts +2 -0
  90. package/types/src/TextArea/docs/examples/Uncontrolled.d.ts +2 -0
  91. package/types/src/TextArea/index.d.ts +2 -0
  92. package/types/src/{Text → TextArea}/syncHeightWithShadow.d.ts +1 -2
  93. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -0
  94. package/types/src/TransitionOpen/index.d.ts +1 -0
  95. package/types/src/Typography/Typography.d.ts +78 -0
  96. package/types/src/Typography/docs/examples/Basic.d.ts +2 -0
  97. package/types/src/Typography/docs/examples/Variants.d.ts +2 -0
  98. package/types/src/Typography/index.d.ts +2 -0
  99. package/types/src/Typography/test/Typography.unit.d.ts +1 -0
  100. package/usePrevious.js +2 -2
  101. package/types/src/Text/docs/examples/prisma/Multiline.d.ts +0 -10
  102. package/types/src/Text/docs/examples/prisma/Search.d.ts +0 -10
package/Tooltip.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 144);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 146);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -122,7 +122,7 @@ module.exports = require("@splunk/react-ui/ScreenReaderContent");
122
122
 
123
123
  /***/ }),
124
124
 
125
- /***/ 144:
125
+ /***/ 146:
126
126
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
127
127
 
128
128
  "use strict";
@@ -144,7 +144,7 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
144
144
  var external_lodash_ = __webpack_require__(4);
145
145
 
146
146
  // EXTERNAL MODULE: external "@splunk/react-ui/Popover"
147
- var Popover_ = __webpack_require__(16);
147
+ var Popover_ = __webpack_require__(17);
148
148
  var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
149
149
 
150
150
  // EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
@@ -610,7 +610,7 @@ TooltipWithTheme.propTypes = Tooltip_Tooltip.propTypes;
610
610
 
611
611
  /***/ }),
612
612
 
613
- /***/ 16:
613
+ /***/ 17:
614
614
  /***/ (function(module, exports) {
615
615
 
616
616
  module.exports = require("@splunk/react-ui/Popover");
package/TransitionOpen.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 171);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 173);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 171:
104
+ /***/ 173:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -123,13 +123,13 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
123
123
  var external_lodash_ = __webpack_require__(4);
124
124
 
125
125
  // EXTERNAL MODULE: external "@splunk/react-ui/Animation"
126
- var Animation_ = __webpack_require__(30);
126
+ var Animation_ = __webpack_require__(31);
127
127
 
128
128
  // EXTERNAL MODULE: external "@splunk/ui-utils/focus"
129
129
  var focus_ = __webpack_require__(26);
130
130
 
131
131
  // EXTERNAL MODULE: external "@splunk/ui-utils/style"
132
- var style_ = __webpack_require__(40);
132
+ var style_ = __webpack_require__(32);
133
133
 
134
134
  // EXTERNAL MODULE: external "react-spring"
135
135
  var external_react_spring_ = __webpack_require__(18);
@@ -463,6 +463,7 @@ _defineProperty(TransitionOpen_TransitionOpen, "getDerivedStateFromProps", funct
463
463
  // CONCATENATED MODULE: ./src/TransitionOpen/index.ts
464
464
 
465
465
 
466
+
466
467
  /***/ }),
467
468
 
468
469
  /***/ 18:
@@ -493,24 +494,24 @@ module.exports = require("styled-components");
493
494
 
494
495
  /***/ }),
495
496
 
496
- /***/ 30:
497
+ /***/ 31:
497
498
  /***/ (function(module, exports) {
498
499
 
499
500
  module.exports = require("@splunk/react-ui/Animation");
500
501
 
501
502
  /***/ }),
502
503
 
503
- /***/ 4:
504
+ /***/ 32:
504
505
  /***/ (function(module, exports) {
505
506
 
506
- module.exports = require("lodash");
507
+ module.exports = require("@splunk/ui-utils/style");
507
508
 
508
509
  /***/ }),
509
510
 
510
- /***/ 40:
511
+ /***/ 4:
511
512
  /***/ (function(module, exports) {
512
513
 
513
- module.exports = require("@splunk/ui-utils/style");
514
+ module.exports = require("lodash");
514
515
 
515
516
  /***/ })
516
517
 
package/Typography.js ADDED
@@ -0,0 +1,225 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = 179);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 1:
91
+ /***/ (function(module, exports) {
92
+
93
+ module.exports = require("prop-types");
94
+
95
+ /***/ }),
96
+
97
+ /***/ 179:
98
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
+
100
+ "use strict";
101
+ // ESM COMPAT FLAG
102
+ __webpack_require__.r(__webpack_exports__);
103
+
104
+ // EXPORTS
105
+ __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ Typography_Typography; });
106
+ __webpack_require__.d(__webpack_exports__, "Typography", function() { return /* reexport */ Typography; });
107
+
108
+ // EXTERNAL MODULE: external "react"
109
+ var external_react_ = __webpack_require__(2);
110
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
111
+
112
+ // EXTERNAL MODULE: external "prop-types"
113
+ var external_prop_types_ = __webpack_require__(1);
114
+ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
115
+
116
+ // EXTERNAL MODULE: external "lodash"
117
+ var external_lodash_ = __webpack_require__(4);
118
+
119
+ // EXTERNAL MODULE: external "@splunk/themes/mixins"
120
+ var mixins_ = __webpack_require__(56);
121
+ var mixins_default = /*#__PURE__*/__webpack_require__.n(mixins_);
122
+
123
+ // EXTERNAL MODULE: external "styled-components"
124
+ var external_styled_components_ = __webpack_require__(3);
125
+ var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
126
+
127
+ // CONCATENATED MODULE: ./src/Typography/Typography.tsx
128
+ 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); }
129
+
130
+ 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; }
131
+
132
+ 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; }
133
+
134
+
135
+
136
+
137
+
138
+
139
+ var propTypes = {
140
+ children: external_prop_types_default.a.node.isRequired,
141
+ as: external_prop_types_default.a.string.isRequired,
142
+ elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
143
+ family: external_prop_types_default.a.oneOf(['sansSerif', 'monospace']),
144
+ variant: external_prop_types_default.a.oneOf(mixins_["typographyVariants"]),
145
+ size: external_prop_types_default.a.number,
146
+ lineHeight: external_prop_types_default.a.number,
147
+ color: external_prop_types_default.a.oneOf(['active', 'default', 'disabled', 'inverted', 'muted']),
148
+ weight: external_prop_types_default.a.oneOf([300, 400, 500, 600, 700, 800, 900, 'light', 'normal', 'semiBold', 'bold', 'extraBold', 'heavy']),
149
+ withReset: external_prop_types_default.a.bool
150
+ };
151
+ var paramsToExtract = {
152
+ family: true,
153
+ size: true,
154
+ lineHeight: true,
155
+ color: true,
156
+ weight: true,
157
+ withReset: true
158
+ };
159
+ var keys = Object.keys(paramsToExtract);
160
+ var StyledTypography = external_styled_components_default.a.p.withConfig({
161
+ displayName: "Typography__StyledTypography",
162
+ componentId: "cgxs34-0"
163
+ })(["", ""], function (_ref) {
164
+ var $variant = _ref.$variant,
165
+ $typographyParams = _ref.$typographyParams;
166
+ return $variant ? mixins_default.a.typography($variant, $typographyParams) : mixins_default.a.typography($typographyParams);
167
+ });
168
+ /**
169
+ * Typography renders text content with styling based on the Splunk Design System.
170
+ */
171
+
172
+ function Typography(_ref2) {
173
+ var children = _ref2.children,
174
+ as = _ref2.as,
175
+ elementRef = _ref2.elementRef,
176
+ otherProps = _objectWithoutProperties(_ref2, ["children", "as", "elementRef"]);
177
+
178
+ // @docs-props-type TypographyPropsBase
179
+ var variant = otherProps.variant;
180
+ var typographyParams = Object(external_lodash_["pick"])(otherProps, keys);
181
+ return /*#__PURE__*/external_react_default.a.createElement(StyledTypography, _extends({
182
+ as: as,
183
+ ref: elementRef,
184
+ "data-test": "typography",
185
+ $variant: variant,
186
+ $typographyParams: typographyParams
187
+ }, otherProps), children);
188
+ }
189
+ Typography.propTypes = propTypes;
190
+ /* harmony default export */ var Typography_Typography = (Typography);
191
+ // CONCATENATED MODULE: ./src/Typography/index.ts
192
+
193
+
194
+
195
+ /***/ }),
196
+
197
+ /***/ 2:
198
+ /***/ (function(module, exports) {
199
+
200
+ module.exports = require("react");
201
+
202
+ /***/ }),
203
+
204
+ /***/ 3:
205
+ /***/ (function(module, exports) {
206
+
207
+ module.exports = require("styled-components");
208
+
209
+ /***/ }),
210
+
211
+ /***/ 4:
212
+ /***/ (function(module, exports) {
213
+
214
+ module.exports = require("lodash");
215
+
216
+ /***/ }),
217
+
218
+ /***/ 56:
219
+ /***/ (function(module, exports) {
220
+
221
+ module.exports = require("@splunk/themes/mixins");
222
+
223
+ /***/ })
224
+
225
+ /******/ });
package/WaitSpinner.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 172);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 174);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 172:
104
+ /***/ 174:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -120,7 +120,7 @@ var external_prop_types_ = __webpack_require__(1);
120
120
  var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
121
121
 
122
122
  // EXTERNAL MODULE: external "@splunk/react-ui/AnimationToggle"
123
- var AnimationToggle_ = __webpack_require__(34);
123
+ var AnimationToggle_ = __webpack_require__(36);
124
124
 
125
125
  // EXTERNAL MODULE: external "@splunk/themes"
126
126
  var themes_ = __webpack_require__(0);
@@ -281,7 +281,7 @@ module.exports = require("styled-components");
281
281
 
282
282
  /***/ }),
283
283
 
284
- /***/ 34:
284
+ /***/ 36:
285
285
  /***/ (function(module, exports) {
286
286
 
287
287
  module.exports = require("@splunk/react-ui/AnimationToggle");
package/cypress.json CHANGED
@@ -5,6 +5,7 @@
5
5
  "fixturesFolder": false,
6
6
  "video": false,
7
7
  "videoUploadOnPasses": false,
8
+ "chromeWebSecurity": false,
8
9
  "component": {
9
10
  "componentFolder": "src",
10
11
  "testFiles": "**/**/tests/*.spec.tsx"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splunk/react-ui",
3
- "version": "4.11.0",
3
+ "version": "4.12.1",
4
4
  "description": "Library of React components that implement the Splunk design language",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Splunk Inc.",
@@ -8,6 +8,7 @@
8
8
  "build": "cross-env NODE_ENV=production webpack && yarn types:build && yarn build-storybook",
9
9
  "docs": "NODE_ENV=production webpack --config docs.gen.webpack.config.js",
10
10
  "docs:publish": "cicd-publish-docs docs --force",
11
+ "docs:publish:external": "cicd-publish-docs docs --force --suffix=public",
11
12
  "docs:start": "webpack serve --config docs.gen.webpack.config.js",
12
13
  "eslint": "eslint src .storybook --ext \".ts,.tsx,.js,.jsx\"",
13
14
  "eslint:fix": "yarn run eslint --fix",
@@ -16,6 +17,8 @@
16
17
  "lint:ci": "yarn run eslint:ci && yarn run stylelint",
17
18
  "start": "cross-env NODE_ENV=development webpack --watch",
18
19
  "storybook": "start-storybook -p 6006",
20
+ "storybook:test": "./.storybook/scripts/test.sh",
21
+ "storybook:test:all": "./.storybook/scripts/test.sh --all",
19
22
  "storybook:build": "./.storybook/scripts/build.sh",
20
23
  "stylelint": "stylelint \"src/**/*.{ts,tsx,js,jsx}\" --config stylelint.config.js",
21
24
  "test": "jest",
@@ -38,7 +41,7 @@
38
41
  },
39
42
  "dependencies": {
40
43
  "@splunk/react-icons": "^3.2.0",
41
- "@splunk/themes": "^0.12.0",
44
+ "@splunk/themes": "^0.13.0",
42
45
  "@splunk/ui-utils": "^1.5.0",
43
46
  "@types/commonmark": "^0.27.0",
44
47
  "@types/lodash": "^4.14.156",
@@ -47,6 +50,7 @@
47
50
  "@types/react-resize-detector": "^3.1.1",
48
51
  "@types/styled-components": "^5.1.0",
49
52
  "@types/tinycolor2": "^1.4.2",
53
+ "axe-html-reporter": "^2.2.3",
50
54
  "commonmark": "^0.27.0",
51
55
  "commonmark-react-renderer": "^4.3.2",
52
56
  "decimal.js-light": "^2.2.3",
@@ -61,10 +65,11 @@
61
65
  },
62
66
  "devDependencies": {
63
67
  "@babel/core": "^7.2.0",
68
+ "@babel/plugin-transform-runtime": "^7.18.6",
64
69
  "@cypress/react": "^5.12.4",
65
70
  "@cypress/webpack-dev-server": "^1.8.2",
66
71
  "@splunk/babel-preset": "^3.0.0",
67
- "@splunk/cicd-tools": "^0.4.0",
72
+ "@splunk/cicd-tools": "^0.5.0",
68
73
  "@splunk/docs-gen": "^0.11.2",
69
74
  "@splunk/eslint-config": "^4.0.0",
70
75
  "@splunk/react-docs": "^0.11.0",
@@ -77,6 +82,7 @@
77
82
  "@storybook/addon-interactions": "^6.5.9",
78
83
  "@storybook/csf": "^0.0.1",
79
84
  "@storybook/react": "^6.5.9",
85
+ "@storybook/test-runner": "^0.4.0",
80
86
  "@storybook/testing-react": "^1.3.0",
81
87
  "@testing-library/cypress": "^8.0.2",
82
88
  "@testing-library/jest-dom": "^5.16.1",
@@ -93,9 +99,11 @@
93
99
  "@types/webpack-env": "^1.15.2",
94
100
  "@typescript-eslint/eslint-plugin": "^4.8.2",
95
101
  "@typescript-eslint/parser": "^4.8.2",
102
+ "axe-playwright": "^1.1.11",
96
103
  "babel-loader": "^8.0.4",
97
104
  "babel-plugin-istanbul": "^5.1.0",
98
105
  "babel-plugin-styled-components": "^1.10.7",
106
+ "babel-plugin-transform-require-context": "^0.1.1",
99
107
  "chai": "^3.5.0",
100
108
  "core-js": "^3.6.4",
101
109
  "cross-env": "^6.0.3",
@@ -118,8 +126,11 @@
118
126
  "glob": "^7.1.6",
119
127
  "html-webpack-plugin": "^3.2.0",
120
128
  "jest": "^25.1.0",
129
+ "jest-image-snapshot": "^5.1.0",
121
130
  "jest-junit": "^10.0.0",
131
+ "jest-stare": "^2.4.1",
122
132
  "mkdirp": "^0.5.1",
133
+ "playwright": "^1.23.3",
123
134
  "prismjs": "^1.25.0",
124
135
  "prompt": "^1.0.0",
125
136
  "raw-loader": "^0.5.1",
@@ -0,0 +1,38 @@
1
+ /* eslint-disable no-undef */
2
+ const { getJestConfig } = require('@storybook/test-runner');
3
+
4
+ // if component is passed to storybook:test then test will run for only that component
5
+ const testMatch = process.env.STORYBOOK_TEST_COMPONENT
6
+ ? [
7
+ `**/${process.env.STORYBOOK_TEST_COMPONENT}.stories.[jt]s?(x)`,
8
+ `**/${process.env.STORYBOOK_TEST_COMPONENT}.examples.[jt]s?(x)`,
9
+ ]
10
+ : ['**/*.stories.[jt]s?(x)', '**/*.examples.[jt]s?(x)'];
11
+
12
+ module.exports = {
13
+ // The default configuration comes from @storybook/test-runner
14
+ ...getJestConfig(),
15
+ testMatch,
16
+ transform: {
17
+ '^.+\\.stories\\.[jt]sx?$': '@storybook/test-runner/playwright/transform',
18
+ '^.+\\.examples\\.[jt]sx?$': '@storybook/test-runner/playwright/transform',
19
+ '^.+\\.tsx?$': 'babel-jest',
20
+ },
21
+ snapshotResolver: '<rootDir>/.storybook/config/snapshotResolver.js',
22
+ reporters: [
23
+ 'default',
24
+ [
25
+ 'jest-stare',
26
+ {
27
+ resultDir: `./test-reports/${process.env.STORYBOOK_TEST_BROWSER}-${process.env.STORYBOOK_THEME_FAMILY}`,
28
+ reportTitle: `Visual A11y Test Report - ${process.env.STORYBOOK_TEST_BROWSER} ${process.env.STORYBOOK_THEME_FAMILY}`,
29
+ reportHeadline: `Visual A11y Test Report - ${process.env.STORYBOOK_TEST_BROWSER} ${process.env.STORYBOOK_THEME_FAMILY}`,
30
+ hidePending: true,
31
+ resultHtml: `visual-report.html`,
32
+ },
33
+ ],
34
+ ],
35
+ globals: {
36
+ __DEV__: true,
37
+ },
38
+ };
@@ -7,6 +7,8 @@ declare type ComboBoxChangeHandler = (event: React.ChangeEvent<HTMLInputElement
7
7
  name?: string;
8
8
  value: string;
9
9
  }) => void;
10
+ /** @public */
11
+ declare type ComboBoxScrollBottomHandler = (event: React.UIEvent<HTMLDivElement> | React.KeyboardEvent<HTMLInputElement> | null) => void;
10
12
  interface ComboBoxPropsBase {
11
13
  animateLoading?: boolean;
12
14
  /** Append removes rounded borders and border from the right side. */
@@ -80,10 +82,17 @@ interface ComboBoxPropsBase {
80
82
  */
81
83
  onOpen?: () => void;
82
84
  /**
83
- * A callback function when the list is scrolled to the bottom. Use to fetch more results and append to list.
84
- * Note: Set to null when all items are loaded.
85
+ * A callback function invoked when the menu is scrolled.
86
+ */
87
+ onScroll?: React.UIEventHandler<Element>;
88
+ /**
89
+ * A callback function for loading additional list items.
90
+ * Called when the list is scrolled to the bottom or all items in the list are visible.
91
+ * This is called with an event argument if this is the result of a scroll.
92
+ *
93
+ * This should be set this to `null` when all items are loaded.
85
94
  */
86
- onScrollBottom?: () => void;
95
+ onScrollBottom?: ComboBoxScrollBottomHandler;
87
96
  placeholder?: string;
88
97
  /** Prepend removes rounded borders from the left side. */
89
98
  prepend?: boolean;
@@ -126,7 +135,7 @@ declare class ComboBox extends Component<ComboBoxProps, ComboBoxState> {
126
135
  private popoverId;
127
136
  private previousActiveIndex;
128
137
  private textInput;
129
- static propTypes: React.WeakValidationMap<ComboBoxPropsBaseControlled & Required<Pick<ComboBoxPropsBase, "placeholder" | "disabled" | "size" | "inline" | "error" | "defaultPlacement" | "animateLoading" | "isLoadingOptions" | "menuStyle" | "controlledFilter">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">> | React.WeakValidationMap<ComboBoxPropsBaseUncontrolled & Required<Pick<ComboBoxPropsBase, "placeholder" | "disabled" | "size" | "inline" | "error" | "defaultPlacement" | "animateLoading" | "isLoadingOptions" | "menuStyle" | "controlledFilter">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">>;
138
+ static propTypes: React.WeakValidationMap<ComboBoxPropsBaseControlled & Required<Pick<ComboBoxPropsBase, "placeholder" | "disabled" | "size" | "inline" | "error" | "defaultPlacement" | "animateLoading" | "isLoadingOptions" | "menuStyle" | "controlledFilter">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">> | React.WeakValidationMap<ComboBoxPropsBaseUncontrolled & Required<Pick<ComboBoxPropsBase, "placeholder" | "disabled" | "size" | "inline" | "error" | "defaultPlacement" | "animateLoading" | "isLoadingOptions" | "menuStyle" | "controlledFilter">> & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "onPause" | "className" | "color" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">>;
130
139
  static defaultProps: Required<Pick<ComboBoxPropsBase, "placeholder" | "disabled" | "size" | "inline" | "error" | "defaultPlacement" | "animateLoading" | "isLoadingOptions" | "menuStyle" | "controlledFilter">>;
131
140
  static Option: typeof Option;
132
141
  static Divider: typeof Divider;
@@ -1,6 +1,6 @@
1
1
  import React, { Component } from 'react';
2
2
  import { Divider, Heading } from '@splunk/react-ui/Menu';
3
- import { MultiselectChangeHandler, MultiselectFilterChangeHandler } from './Multiselect';
3
+ import { MultiselectChangeHandler, MultiselectFilterChangeHandler, MultiselectScrollBottomHandler } from './Multiselect';
4
4
  import Option from './Option';
5
5
  import { ClassComponentProps } from '../utils/types';
6
6
  interface CompactPropsBase {
@@ -81,10 +81,17 @@ interface CompactPropsBase {
81
81
  */
82
82
  onChange?: MultiselectChangeHandler;
83
83
  /**
84
- * A callback function when the list is scrolled to the bottom. Use to fetch more results and append to list.
85
- * Note: Set to null when all items are loaded.
84
+ * A callback function invoked when the menu is scrolled.
86
85
  */
87
- onScrollBottom?: () => void;
86
+ onScroll?: React.UIEventHandler<Element>;
87
+ /**
88
+ * A callback function for loading additional list items.
89
+ * Called when the list is scrolled to the bottom or all items in the list are visible.
90
+ * This is called with an event argument if this is the result of a scroll.
91
+ *
92
+ * This should be set this to `null` when all items are loaded.
93
+ */
94
+ onScrollBottom?: MultiselectScrollBottomHandler;
88
95
  /**
89
96
  * A callback with the change event and value of the filter box. Providing this callback and
90
97
  * setting controlledFilter to true enables you to filter and update the children by other