@splunk/react-ui 4.21.1 → 4.22.1
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/CHANGELOG.md +24 -1
- package/Code.js +0 -1
- package/Color.js +238 -235
- package/ComboBox.js +197 -185
- package/Date.js +3 -3
- package/List.js +17 -12
- package/Menu.js +100 -101
- package/Message.js +1 -1
- package/Multiselect.js +655 -641
- package/Number.js +3 -3
- package/RadioBar.js +91 -67
- package/ResultsMenu.js +107 -122
- package/Search.js +258 -246
- package/Select.js +461 -457
- package/Slider.js +87 -76
- package/TabBar.js +99 -84
- package/Table.js +805 -673
- package/Text.js +25 -15
- package/TextArea.js +27 -17
- package/package.json +5 -5
- package/types/src/Color/Color.d.ts +0 -1
- package/types/src/ComboBox/ComboBox.d.ts +13 -3
- package/types/src/Date/Date.d.ts +13 -3
- package/types/src/List/List.d.ts +11 -4
- package/types/src/Number/Number.d.ts +13 -3
- package/types/src/RadioBar/RadioBar.d.ts +1 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
- package/types/src/Search/Search.d.ts +13 -3
- 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/types/src/Text/Text.d.ts +13 -3
- package/types/src/TextArea/TextArea.d.ts +13 -3
- package/Code.js.LICENSE.txt +0 -8
package/Text.js
CHANGED
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
// CONCATENATED MODULE: external "@splunk/react-ui/ControlGroup"
|
|
85
85
|
const m = require("@splunk/react-ui/ControlGroup");
|
|
86
86
|
// CONCATENATED MODULE: external "@splunk/react-icons/Cross"
|
|
87
|
-
const
|
|
88
|
-
var
|
|
87
|
+
const v = require("@splunk/react-icons/Cross");
|
|
88
|
+
var h = e.n(v);
|
|
89
89
|
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Close"
|
|
90
90
|
const b = require("@splunk/react-icons/enterprise/Close");
|
|
91
91
|
var y = e.n(b);
|
|
@@ -622,7 +622,7 @@
|
|
|
622
622
|
}
|
|
623
623
|
function me(e, t) {
|
|
624
624
|
if (e == null) return {};
|
|
625
|
-
var r =
|
|
625
|
+
var r = ve(e, t);
|
|
626
626
|
var n, i;
|
|
627
627
|
if (Object.getOwnPropertySymbols) {
|
|
628
628
|
var a = Object.getOwnPropertySymbols(e);
|
|
@@ -635,7 +635,7 @@
|
|
|
635
635
|
}
|
|
636
636
|
return r;
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function ve(e, t) {
|
|
639
639
|
if (e == null) return {};
|
|
640
640
|
var r = {};
|
|
641
641
|
var n = Object.keys(e);
|
|
@@ -647,7 +647,7 @@
|
|
|
647
647
|
}
|
|
648
648
|
return r;
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function he(e, t) {
|
|
651
651
|
if (!(e instanceof t)) {
|
|
652
652
|
throw new TypeError("Cannot call a class as a function");
|
|
653
653
|
}
|
|
@@ -819,7 +819,7 @@
|
|
|
819
819
|
} ]);
|
|
820
820
|
function r(e) {
|
|
821
821
|
var i;
|
|
822
|
-
|
|
822
|
+
he(this, r);
|
|
823
823
|
i = t.call(this, e);
|
|
824
824
|
Ee(ke(i), "controlledExternally", void 0);
|
|
825
825
|
Ee(ke(i), "input", null);
|
|
@@ -873,11 +873,21 @@
|
|
|
873
873
|
}));
|
|
874
874
|
Ee(ke(i), "handleInputFocus", (function(e) {
|
|
875
875
|
var t, r;
|
|
876
|
-
|
|
876
|
+
var n = e.target.value;
|
|
877
|
+
var a = i.props.name;
|
|
878
|
+
(t = (r = i.props).onFocus) === null || t === void 0 ? void 0 : t.call(r, e, {
|
|
879
|
+
value: n,
|
|
880
|
+
name: a
|
|
881
|
+
});
|
|
877
882
|
}));
|
|
878
883
|
Ee(ke(i), "handleInputBlur", (function(e) {
|
|
879
884
|
var t, r;
|
|
880
|
-
|
|
885
|
+
var n = e.target.value;
|
|
886
|
+
var a = i.props.name;
|
|
887
|
+
(t = (r = i.props).onBlur) === null || t === void 0 ? void 0 : t.call(r, e, {
|
|
888
|
+
value: n,
|
|
889
|
+
name: a
|
|
890
|
+
});
|
|
881
891
|
}));
|
|
882
892
|
Ee(ke(i), "handleClear", (function(e) {
|
|
883
893
|
var t, r;
|
|
@@ -919,7 +929,7 @@
|
|
|
919
929
|
return n().createElement(re, m, a);
|
|
920
930
|
}
|
|
921
931
|
if (o && !l) {
|
|
922
|
-
var
|
|
932
|
+
var v = i.state.hideVisibility ? n().createElement(B, null) : n().createElement(P, null);
|
|
923
933
|
|
|
924
934
|
return n().createElement(re, m, n().createElement(Q, {
|
|
925
935
|
appearance: p ? "secondary" : "pill",
|
|
@@ -927,7 +937,7 @@
|
|
|
927
937
|
inline: false,
|
|
928
938
|
onClick: i.handleVisibilityToggle,
|
|
929
939
|
type: "button",
|
|
930
|
-
icon:
|
|
940
|
+
icon: v
|
|
931
941
|
}));
|
|
932
942
|
}
|
|
933
943
|
var b = i.context;
|
|
@@ -954,7 +964,7 @@
|
|
|
954
964
|
icon: u ? n().createElement(y(), {
|
|
955
965
|
size: 1,
|
|
956
966
|
screenReaderText: x
|
|
957
|
-
}) : n().createElement(
|
|
967
|
+
}) : n().createElement(h(), {
|
|
958
968
|
"aria-label": x
|
|
959
969
|
}),
|
|
960
970
|
onClick: i.handleClear
|
|
@@ -979,7 +989,7 @@
|
|
|
979
989
|
icon: u ? n().createElement(y(), {
|
|
980
990
|
inline: false,
|
|
981
991
|
screenReaderText: x
|
|
982
|
-
}) : n().createElement(
|
|
992
|
+
}) : n().createElement(h(), {
|
|
983
993
|
"aria-label": x,
|
|
984
994
|
height: f,
|
|
985
995
|
inline: false,
|
|
@@ -1077,13 +1087,13 @@
|
|
|
1077
1087
|
}, {
|
|
1078
1088
|
key: "render",
|
|
1079
1089
|
value: function e() {
|
|
1080
|
-
var t = this.props, r = t.append, i = t.autoCapitalize, a = t.autoComplete, o = t.autoCorrect, l = t.autoFocus, s = t.children, p = t.className, u = t.classNamePrivate, m = t.disabled,
|
|
1090
|
+
var t = this.props, r = t.append, i = t.autoCapitalize, a = t.autoComplete, o = t.autoCorrect, l = t.autoFocus, s = t.children, p = t.className, u = t.classNamePrivate, m = t.disabled, v = t.describedBy, h = t.elementRef, b = t.error, y = t.inline, C = t.inputClassName, g = t.inputId, x = t.labelledBy, w = t.multiline, k = t.maxLength, S = t.name, A = t.passwordVisibilityToggle, T = t.placeholder, I = t.prepend, j = t.required, M = t.spellCheck, R = t.tabIndex, P = t.title, $ = t.type, _ = t.useSyntheticPlaceholder, B = me(t, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "multiline", "maxLength", "name", "passwordVisibilityToggle", "placeholder", "prepend", "required", "spellCheck", "tabIndex", "title", "type", "useSyntheticPlaceholder" ]);
|
|
1081
1091
|
var D = fe(fe({
|
|
1082
1092
|
role: "textbox"
|
|
1083
1093
|
}, f()(B, (function(e, t) {
|
|
1084
1094
|
return t === "role" || t.indexOf("aria-") === 0;
|
|
1085
1095
|
}))), {}, {
|
|
1086
|
-
"aria-describedby":
|
|
1096
|
+
"aria-describedby": v,
|
|
1087
1097
|
"aria-labelledby": x,
|
|
1088
1098
|
"aria-invalid": b || undefined
|
|
1089
1099
|
});
|
|
@@ -1143,7 +1153,7 @@
|
|
|
1143
1153
|
className: (0, O.toClassName)(p, u),
|
|
1144
1154
|
"data-test": "text",
|
|
1145
1155
|
"data-test-value": H,
|
|
1146
|
-
elementRef:
|
|
1156
|
+
elementRef: h,
|
|
1147
1157
|
flex: true,
|
|
1148
1158
|
inline: y
|
|
1149
1159
|
}, N), this.renderStartAdornment(), n().createElement(U, ae({
|
package/TextArea.js
CHANGED
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
var f = e.n(u);
|
|
84
84
|
// CONCATENATED MODULE: external "lodash/omit"
|
|
85
85
|
const h = require("lodash/omit");
|
|
86
|
-
var
|
|
86
|
+
var v = e.n(h);
|
|
87
87
|
// CONCATENATED MODULE: external "lodash/pickBy"
|
|
88
|
-
const
|
|
89
|
-
var b = e.n(
|
|
88
|
+
const m = require("lodash/pickBy");
|
|
89
|
+
var b = e.n(m);
|
|
90
90
|
// CONCATENATED MODULE: external "lodash/throttle"
|
|
91
91
|
const y = require("lodash/throttle");
|
|
92
92
|
var g = e.n(y);
|
|
@@ -609,12 +609,12 @@
|
|
|
609
609
|
Object.defineProperty(e, n.key, n);
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function ve(e, t, r) {
|
|
613
613
|
if (t) he(e.prototype, t);
|
|
614
614
|
if (r) he(e, r);
|
|
615
615
|
return e;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function me(e, t) {
|
|
618
618
|
if (typeof t !== "function" && t !== null) {
|
|
619
619
|
throw new TypeError("Super expression must either be null or a function");
|
|
620
620
|
}
|
|
@@ -748,9 +748,9 @@
|
|
|
748
748
|
tabIndex: 0
|
|
749
749
|
};
|
|
750
750
|
/** Note: TextArea places role and aria props onto the input. All other props are placed on the wrapper. */ var Oe = function(e) {
|
|
751
|
-
|
|
751
|
+
me(r, e);
|
|
752
752
|
var t = ye(r);
|
|
753
|
-
|
|
753
|
+
ve(r, null, [ {
|
|
754
754
|
key: "validateRows",
|
|
755
755
|
// @docs-props-type TextAreaPropsBase
|
|
756
756
|
value: function e(t) {
|
|
@@ -818,11 +818,21 @@
|
|
|
818
818
|
}));
|
|
819
819
|
ke(xe(a), "handleInputFocus", (function(e) {
|
|
820
820
|
var t, r;
|
|
821
|
-
|
|
821
|
+
var n = e.target.value;
|
|
822
|
+
var i = a.props.name;
|
|
823
|
+
(t = (r = a.props).onFocus) === null || t === void 0 ? void 0 : t.call(r, e, {
|
|
824
|
+
value: n,
|
|
825
|
+
name: i
|
|
826
|
+
});
|
|
822
827
|
}));
|
|
823
828
|
ke(xe(a), "handleInputBlur", (function(e) {
|
|
824
829
|
var t, r;
|
|
825
|
-
|
|
830
|
+
var n = e.target.value;
|
|
831
|
+
var i = a.props.name;
|
|
832
|
+
(t = (r = a.props).onBlur) === null || t === void 0 ? void 0 : t.call(r, e, {
|
|
833
|
+
value: n,
|
|
834
|
+
name: i
|
|
835
|
+
});
|
|
826
836
|
}));
|
|
827
837
|
ke(xe(a), "handleClear", (function(e) {
|
|
828
838
|
var t, r;
|
|
@@ -870,8 +880,8 @@
|
|
|
870
880
|
return n().createElement(Y, f, i);
|
|
871
881
|
}
|
|
872
882
|
var h = a.context;
|
|
873
|
-
var
|
|
874
|
-
var
|
|
883
|
+
var v = (e = h.labelAttrs) === null || e === void 0 ? void 0 : e.text;
|
|
884
|
+
var m = v ? (0, M._)("Clear ".concat(v, " text field")) : (0, M._)("Clear text field");
|
|
875
885
|
if (!c && r === "search") {
|
|
876
886
|
|
|
877
887
|
return n().createElement(Y, f, n().createElement(F, {
|
|
@@ -880,7 +890,7 @@
|
|
|
880
890
|
inline: false,
|
|
881
891
|
icon: n().createElement(S(), {
|
|
882
892
|
size: 1,
|
|
883
|
-
screenReaderText:
|
|
893
|
+
screenReaderText: m
|
|
884
894
|
}),
|
|
885
895
|
onClick: a.handleClear
|
|
886
896
|
}), n().createElement(H, {
|
|
@@ -903,7 +913,7 @@
|
|
|
903
913
|
appearance: "secondary",
|
|
904
914
|
onClick: a.handleClear,
|
|
905
915
|
icon: n().createElement(C(), {
|
|
906
|
-
"aria-label":
|
|
916
|
+
"aria-label": m,
|
|
907
917
|
inline: false,
|
|
908
918
|
width: u,
|
|
909
919
|
height: u
|
|
@@ -954,7 +964,7 @@
|
|
|
954
964
|
a.handleResize = g()(a.handleResize, 100);
|
|
955
965
|
return a;
|
|
956
966
|
}
|
|
957
|
-
|
|
967
|
+
ve(r, [ {
|
|
958
968
|
key: "componentDidMount",
|
|
959
969
|
value: function e() {
|
|
960
970
|
l()(this.syncHeightWithShadow);
|
|
@@ -999,16 +1009,16 @@
|
|
|
999
1009
|
key: "render",
|
|
1000
1010
|
value: function e() {
|
|
1001
1011
|
var t = this;
|
|
1002
|
-
var r = this.props, a = r.append, i = r.autoCapitalize, o = r.autoComplete, l = r.autoCorrect, s = r.autoFocus, c = r.children, p = r.className, u = r.classNamePrivate, h = r.disabled,
|
|
1012
|
+
var r = this.props, a = r.append, i = r.autoCapitalize, o = r.autoComplete, l = r.autoCorrect, s = r.autoFocus, c = r.children, p = r.className, u = r.classNamePrivate, h = r.disabled, m = r.describedBy, y = r.elementRef, g = r.error, x = r.inline, w = r.inputClassName, C = r.inputId, k = r.labelledBy, S = r.maxLength, A = r.name, O = r.placeholder, I = r.prepend, j = r.required, P = r.spellCheck, _ = r.tabIndex, M = r.title, $ = de(r, [ "append", "autoCapitalize", "autoComplete", "autoCorrect", "autoFocus", "children", "className", "classNamePrivate", "disabled", "describedBy", "elementRef", "error", "inline", "inputClassName", "inputId", "labelledBy", "maxLength", "name", "placeholder", "prepend", "required", "spellCheck", "tabIndex", "title" ]);
|
|
1003
1013
|
var D = pe(pe({}, b()($, (function(e, t) {
|
|
1004
1014
|
return t === "role" || t.indexOf("aria-") === 0;
|
|
1005
1015
|
}))), {}, {
|
|
1006
|
-
"aria-describedby":
|
|
1016
|
+
"aria-describedby": m,
|
|
1007
1017
|
"aria-labelledby": k,
|
|
1008
1018
|
"aria-invalid": g || undefined,
|
|
1009
1019
|
"aria-multiline": true
|
|
1010
1020
|
});
|
|
1011
|
-
var N =
|
|
1021
|
+
var N = v()($, [ "inputRef", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onInputClick", "rowsMax", "rowsMin" ].concat(ne(d()(D))));
|
|
1012
1022
|
var R = this.getDisplayValue();
|
|
1013
1023
|
var q = {
|
|
1014
1024
|
className: (0, T.toClassName)(p, w),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splunk/react-ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.1",
|
|
4
4
|
"description": "Library of React components that implement the Splunk design language",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Splunk Inc.",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@dnd-kit/core": "6.0.8",
|
|
42
42
|
"@dnd-kit/sortable": "7.0.2",
|
|
43
43
|
"@dnd-kit/utilities": "3.2.1",
|
|
44
|
-
"@splunk/react-icons": "^4.0
|
|
44
|
+
"@splunk/react-icons": "^4.1.0",
|
|
45
45
|
"@splunk/themes": "^0.16.3",
|
|
46
46
|
"@splunk/ui-utils": "^1.6.0",
|
|
47
47
|
"@types/commonmark": "^0.27.6",
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"@splunk/babel-preset": "^4.0.0",
|
|
69
69
|
"@splunk/docs-gen": "1.0.0-beta.8",
|
|
70
70
|
"@splunk/eslint-config": "^4.0.0",
|
|
71
|
-
"@splunk/react-docs": "1.0.0-beta.
|
|
71
|
+
"@splunk/react-docs": "1.0.0-beta.9",
|
|
72
72
|
"@splunk/stylelint-config": "^4.0.0",
|
|
73
73
|
"@splunk/test-runner-utils": "^0.4.1",
|
|
74
|
-
"@splunk/webpack-configs": "^7.0.
|
|
74
|
+
"@splunk/webpack-configs": "^7.0.2",
|
|
75
75
|
"@storybook/addon-a11y": "^6.5.9",
|
|
76
76
|
"@storybook/addon-essentials": "^6.5.9",
|
|
77
77
|
"@storybook/addon-interactions": "^6.5.9",
|
|
@@ -142,6 +142,6 @@
|
|
|
142
142
|
"webpack-merge": "^5.9.0"
|
|
143
143
|
},
|
|
144
144
|
"engines": {
|
|
145
|
-
"node": ">=
|
|
145
|
+
"node": ">=14"
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -85,7 +85,6 @@ declare class Color extends Component<ColorProps, ColorState> {
|
|
|
85
85
|
static hasTransparent(palette: (string | null)[]): boolean;
|
|
86
86
|
constructor(props: Readonly<ColorProps>);
|
|
87
87
|
componentDidUpdate(prevProps: Readonly<ColorProps>): void;
|
|
88
|
-
private showNull;
|
|
89
88
|
/**
|
|
90
89
|
* Standardizes the current value of the Color:
|
|
91
90
|
* returns based on the input being controlled or uncontrolled
|
|
@@ -9,6 +9,16 @@ declare type ComboBoxChangeHandler = (event: React.ChangeEvent<HTMLInputElement
|
|
|
9
9
|
}) => void;
|
|
10
10
|
/** @public */
|
|
11
11
|
declare type ComboBoxScrollBottomHandler = (event: React.UIEvent<HTMLDivElement> | React.KeyboardEvent<HTMLInputElement> | null) => void;
|
|
12
|
+
/** @public */
|
|
13
|
+
declare type ComboBoxBlurHandler = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>, data: {
|
|
14
|
+
name?: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}) => void;
|
|
17
|
+
/** @public */
|
|
18
|
+
declare type ComboBoxFocusHandler = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>, data: {
|
|
19
|
+
name?: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}) => void;
|
|
12
22
|
interface ComboBoxPropsBase {
|
|
13
23
|
animateLoading?: boolean;
|
|
14
24
|
/** Append removes rounded borders and border from the right side. */
|
|
@@ -68,9 +78,9 @@ interface ComboBoxPropsBase {
|
|
|
68
78
|
* for example: "No matching dashboards". You can insert content such as an error message or
|
|
69
79
|
* communicate a minimum number of characters to enter to see results. */
|
|
70
80
|
noOptionsMessage?: React.ReactNode;
|
|
71
|
-
onBlur?:
|
|
81
|
+
onBlur?: ComboBoxBlurHandler;
|
|
72
82
|
onChange?: ComboBoxChangeHandler;
|
|
73
|
-
onFocus?:
|
|
83
|
+
onFocus?: ComboBoxFocusHandler;
|
|
74
84
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
75
85
|
onSelect?: React.ReactEventHandler<HTMLInputElement>;
|
|
76
86
|
/**
|
|
@@ -165,4 +175,4 @@ declare class ComboBox extends Component<ComboBoxProps, ComboBoxState> {
|
|
|
165
175
|
render(): JSX.Element;
|
|
166
176
|
}
|
|
167
177
|
export default ComboBox;
|
|
168
|
-
export { ComboBoxChangeHandler, Option, Divider, Heading };
|
|
178
|
+
export { ComboBoxBlurHandler, ComboBoxChangeHandler, ComboBoxFocusHandler, Option, Divider, Heading, };
|
package/types/src/Date/Date.d.ts
CHANGED
|
@@ -7,6 +7,16 @@ declare type DateChangeHandler = (event: React.MouseEvent<HTMLButtonElement | HT
|
|
|
7
7
|
name?: string;
|
|
8
8
|
value: string;
|
|
9
9
|
}) => void;
|
|
10
|
+
/** @public */
|
|
11
|
+
declare type DateBlurHandler = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>, data: {
|
|
12
|
+
name?: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
/** @public */
|
|
16
|
+
declare type DateFocusHandler = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>, data: {
|
|
17
|
+
name?: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}) => void;
|
|
10
20
|
interface DatePropsBase {
|
|
11
21
|
/** Default date to display. Set this instead of value to make the Date uncontrolled. */
|
|
12
22
|
defaultValue?: string;
|
|
@@ -50,14 +60,14 @@ interface DatePropsBase {
|
|
|
50
60
|
* control when multiple controls share an onChange callback. */
|
|
51
61
|
name?: string;
|
|
52
62
|
/** A callback for when the input loses focus. */
|
|
53
|
-
onBlur?:
|
|
63
|
+
onBlur?: DateBlurHandler;
|
|
54
64
|
/**
|
|
55
65
|
* Return event and data object with date string (in YYYY-MM-DD format) when a date is
|
|
56
66
|
* selected.
|
|
57
67
|
*/
|
|
58
68
|
onChange?: DateChangeHandler;
|
|
59
69
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
60
|
-
onFocus?:
|
|
70
|
+
onFocus?: DateFocusHandler;
|
|
61
71
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
62
72
|
/** @private */
|
|
63
73
|
splunkTheme: AnyTheme;
|
|
@@ -140,5 +150,5 @@ declare const DateWithTheme: React.ForwardRefExoticComponent<Pick<Pick<Pick<Date
|
|
|
140
150
|
};
|
|
141
151
|
export default DateWithTheme;
|
|
142
152
|
export { Date as DateWithoutTheme };
|
|
143
|
-
export { DateChangeHandler };
|
|
153
|
+
export { DateBlurHandler, DateChangeHandler, DateFocusHandler };
|
|
144
154
|
export type { DatePropsBase, DatePropsBaseControlled, DatePropsBaseUncontrolled };
|
package/types/src/List/List.d.ts
CHANGED
|
@@ -18,17 +18,23 @@ interface ListPropsBase {
|
|
|
18
18
|
*/
|
|
19
19
|
type?: 'disc' | 'decimal' | 'lower-alpha' | 'upper-alpha';
|
|
20
20
|
}
|
|
21
|
+
declare const defaultProps: Required<Pick<ListPropsBase, 'type'>>;
|
|
21
22
|
interface ListOrderedPropsBase extends ListPropsBase {
|
|
22
23
|
elementRef?: React.Ref<HTMLOListElement>;
|
|
23
|
-
ordered
|
|
24
|
-
type
|
|
24
|
+
ordered: true;
|
|
25
|
+
type?: never;
|
|
26
|
+
}
|
|
27
|
+
interface ListOrderedTypePropsBase extends ListPropsBase {
|
|
28
|
+
elementRef?: React.Ref<HTMLOListElement>;
|
|
29
|
+
ordered?: never;
|
|
30
|
+
type?: 'decimal' | 'lower-alpha' | 'upper-alpha';
|
|
25
31
|
}
|
|
26
32
|
interface ListUnorderedPropsBase extends ListPropsBase {
|
|
27
33
|
elementRef?: React.Ref<HTMLUListElement>;
|
|
28
34
|
type?: 'disc';
|
|
29
35
|
}
|
|
30
|
-
declare type ListOrderedProps = ComponentProps<ListOrderedPropsBase, 'ol'
|
|
31
|
-
declare type ListUnorderedProps = ComponentProps<ListUnorderedPropsBase, 'ul'
|
|
36
|
+
declare type ListOrderedProps = ComponentProps<ListOrderedPropsBase | ListOrderedTypePropsBase, 'ol'> & typeof defaultProps;
|
|
37
|
+
declare type ListUnorderedProps = ComponentProps<ListUnorderedPropsBase, 'ul'> & typeof defaultProps;
|
|
32
38
|
declare type ListProps = ListOrderedProps | ListUnorderedProps;
|
|
33
39
|
declare function List({ children, elementRef, type, ordered, ...otherProps }: ListProps): JSX.Element;
|
|
34
40
|
declare namespace List {
|
|
@@ -38,6 +44,7 @@ declare namespace List {
|
|
|
38
44
|
ordered: PropTypes.Requireable<boolean>;
|
|
39
45
|
type: PropTypes.Requireable<string>;
|
|
40
46
|
};
|
|
47
|
+
var defaultProps: Required<Pick<ListPropsBase, "type">>;
|
|
41
48
|
var Item: typeof import("./Item").default;
|
|
42
49
|
}
|
|
43
50
|
export default List;
|
|
@@ -8,6 +8,16 @@ declare type NumberChangeHandler = (event: React.ChangeEvent<HTMLInputElement |
|
|
|
8
8
|
name?: string;
|
|
9
9
|
value?: number;
|
|
10
10
|
}) => void;
|
|
11
|
+
/** @public */
|
|
12
|
+
declare type NumberBlurHandler = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>, data: {
|
|
13
|
+
name?: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}) => void;
|
|
16
|
+
/** @public */
|
|
17
|
+
declare type NumberFocusHandler = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>, data: {
|
|
18
|
+
name?: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}) => void;
|
|
11
21
|
interface NumberPropsBase {
|
|
12
22
|
/** Append removes the rounded borders and the border from the right side and moves the
|
|
13
23
|
* increment and decrement buttons to the left. */
|
|
@@ -65,7 +75,7 @@ interface NumberPropsBase {
|
|
|
65
75
|
* control when multiple controls share an onChange callback. */
|
|
66
76
|
name?: string;
|
|
67
77
|
/** A callback for when the input loses focus. */
|
|
68
|
-
onBlur?:
|
|
78
|
+
onBlur?: NumberBlurHandler;
|
|
69
79
|
/**
|
|
70
80
|
* This is equivalent to onInput which is called on keydown, paste, and so on.
|
|
71
81
|
* If value is set, this callback is required. This must set the value prop to retain the
|
|
@@ -73,7 +83,7 @@ interface NumberPropsBase {
|
|
|
73
83
|
*/
|
|
74
84
|
onChange?: NumberChangeHandler;
|
|
75
85
|
/** A callback for when the input takes focus. */
|
|
76
|
-
onFocus?:
|
|
86
|
+
onFocus?: NumberFocusHandler;
|
|
77
87
|
/** A keydown callback can be used to prevent a certain input by utilizing the event argument. */
|
|
78
88
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
79
89
|
/** A keyup callback. */
|
|
@@ -159,5 +169,5 @@ declare const NumberWithTheme: React.ForwardRefExoticComponent<Pick<Pick<Pick<Nu
|
|
|
159
169
|
}, "ref" | "slot" | "style" | "title" | "children" | "value" | "onChange" | "onPause" | "name" | "className" | "color" | "id" | "lang" | "max" | "min" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "disabled" | "step" | "inline" | "elementRef" | "error" | "inputId" | "append" | "prepend" | "inputRef" | "labelledBy" | "locale" | "describedBy" | "useSyntheticPlaceholder" | "hideStepButtons" | "roundTo">>;
|
|
160
170
|
export default NumberWithTheme;
|
|
161
171
|
export type { Number as NumberWithoutTheme };
|
|
162
|
-
export { NumberChangeHandler };
|
|
172
|
+
export { NumberBlurHandler, NumberChangeHandler, NumberFocusHandler };
|
|
163
173
|
export type { NumberPropsBase, NumberPropsBaseControlled, NumberPropsBaseUncontrolled };
|
|
@@ -85,6 +85,7 @@ declare class RadioBar extends Component<RadioBarProps, RadioBarState> {
|
|
|
85
85
|
componentDidUpdate(prevProps: Readonly<RadioBarProps>): void;
|
|
86
86
|
private handleClick;
|
|
87
87
|
private isControlled;
|
|
88
|
+
private getNextTarget;
|
|
88
89
|
private handleOnKeyDown;
|
|
89
90
|
private handleOnChange;
|
|
90
91
|
render(): JSX.Element;
|
|
@@ -15,7 +15,6 @@ interface ResultsMenuPropsBase {
|
|
|
15
15
|
elementRef?: React.Ref<HTMLDivElement>;
|
|
16
16
|
isLoading?: boolean;
|
|
17
17
|
loadingMessage?: React.ReactNode;
|
|
18
|
-
maxHeight?: number;
|
|
19
18
|
noOptionsMessage?: React.ReactNode;
|
|
20
19
|
onScroll?: React.UIEventHandler<Element>;
|
|
21
20
|
/**
|
|
@@ -35,7 +34,6 @@ interface ResultsMenuState {
|
|
|
35
34
|
childrenCount?: number;
|
|
36
35
|
containerEl: HTMLDivElement | null;
|
|
37
36
|
menuEl: HTMLDivElement | null;
|
|
38
|
-
menuMaxHeight?: number;
|
|
39
37
|
numberOfItemsLoaded: number;
|
|
40
38
|
windowTop: number;
|
|
41
39
|
scrollBottomTriggered: boolean;
|
|
@@ -7,6 +7,16 @@ declare type SearchChangeHandler = (event: React.ChangeEvent<HTMLInputElement |
|
|
|
7
7
|
name?: string;
|
|
8
8
|
value: string;
|
|
9
9
|
}) => void;
|
|
10
|
+
/** @public */
|
|
11
|
+
declare type SearchBlurHandler = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>, data: {
|
|
12
|
+
name?: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
/** @public */
|
|
16
|
+
declare type SearchFocusHandler = (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>, data: {
|
|
17
|
+
name?: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}) => void;
|
|
10
20
|
interface SearchPropsBase {
|
|
11
21
|
animateLoading?: boolean;
|
|
12
22
|
/** All children must be instances of `Search.Option`. */
|
|
@@ -59,9 +69,9 @@ interface SearchPropsBase {
|
|
|
59
69
|
* for example: "No matching dashboards". You can insert content such as an error message or
|
|
60
70
|
* communicate a minimum number of characters to enter to see results. */
|
|
61
71
|
noOptionsMessage?: React.ReactNode;
|
|
62
|
-
onBlur?:
|
|
72
|
+
onBlur?: SearchBlurHandler;
|
|
63
73
|
onChange?: SearchChangeHandler;
|
|
64
|
-
onFocus?:
|
|
74
|
+
onFocus?: SearchFocusHandler;
|
|
65
75
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
66
76
|
/**
|
|
67
77
|
* A callback function invoked when the menu is scrolled.
|
|
@@ -98,4 +108,4 @@ declare namespace Search {
|
|
|
98
108
|
var Heading: typeof import("../Menu/Heading").default;
|
|
99
109
|
}
|
|
100
110
|
export default Search;
|
|
101
|
-
export { SearchChangeHandler, Option, Divider, Heading, SearchProps, SearchPropsBase, SearchPropsBaseControlled, SearchPropsBaseUncontrolled, };
|
|
111
|
+
export { SearchBlurHandler, SearchChangeHandler, SearchFocusHandler, Option, Divider, Heading, SearchProps, SearchPropsBase, SearchPropsBaseControlled, SearchPropsBaseUncontrolled, };
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { SelectChangeHandler } from '@splunk/react-ui/Select';
|
|
3
|
-
declare class Icons extends Component<{}, {
|
|
4
|
-
value: string | number | boolean;
|
|
5
|
-
}> {
|
|
6
|
-
constructor(props: {});
|
|
7
|
-
handleChange: SelectChangeHandler;
|
|
8
|
-
render(): JSX.Element;
|
|
9
|
-
}
|
|
1
|
+
declare function Icons(): JSX.Element;
|
|
10
2
|
export default Icons;
|