@splunk/react-ui 4.28.1 → 4.29.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/CHANGELOG.md +21 -0
- package/Chip.js +160 -151
- package/ComboBox.js +1 -1
- package/MIGRATION.mdx +90 -0
- package/Modal.js +9 -3
- package/ModalLayer.js +84 -84
- package/Multiselect.js +43 -42
- package/Paginator.js +291 -402
- package/SidePanel.js +29 -28
- package/Table.js +369 -341
- package/WaitSpinner.js +36 -35
- package/package.json +2 -2
- package/types/src/Chip/docs/examples/RemovableWithNonStringChildren.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/MessageBar/docs/examples/Basic.d.ts +2 -0
- package/types/src/Modal/Modal.d.ts +8 -3
- package/types/src/ModalLayer/ModalLayer.d.ts +14 -14
- package/types/src/Paginator/Button.d.ts +14 -9
- package/types/src/SidePanel/SidePanel.d.ts +2 -2
- package/types/src/WaitSpinner/WaitSpinner.d.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
4.29.0 - April 2, 2024
|
|
5
|
+
----------
|
|
6
|
+
Bug Fixes:
|
|
7
|
+
* Removable `Chip` screen reader announcement has been improved (SUI-5948).
|
|
8
|
+
* `ComboBox` no longer incorrectly sets the `aria-activedescendant` attribute when closed (SUI-6108).
|
|
9
|
+
* `Multiselect` no longer announces incorrect available actions to screen readers (SUI-6009).
|
|
10
|
+
|
|
11
|
+
Docs:
|
|
12
|
+
`MessageBar` examples updated to demonstrate method for labelling the component to meet WAI-ARIA specification (SUI-5941).
|
|
13
|
+
|
|
14
|
+
Deprecations:
|
|
15
|
+
* `WaitSpinner`'s `children` prop has been deprecated and will be removed in the next major version (SUI-6081).
|
|
16
|
+
|
|
17
|
+
4.28.2 - March 22, 2024
|
|
18
|
+
----------
|
|
19
|
+
Bug Fixes:
|
|
20
|
+
* `Table.Row` no longer ignores provided `style` properties (SUI-6156).
|
|
21
|
+
|
|
22
|
+
Typescript:
|
|
23
|
+
* `WaitSpinner`'s `screenReaderText` type includes `null` now (SUI-6081).
|
|
24
|
+
|
|
4
25
|
4.28.1 - March 21, 2024
|
|
5
26
|
----------
|
|
6
27
|
Bug Fixes:
|
package/Chip.js
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
e.r(r);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(r, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ G
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const a = require("react");
|
|
@@ -82,39 +82,44 @@
|
|
|
82
82
|
const d = require("@splunk/ui-utils/i18n");
|
|
83
83
|
// CONCATENATED MODULE: external "@splunk/ui-utils/color"
|
|
84
84
|
const f = require("@splunk/ui-utils/color");
|
|
85
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/format"
|
|
86
|
+
const v = require("@splunk/ui-utils/format");
|
|
85
87
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
86
|
-
const
|
|
88
|
+
const b = require("@splunk/themes");
|
|
89
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
90
|
+
const g = require("@splunk/react-ui/ScreenReaderContent");
|
|
91
|
+
var m = e.n(g);
|
|
87
92
|
// CONCATENATED MODULE: external "styled-components"
|
|
88
|
-
const
|
|
89
|
-
var
|
|
93
|
+
const h = require("styled-components");
|
|
94
|
+
var C = e.n(h);
|
|
90
95
|
// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
91
|
-
const
|
|
92
|
-
var
|
|
96
|
+
const y = require("@splunk/react-ui/Clickable");
|
|
97
|
+
var x = e.n(y);
|
|
93
98
|
// CONCATENATED MODULE: ./src/Chip/ChipStyles.ts
|
|
94
|
-
var
|
|
99
|
+
var $ = C().div.withConfig({
|
|
95
100
|
displayName: "ChipStyles__StyledBasic",
|
|
96
101
|
componentId: "sc-1sd3tsh-0"
|
|
97
|
-
})([ "", ";background-color:", ";border:1px solid transparent;flex:0 1 auto;max-width:calc(100% - 3px);border-radius:2px;", ";", " ", " ", "" ],
|
|
98
|
-
|
|
102
|
+
})([ "", ";background-color:", ";border:1px solid transparent;flex:0 1 auto;max-width:calc(100% - 3px);border-radius:2px;", ";", " ", " ", "" ], b.mixins.reset("inline-flex"), (0,
|
|
103
|
+
b.pickVariant)("$appearance", {
|
|
99
104
|
default: {
|
|
100
105
|
enterprise: {
|
|
101
|
-
dark:
|
|
102
|
-
light:
|
|
106
|
+
dark: b.variables.gray45,
|
|
107
|
+
light: b.variables.gray92
|
|
103
108
|
},
|
|
104
|
-
prisma:
|
|
109
|
+
prisma: b.variables.neutral100
|
|
105
110
|
},
|
|
106
111
|
info: {
|
|
107
|
-
enterprise:
|
|
112
|
+
enterprise: b.variables.infoColorL30
|
|
108
113
|
},
|
|
109
114
|
success: {
|
|
110
|
-
enterprise:
|
|
115
|
+
enterprise: b.variables.successColorL30
|
|
111
116
|
},
|
|
112
117
|
warning: {
|
|
113
|
-
enterprise:
|
|
118
|
+
enterprise: b.variables.warningColorL30
|
|
114
119
|
},
|
|
115
120
|
error: {
|
|
116
|
-
enterprise:
|
|
117
|
-
prisma:
|
|
121
|
+
enterprise: b.variables.errorColorL30,
|
|
122
|
+
prisma: b.variables.accentColorNegative
|
|
118
123
|
},
|
|
119
124
|
outline: {
|
|
120
125
|
prisma: "transparent"
|
|
@@ -125,196 +130,196 @@
|
|
|
125
130
|
}
|
|
126
131
|
}), (function(e) {
|
|
127
132
|
var r = e.$appearance;
|
|
128
|
-
return r === "outline" && (0,
|
|
129
|
-
}), (0,
|
|
130
|
-
enterprise: (0,
|
|
131
|
-
prisma: (0,
|
|
133
|
+
return r === "outline" && (0, h.css)([ "border-color:", ";" ], b.variables.interactiveColorBorder);
|
|
134
|
+
}), (0, b.pick)({
|
|
135
|
+
enterprise: (0, h.css)([ "color:", ";line-height:", ";margin:0 2px 2px 0;" ], b.variables.textGray, b.variables.lineHeight),
|
|
136
|
+
prisma: (0, h.css)([ "color:", ";line-height:16px;margin:1px;" ], (function(e) {
|
|
132
137
|
var r = e.$appearance;
|
|
133
|
-
return r === "error" ?
|
|
138
|
+
return r === "error" ? b.variables.contentColorInverted : b.variables.contentColorDefault;
|
|
134
139
|
}))
|
|
135
|
-
}), (0,
|
|
140
|
+
}), (0, b.pick)({
|
|
136
141
|
enterprise: {
|
|
137
|
-
comfortable: (0,
|
|
138
|
-
compact: (0,
|
|
142
|
+
comfortable: (0, h.css)([ "height:calc(", " - 6px);padding:4px 7px;" ], b.variables.inputHeight),
|
|
143
|
+
compact: (0, h.css)([ "height:calc(", " - 6px);padding:2px 4px;" ], b.variables.inputHeight)
|
|
139
144
|
},
|
|
140
145
|
prisma: {
|
|
141
|
-
comfortable: (0,
|
|
142
|
-
compact: (0,
|
|
146
|
+
comfortable: (0, h.css)([ "height:calc(", " - 8px);padding:7px 7px;font-size:", ";" ], b.variables.inputHeight, b.variables.fontSizeSmall),
|
|
147
|
+
compact: (0, h.css)([ "height:calc(", " - 8px);padding:3px 7px;font-size:", ";" ], b.variables.inputHeight, b.variables.fontSizeSmall)
|
|
143
148
|
}
|
|
144
149
|
}), (function(e) {
|
|
145
150
|
var r = e.$disabled;
|
|
146
|
-
return r && (0,
|
|
151
|
+
return r && (0, h.css)([ "background-color:", ";" ], (0, b.pickVariant)("$appearance", {
|
|
147
152
|
default: {
|
|
148
153
|
enterprise: {
|
|
149
154
|
dark: "rgba(0, 0, 0, 0.15)",
|
|
150
155
|
light: "rgba(0, 0, 0, 0.05)"
|
|
151
156
|
},
|
|
152
|
-
prisma:
|
|
157
|
+
prisma: b.variables.interactiveColorBackgroundDisabled
|
|
153
158
|
},
|
|
154
159
|
info: {
|
|
155
|
-
enterprise:
|
|
160
|
+
enterprise: b.mixins.colorWithAlpha(b.variables.infoColorL10, .3)
|
|
156
161
|
},
|
|
157
162
|
success: {
|
|
158
|
-
enterprise:
|
|
163
|
+
enterprise: b.mixins.colorWithAlpha(b.variables.successColorL10, .3)
|
|
159
164
|
},
|
|
160
165
|
warning: {
|
|
161
|
-
enterprise:
|
|
166
|
+
enterprise: b.mixins.colorWithAlpha(b.variables.warningColorL10, .3)
|
|
162
167
|
},
|
|
163
168
|
error: {
|
|
164
|
-
enterprise:
|
|
165
|
-
prisma:
|
|
169
|
+
enterprise: b.mixins.colorWithAlpha(b.variables.errorColorL10, .3),
|
|
170
|
+
prisma: b.variables.interactiveColorBackgroundDisabled
|
|
166
171
|
},
|
|
167
172
|
outline: {
|
|
168
|
-
prisma:
|
|
173
|
+
prisma: b.variables.interactiveColorBackgroundDisabled
|
|
169
174
|
},
|
|
170
175
|
custom: {
|
|
171
176
|
enterprise: {
|
|
172
177
|
dark: "rgba(0, 0, 0, 0.15)",
|
|
173
178
|
light: "rgba(0, 0, 0, 0.05)"
|
|
174
179
|
},
|
|
175
|
-
prisma:
|
|
180
|
+
prisma: b.variables.interactiveColorBackgroundDisabled
|
|
176
181
|
}
|
|
177
182
|
}));
|
|
178
183
|
}));
|
|
179
|
-
var
|
|
184
|
+
var k = C()($).withConfig({
|
|
180
185
|
displayName: "ChipStyles__Styled",
|
|
181
186
|
componentId: "sc-1sd3tsh-1"
|
|
182
187
|
})([ "align-items:center;" ]);
|
|
183
|
-
var
|
|
188
|
+
var S = C().div.withConfig({
|
|
184
189
|
displayName: "ChipStyles__StyledInner",
|
|
185
190
|
componentId: "sc-1sd3tsh-2"
|
|
186
|
-
})([ "", ";" ], (0,
|
|
187
|
-
enterprise: (0,
|
|
188
|
-
prisma: (0,
|
|
189
|
-
|
|
191
|
+
})([ "", ";" ], (0, b.pick)({
|
|
192
|
+
enterprise: (0, h.css)([ "display:flex;max-width:100%;" ]),
|
|
193
|
+
prisma: (0, h.css)([ "display:grid;max-width:100%;height:16px;column-gap:", ";", ";" ], (0,
|
|
194
|
+
b.pick)({
|
|
190
195
|
prisma: {
|
|
191
|
-
compact:
|
|
192
|
-
comfortable:
|
|
196
|
+
compact: b.variables.spacingXSmall,
|
|
197
|
+
comfortable: b.variables.spacingSmall
|
|
193
198
|
}
|
|
194
199
|
}), (function(e) {
|
|
195
200
|
var r = e.$icon, a = e.$removable;
|
|
196
|
-
var o = (0,
|
|
201
|
+
var o = (0, h.css)([ "grid-template-columns:1fr;" ]);
|
|
197
202
|
if (r && a) {
|
|
198
|
-
o = (0,
|
|
203
|
+
o = (0, h.css)([ "grid-template-columns:0fr 1fr 0fr;" ]);
|
|
199
204
|
} else if (r) {
|
|
200
|
-
o = (0,
|
|
205
|
+
o = (0, h.css)([ "grid-template-columns:0fr 1fr;" ]);
|
|
201
206
|
} else if (a) {
|
|
202
|
-
o = (0,
|
|
207
|
+
o = (0, h.css)([ "grid-template-columns:1fr 0fr;" ]);
|
|
203
208
|
}
|
|
204
209
|
return o;
|
|
205
210
|
}))
|
|
206
211
|
}));
|
|
207
|
-
var
|
|
212
|
+
var w = C().div.withConfig({
|
|
208
213
|
displayName: "ChipStyles__StyledIcon",
|
|
209
214
|
componentId: "sc-1sd3tsh-3"
|
|
210
|
-
})([ "", ";margin-right:", ";color:", ";" ], (0,
|
|
215
|
+
})([ "", ";margin-right:", ";color:", ";" ], (0, b.pick)({
|
|
211
216
|
prisma: {
|
|
212
|
-
compact: (0,
|
|
213
|
-
comfortable: (0,
|
|
217
|
+
compact: (0, h.css)([ "font-size:14px;display:inline-flex;svg{height:16px;vertical-align:baseline;}" ]),
|
|
218
|
+
comfortable: (0, h.css)([ "font-size:18px;display:inline-flex;align-self:center;svg{height:16px;vertical-align:baseline;}" ])
|
|
214
219
|
},
|
|
215
|
-
enterprise: (0,
|
|
216
|
-
}), (0,
|
|
220
|
+
enterprise: (0, h.css)([ "flex:0 0 auto;" ])
|
|
221
|
+
}), (0, b.pick)({
|
|
217
222
|
enterprise: "3px"
|
|
218
|
-
}), (0,
|
|
219
|
-
true:
|
|
223
|
+
}), (0, b.pickVariant)("$disabled", {
|
|
224
|
+
true: b.variables.contentColorDisabled,
|
|
220
225
|
false: {
|
|
221
226
|
enterprise: function e(r) {
|
|
222
227
|
var a = r.$foregroundColor;
|
|
223
|
-
return a ||
|
|
228
|
+
return a || b.variables.contentColorDefault;
|
|
224
229
|
},
|
|
225
230
|
prisma: function e(r) {
|
|
226
231
|
var a = r.$foregroundColor, o = r.$appearance;
|
|
227
|
-
return a || (o === "error" ?
|
|
232
|
+
return a || (o === "error" ? b.variables.contentColorInverted : b.variables.contentColorDefault);
|
|
228
233
|
}
|
|
229
234
|
}
|
|
230
235
|
}));
|
|
231
|
-
var
|
|
236
|
+
var O = C().div.withConfig({
|
|
232
237
|
displayName: "ChipStyles__StyledLabel",
|
|
233
238
|
componentId: "sc-1sd3tsh-4"
|
|
234
|
-
})([ "", " ", ";color:", ";" ],
|
|
235
|
-
enterprise: (0,
|
|
236
|
-
}), (0,
|
|
237
|
-
true:
|
|
239
|
+
})([ "", " ", ";color:", ";" ], b.mixins.ellipsis(), (0, b.pick)({
|
|
240
|
+
enterprise: (0, h.css)([ "flex:0 1 auto;" ])
|
|
241
|
+
}), (0, b.pickVariant)("$disabled", {
|
|
242
|
+
true: b.variables.contentColorDisabled,
|
|
238
243
|
false: {
|
|
239
244
|
enterprise: function e(r) {
|
|
240
245
|
var a = r.$appearance, o = r.$foregroundColor;
|
|
241
|
-
return o || (a === "default" || a === "outline" ?
|
|
246
|
+
return o || (a === "default" || a === "outline" ? b.variables.contentColorDefault : b.variables.gray30);
|
|
242
247
|
},
|
|
243
248
|
prisma: function e(r) {
|
|
244
249
|
var a = r.$appearance, o = r.$foregroundColor;
|
|
245
|
-
return o || (a === "error" ?
|
|
250
|
+
return o || (a === "error" ? b.variables.contentColorInverted : b.variables.contentColorActive);
|
|
246
251
|
}
|
|
247
252
|
}
|
|
248
253
|
}));
|
|
249
|
-
var
|
|
254
|
+
var R = C().span.withConfig({
|
|
250
255
|
displayName: "ChipStyles__StyledRemove",
|
|
251
256
|
componentId: "sc-1sd3tsh-5"
|
|
252
|
-
})([ "", ";" ], (0,
|
|
253
|
-
enterprise: (0,
|
|
254
|
-
|
|
257
|
+
})([ "", ";" ], (0, b.pick)({
|
|
258
|
+
enterprise: (0, h.css)([ "flex:0 0 auto;padding-left:", ";font-size:", ";color:", ";" ], b.variables.spacingQuarter, (0,
|
|
259
|
+
b.pick)({
|
|
255
260
|
compact: "9px",
|
|
256
261
|
comfortable: "10.5px"
|
|
257
|
-
}), (0,
|
|
258
|
-
true:
|
|
262
|
+
}), (0, b.pickVariant)("$disabled", {
|
|
263
|
+
true: b.variables.contentColorDisabled,
|
|
259
264
|
false: {
|
|
260
265
|
enterprise: function e(r) {
|
|
261
266
|
var a = r.$foregroundColor, o = r.$appearance;
|
|
262
|
-
return a || (o === "default" || o === "outline" ?
|
|
267
|
+
return a || (o === "default" || o === "outline" ? b.variables.textGray : b.variables.gray30);
|
|
263
268
|
}
|
|
264
269
|
}
|
|
265
270
|
})),
|
|
266
|
-
prisma: (0,
|
|
267
|
-
|
|
271
|
+
prisma: (0, h.css)([ "font-size:", ";display:flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:12px;font-size:9px;color:", ";" ], (0,
|
|
272
|
+
b.pick)({
|
|
268
273
|
compact: "9px",
|
|
269
274
|
comfortable: "10.5px"
|
|
270
275
|
}), (function(e) {
|
|
271
276
|
var r = e.$disabled, a = e.$foregroundColor;
|
|
272
|
-
return r ?
|
|
277
|
+
return r ? b.variables.contentColorDisabled : a || "inherit";
|
|
273
278
|
}))
|
|
274
279
|
}));
|
|
275
|
-
var
|
|
280
|
+
var _ = C()($.withComponent(x())).withConfig({
|
|
276
281
|
displayName: "ChipStyles__StyledClickable",
|
|
277
282
|
componentId: "sc-1sd3tsh-6"
|
|
278
283
|
})([ "flex:0 1 auto;line-height:16px;cursor:pointer;&:focus{", ";}&:not([disabled]):hover{", ";}", ";" ], (0,
|
|
279
|
-
|
|
280
|
-
enterprise: (0,
|
|
281
|
-
prisma: (0,
|
|
284
|
+
b.pick)({
|
|
285
|
+
enterprise: (0, h.css)([ "box-shadow:", ";color:", ";" ], b.variables.focusShadow, b.variables.linkColor),
|
|
286
|
+
prisma: (0, h.css)([ "color:", ";", "{background-color:", ";box-shadow:0 0 0 3px ", ";}" ], b.variables.contentColorActive,
|
|
282
287
|
/* sc-sel */
|
|
283
|
-
|
|
284
|
-
}), (0,
|
|
285
|
-
enterprise: (0,
|
|
288
|
+
R, b.variables.interactiveColorOverlayHover, b.variables.focusColor)
|
|
289
|
+
}), (0, b.pick)({
|
|
290
|
+
enterprise: (0, h.css)([ "background-color:", ";", "{color:", ";}" ], (0, b.pickVariant)("$appearance", {
|
|
286
291
|
default: {
|
|
287
|
-
dark:
|
|
288
|
-
light:
|
|
292
|
+
dark: b.variables.gray30,
|
|
293
|
+
light: b.variables.gray96
|
|
289
294
|
},
|
|
290
|
-
info:
|
|
291
|
-
success:
|
|
292
|
-
warning:
|
|
293
|
-
error:
|
|
295
|
+
info: b.variables.infoColorL20,
|
|
296
|
+
success: b.variables.successColorL20,
|
|
297
|
+
warning: b.variables.warningColorL20,
|
|
298
|
+
error: b.variables.errorColorL20,
|
|
294
299
|
custom: {
|
|
295
|
-
dark:
|
|
296
|
-
light:
|
|
300
|
+
dark: b.variables.gray30,
|
|
301
|
+
light: b.variables.gray96
|
|
297
302
|
}
|
|
298
303
|
}),
|
|
299
304
|
/* sc-sel */
|
|
300
|
-
|
|
305
|
+
R, (function(e) {
|
|
301
306
|
var r = e.$foregroundColor;
|
|
302
|
-
return r ||
|
|
307
|
+
return r || b.variables.linkColor;
|
|
303
308
|
})),
|
|
304
|
-
prisma: (0,
|
|
309
|
+
prisma: (0, h.css)([ "color:", ";", "{background-color:", ";", ";}" ], b.variables.contentColorActive,
|
|
305
310
|
/* sc-sel */
|
|
306
|
-
|
|
311
|
+
R, b.variables.interactiveColorOverlayHover, (function(e) {
|
|
307
312
|
var r = e.$appearance;
|
|
308
|
-
return r === "error" && (0,
|
|
313
|
+
return r === "error" && (0, h.css)([ "color:", ";" ], b.variables.contentColorInverted);
|
|
309
314
|
}))
|
|
310
|
-
}), (0,
|
|
311
|
-
prisma: (0,
|
|
315
|
+
}), (0, b.pick)({
|
|
316
|
+
prisma: (0, h.css)([ "&:not([disabled]):active ", "{background-color:", ";}" ],
|
|
312
317
|
/* sc-sel */
|
|
313
|
-
|
|
318
|
+
R, b.variables.interactiveColorOverlayActive)
|
|
314
319
|
}));
|
|
315
320
|
// CONCATENATED MODULE: ./src/Chip/Chip.tsx
|
|
316
|
-
function
|
|
317
|
-
|
|
321
|
+
function j() {
|
|
322
|
+
j = Object.assign || function(e) {
|
|
318
323
|
for (var r = 1; r < arguments.length; r++) {
|
|
319
324
|
var a = arguments[r];
|
|
320
325
|
for (var o in a) {
|
|
@@ -325,30 +330,30 @@
|
|
|
325
330
|
}
|
|
326
331
|
return e;
|
|
327
332
|
};
|
|
328
|
-
return
|
|
333
|
+
return j.apply(this, arguments);
|
|
329
334
|
}
|
|
330
|
-
function
|
|
331
|
-
return
|
|
335
|
+
function q(e, r) {
|
|
336
|
+
return L(e) || D(e, r) || I(e, r) || E();
|
|
332
337
|
}
|
|
333
|
-
function
|
|
338
|
+
function E() {
|
|
334
339
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
335
340
|
}
|
|
336
|
-
function
|
|
341
|
+
function I(e, r) {
|
|
337
342
|
if (!e) return;
|
|
338
|
-
if (typeof e === "string") return
|
|
343
|
+
if (typeof e === "string") return A(e, r);
|
|
339
344
|
var a = Object.prototype.toString.call(e).slice(8, -1);
|
|
340
345
|
if (a === "Object" && e.constructor) a = e.constructor.name;
|
|
341
346
|
if (a === "Map" || a === "Set") return Array.from(e);
|
|
342
|
-
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return
|
|
347
|
+
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return A(e, r);
|
|
343
348
|
}
|
|
344
|
-
function
|
|
349
|
+
function A(e, r) {
|
|
345
350
|
if (r == null || r > e.length) r = e.length;
|
|
346
351
|
for (var a = 0, o = new Array(r); a < r; a++) {
|
|
347
352
|
o[a] = e[a];
|
|
348
353
|
}
|
|
349
354
|
return o;
|
|
350
355
|
}
|
|
351
|
-
function
|
|
356
|
+
function D(e, r) {
|
|
352
357
|
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
|
|
353
358
|
var a = [];
|
|
354
359
|
var o = true;
|
|
@@ -371,12 +376,12 @@
|
|
|
371
376
|
}
|
|
372
377
|
return a;
|
|
373
378
|
}
|
|
374
|
-
function
|
|
379
|
+
function L(e) {
|
|
375
380
|
if (Array.isArray(e)) return e;
|
|
376
381
|
}
|
|
377
|
-
function
|
|
382
|
+
function z(e, r) {
|
|
378
383
|
if (e == null) return {};
|
|
379
|
-
var a =
|
|
384
|
+
var a = N(e, r);
|
|
380
385
|
var o, n;
|
|
381
386
|
if (Object.getOwnPropertySymbols) {
|
|
382
387
|
var t = Object.getOwnPropertySymbols(e);
|
|
@@ -389,7 +394,7 @@
|
|
|
389
394
|
}
|
|
390
395
|
return a;
|
|
391
396
|
}
|
|
392
|
-
function
|
|
397
|
+
function N(e, r) {
|
|
393
398
|
if (e == null) return {};
|
|
394
399
|
var a = {};
|
|
395
400
|
var o = Object.keys(e);
|
|
@@ -401,7 +406,7 @@
|
|
|
401
406
|
}
|
|
402
407
|
return a;
|
|
403
408
|
}
|
|
404
|
-
var
|
|
409
|
+
var P = {
|
|
405
410
|
appearance: l().oneOf([ "info", "success", "warning", "error", "outline" ]),
|
|
406
411
|
backgroundColor: l().string,
|
|
407
412
|
children: l().node.isRequired,
|
|
@@ -413,14 +418,14 @@
|
|
|
413
418
|
/** Includes this value in `onRequestRemove` callbacks. */
|
|
414
419
|
value: l().any
|
|
415
420
|
};
|
|
416
|
-
var
|
|
421
|
+
var T = {
|
|
417
422
|
disabled: false
|
|
418
423
|
};
|
|
419
|
-
function
|
|
424
|
+
function H(e) {
|
|
420
425
|
return !!e.onRequestRemove;
|
|
421
426
|
}
|
|
422
|
-
function
|
|
423
|
-
var r = e.appearance, a = e.backgroundColor, o = e.disabled, n = e.foregroundColor, t = e.icon, i =
|
|
427
|
+
function B(e) {
|
|
428
|
+
var r = e.appearance, a = e.backgroundColor, o = e.disabled, n = e.foregroundColor, t = e.icon, i = z(e, [ "appearance", "backgroundColor", "disabled", "foregroundColor", "icon" ]);
|
|
424
429
|
// Validate that the color being rendered into the CSS is restricted to only values that are of CSS type <color>.
|
|
425
430
|
var l = n && (0, f.isCSSColor)(n) ? n : undefined;
|
|
426
431
|
var s = a && (0, f.isCSSColor)(a) ? a : undefined;
|
|
@@ -434,83 +439,87 @@
|
|
|
434
439
|
};
|
|
435
440
|
return [ c, i ];
|
|
436
441
|
}
|
|
437
|
-
function
|
|
438
|
-
var r =
|
|
439
|
-
var s = i.$appearance, p = i.$foregroundColor, f = i.disabled,
|
|
440
|
-
var
|
|
441
|
-
var
|
|
442
|
-
var
|
|
443
|
-
|
|
444
|
-
|
|
442
|
+
function V(e) {
|
|
443
|
+
var r = B(e), n = q(r, 2), i = n[0], l = n[1];
|
|
444
|
+
var s = i.$appearance, p = i.$foregroundColor, f = i.disabled, g = i.icon, h = z(i, [ "$appearance", "$foregroundColor", "disabled", "icon" ]);
|
|
445
|
+
var C = l.children, y = l.elementRef, x = l.onRequestRemove, $ = l.value, k = z(l, [ "children", "elementRef", "onRequestRemove", "value" ]);
|
|
446
|
+
var E = (0, b.useSplunkTheme)(), I = E.isEnterprise;
|
|
447
|
+
var A = typeof C === "string";
|
|
448
|
+
var D = A ? (0, v.sprintf)((0, d._)("Remove %(children)s"), {
|
|
449
|
+
children: C
|
|
450
|
+
}) : (0, d._)("Remove");
|
|
451
|
+
var L = (0, a.useCallback)((function(e) {
|
|
452
|
+
x(e, {
|
|
453
|
+
value: $
|
|
445
454
|
});
|
|
446
|
-
}), [
|
|
455
|
+
}), [ x, $ ]);
|
|
447
456
|
|
|
448
|
-
return o().createElement(
|
|
457
|
+
return o().createElement(_, j({
|
|
449
458
|
$appearance: s,
|
|
450
459
|
$disabled: f,
|
|
451
460
|
$foregroundColor: p,
|
|
452
|
-
"data-test-value":
|
|
461
|
+
"data-test-value": $,
|
|
453
462
|
disabled: f,
|
|
454
|
-
elementRef:
|
|
455
|
-
onClick:
|
|
456
|
-
},
|
|
457
|
-
$icon: !!
|
|
463
|
+
elementRef: y,
|
|
464
|
+
onClick: L
|
|
465
|
+
}, h, t()(k, Object.keys(P))), o().createElement(S, {
|
|
466
|
+
$icon: !!g,
|
|
458
467
|
$removable: true
|
|
459
|
-
},
|
|
468
|
+
}, o().createElement(m(), null, D), g && o().createElement(w, {
|
|
460
469
|
$appearance: s,
|
|
461
470
|
$disabled: f,
|
|
462
471
|
$foregroundColor: p
|
|
463
|
-
},
|
|
472
|
+
}, g), o().createElement(O, {
|
|
464
473
|
"data-test": "label",
|
|
474
|
+
"aria-hidden": A ? true : undefined,
|
|
465
475
|
$appearance: s,
|
|
466
476
|
$disabled: f,
|
|
467
477
|
$foregroundColor: p
|
|
468
|
-
},
|
|
478
|
+
}, C), o().createElement(R, {
|
|
469
479
|
$appearance: s,
|
|
470
480
|
$disabled: f,
|
|
471
481
|
$foregroundColor: p
|
|
472
482
|
}, I ? o().createElement(u(), {
|
|
473
483
|
"data-test": "cross",
|
|
474
484
|
hideDefaultTooltip: true,
|
|
475
|
-
screenReaderText:
|
|
485
|
+
screenReaderText: null,
|
|
476
486
|
size: .85
|
|
477
487
|
}) : o().createElement(c(), {
|
|
478
|
-
"aria-label": (0, d._)("Remove"),
|
|
479
488
|
"data-test": "cross",
|
|
480
489
|
height: "20px",
|
|
481
490
|
width: "20px"
|
|
482
491
|
}))));
|
|
483
492
|
}
|
|
484
|
-
function
|
|
485
|
-
var r =
|
|
486
|
-
var l = n.$appearance, s = n.$foregroundColor, c = n.disabled, p = n.icon, u =
|
|
487
|
-
var d = i.children, f = i.elementRef, v =
|
|
493
|
+
function M(e) {
|
|
494
|
+
var r = B(e), a = q(r, 2), n = a[0], i = a[1];
|
|
495
|
+
var l = n.$appearance, s = n.$foregroundColor, c = n.disabled, p = n.icon, u = z(n, [ "$appearance", "$foregroundColor", "disabled", "icon" ]);
|
|
496
|
+
var d = i.children, f = i.elementRef, v = z(i, [ "children", "elementRef" ]);
|
|
488
497
|
|
|
489
|
-
return o().createElement(
|
|
498
|
+
return o().createElement(k, j({
|
|
490
499
|
$appearance: l,
|
|
491
500
|
$disabled: c,
|
|
492
501
|
ref: f
|
|
493
|
-
}, u, t()(v, Object.keys(
|
|
502
|
+
}, u, t()(v, Object.keys(P))), o().createElement(S, {
|
|
494
503
|
$icon: !!p,
|
|
495
504
|
$removable: false
|
|
496
|
-
}, p && o().createElement(
|
|
505
|
+
}, p && o().createElement(w, {
|
|
497
506
|
$appearance: l,
|
|
498
507
|
$disabled: c,
|
|
499
508
|
$foregroundColor: s
|
|
500
|
-
}, p), o().createElement(
|
|
509
|
+
}, p), o().createElement(O, {
|
|
501
510
|
"data-test": "label",
|
|
502
511
|
$appearance: l,
|
|
503
512
|
$disabled: c,
|
|
504
513
|
$foregroundColor: s
|
|
505
514
|
}, d)));
|
|
506
515
|
}
|
|
507
|
-
function
|
|
516
|
+
function W(e) {
|
|
508
517
|
// @docs-props-type ChipPropsBase
|
|
509
|
-
return
|
|
518
|
+
return H(e) ? o().createElement(V, e) : o().createElement(M, e);
|
|
510
519
|
}
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
/* harmony default export */ const
|
|
520
|
+
W.propTypes = P;
|
|
521
|
+
W.defaultProps = T;
|
|
522
|
+
/* harmony default export */ const G = W;
|
|
514
523
|
// CONCATENATED MODULE: ./src/Chip/index.ts
|
|
515
524
|
module.exports = r;
|
|
516
525
|
/******/})();
|
package/ComboBox.js
CHANGED
|
@@ -907,7 +907,7 @@
|
|
|
907
907
|
elementRef: this.handleAnchorMount,
|
|
908
908
|
role: "combobox",
|
|
909
909
|
value: l,
|
|
910
|
-
"aria-activedescendant": this.activeItemId,
|
|
910
|
+
"aria-activedescendant": this.state.open ? this.activeItemId : undefined,
|
|
911
911
|
"aria-expanded": i,
|
|
912
912
|
"aria-haspopup": true,
|
|
913
913
|
"aria-label": (0, O._)("Value input"),
|