@splunk/react-ui 4.29.0 → 4.31.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 (206) hide show
  1. package/Accordion.js +1 -0
  2. package/CHANGELOG.md +39 -3
  3. package/Card.js +17 -17
  4. package/Chip.js +5 -5
  5. package/Clickable.js +107 -87
  6. package/Code.js +10 -22
  7. package/CollapsiblePanel.js +8 -8
  8. package/ComboBox.js +43 -38
  9. package/Date.js +6 -6
  10. package/Divider.js +96 -45
  11. package/DualListbox.js +1 -1
  12. package/Link.js +77 -75
  13. package/MIGRATION.mdx +51 -1
  14. package/Markdown.js +10 -9
  15. package/Menu.js +5 -5
  16. package/Message.js +160 -149
  17. package/ModalLayer.js +2 -1
  18. package/Multiselect.js +9 -6
  19. package/Number.js +19 -18
  20. package/Paginator.js +239 -223
  21. package/RadioBar.js +43 -39
  22. package/ResultsMenu.js +14 -11
  23. package/Search.js +227 -220
  24. package/Select.js +77 -72
  25. package/SidePanel.js +1 -1
  26. package/StepBar.js +1 -1
  27. package/Table.js +2082 -1594
  28. package/Text.js +1 -0
  29. package/TextArea.d.ts +1 -1
  30. package/cypress/support/component.ts +2 -2
  31. package/package.json +21 -20
  32. package/test-runner-jest.config.js +1 -0
  33. package/types/src/Accordion/Accordion.d.ts +3 -7
  34. package/types/src/Accordion/Panel.d.ts +2 -2
  35. package/types/src/Anchor/Anchor.d.ts +1 -1
  36. package/types/src/AnimationToggle/AnimationToggle.d.ts +3 -3
  37. package/types/src/Box/Box.d.ts +1 -1
  38. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +4 -4
  39. package/types/src/Breadcrumbs/Item.d.ts +1 -1
  40. package/types/src/Button/Button.d.ts +5 -5
  41. package/types/src/ButtonGroup/ButtonGroup.d.ts +1 -1
  42. package/types/src/ButtonSimple/ButtonSimple.d.ts +10 -10
  43. package/types/src/Calendar/Calendar.d.ts +3 -3
  44. package/types/src/Calendar/DateTable.d.ts +2 -2
  45. package/types/src/Calendar/Day.d.ts +3 -3
  46. package/types/src/Calendar/MonthHeader.d.ts +6 -6
  47. package/types/src/Card/Body.d.ts +1 -1
  48. package/types/src/Card/Card.d.ts +6 -6
  49. package/types/src/Card/Footer.d.ts +1 -1
  50. package/types/src/Card/Header.d.ts +1 -1
  51. package/types/src/CardLayout/CardLayout.d.ts +4 -4
  52. package/types/src/Chip/Chip.d.ts +5 -5
  53. package/types/src/Clickable/Clickable.d.ts +12 -4
  54. package/types/src/Clickable/NavigationProvider.d.ts +26 -5
  55. package/types/src/CloseButton/CloseButton.d.ts +1 -1
  56. package/types/src/Code/Code.d.ts +2 -2
  57. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +9 -5
  58. package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +2 -2
  59. package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupInset.d.ts +2 -0
  60. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -1
  61. package/types/src/Color/Color.d.ts +8 -8
  62. package/types/src/Color/Swatch.d.ts +2 -2
  63. package/types/src/ColumnLayout/Column.d.ts +1 -1
  64. package/types/src/ColumnLayout/ColumnLayout.d.ts +1 -1
  65. package/types/src/ColumnLayout/Row.d.ts +1 -1
  66. package/types/src/ComboBox/ComboBox.d.ts +7 -6
  67. package/types/src/ComboBox/Option.d.ts +3 -3
  68. package/types/src/Concertina/Concertina.d.ts +2 -2
  69. package/types/src/Concertina/Heading.d.ts +3 -3
  70. package/types/src/Concertina/Panel.d.ts +4 -4
  71. package/types/src/Concertina/types.d.ts +1 -1
  72. package/types/src/ControlGroup/ControlGroup.d.ts +5 -5
  73. package/types/src/Date/Date.d.ts +10 -10
  74. package/types/src/DefinitionList/DefinitionList.d.ts +2 -2
  75. package/types/src/DefinitionList/Description.d.ts +1 -1
  76. package/types/src/DefinitionList/Term.d.ts +1 -1
  77. package/types/src/Divider/Divider.d.ts +7 -2
  78. package/types/src/Divider/docs/examples/Decorative.d.ts +2 -0
  79. package/types/src/Dropdown/Dropdown.d.ts +10 -10
  80. package/types/src/DualListbox/DualListbox.d.ts +4 -4
  81. package/types/src/DualListbox/DualListboxContext.d.ts +7 -7
  82. package/types/src/DualListbox/Label.d.ts +2 -2
  83. package/types/src/DualListbox/Listbox.d.ts +4 -4
  84. package/types/src/DualListbox/ListboxContext.d.ts +3 -3
  85. package/types/src/DualListbox/Option.d.ts +2 -2
  86. package/types/src/DualListbox/ToolbarButton.d.ts +3 -3
  87. package/types/src/DualListbox/ToolbarContext.d.ts +3 -3
  88. package/types/src/EventListener/EventListener.d.ts +1 -1
  89. package/types/src/File/File.d.ts +8 -8
  90. package/types/src/File/Item.d.ts +2 -2
  91. package/types/src/FormRows/FormRows.d.ts +6 -6
  92. package/types/src/FormRows/Row.d.ts +2 -2
  93. package/types/src/FormRows/RowInternal.d.ts +1 -1
  94. package/types/src/FormRows/SortableList.d.ts +1 -1
  95. package/types/src/FormRows/SortableRow.d.ts +3 -3
  96. package/types/src/Heading/Heading.d.ts +2 -2
  97. package/types/src/Image/Image.d.ts +2 -2
  98. package/types/src/JSONTree/JSONTree.d.ts +6 -6
  99. package/types/src/JSONTree/JSONTreeItem.d.ts +3 -3
  100. package/types/src/JSONTree/renderTreeItems.d.ts +1 -1
  101. package/types/src/Layer/Layer.d.ts +3 -3
  102. package/types/src/Link/Link.d.ts +4 -4
  103. package/types/src/List/Item.d.ts +1 -1
  104. package/types/src/List/List.d.ts +3 -3
  105. package/types/src/Markdown/Markdown.d.ts +18 -12
  106. package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +1 -1
  107. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  108. package/types/src/Markdown/renderers/MarkdownCode.d.ts +1 -1
  109. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  110. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  111. package/types/src/Markdown/renderers/MarkdownImage.d.ts +1 -1
  112. package/types/src/Markdown/renderers/MarkdownItem.d.ts +1 -1
  113. package/types/src/Markdown/renderers/MarkdownLink.d.ts +1 -1
  114. package/types/src/Markdown/renderers/MarkdownList.d.ts +3 -3
  115. package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -1
  116. package/types/src/Menu/Divider.d.ts +1 -1
  117. package/types/src/Menu/Heading.d.ts +1 -1
  118. package/types/src/Menu/Item.d.ts +10 -10
  119. package/types/src/Menu/Menu.d.ts +9 -9
  120. package/types/src/Message/Link.d.ts +3 -3
  121. package/types/src/Message/Message.d.ts +1 -1
  122. package/types/src/MessageBar/MessageBar.d.ts +2 -2
  123. package/types/src/Modal/Body.d.ts +1 -1
  124. package/types/src/Modal/Footer.d.ts +1 -1
  125. package/types/src/Modal/Header.d.ts +1 -1
  126. package/types/src/Modal/Modal.d.ts +4 -4
  127. package/types/src/ModalLayer/ModalLayer.d.ts +3 -3
  128. package/types/src/Monogram/Monogram.d.ts +5 -5
  129. package/types/src/Multiselect/Compact.d.ts +2 -2
  130. package/types/src/Multiselect/Multiselect.d.ts +7 -7
  131. package/types/src/Multiselect/Normal.d.ts +2 -2
  132. package/types/src/Multiselect/Option.d.ts +3 -3
  133. package/types/src/Multiselect/docs/examples/Fetching.d.ts +1 -1
  134. package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +1 -1
  135. package/types/src/Number/Number.d.ts +22 -22
  136. package/types/src/Paginator/Button.d.ts +3 -3
  137. package/types/src/Paginator/Compact.d.ts +4 -4
  138. package/types/src/Paginator/PageControl.d.ts +2 -2
  139. package/types/src/Paginator/PageSelect.d.ts +2 -2
  140. package/types/src/Paginator/Paginator.d.ts +2 -2
  141. package/types/src/Paragraph/Paragraph.d.ts +1 -1
  142. package/types/src/Popover/Popover.d.ts +11 -11
  143. package/types/src/Popover/PopoverHitArea.d.ts +1 -1
  144. package/types/src/Progress/Progress.d.ts +1 -1
  145. package/types/src/RadioBar/Option.d.ts +8 -4
  146. package/types/src/RadioBar/RadioBar.d.ts +8 -8
  147. package/types/src/RadioList/Option.d.ts +1 -1
  148. package/types/src/RadioList/RadioList.d.ts +3 -3
  149. package/types/src/Resize/Resize.d.ts +4 -4
  150. package/types/src/Resize/docs/examples/Basic.d.ts +2 -0
  151. package/types/src/ResultsMenu/ResultsMenu.d.ts +7 -5
  152. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedItem.d.ts +1 -1
  153. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  154. package/types/src/ResultsMenu/VirtualizedResultsMenu/injectVirtualizedItem.d.ts +2 -2
  155. package/types/src/ScreenReaderContent/ScreenReaderContent.d.ts +2 -2
  156. package/types/src/Scroll/Inner.d.ts +3 -3
  157. package/types/src/Scroll/Scroll.d.ts +2 -2
  158. package/types/src/Search/Option.d.ts +8 -8
  159. package/types/src/Search/Search.d.ts +4 -4
  160. package/types/src/Select/Option.d.ts +2 -2
  161. package/types/src/Select/OptionBase.d.ts +8 -8
  162. package/types/src/Select/Select.d.ts +5 -5
  163. package/types/src/Select/SelectAllOption.d.ts +1 -1
  164. package/types/src/Select/SelectBase.d.ts +9 -8
  165. package/types/src/SidePanel/SidePanel.d.ts +3 -3
  166. package/types/src/Slider/Slider.d.ts +8 -8
  167. package/types/src/SlidingPanels/Panel.d.ts +2 -2
  168. package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -2
  169. package/types/src/SplitButton/Item.d.ts +2 -2
  170. package/types/src/SplitButton/SplitButton.d.ts +1 -1
  171. package/types/src/StaticContent/StaticContent.d.ts +1 -1
  172. package/types/src/StepBar/Step.d.ts +1 -1
  173. package/types/src/StepBar/StepBar.d.ts +1 -1
  174. package/types/src/Switch/Switch.d.ts +4 -8
  175. package/types/src/TabBar/Tab.d.ts +7 -8
  176. package/types/src/TabBar/TabBar.d.ts +5 -5
  177. package/types/src/TabLayout/Panel.d.ts +2 -2
  178. package/types/src/TabLayout/TabLayout.d.ts +3 -3
  179. package/types/src/Table/Body.d.ts +4 -8
  180. package/types/src/Table/Caption.d.ts +2 -2
  181. package/types/src/Table/Cell.d.ts +3 -3
  182. package/types/src/Table/DragHandle.d.ts +1 -1
  183. package/types/src/Table/Head.d.ts +6 -6
  184. package/types/src/Table/HeadCell.d.ts +9 -9
  185. package/types/src/Table/HeadDropdownCell.d.ts +11 -11
  186. package/types/src/Table/HeadInner.d.ts +5 -5
  187. package/types/src/Table/HeadTable.d.ts +2 -2
  188. package/types/src/Table/KeyboardSensor.d.ts +79 -0
  189. package/types/src/Table/Row.d.ts +12 -14
  190. package/types/src/Table/RowDragCell.d.ts +9 -40
  191. package/types/src/Table/Table.d.ts +12 -10
  192. package/types/src/Table/Toggle.d.ts +1 -1
  193. package/types/src/Table/docs/examples/FilterColumnValues.d.ts +1 -1
  194. package/types/src/Text/Text.d.ts +13 -11
  195. package/types/src/TextArea/TextArea.d.ts +10 -10
  196. package/types/src/Tooltip/Tooltip.d.ts +9 -9
  197. package/types/src/TransitionOpen/TransitionOpen.d.ts +2 -2
  198. package/types/src/Tree/Tree.d.ts +3 -3
  199. package/types/src/Tree/TreeItem.d.ts +4 -4
  200. package/types/src/Typography/Typography.d.ts +5 -5
  201. package/types/src/WaitSpinner/WaitSpinner.d.ts +1 -1
  202. package/types/src/fixtures/FetchOptions.d.ts +2 -2
  203. package/types/src/useKeyPress/index.d.ts +2 -2
  204. package/types/src/utils/types.d.ts +4 -4
  205. package/types/src/Divider/docs/examples/AriaHidden.d.ts +0 -2
  206. package/types/src/Resize/docs/examples/Typical.d.ts +0 -2
package/Accordion.js CHANGED
@@ -330,6 +330,7 @@
330
330
  children: a().node,
331
331
  defaultOpenPanelId: a().any,
332
332
  elementRef: a().oneOfType([ a().func, a().object ]),
333
+ inset: a().bool,
333
334
  onChange: a().func,
334
335
  openPanelId: a().any
335
336
  };
package/CHANGELOG.md CHANGED
@@ -1,15 +1,51 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 4.31.0 - May 16, 2024
5
+ ----------
6
+ New Features:
7
+ * `Divider` has a new `decorative` prop for disabling the default semantics of `role="separator"`.
8
+
9
+ Bug Fixes:
10
+ * `SidePanel` incorrectly rendered the overlay mask when `useLayerForClickAway={false}`. This has been fixed (SUI-6260).
11
+
12
+ 4.30.0 - May 6, 2024
13
+ ----------
14
+ New Features:
15
+ * `Clickable`'s `NavigationProvider` now accepts a `transformUrl` prop for modifying the URL (SUI-5291).
16
+
17
+ Bug Fixes:
18
+ * `Table.Row` keyboard reordering now works correctly and provides accessible info (SUI-2527).
19
+ * `Search`'s `aria-*` attributes have been corrected (SUI-6110):
20
+ * `aria-expanded` is no longer added when there are no `Option`s
21
+ * `aria-activedescendant` is no longer added when `Option`s are hidden or when no `Option` is active
22
+ * `aria-controls` now refers to the correct element
23
+ * `Combobox` no longer adds the `aria-activedescendant` attribute when no `Option` is active (SUI-6110).
24
+ * `Multiselect` with `compact` now applies `aria-multiselectable` and `aria-controls` to the correct element (SUI-6105).
25
+ * `Multiselect` with `compact` no longer adds `aria-activedescendant` when `Option`s are hidden (SUI-6105).
26
+ * `Paginator`'s font weights and text colors have been updated to improve the perceivability of the current page (SUI-5850).
27
+ * `Text`'s `appearance` prop has been deprecated and will be removed in the next major version (SUI-5978).
28
+ * `Message`'s `type` is now announced to screen readers (SUI-5949).
29
+ * `Card` now has a visible focus indicator when selectable or clickable (SUI-2829).
30
+ * `Date` can now be styled with `styled-components` (SUI-6168).
31
+ * `Code`'s syntax highlighting colors in the Enterprise dark theme now have improved contrast (WCAG SC 1.4.3) (SUI-3573).
32
+ * `StepBar`'s text color in the Enterprise light theme now has improved contrast (WCAG SC 1.4.3) (SUI-6198).
33
+ * `Menu.Item`'s selected icon now aligns with the top of the label (SUI-6115).
34
+ * Fixed a bug in `SingleOpenPanelGroup` where a `CollapsiblePanel` would fire the incorrect action callback (SUI-6239).
35
+
36
+ Deprecations:
37
+ * `NavigationProvider`'s `prefix` prop has been deprecated and will be removed in the next major version. Use the `transformUrl` prop instead. (SUI-6239)
38
+
4
39
  4.29.0 - April 2, 2024
5
40
  ----------
6
41
  Bug Fixes:
7
42
  * Removable `Chip` screen reader announcement has been improved (SUI-5948).
8
43
  * `ComboBox` no longer incorrectly sets the `aria-activedescendant` attribute when closed (SUI-6108).
9
44
  * `Multiselect` no longer announces incorrect available actions to screen readers (SUI-6009).
45
+ * `Search` can now be styled with `styled-components`(SUI-5720).
10
46
 
11
- Docs:
12
- `MessageBar` examples updated to demonstrate method for labelling the component to meet WAI-ARIA specification (SUI-5941).
47
+ Docs:
48
+ * `MessageBar` examples updated to demonstrate method for labelling the component to meet WAI-ARIA specification (SUI-5941).
13
49
 
14
50
  Deprecations:
15
51
  * `WaitSpinner`'s `children` prop has been deprecated and will be removed in the next major version (SUI-6081).
@@ -92,6 +128,7 @@ Bug Fixes:
92
128
  * `TextArea` has consistent height when rendering rows regardless if value is present.
93
129
  * Fixed spurious deprecation warnings for `canClear` and `placeholder` props in `TextArea`.
94
130
  * Fixed regression in `TextArea` where placeholder text could be cut off.
131
+ * Improved the row drag and drop experience and performance by adopting `@dnd-kit` in `Table` component (SUI-5134).
95
132
 
96
133
  API Changes:
97
134
  * Corrected the type of `Modal`'s `initialFocus` prop to include `React.Component & { focus: () => void }` instead of `React.Component & { focus: () => {} }`.
@@ -125,7 +162,6 @@ New Features:
125
162
  Bug Fixes:
126
163
  * The system color picker for `Color` no longer closes unexpectedly during color selection in Safari (SUI-5831).
127
164
  * `ComboBox`'s options are no longer clickable while closing (SUI-5825).
128
- * Improved the row drag and drop experience and performance by adopting `@dnd-kit` in `Table` component (SUI-5134).
129
165
 
130
166
  Deprecations:
131
167
  * `JSONTree`'s `expandChildren="withShiftModifier"` value has been deprecated and will be removed in a future major version. Use the `expandChildrenOnShiftKey` prop instead (SUI-5771).
package/Card.js CHANGED
@@ -62,7 +62,7 @@
62
62
  // EXPORTS
63
63
  e.d(r, {
64
64
  Body: () => /* reexport */ m,
65
- Footer: () => /* reexport */ S,
65
+ Footer: () => /* reexport */ k,
66
66
  Header: () => /* reexport */ Q,
67
67
  default: () => /* reexport */ Be
68
68
  });
@@ -224,7 +224,7 @@
224
224
  };
225
225
  /**
226
226
  * A styled container for `Card` footer content.
227
- */ function k(e) {
227
+ */ function S(e) {
228
228
  var r = e.children, t = e.showBorder, o = t === void 0 ? true : t, i = w(e, [ "children", "showBorder" ]);
229
229
  // @docs-props-type FooterPropsBase
230
230
 
@@ -233,8 +233,8 @@
233
233
  $showTopBorder: o
234
234
  }, i), r);
235
235
  }
236
- k.propTypes = x;
237
- /* harmony default export */ const S = k;
236
+ S.propTypes = x;
237
+ /* harmony default export */ const k = S;
238
238
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
239
239
  const j = require("@splunk/ui-utils/i18n");
240
240
  // CONCATENATED MODULE: external "@splunk/react-icons/DotsThreeVertical"
@@ -437,7 +437,7 @@
437
437
  prisma: (0, a.css)([ "box-shadow:", ";background-color:", ";" ], u.variables.embossShadow, u.mixins.overlayColors(u.variables.backgroundColorSection, u.variables.interactiveColorOverlayHover))
438
438
  }), (0, u.pick)({
439
439
  enterprise: (0, a.css)([ "box-shadow:", ";" ], u.variables.focusShadow),
440
- prisma: (0, a.css)([ "box-shadow:", ";background-color:", ";" ], u.variables.embossShadow, u.mixins.overlayColors(u.variables.backgroundColorSection, u.variables.interactiveColorOverlayHover))
440
+ prisma: (0, a.css)([ "box-shadow:", ",", ";background-color:", ";" ], u.variables.embossShadow, u.variables.focusShadow, u.mixins.overlayColors(u.variables.backgroundColorSection, u.variables.interactiveColorOverlayHover))
441
441
  }));
442
442
  var re = ee.withComponent(Y());
443
443
  /* A child element we add to <button>s to make flexbox work.
@@ -625,7 +625,7 @@
625
625
  var t = arguments[r] != null ? arguments[r] : {};
626
626
  if (r % 2) {
627
627
  Oe(Object(t), true).forEach((function(r) {
628
- ke(e, r, t[r]);
628
+ Se(e, r, t[r]);
629
629
  }));
630
630
  } else if (Object.getOwnPropertyDescriptors) {
631
631
  Object.defineProperties(e, Object.getOwnPropertyDescriptors(t));
@@ -637,7 +637,7 @@
637
637
  }
638
638
  return e;
639
639
  }
640
- function ke(e, r, t) {
640
+ function Se(e, r, t) {
641
641
  if (r in e) {
642
642
  Object.defineProperty(e, r, {
643
643
  value: t,
@@ -650,7 +650,7 @@
650
650
  }
651
651
  return e;
652
652
  }
653
- function Se(e, r) {
653
+ function ke(e, r) {
654
654
  if (e == null) return {};
655
655
  var t = je(e, r);
656
656
  var n, o;
@@ -702,7 +702,7 @@
702
702
  return !!e.onClick || !!e.to;
703
703
  }
704
704
  function Te(e) {
705
- var r = e.margin, t = e.maxWidth, n = e.minWidth, o = e.selected, i = e.showBorder, a = e.style, l = Se(e, [ "margin", "maxWidth", "minWidth", "selected", "showBorder", "style" ]);
705
+ var r = e.margin, t = e.maxWidth, n = e.minWidth, o = e.selected, i = e.showBorder, a = e.style, l = ke(e, [ "margin", "maxWidth", "minWidth", "selected", "showBorder", "style" ]);
706
706
  var c = xe({
707
707
  minWidth: n,
708
708
  maxWidth: t,
@@ -726,7 +726,7 @@
726
726
  o[i] = arguments[i];
727
727
  }
728
728
  e = r.call.apply(r, [ this ].concat(o));
729
- ke(he(e), "handleCardClick", (function(r) {
729
+ Se(he(e), "handleCardClick", (function(r) {
730
730
  var t, n;
731
731
  var o = e.props, i = o.selected, a = o.value;
732
732
  (t = (n = e.props).onClick) === null || t === void 0 ? void 0 : t.call(n, r, {
@@ -742,7 +742,7 @@
742
742
  if (_e(this.props)) {
743
743
  var r = Te(this.props), t = ie(r, 2), o = t[0], i = t[1];
744
744
  var a = o.selected, l = o.showBorder;
745
- var c = i.children, s = i.elementRef, u = i.onClick, p = i.openInNewContext, d = i.to, f = Se(i, [ "children", "elementRef", "onClick", "openInNewContext", "to" ]);
745
+ var c = i.children, s = i.elementRef, u = i.onClick, p = i.openInNewContext, d = i.to, f = ke(i, [ "children", "elementRef", "onClick", "openInNewContext", "to" ]);
746
746
 
747
747
  return n().createElement(re, oe({
748
748
  "data-clickable": true,
@@ -757,7 +757,7 @@
757
757
  }
758
758
  var b = Te(this.props), v = ie(b, 2), y = v[0], m = v[1];
759
759
  var h = y.selected, g = y.showBorder;
760
- var w = m.children, O = m.elementRef, x = Se(m, [ "children", "elementRef" ]);
760
+ var w = m.children, O = m.elementRef, x = ke(m, [ "children", "elementRef" ]);
761
761
 
762
762
  return n().createElement(ee, oe({
763
763
  $selected: h,
@@ -768,11 +768,11 @@
768
768
  } ]);
769
769
  return t;
770
770
  }(t.Component);
771
- ke(Ee, "propTypes", Ce);
772
- ke(Ee, "defaultProps", Pe);
773
- ke(Ee, "Header", Q);
774
- ke(Ee, "Body", m);
775
- ke(Ee, "Footer", S);
771
+ Se(Ee, "propTypes", Ce);
772
+ Se(Ee, "defaultProps", Pe);
773
+ Se(Ee, "Header", Q);
774
+ Se(Ee, "Body", m);
775
+ Se(Ee, "Footer", k);
776
776
  /* harmony default export */ const Be = Ee;
777
777
  // CONCATENATED MODULE: ./src/Card/index.ts
778
778
  module.exports = r;
package/Chip.js CHANGED
@@ -99,7 +99,7 @@
99
99
  var $ = C().div.withConfig({
100
100
  displayName: "ChipStyles__StyledBasic",
101
101
  componentId: "sc-1sd3tsh-0"
102
- })([ "", ";background-color:", ";border:1px solid transparent;flex:0 1 auto;max-width:calc(100% - 3px);border-radius:2px;", ";", " ", " ", "" ], b.mixins.reset("inline-flex"), (0,
102
+ })([ "", ";background-color:", ";border:1px solid transparent;flex:0 1 auto;max-width:calc(100% - 3px);border-radius:2px;", " ", " ", "" ], b.mixins.reset("inline-flex"), (0,
103
103
  b.pickVariant)("$appearance", {
104
104
  default: {
105
105
  enterprise: {
@@ -128,14 +128,14 @@
128
128
  var a = r.$backgroundColor;
129
129
  return a;
130
130
  }
131
- }), (function(e) {
132
- var r = e.$appearance;
133
- return r === "outline" && (0, h.css)([ "border-color:", ";" ], b.variables.interactiveColorBorder);
134
131
  }), (0, b.pick)({
135
132
  enterprise: (0, h.css)([ "color:", ";line-height:", ";margin:0 2px 2px 0;" ], b.variables.textGray, b.variables.lineHeight),
136
- prisma: (0, h.css)([ "color:", ";line-height:16px;margin:1px;" ], (function(e) {
133
+ prisma: (0, h.css)([ "color:", ";line-height:16px;margin:1px;", "" ], (function(e) {
137
134
  var r = e.$appearance;
138
135
  return r === "error" ? b.variables.contentColorInverted : b.variables.contentColorDefault;
136
+ }), (function(e) {
137
+ var r = e.$appearance;
138
+ return r === "outline" && (0, h.css)([ "border-color:", ";" ], b.variables.interactiveColorBorder);
139
139
  }))
140
140
  }), (0, b.pick)({
141
141
  enterprise: {
package/Clickable.js CHANGED
@@ -63,8 +63,9 @@
63
63
  e.d(t, {
64
64
  NavigationContext: () => /* reexport */ h,
65
65
  NavigationProvider: () => /* reexport */ m,
66
- default: () => /* reexport */ G,
67
- isInternalLink: () => /* reexport */ z
66
+ default: () => /* reexport */ F,
67
+ isInternalLink: () => /* reexport */ z,
68
+ isRootRelativeLink: () => /* reexport */ L
68
69
  });
69
70
  // CONCATENATED MODULE: external "react"
70
71
  const n = require("react");
@@ -76,10 +77,10 @@
76
77
  const l = require("lodash/has");
77
78
  // CONCATENATED MODULE: external "lodash/isString"
78
79
  const a = require("lodash/isString");
79
- var c = e.n(a);
80
+ var u = e.n(a);
80
81
  // CONCATENATED MODULE: external "lodash/omit"
81
- const u = require("lodash/omit");
82
- var f = e.n(u);
82
+ const c = require("lodash/omit");
83
+ var f = e.n(c);
83
84
  // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
84
85
  const s = require("@splunk/react-ui/Dropdown");
85
86
  // CONCATENATED MODULE: external "styled-components"
@@ -88,33 +89,49 @@
88
89
  // CONCATENATED MODULE: external "@splunk/themes"
89
90
  const b = require("@splunk/themes");
90
91
  // CONCATENATED MODULE: ./src/Clickable/ClickableStyles.ts
91
- var y = d().a.withConfig({
92
+ var v = d().a.withConfig({
92
93
  displayName: "ClickableStyles__StyledA",
93
94
  componentId: "sc-7al1vw-0"
94
95
  })([ "", " cursor:pointer;&[disabled],&[aria-disabled='true']{color:", ";}&::-moz-focus-inner{border:0;padding:0;}" ], b.mixins.reset("inline"), b.variables.contentColorDisabled);
95
96
  // CONCATENATED MODULE: ./src/Clickable/NavigationProvider.tsx
96
97
  /** @public */
97
- var v = {
98
+ var y = {
98
99
  children: i().node,
99
100
  onClick: i().func,
100
- prefix: i().string
101
+ prefix: i().string,
102
+ transformUrl: i().func
101
103
  };
102
104
  var h = r().createContext({});
103
105
  /**
104
106
  * Used to provide an override for the `onClick` for links for single page applications so that
105
107
  * internal links can navigate without a page reload.
106
108
  */ function m(e) {
107
- var t = e.children, n = e.onClick, o = e.prefix;
109
+ var t = e.children, o = e.onClick, i = e.prefix, l = e.transformUrl;
108
110
  // @docs-props-type NavigationProviderProps
109
-
110
- return r().createElement(h.Provider, {
111
- value: {
112
- onClick: n,
113
- prefix: o
111
+ var a = (0, n.useMemo)((function() {
112
+ var e;
113
+ if (l != null) {
114
+ if (false) {}
115
+ e = l;
116
+ } else if (i != null) {
117
+ if (false) {}
118
+ e = function e() {
119
+ var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
120
+ var n = arguments.length > 1 ? arguments[1] : undefined, r = n.isInternal, o = n.isRootRelative;
121
+ return i != null && r && o ? "".concat(i).concat(t) : t;
122
+ };
114
123
  }
124
+ return {
125
+ onClick: o,
126
+ transformUrl: e
127
+ };
128
+ }), [ o, i, l ]);
129
+
130
+ return r().createElement(h.Provider, {
131
+ value: a
115
132
  }, t);
116
133
  }
117
- m.propTypes = v;
134
+ m.propTypes = y;
118
135
  // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
119
136
  /**
120
137
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
@@ -135,21 +152,21 @@
135
152
  }
136
153
  }
137
154
  // CONCATENATED MODULE: ./src/Clickable/Clickable.tsx
138
- function O(e) {
155
+ function k(e) {
139
156
  "@babel/helpers - typeof";
140
157
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
141
- O = function e(t) {
158
+ k = function e(t) {
142
159
  return typeof t;
143
160
  };
144
161
  } else {
145
- O = function e(t) {
162
+ k = function e(t) {
146
163
  return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
147
164
  };
148
165
  }
149
- return O(e);
166
+ return k(e);
150
167
  }
151
- function k() {
152
- k = Object.assign || function(e) {
168
+ function O() {
169
+ O = Object.assign || function(e) {
153
170
  for (var t = 1; t < arguments.length; t++) {
154
171
  var n = arguments[t];
155
172
  for (var r in n) {
@@ -160,7 +177,7 @@
160
177
  }
161
178
  return e;
162
179
  };
163
- return k.apply(this, arguments);
180
+ return O.apply(this, arguments);
164
181
  }
165
182
  function C(e, t) {
166
183
  if (e == null) return {};
@@ -203,12 +220,12 @@
203
220
  Object.defineProperty(e, r.key, r);
204
221
  }
205
222
  }
206
- function P(e, t, n) {
223
+ function R(e, t, n) {
207
224
  if (t) j(e.prototype, t);
208
225
  if (n) j(e, n);
209
226
  return e;
210
227
  }
211
- function S(e, t) {
228
+ function P(e, t) {
212
229
  if (typeof t !== "function" && t !== null) {
213
230
  throw new TypeError("Super expression must either be null or a function");
214
231
  }
@@ -219,21 +236,21 @@
219
236
  configurable: true
220
237
  }
221
238
  });
222
- if (t) _(e, t);
239
+ if (t) S(e, t);
223
240
  }
224
- function _(e, t) {
225
- _ = Object.setPrototypeOf || function e(t, n) {
241
+ function S(e, t) {
242
+ S = Object.setPrototypeOf || function e(t, n) {
226
243
  t.__proto__ = n;
227
244
  return t;
228
245
  };
229
- return _(e, t);
246
+ return S(e, t);
230
247
  }
231
- function R(e) {
232
- var t = T();
248
+ function _(e) {
249
+ var t = N();
233
250
  return function n() {
234
- var r = q(e), o;
251
+ var r = M(e), o;
235
252
  if (t) {
236
- var i = q(this).constructor;
253
+ var i = M(this).constructor;
237
254
  o = Reflect.construct(r, arguments, i);
238
255
  } else {
239
256
  o = r.apply(this, arguments);
@@ -242,18 +259,18 @@
242
259
  };
243
260
  }
244
261
  function I(e, t) {
245
- if (t && (O(t) === "object" || typeof t === "function")) {
262
+ if (t && (k(t) === "object" || typeof t === "function")) {
246
263
  return t;
247
264
  }
248
- return N(e);
265
+ return T(e);
249
266
  }
250
- function N(e) {
267
+ function T(e) {
251
268
  if (e === void 0) {
252
269
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
253
270
  }
254
271
  return e;
255
272
  }
256
- function T() {
273
+ function N() {
257
274
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
258
275
  if (Reflect.construct.sham) return false;
259
276
  if (typeof Proxy === "function") return true;
@@ -264,13 +281,13 @@
264
281
  return false;
265
282
  }
266
283
  }
267
- function q(e) {
268
- q = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
284
+ function M(e) {
285
+ M = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
269
286
  return t.__proto__ || Object.getPrototypeOf(t);
270
287
  };
271
- return q(e);
288
+ return M(e);
272
289
  }
273
- function E(e, t, n) {
290
+ function q(e, t, n) {
274
291
  if (t in e) {
275
292
  Object.defineProperty(e, t, {
276
293
  value: n,
@@ -283,11 +300,14 @@
283
300
  }
284
301
  return e;
285
302
  }
286
- var M = /^[a-z0-9]+:/;
287
- var D = /^\/\//;
288
- var L = /^\//;
303
+ var E = /^[a-z0-9]+:/;
304
+ var U = /^\/\//;
305
+ var D = /^\//;
306
+ var L = function e(t) {
307
+ return t != null && D.test(t);
308
+ };
289
309
  var z = function e(t) {
290
- return t != null && !M.test(t) && !D.test(t);
310
+ return t != null && !E.test(t) && !U.test(t);
291
311
  };
292
312
  var H = {
293
313
  /** @private */
@@ -307,30 +327,24 @@
307
327
  function A(e) {
308
328
  return !!e.to && !e.disabled;
309
329
  }
310
- function B(e, t) {
311
- if (t != null && z(e) && L.test(e)) {
312
- return "".concat(t).concat(e);
313
- }
314
- return e;
315
- }
316
330
  /**
317
331
  * `Clickable` renders as a `button` element, or as an `a` element if the `to` prop is set
318
332
  * and the `disabled` prop is `false`. This is called link mode.
319
- */ var F = function(e) {
320
- S(n, e);
321
- var t = R(n);
333
+ */ var B = function(e) {
334
+ P(n, e);
335
+ var t = _(n);
322
336
  // @docs-props-type ClickablePropsBase
323
337
  // should use ClickablePropsBase but fails on refs - observe
324
338
  function n(e) {
325
339
  var r;
326
340
  x(this, n);
327
341
  r = t.call(this, e);
328
- E(N(r), "el", null);
329
- E(N(r), "handleMount", (function(e) {
342
+ q(T(r), "el", null);
343
+ q(T(r), "handleMount", (function(e) {
330
344
  r.el = e;
331
345
  g(r.props.elementRef, e);
332
346
  }));
333
- E(N(r), "createHandleOnClick", (function(e) {
347
+ q(T(r), "createHandleOnClick", (function(e) {
334
348
  return function(t) {
335
349
  if (A(r.props)) {
336
350
  // when user command-click on mac or ctrl-click on other platforms, and
@@ -346,24 +360,30 @@
346
360
  if (r.props.onClick) {
347
361
  r.props.onClick(t);
348
362
  } else if (A(r.props) && e) {
349
- var n = r.context.prefix;
350
- var o = r.props.navigationLabel;
351
- if (!o && c()(r.props.children)) {
352
- o = r.props.children;
363
+ var n = r.props.navigationLabel;
364
+ if (!n && u()(r.props.children)) {
365
+ n = r.props.children;
353
366
  }
354
367
  e(t, {
355
- to: B(r.props.to, n),
368
+ to: r.getTransformedUrl(r.props.to),
356
369
  originalTo: r.props.to,
357
370
  openInNewContext: r.props.openInNewContext,
358
- label: o
371
+ label: n
359
372
  });
360
373
  }
361
374
  };
362
375
  }));
376
+ q(T(r), "getTransformedUrl", (function(e) {
377
+ var t = r.context.transformUrl;
378
+ return t != null ? t(e, {
379
+ isInternal: z(e),
380
+ isRootRelative: L(e)
381
+ }) : e;
382
+ }));
363
383
  if (false) {}
364
384
  return r;
365
385
  }
366
- P(n, [ {
386
+ R(n, [ {
367
387
  key: "focus",
368
388
  /**
369
389
  * Place focus on the element.
@@ -375,54 +395,54 @@
375
395
  }, {
376
396
  key: "render",
377
397
  value: function e() {
378
- var t = this.context, n = t.onClick, o = t.prefix;
379
- var i = this.createHandleOnClick(n);
398
+ var t = this.context.onClick;
399
+ var n = this.createHandleOnClick(t);
380
400
  // Only set the href attribute when enabled, and therefore using an <a> tag
381
401
  if (A(this.props)) {
382
- var l = this.props, a = l.children, c = l.openInNewContext, u = l.to, s = C(l, [ "children", "openInNewContext", "to" ]);
383
- var p = c ? "_blank" : undefined;
384
- var d = c && z(u) ? "noopener noreferrer" : undefined;
402
+ var o = this.props, i = o.children, l = o.openInNewContext, a = o.to, u = C(o, [ "children", "openInNewContext", "to" ]);
403
+ var c = l ? "_blank" : undefined;
404
+ var s = l && z(a) ? "noopener noreferrer" : undefined;
385
405
 
386
- return r().createElement(y, k({
406
+ return r().createElement(v, O({
387
407
  "data-test": "clickable",
388
408
  ref: this.handleMount,
389
- href: B(this.props.to, o),
390
- target: p,
391
- rel: d,
392
- onClick: i
393
- }, f()(s, "disabled", "elementRef", "onClick")), a);
409
+ href: this.getTransformedUrl(this.props.to),
410
+ target: c,
411
+ rel: s,
412
+ onClick: n
413
+ }, f()(u, "disabled", "elementRef", "onClick")), i);
394
414
  }
395
415
  if (this.props.allowDisabledLink) {
396
- var b = this.props, v = b.children, h = C(b, [ "children" ]);
416
+ var p = this.props, d = p.children, b = C(p, [ "children" ]);
397
417
  if (this.props.disabled && this.props.to != null) {
398
418
 
399
- return r().createElement(y, k({
419
+ return r().createElement(v, O({
400
420
  "data-test": "clickable",
401
421
  ref: this.handleMount,
402
422
  role: "link",
403
423
  "aria-disabled": "true"
404
- }, f()(h, "href", "to", "elementRef", "onClick", "disabled")), v);
424
+ }, f()(b, "href", "to", "elementRef", "onClick", "disabled")), d);
405
425
  }
406
426
  }
407
427
  // button variant
408
- var m = this.props, g = m.children, O = m.type, w = C(m, [ "children", "type" ]);
428
+ var y = this.props, h = y.children, m = y.type, g = C(y, [ "children", "type" ]);
409
429
 
410
- return r().createElement(y, k({
430
+ return r().createElement(v, O({
411
431
  as: "button",
412
432
  "data-test": "clickable",
413
433
  ref: this.handleMount,
414
- type: O || "button",
415
- onClick: i
416
- }, f()(w, "elementRef", "onClick", "openInNewContext", "to")), g);
434
+ type: m || "button",
435
+ onClick: n
436
+ }, f()(g, "elementRef", "onClick", "openInNewContext", "to")), h);
417
437
  }
418
438
  } ]);
419
439
  return n;
420
440
  }(n.Component);
421
- E(F, "contextType", h);
422
- E(F, "propTypes", H);
423
- E(F, "defaultProps", K);
424
- E(F, s.legacyRefMode, true);
425
- /* harmony default export */ const G = F;
441
+ q(B, "contextType", h);
442
+ q(B, "propTypes", H);
443
+ q(B, "defaultProps", K);
444
+ q(B, s.legacyRefMode, true);
445
+ /* harmony default export */ const F = B;
426
446
  // CONCATENATED MODULE: ./src/Clickable/index.ts
427
447
  module.exports = t;
428
448
  /******/})();