@splunk/react-ui 4.30.0 → 4.32.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.
package/Link.js CHANGED
@@ -111,7 +111,7 @@
111
111
  var k = f()(S()).withConfig({
112
112
  displayName: "LinkStyles__StyledClickable",
113
113
  componentId: "sc-1hhltcf-0"
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:", ";}&::-moz-focus-inner{border:0;padding:0;}" ], v.mixins.reset("inline"), (0,
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,
115
115
  v.pick)({
116
116
  enterprise: v.variables.linkColor,
117
117
  prisma: v.variables.interactiveColorPrimary
@@ -217,11 +217,11 @@
217
217
  return I(e, t);
218
218
  }
219
219
  function N(e) {
220
- var t = z();
220
+ var t = A();
221
221
  return function n() {
222
- var r = A(e), o;
222
+ var r = L(e), o;
223
223
  if (t) {
224
- var i = A(this).constructor;
224
+ var i = L(this).constructor;
225
225
  o = Reflect.construct(r, arguments, i);
226
226
  } else {
227
227
  o = r.apply(this, arguments);
@@ -241,7 +241,7 @@
241
241
  }
242
242
  return e;
243
243
  }
244
- function z() {
244
+ function A() {
245
245
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
246
246
  if (Reflect.construct.sham) return false;
247
247
  if (typeof Proxy === "function") return true;
@@ -252,13 +252,13 @@
252
252
  return false;
253
253
  }
254
254
  }
255
- function A(e) {
256
- A = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
255
+ function L(e) {
256
+ L = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
257
257
  return t.__proto__ || Object.getPrototypeOf(t);
258
258
  };
259
- return A(e);
259
+ return L(e);
260
260
  }
261
- function L(e, t, n) {
261
+ function z(e, t, n) {
262
262
  if (t in e) {
263
263
  Object.defineProperty(e, t, {
264
264
  value: n,
@@ -298,8 +298,8 @@
298
298
  o[i] = arguments[i];
299
299
  }
300
300
  e = t.call.apply(t, [ this ].concat(o));
301
- L(D(e), "component", null);
302
- L(D(e), "handleMount", (function(t) {
301
+ z(D(e), "component", null);
302
+ z(D(e), "handleMount", (function(t) {
303
303
  e.component = t;
304
304
  }));
305
305
  return e;
@@ -333,9 +333,9 @@
333
333
  } ]);
334
334
  return n;
335
335
  }(n.Component);
336
- L(H, "propTypes", B);
337
- L(H, "defaultProps", F);
338
- L(H, u.legacyRefMode, true);
336
+ z(H, "propTypes", B);
337
+ z(H, "defaultProps", F);
338
+ z(H, u.legacyRefMode, true);
339
339
  /* harmony default export */ const J = H;
340
340
  // CONCATENATED MODULE: ./src/Link/index.ts
341
341
  module.exports = t;
package/ModalLayer.js CHANGED
@@ -262,6 +262,7 @@
262
262
  R(k(o), "renderLayer", (function() {
263
263
  var e = o.props, t = e.getDefaultMotionStyle, n = e.getMotionStyle, i = e.renderModal, c = e.scrim;
264
264
  var l = o.props.open || o.state.animating;
265
+ var u = l && c !== "hidden";
265
266
 
266
267
  return r().createElement(a.Spring, {
267
268
  from: m(m({}, t === null || t === void 0 ? void 0 : t()), {}, {
@@ -277,7 +278,7 @@
277
278
 
278
279
  return r().createElement("div", null,
279
280
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
280
- i(e), l && (c === "visible" || "interactive") && r().createElement(d, {
281
+ i(e), u && r().createElement(d, {
281
282
  "data-test": "modal-overlay",
282
283
  onMouseDown: c === "interactive" ? o.handleClickAway : undefined,
283
284
  key: "clickAway",
package/SidePanel.js CHANGED
@@ -364,7 +364,7 @@
364
364
  value: function e() {
365
365
  var t = this.props, r = t.open, o = t.onRequestClose, i = t.useLayerForClickAway;
366
366
  var a = this.state.panelAnimating;
367
- var l = i ? "interactive" : "visible";
367
+ var l = i ? "interactive" : "hidden";
368
368
 
369
369
  return n().createElement(f(), {
370
370
  childrenInAnimation: a,
package/TabBar.js CHANGED
@@ -114,9 +114,9 @@
114
114
  var k = e.n(x);
115
115
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
116
116
  const w = require("@splunk/react-ui/ScreenReaderContent");
117
- var C = e.n(w);
117
+ var S = e.n(w);
118
118
  // CONCATENATED MODULE: external "@splunk/ui-utils/id"
119
- const S = require("@splunk/ui-utils/id");
119
+ const C = require("@splunk/ui-utils/id");
120
120
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
121
121
  const O = require("@splunk/react-ui/Clickable");
122
122
  var T = e.n(O);
@@ -261,7 +261,7 @@
261
261
  var D = s().span.withConfig({
262
262
  displayName: "TabStyles__StyledCount",
263
263
  componentId: "sc-1ry8mzj-6"
264
- })([ "display:inline-block;border-radius:18px;color:", ";font-size:", ";line-height:10px;padding:", ";margin-inline-start:", ";", " &[disabled]{background:", ";color:", ";}" ], c.variables.contentColorDefault, (0,
264
+ })([ "display:inline-block;border-radius:18px;color:", ";font-size:", ";line-height:10px;padding:", ";margin-inline-start:", ";", " &[disabled]{color:", ";}" ], c.variables.contentColorDefault, (0,
265
265
  c.pick)({
266
266
  enterprise: "inherit",
267
267
  prisma: "10px"
@@ -274,7 +274,7 @@
274
274
  }), (0, c.pick)({
275
275
  enterprise: (0, l.css)([ "&::before{content:'(';}&::after{content:')';}" ]),
276
276
  prisma: (0, l.css)([ "background:", ";" ], c.variables.neutral100)
277
- }), c.variables.interactiveColorBackgroundDisabled, c.variables.contentColorDisabled);
277
+ }), c.variables.contentColorDisabled);
278
278
  var R = s().div.withConfig({
279
279
  displayName: "TabStyles__StyledTooltipContent",
280
280
  componentId: "sc-1ry8mzj-7"
@@ -553,9 +553,9 @@
553
553
  re(Z(n), "handleBlur", (function() {
554
554
  n.handleTooltipClose();
555
555
  }));
556
- n.popoverId = (0, S.createDOMID)("popover");
557
- n.ariaId = (0, S.createDOMID)("aria-id");
558
- n.menuDescription = (0, S.createDOMID)("menu-description");
556
+ n.popoverId = (0, C.createDOMID)("popover");
557
+ n.ariaId = (0, C.createDOMID)("aria-id");
558
+ n.menuDescription = (0, C.createDOMID)("menu-description");
559
559
  n.state = {
560
560
  open: false,
561
561
  anchor: null
@@ -572,7 +572,7 @@
572
572
  key: "render",
573
573
  value: function e() {
574
574
  var t = this.props, r = t.active, i = t.ariaControls, a = t.count, o = t.disabled, l = t.icon, s = t.label, c = t.tabId, u = t.maxCount, p = t.splunkTheme, v = t.to, h = t.tooltip, m = t.menu, x = t.tabKey, w = U(t, [ "active", "ariaControls", "count", "disabled", "icon", "label", "tabId", "maxCount", "splunkTheme", "to", "tooltip", "menu", "tabKey" ]);
575
- var S = this.state, O = S.anchor, T = S.open;
575
+ var C = this.state, O = C.anchor, T = C.open;
576
576
  var I = this.context, j = I.appearance, q = I.disabled, A = I.iconSize, V = I.layout, B = I.width, F = I.onMenuOpen, W = I.onMenuClose, L = I.isMenuOpen, H = I.focusedTabKey;
577
577
  var Y = w.style;
578
578
  var G = q || o || false;
@@ -650,10 +650,10 @@
650
650
  $withUnderline: j === "navigation"
651
651
  }, l && n().createElement(E, {
652
652
  $iconSize: J
653
- }, l), s, !m && (a === 0 || a) && n().createElement(n().Fragment, null, n().createElement(C(), null, " "), n().createElement(D, {
653
+ }, l), s, !m && (a === 0 || a) && n().createElement(n().Fragment, null, n().createElement(S(), null, " "), n().createElement(D, {
654
654
  "data-test": "count",
655
655
  disabled: G
656
- }, u ? K(a, u) : a)), !!m && n().createElement(C(), {
656
+ }, u ? K(a, u) : a)), !!m && n().createElement(S(), {
657
657
  "aria-hidden": true,
658
658
  id: this.menuDescription
659
659
  }, (0, f._)("Press Shift + F10 to open the tab’s menu")))), n().createElement(M, {
@@ -671,7 +671,7 @@
671
671
  id: this.popoverId,
672
672
  open: !!O && T,
673
673
  align: "center"
674
- }, n().createElement(R, null, h)), h && n().createElement(C(), {
674
+ }, n().createElement(R, null, h)), h && n().createElement(S(), {
675
675
  "aria-hidden": "true",
676
676
  id: this.ariaId
677
677
  }, h));
@@ -813,8 +813,8 @@
813
813
  function ke(e) {
814
814
  var t = e.activeTabId, i = e.autoActivate, a = e.appearance, l = a === void 0 ? "navigation" : a, s = e.children, c = e.disabled, p = c === void 0 ? false : c, d = e.elementRef, f = e.iconSize, v = f === void 0 ? "inline" : f, b = e.layout, h = b === void 0 ? "horizontal" : b, y = e.onChange, m = e.tabWidth, g = ye(e, [ "activeTabId", "autoActivate", "appearance", "children", "disabled", "elementRef", "iconSize", "layout", "onChange", "tabWidth" ]);
815
815
  // @docs-props-type TabBarPropsBase
816
- var x = (0, r.useState)(false), k = pe(x, 2), w = k[0], C = k[1];
817
- var S = (0, r.useState)(0), O = pe(S, 2), T = O[0], I = O[1];
816
+ var x = (0, r.useState)(false), k = pe(x, 2), w = k[0], S = k[1];
817
+ var C = (0, r.useState)(0), O = pe(C, 2), T = O[0], I = O[1];
818
818
  var j = (0, r.useRef)([]);
819
819
  var z = h === "vertical" ? "down" : "right";
820
820
  var M = h === "vertical" ? "up" : "left";
@@ -868,7 +868,7 @@
868
868
  } else if (t === "end") {
869
869
  r = ce(j.current, T, j.current.length - 1);
870
870
  } else if (h === "horizontal" && e.shiftKey && t === "f10") {
871
- C((function(e) {
871
+ S((function(e) {
872
872
  if (e) {
873
873
  var t;
874
874
  // if we're closing, we want to shift focus to the tab
@@ -878,7 +878,7 @@
878
878
  return !e;
879
879
  }));
880
880
  } else if (h === "horizontal" && t === "down") {
881
- C(true);
881
+ S(true);
882
882
  }
883
883
  if (r != null) {
884
884
  var n;
@@ -889,13 +889,13 @@
889
889
  var R = (0, r.useCallback)((function(e) {
890
890
  // prevent clicking on the menu icon from changing the active tab
891
891
  e.stopPropagation();
892
- C(true);
892
+ S(true);
893
893
  }), []);
894
894
  var q = (0, r.useCallback)((function(e) {
895
895
  var t = e.event;
896
896
  // prevent content clicks/enter key from changing the active tab
897
897
  t === null || t === void 0 ? void 0 : t.stopPropagation();
898
- C(false);
898
+ S(false);
899
899
  }), []);
900
900
  var A = (0, r.useMemo)((function() {
901
901
  return {
package/Text.js CHANGED
@@ -309,14 +309,8 @@
309
309
  var U = N().span.withConfig({
310
310
  displayName: "TextStyles__StyledInputWrapper",
311
311
  componentId: "eg7n6t-3"
312
- })([ "", ";flex-grow:1;min-height:", ";position:relative;overflow:hidden;border:1px solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);padding:", ";align-items:center;", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}", " ", " ", " ", "" ], A.mixins.reset("inline-flex"), A.variables.inputHeight, (0,
312
+ })([ "", ";flex-grow:1;min-height:", ";position:relative;overflow:hidden;border:1px solid ", ";border-radius:", ";box-sizing:border-box;background-color:", ";box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);padding:", ";align-items:center;", " ", " &:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}", " ", " ", " ", "" ], A.mixins.reset("inline-flex"), A.variables.inputHeight, A.variables.interactiveColorBorder, A.variables.borderRadius, (0,
313
313
  A.pick)({
314
- enterprise: {
315
- light: A.variables.gray60,
316
- dark: A.variables.gray20
317
- },
318
- prisma: A.variables.interactiveColorBorder
319
- }), A.variables.borderRadius, (0, A.pick)({
320
314
  enterprise: {
321
315
  light: A.variables.white,
322
316
  dark: A.variables.gray22
@@ -331,13 +325,7 @@
331
325
  }), (function(e) {
332
326
  var t = e.$hasStartAdornment;
333
327
  return t && (0, D.css)([ "padding-left:0;" ]);
334
- }), (0, A.pick)({
335
- enterprise: {
336
- light: A.variables.gray60,
337
- dark: A.variables.gray20
338
- },
339
- prisma: A.variables.interactiveColorBorderHover
340
- }), A.variables.focusShadow, A.variables.contentColorActive, (function(e) {
328
+ }), A.variables.interactiveColorBorderHover, A.variables.focusShadow, A.variables.contentColorActive, (function(e) {
341
329
  var t = e.$error;
342
330
  return t && (0, D.css)([ "&,&:hover:not([disabled]){border-color:", ";}&:focus-within:not([disabled]){box-shadow:", ";color:", ";}" ], A.variables.accentColorNegative, A.variables.focusShadow, A.variables.contentColorActive);
343
331
  }), (function(e) {
@@ -348,13 +336,9 @@
348
336
  return t && (0, D.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
349
337
  }), (function(e) {
350
338
  var t = e.disabled;
351
- return t && (0, D.css)([ "", " box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);" ], (0,
339
+ return t && (0, D.css)([ "border-color:", ";box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);", "" ], A.variables.interactiveColorBorderDisabled, (0,
352
340
  A.pick)({
353
- enterprise: {
354
- light: (0, D.css)([ "background-color:", ";border-color:", ";" ], A.variables.gray96, A.variables.gray92),
355
- dark: (0, D.css)([ "background-color:", ";border-color:", ";" ], A.variables.gray22, A.variables.gray30)
356
- },
357
- prisma: (0, D.css)([ "border-color:", ";" ], A.variables.interactiveColorBorderDisabled)
341
+ enterprise: (0, D.css)([ "background-color:", ";" ], A.variables.interactiveColorBackgroundDisabled)
358
342
  }));
359
343
  }));
360
344
  /* Some of these need greater specificity than input[type=text] */ var J = N().input.withConfig({
@@ -938,7 +922,8 @@
938
922
  if (!k) {
939
923
 
940
924
  return n().createElement(re, m, n().createElement(K, {
941
- $disabled: l
925
+ $disabled: l,
926
+ "data-test": "search-icon"
942
927
  }, n().createElement(g(), {
943
928
  screenReaderText: null,
944
929
  hideDefaultTooltip: true,
@@ -959,6 +944,7 @@
959
944
  }),
960
945
  onClick: i.handleClear
961
946
  }), n().createElement(K, {
947
+ "data-test": "search-icon",
962
948
  $disabled: l
963
949
  }, u ? n().createElement(g(), {
964
950
  screenReaderText: null,
@@ -1007,6 +993,7 @@
1007
993
  if (l && t === "search") {
1008
994
 
1009
995
  return n().createElement(re, p, n().createElement(K, {
996
+ "data-test": "search-icon",
1010
997
  $disabled: o
1011
998
  }, n().createElement(w(), {
1012
999
  "aria-label": "Search",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splunk/react-ui",
3
- "version": "4.30.0",
3
+ "version": "4.32.0",
4
4
  "description": "Library of React components that implement the Splunk design language",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Splunk Inc.",
@@ -43,8 +43,8 @@
43
43
  "@dnd-kit/modifiers": "^7.0.0",
44
44
  "@dnd-kit/sortable": "^8.0.0",
45
45
  "@dnd-kit/utilities": "^3.2.2",
46
- "@splunk/react-icons": "^4.4.0",
47
- "@splunk/themes": "^0.18.0",
46
+ "@splunk/react-icons": "^4.5.0",
47
+ "@splunk/themes": "^0.19.0",
48
48
  "@splunk/ui-utils": "^1.6.0",
49
49
  "commonmark": "^0.30.0",
50
50
  "commonmark-react-renderer": "^4.3.2",
@@ -61,9 +61,9 @@
61
61
  "@babel/core": "^7.2.0",
62
62
  "@babel/plugin-transform-runtime": "^7.18.6",
63
63
  "@splunk/babel-preset": "^4.0.0",
64
- "@splunk/docs-gen": "1.0.0-beta.9",
64
+ "@splunk/docs-gen": "1.0.0-beta.11",
65
65
  "@splunk/eslint-config": "^4.0.0",
66
- "@splunk/react-docs": "1.0.0-beta.13",
66
+ "@splunk/react-docs": "1.0.0-beta.15",
67
67
  "@splunk/stylelint-config": "^4.0.0",
68
68
  "@splunk/test-runner-utils": "^0.4.1",
69
69
  "@splunk/webpack-configs": "^7.0.2",
@@ -0,0 +1,27 @@
1
+ import { AnyTheme, Interpolation, InterpolationResult, ThemedProps } from '@splunk/themes';
2
+ declare const buttonVariants: readonly ["primary", "secondary", "destructive", "ghost"];
3
+ type ButtonVariant = typeof buttonVariants[number];
4
+ type ButtonStyleProps = ThemedProps & Partial<{
5
+ $append: boolean;
6
+ $prepend: boolean;
7
+ $selected: boolean;
8
+ $error: boolean;
9
+ disabled: boolean;
10
+ }>;
11
+ interface ButtonParams<T extends AnyTheme, A extends ThemedProps> {
12
+ background?: InterpolationResult<T, A>;
13
+ backgroundActive?: InterpolationResult<T, A>;
14
+ backgroundDisabled?: InterpolationResult<T, A>;
15
+ backgroundDisabledSelected?: InterpolationResult<T, A>;
16
+ backgroundHover?: InterpolationResult<T, A>;
17
+ backgroundSelected?: InterpolationResult<T, A>;
18
+ borderColor?: InterpolationResult<T, A>;
19
+ borderColorDisabled?: InterpolationResult<T, A>;
20
+ color?: InterpolationResult<T, A>;
21
+ colorDisabled?: InterpolationResult<T, A>;
22
+ }
23
+ declare function button<T extends AnyTheme, A extends ButtonStyleProps>(): Interpolation<T, A>;
24
+ declare function button<T extends AnyTheme, A extends ButtonStyleProps>(variant: ButtonVariant): Interpolation<T, A>;
25
+ declare function button<T extends AnyTheme, A extends ButtonStyleProps>(params: ButtonParams<T, A>): Interpolation<T, A>;
26
+ declare function button<T extends AnyTheme, A extends ButtonStyleProps>(variant: ButtonVariant, additionalParams: ButtonParams<T, A>): Interpolation<T, A>;
27
+ export default button;
@@ -35,7 +35,7 @@ interface CardPropsBase {
35
35
  */
36
36
  openInNewContext?: boolean;
37
37
  /**
38
- * Renders `Card` as selected if set to `true`.
38
+ * Renders `Card` as selected if set to `true`. Use only when `onClick` is also provided.
39
39
  */
40
40
  selected?: boolean;
41
41
  /**
@@ -50,24 +50,32 @@ interface CardPropsBase {
50
50
  /** Returns a value on click. Use when composing or if you have more than one selectable `Card`. */
51
51
  value?: any;
52
52
  }
53
- declare const defaultProps: Required<Pick<CardPropsBase, 'openInNewContext' | 'selected' | 'showBorder'>>;
53
+ declare const defaultProps: Required<Pick<CardPropsBase, 'openInNewContext' | 'showBorder'>>;
54
54
  interface CardPropsBaseNonClickable extends CardPropsBase {
55
55
  elementRef?: React.Ref<HTMLDivElement>;
56
56
  onClick?: never;
57
+ selected?: never;
57
58
  to?: never;
58
59
  }
60
+ interface CardPropsBaseOnClickClickable extends CardPropsBase {
61
+ elementRef?: React.Ref<HTMLAnchorElement | HTMLButtonElement>;
62
+ onClick: CardClickHandler;
63
+ selected?: boolean;
64
+ to?: string;
65
+ }
59
66
  interface CardPropsBaseClickable extends CardPropsBase {
60
67
  elementRef?: React.Ref<HTMLAnchorElement | HTMLButtonElement>;
61
68
  onClick?: CardClickHandler;
69
+ selected?: never;
62
70
  to?: string;
63
71
  }
64
72
  type CardNonClickableProps = ClassComponentProps<CardPropsBaseNonClickable, typeof defaultProps, 'div'>;
65
- type CardClickableButtonProps = ClassComponentProps<CardPropsBaseClickable, typeof defaultProps, 'button'>;
66
- type CardClickableLinkProps = ClassComponentProps<CardPropsBaseClickable, typeof defaultProps, 'a', 'href'>;
73
+ type CardClickableButtonProps = ClassComponentProps<CardPropsBaseOnClickClickable | CardPropsBaseClickable, typeof defaultProps, 'button'>;
74
+ type CardClickableLinkProps = ClassComponentProps<CardPropsBaseOnClickClickable | CardPropsBaseClickable, typeof defaultProps, 'a', 'href'>;
67
75
  type CardProps = CardNonClickableProps | CardClickableButtonProps | CardClickableLinkProps;
68
76
  declare class Card extends Component<CardProps, {}> {
69
77
  static propTypes: React.WeakValidationMap<CardProps>;
70
- static defaultProps: Required<Pick<CardPropsBase, "selected" | "openInNewContext" | "showBorder">>;
78
+ static defaultProps: Required<Pick<CardPropsBase, "openInNewContext" | "showBorder">>;
71
79
  static Header: typeof Header;
72
80
  static Body: typeof Body;
73
81
  static Footer: typeof Footer;
@@ -1,6 +1,6 @@
1
1
  import React, { Component } from 'react';
2
2
  import { legacyRefMode } from '@splunk/react-ui/Dropdown';
3
- import { NavigationContext, NavigationProviderClickHandler } from './NavigationProvider';
3
+ import { NavigationContext } from './NavigationProvider';
4
4
  import { ClassComponentProps } from '../utils/types';
5
5
  export declare const isRootRelativeLink: (to: string | undefined) => boolean;
6
6
  export declare const isInternalLink: (to: string | undefined) => boolean;
@@ -56,14 +56,10 @@ declare class Clickable extends Component<ClickableProps> {
56
56
  private el;
57
57
  context: React.ContextType<typeof NavigationContext>;
58
58
  static contextType: React.Context<{
59
- onClick?: NavigationProviderClickHandler | undefined;
59
+ onClick?: import("./NavigationProvider").NavigationProviderClickHandler | undefined;
60
+ onLinkClick?: import("./NavigationProvider").NavigationProviderClickHandler | undefined;
60
61
  prefix?: string | undefined;
61
- transformUrl?: import("./NavigationProvider").NavigationProviderTransformUrl | undefined; /**
62
- * The text representation of the navigational link.
63
- * This should be provided if child content is not a string.
64
- *
65
- * Ignored if not in link mode.
66
- */
62
+ transformUrl?: import("./NavigationProvider").NavigationProviderTransformUrl | undefined;
67
63
  }>;
68
64
  static propTypes: React.WeakValidationMap<ClickableProps>;
69
65
  static defaultProps: Required<Pick<ClickablePropsBase, "disabled" | "openInNewContext">>;
@@ -18,6 +18,11 @@ interface NavigationProviderPropsBase {
18
18
  * The function takes the event and an options argument with `to` and `openInNewContext`
19
19
  */
20
20
  onClick?: NavigationProviderClickHandler;
21
+ /**
22
+ * Triggers when a link is clicked, even if the link has its own `onClick` handler.
23
+ * The function takes the event and an options argument with `to` and `openInNewContext`
24
+ */
25
+ onLinkClick?: NavigationProviderClickHandler;
21
26
  /**
22
27
  * @deprecated Use the `transformUrl` prop instead.
23
28
  * If set, all links that use the NavigationProvider's context will have this prepended to them.
@@ -39,6 +44,7 @@ interface NavigationProviderPropsWithoutPrefix extends NavigationProviderPropsBa
39
44
  }
40
45
  type NavigationContextValue = {
41
46
  onClick?: NavigationProviderClickHandler;
47
+ onLinkClick?: NavigationProviderClickHandler;
42
48
  prefix?: string;
43
49
  transformUrl?: NavigationProviderTransformUrl;
44
50
  };
@@ -48,11 +54,12 @@ type NavigationProviderProps = NavigationProviderPropsWithPrefix | NavigationPro
48
54
  * Used to provide an override for the `onClick` for links for single page applications so that
49
55
  * internal links can navigate without a page reload.
50
56
  */
51
- declare function NavigationProvider({ children, onClick, prefix, transformUrl }: NavigationProviderProps): JSX.Element;
57
+ declare function NavigationProvider({ children, onClick, onLinkClick, prefix, transformUrl, }: NavigationProviderProps): JSX.Element;
52
58
  declare namespace NavigationProvider {
53
59
  var propTypes: {
54
60
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
55
61
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
62
+ onLinkClick: PropTypes.Requireable<(...args: any[]) => any>;
56
63
  prefix: PropTypes.Requireable<string>;
57
64
  transformUrl: PropTypes.Requireable<(...args: any[]) => any>;
58
65
  };
@@ -8,12 +8,17 @@ interface DividerPropsBase {
8
8
  elementRef?: React.Ref<HTMLHRElement>;
9
9
  /** Sets the orientation of this `Divider`. */
10
10
  orientation?: 'horizontal' | 'vertical';
11
+ /**
12
+ * Remove semantics of the divider.
13
+ */
14
+ decorative?: boolean;
11
15
  }
12
- type DividerProps = ComponentProps<DividerPropsBase, 'hr'>;
13
- declare function Divider({ elementRef, orientation, ...otherProps }: DividerProps): JSX.Element;
16
+ type DividerProps = ComponentProps<DividerPropsBase, 'hr' | 'div'>;
17
+ declare function Divider({ elementRef, decorative, orientation, ...otherProps }: DividerProps): JSX.Element;
14
18
  declare namespace Divider {
15
19
  var propTypes: {
16
20
  elementRef: PropTypes.Requireable<object>;
21
+ decorative: PropTypes.Requireable<boolean>;
17
22
  orientation: PropTypes.Requireable<string>;
18
23
  };
19
24
  }
@@ -0,0 +1,2 @@
1
+ declare function Decorative(): JSX.Element;
2
+ export default Decorative;
@@ -1,2 +0,0 @@
1
- declare function AriaHidden(): JSX.Element;
2
- export default AriaHidden;