@splunk/react-ui 5.8.0 → 5.9.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/Anchor.js +2 -1
- package/CHANGELOG.md +22 -0
- package/Calendar.js +134 -134
- package/Clickable.js +131 -94
- package/CollapsiblePanel.js +173 -135
- package/ComboBox.js +1 -0
- package/Dropdown.js +27 -18
- package/File.js +35 -35
- package/Menu.js +259 -215
- package/Modal.js +174 -181
- package/Monogram.js +2 -2
- package/Multiselect.js +401 -321
- package/Number.js +2 -1
- package/Search.js +15 -14
- package/SelectBase.js +777 -719
- package/Table.js +116 -119
- package/Text.js +26 -26
- package/docs-llm/Avatar.md +2 -8
- package/docs-llm/Multiselect.md +5 -3
- package/docs-llm/Notifications.md +46 -0
- package/docs-llm/Tree.md +7 -2
- package/docs-llm/llms.txt +6 -2
- package/package.json +4 -4
- package/types/src/Multiselect/Compact.d.ts +8 -3
- package/types/src/Multiselect/Multiselect.d.ts +8 -3
- package/types/src/Multiselect/Normal.d.ts +8 -3
- package/types/src/Multiselect/Option.d.ts +6 -3
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +1 -0
- package/types/src/SelectBase/SelectBase.d.ts +1 -1
package/Text.js
CHANGED
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
var m = e.n(y);
|
|
90
90
|
// CONCATENATED MODULE: external "@splunk/react-ui/Button"
|
|
91
91
|
const g = require("@splunk/react-ui/Button");
|
|
92
|
-
var
|
|
92
|
+
var h = e.n(g);
|
|
93
93
|
// CONCATENATED MODULE: external "@splunk/react-ui/ControlGroup"
|
|
94
|
-
const
|
|
94
|
+
const C = require("@splunk/react-ui/ControlGroup");
|
|
95
95
|
// CONCATENATED MODULE: external "@splunk/react-ui/useControlled"
|
|
96
96
|
const x = require("@splunk/react-ui/useControlled");
|
|
97
97
|
var k = e.n(x);
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
const B = require("@splunk/themes");
|
|
110
110
|
// CONCATENATED MODULE: ./src/Text/TextStyles.ts
|
|
111
111
|
var I = "230px";
|
|
112
|
-
var P = O()(
|
|
112
|
+
var P = O()(h()).withConfig({
|
|
113
113
|
displayName: "TextStyles__StyledClearButton",
|
|
114
114
|
componentId: "eg7n6t-0"
|
|
115
115
|
})([ "display:none;visibility:hidden;" ]);
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
displayName: "TextStyles__StyledAdornment",
|
|
143
143
|
componentId: "eg7n6t-3"
|
|
144
144
|
})([ "display:inline-flex;align-items:center;justify-content:center;pointer-events:none;z-index:1;color:", ";", " ", ";& > button{", "}& > button:focus,& > a:focus{box-shadow:", ";}" ], B.variables.contentColorMuted, (function() {
|
|
145
|
-
return (0, S.css)([ "height:calc(", " -
|
|
145
|
+
return (0, S.css)([ "height:calc(", " - ", " * 2);" ], B.variables.inputHeight, B.variables.inputBorderWidth);
|
|
146
146
|
}), (function(e) {
|
|
147
147
|
var r = e.$disabled;
|
|
148
148
|
return r && (0, S.css)([ "color:", ";" ], B.variables.contentColorDisabled);
|
|
@@ -237,8 +237,8 @@
|
|
|
237
237
|
}
|
|
238
238
|
return ("string" === r ? String : Number)(e);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
return
|
|
240
|
+
function W() {
|
|
241
|
+
return W = Object.assign ? Object.assign.bind() : function(e) {
|
|
242
242
|
for (var r = 1; r < arguments.length; r++) {
|
|
243
243
|
var t = arguments[r];
|
|
244
244
|
for (var n in t) {
|
|
@@ -246,9 +246,9 @@
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
return e;
|
|
249
|
-
},
|
|
249
|
+
}, W.apply(null, arguments);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function G(e, r) {
|
|
252
252
|
return Y(e) || Q(e, r) || X(e, r) || U();
|
|
253
253
|
}
|
|
254
254
|
function U() {
|
|
@@ -366,15 +366,15 @@
|
|
|
366
366
|
var r;
|
|
367
367
|
var o = e.append, i = o === void 0 ? false : o, u = e.autoCapitalize, c = e.autoComplete, d = e.autoCorrect, v = e.autoFocus, b = v === void 0 ? false : v, p = e.canClear, y = p === void 0 ? false : p, g = e.children, x = e.defaultValue, S = e.disabled, O = S === void 0 ? false : S, j = e.describedBy, E = e.elementRef, A = e.endAdornment, B = e.error, I = B === void 0 ? false : B, _ = e.inline, F = _ === void 0 ? false : _, H = e.inputClassName, M = e.inputId, R = e.inputRef, V = e.labelledBy, K = e.maxLength, L = e.name, U = e.onBlur, X = e.onChange, J = e.onClick, Q = e.onFocus, Y = e.onKeyDown, ee = e.onSelect, re = e.passwordVisibilityToggle, ne = re === void 0 ? false : re, oe = e.placeholder, ae = e.prepend, ie = ae === void 0 ? false : ae, le = e.required, ue = e.spellCheck, se = e.startAdornment, ce = e.tabIndex, de = ce === void 0 ? 0 : ce, ve = e.title, be = e.type, pe = be === void 0 ? "text" : be, fe = e.value, ye = Z(e, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "canClear", "children", "defaultValue", "disabled", "describedBy", "elementRef", "endAdornment", "error", "inline", "inputClassName", "inputId", "inputRef", "labelledBy", "maxLength", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onSelect", "passwordVisibilityToggle", "placeholder", "prepend", "required", "spellCheck", "startAdornment", "tabIndex", "title", "type", "value" ]);
|
|
368
368
|
// @docs-props-type TextPropsBase
|
|
369
|
-
var me = (0, t.useContext)(
|
|
369
|
+
var me = (0, t.useContext)(C.ControlGroupContext);
|
|
370
370
|
var ge = k()({
|
|
371
371
|
componentName: "Text",
|
|
372
372
|
/* eslint-disable-next-line prefer-rest-params */
|
|
373
373
|
componentProps: arguments[0]
|
|
374
374
|
});
|
|
375
|
-
var
|
|
376
|
-
var
|
|
377
|
-
var Se = (0, t.useState)(true), Oe =
|
|
375
|
+
var he = (0, t.useRef)(null);
|
|
376
|
+
var Ce = (0, t.useState)(x || ""), xe = G(Ce, 2), ke = xe[0], we = xe[1];
|
|
377
|
+
var Se = (0, t.useState)(true), Oe = G(Se, 2), je = Oe[0], Ee = Oe[1];
|
|
378
378
|
var Ae = (0, t.useMemo)((function() {
|
|
379
379
|
return ge ? fe : ke;
|
|
380
380
|
}), [ ge, fe, ke ]);
|
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
if (!ge) {
|
|
403
403
|
we(t);
|
|
404
404
|
}
|
|
405
|
-
|
|
405
|
+
he === null || he === void 0 ? void 0 : (r = he.current) === null || r === void 0 ? void 0 : r.focus();
|
|
406
406
|
X === null || X === void 0 ? void 0 : X(e, {
|
|
407
407
|
value: t,
|
|
408
408
|
name: L
|
|
@@ -413,9 +413,9 @@
|
|
|
413
413
|
e.stopPropagation();
|
|
414
414
|
}), [ J ]);
|
|
415
415
|
var qe = (0, t.useCallback)((function(e) {
|
|
416
|
-
if (document.activeElement !==
|
|
416
|
+
if (document.activeElement !== he.current) {
|
|
417
417
|
var r;
|
|
418
|
-
(r =
|
|
418
|
+
(r = he.current) === null || r === void 0 ? void 0 : r.focus();
|
|
419
419
|
}
|
|
420
420
|
J === null || J === void 0 ? void 0 : J(e);
|
|
421
421
|
}), [ J ]);
|
|
@@ -433,9 +433,9 @@
|
|
|
433
433
|
Y === null || Y === void 0 ? void 0 : Y(e);
|
|
434
434
|
}), [ Y ]);
|
|
435
435
|
var Ne = (0, t.useCallback)((function(e) {
|
|
436
|
-
|
|
436
|
+
he.current = e;
|
|
437
437
|
D(R, e);
|
|
438
|
-
}), [ R,
|
|
438
|
+
}), [ R, he ]);
|
|
439
439
|
var Fe = (0, t.useCallback)((function(e) {
|
|
440
440
|
ee === null || ee === void 0 ? void 0 : ee(e);
|
|
441
441
|
}), [ ee ]);
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
};
|
|
451
451
|
if (A) {
|
|
452
452
|
|
|
453
|
-
return n().createElement($,
|
|
453
|
+
return n().createElement($, W({
|
|
454
454
|
"data-test": "end-adornment",
|
|
455
455
|
onClick: $e
|
|
456
456
|
}, r), A);
|
|
@@ -459,7 +459,7 @@
|
|
|
459
459
|
var t = je ? n().createElement(f(), null) : n().createElement(m(), null);
|
|
460
460
|
var o = je ? (0, w._)("Show password") : (0, w._)("Hide password");
|
|
461
461
|
|
|
462
|
-
return n().createElement($, r, n().createElement(
|
|
462
|
+
return n().createElement($, r, n().createElement(h(), {
|
|
463
463
|
appearance: "secondary",
|
|
464
464
|
"data-test": "password-toggle",
|
|
465
465
|
inline: false,
|
|
@@ -490,7 +490,7 @@
|
|
|
490
490
|
};
|
|
491
491
|
if (se) {
|
|
492
492
|
|
|
493
|
-
return n().createElement($,
|
|
493
|
+
return n().createElement($, W({
|
|
494
494
|
"data-test": "start-adornment",
|
|
495
495
|
onClick: $e
|
|
496
496
|
}, e), se);
|
|
@@ -519,7 +519,7 @@
|
|
|
519
519
|
}, l()(ye, [ "inputRef", "onBlur", "onClick", "onChange", "onFocus", "onKeyDown", "onSelect" ].concat(N(a()(ze)))));
|
|
520
520
|
var Ke = je ? "password" : "text";
|
|
521
521
|
var Le = ne ? Ke : pe;
|
|
522
|
-
var
|
|
522
|
+
var We = z(z({}, ze), {}, {
|
|
523
523
|
"data-test": "textbox",
|
|
524
524
|
autoCapitalize: u,
|
|
525
525
|
autoComplete: c,
|
|
@@ -546,22 +546,22 @@
|
|
|
546
546
|
$error: I
|
|
547
547
|
});
|
|
548
548
|
// Do not render value in DOM when type is password, or passwordVisibilityToggle is enabled
|
|
549
|
-
var
|
|
549
|
+
var Ge = pe === "password" || ne ? undefined : Ae;
|
|
550
550
|
// Firefox hack (SUI-2716). Remove when fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=1427173
|
|
551
551
|
var Ue = pe === "time";
|
|
552
552
|
|
|
553
|
-
return n().createElement(T,
|
|
553
|
+
return n().createElement(T, W({
|
|
554
554
|
tabIndex: -1,
|
|
555
555
|
$isTimeInput: Ue,
|
|
556
556
|
"data-test": "text",
|
|
557
|
-
"data-test-value":
|
|
557
|
+
"data-test-value": Ge,
|
|
558
558
|
"data-test-disabled": O === "dimmed" && "dimmed" || O && "disabled" || undefined,
|
|
559
559
|
ref: E,
|
|
560
560
|
flex: true,
|
|
561
561
|
inline: F,
|
|
562
562
|
onClick: qe,
|
|
563
563
|
$disabled: !!O
|
|
564
|
-
}, Ve), Re(), O ? n().createElement(q,
|
|
564
|
+
}, Ve), Re(), O ? n().createElement(q, W({
|
|
565
565
|
className: H,
|
|
566
566
|
"data-test": "textbox",
|
|
567
567
|
disabled: O === true,
|
|
@@ -569,7 +569,7 @@
|
|
|
569
569
|
readOnly: true,
|
|
570
570
|
type: Le,
|
|
571
571
|
value: Ae
|
|
572
|
-
}, ze)) : n().createElement(q,
|
|
572
|
+
}, ze)) : n().createElement(q, W({}, We, {
|
|
573
573
|
onClick: Te
|
|
574
574
|
})), g, Me());
|
|
575
575
|
}
|
package/docs-llm/Avatar.md
CHANGED
|
@@ -160,14 +160,8 @@ import Layout from '@splunk/react-ui/Layout';
|
|
|
160
160
|
import { pick, variables } from '@splunk/themes';
|
|
161
161
|
|
|
162
162
|
const avatarColor = pick({
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
dark: variables.diverging1ColorA,
|
|
166
|
-
},
|
|
167
|
-
prisma: {
|
|
168
|
-
light: variables.sequential6D7,
|
|
169
|
-
dark: variables.sequential6D3,
|
|
170
|
-
},
|
|
163
|
+
light: variables.sequential6D7,
|
|
164
|
+
dark: variables.sequential6D3,
|
|
171
165
|
});
|
|
172
166
|
|
|
173
167
|
|
package/docs-llm/Multiselect.md
CHANGED
|
@@ -324,6 +324,8 @@ export default MultiselectError;
|
|
|
324
324
|
|
|
325
325
|
### Disabled
|
|
326
326
|
|
|
327
|
+
If you absolutely need to disable a `Multiselect` use `"disabled="dimmed"`. This ensures the `Multiselect` does not respond to events, but can still receive focus to so that users can navigate to the `Multiselect` when using assistive technologies.
|
|
328
|
+
|
|
327
329
|
```typescript
|
|
328
330
|
import React, { useCallback, useState } from 'react';
|
|
329
331
|
|
|
@@ -338,7 +340,7 @@ function Disabled() {
|
|
|
338
340
|
}, []);
|
|
339
341
|
|
|
340
342
|
return (
|
|
341
|
-
<Multiselect values={selectedValues} onChange={handleChange} disabled inline>
|
|
343
|
+
<Multiselect values={selectedValues} onChange={handleChange} disabled="dimmed" inline>
|
|
342
344
|
<Multiselect.Option label="Area chart" value="1" />
|
|
343
345
|
<Multiselect.Option label="Bar chart" value="2" />
|
|
344
346
|
<Multiselect.Option label="Bubble chart" value="3" />
|
|
@@ -856,7 +858,7 @@ export default Compact;
|
|
|
856
858
|
| defaultPlacement | 'above' \| 'below' \| 'vertical' | no | 'vertical' | The default placement of the dropdown menu. It might be rendered in a different direction depending upon the space available. |
|
|
857
859
|
| defaultValues | (string \| number \| boolean)[] | no | | Set this property instead of value to keep the value uncontrolled. |
|
|
858
860
|
| describedBy | string | no | | The id of the description. When placed in a ControlGroup, this is automatically set to the ControlGroup's help component. |
|
|
859
|
-
| disabled | boolean | no | |
|
|
861
|
+
| disabled | boolean \| 'dimmed' \| 'disabled' | no | | Prevents user interaction and adds disabled styling. If set to `dimmed`, the component is able to receive focus. If set to `disabled`, the component is unable to receive focus. |
|
|
860
862
|
| elementRef | React.Ref<HTMLButtonElement \| HTMLDivElement> | no | | A React ref which is set to the DOM element when the component mounts, and null when it unmounts. |
|
|
861
863
|
| error | boolean | no | | Display as in an error. |
|
|
862
864
|
| filter | boolean \| 'controlled' | no | | Determines whether to show the filter box. When true, the children are automatically filtered based on the label. When controlled, the parent component must provide a onFilterChange callback and update the children. Only supported when `compact=true`. |
|
|
@@ -905,7 +907,7 @@ An option within a `Multiselect`.
|
|
|
905
907
|
| children | React.ReactNode | no | | When provided, `children` is rendered instead of the `label`. Caution: The element(s) passed here must be pure. |
|
|
906
908
|
| description | string | no | | Additional information to explain the option, such as "Recommended". |
|
|
907
909
|
| descriptionPosition | 'right' \| 'bottom' | no | 'bottom' | The description text may appear to the right of the label or under the label. |
|
|
908
|
-
| disabled | boolean | no | |
|
|
910
|
+
| disabled | boolean \| 'dimmed' \| 'disabled' | no | | Prevents user interaction and adds disabled styling. If set to `dimmed`, the component is able to receive focus. If set to `disabled`, the component is unable to receive focus. |
|
|
909
911
|
| hidden | boolean | no | | Adding hidden options can be useful for resolving the selected display label and icon, when the option should not be in the list. This scenario can arise when Select's filter is controlled, because the selected item may be filtered out; and when a legacy option is valid, but should no longer be displayed as a selectable option. |
|
|
910
912
|
| icon | React.ReactNode | no | | The icon to show before the label. See the @splunk/react-icons package for drop in icons. Caution: The element(s) passed here must be pure. All icons in the react-icons package are pure. |
|
|
911
913
|
| label | string | yes | | The text to show for the option when `children` is not defined. When filtering, the `label` is used for matching to the filter text. |
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Notifications
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
# Notifications
|
|
6
|
+
|
|
7
|
+
Notifications help users understand what happened, what needs attention, and what to do next.
|
|
8
|
+
|
|
9
|
+
There are two notification components in Splunk UI:
|
|
10
|
+
- [Message](./Message) is used for inline, contextual feedback near the content it refers to.
|
|
11
|
+
- [Message Bar](./MessageBar) is used for page-level or system-level communication.
|
|
12
|
+
|
|
13
|
+
These components use standardized icons and [`notificationColors` design tokens](../themes/variables#notification-colors) to communicate consistent tone and urgency, so users can quickly understand what to expect.
|
|
14
|
+
|
|
15
|
+
## Toast Notifications (Deprecated)
|
|
16
|
+
|
|
17
|
+
Toast notifications are **deprecated** and should not be used for new experiences.
|
|
18
|
+
Even with careful implementation, this pattern still creates significant accessibility and usability barriers.
|
|
19
|
+
|
|
20
|
+
Use persistent, user-dismissible notifications instead:
|
|
21
|
+
- Use [Message](./Message) for inline, contextual feedback.
|
|
22
|
+
- Use [Message Bar](./MessageBar) for page-level or system-level communication.
|
|
23
|
+
|
|
24
|
+
### Migration Guide
|
|
25
|
+
|
|
26
|
+
Review the CRUD Blueprint sections for [Create confirmation](../../DesignSystem/Blueprints/CRUD/Create#3-confirmation), [Update confirmation](../../DesignSystem/Blueprints/CRUD/Update#3-confirmation) and [Delete feedback](../../DesignSystem/Blueprints/CRUD/Delete#3-feedback) for guidance on scenarios where the toast pattern may have previously been used.
|
|
27
|
+
|
|
28
|
+
Below are suggestions for how to migrate common scenarios:
|
|
29
|
+
|
|
30
|
+
| Current Toast Pattern | Recommended Alternative | Reason |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Success message after form submission | Message Bar at top of page, or inline Message next to changed element | Persistent confirmation is visible to all users regardless of timing |
|
|
33
|
+
| Error feedback | Inline Message in form field, or Message Bar at top | Direct association with the error source helps users understand and fix the problem |
|
|
34
|
+
| Temporary status updates | Message Bar for page-level updates, or Message for task-level updates | Clear scope and persistent visibility ensure all users receive the information |
|
|
35
|
+
| Real-time alerts | Message Bar with optional dismiss action | Ensures users see critical information before it's dismissed |
|
|
36
|
+
|
|
37
|
+
### Further Reading
|
|
38
|
+
|
|
39
|
+
Below are additional resources to understand the issues with toast patterns:
|
|
40
|
+
|
|
41
|
+
- [GitHub Primer: Accessible Notifications and Messages](https://primer.style/accessibility/patterns/accessible-notifications-and-messages/#toasts)
|
|
42
|
+
- [Defining Toast Messages (Adrian Roselli)](https://adrianroselli.com/2020/01/defining-toast-messages.html)
|
|
43
|
+
- [A Toast to an Accessible Toast... to Notifications (Scott O'Hara)](https://www.scottohara.me/blog/2019/07/08/a-toast-to-a11y-toasts.html)
|
|
44
|
+
- [The Problem with Toast Messages and What to Do Instead (Adam Silver)](https://adamsilver.io/blog/the-problem-with-toast-messages-and-what-to-do-instead/)
|
|
45
|
+
|
|
46
|
+
|
package/docs-llm/Tree.md
CHANGED
|
@@ -163,8 +163,10 @@ import { variables } from '@splunk/themes';
|
|
|
163
163
|
|
|
164
164
|
const StyledExpansionToggleWrapper = styled.span`
|
|
165
165
|
display: inline-flex;
|
|
166
|
-
padding-inline-end: ${variables.spacingSmall};
|
|
167
166
|
width: 16px;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
align-items: center;
|
|
169
|
+
padding-inline: ${variables.spacingMedium};
|
|
168
170
|
`;
|
|
169
171
|
const StyledSpan = styled.span`
|
|
170
172
|
display: inline-flex;
|
|
@@ -314,9 +316,12 @@ import { variables } from '@splunk/themes';
|
|
|
314
316
|
const StyledExpansionToggleWrapper = styled.span`
|
|
315
317
|
display: inline-flex;
|
|
316
318
|
width: 16px;
|
|
319
|
+
justify-content: center;
|
|
320
|
+
align-items: center;
|
|
321
|
+
padding-inline: ${variables.spacingMedium};
|
|
317
322
|
`;
|
|
318
323
|
const StyledCheckbox = styled(Checkbox)`
|
|
319
|
-
padding-inline: ${variables.spacingSmall};
|
|
324
|
+
padding-inline-end: ${variables.spacingSmall};
|
|
320
325
|
`;
|
|
321
326
|
const StyledSpan = styled.span`
|
|
322
327
|
align-items: center;
|
package/docs-llm/llms.txt
CHANGED
|
@@ -17,8 +17,6 @@ A library of UI components, all independent of the Splunk Enterprise environment
|
|
|
17
17
|
- **JSON Tree**
|
|
18
18
|
- **Link**
|
|
19
19
|
- **Markdown**
|
|
20
|
-
- **Message**
|
|
21
|
-
- **Message Bar**
|
|
22
20
|
- **Modal**
|
|
23
21
|
- **Paginator**
|
|
24
22
|
- **Progress**
|
|
@@ -68,6 +66,12 @@ A library of UI components, all independent of the Splunk Enterprise environment
|
|
|
68
66
|
- **Anchor Menu**
|
|
69
67
|
- **Breadcrumbs**
|
|
70
68
|
|
|
69
|
+
## Notifications
|
|
70
|
+
|
|
71
|
+
- **Notifications**
|
|
72
|
+
- **Message**
|
|
73
|
+
- **Message Bar**
|
|
74
|
+
|
|
71
75
|
## Utilities
|
|
72
76
|
|
|
73
77
|
- **AnimationToggle**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splunk/react-ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.0",
|
|
4
4
|
"description": "Library of React components that implement the Splunk design language",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Splunk Inc.",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"@dnd-kit/sortable": "^8.0.0",
|
|
46
46
|
"@dnd-kit/utilities": "^3.2.2",
|
|
47
47
|
"@react-spring/web": "^9.7.5",
|
|
48
|
-
"@splunk/react-icons": "^5.
|
|
49
|
-
"@splunk/themes": "^1.
|
|
48
|
+
"@splunk/react-icons": "^5.9.0",
|
|
49
|
+
"@splunk/themes": "^1.6.0",
|
|
50
50
|
"@splunk/ui-utils": "^1.12.0",
|
|
51
51
|
"decimal.js-light": "^2.5.1",
|
|
52
52
|
"intl-tel-input": "^25.3.2",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@splunk/docs-gen": "^1.4.0",
|
|
67
67
|
"@splunk/eslint-config": "^5.0.0",
|
|
68
68
|
"@splunk/eslint-plugin-splunk-ui": "^0.1.0",
|
|
69
|
-
"@splunk/react-docs": "^1.
|
|
69
|
+
"@splunk/react-docs": "^1.6.0",
|
|
70
70
|
"@splunk/stylelint-config": "^5.0.0",
|
|
71
71
|
"@splunk/test-runner-utils": "^0.4.1",
|
|
72
72
|
"@splunk/webpack-configs": "^7.0.3",
|
|
@@ -36,8 +36,13 @@ interface CompactPropsBase {
|
|
|
36
36
|
* ControlGroup's help component.
|
|
37
37
|
*/
|
|
38
38
|
describedBy?: string;
|
|
39
|
-
/**
|
|
40
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Prevents user interaction and adds disabled styling.
|
|
41
|
+
*
|
|
42
|
+
* If set to `dimmed`, the component is able to receive focus.
|
|
43
|
+
* If set to `disabled`, the component is unable to receive focus.
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean | 'dimmed' | 'disabled';
|
|
41
46
|
/**
|
|
42
47
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
43
48
|
*/
|
|
@@ -171,7 +176,7 @@ declare namespace Compact {
|
|
|
171
176
|
defaultPlacement: PropTypes.Requireable<string>;
|
|
172
177
|
defaultValues: PropTypes.Requireable<any[]>;
|
|
173
178
|
describedBy: PropTypes.Requireable<string>;
|
|
174
|
-
disabled: PropTypes.Requireable<boolean
|
|
179
|
+
disabled: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
175
180
|
elementRef: PropTypes.Requireable<object>;
|
|
176
181
|
error: PropTypes.Requireable<boolean>;
|
|
177
182
|
filter: PropTypes.Requireable<string | boolean>;
|
|
@@ -55,8 +55,13 @@ interface MultiselectPropsBase {
|
|
|
55
55
|
* ControlGroup's help component.
|
|
56
56
|
*/
|
|
57
57
|
describedBy?: string;
|
|
58
|
-
/**
|
|
59
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Prevents user interaction and adds disabled styling.
|
|
60
|
+
*
|
|
61
|
+
* If set to `dimmed`, the component is able to receive focus.
|
|
62
|
+
* If set to `disabled`, the component is unable to receive focus.
|
|
63
|
+
*/
|
|
64
|
+
disabled?: boolean | 'dimmed' | 'disabled';
|
|
60
65
|
/**
|
|
61
66
|
* A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
|
|
62
67
|
*/
|
|
@@ -223,7 +228,7 @@ declare namespace Multiselect {
|
|
|
223
228
|
defaultPlacement: PropTypes.Requireable<string>;
|
|
224
229
|
defaultValues: PropTypes.Requireable<any[]>;
|
|
225
230
|
describedBy: PropTypes.Requireable<string>;
|
|
226
|
-
disabled: PropTypes.Requireable<boolean
|
|
231
|
+
disabled: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
227
232
|
elementRef: PropTypes.Requireable<object>;
|
|
228
233
|
error: PropTypes.Requireable<boolean>;
|
|
229
234
|
filter: PropTypes.Requireable<string | boolean>;
|
|
@@ -32,8 +32,13 @@ interface NormalPropsBase {
|
|
|
32
32
|
* ControlGroup's help component.
|
|
33
33
|
*/
|
|
34
34
|
describedBy?: string;
|
|
35
|
-
/**
|
|
36
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Prevents user interaction and adds disabled styling.
|
|
37
|
+
*
|
|
38
|
+
* If set to `dimmed`, the component is able to receive focus.
|
|
39
|
+
* If set to `disabled`, the component is unable to receive focus.
|
|
40
|
+
*/
|
|
41
|
+
disabled?: boolean | 'dimmed' | 'disabled';
|
|
37
42
|
/**
|
|
38
43
|
* A React ref which is set to the DOM element when the component mounts and null when it unmounts.
|
|
39
44
|
*/
|
|
@@ -138,7 +143,7 @@ declare namespace Normal {
|
|
|
138
143
|
defaultPlacement: PropTypes.Requireable<string>;
|
|
139
144
|
defaultValues: PropTypes.Requireable<any[]>;
|
|
140
145
|
describedBy: PropTypes.Requireable<string>;
|
|
141
|
-
disabled: PropTypes.Requireable<boolean
|
|
146
|
+
disabled: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
142
147
|
elementRef: PropTypes.Requireable<object>;
|
|
143
148
|
error: PropTypes.Requireable<boolean>;
|
|
144
149
|
footerMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
@@ -26,9 +26,12 @@ interface OptionPropsBase {
|
|
|
26
26
|
*/
|
|
27
27
|
descriptionPosition?: 'right' | 'bottom';
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Prevents user interaction and adds disabled styling.
|
|
30
|
+
*
|
|
31
|
+
* If set to `dimmed`, the component is able to receive focus.
|
|
32
|
+
* If set to `disabled`, the component is unable to receive focus.
|
|
30
33
|
*/
|
|
31
|
-
disabled?: boolean;
|
|
34
|
+
disabled?: boolean | 'dimmed' | 'disabled';
|
|
32
35
|
/**
|
|
33
36
|
* @private Undocumented due to limitations in supporting in compact `Multiselect` (see SUI-8286 notes for more info).
|
|
34
37
|
* A React ref which is set to the DOM element when the component mounts, and null when it unmounts.
|
|
@@ -99,7 +102,7 @@ declare namespace Option {
|
|
|
99
102
|
compact: PropTypes.Requireable<boolean>;
|
|
100
103
|
description: PropTypes.Requireable<string>;
|
|
101
104
|
descriptionPosition: PropTypes.Requireable<string>;
|
|
102
|
-
disabled: PropTypes.Requireable<boolean
|
|
105
|
+
disabled: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
103
106
|
/**
|
|
104
107
|
* @private Undocumented due to limitations in supporting in compact `Multiselect` (see SUI-8286 notes for more info).
|
|
105
108
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* @name Disabled
|
|
4
|
+
* @description If you absolutely need to disable a `Multiselect` use `"disabled="dimmed"`. This ensures the `Multiselect` does not respond to events, but can still receive focus to so that users can navigate to the `Multiselect` when using assistive technologies.
|
|
4
5
|
*/
|
|
5
6
|
declare function Disabled(): React.JSX.Element;
|
|
6
7
|
export default Disabled;
|
|
@@ -58,7 +58,7 @@ interface SelectBasePropsBase {
|
|
|
58
58
|
* Prevents user interaction and adds disabled styling.
|
|
59
59
|
*
|
|
60
60
|
* If set to `dimmed`, the component is able to receive focus.
|
|
61
|
-
* If set to `disabled`, the component is unable to receive focus
|
|
61
|
+
* If set to `disabled`, the component is unable to receive focus.
|
|
62
62
|
*/
|
|
63
63
|
disabled?: boolean | 'dimmed' | 'disabled';
|
|
64
64
|
/**
|