@splunk/react-ui 4.14.0 → 4.16.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 (137) hide show
  1. package/.dockerignore +2 -0
  2. package/Accordion.js +41 -16
  3. package/Anchor.js +9 -9
  4. package/Animation.js +6 -6
  5. package/AnimationToggle.js +2 -2
  6. package/Box.js +9 -9
  7. package/Button.js +54 -51
  8. package/ButtonGroup.js +9 -9
  9. package/ButtonSimple.js +68 -64
  10. package/CHANGELOG.md +46 -0
  11. package/Calendar.js +124 -106
  12. package/Card.js +68 -68
  13. package/CardLayout.js +9 -9
  14. package/Chip.js +22 -22
  15. package/Clickable.js +38 -14
  16. package/CloseButton.js +23 -23
  17. package/Code.js +484 -436
  18. package/CollapsiblePanel.js +59 -34
  19. package/Color.js +297 -187
  20. package/ColumnLayout.js +18 -17
  21. package/ComboBox.js +81 -32
  22. package/Concertina.js +88 -27
  23. package/ControlGroup.js +81 -24
  24. package/Date.js +54 -36
  25. package/DefinitionList.js +14 -8
  26. package/Divider.d.ts +2 -0
  27. package/Divider.js +9 -9
  28. package/Dockerfile.enterprise.storybook +7 -0
  29. package/Dockerfile.prisma.storybook +7 -0
  30. package/Dockerfile.visual +10 -0
  31. package/Dropdown.js +78 -18
  32. package/EventListener.js +17 -17
  33. package/File.js +108 -46
  34. package/FormRows.js +38 -37
  35. package/Heading.js +83 -55
  36. package/Image.js +63 -38
  37. package/JSONTree.js +106 -21
  38. package/Layer.js +59 -34
  39. package/Link.js +17 -17
  40. package/List.js +3 -3
  41. package/MIGRATION.md +21 -0
  42. package/Markdown.js +71 -65
  43. package/Menu.js +155 -121
  44. package/Message.js +129 -129
  45. package/MessageBar.js +136 -136
  46. package/Modal.js +57 -32
  47. package/ModalLayer.js +15 -15
  48. package/Monogram.js +18 -17
  49. package/Multiselect.js +2807 -2310
  50. package/Number.js +74 -37
  51. package/Paginator.js +96 -83
  52. package/Paragraph.js +10 -10
  53. package/Popover.js +191 -54
  54. package/Progress.js +23 -22
  55. package/RadioBar.js +32 -14
  56. package/RadioList.js +17 -11
  57. package/Resize.js +33 -20
  58. package/ResultsMenu.js +36 -23
  59. package/ScreenReaderContent.js +9 -9
  60. package/Scroll.js +51 -26
  61. package/ScrollContainerContext.js +48 -48
  62. package/Search.js +68 -31
  63. package/Select.js +501 -204
  64. package/SidePanel.js +37 -24
  65. package/Slider.js +54 -24
  66. package/SlidingPanels.js +52 -14
  67. package/SplitButton.js +23 -22
  68. package/StaticContent.js +9 -9
  69. package/StepBar.js +22 -22
  70. package/Switch.js +18 -13
  71. package/TabBar.js +22 -22
  72. package/TabLayout.js +46 -18
  73. package/Table.js +424 -166
  74. package/Text.js +91 -49
  75. package/TextArea.d.ts +2 -0
  76. package/TextArea.js +127 -49
  77. package/Tooltip.js +236 -59
  78. package/TransitionOpen.js +39 -26
  79. package/Typography.d.ts +2 -0
  80. package/Typography.js +18 -17
  81. package/WaitSpinner.js +15 -15
  82. package/docker-compose.yml +42 -0
  83. package/package.json +13 -12
  84. package/test-runner-jest.config.js +11 -6
  85. package/types/src/Accordion/AccordionContext.d.ts +1 -0
  86. package/types/src/Button/Button.d.ts +5 -2
  87. package/types/src/Button/docs/examples/Basic.d.ts +2 -2
  88. package/types/src/Button/docs/examples/Selected.d.ts +2 -2
  89. package/types/src/ButtonGroup/ButtonGroupContext.d.ts +1 -0
  90. package/types/src/ButtonSimple/ButtonSimple.d.ts +10 -11
  91. package/types/src/Calendar/Calendar.d.ts +2 -0
  92. package/types/src/CardLayout/CardLayoutContext.d.ts +1 -0
  93. package/types/src/Concertina/ConcertinaContext.d.ts +1 -0
  94. package/types/src/ControlGroup/ControlGroup.d.ts +15 -8
  95. package/types/src/ControlGroup/docs/examples/HelpWithErrorText.d.ts +2 -0
  96. package/types/src/ControlGroup/docs/examples/Required.d.ts +2 -0
  97. package/types/src/File/File.d.ts +4 -2
  98. package/types/src/File/FileContext.d.ts +1 -0
  99. package/types/src/FormRows/FormRowsContext.d.ts +1 -0
  100. package/types/src/Markdown/renderers/MarkdownLink.d.ts +1 -1
  101. package/types/src/Menu/MenuContext.d.ts +1 -0
  102. package/types/src/Modal/ModalContext.d.ts +1 -0
  103. package/types/src/Multiselect/Compact.d.ts +14 -1
  104. package/types/src/Multiselect/Multiselect.d.ts +15 -1
  105. package/types/src/Multiselect/Normal.d.ts +2 -0
  106. package/types/src/Popover/Popover.d.ts +25 -5
  107. package/types/src/Popover/PopoverContext.d.ts +1 -0
  108. package/types/src/RadioBar/RadioBar.d.ts +5 -3
  109. package/types/src/RadioBar/RadioBarContext.d.ts +1 -0
  110. package/types/src/RadioList/RadioList.d.ts +5 -1
  111. package/types/src/RadioList/RadioListContext.d.ts +1 -0
  112. package/types/src/Select/Select.d.ts +3 -1
  113. package/types/src/Select/SelectBase.d.ts +14 -0
  114. package/types/src/Slider/Slider.d.ts +5 -3
  115. package/types/src/StepBar/StepBarContext.d.ts +1 -0
  116. package/types/src/Switch/Switch.d.ts +2 -0
  117. package/types/src/TabBar/TabBarContext.d.ts +1 -0
  118. package/types/src/TabLayout/Panel.d.ts +3 -0
  119. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  120. package/types/src/Table/Body.d.ts +2 -0
  121. package/types/src/Table/Head.d.ts +2 -0
  122. package/types/src/Table/Row.d.ts +11 -3
  123. package/types/src/Table/Table.d.ts +5 -3
  124. package/types/src/Table/TableContext.d.ts +1 -0
  125. package/types/src/Text/Text.d.ts +5 -3
  126. package/types/src/TextArea/TextArea.d.ts +5 -3
  127. package/types/src/Tooltip/Tooltip.d.ts +16 -4
  128. package/types/src/Typography/Typography.d.ts +1 -1
  129. package/types/src/useForceUpdate/useForceUpdate.d.ts +1 -0
  130. package/useForceUpdate.js +9 -9
  131. package/useKeyPress.js +2 -2
  132. package/usePrevious.js +9 -9
  133. package/.storybook-visual/config/snapshotResolver.js +0 -29
  134. package/.storybook-visual/main.js +0 -22
  135. package/.storybook-visual/preview.jsx +0 -31
  136. package/.storybook-visual/scripts/test.sh +0 -108
  137. package/.storybook-visual/test-runner.js +0 -108
package/Typography.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 = 186);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 235);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -94,7 +94,14 @@ module.exports = require("prop-types");
94
94
 
95
95
  /***/ }),
96
96
 
97
- /***/ 186:
97
+ /***/ 2:
98
+ /***/ (function(module, exports) {
99
+
100
+ module.exports = require("react");
101
+
102
+ /***/ }),
103
+
104
+ /***/ 235:
98
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
106
 
100
107
  "use strict";
@@ -113,11 +120,12 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
113
120
  var external_prop_types_ = __webpack_require__(1);
114
121
  var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
115
122
 
116
- // EXTERNAL MODULE: external "lodash"
117
- var external_lodash_ = __webpack_require__(4);
123
+ // EXTERNAL MODULE: external "lodash/pick"
124
+ var pick_ = __webpack_require__(34);
125
+ var pick_default = /*#__PURE__*/__webpack_require__.n(pick_);
118
126
 
119
127
  // EXTERNAL MODULE: external "@splunk/themes/mixins"
120
- var mixins_ = __webpack_require__(59);
128
+ var mixins_ = __webpack_require__(80);
121
129
  var mixins_default = /*#__PURE__*/__webpack_require__.n(mixins_);
122
130
 
123
131
  // EXTERNAL MODULE: external "styled-components"
@@ -144,7 +152,7 @@ var propTypes = {
144
152
  variant: external_prop_types_default.a.oneOf(mixins_["typographyVariants"]),
145
153
  size: external_prop_types_default.a.number,
146
154
  lineHeight: external_prop_types_default.a.number,
147
- color: external_prop_types_default.a.oneOf(['active', 'default', 'disabled', 'inverted', 'muted']),
155
+ color: external_prop_types_default.a.oneOf(['active', 'default', 'disabled', 'inverted', 'muted', 'inherit']),
148
156
  weight: external_prop_types_default.a.oneOf([300, 400, 500, 600, 700, 800, 900, 'light', 'normal', 'semiBold', 'bold', 'extraBold', 'heavy']),
149
157
  withReset: external_prop_types_default.a.bool
150
158
  };
@@ -177,7 +185,7 @@ function Typography(_ref2) {
177
185
 
178
186
  // @docs-props-type TypographyPropsBase
179
187
  var variant = otherProps.variant;
180
- var typographyParams = Object(external_lodash_["pick"])(otherProps, keys);
188
+ var typographyParams = pick_default()(otherProps, keys);
181
189
  return /*#__PURE__*/external_react_default.a.createElement(StyledTypography, _extends({
182
190
  as: as,
183
191
  ref: elementRef,
@@ -192,13 +200,6 @@ Typography.propTypes = propTypes;
192
200
 
193
201
 
194
202
 
195
- /***/ }),
196
-
197
- /***/ 2:
198
- /***/ (function(module, exports) {
199
-
200
- module.exports = require("react");
201
-
202
203
  /***/ }),
203
204
 
204
205
  /***/ 3:
@@ -208,14 +209,14 @@ module.exports = require("styled-components");
208
209
 
209
210
  /***/ }),
210
211
 
211
- /***/ 4:
212
+ /***/ 34:
212
213
  /***/ (function(module, exports) {
213
214
 
214
- module.exports = require("lodash");
215
+ module.exports = require("lodash/pick");
215
216
 
216
217
  /***/ }),
217
218
 
218
- /***/ 59:
219
+ /***/ 80:
219
220
  /***/ (function(module, exports) {
220
221
 
221
222
  module.exports = require("@splunk/themes/mixins");
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 = 181);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 230);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,14 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 181:
104
+ /***/ 2:
105
+ /***/ (function(module, exports) {
106
+
107
+ module.exports = require("react");
108
+
109
+ /***/ }),
110
+
111
+ /***/ 230:
105
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
113
 
107
114
  "use strict";
@@ -120,13 +127,13 @@ var external_prop_types_ = __webpack_require__(1);
120
127
  var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
121
128
 
122
129
  // EXTERNAL MODULE: external "@splunk/react-ui/AnimationToggle"
123
- var AnimationToggle_ = __webpack_require__(38);
130
+ var AnimationToggle_ = __webpack_require__(48);
124
131
 
125
132
  // EXTERNAL MODULE: external "@splunk/themes"
126
133
  var themes_ = __webpack_require__(0);
127
134
 
128
135
  // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
129
- var i18n_ = __webpack_require__(5);
136
+ var i18n_ = __webpack_require__(4);
130
137
 
131
138
  // EXTERNAL MODULE: external "styled-components"
132
139
  var external_styled_components_ = __webpack_require__(3);
@@ -265,13 +272,6 @@ WaitSpinner.propTypes = propTypes;
265
272
  // CONCATENATED MODULE: ./src/WaitSpinner/index.ts
266
273
 
267
274
 
268
- /***/ }),
269
-
270
- /***/ 2:
271
- /***/ (function(module, exports) {
272
-
273
- module.exports = require("react");
274
-
275
275
  /***/ }),
276
276
 
277
277
  /***/ 3:
@@ -281,17 +281,17 @@ module.exports = require("styled-components");
281
281
 
282
282
  /***/ }),
283
283
 
284
- /***/ 38:
284
+ /***/ 4:
285
285
  /***/ (function(module, exports) {
286
286
 
287
- module.exports = require("@splunk/react-ui/AnimationToggle");
287
+ module.exports = require("@splunk/ui-utils/i18n");
288
288
 
289
289
  /***/ }),
290
290
 
291
- /***/ 5:
291
+ /***/ 48:
292
292
  /***/ (function(module, exports) {
293
293
 
294
- module.exports = require("@splunk/ui-utils/i18n");
294
+ module.exports = require("@splunk/react-ui/AnimationToggle");
295
295
 
296
296
  /***/ })
297
297
 
@@ -0,0 +1,42 @@
1
+ version: "3.9"
2
+ services:
3
+ prisma-storybook:
4
+ build:
5
+ context: .
6
+ dockerfile: Dockerfile.prisma.storybook
7
+ command: npx http-server storybook-static-visual --port 6007
8
+ ports:
9
+ - "6007:6007"
10
+ enterprise-storybook:
11
+ build:
12
+ context: .
13
+ dockerfile: Dockerfile.enterprise.storybook
14
+ command: npx http-server storybook-static-visual-enterprise --port 6008
15
+ ports:
16
+ - "6008:6008"
17
+ prisma-visual-test:
18
+ build:
19
+ context: .
20
+ dockerfile: Dockerfile.visual
21
+ env_file:
22
+ - ./.storybook-visual/config/.env.visual
23
+ working_dir: /react-ui
24
+ volumes:
25
+ - "./src:/react-ui/src"
26
+ - "./test-reports:/react-ui/test-reports"
27
+ depends_on:
28
+ - prisma-storybook
29
+ command: /bin/sh -c "npx wait-on http://prisma-storybook:6007 && yarn cache clean && yarn test-storybook -c .storybook-visual --browsers $${STORYBOOK_BROWSER} $${STORYBOOK_UPDATE_SNAPSHOT} --url http://prisma-storybook:6007 --no-index-json"
30
+ enterprise-visual-test:
31
+ build:
32
+ context: .
33
+ dockerfile: Dockerfile.visual
34
+ env_file:
35
+ - ./.storybook-visual/config/.env.visual
36
+ working_dir: /react-ui
37
+ volumes:
38
+ - "./src:/react-ui/src"
39
+ - "./test-reports:/react-ui/test-reports"
40
+ depends_on:
41
+ - enterprise-storybook
42
+ command: /bin/sh -c "npx wait-on http://enterprise-storybook:6008 && yarn cache clean && yarn test-storybook -c .storybook-visual --browsers $${STORYBOOK_BROWSER} $${STORYBOOK_UPDATE_SNAPSHOT} --url http://enterprise-storybook:6008 --no-index-json"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splunk/react-ui",
3
- "version": "4.14.0",
3
+ "version": "4.16.0",
4
4
  "description": "Library of React components that implement the Splunk design language",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Splunk Inc.",
@@ -9,7 +9,8 @@
9
9
  "docs": "NODE_ENV=production webpack --config docs.gen.webpack.config.js",
10
10
  "docs:publish": "cicd-publish-docs docs --force",
11
11
  "docs:publish:external": "cicd-publish-docs docs-external --force --suffix=public",
12
- "docs:start": "webpack serve --config docs.gen.webpack.config.js",
12
+ "docs:start": "INTERNAL=true webpack serve --config docs.gen.webpack.config.js",
13
+ "docs:start:external": "webpack serve --config docs.gen.webpack.config.js",
13
14
  "eslint": "eslint src .storybook --ext \".ts,.tsx,.js,.jsx\"",
14
15
  "eslint:fix": "yarn run eslint --fix",
15
16
  "eslint:ci": "yarn run eslint -f junit -o test-reports/lint-results.xml",
@@ -37,9 +38,9 @@
37
38
  "styled-components": "5.1.1"
38
39
  },
39
40
  "dependencies": {
40
- "@splunk/react-icons": "^3.3.0",
41
- "@splunk/themes": "^0.13.0",
42
- "@splunk/ui-utils": "^1.5.1",
41
+ "@splunk/react-icons": "^3.3.1",
42
+ "@splunk/themes": "^0.14.0",
43
+ "@splunk/ui-utils": "^1.5.2",
43
44
  "@types/commonmark": "^0.27.0",
44
45
  "@types/lodash": "^4.14.156",
45
46
  "@types/react": "^16.9.38",
@@ -52,11 +53,11 @@
52
53
  "commonmark-react-renderer": "^4.3.2",
53
54
  "decimal.js-light": "^2.2.3",
54
55
  "lodash": "^4.17.14",
55
- "moment": "^2.22.2",
56
+ "moment": "^2.29.4",
56
57
  "prop-types": "^15.6.2",
57
58
  "react-resize-detector": "^3.2.1",
58
59
  "react-sortable-hoc": "^1.11.0",
59
- "react-spring": "^9.2.4",
60
+ "react-spring": "9.2.4",
60
61
  "tinycolor2": "^1.4.1",
61
62
  "use-typed-event-listener": "^3.0.0"
62
63
  },
@@ -67,13 +68,13 @@
67
68
  "@cypress/webpack-dev-server": "^1.8.2",
68
69
  "@splunk/babel-preset": "^3.0.0",
69
70
  "@splunk/cicd-tools": "^0.5.0",
70
- "@splunk/docs-gen": "^0.11.2",
71
+ "@splunk/docs-gen": "1.0.0-beta.2",
71
72
  "@splunk/eslint-config": "^4.0.0",
72
- "@splunk/react-docs": "^0.11.0",
73
+ "@splunk/react-docs": "1.0.0-beta.2",
73
74
  "@splunk/stylelint-config": "^4.0.0",
74
- "@splunk/test-runner-utils": "^0.4.0",
75
+ "@splunk/test-runner-utils": "^0.4.1",
75
76
  "@splunk/wdio-functional-test-runner": "^10.1.0",
76
- "@splunk/webpack-configs": "^5.0.0",
77
+ "@splunk/webpack-configs": "^6.0.0",
77
78
  "@storybook/addon-a11y": "^6.5.9",
78
79
  "@storybook/addon-essentials": "^6.5.9",
79
80
  "@storybook/addon-interactions": "^6.5.9",
@@ -100,6 +101,7 @@
100
101
  "babel-loader": "^8.0.4",
101
102
  "babel-plugin-istanbul": "^5.1.0",
102
103
  "babel-plugin-styled-components": "^1.10.7",
104
+ "babel-plugin-transform-imports": "^2.0.0",
103
105
  "babel-plugin-transform-require-context": "^0.1.1",
104
106
  "chai": "^3.5.0",
105
107
  "core-js": "^3.6.4",
@@ -141,7 +143,6 @@
141
143
  "stylelint": "^13.0.0",
142
144
  "ts-loader": "^6.2.1",
143
145
  "typescript": "^4.0.5",
144
- "wdio-image-comparison-service": "^1.9.0",
145
146
  "webpack": "^4.16.2",
146
147
  "webpack-cli": "^4.9.2",
147
148
  "webpack-dev-server": "^4.7.4",
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable no-undef */
2
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
2
3
  const { getJestConfig } = require('@storybook/test-runner');
3
4
 
4
5
  // if component is passed to storybook:test then test will run for only that component
@@ -18,24 +19,28 @@ module.exports = {
18
19
  '^.+\\.examples\\.[jt]sx?$': '@storybook/test-runner/playwright/transform',
19
20
  '^.+\\.tsx?$': 'babel-jest',
20
21
  },
21
- snapshotResolver: '<rootDir>/.storybook-visual/config/snapshotResolver.js',
22
+ // used for a11y DOM snapshots, currently disabled
23
+ // snapshotResolver: '<rootDir>/.storybook-visual/config/snapshotResolver.js',
22
24
  reporters: [
23
25
  'default',
26
+ 'jest-junit',
24
27
  [
25
28
  'jest-stare',
26
29
  {
27
30
  resultDir: `./test-reports/${
28
31
  process.env.STORYBOOK_TEST_A11Y === 'false' ? 'visual' : 'a11y'
29
- }/${process.env.STORYBOOK_TEST_BROWSER}-${process.env.STORYBOOK_THEME_FAMILY}`,
32
+ }/${process.env.STORYBOOK_THEME_FAMILY}${
33
+ process.env.JOB_BROWSER ? `-${process.env.JOB_BROWSER}` : ''
34
+ }`,
30
35
  reportTitle: `${
31
36
  process.env.STORYBOOK_TEST_A11Y === 'false' ? 'Visual' : 'A11y'
32
- } Test Report - ${process.env.STORYBOOK_TEST_BROWSER} ${
33
- process.env.STORYBOOK_THEME_FAMILY
37
+ } Test Report - ${process.env.STORYBOOK_THEME_FAMILY}${
38
+ process.env.JOB_BROWSER ? `-${process.env.JOB_BROWSER}` : ''
34
39
  }`,
35
40
  reportHeadline: `${
36
41
  process.env.STORYBOOK_TEST_A11Y === 'false' ? 'Visual' : 'A11y'
37
- } Test Report - ${process.env.STORYBOOK_TEST_BROWSER} ${
38
- process.env.STORYBOOK_THEME_FAMILY
42
+ } Test Report - ${process.env.STORYBOOK_THEME_FAMILY}${
43
+ process.env.JOB_BROWSER ? `-${process.env.JOB_BROWSER}` : ''
39
44
  }`,
40
45
  hidePending: true,
41
46
  resultHtml:
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CollapsiblePanelRequestCloseHandler, CollapsiblePanelRequestOpenHandler } from '@splunk/react-ui/CollapsiblePanel';
2
3
  export interface AccordionContext {
3
4
  onRequestClose?: CollapsiblePanelRequestCloseHandler;
@@ -12,7 +12,7 @@ interface ButtonPropsBase {
12
12
  /** Returns a value on click. Use when composing or testing. */
13
13
  action?: string;
14
14
  /** Changes the style of the button.
15
- * @themeNotes Enterprise themes support the following appearances:`default`, `primary`, `secondary`, and `pill`. Prisma themes support the `default`, `primary`, `secondary`, `destructive`, `toggle` and `flat` appearances.
15
+ * @themeNotes Enterprise themes support the following appearances:`default`, `primary`, `secondary`, `destructive` and `pill`. Prisma themes support the `default`, `primary`, `secondary`, `destructive`, `toggle` and `flat` appearances.
16
16
  */
17
17
  appearance?: 'default' | 'secondary' | 'primary' | 'destructive' | 'pill' | 'toggle' | 'flat';
18
18
  /** Removes the right border and border-radius of the button so you can
@@ -29,7 +29,9 @@ interface ButtonPropsBase {
29
29
  elementRef?: React.Ref<HTMLAnchorElement | HTMLButtonElement>;
30
30
  /** Turns the button red. If you use this prop, apply other error
31
31
  * indicators, such as an error message, to meet accessibility
32
- * requirements. */
32
+ * requirements.
33
+ * @deprecated
34
+ * */
33
35
  error?: boolean;
34
36
  /** Applies the text that displays on the button. */
35
37
  label?: React.ReactNode;
@@ -68,6 +70,7 @@ declare class Button extends Component<ButtonProps> {
68
70
  static propTypes: React.WeakValidationMap<ClassComponentProps<ButtonPropsBase, Required<Pick<ButtonPropsBase, "disabled" | "selected" | "appearance" | "inline" | "error" | "openInNewContext" | "append" | "prepend" | "isMenu">>, "button", never>> | React.WeakValidationMap<ClassComponentProps<ButtonPropsBase, Required<Pick<ButtonPropsBase, "disabled" | "selected" | "appearance" | "inline" | "error" | "openInNewContext" | "append" | "prepend" | "isMenu">>, "a", "href">>;
69
71
  static defaultProps: Required<Pick<ButtonPropsBase, "disabled" | "selected" | "appearance" | "inline" | "error" | "openInNewContext" | "append" | "prepend" | "isMenu">>;
70
72
  static [legacyRefMode]: boolean;
73
+ constructor(props: Readonly<ButtonProps>);
71
74
  private handleClick;
72
75
  private handleMount;
73
76
  /**
@@ -1,2 +1,2 @@
1
- declare function Buttons(): JSX.Element;
2
- export default Buttons;
1
+ declare function Basic(): JSX.Element;
2
+ export default Basic;
@@ -1,2 +1,2 @@
1
- declare function Buttons(): JSX.Element;
2
- export default Buttons;
1
+ declare function Selected(): JSX.Element;
2
+ export default Selected;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface ButtonGroupContext {
2
3
  inline?: boolean;
3
4
  role?: string;