@splunk/react-ui 4.36.0 → 4.38.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/Button.js +139 -132
- package/CHANGELOG.md +32 -0
- package/Color.js +1145 -977
- package/ComboBox.js +1 -2
- package/Date.js +21 -24
- package/Menu.js +161 -153
- package/Multiselect.js +17 -27
- package/Progress.js +202 -149
- package/RadioBar.js +18 -14
- package/ScreenReaderContent.js +138 -94
- package/Search.js +45 -42
- package/Select.js +89 -99
- package/Slider.js +128 -145
- package/Switch.js +123 -119
- package/Text.js +202 -199
- package/TextArea.js +21 -19
- package/package.json +4 -4
- package/types/src/Button/Button.d.ts +15 -5
- package/types/src/Color/Color.d.ts +3 -0
- package/types/src/Color/Palette.d.ts +4 -2
- package/types/src/ControlGroup/docs/examples/Error.d.ts +2 -2
- package/types/src/Date/Date.d.ts +0 -1
- package/types/src/Date/docs/examples/Error.d.ts +2 -0
- package/types/src/Link/Link.d.ts +3 -4
- package/types/src/Menu/Item.d.ts +6 -3
- package/types/src/Progress/Progress.d.ts +1 -1
- package/types/src/Search/Option.d.ts +7 -0
- package/types/src/Select/Select.d.ts +1 -1
- package/types/src/Select/SelectBase.d.ts +0 -1
- package/types/src/Slider/Slider.d.ts +0 -1
- package/types/src/Slider/docs/examples/Error.d.ts +2 -0
- package/types/src/Switch/Switch.d.ts +1 -0
- package/types/src/Text/Text.d.ts +6 -4
- package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Button/docs/examples/Selected.d.ts +0 -2
- package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
- /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
- /package/types/src/Progress/docs/examples/{prisma/Type.d.ts → Type.d.ts} +0 -0
package/Button.js
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ Y
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const n = require("react");
|
|
@@ -74,38 +74,43 @@
|
|
|
74
74
|
var l = e.n(o);
|
|
75
75
|
// CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
|
|
76
76
|
const s = require("@splunk/react-ui/Dropdown");
|
|
77
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
78
|
+
const c = require("@splunk/react-ui/ScreenReaderContent");
|
|
79
|
+
var p = e.n(c);
|
|
80
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
81
|
+
const u = require("@splunk/ui-utils/i18n");
|
|
77
82
|
// CONCATENATED MODULE: external "@splunk/ui-utils/style"
|
|
78
|
-
const
|
|
83
|
+
const f = require("@splunk/ui-utils/style");
|
|
79
84
|
// CONCATENATED MODULE: external "styled-components"
|
|
80
|
-
const
|
|
81
|
-
var
|
|
85
|
+
const d = require("styled-components");
|
|
86
|
+
var m = e.n(d);
|
|
82
87
|
// CONCATENATED MODULE: external "@splunk/react-ui/ButtonSimple"
|
|
83
|
-
const
|
|
84
|
-
var
|
|
88
|
+
const v = require("@splunk/react-ui/ButtonSimple");
|
|
89
|
+
var y = e.n(v);
|
|
85
90
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
86
|
-
const
|
|
91
|
+
const b = require("@splunk/themes");
|
|
87
92
|
// CONCATENATED MODULE: ./src/Button/ButtonStyles.ts
|
|
88
|
-
var
|
|
93
|
+
var h = m().span.withConfig({
|
|
89
94
|
displayName: "ButtonStyles__StyledIcon",
|
|
90
95
|
componentId: "eqxqs2-0"
|
|
91
96
|
})([ "display:flex;align-items:center;flex-shrink:0;font-size:", ";", "" ], (0,
|
|
92
|
-
|
|
97
|
+
b.pick)({
|
|
93
98
|
enterprise: "inherit",
|
|
94
99
|
prisma: {
|
|
95
100
|
comfortable: "21px",
|
|
96
101
|
compact: "16px"
|
|
97
102
|
}
|
|
98
|
-
}), (0,
|
|
103
|
+
}), (0, b.pickVariant)("$isStartIcon", {
|
|
99
104
|
true: {
|
|
100
|
-
enterprise: (0,
|
|
101
|
-
prisma: (0,
|
|
105
|
+
enterprise: (0, d.css)([ "padding-right:3px;" ]),
|
|
106
|
+
prisma: (0, d.css)([ "padding-right:8px;" ])
|
|
102
107
|
}
|
|
103
108
|
}));
|
|
104
|
-
var
|
|
109
|
+
var x = m()(y()).withConfig({
|
|
105
110
|
displayName: "ButtonStyles__StyledButtonSimple",
|
|
106
111
|
componentId: "eqxqs2-1"
|
|
107
|
-
})([ "vertical-align:middle;text-decoration:none;white-space:nowrap;flex-grow:1;min-width:0;max-width:100%;line-height:", ";min-height:", ";padding:", ";", " ", " &[data-inline]{:where(:not(a)){display:inline-block;}:where(a){display:inline-flex;}", "}[data-inline] + &&[data-inline]{margin-bottom:0;", "}" ],
|
|
108
|
-
|
|
112
|
+
})([ "vertical-align:middle;text-decoration:none;white-space:nowrap;flex-grow:1;min-width:0;max-width:100%;line-height:", ";min-height:", ";padding:", ";", " ", " &[data-inline]{:where(:not(a)){display:inline-block;}:where(a){display:inline-flex;}", "}[data-inline] + &&[data-inline]{margin-bottom:0;", "}" ], b.variables.lineHeight, b.variables.inputHeight, (0,
|
|
113
|
+
b.pick)({
|
|
109
114
|
enterprise: {
|
|
110
115
|
comfortable: "5px 14px",
|
|
111
116
|
compact: "2px 14px"
|
|
@@ -122,38 +127,38 @@
|
|
|
122
127
|
}
|
|
123
128
|
}), (function(e) {
|
|
124
129
|
var t = e.$inline, n = e.append, r = e.prepend;
|
|
125
|
-
return !t && !n && !r && (0,
|
|
130
|
+
return !t && !n && !r && (0, d.css)([ "width:100%;" ]);
|
|
126
131
|
}), (function(e) {
|
|
127
132
|
var t = e.$isIconOnly;
|
|
128
|
-
return t && (0,
|
|
129
|
-
|
|
133
|
+
return t && (0, d.css)([ "box-sizing:border-box;", ";width:", ";min-width:", ";" ], (0,
|
|
134
|
+
b.pick)({
|
|
130
135
|
enterprise: {
|
|
131
|
-
comfortable: (0,
|
|
132
|
-
compact: (0,
|
|
136
|
+
comfortable: (0, d.css)([ "padding:0 5px;" ]),
|
|
137
|
+
compact: (0, d.css)([ "padding:0 2px;" ])
|
|
133
138
|
},
|
|
134
139
|
prisma: {
|
|
135
|
-
comfortable: (0,
|
|
136
|
-
compact: (0,
|
|
140
|
+
comfortable: (0, d.css)([ "padding:0 calc(", " / 2 - 1px);" ], b.variables.inputHeight),
|
|
141
|
+
compact: (0, d.css)([ "padding:0 calc(", " / 2 - 1px);" ], b.variables.inputHeight)
|
|
137
142
|
}
|
|
138
|
-
}),
|
|
143
|
+
}), b.variables.inputHeight, b.variables.inputHeight);
|
|
139
144
|
}), (function(e) {
|
|
140
145
|
var t = e.$isIconOnly;
|
|
141
|
-
return t ? null : (0,
|
|
146
|
+
return t ? null : (0, d.css)([ "width:auto;" ]);
|
|
142
147
|
}), (function(e) {
|
|
143
148
|
var t = e.prepend;
|
|
144
|
-
return !t && (0,
|
|
149
|
+
return !t && (0, d.css)([ "margin-left:", ";" ], b.variables.spacingSmall);
|
|
145
150
|
}));
|
|
146
|
-
var
|
|
151
|
+
var g = m().span.withConfig({
|
|
147
152
|
displayName: "ButtonStyles__StyledContentWrapper",
|
|
148
153
|
componentId: "eqxqs2-2"
|
|
149
154
|
})([ "display:flex;flex-direction:row;justify-content:center;align-items:center;flex:1 0 auto;max-width:100%;box-sizing:border-box;padding:", ";" ], (0,
|
|
150
|
-
|
|
155
|
+
b.pick)({
|
|
151
156
|
enterprise: function e(t) {
|
|
152
157
|
var n = t.$error;
|
|
153
158
|
if (n) {
|
|
154
159
|
return "1px";
|
|
155
160
|
}
|
|
156
|
-
return (0,
|
|
161
|
+
return (0, b.pickVariant)("$appearance", {
|
|
157
162
|
default: "0",
|
|
158
163
|
secondary: "0",
|
|
159
164
|
destructive: "1px",
|
|
@@ -166,7 +171,7 @@
|
|
|
166
171
|
subtle: "0"
|
|
167
172
|
});
|
|
168
173
|
},
|
|
169
|
-
prisma: (0,
|
|
174
|
+
prisma: (0, b.pickVariant)("$appearance", {
|
|
170
175
|
default: 0,
|
|
171
176
|
secondary: "1px 0",
|
|
172
177
|
primary: "1px 0",
|
|
@@ -178,71 +183,66 @@
|
|
|
178
183
|
subtle: "1px 0"
|
|
179
184
|
})
|
|
180
185
|
}));
|
|
181
|
-
var
|
|
186
|
+
var w = m().span.withConfig({
|
|
182
187
|
displayName: "ButtonStyles__StyledLabel",
|
|
183
188
|
componentId: "eqxqs2-3"
|
|
184
189
|
})([ "text-overflow:ellipsis;overflow:hidden;flex:0 1 auto;&:not(:last-child){padding-right:", ";}", "" ], (0,
|
|
185
|
-
|
|
190
|
+
b.pick)({
|
|
186
191
|
enterprise: "3px",
|
|
187
192
|
prisma: "10px"
|
|
188
193
|
}), (function(e) {
|
|
189
194
|
var t = e.$isMenu;
|
|
190
|
-
return t && (0,
|
|
195
|
+
return t && (0, d.css)([ "flex:1 1 auto;text-align:left;" ]);
|
|
191
196
|
}));
|
|
192
|
-
var
|
|
197
|
+
var S = m().span.withConfig({
|
|
193
198
|
displayName: "ButtonStyles__StyledCaretWrapper",
|
|
194
199
|
componentId: "eqxqs2-4"
|
|
195
|
-
})([ "display:inline-flex;", "" ], (0,
|
|
200
|
+
})([ "display:inline-flex;", "" ], (0, b.pickVariant)("$disabled", {
|
|
196
201
|
false: {
|
|
197
|
-
prisma: (0,
|
|
198
|
-
true: (0,
|
|
199
|
-
false: (0,
|
|
202
|
+
prisma: (0, b.pickVariant)("$primary", {
|
|
203
|
+
true: (0, d.css)([ "color:", ";" ], b.variables.contentColorInverted),
|
|
204
|
+
false: (0, d.css)([ "color:", ";", ":hover > * > &,", ":active > * > &,{color:", ";}" ], b.variables.contentColorDefault,
|
|
200
205
|
/* sc-sel */
|
|
201
|
-
|
|
206
|
+
x,
|
|
202
207
|
/* sc-sel */
|
|
203
|
-
|
|
208
|
+
x, b.variables.contentColorDefault)
|
|
204
209
|
})
|
|
205
210
|
}
|
|
206
211
|
}));
|
|
207
212
|
// CONCATENATED MODULE: external "@splunk/react-icons/CaretSmallDown"
|
|
208
|
-
const
|
|
209
|
-
var
|
|
213
|
+
const k = require("@splunk/react-icons/CaretSmallDown");
|
|
214
|
+
var O = e.n(k);
|
|
210
215
|
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Caret"
|
|
211
|
-
const
|
|
212
|
-
var
|
|
216
|
+
const C = require("@splunk/react-icons/enterprise/Caret");
|
|
217
|
+
var q = e.n(C);
|
|
213
218
|
// CONCATENATED MODULE: ./src/Button/icons/CaretSmallDown.tsx
|
|
214
|
-
var
|
|
215
|
-
var t = (0,
|
|
219
|
+
var $ = function e() {
|
|
220
|
+
var t = (0, b.useSplunkTheme)(), n = t.isEnterprise, i = t.isCompact;
|
|
216
221
|
var a = i ? "20px" : "24px";
|
|
217
|
-
return n ? r().createElement(
|
|
222
|
+
return n ? r().createElement(q(), {
|
|
218
223
|
screenReaderText: null,
|
|
219
224
|
hideDefaultTooltip: true,
|
|
220
225
|
size: .5
|
|
221
|
-
}) : r().createElement(
|
|
226
|
+
}) : r().createElement(O(), {
|
|
222
227
|
height: a,
|
|
223
228
|
width: a
|
|
224
229
|
});
|
|
225
230
|
};
|
|
226
|
-
/* harmony default export */ const
|
|
231
|
+
/* harmony default export */ const _ = $;
|
|
227
232
|
// CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRightInset"
|
|
228
|
-
const
|
|
229
|
-
var
|
|
233
|
+
const I = require("@splunk/react-icons/ArrowSquareTopRightInset");
|
|
234
|
+
var E = e.n(I);
|
|
230
235
|
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/External"
|
|
231
|
-
const
|
|
232
|
-
var
|
|
233
|
-
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
234
|
-
const E = require("@splunk/ui-utils/i18n");
|
|
236
|
+
const P = require("@splunk/react-icons/enterprise/External");
|
|
237
|
+
var j = e.n(P);
|
|
235
238
|
// CONCATENATED MODULE: ./src/Button/icons/External.tsx
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
}) : r().createElement($(), {
|
|
242
|
-
"aria-label": P
|
|
243
|
-
}, r().createElement("title", null, P));
|
|
239
|
+
function N() {
|
|
240
|
+
var e = (0, b.useSplunkTheme)(), t = e.isEnterprise;
|
|
241
|
+
return t ? r().createElement(j(), {
|
|
242
|
+
screenReaderText: null
|
|
243
|
+
}) : r().createElement(E(), null);
|
|
244
244
|
}
|
|
245
|
-
/* harmony default export */ const
|
|
245
|
+
/* harmony default export */ const T = N;
|
|
246
246
|
// CONCATENATED MODULE: ./src/Button/Button.tsx
|
|
247
247
|
function M(e) {
|
|
248
248
|
"@babel/helpers - typeof";
|
|
@@ -257,8 +257,8 @@
|
|
|
257
257
|
}
|
|
258
258
|
return M(e);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
261
|
-
|
|
260
|
+
function R() {
|
|
261
|
+
R = Object.assign || function(e) {
|
|
262
262
|
for (var t = 1; t < arguments.length; t++) {
|
|
263
263
|
var n = arguments[t];
|
|
264
264
|
for (var r in n) {
|
|
@@ -269,14 +269,14 @@
|
|
|
269
269
|
}
|
|
270
270
|
return e;
|
|
271
271
|
};
|
|
272
|
-
return
|
|
272
|
+
return R.apply(this, arguments);
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function B(e, t) {
|
|
275
275
|
if (!(e instanceof t)) {
|
|
276
276
|
throw new TypeError("Cannot call a class as a function");
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function D(e, t) {
|
|
280
280
|
for (var n = 0; n < t.length; n++) {
|
|
281
281
|
var r = t[n];
|
|
282
282
|
r.enumerable = r.enumerable || false;
|
|
@@ -285,12 +285,12 @@
|
|
|
285
285
|
Object.defineProperty(e, r.key, r);
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
function
|
|
289
|
-
if (t)
|
|
290
|
-
if (n)
|
|
288
|
+
function H(e, t, n) {
|
|
289
|
+
if (t) D(e.prototype, t);
|
|
290
|
+
if (n) D(e, n);
|
|
291
291
|
return e;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function V(e, t) {
|
|
294
294
|
if (typeof t !== "function" && t !== null) {
|
|
295
295
|
throw new TypeError("Super expression must either be null or a function");
|
|
296
296
|
}
|
|
@@ -301,41 +301,41 @@
|
|
|
301
301
|
configurable: true
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
|
-
if (t)
|
|
304
|
+
if (t) z(e, t);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
|
|
306
|
+
function z(e, t) {
|
|
307
|
+
z = Object.setPrototypeOf || function e(t, n) {
|
|
308
308
|
t.__proto__ = n;
|
|
309
309
|
return t;
|
|
310
310
|
};
|
|
311
|
-
return
|
|
311
|
+
return z(e, t);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
var t =
|
|
313
|
+
function W(e) {
|
|
314
|
+
var t = F();
|
|
315
315
|
return function n() {
|
|
316
|
-
var r =
|
|
316
|
+
var r = G(e), i;
|
|
317
317
|
if (t) {
|
|
318
|
-
var a =
|
|
318
|
+
var a = G(this).constructor;
|
|
319
319
|
i = Reflect.construct(r, arguments, a);
|
|
320
320
|
} else {
|
|
321
321
|
i = r.apply(this, arguments);
|
|
322
322
|
}
|
|
323
|
-
return
|
|
323
|
+
return A(this, i);
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function A(e, t) {
|
|
327
327
|
if (t && (M(t) === "object" || typeof t === "function")) {
|
|
328
328
|
return t;
|
|
329
329
|
}
|
|
330
|
-
return
|
|
330
|
+
return L(e);
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function L(e) {
|
|
333
333
|
if (e === void 0) {
|
|
334
334
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
335
335
|
}
|
|
336
336
|
return e;
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function F() {
|
|
339
339
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
340
340
|
if (Reflect.construct.sham) return false;
|
|
341
341
|
if (typeof Proxy === "function") return true;
|
|
@@ -346,13 +346,13 @@
|
|
|
346
346
|
return false;
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
|
|
349
|
+
function G(e) {
|
|
350
|
+
G = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
|
|
351
351
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
352
352
|
};
|
|
353
|
-
return
|
|
353
|
+
return G(e);
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function J(e, t, n) {
|
|
356
356
|
if (t in e) {
|
|
357
357
|
Object.defineProperty(e, t, {
|
|
358
358
|
value: n,
|
|
@@ -365,7 +365,7 @@
|
|
|
365
365
|
}
|
|
366
366
|
return e;
|
|
367
367
|
}
|
|
368
|
-
var
|
|
368
|
+
var K = {
|
|
369
369
|
action: a().string,
|
|
370
370
|
appearance: a().oneOf([ "default", "secondary", "primary", "destructive", "pill", "toggle", "flat", "subtle" ]),
|
|
371
371
|
append: a().bool,
|
|
@@ -380,13 +380,13 @@
|
|
|
380
380
|
isMenu: a().bool,
|
|
381
381
|
label: a().node,
|
|
382
382
|
onClick: a().func,
|
|
383
|
-
openInNewContext: a().bool,
|
|
383
|
+
openInNewContext: a().oneOfType([ a().bool, a().string ]),
|
|
384
384
|
prepend: a().bool,
|
|
385
385
|
selected: a().bool,
|
|
386
386
|
to: a().string,
|
|
387
387
|
value: a().any
|
|
388
388
|
};
|
|
389
|
-
var
|
|
389
|
+
var Q = {
|
|
390
390
|
appearance: "default",
|
|
391
391
|
append: false,
|
|
392
392
|
disabled: false,
|
|
@@ -396,16 +396,17 @@
|
|
|
396
396
|
openInNewContext: false,
|
|
397
397
|
prepend: false
|
|
398
398
|
};
|
|
399
|
-
var
|
|
400
|
-
|
|
401
|
-
|
|
399
|
+
var U = (0, u._)("(Opens new window)");
|
|
400
|
+
var X = function(e) {
|
|
401
|
+
V(n, e);
|
|
402
|
+
var t = W(n);
|
|
402
403
|
// @docs-props-type ButtonPropsBase
|
|
403
404
|
function n(e) {
|
|
404
405
|
var r;
|
|
405
|
-
|
|
406
|
+
B(this, n);
|
|
406
407
|
r = t.call(this, e);
|
|
407
|
-
|
|
408
|
-
|
|
408
|
+
J(L(r), "component", null);
|
|
409
|
+
J(L(r), "handleClick", (function(e) {
|
|
409
410
|
var t = r.props, n = t.label, i = t.icon, a = t.value, o = t.action, l = t.onClick;
|
|
410
411
|
l === null || l === void 0 ? void 0 : l(e, {
|
|
411
412
|
label: n,
|
|
@@ -414,13 +415,13 @@
|
|
|
414
415
|
action: o
|
|
415
416
|
});
|
|
416
417
|
}));
|
|
417
|
-
|
|
418
|
+
J(L(r), "handleMount", (function(e) {
|
|
418
419
|
r.component = e;
|
|
419
420
|
}));
|
|
420
421
|
if (false) {}
|
|
421
422
|
return r;
|
|
422
423
|
}
|
|
423
|
-
|
|
424
|
+
H(n, [ {
|
|
424
425
|
key: "focus",
|
|
425
426
|
/**
|
|
426
427
|
* Places focus on the button.
|
|
@@ -432,57 +433,63 @@
|
|
|
432
433
|
}, {
|
|
433
434
|
key: "render",
|
|
434
435
|
value: function e() {
|
|
435
|
-
var t = this.props, n = t.action, i = t.appearance, a = t.append, o = t.className, s = t.classNamePrivate,
|
|
436
|
-
var q = this.props, $ = q.children,
|
|
437
|
-
if (!
|
|
438
|
-
|
|
436
|
+
var t = this.props, n = t.action, i = t.appearance, a = t.append, o = t.className, s = t.classNamePrivate, c = t.disabled, u = t.error, d = t.icon, m = t.inline, v = t.isMenu, y = t.onClick, b = t.openInNewContext, k = t.prepend, O = t.to, C = t.value;
|
|
437
|
+
var q = this.props, $ = q.children, I = q.label;
|
|
438
|
+
if (!I && l()($)) {
|
|
439
|
+
I = $;
|
|
439
440
|
$ = null;
|
|
440
441
|
}
|
|
441
|
-
var
|
|
442
|
-
var
|
|
442
|
+
var E = false;
|
|
443
|
+
var P;
|
|
444
|
+
if (b) {
|
|
445
|
+
E = true;
|
|
446
|
+
P = typeof b === "string" ? b : U;
|
|
447
|
+
}
|
|
448
|
+
var j = !!(d && !I && !v && !$);
|
|
449
|
+
var N = O && E || v || !!d;
|
|
443
450
|
|
|
444
|
-
return r().createElement(
|
|
445
|
-
"aria-haspopup":
|
|
451
|
+
return r().createElement(x, R({
|
|
452
|
+
"aria-haspopup": v || undefined,
|
|
446
453
|
"aria-invalid": u || undefined,
|
|
447
454
|
"data-test": "button"
|
|
448
455
|
}, this.props, {
|
|
449
|
-
className: (0,
|
|
456
|
+
className: (0, f.toClassName)(o, s),
|
|
450
457
|
"data-action": n,
|
|
451
|
-
"data-inline":
|
|
452
|
-
disabled:
|
|
458
|
+
"data-inline": m || null,
|
|
459
|
+
disabled: c,
|
|
453
460
|
append: a,
|
|
454
|
-
prepend:
|
|
455
|
-
$inline:
|
|
456
|
-
$hasPrismaIcon:
|
|
457
|
-
$isIconOnly:
|
|
458
|
-
$isMenu:
|
|
459
|
-
value:
|
|
460
|
-
onClick:
|
|
461
|
+
prepend: k,
|
|
462
|
+
$inline: m,
|
|
463
|
+
$hasPrismaIcon: N,
|
|
464
|
+
$isIconOnly: j,
|
|
465
|
+
$isMenu: v,
|
|
466
|
+
value: C,
|
|
467
|
+
onClick: y ? this.handleClick : undefined,
|
|
461
468
|
ref: this.handleMount,
|
|
462
|
-
openInNewContext:
|
|
469
|
+
openInNewContext: E,
|
|
463
470
|
appearance: i
|
|
464
|
-
}), r().createElement(
|
|
471
|
+
}), r().createElement(g, {
|
|
465
472
|
$appearance: i,
|
|
466
473
|
$error: u
|
|
467
|
-
},
|
|
468
|
-
$isStartIcon: !
|
|
469
|
-
},
|
|
474
|
+
}, d && r().createElement(h, {
|
|
475
|
+
$isStartIcon: !j
|
|
476
|
+
}, d), I && r().createElement(w, {
|
|
470
477
|
"data-test": "label",
|
|
471
|
-
$isMenu:
|
|
472
|
-
},
|
|
473
|
-
$disabled:
|
|
478
|
+
$isMenu: v
|
|
479
|
+
}, I), $, v && r().createElement(S, {
|
|
480
|
+
$disabled: c,
|
|
474
481
|
$primary: i === "primary"
|
|
475
|
-
}, r().createElement(
|
|
482
|
+
}, r().createElement(_, null)), b && r().createElement(h, {
|
|
476
483
|
$isStartIcon: false
|
|
477
|
-
}, r().createElement(
|
|
484
|
+
}, r().createElement(T, null), r().createElement(p(), null, P))));
|
|
478
485
|
}
|
|
479
486
|
} ]);
|
|
480
487
|
return n;
|
|
481
488
|
}(n.Component);
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
/* harmony default export */ const
|
|
489
|
+
J(X, "propTypes", K);
|
|
490
|
+
J(X, "defaultProps", Q);
|
|
491
|
+
J(X, s.legacyRefMode, true);
|
|
492
|
+
/* harmony default export */ const Y = X;
|
|
486
493
|
// CONCATENATED MODULE: ./src/Button/index.ts
|
|
487
494
|
module.exports = t;
|
|
488
495
|
/******/})();
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
4.38.0 - October 1, 2024
|
|
5
|
+
----------
|
|
6
|
+
New Features:
|
|
7
|
+
* `Slider` now supports the `error` prop in Enterprise themes (SUI-6580).
|
|
8
|
+
* `Search.Option` now supports the `matchRanges` prop (SUI-6383).
|
|
9
|
+
* `Text` now supports a new `"dimmed"` value for the `disabled` prop (SUI-6648).
|
|
10
|
+
* `Button` and `Menu.Item` support type `string` for `openInNewContext` to customize the default message (SUI-6662).
|
|
11
|
+
* `Date` now supports the `inputOnly` prop in Enterprise themes (SUI-6579).
|
|
12
|
+
|
|
13
|
+
Bug Fixes:
|
|
14
|
+
* `Color`'s palette now renders with the correct role and has an accessible name (SUI-6635).
|
|
15
|
+
* `Select` with `prefixLabel` or `suffixLabel` now has correct `aria-label` when option is selected (SUI-6642).
|
|
16
|
+
* `Select`'s `role` has been changed from `"button"` to `"combobox"` (SUI-6441).
|
|
17
|
+
* Screen reader now announces the `option` selection status and number within the `listbox`.
|
|
18
|
+
* `Color`'s interactive elements are additionally labelled by ControlGroup (SUI-6660).
|
|
19
|
+
* `Button` and `Menu.Item` now correctly informs users when a link will open in a new window in Prisma themes (SUI-6662).
|
|
20
|
+
* `Button` and `Menu.Item` have updated screen reader text better describing the `openInNewContext` behavior to users (SUI-6662).
|
|
21
|
+
|
|
22
|
+
Docs:
|
|
23
|
+
* New `List`, `Paginator`, `Table`, and `TextArea` component overviews.
|
|
24
|
+
|
|
25
|
+
4.37.0 - September 9, 2024
|
|
26
|
+
----------
|
|
27
|
+
New Features:
|
|
28
|
+
* `Progress` supports `success` and `error` values for the `type` prop in Enterprise themes (SUI-6492).
|
|
29
|
+
|
|
30
|
+
Bug Fixes:
|
|
31
|
+
* Updated `Progress` animation and style to improve contrast in Enterprise themes (SUI-6492).
|
|
32
|
+
* `RadioBar`'s active item now has appropriate contrast in the Prisma light theme (SUI-6609).
|
|
33
|
+
* `Switch` now shows the correct cursor type when `appearance="toggle"` is `disabled` (SUI-6612).
|
|
34
|
+
* `TextArea` with `startAdornment` or `endAdornment` will no longer prematurely wrap text (SUI-6613).
|
|
35
|
+
|
|
4
36
|
4.36.0 - September 3, 2024
|
|
5
37
|
----------
|
|
6
38
|
New Features:
|