@splunk/react-ui 5.0.0-beta.2 → 5.0.0-beta.4
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 -4
- package/ButtonGroup.js +10 -11
- package/ButtonSimple.js +48 -42
- package/CHANGELOG.md +26 -0
- package/CHANGELOG.v5.mdx +81 -0
- package/Calendar.js +352 -469
- package/Card.js +178 -321
- package/Chip.js +154 -296
- package/Clickable.js +30 -30
- package/Code.js +64 -49
- package/Color.js +546 -462
- package/ComboBox.js +575 -767
- package/Date.js +144 -136
- package/Divider.js +29 -26
- package/DualListbox.js +441 -444
- package/File.js +707 -981
- package/FormRows.js +260 -286
- package/Image.js +124 -251
- package/JSONTree.js +129 -129
- package/Layout.d.ts +2 -0
- package/Link.js +12 -12
- package/MIGRATION.mdx +22 -1
- package/MIGRATION.v5.mdx +12 -1
- package/Menu.js +76 -76
- package/Message.js +77 -100
- package/MessageBar.js +141 -251
- package/Modal.js +42 -40
- package/ModalLayer.js +12 -12
- package/Multiselect.js +1989 -2362
- package/NonInteractiveCheckbox.js +30 -118
- package/Number.js +75 -73
- package/Popover.js +348 -350
- package/Progress.js +1 -1
- package/RadioBar.js +136 -136
- package/Resize.js +62 -65
- package/Scroll.js +2 -2
- package/Select.js +281 -283
- package/SidePanel.js +53 -55
- package/Slider.js +370 -364
- package/SlidingPanels.js +100 -102
- package/SplitButton.js +170 -343
- package/StaticContent.js +15 -13
- package/StepBar.js +61 -60
- package/Switch.js +150 -164
- package/TabBar.js +544 -417
- package/Table.js +1711 -1540
- package/Text.js +28 -26
- package/TextArea.js +26 -26
- package/Tooltip.js +416 -562
- package/TransitionOpen.js +179 -158
- package/Tree.d.ts +2 -0
- package/WaitSpinner.js +1 -1
- package/package.json +7 -9
- 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 +2 -2
- 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 +27 -14
- 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 +1 -1
- package/types/src/CollapsiblePanel/SingleOpenPanelGroupContext.d.ts +0 -1
- package/types/src/Color/Color.d.ts +3 -3
- package/types/src/Color/ColorInput.d.ts +27 -0
- package/types/src/Color/Palette.d.ts +11 -18
- package/types/src/Color/Swatch.d.ts +3 -1
- package/types/src/ComboBox/ComboBox.d.ts +46 -50
- package/types/src/ComboBox/Option.d.ts +34 -18
- package/types/src/ControlGroup/docs/examples/CustomizedLabelTarget.d.ts +2 -2
- package/types/src/Date/Date.d.ts +3 -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/Divider/Divider.d.ts +14 -6
- package/types/src/Divider/docs/examples/Appearance.d.ts +3 -0
- package/types/src/DualListbox/DualListbox.d.ts +5 -1
- package/types/src/File/File.d.ts +6 -6
- 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 +7 -0
- 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 +8 -8
- package/types/src/FormRows/FormRowsContext.d.ts +1 -2
- package/types/src/FormRows/Row.d.ts +2 -2
- package/types/src/FormRows/RowInternal.d.ts +1 -1
- package/types/src/FormRows/SortableRow.d.ts +3 -3
- 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/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/MessageBar/MessageBar.d.ts +5 -1
- package/types/src/Modal/ModalContext.d.ts +0 -1
- package/types/src/Multiselect/Compact.d.ts +49 -21
- package/types/src/Multiselect/Multiselect.d.ts +73 -30
- package/types/src/Multiselect/Normal.d.ts +46 -57
- package/types/src/Multiselect/Option.d.ts +42 -18
- package/types/src/Multiselect/docs/examples/Children.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Controlled.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/CustomizeSelected.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Error.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/Fetching.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/LoadMoreOnScrollBottom.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/NewValues.d.ts +2 -2
- package/types/src/Multiselect/docs/examples/TabInput.d.ts +2 -2
- package/types/src/NonInteractiveCheckbox/NonInteractiveCheckbox.d.ts +9 -8
- package/types/src/Number/Number.d.ts +1 -0
- 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/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 +2 -2
- package/types/src/SidePanel/SidePanel.d.ts +8 -3
- package/types/src/Slider/Slider.d.ts +1 -1
- 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 +34 -20
- package/types/src/SplitButton/SplitButton.d.ts +4 -1
- package/types/src/StaticContent/StaticContent.d.ts +3 -1
- 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/Switch.d.ts +1 -9
- 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 +4 -3
- package/types/src/TabBar/TabBarContext.d.ts +7 -2
- 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/Table/Toggle.d.ts +1 -1
- package/types/src/Text/Text.d.ts +5 -1
- package/types/src/Tooltip/Tooltip.d.ts +26 -58
- package/types/src/Tooltip/docs/examples/Controlled.d.ts +2 -2
- package/types/src/TransitionOpen/TransitionOpen.d.ts +6 -1
- package/types/src/Tree/TreeContext.d.ts +0 -1
- 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/File/Icon.d.ts +0 -3
- package/types/src/File/IconCloud.d.ts +0 -3
- package/types/src/File/PaperClip.d.ts +0 -3
- package/types/src/File/Retry.d.ts +0 -2
- package/types/src/File/Trash.d.ts +0 -3
- package/types/src/FormRows/icons/FormRowsPlusIcon.d.ts +0 -3
- package/types/src/Image/icons/Cross.d.ts +0 -3
- package/types/src/Multiselect/docs/examples/CompactSelectAll.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/Layout.d.ts
ADDED
package/Link.js
CHANGED
|
@@ -76,26 +76,26 @@
|
|
|
76
76
|
const s = require("@splunk/ui-utils/i18n");
|
|
77
77
|
// CONCATENATED MODULE: external "styled-components"
|
|
78
78
|
const c = require("styled-components");
|
|
79
|
-
var
|
|
79
|
+
var d = e.n(c);
|
|
80
80
|
// CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRightInset"
|
|
81
|
-
const
|
|
82
|
-
var p = e.n(
|
|
81
|
+
const u = require("@splunk/react-icons/ArrowSquareTopRightInset");
|
|
82
|
+
var p = e.n(u);
|
|
83
83
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
84
84
|
const f = require("@splunk/themes");
|
|
85
85
|
// CONCATENATED MODULE: ./src/Link/icons/External.tsx
|
|
86
|
-
var b =
|
|
86
|
+
var b = d()(p()).withConfig({
|
|
87
87
|
displayName: "External",
|
|
88
88
|
componentId: "sc-13bdx45-0"
|
|
89
89
|
})([ "vertical-align:text-bottom;margin-left:", ";" ], f.variables.spacingXSmall);
|
|
90
90
|
/* harmony default export */ const v = b;
|
|
91
91
|
// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
92
92
|
const m = require("@splunk/react-ui/Clickable");
|
|
93
|
-
var
|
|
93
|
+
var h = e.n(m);
|
|
94
94
|
// CONCATENATED MODULE: ./src/Link/LinkStyles.ts
|
|
95
|
-
var
|
|
95
|
+
var y = d()(h()).withConfig({
|
|
96
96
|
displayName: "LinkStyles__StyledClickable",
|
|
97
97
|
componentId: "sc-1hhltcf-0"
|
|
98
|
-
})([ "", ";text-decoration:none;font-size:inherit;font-weight:inherit;line-height:inherit;color:", ";", " &:not([disabled],[aria-disabled='true']){cursor:pointer;&:hover,&:active,&:focus{color:", ";text-decoration:underline;}&:focus{box-shadow:", ";outline:0;&:active{box-shadow:none;}}}&[disabled],&[aria-disabled='true']{color:", ";}" ], f.mixins.reset("inline"), f.variables.contentColorLink, (0,
|
|
98
|
+
})([ "", ";text-decoration:none;font-size:inherit;font-weight:inherit;line-height:inherit;color:", ";", " &:not([disabled],[aria-disabled='true']){cursor:pointer;&:hover,&:active,&:focus{color:", ";text-decoration:underline;text-decoration-thickness:2px;}&:focus{box-shadow:", ";outline:0;&:active{box-shadow:none;}}}&[disabled],&[aria-disabled='true']{color:", ";}" ], f.mixins.reset("inline"), f.variables.contentColorLink, (0,
|
|
99
99
|
f.pickVariant)("$appearance", {
|
|
100
100
|
inline: (0, c.css)([ "text-decoration:underline;" ]),
|
|
101
101
|
standalone: (0, c.css)([ "font-weight:", ";" ], f.variables.fontWeightSemiBold)
|
|
@@ -147,19 +147,19 @@
|
|
|
147
147
|
* `Link` is a simple method for configuring `Button` for inline links. For more complex behaviors,
|
|
148
148
|
* see the `Button` documentation.
|
|
149
149
|
*/ var k = r().forwardRef((function(e, n) {
|
|
150
|
-
var t = e.appearance, o = t === void 0 ? "inline" : t, a = e.children, i = e.disabled, s = i === void 0 ? false : i, c = e.elementRef,
|
|
150
|
+
var t = e.appearance, o = t === void 0 ? "inline" : t, a = e.children, i = e.disabled, s = i === void 0 ? false : i, c = e.elementRef, d = e.openInNewContext, u = d === void 0 ? false : d, p = e.to, f = w(e, [ "appearance", "children", "disabled", "elementRef", "openInNewContext", "to" ]);
|
|
151
151
|
// @docs-props-type LinkPropsBase
|
|
152
|
-
var b = typeof
|
|
152
|
+
var b = typeof u === "string" ? u : S;
|
|
153
153
|
|
|
154
|
-
return r().createElement(
|
|
154
|
+
return r().createElement(y, g({
|
|
155
155
|
"data-test": "link",
|
|
156
156
|
disabled: s,
|
|
157
157
|
elementRef: c,
|
|
158
|
-
openInNewContext: !!
|
|
158
|
+
openInNewContext: !!u,
|
|
159
159
|
$appearance: o,
|
|
160
160
|
ref: n,
|
|
161
161
|
to: s ? "" : p
|
|
162
|
-
}, f), a,
|
|
162
|
+
}, f), a, u && r().createElement(r().Fragment, null, r().createElement(v, null), r().createElement(l(), null, b)));
|
|
163
163
|
}));
|
|
164
164
|
k.propTypes = x;
|
|
165
165
|
/* harmony default export */ const C = k;
|
package/MIGRATION.mdx
CHANGED
|
@@ -5,6 +5,27 @@ 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.44.0
|
|
9
|
+
|
|
10
|
+
### `ButtonGroup` role changed to `group`
|
|
11
|
+
|
|
12
|
+
### Change
|
|
13
|
+
|
|
14
|
+
`ButtonGroup`'s `role` has changed from `menubar` to `group`.
|
|
15
|
+
Child `Button`'s `role`s have changed from `menuitem` to `button`.
|
|
16
|
+
|
|
17
|
+
#### Context
|
|
18
|
+
|
|
19
|
+
`ButtonGroup` did not implement the correct keyboard behavior for a menu bar.
|
|
20
|
+
This created an unexpected user experience for keyboard and screen reader users.
|
|
21
|
+
|
|
22
|
+
#### Migration steps
|
|
23
|
+
|
|
24
|
+
If `role="group"` is not desired:
|
|
25
|
+
* consider using `RadioBar` which supports `role="menubar"`
|
|
26
|
+
* implement either the [Menubar](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/) or [Toolbar](https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/) pattern according to WCAG guidelines using `ButtonGroup`
|
|
27
|
+
* contact the Design System team to make a feature request based on your use case.
|
|
28
|
+
|
|
8
29
|
## 4.40.0
|
|
9
30
|
|
|
10
31
|
### Deprecated `Select`'s `appearance="primary"` value
|
|
@@ -228,7 +249,7 @@ For Enterprise themes:
|
|
|
228
249
|
|
|
229
250
|
For Prisma themes:
|
|
230
251
|
* the `"flat"` appearance can be replaced by `"secondary"` or `"subtle"` depending on the context in which it appears.
|
|
231
|
-
* the `"toggle"` appearance can be replaced with `"
|
|
252
|
+
* the `"toggle"` appearance can be replaced with `"secondary"`.
|
|
232
253
|
|
|
233
254
|
### Deprecated `CollapsiblePanel`'s `titleWithActions` prop
|
|
234
255
|
|
package/MIGRATION.v5.mdx
CHANGED
|
@@ -207,7 +207,7 @@ Components that formerly supported class focus methods (`Color`, `Link`, `Menu`,
|
|
|
207
207
|
### Migration steps
|
|
208
208
|
- Convert all usage of `ref` to `elementRef`.
|
|
209
209
|
- For `Number` and `Text`: Replace all usage of the class `focus` method with passing a `ref` to the `inputRef` prop and calling `inputRef.current.focus()`.
|
|
210
|
-
- For `Button`, `Color`, `Link`, `Menu`, `Select.Option`, and `TabBar.Tab`: Replace all usage of the class `focus` method with passing a `ref` to the `elementRef` prop and calling `elementRef.current.focus()`.
|
|
210
|
+
- For `Button`, `Color`, `Link`, `Menu`, `Multiselect.Option`, `Select.Option`, `SplitButton.Item`, and `TabBar.Tab`: Replace all usage of the class `focus` method with passing a `ref` to the `elementRef` prop and calling `elementRef.current.focus()`.
|
|
211
211
|
- For `Table.HeadDropdownCell`: Replace all usage of the class `focus` method with passing a `ref` to the `buttonRef` prop and calling `buttonRef.current.focus()`.
|
|
212
212
|
- For `Switch`: Replace all usage of the class `focus` method with passing a `ref` to the `toggleRef` prop and calling `toggleRef.current.focus()`.
|
|
213
213
|
- For `Slider`: Replace all usage of the class `focus` method with passing a `ref` to the `thumbRef` prop and calling `thumbRef.current.focus()`.
|
|
@@ -261,6 +261,17 @@ This difference can cause confusion and conflict with accessibility expectations
|
|
|
261
261
|
#### Migration steps
|
|
262
262
|
- Replace Select with appearance="link" by using either appearance="default" or appearance="subtle", depending on design requirements.
|
|
263
263
|
|
|
264
|
+
### Deprecated `Multiselect`'s `selectAllAppearance="buttongroup"` value
|
|
265
|
+
|
|
266
|
+
#### Change
|
|
267
|
+
`Multiselect`'s `"buttongroup"` value of the `selectAllAppearance` prop has been deprecated and will be removed in the next major version.
|
|
268
|
+
|
|
269
|
+
#### Context
|
|
270
|
+
Using `Multiselect`'s `selectAllAppearance="checkbox"` will fix accessibility issue by making it easier to toggle between "select all" and "select none" with one less tab stop.
|
|
271
|
+
|
|
272
|
+
#### Migration steps
|
|
273
|
+
- Replace `Mulitselect`'s `selectAllAppearance="buttongroup"` with `selectAllAppearance="checkbox"`.
|
|
274
|
+
|
|
264
275
|
## Markdown users `react-markdown`
|
|
265
276
|
|
|
266
277
|
### Change
|
package/Menu.js
CHANGED
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
var n = e.n(r);
|
|
73
73
|
// CONCATENATED MODULE: external "prop-types"
|
|
74
74
|
const a = require("prop-types");
|
|
75
|
-
var
|
|
75
|
+
var i = e.n(a);
|
|
76
76
|
// CONCATENATED MODULE: external "lodash/omit"
|
|
77
|
-
const
|
|
78
|
-
var l = e.n(
|
|
77
|
+
const o = require("lodash/omit");
|
|
78
|
+
var l = e.n(o);
|
|
79
79
|
// CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
|
|
80
80
|
const s = require("@splunk/ui-utils/keyboard");
|
|
81
81
|
// CONCATENATED MODULE: external "@splunk/ui-utils/focus"
|
|
@@ -109,21 +109,21 @@
|
|
|
109
109
|
displayName: "ItemStyles__StyledItemSelectedAdornment",
|
|
110
110
|
componentId: "sc-4kc053-2"
|
|
111
111
|
})([ "", ";padding-left:", ";align-items:flex-start;color:", ";" ], k, f.variables.spacingLarge, f.variables.contentColorActive);
|
|
112
|
-
var
|
|
112
|
+
var x = d().span.withConfig({
|
|
113
113
|
displayName: "ItemStyles__StyledItemAdornment",
|
|
114
114
|
componentId: "sc-4kc053-3"
|
|
115
115
|
})([ "", ";", " padding-right:", ";align-items:center;color:", ";" ], k, (function(e) {
|
|
116
116
|
var t = e.endAdornment;
|
|
117
117
|
return t && (0, u.css)([ "padding-left:", ";" ], f.variables.spacingSmall);
|
|
118
118
|
}), f.variables.spacingSmall, f.variables.contentColorMuted);
|
|
119
|
-
var
|
|
119
|
+
var C = d()(g()).withConfig({
|
|
120
120
|
displayName: "ItemStyles__StyledNonInteractiveCheckbox",
|
|
121
121
|
componentId: "sc-4kc053-4"
|
|
122
|
-
})([ "padding-right:", ";" ], f.variables.spacingSmall);
|
|
122
|
+
})([ "min-height:0;padding-right:", ";" ], f.variables.spacingSmall);
|
|
123
123
|
var I = d()(b()).withConfig({
|
|
124
124
|
displayName: "ItemStyles__StyledClickable",
|
|
125
125
|
componentId: "sc-4kc053-5"
|
|
126
|
-
})([ "display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;min-height:", ";padding:", " ", ";line-height:20px;", " ", " ", " &:not([disabled],[aria-disabled='true']){&:hover{background:", ";", "}&:active{background:", ";}", "}&:focus{outline:0;box-shadow:", ";background:", ";}&[disabled],&[aria-disabled='true']{color:", ";
|
|
126
|
+
})([ "display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;min-height:", ";padding:", " ", ";line-height:20px;", " ", " ", " &:not([disabled],[aria-disabled='true']){&:hover{background:", ";", "}&:active{background:", ";}", "}&:focus{outline:0;box-shadow:", ";background:", ";}&[disabled],&[aria-disabled='true']{color:", ";", ",", ",", ",", "{color:", ";}}" ], f.variables.contentColorActive, f.variables.inputHeight, f.variables.spacingXSmall, f.variables.spacingLarge, (function(e) {
|
|
127
127
|
var t = e.$active, r = e.$preventFocus;
|
|
128
128
|
return t && !r && (0, u.css)([ "box-shadow:", ";" ], f.variables.focusShadowInset);
|
|
129
129
|
}), (function(e) {
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
}), f.variables.interactiveColorOverlayActive, (function(e) {
|
|
141
141
|
var t = e.$selected;
|
|
142
142
|
return t && (0, u.css)([ "background:", ";font-weight:", ";" ], f.variables.interactiveColorOverlaySelected, f.variables.fontWeightSemiBold);
|
|
143
|
-
}), f.variables.focusShadowInset, f.variables.interactiveColorOverlayHover, f.variables.contentColorDisabled, /* sc-sel */ S, /* sc-sel */ w, /* sc-sel */ O, /* sc-sel */
|
|
143
|
+
}), f.variables.focusShadowInset, f.variables.interactiveColorOverlayHover, f.variables.contentColorDisabled, /* sc-sel */ S, /* sc-sel */ w, /* sc-sel */ O, /* sc-sel */ x, f.variables.contentColorDisabled);
|
|
144
144
|
var E = d().span.withConfig({
|
|
145
145
|
displayName: "ItemStyles__StyledInnerWrapper",
|
|
146
146
|
componentId: "sc-4kc053-6"
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
var D = d()(p()).withConfig({
|
|
176
176
|
displayName: "DividerStyles__Styled",
|
|
177
177
|
componentId: "l3zfh3-0"
|
|
178
|
-
})([ "
|
|
178
|
+
})([ "", " + &,& + ", "{margin-block-start:", ";}" ], I, I, f.variables.spacingSmall);
|
|
179
179
|
// CONCATENATED MODULE: ./src/Menu/MenuContext.tsx
|
|
180
180
|
var q = (0, r.createContext)({
|
|
181
181
|
role: "menu",
|
|
@@ -200,10 +200,10 @@
|
|
|
200
200
|
*/ function $(e) {
|
|
201
201
|
var t = R({}, e);
|
|
202
202
|
// @docs-props-type DividerPropsBase
|
|
203
|
-
var a = (0, r.useContext)(A),
|
|
203
|
+
var a = (0, r.useContext)(A), i = a.role;
|
|
204
204
|
|
|
205
205
|
return n().createElement(D, R({
|
|
206
|
-
"aria-hidden":
|
|
206
|
+
"aria-hidden": i === "listbox",
|
|
207
207
|
"data-test": "divider",
|
|
208
208
|
role: "separator"
|
|
209
209
|
}, t));
|
|
@@ -293,9 +293,9 @@
|
|
|
293
293
|
if (null == e) return {};
|
|
294
294
|
var r, n, a = U(e, t);
|
|
295
295
|
if (Object.getOwnPropertySymbols) {
|
|
296
|
-
var
|
|
297
|
-
for (n = 0; n <
|
|
298
|
-
r =
|
|
296
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
297
|
+
for (n = 0; n < i.length; n++) {
|
|
298
|
+
r = i[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
return a;
|
|
@@ -312,14 +312,14 @@
|
|
|
312
312
|
return r;
|
|
313
313
|
}
|
|
314
314
|
var Y = {
|
|
315
|
-
children:
|
|
316
|
-
title:
|
|
317
|
-
outerStyle:
|
|
315
|
+
children: i().node,
|
|
316
|
+
title: i().bool,
|
|
317
|
+
outerStyle: i().object
|
|
318
318
|
};
|
|
319
319
|
/**
|
|
320
320
|
* A non-interactive `Menu` item used to separate and label groups of `Menu` items.
|
|
321
321
|
*/ function Z(e) {
|
|
322
|
-
var t = e.children, a = e.outerStyle,
|
|
322
|
+
var t = e.children, a = e.outerStyle, i = e.title, o = Q(e, [ "children", "outerStyle", "title" ]);
|
|
323
323
|
var l = (0, r.useContext)(A), s = l.role;
|
|
324
324
|
var c = (0, r.useMemo)((function() {
|
|
325
325
|
return V(V({}, a), {}, {
|
|
@@ -335,10 +335,10 @@
|
|
|
335
335
|
"aria-hidden": s === "listbox" ? true : undefined
|
|
336
336
|
}, n().createElement(K, W({
|
|
337
337
|
style: c,
|
|
338
|
-
level:
|
|
339
|
-
variant:
|
|
338
|
+
level: i ? 4 : 5,
|
|
339
|
+
variant: i ? "title5" : "title6",
|
|
340
340
|
"data-test": "heading"
|
|
341
|
-
},
|
|
341
|
+
}, o), t));
|
|
342
342
|
}
|
|
343
343
|
Z.propTypes = Y;
|
|
344
344
|
/* Remove consecutive items with filterConsecutive = true (Dividers and Headings) */ Z.filterConsecutive = true;
|
|
@@ -352,8 +352,8 @@
|
|
|
352
352
|
const ne = require("@splunk/react-icons/Checkmark");
|
|
353
353
|
var ae = e.n(ne);
|
|
354
354
|
// CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
|
|
355
|
-
const
|
|
356
|
-
var
|
|
355
|
+
const ie = require("@splunk/react-icons/ChevronRight");
|
|
356
|
+
var oe = e.n(ie);
|
|
357
357
|
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
358
358
|
const le = require("@splunk/react-ui/ScreenReaderContent");
|
|
359
359
|
var se = e.n(le);
|
|
@@ -388,9 +388,9 @@
|
|
|
388
388
|
if (null == e) return {};
|
|
389
389
|
var r, n, a = ye(e, t);
|
|
390
390
|
if (Object.getOwnPropertySymbols) {
|
|
391
|
-
var
|
|
392
|
-
for (n = 0; n <
|
|
393
|
-
r =
|
|
391
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
392
|
+
for (n = 0; n < i.length; n++) {
|
|
393
|
+
r = i[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
return a;
|
|
@@ -407,37 +407,37 @@
|
|
|
407
407
|
return r;
|
|
408
408
|
}
|
|
409
409
|
var ge = {
|
|
410
|
-
active:
|
|
411
|
-
children:
|
|
412
|
-
description:
|
|
413
|
-
descriptionPosition:
|
|
414
|
-
disabled:
|
|
415
|
-
elementRef:
|
|
416
|
-
endAdornment:
|
|
417
|
-
hasSubmenu:
|
|
410
|
+
active: i().bool,
|
|
411
|
+
children: i().node,
|
|
412
|
+
description: i().string,
|
|
413
|
+
descriptionPosition: i().oneOf([ "right", "bottom" ]),
|
|
414
|
+
disabled: i().oneOfType([ i().bool, i().oneOf([ "dimmed", "disabled" ]) ]),
|
|
415
|
+
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
416
|
+
endAdornment: i().node,
|
|
417
|
+
hasSubmenu: i().bool,
|
|
418
418
|
/** @private. The internal key of the tab */
|
|
419
|
-
itemKey:
|
|
420
|
-
matchRanges:
|
|
421
|
-
start:
|
|
422
|
-
end:
|
|
419
|
+
itemKey: i().number,
|
|
420
|
+
matchRanges: i().arrayOf(i().shape({
|
|
421
|
+
start: i().number.isRequired,
|
|
422
|
+
end: i().number.isRequired
|
|
423
423
|
})),
|
|
424
|
-
onClick:
|
|
424
|
+
onClick: i().func,
|
|
425
425
|
/** @private */
|
|
426
|
-
onFocus:
|
|
427
|
-
openInNewContext:
|
|
426
|
+
onFocus: i().func,
|
|
427
|
+
openInNewContext: i().oneOfType([ i().bool, i().string ]),
|
|
428
428
|
/** @private */
|
|
429
|
-
preventFocus:
|
|
430
|
-
role:
|
|
431
|
-
selectable:
|
|
432
|
-
selectableAppearance:
|
|
433
|
-
selected:
|
|
434
|
-
startAdornment:
|
|
435
|
-
to:
|
|
436
|
-
truncate:
|
|
429
|
+
preventFocus: i().bool,
|
|
430
|
+
role: i().oneOf([ "menuitem", "menuitemradio", "menuitemcheckbox", "listboxitem", "option" ]),
|
|
431
|
+
selectable: i().bool,
|
|
432
|
+
selectableAppearance: i().oneOf([ "checkmark", "checkbox" ]),
|
|
433
|
+
selected: i().oneOfType([ i().bool, i().oneOf([ "some" ]) ]),
|
|
434
|
+
startAdornment: i().node,
|
|
435
|
+
to: i().string,
|
|
436
|
+
truncate: i().bool
|
|
437
437
|
};
|
|
438
438
|
var he = (0, ce._)("(Opens new window)");
|
|
439
439
|
function Se(e) {
|
|
440
|
-
var t = e.active, a = e.children,
|
|
440
|
+
var t = e.active, a = e.children, i = e.description, o = e.descriptionPosition, s = o === void 0 ? "bottom" : o, c = e.disabled, u = e.endAdornment, d = e.elementRef, v = e.hasSubmenu, p = e.itemKey, f = e.matchRanges, m = e.onClick, b = e.onFocus, y = e.openInNewContext, g = e.role, h = e.selectable, k = e.selectableAppearance, D = k === void 0 ? "checkmark" : k, q = e.selected, R = e.startAdornment, T = e.to, $ = e.truncate, H = be(e, [ "active", "children", "description", "descriptionPosition", "disabled", "endAdornment", "elementRef", "hasSubmenu", "itemKey", "matchRanges", "onClick", "onFocus", "openInNewContext", "role", "selectable", "selectableAppearance", "selected", "startAdornment", "to", "truncate" ]);
|
|
441
441
|
var F = (0, r.useContext)(A), M = F.preventFocus;
|
|
442
442
|
(0, r.useEffect)((function() {
|
|
443
443
|
if (false) {}
|
|
@@ -490,8 +490,8 @@
|
|
|
490
490
|
} else if (V === "option") {
|
|
491
491
|
X["aria-selected"] = W;
|
|
492
492
|
}
|
|
493
|
-
var G =
|
|
494
|
-
var J =
|
|
493
|
+
var G = i && s === "right";
|
|
494
|
+
var J = i && !G;
|
|
495
495
|
var Q = q && D === "checkmark" && n().createElement(O, null, n().createElement(ae(), {
|
|
496
496
|
inline: true
|
|
497
497
|
}));
|
|
@@ -521,10 +521,10 @@
|
|
|
521
521
|
tabIndex: M ? -1 : undefined,
|
|
522
522
|
to: T,
|
|
523
523
|
title: $ && re()(a) ? a : undefined
|
|
524
|
-
}, X, l()(H, "onFocus")), v && n().createElement(N, null, n().createElement(
|
|
524
|
+
}, X, l()(H, "onFocus")), v && n().createElement(N, null, n().createElement(oe(), null)), n().createElement(E, null, h && D === "checkbox" && n().createElement(C, {
|
|
525
525
|
disabled: !!c,
|
|
526
526
|
selected: q
|
|
527
|
-
}), R && n().createElement(
|
|
527
|
+
}), R && n().createElement(x, null, R), n().createElement(_, {
|
|
528
528
|
$descriptionBottom: !!J,
|
|
529
529
|
$truncate: $ !== null && $ !== void 0 ? $ : false
|
|
530
530
|
}, n().createElement(P, {
|
|
@@ -532,9 +532,9 @@
|
|
|
532
532
|
"data-test": "label"
|
|
533
533
|
}, B, y && n().createElement(n().Fragment, null, n().createElement(fe, null), n().createElement(se(), null, Y))), J && n().createElement(S, {
|
|
534
534
|
"data-test": "description"
|
|
535
|
-
},
|
|
535
|
+
}, i), G && n().createElement(w, {
|
|
536
536
|
"data-test": "description"
|
|
537
|
-
},
|
|
537
|
+
}, i)), u && n().createElement(x, {
|
|
538
538
|
endAdornment: u
|
|
539
539
|
}, u), Q));
|
|
540
540
|
}
|
|
@@ -546,16 +546,16 @@
|
|
|
546
546
|
const ke = require("@splunk/react-ui/Scroll");
|
|
547
547
|
var Oe = e.n(ke);
|
|
548
548
|
// CONCATENATED MODULE: ./src/Menu/MenuStyles.ts
|
|
549
|
-
var
|
|
550
|
-
var
|
|
549
|
+
var xe = (0, u.css)([ "border-top:1px solid ", ";" ], f.variables.borderColor);
|
|
550
|
+
var Ce = (0, u.css)([ "", ";background-color:", ";border-radius:", ";min-width:60px;overflow:auto;position:relative;padding:", " 0;&:focus{outline:0;box-shadow:", ";background:", ";}& + &{", "}" ], f.mixins.reset("block"), f.variables.backgroundColorPopup, f.variables.borderRadius, f.variables.spacingSmall, f.variables.focusShadowInset, f.variables.interactiveColorOverlayHover, xe);
|
|
551
551
|
var Ie = d().div.withConfig({
|
|
552
552
|
displayName: "MenuStyles__Styled",
|
|
553
553
|
componentId: "sc-1olffp9-0"
|
|
554
|
-
})([ "", "" ],
|
|
554
|
+
})([ "", "" ], Ce);
|
|
555
555
|
var Ee = d()(Oe()).withConfig({
|
|
556
556
|
displayName: "MenuStyles__StyledScroll",
|
|
557
557
|
componentId: "sc-1olffp9-1"
|
|
558
|
-
})([ "", " ", " + &,& + ", "{", "}" ],
|
|
558
|
+
})([ "", " ", " + &,& + ", "{", "}" ], Ce, /* sc-sel */ Ie, /* sc-sel */ Ie, xe);
|
|
559
559
|
// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
|
|
560
560
|
/**
|
|
561
561
|
* Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
|
|
@@ -591,9 +591,9 @@
|
|
|
591
591
|
if (null == e) return {};
|
|
592
592
|
var r, n, a = Ne(e, t);
|
|
593
593
|
if (Object.getOwnPropertySymbols) {
|
|
594
|
-
var
|
|
595
|
-
for (n = 0; n <
|
|
596
|
-
r =
|
|
594
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
595
|
+
for (n = 0; n < i.length; n++) {
|
|
596
|
+
r = i[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
return a;
|
|
@@ -610,10 +610,10 @@
|
|
|
610
610
|
return r;
|
|
611
611
|
}
|
|
612
612
|
var De = {
|
|
613
|
-
children:
|
|
614
|
-
elementRef:
|
|
615
|
-
focusMode:
|
|
616
|
-
stopScrollPropagation:
|
|
613
|
+
children: i().node,
|
|
614
|
+
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
615
|
+
focusMode: i().oneOf([ "roving", "normal", "never" ]),
|
|
616
|
+
stopScrollPropagation: i().bool
|
|
617
617
|
};
|
|
618
618
|
// the default focus control for Menu: loop, verticalArrows(up/down keys), home/end keys
|
|
619
619
|
var qe = function e() {
|
|
@@ -633,7 +633,7 @@
|
|
|
633
633
|
return r;
|
|
634
634
|
};
|
|
635
635
|
function Re(e) {
|
|
636
|
-
var t = e.children, a = e.elementRef,
|
|
636
|
+
var t = e.children, a = e.elementRef, i = e.focusMode, o = i === void 0 ? "roving" : i, s = e.stopScrollPropagation, u = je(e, [ "children", "elementRef", "focusMode", "stopScrollPropagation" ]);
|
|
637
637
|
// @docs-props-type MenuPropsBase
|
|
638
638
|
var d = (0, r.useContext)(A), v = d.role, p = v === void 0 ? "menu" : v;
|
|
639
639
|
var f = (0, r.useRef)(null);
|
|
@@ -680,25 +680,25 @@
|
|
|
680
680
|
e.preventDefault();
|
|
681
681
|
}
|
|
682
682
|
var a = f.current;
|
|
683
|
-
var
|
|
683
|
+
var i = [];
|
|
684
684
|
if (a) {
|
|
685
|
-
|
|
685
|
+
i = (0, c.getSortedTabbableElements)(a, {
|
|
686
686
|
ignoreTabIndex: true
|
|
687
687
|
});
|
|
688
688
|
}
|
|
689
|
-
var
|
|
689
|
+
var o = (e === null || e === void 0 ? void 0 : e.target) instanceof Element ? e.target : null;
|
|
690
690
|
var l = a === null || a === void 0 ? void 0 : a.querySelector(":focus");
|
|
691
|
-
var s =
|
|
692
|
-
var u = s ?
|
|
693
|
-
(0, c.handleFocus)(t,
|
|
691
|
+
var s = o || l;
|
|
692
|
+
var u = s ? i.indexOf(s) : -1;
|
|
693
|
+
(0, c.handleFocus)(t, i, u, y);
|
|
694
694
|
}), [ y ]);
|
|
695
695
|
var h = function e() {
|
|
696
696
|
return {
|
|
697
697
|
role: "menu",
|
|
698
|
-
preventFocus:
|
|
698
|
+
preventFocus: o === "never"
|
|
699
699
|
};
|
|
700
700
|
};
|
|
701
|
-
var S =
|
|
701
|
+
var S = o === "normal" || o === "never" ? undefined : g;
|
|
702
702
|
var w = {
|
|
703
703
|
"data-test": "menu",
|
|
704
704
|
onKeyDown: S,
|