@splunk/react-ui 4.33.0 → 4.35.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/Breadcrumbs.js +20 -29
- package/Button.js +20 -23
- package/ButtonGroup.js +20 -23
- package/ButtonSimple.js +33 -34
- package/CHANGELOG.md +56 -1
- package/Card.js +129 -113
- package/Chip.js +75 -82
- package/CollapsiblePanel.js +281 -264
- package/Color.js +103 -93
- package/ComboBox.js +3 -2
- package/Concertina.js +139 -138
- package/ControlGroup.js +43 -39
- package/DualListbox.js +8 -11
- package/File.js +25 -30
- package/FormRows.js +53 -53
- package/Image.js +13 -13
- package/JSONTree.js +87 -85
- package/List.js +9 -13
- package/MIGRATION.mdx +100 -0
- package/Markdown.js +12 -12
- package/Menu.js +492 -699
- package/Message.js +192 -194
- package/MessageBar.js +104 -104
- package/Modal.js +2 -2
- package/Monogram.js +140 -94
- package/Multiselect.js +45 -49
- package/Paginator.js +8 -8
- package/Popover.js +53 -54
- package/Progress.js +45 -46
- package/RadioBar.js +117 -115
- package/RadioList.js +8 -5
- package/ResultsMenu.js +272 -279
- package/Search.js +197 -199
- package/Select.js +86 -84
- package/Slider.js +9 -9
- package/SplitButton.js +1 -4
- package/StaticContent.js +1 -1
- package/StepBar.js +92 -88
- package/Switch.js +217 -211
- package/TabBar.js +13 -5
- package/Table.js +714 -717
- package/Text.js +94 -83
- package/TextArea.js +162 -163
- package/Tooltip.js +1 -1
- package/package.json +8 -8
- package/stubs-splunkui.d.ts +11 -0
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +0 -1
- package/types/src/Breadcrumbs/Item.d.ts +0 -1
- package/types/src/Card/Card.d.ts +3 -1
- package/types/src/Card/Header.d.ts +22 -5
- package/types/src/Chip/Chip.d.ts +2 -4
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -0
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -3
- package/types/src/Color/Color.d.ts +5 -5
- package/types/src/ComboBox/Option.d.ts +0 -1
- package/types/src/List/List.d.ts +2 -4
- package/types/src/Menu/Heading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +10 -5
- package/types/src/Menu/Menu.d.ts +18 -26
- package/types/src/Menu/MenuContext.d.ts +3 -2
- package/types/src/Menu/docs/examples/Dimmed.d.ts +2 -0
- package/types/src/Monogram/Monogram.d.ts +5 -6
- package/types/src/Multiselect/Option.d.ts +0 -1
- package/types/src/Progress/Progress.d.ts +4 -1
- package/types/src/RadioBar/Option.d.ts +4 -1
- package/types/src/RadioBar/RadioBar.d.ts +6 -4
- package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +13 -28
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +3 -5
- package/types/src/Search/Option.d.ts +19 -6
- package/types/src/Search/docs/examples/OptionsLinks.d.ts +2 -0
- package/types/src/Select/Option.d.ts +0 -1
- package/types/src/Select/OptionBase.d.ts +2 -3
- package/types/src/Select/Select.d.ts +2 -2
- package/types/src/Select/SelectBase.d.ts +2 -2
- package/types/src/Table/Body.d.ts +0 -4
- package/types/src/Table/DragHandle.d.ts +1 -2
- package/types/src/Text/Text.d.ts +2 -0
- package/useRovingFocus.js +26 -40
- package/types/src/Select/docs/examples/prisma/Appearance.d.ts +0 -14
package/Color.js
CHANGED
|
@@ -94,10 +94,10 @@
|
|
|
94
94
|
var g = e.n(b);
|
|
95
95
|
// CONCATENATED MODULE: external "lodash/memoize"
|
|
96
96
|
const x = require("lodash/memoize");
|
|
97
|
-
var
|
|
97
|
+
var S = e.n(x);
|
|
98
98
|
// CONCATENATED MODULE: external "tinycolor2"
|
|
99
|
-
const
|
|
100
|
-
var k = e.n(
|
|
99
|
+
const w = require("tinycolor2");
|
|
100
|
+
var k = e.n(w);
|
|
101
101
|
// CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
|
|
102
102
|
const C = require("@splunk/react-ui/Dropdown");
|
|
103
103
|
var E = e.n(C);
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
// CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
|
|
111
111
|
const q = require("@splunk/ui-utils/keyboard");
|
|
112
112
|
// CONCATENATED MODULE: external "styled-components"
|
|
113
|
-
const
|
|
114
|
-
var
|
|
113
|
+
const j = require("styled-components");
|
|
114
|
+
var I = e.n(j);
|
|
115
115
|
// CONCATENATED MODULE: external "@splunk/react-ui/Text"
|
|
116
116
|
const T = require("@splunk/react-ui/Text");
|
|
117
117
|
var R = e.n(T);
|
|
@@ -129,64 +129,67 @@
|
|
|
129
129
|
enterprise: P.variables.gray80,
|
|
130
130
|
prisma: "rgba(0, 0, 0, 0.2)"
|
|
131
131
|
});
|
|
132
|
-
var z = (0,
|
|
132
|
+
var z = (0, j.css)([ "background-image:linear-gradient( 45deg,", " 25%,transparent 25%,transparent 75%,", " 75%,", " ),linear-gradient( 45deg,", " 25%,transparent 25%,transparent 75%,", " 75%,", " );background-size:10px 10px;background-position:0 0,5px 5px;background-color:", ";" ], H, H, H, H, H, H, (0,
|
|
133
133
|
P.pick)({
|
|
134
134
|
enterprise: "transparent",
|
|
135
135
|
prisma: P.variables.white
|
|
136
136
|
}));
|
|
137
|
-
var K =
|
|
137
|
+
var K = I()(D()).withConfig({
|
|
138
138
|
displayName: "SwatchStyles__StyledCheck",
|
|
139
139
|
componentId: "sc-1wxunhq-0"
|
|
140
140
|
})([ "box-sizing:border-box;color:#d3d3d3;height:100%;width:100%;" ]);
|
|
141
|
-
var F =
|
|
141
|
+
var F = I()($()).withConfig({
|
|
142
142
|
displayName: "SwatchStyles__StyledClickable",
|
|
143
143
|
componentId: "sc-1wxunhq-1"
|
|
144
|
-
})([ "display:block;flex:0 0 auto;border:", ";", ";", ";", ";", " &:focus{border-color:", ";box-shadow:", ";}", " ", " ", " &[disabled]{background-image:linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8));}", " ", "" ], (0,
|
|
144
|
+
})([ "display:block;flex:0 0 auto;border:1px solid;border-color:", ";", ";", ";", ";", " &:focus{border-color:", ";box-shadow:", ";", "}", " ", " ", " &[disabled]{background-image:linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8));}", " ", "" ], (0,
|
|
145
145
|
P.pick)({
|
|
146
146
|
enterprise: {
|
|
147
|
-
light:
|
|
148
|
-
dark: P.variables.
|
|
147
|
+
light: P.variables.gray60,
|
|
148
|
+
dark: P.variables.borderColor
|
|
149
149
|
},
|
|
150
|
-
prisma:
|
|
150
|
+
prisma: P.variables.interactiveColorBorder
|
|
151
151
|
}), (0, P.pick)({
|
|
152
|
-
prisma: (0,
|
|
152
|
+
prisma: (0, j.css)([ "border-radius:2px;" ])
|
|
153
153
|
}), (function(e) {
|
|
154
154
|
var t = e.$value;
|
|
155
|
-
return t === null && (0,
|
|
155
|
+
return t === null && (0, j.css)([ "background-image:linear-gradient( to bottom right,transparent 48%,", ",transparent 52% );", ";" ], (0,
|
|
156
156
|
P.pick)({
|
|
157
157
|
enterprise: "#ed1e24",
|
|
158
158
|
prisma: P.variables.accentColorNegative
|
|
159
159
|
}), (0, P.pick)({
|
|
160
|
-
prisma: (0,
|
|
160
|
+
prisma: (0, j.css)([ "background-color:", ";" ], P.variables.white)
|
|
161
161
|
}));
|
|
162
162
|
}), (function(e) {
|
|
163
163
|
var t = e.$value;
|
|
164
164
|
return t && (t === "transparent" ? z : "background-color: ".concat(t));
|
|
165
165
|
}), (function(e) {
|
|
166
166
|
var t = e.$noBorder;
|
|
167
|
-
return t && (0,
|
|
167
|
+
return t && (0, j.css)([ "border:none;" ]);
|
|
168
168
|
}), P.variables.focusColor, P.variables.focusShadow, (0, P.pick)({
|
|
169
|
+
// Fixes focus shadow being cut off by input (SUI-6401)
|
|
170
|
+
enterprise: (0, j.css)([ "z-index:1;" ])
|
|
171
|
+
}), (0, P.pick)({
|
|
169
172
|
enterprise: {
|
|
170
|
-
comfortable: (0,
|
|
171
|
-
compact: (0,
|
|
173
|
+
comfortable: (0, j.css)([ "width:32px;height:32px;" ]),
|
|
174
|
+
compact: (0, j.css)([ "width:24px;height:24px;" ])
|
|
172
175
|
},
|
|
173
|
-
prisma: (0,
|
|
176
|
+
prisma: (0, j.css)([ "width:24px;height:24px;" ])
|
|
174
177
|
}), (function(e) {
|
|
175
178
|
var t = e.$prepend;
|
|
176
|
-
return t && (0,
|
|
179
|
+
return t && (0, j.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
|
|
177
180
|
}), (function(e) {
|
|
178
181
|
var t = e.$append;
|
|
179
|
-
return t && (0,
|
|
182
|
+
return t && (0, j.css)([ "margin-right:-1px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
|
|
180
183
|
}), (function(e) {
|
|
181
184
|
var t = e.$hasError;
|
|
182
|
-
return t && (0,
|
|
185
|
+
return t && (0, j.css)([ "box-shadow:inset 0 0 0 2px white;border-color:", ";" ], (0,
|
|
183
186
|
P.pick)({
|
|
184
187
|
enterprise: P.variables.errorColor,
|
|
185
188
|
prisma: P.variables.accentColorNegative
|
|
186
189
|
}));
|
|
187
190
|
}), (function(e) {
|
|
188
191
|
var t = e.$showSelected;
|
|
189
|
-
return t && (0,
|
|
192
|
+
return t && (0, j.css)([ "display:flex;align-items:center;justify-content:center;" ]);
|
|
190
193
|
}));
|
|
191
194
|
// CONCATENATED MODULE: ./src/Color/Swatch.tsx
|
|
192
195
|
function M() {
|
|
@@ -244,7 +247,7 @@
|
|
|
244
247
|
/** @private */
|
|
245
248
|
showSelected: o().bool
|
|
246
249
|
};
|
|
247
|
-
var
|
|
250
|
+
var X = n().forwardRef((function(e, t) {
|
|
248
251
|
var r = e.append, a = e.error, o = a === void 0 ? false : a, l = e.onClick, i = e.prepend, s = e.value, u = e.noBorder, c = e.showSelected, p = L(e, [ "append", "error", "onClick", "prepend", "value", "noBorder", "showSelected" ]);
|
|
249
252
|
var d = s === null || s === undefined ? (0, _._)("No color") : s;
|
|
250
253
|
// Only valid hexadecimal strings, 'transparent' and `null` are allowed for background colors
|
|
@@ -274,47 +277,50 @@
|
|
|
274
277
|
role: "presentation"
|
|
275
278
|
}), n().createElement(V(), null, d));
|
|
276
279
|
}));
|
|
277
|
-
|
|
278
|
-
/* harmony default export */ const
|
|
280
|
+
X.propTypes = W;
|
|
281
|
+
/* harmony default export */ const G = X;
|
|
279
282
|
// CONCATENATED MODULE: ./src/Color/ColorStyles.ts
|
|
280
|
-
var
|
|
283
|
+
var J = I().div.withConfig({
|
|
281
284
|
displayName: "ColorStyles__StyledColor",
|
|
282
285
|
componentId: "jxrost-0"
|
|
283
286
|
})([ "", ";flex-direction:row;" ], P.mixins.reset("flex"));
|
|
284
|
-
var
|
|
287
|
+
var Q = I()(G).withConfig({
|
|
285
288
|
displayName: "ColorStyles__StyledInputSwatch",
|
|
286
289
|
componentId: "jxrost-1"
|
|
287
|
-
})([ "", "" ], (0, P.pick)({
|
|
288
|
-
compact: (0,
|
|
290
|
+
})([ "", ";" ], (0, P.pick)({
|
|
291
|
+
compact: (0, j.css)([ "width:28px;height:28px;" ])
|
|
289
292
|
}));
|
|
290
|
-
var Y =
|
|
293
|
+
var Y = I().div.withConfig({
|
|
291
294
|
displayName: "ColorStyles__StyledInput",
|
|
292
295
|
componentId: "jxrost-2"
|
|
293
|
-
})([ "", ";" ], (0, P.pick)({
|
|
294
|
-
enterprise: (0,
|
|
295
|
-
prisma: (0,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
})([ "", ";", "" ], (0, P.pick)({
|
|
297
|
+
enterprise: (0, j.css)([ "display:flex;" ]),
|
|
298
|
+
prisma: (0, j.css)([ "position:relative;" ])
|
|
299
|
+
}), (function(e) {
|
|
300
|
+
var t = e.$inDropdown;
|
|
301
|
+
return t ? (0, j.css)([ "width:", ";" ], (0, P.pick)({
|
|
302
|
+
enterprise: "100%",
|
|
303
|
+
prisma: "80px"
|
|
304
|
+
})) : (0, j.css)([ "flex:0 1 auto;min-width:0;" ]);
|
|
299
305
|
}));
|
|
300
|
-
var Z =
|
|
306
|
+
var Z = I()(R()).withConfig({
|
|
301
307
|
displayName: "ColorStyles__StyledInputText",
|
|
302
308
|
componentId: "jxrost-3"
|
|
303
309
|
})([ "", "" ], (function(e) {
|
|
304
310
|
var t = e.$inDropdown;
|
|
305
|
-
return t && (0,
|
|
311
|
+
return t && (0, j.css)([ "font-size:12px;" ]);
|
|
306
312
|
}));
|
|
307
|
-
var ee =
|
|
313
|
+
var ee = I()(G).withConfig({
|
|
308
314
|
displayName: "ColorStyles__StyledToggleSwatch",
|
|
309
315
|
componentId: "jxrost-4"
|
|
310
316
|
})([ "", "" ], (0, P.pick)({
|
|
311
317
|
prisma: {
|
|
312
|
-
comfortable: (0,
|
|
313
|
-
compact: (0,
|
|
318
|
+
comfortable: (0, j.css)([ "width:40px;height:40px;" ]),
|
|
319
|
+
compact: (0, j.css)([ "width:32px;height:32px;" ])
|
|
314
320
|
},
|
|
315
321
|
enterprise: {
|
|
316
|
-
comfortable: (0,
|
|
317
|
-
compact: (0,
|
|
322
|
+
comfortable: (0, j.css)([ "width:32px;height:32px;" ]),
|
|
323
|
+
compact: (0, j.css)([ "width:28px;height:28px;" ])
|
|
318
324
|
}
|
|
319
325
|
}));
|
|
320
326
|
// CONCATENATED MODULE: external "@splunk/react-icons/ChevronDown"
|
|
@@ -324,65 +330,68 @@
|
|
|
324
330
|
const ne = require("@splunk/react-ui/Divider");
|
|
325
331
|
var ae = e.n(ne);
|
|
326
332
|
// CONCATENATED MODULE: ./src/Color/PaletteStyles.ts
|
|
327
|
-
var oe =
|
|
333
|
+
var oe = I().div.withConfig({
|
|
328
334
|
displayName: "PaletteStyles__StyledPalette",
|
|
329
335
|
componentId: "qgv9v9-0"
|
|
330
336
|
})([ "width:220px;padding:", ";" ], P.variables.spacingSmall);
|
|
331
|
-
var le =
|
|
337
|
+
var le = I().ul.withConfig({
|
|
332
338
|
displayName: "PaletteStyles__StyledSwatches",
|
|
333
339
|
componentId: "qgv9v9-1"
|
|
334
340
|
})([ "", ";", "" ], P.mixins.reset("block"), (0, P.pick)({
|
|
335
|
-
enterprise: (0,
|
|
341
|
+
enterprise: (0, j.css)([ "margin-bottom:", ";" ], P.variables.spacingXSmall)
|
|
336
342
|
}));
|
|
337
|
-
var ie =
|
|
343
|
+
var ie = I().li.withConfig({
|
|
338
344
|
displayName: "PaletteStyles__StyledSwatch",
|
|
339
345
|
componentId: "qgv9v9-2"
|
|
340
346
|
})([ "", ";margin-right:4px;margin-bottom:4px;vertical-align:top;", "" ], P.mixins.reset("inline-block"), (0,
|
|
341
347
|
P.pick)({
|
|
342
348
|
enterprise: {
|
|
343
|
-
compact: (0,
|
|
349
|
+
compact: (0, j.css)([ "&:nth-child(8n){margin-right:0;}" ])
|
|
344
350
|
},
|
|
345
|
-
prisma: (0,
|
|
351
|
+
prisma: (0, j.css)([ "&:nth-child(8n){margin-right:0;}" ])
|
|
346
352
|
}));
|
|
347
|
-
var se =
|
|
353
|
+
var se = I().div.withConfig({
|
|
348
354
|
displayName: "PaletteStyles__StyledToolBar",
|
|
349
355
|
componentId: "qgv9v9-3"
|
|
350
|
-
})([ "position:relative;display:flex;align-items:center;padding:0;margin-top:", ";
|
|
351
|
-
|
|
356
|
+
})([ "position:relative;display:flex;align-items:center;padding:0;margin-top:", ";", " gap:4px;" ], P.variables.spacingSmall, (0,
|
|
357
|
+
P.pick)({
|
|
358
|
+
enterprise: (0, j.css)([ "margin-bottom:", ";" ], P.variables.spacingSmall)
|
|
359
|
+
}));
|
|
360
|
+
var ue = I()($()).withConfig({
|
|
352
361
|
displayName: "PaletteStyles__StyledExpandButton",
|
|
353
362
|
componentId: "qgv9v9-4"
|
|
354
363
|
})([ "position:absolute;bottom:4px;right:4px;padding:2px 4px;border-radius:2px;&:focus{box-shadow:", ";}", "" ], P.variables.focusShadow, (function(e) {
|
|
355
364
|
var t = e.$expanded;
|
|
356
|
-
return t && (0,
|
|
365
|
+
return t && (0, j.css)([ "transform:rotate(180deg);" ]);
|
|
357
366
|
}));
|
|
358
|
-
var ce =
|
|
367
|
+
var ce = I().div.withConfig({
|
|
359
368
|
displayName: "PaletteStyles__StyledSystemColorPickerWrapper",
|
|
360
369
|
componentId: "qgv9v9-5"
|
|
361
370
|
})([ "position:relative;" ]);
|
|
362
|
-
var pe =
|
|
371
|
+
var pe = I().input.withConfig({
|
|
363
372
|
displayName: "PaletteStyles__StyledSystemColorPicker",
|
|
364
373
|
componentId: "qgv9v9-6"
|
|
365
|
-
})([ "box-sizing:border-box;", "
|
|
374
|
+
})([ "box-sizing:border-box;", " ", ";", ";outline:none;appearance:none;padding:1px 10px;", " margin:0;background:conic-gradient( #ef3434,#ef9a34,#deef34,#78ef34,#34ef56,#34efbc,#34bcef,#3456ef,#7834ef,#de34ef,#ef349a,#ef3434 );background-repeat:no-repeat;cursor:pointer;&::-webkit-color-swatch{border:none;border-radius:2px;}&::-moz-color-swatch{opacity:0;}&:focus{box-shadow:", ";}" ], (0,
|
|
366
375
|
P.pick)({
|
|
367
376
|
enterprise: {
|
|
368
|
-
comfortable: (0,
|
|
369
|
-
compact: (0,
|
|
377
|
+
comfortable: (0, j.css)([ "width:32px;height:32px;" ]),
|
|
378
|
+
compact: (0, j.css)([ "width:24px;height:24px;" ])
|
|
370
379
|
},
|
|
371
|
-
prisma: (0,
|
|
380
|
+
prisma: (0, j.css)([ "width:24px;height:24px;" ])
|
|
372
381
|
}), (0, P.pick)({
|
|
373
382
|
enterprise: {
|
|
374
|
-
light: (0,
|
|
375
|
-
dark: P.variables.
|
|
383
|
+
light: (0, j.css)([ "border:1px solid ", ";" ], P.variables.gray60),
|
|
384
|
+
dark: (0, j.css)([ "border:1px solid ", ";" ], P.variables.borderColor)
|
|
376
385
|
},
|
|
377
|
-
prisma: "none"
|
|
386
|
+
prisma: (0, j.css)([ "border:none;" ])
|
|
378
387
|
}), (0, P.pick)({
|
|
379
|
-
prisma: (0,
|
|
388
|
+
prisma: (0, j.css)([ "border-radius:2px;" ])
|
|
380
389
|
}), (0, P.pick)({
|
|
381
390
|
enterprise: {
|
|
382
|
-
comfortable: (0,
|
|
391
|
+
comfortable: (0, j.css)([ "padding:1px 14px;" ])
|
|
383
392
|
}
|
|
384
393
|
}), P.variables.focusShadow);
|
|
385
|
-
var de =
|
|
394
|
+
var de = I()(D()).withConfig({
|
|
386
395
|
displayName: "PaletteStyles__StyledCheck",
|
|
387
396
|
componentId: "qgv9v9-7"
|
|
388
397
|
})([ "box-sizing:border-box;color:#d3d3d3;height:100%;width:100%;position:absolute;top:0;left:0;pointer-events:none;" ]);
|
|
@@ -400,7 +409,7 @@
|
|
|
400
409
|
|
|
401
410
|
return n().createElement(ie, {
|
|
402
411
|
key: r || "null"
|
|
403
|
-
}, n().createElement(
|
|
412
|
+
}, n().createElement(G, {
|
|
404
413
|
value: r,
|
|
405
414
|
ref: s ? o : null,
|
|
406
415
|
onClick: l,
|
|
@@ -415,19 +424,19 @@
|
|
|
415
424
|
"data-test": "tool-bar"
|
|
416
425
|
}, f && n().createElement(P.SplunkThemeProvider, {
|
|
417
426
|
density: "compact"
|
|
418
|
-
}, p && p()), n().createElement(
|
|
427
|
+
}, p && p()), n().createElement(G, {
|
|
419
428
|
value: null,
|
|
420
429
|
ref: a === null ? o : null,
|
|
421
430
|
onClick: l,
|
|
422
431
|
noBorder: f && !v,
|
|
423
432
|
showSelected: a === null
|
|
424
|
-
}), n().createElement(
|
|
433
|
+
}), n().createElement(G, {
|
|
425
434
|
value: "#ffffff",
|
|
426
435
|
ref: a === "#ffffff" ? o : null,
|
|
427
436
|
onClick: l,
|
|
428
437
|
noBorder: f && !v,
|
|
429
438
|
showSelected: a === "#ffffff"
|
|
430
|
-
}), n().createElement(
|
|
439
|
+
}), n().createElement(G, {
|
|
431
440
|
value: "#000000",
|
|
432
441
|
ref: a === "#000000" ? o : null,
|
|
433
442
|
onClick: l,
|
|
@@ -444,15 +453,15 @@
|
|
|
444
453
|
})));
|
|
445
454
|
};
|
|
446
455
|
var x = y.length === 8 ? 7 : 15;
|
|
447
|
-
var
|
|
448
|
-
var
|
|
456
|
+
var S = h()(y, 0, x);
|
|
457
|
+
var w = h()(y, x);
|
|
449
458
|
if (f) {
|
|
450
459
|
|
|
451
460
|
return n().createElement(oe, null, n().createElement("div", {
|
|
452
461
|
style: {
|
|
453
462
|
position: "relative"
|
|
454
463
|
}
|
|
455
|
-
}, n().createElement(le, null,
|
|
464
|
+
}, n().createElement(le, null, S, t && w), t && b(), n().createElement(ue, {
|
|
456
465
|
ref: i,
|
|
457
466
|
$expanded: t,
|
|
458
467
|
onClick: s,
|
|
@@ -492,26 +501,26 @@
|
|
|
492
501
|
return me.apply(this, arguments);
|
|
493
502
|
}
|
|
494
503
|
function ye(e) {
|
|
495
|
-
return
|
|
504
|
+
return Se(e) || xe(e) || ge(e) || be();
|
|
496
505
|
}
|
|
497
506
|
function be() {
|
|
498
507
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
499
508
|
}
|
|
500
509
|
function ge(e, t) {
|
|
501
510
|
if (!e) return;
|
|
502
|
-
if (typeof e === "string") return
|
|
511
|
+
if (typeof e === "string") return we(e, t);
|
|
503
512
|
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
504
513
|
if (r === "Object" && e.constructor) r = e.constructor.name;
|
|
505
514
|
if (r === "Map" || r === "Set") return Array.from(e);
|
|
506
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return
|
|
515
|
+
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return we(e, t);
|
|
507
516
|
}
|
|
508
517
|
function xe(e) {
|
|
509
518
|
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
|
|
510
519
|
}
|
|
511
|
-
function
|
|
512
|
-
if (Array.isArray(e)) return
|
|
520
|
+
function Se(e) {
|
|
521
|
+
if (Array.isArray(e)) return we(e);
|
|
513
522
|
}
|
|
514
|
-
function
|
|
523
|
+
function we(e, t) {
|
|
515
524
|
if (t == null || t > e.length) t = e.length;
|
|
516
525
|
for (var r = 0, n = new Array(t); r < t; r++) {
|
|
517
526
|
n[r] = e[r];
|
|
@@ -584,7 +593,7 @@
|
|
|
584
593
|
};
|
|
585
594
|
return qe(e, t);
|
|
586
595
|
}
|
|
587
|
-
function
|
|
596
|
+
function je(e) {
|
|
588
597
|
var t = Re();
|
|
589
598
|
return function r() {
|
|
590
599
|
var n = Be(e), a;
|
|
@@ -594,10 +603,10 @@
|
|
|
594
603
|
} else {
|
|
595
604
|
a = n.apply(this, arguments);
|
|
596
605
|
}
|
|
597
|
-
return
|
|
606
|
+
return Ie(this, a);
|
|
598
607
|
};
|
|
599
608
|
}
|
|
600
|
-
function
|
|
609
|
+
function Ie(e, t) {
|
|
601
610
|
if (t && (he(t) === "object" || typeof t === "function")) {
|
|
602
611
|
return t;
|
|
603
612
|
}
|
|
@@ -641,7 +650,7 @@
|
|
|
641
650
|
}
|
|
642
651
|
// The default palette in Prisma theme.
|
|
643
652
|
var Ae = [ "#912344", "#D44C20", "#C0891E", "#26AA92", "#2F8AA7", "#2E49AA", "#602CA1", "#BA4ABD" ];
|
|
644
|
-
var De =
|
|
653
|
+
var De = S()((function(e) {
|
|
645
654
|
var t = [];
|
|
646
655
|
for (var r = 1; r <= e.length * 4; r += 1) {
|
|
647
656
|
var n = e[(r - 1) % e.length];
|
|
@@ -679,7 +688,6 @@
|
|
|
679
688
|
append: false,
|
|
680
689
|
disabled: false,
|
|
681
690
|
error: false,
|
|
682
|
-
hideInput: false,
|
|
683
691
|
palette: De(Ae),
|
|
684
692
|
prepend: false
|
|
685
693
|
};
|
|
@@ -697,7 +705,7 @@
|
|
|
697
705
|
* 2. Otherwise the first color swatch receives focus.
|
|
698
706
|
*/ var Me = function(e) {
|
|
699
707
|
_e(r, e);
|
|
700
|
-
var t =
|
|
708
|
+
var t = je(r);
|
|
701
709
|
Oe(r, null, [ {
|
|
702
710
|
key: "hasNull",
|
|
703
711
|
// @docs-props-type ColorPropsBase
|
|
@@ -989,11 +997,10 @@
|
|
|
989
997
|
required: c,
|
|
990
998
|
spellCheck: false,
|
|
991
999
|
value: p
|
|
992
|
-
}), !d && n().createElement(
|
|
1000
|
+
}), !d && i && n().createElement(Q, {
|
|
993
1001
|
"data-test": "textbox-swatch",
|
|
994
1002
|
onClick: this.handleButtonClick,
|
|
995
1003
|
value: h,
|
|
996
|
-
tabIndex: -1,
|
|
997
1004
|
style: {
|
|
998
1005
|
marginLeft: "1px"
|
|
999
1006
|
}
|
|
@@ -1021,7 +1028,7 @@
|
|
|
1021
1028
|
textAppend: true,
|
|
1022
1029
|
textPrepend: true,
|
|
1023
1030
|
textInline: true,
|
|
1024
|
-
inDropdown:
|
|
1031
|
+
inDropdown: true
|
|
1025
1032
|
});
|
|
1026
1033
|
},
|
|
1027
1034
|
expandButtonRef: this.focusExpandButton,
|
|
@@ -1041,8 +1048,11 @@
|
|
|
1041
1048
|
var b = m.isPrisma;
|
|
1042
1049
|
var g = this.getValue();
|
|
1043
1050
|
var x = this.state.displayValue;
|
|
1044
|
-
|
|
1045
|
-
|
|
1051
|
+
// hideInput defaults to true in Enterprise if prop is not provided
|
|
1052
|
+
var S = c !== null && c !== void 0 ? c : true;
|
|
1053
|
+
var w = b ? c : S;
|
|
1054
|
+
var k = n().createElement(ee, me({
|
|
1055
|
+
append: !w ? true : o,
|
|
1046
1056
|
"data-test": "color",
|
|
1047
1057
|
"data-test-value": x,
|
|
1048
1058
|
"aria-describedby": i,
|
|
@@ -1057,7 +1067,7 @@
|
|
|
1057
1067
|
}, f()(y, [].concat(ye(p()(r.propTypes)), [ // TS: trick omit
|
|
1058
1068
|
"onChange" ]))));
|
|
1059
1069
|
|
|
1060
|
-
return n().createElement(
|
|
1070
|
+
return n().createElement(J, null, n().createElement(E(), {
|
|
1061
1071
|
closeReasons: [ "clickAway", "escapeKey", "offScreen", "toggleClick" ],
|
|
1062
1072
|
onRequestClose: this.handleRequestClose,
|
|
1063
1073
|
onRequestOpen: this.handleRequestOpen,
|
|
@@ -1067,8 +1077,8 @@
|
|
|
1067
1077
|
},
|
|
1068
1078
|
retainFocus: true,
|
|
1069
1079
|
takeFocus: false,
|
|
1070
|
-
toggle:
|
|
1071
|
-
}, this.renderPalette()),
|
|
1080
|
+
toggle: k
|
|
1081
|
+
}, this.renderPalette()), !w && this.renderInput({
|
|
1072
1082
|
textAppend: false,
|
|
1073
1083
|
textPrepend: true,
|
|
1074
1084
|
textInline: true,
|
package/ComboBox.js
CHANGED
|
@@ -698,7 +698,8 @@
|
|
|
698
698
|
}
|
|
699
699
|
r === null || r === void 0 ? void 0 : r(e);
|
|
700
700
|
}));
|
|
701
|
-
ce(ae(i), "handleInputClick", (function() {
|
|
701
|
+
ce(ae(i), "handleInputClick", (function(e) {
|
|
702
|
+
e.stopPropagation();
|
|
702
703
|
if (!i.state.open && !i.props.disabled) {
|
|
703
704
|
i.open();
|
|
704
705
|
}
|
|
@@ -906,7 +907,7 @@
|
|
|
906
907
|
"data-test-value": a,
|
|
907
908
|
"data-test-open": i && !!r,
|
|
908
909
|
onFocus: this.handleInputFocus,
|
|
909
|
-
|
|
910
|
+
onInputClick: this.handleInputClick,
|
|
910
911
|
onChange: this.handleChange,
|
|
911
912
|
onKeyDown: this.handleInputKeyDown,
|
|
912
913
|
inputRef: this.handleInputMount,
|