@splunk/react-ui 4.38.0 → 4.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion.js +131 -153
- package/Anchor.js +50 -58
- package/Animation.js +64 -59
- package/AnimationToggle.js +59 -61
- package/Box.js +59 -67
- package/Breadcrumbs.js +113 -127
- package/Button.js +151 -169
- package/ButtonGroup.js +41 -49
- package/ButtonSimple.js +264 -295
- package/CHANGELOG.md +28 -0
- package/Calendar.js +353 -414
- package/Card.js +183 -243
- package/CardLayout.js +86 -83
- package/Chip.js +104 -122
- package/Clickable.js +180 -198
- package/CloseButton.js +52 -60
- package/Code.js +24 -31
- package/CollapsiblePanel.js +172 -202
- package/Color.js +371 -412
- package/ColumnLayout.js +72 -96
- package/ComboBox.js +266 -303
- package/Concertina.js +406 -454
- package/ControlGroup.js +165 -194
- package/Date.js +116 -131
- package/DefinitionList.js +125 -149
- package/Divider.js +81 -79
- package/Dropdown.js +226 -237
- package/DualListbox.js +150 -186
- package/EventListener.js +4 -1
- package/File.js +1032 -955
- package/FormRows.js +281 -334
- package/Heading.js +27 -35
- package/Image.js +101 -116
- package/JSONTree.js +301 -344
- package/Layer.js +118 -126
- package/Link.js +141 -159
- package/List.js +61 -77
- package/MIGRATION.mdx +92 -38
- package/Markdown.js +288 -347
- package/Menu.js +506 -532
- package/Message.js +173 -196
- package/MessageBar.js +58 -66
- package/Modal.js +241 -290
- package/ModalLayer.js +130 -148
- package/Monogram.js +138 -138
- package/Multiselect.js +1589 -1902
- package/Number.js +159 -178
- package/Paginator.js +296 -335
- package/Paragraph.js +24 -32
- package/Popover.js +448 -441
- package/Progress.js +65 -75
- package/RadioBar.js +301 -303
- package/RadioList.js +77 -119
- package/Resize.js +105 -127
- package/ResultsMenu.js +373 -385
- package/ScreenReaderContent.js +50 -58
- package/Scroll.js +209 -244
- package/Search.js +379 -391
- package/Select.js +1077 -1345
- package/SidePanel.js +122 -142
- package/Slider.js +132 -145
- package/SlidingPanels.js +238 -270
- package/SplitButton.js +222 -245
- package/StaticContent.js +68 -76
- package/StepBar.js +206 -205
- package/Switch.js +176 -205
- package/TabBar.js +222 -258
- package/TabLayout.js +114 -139
- package/Table.js +2017 -2180
- package/Text.js +379 -493
- package/TextArea.js +411 -441
- package/Tooltip.js +116 -132
- package/TransitionOpen.js +160 -178
- package/Tree.js +268 -287
- package/Typography.js +48 -52
- package/WaitSpinner.js +60 -68
- package/cypress/support/commands.ts +9 -0
- package/cypress/support/index.d.ts +6 -0
- package/cypress/tsconfig.cypress.json +1 -0
- package/docker-compose.yml +0 -1
- package/package.json +14 -14
- package/types/src/Button/Button.d.ts +5 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
- package/types/src/Color/Color.d.ts +2 -2
- package/types/src/Color/Palette.d.ts +4 -2
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
- package/types/src/Date/Date.d.ts +2 -2
- package/types/src/File/File.d.ts +2 -3
- package/types/src/File/Retry.d.ts +1 -2
- package/types/src/Menu/Item.d.ts +18 -5
- package/types/src/Menu/Menu.d.ts +3 -3
- package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
- package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
- package/types/src/Multiselect/Option.d.ts +2 -0
- package/types/src/Number/Number.d.ts +3 -3
- package/types/src/Popover/Popover.d.ts +3 -4
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
- package/types/src/Search/Option.d.ts +9 -3
- package/types/src/Select/Option.d.ts +3 -1
- package/types/src/Select/OptionBase.d.ts +7 -5
- package/types/src/Select/Select.d.ts +1 -1
- package/types/src/Select/SelectAllOption.d.ts +4 -4
- package/types/src/SidePanel/SidePanel.d.ts +1 -1
- package/types/src/Slider/Slider.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
- package/types/src/StepBar/Step.d.ts +1 -2
- package/types/src/Switch/Switch.d.ts +0 -1
- package/types/src/TabBar/Tab.d.ts +1 -1
- package/types/src/TabBar/TabBar.d.ts +3 -1
- package/types/src/TabLayout/TabLayout.d.ts +2 -0
- package/types/src/Table/HeadDropdownCell.d.ts +2 -0
- package/types/src/Table/Table.d.ts +0 -1
- package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
- package/types/src/Text/IconOutlinedHide.d.ts +1 -2
- package/types/src/Text/IconOutlinedView.d.ts +1 -2
- package/types/src/Text/Text.d.ts +2 -2
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Tooltip/Tooltip.d.ts +4 -4
- package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
- package/useForceUpdate.js +30 -32
- package/useKeyPress.js +1 -1
- package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
- package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
- package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
- package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
- package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
- /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
- /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/ButtonSimple.js
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
r.r(e);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
r.d(e, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ br
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const a = require("react");
|
|
@@ -76,61 +76,34 @@
|
|
|
76
76
|
var s = r.n(n);
|
|
77
77
|
// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
|
|
78
78
|
const c = require("@splunk/react-ui/Clickable");
|
|
79
|
-
var
|
|
79
|
+
var b = r.n(c);
|
|
80
80
|
// CONCATENATED MODULE: external "lodash/merge"
|
|
81
|
-
const
|
|
82
|
-
var
|
|
81
|
+
const d = require("lodash/merge");
|
|
82
|
+
var v = r.n(d);
|
|
83
83
|
// CONCATENATED MODULE: ./src/ButtonSimple/mixin.ts
|
|
84
84
|
function u(r) {
|
|
85
85
|
"@babel/helpers - typeof";
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
u = function r(e) {
|
|
92
|
-
return e && typeof Symbol === "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
return u(r);
|
|
86
|
+
return u = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(r) {
|
|
87
|
+
return typeof r;
|
|
88
|
+
} : function(r) {
|
|
89
|
+
return r && "function" == typeof Symbol && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
90
|
+
}, u(r);
|
|
96
91
|
}
|
|
97
92
|
var p = [ "primary", "secondary", "destructive", "subtle" ];
|
|
98
|
-
|
|
99
|
-
* These enterprise... values don't exist in Enterprise @splunk/themes
|
|
100
|
-
* They're provided here for TypeScript compatibility
|
|
101
|
-
*/ var f = {
|
|
102
|
-
active: {
|
|
103
|
-
dark: "rgba(0, 0, 0, 0.2)",
|
|
104
|
-
light: "rgba(0, 0, 0, 0.07)"
|
|
105
|
-
},
|
|
106
|
-
hover: {
|
|
107
|
-
dark: "rgba(255, 255, 255, 0.05)",
|
|
108
|
-
light: "rgba(0, 0, 0, 0.03)"
|
|
109
|
-
},
|
|
110
|
-
selected: {
|
|
111
|
-
dark: "rgba(255, 255, 255, 0.1)",
|
|
112
|
-
light: "rgba(0, 0, 0, 0.04)"
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
var g = {
|
|
116
|
-
dark: "#272a2f",
|
|
117
|
-
light: "#eeeeee"
|
|
118
|
-
};
|
|
119
|
-
var y = {
|
|
120
|
-
dark: "rgba(255, 255, 255, 0.15)",
|
|
121
|
-
light: "rgba(0, 0, 0, 0.1)"
|
|
122
|
-
};
|
|
123
|
-
function h(r) {
|
|
93
|
+
function f(r) {
|
|
124
94
|
var e = "transparent";
|
|
125
95
|
var a = "transparent";
|
|
126
96
|
var o = (0, l.pick)({
|
|
127
|
-
enterprise:
|
|
97
|
+
enterprise: {
|
|
98
|
+
light: l.variables.gray96,
|
|
99
|
+
dark: l.variables.gray30
|
|
100
|
+
},
|
|
128
101
|
prisma: l.variables.interactiveColorBackgroundDisabled
|
|
129
102
|
});
|
|
130
103
|
var i = (0, l.pick)({
|
|
131
104
|
enterprise: {
|
|
132
|
-
dark: l.
|
|
133
|
-
light: l.
|
|
105
|
+
dark: l.variables.gray22,
|
|
106
|
+
light: l.variables.gray92
|
|
134
107
|
},
|
|
135
108
|
prisma: l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected)
|
|
136
109
|
});
|
|
@@ -138,34 +111,28 @@
|
|
|
138
111
|
var n = "transparent";
|
|
139
112
|
var s;
|
|
140
113
|
var c;
|
|
141
|
-
var
|
|
142
|
-
var
|
|
114
|
+
var b = l.variables.contentColorActive;
|
|
115
|
+
var d = l.variables.contentColorDisabled;
|
|
143
116
|
switch (r) {
|
|
144
117
|
case "primary":
|
|
145
118
|
{
|
|
146
|
-
e = l.
|
|
119
|
+
e = (0, l.pick)({
|
|
120
|
+
enterprise: "#1A8929",
|
|
121
|
+
prisma: l.variables.interactiveColorPrimary
|
|
122
|
+
});
|
|
147
123
|
a = (0, l.pick)({
|
|
148
|
-
enterprise:
|
|
149
|
-
light: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.active.light),
|
|
150
|
-
dark: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.active.dark)
|
|
151
|
-
},
|
|
124
|
+
enterprise: l.variables.brandColorD30,
|
|
152
125
|
prisma: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayActive)
|
|
153
126
|
});
|
|
154
127
|
t = (0, l.pick)({
|
|
155
|
-
enterprise:
|
|
156
|
-
light: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.hover.light),
|
|
157
|
-
dark: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.hover.dark)
|
|
158
|
-
},
|
|
128
|
+
enterprise: l.variables.brandColorD50,
|
|
159
129
|
prisma: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayHover)
|
|
160
130
|
});
|
|
161
131
|
n = (0, l.pick)({
|
|
162
|
-
enterprise:
|
|
163
|
-
light: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.selected.light),
|
|
164
|
-
dark: l.mixins.overlayColors(l.variables.interactiveColorPrimary, f.selected.dark)
|
|
165
|
-
},
|
|
132
|
+
enterprise: "#235823",
|
|
166
133
|
prisma: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlaySelected)
|
|
167
134
|
});
|
|
168
|
-
|
|
135
|
+
b = l.variables.contentColorInverted;
|
|
169
136
|
break;
|
|
170
137
|
}
|
|
171
138
|
|
|
@@ -173,27 +140,18 @@
|
|
|
173
140
|
{
|
|
174
141
|
e = l.variables.accentColorNegative;
|
|
175
142
|
a = (0, l.pick)({
|
|
176
|
-
enterprise:
|
|
177
|
-
light: l.mixins.overlayColors(l.variables.accentColorNegative, f.active.light),
|
|
178
|
-
dark: l.mixins.overlayColors(l.variables.accentColorNegative, f.active.dark)
|
|
179
|
-
},
|
|
143
|
+
enterprise: l.variables.errorColorD40,
|
|
180
144
|
prisma: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayActive)
|
|
181
145
|
});
|
|
182
146
|
t = (0, l.pick)({
|
|
183
|
-
enterprise:
|
|
184
|
-
light: l.mixins.overlayColors(l.variables.accentColorNegative, f.hover.light),
|
|
185
|
-
dark: l.mixins.overlayColors(l.variables.accentColorNegative, f.hover.dark)
|
|
186
|
-
},
|
|
147
|
+
enterprise: l.variables.errorColorD30,
|
|
187
148
|
prisma: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayHover)
|
|
188
149
|
});
|
|
189
150
|
n = (0, l.pick)({
|
|
190
|
-
enterprise:
|
|
191
|
-
light: l.mixins.overlayColors(l.variables.accentColorNegative, f.selected.light),
|
|
192
|
-
dark: l.mixins.overlayColors(l.variables.accentColorNegative, f.selected.dark)
|
|
193
|
-
},
|
|
151
|
+
enterprise: l.variables.errorColorD30,
|
|
194
152
|
prisma: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlaySelected)
|
|
195
153
|
});
|
|
196
|
-
|
|
154
|
+
b = l.variables.contentColorInverted;
|
|
197
155
|
break;
|
|
198
156
|
}
|
|
199
157
|
|
|
@@ -201,43 +159,61 @@
|
|
|
201
159
|
s = l.variables.interactiveColorBorder;
|
|
202
160
|
c = l.variables.interactiveColorBorderDisabled;
|
|
203
161
|
e = (0, l.pick)({
|
|
204
|
-
enterprise:
|
|
162
|
+
enterprise: {
|
|
163
|
+
light: l.variables.gray98,
|
|
164
|
+
dark: l.variables.gray45
|
|
165
|
+
},
|
|
205
166
|
prisma: l.variables.interactiveColorBackground
|
|
206
167
|
});
|
|
207
168
|
a = (0, l.pick)({
|
|
208
|
-
enterprise:
|
|
169
|
+
enterprise: {
|
|
170
|
+
light: l.variables.gray92,
|
|
171
|
+
dark: l.variables.gray22
|
|
172
|
+
},
|
|
209
173
|
prisma: l.variables.interactiveColorOverlayActive
|
|
210
174
|
});
|
|
211
175
|
t = (0, l.pick)({
|
|
212
|
-
enterprise:
|
|
176
|
+
enterprise: {
|
|
177
|
+
light: "#ebeeef",
|
|
178
|
+
dark: l.variables.gray30
|
|
179
|
+
},
|
|
213
180
|
prisma: l.variables.interactiveColorOverlayHover
|
|
214
181
|
});
|
|
215
182
|
n = (0, l.pick)({
|
|
216
|
-
enterprise:
|
|
183
|
+
enterprise: {
|
|
184
|
+
light: l.variables.gray92,
|
|
185
|
+
dark: l.variables.gray22
|
|
186
|
+
},
|
|
217
187
|
prisma: l.variables.interactiveColorOverlaySelected
|
|
218
188
|
});
|
|
219
189
|
break;
|
|
220
190
|
|
|
221
191
|
case "subtle":
|
|
222
192
|
// TODO: SUI-6304 this should be interactiveColorAccent once that variable is introduced in SUI 5
|
|
223
|
-
|
|
193
|
+
b = l.variables.interactiveColorPrimary;
|
|
224
194
|
a = (0, l.pick)({
|
|
225
|
-
enterprise:
|
|
195
|
+
enterprise: {
|
|
196
|
+
light: l.variables.gray92,
|
|
197
|
+
dark: l.variables.gray22
|
|
198
|
+
},
|
|
226
199
|
prisma: l.variables.interactiveColorOverlayActive
|
|
227
200
|
});
|
|
228
201
|
t = (0, l.pick)({
|
|
229
|
-
enterprise:
|
|
202
|
+
enterprise: {
|
|
203
|
+
light: l.variables.linkColor,
|
|
204
|
+
dark: l.variables.white
|
|
205
|
+
},
|
|
230
206
|
prisma: l.variables.interactiveColorOverlayHover
|
|
231
207
|
});
|
|
232
208
|
n = (0, l.pick)({
|
|
233
|
-
enterprise:
|
|
209
|
+
enterprise: "transparent",
|
|
234
210
|
prisma: l.variables.interactiveColorOverlaySelected
|
|
235
211
|
});
|
|
236
212
|
break;
|
|
237
213
|
|
|
238
214
|
default:
|
|
239
215
|
}
|
|
240
|
-
var
|
|
216
|
+
var v = {
|
|
241
217
|
background: e,
|
|
242
218
|
backgroundActive: a,
|
|
243
219
|
backgroundDisabled: o,
|
|
@@ -246,12 +222,12 @@
|
|
|
246
222
|
backgroundSelected: n,
|
|
247
223
|
borderColor: s,
|
|
248
224
|
borderColorDisabled: c,
|
|
249
|
-
color:
|
|
250
|
-
colorDisabled:
|
|
225
|
+
color: b,
|
|
226
|
+
colorDisabled: d
|
|
251
227
|
};
|
|
252
|
-
return
|
|
228
|
+
return v;
|
|
253
229
|
}
|
|
254
|
-
function
|
|
230
|
+
function g(r, e) {
|
|
255
231
|
var a = typeof r === "string" && p.includes(r) ? r : undefined;
|
|
256
232
|
var o = {};
|
|
257
233
|
if (a && e !== undefined) {
|
|
@@ -259,30 +235,30 @@
|
|
|
259
235
|
} else if (a === undefined && u(r) === "object" && e === undefined) {
|
|
260
236
|
o = r;
|
|
261
237
|
}
|
|
262
|
-
var i =
|
|
263
|
-
var t =
|
|
264
|
-
var
|
|
238
|
+
var i = f(a);
|
|
239
|
+
var t = v()(i, o), s = t.background, c = t.backgroundActive, b = t.backgroundDisabled, d = t.backgroundDisabledSelected, g = t.backgroundHover, y = t.backgroundSelected, k = t.borderColor, h = t.borderColorDisabled, m = t.color, C = t.colorDisabled;
|
|
240
|
+
var w = s != null && s !== "transparent";
|
|
265
241
|
return function() {
|
|
266
242
|
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
|
|
243
|
+
return k && (0, n.css)([ "border:1px solid ", ";" ], k);
|
|
268
244
|
}), (function(r) {
|
|
269
245
|
var e = r.$append;
|
|
270
246
|
return e && (0, n.css)([ "border-top-right-radius:0.1px;border-bottom-right-radius:0.1px;border-right:none;" ]);
|
|
271
247
|
}), (function(r) {
|
|
272
248
|
var e = r.$prepend;
|
|
273
249
|
return e && (0, n.css)([ "border-top-left-radius:0.1px;border-bottom-left-radius:0.1px;" ]);
|
|
274
|
-
}), s, m,
|
|
250
|
+
}), s, m, g, c, (function(r) {
|
|
251
|
+
var e = r.$selected;
|
|
252
|
+
return e && (0, n.css)([ "background-color:", ";" ], y);
|
|
253
|
+
}), l.variables.focusShadow, h, C, (function(r) {
|
|
275
254
|
var e = r.$selected;
|
|
276
|
-
return
|
|
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);
|
|
255
|
+
return w && (0, n.css)([ "background-color:", ";" ], e ? d : b);
|
|
280
256
|
}));
|
|
281
257
|
};
|
|
282
258
|
}
|
|
283
|
-
/* harmony default export */ const
|
|
259
|
+
/* harmony default export */ const y = g;
|
|
284
260
|
// CONCATENATED MODULE: ./src/ButtonSimple/prismaStyles.ts
|
|
285
|
-
var
|
|
261
|
+
var k = (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
262
|
l.pickVariant)("$variant", {
|
|
287
263
|
secondary: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow),
|
|
288
264
|
default: (0, n.css)([ "box-shadow:", ";" ], l.variables.hoverShadow),
|
|
@@ -294,59 +270,70 @@
|
|
|
294
270
|
var e = r.$error;
|
|
295
271
|
return e && (0, n.css)([ "border-color:", ";&:hover{border-color:", ";}" ], l.variables.accentColorNegative, l.variables.accentColorNegative);
|
|
296
272
|
}), (0, l.pickVariant)("$variant", {
|
|
297
|
-
secondary: (0, n.css)([ "", " font-weight:", ";" ],
|
|
273
|
+
secondary: (0, n.css)([ "", " font-weight:", ";" ], y("subtle", {
|
|
298
274
|
color: l.variables.contentColorActive
|
|
299
275
|
}), l.variables.fontWeightSemiBold),
|
|
300
|
-
subtle: (0, n.css)([ "", " font-weight:", ";" ],
|
|
276
|
+
subtle: (0, n.css)([ "", " font-weight:", ";" ], y("subtle", {
|
|
301
277
|
color: l.variables.contentColorActive
|
|
302
278
|
}), l.variables.fontWeightSemiBold),
|
|
303
|
-
default: (0, n.css)([ "", " font-weight:", ";" ],
|
|
279
|
+
default: (0, n.css)([ "", " font-weight:", ";" ], y("secondary", {
|
|
304
280
|
background: "transparent"
|
|
305
281
|
}), l.variables.fontWeightSemiBold),
|
|
306
|
-
toggle: (0, n.css)([ "", " font-weight:normal;" ],
|
|
282
|
+
toggle: (0, n.css)([ "", " font-weight:normal;" ], y("secondary", {
|
|
307
283
|
background: "transparent"
|
|
308
284
|
}))
|
|
309
285
|
}), (function(r) {
|
|
310
286
|
var e = r.$selected;
|
|
311
287
|
return e && (0, n.css)([ "background-color:", ";" ], l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected));
|
|
312
288
|
}));
|
|
313
|
-
var
|
|
289
|
+
var h = (0, n.css)([ "&:not([disabled],[aria-disabled='true']){&:focus{background-color:", ";}&:hover{box-shadow:", ";}}", " font-weight:", ";" ], (0,
|
|
314
290
|
l.pickVariant)("$variant", {
|
|
315
291
|
primary: l.mixins.overlayColors(l.variables.interactiveColorPrimary, l.variables.interactiveColorOverlayHover),
|
|
316
292
|
destructive: l.mixins.overlayColors(l.variables.accentColorNegative, l.variables.interactiveColorOverlayHover),
|
|
317
293
|
flat: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover)
|
|
318
294
|
}), l.variables.hoverShadow, (0, l.pickVariant)("$variant", {
|
|
319
|
-
primary:
|
|
320
|
-
|
|
321
|
-
|
|
295
|
+
primary: y("primary", {
|
|
296
|
+
// this is intentional - the disabled background had always been applying the $selected style
|
|
297
|
+
// since beccfde78f787861217353e9149ce213bee0270 so keeping this for visual consistency
|
|
298
|
+
backgroundDisabled: l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected)
|
|
299
|
+
}),
|
|
300
|
+
destructive: y("destructive", {
|
|
301
|
+
// this is intentional - the disabled background had always been applying the $selected style
|
|
302
|
+
// since beccfde78f787861217353e9149ce213bee0270 so keeping this for visual consistency
|
|
303
|
+
backgroundDisabled: l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected)
|
|
304
|
+
}),
|
|
305
|
+
flat: y({
|
|
322
306
|
// this is intentional - the background had always been applying the $selected style
|
|
323
307
|
// since beccfde78f787861217353e9149ce213bee0270 so keeping this for visual consistency
|
|
324
308
|
background: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlaySelected),
|
|
325
309
|
backgroundActive: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayActive),
|
|
310
|
+
// this is intentional - the disabled background had always been applying the $selected style
|
|
311
|
+
// since beccfde78f787861217353e9149ce213bee0270 so keeping this for visual consistency
|
|
312
|
+
backgroundDisabled: l.mixins.overlayColors(l.variables.interactiveColorBackgroundDisabled, l.variables.interactiveColorOverlaySelected),
|
|
326
313
|
backgroundHover: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlayHover),
|
|
327
314
|
backgroundSelected: l.mixins.overlayColors(l.variables.interactiveColorBackground, l.variables.interactiveColorOverlaySelected)
|
|
328
315
|
})
|
|
329
316
|
}), l.variables.fontWeightSemiBold);
|
|
330
317
|
// CONCATENATED MODULE: ./src/ButtonSimple/enterpriseStyles.ts
|
|
331
|
-
var
|
|
318
|
+
var m = "#1A8929";
|
|
332
319
|
// SUI-2439 to meet WCAG AA compliance
|
|
333
|
-
var
|
|
320
|
+
var C = "#235823";
|
|
334
321
|
// SUI-2439 to meet WCAG AA compliance
|
|
335
|
-
var
|
|
336
|
-
var
|
|
322
|
+
var w = (0, n.css)([ "border-radius:", ";cursor:pointer;position:relative;&:focus{z-index:3;}" ], l.variables.borderRadius);
|
|
323
|
+
var x = (0, n.css)([ "", " ", "" ], (function(r) {
|
|
337
324
|
var e = r.$append;
|
|
338
325
|
return e && (0, n.css)([ "border-top-right-radius:0;border-bottom-right-radius:0;border-right:none;" ]);
|
|
339
326
|
}), (function(r) {
|
|
340
327
|
var e = r.$prepend;
|
|
341
328
|
return e && (0, n.css)([ "border-top-left-radius:0;border-bottom-left-radius:0;" ]);
|
|
342
329
|
}));
|
|
343
|
-
var
|
|
344
|
-
var
|
|
345
|
-
var
|
|
330
|
+
var S = "inset 0 -1px 0 rgba(0, 0, 0, 0.1)";
|
|
331
|
+
var O = "inset 0 1px 0 rgba(0, 0, 0, 0.1)";
|
|
332
|
+
var D = (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:", ";", "}" ], w, (0,
|
|
346
333
|
l.pick)({
|
|
347
334
|
light: l.variables.gray60,
|
|
348
335
|
dark: l.variables.borderColor
|
|
349
|
-
}),
|
|
336
|
+
}), x, (0, l.pickVariant)("$variant", {
|
|
350
337
|
default: "normal",
|
|
351
338
|
secondary: l.variables.fontWeightSemiBold
|
|
352
339
|
}), (0, l.pick)({
|
|
@@ -356,13 +343,13 @@
|
|
|
356
343
|
light: l.variables.gray45,
|
|
357
344
|
dark: l.variables.white
|
|
358
345
|
}), (0, l.pick)({
|
|
359
|
-
light: (0, n.css)([ "box-shadow:", ";" ],
|
|
346
|
+
light: (0, n.css)([ "box-shadow:", ";" ], S),
|
|
360
347
|
dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray30)
|
|
361
348
|
}), (function(r) {
|
|
362
349
|
var e = r.$selected;
|
|
363
350
|
return e && (0, n.css)([ "", ";background-color:", ";border-color:", ";" ], (0,
|
|
364
351
|
l.pick)({
|
|
365
|
-
light: (0, n.css)([ "box-shadow:", ";" ],
|
|
352
|
+
light: (0, n.css)([ "box-shadow:", ";" ], O),
|
|
366
353
|
dark: (0, n.css)([ "box-shadow:inset 0 1px 0 ", ";" ], l.variables.black)
|
|
367
354
|
}), (0, l.pick)({
|
|
368
355
|
light: l.variables.gray92,
|
|
@@ -375,7 +362,7 @@
|
|
|
375
362
|
light: "#ebeeef",
|
|
376
363
|
dark: l.variables.gray30
|
|
377
364
|
}), (0, l.pick)({
|
|
378
|
-
light: (0, n.css)([ "box-shadow:", ";" ],
|
|
365
|
+
light: (0, n.css)([ "box-shadow:", ";" ], S),
|
|
379
366
|
dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", ";" ], l.variables.gray25)
|
|
380
367
|
}), (0, l.pick)({
|
|
381
368
|
light: l.variables.gray92,
|
|
@@ -388,17 +375,17 @@
|
|
|
388
375
|
}), (function(r) {
|
|
389
376
|
var e = r.$append;
|
|
390
377
|
return e && (0, l.pick)({
|
|
391
|
-
light: (0, n.css)([ "box-shadow:", " ", ",inset -1px 0 0 ", ";" ],
|
|
378
|
+
light: (0, n.css)([ "box-shadow:", " ", ",inset -1px 0 0 ", ";" ], S, l.variables.focusShadow, l.variables.borderColor),
|
|
392
379
|
dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", " ", ",inset -1px 0 0 ", ";" ], l.variables.gray30, l.variables.focusShadow, l.variables.borderColor)
|
|
393
380
|
});
|
|
394
381
|
}), (function(r) {
|
|
395
382
|
var e = r.$append, a = r.$selected;
|
|
396
383
|
return e && a && (0, l.pick)({
|
|
397
|
-
light: (0, n.css)([ "box-shadow:", ",", ",", ",inset -1px 0 0 ", ";" ],
|
|
384
|
+
light: (0, n.css)([ "box-shadow:", ",", ",", ",inset -1px 0 0 ", ";" ], S, O, l.variables.focusShadow, l.variables.borderColor),
|
|
398
385
|
dark: (0, n.css)([ "box-shadow:inset 0 1px 0 ", ",", ",inset -1px 0 0 ", ";" ], l.variables.black, l.variables.focusShadow, l.variables.borderColor)
|
|
399
386
|
});
|
|
400
387
|
}), (0, l.pick)({
|
|
401
|
-
light: (0, n.css)([ "box-shadow:", ",", ";" ],
|
|
388
|
+
light: (0, n.css)([ "box-shadow:", ",", ";" ], S, l.variables.focusShadow),
|
|
402
389
|
dark: (0, n.css)([ "box-shadow:inset 0 -1px 0 ", ",", ";" ], l.variables.gray30, l.variables.focusShadow)
|
|
403
390
|
}), l.variables.textDisabledColor, (0, l.pick)({
|
|
404
391
|
light: l.variables.gray96,
|
|
@@ -409,33 +396,33 @@
|
|
|
409
396
|
}), (function(r) {
|
|
410
397
|
var e = r.$selected;
|
|
411
398
|
return e && (0, l.pick)({
|
|
412
|
-
light: (0, n.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ],
|
|
399
|
+
light: (0, n.css)([ "box-shadow:", ";background-color:", ";border-color:", ";" ], O, l.variables.gray92, l.variables.gray80),
|
|
413
400
|
dark: (0, n.css)([ "box-shadow:inset 0 1px 0 ", ";background-color:", ";border-color:", ";" ], l.variables.black, l.variables.gray22, l.variables.gray20)
|
|
414
401
|
});
|
|
415
402
|
}));
|
|
416
|
-
var
|
|
417
|
-
var
|
|
418
|
-
var
|
|
403
|
+
var $ = "inset 0 -2px 0 rgba(0, 0, 0, 0.1)";
|
|
404
|
+
var j = "inset 0 2px 0 rgba(0, 0, 0, 0.1)";
|
|
405
|
+
var B = (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;", "}" ], w, l.variables.fontWeightSemiBold, x, m, l.variables.white, $, (function(r) {
|
|
419
406
|
var e = r.$selected;
|
|
420
|
-
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ],
|
|
407
|
+
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ], j, C);
|
|
421
408
|
}), (function(r) {
|
|
422
409
|
var e = r.$prepend;
|
|
423
|
-
return e && (0, n.css)([ "border-left:1px solid ", ";" ],
|
|
424
|
-
}), l.variables.brandColorD50, l.variables.brandColorD30, l.variables.brandColorD30,
|
|
410
|
+
return e && (0, n.css)([ "border-left:1px solid ", ";" ], m);
|
|
411
|
+
}), l.variables.brandColorD50, l.variables.brandColorD30, l.variables.brandColorD30, $, l.variables.focusShadow, l.variables.brandColorL30, l.variables.brandColorL10, (function(r) {
|
|
425
412
|
var e = r.$selected;
|
|
426
|
-
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ],
|
|
413
|
+
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ], j, l.variables.brandColorD20);
|
|
427
414
|
}));
|
|
428
|
-
var
|
|
415
|
+
var P = (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;", "}" ], w, l.variables.fontWeightSemiBold, x, l.variables.errorColorD10, l.variables.white, $, (function(r) {
|
|
429
416
|
var e = r.$selected;
|
|
430
|
-
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ],
|
|
417
|
+
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ], j, l.variables.errorColorD30);
|
|
431
418
|
}), (function(r) {
|
|
432
419
|
var e = r.$prepend;
|
|
433
420
|
return e && (0, n.css)([ "border-left:1px solid ", ";" ], l.variables.errorColorD30);
|
|
434
|
-
}), l.variables.errorColorD30, l.variables.errorColorD40, l.variables.errorColorD40,
|
|
421
|
+
}), l.variables.errorColorD30, l.variables.errorColorD40, l.variables.errorColorD40, $, l.variables.focusShadow, l.variables.errorColorL10, l.variables.errorColorD10, (function(r) {
|
|
435
422
|
var e = r.$selected;
|
|
436
|
-
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ],
|
|
423
|
+
return e && (0, n.css)([ "box-shadow:", ";background-color:", ";" ], j, l.variables.errorColorD40);
|
|
437
424
|
}));
|
|
438
|
-
var
|
|
425
|
+
var A = (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;", "}" ], w, (0,
|
|
439
426
|
l.pick)({
|
|
440
427
|
light: l.variables.gray45,
|
|
441
428
|
dark: l.variables.white
|
|
@@ -462,7 +449,7 @@
|
|
|
462
449
|
return e && (0, n.css)([ "border-color:", ";" ], l.variables.borderLightColor);
|
|
463
450
|
}));
|
|
464
451
|
// CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimpleStyles.ts
|
|
465
|
-
var
|
|
452
|
+
var H = s()(b()).withConfig({
|
|
466
453
|
displayName: "ButtonSimpleStyles__StyledClickable",
|
|
467
454
|
componentId: "vlarwe-0"
|
|
468
455
|
})([ "", " ", "" ], (function(r) {
|
|
@@ -472,215 +459,194 @@
|
|
|
472
459
|
}), (0, l.pick)({
|
|
473
460
|
enterprise: (0, l.pickVariant)("$variant", {
|
|
474
461
|
// the four main styles
|
|
475
|
-
primary:
|
|
476
|
-
secondary:
|
|
477
|
-
destructive:
|
|
478
|
-
subtle:
|
|
462
|
+
primary: B,
|
|
463
|
+
secondary: D,
|
|
464
|
+
destructive: P,
|
|
465
|
+
subtle: A,
|
|
479
466
|
// same as "secondary"
|
|
480
|
-
default:
|
|
467
|
+
default: D,
|
|
481
468
|
// "pill" is an Enterprise-only style
|
|
482
|
-
pill:
|
|
469
|
+
pill: A,
|
|
483
470
|
// fallbacks for styles unsupported by Enterprise
|
|
484
|
-
toggle:
|
|
485
|
-
flat:
|
|
471
|
+
toggle: D,
|
|
472
|
+
flat: D
|
|
486
473
|
}),
|
|
487
474
|
prisma: (0, l.pickVariant)("$variant", {
|
|
488
475
|
// the four main styles
|
|
489
|
-
primary:
|
|
490
|
-
secondary:
|
|
491
|
-
destructive:
|
|
492
|
-
subtle:
|
|
476
|
+
primary: h,
|
|
477
|
+
secondary: k,
|
|
478
|
+
destructive: h,
|
|
479
|
+
subtle: k,
|
|
493
480
|
// same as "secondary"
|
|
494
|
-
default:
|
|
481
|
+
default: k,
|
|
495
482
|
// "toggle" and "flat" are Prisma-only styles
|
|
496
|
-
toggle:
|
|
497
|
-
flat:
|
|
483
|
+
toggle: k,
|
|
484
|
+
flat: h,
|
|
498
485
|
// fallback for "pill" which is not supported by Prisma
|
|
499
|
-
pill:
|
|
486
|
+
pill: k
|
|
500
487
|
})
|
|
501
488
|
}));
|
|
502
489
|
// CONCATENATED MODULE: ./src/ButtonSimple/ButtonSimple.tsx
|
|
503
|
-
function
|
|
490
|
+
function T(r) {
|
|
504
491
|
"@babel/helpers - typeof";
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
510
|
-
I = function r(e) {
|
|
511
|
-
return e && typeof Symbol === "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
return I(r);
|
|
492
|
+
return T = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(r) {
|
|
493
|
+
return typeof r;
|
|
494
|
+
} : function(r) {
|
|
495
|
+
return r && "function" == typeof Symbol && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
496
|
+
}, T(r);
|
|
515
497
|
}
|
|
516
|
-
function
|
|
517
|
-
|
|
498
|
+
function _() {
|
|
499
|
+
return _ = Object.assign ? Object.assign.bind() : function(r) {
|
|
518
500
|
for (var e = 1; e < arguments.length; e++) {
|
|
519
501
|
var a = arguments[e];
|
|
520
502
|
for (var o in a) {
|
|
521
|
-
|
|
522
|
-
r[o] = a[o];
|
|
523
|
-
}
|
|
503
|
+
({}).hasOwnProperty.call(a, o) && (r[o] = a[o]);
|
|
524
504
|
}
|
|
525
505
|
}
|
|
526
506
|
return r;
|
|
527
|
-
};
|
|
528
|
-
return R.apply(this, arguments);
|
|
507
|
+
}, _.apply(null, arguments);
|
|
529
508
|
}
|
|
530
|
-
function
|
|
531
|
-
if (
|
|
532
|
-
var a =
|
|
533
|
-
var o, i;
|
|
509
|
+
function N(r, e) {
|
|
510
|
+
if (null == r) return {};
|
|
511
|
+
var a, o, i = I(r, e);
|
|
534
512
|
if (Object.getOwnPropertySymbols) {
|
|
535
513
|
var t = Object.getOwnPropertySymbols(r);
|
|
536
|
-
for (
|
|
537
|
-
|
|
538
|
-
if (e.indexOf(o) >= 0) continue;
|
|
539
|
-
if (!Object.prototype.propertyIsEnumerable.call(r, o)) continue;
|
|
540
|
-
a[o] = r[o];
|
|
514
|
+
for (o = 0; o < t.length; o++) {
|
|
515
|
+
a = t[o], e.includes(a) || {}.propertyIsEnumerable.call(r, a) && (i[a] = r[a]);
|
|
541
516
|
}
|
|
542
517
|
}
|
|
543
|
-
return
|
|
518
|
+
return i;
|
|
544
519
|
}
|
|
545
|
-
function
|
|
546
|
-
if (
|
|
520
|
+
function I(r, e) {
|
|
521
|
+
if (null == r) return {};
|
|
547
522
|
var a = {};
|
|
548
|
-
var o
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
a[i] = r[i];
|
|
523
|
+
for (var o in r) {
|
|
524
|
+
if ({}.hasOwnProperty.call(r, o)) {
|
|
525
|
+
if (e.includes(o)) continue;
|
|
526
|
+
a[o] = r[o];
|
|
527
|
+
}
|
|
554
528
|
}
|
|
555
529
|
return a;
|
|
556
530
|
}
|
|
557
|
-
function
|
|
558
|
-
if (!(r instanceof e))
|
|
559
|
-
throw new TypeError("Cannot call a class as a function");
|
|
560
|
-
}
|
|
531
|
+
function V(r, e) {
|
|
532
|
+
if (!(r instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
561
533
|
}
|
|
562
534
|
function E(r, e) {
|
|
563
535
|
for (var a = 0; a < e.length; a++) {
|
|
564
536
|
var o = e[a];
|
|
565
|
-
o.enumerable = o.enumerable ||
|
|
566
|
-
o.
|
|
567
|
-
if ("value" in o) o.writable = true;
|
|
568
|
-
Object.defineProperty(r, o.key, o);
|
|
537
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0),
|
|
538
|
+
Object.defineProperty(r, J(o.key), o);
|
|
569
539
|
}
|
|
570
540
|
}
|
|
571
|
-
function
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
541
|
+
function W(r, e, a) {
|
|
542
|
+
return e && E(r.prototype, e), a && E(r, a), Object.defineProperty(r, "prototype", {
|
|
543
|
+
writable: !1
|
|
544
|
+
}), r;
|
|
575
545
|
}
|
|
576
|
-
function
|
|
577
|
-
if (typeof e !== "
|
|
578
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
579
|
-
}
|
|
546
|
+
function q(r, e) {
|
|
547
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
580
548
|
r.prototype = Object.create(e && e.prototype, {
|
|
581
549
|
constructor: {
|
|
582
550
|
value: r,
|
|
583
|
-
writable:
|
|
584
|
-
configurable:
|
|
551
|
+
writable: !0,
|
|
552
|
+
configurable: !0
|
|
585
553
|
}
|
|
586
|
-
})
|
|
587
|
-
|
|
554
|
+
}), Object.defineProperty(r, "prototype", {
|
|
555
|
+
writable: !1
|
|
556
|
+
}), e && M(r, e);
|
|
588
557
|
}
|
|
589
|
-
function
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
};
|
|
594
|
-
return z(r, e);
|
|
558
|
+
function M(r, e) {
|
|
559
|
+
return M = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, e) {
|
|
560
|
+
return r.__proto__ = e, r;
|
|
561
|
+
}, M(r, e);
|
|
595
562
|
}
|
|
596
|
-
function
|
|
597
|
-
var e =
|
|
598
|
-
return function
|
|
599
|
-
var o =
|
|
563
|
+
function R(r) {
|
|
564
|
+
var e = U();
|
|
565
|
+
return function() {
|
|
566
|
+
var a, o = F(r);
|
|
600
567
|
if (e) {
|
|
601
|
-
var
|
|
602
|
-
|
|
603
|
-
} else
|
|
604
|
-
|
|
605
|
-
}
|
|
606
|
-
return F(this, i);
|
|
568
|
+
var i = F(this).constructor;
|
|
569
|
+
a = Reflect.construct(o, arguments, i);
|
|
570
|
+
} else a = o.apply(this, arguments);
|
|
571
|
+
return L(this, a);
|
|
607
572
|
};
|
|
608
573
|
}
|
|
609
|
-
function
|
|
610
|
-
if (e && (
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
return G(r);
|
|
574
|
+
function L(r, e) {
|
|
575
|
+
if (e && ("object" == T(e) || "function" == typeof e)) return e;
|
|
576
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
577
|
+
return z(r);
|
|
614
578
|
}
|
|
615
|
-
function
|
|
616
|
-
if (
|
|
617
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
618
|
-
}
|
|
579
|
+
function z(r) {
|
|
580
|
+
if (void 0 === r) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
619
581
|
return r;
|
|
620
582
|
}
|
|
621
|
-
function
|
|
622
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
623
|
-
if (Reflect.construct.sham) return false;
|
|
624
|
-
if (typeof Proxy === "function") return true;
|
|
583
|
+
function U() {
|
|
625
584
|
try {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
return
|
|
630
|
-
}
|
|
585
|
+
var r = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
586
|
+
} catch (r) {}
|
|
587
|
+
return (U = function e() {
|
|
588
|
+
return !!r;
|
|
589
|
+
})();
|
|
631
590
|
}
|
|
632
|
-
function
|
|
633
|
-
|
|
634
|
-
return
|
|
635
|
-
};
|
|
636
|
-
return K(r);
|
|
591
|
+
function F(r) {
|
|
592
|
+
return F = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
|
|
593
|
+
return r.__proto__ || Object.getPrototypeOf(r);
|
|
594
|
+
}, F(r);
|
|
637
595
|
}
|
|
638
|
-
function
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
596
|
+
function G(r, e, a) {
|
|
597
|
+
return (e = J(e)) in r ? Object.defineProperty(r, e, {
|
|
598
|
+
value: a,
|
|
599
|
+
enumerable: !0,
|
|
600
|
+
configurable: !0,
|
|
601
|
+
writable: !0
|
|
602
|
+
}) : r[e] = a, r;
|
|
603
|
+
}
|
|
604
|
+
function J(r) {
|
|
605
|
+
var e = K(r, "string");
|
|
606
|
+
return "symbol" == T(e) ? e : e + "";
|
|
607
|
+
}
|
|
608
|
+
function K(r, e) {
|
|
609
|
+
if ("object" != T(r) || !r) return r;
|
|
610
|
+
var a = r[Symbol.toPrimitive];
|
|
611
|
+
if (void 0 !== a) {
|
|
612
|
+
var o = a.call(r, e || "default");
|
|
613
|
+
if ("object" != T(o)) return o;
|
|
614
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
648
615
|
}
|
|
649
|
-
return r;
|
|
616
|
+
return ("string" === e ? String : Number)(r);
|
|
650
617
|
}
|
|
651
|
-
function
|
|
652
|
-
return
|
|
618
|
+
function Q(r) {
|
|
619
|
+
return rr(r) || Z(r) || Y(r) || X();
|
|
653
620
|
}
|
|
654
|
-
function
|
|
621
|
+
function X() {
|
|
655
622
|
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
623
|
}
|
|
657
|
-
function
|
|
658
|
-
if (
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)) return ar(r, e);
|
|
624
|
+
function Y(r, e) {
|
|
625
|
+
if (r) {
|
|
626
|
+
if ("string" == typeof r) return er(r, e);
|
|
627
|
+
var a = {}.toString.call(r).slice(8, -1);
|
|
628
|
+
return "Object" === a && r.constructor && (a = r.constructor.name), "Map" === a || "Set" === a ? Array.from(r) : "Arguments" === a || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a) ? er(r, e) : void 0;
|
|
629
|
+
}
|
|
664
630
|
}
|
|
665
|
-
function
|
|
666
|
-
if (typeof Symbol
|
|
631
|
+
function Z(r) {
|
|
632
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
667
633
|
}
|
|
668
|
-
function
|
|
669
|
-
if (Array.isArray(r)) return
|
|
634
|
+
function rr(r) {
|
|
635
|
+
if (Array.isArray(r)) return er(r);
|
|
670
636
|
}
|
|
671
|
-
function
|
|
672
|
-
|
|
673
|
-
for (var a = 0, o =
|
|
637
|
+
function er(r, e) {
|
|
638
|
+
(null == e || e > r.length) && (e = r.length);
|
|
639
|
+
for (var a = 0, o = Array(e); a < e; a++) {
|
|
674
640
|
o[a] = r[a];
|
|
675
641
|
}
|
|
676
642
|
return o;
|
|
677
643
|
}
|
|
678
|
-
var
|
|
679
|
-
var
|
|
680
|
-
var
|
|
681
|
-
|
|
682
|
-
var
|
|
683
|
-
var
|
|
644
|
+
var ar = [ "default", "secondary", "primary", "destructive", "subtle" ];
|
|
645
|
+
var or = [].concat(ar, [ "pill" ]);
|
|
646
|
+
var ir = [].concat(ar, [ "toggle", "flat" ]);
|
|
647
|
+
// Array.from(new Set... is used to de-duplicate the appearances
|
|
648
|
+
var tr = Array.from(new Set([].concat(Q(or), Q(ir))));
|
|
649
|
+
var lr = {
|
|
684
650
|
action: t().string,
|
|
685
651
|
appearance: t().oneOf([ "default", "secondary", "primary", "destructive", "subtle", "pill", "toggle", "flat" ]),
|
|
686
652
|
append: t().bool,
|
|
@@ -695,7 +661,7 @@
|
|
|
695
661
|
splunkTheme: t().object,
|
|
696
662
|
to: t().string
|
|
697
663
|
};
|
|
698
|
-
var
|
|
664
|
+
var nr = {
|
|
699
665
|
appearance: "default",
|
|
700
666
|
append: false,
|
|
701
667
|
disabled: false,
|
|
@@ -704,27 +670,29 @@
|
|
|
704
670
|
openInNewContext: false,
|
|
705
671
|
prepend: false
|
|
706
672
|
};
|
|
707
|
-
var
|
|
708
|
-
|
|
709
|
-
var e =
|
|
673
|
+
var sr = function(r) {
|
|
674
|
+
q(a, r);
|
|
675
|
+
var e = R(a);
|
|
710
676
|
function a() {
|
|
711
677
|
var r;
|
|
712
|
-
|
|
678
|
+
V(this, a);
|
|
713
679
|
for (var o = arguments.length, i = new Array(o), t = 0; t < o; t++) {
|
|
714
680
|
i[t] = arguments[t];
|
|
715
681
|
}
|
|
716
682
|
r = e.call.apply(e, [ this ].concat(i));
|
|
717
|
-
|
|
718
|
-
|
|
683
|
+
G(z(r), "component", null);
|
|
684
|
+
G(z(r), "handleMount", (function(e) {
|
|
719
685
|
r.component = e;
|
|
720
686
|
}));
|
|
721
687
|
return r;
|
|
722
688
|
}
|
|
723
|
-
|
|
689
|
+
// @docs-props-type ButtonSimplePropsBase
|
|
690
|
+
W(a, [ {
|
|
724
691
|
key: "focus",
|
|
725
692
|
/**
|
|
726
693
|
* Places focus on the button.
|
|
727
694
|
*/
|
|
695
|
+
// eslint-disable-next-line react/no-unused-class-component-methods
|
|
728
696
|
value: function r() {
|
|
729
697
|
var e;
|
|
730
698
|
(e = this.component) === null || e === void 0 ? void 0 : e.focus();
|
|
@@ -737,10 +705,10 @@
|
|
|
737
705
|
if (i.family === "enterprise") {
|
|
738
706
|
if (o) {
|
|
739
707
|
t = "destructive";
|
|
740
|
-
} else if (!
|
|
708
|
+
} else if (!or /* the readonly string[] cast is needed due to https://github.com/microsoft/TypeScript/issues/26255 */ .includes(a)) {
|
|
741
709
|
t = "default";
|
|
742
710
|
}
|
|
743
|
-
} else if (i.family === "prisma" && !
|
|
711
|
+
} else if (i.family === "prisma" && !ir /* the readonly string[] cast is needed due to https://github.com/microsoft/TypeScript/issues/26255 */ .includes(a)) {
|
|
744
712
|
t = "secondary";
|
|
745
713
|
}
|
|
746
714
|
return t;
|
|
@@ -748,9 +716,9 @@
|
|
|
748
716
|
}, {
|
|
749
717
|
key: "render",
|
|
750
718
|
value: function r() {
|
|
751
|
-
var e = this.props, a = e.append, i = e.children, t = e.error, l = e.prepend, n = e.selected, s =
|
|
719
|
+
var e = this.props, a = e.append, i = e.children, t = e.error, l = e.prepend, n = e.selected, s = N(e, [ "append", "children", "error", "prepend", "selected" ]);
|
|
752
720
|
|
|
753
|
-
return o().createElement(
|
|
721
|
+
return o().createElement(H, _({
|
|
754
722
|
"aria-invalid": t,
|
|
755
723
|
"aria-pressed": n,
|
|
756
724
|
"data-test": "button-simple",
|
|
@@ -765,11 +733,12 @@
|
|
|
765
733
|
} ]);
|
|
766
734
|
return a;
|
|
767
735
|
}(a.Component);
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
var
|
|
771
|
-
|
|
772
|
-
/* harmony default export */ const
|
|
773
|
-
//
|
|
736
|
+
G(sr, "defaultProps", nr);
|
|
737
|
+
G(sr, "propTypes", lr);
|
|
738
|
+
var cr = (0, l.withSplunkTheme)(sr);
|
|
739
|
+
cr.propTypes = sr.propTypes;
|
|
740
|
+
/* harmony default export */ const br = cr;
|
|
741
|
+
// only for styled-components that wrap ButtonSimple
|
|
742
|
+
// CONCATENATED MODULE: ./src/ButtonSimple/index.ts
|
|
774
743
|
module.exports = e;
|
|
775
744
|
/******/})();
|