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