@splunk/react-ui 4.38.0 → 4.40.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 (172) hide show
  1. package/Accordion.js +131 -153
  2. package/Anchor.js +50 -58
  3. package/Animation.js +64 -59
  4. package/AnimationToggle.js +59 -61
  5. package/Box.js +59 -67
  6. package/Breadcrumbs.js +113 -127
  7. package/Button.js +151 -169
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +49 -0
  11. package/Calendar.js +353 -414
  12. package/Card.js +186 -244
  13. package/CardLayout.js +86 -83
  14. package/Chip.js +136 -146
  15. package/Clickable.js +180 -198
  16. package/CloseButton.js +52 -60
  17. package/Code.js +24 -31
  18. package/CollapsiblePanel.js +172 -202
  19. package/Color.js +371 -412
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +266 -303
  22. package/Concertina.js +406 -454
  23. package/ControlGroup.js +178 -210
  24. package/Date.js +116 -131
  25. package/DefinitionList.js +125 -149
  26. package/Divider.js +81 -79
  27. package/Dropdown.js +226 -237
  28. package/DualListbox.js +150 -186
  29. package/EventListener.js +4 -1
  30. package/File.js +1032 -955
  31. package/FormRows.js +281 -334
  32. package/Heading.js +27 -35
  33. package/Image.js +101 -116
  34. package/JSONTree.js +301 -344
  35. package/Layer.js +118 -126
  36. package/Link.js +141 -159
  37. package/List.js +61 -77
  38. package/MIGRATION.mdx +123 -38
  39. package/Markdown.js +288 -347
  40. package/Menu.js +506 -532
  41. package/Message.js +197 -207
  42. package/MessageBar.js +58 -66
  43. package/Modal.js +241 -290
  44. package/ModalLayer.js +130 -148
  45. package/Monogram.js +138 -138
  46. package/Multiselect.js +3137 -3433
  47. package/Number.js +164 -178
  48. package/Paginator.js +296 -335
  49. package/Paragraph.js +24 -32
  50. package/Popover.js +450 -442
  51. package/Progress.js +65 -75
  52. package/RadioBar.js +301 -303
  53. package/RadioList.js +77 -119
  54. package/Resize.js +105 -127
  55. package/ResultsMenu.js +373 -385
  56. package/ScreenReaderContent.js +50 -58
  57. package/Scroll.js +209 -244
  58. package/Search.js +379 -391
  59. package/Select.js +2085 -2345
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +132 -145
  62. package/SlidingPanels.js +238 -270
  63. package/SplitButton.d.ts +2 -0
  64. package/SplitButton.js +222 -245
  65. package/StaticContent.js +68 -76
  66. package/StepBar.js +206 -205
  67. package/Switch.js +176 -205
  68. package/TabBar.js +235 -268
  69. package/TabLayout.js +122 -141
  70. package/Table.js +2103 -2261
  71. package/Text.js +379 -493
  72. package/TextArea.js +411 -441
  73. package/Tooltip.js +116 -132
  74. package/TransitionOpen.js +160 -178
  75. package/Tree.js +268 -287
  76. package/Typography.js +48 -52
  77. package/WaitSpinner.js +61 -69
  78. package/cypress/support/commands.ts +9 -0
  79. package/cypress/support/index.d.ts +6 -0
  80. package/cypress/tsconfig.cypress.json +1 -0
  81. package/docker-compose.yml +0 -1
  82. package/package.json +15 -15
  83. package/types/src/Button/Button.d.ts +5 -1
  84. package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
  85. package/types/src/Card/Card.d.ts +1 -0
  86. package/types/src/Card/Footer.d.ts +1 -0
  87. package/types/src/Chip/Chip.d.ts +3 -6
  88. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
  89. package/types/src/Color/Color.d.ts +2 -2
  90. package/types/src/Color/Palette.d.ts +4 -2
  91. package/types/src/ComboBox/ComboBox.d.ts +1 -1
  92. package/types/src/ComboBox/Option.d.ts +1 -1
  93. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  94. package/types/src/Date/Date.d.ts +2 -2
  95. package/types/src/File/File.d.ts +2 -3
  96. package/types/src/File/Retry.d.ts +1 -2
  97. package/types/src/Menu/Item.d.ts +18 -5
  98. package/types/src/Menu/Menu.d.ts +3 -3
  99. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  100. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  101. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  102. package/types/src/Multiselect/Compact.d.ts +1 -1
  103. package/types/src/Multiselect/Multiselect.d.ts +1 -1
  104. package/types/src/Multiselect/Normal.d.ts +1 -1
  105. package/types/src/Multiselect/Option.d.ts +2 -0
  106. package/types/src/Number/Number.d.ts +3 -3
  107. package/types/src/Popover/Popover.d.ts +3 -4
  108. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  109. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  110. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  111. package/types/src/Search/Option.d.ts +9 -3
  112. package/types/src/Select/Option.d.ts +3 -1
  113. package/types/src/Select/OptionBase.d.ts +7 -5
  114. package/types/src/Select/Select.d.ts +4 -2
  115. package/types/src/Select/SelectAllOption.d.ts +4 -4
  116. package/types/src/Select/SelectBase.d.ts +104 -66
  117. package/types/src/Select/docs/examples/Appearance.d.ts +0 -2
  118. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  119. package/types/src/Slider/Slider.d.ts +2 -2
  120. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  121. package/types/src/StepBar/Step.d.ts +1 -2
  122. package/types/src/Switch/Switch.d.ts +0 -1
  123. package/types/src/TabBar/Tab.d.ts +1 -1
  124. package/types/src/TabBar/TabBar.d.ts +3 -1
  125. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  126. package/types/src/Table/Cell.d.ts +0 -2
  127. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  128. package/types/src/Table/HeadInner.d.ts +5 -1
  129. package/types/src/Table/Table.d.ts +0 -1
  130. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  131. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  132. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  133. package/types/src/Text/Text.d.ts +2 -2
  134. package/types/src/TextArea/TextArea.d.ts +2 -2
  135. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  136. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  137. package/types/src/WaitSpinner/WaitSpinner.d.ts +0 -1
  138. package/types/src/useControlled/index.d.ts +2 -0
  139. package/types/src/useControlled/useControlled.d.ts +21 -0
  140. package/types/src/useResizeObserver/index.d.ts +2 -0
  141. package/types/src/useResizeObserver/useResizeObserver.d.ts +12 -0
  142. package/useControlled.js +112 -0
  143. package/useForceUpdate.js +30 -32
  144. package/useKeyPress.d.ts +2 -0
  145. package/useKeyPress.js +1 -1
  146. package/useResizeObserver.d.ts +2 -0
  147. package/useResizeObserver.js +137 -0
  148. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  149. package/types/src/Chip/docs/examples/Basic.d.ts +0 -2
  150. package/types/src/Chip/docs/examples/prisma/Appearance.d.ts +0 -2
  151. package/types/src/Color/docs/examples/prisma/Controlled.d.ts +0 -2
  152. package/types/src/Color/docs/examples/prisma/ThemeVariables.d.ts +0 -1
  153. package/types/src/Color/docs/examples/prisma/Uncontrolled.d.ts +0 -2
  154. package/types/src/Dropdown/docs/examples/prisma/Basic.d.ts +0 -2
  155. package/types/src/Dropdown/docs/examples/prisma/BasicMenu.d.ts +0 -2
  156. package/types/src/Dropdown/docs/examples/prisma/ControlledDropdown.d.ts +0 -2
  157. package/types/src/Dropdown/docs/examples/prisma/Dialog.d.ts +0 -2
  158. package/types/src/Dropdown/docs/examples/prisma/OtherToggles.d.ts +0 -2
  159. package/types/src/Dropdown/docs/examples/prisma/ScrollingMenu.d.ts +0 -2
  160. package/types/src/File/docs/examples/prisma/Disabled.d.ts +0 -12
  161. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  162. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  163. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  164. package/types/src/Message/docs/examples/prisma/Title.d.ts +0 -2
  165. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  166. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  167. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  168. package/types/src/WaitSpinner/docs/examples/prisma/Basic.d.ts +0 -2
  169. /package/types/src/Color/docs/examples/{prisma/CustomizedPalette.d.ts → CustomizedPalette.d.ts} +0 -0
  170. /package/types/src/Color/docs/examples/{prisma/HideInput.d.ts → HideInput.d.ts} +0 -0
  171. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  172. /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Link.js CHANGED
@@ -9,26 +9,26 @@
9
9
  /******/ (() => {
10
10
  /******/ // getDefaultExport function for compatibility with non-harmony modules
11
11
  /******/ e.n = t => {
12
- /******/ var n = t && t.__esModule ?
12
+ /******/ var r = t && t.__esModule ?
13
13
  /******/ () => t["default"]
14
14
  /******/ : () => t
15
15
  /******/;
16
- e.d(n, {
17
- a: n
16
+ e.d(r, {
17
+ a: r
18
18
  });
19
- /******/ return n;
19
+ /******/ return r;
20
20
  /******/ };
21
21
  /******/ })();
22
22
  /******/
23
23
  /******/ /* webpack/runtime/define property getters */
24
24
  /******/ (() => {
25
25
  /******/ // define getter functions for harmony exports
26
- /******/ e.d = (t, n) => {
27
- /******/ for (var r in n) {
28
- /******/ if (e.o(n, r) && !e.o(t, r)) {
29
- /******/ Object.defineProperty(t, r, {
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
30
  enumerable: true,
31
- get: n[r]
31
+ get: r[n]
32
32
  });
33
33
  /******/ }
34
34
  /******/ }
@@ -61,11 +61,11 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- default: () => /* reexport */ J
64
+ default: () => /* reexport */ Q
65
65
  });
66
66
  // CONCATENATED MODULE: external "react"
67
- const n = require("react");
68
- var r = e.n(n);
67
+ const r = require("react");
68
+ var n = e.n(r);
69
69
  // CONCATENATED MODULE: external "prop-types"
70
70
  const o = require("prop-types");
71
71
  var i = e.n(o);
@@ -78,37 +78,37 @@
78
78
  const c = require("@splunk/ui-utils/i18n");
79
79
  // CONCATENATED MODULE: external "styled-components"
80
80
  const s = require("styled-components");
81
- var f = e.n(s);
81
+ var p = e.n(s);
82
82
  // CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRight"
83
- const p = require("@splunk/react-icons/ArrowSquareTopRight");
84
- var d = e.n(p);
83
+ const f = require("@splunk/react-icons/ArrowSquareTopRight");
84
+ var d = e.n(f);
85
85
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/External"
86
- const y = require("@splunk/react-icons/enterprise/External");
87
- var b = e.n(y);
86
+ const b = require("@splunk/react-icons/enterprise/External");
87
+ var y = e.n(b);
88
88
  // CONCATENATED MODULE: external "@splunk/themes"
89
89
  const v = require("@splunk/themes");
90
90
  // CONCATENATED MODULE: ./src/Link/icons/External.tsx
91
- var h = (0, s.css)([ "width:0.8em;height:0.8em;vertical-align:baseline;" ]);
92
- var m = f()(b()).withConfig({
91
+ var m = (0, s.css)([ "width:0.8em;height:0.8em;vertical-align:baseline;" ]);
92
+ var h = p()(y()).withConfig({
93
93
  displayName: "External__StyledEnterprise",
94
94
  componentId: "sc-13bdx45-0"
95
- })([ "", " margin:0 0 0 3px;" ], h);
96
- var g = f()(d()).withConfig({
95
+ })([ "", " margin:0 0 0 3px;" ], m);
96
+ var w = p()(d()).withConfig({
97
97
  displayName: "External__StyledPrisma",
98
98
  componentId: "sc-13bdx45-1"
99
- })([ "", " margin:0 0 0 4px;" ], h);
100
- function w() {
99
+ })([ "", " margin:0 0 0 4px;" ], m);
100
+ function g() {
101
101
  var e = (0, v.useSplunkTheme)(), t = e.isEnterprise;
102
- return t ? r().createElement(m, {
102
+ return t ? n().createElement(h, {
103
103
  screenReaderText: null
104
- }) : r().createElement(g, null);
104
+ }) : n().createElement(w, null);
105
105
  }
106
- /* harmony default export */ const O = w;
106
+ /* harmony default export */ const O = g;
107
107
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
108
- const x = require("@splunk/react-ui/Clickable");
109
- var S = e.n(x);
108
+ const j = require("@splunk/react-ui/Clickable");
109
+ var x = e.n(j);
110
110
  // CONCATENATED MODULE: ./src/Link/LinkStyles.ts
111
- var k = f()(S()).withConfig({
111
+ var S = p()(x()).withConfig({
112
112
  displayName: "LinkStyles__StyledClickable",
113
113
  componentId: "sc-1hhltcf-0"
114
114
  })([ "", ";color:", ";text-decoration:none;font-size:inherit;font-weight:inherit;line-height:inherit;border-radius:", ";&:not([disabled],[aria-disabled='true']){cursor:pointer;", ";&:focus{box-shadow:", ";outline:0;&:active{box-shadow:none;}}}&[disabled],&[aria-disabled='true']{color:", ";}" ], v.mixins.reset("inline"), (0,
@@ -123,159 +123,139 @@
123
123
  prisma: (0, s.css)([ "&:hover:not(:focus),&:active{text-decoration:underline;text-underline-position:under;}" ])
124
124
  }), v.variables.focusShadow, v.variables.contentColorDisabled);
125
125
  // CONCATENATED MODULE: ./src/Link/Link.tsx
126
- function j(e) {
126
+ function P(e) {
127
127
  "@babel/helpers - typeof";
128
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
129
- j = function e(t) {
130
- return typeof t;
131
- };
132
- } else {
133
- j = function e(t) {
134
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
135
- };
136
- }
137
- return j(e);
128
+ return P = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
129
+ return typeof e;
130
+ } : function(e) {
131
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
132
+ }, P(e);
138
133
  }
139
- function _() {
140
- _ = Object.assign || function(e) {
134
+ function k() {
135
+ return k = Object.assign ? Object.assign.bind() : function(e) {
141
136
  for (var t = 1; t < arguments.length; t++) {
142
- var n = arguments[t];
143
- for (var r in n) {
144
- if (Object.prototype.hasOwnProperty.call(n, r)) {
145
- e[r] = n[r];
146
- }
137
+ var r = arguments[t];
138
+ for (var n in r) {
139
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
147
140
  }
148
141
  }
149
142
  return e;
150
- };
151
- return _.apply(this, arguments);
143
+ }, k.apply(null, arguments);
152
144
  }
153
- function P(e, t) {
154
- if (e == null) return {};
155
- var n = C(e, t);
156
- var r, o;
145
+ function _(e, t) {
146
+ if (null == e) return {};
147
+ var r, n, o = E(e, t);
157
148
  if (Object.getOwnPropertySymbols) {
158
149
  var i = Object.getOwnPropertySymbols(e);
159
- for (o = 0; o < i.length; o++) {
160
- r = i[o];
161
- if (t.indexOf(r) >= 0) continue;
162
- if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
163
- n[r] = e[r];
150
+ for (n = 0; n < i.length; n++) {
151
+ r = i[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
164
152
  }
165
153
  }
166
- return n;
167
- }
168
- function C(e, t) {
169
- if (e == null) return {};
170
- var n = {};
171
- var r = Object.keys(e);
172
- var o, i;
173
- for (i = 0; i < r.length; i++) {
174
- o = r[i];
175
- if (t.indexOf(o) >= 0) continue;
176
- n[o] = e[o];
177
- }
178
- return n;
154
+ return o;
179
155
  }
180
156
  function E(e, t) {
181
- if (!(e instanceof t)) {
182
- throw new TypeError("Cannot call a class as a function");
183
- }
184
- }
185
- function q(e, t) {
186
- for (var n = 0; n < t.length; n++) {
187
- var r = t[n];
188
- r.enumerable = r.enumerable || false;
189
- r.configurable = true;
190
- if ("value" in r) r.writable = true;
191
- Object.defineProperty(e, r.key, r);
157
+ if (null == e) return {};
158
+ var r = {};
159
+ for (var n in e) {
160
+ if ({}.hasOwnProperty.call(e, n)) {
161
+ if (t.includes(n)) continue;
162
+ r[n] = e[n];
163
+ }
192
164
  }
165
+ return r;
193
166
  }
194
- function R(e, t, n) {
195
- if (t) q(e.prototype, t);
196
- if (n) q(e, n);
197
- return e;
167
+ function C(e, t) {
168
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
198
169
  }
199
170
  function T(e, t) {
200
- if (typeof t !== "function" && t !== null) {
201
- throw new TypeError("Super expression must either be null or a function");
171
+ for (var r = 0; r < t.length; r++) {
172
+ var n = t[r];
173
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
174
+ Object.defineProperty(e, z(n.key), n);
202
175
  }
176
+ }
177
+ function q(e, t, r) {
178
+ return t && T(e.prototype, t), r && T(e, r), Object.defineProperty(e, "prototype", {
179
+ writable: !1
180
+ }), e;
181
+ }
182
+ function I(e, t) {
183
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
203
184
  e.prototype = Object.create(t && t.prototype, {
204
185
  constructor: {
205
186
  value: e,
206
- writable: true,
207
- configurable: true
187
+ writable: !0,
188
+ configurable: !0
208
189
  }
209
- });
210
- if (t) I(e, t);
190
+ }), Object.defineProperty(e, "prototype", {
191
+ writable: !1
192
+ }), t && N(e, t);
211
193
  }
212
- function I(e, t) {
213
- I = Object.setPrototypeOf || function e(t, n) {
214
- t.__proto__ = n;
215
- return t;
216
- };
217
- return I(e, t);
194
+ function N(e, t) {
195
+ return N = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
196
+ return e.__proto__ = t, e;
197
+ }, N(e, t);
218
198
  }
219
- function N(e) {
199
+ function R(e) {
220
200
  var t = A();
221
- return function n() {
222
- var r = L(e), o;
201
+ return function() {
202
+ var r, n = B(e);
223
203
  if (t) {
224
- var i = L(this).constructor;
225
- o = Reflect.construct(r, arguments, i);
226
- } else {
227
- o = r.apply(this, arguments);
228
- }
229
- return M(this, o);
204
+ var o = B(this).constructor;
205
+ r = Reflect.construct(n, arguments, o);
206
+ } else r = n.apply(this, arguments);
207
+ return M(this, r);
230
208
  };
231
209
  }
232
210
  function M(e, t) {
233
- if (t && (j(t) === "object" || typeof t === "function")) {
234
- return t;
235
- }
211
+ if (t && ("object" == P(t) || "function" == typeof t)) return t;
212
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
236
213
  return D(e);
237
214
  }
238
215
  function D(e) {
239
- if (e === void 0) {
240
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
241
- }
216
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
242
217
  return e;
243
218
  }
244
219
  function A() {
245
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
246
- if (Reflect.construct.sham) return false;
247
- if (typeof Proxy === "function") return true;
248
220
  try {
249
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
250
- return true;
251
- } catch (e) {
252
- return false;
253
- }
221
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
222
+ } catch (e) {}
223
+ return (A = function t() {
224
+ return !!e;
225
+ })();
254
226
  }
255
- function L(e) {
256
- L = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
257
- return t.__proto__ || Object.getPrototypeOf(t);
258
- };
259
- return L(e);
227
+ function B(e) {
228
+ return B = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
229
+ return e.__proto__ || Object.getPrototypeOf(e);
230
+ }, B(e);
260
231
  }
261
- function z(e, t, n) {
262
- if (t in e) {
263
- Object.defineProperty(e, t, {
264
- value: n,
265
- enumerable: true,
266
- configurable: true,
267
- writable: true
268
- });
269
- } else {
270
- e[t] = n;
232
+ function L(e, t, r) {
233
+ return (t = z(t)) in e ? Object.defineProperty(e, t, {
234
+ value: r,
235
+ enumerable: !0,
236
+ configurable: !0,
237
+ writable: !0
238
+ }) : e[t] = r, e;
239
+ }
240
+ function z(e) {
241
+ var t = F(e, "string");
242
+ return "symbol" == P(t) ? t : t + "";
243
+ }
244
+ function F(e, t) {
245
+ if ("object" != P(e) || !e) return e;
246
+ var r = e[Symbol.toPrimitive];
247
+ if (void 0 !== r) {
248
+ var n = r.call(e, t || "default");
249
+ if ("object" != P(n)) return n;
250
+ throw new TypeError("@@toPrimitive must return a primitive value.");
271
251
  }
272
- return e;
252
+ return ("string" === t ? String : Number)(e);
273
253
  }
274
- var F = {
254
+ var G = {
275
255
  disabled: false,
276
256
  openInNewContext: false
277
257
  };
278
- var B = {
258
+ var H = {
279
259
  /** @private */
280
260
  allowDisabledLink: i().bool,
281
261
  children: i().node,
@@ -284,31 +264,33 @@
284
264
  openInNewContext: i().oneOfType([ i().bool, i().string ]),
285
265
  to: i().string
286
266
  };
287
- var G = (0, c._)("(Opens new window)");
267
+ var J = (0, c._)("(Opens new window)");
288
268
  /**
289
269
  * `Link` is a simple method for configuring `Button` for inline links. For more complex behaviors,
290
270
  * see the `Button` documentation.
291
- */ var H = function(e) {
292
- T(n, e);
293
- var t = N(n);
294
- function n() {
271
+ */ var K = function(e) {
272
+ I(r, e);
273
+ var t = R(r);
274
+ function r() {
295
275
  var e;
296
- E(this, n);
297
- for (var r = arguments.length, o = new Array(r), i = 0; i < r; i++) {
276
+ C(this, r);
277
+ for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) {
298
278
  o[i] = arguments[i];
299
279
  }
300
280
  e = t.call.apply(t, [ this ].concat(o));
301
- z(D(e), "component", null);
302
- z(D(e), "handleMount", (function(t) {
281
+ L(D(e), "component", null);
282
+ L(D(e), "handleMount", (function(t) {
303
283
  e.component = t;
304
284
  }));
305
285
  return e;
306
286
  }
307
- R(n, [ {
287
+ // @docs-props-type LinkPropsBase
288
+ q(r, [ {
308
289
  key: "focus",
309
290
  /**
310
291
  * Place focus on the link.
311
292
  */
293
+ // eslint-disable-next-line react/no-unused-class-component-methods
312
294
  value: function e() {
313
295
  var t;
314
296
  (t = this.component) === null || t === void 0 ? void 0 : t.focus();
@@ -316,27 +298,27 @@
316
298
  }, {
317
299
  key: "render",
318
300
  value: function e() {
319
- var t = this.props, n = t.children, o = t.openInNewContext, i = P(t, [ "children", "openInNewContext" ]);
301
+ var t = this.props, r = t.children, o = t.openInNewContext, i = _(t, [ "children", "openInNewContext" ]);
320
302
  var a = false;
321
303
  var u;
322
304
  if (o) {
323
305
  a = true;
324
- u = typeof o === "string" ? o : G;
306
+ u = typeof o === "string" ? o : J;
325
307
  }
326
308
 
327
- return r().createElement(k, _({
309
+ return n().createElement(S, k({
328
310
  "data-test": "link",
329
311
  ref: this.handleMount,
330
312
  openInNewContext: a
331
- }, i), n, o && r().createElement(r().Fragment, null, r().createElement(O, null), r().createElement(l(), null, u)));
313
+ }, i), r, o && n().createElement(n().Fragment, null, n().createElement(O, null), n().createElement(l(), null, u)));
332
314
  }
333
315
  } ]);
334
- return n;
335
- }(n.Component);
336
- z(H, "propTypes", B);
337
- z(H, "defaultProps", F);
338
- z(H, u.legacyRefMode, true);
339
- /* harmony default export */ const J = H;
316
+ return r;
317
+ }(r.Component);
318
+ L(K, "propTypes", H);
319
+ L(K, "defaultProps", G);
320
+ L(K, u.legacyRefMode, true);
321
+ /* harmony default export */ const Q = K;
340
322
  // CONCATENATED MODULE: ./src/Link/index.ts
341
323
  module.exports = t;
342
324
  /******/})();
package/List.js CHANGED
@@ -62,154 +62,138 @@
62
62
  // EXPORTS
63
63
  e.d(t, {
64
64
  Item: () => /* reexport */ v,
65
- default: () => /* reexport */ S
65
+ default: () => /* reexport */ j
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
68
68
  const r = require("react");
69
69
  var n = e.n(r);
70
70
  // CONCATENATED MODULE: external "prop-types"
71
- const o = require("prop-types");
72
- var i = e.n(o);
71
+ const l = require("prop-types");
72
+ var o = e.n(l);
73
73
  // CONCATENATED MODULE: external "styled-components"
74
- const l = require("styled-components");
75
- var a = e.n(l);
74
+ const i = require("styled-components");
75
+ var a = e.n(i);
76
76
  // CONCATENATED MODULE: external "@splunk/themes"
77
- const c = require("@splunk/themes");
77
+ const s = require("@splunk/themes");
78
78
  // CONCATENATED MODULE: ./src/List/ListStyles.ts
79
- var f = a().ul.withConfig({
79
+ var c = a().ul.withConfig({
80
80
  displayName: "ListStyles__StyledUl",
81
81
  componentId: "sc-1yyh8l9-0"
82
- })([ "", ";", ";list-style-type:", ";padding-left:40px;margin-bottom:1.3em;margin-top:1em;" ], c.mixins.reset("block"), c.mixins.typography("body"), (function(e) {
82
+ })([ "", ";", ";counter-reset:list-item;list-style-type:", ";padding-left:40px;margin-bottom:1.3em;margin-top:1em;" ], s.mixins.reset("block"), s.mixins.typography("body"), (function(e) {
83
83
  var t = e.$listStyleType;
84
84
  return t;
85
85
  }));
86
- var p = a().li.withConfig({
86
+ var u = a().li.withConfig({
87
87
  displayName: "ListStyles__StyledItem",
88
88
  componentId: "sc-1yyh8l9-1"
89
- })([ "", ";list-style-type:inherit;" ], c.mixins.reset("list-item"));
89
+ })([ "", ";list-style-type:inherit;" ], s.mixins.reset("list-item"));
90
90
  // CONCATENATED MODULE: ./src/List/Item.tsx
91
- function s() {
92
- s = Object.assign || function(e) {
91
+ function f() {
92
+ return f = Object.assign ? Object.assign.bind() : function(e) {
93
93
  for (var t = 1; t < arguments.length; t++) {
94
94
  var r = arguments[t];
95
95
  for (var n in r) {
96
- if (Object.prototype.hasOwnProperty.call(r, n)) {
97
- e[n] = r[n];
98
- }
96
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
99
97
  }
100
98
  }
101
99
  return e;
102
- };
103
- return s.apply(this, arguments);
100
+ }, f.apply(null, arguments);
104
101
  }
105
- function u(e, t) {
106
- if (e == null) return {};
107
- var r = y(e, t);
108
- var n, o;
102
+ function p(e, t) {
103
+ if (null == e) return {};
104
+ var r, n, l = y(e, t);
109
105
  if (Object.getOwnPropertySymbols) {
110
- var i = Object.getOwnPropertySymbols(e);
111
- for (o = 0; o < i.length; o++) {
112
- n = i[o];
113
- if (t.indexOf(n) >= 0) continue;
114
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
115
- r[n] = e[n];
106
+ var o = Object.getOwnPropertySymbols(e);
107
+ for (n = 0; n < o.length; n++) {
108
+ r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (l[r] = e[r]);
116
109
  }
117
110
  }
118
- return r;
111
+ return l;
119
112
  }
120
113
  function y(e, t) {
121
- if (e == null) return {};
114
+ if (null == e) return {};
122
115
  var r = {};
123
- var n = Object.keys(e);
124
- var o, i;
125
- for (i = 0; i < n.length; i++) {
126
- o = n[i];
127
- if (t.indexOf(o) >= 0) continue;
128
- r[o] = e[o];
116
+ for (var n in e) {
117
+ if ({}.hasOwnProperty.call(e, n)) {
118
+ if (t.includes(n)) continue;
119
+ r[n] = e[n];
120
+ }
129
121
  }
130
122
  return r;
131
123
  }
132
124
  var d = {
133
- children: i().node,
134
- elementRef: i().oneOfType([ i().func, i().object ])
125
+ children: o().node,
126
+ elementRef: o().oneOfType([ o().func, o().object ])
135
127
  };
136
128
  /**
137
129
  * A container for items of a `List`.
138
130
  */ function m(e) {
139
- var t = e.children, r = e.elementRef, o = u(e, [ "children", "elementRef" ]);
131
+ var t = e.children, r = e.elementRef, l = p(e, [ "children", "elementRef" ]);
140
132
  // @docs-props-type ItemPropsBase
141
133
 
142
- return n().createElement(p, s({
134
+ return n().createElement(u, f({
143
135
  "data-test": "item",
144
136
  ref: r
145
- }, o), t);
137
+ }, l), t);
146
138
  }
147
139
  m.propTypes = d;
148
140
  /* harmony default export */ const v = m;
149
141
  // CONCATENATED MODULE: ./src/List/List.tsx
150
142
  function b() {
151
- b = Object.assign || function(e) {
143
+ return b = Object.assign ? Object.assign.bind() : function(e) {
152
144
  for (var t = 1; t < arguments.length; t++) {
153
145
  var r = arguments[t];
154
146
  for (var n in r) {
155
- if (Object.prototype.hasOwnProperty.call(r, n)) {
156
- e[n] = r[n];
157
- }
147
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
158
148
  }
159
149
  }
160
150
  return e;
161
- };
162
- return b.apply(this, arguments);
151
+ }, b.apply(null, arguments);
163
152
  }
164
- function O(e, t) {
165
- if (e == null) return {};
166
- var r = h(e, t);
167
- var n, o;
153
+ function h(e, t) {
154
+ if (null == e) return {};
155
+ var r, n, l = O(e, t);
168
156
  if (Object.getOwnPropertySymbols) {
169
- var i = Object.getOwnPropertySymbols(e);
170
- for (o = 0; o < i.length; o++) {
171
- n = i[o];
172
- if (t.indexOf(n) >= 0) continue;
173
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
174
- r[n] = e[n];
157
+ var o = Object.getOwnPropertySymbols(e);
158
+ for (n = 0; n < o.length; n++) {
159
+ r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (l[r] = e[r]);
175
160
  }
176
161
  }
177
- return r;
162
+ return l;
178
163
  }
179
- function h(e, t) {
180
- if (e == null) return {};
164
+ function O(e, t) {
165
+ if (null == e) return {};
181
166
  var r = {};
182
- var n = Object.keys(e);
183
- var o, i;
184
- for (i = 0; i < n.length; i++) {
185
- o = n[i];
186
- if (t.indexOf(o) >= 0) continue;
187
- r[o] = e[o];
167
+ for (var n in e) {
168
+ if ({}.hasOwnProperty.call(e, n)) {
169
+ if (t.includes(n)) continue;
170
+ r[n] = e[n];
171
+ }
188
172
  }
189
173
  return r;
190
174
  }
191
175
  var g = {
192
- children: i().node,
193
- elementRef: i().oneOfType([ i().func, i().object ]),
194
- ordered: i().bool,
195
- type: i().oneOf([ "disc", "decimal", "lower-alpha", "upper-alpha" ])
176
+ children: o().node,
177
+ elementRef: o().oneOfType([ o().func, o().object ]),
178
+ ordered: o().bool,
179
+ type: o().oneOf([ "disc", "decimal", "lower-alpha", "upper-alpha" ])
196
180
  };
197
- function j(e) {
198
- var t = e.children, r = e.elementRef, o = e.type, i = o === void 0 ? "disc" : o, l = e.ordered, a = O(e, [ "children", "elementRef", "type", "ordered" ]);
181
+ function S(e) {
182
+ var t = e.children, r = e.elementRef, l = e.type, o = l === void 0 ? "disc" : l, i = e.ordered, a = h(e, [ "children", "elementRef", "type", "ordered" ]);
199
183
  // @docs-props-type ListPropsBase
200
184
  // Default prop value is "disc", we cannot determine if user or defaultProps is setting the value
201
185
  if (false) {}
202
186
 
203
- return n().createElement(f, b({
204
- as: l || i !== "disc" ? "ol" : "ul",
187
+ return n().createElement(c, b({
188
+ as: i || o !== "disc" ? "ol" : "ul",
205
189
  "data-test": "list",
206
190
  ref: r,
207
- $listStyleType: l ? "decimal" : i
191
+ $listStyleType: i ? "decimal" : o
208
192
  }, a), t);
209
193
  }
210
- j.propTypes = g;
211
- j.Item = v;
212
- /* harmony default export */ const S = j;
194
+ S.propTypes = g;
195
+ S.Item = v;
196
+ /* harmony default export */ const j = S;
213
197
  // CONCATENATED MODULE: ./src/List/index.ts
214
198
  module.exports = t;
215
199
  /******/})();