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