@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/TransitionOpen.js
CHANGED
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
const s = require("@splunk/ui-utils/focus");
|
|
79
79
|
// CONCATENATED MODULE: external "@splunk/ui-utils/style"
|
|
80
80
|
const c = require("@splunk/ui-utils/style");
|
|
81
|
-
// CONCATENATED MODULE: external "react-spring"
|
|
82
|
-
const f = require("react-spring");
|
|
81
|
+
// CONCATENATED MODULE: external "@react-spring/web"
|
|
82
|
+
const f = require("@react-spring/web");
|
|
83
83
|
// CONCATENATED MODULE: external "styled-components"
|
|
84
84
|
const d = require("styled-components");
|
|
85
85
|
var m = e.n(d);
|
package/Tree.js
CHANGED
|
@@ -142,9 +142,9 @@
|
|
|
142
142
|
var p = f().ul.withConfig({
|
|
143
143
|
displayName: "TreeStyles__StyledUnorderedList",
|
|
144
144
|
componentId: "sc-13pokwt-0"
|
|
145
|
-
})([ "", ";font-family:inherit;list-style:none;white-space:inherit;", ";" ], d.mixins.reset("ul"), (function(e) {
|
|
145
|
+
})([ "", ";color:inherit;font-family:inherit;list-style:none;white-space:inherit;", ";" ], d.mixins.reset("ul"), (function(e) {
|
|
146
146
|
var r = e.$defaultIndent;
|
|
147
|
-
return r && (0, c.css)([ "padding-
|
|
147
|
+
return r && (0, c.css)([ "padding-inline-start:", ";" ], d.variables.spacingXXXLarge);
|
|
148
148
|
}));
|
|
149
149
|
// CONCATENATED MODULE: ./src/Tree/TreeItem.tsx
|
|
150
150
|
function y() {
|
package/Typography.js
CHANGED
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
const t = require("react");
|
|
69
69
|
var n = e.n(t);
|
|
70
70
|
// CONCATENATED MODULE: external "prop-types"
|
|
71
|
-
const
|
|
72
|
-
var
|
|
71
|
+
const o = require("prop-types");
|
|
72
|
+
var a = e.n(o);
|
|
73
73
|
// CONCATENATED MODULE: external "styled-components"
|
|
74
74
|
const i = require("styled-components");
|
|
75
75
|
var l = e.n(i);
|
|
@@ -90,14 +90,14 @@
|
|
|
90
90
|
}
|
|
91
91
|
function c(e, r) {
|
|
92
92
|
if (null == e) return {};
|
|
93
|
-
var t, n,
|
|
93
|
+
var t, n, o = f(e, r);
|
|
94
94
|
if (Object.getOwnPropertySymbols) {
|
|
95
|
-
var
|
|
96
|
-
for (n = 0; n <
|
|
97
|
-
t =
|
|
95
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
96
|
+
for (n = 0; n < a.length; n++) {
|
|
97
|
+
t = a[n], r.includes(t) || {}.propertyIsEnumerable.call(e, t) && (o[t] = e[t]);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
return
|
|
100
|
+
return o;
|
|
101
101
|
}
|
|
102
102
|
function f(e, r) {
|
|
103
103
|
if (null == e) return {};
|
|
@@ -111,15 +111,16 @@
|
|
|
111
111
|
return t;
|
|
112
112
|
}
|
|
113
113
|
var y = {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
weight:
|
|
114
|
+
as: a().string.isRequired,
|
|
115
|
+
children: a().node.isRequired,
|
|
116
|
+
color: a().oneOf([ "active", "default", "disabled", "inverted", "muted", "inherit" ]),
|
|
117
|
+
elementRef: a().oneOfType([ a().func, a().object ]),
|
|
118
|
+
family: a().oneOf([ "sansSerif", "monospace", "title" ]),
|
|
119
|
+
lineHeight: a().oneOf([ "single", "tight", "snug", "comfortable", "relaxed", "spacious", "normal" ]),
|
|
120
|
+
size: a().oneOf([ 24, 20, 18, 16, 14, 12 ]),
|
|
121
|
+
variant: a().oneOf(s.typographyVariants),
|
|
122
|
+
weight: a().oneOf([ "light", "normal", "semiBold", "bold", "extraBold", "heavy" ]),
|
|
123
|
+
withReset: a().bool
|
|
123
124
|
};
|
|
124
125
|
var d = l().p.withConfig({
|
|
125
126
|
displayName: "Typography__StyledTypography",
|
|
@@ -131,25 +132,26 @@
|
|
|
131
132
|
/**
|
|
132
133
|
* Typography renders text content with styling based on the Splunk Design System.
|
|
133
134
|
*/ function g(e) {
|
|
134
|
-
var r = e.
|
|
135
|
+
var r = e.as, o = e.children, a = e.color, i = e.elementRef, l = e.family, s = e.lineHeight, u = e.size, f = e.variant, y = e.weight, g = e.withReset, h = g === void 0 ? true : g, v = c(e, [ "as", "children", "color", "elementRef", "family", "lineHeight", "size", "variant", "weight", "withReset" ]);
|
|
135
136
|
// @docs-props-type TypographyPropsBase
|
|
136
|
-
var
|
|
137
|
+
var m = (0, t.useMemo)((function() {
|
|
137
138
|
return {
|
|
139
|
+
color: a,
|
|
138
140
|
family: l,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
lineHeight: s,
|
|
142
|
+
size: u,
|
|
143
|
+
weight: y,
|
|
144
|
+
withReset: h
|
|
143
145
|
};
|
|
144
|
-
}), [
|
|
146
|
+
}), [ a, l, s, u, y, h ]);
|
|
145
147
|
|
|
146
148
|
return n().createElement(d, p({
|
|
147
|
-
as:
|
|
148
|
-
ref: o,
|
|
149
|
+
as: r,
|
|
149
150
|
"data-test": "typography",
|
|
150
|
-
|
|
151
|
-
$typographyParams:
|
|
152
|
-
|
|
151
|
+
ref: i,
|
|
152
|
+
$typographyParams: m,
|
|
153
|
+
$variant: f
|
|
154
|
+
}, v), o);
|
|
153
155
|
}
|
|
154
156
|
g.propTypes = y;
|
|
155
157
|
/* harmony default export */ const h = g;
|
package/WaitSpinner.js
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ z
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const r = require("react");
|
|
@@ -109,12 +109,7 @@
|
|
|
109
109
|
var b = c().circle.withConfig({
|
|
110
110
|
displayName: "WaitSpinnerStyles__StyledFillPath",
|
|
111
111
|
componentId: "sc-1nu971z-3"
|
|
112
|
-
})([ "fill:transparent;stroke-width:2;stroke:", ";stroke-dasharray:7 113;stroke-dashoffset:3;", "" ],
|
|
113
|
-
f.pickVariant)("$size", {
|
|
114
|
-
small: f.variables.contentColorDefault,
|
|
115
|
-
medium: f.variables.contentColorDefault,
|
|
116
|
-
large: f.variables.contentColorAccent
|
|
117
|
-
}), (function(e) {
|
|
112
|
+
})([ "fill:transparent;stroke-width:2;stroke:", ";stroke-dasharray:7 113;stroke-dashoffset:3;", "" ], f.variables.contentColorAccent, (function(e) {
|
|
118
113
|
var t = e.$animated;
|
|
119
114
|
return t && (0, l.css)([ "animation:", " ", " infinite;" ], h, p);
|
|
120
115
|
}));
|
|
@@ -152,12 +147,12 @@
|
|
|
152
147
|
}
|
|
153
148
|
return r;
|
|
154
149
|
}
|
|
155
|
-
var
|
|
150
|
+
var O = {
|
|
156
151
|
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
157
152
|
screenReaderText: i().oneOfType([ i().string, i().oneOf([ "null" ]) ]),
|
|
158
153
|
size: i().oneOf([ "small", "medium", "large" ])
|
|
159
154
|
};
|
|
160
|
-
function
|
|
155
|
+
function x(e) {
|
|
161
156
|
var t = e.elementRef, r = e.screenReaderText, a = r === void 0 ? (0, o._)("Waiting") : r, i = e.size, l = i === void 0 ? "small" : i, c = w(e, [ "elementRef", "screenReaderText", "size" ]);
|
|
162
157
|
// @docs-props-type WaitSpinnerPropsBase
|
|
163
158
|
var f = (0, s.useAnimationToggle)() === "on";
|
|
@@ -185,8 +180,8 @@
|
|
|
185
180
|
$size: l
|
|
186
181
|
}))));
|
|
187
182
|
}
|
|
188
|
-
|
|
189
|
-
/* harmony default export */ const
|
|
183
|
+
x.propTypes = O;
|
|
184
|
+
/* harmony default export */ const z = x;
|
|
190
185
|
// CONCATENATED MODULE: ./src/WaitSpinner/index.ts
|
|
191
186
|
module.exports = t;
|
|
192
187
|
/******/})();
|
|
@@ -3,9 +3,19 @@ import 'cypress-real-events';
|
|
|
3
3
|
|
|
4
4
|
// https://docs.cypress.io/api/commands/hover
|
|
5
5
|
Cypress.Commands.add('hover', (selector: string) => {
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
} else {
|
|
9
|
-
cy.get(selector).trigger('mouseover', { force: true });
|
|
6
|
+
if (!selector) {
|
|
7
|
+
throw new Error('You must provide a valid selector to hover over.');
|
|
10
8
|
}
|
|
9
|
+
|
|
10
|
+
return cy.get(selector).then(($el) => {
|
|
11
|
+
if ($el.length === 0) {
|
|
12
|
+
throw new Error(`No elements found for selector: ${selector}`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (Cypress.browser.name !== 'firefox') {
|
|
16
|
+
return cy.wrap($el).realHover();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return cy.wrap($el).trigger('mouseover', { force: true });
|
|
20
|
+
});
|
|
11
21
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splunk/react-ui",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.5",
|
|
4
4
|
"description": "Library of React components that implement the Splunk design language",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Splunk Inc.",
|
|
@@ -44,16 +44,15 @@
|
|
|
44
44
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
45
45
|
"@dnd-kit/sortable": "^8.0.0",
|
|
46
46
|
"@dnd-kit/utilities": "^3.2.2",
|
|
47
|
-
"@
|
|
48
|
-
"@splunk/
|
|
47
|
+
"@react-spring/web": "^9.7.5",
|
|
48
|
+
"@splunk/react-icons": "5.0.0-beta.5",
|
|
49
|
+
"@splunk/themes": "1.0.0-beta.5",
|
|
49
50
|
"@splunk/ui-utils": "^1.8.0",
|
|
50
51
|
"decimal.js-light": "^2.2.3",
|
|
51
52
|
"lodash": "^4.17.14",
|
|
52
53
|
"moment": "^2.29.4",
|
|
53
54
|
"prop-types": "^15.6.2",
|
|
54
55
|
"react-markdown": "^8.0.7",
|
|
55
|
-
"react-resize-detector": "^3.2.1",
|
|
56
|
-
"react-spring": "9.2.4",
|
|
57
56
|
"remark-gfm": "^1.0.0",
|
|
58
57
|
"tinycolor2": "^1.4.1",
|
|
59
58
|
"use-typed-event-listener": "^3.0.0"
|
|
@@ -62,9 +61,9 @@
|
|
|
62
61
|
"@babel/core": "^7.2.0",
|
|
63
62
|
"@babel/plugin-transform-runtime": "^7.18.6",
|
|
64
63
|
"@splunk/babel-preset": "^4.0.0",
|
|
65
|
-
"@splunk/docs-gen": "1.0.0-beta.14.v5.
|
|
64
|
+
"@splunk/docs-gen": "1.0.0-beta.14.v5.3",
|
|
66
65
|
"@splunk/eslint-config": "^5.0.0",
|
|
67
|
-
"@splunk/react-docs": "1.0.0-beta.
|
|
66
|
+
"@splunk/react-docs": "1.0.0-beta.22.v5",
|
|
68
67
|
"@splunk/stylelint-config": "^5.0.0",
|
|
69
68
|
"@splunk/test-runner-utils": "^0.4.1",
|
|
70
69
|
"@splunk/webpack-configs": "^7.0.2",
|
|
@@ -86,14 +85,13 @@
|
|
|
86
85
|
"@types/prismjs": "^1.26.3",
|
|
87
86
|
"@types/react": "^18.2.0",
|
|
88
87
|
"@types/react-dom": "^18.2.0",
|
|
89
|
-
"@types/react-resize-detector": "^3.1.1",
|
|
90
88
|
"@types/sinon": "^4.3.3",
|
|
91
89
|
"@types/styled-components": "^5.1.0",
|
|
92
90
|
"@types/tinycolor2": "^1.4.2",
|
|
93
91
|
"@types/webdriverio": "^5.0.0",
|
|
94
92
|
"@types/webpack-env": "^1.15.2",
|
|
95
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
96
|
-
"@typescript-eslint/parser": "^
|
|
93
|
+
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
94
|
+
"@typescript-eslint/parser": "^8.29.1",
|
|
97
95
|
"axe-html-reporter": "^2.2.3",
|
|
98
96
|
"axe-playwright": "^1.1.11",
|
|
99
97
|
"babel-loader": "^8.3.0",
|
|
@@ -139,7 +137,7 @@
|
|
|
139
137
|
"storybook": "^7.6.17",
|
|
140
138
|
"styled-components": "^5.3.10",
|
|
141
139
|
"stylelint": "^15.11.0",
|
|
142
|
-
"typescript": "^
|
|
140
|
+
"typescript": "^5.8.3",
|
|
143
141
|
"webpack": "^5.88.2",
|
|
144
142
|
"webpack-cli": "^5.1.4",
|
|
145
143
|
"webpack-dev-server": "^4.15.1",
|
package/stubs-splunkui.d.ts
CHANGED
|
@@ -90,10 +90,6 @@ declare module '@splunk/ui-utils/style' {
|
|
|
90
90
|
function toClassName(...args: ClassNameArg[]): string;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
declare module '@splunk/ui-utils/userAgent' {
|
|
94
|
-
function isIE11(): boolean;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
93
|
declare module '@splunk/react-docs/DocExample' {
|
|
98
94
|
function getDependencyVersions(
|
|
99
95
|
packageJSON: Record<string, unknown>,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import Panel from './Panel';
|
|
3
|
-
import {
|
|
4
|
+
import { ComponentProps } from '../utils/types';
|
|
4
5
|
/** @public */
|
|
5
6
|
type AccordionChangeHandler = (event: React.MouseEvent<HTMLButtonElement>, data: {
|
|
6
7
|
event: React.MouseEvent<HTMLButtonElement>;
|
|
@@ -47,30 +48,22 @@ interface AccordionUncontrolledProps extends AccordionPropsBase {
|
|
|
47
48
|
defaultOpenPanelId?: string | number;
|
|
48
49
|
openPanelId?: never;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
inset: boolean;
|
|
52
|
-
};
|
|
53
|
-
type AccordionProps = ClassComponentProps<AccordionControlledProps | AccordionUncontrolledProps, typeof defaultProps, 'div'>;
|
|
54
|
-
interface AccordionState {
|
|
55
|
-
openPanelId?: string | number;
|
|
56
|
-
}
|
|
51
|
+
type AccordionProps = ComponentProps<AccordionControlledProps | AccordionUncontrolledProps, 'div'>;
|
|
57
52
|
/**
|
|
58
53
|
* @deprecated
|
|
59
54
|
* Accordion has been deprecated and will be removed in a future major version. Use Collapsible Panel's SingleOpenPanelGroup API instead.
|
|
60
55
|
*/
|
|
61
|
-
declare
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
declare function Accordion({ children, defaultOpenPanelId, elementRef, inset, onChange, openPanelId: openPanelIdProp, ...otherProps }: AccordionProps): React.JSX.Element;
|
|
57
|
+
declare namespace Accordion {
|
|
58
|
+
var propTypes: {
|
|
59
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
60
|
+
defaultOpenPanelId: PropTypes.Requireable<any>;
|
|
61
|
+
elementRef: PropTypes.Requireable<object>;
|
|
62
|
+
inset: PropTypes.Requireable<boolean>;
|
|
63
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
64
|
+
openPanelId: PropTypes.Requireable<any>;
|
|
66
65
|
};
|
|
67
|
-
|
|
68
|
-
constructor(props: Readonly<AccordionProps>);
|
|
69
|
-
componentDidUpdate(prevProps: Readonly<AccordionProps>): void;
|
|
70
|
-
private getCurrentOpenPanel;
|
|
71
|
-
private handleChange;
|
|
72
|
-
private isControlled;
|
|
73
|
-
render(): React.JSX.Element;
|
|
66
|
+
var Panel: typeof import("./Panel").default;
|
|
74
67
|
}
|
|
75
68
|
export default Accordion;
|
|
76
69
|
export { AccordionChangeHandler, Panel };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { SpringComponentProps as RSSpringComponentProps, TransitionComponentProps as RSTransitionComponentProps, UseSpringProps as RSUseSpringProps, UseTransitionProps as RSUseTransitionProps } from 'react-spring';
|
|
1
|
+
import { SpringComponentProps as RSSpringComponentProps, TransitionComponentProps as RSTransitionComponentProps, UseSpringProps as RSUseSpringProps, UseTransitionProps as RSUseTransitionProps } from '@react-spring/web';
|
|
3
2
|
declare function useAnimation({ immediate, ...otherProps }: RSUseSpringProps): {
|
|
4
3
|
[x: string]: any;
|
|
5
4
|
[x: number]: any;
|
|
6
5
|
};
|
|
7
|
-
declare function useAnimationTransition(items: any, { immediate, ...otherProps }: RSUseTransitionProps): import("react-spring").TransitionFn<any, {
|
|
6
|
+
declare function useAnimationTransition(items: any, { immediate, ...otherProps }: RSUseTransitionProps): import("@react-spring/core").TransitionFn<any, {
|
|
8
7
|
[x: string]: any;
|
|
9
8
|
[x: number]: any;
|
|
10
9
|
[Symbol.hasInstance]: (value: any) => boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
declare class Provider extends Component<
|
|
2
|
+
declare class Provider extends Component<object, {
|
|
3
3
|
animatedTransitions: boolean;
|
|
4
4
|
open: boolean;
|
|
5
5
|
}> {
|
|
6
|
-
constructor(props:
|
|
6
|
+
constructor(props: object);
|
|
7
7
|
handleButtonClick: () => void;
|
|
8
8
|
handleSwitchClick: () => void;
|
|
9
9
|
render(): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
declare class ToggleComponent extends Component<
|
|
2
|
+
declare class ToggleComponent extends Component<object, {
|
|
3
3
|
animatedTransitions: boolean;
|
|
4
4
|
}> {
|
|
5
|
-
constructor(props:
|
|
5
|
+
constructor(props: object);
|
|
6
6
|
handleSwitchClick: () => void;
|
|
7
7
|
render(): React.JSX.Element;
|
|
8
8
|
}
|
|
@@ -12,7 +12,7 @@ interface ButtonPropsBase {
|
|
|
12
12
|
action?: string;
|
|
13
13
|
/** Changes the style of the button.
|
|
14
14
|
*/
|
|
15
|
-
appearance?: 'default' | 'secondary' | 'primary' | 'destructive' | 'destructiveSecondary' | 'subtle';
|
|
15
|
+
appearance?: 'default' | 'secondary' | 'primary' | 'destructive' | 'destructiveSecondary' | 'standalone' | 'subtle';
|
|
16
16
|
/** Removes the right border and border-radius of the button so you can
|
|
17
17
|
* append other elements to it. */
|
|
18
18
|
append?: boolean;
|
|
@@ -2,14 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import { ButtonVariant } from './ButtonSimpleStyles';
|
|
3
3
|
import buttonMixin from './mixin';
|
|
4
4
|
import { ComponentProps } from '../utils/types';
|
|
5
|
-
declare const appearances: readonly ["default", "secondary", "primary", "destructive", "destructiveSecondary", "subtle"];
|
|
6
|
-
type Appearance = typeof appearances[number];
|
|
7
5
|
interface ButtonSimplePropsBase {
|
|
8
6
|
/** Returns a value on click. Use when composing or testing. */
|
|
9
7
|
action?: string;
|
|
10
8
|
/** Changes the style of the button.
|
|
11
9
|
*/
|
|
12
|
-
appearance?:
|
|
10
|
+
appearance?: 'default' | 'secondary' | 'primary' | 'destructive' | 'destructiveSecondary' | 'subtle' | 'standalone';
|
|
13
11
|
/** Removes the right border and border-radius of the button so you can
|
|
14
12
|
* append things to it. */
|
|
15
13
|
append?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnyTheme, Interpolation, InterpolationResult, ThemedProps } from '@splunk/themes';
|
|
2
|
-
declare const buttonVariants: readonly ["primary", "secondary", "destructive", "destructiveSecondary", "subtle"];
|
|
2
|
+
declare const buttonVariants: readonly ["primary", "secondary", "destructive", "destructiveSecondary", "subtle", "standalone"];
|
|
3
3
|
type ButtonVariant = typeof buttonVariants[number];
|
|
4
4
|
type ButtonStyleProps = ThemedProps & Partial<{
|
|
5
5
|
$append: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
3
|
+
import { DateGridChangeHandler } from './DateGrid';
|
|
4
4
|
import { ComponentProps } from '../utils/types';
|
|
5
|
-
type CalendarChangeHandler =
|
|
5
|
+
type CalendarChangeHandler = DateGridChangeHandler;
|
|
6
6
|
declare const calendarActiveSelector = "[data-active-day=\"true\"]";
|
|
7
7
|
interface CalendarPropsBase {
|
|
8
8
|
/**
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
|
4
|
-
type
|
|
4
|
+
type DateGridChangeHandler = (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>, data: {
|
|
5
5
|
value: string;
|
|
6
6
|
}) => void;
|
|
7
|
-
interface
|
|
7
|
+
interface DateGridPropsBase {
|
|
8
8
|
displayValue: string;
|
|
9
9
|
highlightToday?: boolean;
|
|
10
10
|
labelledBy?: string;
|
|
11
11
|
locale?: string;
|
|
12
|
-
onChange?:
|
|
13
|
-
onInternalChange?:
|
|
12
|
+
onChange?: DateGridChangeHandler;
|
|
13
|
+
onInternalChange?: DateGridChangeHandler;
|
|
14
14
|
selectedValue: string;
|
|
15
15
|
todayValue?: string;
|
|
16
16
|
}
|
|
17
|
-
type
|
|
18
|
-
declare function
|
|
19
|
-
declare namespace
|
|
17
|
+
type DateGridProps = ComponentProps<DateGridPropsBase, 'div'>;
|
|
18
|
+
declare function DateGrid({ displayValue, highlightToday, labelledBy, locale, onChange, onInternalChange, selectedValue, todayValue, ...otherProps }: DateGridProps): React.JSX.Element;
|
|
19
|
+
declare namespace DateGrid {
|
|
20
20
|
var propTypes: {
|
|
21
21
|
displayValue: PropTypes.Validator<string>;
|
|
22
22
|
highlightToday: PropTypes.Requireable<boolean>;
|
|
@@ -28,5 +28,5 @@ declare namespace DateTable {
|
|
|
28
28
|
todayValue: PropTypes.Requireable<string>;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
export default
|
|
32
|
-
export {
|
|
31
|
+
export default DateGrid;
|
|
32
|
+
export { DateGridChangeHandler };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { ComponentProps } from '../utils/types';
|
|
4
|
-
type DayClickHandler = (event: React.MouseEvent<
|
|
4
|
+
type DayClickHandler = (event: React.MouseEvent<HTMLDivElement>, data: {
|
|
5
5
|
value: string;
|
|
6
6
|
}) => void;
|
|
7
|
-
type DayKeyDownHandler = (event: React.KeyboardEvent<
|
|
7
|
+
type DayKeyDownHandler = (event: React.KeyboardEvent<HTMLDivElement>, data: {
|
|
8
8
|
value: string;
|
|
9
9
|
}) => void;
|
|
10
10
|
interface DayPropsBase {
|
|
11
11
|
/** Whether or not this day has the active cursor. */
|
|
12
12
|
active?: boolean;
|
|
13
|
+
/** @private */
|
|
14
|
+
dayOfWeek?: number;
|
|
13
15
|
/** Locale set by language and localization specifiers. */
|
|
14
16
|
locale?: string;
|
|
15
17
|
/** Callback for click */
|
|
@@ -23,11 +25,13 @@ interface DayPropsBase {
|
|
|
23
25
|
/** Day number to be displayed */
|
|
24
26
|
value: string;
|
|
25
27
|
}
|
|
26
|
-
type DayProps = ComponentProps<DayPropsBase, '
|
|
27
|
-
declare function Day({ active, locale, onClick, onKeyDown, selected, today, value, ...otherProps }: DayProps): React.JSX.Element;
|
|
28
|
+
type DayProps = ComponentProps<DayPropsBase, 'div'>;
|
|
29
|
+
declare function Day({ active, dayOfWeek, locale, onClick, onKeyDown, selected, today, value, ...otherProps }: DayProps): React.JSX.Element;
|
|
28
30
|
declare namespace Day {
|
|
29
31
|
var propTypes: {
|
|
30
32
|
active: PropTypes.Requireable<boolean>;
|
|
33
|
+
/** @private. */
|
|
34
|
+
dayOfWeek: PropTypes.Requireable<number>;
|
|
31
35
|
locale: PropTypes.Requireable<string>;
|
|
32
36
|
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
37
|
onKeydown: PropTypes.Requireable<(...args: any[]) => any>;
|
package/types/src/Card/Card.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ interface CardPropsBase {
|
|
|
46
46
|
to?: string;
|
|
47
47
|
/** Returns a value on click. Use when composing or if you have more than one selectable `Card`. */
|
|
48
48
|
value?: any;
|
|
49
|
-
/** Overrides the HTML tag for the Card component. Defaults to `article`. */
|
|
49
|
+
/** Overrides the HTML tag for the Card component. Defaults to `article`. Ignored if `to` or `onClick` are present. */
|
|
50
50
|
tag?: 'article' | 'div' | 'aside' | 'section';
|
|
51
51
|
}
|
|
52
52
|
interface CardPropsBaseNonClickable extends CardPropsBase {
|
|
@@ -60,12 +60,14 @@ interface CardPropsBaseOnClickClickable extends CardPropsBase {
|
|
|
60
60
|
onClick: CardClickHandler;
|
|
61
61
|
selected?: boolean;
|
|
62
62
|
to?: string;
|
|
63
|
+
tag?: never;
|
|
63
64
|
}
|
|
64
65
|
interface CardPropsBaseClickable extends CardPropsBase {
|
|
65
66
|
elementRef?: React.Ref<HTMLAnchorElement | HTMLButtonElement>;
|
|
66
67
|
onClick?: CardClickHandler;
|
|
67
68
|
selected?: never;
|
|
68
69
|
to?: string;
|
|
70
|
+
tag?: never;
|
|
69
71
|
}
|
|
70
72
|
type CardNonClickableProps = ComponentProps<CardPropsBaseNonClickable, 'div' | 'article'>;
|
|
71
73
|
type CardClickableButtonProps = ComponentProps<CardPropsBaseOnClickClickable | CardPropsBaseClickable, 'button'>;
|
|
@@ -20,6 +20,8 @@ interface HeaderPropsBase {
|
|
|
20
20
|
*/
|
|
21
21
|
actionsSecondary?: React.ReactNode;
|
|
22
22
|
/**
|
|
23
|
+
* @deprecated This prop is deprecated and will be removed in the next major version.
|
|
24
|
+
*
|
|
23
25
|
* Make the title an anchor so it can be bookmarked with a fragment.
|
|
24
26
|
*/
|
|
25
27
|
anchor?: string;
|
|
@@ -11,8 +11,8 @@ interface InteractiveState {
|
|
|
11
11
|
setAsWidth: boolean;
|
|
12
12
|
hasMaxWidth: boolean;
|
|
13
13
|
}
|
|
14
|
-
declare class Interactive extends Component<
|
|
15
|
-
constructor(props:
|
|
14
|
+
declare class Interactive extends Component<object, InteractiveState> {
|
|
15
|
+
constructor(props: object);
|
|
16
16
|
handleChangeAmount: NumberChangeHandler;
|
|
17
17
|
handleChangeMinWidth: NumberChangeHandler;
|
|
18
18
|
handleChangeMaxWidth: NumberChangeHandler;
|
|
@@ -37,13 +37,21 @@ interface ClickablePropsBase {
|
|
|
37
37
|
*/
|
|
38
38
|
navigationLabel?: string;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* @private
|
|
41
|
+
*/
|
|
42
|
+
tag?: 'a' | 'button';
|
|
43
|
+
/**
|
|
44
|
+
* A URL for a link. If set, an `a` element is used instead
|
|
41
45
|
* of a `button` element (link mode).
|
|
42
46
|
*/
|
|
43
47
|
to?: string;
|
|
44
48
|
}
|
|
45
|
-
type ClickableButtonProps = ComponentProps<ClickablePropsBase
|
|
46
|
-
|
|
49
|
+
type ClickableButtonProps = ComponentProps<ClickablePropsBase & {
|
|
50
|
+
to?: never;
|
|
51
|
+
}, 'button'>;
|
|
52
|
+
type ClickableLinkProps = ComponentProps<ClickablePropsBase & {
|
|
53
|
+
to: string;
|
|
54
|
+
}, 'a', 'href'>;
|
|
47
55
|
type ClickableProps = ClickableButtonProps | ClickableLinkProps;
|
|
48
56
|
/**
|
|
49
57
|
* `Clickable` renders as a `button` element, or as an `a` element if the `to` prop is set
|
|
@@ -51,4 +59,4 @@ type ClickableProps = ClickableButtonProps | ClickableLinkProps;
|
|
|
51
59
|
*/
|
|
52
60
|
declare const Clickable: React.ForwardRefExoticComponent<ClickableProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
53
61
|
export default Clickable;
|
|
54
|
-
export { ClickableProps };
|
|
62
|
+
export { ClickableButtonProps, ClickableLinkProps, ClickableProps, ClickablePropsBase };
|
|
@@ -137,8 +137,8 @@ type ComboBoxProps = ComponentProps<ComboBoxPropsBaseControlled | ComboBoxPropsB
|
|
|
137
137
|
*/
|
|
138
138
|
declare function ComboBox({ animateLoading, append, children, controlledFilter, defaultPlacement, defaultValue, describedBy, disabled, elementRef, error, footerMessage, inline, inputId, inputRef, isLoadingOptions, labelledBy, loadingMessage, menuStyle, name, noOptionsMessage, onBlur, onChange, onClose, onFocus, onKeyDown, onOpen, onScroll, onScrollBottom, onSelect, placeholder, prepend, value: valueProp, virtualization, ...otherProps }: ComboBoxProps): React.JSX.Element;
|
|
139
139
|
declare namespace ComboBox {
|
|
140
|
-
var Divider: typeof import("
|
|
141
|
-
var Heading: typeof import("
|
|
140
|
+
var Divider: typeof import("@splunk/react-ui/Menu").Divider;
|
|
141
|
+
var Heading: typeof import("@splunk/react-ui/Menu").Heading;
|
|
142
142
|
var Option: typeof import("./Option").default;
|
|
143
143
|
var propTypes: {
|
|
144
144
|
animateLoading: PropTypes.Requireable<boolean>;
|
|
@@ -178,4 +178,4 @@ declare namespace ComboBox {
|
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
180
|
export default ComboBox;
|
|
181
|
-
export { ComboBoxBlurHandler, ComboBoxChangeHandler, ComboBoxFocusHandler, ComboBoxProps, Option, Divider, Heading, };
|
|
181
|
+
export { ComboBoxBlurHandler, ComboBoxChangeHandler, ComboBoxFocusHandler, ComboBoxProps, ComboBoxScrollBottomHandler, Option, Divider, Heading, };
|