@splunk/react-ui 4.37.0 → 4.39.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 (142) 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 +208 -219
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +50 -1
  11. package/Calendar.js +353 -414
  12. package/Card.js +183 -243
  13. package/CardLayout.js +86 -83
  14. package/Chip.js +104 -122
  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 +1107 -980
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +267 -305
  22. package/Concertina.js +406 -454
  23. package/ControlGroup.js +165 -194
  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 +92 -38
  39. package/Markdown.js +288 -347
  40. package/Menu.js +512 -530
  41. package/Message.js +173 -196
  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 +1600 -1923
  47. package/Number.js +159 -178
  48. package/Paginator.js +296 -335
  49. package/Paragraph.js +24 -32
  50. package/Popover.js +448 -441
  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 +130 -94
  57. package/Scroll.js +209 -244
  58. package/Search.js +375 -384
  59. package/Select.js +1076 -1354
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +192 -222
  62. package/SlidingPanels.js +238 -270
  63. package/SplitButton.js +222 -245
  64. package/StaticContent.js +68 -76
  65. package/StepBar.js +206 -205
  66. package/Switch.js +211 -236
  67. package/TabBar.js +222 -258
  68. package/TabLayout.js +114 -139
  69. package/Table.js +2017 -2180
  70. package/Text.js +401 -512
  71. package/TextArea.js +411 -441
  72. package/Tooltip.js +116 -132
  73. package/TransitionOpen.js +160 -178
  74. package/Tree.js +268 -287
  75. package/Typography.js +48 -52
  76. package/WaitSpinner.js +60 -68
  77. package/cypress/support/commands.ts +9 -0
  78. package/cypress/support/index.d.ts +6 -0
  79. package/cypress/tsconfig.cypress.json +1 -0
  80. package/docker-compose.yml +0 -1
  81. package/package.json +17 -17
  82. package/types/src/Button/Button.d.ts +20 -6
  83. package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
  84. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
  85. package/types/src/Color/Color.d.ts +5 -2
  86. package/types/src/Color/Palette.d.ts +6 -2
  87. package/types/src/ComboBox/Option.d.ts +1 -1
  88. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  89. package/types/src/Date/Date.d.ts +2 -3
  90. package/types/src/File/File.d.ts +2 -3
  91. package/types/src/File/Retry.d.ts +1 -2
  92. package/types/src/Link/Link.d.ts +3 -4
  93. package/types/src/Menu/Item.d.ts +24 -8
  94. package/types/src/Menu/Menu.d.ts +3 -3
  95. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  96. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  97. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  98. package/types/src/Multiselect/Option.d.ts +2 -0
  99. package/types/src/Number/Number.d.ts +3 -3
  100. package/types/src/Popover/Popover.d.ts +3 -4
  101. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  102. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  103. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  104. package/types/src/Search/Option.d.ts +16 -3
  105. package/types/src/Select/Option.d.ts +3 -1
  106. package/types/src/Select/OptionBase.d.ts +7 -5
  107. package/types/src/Select/Select.d.ts +2 -2
  108. package/types/src/Select/SelectAllOption.d.ts +4 -4
  109. package/types/src/Select/SelectBase.d.ts +0 -1
  110. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  111. package/types/src/Slider/Slider.d.ts +2 -3
  112. package/types/src/Slider/docs/examples/Error.d.ts +2 -0
  113. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  114. package/types/src/StepBar/Step.d.ts +1 -2
  115. package/types/src/TabBar/Tab.d.ts +1 -1
  116. package/types/src/TabBar/TabBar.d.ts +3 -1
  117. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  118. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  119. package/types/src/Table/Table.d.ts +0 -1
  120. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  121. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  122. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  123. package/types/src/Text/Text.d.ts +6 -4
  124. package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
  125. package/types/src/TextArea/TextArea.d.ts +2 -2
  126. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  127. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  128. package/useForceUpdate.js +30 -32
  129. package/useKeyPress.js +1 -1
  130. package/types/src/Button/docs/examples/Selected.d.ts +0 -2
  131. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  132. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  133. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  134. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  135. package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
  136. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  137. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  138. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  139. /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
  140. /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
  141. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  142. /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Clickable.js CHANGED
@@ -8,27 +8,27 @@
8
8
  /******/ /* webpack/runtime/compat get default export */
9
9
  /******/ (() => {
10
10
  /******/ // getDefaultExport function for compatibility with non-harmony modules
11
- /******/ e.n = t => {
12
- /******/ var n = t && t.__esModule ?
13
- /******/ () => t["default"]
14
- /******/ : () => t
11
+ /******/ e.n = n => {
12
+ /******/ var t = n && n.__esModule ?
13
+ /******/ () => n["default"]
14
+ /******/ : () => n
15
15
  /******/;
16
- e.d(n, {
17
- a: n
16
+ e.d(t, {
17
+ a: t
18
18
  });
19
- /******/ return n;
19
+ /******/ return t;
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 = (n, t) => {
27
+ /******/ for (var r in t) {
28
+ /******/ if (e.o(t, r) && !e.o(n, r)) {
29
+ /******/ Object.defineProperty(n, r, {
30
30
  enumerable: true,
31
- get: n[r]
31
+ get: t[r]
32
32
  });
33
33
  /******/ }
34
34
  /******/ }
@@ -37,7 +37,7 @@
37
37
  /******/
38
38
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
39
  /******/ (() => {
40
- /******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
40
+ /******/ e.o = (e, n) => Object.prototype.hasOwnProperty.call(e, n)
41
41
  /******/;
42
42
  })();
43
43
  /******/
@@ -56,20 +56,20 @@
56
56
  /******/ };
57
57
  /******/ })();
58
58
  /******/
59
- /************************************************************************/ var t = {};
59
+ /************************************************************************/ var n = {};
60
60
  // ESM COMPAT FLAG
61
- e.r(t);
61
+ e.r(n);
62
62
  // EXPORTS
63
- e.d(t, {
63
+ e.d(n, {
64
64
  NavigationContext: () => /* reexport */ h,
65
65
  NavigationProvider: () => /* reexport */ m,
66
- default: () => /* reexport */ F,
67
- isInternalLink: () => /* reexport */ z,
68
- isRootRelativeLink: () => /* reexport */ D
66
+ default: () => /* reexport */ J,
67
+ isInternalLink: () => /* reexport */ H,
68
+ isRootRelativeLink: () => /* reexport */ B
69
69
  });
70
70
  // CONCATENATED MODULE: external "react"
71
- const n = require("react");
72
- var r = e.n(n);
71
+ const t = require("react");
72
+ var r = e.n(t);
73
73
  // CONCATENATED MODULE: external "prop-types"
74
74
  const o = require("prop-types");
75
75
  var i = e.n(o);
@@ -80,9 +80,9 @@
80
80
  var u = e.n(a);
81
81
  // CONCATENATED MODULE: external "lodash/omit"
82
82
  const c = require("lodash/omit");
83
- var f = e.n(c);
83
+ var s = e.n(c);
84
84
  // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
85
- const s = require("@splunk/react-ui/Dropdown");
85
+ const f = require("@splunk/react-ui/Dropdown");
86
86
  // CONCATENATED MODULE: external "styled-components"
87
87
  const p = require("styled-components");
88
88
  var d = e.n(p);
@@ -107,19 +107,20 @@
107
107
  * Used to provide an override for the `onClick` for links for single page applications so that
108
108
  * internal links can navigate without a page reload.
109
109
  */ function m(e) {
110
- var t = e.children, o = e.onClick, i = e.onLinkClick, l = e.prefix, a = e.transformUrl;
110
+ var n = e.children, o = e.onClick, i = e.onLinkClick, l = e.prefix, a = e.transformUrl;
111
111
  // @docs-props-type NavigationProviderProps
112
- var u = (0, n.useMemo)((function() {
112
+ var u = (0, t.useMemo)((function() {
113
113
  var e;
114
114
  if (a != null) {
115
115
  if (false) {}
116
116
  e = a;
117
117
  } else if (l != null) {
118
118
  if (false) {}
119
- e = function e() {
120
- var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
121
- var n = arguments.length > 1 ? arguments[1] : undefined, r = n.isInternal, o = n.isRootRelative;
122
- return l != null && r && o ? "".concat(l).concat(t) : t;
119
+ // eslint-disable-next-line default-param-last
120
+ e = function e() {
121
+ var n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
122
+ var t = arguments.length > 1 ? arguments[1] : undefined, r = t.isInternal, o = t.isRootRelative;
123
+ return l != null && r && o ? "".concat(l).concat(n) : n;
123
124
  };
124
125
  }
125
126
  return {
@@ -131,7 +132,7 @@
131
132
 
132
133
  return r().createElement(h.Provider, {
133
134
  value: u
134
- }, t);
135
+ }, n);
135
136
  }
136
137
  m.propTypes = y;
137
138
  // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
@@ -141,14 +142,14 @@
141
142
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
142
143
  * @param current - The new value of the ref.
143
144
  */
144
- function k(e, t) {
145
+ function k(e, n) {
145
146
  if (e) {
146
147
  if (typeof e === "function") {
147
- e(t);
148
+ e(n);
148
149
  } else {
149
150
  // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
150
151
  // the intention here is to signal "we will take care of setting 'current', not you".
151
- e.current = t;
152
+ e.current = n;
152
153
  // eslint-disable-line no-param-reassign
153
154
  }
154
155
  }
@@ -156,162 +157,142 @@
156
157
  // CONCATENATED MODULE: ./src/Clickable/Clickable.tsx
157
158
  function g(e) {
158
159
  "@babel/helpers - typeof";
159
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
160
- g = function e(t) {
161
- return typeof t;
162
- };
163
- } else {
164
- g = function e(t) {
165
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
166
- };
167
- }
168
- return g(e);
160
+ return g = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
161
+ return typeof e;
162
+ } : function(e) {
163
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
164
+ }, g(e);
169
165
  }
170
166
  function C() {
171
- C = Object.assign || function(e) {
172
- for (var t = 1; t < arguments.length; t++) {
173
- var n = arguments[t];
174
- for (var r in n) {
175
- if (Object.prototype.hasOwnProperty.call(n, r)) {
176
- e[r] = n[r];
177
- }
167
+ return C = Object.assign ? Object.assign.bind() : function(e) {
168
+ for (var n = 1; n < arguments.length; n++) {
169
+ var t = arguments[n];
170
+ for (var r in t) {
171
+ ({}).hasOwnProperty.call(t, r) && (e[r] = t[r]);
178
172
  }
179
173
  }
180
174
  return e;
181
- };
182
- return C.apply(this, arguments);
175
+ }, C.apply(null, arguments);
183
176
  }
184
- function O(e, t) {
185
- if (e == null) return {};
186
- var n = w(e, t);
187
- var r, o;
177
+ function O(e, n) {
178
+ if (null == e) return {};
179
+ var t, r, o = w(e, n);
188
180
  if (Object.getOwnPropertySymbols) {
189
181
  var i = Object.getOwnPropertySymbols(e);
190
- for (o = 0; o < i.length; o++) {
191
- r = i[o];
192
- if (t.indexOf(r) >= 0) continue;
193
- if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
194
- n[r] = e[r];
182
+ for (r = 0; r < i.length; r++) {
183
+ t = i[r], n.includes(t) || {}.propertyIsEnumerable.call(e, t) && (o[t] = e[t]);
195
184
  }
196
185
  }
197
- return n;
186
+ return o;
198
187
  }
199
- function w(e, t) {
200
- if (e == null) return {};
201
- var n = {};
202
- var r = Object.keys(e);
203
- var o, i;
204
- for (i = 0; i < r.length; i++) {
205
- o = r[i];
206
- if (t.indexOf(o) >= 0) continue;
207
- n[o] = e[o];
188
+ function w(e, n) {
189
+ if (null == e) return {};
190
+ var t = {};
191
+ for (var r in e) {
192
+ if ({}.hasOwnProperty.call(e, r)) {
193
+ if (n.includes(r)) continue;
194
+ t[r] = e[r];
195
+ }
208
196
  }
209
- return n;
197
+ return t;
210
198
  }
211
- function x(e, t) {
212
- if (!(e instanceof t)) {
213
- throw new TypeError("Cannot call a class as a function");
214
- }
199
+ function j(e, n) {
200
+ if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function");
215
201
  }
216
- function j(e, t) {
217
- for (var n = 0; n < t.length; n++) {
218
- var r = t[n];
219
- r.enumerable = r.enumerable || false;
220
- r.configurable = true;
221
- if ("value" in r) r.writable = true;
222
- Object.defineProperty(e, r.key, r);
202
+ function P(e, n) {
203
+ for (var t = 0; t < n.length; t++) {
204
+ var r = n[t];
205
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
206
+ Object.defineProperty(e, M(r.key), r);
223
207
  }
224
208
  }
225
- function R(e, t, n) {
226
- if (t) j(e.prototype, t);
227
- if (n) j(e, n);
228
- return e;
209
+ function S(e, n, t) {
210
+ return n && P(e.prototype, n), t && P(e, t), Object.defineProperty(e, "prototype", {
211
+ writable: !1
212
+ }), e;
229
213
  }
230
- function P(e, t) {
231
- if (typeof t !== "function" && t !== null) {
232
- throw new TypeError("Super expression must either be null or a function");
233
- }
234
- e.prototype = Object.create(t && t.prototype, {
214
+ function x(e, n) {
215
+ if ("function" != typeof n && null !== n) throw new TypeError("Super expression must either be null or a function");
216
+ e.prototype = Object.create(n && n.prototype, {
235
217
  constructor: {
236
218
  value: e,
237
- writable: true,
238
- configurable: true
219
+ writable: !0,
220
+ configurable: !0
239
221
  }
240
- });
241
- if (t) S(e, t);
222
+ }), Object.defineProperty(e, "prototype", {
223
+ writable: !1
224
+ }), n && R(e, n);
242
225
  }
243
- function S(e, t) {
244
- S = Object.setPrototypeOf || function e(t, n) {
245
- t.__proto__ = n;
246
- return t;
247
- };
248
- return S(e, t);
226
+ function R(e, n) {
227
+ return R = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, n) {
228
+ return e.__proto__ = n, e;
229
+ }, R(e, n);
249
230
  }
250
- function _(e) {
251
- var t = L();
252
- return function n() {
253
- var r = N(e), o;
254
- if (t) {
255
- var i = N(this).constructor;
256
- o = Reflect.construct(r, arguments, i);
257
- } else {
258
- o = r.apply(this, arguments);
259
- }
260
- return T(this, o);
231
+ function T(e) {
232
+ var n = N();
233
+ return function() {
234
+ var t, r = E(e);
235
+ if (n) {
236
+ var o = E(this).constructor;
237
+ t = Reflect.construct(r, arguments, o);
238
+ } else t = r.apply(this, arguments);
239
+ return _(this, t);
261
240
  };
262
241
  }
263
- function T(e, t) {
264
- if (t && (g(t) === "object" || typeof t === "function")) {
265
- return t;
266
- }
242
+ function _(e, n) {
243
+ if (n && ("object" == g(n) || "function" == typeof n)) return n;
244
+ if (void 0 !== n) throw new TypeError("Derived constructors may only return object or undefined");
267
245
  return I(e);
268
246
  }
269
247
  function I(e) {
270
- if (e === void 0) {
271
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
272
- }
248
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
273
249
  return e;
274
250
  }
275
- function L() {
276
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
277
- if (Reflect.construct.sham) return false;
278
- if (typeof Proxy === "function") return true;
251
+ function N() {
279
252
  try {
280
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
281
- return true;
282
- } catch (e) {
283
- return false;
284
- }
253
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
254
+ } catch (e) {}
255
+ return (N = function n() {
256
+ return !!e;
257
+ })();
285
258
  }
286
- function N(e) {
287
- N = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
288
- return t.__proto__ || Object.getPrototypeOf(t);
289
- };
290
- return N(e);
259
+ function E(e) {
260
+ return E = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
261
+ return e.__proto__ || Object.getPrototypeOf(e);
262
+ }, E(e);
291
263
  }
292
- function M(e, t, n) {
293
- if (t in e) {
294
- Object.defineProperty(e, t, {
295
- value: n,
296
- enumerable: true,
297
- configurable: true,
298
- writable: true
299
- });
300
- } else {
301
- e[t] = n;
264
+ function L(e, n, t) {
265
+ return (n = M(n)) in e ? Object.defineProperty(e, n, {
266
+ value: t,
267
+ enumerable: !0,
268
+ configurable: !0,
269
+ writable: !0
270
+ }) : e[n] = t, e;
271
+ }
272
+ function M(e) {
273
+ var n = q(e, "string");
274
+ return "symbol" == g(n) ? n : n + "";
275
+ }
276
+ function q(e, n) {
277
+ if ("object" != g(e) || !e) return e;
278
+ var t = e[Symbol.toPrimitive];
279
+ if (void 0 !== t) {
280
+ var r = t.call(e, n || "default");
281
+ if ("object" != g(r)) return r;
282
+ throw new TypeError("@@toPrimitive must return a primitive value.");
302
283
  }
303
- return e;
284
+ return ("string" === n ? String : Number)(e);
304
285
  }
305
- var q = /^[a-z0-9]+:/;
306
- var E = /^\/\//;
307
- var U = /^\//;
308
- var D = function e(t) {
309
- return t != null && U.test(t);
286
+ var U = /^[a-z0-9]+:/;
287
+ var D = /^\/\//;
288
+ var z = /^\//;
289
+ var B = function e(n) {
290
+ return n != null && z.test(n);
310
291
  };
311
- var z = function e(t) {
312
- return t != null && !q.test(t) && !E.test(t);
292
+ var H = function e(n) {
293
+ return n != null && !U.test(n) && !D.test(n);
313
294
  };
314
- var H = {
295
+ var K = {
315
296
  /** @private */
316
297
  allowDisabledLink: i().bool,
317
298
  children: i().node,
@@ -322,34 +303,34 @@
322
303
  navigationLabel: i().string,
323
304
  to: i().string
324
305
  };
325
- var K = {
306
+ var A = {
326
307
  disabled: false,
327
308
  openInNewContext: false
328
309
  };
329
- function A(e) {
310
+ function F(e) {
330
311
  return !!e.to && !e.disabled;
331
312
  }
332
313
  /**
333
314
  * `Clickable` renders as a `button` element, or as an `a` element if the `to` prop is set
334
315
  * and the `disabled` prop is `false`. This is called link mode.
335
- */ var B = function(e) {
336
- P(n, e);
337
- var t = _(n);
316
+ */ var G = function(e) {
317
+ x(t, e);
318
+ var n = T(t);
338
319
  // @docs-props-type ClickablePropsBase
339
320
  // should use ClickablePropsBase but fails on refs - observe
340
- function n(e) {
321
+ function t(e) {
341
322
  var r;
342
- x(this, n);
343
- r = t.call(this, e);
344
- M(I(r), "el", null);
345
- M(I(r), "handleMount", (function(e) {
323
+ j(this, t);
324
+ r = n.call(this, e);
325
+ L(I(r), "el", null);
326
+ L(I(r), "handleMount", (function(e) {
346
327
  r.el = e;
347
328
  k(r.props.elementRef, e);
348
329
  }));
349
- M(I(r), "createHandleOnClick", (function() {
350
- var e = r.context, t = e.onClick, n = e.onLinkClick;
330
+ L(I(r), "createHandleOnClick", (function() {
331
+ var e = r.context, n = e.onClick, t = e.onLinkClick;
351
332
  return function(e) {
352
- if (A(r.props)) {
333
+ if (F(r.props)) {
353
334
  // when user command-click on mac or ctrl-click on other platforms, and
354
335
  // Tag is an <a>, let the click pass through, let the <a> to achieve user's
355
336
  // intent of 'open in new context'
@@ -363,8 +344,8 @@
363
344
  if (r.props.onClick) {
364
345
  r.props.onClick(e);
365
346
  }
366
- var o = r.props.onClick == null && t != null;
367
- if (A(r.props) && (o || n != null)) {
347
+ var o = r.props.onClick == null && n != null;
348
+ if (F(r.props) && (o || t != null)) {
368
349
  var i = r.props.navigationLabel;
369
350
  if (!i && u()(r.props.children)) {
370
351
  i = r.props.children;
@@ -376,40 +357,41 @@
376
357
  label: i
377
358
  };
378
359
  if (o) {
379
- t(e, l);
360
+ n(e, l);
380
361
  }
381
- n === null || n === void 0 ? void 0 : n(e, l);
362
+ t === null || t === void 0 ? void 0 : t(e, l);
382
363
  }
383
364
  };
384
365
  }));
385
- M(I(r), "getTransformedUrl", (function(e) {
386
- var t = r.context.transformUrl;
387
- return t != null ? t(e, {
388
- isInternal: z(e),
389
- isRootRelative: D(e)
366
+ L(I(r), "getTransformedUrl", (function(e) {
367
+ var n = r.context.transformUrl;
368
+ return n != null ? n(e, {
369
+ isInternal: H(e),
370
+ isRootRelative: B(e)
390
371
  }) : e;
391
372
  }));
392
373
  if (false) {}
393
374
  return r;
394
375
  }
395
- R(n, [ {
376
+ S(t, [ {
396
377
  key: "focus",
397
378
  /**
398
379
  * Place focus on the element.
399
380
  */
381
+ // eslint-disable-next-line react/no-unused-class-component-methods
400
382
  value: function e() {
401
- var t;
402
- (t = this.el) === null || t === void 0 ? void 0 : t.focus();
383
+ var n;
384
+ (n = this.el) === null || n === void 0 ? void 0 : n.focus();
403
385
  }
404
386
  }, {
405
387
  key: "render",
406
388
  value: function e() {
407
- var t = this.createHandleOnClick();
408
- // Only set the href attribute when enabled, and therefore using an <a> tag
409
- if (A(this.props)) {
410
- var n = this.props, o = n.children, i = n.openInNewContext, l = n.to, a = O(n, [ "children", "openInNewContext", "to" ]);
389
+ var n = this.createHandleOnClick();
390
+ // Only set the href attribute when enabled, and therefore using an <a> tag
391
+ if (F(this.props)) {
392
+ var t = this.props, o = t.children, i = t.openInNewContext, l = t.to, a = O(t, [ "children", "openInNewContext", "to" ]);
411
393
  var u = i ? "_blank" : undefined;
412
- var c = i && z(l) ? "noopener noreferrer" : undefined;
394
+ var c = i && H(l) ? "noopener noreferrer" : undefined;
413
395
 
414
396
  return r().createElement(v, C({
415
397
  "data-test": "clickable",
@@ -417,11 +399,11 @@
417
399
  href: this.getTransformedUrl(this.props.to),
418
400
  target: u,
419
401
  rel: c,
420
- onClick: t
421
- }, f()(a, "disabled", "elementRef", "onClick")), o);
402
+ onClick: n
403
+ }, s()(a, "disabled", "elementRef", "onClick")), o);
422
404
  }
423
405
  if (this.props.allowDisabledLink) {
424
- var s = this.props, p = s.children, d = O(s, [ "children" ]);
406
+ var f = this.props, p = f.children, d = O(f, [ "children" ]);
425
407
  if (this.props.disabled && this.props.to != null) {
426
408
 
427
409
  return r().createElement(v, C({
@@ -429,10 +411,10 @@
429
411
  ref: this.handleMount,
430
412
  role: "link",
431
413
  "aria-disabled": "true"
432
- }, f()(d, "href", "to", "elementRef", "onClick", "disabled")), p);
414
+ }, s()(d, "href", "to", "elementRef", "onClick", "disabled")), p);
433
415
  }
434
416
  }
435
- // button variant
417
+ // button variant
436
418
  var b = this.props, y = b.children, h = b.onClick, m = b.disabled, k = b.type, g = O(b, [ "children", "onClick", "disabled", "type" ]);
437
419
 
438
420
  return r().createElement(v, C({
@@ -442,17 +424,17 @@
442
424
  ref: this.handleMount,
443
425
  type: k || "button",
444
426
  disabled: m === true,
445
- onClick: h && !m ? t : undefined
446
- }, f()(g, "elementRef", "openInNewContext", "to")), y);
427
+ onClick: h && !m ? n : undefined
428
+ }, s()(g, "elementRef", "openInNewContext", "to")), y);
447
429
  }
448
430
  } ]);
449
- return n;
450
- }(n.Component);
451
- M(B, "contextType", h);
452
- M(B, "propTypes", H);
453
- M(B, "defaultProps", K);
454
- M(B, s.legacyRefMode, true);
455
- /* harmony default export */ const F = B;
431
+ return t;
432
+ }(t.Component);
433
+ L(G, "contextType", h);
434
+ L(G, "propTypes", K);
435
+ L(G, "defaultProps", A);
436
+ L(G, f.legacyRefMode, true);
437
+ /* harmony default export */ const J = G;
456
438
  // CONCATENATED MODULE: ./src/Clickable/index.ts
457
- module.exports = t;
439
+ module.exports = n;
458
440
  /******/})();