@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/Heading.js
CHANGED
|
@@ -1,195 +1,218 @@
|
|
|
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
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
66
|
-
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
67
|
-
const themes_namespaceObject = require("@splunk/themes");
|
|
68
|
-
;// CONCATENATED MODULE: ./src/Heading/HeadingStyles.ts
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var StyledHeading = external_styled_components_default().h2.withConfig({
|
|
72
|
-
displayName: "HeadingStyles__StyledHeading",
|
|
73
|
-
componentId: "sc-15s3yx3-0"
|
|
74
|
-
})(["", ";color:", ";margin:1.414em 0 0.4em;text-rendering:optimizelegibility;", " ", ""], function (_ref) {
|
|
75
|
-
var $variant = _ref.$variant;
|
|
76
|
-
|
|
77
|
-
if ($variant === 'title4') {
|
|
78
|
-
return (0,themes_namespaceObject.pickVariant)('$isSection', {
|
|
79
|
-
"true": {
|
|
80
|
-
enterprise: {
|
|
81
|
-
compact: themes_namespaceObject.mixins.typography('title4', {
|
|
82
|
-
weight: 'semiBold'
|
|
83
|
-
}),
|
|
84
|
-
comfortable: themes_namespaceObject.mixins.typography('title4', {
|
|
85
|
-
size: 14,
|
|
86
|
-
weight: 'semiBold'
|
|
87
|
-
})
|
|
88
|
-
},
|
|
89
|
-
prisma: themes_namespaceObject.mixins.typography('title4', {
|
|
90
|
-
color: 'default',
|
|
91
|
-
size: 14
|
|
92
|
-
})
|
|
93
|
-
},
|
|
94
|
-
"false": {
|
|
95
|
-
enterprise: {
|
|
96
|
-
compact: themes_namespaceObject.mixins.typography('title4'),
|
|
97
|
-
comfortable: themes_namespaceObject.mixins.typography('title4', {
|
|
98
|
-
size: 14
|
|
99
|
-
})
|
|
100
|
-
},
|
|
101
|
-
prisma: themes_namespaceObject.mixins.typography('title4')
|
|
102
|
-
}
|
|
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 = t => {
|
|
12
|
+
/******/ var r = t && t.__esModule ?
|
|
13
|
+
/******/ () => t["default"]
|
|
14
|
+
/******/ : () => t
|
|
15
|
+
/******/;
|
|
16
|
+
e.d(r, {
|
|
17
|
+
a: r
|
|
18
|
+
});
|
|
19
|
+
/******/ return r;
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/define property getters */
|
|
24
|
+
/******/ (() => {
|
|
25
|
+
/******/ // define getter functions for harmony exports
|
|
26
|
+
/******/ e.d = (t, r) => {
|
|
27
|
+
/******/ for (var i in r) {
|
|
28
|
+
/******/ if (e.o(r, i) && !e.o(t, i)) {
|
|
29
|
+
/******/ Object.defineProperty(t, i, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: r[i]
|
|
32
|
+
});
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ }
|
|
35
|
+
/******/ };
|
|
36
|
+
/******/ })();
|
|
37
|
+
/******/
|
|
38
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
39
|
+
/******/ (() => {
|
|
40
|
+
/******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
|
|
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 t = {};
|
|
60
|
+
// ESM COMPAT FLAG
|
|
61
|
+
e.r(t);
|
|
62
|
+
// EXPORTS
|
|
63
|
+
e.d(t, {
|
|
64
|
+
default: () => /* reexport */ d
|
|
103
65
|
});
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
66
|
+
// CONCATENATED MODULE: external "react"
|
|
67
|
+
const r = require("react");
|
|
68
|
+
var i = e.n(r);
|
|
69
|
+
// CONCATENATED MODULE: external "prop-types"
|
|
70
|
+
const n = require("prop-types");
|
|
71
|
+
var a = e.n(n);
|
|
72
|
+
// CONCATENATED MODULE: external "styled-components"
|
|
73
|
+
const o = require("styled-components");
|
|
74
|
+
var l = e.n(o);
|
|
75
|
+
// CONCATENATED MODULE: external "@splunk/themes"
|
|
76
|
+
const s = require("@splunk/themes");
|
|
77
|
+
// CONCATENATED MODULE: ./src/Heading/HeadingStyles.ts
|
|
78
|
+
var c = l().h2.withConfig({
|
|
79
|
+
displayName: "HeadingStyles__StyledHeading",
|
|
80
|
+
componentId: "sc-15s3yx3-0"
|
|
81
|
+
})([ "", ";color:", ";margin:1.414em 0 0.4em;text-rendering:optimizelegibility;", " ", "" ], (function(e) {
|
|
82
|
+
var t = e.$variant;
|
|
83
|
+
if (t === "title4") {
|
|
84
|
+
return (0, s.pickVariant)("$isSection", {
|
|
85
|
+
true: {
|
|
86
|
+
enterprise: {
|
|
87
|
+
compact: s.mixins.typography("title4", {
|
|
88
|
+
weight: "semiBold"
|
|
89
|
+
}),
|
|
90
|
+
comfortable: s.mixins.typography("title4", {
|
|
91
|
+
size: 14,
|
|
92
|
+
weight: "semiBold"
|
|
93
|
+
})
|
|
94
|
+
},
|
|
95
|
+
prisma: s.mixins.typography("title4", {
|
|
96
|
+
color: "default",
|
|
97
|
+
size: 14
|
|
98
|
+
})
|
|
99
|
+
},
|
|
100
|
+
false: {
|
|
101
|
+
enterprise: {
|
|
102
|
+
compact: s.mixins.typography("title4"),
|
|
103
|
+
comfortable: s.mixins.typography("title4", {
|
|
104
|
+
size: 14
|
|
105
|
+
})
|
|
106
|
+
},
|
|
107
|
+
prisma: s.mixins.typography("title4")
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return s.mixins.typography(t);
|
|
112
|
+
}), (0, s.pick)({
|
|
113
|
+
prisma: (0, s.pickVariant)("$variant", {
|
|
114
|
+
title5: s.mixins.typography("title5", {
|
|
115
|
+
color: "default"
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
}), (0, s.pickVariant)("$isSection", {
|
|
119
|
+
true: {
|
|
120
|
+
enterprise: {
|
|
121
|
+
dark: (0, o.css)([ "color:", ";" ], s.variables.gray80),
|
|
122
|
+
light: (0, o.css)([ "color:", ";" ], s.variables.gray45)
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}), (function(e) {
|
|
126
|
+
var t = e.$isSection;
|
|
127
|
+
return t && (0, o.css)([ "margin:0.707em 0 0.2em;" ]);
|
|
128
|
+
}));
|
|
129
|
+
// CONCATENATED MODULE: ./src/Heading/Heading.tsx
|
|
130
|
+
function p() {
|
|
131
|
+
p = Object.assign || function(e) {
|
|
132
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
133
|
+
var r = arguments[t];
|
|
134
|
+
for (var i in r) {
|
|
135
|
+
if (Object.prototype.hasOwnProperty.call(r, i)) {
|
|
136
|
+
e[i] = r[i];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return e;
|
|
141
|
+
};
|
|
142
|
+
return p.apply(this, arguments);
|
|
143
|
+
}
|
|
144
|
+
function u(e, t) {
|
|
145
|
+
if (e == null) return {};
|
|
146
|
+
var r = f(e, t);
|
|
147
|
+
var i, n;
|
|
148
|
+
if (Object.getOwnPropertySymbols) {
|
|
149
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
150
|
+
for (n = 0; n < a.length; n++) {
|
|
151
|
+
i = a[n];
|
|
152
|
+
if (t.indexOf(i) >= 0) continue;
|
|
153
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, i)) continue;
|
|
154
|
+
r[i] = e[i];
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return r;
|
|
158
|
+
}
|
|
159
|
+
function f(e, t) {
|
|
160
|
+
if (e == null) return {};
|
|
161
|
+
var r = {};
|
|
162
|
+
var i = Object.keys(e);
|
|
163
|
+
var n, a;
|
|
164
|
+
for (a = 0; a < i.length; a++) {
|
|
165
|
+
n = i[a];
|
|
166
|
+
if (t.indexOf(n) >= 0) continue;
|
|
167
|
+
r[n] = e[n];
|
|
168
|
+
}
|
|
169
|
+
return r;
|
|
170
|
+
}
|
|
171
|
+
var y = {
|
|
172
|
+
children: a().node,
|
|
173
|
+
elementRef: a().oneOfType([ a().func, a().object ]),
|
|
174
|
+
level: a().oneOf([ 1, 2, 3, 4, "s", "ss", 5, 6 ]),
|
|
175
|
+
variant: a().oneOf([ "title1", "title2", "title3", "title4", "title5", "title6", "title7" ])
|
|
176
|
+
};
|
|
177
|
+
// h1-h6 use the same intrinsic element type
|
|
178
|
+
var m = {
|
|
179
|
+
1: "h1",
|
|
180
|
+
2: "h2",
|
|
181
|
+
3: "h3",
|
|
182
|
+
4: "h4",
|
|
183
|
+
s: "h4",
|
|
184
|
+
ss: "h5",
|
|
185
|
+
5: "h5",
|
|
186
|
+
6: "h6"
|
|
187
|
+
};
|
|
188
|
+
var v = {
|
|
189
|
+
h1: "title1",
|
|
190
|
+
h2: "title2",
|
|
191
|
+
h3: "title3",
|
|
192
|
+
h4: "title4",
|
|
193
|
+
h5: "title5",
|
|
194
|
+
h6: "title6"
|
|
195
|
+
};
|
|
196
|
+
function h(e) {
|
|
197
|
+
var t = e.children, r = e.elementRef, n = e.level, a = n === void 0 ? 2 : n, o = e.variant, l = u(e, [ "children", "elementRef", "level", "variant" ]);
|
|
198
|
+
// @docs-props-type HeadingPropsBase
|
|
199
|
+
var s = function e(t) {
|
|
200
|
+
return t.toString().charAt(0) === "s";
|
|
201
|
+
};
|
|
202
|
+
var f = m[a];
|
|
203
|
+
var y = o || v[f];
|
|
204
|
+
if (false) {}
|
|
205
|
+
|
|
206
|
+
return i().createElement(c, p({
|
|
207
|
+
$isSection: s(a),
|
|
208
|
+
"data-test": "heading",
|
|
209
|
+
ref: r,
|
|
210
|
+
as: f,
|
|
211
|
+
$variant: y
|
|
212
|
+
}, l), t);
|
|
118
213
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
;// CONCATENATED MODULE: ./src/Heading/Heading.tsx
|
|
126
|
-
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); }
|
|
127
|
-
|
|
128
|
-
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; }
|
|
129
|
-
|
|
130
|
-
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; }
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
var propTypes = {
|
|
136
|
-
children: (external_prop_types_default()).node,
|
|
137
|
-
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
138
|
-
level: external_prop_types_default().oneOf([1, 2, 3, 4, 's', 'ss', 5, 6]),
|
|
139
|
-
variant: external_prop_types_default().oneOf(['title1', 'title2', 'title3', 'title4', 'title5', 'title6', 'title7'])
|
|
140
|
-
};
|
|
141
|
-
// h1-h6 use the same intrinsic element type
|
|
142
|
-
var levelToElement = {
|
|
143
|
-
'1': 'h1',
|
|
144
|
-
'2': 'h2',
|
|
145
|
-
'3': 'h3',
|
|
146
|
-
'4': 'h4',
|
|
147
|
-
s: 'h4',
|
|
148
|
-
ss: 'h5',
|
|
149
|
-
'5': 'h5',
|
|
150
|
-
'6': 'h6'
|
|
151
|
-
};
|
|
152
|
-
var elementToVariant = {
|
|
153
|
-
h1: 'title1',
|
|
154
|
-
h2: 'title2',
|
|
155
|
-
h3: 'title3',
|
|
156
|
-
h4: 'title4',
|
|
157
|
-
h5: 'title5',
|
|
158
|
-
h6: 'title6'
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
function Heading(_ref) {
|
|
162
|
-
var children = _ref.children,
|
|
163
|
-
elementRef = _ref.elementRef,
|
|
164
|
-
_ref$level = _ref.level,
|
|
165
|
-
level = _ref$level === void 0 ? 2 : _ref$level,
|
|
166
|
-
variant = _ref.variant,
|
|
167
|
-
otherProps = _objectWithoutProperties(_ref, ["children", "elementRef", "level", "variant"]);
|
|
168
|
-
|
|
169
|
-
// @docs-props-type HeadingPropsBase
|
|
170
|
-
var isSection = function isSection(l) {
|
|
171
|
-
return l.toString().charAt(0) === 's';
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
var element = levelToElement[level];
|
|
175
|
-
var finalVariant = variant || elementToVariant[element];
|
|
176
|
-
|
|
177
|
-
if (false) {}
|
|
178
|
-
|
|
179
|
-
return /*#__PURE__*/external_react_default().createElement(StyledHeading, _extends({
|
|
180
|
-
$isSection: isSection(level),
|
|
181
|
-
"data-test": "heading",
|
|
182
|
-
ref: elementRef,
|
|
183
|
-
as: element,
|
|
184
|
-
$variant: finalVariant
|
|
185
|
-
}, otherProps), children);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
Heading.propTypes = propTypes;
|
|
189
|
-
/* harmony default export */ const Heading_Heading = (Heading);
|
|
190
|
-
|
|
191
|
-
;// CONCATENATED MODULE: ./src/Heading/index.ts
|
|
192
|
-
|
|
193
|
-
module.exports = __webpack_exports__;
|
|
194
|
-
/******/ })()
|
|
195
|
-
;
|
|
214
|
+
h.propTypes = y;
|
|
215
|
+
/* harmony default export */ const d = h;
|
|
216
|
+
// CONCATENATED MODULE: ./src/Heading/index.ts
|
|
217
|
+
module.exports = t;
|
|
218
|
+
/******/})();
|