@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.
Files changed (80) hide show
  1. package/Button.js +59 -65
  2. package/ButtonGroup.js +20 -23
  3. package/ButtonSimple.js +374 -339
  4. package/CHANGELOG.md +54 -0
  5. package/Card.js +56 -44
  6. package/Chip.js +2 -6
  7. package/Clickable.js +21 -19
  8. package/CollapsiblePanel.js +281 -264
  9. package/Color.js +88 -86
  10. package/Concertina.js +7 -7
  11. package/ControlGroup.js +18 -18
  12. package/DualListbox.js +8 -11
  13. package/File.js +25 -30
  14. package/FormRows.js +232 -210
  15. package/Image.js +13 -13
  16. package/JSONTree.js +22 -22
  17. package/MIGRATION.mdx +99 -0
  18. package/Markdown.js +12 -12
  19. package/Menu.js +505 -719
  20. package/Message.js +205 -204
  21. package/MessageBar.js +104 -104
  22. package/Modal.js +158 -133
  23. package/Multiselect.js +81 -70
  24. package/Paginator.js +8 -8
  25. package/Popover.js +53 -54
  26. package/Progress.js +45 -46
  27. package/RadioBar.js +117 -115
  28. package/RadioList.js +8 -5
  29. package/ResultsMenu.js +256 -261
  30. package/Search.js +21 -24
  31. package/Select.js +265 -246
  32. package/Slider.js +9 -9
  33. package/SplitButton.js +1 -4
  34. package/StaticContent.js +1 -1
  35. package/StepBar.js +1 -1
  36. package/Switch.js +169 -171
  37. package/TabBar.js +14 -6
  38. package/Table.js +65 -67
  39. package/Text.js +30 -37
  40. package/TextArea.js +162 -163
  41. package/Tooltip.js +1 -1
  42. package/package.json +9 -9
  43. package/stubs-splunkui.d.ts +11 -0
  44. package/types/src/Button/Button.d.ts +4 -4
  45. package/types/src/ButtonSimple/ButtonSimple.d.ts +8 -6
  46. package/types/src/ButtonSimple/mixin.d.ts +2 -2
  47. package/types/src/Card/Card.d.ts +3 -1
  48. package/types/src/Card/Header.d.ts +22 -3
  49. package/types/src/Clickable/Clickable.d.ts +3 -2
  50. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -0
  51. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -3
  52. package/types/src/Date/Date.d.ts +2 -2
  53. package/types/src/Menu/Item.d.ts +3 -1
  54. package/types/src/Menu/Menu.d.ts +16 -21
  55. package/types/src/Menu/MenuContext.d.ts +3 -2
  56. package/types/src/Number/Number.d.ts +2 -2
  57. package/types/src/RadioBar/Option.d.ts +4 -1
  58. package/types/src/RadioBar/RadioBar.d.ts +6 -4
  59. package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -0
  60. package/types/src/ResultsMenu/ResultsMenu.d.ts +5 -22
  61. package/types/src/Select/Select.d.ts +8 -4
  62. package/types/src/Select/SelectBase.d.ts +8 -4
  63. package/types/src/Slider/Slider.d.ts +2 -2
  64. package/types/src/Table/Body.d.ts +0 -4
  65. package/types/src/Text/docs/examples/Basic.d.ts +1 -9
  66. package/types/src/Text/docs/examples/Error.d.ts +2 -10
  67. package/types/src/Text/docs/examples/Inline.d.ts +1 -9
  68. package/types/src/Text/docs/examples/Multiline.d.ts +1 -9
  69. package/types/src/Text/docs/examples/Password.d.ts +1 -9
  70. package/types/src/Text/docs/examples/Search.d.ts +1 -9
  71. package/useRovingFocus.js +26 -40
  72. package/types/src/Button/docs/examples/prisma/Basic.d.ts +0 -2
  73. package/types/src/Button/docs/examples/prisma/Block.d.ts +0 -2
  74. package/types/src/Button/docs/examples/prisma/Disabled.d.ts +0 -2
  75. package/types/src/Button/docs/examples/prisma/Icons.d.ts +0 -2
  76. package/types/src/Button/docs/examples/prisma/Menus.d.ts +0 -2
  77. package/types/src/Button/docs/examples/prisma/To.d.ts +0 -2
  78. package/types/src/Button/docs/examples/prisma/Truncated.d.ts +0 -2
  79. package/types/src/Select/docs/examples/prisma/Appearance.d.ts +0 -14
  80. /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,270 @@
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;}", "}&: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, 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", {
292
- background: "transparent"
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, d.css)([ "border-color:", ";&:hover{background-color:", ";}" ], n.variables.interactiveColorBorderDisabled, n.mixins.overlayColors(n.variables.interactiveColorOverlaySelected, n.variables.interactiveColorOverlayHover));
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, d.css)([ "border-color:", ";&:hover{border-color:", ";}" ], n.variables.accentColorNegative, n.variables.accentColorNegative);
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, d.css)([ "background-color:", ";" ], n.mixins.overlayColors(n.variables.interactiveColorBackgroundDisabled, n.variables.interactiveColorOverlaySelected));
311
+ return e && (0, n.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
310
312
  }));
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));
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 P = "#1A8929";
331
+ var w = "#1A8929";
329
332
  // SUI-2439 to meet WCAG AA compliance
330
- var $ = "#235823";
333
+ var S = "#235823";
331
334
  // 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) {
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, d.css)([ "border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
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, d.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
341
+ return e && (0, n.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
339
342
  }));
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)
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, 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
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, n.pick)({
374
+ }), (0, l.pick)({
372
375
  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)
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, 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);
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, 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)
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, 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
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, 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)
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 _ = "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) {
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, d.css)([ "box-shadow:", ";background-color:", ";" ], A, $);
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, 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) {
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, d.css)([ "box-shadow:", ";background-color:", ";" ], A, n.variables.brandColorD20);
426
+ return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ], B, l.variables.brandColorD20);
424
427
  }));
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) {
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, d.css)([ "box-shadow:", ";background-color:", ";" ], A, n.variables.errorColorD30);
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, 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) {
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, d.css)([ "box-shadow:", ";background-color:", ";" ], A, n.variables.errorColorD40);
436
+ return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ], B, l.variables.errorColorD40);
434
437
  }));
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
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, 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
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, 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) {
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, d.css)([ "border-color:", ";" ], n.variables.borderLightColor);
462
+ return e && (0, n.css)([ "border-color:", ";" ], l.variables.borderLightColor);
460
463
  }));
461
464
  // CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimpleStyles.ts
462
- var V = v()(u()).withConfig({
465
+ var T = s()(d()).withConfig({
463
466
  displayName: "ButtonSimpleStyles__StyledClickable",
464
467
  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
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, n.pickVariant)("$variant", {
475
- prismaDefault: S,
476
- prismaDestructive: O,
477
- prismaPrimary: O,
478
- prismaSecondary: S,
479
- prismaToggle: S,
480
- prismaFlat: D
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 W(r) {
503
+ function I(r) {
485
504
  "@babel/helpers - typeof";
486
505
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
487
- W = function r(e) {
506
+ I = function r(e) {
488
507
  return typeof e;
489
508
  };
490
509
  } else {
491
- W = function r(e) {
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 W(r);
514
+ return I(r);
496
515
  }
497
- function I() {
498
- I = Object.assign || function(r) {
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 I.apply(this, arguments);
528
+ return R.apply(this, arguments);
510
529
  }
511
- function L(r, e) {
530
+ function V(r, e) {
512
531
  if (r == null) return {};
513
- var a = M(r, e);
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 M(r, e) {
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 z(r, e) {
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 F(r, e) {
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 G(r, e, a) {
553
- if (e) F(r.prototype, e);
554
- if (a) F(r, 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 J(r, e) {
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) K(r, e);
587
+ if (e) z(r, e);
569
588
  }
570
- function K(r, e) {
571
- K = Object.setPrototypeOf || function r(e, a) {
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 K(r, e);
594
+ return z(r, e);
576
595
  }
577
- function Q(r) {
578
- var e = Y();
596
+ function U(r) {
597
+ var e = J();
579
598
  return function a() {
580
- var o = Z(r), i;
599
+ var o = K(r), i;
581
600
  if (e) {
582
- var t = Z(this).constructor;
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 U(this, i);
606
+ return F(this, i);
588
607
  };
589
608
  }
590
- function U(r, e) {
591
- if (e && (W(e) === "object" || typeof e === "function")) {
609
+ function F(r, e) {
610
+ if (e && (I(e) === "object" || typeof e === "function")) {
592
611
  return e;
593
612
  }
594
- return X(r);
613
+ return G(r);
595
614
  }
596
- function X(r) {
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 Y() {
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 Z(r) {
614
- Z = Object.setPrototypeOf ? Object.getPrototypeOf : function r(e) {
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 Z(r);
636
+ return K(r);
618
637
  }
619
- function rr(r, e, a) {
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
- var er = {
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 ar = {
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 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];
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
- z(this, a);
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
- rr(X(r), "component", null);
692
- rr(X(r), "handleMount", (function(e) {
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
- G(a, [ {
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: "render",
733
+ key: "getVariant",
708
734
  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;
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(V, I({
716
- "aria-disabled": s === "dimmed" || undefined,
717
- "aria-invalid": d,
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: 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")));
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
- 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;
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
  /******/})();