@splunk/react-ui 5.0.0-beta.3 → 5.0.0-beta.5
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 +185 -243
- package/Animation.js +2 -2
- package/Button.js +4 -2
- package/ButtonSimple.js +47 -41
- package/CHANGELOG.md +15 -2
- package/CHANGELOG.v5.mdx +73 -0
- package/Calendar.js +352 -469
- package/Card.js +163 -162
- package/Chip.js +171 -356
- package/Clickable.js +79 -76
- package/Code.js +19 -12
- package/Color.js +32 -32
- package/ComboBox.js +9 -7
- package/Date.js +160 -184
- package/DualListbox.js +549 -612
- package/File.js +546 -408
- package/FormRows.js +170 -157
- package/Image.js +124 -251
- package/JSONTree.js +496 -521
- package/Layer.js +162 -97
- package/Layout.d.ts +2 -0
- package/Link.js +20 -13
- package/MIGRATION.v5.mdx +48 -1
- package/Markdown.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +132 -177
- package/MessageBar.js +121 -290
- package/Modal.js +2 -2
- package/ModalLayer.js +12 -12
- package/Multiselect.js +1982 -2334
- package/NonInteractiveCheckbox.js +29 -117
- package/Number.js +114 -114
- package/Popover.js +328 -326
- package/Progress.js +68 -54
- package/RadioBar.js +139 -136
- package/RadioList.js +67 -65
- package/Resize.js +377 -265
- package/ResultsMenu.js +573 -661
- package/Scroll.js +2 -2
- package/ScrollContainerContext.js +13 -9
- package/Search.js +1 -1
- package/Select.js +364 -361
- package/SidePanel.js +17 -21
- package/Slider.js +494 -372
- package/SlidingPanels.js +100 -102
- package/SplitButton.js +39 -25
- package/StepBar.js +3 -3
- package/Switch.js +136 -129
- package/TabBar.js +598 -466
- package/TabLayout.js +34 -34
- package/Table.js +1648 -1479
- package/Text.js +51 -50
- package/TextArea.js +280 -154
- package/Tooltip.js +413 -563
- package/TransitionOpen.js +2 -2
- package/Tree.js +2 -2
- package/Typography.js +30 -28
- package/WaitSpinner.js +6 -11
- package/cypress/support/commands.ts +14 -4
- package/cypress/support/index.d.ts +1 -1
- package/package.json +9 -11
- package/stubs-splunkui.d.ts +0 -4
- package/types/src/Accordion/Accordion.d.ts +14 -21
- package/types/src/Accordion/AccordionContext.d.ts +0 -1
- package/types/src/Animation/Animation.d.ts +2 -3
- package/types/src/AnimationToggle/docs/examples/Provider.d.ts +2 -2
- package/types/src/AnimationToggle/docs/examples/ToggleComponent.d.ts +2 -2
- package/types/src/AnimationToggle/useAnimationToggle.d.ts +1 -1
- package/types/src/Button/Button.d.ts +1 -1
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +0 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +1 -3
- package/types/src/ButtonSimple/mixin.d.ts +1 -1
- package/types/src/Calendar/Calendar.d.ts +2 -2
- package/types/src/Calendar/{DateTable.d.ts → DateGrid.d.ts} +9 -9
- package/types/src/Calendar/Day.d.ts +8 -4
- package/types/src/Card/Card.d.ts +3 -1
- package/types/src/Card/Header.d.ts +2 -0
- package/types/src/Card/docs/examples/HeadingTitle.d.ts +3 -0
- package/types/src/CardLayout/CardLayoutContext.d.ts +0 -1
- package/types/src/CardLayout/docs/examples/Interactive.d.ts +2 -2
- package/types/src/Clickable/Clickable.d.ts +12 -4
- package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +0 -1
- package/types/src/ComboBox/ComboBox.d.ts +3 -3
- package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +2 -2
- package/types/src/Date/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Date/docs/examples/HighlightToday.d.ts +2 -2
- package/types/src/DefinitionList/DefinitionListContext.d.ts +0 -1
- package/types/src/DualListbox/DualListbox.d.ts +5 -1
- package/types/src/File/File.d.ts +4 -4
- package/types/src/File/FileContext.d.ts +0 -1
- package/types/src/File/Item.d.ts +11 -3
- package/types/src/File/ItemIcon.d.ts +2 -1
- package/types/src/File/docs/examples/Disabled.d.ts +2 -2
- package/types/src/File/docs/examples/DropAnywhere.d.ts +2 -2
- package/types/src/File/docs/examples/Multi.d.ts +2 -2
- package/types/src/File/docs/examples/Single.d.ts +2 -2
- package/types/src/FormRows/FormRows.d.ts +4 -4
- package/types/src/FormRows/FormRowsContext.d.ts +1 -2
- package/types/src/FormRows/SortableRow.d.ts +1 -1
- package/types/src/FormRows/docs/examples/Basic.d.ts +2 -2
- package/types/src/FormRows/docs/examples/Header.d.ts +2 -2
- package/types/src/FormRows/docs/examples/Menu.d.ts +2 -2
- package/types/src/FormRows/docs/examples/ReorderOnly.d.ts +2 -2
- package/types/src/Image/Image.d.ts +1 -4
- package/types/src/JSONTree/docs/examples/Events.d.ts +2 -2
- package/types/src/Layout/Layout.d.ts +1 -0
- package/types/src/Link/Link.d.ts +4 -0
- package/types/src/Link/icons/External.d.ts +1 -2
- package/types/src/Menu/Divider.d.ts +1 -1
- package/types/src/Menu/MenuContext.d.ts +0 -1
- package/types/src/Message/Message.d.ts +1 -1
- package/types/src/MessageBar/MessageBar.d.ts +6 -2
- package/types/src/Modal/ModalContext.d.ts +0 -1
- package/types/src/Multiselect/Compact.d.ts +46 -21
- package/types/src/Multiselect/Multiselect.d.ts +69 -36
- package/types/src/Multiselect/Normal.d.ts +45 -62
- package/types/src/Multiselect/Option.d.ts +42 -18
- package/types/src/Multiselect/docs/examples/Children.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Error.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -22
- package/types/src/Multiselect/docs/examples/Headings.d.ts +2 -1
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -25
- package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -9
- package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -9
- package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +8 -7
- package/types/src/Number/docs/examples/Basic.d.ts +2 -2
- package/types/src/Number/docs/examples/Limits.d.ts +2 -2
- package/types/src/Number/docs/examples/Locale.d.ts +2 -2
- package/types/src/Popover/Popover.d.ts +1 -1
- package/types/src/Popover/PopoverMenuContext.d.ts +0 -1
- package/types/src/RadioBar/RadioBar.d.ts +1 -1
- package/types/src/RadioBar/RadioBarContext.d.ts +0 -1
- package/types/src/RadioList/RadioListContext.d.ts +0 -1
- package/types/src/ResultsMenu/ResultsMenu.d.ts +23 -34
- package/types/src/Scroll/Inner.d.ts +1 -1
- package/types/src/Scroll/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Search/Search.d.ts +2 -2
- package/types/src/Select/SelectBase.d.ts +4 -4
- package/types/src/Slider/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Slider/docs/examples/CustomLabels.d.ts +2 -2
- package/types/src/Slider/getStepMarksBackground.d.ts +8 -0
- package/types/src/SlidingPanels/Panel.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +2 -2
- package/types/src/SlidingPanels/docs/examples/Basic.d.ts +2 -2
- package/types/src/SlidingPanels/docs/examples/Dropdown.d.ts +2 -2
- package/types/src/SplitButton/Item.d.ts +15 -2
- package/types/src/StepBar/Step.d.ts +1 -1
- package/types/src/StepBar/StepBar.d.ts +1 -1
- package/types/src/StepBar/StepBarContext.d.ts +0 -1
- package/types/src/Switch/docs/examples/Basic.d.ts +2 -2
- package/types/src/Switch/docs/examples/Disabled.d.ts +2 -2
- package/types/src/TabBar/Tab.d.ts +12 -5
- package/types/src/TabBar/TabBar.d.ts +11 -7
- package/types/src/TabBar/TabBarContext.d.ts +8 -3
- package/types/src/TabLayout/TabLayout.d.ts +8 -5
- package/types/src/Table/Head.d.ts +4 -15
- package/types/src/Table/HeadCell.d.ts +23 -25
- package/types/src/Table/HeadDropdownCell.d.ts +23 -26
- package/types/src/Table/HeadInner.d.ts +4 -10
- package/types/src/Table/Row.d.ts +6 -6
- package/types/src/Table/Table.d.ts +3 -8
- package/types/src/Table/TableContext.d.ts +0 -1
- package/types/src/Tooltip/Tooltip.d.ts +26 -58
- package/types/src/Tooltip/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Tree/TreeContext.d.ts +0 -1
- package/types/src/Typography/Typography.d.ts +27 -22
- package/types/src/useForceUpdate/useForceUpdate.d.ts +0 -1
- package/types/src/useResizeObserver/useResizeObserver.d.ts +2 -1
- package/types/src/utils/types.d.ts +2 -3
- package/useResizeObserver.js +26 -19
- package/types/src/Date/Icon.d.ts +0 -3
- package/types/src/Image/icons/Cross.d.ts +0 -3
- package/types/src/TabBar/docs/examples/IconsAbove.d.ts +0 -3
- package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +0 -3
- package/types/src/Table/docs/examples/prisma/DockedHeaderScrollbar.d.ts +0 -3
- package/types/src/Tooltip/InfoIcon.d.ts +0 -4
- /package/types/src/TabBar/docs/examples/{IconsLeft.d.ts → Icons.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{VerticalIconsLeft.d.ts → VerticalIcons.d.ts} +0 -0
package/Progress.js
CHANGED
|
@@ -68,53 +68,67 @@
|
|
|
68
68
|
var n = e.n(t);
|
|
69
69
|
// CONCATENATED MODULE: external "prop-types"
|
|
70
70
|
const o = require("prop-types");
|
|
71
|
-
var
|
|
71
|
+
var i = e.n(o);
|
|
72
72
|
// CONCATENATED MODULE: external "lodash/isNumber"
|
|
73
|
-
const
|
|
74
|
-
var s = e.n(
|
|
73
|
+
const a = require("lodash/isNumber");
|
|
74
|
+
var s = e.n(a);
|
|
75
75
|
// CONCATENATED MODULE: external "@splunk/react-ui/AnimationToggle"
|
|
76
76
|
const l = require("@splunk/react-ui/AnimationToggle");
|
|
77
77
|
// CONCATENATED MODULE: external "styled-components"
|
|
78
|
-
const
|
|
79
|
-
var
|
|
78
|
+
const c = require("styled-components");
|
|
79
|
+
var u = e.n(c);
|
|
80
80
|
// CONCATENATED MODULE: external "@splunk/react-ui/Tooltip"
|
|
81
81
|
const f = require("@splunk/react-ui/Tooltip");
|
|
82
82
|
var p = e.n(f);
|
|
83
83
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
84
84
|
const d = require("@splunk/themes");
|
|
85
85
|
// CONCATENATED MODULE: ./src/Progress/ProgressStyles.ts
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
var y =
|
|
86
|
+
var v = "8px";
|
|
87
|
+
var b = (0, c.keyframes)([ "from{background-position:130%;}to{background-position:-30%;}" ]);
|
|
88
|
+
var y = u().div.attrs((function(e) {
|
|
89
|
+
var r = e.$percent;
|
|
90
|
+
/**
|
|
91
|
+
* Prevents styled-components from generating new classes for each percent value (SUI-7625).
|
|
92
|
+
* Pseudo-elements can't have inline styles, so width can't be set directly.
|
|
93
|
+
*/ return {
|
|
94
|
+
style: {
|
|
95
|
+
"--percent": "".concat(r, "%")
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
})).withConfig({
|
|
89
99
|
displayName: "ProgressStyles__StyledProgressWrapper",
|
|
90
100
|
componentId: "csowex-0"
|
|
91
|
-
})([ "height:", ";position:relative;border:1px solid ", ";border-radius:", ";background:", ";&::before{display:block;position:absolute;top:-1px;left:-1px;content:'';border-radius:", ";height:100%;", " ", "}" ],
|
|
101
|
+
})([ "", " height:", ";position:relative;border:1px solid ", ";border-radius:", ";background:", ";&::before{display:block;position:absolute;top:-1px;left:-1px;content:'';border-radius:", ";height:100%;", " width:var(--percent);", "}" ], d.mixins.reset("block"), v, d.variables.interactiveColorBorder, d.variables.borderRadius, d.variables.neutral100, d.variables.borderRadius, (function(e) {
|
|
92
102
|
var r = e.$animated, t = e.$type;
|
|
93
103
|
// Animated is only supported for the info type.
|
|
94
104
|
// This is enforced in the component and duplicating here
|
|
95
|
-
return r && t === "info" ? (0,
|
|
96
|
-
|
|
97
|
-
info: d.variables.
|
|
98
|
-
success: d.variables.
|
|
99
|
-
error: d.variables.
|
|
105
|
+
return r && t === "info" ? (0, c.css)([ "background:radial-gradient( circle at center,", ",", " 30% );background-size:200% 100%;animation:", " 2500ms infinite cubic-bezier(0.33,0,0.67,1);" ], d.variables.notificationColorInfoWeak, d.variables.notificationColorInfo, b) : (0,
|
|
106
|
+
c.css)([ "background:", ";" ], (0, d.pickVariant)("$type", {
|
|
107
|
+
info: d.variables.notificationColorInfo,
|
|
108
|
+
success: d.variables.notificationColorPositive,
|
|
109
|
+
error: d.variables.notificationColorNegative
|
|
100
110
|
}));
|
|
101
111
|
}), (function(e) {
|
|
102
112
|
var r = e.$percent;
|
|
103
|
-
return (0,
|
|
113
|
+
return (0, c.css)([ "", " ", "" ], r > 0 && (0, c.css)([ "border:1px solid ", ";" ], (0,
|
|
104
114
|
d.pickVariant)("$type", {
|
|
105
|
-
info: d.variables.
|
|
106
|
-
success: d.variables.
|
|
107
|
-
error: d.variables.
|
|
108
|
-
})), r !== 100 && (0,
|
|
115
|
+
info: d.variables.notificationColorInfoStrong,
|
|
116
|
+
success: d.variables.notificationColorPositiveStrong,
|
|
117
|
+
error: d.variables.notificationColorNegativeStrong
|
|
118
|
+
})), r !== 100 && (0, c.css)([ "border-end-end-radius:0;border-start-end-radius:0;border-inline-end:none;" ]));
|
|
109
119
|
}));
|
|
110
|
-
var g =
|
|
120
|
+
var g = u()(p()).attrs((function(e) {
|
|
121
|
+
var r = e.$percent;
|
|
122
|
+
/* Prevents styled-components from generating new classes for each percent value (SUI-7625). */ return {
|
|
123
|
+
style: {
|
|
124
|
+
width: "".concat(r, "%")
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
})).withConfig({
|
|
111
128
|
displayName: "ProgressStyles__StyledTooltip",
|
|
112
129
|
componentId: "csowex-1"
|
|
113
|
-
})([ "
|
|
114
|
-
|
|
115
|
-
return "".concat(r, "%");
|
|
116
|
-
}), b);
|
|
117
|
-
var m = c().progress.withConfig({
|
|
130
|
+
})([ "height:", ";" ], v);
|
|
131
|
+
var m = u().progress.withConfig({
|
|
118
132
|
displayName: "ProgressStyles__StyledProgress",
|
|
119
133
|
componentId: "csowex-2"
|
|
120
134
|
})([ "opacity:0;position:absolute;inset:0;" ]);
|
|
@@ -131,7 +145,7 @@
|
|
|
131
145
|
}, h.apply(null, arguments);
|
|
132
146
|
}
|
|
133
147
|
function S(e, r) {
|
|
134
|
-
return
|
|
148
|
+
return P(e) || C(e, r) || k(e, r) || O();
|
|
135
149
|
}
|
|
136
150
|
function O() {
|
|
137
151
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
@@ -153,35 +167,35 @@
|
|
|
153
167
|
function C(e, r) {
|
|
154
168
|
var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
|
|
155
169
|
if (null != t) {
|
|
156
|
-
var n, o,
|
|
170
|
+
var n, o, i, a, s = [], l = !0, c = !1;
|
|
157
171
|
try {
|
|
158
|
-
if (
|
|
172
|
+
if (i = (t = t.call(e)).next, 0 === r) {
|
|
159
173
|
if (Object(t) !== t) return;
|
|
160
174
|
l = !1;
|
|
161
|
-
} else for (;!(l = (n =
|
|
175
|
+
} else for (;!(l = (n = i.call(t)).done) && (s.push(n.value), s.length !== r); l = !0) {
|
|
162
176
|
}
|
|
163
177
|
} catch (e) {
|
|
164
|
-
|
|
178
|
+
c = !0, o = e;
|
|
165
179
|
} finally {
|
|
166
180
|
try {
|
|
167
|
-
if (!l && null != t["return"] && (
|
|
181
|
+
if (!l && null != t["return"] && (a = t["return"](), Object(a) !== a)) return;
|
|
168
182
|
} finally {
|
|
169
|
-
if (
|
|
183
|
+
if (c) throw o;
|
|
170
184
|
}
|
|
171
185
|
}
|
|
172
186
|
return s;
|
|
173
187
|
}
|
|
174
188
|
}
|
|
175
|
-
function
|
|
189
|
+
function P(e) {
|
|
176
190
|
if (Array.isArray(e)) return e;
|
|
177
191
|
}
|
|
178
|
-
function
|
|
192
|
+
function j(e, r) {
|
|
179
193
|
if (null == e) return {};
|
|
180
194
|
var t, n, o = x(e, r);
|
|
181
195
|
if (Object.getOwnPropertySymbols) {
|
|
182
|
-
var
|
|
183
|
-
for (n = 0; n <
|
|
184
|
-
t =
|
|
196
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
197
|
+
for (n = 0; n < i.length; n++) {
|
|
198
|
+
t = i[n], r.includes(t) || {}.propertyIsEnumerable.call(e, t) && (o[t] = e[t]);
|
|
185
199
|
}
|
|
186
200
|
}
|
|
187
201
|
return o;
|
|
@@ -197,26 +211,26 @@
|
|
|
197
211
|
}
|
|
198
212
|
return t;
|
|
199
213
|
}
|
|
200
|
-
var
|
|
201
|
-
elementRef:
|
|
202
|
-
percentage:
|
|
203
|
-
tooltip:
|
|
204
|
-
type:
|
|
214
|
+
var $ = {
|
|
215
|
+
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
216
|
+
percentage: i().number,
|
|
217
|
+
tooltip: i().node,
|
|
218
|
+
type: i().oneOf([ "info", "success", "error" ])
|
|
205
219
|
};
|
|
206
|
-
function
|
|
207
|
-
var r = e.elementRef, o = e.percentage,
|
|
220
|
+
function I(e) {
|
|
221
|
+
var r = e.elementRef, o = e.percentage, i = e.tooltip, a = e.type, c = a === void 0 ? "info" : a, u = j(e, [ "elementRef", "percentage", "tooltip", "type" ]);
|
|
208
222
|
// @docs-props-type ProgressPropsBase
|
|
209
223
|
if (false) {}
|
|
210
|
-
var f = (0, t.useState)(false), p = S(f, 2), d = p[0],
|
|
211
|
-
var
|
|
224
|
+
var f = (0, t.useState)(false), p = S(f, 2), d = p[0], v = p[1];
|
|
225
|
+
var b = (0, l.useAnimationToggle)() === "on" && c === "info";
|
|
212
226
|
var O = (0, t.useCallback)((function() {
|
|
213
|
-
|
|
227
|
+
v(true);
|
|
214
228
|
}), []);
|
|
215
229
|
var k = (0, t.useCallback)((function() {
|
|
216
|
-
|
|
230
|
+
v(false);
|
|
217
231
|
}), []);
|
|
218
232
|
var w = s()(o) ? o : 0;
|
|
219
|
-
var C =
|
|
233
|
+
var C = i || "".concat(w, "%");
|
|
220
234
|
|
|
221
235
|
return n().createElement(y, h({
|
|
222
236
|
onMouseEnter: O,
|
|
@@ -224,9 +238,9 @@
|
|
|
224
238
|
ref: r,
|
|
225
239
|
"data-test": "progress",
|
|
226
240
|
$percent: w,
|
|
227
|
-
$type:
|
|
228
|
-
$animated:
|
|
229
|
-
},
|
|
241
|
+
$type: c,
|
|
242
|
+
$animated: b
|
|
243
|
+
}, u), n().createElement(g, {
|
|
230
244
|
content: C,
|
|
231
245
|
inline: false,
|
|
232
246
|
$percent: w,
|
|
@@ -236,8 +250,8 @@
|
|
|
236
250
|
max: 100
|
|
237
251
|
})));
|
|
238
252
|
}
|
|
239
|
-
|
|
240
|
-
/* harmony default export */ const _ =
|
|
253
|
+
I.propTypes = $;
|
|
254
|
+
/* harmony default export */ const _ = I;
|
|
241
255
|
// CONCATENATED MODULE: ./src/Progress/index.ts
|
|
242
256
|
module.exports = r;
|
|
243
257
|
/******/})();
|