@splunk/react-ui 4.32.0 → 4.34.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 (80) hide show
  1. package/Button.js +59 -65
  2. package/ButtonGroup.js +20 -23
  3. package/ButtonSimple.js +374 -339
  4. package/CHANGELOG.md +54 -0
  5. package/Card.js +56 -44
  6. package/Chip.js +2 -6
  7. package/Clickable.js +21 -19
  8. package/CollapsiblePanel.js +281 -264
  9. package/Color.js +88 -86
  10. package/Concertina.js +7 -7
  11. package/ControlGroup.js +18 -18
  12. package/DualListbox.js +8 -11
  13. package/File.js +25 -30
  14. package/FormRows.js +232 -210
  15. package/Image.js +13 -13
  16. package/JSONTree.js +22 -22
  17. package/MIGRATION.mdx +99 -0
  18. package/Markdown.js +12 -12
  19. package/Menu.js +505 -719
  20. package/Message.js +205 -204
  21. package/MessageBar.js +104 -104
  22. package/Modal.js +158 -133
  23. package/Multiselect.js +81 -70
  24. package/Paginator.js +8 -8
  25. package/Popover.js +53 -54
  26. package/Progress.js +45 -46
  27. package/RadioBar.js +117 -115
  28. package/RadioList.js +8 -5
  29. package/ResultsMenu.js +256 -261
  30. package/Search.js +21 -24
  31. package/Select.js +265 -246
  32. package/Slider.js +9 -9
  33. package/SplitButton.js +1 -4
  34. package/StaticContent.js +1 -1
  35. package/StepBar.js +1 -1
  36. package/Switch.js +169 -171
  37. package/TabBar.js +14 -6
  38. package/Table.js +65 -67
  39. package/Text.js +30 -37
  40. package/TextArea.js +162 -163
  41. package/Tooltip.js +1 -1
  42. package/package.json +9 -9
  43. package/stubs-splunkui.d.ts +11 -0
  44. package/types/src/Button/Button.d.ts +4 -4
  45. package/types/src/ButtonSimple/ButtonSimple.d.ts +8 -6
  46. package/types/src/ButtonSimple/mixin.d.ts +2 -2
  47. package/types/src/Card/Card.d.ts +3 -1
  48. package/types/src/Card/Header.d.ts +22 -3
  49. package/types/src/Clickable/Clickable.d.ts +3 -2
  50. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -0
  51. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -3
  52. package/types/src/Date/Date.d.ts +2 -2
  53. package/types/src/Menu/Item.d.ts +3 -1
  54. package/types/src/Menu/Menu.d.ts +16 -21
  55. package/types/src/Menu/MenuContext.d.ts +3 -2
  56. package/types/src/Number/Number.d.ts +2 -2
  57. package/types/src/RadioBar/Option.d.ts +4 -1
  58. package/types/src/RadioBar/RadioBar.d.ts +6 -4
  59. package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -0
  60. package/types/src/ResultsMenu/ResultsMenu.d.ts +5 -22
  61. package/types/src/Select/Select.d.ts +8 -4
  62. package/types/src/Select/SelectBase.d.ts +8 -4
  63. package/types/src/Slider/Slider.d.ts +2 -2
  64. package/types/src/Table/Body.d.ts +0 -4
  65. package/types/src/Text/docs/examples/Basic.d.ts +1 -9
  66. package/types/src/Text/docs/examples/Error.d.ts +2 -10
  67. package/types/src/Text/docs/examples/Inline.d.ts +1 -9
  68. package/types/src/Text/docs/examples/Multiline.d.ts +1 -9
  69. package/types/src/Text/docs/examples/Password.d.ts +1 -9
  70. package/types/src/Text/docs/examples/Search.d.ts +1 -9
  71. package/useRovingFocus.js +26 -40
  72. package/types/src/Button/docs/examples/prisma/Basic.d.ts +0 -2
  73. package/types/src/Button/docs/examples/prisma/Block.d.ts +0 -2
  74. package/types/src/Button/docs/examples/prisma/Disabled.d.ts +0 -2
  75. package/types/src/Button/docs/examples/prisma/Icons.d.ts +0 -2
  76. package/types/src/Button/docs/examples/prisma/Menus.d.ts +0 -2
  77. package/types/src/Button/docs/examples/prisma/To.d.ts +0 -2
  78. package/types/src/Button/docs/examples/prisma/Truncated.d.ts +0 -2
  79. package/types/src/Select/docs/examples/prisma/Appearance.d.ts +0 -14
  80. /package/types/src/{Button/docs/examples/prisma → Clickable/docs/examples}/Dimmed.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,60 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 4.34.0 - August 7, 2024
5
+ ----------
6
+ New Features:
7
+ * `RadioBar` supports new prop `role` for either `radiogroup` (default) or `menubar` (SUI-6335).
8
+ * `CollapsiblePanel` has a new `actions` prop for rendering the toggle button and interactive elements separate from `title`, reserving the `title` prop for text only (SUI-5999).
9
+ * If using the new `actions` prop, the toggle button supports `aria-labelledby` with the title and the panel body supports `role='region'`.
10
+ * `Select` now supports `appearance="subtle"` with the same visual appearance as the Enterprise `"pill"` and Prisma `"secondary"` appearances (SUI-6440).
11
+ * `Card` has a new `actions` prop for rendering card actions. This should be used to add unambiguous labels to the secondary actions, see the migration guide for details (SUI-5881).
12
+ * `Card` has a new `tag` prop for overriding the default HTML tag (SUI-5881).
13
+
14
+ Bug Fixes:
15
+ * `CollapsiblePanel` now correctly announces its expanded state to a11y tools in Firefox (SUI-5999).
16
+ * `RadioBar` no longer warns about the deprecated `appearance` prop when the default value is used.
17
+ * `Button` now shows focus styling when hovered (SUI-6357).
18
+ * `Button`s with an `appearance` of `primary` or `destructive` no longer have incorrect background colors on focus when `disabled="dimmed"` (SUI-6357).
19
+ * `JSONTree's` active border has been removed to avoid a layout shift (SUI-6324).
20
+ * `CollapsiblePanel`'s focus shadow has been updated to improve contrast (SUI-6340).
21
+ * `Search`'s `role` has been changed from `"textbox"` to `"searchbox"`.
22
+ * `Search`'s default labels have been removed to avoid redundant screen reader output (SUI-6332).
23
+ * `CollapsiblePanel`'s Enterprise dark theme toggle button is now visible when `disabled` (SUI-6425).
24
+ * `Popover` no longer moves focus to the container when no focusable children exist to ensure the focus indicator remains visible (SUI-6446).
25
+ * `Card` uses the `article` tag instead of `div` by default (SUI-5881).
26
+ * `Menu` no longer takes focus when all `Menu.Item` children are disabled (SUI-6268).
27
+ * `Color`'s textbox swatch in the popover palette is now focusable in Enterprise themes (SUI-6401).
28
+ * `Menu`s last `Item` no longer has an incorrect border radius on hover when a `footerMessage` is set (SUI-6450).
29
+
30
+ Deprecations:
31
+ * `CollapsiblePanel`'s `titleWithActions` prop has been deprecated and will be removed in the next major version. Use the new `actions` prop instead to render the toggle button and interactive elements separate from `title` (SUI-5999).
32
+ * `Select`'s `"flat"`, `"pill"`, and `"toggle"` values of the `appearance` prop have been deprecated and will be removed in the next major version. See the migration guide for details (SUI-6440).
33
+
34
+ 4.33.0 - July 8, 2024
35
+ ----------
36
+ New Features:
37
+ * `Clickable` now supports the `"dimmed"` value for the `disabled` prop (SUI-5819).
38
+ * If set to `"dimmed"`, the component does not respond to mouse events and `aria-disabled` is set to `true`.
39
+ * `Button` now supports `appearance="subtle"` with a visual appearance similar to the Enterprise `"pill"` and Prisma `"secondary"` appearances (SUI-6051).
40
+ * `Button` now sets the `aria-pressed` attribute appropriately when the `selected` prop is provided (SUI-2791).
41
+ * `Select` has a new `toggleContent` prop that specifies whether the children (`"optionChildren"`) or label (`"optionLabel"`) of the matched `Option` are rendered in the toggle button (SUI-6316).
42
+ * `Menu.Item` now supports `descriptionPosition="right"` for Prisma themes (SUI-5664).
43
+
44
+ Bug Fixes:
45
+ * `Modal.Header` uses semantic HTML elements for the `title` and `subtitle` props to improve accessibility.
46
+ * `TabBar.Tab` has a correctly sized active indicator when vertical and the `to` prop is passed (SUI-6205).
47
+ * `Button`'s text is now centered correctly when combining the `icon` and `to` props (SUI-6331).
48
+ * `Button`'s external icon now has the same size as an icon rendered by the `icon` prop (SUI-6255).
49
+ * `Select` now constructs `aria-label` out of the `Option`-s `label`s rather than `children` (SUI-6316).
50
+ * `Search` now allows provided `aria-label` value to override the default `aria-label` value (SUI-6332).
51
+
52
+ Deprecations:
53
+ * `Button`'s `"flat"`, `"pill"`, and `"toggle"` values of the `appearance` prop have been deprecated and will be removed in the next major version (SUI-6501).
54
+
55
+ Docs:
56
+ * Fixed an issue where `SidePanel`'s Test Hooks content was not shown (SUI-6322).
57
+
4
58
  4.32.0 - June 4, 2024
5
59
  ----------
6
60
  New Features:
package/Card.js CHANGED
@@ -87,7 +87,7 @@
87
87
  })([ "flex:1 1 auto;overflow:auto;height:100%;", ";", "" ], (function(e) {
88
88
  var r = e.$inset;
89
89
  return r ? (0, a.css)([ "", "" ], (0, u.pick)({
90
- enterprise: (0, a.css)([ "padding:", ";&:not(:first-child){padding-top:0;}" ], u.variables.spacing),
90
+ enterprise: (0, a.css)([ "padding:", ";&:not(:first-child){padding-top:0;}" ], u.variables.spacingLarge),
91
91
  prisma: {
92
92
  comfortable: (0, a.css)([ "padding:12px 24px;&:first-child{padding-top:28px;}&:last-child{padding-bottom:28px;}" ]),
93
93
  compact: (0, a.css)([ "padding:8px 24px;&:first-child{padding-top:20px;}&:last-child{padding-bottom:20px;}" ])
@@ -164,7 +164,7 @@
164
164
  displayName: "FooterStyles__StyledBox",
165
165
  componentId: "sc-1yu3r4s-0"
166
166
  })([ "", ";text-align:right;color:", ";", "" ], (0, u.pick)({
167
- enterprise: (0, a.css)([ "padding:", ";&:first-child{border-top:none;}" ], u.variables.spacing),
167
+ enterprise: (0, a.css)([ "padding:", ";&:first-child{border-top:none;}" ], u.variables.spacingLarge),
168
168
  prisma: {
169
169
  comfortable: (0, a.css)([ "padding:24px;" ]),
170
170
  compact: "padding: 18px 24px"
@@ -242,19 +242,19 @@
242
242
  var P = e.n(C);
243
243
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/MoreVertical"
244
244
  const _ = require("@splunk/react-icons/enterprise/MoreVertical");
245
- var T = e.n(_);
245
+ var E = e.n(_);
246
246
  // CONCATENATED MODULE: external "@splunk/react-ui/Anchor"
247
- const E = require("@splunk/react-ui/Anchor");
248
- var B = e.n(E);
247
+ const T = require("@splunk/react-ui/Anchor");
248
+ var B = e.n(T);
249
249
  // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
250
250
  const R = require("@splunk/react-ui/Dropdown");
251
251
  var I = e.n(R);
252
252
  // CONCATENATED MODULE: external "@splunk/react-ui/Tooltip"
253
253
  const q = require("@splunk/react-ui/Tooltip");
254
- var H = e.n(q);
254
+ var N = e.n(q);
255
255
  // CONCATENATED MODULE: external "@splunk/react-ui/Button"
256
- const N = require("@splunk/react-ui/Button");
257
- var $ = e.n(N);
256
+ const H = require("@splunk/react-ui/Button");
257
+ var $ = e.n(H);
258
258
  // CONCATENATED MODULE: ./src/Card/HeaderStyles.ts
259
259
  var A = l().div.withConfig({
260
260
  displayName: "HeaderStyles__StyledTitle",
@@ -282,10 +282,7 @@
282
282
  A,
283
283
  /* sc-sel */
284
284
  W);
285
- }), (0, u.pick)({
286
- enterprise: u.variables.spacingHalf,
287
- prisma: u.variables.spacingSmall
288
- }));
285
+ }), u.variables.spacingSmall);
289
286
  var M = l().div.withConfig({
290
287
  displayName: "HeaderStyles__StyledActionContainer",
291
288
  componentId: "eqi6uk-3"
@@ -300,12 +297,12 @@
300
297
  displayName: "HeaderStyles__StyledSecondaryAction",
301
298
  componentId: "eqi6uk-4"
302
299
  })([ "margin-left:10px;" ]);
303
- var z = l()(s()).withConfig({
300
+ var L = l()(s()).withConfig({
304
301
  displayName: "HeaderStyles__StyledBox",
305
302
  componentId: "eqi6uk-5"
306
303
  })([ "align-items:start;display:flex;flex:0 0 auto;justify-content:space-between;position:relative;min-height:30px;", " ", " >:not(", "):not(", "){flex:1 0 auto;}" ], (0,
307
304
  u.pick)({
308
- enterprise: (0, a.css)([ "padding:", ";" ], u.variables.spacing),
305
+ enterprise: (0, a.css)([ "padding:", ";" ], u.variables.spacingLarge),
309
306
  prisma: {
310
307
  comfortable: (0, a.css)([ "padding:16px 24px;&:last-child{padding-bottom:32px;}" ]),
311
308
  compact: (0, a.css)([ "padding:12px 24px;&:last-child{padding-bottom:24px;}" ])
@@ -318,7 +315,7 @@
318
315
  /* sc-sel */
319
316
  M);
320
317
  // CONCATENATED MODULE: ./src/Card/Header.tsx
321
- function L(e, r) {
318
+ function z(e, r) {
322
319
  if (e == null) return {};
323
320
  var t = V(e, r);
324
321
  var n, o;
@@ -369,6 +366,10 @@
369
366
  title: i().node,
370
367
  truncateTitle: i().bool
371
368
  };
369
+ // The order of the interfaces is necessary to maintain proper error messages: HeaderWithActions then HeaderWithActionsRenderProp
370
+ // If the actions comes first the error will report that actions should be undefined
371
+ // when we want actions to be the intended use case
372
+ // type HeaderProps = ComponentProps<HeaderPropsBase, 'div'>;
372
373
  // `forwardRef` is used to enable focus on toggle when Dropdown is closing
373
374
  var J = n().forwardRef((function(e, r) {
374
375
  var t = (0, u.useSplunkTheme)(), o = t.family, i = t.isCompact;
@@ -376,9 +377,9 @@
376
377
  var l = o === "prisma" ? n().createElement(P(), {
377
378
  height: a,
378
379
  width: a
379
- }) : n().createElement(T(), null);
380
+ }) : n().createElement(E(), null);
380
381
 
381
- return n().createElement(H(), G({
382
+ return n().createElement(N(), G({
382
383
  content: (0, j._)("Actions"),
383
384
  contentRelationship: "label"
384
385
  }, e), n().createElement(F, {
@@ -391,21 +392,28 @@
391
392
  /**
392
393
  * A styled container for `Card` header content.
393
394
  */ function K(e) {
394
- var r = e.actionPrimary, t = e.actionsSecondary, o = e.anchor, i = e.children, a = e.subtitle, l = e.title, c = e.truncateTitle, s = c === void 0 ? true : c, p = L(e, [ "actionPrimary", "actionsSecondary", "anchor", "children", "subtitle", "title", "truncateTitle" ]);
395
+ var r = e.actions, t = e.actionPrimary, o = e.actionsSecondary, i = e.anchor, a = e.children, l = e.subtitle, c = e.title, s = e.truncateTitle, p = s === void 0 ? true : s, d = z(e, [ "actions", "actionPrimary", "actionsSecondary", "anchor", "children", "subtitle", "title", "truncateTitle" ]);
395
396
  // @docs-props-type HeaderPropsBase
396
- var d = (0, u.useSplunkTheme)(), f = d.family;
397
- var b = f === "prisma" ? "right" : "below";
397
+ var f = (0, u.useSplunkTheme)(), b = f.family;
398
+ var v = b === "prisma" ? "right" : "below";
399
+ if (false) {}
400
+ var y;
401
+ if (r) {
402
+ y = r();
403
+ } else if (t || o) {
404
+ y = n().createElement(n().Fragment, null, t, o && n().createElement(I(), {
405
+ defaultPlacement: v,
406
+ toggle: n().createElement(J, null)
407
+ }, o));
408
+ }
398
409
 
399
- return n().createElement(z, G({
410
+ return n().createElement(L, G({
400
411
  "data-test": "header"
401
- }, p), (l || a) && n().createElement(D, {
402
- $truncateTitle: s
403
- }, l && n().createElement(A, null, o ? n().createElement(B(), {
404
- name: o
405
- }, l) : l), a && n().createElement(W, null, a)), i, (r || t) && n().createElement(M, null, r, t && n().createElement(I(), {
406
- defaultPlacement: b,
407
- toggle: n().createElement(J, null)
408
- }, t)));
412
+ }, d), (c || l) && n().createElement(D, {
413
+ $truncateTitle: p
414
+ }, c && n().createElement(A, null, i ? n().createElement(B(), {
415
+ name: i
416
+ }, c) : c), l && n().createElement(W, null, l)), a, y && n().createElement(M, null, y));
409
417
  }
410
418
  K.propTypes = U;
411
419
  /* harmony default export */ const Q = K;
@@ -414,7 +422,7 @@
414
422
  var Y = e.n(X);
415
423
  // CONCATENATED MODULE: ./src/Card/CardStyles.ts
416
424
  var Z = "0.2s";
417
- var ee = l().div.withConfig({
425
+ var ee = l().article.withConfig({
418
426
  displayName: "CardStyles__Styled",
419
427
  componentId: "ola3x0-0"
420
428
  })([ "", ";flex-direction:column;align-items:stretch;min-width:100px;flex:1;vertical-align:top;", " transition:height ", ",width ", ",min-width ", ",max-width ", ",margin ", ",box-shadow ", ",border-color ", ";", " &[data-clickable='true']{cursor:pointer;", " &:hover{", "}&:focus{", "}}" ], u.mixins.reset("inline-flex"), (0,
@@ -691,7 +699,8 @@
691
699
  selected: i().bool,
692
700
  showBorder: i().bool,
693
701
  to: i().string,
694
- value: i().any
702
+ value: i().any,
703
+ tag: i().oneOf([ "article", "div", "aside", "section" ])
695
704
  };
696
705
  var Pe = {
697
706
  openInNewContext: false,
@@ -700,7 +709,7 @@
700
709
  function _e(e) {
701
710
  return !!e.onClick || !!e.to;
702
711
  }
703
- function Te(e) {
712
+ function Ee(e) {
704
713
  var r = e.margin, t = e.maxWidth, n = e.minWidth, o = e.showBorder, i = e.style, a = ke(e, [ "margin", "maxWidth", "minWidth", "showBorder", "style" ]);
705
714
  var l = xe({
706
715
  minWidth: n,
@@ -714,7 +723,7 @@
714
723
  };
715
724
  return [ c, a ];
716
725
  }
717
- var Ee = function(e) {
726
+ var Te = function(e) {
718
727
  be(t, e);
719
728
  var r = ye(t);
720
729
  function t() {
@@ -738,7 +747,7 @@
738
747
  key: "render",
739
748
  value: function e() {
740
749
  if (_e(this.props)) {
741
- var r = Te(this.props), t = ie(r, 2), o = t[0], i = t[1];
750
+ var r = Ee(this.props), t = ie(r, 2), o = t[0], i = t[1];
742
751
  var a = o.showBorder;
743
752
  var l = i.children, c = i.elementRef, s = i.onClick, u = i.openInNewContext, p = i.selected, d = i.to, f = ke(i, [ "children", "elementRef", "onClick", "openInNewContext", "selected", "to" ]);
744
753
 
@@ -753,25 +762,28 @@
753
762
  to: d || undefined
754
763
  }), n().createElement(te, null, l));
755
764
  }
756
- var b = Te(this.props), v = ie(b, 2), y = v[0], m = v[1];
765
+ var b = Ee(this.props), v = ie(b, 2), y = v[0], m = v[1];
757
766
  var h = y.showBorder;
758
- var g = m.children, w = m.elementRef, O = ke(m, [ "children", "elementRef" ]);
767
+ var g = m.children, w = m.elementRef, O = m.tag, x = ke(m, [ "children", "elementRef", "tag" ]);
759
768
 
760
769
  return n().createElement(ee, oe({
761
770
  $selected: false,
762
771
  $cardHasBorder: h,
763
- ref: w
764
- }, y, O), g);
772
+ ref: w,
773
+ as: O
774
+ }, y, x, {
775
+ onClick: undefined
776
+ }), g);
765
777
  }
766
778
  } ]);
767
779
  return t;
768
780
  }(t.Component);
769
- Se(Ee, "propTypes", Ce);
770
- Se(Ee, "defaultProps", Pe);
771
- Se(Ee, "Header", Q);
772
- Se(Ee, "Body", m);
773
- Se(Ee, "Footer", k);
774
- /* harmony default export */ const Be = Ee;
781
+ Se(Te, "propTypes", Ce);
782
+ Se(Te, "defaultProps", Pe);
783
+ Se(Te, "Header", Q);
784
+ Se(Te, "Body", m);
785
+ Se(Te, "Footer", k);
786
+ /* harmony default export */ const Be = Te;
775
787
  // CONCATENATED MODULE: ./src/Card/index.ts
776
788
  module.exports = r;
777
789
  /******/})();
package/Chip.js CHANGED
@@ -255,7 +255,7 @@
255
255
  displayName: "ChipStyles__StyledRemove",
256
256
  componentId: "sc-1sd3tsh-5"
257
257
  })([ "", ";" ], (0, b.pick)({
258
- enterprise: (0, h.css)([ "flex:0 0 auto;padding-left:", ";font-size:", ";color:", ";" ], b.variables.spacingQuarter, (0,
258
+ enterprise: (0, h.css)([ "flex:0 0 auto;padding-left:", ";font-size:", ";color:", ";" ], b.variables.spacingXSmall, (0,
259
259
  b.pick)({
260
260
  compact: "9px",
261
261
  comfortable: "10.5px"
@@ -268,11 +268,7 @@
268
268
  }
269
269
  }
270
270
  })),
271
- prisma: (0, h.css)([ "font-size:", ";display:flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:12px;font-size:9px;color:", ";" ], (0,
272
- b.pick)({
273
- compact: "9px",
274
- comfortable: "10.5px"
275
- }), (function(e) {
271
+ prisma: (0, h.css)([ "display:flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:12px;font-size:9px;color:", ";" ], (function(e) {
276
272
  var r = e.$disabled, a = e.$foregroundColor;
277
273
  return r ? b.variables.contentColorDisabled : a || "inherit";
278
274
  }))
package/Clickable.js CHANGED
@@ -87,12 +87,12 @@
87
87
  const p = require("styled-components");
88
88
  var d = e.n(p);
89
89
  // CONCATENATED MODULE: external "@splunk/themes"
90
- const v = require("@splunk/themes");
90
+ const b = require("@splunk/themes");
91
91
  // CONCATENATED MODULE: ./src/Clickable/ClickableStyles.ts
92
- var b = d().a.withConfig({
92
+ var v = d().a.withConfig({
93
93
  displayName: "ClickableStyles__StyledA",
94
94
  componentId: "sc-7al1vw-0"
95
- })([ "", " cursor:pointer;&[disabled],&[aria-disabled='true']{color:", ";}&::-moz-focus-inner{border:0;padding:0;}" ], v.mixins.reset("inline"), v.variables.contentColorDisabled);
95
+ })([ "", " cursor:pointer;&[disabled],&[aria-disabled='true']{color:", ";}&::-moz-focus-inner{border:0;padding:0;}" ], b.mixins.reset("inline"), b.variables.contentColorDisabled);
96
96
  // CONCATENATED MODULE: ./src/Clickable/NavigationProvider.tsx
97
97
  /** @public */
98
98
  var y = {
@@ -257,16 +257,16 @@
257
257
  } else {
258
258
  o = r.apply(this, arguments);
259
259
  }
260
- return I(this, o);
260
+ return T(this, o);
261
261
  };
262
262
  }
263
- function I(e, t) {
263
+ function T(e, t) {
264
264
  if (t && (g(t) === "object" || typeof t === "function")) {
265
265
  return t;
266
266
  }
267
- return T(e);
267
+ return I(e);
268
268
  }
269
- function T(e) {
269
+ function I(e) {
270
270
  if (e === void 0) {
271
271
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
272
272
  }
@@ -315,7 +315,7 @@
315
315
  /** @private */
316
316
  allowDisabledLink: i().bool,
317
317
  children: i().node,
318
- disabled: i().bool,
318
+ disabled: i().oneOfType([ i().bool, i().oneOf([ "dimmed" ]) ]),
319
319
  elementRef: i().oneOfType([ i().func, i().object ]),
320
320
  onClick: i().func,
321
321
  openInNewContext: i().bool,
@@ -341,12 +341,12 @@
341
341
  var r;
342
342
  x(this, n);
343
343
  r = t.call(this, e);
344
- M(T(r), "el", null);
345
- M(T(r), "handleMount", (function(e) {
344
+ M(I(r), "el", null);
345
+ M(I(r), "handleMount", (function(e) {
346
346
  r.el = e;
347
347
  k(r.props.elementRef, e);
348
348
  }));
349
- M(T(r), "createHandleOnClick", (function() {
349
+ M(I(r), "createHandleOnClick", (function() {
350
350
  var e = r.context, t = e.onClick, n = e.onLinkClick;
351
351
  return function(e) {
352
352
  if (A(r.props)) {
@@ -382,7 +382,7 @@
382
382
  }
383
383
  };
384
384
  }));
385
- M(T(r), "getTransformedUrl", (function(e) {
385
+ M(I(r), "getTransformedUrl", (function(e) {
386
386
  var t = r.context.transformUrl;
387
387
  return t != null ? t(e, {
388
388
  isInternal: z(e),
@@ -411,7 +411,7 @@
411
411
  var u = i ? "_blank" : undefined;
412
412
  var c = i && z(l) ? "noopener noreferrer" : undefined;
413
413
 
414
- return r().createElement(b, C({
414
+ return r().createElement(v, C({
415
415
  "data-test": "clickable",
416
416
  ref: this.handleMount,
417
417
  href: this.getTransformedUrl(this.props.to),
@@ -424,7 +424,7 @@
424
424
  var s = this.props, p = s.children, d = O(s, [ "children" ]);
425
425
  if (this.props.disabled && this.props.to != null) {
426
426
 
427
- return r().createElement(b, C({
427
+ return r().createElement(v, C({
428
428
  "data-test": "clickable",
429
429
  ref: this.handleMount,
430
430
  role: "link",
@@ -433,15 +433,17 @@
433
433
  }
434
434
  }
435
435
  // button variant
436
- var v = this.props, y = v.children, h = v.type, m = O(v, [ "children", "type" ]);
436
+ var b = this.props, y = b.children, h = b.onClick, m = b.disabled, k = b.type, g = O(b, [ "children", "onClick", "disabled", "type" ]);
437
437
 
438
- return r().createElement(b, C({
438
+ return r().createElement(v, C({
439
439
  as: "button",
440
+ "aria-disabled": m === "dimmed" || undefined,
440
441
  "data-test": "clickable",
441
442
  ref: this.handleMount,
442
- type: h || "button",
443
- onClick: t
444
- }, f()(m, "elementRef", "onClick", "openInNewContext", "to")), y);
443
+ type: k || "button",
444
+ disabled: m === true,
445
+ onClick: h && !m ? t : undefined
446
+ }, f()(g, "elementRef", "openInNewContext", "to")), y);
445
447
  }
446
448
  } ]);
447
449
  return n;