@splunk/react-ui 4.21.0 → 4.22.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 (92) hide show
  1. package/Accordion.js +425 -325
  2. package/Anchor.js +147 -117
  3. package/Animation.js +142 -94
  4. package/AnimationToggle.js +197 -193
  5. package/Box.js +145 -118
  6. package/Breadcrumbs.js +288 -206
  7. package/Button.js +488 -465
  8. package/ButtonGroup.js +160 -128
  9. package/ButtonSimple.js +543 -462
  10. package/CHANGELOG.md +24 -3
  11. package/Calendar.js +1111 -1001
  12. package/Card.js +771 -598
  13. package/CardLayout.js +205 -147
  14. package/Chip.js +509 -488
  15. package/Clickable.js +414 -352
  16. package/CloseButton.js +165 -142
  17. package/Code.js +1807 -2084
  18. package/CollapsiblePanel.js +586 -519
  19. package/Color.js +1068 -1068
  20. package/ColumnLayout.js +402 -363
  21. package/ComboBox.js +903 -794
  22. package/Concertina.js +997 -802
  23. package/ControlGroup.js +687 -594
  24. package/Date.js +567 -547
  25. package/DefinitionList.js +308 -234
  26. package/Divider.js +149 -118
  27. package/Dropdown.js +459 -416
  28. package/DualListbox.js +1479 -1541
  29. package/EventListener.js +94 -97
  30. package/File.js +1051 -969
  31. package/FormRows.js +883 -696
  32. package/Heading.js +216 -193
  33. package/Image.js +446 -402
  34. package/JSONTree.js +690 -551
  35. package/Layer.js +437 -410
  36. package/Link.js +336 -255
  37. package/List.js +213 -161
  38. package/Markdown.js +509 -487
  39. package/Menu.js +1104 -1056
  40. package/Message.js +475 -441
  41. package/MessageBar.js +387 -373
  42. package/Modal.js +810 -634
  43. package/ModalLayer.js +326 -243
  44. package/Monogram.js +308 -276
  45. package/Multiselect.js +3564 -3364
  46. package/Number.js +729 -687
  47. package/Paginator.js +510 -449
  48. package/Paragraph.js +145 -112
  49. package/Popover.js +1459 -1432
  50. package/Progress.js +301 -246
  51. package/RadioBar.js +634 -527
  52. package/RadioList.js +483 -444
  53. package/Resize.js +530 -489
  54. package/ResultsMenu.js +479 -455
  55. package/ScreenReaderContent.js +142 -111
  56. package/Scroll.js +595 -456
  57. package/ScrollContainerContext.js +197 -206
  58. package/Search.js +756 -650
  59. package/Select.js +2446 -2345
  60. package/SidePanel.js +390 -284
  61. package/Slider.js +680 -676
  62. package/SlidingPanels.js +639 -503
  63. package/SplitButton.js +464 -367
  64. package/StaticContent.js +161 -133
  65. package/StepBar.js +386 -358
  66. package/Switch.js +710 -640
  67. package/TabBar.js +741 -680
  68. package/TabLayout.js +406 -322
  69. package/Table.js +4974 -4616
  70. package/Text.js +1170 -1138
  71. package/TextArea.js +1102 -1090
  72. package/Tooltip.js +624 -581
  73. package/TransitionOpen.js +489 -422
  74. package/Typography.js +176 -153
  75. package/WaitSpinner.js +230 -206
  76. package/package.json +7 -7
  77. package/types/src/Color/Color.d.ts +0 -1
  78. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  79. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  80. package/types/src/RadioBar/RadioBar.d.ts +1 -0
  81. package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
  82. package/types/src/Select/docs/examples/Icons.d.ts +1 -9
  83. package/types/src/Slider/Slider.d.ts +1 -0
  84. package/types/src/TabBar/Tab.d.ts +10 -1
  85. package/types/src/TabBar/TabBar.d.ts +4 -2
  86. package/types/src/Table/Head.d.ts +7 -3
  87. package/types/src/Table/Table.d.ts +3 -2
  88. package/types/src/Table/TableContext.d.ts +2 -0
  89. package/useForceUpdate.js +112 -82
  90. package/useKeyPress.js +74 -71
  91. package/usePrevious.js +65 -65
  92. package/useRovingFocus.js +122 -138
package/DefinitionList.js CHANGED
@@ -1,240 +1,314 @@
1
- /******/ (() => { // webpackBootstrap
2
- /******/ "use strict";
3
- /******/ // The require scope
4
- /******/ var __webpack_require__ = {};
5
- /******/
6
- /************************************************************************/
7
- /******/ /* webpack/runtime/compat get default export */
8
- /******/ (() => {
9
- /******/ // getDefaultExport function for compatibility with non-harmony modules
10
- /******/ __webpack_require__.n = (module) => {
11
- /******/ var getter = module && module.__esModule ?
12
- /******/ () => (module['default']) :
13
- /******/ () => (module);
14
- /******/ __webpack_require__.d(getter, { a: getter });
15
- /******/ return getter;
16
- /******/ };
17
- /******/ })();
18
- /******/
19
- /******/ /* webpack/runtime/define property getters */
20
- /******/ (() => {
21
- /******/ // define getter functions for harmony exports
22
- /******/ __webpack_require__.d = (exports, definition) => {
23
- /******/ for(var key in definition) {
24
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
26
- /******/ }
27
- /******/ }
28
- /******/ };
29
- /******/ })();
30
- /******/
31
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
32
- /******/ (() => {
33
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
34
- /******/ })();
35
- /******/
36
- /******/ /* webpack/runtime/make namespace object */
37
- /******/ (() => {
38
- /******/ // define __esModule on exports
39
- /******/ __webpack_require__.r = (exports) => {
40
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
41
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
42
- /******/ }
43
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
44
- /******/ };
45
- /******/ })();
46
- /******/
47
- /************************************************************************/
48
- var __webpack_exports__ = {};
49
- // ESM COMPAT FLAG
50
- __webpack_require__.r(__webpack_exports__);
51
-
52
- // EXPORTS
53
- __webpack_require__.d(__webpack_exports__, {
54
- Description: () => (/* reexport */ DefinitionList_Description),
55
- Term: () => (/* reexport */ DefinitionList_Term),
56
- "default": () => (/* reexport */ DefinitionList_DefinitionList)
57
- });
58
-
59
- ;// CONCATENATED MODULE: external "react"
60
- const external_react_namespaceObject = require("react");
61
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
62
- ;// CONCATENATED MODULE: external "prop-types"
63
- const external_prop_types_namespaceObject = require("prop-types");
64
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
65
- ;// CONCATENATED MODULE: external "styled-components"
66
- const external_styled_components_namespaceObject = require("styled-components");
67
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
68
- ;// CONCATENATED MODULE: external "@splunk/themes"
69
- const themes_namespaceObject = require("@splunk/themes");
70
- ;// CONCATENATED MODULE: ./src/DefinitionList/DescriptionStyles.ts
71
-
72
-
73
- var Styled = external_styled_components_default().dd.withConfig({
74
- displayName: "DescriptionStyles__Styled",
75
- componentId: "sc-1jglixb-0"
76
- })(["", ";", ";min-height:", ";padding-left:5px;"], themes_namespaceObject.mixins.reset('block'), (0,themes_namespaceObject.pick)({
77
- prisma: themes_namespaceObject.mixins.typography('body', {
78
- color: 'active'
79
- }),
80
- enterprise: themes_namespaceObject.mixins.typography('body')
81
- }), themes_namespaceObject.variables.lineHeight);
82
-
83
- ;// CONCATENATED MODULE: ./src/DefinitionList/Description.tsx
84
- 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); }
85
-
86
- 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; }
87
-
88
- 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; }
89
-
90
-
91
-
92
-
93
- var propTypes = {
94
- children: (external_prop_types_default()).node,
95
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object])
96
- };
97
-
98
- /**
1
+ /******/ (() => {
2
+ // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ // The require scope
5
+ /******/ var e = {};
6
+ /******/
7
+ /************************************************************************/
8
+ /******/ /* webpack/runtime/compat get default export */
9
+ /******/ (() => {
10
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
11
+ /******/ e.n = t => {
12
+ /******/ var r = t && t.__esModule ?
13
+ /******/ () => t["default"]
14
+ /******/ : () => t
15
+ /******/;
16
+ e.d(r, {
17
+ a: r
18
+ });
19
+ /******/ return r;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ e.d = (t, r) => {
27
+ /******/ for (var n in r) {
28
+ /******/ if (e.o(r, n) && !e.o(t, n)) {
29
+ /******/ Object.defineProperty(t, n, {
30
+ enumerable: true,
31
+ get: r[n]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
41
+ /******/;
42
+ })();
43
+ /******/
44
+ /******/ /* webpack/runtime/make namespace object */
45
+ /******/ (() => {
46
+ /******/ // define __esModule on exports
47
+ /******/ e.r = e => {
48
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
+ /******/ Object.defineProperty(e, Symbol.toStringTag, {
50
+ value: "Module"
51
+ });
52
+ /******/ }
53
+ /******/ Object.defineProperty(e, "__esModule", {
54
+ value: true
55
+ });
56
+ /******/ };
57
+ /******/ })();
58
+ /******/
59
+ /************************************************************************/ var t = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(t);
62
+ // EXPORTS
63
+ e.d(t, {
64
+ Description: () => /* reexport */ m,
65
+ Term: () => /* reexport */ x,
66
+ default: () => /* reexport */ R
67
+ });
68
+ // CONCATENATED MODULE: external "react"
69
+ const r = require("react");
70
+ var n = e.n(r);
71
+ // CONCATENATED MODULE: external "prop-types"
72
+ const i = require("prop-types");
73
+ var o = e.n(i);
74
+ // CONCATENATED MODULE: external "styled-components"
75
+ const l = require("styled-components");
76
+ var a = e.n(l);
77
+ // CONCATENATED MODULE: external "@splunk/themes"
78
+ const c = require("@splunk/themes");
79
+ // CONCATENATED MODULE: ./src/DefinitionList/DescriptionStyles.ts
80
+ var f = a().dd.withConfig({
81
+ displayName: "DescriptionStyles__Styled",
82
+ componentId: "sc-1jglixb-0"
83
+ })([ "", ";", ";min-height:", ";padding-left:5px;" ], c.mixins.reset("block"), (0,
84
+ c.pick)({
85
+ prisma: c.mixins.typography("body", {
86
+ color: "active"
87
+ }),
88
+ enterprise: c.mixins.typography("body")
89
+ }), c.variables.lineHeight);
90
+ // CONCATENATED MODULE: ./src/DefinitionList/Description.tsx
91
+ function p() {
92
+ p = Object.assign || function(e) {
93
+ for (var t = 1; t < arguments.length; t++) {
94
+ var r = arguments[t];
95
+ for (var n in r) {
96
+ if (Object.prototype.hasOwnProperty.call(r, n)) {
97
+ e[n] = r[n];
98
+ }
99
+ }
100
+ }
101
+ return e;
102
+ };
103
+ return p.apply(this, arguments);
104
+ }
105
+ function s(e, t) {
106
+ if (e == null) return {};
107
+ var r = u(e, t);
108
+ var n, i;
109
+ if (Object.getOwnPropertySymbols) {
110
+ var o = Object.getOwnPropertySymbols(e);
111
+ for (i = 0; i < o.length; i++) {
112
+ n = o[i];
113
+ if (t.indexOf(n) >= 0) continue;
114
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
115
+ r[n] = e[n];
116
+ }
117
+ }
118
+ return r;
119
+ }
120
+ function u(e, t) {
121
+ if (e == null) return {};
122
+ var r = {};
123
+ var n = Object.keys(e);
124
+ var i, o;
125
+ for (o = 0; o < n.length; o++) {
126
+ i = n[o];
127
+ if (t.indexOf(i) >= 0) continue;
128
+ r[i] = e[i];
129
+ }
130
+ return r;
131
+ }
132
+ var y = {
133
+ children: o().node,
134
+ elementRef: o().oneOfType([ o().func, o().object ])
135
+ };
136
+ /**
99
137
  * Container component for a `DefinitionList` description.
100
- */
101
- function Description(_ref) {
102
- var children = _ref.children,
103
- elementRef = _ref.elementRef,
104
- otherProps = _objectWithoutProperties(_ref, ["children", "elementRef"]);
105
-
106
- // @docs-props-type DescriptionPropsBase
107
- return /*#__PURE__*/external_react_default().createElement(Styled, _extends({
108
- "data-test": "description",
109
- ref: elementRef
110
- }, otherProps), children);
111
- }
112
-
113
- Description.propTypes = propTypes;
114
- /* harmony default export */ const DefinitionList_Description = (Description);
115
- ;// CONCATENATED MODULE: ./src/DefinitionList/DefinitionListStyles.ts
116
-
117
-
118
- var DefinitionListStyles_Styled = external_styled_components_default().dl.withConfig({
119
- displayName: "DefinitionListStyles__Styled",
120
- componentId: "sc-1pqfrgm-0"
121
- })(["", ";", ";"], themes_namespaceObject.mixins.reset('block'), themes_namespaceObject.mixins.typography('body'));
122
-
123
- ;// CONCATENATED MODULE: ./src/DefinitionList/TermStyles.ts
124
-
125
-
126
- var TermStyles_Styled = external_styled_components_default().dt.withConfig({
127
- displayName: "TermStyles__Styled",
128
- componentId: "sc-1ao97j9-0"
129
- })(["", ";", " float:left;width:120px;overflow:hidden;overflow-x:hidden;white-space:nowrap;word-wrap:normal;", ""], themes_namespaceObject.mixins.reset('block'), (0,themes_namespaceObject.pick)({
130
- prisma: themes_namespaceObject.mixins.typography('body', {
131
- color: 'muted'
132
- }),
133
- enterprise: themes_namespaceObject.mixins.typography('body')
134
- }), (0,themes_namespaceObject.pick)({
135
- enterprise: (0,external_styled_components_namespaceObject.css)(["&::after{content:'", "';}"], " ".concat('.'.repeat(100)))
136
- }));
137
-
138
- ;// CONCATENATED MODULE: ./src/DefinitionList/Term.tsx
139
- function Term_extends() { Term_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 Term_extends.apply(this, arguments); }
140
-
141
- function Term_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Term_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; }
142
-
143
- function Term_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; }
144
-
145
-
146
-
147
-
148
- var Term_propTypes = {
149
- children: (external_prop_types_default()).node,
150
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object])
151
- };
152
-
153
- /**
138
+ */ function d(e) {
139
+ var t = e.children, r = e.elementRef, i = s(e, [ "children", "elementRef" ]);
140
+ // @docs-props-type DescriptionPropsBase
141
+
142
+ return n().createElement(f, p({
143
+ "data-test": "description",
144
+ ref: r
145
+ }, i), t);
146
+ }
147
+ d.propTypes = y;
148
+ /* harmony default export */ const m = d;
149
+ // CONCATENATED MODULE: ./src/DefinitionList/DefinitionListStyles.ts
150
+ var v = a().dl.withConfig({
151
+ displayName: "DefinitionListStyles__Styled",
152
+ componentId: "sc-1pqfrgm-0"
153
+ })([ "", ";", ";" ], c.mixins.reset("block"), c.mixins.typography("body"));
154
+ // CONCATENATED MODULE: ./src/DefinitionList/TermStyles.ts
155
+ var h = a().dt.withConfig({
156
+ displayName: "TermStyles__Styled",
157
+ componentId: "sc-1ao97j9-0"
158
+ })([ "", ";", " float:left;width:120px;overflow:hidden;overflow-x:hidden;white-space:nowrap;word-wrap:normal;", "" ], c.mixins.reset("block"), (0,
159
+ c.pick)({
160
+ prisma: c.mixins.typography("body", {
161
+ color: "muted"
162
+ }),
163
+ enterprise: c.mixins.typography("body")
164
+ }), (0, c.pick)({
165
+ enterprise: (0, l.css)([ "&::after{content:'", "';}" ], " ".concat(".".repeat(100)))
166
+ }));
167
+ // CONCATENATED MODULE: ./src/DefinitionList/Term.tsx
168
+ function b() {
169
+ b = Object.assign || function(e) {
170
+ for (var t = 1; t < arguments.length; t++) {
171
+ var r = arguments[t];
172
+ for (var n in r) {
173
+ if (Object.prototype.hasOwnProperty.call(r, n)) {
174
+ e[n] = r[n];
175
+ }
176
+ }
177
+ }
178
+ return e;
179
+ };
180
+ return b.apply(this, arguments);
181
+ }
182
+ function O(e, t) {
183
+ if (e == null) return {};
184
+ var r = g(e, t);
185
+ var n, i;
186
+ if (Object.getOwnPropertySymbols) {
187
+ var o = Object.getOwnPropertySymbols(e);
188
+ for (i = 0; i < o.length; i++) {
189
+ n = o[i];
190
+ if (t.indexOf(n) >= 0) continue;
191
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
192
+ r[n] = e[n];
193
+ }
194
+ }
195
+ return r;
196
+ }
197
+ function g(e, t) {
198
+ if (e == null) return {};
199
+ var r = {};
200
+ var n = Object.keys(e);
201
+ var i, o;
202
+ for (o = 0; o < n.length; o++) {
203
+ i = n[o];
204
+ if (t.indexOf(i) >= 0) continue;
205
+ r[i] = e[i];
206
+ }
207
+ return r;
208
+ }
209
+ var j = {
210
+ children: o().node,
211
+ elementRef: o().oneOfType([ o().func, o().object ])
212
+ };
213
+ /**
154
214
  * Container component for a `DefinitionList` term.
155
- */
156
- function Term(_ref) {
157
- var children = _ref.children,
158
- elementRef = _ref.elementRef,
159
- otherProps = Term_objectWithoutProperties(_ref, ["children", "elementRef"]);
160
-
161
- // @docs-props-type TermPropsBase
162
- return /*#__PURE__*/external_react_default().createElement(TermStyles_Styled, Term_extends({
163
- "data-test": "term",
164
- ref: elementRef
165
- }, otherProps), children);
166
- }
167
-
168
- Term.propTypes = Term_propTypes;
169
- /* harmony default export */ const DefinitionList_Term = (Term);
170
- ;// CONCATENATED MODULE: ./src/DefinitionList/DefinitionList.tsx
171
- function DefinitionList_extends() { DefinitionList_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 DefinitionList_extends.apply(this, arguments); }
172
-
173
- function DefinitionList_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = DefinitionList_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; }
174
-
175
- function DefinitionList_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; }
176
-
177
-
178
-
179
-
180
-
181
-
182
- var DefinitionList_propTypes = {
183
- children: (external_prop_types_default()).node,
184
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
185
- termWidth: external_prop_types_default().oneOfType([(external_prop_types_default()).number, (external_prop_types_default()).string])
186
- };
187
-
188
- function processChildren(_ref) {
189
- var children = _ref.children,
190
- termWidth = _ref.termWidth;
191
- var filteredChildren = external_react_namespaceObject.Children.toArray(children).filter(external_react_namespaceObject.isValidElement);
192
- return filteredChildren.map(function (child) {
193
- if (child.type === DefinitionList_Term) {
194
- return /*#__PURE__*/(0,external_react_namespaceObject.cloneElement)(child, {
195
- style: {
196
- width: termWidth
215
+ */ function w(e) {
216
+ var t = e.children, r = e.elementRef, i = O(e, [ "children", "elementRef" ]);
217
+ // @docs-props-type TermPropsBase
218
+
219
+ return n().createElement(h, b({
220
+ "data-test": "term",
221
+ ref: r
222
+ }, i), t);
223
+ }
224
+ w.propTypes = j;
225
+ /* harmony default export */ const x = w;
226
+ // CONCATENATED MODULE: ./src/DefinitionList/DefinitionList.tsx
227
+ function S() {
228
+ S = Object.assign || function(e) {
229
+ for (var t = 1; t < arguments.length; t++) {
230
+ var r = arguments[t];
231
+ for (var n in r) {
232
+ if (Object.prototype.hasOwnProperty.call(r, n)) {
233
+ e[n] = r[n];
234
+ }
235
+ }
236
+ }
237
+ return e;
238
+ };
239
+ return S.apply(this, arguments);
240
+ }
241
+ function P(e, t) {
242
+ if (e == null) return {};
243
+ var r = T(e, t);
244
+ var n, i;
245
+ if (Object.getOwnPropertySymbols) {
246
+ var o = Object.getOwnPropertySymbols(e);
247
+ for (i = 0; i < o.length; i++) {
248
+ n = o[i];
249
+ if (t.indexOf(n) >= 0) continue;
250
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
251
+ r[n] = e[n];
252
+ }
197
253
  }
198
- });
254
+ return r;
199
255
  }
200
-
201
- if (child.type === DefinitionList_Description) {
202
- return /*#__PURE__*/(0,external_react_namespaceObject.cloneElement)(child, {
203
- style: {
204
- marginLeft: termWidth
256
+ function T(e, t) {
257
+ if (e == null) return {};
258
+ var r = {};
259
+ var n = Object.keys(e);
260
+ var i, o;
261
+ for (o = 0; o < n.length; o++) {
262
+ i = n[o];
263
+ if (t.indexOf(i) >= 0) continue;
264
+ r[i] = e[i];
205
265
  }
206
- });
266
+ return r;
267
+ }
268
+ var k = {
269
+ children: o().node,
270
+ elementRef: o().oneOfType([ o().func, o().object ]),
271
+ termWidth: o().oneOfType([ o().number, o().string ])
272
+ };
273
+ function _(e) {
274
+ var t = e.children, n = e.termWidth;
275
+ var i = r.Children.toArray(t).filter(r.isValidElement);
276
+ return i.map((function(e) {
277
+ if (e.type === x) {
278
+
279
+ return (0, r.cloneElement)(e, {
280
+ style: {
281
+ width: n
282
+ }
283
+ });
284
+ }
285
+ if (e.type === m) {
286
+
287
+ return (0, r.cloneElement)(e, {
288
+ style: {
289
+ marginLeft: n
290
+ }
291
+ });
292
+ }
293
+ return e;
294
+ }));
295
+ }
296
+ function E(e) {
297
+ var t = e.children, r = e.elementRef, i = e.termWidth, o = i === void 0 ? 120 : i, l = P(e, [ "children", "elementRef", "termWidth" ]);
298
+ // @docs-props-type DefinitionListPropsBase
299
+
300
+ return n().createElement(v, S({
301
+ "data-test": "definition-list",
302
+ ref: r
303
+ }, l), _({
304
+ children: t,
305
+ termWidth: o
306
+ }));
207
307
  }
208
-
209
- return child;
210
- });
211
- }
212
-
213
- function DefinitionList(_ref2) {
214
- var children = _ref2.children,
215
- elementRef = _ref2.elementRef,
216
- _ref2$termWidth = _ref2.termWidth,
217
- termWidth = _ref2$termWidth === void 0 ? 120 : _ref2$termWidth,
218
- otherProps = DefinitionList_objectWithoutProperties(_ref2, ["children", "elementRef", "termWidth"]);
219
-
220
- // @docs-props-type DefinitionListPropsBase
221
- return /*#__PURE__*/external_react_default().createElement(DefinitionListStyles_Styled, DefinitionList_extends({
222
- "data-test": "definition-list",
223
- ref: elementRef
224
- }, otherProps), processChildren({
225
- children: children,
226
- termWidth: termWidth
227
- }));
228
- }
229
-
230
- DefinitionList.propTypes = DefinitionList_propTypes;
231
- DefinitionList.Description = DefinitionList_Description;
232
- DefinitionList.Term = DefinitionList_Term;
233
- /* harmony default export */ const DefinitionList_DefinitionList = (DefinitionList);
234
-
235
- ;// CONCATENATED MODULE: ./src/DefinitionList/index.ts
236
-
237
-
238
- module.exports = __webpack_exports__;
239
- /******/ })()
240
- ;
308
+ E.propTypes = k;
309
+ E.Description = m;
310
+ E.Term = x;
311
+ /* harmony default export */ const R = E;
312
+ // CONCATENATED MODULE: ./src/DefinitionList/index.ts
313
+ module.exports = t;
314
+ /******/})();