@splunk/react-ui 4.31.0 → 4.33.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 +42 -45
- package/ButtonSimple.js +533 -302
- package/CHANGELOG.md +32 -1
- package/Card.js +22 -24
- package/Clickable.js +86 -76
- package/FormRows.js +229 -207
- package/MIGRATION.mdx +23 -0
- package/Menu.js +1 -1
- package/Modal.js +156 -131
- package/Multiselect.js +47 -33
- package/Select.js +236 -220
- package/TabBar.js +18 -18
- package/Text.js +21 -32
- package/package.json +6 -6
- package/types/src/Button/Button.d.ts +4 -4
- package/types/src/ButtonSimple/ButtonSimple.d.ts +8 -6
- package/types/src/ButtonSimple/mixin.d.ts +27 -0
- package/types/src/Card/Card.d.ts +13 -5
- package/types/src/Clickable/Clickable.d.ts +7 -10
- package/types/src/Clickable/NavigationProvider.d.ts +8 -1
- package/types/src/Date/Date.d.ts +2 -2
- package/types/src/Menu/Item.d.ts +0 -1
- package/types/src/Number/Number.d.ts +2 -2
- package/types/src/Select/Select.d.ts +6 -2
- package/types/src/Select/SelectBase.d.ts +6 -2
- package/types/src/Slider/Slider.d.ts +2 -2
- package/types/src/Text/docs/examples/Basic.d.ts +1 -9
- package/types/src/Text/docs/examples/Error.d.ts +2 -10
- package/types/src/Text/docs/examples/Inline.d.ts +1 -9
- package/types/src/Text/docs/examples/Multiline.d.ts +1 -9
- package/types/src/Text/docs/examples/Password.d.ts +1 -9
- package/types/src/Text/docs/examples/Search.d.ts +1 -9
- package/types/src/Button/docs/examples/prisma/Basic.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Block.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Disabled.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Icons.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Menus.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/To.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Truncated.d.ts +0 -2
- /package/types/src/{Button/docs/examples/prisma → Clickable/docs/examples}/Dimmed.d.ts +0 -0
package/ButtonSimple.js
CHANGED
|
@@ -9,26 +9,26 @@
|
|
|
9
9
|
/******/ (() => {
|
|
10
10
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
11
11
|
/******/ r.n = e => {
|
|
12
|
-
/******/ var
|
|
12
|
+
/******/ var a = e && e.__esModule ?
|
|
13
13
|
/******/ () => e["default"]
|
|
14
14
|
/******/ : () => e
|
|
15
15
|
/******/;
|
|
16
|
-
r.d(
|
|
17
|
-
a
|
|
16
|
+
r.d(a, {
|
|
17
|
+
a
|
|
18
18
|
});
|
|
19
|
-
/******/ return
|
|
19
|
+
/******/ return a;
|
|
20
20
|
/******/ };
|
|
21
21
|
/******/ })();
|
|
22
22
|
/******/
|
|
23
23
|
/******/ /* webpack/runtime/define property getters */
|
|
24
24
|
/******/ (() => {
|
|
25
25
|
/******/ // define getter functions for harmony exports
|
|
26
|
-
/******/ r.d = (e,
|
|
27
|
-
/******/ for (var
|
|
28
|
-
/******/ if (r.o(
|
|
29
|
-
/******/ Object.defineProperty(e,
|
|
26
|
+
/******/ r.d = (e, a) => {
|
|
27
|
+
/******/ for (var o in a) {
|
|
28
|
+
/******/ if (r.o(a, o) && !r.o(e, o)) {
|
|
29
|
+
/******/ Object.defineProperty(e, o, {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: o
|
|
31
|
+
get: a[o]
|
|
32
32
|
});
|
|
33
33
|
/******/ }
|
|
34
34
|
/******/ }
|
|
@@ -61,305 +61,520 @@
|
|
|
61
61
|
r.r(e);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
r.d(e, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ vr
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
|
-
const
|
|
68
|
-
var
|
|
67
|
+
const a = require("react");
|
|
68
|
+
var o = r.n(a);
|
|
69
69
|
// CONCATENATED MODULE: external "prop-types"
|
|
70
70
|
const i = require("prop-types");
|
|
71
71
|
var t = r.n(i);
|
|
72
|
-
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
73
|
-
const l = require("@splunk/ui-utils/i18n");
|
|
74
72
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
75
|
-
const
|
|
76
|
-
// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
77
|
-
const s = require("@splunk/react-ui/ScreenReaderContent");
|
|
78
|
-
var c = r.n(s);
|
|
73
|
+
const l = require("@splunk/themes");
|
|
79
74
|
// CONCATENATED MODULE: external "styled-components"
|
|
80
|
-
const
|
|
81
|
-
var
|
|
75
|
+
const n = require("styled-components");
|
|
76
|
+
var s = r.n(n);
|
|
82
77
|
// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
83
|
-
const
|
|
84
|
-
var
|
|
78
|
+
const c = require("@splunk/react-ui/Clickable");
|
|
79
|
+
var d = r.n(c);
|
|
80
|
+
// CONCATENATED MODULE: external "lodash/merge"
|
|
81
|
+
const v = require("lodash/merge");
|
|
82
|
+
var b = r.n(v);
|
|
83
|
+
// CONCATENATED MODULE: ./src/ButtonSimple/mixin.ts
|
|
84
|
+
function u(r) {
|
|
85
|
+
"@babel/helpers - typeof";
|
|
86
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
87
|
+
u = function r(e) {
|
|
88
|
+
return typeof e;
|
|
89
|
+
};
|
|
90
|
+
} else {
|
|
91
|
+
u = function r(e) {
|
|
92
|
+
return e && typeof Symbol === "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return u(r);
|
|
96
|
+
}
|
|
97
|
+
var p = [ "primary", "secondary", "destructive", "subtle" ];
|
|
98
|
+
/**
|
|
99
|
+
* These enterprise... values don't exist in Enterprise @splunk/themes
|
|
100
|
+
* They're provided here for TypeScript compatibility
|
|
101
|
+
*/ var f = {
|
|
102
|
+
active: {
|
|
103
|
+
dark: "rgba(0, 0, 0, 0.2)",
|
|
104
|
+
light: "rgba(0, 0, 0, 0.07)"
|
|
105
|
+
},
|
|
106
|
+
hover: {
|
|
107
|
+
dark: "rgba(255, 255, 255, 0.05)",
|
|
108
|
+
light: "rgba(0, 0, 0, 0.03)"
|
|
109
|
+
},
|
|
110
|
+
selected: {
|
|
111
|
+
dark: "rgba(255, 255, 255, 0.1)",
|
|
112
|
+
light: "rgba(0, 0, 0, 0.04)"
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
var g = {
|
|
116
|
+
dark: "#272a2f",
|
|
117
|
+
light: "#eeeeee"
|
|
118
|
+
};
|
|
119
|
+
var y = {
|
|
120
|
+
dark: "rgba(255, 255, 255, 0.15)",
|
|
121
|
+
light: "rgba(0, 0, 0, 0.1)"
|
|
122
|
+
};
|
|
123
|
+
function h(r) {
|
|
124
|
+
var e = "transparent";
|
|
125
|
+
var a = "transparent";
|
|
126
|
+
var o = (0, l.pick)({
|
|
127
|
+
enterprise: y,
|
|
128
|
+
prisma: l.variables.interactiveColorBackgroundDisabled
|
|
129
|
+
});
|
|
130
|
+
var i = (0, l.pick)({
|
|
131
|
+
enterprise: {
|
|
132
|
+
dark: l.mixins.overlayColors(y.dark, f.selected.dark),
|
|
133
|
+
light: l.mixins.overlayColors(y.light, f.selected.light)
|
|
134
|
+
},
|
|
135
|
+
prisma: l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected)
|
|
136
|
+
});
|
|
137
|
+
var t = "transparent";
|
|
138
|
+
var n = "transparent";
|
|
139
|
+
var s;
|
|
140
|
+
var c;
|
|
141
|
+
var d = l.variables.contentColorActive;
|
|
142
|
+
var v = l.variables.contentColorDisabled;
|
|
143
|
+
switch (r) {
|
|
144
|
+
case "primary":
|
|
145
|
+
{
|
|
146
|
+
e = l.variables.interactiveColorPrimary;
|
|
147
|
+
a = (0, l.pick)({
|
|
148
|
+
enterprise: {
|
|
149
|
+
light: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.active.light),
|
|
150
|
+
dark: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.active.dark)
|
|
151
|
+
},
|
|
152
|
+
prisma: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayActive)
|
|
153
|
+
});
|
|
154
|
+
t = (0, l.pick)({
|
|
155
|
+
enterprise: {
|
|
156
|
+
light: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.hover.light),
|
|
157
|
+
dark: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.hover.dark)
|
|
158
|
+
},
|
|
159
|
+
prisma: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayHover)
|
|
160
|
+
});
|
|
161
|
+
n = (0, l.pick)({
|
|
162
|
+
enterprise: {
|
|
163
|
+
light: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.selected.light),
|
|
164
|
+
dark: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.selected.dark)
|
|
165
|
+
},
|
|
166
|
+
prisma: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlaySelected)
|
|
167
|
+
});
|
|
168
|
+
d = l.variables.contentColorInverted;
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
case "destructive":
|
|
173
|
+
{
|
|
174
|
+
e = l.variables.accentColorNegative;
|
|
175
|
+
a = (0, l.pick)({
|
|
176
|
+
enterprise: {
|
|
177
|
+
light: l.mixins.overlayColors(l.variables.accentColorNegative, f.active.light),
|
|
178
|
+
dark: l.mixins.overlayColors(l.variables.accentColorNegative, f.active.dark)
|
|
179
|
+
},
|
|
180
|
+
prisma: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayActive)
|
|
181
|
+
});
|
|
182
|
+
t = (0, l.pick)({
|
|
183
|
+
enterprise: {
|
|
184
|
+
light: l.mixins.overlayColors(l.variables.accentColorNegative, f.hover.light),
|
|
185
|
+
dark: l.mixins.overlayColors(l.variables.accentColorNegative, f.hover.dark)
|
|
186
|
+
},
|
|
187
|
+
prisma: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayHover)
|
|
188
|
+
});
|
|
189
|
+
n = (0, l.pick)({
|
|
190
|
+
enterprise: {
|
|
191
|
+
light: l.mixins.overlayColors(l.variables.accentColorNegative, f.selected.light),
|
|
192
|
+
dark: l.mixins.overlayColors(l.variables.accentColorNegative, f.selected.dark)
|
|
193
|
+
},
|
|
194
|
+
prisma: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlaySelected)
|
|
195
|
+
});
|
|
196
|
+
d = l.variables.contentColorInverted;
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
case "secondary":
|
|
201
|
+
s = l.variables.interactiveColorBorder;
|
|
202
|
+
c = l.variables.interactiveColorBorderDisabled;
|
|
203
|
+
e = (0, l.pick)({
|
|
204
|
+
enterprise: g,
|
|
205
|
+
prisma: l.variables.interactiveColorBackground
|
|
206
|
+
});
|
|
207
|
+
a = (0, l.pick)({
|
|
208
|
+
enterprise: f.active,
|
|
209
|
+
prisma: l.variables.interactiveColorOverlayActive
|
|
210
|
+
});
|
|
211
|
+
t = (0, l.pick)({
|
|
212
|
+
enterprise: f.hover,
|
|
213
|
+
prisma: l.variables.interactiveColorOverlayHover
|
|
214
|
+
});
|
|
215
|
+
n = (0, l.pick)({
|
|
216
|
+
enterprise: f.selected,
|
|
217
|
+
prisma: l.variables.interactiveColorOverlaySelected
|
|
218
|
+
});
|
|
219
|
+
break;
|
|
220
|
+
|
|
221
|
+
case "subtle":
|
|
222
|
+
// TODO: SUI-6304 this should be interactiveColorAccent once that variable is introduced in SUI 5
|
|
223
|
+
d = l.variables.interactiveColorPrimary;
|
|
224
|
+
a = (0, l.pick)({
|
|
225
|
+
enterprise: f.active,
|
|
226
|
+
prisma: l.variables.interactiveColorOverlayActive
|
|
227
|
+
});
|
|
228
|
+
t = (0, l.pick)({
|
|
229
|
+
enterprise: f.hover,
|
|
230
|
+
prisma: l.variables.interactiveColorOverlayHover
|
|
231
|
+
});
|
|
232
|
+
n = (0, l.pick)({
|
|
233
|
+
enterprise: f.selected,
|
|
234
|
+
prisma: l.variables.interactiveColorOverlaySelected
|
|
235
|
+
});
|
|
236
|
+
break;
|
|
237
|
+
|
|
238
|
+
default:
|
|
239
|
+
}
|
|
240
|
+
var b = {
|
|
241
|
+
background: e,
|
|
242
|
+
backgroundActive: a,
|
|
243
|
+
backgroundDisabled: o,
|
|
244
|
+
backgroundDisabledSelected: i,
|
|
245
|
+
backgroundHover: t,
|
|
246
|
+
backgroundSelected: n,
|
|
247
|
+
borderColor: s,
|
|
248
|
+
borderColorDisabled: c,
|
|
249
|
+
color: d,
|
|
250
|
+
colorDisabled: v
|
|
251
|
+
};
|
|
252
|
+
return b;
|
|
253
|
+
}
|
|
254
|
+
function k(r, e) {
|
|
255
|
+
var a = typeof r === "string" && p.includes(r) ? r : undefined;
|
|
256
|
+
var o = {};
|
|
257
|
+
if (a && e !== undefined) {
|
|
258
|
+
o = e;
|
|
259
|
+
} else if (a === undefined && u(r) === "object" && e === undefined) {
|
|
260
|
+
o = r;
|
|
261
|
+
}
|
|
262
|
+
var i = h(a);
|
|
263
|
+
var t = b()(i, o), s = t.background, c = t.backgroundActive, d = t.backgroundDisabled, v = t.backgroundDisabledSelected, f = t.backgroundHover, g = t.backgroundSelected, y = t.borderColor, k = t.borderColorDisabled, m = t.color, C = t.colorDisabled;
|
|
264
|
+
var x = s != null && s !== "transparent";
|
|
265
|
+
return function() {
|
|
266
|
+
return (0, n.css)([ "border-radius:", ";", ";", " ", " cursor:pointer;position:relative;&:focus,&:hover{z-index:3;}&:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;&:hover{background-color:", ";}&:active{background-color:", ";transition:none;}", "}&:focus{box-shadow:", ";}&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";cursor:not-allowed;", "}" ], l.variables.borderRadius, (function() {
|
|
267
|
+
return y && (0, n.css)([ "border:1px solid ", ";" ], y);
|
|
268
|
+
}), (function(r) {
|
|
269
|
+
var e = r.$append;
|
|
270
|
+
return e && (0, n.css)([ "border-top-right-radius:0.1px;border-bottom-right-radius:0.1px;border-right:none;" ]);
|
|
271
|
+
}), (function(r) {
|
|
272
|
+
var e = r.$prepend;
|
|
273
|
+
return e && (0, n.css)([ "border-top-left-radius:0.1px;border-bottom-left-radius:0.1px;" ]);
|
|
274
|
+
}), s, m, f, c, (function(r) {
|
|
275
|
+
var e = r.$selected;
|
|
276
|
+
return e && (0, n.css)([ "background-color:", ";" ], g);
|
|
277
|
+
}), l.variables.focusShadow, k, C, (function(r) {
|
|
278
|
+
return x && (0, n.css)([ "background-color:", ";" ], r ? v
|
|
279
|
+
/* TODO: this isn't defined in SUI 5 themes yet */ : d);
|
|
280
|
+
}));
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
/* harmony default export */ const m = k;
|
|
85
284
|
// CONCATENATED MODULE: ./src/ButtonSimple/prismaStyles.ts
|
|
86
|
-
var
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
285
|
+
var C = (0, n.css)([ "", " &:not([disabled],[aria-disabled='true']){&:focus{background-color:", ";}&:hover{border-color:", ";", "}", " ", "}&[disabled],&[aria-disabled='true']{", "}" ], (0,
|
|
286
|
+
l.pickVariant)("$variant", {
|
|
287
|
+
secondary: (0, n.css)([ "", " font-weight:", ";" ], m("subtle", {
|
|
288
|
+
color: l.variables.contentColorActive
|
|
289
|
+
}), l.variables.fontWeightSemiBold),
|
|
290
|
+
subtle: (0, n.css)([ "", " font-weight:", ";" ], m("subtle", {
|
|
291
|
+
color: l.variables.contentColorActive
|
|
292
|
+
}), l.variables.fontWeightSemiBold),
|
|
293
|
+
default: (0, n.css)([ "", " font-weight:", ";" ], m("secondary", {
|
|
294
|
+
background: "transparent"
|
|
295
|
+
}), l.variables.fontWeightSemiBold),
|
|
296
|
+
toggle: (0, n.css)([ "", " font-weight:normal;" ], m("secondary", {
|
|
297
|
+
background: "transparent"
|
|
298
|
+
}))
|
|
299
|
+
}), l.variables.interactiveColorOverlayHover, l.variables.interactiveColorBorderHover, (0,
|
|
300
|
+
l.pickVariant)("$variant", {
|
|
301
|
+
secondary: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow),
|
|
302
|
+
default: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow),
|
|
303
|
+
subtle: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow)
|
|
103
304
|
}), (function(r) {
|
|
104
305
|
var e = r.$selected;
|
|
105
|
-
return e && (0,
|
|
306
|
+
return e && (0, n.css)([ "border-color:", ";&:hover{background-color:", ";}" ], l.variables.interactiveColorBorderDisabled, l.mixins.overlayColors(l.variables.interactiveColorOverlaySelected, l.variables.interactiveColorOverlayHover));
|
|
106
307
|
}), (function(r) {
|
|
107
308
|
var e = r.$error;
|
|
108
|
-
return e && (0,
|
|
109
|
-
}),
|
|
309
|
+
return e && (0, n.css)([ "border-color:", ";&:hover{border-color:", ";}" ], l.variables.accentColorNegative, l.variables.accentColorNegative);
|
|
310
|
+
}), (function(r) {
|
|
110
311
|
var e = r.$selected;
|
|
111
|
-
return e && (0,
|
|
112
|
-
}), n.variables.focusShadow);
|
|
113
|
-
var y = (0, d.css)([ "&[disabled],&[aria-disabled='true']{border-color:", ";color:", ";background-color:", ";cursor:not-allowed;", "}" ], n.variables.interactiveColorBorderDisabled, n.variables.contentColorDisabled, n.variables.interactiveColorBackgroundDisabled, (function(r) {
|
|
114
|
-
return r && (0, d.css)([ "background-color:", ";" ], n.mixins.overlayColors(n.variables.interactiveColorBackgroundDisabled, n.variables.interactiveColorOverlaySelected));
|
|
312
|
+
return e && (0, n.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
|
|
115
313
|
}));
|
|
116
|
-
var
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
314
|
+
var x = (0, n.css)([ "", " font-weight:", ";&:focus{background-color:", ";}&:hover{box-shadow:", ";}" ], (0,
|
|
315
|
+
l.pickVariant)("$variant", {
|
|
316
|
+
primary: m("primary"),
|
|
317
|
+
destructive: m("destructive"),
|
|
318
|
+
flat: m({
|
|
319
|
+
// this is intentional - the background had always been applying the $selected style
|
|
320
|
+
// since beccfde78f787861217353e9149ce213bee0270 so keeping this for visual consistency
|
|
321
|
+
background: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlaySelected),
|
|
322
|
+
backgroundActive: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayActive),
|
|
323
|
+
backgroundHover: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover),
|
|
324
|
+
backgroundSelected: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlaySelected)
|
|
125
325
|
})
|
|
126
|
-
}), (0,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
prismaDestructive: n.mixins.overlayColors(n.variables.accentColorNegative, n.variables.interactiveColorOverlayActive)
|
|
132
|
-
}), n.variables.focusShadow, y);
|
|
133
|
-
var k = (0, d.css)([ "", " font-weight:", ";border-radius:", ";", " &:not([disabled],[aria-disabled='true']){color:", ";background-color:", ";transition:background-color 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{background-color:", ";box-shadow:", ";}&:active{background-color:", ";transition:none;}&:focus{background-color:", ";}}&:not([disabled]){&:focus{box-shadow:", ";}}", "" ], p, n.variables.fontWeightSemiBold, n.variables.borderRadius, f, n.variables.contentColorActive, n.variables.interactiveColorBackground, (function(r) {
|
|
134
|
-
return r && (0, d.css)([ "background-color:", ";" ], n.mixins.overlayColors(n.variables.interactiveColorBackground, n.variables.interactiveColorOverlaySelected));
|
|
135
|
-
}), n.mixins.overlayColors(n.variables.interactiveColorBackground, n.variables.interactiveColorOverlayHover), n.variables.hoverShadow, n.mixins.overlayColors(n.variables.interactiveColorBackground, n.variables.interactiveColorOverlayActive), n.mixins.overlayColors(n.variables.interactiveColorBackground, n.variables.interactiveColorOverlayHover), n.variables.focusShadow, y);
|
|
326
|
+
}), l.variables.fontWeightSemiBold, (0, l.pickVariant)("$variant", {
|
|
327
|
+
primary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayHover),
|
|
328
|
+
destructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayHover),
|
|
329
|
+
flat: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover)
|
|
330
|
+
}), l.variables.hoverShadow);
|
|
136
331
|
// CONCATENATED MODULE: ./src/ButtonSimple/enterpriseStyles.ts
|
|
137
|
-
var
|
|
332
|
+
var w = "#1A8929";
|
|
138
333
|
// SUI-2439 to meet WCAG AA compliance
|
|
139
|
-
var
|
|
334
|
+
var S = "#235823";
|
|
140
335
|
// SUI-2439 to meet WCAG AA compliance
|
|
141
|
-
var
|
|
142
|
-
var
|
|
336
|
+
var O = (0, n.css)([ "border-radius:", ";cursor:pointer;position:relative;&:focus{z-index:3;}" ], l.variables.borderRadius);
|
|
337
|
+
var $ = (0, n.css)([ "", " ", "" ], (function(r) {
|
|
143
338
|
var e = r.$append;
|
|
144
|
-
return e && (0,
|
|
339
|
+
return e && (0, n.css)([ "border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
|
|
145
340
|
}), (function(r) {
|
|
146
341
|
var e = r.$prepend;
|
|
147
|
-
return e && (0,
|
|
342
|
+
return e && (0, n.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
|
|
148
343
|
}));
|
|
149
|
-
var
|
|
150
|
-
var
|
|
151
|
-
var
|
|
152
|
-
|
|
153
|
-
light: (0,
|
|
154
|
-
dark:
|
|
155
|
-
}),
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}), (0,
|
|
159
|
-
light:
|
|
160
|
-
dark:
|
|
161
|
-
}), (0,
|
|
162
|
-
light:
|
|
163
|
-
dark:
|
|
164
|
-
}), (0,
|
|
165
|
-
light: (0,
|
|
166
|
-
dark: (0,
|
|
344
|
+
var D = "inset 0 -1px 0 rgba(0, 0, 0, 0.1)";
|
|
345
|
+
var P = "inset 0 1px 0 rgba(0, 0, 0, 0.1)";
|
|
346
|
+
var j = (0, n.css)([ "", ";border:", ";", ";font-weight:", ";&:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", ";", " &:hover{background-color:", ";box-shadow:", ";}&:active{transition:none;background-color:", ";border-color:", ";", ";}&:focus{", " ", "}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{cursor:not-allowed;color:", ";background-color:", ";border-color:", ";", "}" ], O, (0,
|
|
347
|
+
l.pick)({
|
|
348
|
+
light: (0, n.css)([ "1px solid ", "" ], l.variables.gray60),
|
|
349
|
+
dark: l.variables.border
|
|
350
|
+
}), $, (0, l.pickVariant)("$variant", {
|
|
351
|
+
default: "normal",
|
|
352
|
+
secondary: l.variables.fontWeightSemiBold
|
|
353
|
+
}), (0, l.pick)({
|
|
354
|
+
light: l.variables.gray98,
|
|
355
|
+
dark: l.variables.gray45
|
|
356
|
+
}), (0, l.pick)({
|
|
357
|
+
light: l.variables.gray45,
|
|
358
|
+
dark: l.variables.white
|
|
359
|
+
}), (0, l.pick)({
|
|
360
|
+
light: (0, n.css)([ "box-shadow:", ";" ], D),
|
|
361
|
+
dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray30)
|
|
167
362
|
}), (function(r) {
|
|
168
363
|
var e = r.$selected;
|
|
169
|
-
return e && (0,
|
|
170
|
-
|
|
171
|
-
light:
|
|
172
|
-
dark: (0,
|
|
173
|
-
}), (0,
|
|
174
|
-
light:
|
|
175
|
-
dark:
|
|
176
|
-
}), (0,
|
|
177
|
-
light:
|
|
178
|
-
dark:
|
|
364
|
+
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ], (0,
|
|
365
|
+
l.pick)({
|
|
366
|
+
light: P,
|
|
367
|
+
dark: (0, n.css)([ "inset 0 1px 0 ", "" ], l.variables.black)
|
|
368
|
+
}), (0, l.pick)({
|
|
369
|
+
light: l.variables.gray92,
|
|
370
|
+
dark: l.variables.gray22
|
|
371
|
+
}), (0, l.pick)({
|
|
372
|
+
light: l.variables.gray60,
|
|
373
|
+
dark: l.variables.gray20
|
|
179
374
|
}));
|
|
180
|
-
}), (0,
|
|
375
|
+
}), (0, l.pick)({
|
|
181
376
|
light: "#ebeeef",
|
|
182
|
-
dark:
|
|
183
|
-
}), (0,
|
|
184
|
-
light:
|
|
185
|
-
dark: (0,
|
|
186
|
-
}), (0,
|
|
187
|
-
light:
|
|
188
|
-
dark:
|
|
189
|
-
}), (0,
|
|
190
|
-
light:
|
|
191
|
-
dark:
|
|
192
|
-
}), (0,
|
|
193
|
-
dark: (0,
|
|
377
|
+
dark: l.variables.gray30
|
|
378
|
+
}), (0, l.pick)({
|
|
379
|
+
light: D,
|
|
380
|
+
dark: (0, n.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray25)
|
|
381
|
+
}), (0, l.pick)({
|
|
382
|
+
light: l.variables.gray92,
|
|
383
|
+
dark: l.variables.gray22
|
|
384
|
+
}), (0, l.pick)({
|
|
385
|
+
light: l.variables.gray60,
|
|
386
|
+
dark: l.variables.gray20
|
|
387
|
+
}), (0, l.pick)({
|
|
388
|
+
dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray22)
|
|
194
389
|
}), (function(r) {
|
|
195
390
|
var e = r.$append;
|
|
196
|
-
return e && (0,
|
|
197
|
-
light:
|
|
198
|
-
dark: (0,
|
|
199
|
-
}),
|
|
391
|
+
return e && (0, n.css)([ "box-shadow:", ",", ",inset -1px 0 0 ", ";" ], (0, l.pick)({
|
|
392
|
+
light: D,
|
|
393
|
+
dark: (0, n.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray30)
|
|
394
|
+
}), l.variables.focusShadow, l.variables.borderColor);
|
|
200
395
|
}), (function(r) {
|
|
201
|
-
var e = r.$append,
|
|
202
|
-
return e &&
|
|
203
|
-
light: (0,
|
|
204
|
-
dark: (0,
|
|
396
|
+
var e = r.$append, a = r.$selected;
|
|
397
|
+
return e && a && (0, l.pick)({
|
|
398
|
+
light: (0, n.css)([ "box-shadow:", ",", ",", ",inset -1px 0 0 ", ";" ], D, P, l.variables.focusShadow, l.variables.borderColor),
|
|
399
|
+
dark: (0, n.css)([ "box-shadow:inset 0 1px 0 ", ",", ",inset -1px 0 0 ", ";" ], l.variables.black, l.variables.focusShadow, l.variables.borderColor)
|
|
205
400
|
});
|
|
206
|
-
}), (0,
|
|
207
|
-
light:
|
|
208
|
-
dark: (0,
|
|
209
|
-
}),
|
|
210
|
-
light:
|
|
211
|
-
dark:
|
|
212
|
-
}), (0,
|
|
213
|
-
light:
|
|
214
|
-
dark:
|
|
401
|
+
}), (0, l.pick)({
|
|
402
|
+
light: D,
|
|
403
|
+
dark: (0, n.css)([ "inset 0 -1px 0 ", "" ], l.variables.gray30)
|
|
404
|
+
}), l.variables.focusShadow, l.variables.textDisabledColor, (0, l.pick)({
|
|
405
|
+
light: l.variables.gray96,
|
|
406
|
+
dark: l.variables.gray30
|
|
407
|
+
}), (0, l.pick)({
|
|
408
|
+
light: l.variables.borderLightColor,
|
|
409
|
+
dark: l.variables.gray30
|
|
215
410
|
}), (function(r) {
|
|
216
411
|
var e = r.$selected;
|
|
217
|
-
return e && (0,
|
|
218
|
-
light: (0,
|
|
219
|
-
dark: (0,
|
|
412
|
+
return e && (0, l.pick)({
|
|
413
|
+
light: (0, n.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ], P, l.variables.gray92, l.variables.gray80),
|
|
414
|
+
dark: (0, n.css)([ "box-shadow:inset 0 1px 0 ", ";background-color:", ";border-color:", ";" ], l.variables.black, l.variables.gray22, l.variables.gray20)
|
|
220
415
|
});
|
|
221
416
|
}));
|
|
222
|
-
var
|
|
223
|
-
var
|
|
224
|
-
var
|
|
417
|
+
var A = "inset 0 -2px 0 rgba(0, 0, 0, 0.1)";
|
|
418
|
+
var B = "inset 0 2px 0 rgba(0, 0, 0, 0.1)";
|
|
419
|
+
var N = (0, n.css)([ "", ";font-weight:", ";", " &:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{&:active{background-color:", ";transition:none;}}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{color:", ";background-color:", ";cursor:not-allowed;", "}" ], O, l.variables.fontWeightSemiBold, $, w, l.variables.white, A, (function(r) {
|
|
225
420
|
var e = r.$selected;
|
|
226
|
-
return e && (0,
|
|
421
|
+
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ], B, S);
|
|
227
422
|
}), (function(r) {
|
|
228
423
|
var e = r.$prepend;
|
|
229
|
-
return e && (0,
|
|
230
|
-
}),
|
|
424
|
+
return e && (0, n.css)([ "border-left:1px solid ", ";" ], w);
|
|
425
|
+
}), l.variables.brandColorD50, l.variables.brandColorD30, l.variables.brandColorD30, A, l.variables.focusShadow, l.variables.brandColorL30, l.variables.brandColorL10, (function(r) {
|
|
231
426
|
var e = r.$selected;
|
|
232
|
-
return e && (0,
|
|
427
|
+
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ], B, l.variables.brandColorD20);
|
|
233
428
|
}));
|
|
234
|
-
var
|
|
429
|
+
var H = (0, n.css)([ "", ";font-weight:", ";", " &:not([disabled],[aria-disabled='true']){background-color:", ";color:", ";box-shadow:", ";transition:background-image 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " ", " &:hover{background-color:", ";}&:active{background-color:", ";transition:none;}&:focus{&:active{background-color:", ";transition:none;}}}&:not([disabled]){&:focus{box-shadow:", ",", ";}}&[disabled],&[aria-disabled='true']{color:", ";background-color:", ";cursor:not-allowed;", "}" ], O, l.variables.fontWeightSemiBold, $, l.variables.errorColorD10, l.variables.white, A, (function(r) {
|
|
235
430
|
var e = r.$selected;
|
|
236
|
-
return e && (0,
|
|
431
|
+
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ], B, l.variables.errorColorD30);
|
|
237
432
|
}), (function(r) {
|
|
238
433
|
var e = r.$prepend;
|
|
239
|
-
return e && (0,
|
|
240
|
-
}),
|
|
434
|
+
return e && (0, n.css)([ "border-left:1px solid ", ";" ], l.variables.errorColorD30);
|
|
435
|
+
}), l.variables.errorColorD30, l.variables.errorColorD40, l.variables.errorColorD40, A, l.variables.focusShadow, l.variables.errorColorL10, l.variables.errorColorD10, (function(r) {
|
|
241
436
|
var e = r.$selected;
|
|
242
|
-
return e && (0,
|
|
437
|
+
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ], B, l.variables.errorColorD40);
|
|
243
438
|
}));
|
|
244
|
-
var
|
|
245
|
-
|
|
246
|
-
light:
|
|
247
|
-
dark:
|
|
439
|
+
var _ = (0, n.css)([ "", ";color:", ";border:1px solid transparent;&:not([disabled],[aria-disabled='true']){transition:background-color 0.2s,border 0.2s,box-shadow 0.2s,text-decoration 0.2s;", " &:hover{color:", ";background-color:", ";border-color:", ";}", " &:focus{color:", ";}&:active,&[aria-expanded='true']{background-color:", ";transition:none;}}&:not([disabled]){&:focus{box-shadow:", ";}}&[disabled],&[aria-disabled='true']{color:", ";cursor:not-allowed;", "}" ], O, (0,
|
|
440
|
+
l.pick)({
|
|
441
|
+
light: l.variables.gray45,
|
|
442
|
+
dark: l.variables.white
|
|
248
443
|
}), (function(r) {
|
|
249
444
|
var e = r.$selected;
|
|
250
|
-
return e && (0,
|
|
251
|
-
}), (0,
|
|
252
|
-
light:
|
|
253
|
-
dark:
|
|
254
|
-
}),
|
|
255
|
-
light:
|
|
256
|
-
dark:
|
|
445
|
+
return e && (0, n.css)([ "border-color:", ";" ], l.variables.accentColor);
|
|
446
|
+
}), (0, l.pick)({
|
|
447
|
+
light: l.variables.linkColor,
|
|
448
|
+
dark: l.variables.white
|
|
449
|
+
}), l.variables.backgroundColorHover, (0, l.pick)({
|
|
450
|
+
light: l.variables.gray60,
|
|
451
|
+
dark: l.variables.borderColor
|
|
257
452
|
}), (function(r) {
|
|
258
453
|
var e = r.$error;
|
|
259
|
-
return e && (0,
|
|
260
|
-
}), (0,
|
|
261
|
-
light:
|
|
262
|
-
dark:
|
|
263
|
-
}), (0,
|
|
264
|
-
light:
|
|
265
|
-
dark:
|
|
266
|
-
}),
|
|
454
|
+
return e && (0, n.css)([ "&,&:hover{color:", ";}" ], l.variables.errorColor);
|
|
455
|
+
}), (0, l.pick)({
|
|
456
|
+
light: l.variables.linkColor,
|
|
457
|
+
dark: l.variables.white
|
|
458
|
+
}), (0, l.pick)({
|
|
459
|
+
light: l.variables.gray92,
|
|
460
|
+
dark: l.variables.gray22
|
|
461
|
+
}), l.variables.focusShadow, l.variables.textDisabledColor, (function(r) {
|
|
267
462
|
var e = r.$selected;
|
|
268
|
-
return e && (0,
|
|
463
|
+
return e && (0, n.css)([ "border-color:", ";" ], l.variables.borderLightColor);
|
|
269
464
|
}));
|
|
270
465
|
// CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimpleStyles.ts
|
|
271
|
-
var
|
|
466
|
+
var T = s()(d()).withConfig({
|
|
272
467
|
displayName: "ButtonSimpleStyles__StyledClickable",
|
|
273
468
|
componentId: "vlarwe-0"
|
|
274
|
-
})([ "", "" ], (
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
469
|
+
})([ "", " ", "" ], (function(r) {
|
|
470
|
+
var e = r.to;
|
|
471
|
+
return e ? (0, n.css)([ "", " align-items:center;justify-content:center;" ], l.mixins.reset("flex")) : (0,
|
|
472
|
+
n.css)([ "", "" ], l.mixins.reset("block"));
|
|
473
|
+
}), (0, l.pick)({
|
|
474
|
+
enterprise: (0, l.pickVariant)("$variant", {
|
|
475
|
+
// the four main styles
|
|
476
|
+
primary: N,
|
|
477
|
+
secondary: j,
|
|
478
|
+
destructive: H,
|
|
479
|
+
subtle: _,
|
|
480
|
+
// same as "secondary"
|
|
481
|
+
default: j,
|
|
482
|
+
// "pill" is an Enterprise-only style
|
|
483
|
+
pill: _,
|
|
484
|
+
// fallbacks for styles unsupported by Enterprise
|
|
485
|
+
toggle: j,
|
|
486
|
+
flat: j
|
|
487
|
+
}),
|
|
488
|
+
prisma: (0, l.pickVariant)("$variant", {
|
|
489
|
+
// the four main styles
|
|
490
|
+
primary: x,
|
|
491
|
+
secondary: C,
|
|
492
|
+
destructive: x,
|
|
493
|
+
subtle: C,
|
|
494
|
+
// same as "secondary"
|
|
495
|
+
default: C,
|
|
496
|
+
// "toggle" and "flat" are Prisma-only styles
|
|
497
|
+
toggle: C,
|
|
498
|
+
flat: x,
|
|
499
|
+
// fallback for "pill" which is not supported by Prisma
|
|
500
|
+
pill: C
|
|
501
|
+
})
|
|
287
502
|
}));
|
|
288
503
|
// CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimple.tsx
|
|
289
|
-
function
|
|
504
|
+
function I(r) {
|
|
290
505
|
"@babel/helpers - typeof";
|
|
291
506
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
292
|
-
|
|
507
|
+
I = function r(e) {
|
|
293
508
|
return typeof e;
|
|
294
509
|
};
|
|
295
510
|
} else {
|
|
296
|
-
|
|
511
|
+
I = function r(e) {
|
|
297
512
|
return e && typeof Symbol === "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
298
513
|
};
|
|
299
514
|
}
|
|
300
|
-
return
|
|
515
|
+
return I(r);
|
|
301
516
|
}
|
|
302
|
-
function
|
|
303
|
-
|
|
517
|
+
function R() {
|
|
518
|
+
R = Object.assign || function(r) {
|
|
304
519
|
for (var e = 1; e < arguments.length; e++) {
|
|
305
|
-
var
|
|
306
|
-
for (var
|
|
307
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
308
|
-
r[
|
|
520
|
+
var a = arguments[e];
|
|
521
|
+
for (var o in a) {
|
|
522
|
+
if (Object.prototype.hasOwnProperty.call(a, o)) {
|
|
523
|
+
r[o] = a[o];
|
|
309
524
|
}
|
|
310
525
|
}
|
|
311
526
|
}
|
|
312
527
|
return r;
|
|
313
528
|
};
|
|
314
|
-
return
|
|
529
|
+
return R.apply(this, arguments);
|
|
315
530
|
}
|
|
316
|
-
function
|
|
531
|
+
function V(r, e) {
|
|
317
532
|
if (r == null) return {};
|
|
318
|
-
var
|
|
319
|
-
var
|
|
533
|
+
var a = W(r, e);
|
|
534
|
+
var o, i;
|
|
320
535
|
if (Object.getOwnPropertySymbols) {
|
|
321
536
|
var t = Object.getOwnPropertySymbols(r);
|
|
322
537
|
for (i = 0; i < t.length; i++) {
|
|
323
|
-
|
|
324
|
-
if (e.indexOf(
|
|
325
|
-
if (!Object.prototype.propertyIsEnumerable.call(r,
|
|
326
|
-
o
|
|
538
|
+
o = t[i];
|
|
539
|
+
if (e.indexOf(o) >= 0) continue;
|
|
540
|
+
if (!Object.prototype.propertyIsEnumerable.call(r, o)) continue;
|
|
541
|
+
a[o] = r[o];
|
|
327
542
|
}
|
|
328
543
|
}
|
|
329
|
-
return
|
|
544
|
+
return a;
|
|
330
545
|
}
|
|
331
|
-
function
|
|
546
|
+
function W(r, e) {
|
|
332
547
|
if (r == null) return {};
|
|
333
|
-
var
|
|
334
|
-
var
|
|
548
|
+
var a = {};
|
|
549
|
+
var o = Object.keys(r);
|
|
335
550
|
var i, t;
|
|
336
|
-
for (t = 0; t <
|
|
337
|
-
i =
|
|
551
|
+
for (t = 0; t < o.length; t++) {
|
|
552
|
+
i = o[t];
|
|
338
553
|
if (e.indexOf(i) >= 0) continue;
|
|
339
|
-
|
|
554
|
+
a[i] = r[i];
|
|
340
555
|
}
|
|
341
|
-
return
|
|
556
|
+
return a;
|
|
342
557
|
}
|
|
343
|
-
function
|
|
558
|
+
function q(r, e) {
|
|
344
559
|
if (!(r instanceof e)) {
|
|
345
560
|
throw new TypeError("Cannot call a class as a function");
|
|
346
561
|
}
|
|
347
562
|
}
|
|
348
|
-
function
|
|
349
|
-
for (var
|
|
350
|
-
var
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
if ("value" in
|
|
354
|
-
Object.defineProperty(r,
|
|
563
|
+
function E(r, e) {
|
|
564
|
+
for (var a = 0; a < e.length; a++) {
|
|
565
|
+
var o = e[a];
|
|
566
|
+
o.enumerable = o.enumerable || false;
|
|
567
|
+
o.configurable = true;
|
|
568
|
+
if ("value" in o) o.writable = true;
|
|
569
|
+
Object.defineProperty(r, o.key, o);
|
|
355
570
|
}
|
|
356
571
|
}
|
|
357
|
-
function
|
|
358
|
-
if (e)
|
|
359
|
-
if (
|
|
572
|
+
function M(r, e, a) {
|
|
573
|
+
if (e) E(r.prototype, e);
|
|
574
|
+
if (a) E(r, a);
|
|
360
575
|
return r;
|
|
361
576
|
}
|
|
362
|
-
function
|
|
577
|
+
function L(r, e) {
|
|
363
578
|
if (typeof e !== "function" && e !== null) {
|
|
364
579
|
throw new TypeError("Super expression must either be null or a function");
|
|
365
580
|
}
|
|
@@ -370,41 +585,41 @@
|
|
|
370
585
|
configurable: true
|
|
371
586
|
}
|
|
372
587
|
});
|
|
373
|
-
if (e)
|
|
588
|
+
if (e) z(r, e);
|
|
374
589
|
}
|
|
375
|
-
function
|
|
376
|
-
|
|
377
|
-
e.__proto__ =
|
|
590
|
+
function z(r, e) {
|
|
591
|
+
z = Object.setPrototypeOf || function r(e, a) {
|
|
592
|
+
e.__proto__ = a;
|
|
378
593
|
return e;
|
|
379
594
|
};
|
|
380
|
-
return
|
|
595
|
+
return z(r, e);
|
|
381
596
|
}
|
|
382
|
-
function
|
|
383
|
-
var e =
|
|
384
|
-
return function
|
|
385
|
-
var
|
|
597
|
+
function U(r) {
|
|
598
|
+
var e = J();
|
|
599
|
+
return function a() {
|
|
600
|
+
var o = K(r), i;
|
|
386
601
|
if (e) {
|
|
387
|
-
var t =
|
|
388
|
-
i = Reflect.construct(
|
|
602
|
+
var t = K(this).constructor;
|
|
603
|
+
i = Reflect.construct(o, arguments, t);
|
|
389
604
|
} else {
|
|
390
|
-
i =
|
|
605
|
+
i = o.apply(this, arguments);
|
|
391
606
|
}
|
|
392
|
-
return
|
|
607
|
+
return F(this, i);
|
|
393
608
|
};
|
|
394
609
|
}
|
|
395
|
-
function
|
|
396
|
-
if (e && (
|
|
610
|
+
function F(r, e) {
|
|
611
|
+
if (e && (I(e) === "object" || typeof e === "function")) {
|
|
397
612
|
return e;
|
|
398
613
|
}
|
|
399
|
-
return
|
|
614
|
+
return G(r);
|
|
400
615
|
}
|
|
401
|
-
function
|
|
616
|
+
function G(r) {
|
|
402
617
|
if (r === void 0) {
|
|
403
618
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
404
619
|
}
|
|
405
620
|
return r;
|
|
406
621
|
}
|
|
407
|
-
function
|
|
622
|
+
function J() {
|
|
408
623
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
409
624
|
if (Reflect.construct.sham) return false;
|
|
410
625
|
if (typeof Proxy === "function") return true;
|
|
@@ -415,28 +630,60 @@
|
|
|
415
630
|
return false;
|
|
416
631
|
}
|
|
417
632
|
}
|
|
418
|
-
function
|
|
419
|
-
|
|
633
|
+
function K(r) {
|
|
634
|
+
K = Object.setPrototypeOf ? Object.getPrototypeOf : function r(e) {
|
|
420
635
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
421
636
|
};
|
|
422
|
-
return
|
|
637
|
+
return K(r);
|
|
423
638
|
}
|
|
424
|
-
function
|
|
639
|
+
function Q(r, e, a) {
|
|
425
640
|
if (e in r) {
|
|
426
641
|
Object.defineProperty(r, e, {
|
|
427
|
-
value:
|
|
642
|
+
value: a,
|
|
428
643
|
enumerable: true,
|
|
429
644
|
configurable: true,
|
|
430
645
|
writable: true
|
|
431
646
|
});
|
|
432
647
|
} else {
|
|
433
|
-
r[e] =
|
|
648
|
+
r[e] = a;
|
|
434
649
|
}
|
|
435
650
|
return r;
|
|
436
651
|
}
|
|
437
|
-
|
|
652
|
+
function X(r) {
|
|
653
|
+
return er(r) || rr(r) || Z(r) || Y();
|
|
654
|
+
}
|
|
655
|
+
function Y() {
|
|
656
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
657
|
+
}
|
|
658
|
+
function Z(r, e) {
|
|
659
|
+
if (!r) return;
|
|
660
|
+
if (typeof r === "string") return ar(r, e);
|
|
661
|
+
var a = Object.prototype.toString.call(r).slice(8, -1);
|
|
662
|
+
if (a === "Object" && r.constructor) a = r.constructor.name;
|
|
663
|
+
if (a === "Map" || a === "Set") return Array.from(r);
|
|
664
|
+
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return ar(r, e);
|
|
665
|
+
}
|
|
666
|
+
function rr(r) {
|
|
667
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(r)) return Array.from(r);
|
|
668
|
+
}
|
|
669
|
+
function er(r) {
|
|
670
|
+
if (Array.isArray(r)) return ar(r);
|
|
671
|
+
}
|
|
672
|
+
function ar(r, e) {
|
|
673
|
+
if (e == null || e > r.length) e = r.length;
|
|
674
|
+
for (var a = 0, o = new Array(e); a < e; a++) {
|
|
675
|
+
o[a] = r[a];
|
|
676
|
+
}
|
|
677
|
+
return o;
|
|
678
|
+
}
|
|
679
|
+
var or = [ "default", "secondary", "primary", "destructive", "subtle" ];
|
|
680
|
+
var ir = [].concat(or, [ "pill" ]);
|
|
681
|
+
var tr = [].concat(or, [ "toggle", "flat" ]);
|
|
682
|
+
// Array.from(new Set... is used to de-duplicate the appearances
|
|
683
|
+
var lr = Array.from(new Set([].concat(X(ir), X(tr))));
|
|
684
|
+
var nr = {
|
|
438
685
|
action: t().string,
|
|
439
|
-
appearance: t().oneOf([ "default", "secondary", "primary", "destructive", "pill", "toggle", "flat" ]),
|
|
686
|
+
appearance: t().oneOf([ "default", "secondary", "primary", "destructive", "subtle", "pill", "toggle", "flat" ]),
|
|
440
687
|
append: t().bool,
|
|
441
688
|
children: t().node,
|
|
442
689
|
disabled: t().oneOfType([ t().bool, t().oneOf([ "dimmed" ]) ]),
|
|
@@ -449,57 +696,32 @@
|
|
|
449
696
|
splunkTheme: t().object,
|
|
450
697
|
to: t().string
|
|
451
698
|
};
|
|
452
|
-
var
|
|
699
|
+
var sr = {
|
|
453
700
|
appearance: "default",
|
|
454
701
|
append: false,
|
|
455
702
|
disabled: false,
|
|
456
703
|
error: false,
|
|
457
704
|
inline: true,
|
|
458
705
|
openInNewContext: false,
|
|
459
|
-
prepend: false
|
|
460
|
-
selected: false
|
|
706
|
+
prepend: false
|
|
461
707
|
};
|
|
462
|
-
var
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
primary: "enterprisePrimary",
|
|
467
|
-
secondary: "enterpriseSecondary",
|
|
468
|
-
pill: "enterprisePill",
|
|
469
|
-
toggle: "enterpriseDefault",
|
|
470
|
-
flat: "enterpriseDefault"
|
|
471
|
-
};
|
|
472
|
-
var i = {
|
|
473
|
-
default: "prismaDefault",
|
|
474
|
-
destructive: "prismaDestructive",
|
|
475
|
-
primary: "prismaPrimary",
|
|
476
|
-
secondary: "prismaSecondary",
|
|
477
|
-
pill: "prismaSecondary",
|
|
478
|
-
toggle: "prismaToggle",
|
|
479
|
-
flat: "prismaFlat"
|
|
480
|
-
};
|
|
481
|
-
if (o === "enterprise") {
|
|
482
|
-
return a[e];
|
|
483
|
-
}
|
|
484
|
-
return i[e];
|
|
485
|
-
};
|
|
486
|
-
var X = function(r) {
|
|
487
|
-
W(o, r);
|
|
488
|
-
var e = L(o);
|
|
489
|
-
function o() {
|
|
708
|
+
var cr = function(r) {
|
|
709
|
+
L(a, r);
|
|
710
|
+
var e = U(a);
|
|
711
|
+
function a() {
|
|
490
712
|
var r;
|
|
491
|
-
|
|
492
|
-
for (var
|
|
713
|
+
q(this, a);
|
|
714
|
+
for (var o = arguments.length, i = new Array(o), t = 0; t < o; t++) {
|
|
493
715
|
i[t] = arguments[t];
|
|
494
716
|
}
|
|
495
717
|
r = e.call.apply(e, [ this ].concat(i));
|
|
496
|
-
|
|
497
|
-
|
|
718
|
+
Q(G(r), "component", null);
|
|
719
|
+
Q(G(r), "handleMount", (function(e) {
|
|
498
720
|
r.component = e;
|
|
499
721
|
}));
|
|
500
722
|
return r;
|
|
501
723
|
}
|
|
502
|
-
|
|
724
|
+
M(a, [ {
|
|
503
725
|
key: "focus",
|
|
504
726
|
/**
|
|
505
727
|
* Places focus on the button.
|
|
@@ -509,37 +731,46 @@
|
|
|
509
731
|
(e = this.component) === null || e === void 0 ? void 0 : e.focus();
|
|
510
732
|
}
|
|
511
733
|
}, {
|
|
512
|
-
key: "
|
|
734
|
+
key: "getVariant",
|
|
513
735
|
value: function r() {
|
|
514
|
-
var e = this.props,
|
|
515
|
-
var
|
|
516
|
-
if (
|
|
517
|
-
|
|
736
|
+
var e = this.props, a = e.appearance, o = e.error, i = e.splunkTheme;
|
|
737
|
+
var t = a;
|
|
738
|
+
if (i.family === "enterprise") {
|
|
739
|
+
if (o) {
|
|
740
|
+
t = "destructive";
|
|
741
|
+
} else if (!ir.includes(a)) {
|
|
742
|
+
t = "default";
|
|
743
|
+
}
|
|
744
|
+
} else if (i.family === "prisma" && !tr.includes(a)) {
|
|
745
|
+
t = "secondary";
|
|
518
746
|
}
|
|
747
|
+
return t;
|
|
748
|
+
}
|
|
749
|
+
}, {
|
|
750
|
+
key: "render",
|
|
751
|
+
value: function r() {
|
|
752
|
+
var e = this.props, a = e.append, i = e.children, t = e.error, l = e.prepend, n = e.selected, s = V(e, [ "append", "children", "error", "prepend", "selected" ]);
|
|
519
753
|
|
|
520
|
-
return
|
|
521
|
-
"aria-
|
|
522
|
-
"aria-
|
|
754
|
+
return o().createElement(T, R({
|
|
755
|
+
"aria-invalid": t,
|
|
756
|
+
"aria-pressed": n,
|
|
523
757
|
"data-test": "button-simple",
|
|
524
|
-
disabled: s === true,
|
|
525
758
|
ref: this.handleMount,
|
|
526
|
-
$variant:
|
|
527
|
-
$append:
|
|
528
|
-
$prepend:
|
|
529
|
-
$selected:
|
|
530
|
-
$error:
|
|
531
|
-
},
|
|
532
|
-
onClick: n && !s ? n : undefined
|
|
533
|
-
}), t, v && a().createElement(c(), null, (0, l._)("Selected")));
|
|
759
|
+
$variant: this.getVariant(),
|
|
760
|
+
$append: a,
|
|
761
|
+
$prepend: l,
|
|
762
|
+
$selected: n || false,
|
|
763
|
+
$error: t
|
|
764
|
+
}, s), i);
|
|
534
765
|
}
|
|
535
766
|
} ]);
|
|
536
|
-
return
|
|
537
|
-
}(
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
var
|
|
541
|
-
|
|
542
|
-
/* harmony default export */ const
|
|
767
|
+
return a;
|
|
768
|
+
}(a.Component);
|
|
769
|
+
Q(cr, "defaultProps", sr);
|
|
770
|
+
Q(cr, "propTypes", nr);
|
|
771
|
+
var dr = (0, l.withSplunkTheme)(cr);
|
|
772
|
+
dr.propTypes = cr.propTypes;
|
|
773
|
+
/* harmony default export */ const vr = dr;
|
|
543
774
|
// CONCATENATED MODULE: ./src/ButtonSimple/index.ts
|
|
544
775
|
module.exports = e;
|
|
545
776
|
/******/})();
|