@splunk/react-ui 4.5.3 → 4.6.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 (87) hide show
  1. package/Accordion.js +4 -4
  2. package/Anchor.js +2 -2
  3. package/Animation.js +2 -2
  4. package/AnimationToggle.js +2 -2
  5. package/Box.js +2 -2
  6. package/Button.js +8 -8
  7. package/ButtonGroup.js +4 -4
  8. package/ButtonSimple.js +2 -2
  9. package/CHANGELOG.md +17 -1
  10. package/Calendar.js +6 -6
  11. package/Card.js +25 -30
  12. package/CardLayout.js +4 -4
  13. package/Chip.js +2 -2
  14. package/Clickable.js +39 -13
  15. package/CloseButton.js +4 -4
  16. package/Code.js +8 -7
  17. package/CollapsiblePanel.js +6 -9
  18. package/Color.js +42 -42
  19. package/ColumnLayout.js +4 -4
  20. package/ComboBox.js +2 -2
  21. package/Concertina.js +4 -4
  22. package/ControlGroup.js +22 -29
  23. package/Date.js +4 -4
  24. package/DefinitionList.js +2 -2
  25. package/Dropdown.js +2 -2
  26. package/EventListener.js +4 -4
  27. package/FetchOptions.js +8 -8
  28. package/File.js +7 -7
  29. package/FormRows.js +16 -18
  30. package/Heading.js +2 -2
  31. package/Image.js +6 -6
  32. package/JSONTree.js +2 -2
  33. package/Layer.js +8 -8
  34. package/Link.js +4 -4
  35. package/List.js +2 -2
  36. package/Markdown.js +26 -14
  37. package/Menu.js +17 -17
  38. package/Message.js +10 -10
  39. package/Modal.js +43 -14
  40. package/ModalLayer.js +4 -4
  41. package/Monogram.js +2 -2
  42. package/Multiselect.js +255 -13
  43. package/Number.js +2 -2
  44. package/Paginator.js +10 -10
  45. package/Paragraph.js +2 -2
  46. package/Popover.js +6 -6
  47. package/Progress.js +6 -6
  48. package/Resize.js +2 -2
  49. package/ResultsMenu.js +6 -6
  50. package/ScreenReaderContent.js +2 -2
  51. package/Scroll.js +2 -2
  52. package/ScrollContainerContext.js +2 -2
  53. package/Search.js +4 -4
  54. package/Select.js +254 -13
  55. package/SidePanel.js +6 -6
  56. package/Slider.js +12 -6
  57. package/SlidingPanels.js +2 -2
  58. package/StaticContent.js +2 -2
  59. package/StepBar.js +6 -6
  60. package/Switch.js +4 -4
  61. package/TabLayout.js +4 -4
  62. package/Table.js +37 -36
  63. package/Text.js +144 -127
  64. package/Tooltip.js +2 -2
  65. package/TransitionOpen.js +62 -37
  66. package/WaitSpinner.js +2 -2
  67. package/cypress/plugins/index.ts +15 -0
  68. package/cypress/support/commands.ts +1 -0
  69. package/cypress/support/index.ts +9 -0
  70. package/cypress.json +12 -0
  71. package/package.json +13 -4
  72. package/types/src/Clickable/Clickable.d.ts +12 -2
  73. package/types/src/Clickable/NavigationProvider.d.ts +12 -2
  74. package/types/src/Color/Color.d.ts +3 -3
  75. package/types/src/Date/Date.d.ts +3 -3
  76. package/types/src/Modal/Modal.d.ts +2 -0
  77. package/types/src/Modal/ModalContext.d.ts +6 -0
  78. package/types/src/Multiselect/Multiselect.d.ts +1 -0
  79. package/types/src/Number/Number.d.ts +3 -3
  80. package/types/src/RadioBar/RadioBar.d.ts +3 -3
  81. package/types/src/Select/Select.d.ts +8 -3
  82. package/types/src/Select/SelectBase.d.ts +16 -4
  83. package/types/src/Select/matchUtils.d.ts +12 -0
  84. package/types/src/Slider/Slider.d.ts +3 -3
  85. package/types/src/Text/Text.d.ts +12 -5
  86. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -0
  87. package/usePrevious.js +2 -2
package/Accordion.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 126);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 127);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 126:
104
+ /***/ 127:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -124,7 +124,7 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
124
124
  var external_lodash_ = __webpack_require__(4);
125
125
 
126
126
  // EXTERNAL MODULE: external "@splunk/react-ui/CollapsiblePanel"
127
- var CollapsiblePanel_ = __webpack_require__(74);
127
+ var CollapsiblePanel_ = __webpack_require__(76);
128
128
  var CollapsiblePanel_default = /*#__PURE__*/__webpack_require__.n(CollapsiblePanel_);
129
129
 
130
130
  // EXTERNAL MODULE: external "@splunk/themes"
@@ -408,7 +408,7 @@ module.exports = require("lodash");
408
408
 
409
409
  /***/ }),
410
410
 
411
- /***/ 74:
411
+ /***/ 76:
412
412
  /***/ (function(module, exports) {
413
413
 
414
414
  module.exports = require("@splunk/react-ui/CollapsiblePanel");
package/Anchor.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 143);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 144);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 143:
104
+ /***/ 144:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
package/Animation.js CHANGED
@@ -82,12 +82,12 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 169);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 170);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 169:
90
+ /***/ 170:
91
91
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
92
 
93
93
  "use strict";
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 127);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 128);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -94,7 +94,7 @@ module.exports = require("prop-types");
94
94
 
95
95
  /***/ }),
96
96
 
97
- /***/ 127:
97
+ /***/ 128:
98
98
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
99
 
100
100
  "use strict";
package/Box.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 144);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 145);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 144:
104
+ /***/ 145:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
package/Button.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 132);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 133);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 132:
104
+ /***/ 133:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -135,7 +135,7 @@ var style_ = __webpack_require__(39);
135
135
  var CaretDown = __webpack_require__(36);
136
136
 
137
137
  // EXTERNAL MODULE: external "@splunk/react-icons/External"
138
- var External_ = __webpack_require__(52);
138
+ var External_ = __webpack_require__(54);
139
139
  var External_default = /*#__PURE__*/__webpack_require__.n(External_);
140
140
 
141
141
  // EXTERNAL MODULE: ./src/icons/ThemedIcon.tsx
@@ -170,14 +170,14 @@ function External(props) {
170
170
  }, props));
171
171
  }
172
172
  // EXTERNAL MODULE: ./src/ButtonGroup/ButtonGroupContext.tsx
173
- var ButtonGroupContext = __webpack_require__(53);
173
+ var ButtonGroupContext = __webpack_require__(55);
174
174
 
175
175
  // EXTERNAL MODULE: external "styled-components"
176
176
  var external_styled_components_ = __webpack_require__(3);
177
177
  var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
178
178
 
179
179
  // EXTERNAL MODULE: external "@splunk/react-ui/ButtonSimple"
180
- var ButtonSimple_ = __webpack_require__(43);
180
+ var ButtonSimple_ = __webpack_require__(44);
181
181
  var ButtonSimple_default = /*#__PURE__*/__webpack_require__.n(ButtonSimple_);
182
182
 
183
183
  // EXTERNAL MODULE: external "@splunk/themes"
@@ -605,7 +605,7 @@ module.exports = require("lodash");
605
605
 
606
606
  /***/ }),
607
607
 
608
- /***/ 43:
608
+ /***/ 44:
609
609
  /***/ (function(module, exports) {
610
610
 
611
611
  module.exports = require("@splunk/react-ui/ButtonSimple");
@@ -619,14 +619,14 @@ module.exports = require("@splunk/ui-utils/i18n");
619
619
 
620
620
  /***/ }),
621
621
 
622
- /***/ 52:
622
+ /***/ 54:
623
623
  /***/ (function(module, exports) {
624
624
 
625
625
  module.exports = require("@splunk/react-icons/External");
626
626
 
627
627
  /***/ }),
628
628
 
629
- /***/ 53:
629
+ /***/ 55:
630
630
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
631
631
 
632
632
  "use strict";
package/ButtonGroup.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 145);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 146);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 145:
104
+ /***/ 146:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -143,7 +143,7 @@ var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
143
143
  }));
144
144
 
145
145
  // EXTERNAL MODULE: ./src/ButtonGroup/ButtonGroupContext.tsx
146
- var ButtonGroupContext = __webpack_require__(53);
146
+ var ButtonGroupContext = __webpack_require__(55);
147
147
 
148
148
  // CONCATENATED MODULE: ./src/ButtonGroup/ButtonGroup.tsx
149
149
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -210,7 +210,7 @@ module.exports = require("styled-components");
210
210
 
211
211
  /***/ }),
212
212
 
213
- /***/ 53:
213
+ /***/ 55:
214
214
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
215
215
 
216
216
  "use strict";
package/ButtonSimple.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 128);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 129);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -108,7 +108,7 @@ module.exports = require("@splunk/react-ui/Clickable");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 128:
111
+ /***/ 129:
112
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
113
 
114
114
  "use strict";
package/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 4.6.0 - April 5, 2002
5
+ ----------
6
+ New Features:
7
+ * Updated the `File` uploader descriptive button text from `browse...` to `upload file` (SUI-3275).
8
+ * `Clickable` now supports the `navigationLabel` prop to provide `data.label` to the `onClick` handler (SUI-3123).
9
+ * Added `onInputClick` prop to `Text` component (SUI-2801).
10
+
11
+ Bug Fixes:
12
+ * `NavigationProvider`'s `value` now has the the same shape as other provider values.
13
+ * `TransitionOpen`'s slide transitions now consistently use transforms instead of animating dimensions (SUI-3328).
14
+ * `FormRows`'s inside a `Modal` now display correctly when being sorted (SUI-3416).
15
+ * Focus on `FormRows` drag handle is now visible in Prisma themes (SUI-3415).
16
+ * `Modal`'s title is now read by screen reader.
17
+ * `Card` will no longer render with different dimensions depending on the combination of `to` and `onClick` props.
18
+
4
19
  4.5.3 - March 15, 2022
5
20
  ----------
6
21
  Bug Fixes:
@@ -15,7 +30,7 @@ Bug Fixes:
15
30
 
16
31
  `styled-components@5.2.0` changed how selectors like `& + &` are compiled; [styled-components PR#3236](https://github.com/styled-components/styled-components/pull/3236).
17
32
  This breaks styles that worked in previous versions of styled-components; [styled-components issue #3265](https://github.com/styled-components/styled-components/issues/3265).
18
-
33
+
19
34
  **Until noted otherwise in a future release of `@splunk/react-ui` do not use `styled-components@^5.2.0` with` @splunk/react-ui`**.
20
35
 
21
36
  4.5.1 - March 1, 2022
@@ -38,6 +53,7 @@ New Features:
38
53
  * `Color`'s `defaultPalette` is now extrapolated from 8 base colors by `tinycolor2` to form the rest of the palette (SUI-2466).
39
54
  * Redundant `Table.HeadCell` indicators for sortable columns in Prisma themes have been replaced with the icons that matches the existing sort arrows. Note: column widths may be affected by this change (SUI-2547).
40
55
  * `Table` now supports `rowExpansion="controlled"` to allow for customization of expanded row state (SUI-2649).
56
+ * `Select` now supports jumping to the first matching item when a character key is pressed as long as `filter=false` and the control is not currently loading data. This behavior can be disabled with `allowKeyMatching=false`
41
57
 
42
58
  Bug Fixes:
43
59
  * Updated `Chip` styles to grid to fix misalignment (SUI-2706).
package/Calendar.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 112);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 114);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -108,7 +108,7 @@ module.exports = require("@splunk/ui-utils/id");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 112:
111
+ /***/ 114:
112
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
113
 
114
114
  "use strict";
@@ -403,7 +403,7 @@ var Button_default = /*#__PURE__*/__webpack_require__.n(Button_);
403
403
  var i18n_ = __webpack_require__(5);
404
404
 
405
405
  // EXTERNAL MODULE: ./src/icons/ChevronLeft.tsx
406
- var ChevronLeft = __webpack_require__(54);
406
+ var ChevronLeft = __webpack_require__(56);
407
407
 
408
408
  // EXTERNAL MODULE: ./src/icons/ChevronRight.tsx
409
409
  var ChevronRight = __webpack_require__(27);
@@ -892,14 +892,14 @@ module.exports = require("@splunk/ui-utils/i18n");
892
892
 
893
893
  /***/ }),
894
894
 
895
- /***/ 54:
895
+ /***/ 56:
896
896
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
897
897
 
898
898
  "use strict";
899
899
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChevronLeft; });
900
900
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
901
901
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
902
- /* harmony import */ var _splunk_react_icons_ChevronLeft__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55);
902
+ /* harmony import */ var _splunk_react_icons_ChevronLeft__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
903
903
  /* harmony import */ var _splunk_react_icons_ChevronLeft__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_ChevronLeft__WEBPACK_IMPORTED_MODULE_1__);
904
904
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
905
905
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -942,7 +942,7 @@ function ChevronLeft(props) {
942
942
 
943
943
  /***/ }),
944
944
 
945
- /***/ 55:
945
+ /***/ 57:
946
946
  /***/ (function(module, exports) {
947
947
 
948
948
  module.exports = require("@splunk/react-icons/ChevronLeft");
package/Card.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 113);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 115);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 113:
104
+ /***/ 115:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -236,7 +236,7 @@ Footer.propTypes = Footer_propTypes;
236
236
  var i18n_ = __webpack_require__(5);
237
237
 
238
238
  // EXTERNAL MODULE: external "@splunk/react-ui/Anchor"
239
- var Anchor_ = __webpack_require__(75);
239
+ var Anchor_ = __webpack_require__(77);
240
240
  var Anchor_default = /*#__PURE__*/__webpack_require__.n(Anchor_);
241
241
 
242
242
  // EXTERNAL MODULE: external "@splunk/react-ui/Button"
@@ -252,7 +252,7 @@ var useSplunkTheme_ = __webpack_require__(38);
252
252
  var useSplunkTheme_default = /*#__PURE__*/__webpack_require__.n(useSplunkTheme_);
253
253
 
254
254
  // EXTERNAL MODULE: ./src/icons/MoreVertical.tsx
255
- var MoreVertical = __webpack_require__(56);
255
+ var MoreVertical = __webpack_require__(58);
256
256
 
257
257
  // CONCATENATED MODULE: ./src/Card/HeaderStyles.ts
258
258
 
@@ -388,12 +388,11 @@ var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
388
388
 
389
389
 
390
390
 
391
-
392
391
  var cardTransitionTime = '0.2s';
393
392
  var Styled = external_styled_components_default.a.div.withConfig({
394
393
  displayName: "CardStyles__Styled",
395
394
  componentId: "ola3x0-0"
396
- })(["", ";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{", "}}", ""], themes_["mixins"].reset('inline-flex'), Object(themes_["pick"])({
395
+ })(["", ";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{", "}}"], themes_["mixins"].reset('inline-flex'), Object(themes_["pick"])({
397
396
  enterprise: Object(external_styled_components_["css"])(["background-color:", ";border:1px solid transparent;"], themes_["variables"].backgroundColor),
398
397
  prisma: Object(external_styled_components_["css"])(["background-color:", ";border-radius:", ";box-shadow:", ";"], themes_["variables"].backgroundColorSection, themes_["variables"].borderRadius, themes_["variables"].embossShadow)
399
398
  }), cardTransitionTime, cardTransitionTime, cardTransitionTime, cardTransitionTime, cardTransitionTime, cardTransitionTime, cardTransitionTime, function (_ref) {
@@ -413,10 +412,7 @@ var Styled = external_styled_components_default.a.div.withConfig({
413
412
  }), Object(themes_["pick"])({
414
413
  enterprise: Object(external_styled_components_["css"])(["box-shadow:", ";"], themes_["variables"].focusShadow),
415
414
  prisma: Object(external_styled_components_["css"])(["box-shadow:", ";background-color:", ";"], themes_["variables"].embossShadow, themes_["mixins"].overlayColors(themes_["variables"].backgroundColorSection, themes_["variables"].interactiveColorOverlayHover))
416
- }), function (_ref3) {
417
- var rendersAsButton = _ref3.rendersAsButton;
418
- return rendersAsButton && Object(external_styled_components_["css"])(["& ", "{flex-basis:0;}"], StyledBox);
419
- });
415
+ }));
420
416
  var StyledClickable = Styled.withComponent(Clickable_default.a);
421
417
  /* A child element we add to <button>s to make flexbox work.
422
418
  Without this wrapper element, child elements won't flex
@@ -434,7 +430,7 @@ var StyledFirefoxFlexHack = external_styled_components_default.a.div.withConfig(
434
430
  }));
435
431
 
436
432
  // EXTERNAL MODULE: ./src/CardLayout/CardLayoutContext.tsx
437
- var CardLayoutContext = __webpack_require__(58);
433
+ var CardLayoutContext = __webpack_require__(60);
438
434
 
439
435
  // CONCATENATED MODULE: ./src/Card/Card.tsx
440
436
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
@@ -607,7 +603,6 @@ var Card_Card = /*#__PURE__*/function (_Component) {
607
603
  }, _sharedProps, _otherProps, {
608
604
  onClick: onClick ? this.handleCardClick : undefined,
609
605
  openInNewContext: openInNewContext,
610
- rendersAsButton: onClick && !to,
611
606
  to: to || undefined
612
607
  }), /*#__PURE__*/external_react_default.a.createElement(StyledFirefoxFlexHack, null, _children));
613
608
  }
@@ -704,14 +699,14 @@ module.exports = require("@splunk/ui-utils/i18n");
704
699
 
705
700
  /***/ }),
706
701
 
707
- /***/ 56:
702
+ /***/ 58:
708
703
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
709
704
 
710
705
  "use strict";
711
706
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MoreVertical; });
712
707
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
713
708
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
714
- /* harmony import */ var _splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
709
+ /* harmony import */ var _splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59);
715
710
  /* harmony import */ var _splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_MoreVertical__WEBPACK_IMPORTED_MODULE_1__);
716
711
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
717
712
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -742,27 +737,13 @@ function MoreVertical(props) {
742
737
 
743
738
  /***/ }),
744
739
 
745
- /***/ 57:
740
+ /***/ 59:
746
741
  /***/ (function(module, exports) {
747
742
 
748
743
  module.exports = require("@splunk/react-icons/MoreVertical");
749
744
 
750
745
  /***/ }),
751
746
 
752
- /***/ 58:
753
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
754
-
755
- "use strict";
756
- /* unused harmony export CardLayoutContext */
757
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
758
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
759
-
760
- var CardLayoutContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])({});
761
- CardLayoutContext.displayName = 'CardLayout';
762
- /* harmony default export */ __webpack_exports__["a"] = (CardLayoutContext);
763
-
764
- /***/ }),
765
-
766
747
  /***/ 6:
767
748
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
768
749
 
@@ -788,6 +769,20 @@ function SVG(props) {
788
769
 
789
770
  /***/ }),
790
771
 
772
+ /***/ 60:
773
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
774
+
775
+ "use strict";
776
+ /* unused harmony export CardLayoutContext */
777
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
778
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
779
+
780
+ var CardLayoutContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])({});
781
+ CardLayoutContext.displayName = 'CardLayout';
782
+ /* harmony default export */ __webpack_exports__["a"] = (CardLayoutContext);
783
+
784
+ /***/ }),
785
+
791
786
  /***/ 7:
792
787
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
793
788
 
@@ -906,7 +901,7 @@ Icon.defaultProps = defaultProps;
906
901
 
907
902
  /***/ }),
908
903
 
909
- /***/ 75:
904
+ /***/ 77:
910
905
  /***/ (function(module, exports) {
911
906
 
912
907
  module.exports = require("@splunk/react-ui/Anchor");
package/CardLayout.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 146);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 147);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 146:
104
+ /***/ 147:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -141,7 +141,7 @@ var Styled = external_styled_components_default.a.div.withConfig({
141
141
  }));
142
142
 
143
143
  // EXTERNAL MODULE: ./src/CardLayout/CardLayoutContext.tsx
144
- var CardLayoutContext = __webpack_require__(58);
144
+ var CardLayoutContext = __webpack_require__(60);
145
145
 
146
146
  // CONCATENATED MODULE: ./src/CardLayout/CardLayout.tsx
147
147
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -228,7 +228,7 @@ module.exports = require("styled-components");
228
228
 
229
229
  /***/ }),
230
230
 
231
- /***/ 58:
231
+ /***/ 60:
232
232
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
233
233
 
234
234
  "use strict";
package/Chip.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 147);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 148);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -108,7 +108,7 @@ module.exports = require("@splunk/react-ui/Clickable");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 147:
111
+ /***/ 148:
112
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
113
 
114
114
  "use strict";
package/Clickable.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 133);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 134);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -128,7 +128,7 @@ function updateReactRef(ref, current) {
128
128
 
129
129
  /***/ }),
130
130
 
131
- /***/ 133:
131
+ /***/ 134:
132
132
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
133
133
 
134
134
  "use strict";
@@ -177,9 +177,10 @@ var StyledA = external_styled_components_default.a.a.withConfig({
177
177
 
178
178
  var propTypes = {
179
179
  children: external_prop_types_default.a.node,
180
- onClick: external_prop_types_default.a.func
180
+ onClick: external_prop_types_default.a.func,
181
+ prefix: external_prop_types_default.a.string
181
182
  };
182
- var NavigationContext = /*#__PURE__*/external_react_default.a.createContext(undefined);
183
+ var NavigationContext = /*#__PURE__*/external_react_default.a.createContext({});
183
184
  /**
184
185
  * Used to provide an override for the `onClick` for links for single page applications so that
185
186
  * internal links can navigate without a page reload.
@@ -187,10 +188,14 @@ var NavigationContext = /*#__PURE__*/external_react_default.a.createContext(unde
187
188
 
188
189
  function NavigationProvider(_ref) {
189
190
  var children = _ref.children,
190
- onClick = _ref.onClick;
191
+ onClick = _ref.onClick,
192
+ prefix = _ref.prefix;
191
193
  // @docs-props-type NavigationProviderProps
192
194
  return /*#__PURE__*/external_react_default.a.createElement(NavigationContext.Provider, {
193
- value: onClick
195
+ value: {
196
+ onClick: onClick,
197
+ prefix: prefix
198
+ }
194
199
  }, children);
195
200
  }
196
201
 
@@ -239,8 +244,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
239
244
 
240
245
  var WITH_SCHEME = /^[a-z0-9]+:/;
241
246
  var SCHEME_RELATIVE = /^\/\//;
247
+ var IS_RELATIVE = /^\//;
242
248
  var isInternalLink = function isInternalLink(to) {
243
- return !WITH_SCHEME.test(to) && !SCHEME_RELATIVE.test(to);
249
+ return to != null && !WITH_SCHEME.test(to) && !SCHEME_RELATIVE.test(to);
244
250
  };
245
251
  var Clickable_propTypes = {
246
252
  children: external_prop_types_default.a.node,
@@ -248,6 +254,7 @@ var Clickable_propTypes = {
248
254
  elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
249
255
  onClick: external_prop_types_default.a.func,
250
256
  openInNewContext: external_prop_types_default.a.bool,
257
+ navigationLabel: external_prop_types_default.a.string,
251
258
  to: external_prop_types_default.a.string
252
259
  };
253
260
  var defaultProps = {
@@ -258,6 +265,14 @@ var defaultProps = {
258
265
  function isLink(props) {
259
266
  return !!props.to && !props.disabled;
260
267
  }
268
+
269
+ function getPrefixedURL(to, prefix) {
270
+ if (prefix != null && isInternalLink(to) && IS_RELATIVE.test(to)) {
271
+ return "".concat(prefix).concat(to);
272
+ }
273
+
274
+ return to;
275
+ }
261
276
  /**
262
277
  * `Clickable` renders as a `button` element, or as an `a` element if the `to` prop is set
263
278
  * and the `disabled` prop is `false`. This is called link mode.
@@ -302,9 +317,17 @@ var Clickable_Clickable = /*#__PURE__*/function (_Component) {
302
317
  if (_this.props.onClick) {
303
318
  _this.props.onClick(e);
304
319
  } else if (isLink(_this.props) && providedOnClick) {
320
+ var prefix = _this.context.prefix;
321
+ var label = _this.props.navigationLabel;
322
+
323
+ if (!label && Object(external_lodash_["isString"])(_this.props.children)) {
324
+ label = _this.props.children;
325
+ }
326
+
305
327
  providedOnClick(e, {
306
- to: _this.props.to,
307
- openInNewContext: _this.props.openInNewContext
328
+ to: getPrefixedURL(_this.props.to, prefix),
329
+ openInNewContext: _this.props.openInNewContext,
330
+ label: label
308
331
  });
309
332
  }
310
333
  };
@@ -329,7 +352,10 @@ var Clickable_Clickable = /*#__PURE__*/function (_Component) {
329
352
  }, {
330
353
  key: "render",
331
354
  value: function render() {
332
- var onClick = this.createHandleOnClick(this.context); // Only set the href attribute when enabled, and therefore using an <a> tag
355
+ var _this$context = this.context,
356
+ onClick = _this$context.onClick,
357
+ prefix = _this$context.prefix;
358
+ var handleOnClick = this.createHandleOnClick(onClick); // Only set the href attribute when enabled, and therefore using an <a> tag
333
359
 
334
360
  if (isLink(this.props)) {
335
361
  var _this$props = this.props,
@@ -343,10 +369,10 @@ var Clickable_Clickable = /*#__PURE__*/function (_Component) {
343
369
  return /*#__PURE__*/external_react_default.a.createElement(StyledA, _extends({
344
370
  "data-test": "clickable",
345
371
  ref: this.handleMount,
346
- href: to,
372
+ href: getPrefixedURL(this.props.to, prefix),
347
373
  target: target,
348
374
  rel: rel,
349
- onClick: onClick
375
+ onClick: handleOnClick
350
376
  }, Object(external_lodash_["omit"])(_otherProps, 'disabled', 'elementRef', 'onClick')), _children);
351
377
  } // button variant
352
378
 
@@ -361,7 +387,7 @@ var Clickable_Clickable = /*#__PURE__*/function (_Component) {
361
387
  "data-test": "clickable",
362
388
  ref: this.handleMount,
363
389
  type: type || 'button',
364
- onClick: onClick
390
+ onClick: handleOnClick
365
391
  }, Object(external_lodash_["omit"])(otherProps, 'elementRef', 'onClick', 'openInNewContext', 'to')), children);
366
392
  }
367
393
  }]);