@splunk/react-ui 4.21.0 → 4.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion.js +425 -325
- package/Anchor.js +147 -117
- package/Animation.js +142 -94
- package/AnimationToggle.js +197 -193
- package/Box.js +145 -118
- package/Breadcrumbs.js +288 -206
- package/Button.js +488 -465
- package/ButtonGroup.js +160 -128
- package/ButtonSimple.js +543 -462
- package/CHANGELOG.md +24 -3
- package/Calendar.js +1111 -1001
- package/Card.js +771 -598
- package/CardLayout.js +205 -147
- package/Chip.js +509 -488
- package/Clickable.js +414 -352
- package/CloseButton.js +165 -142
- package/Code.js +1807 -2084
- package/CollapsiblePanel.js +586 -519
- package/Color.js +1068 -1068
- package/ColumnLayout.js +402 -363
- package/ComboBox.js +903 -794
- package/Concertina.js +997 -802
- package/ControlGroup.js +687 -594
- package/Date.js +567 -547
- package/DefinitionList.js +308 -234
- package/Divider.js +149 -118
- package/Dropdown.js +459 -416
- package/DualListbox.js +1479 -1541
- package/EventListener.js +94 -97
- package/File.js +1051 -969
- package/FormRows.js +883 -696
- package/Heading.js +216 -193
- package/Image.js +446 -402
- package/JSONTree.js +690 -551
- package/Layer.js +437 -410
- package/Link.js +336 -255
- package/List.js +213 -161
- package/Markdown.js +509 -487
- package/Menu.js +1104 -1056
- package/Message.js +475 -441
- package/MessageBar.js +387 -373
- package/Modal.js +810 -634
- package/ModalLayer.js +326 -243
- package/Monogram.js +308 -276
- package/Multiselect.js +3564 -3364
- package/Number.js +729 -687
- package/Paginator.js +510 -449
- package/Paragraph.js +145 -112
- package/Popover.js +1459 -1432
- package/Progress.js +301 -246
- package/RadioBar.js +634 -527
- package/RadioList.js +483 -444
- package/Resize.js +530 -489
- package/ResultsMenu.js +479 -455
- package/ScreenReaderContent.js +142 -111
- package/Scroll.js +595 -456
- package/ScrollContainerContext.js +197 -206
- package/Search.js +756 -650
- package/Select.js +2446 -2345
- package/SidePanel.js +390 -284
- package/Slider.js +680 -676
- package/SlidingPanels.js +639 -503
- package/SplitButton.js +464 -367
- package/StaticContent.js +161 -133
- package/StepBar.js +386 -358
- package/Switch.js +710 -640
- package/TabBar.js +741 -680
- package/TabLayout.js +406 -322
- package/Table.js +4974 -4616
- package/Text.js +1170 -1138
- package/TextArea.js +1102 -1090
- package/Tooltip.js +624 -581
- package/TransitionOpen.js +489 -422
- package/Typography.js +176 -153
- package/WaitSpinner.js +230 -206
- package/package.json +7 -7
- package/types/src/Color/Color.d.ts +0 -1
- package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -0
- package/types/src/RadioBar/RadioBar.d.ts +1 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
- package/types/src/Select/docs/examples/Icons.d.ts +1 -9
- package/types/src/Slider/Slider.d.ts +1 -0
- package/types/src/TabBar/Tab.d.ts +10 -1
- package/types/src/TabBar/TabBar.d.ts +4 -2
- package/types/src/Table/Head.d.ts +7 -3
- package/types/src/Table/Table.d.ts +3 -2
- package/types/src/Table/TableContext.d.ts +2 -0
- package/useForceUpdate.js +112 -82
- package/useKeyPress.js +74 -71
- package/usePrevious.js +65 -65
- package/useRovingFocus.js +122 -138
package/RadioList.js
CHANGED
|
@@ -1,447 +1,486 @@
|
|
|
1
|
-
/******/ (() => {
|
|
2
|
-
|
|
3
|
-
/******/
|
|
4
|
-
/******/
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/******/
|
|
9
|
-
/******/
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/
|
|
27
|
-
/******/
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
/******/
|
|
36
|
-
/******/
|
|
37
|
-
/******/
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/******/
|
|
44
|
-
/******/
|
|
45
|
-
/******/
|
|
46
|
-
/******/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
|
|
67
|
-
;// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
68
|
-
const id_namespaceObject = require("@splunk/ui-utils/id");
|
|
69
|
-
;// CONCATENATED MODULE: ./src/RadioList/RadioListContext.ts
|
|
70
|
-
|
|
71
|
-
var RadioListContext = /*#__PURE__*/(0,external_react_namespaceObject.createContext)({});
|
|
72
|
-
RadioListContext.displayName = 'RadioList';
|
|
73
|
-
/* harmony default export */ const RadioList_RadioListContext = (RadioListContext);
|
|
74
|
-
;// CONCATENATED MODULE: external "styled-components"
|
|
75
|
-
const external_styled_components_namespaceObject = require("styled-components");
|
|
76
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
77
|
-
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
78
|
-
const themes_namespaceObject = require("@splunk/themes");
|
|
79
|
-
;// CONCATENATED MODULE: ./src/RadioList/OptionStyles.ts
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var StyledWrapper = external_styled_components_default().div.withConfig({
|
|
83
|
-
displayName: "OptionStyles__StyledWrapper",
|
|
84
|
-
componentId: "imaqjt-0"
|
|
85
|
-
})(["position:relative;padding:", ";"], (0,themes_namespaceObject.pick)({
|
|
86
|
-
prisma: {
|
|
87
|
-
comfortable: '10px 0',
|
|
88
|
-
compact: '6px 0'
|
|
89
|
-
},
|
|
90
|
-
enterprise: '7px 0 7px 0'
|
|
91
|
-
}));
|
|
92
|
-
var StyledLabel = external_styled_components_default().label.withConfig({
|
|
93
|
-
displayName: "OptionStyles__StyledLabel",
|
|
94
|
-
componentId: "imaqjt-1"
|
|
95
|
-
})(["", ";", ";position:relative;flex:1 1 auto;padding-left:", ";margin-left:", ";cursor:pointer;&::before,&::after{display:block;content:'';position:absolute;border-radius:50%;}&::before{box-sizing:border-box;top:0;border:", ";", "}&::after{opacity:0;width:8px;height:8px;", " background-color:", ";}", " ", ""], themes_namespaceObject.mixins.reset('block'), (0,themes_namespaceObject.pick)({
|
|
96
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["color:", ";"], themes_namespaceObject.variables.contentColorActive)
|
|
97
|
-
}), (0,themes_namespaceObject.pick)({
|
|
98
|
-
prisma: '10px',
|
|
99
|
-
enterprise: themes_namespaceObject.variables.spacingQuarter
|
|
100
|
-
}), (0,themes_namespaceObject.pick)({
|
|
101
|
-
prisma: '20px',
|
|
102
|
-
enterprise: '18px'
|
|
103
|
-
}), (0,themes_namespaceObject.pick)({
|
|
104
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["2px solid ", ""], themes_namespaceObject.variables.contentColorMuted),
|
|
105
|
-
enterprise: (0,external_styled_components_namespaceObject.css)(["1px solid ", ""], themes_namespaceObject.variables.gray80)
|
|
106
|
-
}), (0,themes_namespaceObject.pick)({
|
|
107
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["width:20px;height:20px;left:-20px;"]),
|
|
108
|
-
enterprise: (0,external_styled_components_namespaceObject.css)(["width:18px;height:18px;left:-18px;"])
|
|
109
|
-
}), (0,themes_namespaceObject.pick)({
|
|
110
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["top:6px;left:-14px;"]),
|
|
111
|
-
enterprise: (0,external_styled_components_namespaceObject.css)(["top:5px;left:-13px;"])
|
|
112
|
-
}), (0,themes_namespaceObject.pick)({
|
|
113
|
-
prisma: themes_namespaceObject.variables.white,
|
|
114
|
-
enterprise: {
|
|
115
|
-
dark: themes_namespaceObject.variables.gray80,
|
|
116
|
-
light: themes_namespaceObject.variables.gray45
|
|
117
|
-
}
|
|
118
|
-
}), (0,themes_namespaceObject.pick)({
|
|
119
|
-
compact: {
|
|
120
|
-
enterprise: (0,external_styled_components_namespaceObject.css)(["font-size:", ";"], themes_namespaceObject.variables.fontSizeSmall)
|
|
121
|
-
}
|
|
122
|
-
}), (0,themes_namespaceObject.pick)({
|
|
123
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["&:hover{&::before{box-shadow:", ";border-color:", ";background-color:", ";}"], themes_namespaceObject.variables.hoverShadow, themes_namespaceObject.variables.contentColorDefault, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.backgroundColorPage, themes_namespaceObject.variables.interactiveColorOverlayHover))
|
|
124
|
-
}));
|
|
125
|
-
var StyledRadioInput = external_styled_components_default().input.withConfig({
|
|
126
|
-
displayName: "OptionStyles__StyledRadioInput",
|
|
127
|
-
componentId: "imaqjt-2"
|
|
128
|
-
})(["opacity:0;position:absolute;top:10px;left:0;&:focus{& + ", "::before{box-shadow:", ";}}&:checked + ", "::after{opacity:1;}&:checked + ", "::before{", "}&:disabled,&:disabled + ", "{color:", ";cursor:not-allowed;}&:disabled + ", "::before{", ";}&:disabled:not(:checked) + ", "::before{", ";}&:disabled + ", "::after{background-color:", ";}", " ", ""],
|
|
129
|
-
/* sc-sel */
|
|
130
|
-
StyledLabel, themes_namespaceObject.variables.focusShadow,
|
|
131
|
-
/* sc-sel */
|
|
132
|
-
StyledLabel,
|
|
133
|
-
/* sc-sel */
|
|
134
|
-
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
135
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["border-color:transparent;background-color:", ";"], themes_namespaceObject.variables.interactiveColorPrimary),
|
|
136
|
-
enterprise: {
|
|
137
|
-
dark: (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.gray80),
|
|
138
|
-
light: (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.gray45)
|
|
139
|
-
}
|
|
140
|
-
}),
|
|
141
|
-
/* sc-sel */
|
|
142
|
-
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
143
|
-
prisma: themes_namespaceObject.variables.contentColorDisabled,
|
|
144
|
-
enterprise: {
|
|
145
|
-
dark: themes_namespaceObject.variables.gray45,
|
|
146
|
-
light: themes_namespaceObject.variables.gray80
|
|
147
|
-
}
|
|
148
|
-
}),
|
|
149
|
-
/* sc-sel */
|
|
150
|
-
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
151
|
-
enterprise: {
|
|
152
|
-
dark: (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.gray45),
|
|
153
|
-
light: (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.gray80)
|
|
154
|
-
}
|
|
155
|
-
}),
|
|
156
|
-
/* sc-sel */
|
|
157
|
-
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
158
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.contentColorDisabled)
|
|
159
|
-
}),
|
|
160
|
-
/* sc-sel */
|
|
161
|
-
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
162
|
-
prisma: themes_namespaceObject.variables.contentColorDisabled,
|
|
163
|
-
enterprise: {
|
|
164
|
-
dark: themes_namespaceObject.variables.gray45,
|
|
165
|
-
light: themes_namespaceObject.variables.gray80
|
|
166
|
-
}
|
|
167
|
-
}), function (_ref) {
|
|
168
|
-
var $error = _ref.$error;
|
|
169
|
-
return $error && (0,external_styled_components_namespaceObject.css)(["&:not(:disabled) + ", "{color:", ";&::before{border-color:", ";}}&:checked:not(:disabled) + ", "{&::before{border-color:", ";}", "}", ""],
|
|
170
|
-
/* sc-sel */
|
|
171
|
-
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
172
|
-
prisma: themes_namespaceObject.variables.accentColorNegative,
|
|
173
|
-
enterprise: themes_namespaceObject.variables.errorColor
|
|
174
|
-
}), (0,themes_namespaceObject.pick)({
|
|
175
|
-
prisma: themes_namespaceObject.variables.accentColorNegative,
|
|
176
|
-
enterprise: {
|
|
177
|
-
dark: themes_namespaceObject.variables.errorColor,
|
|
178
|
-
light: themes_namespaceObject.variables.errorColorL30
|
|
179
|
-
}
|
|
180
|
-
}),
|
|
181
|
-
/* sc-sel */
|
|
182
|
-
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
183
|
-
prisma: themes_namespaceObject.variables.accentColorNegative,
|
|
184
|
-
enterprise: themes_namespaceObject.variables.errorColor
|
|
185
|
-
}), (0,themes_namespaceObject.pick)({
|
|
186
|
-
enterprise: (0,external_styled_components_namespaceObject.css)(["&::after{background-color:", ";}"], themes_namespaceObject.variables.errorColor)
|
|
187
|
-
}), (0,themes_namespaceObject.pick)({
|
|
188
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["&:not(:disabled):checked + ", "{&::before{background-color:", ";}}"],
|
|
189
|
-
/* sc-sel */
|
|
190
|
-
StyledLabel, themes_namespaceObject.variables.accentColorNegative)
|
|
191
|
-
}));
|
|
192
|
-
}, (0,themes_namespaceObject.pick)({
|
|
193
|
-
prisma: (0,external_styled_components_namespaceObject.css)(["&:active + ", "::before{background-color:", ";}&:active + ", "::after{background-color:", ";}&:checked:active + ", "::before{border-color:transparent;background-color:", ";}&:disabled + ", ":hover::before{box-shadow:none;}&:checked:disabled + ", "{&::before{background-color:", ";}&::after{background-color:rgba(255,255,255,0.3);}}"],
|
|
194
|
-
/* sc-sel */
|
|
195
|
-
StyledLabel, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.backgroundColorPage, themes_namespaceObject.variables.interactiveColorOverlayActive),
|
|
196
|
-
/* sc-sel */
|
|
197
|
-
StyledLabel, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.white, themes_namespaceObject.variables.interactiveColorOverlayActive),
|
|
198
|
-
/* sc-sel */
|
|
199
|
-
StyledLabel, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorPrimary, themes_namespaceObject.variables.interactiveColorOverlayActive),
|
|
200
|
-
/* sc-sel */
|
|
201
|
-
StyledLabel,
|
|
202
|
-
/* sc-sel */
|
|
203
|
-
StyledLabel, themes_namespaceObject.variables.interactiveColorBackgroundDisabled)
|
|
204
|
-
}));
|
|
205
|
-
;// CONCATENATED MODULE: ./src/RadioList/Option.tsx
|
|
206
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
207
|
-
|
|
208
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
209
|
-
|
|
210
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
var propTypes = {
|
|
218
|
-
children: (external_prop_types_default()).node,
|
|
219
|
-
disabled: (external_prop_types_default()).bool,
|
|
220
|
-
error: (external_prop_types_default()).bool,
|
|
221
|
-
id: (external_prop_types_default()).string,
|
|
222
|
-
onChange: (external_prop_types_default()).func,
|
|
223
|
-
value: (external_prop_types_default()).any.isRequired
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
function Option(_ref) {
|
|
227
|
-
var children = _ref.children,
|
|
228
|
-
_ref$disabled = _ref.disabled,
|
|
229
|
-
disabledProp = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
230
|
-
_ref$error = _ref.error,
|
|
231
|
-
errorProp = _ref$error === void 0 ? false : _ref$error,
|
|
232
|
-
idProp = _ref.id,
|
|
233
|
-
onChange = _ref.onChange,
|
|
234
|
-
value = _ref.value,
|
|
235
|
-
otherProps = _objectWithoutProperties(_ref, ["children", "disabled", "error", "id", "onChange", "value"]);
|
|
236
|
-
|
|
237
|
-
// @docs-props-type OptionPropsBase
|
|
238
|
-
var _useRef = (0,external_react_namespaceObject.useRef)(idProp || (0,id_namespaceObject.createDOMID)('radio-option')),
|
|
239
|
-
id = _useRef.current;
|
|
240
|
-
|
|
241
|
-
var radioList = (0,external_react_namespaceObject.useContext)(RadioList_RadioListContext);
|
|
242
|
-
|
|
243
|
-
var handleOnChange = function handleOnChange(e) {
|
|
244
|
-
var _radioList$onChange;
|
|
245
|
-
|
|
246
|
-
e.stopPropagation();
|
|
247
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(e, {
|
|
248
|
-
value: value,
|
|
249
|
-
name: radioList.name
|
|
250
|
-
});
|
|
251
|
-
(_radioList$onChange = radioList.onChange) === null || _radioList$onChange === void 0 ? void 0 : _radioList$onChange.call(radioList, e, {
|
|
252
|
-
value: value,
|
|
253
|
-
name: radioList.name
|
|
1
|
+
/******/ (() => {
|
|
2
|
+
// webpackBootstrap
|
|
3
|
+
/******/ "use strict";
|
|
4
|
+
/******/ // The require scope
|
|
5
|
+
/******/ var e = {};
|
|
6
|
+
/******/
|
|
7
|
+
/************************************************************************/
|
|
8
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
9
|
+
/******/ (() => {
|
|
10
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
11
|
+
/******/ e.n = r => {
|
|
12
|
+
/******/ var a = r && r.__esModule ?
|
|
13
|
+
/******/ () => r["default"]
|
|
14
|
+
/******/ : () => r
|
|
15
|
+
/******/;
|
|
16
|
+
e.d(a, {
|
|
17
|
+
a
|
|
18
|
+
});
|
|
19
|
+
/******/ return a;
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/define property getters */
|
|
24
|
+
/******/ (() => {
|
|
25
|
+
/******/ // define getter functions for harmony exports
|
|
26
|
+
/******/ e.d = (r, a) => {
|
|
27
|
+
/******/ for (var o in a) {
|
|
28
|
+
/******/ if (e.o(a, o) && !e.o(r, o)) {
|
|
29
|
+
/******/ Object.defineProperty(r, o, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: a[o]
|
|
32
|
+
});
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ }
|
|
35
|
+
/******/ };
|
|
36
|
+
/******/ })();
|
|
37
|
+
/******/
|
|
38
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
39
|
+
/******/ (() => {
|
|
40
|
+
/******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
|
|
41
|
+
/******/;
|
|
42
|
+
})();
|
|
43
|
+
/******/
|
|
44
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
45
|
+
/******/ (() => {
|
|
46
|
+
/******/ // define __esModule on exports
|
|
47
|
+
/******/ e.r = e => {
|
|
48
|
+
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
49
|
+
/******/ Object.defineProperty(e, Symbol.toStringTag, {
|
|
50
|
+
value: "Module"
|
|
51
|
+
});
|
|
52
|
+
/******/ }
|
|
53
|
+
/******/ Object.defineProperty(e, "__esModule", {
|
|
54
|
+
value: true
|
|
55
|
+
});
|
|
56
|
+
/******/ };
|
|
57
|
+
/******/ })();
|
|
58
|
+
/******/
|
|
59
|
+
/************************************************************************/ var r = {};
|
|
60
|
+
// ESM COMPAT FLAG
|
|
61
|
+
e.r(r);
|
|
62
|
+
// EXPORTS
|
|
63
|
+
e.d(r, {
|
|
64
|
+
Option: () => /* reexport */ C,
|
|
65
|
+
default: () => /* reexport */ M
|
|
254
66
|
});
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
"
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
"
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
67
|
+
// CONCATENATED MODULE: external "react"
|
|
68
|
+
const a = require("react");
|
|
69
|
+
var o = e.n(a);
|
|
70
|
+
// CONCATENATED MODULE: external "prop-types"
|
|
71
|
+
const i = require("prop-types");
|
|
72
|
+
var t = e.n(i);
|
|
73
|
+
// CONCATENATED MODULE: external "lodash/omit"
|
|
74
|
+
const n = require("lodash/omit");
|
|
75
|
+
var l = e.n(n);
|
|
76
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
77
|
+
const s = require("@splunk/ui-utils/id");
|
|
78
|
+
// CONCATENATED MODULE: ./src/RadioList/RadioListContext.ts
|
|
79
|
+
var c = (0, a.createContext)({});
|
|
80
|
+
c.displayName = "RadioList";
|
|
81
|
+
/* harmony default export */ const d = c;
|
|
82
|
+
// CONCATENATED MODULE: external "styled-components"
|
|
83
|
+
const u = require("styled-components");
|
|
84
|
+
var b = e.n(u);
|
|
85
|
+
// CONCATENATED MODULE: external "@splunk/themes"
|
|
86
|
+
const p = require("@splunk/themes");
|
|
87
|
+
// CONCATENATED MODULE: ./src/RadioList/OptionStyles.ts
|
|
88
|
+
var v = b().div.withConfig({
|
|
89
|
+
displayName: "OptionStyles__StyledWrapper",
|
|
90
|
+
componentId: "imaqjt-0"
|
|
91
|
+
})([ "position:relative;padding:", ";" ], (0, p.pick)({
|
|
92
|
+
prisma: {
|
|
93
|
+
comfortable: "10px 0",
|
|
94
|
+
compact: "6px 0"
|
|
95
|
+
},
|
|
96
|
+
enterprise: "7px 0 7px 0"
|
|
97
|
+
}));
|
|
98
|
+
var f = b().label.withConfig({
|
|
99
|
+
displayName: "OptionStyles__StyledLabel",
|
|
100
|
+
componentId: "imaqjt-1"
|
|
101
|
+
})([ "", ";", ";position:relative;flex:1 1 auto;padding-left:", ";margin-left:", ";cursor:pointer;&::before,&::after{display:block;content:'';position:absolute;border-radius:50%;}&::before{box-sizing:border-box;top:0;border:", ";", "}&::after{opacity:0;width:8px;height:8px;", " background-color:", ";}", " ", "" ], p.mixins.reset("block"), (0,
|
|
102
|
+
p.pick)({
|
|
103
|
+
prisma: (0, u.css)([ "color:", ";" ], p.variables.contentColorActive)
|
|
104
|
+
}), (0, p.pick)({
|
|
105
|
+
prisma: "10px",
|
|
106
|
+
enterprise: p.variables.spacingQuarter
|
|
107
|
+
}), (0, p.pick)({
|
|
108
|
+
prisma: "20px",
|
|
109
|
+
enterprise: "18px"
|
|
110
|
+
}), (0, p.pick)({
|
|
111
|
+
prisma: (0, u.css)([ "2px solid ", "" ], p.variables.contentColorMuted),
|
|
112
|
+
enterprise: (0, u.css)([ "1px solid ", "" ], p.variables.gray80)
|
|
113
|
+
}), (0, p.pick)({
|
|
114
|
+
prisma: (0, u.css)([ "width:20px;height:20px;left:-20px;" ]),
|
|
115
|
+
enterprise: (0, u.css)([ "width:18px;height:18px;left:-18px;" ])
|
|
116
|
+
}), (0, p.pick)({
|
|
117
|
+
prisma: (0, u.css)([ "top:6px;left:-14px;" ]),
|
|
118
|
+
enterprise: (0, u.css)([ "top:5px;left:-13px;" ])
|
|
119
|
+
}), (0, p.pick)({
|
|
120
|
+
prisma: p.variables.white,
|
|
121
|
+
enterprise: {
|
|
122
|
+
dark: p.variables.gray80,
|
|
123
|
+
light: p.variables.gray45
|
|
124
|
+
}
|
|
125
|
+
}), (0, p.pick)({
|
|
126
|
+
compact: {
|
|
127
|
+
enterprise: (0, u.css)([ "font-size:", ";" ], p.variables.fontSizeSmall)
|
|
128
|
+
}
|
|
129
|
+
}), (0, p.pick)({
|
|
130
|
+
prisma: (0, u.css)([ "&:hover{&::before{box-shadow:", ";border-color:", ";background-color:", ";}" ], p.variables.hoverShadow, p.variables.contentColorDefault, p.mixins.overlayColors(p.variables.backgroundColorPage, p.variables.interactiveColorOverlayHover))
|
|
131
|
+
}));
|
|
132
|
+
var y = b().input.withConfig({
|
|
133
|
+
displayName: "OptionStyles__StyledRadioInput",
|
|
134
|
+
componentId: "imaqjt-2"
|
|
135
|
+
})([ "opacity:0;position:absolute;top:10px;left:0;&:focus{& + ", "::before{box-shadow:", ";}}&:checked + ", "::after{opacity:1;}&:checked + ", "::before{", "}&:disabled,&:disabled + ", "{color:", ";cursor:not-allowed;}&:disabled + ", "::before{", ";}&:disabled:not(:checked) + ", "::before{", ";}&:disabled + ", "::after{background-color:", ";}", " ", "" ],
|
|
136
|
+
/* sc-sel */
|
|
137
|
+
f, p.variables.focusShadow,
|
|
138
|
+
/* sc-sel */
|
|
139
|
+
f,
|
|
140
|
+
/* sc-sel */
|
|
141
|
+
f, (0, p.pick)({
|
|
142
|
+
prisma: (0, u.css)([ "border-color:transparent;background-color:", ";" ], p.variables.interactiveColorPrimary),
|
|
143
|
+
enterprise: {
|
|
144
|
+
dark: (0, u.css)([ "border-color:", ";" ], p.variables.gray80),
|
|
145
|
+
light: (0, u.css)([ "border-color:", ";" ], p.variables.gray45)
|
|
146
|
+
}
|
|
147
|
+
}),
|
|
148
|
+
/* sc-sel */
|
|
149
|
+
f, (0, p.pick)({
|
|
150
|
+
prisma: p.variables.contentColorDisabled,
|
|
151
|
+
enterprise: {
|
|
152
|
+
dark: p.variables.gray45,
|
|
153
|
+
light: p.variables.gray80
|
|
154
|
+
}
|
|
155
|
+
}),
|
|
156
|
+
/* sc-sel */
|
|
157
|
+
f, (0, p.pick)({
|
|
158
|
+
enterprise: {
|
|
159
|
+
dark: (0, u.css)([ "border-color:", ";" ], p.variables.gray45),
|
|
160
|
+
light: (0, u.css)([ "border-color:", ";" ], p.variables.gray80)
|
|
161
|
+
}
|
|
162
|
+
}),
|
|
163
|
+
/* sc-sel */
|
|
164
|
+
f, (0, p.pick)({
|
|
165
|
+
prisma: (0, u.css)([ "border-color:", ";" ], p.variables.contentColorDisabled)
|
|
166
|
+
}),
|
|
167
|
+
/* sc-sel */
|
|
168
|
+
f, (0, p.pick)({
|
|
169
|
+
prisma: p.variables.contentColorDisabled,
|
|
170
|
+
enterprise: {
|
|
171
|
+
dark: p.variables.gray45,
|
|
172
|
+
light: p.variables.gray80
|
|
173
|
+
}
|
|
174
|
+
}), (function(e) {
|
|
175
|
+
var r = e.$error;
|
|
176
|
+
return r && (0, u.css)([ "&:not(:disabled) + ", "{color:", ";&::before{border-color:", ";}}&:checked:not(:disabled) + ", "{&::before{border-color:", ";}", "}", "" ],
|
|
177
|
+
/* sc-sel */
|
|
178
|
+
f, (0, p.pick)({
|
|
179
|
+
prisma: p.variables.accentColorNegative,
|
|
180
|
+
enterprise: p.variables.errorColor
|
|
181
|
+
}), (0, p.pick)({
|
|
182
|
+
prisma: p.variables.accentColorNegative,
|
|
183
|
+
enterprise: {
|
|
184
|
+
dark: p.variables.errorColor,
|
|
185
|
+
light: p.variables.errorColorL30
|
|
186
|
+
}
|
|
187
|
+
}),
|
|
188
|
+
/* sc-sel */
|
|
189
|
+
f, (0, p.pick)({
|
|
190
|
+
prisma: p.variables.accentColorNegative,
|
|
191
|
+
enterprise: p.variables.errorColor
|
|
192
|
+
}), (0, p.pick)({
|
|
193
|
+
enterprise: (0, u.css)([ "&::after{background-color:", ";}" ], p.variables.errorColor)
|
|
194
|
+
}), (0, p.pick)({
|
|
195
|
+
prisma: (0, u.css)([ "&:not(:disabled):checked + ", "{&::before{background-color:", ";}}" ],
|
|
196
|
+
/* sc-sel */
|
|
197
|
+
f, p.variables.accentColorNegative)
|
|
198
|
+
}));
|
|
199
|
+
}), (0, p.pick)({
|
|
200
|
+
prisma: (0, u.css)([ "&:active + ", "::before{background-color:", ";}&:active + ", "::after{background-color:", ";}&:checked:active + ", "::before{border-color:transparent;background-color:", ";}&:disabled + ", ":hover::before{box-shadow:none;}&:checked:disabled + ", "{&::before{background-color:", ";}&::after{background-color:rgba(255,255,255,0.3);}}" ],
|
|
201
|
+
/* sc-sel */
|
|
202
|
+
f, p.mixins.overlayColors(p.variables.backgroundColorPage, p.variables.interactiveColorOverlayActive),
|
|
203
|
+
/* sc-sel */
|
|
204
|
+
f, p.mixins.overlayColors(p.variables.white, p.variables.interactiveColorOverlayActive),
|
|
205
|
+
/* sc-sel */
|
|
206
|
+
f, p.mixins.overlayColors(p.variables.interactiveColorPrimary, p.variables.interactiveColorOverlayActive),
|
|
207
|
+
/* sc-sel */
|
|
208
|
+
f,
|
|
209
|
+
/* sc-sel */
|
|
210
|
+
f, p.variables.interactiveColorBackgroundDisabled)
|
|
211
|
+
}));
|
|
212
|
+
// CONCATENATED MODULE: ./src/RadioList/Option.tsx
|
|
213
|
+
function g() {
|
|
214
|
+
g = Object.assign || function(e) {
|
|
215
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
216
|
+
var a = arguments[r];
|
|
217
|
+
for (var o in a) {
|
|
218
|
+
if (Object.prototype.hasOwnProperty.call(a, o)) {
|
|
219
|
+
e[o] = a[o];
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return e;
|
|
224
|
+
};
|
|
225
|
+
return g.apply(this, arguments);
|
|
226
|
+
}
|
|
227
|
+
function m(e, r) {
|
|
228
|
+
if (e == null) return {};
|
|
229
|
+
var a = h(e, r);
|
|
230
|
+
var o, i;
|
|
231
|
+
if (Object.getOwnPropertySymbols) {
|
|
232
|
+
var t = Object.getOwnPropertySymbols(e);
|
|
233
|
+
for (i = 0; i < t.length; i++) {
|
|
234
|
+
o = t[i];
|
|
235
|
+
if (r.indexOf(o) >= 0) continue;
|
|
236
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, o)) continue;
|
|
237
|
+
a[o] = e[o];
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return a;
|
|
241
|
+
}
|
|
242
|
+
function h(e, r) {
|
|
243
|
+
if (e == null) return {};
|
|
244
|
+
var a = {};
|
|
245
|
+
var o = Object.keys(e);
|
|
246
|
+
var i, t;
|
|
247
|
+
for (t = 0; t < o.length; t++) {
|
|
248
|
+
i = o[t];
|
|
249
|
+
if (r.indexOf(i) >= 0) continue;
|
|
250
|
+
a[i] = e[i];
|
|
251
|
+
}
|
|
252
|
+
return a;
|
|
253
|
+
}
|
|
254
|
+
var k = {
|
|
255
|
+
children: t().node,
|
|
256
|
+
disabled: t().bool,
|
|
257
|
+
error: t().bool,
|
|
258
|
+
id: t().string,
|
|
259
|
+
onChange: t().func,
|
|
260
|
+
value: t().any.isRequired
|
|
261
|
+
};
|
|
262
|
+
function x(e) {
|
|
263
|
+
var r = e.children, i = e.disabled, t = i === void 0 ? false : i, n = e.error, l = n === void 0 ? false : n, c = e.id, u = e.onChange, b = e.value, p = m(e, [ "children", "disabled", "error", "id", "onChange", "value" ]);
|
|
264
|
+
// @docs-props-type OptionPropsBase
|
|
265
|
+
var h = (0, a.useRef)(c || (0, s.createDOMID)("radio-option")), k = h.current;
|
|
266
|
+
var x = (0, a.useContext)(d);
|
|
267
|
+
var C = function e(r) {
|
|
268
|
+
var a;
|
|
269
|
+
r.stopPropagation();
|
|
270
|
+
u === null || u === void 0 ? void 0 : u(r, {
|
|
271
|
+
value: b,
|
|
272
|
+
name: x.name
|
|
273
|
+
});
|
|
274
|
+
(a = x.onChange) === null || a === void 0 ? void 0 : a.call(x, r, {
|
|
275
|
+
value: b,
|
|
276
|
+
name: x.name
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
var O = false;
|
|
280
|
+
if ((x === null || x === void 0 ? void 0 : x.value) !== undefined) {
|
|
281
|
+
O = x.value === b;
|
|
282
|
+
}
|
|
283
|
+
var w = t;
|
|
284
|
+
if (x === null || x === void 0 ? void 0 : x.disabled) {
|
|
285
|
+
w = x.disabled;
|
|
286
|
+
}
|
|
287
|
+
var S = l;
|
|
288
|
+
if (x === null || x === void 0 ? void 0 : x.error) {
|
|
289
|
+
S = x.error;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
return o().createElement(v, g({
|
|
293
|
+
"data-test": "option",
|
|
294
|
+
"data-test-value": b
|
|
295
|
+
}, p, {
|
|
296
|
+
"data-checked": O
|
|
297
|
+
}), o().createElement(y, {
|
|
298
|
+
id: k,
|
|
299
|
+
type: "radio",
|
|
300
|
+
name: x.name,
|
|
301
|
+
$error: S,
|
|
302
|
+
disabled: w,
|
|
303
|
+
value: b.toString(),
|
|
304
|
+
checked: O,
|
|
305
|
+
onChange: C,
|
|
306
|
+
"data-test": "input"
|
|
307
|
+
}), o().createElement(f, {
|
|
308
|
+
htmlFor: k,
|
|
309
|
+
"data-test": "label"
|
|
310
|
+
}, r));
|
|
311
|
+
}
|
|
312
|
+
x.propTypes = k;
|
|
313
|
+
/* harmony default export */ const C = x;
|
|
314
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Box"
|
|
315
|
+
const O = require("@splunk/react-ui/Box");
|
|
316
|
+
var w = e.n(O);
|
|
317
|
+
// CONCATENATED MODULE: ./src/RadioList/RadioListStyles.ts
|
|
318
|
+
var S = b()(w()).withConfig({
|
|
319
|
+
displayName: "RadioListStyles__StyledBox",
|
|
320
|
+
componentId: "sc-1qg10hx-0"
|
|
321
|
+
})([ "align-items:flex-start;flex-wrap:wrap;flex-direction:", ";", "" ], (function(e) {
|
|
322
|
+
return e.direction;
|
|
323
|
+
}), (function(e) {
|
|
324
|
+
return e.direction === "row" && (0, u.css)([ "", "{margin-right:40px;margin-inline-end:40px;}" ], v);
|
|
325
|
+
}));
|
|
326
|
+
// CONCATENATED MODULE: ./src/RadioList/RadioList.tsx
|
|
327
|
+
function j() {
|
|
328
|
+
j = Object.assign || function(e) {
|
|
329
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
330
|
+
var a = arguments[r];
|
|
331
|
+
for (var o in a) {
|
|
332
|
+
if (Object.prototype.hasOwnProperty.call(a, o)) {
|
|
333
|
+
e[o] = a[o];
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
return e;
|
|
338
|
+
};
|
|
339
|
+
return j.apply(this, arguments);
|
|
340
|
+
}
|
|
341
|
+
function q(e, r) {
|
|
342
|
+
return E(e) || A(e, r) || I(e, r) || P();
|
|
343
|
+
}
|
|
344
|
+
function P() {
|
|
345
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
346
|
+
}
|
|
347
|
+
function I(e, r) {
|
|
348
|
+
if (!e) return;
|
|
349
|
+
if (typeof e === "string") return _(e, r);
|
|
350
|
+
var a = Object.prototype.toString.call(e).slice(8, -1);
|
|
351
|
+
if (a === "Object" && e.constructor) a = e.constructor.name;
|
|
352
|
+
if (a === "Map" || a === "Set") return Array.from(e);
|
|
353
|
+
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return _(e, r);
|
|
354
|
+
}
|
|
355
|
+
function _(e, r) {
|
|
356
|
+
if (r == null || r > e.length) r = e.length;
|
|
357
|
+
for (var a = 0, o = new Array(r); a < r; a++) {
|
|
358
|
+
o[a] = e[a];
|
|
359
|
+
}
|
|
360
|
+
return o;
|
|
361
|
+
}
|
|
362
|
+
function A(e, r) {
|
|
363
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
|
|
364
|
+
var a = [];
|
|
365
|
+
var o = true;
|
|
366
|
+
var i = false;
|
|
367
|
+
var t = undefined;
|
|
368
|
+
try {
|
|
369
|
+
for (var n = e[Symbol.iterator](), l; !(o = (l = n.next()).done); o = true) {
|
|
370
|
+
a.push(l.value);
|
|
371
|
+
if (r && a.length === r) break;
|
|
372
|
+
}
|
|
373
|
+
} catch (e) {
|
|
374
|
+
i = true;
|
|
375
|
+
t = e;
|
|
376
|
+
} finally {
|
|
377
|
+
try {
|
|
378
|
+
if (!o && n["return"] != null) n["return"]();
|
|
379
|
+
} finally {
|
|
380
|
+
if (i) throw t;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return a;
|
|
384
|
+
}
|
|
385
|
+
function E(e) {
|
|
386
|
+
if (Array.isArray(e)) return e;
|
|
387
|
+
}
|
|
388
|
+
function B(e, r) {
|
|
389
|
+
if (e == null) return {};
|
|
390
|
+
var a = D(e, r);
|
|
391
|
+
var o, i;
|
|
392
|
+
if (Object.getOwnPropertySymbols) {
|
|
393
|
+
var t = Object.getOwnPropertySymbols(e);
|
|
394
|
+
for (i = 0; i < t.length; i++) {
|
|
395
|
+
o = t[i];
|
|
396
|
+
if (r.indexOf(o) >= 0) continue;
|
|
397
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, o)) continue;
|
|
398
|
+
a[o] = e[o];
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return a;
|
|
402
|
+
}
|
|
403
|
+
function D(e, r) {
|
|
404
|
+
if (e == null) return {};
|
|
405
|
+
var a = {};
|
|
406
|
+
var o = Object.keys(e);
|
|
407
|
+
var i, t;
|
|
408
|
+
for (t = 0; t < o.length; t++) {
|
|
409
|
+
i = o[t];
|
|
410
|
+
if (r.indexOf(i) >= 0) continue;
|
|
411
|
+
a[i] = e[i];
|
|
412
|
+
}
|
|
413
|
+
return a;
|
|
394
414
|
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
415
|
+
var N = {
|
|
416
|
+
direction: t().oneOf([ "row", "column" ]),
|
|
417
|
+
children: t().node,
|
|
418
|
+
defaultValue: t().any,
|
|
419
|
+
disabled: t().bool,
|
|
420
|
+
elementRef: t().oneOfType([ t().func, t().object ]),
|
|
421
|
+
error: t().bool,
|
|
422
|
+
name: t().string,
|
|
423
|
+
onChange: t().func,
|
|
424
|
+
/** @private. */
|
|
425
|
+
required: t().bool,
|
|
426
|
+
value: t().any,
|
|
427
|
+
labelledBy: t().string,
|
|
428
|
+
describedBy: t().string
|
|
429
|
+
};
|
|
430
|
+
function R(e) {
|
|
431
|
+
var r = e.children, i = e.defaultValue, t = e.describedBy, n = e.direction, c = n === void 0 ? "column" : n, u = e.disabled, b = u === void 0 ? false : u, p = e.error, v = p === void 0 ? false : p, f = e.labelledBy, y = e.name, g = e.onChange, m = e.required, h = e.value, k = B(e, [ "children", "defaultValue", "describedBy", "direction", "disabled", "error", "labelledBy", "name", "onChange", "required", "value" ]);
|
|
432
|
+
// @docs-props-type RadioListPropsBase
|
|
433
|
+
// TODO: Implement shared isControlled hook (SUI-5283).
|
|
434
|
+
// See material-ui for similar pattern to handle controlled/un-controlled in functional components w/ hooks
|
|
435
|
+
// https://github.com/mui-org/material-ui/blob/60d99a39836fb82f4da1477a717f642c216fb0b9/packages/material-ui/src/utils/useControlled.js
|
|
436
|
+
var x = (0, a.useRef)(h !== undefined), C = x.current;
|
|
437
|
+
var O = (0, a.useState)(i), w = q(O, 2), P = w[0], I = w[1];
|
|
438
|
+
var _ = C ? h : P;
|
|
439
|
+
var A = (0, a.useRef)(y || (0, s.createDOMID)("radio-name")), E = A.current;
|
|
440
|
+
var D = function e(r, a) {
|
|
441
|
+
if (!C) {
|
|
442
|
+
I(a.value);
|
|
443
|
+
}
|
|
444
|
+
g === null || g === void 0 ? void 0 : g(r, a);
|
|
445
|
+
};
|
|
446
|
+
// Check correct props are passed
|
|
447
|
+
if (false) {}
|
|
448
|
+
if (false) {}
|
|
449
|
+
// Check if changing from controlled to un-controlled
|
|
450
|
+
(0, a.useEffect)((function() {
|
|
451
|
+
if (false) {}
|
|
452
|
+
}), [ h, C ]);
|
|
453
|
+
var N = (0, a.useRef)(i), R = N.current;
|
|
454
|
+
(0, a.useEffect)((function() {
|
|
455
|
+
if (false) {}
|
|
456
|
+
}), [ R, i, C ]);
|
|
457
|
+
var M = k["aria-labelledby"];
|
|
458
|
+
var T = k["aria-describedby"];
|
|
459
|
+
|
|
460
|
+
return o().createElement(d.Provider, {
|
|
461
|
+
value: {
|
|
462
|
+
value: _,
|
|
463
|
+
name: E,
|
|
464
|
+
onChange: D,
|
|
465
|
+
error: v,
|
|
466
|
+
disabled: b
|
|
467
|
+
}
|
|
468
|
+
}, o().createElement(S, j({
|
|
469
|
+
flex: true,
|
|
470
|
+
direction: c,
|
|
471
|
+
role: "radiogroup",
|
|
472
|
+
"data-test": "radio-list",
|
|
473
|
+
"data-test-value": _
|
|
474
|
+
}, l()(k, [ "aria-labelledby", "aria-describedby" ]), {
|
|
475
|
+
"aria-labelledby": M ? "".concat(M, " ").concat(f) : f,
|
|
476
|
+
"aria-describedby": T ? "".concat(T, " ").concat(t) : t,
|
|
477
|
+
"aria-required": m
|
|
478
|
+
}), r));
|
|
424
479
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
"aria-labelledby": labelledByAttr ? "".concat(labelledByAttr, " ").concat(labelledBy) : labelledBy,
|
|
433
|
-
"aria-describedby": describedByAttr ? "".concat(describedByAttr, " ").concat(describedBy) : describedBy,
|
|
434
|
-
"aria-required": required
|
|
435
|
-
}), children));
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
RadioList.propTypes = RadioList_propTypes;
|
|
439
|
-
RadioList.Option = RadioList_Option;
|
|
440
|
-
/* harmony default export */ const RadioList_RadioList = (RadioList);
|
|
441
|
-
// only for styled components using RadioList
|
|
442
|
-
;// CONCATENATED MODULE: ./src/RadioList/index.ts
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
module.exports = __webpack_exports__;
|
|
446
|
-
/******/ })()
|
|
447
|
-
;
|
|
480
|
+
R.propTypes = N;
|
|
481
|
+
R.Option = C;
|
|
482
|
+
/* harmony default export */ const M = R;
|
|
483
|
+
// only for styled components using RadioList
|
|
484
|
+
// CONCATENATED MODULE: ./src/RadioList/index.ts
|
|
485
|
+
module.exports = r;
|
|
486
|
+
/******/})();
|