@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.
- package/Accordion.js +1 -0
- package/CHANGELOG.md +39 -3
- package/Card.js +17 -17
- package/Chip.js +5 -5
- package/Clickable.js +107 -87
- package/Code.js +10 -22
- package/CollapsiblePanel.js +8 -8
- package/ComboBox.js +43 -38
- package/Date.js +6 -6
- package/Divider.js +96 -45
- package/DualListbox.js +1 -1
- package/Link.js +77 -75
- package/MIGRATION.mdx +51 -1
- package/Markdown.js +10 -9
- package/Menu.js +5 -5
- package/Message.js +160 -149
- package/ModalLayer.js +2 -1
- package/Multiselect.js +9 -6
- package/Number.js +19 -18
- package/Paginator.js +239 -223
- package/RadioBar.js +43 -39
- package/ResultsMenu.js +14 -11
- package/Search.js +227 -220
- package/Select.js +77 -72
- package/SidePanel.js +1 -1
- package/StepBar.js +1 -1
- package/Table.js +2082 -1594
- package/Text.js +1 -0
- package/TextArea.d.ts +1 -1
- package/cypress/support/component.ts +2 -2
- package/package.json +21 -20
- package/test-runner-jest.config.js +1 -0
- package/types/src/Accordion/Accordion.d.ts +3 -7
- package/types/src/Accordion/Panel.d.ts +2 -2
- package/types/src/Anchor/Anchor.d.ts +1 -1
- package/types/src/AnimationToggle/AnimationToggle.d.ts +3 -3
- package/types/src/Box/Box.d.ts +1 -1
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/types/src/Breadcrumbs/Item.d.ts +1 -1
- package/types/src/Button/Button.d.ts +5 -5
- package/types/src/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +10 -10
- package/types/src/Calendar/Calendar.d.ts +3 -3
- package/types/src/Calendar/DateTable.d.ts +2 -2
- package/types/src/Calendar/Day.d.ts +3 -3
- package/types/src/Calendar/MonthHeader.d.ts +6 -6
- package/types/src/Card/Body.d.ts +1 -1
- package/types/src/Card/Card.d.ts +6 -6
- package/types/src/Card/Footer.d.ts +1 -1
- package/types/src/Card/Header.d.ts +1 -1
- package/types/src/CardLayout/CardLayout.d.ts +4 -4
- package/types/src/Chip/Chip.d.ts +5 -5
- package/types/src/Clickable/Clickable.d.ts +12 -4
- package/types/src/Clickable/NavigationProvider.d.ts +26 -5
- package/types/src/CloseButton/CloseButton.d.ts +1 -1
- package/types/src/Code/Code.d.ts +2 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +9 -5
- package/types/src/CollapsiblePanel/SingleOpenPanelGroup.d.ts +2 -2
- package/types/src/CollapsiblePanel/docs/examples/SingleOpenPanelGroupInset.d.ts +2 -0
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -1
- package/types/src/Color/Color.d.ts +8 -8
- package/types/src/Color/Swatch.d.ts +2 -2
- package/types/src/ColumnLayout/Column.d.ts +1 -1
- package/types/src/ColumnLayout/ColumnLayout.d.ts +1 -1
- package/types/src/ColumnLayout/Row.d.ts +1 -1
- package/types/src/ComboBox/ComboBox.d.ts +7 -6
- package/types/src/ComboBox/Option.d.ts +3 -3
- package/types/src/Concertina/Concertina.d.ts +2 -2
- package/types/src/Concertina/Heading.d.ts +3 -3
- package/types/src/Concertina/Panel.d.ts +4 -4
- package/types/src/Concertina/types.d.ts +1 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +5 -5
- package/types/src/Date/Date.d.ts +10 -10
- package/types/src/DefinitionList/DefinitionList.d.ts +2 -2
- package/types/src/DefinitionList/Description.d.ts +1 -1
- package/types/src/DefinitionList/Term.d.ts +1 -1
- package/types/src/Divider/Divider.d.ts +7 -2
- package/types/src/Divider/docs/examples/Decorative.d.ts +2 -0
- package/types/src/Dropdown/Dropdown.d.ts +10 -10
- package/types/src/DualListbox/DualListbox.d.ts +4 -4
- package/types/src/DualListbox/DualListboxContext.d.ts +7 -7
- package/types/src/DualListbox/Label.d.ts +2 -2
- package/types/src/DualListbox/Listbox.d.ts +4 -4
- package/types/src/DualListbox/ListboxContext.d.ts +3 -3
- package/types/src/DualListbox/Option.d.ts +2 -2
- package/types/src/DualListbox/ToolbarButton.d.ts +3 -3
- package/types/src/DualListbox/ToolbarContext.d.ts +3 -3
- package/types/src/EventListener/EventListener.d.ts +1 -1
- package/types/src/File/File.d.ts +8 -8
- package/types/src/File/Item.d.ts +2 -2
- package/types/src/FormRows/FormRows.d.ts +6 -6
- package/types/src/FormRows/Row.d.ts +2 -2
- package/types/src/FormRows/RowInternal.d.ts +1 -1
- package/types/src/FormRows/SortableList.d.ts +1 -1
- package/types/src/FormRows/SortableRow.d.ts +3 -3
- package/types/src/Heading/Heading.d.ts +2 -2
- package/types/src/Image/Image.d.ts +2 -2
- package/types/src/JSONTree/JSONTree.d.ts +6 -6
- package/types/src/JSONTree/JSONTreeItem.d.ts +3 -3
- package/types/src/JSONTree/renderTreeItems.d.ts +1 -1
- package/types/src/Layer/Layer.d.ts +3 -3
- package/types/src/Link/Link.d.ts +4 -4
- package/types/src/List/Item.d.ts +1 -1
- package/types/src/List/List.d.ts +3 -3
- package/types/src/Markdown/Markdown.d.ts +18 -12
- package/types/src/Markdown/renderers/MarkdownAnchorHeading.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownCode.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownImage.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownItem.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownLink.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownList.d.ts +3 -3
- package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +1 -1
- package/types/src/Menu/Divider.d.ts +1 -1
- package/types/src/Menu/Heading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +10 -10
- package/types/src/Menu/Menu.d.ts +9 -9
- package/types/src/Message/Link.d.ts +3 -3
- package/types/src/Message/Message.d.ts +1 -1
- package/types/src/MessageBar/MessageBar.d.ts +2 -2
- package/types/src/Modal/Body.d.ts +1 -1
- package/types/src/Modal/Footer.d.ts +1 -1
- package/types/src/Modal/Header.d.ts +1 -1
- package/types/src/Modal/Modal.d.ts +4 -4
- package/types/src/ModalLayer/ModalLayer.d.ts +3 -3
- package/types/src/Monogram/Monogram.d.ts +5 -5
- package/types/src/Multiselect/Compact.d.ts +2 -2
- package/types/src/Multiselect/Multiselect.d.ts +7 -7
- package/types/src/Multiselect/Normal.d.ts +2 -2
- package/types/src/Multiselect/Option.d.ts +3 -3
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +1 -1
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +1 -1
- package/types/src/Number/Number.d.ts +22 -22
- package/types/src/Paginator/Button.d.ts +3 -3
- package/types/src/Paginator/Compact.d.ts +4 -4
- package/types/src/Paginator/PageControl.d.ts +2 -2
- package/types/src/Paginator/PageSelect.d.ts +2 -2
- package/types/src/Paginator/Paginator.d.ts +2 -2
- package/types/src/Paragraph/Paragraph.d.ts +1 -1
- package/types/src/Popover/Popover.d.ts +11 -11
- package/types/src/Popover/PopoverHitArea.d.ts +1 -1
- package/types/src/Progress/Progress.d.ts +1 -1
- package/types/src/RadioBar/Option.d.ts +8 -4
- package/types/src/RadioBar/RadioBar.d.ts +8 -8
- package/types/src/RadioList/Option.d.ts +1 -1
- package/types/src/RadioList/RadioList.d.ts +3 -3
- package/types/src/Resize/Resize.d.ts +4 -4
- package/types/src/Resize/docs/examples/Basic.d.ts +2 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +7 -5
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedItem.d.ts +1 -1
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ResultsMenu/VirtualizedResultsMenu/injectVirtualizedItem.d.ts +2 -2
- package/types/src/ScreenReaderContent/ScreenReaderContent.d.ts +2 -2
- package/types/src/Scroll/Inner.d.ts +3 -3
- package/types/src/Scroll/Scroll.d.ts +2 -2
- package/types/src/Search/Option.d.ts +8 -8
- package/types/src/Search/Search.d.ts +4 -4
- package/types/src/Select/Option.d.ts +2 -2
- package/types/src/Select/OptionBase.d.ts +8 -8
- package/types/src/Select/Select.d.ts +5 -5
- package/types/src/Select/SelectAllOption.d.ts +1 -1
- package/types/src/Select/SelectBase.d.ts +9 -8
- package/types/src/SidePanel/SidePanel.d.ts +3 -3
- package/types/src/Slider/Slider.d.ts +8 -8
- package/types/src/SlidingPanels/Panel.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -2
- package/types/src/SplitButton/Item.d.ts +2 -2
- package/types/src/SplitButton/SplitButton.d.ts +1 -1
- package/types/src/StaticContent/StaticContent.d.ts +1 -1
- package/types/src/StepBar/Step.d.ts +1 -1
- package/types/src/StepBar/StepBar.d.ts +1 -1
- package/types/src/Switch/Switch.d.ts +4 -8
- package/types/src/TabBar/Tab.d.ts +7 -8
- package/types/src/TabBar/TabBar.d.ts +5 -5
- package/types/src/TabLayout/Panel.d.ts +2 -2
- package/types/src/TabLayout/TabLayout.d.ts +3 -3
- package/types/src/Table/Body.d.ts +4 -8
- package/types/src/Table/Caption.d.ts +2 -2
- package/types/src/Table/Cell.d.ts +3 -3
- package/types/src/Table/DragHandle.d.ts +1 -1
- package/types/src/Table/Head.d.ts +6 -6
- package/types/src/Table/HeadCell.d.ts +9 -9
- package/types/src/Table/HeadDropdownCell.d.ts +11 -11
- package/types/src/Table/HeadInner.d.ts +5 -5
- package/types/src/Table/HeadTable.d.ts +2 -2
- package/types/src/Table/KeyboardSensor.d.ts +79 -0
- package/types/src/Table/Row.d.ts +12 -14
- package/types/src/Table/RowDragCell.d.ts +9 -40
- package/types/src/Table/Table.d.ts +12 -10
- package/types/src/Table/Toggle.d.ts +1 -1
- package/types/src/Table/docs/examples/FilterColumnValues.d.ts +1 -1
- package/types/src/Text/Text.d.ts +13 -11
- package/types/src/TextArea/TextArea.d.ts +10 -10
- package/types/src/Tooltip/Tooltip.d.ts +9 -9
- package/types/src/TransitionOpen/TransitionOpen.d.ts +2 -2
- package/types/src/Tree/Tree.d.ts +3 -3
- package/types/src/Tree/TreeItem.d.ts +4 -4
- package/types/src/Typography/Typography.d.ts +5 -5
- package/types/src/WaitSpinner/WaitSpinner.d.ts +1 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -2
- package/types/src/useKeyPress/index.d.ts +2 -2
- package/types/src/utils/types.d.ts +4 -4
- package/types/src/Divider/docs/examples/AriaHidden.d.ts +0 -2
- package/types/src/Resize/docs/examples/Typical.d.ts +0 -2
package/Link.js
CHANGED
|
@@ -9,26 +9,26 @@
|
|
|
9
9
|
/******/ (() => {
|
|
10
10
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
11
11
|
/******/ e.n = t => {
|
|
12
|
-
/******/ var
|
|
12
|
+
/******/ var n = t && t.__esModule ?
|
|
13
13
|
/******/ () => t["default"]
|
|
14
14
|
/******/ : () => t
|
|
15
15
|
/******/;
|
|
16
|
-
e.d(
|
|
17
|
-
a:
|
|
16
|
+
e.d(n, {
|
|
17
|
+
a: n
|
|
18
18
|
});
|
|
19
|
-
/******/ return
|
|
19
|
+
/******/ return n;
|
|
20
20
|
/******/ };
|
|
21
21
|
/******/ })();
|
|
22
22
|
/******/
|
|
23
23
|
/******/ /* webpack/runtime/define property getters */
|
|
24
24
|
/******/ (() => {
|
|
25
25
|
/******/ // define getter functions for harmony exports
|
|
26
|
-
/******/ e.d = (t,
|
|
27
|
-
/******/ for (var
|
|
28
|
-
/******/ if (e.o(
|
|
29
|
-
/******/ Object.defineProperty(t,
|
|
26
|
+
/******/ e.d = (t, n) => {
|
|
27
|
+
/******/ for (var r in n) {
|
|
28
|
+
/******/ if (e.o(n, r) && !e.o(t, r)) {
|
|
29
|
+
/******/ Object.defineProperty(t, r, {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: r
|
|
31
|
+
get: n[r]
|
|
32
32
|
});
|
|
33
33
|
/******/ }
|
|
34
34
|
/******/ }
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
default: () => /* reexport */ J
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
|
-
const
|
|
68
|
-
var
|
|
67
|
+
const n = require("react");
|
|
68
|
+
var r = e.n(n);
|
|
69
69
|
// CONCATENATED MODULE: external "prop-types"
|
|
70
70
|
const o = require("prop-types");
|
|
71
71
|
var i = e.n(o);
|
|
72
72
|
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
73
73
|
const a = require("@splunk/react-ui/ScreenReaderContent");
|
|
74
|
-
var
|
|
74
|
+
var l = e.n(a);
|
|
75
75
|
// CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
|
|
76
|
-
const
|
|
76
|
+
const u = require("@splunk/react-ui/Dropdown");
|
|
77
77
|
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
78
78
|
const c = require("@splunk/ui-utils/i18n");
|
|
79
79
|
// CONCATENATED MODULE: external "styled-components"
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
})([ "", " margin:0 0 0 4px;" ], h);
|
|
100
100
|
function w() {
|
|
101
101
|
var e = (0, v.useSplunkTheme)(), t = e.isEnterprise;
|
|
102
|
-
return t ?
|
|
102
|
+
return t ? r().createElement(m, {
|
|
103
103
|
screenReaderText: null
|
|
104
|
-
}) :
|
|
104
|
+
}) : r().createElement(g, null);
|
|
105
105
|
}
|
|
106
106
|
/* harmony default export */ const O = w;
|
|
107
107
|
// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
@@ -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:", ";}
|
|
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
|
|
@@ -139,10 +139,10 @@
|
|
|
139
139
|
function _() {
|
|
140
140
|
_ = Object.assign || function(e) {
|
|
141
141
|
for (var t = 1; t < arguments.length; t++) {
|
|
142
|
-
var
|
|
143
|
-
for (var
|
|
144
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
145
|
-
e[
|
|
142
|
+
var n = arguments[t];
|
|
143
|
+
for (var r in n) {
|
|
144
|
+
if (Object.prototype.hasOwnProperty.call(n, r)) {
|
|
145
|
+
e[r] = n[r];
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
}
|
|
@@ -152,30 +152,30 @@
|
|
|
152
152
|
}
|
|
153
153
|
function P(e, t) {
|
|
154
154
|
if (e == null) return {};
|
|
155
|
-
var
|
|
156
|
-
var
|
|
155
|
+
var n = C(e, t);
|
|
156
|
+
var r, o;
|
|
157
157
|
if (Object.getOwnPropertySymbols) {
|
|
158
158
|
var i = Object.getOwnPropertySymbols(e);
|
|
159
159
|
for (o = 0; o < i.length; o++) {
|
|
160
|
-
|
|
161
|
-
if (t.indexOf(
|
|
162
|
-
if (!Object.prototype.propertyIsEnumerable.call(e,
|
|
163
|
-
r
|
|
160
|
+
r = i[o];
|
|
161
|
+
if (t.indexOf(r) >= 0) continue;
|
|
162
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
|
|
163
|
+
n[r] = e[r];
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
return
|
|
166
|
+
return n;
|
|
167
167
|
}
|
|
168
168
|
function C(e, t) {
|
|
169
169
|
if (e == null) return {};
|
|
170
|
-
var
|
|
171
|
-
var
|
|
170
|
+
var n = {};
|
|
171
|
+
var r = Object.keys(e);
|
|
172
172
|
var o, i;
|
|
173
|
-
for (i = 0; i <
|
|
174
|
-
o =
|
|
173
|
+
for (i = 0; i < r.length; i++) {
|
|
174
|
+
o = r[i];
|
|
175
175
|
if (t.indexOf(o) >= 0) continue;
|
|
176
|
-
|
|
176
|
+
n[o] = e[o];
|
|
177
177
|
}
|
|
178
|
-
return
|
|
178
|
+
return n;
|
|
179
179
|
}
|
|
180
180
|
function E(e, t) {
|
|
181
181
|
if (!(e instanceof t)) {
|
|
@@ -183,17 +183,17 @@
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
function q(e, t) {
|
|
186
|
-
for (var
|
|
187
|
-
var
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
if ("value" in
|
|
191
|
-
Object.defineProperty(e,
|
|
186
|
+
for (var n = 0; n < t.length; n++) {
|
|
187
|
+
var r = t[n];
|
|
188
|
+
r.enumerable = r.enumerable || false;
|
|
189
|
+
r.configurable = true;
|
|
190
|
+
if ("value" in r) r.writable = true;
|
|
191
|
+
Object.defineProperty(e, r.key, r);
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
function R(e, t,
|
|
194
|
+
function R(e, t, n) {
|
|
195
195
|
if (t) q(e.prototype, t);
|
|
196
|
-
if (
|
|
196
|
+
if (n) q(e, n);
|
|
197
197
|
return e;
|
|
198
198
|
}
|
|
199
199
|
function T(e, t) {
|
|
@@ -210,21 +210,21 @@
|
|
|
210
210
|
if (t) I(e, t);
|
|
211
211
|
}
|
|
212
212
|
function I(e, t) {
|
|
213
|
-
I = Object.setPrototypeOf || function e(t,
|
|
214
|
-
t.__proto__ =
|
|
213
|
+
I = Object.setPrototypeOf || function e(t, n) {
|
|
214
|
+
t.__proto__ = n;
|
|
215
215
|
return t;
|
|
216
216
|
};
|
|
217
217
|
return I(e, t);
|
|
218
218
|
}
|
|
219
219
|
function N(e) {
|
|
220
|
-
var t =
|
|
221
|
-
return function
|
|
222
|
-
var
|
|
220
|
+
var t = A();
|
|
221
|
+
return function n() {
|
|
222
|
+
var r = L(e), o;
|
|
223
223
|
if (t) {
|
|
224
|
-
var i =
|
|
225
|
-
o = Reflect.construct(
|
|
224
|
+
var i = L(this).constructor;
|
|
225
|
+
o = Reflect.construct(r, arguments, i);
|
|
226
226
|
} else {
|
|
227
|
-
o =
|
|
227
|
+
o = r.apply(this, arguments);
|
|
228
228
|
}
|
|
229
229
|
return M(this, o);
|
|
230
230
|
};
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
}
|
|
242
242
|
return e;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
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,30 +252,32 @@
|
|
|
252
252
|
return false;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
function
|
|
256
|
-
|
|
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
|
|
259
|
+
return L(e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function z(e, t, n) {
|
|
262
262
|
if (t in e) {
|
|
263
263
|
Object.defineProperty(e, t, {
|
|
264
|
-
value:
|
|
264
|
+
value: n,
|
|
265
265
|
enumerable: true,
|
|
266
266
|
configurable: true,
|
|
267
267
|
writable: true
|
|
268
268
|
});
|
|
269
269
|
} else {
|
|
270
|
-
e[t] =
|
|
270
|
+
e[t] = n;
|
|
271
271
|
}
|
|
272
272
|
return e;
|
|
273
273
|
}
|
|
274
|
-
var
|
|
274
|
+
var F = {
|
|
275
275
|
disabled: false,
|
|
276
276
|
openInNewContext: false
|
|
277
277
|
};
|
|
278
278
|
var B = {
|
|
279
|
+
/** @private */
|
|
280
|
+
allowDisabledLink: i().bool,
|
|
279
281
|
children: i().node,
|
|
280
282
|
disabled: i().bool,
|
|
281
283
|
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
@@ -287,22 +289,22 @@
|
|
|
287
289
|
* `Link` is a simple method for configuring `Button` for inline links. For more complex behaviors,
|
|
288
290
|
* see the `Button` documentation.
|
|
289
291
|
*/ var H = function(e) {
|
|
290
|
-
T(
|
|
291
|
-
var t = N(
|
|
292
|
-
function
|
|
292
|
+
T(n, e);
|
|
293
|
+
var t = N(n);
|
|
294
|
+
function n() {
|
|
293
295
|
var e;
|
|
294
|
-
E(this,
|
|
295
|
-
for (var
|
|
296
|
+
E(this, n);
|
|
297
|
+
for (var r = arguments.length, o = new Array(r), i = 0; i < r; i++) {
|
|
296
298
|
o[i] = arguments[i];
|
|
297
299
|
}
|
|
298
300
|
e = t.call.apply(t, [ this ].concat(o));
|
|
299
|
-
|
|
300
|
-
|
|
301
|
+
z(D(e), "component", null);
|
|
302
|
+
z(D(e), "handleMount", (function(t) {
|
|
301
303
|
e.component = t;
|
|
302
304
|
}));
|
|
303
305
|
return e;
|
|
304
306
|
}
|
|
305
|
-
R(
|
|
307
|
+
R(n, [ {
|
|
306
308
|
key: "focus",
|
|
307
309
|
/**
|
|
308
310
|
* Place focus on the link.
|
|
@@ -314,26 +316,26 @@
|
|
|
314
316
|
}, {
|
|
315
317
|
key: "render",
|
|
316
318
|
value: function e() {
|
|
317
|
-
var t = this.props,
|
|
319
|
+
var t = this.props, n = t.children, o = t.openInNewContext, i = P(t, [ "children", "openInNewContext" ]);
|
|
318
320
|
var a = false;
|
|
319
|
-
var
|
|
321
|
+
var u;
|
|
320
322
|
if (o) {
|
|
321
323
|
a = true;
|
|
322
|
-
|
|
324
|
+
u = typeof o === "string" ? o : G;
|
|
323
325
|
}
|
|
324
326
|
|
|
325
|
-
return
|
|
327
|
+
return r().createElement(k, _({
|
|
326
328
|
"data-test": "link",
|
|
327
329
|
ref: this.handleMount,
|
|
328
330
|
openInNewContext: a
|
|
329
|
-
}, i),
|
|
331
|
+
}, i), n, o && r().createElement(r().Fragment, null, r().createElement(O, null), r().createElement(l(), null, u)));
|
|
330
332
|
}
|
|
331
333
|
} ]);
|
|
332
|
-
return
|
|
333
|
-
}(
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
334
|
+
return n;
|
|
335
|
+
}(n.Component);
|
|
336
|
+
z(H, "propTypes", B);
|
|
337
|
+
z(H, "defaultProps", F);
|
|
338
|
+
z(H, u.legacyRefMode, true);
|
|
337
339
|
/* harmony default export */ const J = H;
|
|
338
340
|
// CONCATENATED MODULE: ./src/Link/index.ts
|
|
339
341
|
module.exports = t;
|
package/MIGRATION.mdx
CHANGED
|
@@ -5,6 +5,39 @@ import Table from '@splunk/react-ui/Table';
|
|
|
5
5
|
|
|
6
6
|
This document lists migration guidance for new features and breaking changes.
|
|
7
7
|
|
|
8
|
+
## 4.30.0
|
|
9
|
+
|
|
10
|
+
### Deprecated `NavigationProvider`'s `prefix` prop
|
|
11
|
+
|
|
12
|
+
#### Change
|
|
13
|
+
|
|
14
|
+
`NavigationProvider`'s `prefix` prop has been deprecated and will be removed in the next major version.
|
|
15
|
+
|
|
16
|
+
#### Context
|
|
17
|
+
|
|
18
|
+
`NavigationProvider` allows global control over navigation via `Clickable`, `Link`, and any other component that implements the `to` prop.
|
|
19
|
+
|
|
20
|
+
One of the supported props is `prefix`, which allows links to be prefixed. This is helpful when your application might be nested inside a path; for example, it could be used to set the locale prefix to a URL.
|
|
21
|
+
|
|
22
|
+
The new `transformUrl` function can be used to replicate the functionality of `prefix` as well as perform other URL transformations. Therefore, `prefix` is being deprecated to avoid supporting multiple ways to modify the URL.
|
|
23
|
+
|
|
24
|
+
#### Migration steps
|
|
25
|
+
|
|
26
|
+
Replace `prefix` with the `transformUrl` function:
|
|
27
|
+
|
|
28
|
+
```jsx
|
|
29
|
+
const prefix = '/my-prefix'
|
|
30
|
+
|
|
31
|
+
<NavigationProvider transformUrl={(url, { isInternal, isRootRelative}) => {
|
|
32
|
+
return isInternal && isRootRelative ? `${prefix}${url}` : url;
|
|
33
|
+
}>
|
|
34
|
+
<Link label="My page" to="/my-page" />
|
|
35
|
+
</NavigationProvider>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Note: `prefix` only applied to internal, relative URLs, whereas `transformUrl` applies to all URLs.
|
|
39
|
+
However, `transformUrl` provides info about whether a URL is internal or relative that can be used to replicate this behavior.
|
|
40
|
+
|
|
8
41
|
## 4.29.0
|
|
9
42
|
|
|
10
43
|
### Deprecated `WaitSpinner`'s `children` prop
|
|
@@ -474,4 +507,21 @@ Ensure the toggle `ref` is an `HTMLElement`, `Clickable`, `Button`, or `Link`.
|
|
|
474
507
|
Previously, `Tooltip` closed as soon as a user stopped hovering over the toggle. To allow the `Tooltip` to remain open when hovering/focusing on the toggle or the content area, the `Popover`’s `pointerEvent` prop has been removed. `Tooltip` now has two props: `possibleOpenReasons` and `possibleCloseReasons`, which provide more control over when the `Tooltip` can be opened and closed.
|
|
475
508
|
|
|
476
509
|
#### Migration steps
|
|
477
|
-
Replace all usage of `Popover`’s `pointerEvents` prop with `possibleOpenReasons` and `possibleCloseReasons`.
|
|
510
|
+
Replace all usage of `Popover`’s `pointerEvents` prop with `possibleOpenReasons` and `possibleCloseReasons`.
|
|
511
|
+
|
|
512
|
+
## 4.30.0
|
|
513
|
+
|
|
514
|
+
### Deprecated `Text`'s `appearance` prop
|
|
515
|
+
|
|
516
|
+
#### Change
|
|
517
|
+
|
|
518
|
+
`Text`'s `appearance` prop has been deprecated and will be removed in the next major version.
|
|
519
|
+
|
|
520
|
+
#### Context
|
|
521
|
+
|
|
522
|
+
`Text`'s `appearance` prop allowed the values "default" and "search".
|
|
523
|
+
With the new `Search` component optimized for user interaction, Text's `appearance` prop has become unnecessary.
|
|
524
|
+
|
|
525
|
+
#### Migration steps
|
|
526
|
+
|
|
527
|
+
Replace all usage of `Text`'s `appearance="search"` value with the `Search` component. Remove all usage of `Text`'s `appearance="default"` value.
|
package/Markdown.js
CHANGED
|
@@ -766,7 +766,8 @@
|
|
|
766
766
|
linkRenderer: i().func,
|
|
767
767
|
listRenderer: i().func,
|
|
768
768
|
paragraphRenderer: i().func,
|
|
769
|
-
text: i().string.isRequired
|
|
769
|
+
text: i().string.isRequired,
|
|
770
|
+
rendererOptions: i().object
|
|
770
771
|
};
|
|
771
772
|
var ze = new c.Parser;
|
|
772
773
|
/**
|
|
@@ -774,11 +775,11 @@
|
|
|
774
775
|
* The component prefers @splunk/react-ui components over plain HTML components. For example
|
|
775
776
|
* links are rendered as the `@splunk/react-ui/Link` component instead of plain `<a>` tag.
|
|
776
777
|
*/ function Ge(e) {
|
|
777
|
-
var r = e.blockquoteRenderer, n = e.codeBlockRenderer, o = e.codeRenderer, i = e.elementRef, a = e.headingRenderer, c = e.imageRenderer, u = e.itemRenderer, s = e.linkRenderer, p = e.listRenderer, d = e.paragraphRenderer, y = e.text, v = Ae(e, [ "blockquoteRenderer", "codeBlockRenderer", "codeRenderer", "elementRef", "headingRenderer", "imageRenderer", "itemRenderer", "linkRenderer", "listRenderer", "paragraphRenderer", "text" ]);
|
|
778
|
+
var r = e.blockquoteRenderer, n = e.codeBlockRenderer, o = e.codeRenderer, i = e.elementRef, a = e.headingRenderer, c = e.imageRenderer, u = e.itemRenderer, s = e.linkRenderer, p = e.listRenderer, d = e.paragraphRenderer, y = e.text, v = e.rendererOptions, b = Ae(e, [ "blockquoteRenderer", "codeBlockRenderer", "codeRenderer", "elementRef", "headingRenderer", "imageRenderer", "itemRenderer", "linkRenderer", "listRenderer", "paragraphRenderer", "text", "rendererOptions" ]);
|
|
778
779
|
// @docs-props-type MarkdownPropsBase
|
|
779
780
|
// keep this option object inside the constructor, otherwise the renderers
|
|
780
781
|
// below will confuse the doc-gen
|
|
781
|
-
var
|
|
782
|
+
var g = {
|
|
782
783
|
escapeHtml: true,
|
|
783
784
|
renderers: {
|
|
784
785
|
CodeBlock: n || B,
|
|
@@ -792,20 +793,20 @@
|
|
|
792
793
|
};
|
|
793
794
|
// not setting MarkdownBlockquote as the default
|
|
794
795
|
if (r) {
|
|
795
|
-
|
|
796
|
+
g.renderers.Blockquote = r;
|
|
796
797
|
}
|
|
797
798
|
// not setting MarkdownImage as the default
|
|
798
799
|
if (c) {
|
|
799
|
-
|
|
800
|
+
g.renderers.Image = c;
|
|
800
801
|
}
|
|
801
|
-
var
|
|
802
|
-
var
|
|
803
|
-
var
|
|
802
|
+
var O = new (l())(He(He({}, g), v));
|
|
803
|
+
var m = ze.parse(y);
|
|
804
|
+
var h = O.render(m);
|
|
804
805
|
|
|
805
806
|
return t().createElement(f(), Be({
|
|
806
807
|
"data-test": "markdown",
|
|
807
808
|
elementRef: i
|
|
808
|
-
},
|
|
809
|
+
}, b), h);
|
|
809
810
|
}
|
|
810
811
|
Ge.propTypes = Fe;
|
|
811
812
|
/* harmony default export */ const Je = Ge;
|
package/Menu.js
CHANGED
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
componentId: "sc-4kc053-2"
|
|
332
332
|
})([ "position:absolute;", " color:", ";" ], (0, b.pick)({
|
|
333
333
|
prisma: (0, d.css)([ "right:16px;" ]),
|
|
334
|
-
enterprise: (0, d.css)([ "
|
|
334
|
+
enterprise: (0, d.css)([ "right:3px;left:8px;" ])
|
|
335
335
|
}), (0, b.pick)({
|
|
336
336
|
prisma: b.variables.contentColorActive,
|
|
337
337
|
enterprise: b.variables.accentColorL10
|
|
@@ -452,7 +452,7 @@
|
|
|
452
452
|
var ae = v().span.withConfig({
|
|
453
453
|
displayName: "ItemStyles__StyledTitleAndDescriptionWrapper",
|
|
454
454
|
componentId: "sc-4kc053-7"
|
|
455
|
-
})([ "max-width:100%;width:100%;align-self:center;word-break:break-word;white-space:normal;", "" ], (function(e) {
|
|
455
|
+
})([ "display:flex;flex-wrap:wrap;flex-direction:column;max-width:100%;width:100%;align-self:center;word-break:break-word;white-space:normal;", "" ], (function(e) {
|
|
456
456
|
var r = e.$truncate;
|
|
457
457
|
return r && (0, d.css)([ "white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ]);
|
|
458
458
|
}));
|
|
@@ -865,7 +865,7 @@
|
|
|
865
865
|
openInNewContext: k
|
|
866
866
|
}, P, l()(x, "onFocus"), {
|
|
867
867
|
elementRef: this.handleMount
|
|
868
|
-
}),
|
|
868
|
+
}), o && s === "checkbox" && n().createElement(ne, {
|
|
869
869
|
interactive: false,
|
|
870
870
|
selected: c,
|
|
871
871
|
selectedLabel: "Selected",
|
|
@@ -877,12 +877,12 @@
|
|
|
877
877
|
"data-test": "description"
|
|
878
878
|
}, p), n().createElement(ie, null, u && n().createElement(re, null, u), n().createElement(ae, {
|
|
879
879
|
$truncate: h
|
|
880
|
-
}, n().createElement(oe, {
|
|
880
|
+
}, I === "left" && _, n().createElement(oe, {
|
|
881
881
|
$truncate: h,
|
|
882
882
|
"data-test": "label"
|
|
883
883
|
}, this.renderLabel(), k && n().createElement(ge, null)), E && n().createElement(X, {
|
|
884
884
|
"data-test": "description"
|
|
885
|
-
}, p)
|
|
885
|
+
}, p), I === "right" && _)));
|
|
886
886
|
}
|
|
887
887
|
} ]);
|
|
888
888
|
return t;
|