@splunk/react-ui 4.5.1 → 4.6.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 +7 -6
- package/Anchor.js +2 -2
- package/Animation.js +2 -2
- package/AnimationToggle.js +2 -2
- package/Box.js +2 -2
- package/Button.js +8 -8
- package/ButtonGroup.js +4 -4
- package/ButtonSimple.js +2 -2
- package/CHANGELOG.md +33 -0
- package/Calendar.js +6 -6
- package/Card.js +25 -30
- package/CardLayout.js +4 -4
- package/Chip.js +2 -2
- package/Clickable.js +39 -13
- package/CloseButton.js +4 -4
- package/Code.js +8 -7
- package/CollapsiblePanel.js +6 -9
- package/Color.js +42 -42
- package/ColumnLayout.js +4 -4
- package/ComboBox.js +2 -2
- package/Concertina.js +4 -4
- package/ControlGroup.js +22 -29
- package/Date.js +4 -4
- package/DefinitionList.js +2 -2
- package/Dropdown.js +2 -2
- package/EventListener.js +4 -4
- package/FetchOptions.js +8 -8
- package/File.js +7 -7
- package/FormRows.js +16 -18
- package/Heading.js +2 -2
- package/Image.js +6 -6
- package/JSONTree.js +2 -2
- package/Layer.js +8 -8
- package/Link.js +4 -4
- package/List.js +2 -2
- package/Markdown.js +26 -14
- package/Menu.js +17 -17
- package/Message.js +10 -10
- package/Modal.js +43 -14
- package/ModalLayer.js +4 -4
- package/Monogram.js +2 -2
- package/Multiselect.js +255 -13
- package/Number.js +2 -2
- package/Paginator.js +10 -10
- package/Paragraph.js +2 -2
- package/Popover.js +6 -6
- package/Progress.js +6 -6
- package/Resize.js +2 -2
- package/ResultsMenu.js +6 -6
- package/ScreenReaderContent.js +2 -2
- package/Scroll.js +2 -2
- package/ScrollContainerContext.js +2 -2
- package/Search.js +4 -4
- package/Select.js +254 -13
- package/SidePanel.js +6 -6
- package/Slider.js +12 -6
- package/SlidingPanels.js +2 -2
- package/StaticContent.js +2 -2
- package/StepBar.js +6 -6
- package/Switch.js +4 -4
- package/TabLayout.js +4 -4
- package/Table.js +37 -36
- package/Text.js +144 -127
- package/Tooltip.js +2 -2
- package/TransitionOpen.js +62 -37
- package/WaitSpinner.js +2 -2
- package/cypress/plugins/index.ts +15 -0
- package/cypress/support/commands.ts +1 -0
- package/cypress/support/index.ts +9 -0
- package/cypress.json +12 -0
- package/package.json +15 -6
- package/types/src/Clickable/Clickable.d.ts +12 -2
- package/types/src/Clickable/NavigationProvider.d.ts +12 -2
- package/types/src/Color/Color.d.ts +3 -3
- package/types/src/Date/Date.d.ts +3 -3
- package/types/src/Modal/Modal.d.ts +2 -0
- package/types/src/Modal/ModalContext.d.ts +6 -0
- package/types/src/Multiselect/Multiselect.d.ts +1 -0
- package/types/src/Number/Number.d.ts +3 -3
- package/types/src/RadioBar/RadioBar.d.ts +3 -3
- package/types/src/Select/Select.d.ts +8 -3
- package/types/src/Select/SelectBase.d.ts +16 -4
- package/types/src/Select/matchUtils.d.ts +12 -0
- package/types/src/Slider/Slider.d.ts +3 -3
- package/types/src/Text/Text.d.ts +12 -5
- package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -0
- package/usePrevious.js +2 -2
package/Text.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 126);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,20 +101,13 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 105:
|
|
105
105
|
/***/ (function(module, exports) {
|
|
106
106
|
|
|
107
107
|
module.exports = require("@splunk/react-ui/ControlGroup");
|
|
108
108
|
|
|
109
109
|
/***/ }),
|
|
110
110
|
|
|
111
|
-
/***/ 104:
|
|
112
|
-
/***/ (function(module, exports) {
|
|
113
|
-
|
|
114
|
-
module.exports = require("@splunk/react-icons/Search");
|
|
115
|
-
|
|
116
|
-
/***/ }),
|
|
117
|
-
|
|
118
111
|
/***/ 11:
|
|
119
112
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
120
113
|
|
|
@@ -142,7 +135,7 @@ function updateReactRef(ref, current) {
|
|
|
142
135
|
|
|
143
136
|
/***/ }),
|
|
144
137
|
|
|
145
|
-
/***/
|
|
138
|
+
/***/ 126:
|
|
146
139
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
147
140
|
|
|
148
141
|
"use strict";
|
|
@@ -178,58 +171,14 @@ var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReade
|
|
|
178
171
|
var themes_ = __webpack_require__(0);
|
|
179
172
|
|
|
180
173
|
// EXTERNAL MODULE: external "@splunk/react-ui/ControlGroup"
|
|
181
|
-
var ControlGroup_ = __webpack_require__(
|
|
174
|
+
var ControlGroup_ = __webpack_require__(105);
|
|
182
175
|
|
|
183
176
|
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
184
177
|
var i18n_ = __webpack_require__(5);
|
|
185
178
|
|
|
186
|
-
// EXTERNAL MODULE:
|
|
187
|
-
var
|
|
188
|
-
var Search_default = /*#__PURE__*/__webpack_require__.n(Search_);
|
|
189
|
-
|
|
190
|
-
// EXTERNAL MODULE: ./src/icons/ThemedIcon.tsx
|
|
191
|
-
var ThemedIcon = __webpack_require__(7);
|
|
192
|
-
|
|
193
|
-
// EXTERNAL MODULE: ./src/icons/SVG.tsx
|
|
194
|
-
var SVG = __webpack_require__(6);
|
|
195
|
-
|
|
196
|
-
// CONCATENATED MODULE: ./src/icons/Search.tsx
|
|
197
|
-
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); }
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
179
|
+
// EXTERNAL MODULE: ./src/icons/Search.tsx
|
|
180
|
+
var Search = __webpack_require__(43);
|
|
202
181
|
|
|
203
|
-
|
|
204
|
-
function Prisma24(_ref) {
|
|
205
|
-
var otherProps = _extends({}, _ref);
|
|
206
|
-
|
|
207
|
-
return /*#__PURE__*/external_react_default.a.createElement(SVG["a" /* default */], _extends({
|
|
208
|
-
viewBox: "0 0 24 24"
|
|
209
|
-
}, otherProps), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
210
|
-
d: "M10.5,3.0015 C14.6421,3.0015 18,6.3593 18,10.5015 C18,12.2112 17.4279,13.7873 16.4647,15.0489 L20.7077,19.292 C21.0983,19.6825 21.0983,20.3156 20.7077,20.7062 C20.3172,21.0967 19.6841,21.0967 19.2935,20.7062 L15.0509,16.4635 C13.7888,17.4283 12.2113,18.0015 10.5,18.0015 C6.3579,18.0015 3,14.6436 3,10.5015 C3,6.3593 6.3579,3.0015 10.5,3.0015 Z M10.5,5.0015 C7.4624,5.0015 5,7.4639 5,10.5015 C5,13.539 7.4624,16.0015 10.5,16.0015 C13.5376,16.0015 16,13.539 16,10.5015 C16,7.4639 13.5376,5.0015 10.5,5.0015 Z",
|
|
211
|
-
fill: "currentColor"
|
|
212
|
-
}));
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function Prisma16(_ref2) {
|
|
216
|
-
var otherProps = _extends({}, _ref2);
|
|
217
|
-
|
|
218
|
-
return /*#__PURE__*/external_react_default.a.createElement(SVG["a" /* default */], _extends({
|
|
219
|
-
viewBox: "0 0 16 16"
|
|
220
|
-
}, otherProps), /*#__PURE__*/external_react_default.a.createElement("path", {
|
|
221
|
-
d: "M6.85277,2.0015 C9.53288,2.0015 11.7055,4.1741 11.7055,6.8542 C11.7055,7.8463 11.4079,8.7688 10.897,9.5373 L10.9245,9.5098 L14.0018,12.5871 L12.5876,14.0014 L9.51025,10.924 L9.53587,10.8984 C8.76733,11.4093 7.84481,11.707 6.85277,11.707 C4.17266,11.707 2,9.5343 2,6.8542 C2,4.1741 4.17266,2.0015 6.85277,2.0015 Z M6.85277,4.0015 C5.27723,4.0015 4,5.2787 4,6.8542 C4,8.4298 5.27723,9.707 6.85277,9.707 C8.42831,9.707 9.70554,8.4298 9.70554,6.8542 C9.70554,5.2787 8.42831,4.0015 6.85277,4.0015 Z",
|
|
222
|
-
fill: "currentColor"
|
|
223
|
-
}));
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function Search(props) {
|
|
227
|
-
return /*#__PURE__*/external_react_default.a.createElement(ThemedIcon["a" /* default */], _extends({
|
|
228
|
-
Enterprise: Search_default.a,
|
|
229
|
-
Prisma16: Prisma16,
|
|
230
|
-
Prisma24: Prisma24
|
|
231
|
-
}, props));
|
|
232
|
-
}
|
|
233
182
|
// EXTERNAL MODULE: ./src/icons/CrossMark.tsx
|
|
234
183
|
var CrossMark = __webpack_require__(22);
|
|
235
184
|
|
|
@@ -316,7 +265,7 @@ var SVG_ = __webpack_require__(23);
|
|
|
316
265
|
var SVG_default = /*#__PURE__*/__webpack_require__.n(SVG_);
|
|
317
266
|
|
|
318
267
|
// CONCATENATED MODULE: ./src/Text/IconOutlinedHide.tsx
|
|
319
|
-
function
|
|
268
|
+
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); }
|
|
320
269
|
|
|
321
270
|
|
|
322
271
|
|
|
@@ -329,7 +278,7 @@ function IconOutlinedHide(props) {
|
|
|
329
278
|
density = _useSplunkTheme.density;
|
|
330
279
|
|
|
331
280
|
if (family === 'enterprise') {
|
|
332
|
-
return /*#__PURE__*/external_react_default.a.createElement(SVG_default.a,
|
|
281
|
+
return /*#__PURE__*/external_react_default.a.createElement(SVG_default.a, _extends({
|
|
333
282
|
viewBox: "0 0 24 24",
|
|
334
283
|
size: 1.2,
|
|
335
284
|
screenReaderText: Object(i18n_["_"])('Hide password')
|
|
@@ -582,7 +531,10 @@ var StyledInput = external_styled_components_default.a.input.withConfig({
|
|
|
582
531
|
}), themes_["variables"].contentColorMuted, function (_ref9) {
|
|
583
532
|
var $error = _ref9.$error;
|
|
584
533
|
return $error && Object(external_styled_components_["css"])(["&,&:hover{color:", ";}"], Object(themes_["pick"])({
|
|
585
|
-
enterprise:
|
|
534
|
+
enterprise: {
|
|
535
|
+
light: themes_["variables"].errorColorD10,
|
|
536
|
+
dark: themes_["variables"].errorColorL20
|
|
537
|
+
},
|
|
586
538
|
prisma: themes_["variables"].contentColorActive
|
|
587
539
|
}));
|
|
588
540
|
}, function (_ref10) {
|
|
@@ -824,6 +776,7 @@ var propTypes = {
|
|
|
824
776
|
onFocus: external_prop_types_default.a.func,
|
|
825
777
|
onKeyDown: external_prop_types_default.a.func,
|
|
826
778
|
onSelect: external_prop_types_default.a.func,
|
|
779
|
+
onInputClick: external_prop_types_default.a.func,
|
|
827
780
|
placeholder: external_prop_types_default.a.string,
|
|
828
781
|
prepend: external_prop_types_default.a.bool,
|
|
829
782
|
rowsMax: external_prop_types_default.a.number,
|
|
@@ -950,38 +903,41 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
950
903
|
(_this$props$onSelect = (_this$props3 = _this.props).onSelect) === null || _this$props$onSelect === void 0 ? void 0 : _this$props$onSelect.call(_this$props3, e);
|
|
951
904
|
});
|
|
952
905
|
|
|
906
|
+
_defineProperty(_assertThisInitialized(_this), "handleInputClick", function (e) {
|
|
907
|
+
var _this$props$onInputCl, _this$props4;
|
|
908
|
+
|
|
909
|
+
(_this$props$onInputCl = (_this$props4 = _this.props).onInputClick) === null || _this$props$onInputCl === void 0 ? void 0 : _this$props$onInputCl.call(_this$props4, e);
|
|
910
|
+
});
|
|
911
|
+
|
|
953
912
|
_defineProperty(_assertThisInitialized(_this), "handleInputFocus", function (e) {
|
|
954
|
-
var _this$props$onFocus, _this$
|
|
913
|
+
var _this$props$onFocus, _this$props5;
|
|
955
914
|
|
|
956
|
-
(_this$props$onFocus = (_this$
|
|
915
|
+
(_this$props$onFocus = (_this$props5 = _this.props).onFocus) === null || _this$props$onFocus === void 0 ? void 0 : _this$props$onFocus.call(_this$props5, e);
|
|
957
916
|
});
|
|
958
917
|
|
|
959
918
|
_defineProperty(_assertThisInitialized(_this), "handleInputBlur", function (e) {
|
|
960
|
-
var _this$props$onBlur, _this$
|
|
919
|
+
var _this$props$onBlur, _this$props6;
|
|
961
920
|
|
|
962
|
-
(_this$props$onBlur = (_this$
|
|
921
|
+
(_this$props$onBlur = (_this$props6 = _this.props).onBlur) === null || _this$props$onBlur === void 0 ? void 0 : _this$props$onBlur.call(_this$props6, e);
|
|
963
922
|
});
|
|
964
923
|
|
|
965
924
|
_defineProperty(_assertThisInitialized(_this), "handleClear", function (e) {
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
_this.setState({
|
|
976
|
-
value: value
|
|
977
|
-
});
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
(_this$props$onChange2 = (_this$props6 = _this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props6, e, {
|
|
981
|
-
value: value,
|
|
982
|
-
name: name
|
|
925
|
+
var _this$props$onChange2, _this$props7;
|
|
926
|
+
|
|
927
|
+
e.preventDefault();
|
|
928
|
+
var value = '';
|
|
929
|
+
var name = _this.props.name;
|
|
930
|
+
|
|
931
|
+
if (!_this.isControlled()) {
|
|
932
|
+
_this.setState({
|
|
933
|
+
value: value
|
|
983
934
|
});
|
|
984
935
|
}
|
|
936
|
+
|
|
937
|
+
(_this$props$onChange2 = (_this$props7 = _this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props7, e, {
|
|
938
|
+
value: value,
|
|
939
|
+
name: name
|
|
940
|
+
});
|
|
985
941
|
});
|
|
986
942
|
|
|
987
943
|
_defineProperty(_assertThisInitialized(_this), "handleVisibilityToggle", function () {
|
|
@@ -1011,13 +967,13 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1011
967
|
_defineProperty(_assertThisInitialized(_this), "renderEndAdornment", function () {
|
|
1012
968
|
var _controlGroupContext$;
|
|
1013
969
|
|
|
1014
|
-
var _this$
|
|
1015
|
-
appearance = _this$
|
|
1016
|
-
endAdornment = _this$
|
|
1017
|
-
passwordVisibilityToggle = _this$
|
|
1018
|
-
disabled = _this$
|
|
1019
|
-
canClear = _this$
|
|
1020
|
-
splunkTheme = _this$
|
|
970
|
+
var _this$props8 = _this.props,
|
|
971
|
+
appearance = _this$props8.appearance,
|
|
972
|
+
endAdornment = _this$props8.endAdornment,
|
|
973
|
+
passwordVisibilityToggle = _this$props8.passwordVisibilityToggle,
|
|
974
|
+
disabled = _this$props8.disabled,
|
|
975
|
+
canClear = _this$props8.canClear,
|
|
976
|
+
splunkTheme = _this$props8.splunkTheme;
|
|
1021
977
|
var isPrisma = splunkTheme.isPrisma;
|
|
1022
978
|
var adornmentProps = {
|
|
1023
979
|
ref: function ref(el) {
|
|
@@ -1059,7 +1015,7 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1059
1015
|
onClick: _this.handleClear
|
|
1060
1016
|
}), /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, {
|
|
1061
1017
|
$disabled: disabled
|
|
1062
|
-
}, /*#__PURE__*/external_react_default.a.createElement(Search, {
|
|
1018
|
+
}, /*#__PURE__*/external_react_default.a.createElement(Search["a" /* default */], {
|
|
1063
1019
|
enterpriseSize: "16px",
|
|
1064
1020
|
inline: false
|
|
1065
1021
|
})));
|
|
@@ -1082,11 +1038,11 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1082
1038
|
});
|
|
1083
1039
|
|
|
1084
1040
|
_defineProperty(_assertThisInitialized(_this), "renderStartAdornment", function () {
|
|
1085
|
-
var _this$
|
|
1086
|
-
appearance = _this$
|
|
1087
|
-
startAdornment = _this$
|
|
1088
|
-
splunkTheme = _this$
|
|
1089
|
-
disabled = _this$
|
|
1041
|
+
var _this$props9 = _this.props,
|
|
1042
|
+
appearance = _this$props9.appearance,
|
|
1043
|
+
startAdornment = _this$props9.startAdornment,
|
|
1044
|
+
splunkTheme = _this$props9.splunkTheme,
|
|
1045
|
+
disabled = _this$props9.disabled;
|
|
1090
1046
|
var isPrisma = splunkTheme.isPrisma;
|
|
1091
1047
|
var adornmentProps = {
|
|
1092
1048
|
ref: function ref(el) {
|
|
@@ -1103,7 +1059,7 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1103
1059
|
if (isPrisma && appearance === 'search') {
|
|
1104
1060
|
return /*#__PURE__*/external_react_default.a.createElement(StyledAdornment, adornmentProps, /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, {
|
|
1105
1061
|
$disabled: disabled
|
|
1106
|
-
}, /*#__PURE__*/external_react_default.a.createElement(Search, {
|
|
1062
|
+
}, /*#__PURE__*/external_react_default.a.createElement(Search["a" /* default */], {
|
|
1107
1063
|
enterpriseSize: "16px",
|
|
1108
1064
|
inline: false,
|
|
1109
1065
|
screenReaderText: "Search"
|
|
@@ -1189,36 +1145,36 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1189
1145
|
value: function render() {
|
|
1190
1146
|
var _this2 = this;
|
|
1191
1147
|
|
|
1192
|
-
var _this$
|
|
1193
|
-
append = _this$
|
|
1194
|
-
autoCapitalize = _this$
|
|
1195
|
-
autoComplete = _this$
|
|
1196
|
-
autoCorrect = _this$
|
|
1197
|
-
autoFocus = _this$
|
|
1198
|
-
children = _this$
|
|
1199
|
-
className = _this$
|
|
1200
|
-
classNamePrivate = _this$
|
|
1201
|
-
disabled = _this$
|
|
1202
|
-
describedBy = _this$
|
|
1203
|
-
elementRef = _this$
|
|
1204
|
-
error = _this$
|
|
1205
|
-
inline = _this$
|
|
1206
|
-
inputClassName = _this$
|
|
1207
|
-
inputId = _this$
|
|
1208
|
-
labelledBy = _this$
|
|
1209
|
-
multiline = _this$
|
|
1210
|
-
maxLength = _this$
|
|
1211
|
-
name = _this$
|
|
1212
|
-
passwordVisibilityToggle = _this$
|
|
1213
|
-
placeholder = _this$
|
|
1214
|
-
prepend = _this$
|
|
1215
|
-
spellCheck = _this$
|
|
1216
|
-
tabIndex = _this$
|
|
1217
|
-
title = _this$
|
|
1218
|
-
type = _this$
|
|
1219
|
-
useSyntheticPlaceholder = _this$
|
|
1220
|
-
value = _this$
|
|
1221
|
-
otherProps = _objectWithoutProperties(_this$
|
|
1148
|
+
var _this$props10 = this.props,
|
|
1149
|
+
append = _this$props10.append,
|
|
1150
|
+
autoCapitalize = _this$props10.autoCapitalize,
|
|
1151
|
+
autoComplete = _this$props10.autoComplete,
|
|
1152
|
+
autoCorrect = _this$props10.autoCorrect,
|
|
1153
|
+
autoFocus = _this$props10.autoFocus,
|
|
1154
|
+
children = _this$props10.children,
|
|
1155
|
+
className = _this$props10.className,
|
|
1156
|
+
classNamePrivate = _this$props10.classNamePrivate,
|
|
1157
|
+
disabled = _this$props10.disabled,
|
|
1158
|
+
describedBy = _this$props10.describedBy,
|
|
1159
|
+
elementRef = _this$props10.elementRef,
|
|
1160
|
+
error = _this$props10.error,
|
|
1161
|
+
inline = _this$props10.inline,
|
|
1162
|
+
inputClassName = _this$props10.inputClassName,
|
|
1163
|
+
inputId = _this$props10.inputId,
|
|
1164
|
+
labelledBy = _this$props10.labelledBy,
|
|
1165
|
+
multiline = _this$props10.multiline,
|
|
1166
|
+
maxLength = _this$props10.maxLength,
|
|
1167
|
+
name = _this$props10.name,
|
|
1168
|
+
passwordVisibilityToggle = _this$props10.passwordVisibilityToggle,
|
|
1169
|
+
placeholder = _this$props10.placeholder,
|
|
1170
|
+
prepend = _this$props10.prepend,
|
|
1171
|
+
spellCheck = _this$props10.spellCheck,
|
|
1172
|
+
tabIndex = _this$props10.tabIndex,
|
|
1173
|
+
title = _this$props10.title,
|
|
1174
|
+
type = _this$props10.type,
|
|
1175
|
+
useSyntheticPlaceholder = _this$props10.useSyntheticPlaceholder,
|
|
1176
|
+
value = _this$props10.value,
|
|
1177
|
+
otherProps = _objectWithoutProperties(_this$props10, ["append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "multiline", "maxLength", "name", "passwordVisibilityToggle", "placeholder", "prepend", "spellCheck", "tabIndex", "title", "type", "useSyntheticPlaceholder", "value"]);
|
|
1222
1178
|
|
|
1223
1179
|
var ariaProps = _objectSpread(_objectSpread({}, Object(external_lodash_["pickBy"])(otherProps, function (val, key) {
|
|
1224
1180
|
return key === 'role' || key.indexOf('aria-') === 0;
|
|
@@ -1229,7 +1185,7 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1229
1185
|
'aria-multiline': multiline
|
|
1230
1186
|
});
|
|
1231
1187
|
|
|
1232
|
-
var boxProps = Object(external_lodash_["omit"])(otherProps, ['inputRef', 'onBlur', 'onChange', 'onFocus', 'onKeyDown', 'onSelect', 'rowsMax', 'rowsMin'].concat(_toConsumableArray(Object(external_lodash_["keys"])(ariaProps))));
|
|
1188
|
+
var boxProps = Object(external_lodash_["omit"])(otherProps, ['inputRef', 'onBlur', 'onChange', 'onFocus', 'onKeyDown', 'onSelect', 'onInputClick', 'rowsMax', 'rowsMin'].concat(_toConsumableArray(Object(external_lodash_["keys"])(ariaProps))));
|
|
1233
1189
|
var displayValue = this.isControlled() ? value : this.state.value;
|
|
1234
1190
|
var displayProps = {
|
|
1235
1191
|
className: Object(style_["toClassName"])(className, inputClassName),
|
|
@@ -1253,6 +1209,7 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1253
1209
|
onChange: this.handleInputChange,
|
|
1254
1210
|
onKeyDown: this.handleInputKeyDown,
|
|
1255
1211
|
onSelect: this.handleInputSelect,
|
|
1212
|
+
onClick: this.handleInputClick,
|
|
1256
1213
|
onFocus: this.handleInputFocus,
|
|
1257
1214
|
onBlur: this.handleInputBlur,
|
|
1258
1215
|
ref: this.handleInputMount,
|
|
@@ -1294,6 +1251,7 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1294
1251
|
as: "textarea",
|
|
1295
1252
|
"aria-hidden": "true",
|
|
1296
1253
|
onChange: external_lodash_["noop"],
|
|
1254
|
+
onClick: this.handleInputClick,
|
|
1297
1255
|
style: {
|
|
1298
1256
|
width: '100%',
|
|
1299
1257
|
position: 'absolute',
|
|
@@ -1325,7 +1283,9 @@ var Text_Text = /*#__PURE__*/function (_Component) {
|
|
|
1325
1283
|
} : undefined
|
|
1326
1284
|
}, ariaProps)) : /*#__PURE__*/external_react_default.a.createElement(StyledInput, Text_extends({
|
|
1327
1285
|
as: multiline ? 'textarea' : undefined
|
|
1328
|
-
}, inputProps
|
|
1286
|
+
}, inputProps, {
|
|
1287
|
+
onClick: this.handleInputClick
|
|
1288
|
+
})), !disabled && multiline && /*#__PURE__*/external_react_default.a.createElement(EventListener_default.a, {
|
|
1329
1289
|
target: window,
|
|
1330
1290
|
eventType: "resize",
|
|
1331
1291
|
listener: this.handleResize
|
|
@@ -1479,6 +1439,63 @@ module.exports = require("lodash");
|
|
|
1479
1439
|
|
|
1480
1440
|
/***/ }),
|
|
1481
1441
|
|
|
1442
|
+
/***/ 43:
|
|
1443
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1444
|
+
|
|
1445
|
+
"use strict";
|
|
1446
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Search; });
|
|
1447
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
|
1448
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1449
|
+
/* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48);
|
|
1450
|
+
/* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__);
|
|
1451
|
+
/* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
|
1452
|
+
/* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
|
|
1453
|
+
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); }
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
function Prisma24(_ref) {
|
|
1461
|
+
var otherProps = _extends({}, _ref);
|
|
1462
|
+
|
|
1463
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SVG__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], _extends({
|
|
1464
|
+
viewBox: "0 0 24 24"
|
|
1465
|
+
}, otherProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", {
|
|
1466
|
+
d: "M10.5,3.0015 C14.6421,3.0015 18,6.3593 18,10.5015 C18,12.2112 17.4279,13.7873 16.4647,15.0489 L20.7077,19.292 C21.0983,19.6825 21.0983,20.3156 20.7077,20.7062 C20.3172,21.0967 19.6841,21.0967 19.2935,20.7062 L15.0509,16.4635 C13.7888,17.4283 12.2113,18.0015 10.5,18.0015 C6.3579,18.0015 3,14.6436 3,10.5015 C3,6.3593 6.3579,3.0015 10.5,3.0015 Z M10.5,5.0015 C7.4624,5.0015 5,7.4639 5,10.5015 C5,13.539 7.4624,16.0015 10.5,16.0015 C13.5376,16.0015 16,13.539 16,10.5015 C16,7.4639 13.5376,5.0015 10.5,5.0015 Z",
|
|
1467
|
+
fill: "currentColor"
|
|
1468
|
+
}));
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
function Prisma16(_ref2) {
|
|
1472
|
+
var otherProps = _extends({}, _ref2);
|
|
1473
|
+
|
|
1474
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SVG__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], _extends({
|
|
1475
|
+
viewBox: "0 0 16 16"
|
|
1476
|
+
}, otherProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("path", {
|
|
1477
|
+
d: "M6.85277,2.0015 C9.53288,2.0015 11.7055,4.1741 11.7055,6.8542 C11.7055,7.8463 11.4079,8.7688 10.897,9.5373 L10.9245,9.5098 L14.0018,12.5871 L12.5876,14.0014 L9.51025,10.924 L9.53587,10.8984 C8.76733,11.4093 7.84481,11.707 6.85277,11.707 C4.17266,11.707 2,9.5343 2,6.8542 C2,4.1741 4.17266,2.0015 6.85277,2.0015 Z M6.85277,4.0015 C5.27723,4.0015 4,5.2787 4,6.8542 C4,8.4298 5.27723,9.707 6.85277,9.707 C8.42831,9.707 9.70554,8.4298 9.70554,6.8542 C9.70554,5.2787 8.42831,4.0015 6.85277,4.0015 Z",
|
|
1478
|
+
fill: "currentColor"
|
|
1479
|
+
}));
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
function Search(props) {
|
|
1483
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ThemedIcon__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], _extends({
|
|
1484
|
+
Enterprise: _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1___default.a,
|
|
1485
|
+
Prisma16: Prisma16,
|
|
1486
|
+
Prisma24: Prisma24
|
|
1487
|
+
}, props));
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
/***/ }),
|
|
1491
|
+
|
|
1492
|
+
/***/ 48:
|
|
1493
|
+
/***/ (function(module, exports) {
|
|
1494
|
+
|
|
1495
|
+
module.exports = require("@splunk/react-icons/Search");
|
|
1496
|
+
|
|
1497
|
+
/***/ }),
|
|
1498
|
+
|
|
1482
1499
|
/***/ 5:
|
|
1483
1500
|
/***/ (function(module, exports) {
|
|
1484
1501
|
|
package/Tooltip.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 143);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -115,7 +115,7 @@ module.exports = require("@splunk/react-ui/Clickable");
|
|
|
115
115
|
|
|
116
116
|
/***/ }),
|
|
117
117
|
|
|
118
|
-
/***/
|
|
118
|
+
/***/ 143:
|
|
119
119
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
120
120
|
|
|
121
121
|
"use strict";
|
package/TransitionOpen.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 168);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 168:
|
|
105
105
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
106
|
|
|
107
107
|
"use strict";
|
|
@@ -291,7 +291,8 @@ var TransitionOpen_TransitionOpen = /*#__PURE__*/function (_Component) {
|
|
|
291
291
|
});
|
|
292
292
|
|
|
293
293
|
_defineProperty(_assertThisInitialized(_this), "internalRender", function (_ref) {
|
|
294
|
-
var value = _ref.value
|
|
294
|
+
var value = _ref.value,
|
|
295
|
+
transform = _ref.transform;
|
|
295
296
|
var _this$props2 = _this.props,
|
|
296
297
|
animation = _this$props2.animation,
|
|
297
298
|
className = _this$props2.className,
|
|
@@ -304,37 +305,19 @@ var TransitionOpen_TransitionOpen = /*#__PURE__*/function (_Component) {
|
|
|
304
305
|
outerId = _this$props2.outerId,
|
|
305
306
|
outerStyle = _this$props2.outerStyle;
|
|
306
307
|
var animating = _this.state.animating;
|
|
307
|
-
var offset = value.to(function (v) {
|
|
308
|
-
return _this.state.value || 0 - v;
|
|
309
|
-
});
|
|
310
|
-
var transform;
|
|
311
308
|
var dimension;
|
|
312
309
|
|
|
313
310
|
if (animating) {
|
|
314
311
|
switch (animation) {
|
|
315
312
|
case 'slideFromTop':
|
|
316
|
-
transform = "translateY(-".concat(offset, "px)");
|
|
317
|
-
dimension = 'height';
|
|
318
|
-
break;
|
|
319
|
-
|
|
320
313
|
case 'slideFromBottom':
|
|
314
|
+
case 'expandHeight':
|
|
321
315
|
case 'none':
|
|
322
316
|
dimension = 'height';
|
|
323
317
|
break;
|
|
324
318
|
|
|
325
319
|
case 'slideFromLeft':
|
|
326
|
-
transform = "translateX(".concat(-offset, "px)");
|
|
327
|
-
dimension = 'width';
|
|
328
|
-
break;
|
|
329
|
-
|
|
330
320
|
case 'slideFromRight':
|
|
331
|
-
dimension = 'width';
|
|
332
|
-
break;
|
|
333
|
-
|
|
334
|
-
case 'expandHeight':
|
|
335
|
-
dimension = 'height';
|
|
336
|
-
break;
|
|
337
|
-
|
|
338
321
|
case 'expandWidth':
|
|
339
322
|
dimension = 'width';
|
|
340
323
|
break;
|
|
@@ -365,6 +348,58 @@ var TransitionOpen_TransitionOpen = /*#__PURE__*/function (_Component) {
|
|
|
365
348
|
}), children));
|
|
366
349
|
});
|
|
367
350
|
|
|
351
|
+
_defineProperty(_assertThisInitialized(_this), "getSpringTransition", function () {
|
|
352
|
+
var _this$props3 = _this.props,
|
|
353
|
+
open = _this$props3.open,
|
|
354
|
+
animation = _this$props3.animation;
|
|
355
|
+
var value = _this.state.value;
|
|
356
|
+
var toValue = {
|
|
357
|
+
value: open ? value : 0
|
|
358
|
+
};
|
|
359
|
+
var fromValue = {
|
|
360
|
+
value: open ? 0 : value
|
|
361
|
+
};
|
|
362
|
+
var config = {
|
|
363
|
+
precision: 1
|
|
364
|
+
}; // Only use precision when not using transform, otherwise transform animation will break
|
|
365
|
+
// Expansion doesn't require a valid value; the subsequent render animates it.
|
|
366
|
+
|
|
367
|
+
if (animation === 'expandWidth' || animation === 'expandHeight' || animation === 'none') {
|
|
368
|
+
return {
|
|
369
|
+
to: toValue,
|
|
370
|
+
config: config
|
|
371
|
+
};
|
|
372
|
+
} // Slide transitions require a valid value, render without transition first.
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
if (!value) {
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (animation !== 'slideFromTop' && animation !== 'slideFromLeft') {
|
|
380
|
+
// Return the standard transition if not using a transform.
|
|
381
|
+
return {
|
|
382
|
+
to: toValue,
|
|
383
|
+
from: fromValue,
|
|
384
|
+
config: config
|
|
385
|
+
};
|
|
386
|
+
} // The top and left directions require an additional transform of their inner content to match the outer dimension animation.
|
|
387
|
+
// This is needed to achieve a clipping effect from the outer div, rather than the consumer providing their own.
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
var orientation = animation === 'slideFromTop' ? 'Y' : 'X';
|
|
391
|
+
var toTransform = "translate".concat(orientation, "(").concat(open ? 0 : -value, "px)");
|
|
392
|
+
var fromTransform = "translate".concat(orientation, "(").concat(open ? -value : 0, "px)");
|
|
393
|
+
return {
|
|
394
|
+
to: _objectSpread({
|
|
395
|
+
transform: toTransform
|
|
396
|
+
}, toValue),
|
|
397
|
+
from: _objectSpread({
|
|
398
|
+
transform: fromTransform
|
|
399
|
+
}, fromValue)
|
|
400
|
+
};
|
|
401
|
+
});
|
|
402
|
+
|
|
368
403
|
_this.state = {
|
|
369
404
|
animating: props.animateOnMount ? props.open : false,
|
|
370
405
|
innerEl: null,
|
|
@@ -379,7 +414,7 @@ var TransitionOpen_TransitionOpen = /*#__PURE__*/function (_Component) {
|
|
|
379
414
|
value: function componentDidUpdate() {
|
|
380
415
|
var value = this.getValue(this.state.innerEl);
|
|
381
416
|
|
|
382
|
-
if (this.state.value !== value) {
|
|
417
|
+
if (this.state.value !== value && !this.state.animating) {
|
|
383
418
|
this.setState({
|
|
384
419
|
value: value
|
|
385
420
|
}); // eslint-disable-line react/no-did-update-set-state
|
|
@@ -388,21 +423,11 @@ var TransitionOpen_TransitionOpen = /*#__PURE__*/function (_Component) {
|
|
|
388
423
|
}, {
|
|
389
424
|
key: "render",
|
|
390
425
|
value: function render() {
|
|
391
|
-
var
|
|
392
|
-
|
|
393
|
-
animation = _this$props3.animation;
|
|
394
|
-
var value = this.state.value;
|
|
395
|
-
var animateTo = open ? value : 0;
|
|
396
|
-
return /*#__PURE__*/external_react_default.a.createElement(Animation_["Spring"], {
|
|
397
|
-
to: {
|
|
398
|
-
value: animateTo || 0
|
|
399
|
-
},
|
|
426
|
+
var animation = this.props.animation;
|
|
427
|
+
return /*#__PURE__*/external_react_default.a.createElement(Animation_["Spring"], _extends({}, this.getSpringTransition(), {
|
|
400
428
|
immediate: animation === 'none',
|
|
401
|
-
onRest: this.handleRest
|
|
402
|
-
|
|
403
|
-
precision: 1
|
|
404
|
-
}
|
|
405
|
-
}, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
429
|
+
onRest: this.handleRest
|
|
430
|
+
}), // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
406
431
|
this.internalRender);
|
|
407
432
|
}
|
|
408
433
|
}]);
|
package/WaitSpinner.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 169);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 169:
|
|
105
105
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
106
|
|
|
107
107
|
"use strict";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
|
|
3
|
+
import { startDevServer } from '@cypress/webpack-dev-server';
|
|
4
|
+
import webpackConfig from '../../webpack.test.config';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @type {Cypress.PluginConfig}
|
|
8
|
+
*/
|
|
9
|
+
module.exports = (on, config) => {
|
|
10
|
+
if (config.testingType === 'component') {
|
|
11
|
+
on('dev-server:start', (options) => startDevServer({ options, webpackConfig }));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return config;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/cypress/add-commands';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { setGlobalConfig } from '@storybook/testing-react';
|
|
2
|
+
import { configure } from '@testing-library/cypress';
|
|
3
|
+
|
|
4
|
+
import './commands';
|
|
5
|
+
import * as sbPreview from '../../.storybook/preview';
|
|
6
|
+
|
|
7
|
+
configure({ testIdAttribute: 'data-test' });
|
|
8
|
+
|
|
9
|
+
setGlobalConfig(sbPreview);
|
package/cypress.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"baseUrl": "http://localhost:8080",
|
|
3
|
+
"env": {},
|
|
4
|
+
"defaultCommandTimeout": 1000,
|
|
5
|
+
"fixturesFolder": false,
|
|
6
|
+
"video": false,
|
|
7
|
+
"videoUploadOnPasses": false,
|
|
8
|
+
"component": {
|
|
9
|
+
"componentFolder": "src",
|
|
10
|
+
"testFiles": "**/**/tests/*.spec.tsx"
|
|
11
|
+
}
|
|
12
|
+
}
|