@splunk/react-ui 4.20.0 → 4.21.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 +114 -230
- package/Anchor.js +74 -150
- package/Animation.js +52 -124
- package/AnimationToggle.js +86 -146
- package/Box.js +77 -153
- package/Breadcrumbs.js +105 -197
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +21 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +128 -246
- package/CloseButton.js +92 -200
- package/Code.js +162 -250
- package/CollapsiblePanel.js +214 -370
- package/Color.js +267 -495
- package/ColumnLayout.js +152 -254
- package/ComboBox.js +197 -371
- package/Concertina.js +214 -374
- package/ControlGroup.js +164 -288
- package/Date.js +154 -304
- package/DefinitionList.js +104 -180
- package/Divider.js +80 -156
- package/Dropdown.js +121 -263
- package/DualListbox.js +408 -601
- package/EventListener.js +70 -138
- package/File.js +343 -547
- package/FormRows.js +232 -414
- package/Heading.js +94 -164
- package/Image.js +167 -323
- package/JSONTree.js +166 -314
- package/Layer.js +221 -388
- package/Link.js +133 -239
- package/List.js +85 -161
- package/Markdown.js +230 -354
- package/Menu.js +489 -760
- package/Message.js +248 -437
- package/MessageBar.js +220 -408
- package/Modal.js +201 -365
- package/ModalLayer.js +96 -196
- package/Monogram.js +112 -204
- package/Multiselect.js +1135 -1761
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +370 -620
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +161 -303
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1028 -1430
- package/SidePanel.js +106 -214
- package/Slider.js +198 -348
- package/SlidingPanels.js +138 -280
- package/SplitButton.js +141 -273
- package/StaticContent.js +84 -168
- package/StepBar.js +138 -246
- package/Switch.js +261 -385
- package/TabBar.js +261 -398
- package/TabLayout.js +122 -238
- package/Table.js +943 -1448
- package/Text.js +335 -549
- package/TextArea.js +315 -537
- package/Tooltip.js +152 -292
- package/TransitionOpen.js +118 -242
- package/Typography.js +81 -157
- package/WaitSpinner.js +117 -209
- package/package.json +14 -15
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/Link/Link.d.ts +7 -3
- package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -0
- package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +1 -1
- package/types/src/Select/OptionBase.d.ts +1 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +46 -110
- package/useKeyPress.js +50 -107
- package/usePrevious.js +47 -111
- package/useRovingFocus.js +53 -133
- package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
- /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
- /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/RadioList.js
CHANGED
|
@@ -1,271 +1,208 @@
|
|
|
1
|
-
|
|
2
|
-
/******/
|
|
3
|
-
/******/ // The
|
|
4
|
-
/******/ var
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
/******/
|
|
8
|
-
/******/
|
|
9
|
-
/******/ //
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
/******/
|
|
16
|
-
/******/
|
|
17
|
-
/******/
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ // The require scope
|
|
4
|
+
/******/ var __webpack_require__ = {};
|
|
5
|
+
/******/
|
|
6
|
+
/************************************************************************/
|
|
7
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
8
|
+
/******/ (() => {
|
|
9
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
10
|
+
/******/ __webpack_require__.n = (module) => {
|
|
11
|
+
/******/ var getter = module && module.__esModule ?
|
|
12
|
+
/******/ () => (module['default']) :
|
|
13
|
+
/******/ () => (module);
|
|
14
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
15
|
+
/******/ return getter;
|
|
16
|
+
/******/ };
|
|
17
|
+
/******/ })();
|
|
18
|
+
/******/
|
|
19
|
+
/******/ /* webpack/runtime/define property getters */
|
|
20
|
+
/******/ (() => {
|
|
21
|
+
/******/ // define getter functions for harmony exports
|
|
22
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
23
|
+
/******/ for(var key in definition) {
|
|
24
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
25
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
26
|
+
/******/ }
|
|
27
|
+
/******/ }
|
|
28
|
+
/******/ };
|
|
29
|
+
/******/ })();
|
|
30
|
+
/******/
|
|
31
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
32
|
+
/******/ (() => {
|
|
33
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
34
|
+
/******/ })();
|
|
35
|
+
/******/
|
|
36
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
37
|
+
/******/ (() => {
|
|
38
|
+
/******/ // define __esModule on exports
|
|
39
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
40
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
41
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
42
|
+
/******/ }
|
|
43
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
18
44
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Flag the module as loaded
|
|
24
|
-
/******/ module.l = true;
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 189);
|
|
86
|
-
/******/ })
|
|
45
|
+
/******/ })();
|
|
46
|
+
/******/
|
|
87
47
|
/************************************************************************/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/***/ 0:
|
|
91
|
-
/***/ (function(module, exports) {
|
|
92
|
-
|
|
93
|
-
module.exports = require("@splunk/themes");
|
|
94
|
-
|
|
95
|
-
/***/ }),
|
|
96
|
-
|
|
97
|
-
/***/ 1:
|
|
98
|
-
/***/ (function(module, exports) {
|
|
99
|
-
|
|
100
|
-
module.exports = require("prop-types");
|
|
101
|
-
|
|
102
|
-
/***/ }),
|
|
103
|
-
|
|
104
|
-
/***/ 189:
|
|
105
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
|
-
|
|
107
|
-
"use strict";
|
|
48
|
+
var __webpack_exports__ = {};
|
|
108
49
|
// ESM COMPAT FLAG
|
|
109
50
|
__webpack_require__.r(__webpack_exports__);
|
|
110
51
|
|
|
111
52
|
// EXPORTS
|
|
112
|
-
__webpack_require__.d(__webpack_exports__,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
var external_react_ = __webpack_require__(2);
|
|
117
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
118
|
-
|
|
119
|
-
// EXTERNAL MODULE: external "prop-types"
|
|
120
|
-
var external_prop_types_ = __webpack_require__(1);
|
|
121
|
-
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
122
|
-
|
|
123
|
-
// EXTERNAL MODULE: external "lodash/omit"
|
|
124
|
-
var omit_ = __webpack_require__(5);
|
|
125
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
126
|
-
|
|
127
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
128
|
-
var id_ = __webpack_require__(8);
|
|
129
|
-
|
|
130
|
-
// CONCATENATED MODULE: ./src/RadioList/RadioListContext.ts
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
Option: () => (/* reexport */ RadioList_Option),
|
|
55
|
+
"default": () => (/* reexport */ RadioList_RadioList)
|
|
56
|
+
});
|
|
131
57
|
|
|
132
|
-
|
|
58
|
+
;// CONCATENATED MODULE: external "react"
|
|
59
|
+
const external_react_namespaceObject = require("react");
|
|
60
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
|
|
61
|
+
;// CONCATENATED MODULE: external "prop-types"
|
|
62
|
+
const external_prop_types_namespaceObject = require("prop-types");
|
|
63
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
|
|
64
|
+
;// CONCATENATED MODULE: external "lodash/omit"
|
|
65
|
+
const omit_namespaceObject = require("lodash/omit");
|
|
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)({});
|
|
133
72
|
RadioListContext.displayName = 'RadioList';
|
|
134
|
-
/* harmony default export */
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
// CONCATENATED MODULE: ./src/RadioList/OptionStyles.ts
|
|
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
|
|
143
80
|
|
|
144
81
|
|
|
145
|
-
var StyledWrapper = external_styled_components_default.
|
|
82
|
+
var StyledWrapper = external_styled_components_default().div.withConfig({
|
|
146
83
|
displayName: "OptionStyles__StyledWrapper",
|
|
147
84
|
componentId: "imaqjt-0"
|
|
148
|
-
})(["position:relative;padding:", ";"],
|
|
85
|
+
})(["position:relative;padding:", ";"], (0,themes_namespaceObject.pick)({
|
|
149
86
|
prisma: {
|
|
150
87
|
comfortable: '10px 0',
|
|
151
88
|
compact: '6px 0'
|
|
152
89
|
},
|
|
153
90
|
enterprise: '7px 0 7px 0'
|
|
154
91
|
}));
|
|
155
|
-
var StyledLabel = external_styled_components_default.
|
|
92
|
+
var StyledLabel = external_styled_components_default().label.withConfig({
|
|
156
93
|
displayName: "OptionStyles__StyledLabel",
|
|
157
94
|
componentId: "imaqjt-1"
|
|
158
|
-
})(["", ";", ";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:", ";}", " ", ""],
|
|
159
|
-
prisma:
|
|
160
|
-
}),
|
|
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)({
|
|
161
98
|
prisma: '10px',
|
|
162
|
-
enterprise:
|
|
163
|
-
}),
|
|
99
|
+
enterprise: themes_namespaceObject.variables.spacingQuarter
|
|
100
|
+
}), (0,themes_namespaceObject.pick)({
|
|
164
101
|
prisma: '20px',
|
|
165
102
|
enterprise: '18px'
|
|
166
|
-
}),
|
|
167
|
-
prisma:
|
|
168
|
-
enterprise:
|
|
169
|
-
}),
|
|
170
|
-
prisma:
|
|
171
|
-
enterprise:
|
|
172
|
-
}),
|
|
173
|
-
prisma:
|
|
174
|
-
enterprise:
|
|
175
|
-
}),
|
|
176
|
-
prisma:
|
|
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,
|
|
177
114
|
enterprise: {
|
|
178
|
-
dark:
|
|
179
|
-
light:
|
|
115
|
+
dark: themes_namespaceObject.variables.gray80,
|
|
116
|
+
light: themes_namespaceObject.variables.gray45
|
|
180
117
|
}
|
|
181
|
-
}),
|
|
118
|
+
}), (0,themes_namespaceObject.pick)({
|
|
182
119
|
compact: {
|
|
183
|
-
enterprise:
|
|
120
|
+
enterprise: (0,external_styled_components_namespaceObject.css)(["font-size:", ";"], themes_namespaceObject.variables.fontSizeSmall)
|
|
184
121
|
}
|
|
185
|
-
}),
|
|
186
|
-
prisma:
|
|
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))
|
|
187
124
|
}));
|
|
188
|
-
var StyledRadioInput = external_styled_components_default.
|
|
125
|
+
var StyledRadioInput = external_styled_components_default().input.withConfig({
|
|
189
126
|
displayName: "OptionStyles__StyledRadioInput",
|
|
190
127
|
componentId: "imaqjt-2"
|
|
191
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:", ";}", " ", ""],
|
|
192
129
|
/* sc-sel */
|
|
193
|
-
StyledLabel,
|
|
130
|
+
StyledLabel, themes_namespaceObject.variables.focusShadow,
|
|
194
131
|
/* sc-sel */
|
|
195
132
|
StyledLabel,
|
|
196
133
|
/* sc-sel */
|
|
197
|
-
StyledLabel,
|
|
198
|
-
prisma:
|
|
134
|
+
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
135
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["border-color:transparent;background-color:", ";"], themes_namespaceObject.variables.interactiveColorPrimary),
|
|
199
136
|
enterprise: {
|
|
200
|
-
dark:
|
|
201
|
-
light:
|
|
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)
|
|
202
139
|
}
|
|
203
140
|
}),
|
|
204
141
|
/* sc-sel */
|
|
205
|
-
StyledLabel,
|
|
206
|
-
prisma:
|
|
142
|
+
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
143
|
+
prisma: themes_namespaceObject.variables.contentColorDisabled,
|
|
207
144
|
enterprise: {
|
|
208
|
-
dark:
|
|
209
|
-
light:
|
|
145
|
+
dark: themes_namespaceObject.variables.gray45,
|
|
146
|
+
light: themes_namespaceObject.variables.gray80
|
|
210
147
|
}
|
|
211
148
|
}),
|
|
212
149
|
/* sc-sel */
|
|
213
|
-
StyledLabel,
|
|
150
|
+
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
214
151
|
enterprise: {
|
|
215
|
-
dark:
|
|
216
|
-
light:
|
|
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)
|
|
217
154
|
}
|
|
218
155
|
}),
|
|
219
156
|
/* sc-sel */
|
|
220
|
-
StyledLabel,
|
|
221
|
-
prisma:
|
|
157
|
+
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
158
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.contentColorDisabled)
|
|
222
159
|
}),
|
|
223
160
|
/* sc-sel */
|
|
224
|
-
StyledLabel,
|
|
225
|
-
prisma:
|
|
161
|
+
StyledLabel, (0,themes_namespaceObject.pick)({
|
|
162
|
+
prisma: themes_namespaceObject.variables.contentColorDisabled,
|
|
226
163
|
enterprise: {
|
|
227
|
-
dark:
|
|
228
|
-
light:
|
|
164
|
+
dark: themes_namespaceObject.variables.gray45,
|
|
165
|
+
light: themes_namespaceObject.variables.gray80
|
|
229
166
|
}
|
|
230
167
|
}), function (_ref) {
|
|
231
168
|
var $error = _ref.$error;
|
|
232
|
-
return $error &&
|
|
169
|
+
return $error && (0,external_styled_components_namespaceObject.css)(["&:not(:disabled) + ", "{color:", ";&::before{border-color:", ";}}&:checked:not(:disabled) + ", "{&::before{border-color:", ";}", "}", ""],
|
|
233
170
|
/* sc-sel */
|
|
234
|
-
StyledLabel,
|
|
235
|
-
prisma:
|
|
236
|
-
enterprise:
|
|
237
|
-
}),
|
|
238
|
-
prisma:
|
|
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,
|
|
239
176
|
enterprise: {
|
|
240
|
-
dark:
|
|
241
|
-
light:
|
|
177
|
+
dark: themes_namespaceObject.variables.errorColor,
|
|
178
|
+
light: themes_namespaceObject.variables.errorColorL30
|
|
242
179
|
}
|
|
243
180
|
}),
|
|
244
181
|
/* sc-sel */
|
|
245
|
-
StyledLabel,
|
|
246
|
-
prisma:
|
|
247
|
-
enterprise:
|
|
248
|
-
}),
|
|
249
|
-
enterprise:
|
|
250
|
-
}),
|
|
251
|
-
prisma:
|
|
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:", ";}}"],
|
|
252
189
|
/* sc-sel */
|
|
253
|
-
StyledLabel,
|
|
190
|
+
StyledLabel, themes_namespaceObject.variables.accentColorNegative)
|
|
254
191
|
}));
|
|
255
|
-
},
|
|
256
|
-
prisma:
|
|
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);}}"],
|
|
257
194
|
/* sc-sel */
|
|
258
|
-
StyledLabel,
|
|
195
|
+
StyledLabel, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.backgroundColorPage, themes_namespaceObject.variables.interactiveColorOverlayActive),
|
|
259
196
|
/* sc-sel */
|
|
260
|
-
StyledLabel,
|
|
197
|
+
StyledLabel, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.white, themes_namespaceObject.variables.interactiveColorOverlayActive),
|
|
261
198
|
/* sc-sel */
|
|
262
|
-
StyledLabel,
|
|
199
|
+
StyledLabel, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.interactiveColorPrimary, themes_namespaceObject.variables.interactiveColorOverlayActive),
|
|
263
200
|
/* sc-sel */
|
|
264
201
|
StyledLabel,
|
|
265
202
|
/* sc-sel */
|
|
266
|
-
StyledLabel,
|
|
203
|
+
StyledLabel, themes_namespaceObject.variables.interactiveColorBackgroundDisabled)
|
|
267
204
|
}));
|
|
268
|
-
|
|
205
|
+
;// CONCATENATED MODULE: ./src/RadioList/Option.tsx
|
|
269
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); }
|
|
270
207
|
|
|
271
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; }
|
|
@@ -278,12 +215,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
278
215
|
|
|
279
216
|
|
|
280
217
|
var propTypes = {
|
|
281
|
-
children: external_prop_types_default.
|
|
282
|
-
disabled: external_prop_types_default.
|
|
283
|
-
error: external_prop_types_default.
|
|
284
|
-
id: external_prop_types_default.
|
|
285
|
-
onChange: external_prop_types_default.
|
|
286
|
-
value: external_prop_types_default.
|
|
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
|
|
287
224
|
};
|
|
288
225
|
|
|
289
226
|
function Option(_ref) {
|
|
@@ -298,10 +235,10 @@ function Option(_ref) {
|
|
|
298
235
|
otherProps = _objectWithoutProperties(_ref, ["children", "disabled", "error", "id", "onChange", "value"]);
|
|
299
236
|
|
|
300
237
|
// @docs-props-type OptionPropsBase
|
|
301
|
-
var _useRef =
|
|
238
|
+
var _useRef = (0,external_react_namespaceObject.useRef)(idProp || (0,id_namespaceObject.createDOMID)('radio-option')),
|
|
302
239
|
id = _useRef.current;
|
|
303
240
|
|
|
304
|
-
var radioList =
|
|
241
|
+
var radioList = (0,external_react_namespaceObject.useContext)(RadioList_RadioListContext);
|
|
305
242
|
|
|
306
243
|
var handleOnChange = function handleOnChange(e) {
|
|
307
244
|
var _radioList$onChange;
|
|
@@ -335,12 +272,12 @@ function Option(_ref) {
|
|
|
335
272
|
$error = radioList.error;
|
|
336
273
|
}
|
|
337
274
|
|
|
338
|
-
return /*#__PURE__*/external_react_default.
|
|
275
|
+
return /*#__PURE__*/external_react_default().createElement(StyledWrapper, _extends({
|
|
339
276
|
"data-test": "option",
|
|
340
277
|
"data-test-value": value
|
|
341
278
|
}, otherProps, {
|
|
342
279
|
"data-checked": checked
|
|
343
|
-
}), /*#__PURE__*/external_react_default.
|
|
280
|
+
}), /*#__PURE__*/external_react_default().createElement(StyledRadioInput, {
|
|
344
281
|
id: id,
|
|
345
282
|
type: "radio",
|
|
346
283
|
name: radioList.name,
|
|
@@ -350,32 +287,31 @@ function Option(_ref) {
|
|
|
350
287
|
checked: checked,
|
|
351
288
|
onChange: handleOnChange,
|
|
352
289
|
"data-test": "input"
|
|
353
|
-
}), /*#__PURE__*/external_react_default.
|
|
290
|
+
}), /*#__PURE__*/external_react_default().createElement(StyledLabel, {
|
|
354
291
|
htmlFor: id,
|
|
355
292
|
"data-test": "label"
|
|
356
293
|
}, children));
|
|
357
294
|
}
|
|
358
295
|
|
|
359
296
|
Option.propTypes = propTypes;
|
|
360
|
-
/* harmony default export */
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
var Box_default = /*#__PURE__*/__webpack_require__.n(
|
|
297
|
+
/* harmony default export */ const RadioList_Option = (Option);
|
|
298
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Box"
|
|
299
|
+
const Box_namespaceObject = require("@splunk/react-ui/Box");
|
|
300
|
+
var Box_default = /*#__PURE__*/__webpack_require__.n(Box_namespaceObject);
|
|
301
|
+
;// CONCATENATED MODULE: ./src/RadioList/RadioListStyles.ts
|
|
364
302
|
|
|
365
|
-
// CONCATENATED MODULE: ./src/RadioList/RadioListStyles.ts
|
|
366
303
|
|
|
367
304
|
|
|
368
|
-
|
|
369
|
-
var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
|
|
305
|
+
var StyledBox = external_styled_components_default()((Box_default())).withConfig({
|
|
370
306
|
displayName: "RadioListStyles__StyledBox",
|
|
371
307
|
componentId: "sc-1qg10hx-0"
|
|
372
308
|
})(["align-items:flex-start;flex-wrap:wrap;flex-direction:", ";", ""], function (props) {
|
|
373
309
|
return props.direction;
|
|
374
310
|
}, function (props) {
|
|
375
|
-
return props.direction === 'row' &&
|
|
311
|
+
return props.direction === 'row' && (0,external_styled_components_namespaceObject.css)(["", "{margin-right:40px;margin-inline-end:40px;}"], StyledWrapper);
|
|
376
312
|
});
|
|
377
313
|
|
|
378
|
-
|
|
314
|
+
;// CONCATENATED MODULE: ./src/RadioList/RadioList.tsx
|
|
379
315
|
function RadioList_extends() { RadioList_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 RadioList_extends.apply(this, arguments); }
|
|
380
316
|
|
|
381
317
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -402,20 +338,20 @@ function RadioList_objectWithoutPropertiesLoose(source, excluded) { if (source =
|
|
|
402
338
|
|
|
403
339
|
|
|
404
340
|
var RadioList_propTypes = {
|
|
405
|
-
direction: external_prop_types_default.
|
|
406
|
-
children: external_prop_types_default.
|
|
407
|
-
defaultValue: external_prop_types_default.
|
|
408
|
-
disabled: external_prop_types_default.
|
|
409
|
-
elementRef: external_prop_types_default.
|
|
410
|
-
error: external_prop_types_default.
|
|
411
|
-
name: external_prop_types_default.
|
|
412
|
-
onChange: external_prop_types_default.
|
|
341
|
+
direction: external_prop_types_default().oneOf(['row', 'column']),
|
|
342
|
+
children: (external_prop_types_default()).node,
|
|
343
|
+
defaultValue: (external_prop_types_default()).any,
|
|
344
|
+
disabled: (external_prop_types_default()).bool,
|
|
345
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
346
|
+
error: (external_prop_types_default()).bool,
|
|
347
|
+
name: (external_prop_types_default()).string,
|
|
348
|
+
onChange: (external_prop_types_default()).func,
|
|
413
349
|
|
|
414
350
|
/** @private. */
|
|
415
|
-
required: external_prop_types_default.
|
|
416
|
-
value: external_prop_types_default.
|
|
417
|
-
labelledBy: external_prop_types_default.
|
|
418
|
-
describedBy: external_prop_types_default.
|
|
351
|
+
required: (external_prop_types_default()).bool,
|
|
352
|
+
value: (external_prop_types_default()).any,
|
|
353
|
+
labelledBy: (external_prop_types_default()).string,
|
|
354
|
+
describedBy: (external_prop_types_default()).string
|
|
419
355
|
};
|
|
420
356
|
|
|
421
357
|
function RadioList(_ref) {
|
|
@@ -439,17 +375,17 @@ function RadioList(_ref) {
|
|
|
439
375
|
// TODO: Implement shared isControlled hook (SUI-5283).
|
|
440
376
|
// See material-ui for similar pattern to handle controlled/un-controlled in functional components w/ hooks
|
|
441
377
|
// https://github.com/mui-org/material-ui/blob/60d99a39836fb82f4da1477a717f642c216fb0b9/packages/material-ui/src/utils/useControlled.js
|
|
442
|
-
var _useRef =
|
|
378
|
+
var _useRef = (0,external_react_namespaceObject.useRef)(valueProp !== undefined),
|
|
443
379
|
isControlledExternally = _useRef.current;
|
|
444
380
|
|
|
445
|
-
var _useState =
|
|
381
|
+
var _useState = (0,external_react_namespaceObject.useState)(defaultValueProp),
|
|
446
382
|
_useState2 = _slicedToArray(_useState, 2),
|
|
447
383
|
valueState = _useState2[0],
|
|
448
384
|
setValueState = _useState2[1];
|
|
449
385
|
|
|
450
386
|
var value = isControlledExternally ? valueProp : valueState;
|
|
451
387
|
|
|
452
|
-
var _useRef2 =
|
|
388
|
+
var _useRef2 = (0,external_react_namespaceObject.useRef)(nameProp || (0,id_namespaceObject.createDOMID)('radio-name')),
|
|
453
389
|
name = _useRef2.current;
|
|
454
390
|
|
|
455
391
|
var handleChange = function handleChange(e, data) {
|
|
@@ -466,19 +402,19 @@ function RadioList(_ref) {
|
|
|
466
402
|
if (false) {} // Check if changing from controlled to un-controlled
|
|
467
403
|
|
|
468
404
|
|
|
469
|
-
|
|
405
|
+
(0,external_react_namespaceObject.useEffect)(function () {
|
|
470
406
|
if (false) {}
|
|
471
407
|
}, [valueProp, isControlledExternally]);
|
|
472
408
|
|
|
473
|
-
var _useRef3 =
|
|
409
|
+
var _useRef3 = (0,external_react_namespaceObject.useRef)(defaultValueProp),
|
|
474
410
|
defaultValue = _useRef3.current;
|
|
475
411
|
|
|
476
|
-
|
|
412
|
+
(0,external_react_namespaceObject.useEffect)(function () {
|
|
477
413
|
if (false) {}
|
|
478
414
|
}, [defaultValue, defaultValueProp, isControlledExternally]);
|
|
479
415
|
var labelledByAttr = otherProps['aria-labelledby'];
|
|
480
416
|
var describedByAttr = otherProps['aria-describedby'];
|
|
481
|
-
return /*#__PURE__*/external_react_default.
|
|
417
|
+
return /*#__PURE__*/external_react_default().createElement(RadioList_RadioListContext.Provider, {
|
|
482
418
|
value: {
|
|
483
419
|
value: value,
|
|
484
420
|
name: name,
|
|
@@ -486,7 +422,7 @@ function RadioList(_ref) {
|
|
|
486
422
|
error: error,
|
|
487
423
|
disabled: disabled
|
|
488
424
|
}
|
|
489
|
-
}, /*#__PURE__*/external_react_default.
|
|
425
|
+
}, /*#__PURE__*/external_react_default().createElement(StyledBox, RadioList_extends({
|
|
490
426
|
flex: true,
|
|
491
427
|
direction: direction,
|
|
492
428
|
role: "radiogroup",
|
|
@@ -501,47 +437,11 @@ function RadioList(_ref) {
|
|
|
501
437
|
|
|
502
438
|
RadioList.propTypes = RadioList_propTypes;
|
|
503
439
|
RadioList.Option = RadioList_Option;
|
|
504
|
-
/* harmony default export */
|
|
440
|
+
/* harmony default export */ const RadioList_RadioList = (RadioList);
|
|
505
441
|
// only for styled components using RadioList
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
/***/ }),
|
|
511
|
-
|
|
512
|
-
/***/ 2:
|
|
513
|
-
/***/ (function(module, exports) {
|
|
514
|
-
|
|
515
|
-
module.exports = require("react");
|
|
516
|
-
|
|
517
|
-
/***/ }),
|
|
518
|
-
|
|
519
|
-
/***/ 3:
|
|
520
|
-
/***/ (function(module, exports) {
|
|
521
|
-
|
|
522
|
-
module.exports = require("styled-components");
|
|
523
|
-
|
|
524
|
-
/***/ }),
|
|
525
|
-
|
|
526
|
-
/***/ 5:
|
|
527
|
-
/***/ (function(module, exports) {
|
|
528
|
-
|
|
529
|
-
module.exports = require("lodash/omit");
|
|
530
|
-
|
|
531
|
-
/***/ }),
|
|
532
|
-
|
|
533
|
-
/***/ 6:
|
|
534
|
-
/***/ (function(module, exports) {
|
|
535
|
-
|
|
536
|
-
module.exports = require("@splunk/react-ui/Box");
|
|
537
|
-
|
|
538
|
-
/***/ }),
|
|
539
|
-
|
|
540
|
-
/***/ 8:
|
|
541
|
-
/***/ (function(module, exports) {
|
|
542
|
-
|
|
543
|
-
module.exports = require("@splunk/ui-utils/id");
|
|
442
|
+
;// CONCATENATED MODULE: ./src/RadioList/index.ts
|
|
544
443
|
|
|
545
|
-
/***/ })
|
|
546
444
|
|
|
547
|
-
|
|
445
|
+
module.exports = __webpack_exports__;
|
|
446
|
+
/******/ })()
|
|
447
|
+
;
|