@spark-web/button 1.2.0 → 1.4.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/README.md +1 -0
- package/dist/declarations/src/ButtonLink.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +2 -0
- package/dist/declarations/src/types.d.ts +2 -2
- package/dist/declarations/src/useButtonStyles.d.ts +82 -4
- package/dist/declarations/src/utils.d.ts +13 -2
- package/dist/spark-web-button.cjs.dev.js +136 -76
- package/dist/spark-web-button.cjs.prod.js +136 -76
- package/dist/spark-web-button.esm.js +136 -77
- package/package.json +10 -10
|
@@ -8,13 +8,13 @@ var box = require('@spark-web/box');
|
|
|
8
8
|
var utils = require('@spark-web/utils');
|
|
9
9
|
var react = require('react');
|
|
10
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
12
|
+
var css = require('@emotion/css');
|
|
11
13
|
var a11y = require('@spark-web/a11y');
|
|
12
14
|
var spinner = require('@spark-web/spinner');
|
|
13
15
|
var text = require('@spark-web/text');
|
|
14
|
-
var css = require('@emotion/css');
|
|
15
16
|
var theme = require('@spark-web/theme');
|
|
16
17
|
var link = require('@spark-web/link');
|
|
17
|
-
var internal = require('@spark-web/utils/internal');
|
|
18
18
|
var ts = require('@spark-web/utils/ts');
|
|
19
19
|
|
|
20
20
|
var _excluded$2 = ["onClick", "disabled", "type"];
|
|
@@ -24,7 +24,7 @@ var BaseButton = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
|
|
|
24
24
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
25
25
|
_ref$type = _ref.type,
|
|
26
26
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
27
|
-
|
|
27
|
+
consumerProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
28
28
|
|
|
29
29
|
var internalRef = react.useRef(null);
|
|
30
30
|
var composedRef = utils.useComposedRefs(internalRef, forwardedRef);
|
|
@@ -42,11 +42,12 @@ var BaseButton = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
|
|
|
42
42
|
var preventableClickHandler = getPreventableClickHandler(onClickProp, disabled);
|
|
43
43
|
preventableClickHandler(event);
|
|
44
44
|
}, [disabled, onClickProp]);
|
|
45
|
-
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({
|
|
46
|
-
as: "button"
|
|
47
|
-
|
|
45
|
+
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, consumerProps), {}, {
|
|
46
|
+
as: "button",
|
|
47
|
+
ref: composedRef // Hide aria-disabled attribute when button is not disabled
|
|
48
|
+
,
|
|
49
|
+
"aria-disabled": disabled || undefined,
|
|
48
50
|
onClick: onClick,
|
|
49
|
-
ref: composedRef,
|
|
50
51
|
type: type
|
|
51
52
|
}));
|
|
52
53
|
});
|
|
@@ -66,39 +67,62 @@ function getPreventableClickHandler(onClick, disabled) {
|
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
69
|
|
|
70
|
+
var highDisabledStyles = {
|
|
71
|
+
backgroundDisabled: 'disabled',
|
|
72
|
+
borderDisabled: 'fieldDisabled',
|
|
73
|
+
textToneDisabled: 'neutralInverted'
|
|
74
|
+
};
|
|
75
|
+
var highDisabledAltStyles = {
|
|
76
|
+
backgroundDisabled: 'neutral',
|
|
77
|
+
borderDisabled: 'standard',
|
|
78
|
+
textToneDisabled: 'placeholder'
|
|
79
|
+
};
|
|
80
|
+
var lowDisabledStyles = {
|
|
81
|
+
backgroundDisabled: 'inputDisabled',
|
|
82
|
+
textToneDisabled: 'disabled'
|
|
83
|
+
};
|
|
84
|
+
var lowDisabledAltStyles = {
|
|
85
|
+
backgroundDisabled: 'inputDisabled',
|
|
86
|
+
borderDisabled: 'fieldDisabled',
|
|
87
|
+
textToneDisabled: 'disabled'
|
|
88
|
+
};
|
|
89
|
+
var noneDisabledStyles = {
|
|
90
|
+
backgroundDisabled: 'neutral',
|
|
91
|
+
textToneDisabled: 'disabled'
|
|
92
|
+
};
|
|
69
93
|
var variants = {
|
|
70
94
|
high: {
|
|
71
|
-
primary: {
|
|
95
|
+
primary: _objectSpread({
|
|
72
96
|
background: 'primary',
|
|
73
97
|
backgroundHover: 'primaryHover',
|
|
74
98
|
backgroundActive: 'primaryActive'
|
|
75
|
-
},
|
|
76
|
-
secondary: {
|
|
99
|
+
}, highDisabledStyles),
|
|
100
|
+
secondary: _objectSpread({
|
|
77
101
|
background: 'secondary',
|
|
78
102
|
backgroundHover: 'secondaryHover',
|
|
79
103
|
backgroundActive: 'secondaryActive'
|
|
80
|
-
},
|
|
81
|
-
neutral: {
|
|
104
|
+
}, highDisabledStyles),
|
|
105
|
+
neutral: _objectSpread({
|
|
82
106
|
background: 'neutral',
|
|
83
107
|
border: 'field',
|
|
84
108
|
backgroundHover: 'neutralHover',
|
|
85
109
|
backgroundActive: 'neutralActive'
|
|
86
|
-
},
|
|
87
|
-
positive: {
|
|
110
|
+
}, highDisabledAltStyles),
|
|
111
|
+
positive: _objectSpread({
|
|
88
112
|
background: 'positive',
|
|
89
113
|
backgroundHover: 'positiveHover',
|
|
90
114
|
backgroundActive: 'positiveActive'
|
|
91
|
-
},
|
|
92
|
-
critical: {
|
|
115
|
+
}, highDisabledStyles),
|
|
116
|
+
critical: _objectSpread({
|
|
93
117
|
background: 'critical',
|
|
94
118
|
backgroundHover: 'criticalHover',
|
|
95
119
|
backgroundActive: 'criticalActive'
|
|
96
|
-
},
|
|
120
|
+
}, highDisabledStyles),
|
|
97
121
|
caution: undefined,
|
|
98
122
|
info: undefined
|
|
99
123
|
},
|
|
100
124
|
low: {
|
|
101
|
-
primary: {
|
|
125
|
+
primary: _objectSpread({
|
|
102
126
|
background: 'surface',
|
|
103
127
|
border: 'primary',
|
|
104
128
|
borderWidth: 'large',
|
|
@@ -109,8 +133,8 @@ var variants = {
|
|
|
109
133
|
backgroundActive: 'none',
|
|
110
134
|
borderActive: 'primaryActive',
|
|
111
135
|
textToneActive: 'primaryActive'
|
|
112
|
-
},
|
|
113
|
-
secondary: {
|
|
136
|
+
}, lowDisabledAltStyles),
|
|
137
|
+
secondary: _objectSpread({
|
|
114
138
|
background: 'surface',
|
|
115
139
|
border: 'secondary',
|
|
116
140
|
borderWidth: 'large',
|
|
@@ -121,76 +145,76 @@ var variants = {
|
|
|
121
145
|
backgroundActive: 'none',
|
|
122
146
|
borderActive: 'secondaryActive',
|
|
123
147
|
textToneActive: 'secondaryActive'
|
|
124
|
-
},
|
|
125
|
-
neutral: {
|
|
148
|
+
}, lowDisabledAltStyles),
|
|
149
|
+
neutral: _objectSpread({
|
|
126
150
|
background: 'neutralLow',
|
|
127
151
|
backgroundHover: 'neutralLowHover',
|
|
128
152
|
backgroundActive: 'neutralLowActive'
|
|
129
|
-
},
|
|
130
|
-
positive: {
|
|
153
|
+
}, lowDisabledStyles),
|
|
154
|
+
positive: _objectSpread({
|
|
131
155
|
background: 'positiveLow',
|
|
132
156
|
backgroundHover: 'positiveLowHover',
|
|
133
157
|
backgroundActive: 'positiveLowActive'
|
|
134
|
-
},
|
|
135
|
-
caution: {
|
|
158
|
+
}, lowDisabledStyles),
|
|
159
|
+
caution: _objectSpread({
|
|
136
160
|
background: 'cautionLow',
|
|
137
161
|
backgroundHover: 'cautionLowHover',
|
|
138
162
|
backgroundActive: 'cautionLowActive'
|
|
139
|
-
},
|
|
140
|
-
critical: {
|
|
163
|
+
}, lowDisabledStyles),
|
|
164
|
+
critical: _objectSpread({
|
|
141
165
|
background: 'criticalLow',
|
|
142
166
|
backgroundHover: 'criticalLowHover',
|
|
143
167
|
backgroundActive: 'criticalLowActive'
|
|
144
|
-
},
|
|
145
|
-
info: {
|
|
168
|
+
}, lowDisabledStyles),
|
|
169
|
+
info: _objectSpread({
|
|
146
170
|
background: 'infoLow',
|
|
147
171
|
backgroundHover: 'infoLowHover',
|
|
148
172
|
backgroundActive: 'infoLowActive'
|
|
149
|
-
}
|
|
173
|
+
}, lowDisabledStyles)
|
|
150
174
|
},
|
|
151
175
|
none: {
|
|
152
|
-
primary: {
|
|
176
|
+
primary: _objectSpread({
|
|
153
177
|
background: 'surface',
|
|
154
178
|
textTone: 'primaryActive',
|
|
155
179
|
backgroundHover: 'primaryLowHover',
|
|
156
180
|
backgroundActive: 'primaryLowActive'
|
|
157
|
-
},
|
|
158
|
-
secondary: {
|
|
181
|
+
}, noneDisabledStyles),
|
|
182
|
+
secondary: _objectSpread({
|
|
159
183
|
background: 'surface',
|
|
160
184
|
textTone: 'secondaryActive',
|
|
161
185
|
backgroundHover: 'secondaryLowHover',
|
|
162
186
|
backgroundActive: 'secondaryLowActive'
|
|
163
|
-
},
|
|
164
|
-
neutral: {
|
|
187
|
+
}, noneDisabledStyles),
|
|
188
|
+
neutral: _objectSpread({
|
|
165
189
|
background: 'surface',
|
|
166
190
|
textTone: 'neutral',
|
|
167
191
|
backgroundHover: 'neutralLowHover',
|
|
168
192
|
backgroundActive: 'neutralLowActive'
|
|
169
|
-
},
|
|
170
|
-
positive: {
|
|
193
|
+
}, noneDisabledStyles),
|
|
194
|
+
positive: _objectSpread({
|
|
171
195
|
background: 'surface',
|
|
172
196
|
textTone: 'positive',
|
|
173
197
|
backgroundHover: 'positiveLowHover',
|
|
174
198
|
backgroundActive: 'positiveLowActive'
|
|
175
|
-
},
|
|
176
|
-
caution: {
|
|
199
|
+
}, noneDisabledStyles),
|
|
200
|
+
caution: _objectSpread({
|
|
177
201
|
background: 'surface',
|
|
178
202
|
textTone: 'caution',
|
|
179
203
|
backgroundHover: 'cautionLowHover',
|
|
180
204
|
backgroundActive: 'cautionLowActive'
|
|
181
|
-
},
|
|
182
|
-
critical: {
|
|
205
|
+
}, noneDisabledStyles),
|
|
206
|
+
critical: _objectSpread({
|
|
183
207
|
background: 'surface',
|
|
184
208
|
textTone: 'critical',
|
|
185
209
|
backgroundHover: 'criticalLowHover',
|
|
186
210
|
backgroundActive: 'criticalLowActive'
|
|
187
|
-
},
|
|
188
|
-
info: {
|
|
211
|
+
}, noneDisabledStyles),
|
|
212
|
+
info: _objectSpread({
|
|
189
213
|
background: 'surface',
|
|
190
214
|
textTone: 'info',
|
|
191
215
|
backgroundHover: 'infoLowHover',
|
|
192
216
|
backgroundActive: 'infoLowActive'
|
|
193
|
-
}
|
|
217
|
+
}, noneDisabledStyles)
|
|
194
218
|
}
|
|
195
219
|
};
|
|
196
220
|
var mapTokens = {
|
|
@@ -216,7 +240,7 @@ var resolveButtonChildren = function resolveButtonChildren(_ref) {
|
|
|
216
240
|
tone = _ref.tone;
|
|
217
241
|
var variant = variants[prominence][tone];
|
|
218
242
|
return react.Children.map(children, function (child) {
|
|
219
|
-
if (typeof child === 'string') {
|
|
243
|
+
if (typeof child === 'string' || typeof child === 'number') {
|
|
220
244
|
return /*#__PURE__*/jsxRuntime.jsx(HiddenWhenLoading, {
|
|
221
245
|
isLoading: isLoading,
|
|
222
246
|
children: /*#__PURE__*/jsxRuntime.jsx(text.Text, {
|
|
@@ -263,6 +287,15 @@ function HiddenWhenLoading(_ref2) {
|
|
|
263
287
|
});
|
|
264
288
|
}
|
|
265
289
|
|
|
290
|
+
/**
|
|
291
|
+
* useButtonStyles
|
|
292
|
+
*
|
|
293
|
+
* Custom hook for styling buttons and certain links.
|
|
294
|
+
* Returns a tuple where the first item is an object of props to spread onto the
|
|
295
|
+
* underlying `Box` component, and the second item is a CSS object that can be
|
|
296
|
+
* passed to Emotion's `css` function.
|
|
297
|
+
*/
|
|
298
|
+
|
|
266
299
|
function useButtonStyles(_ref) {
|
|
267
300
|
var iconOnly = _ref.iconOnly,
|
|
268
301
|
prominence = _ref.prominence,
|
|
@@ -272,14 +305,17 @@ function useButtonStyles(_ref) {
|
|
|
272
305
|
var focusRingStyles = a11y.useFocusRing({
|
|
273
306
|
tone: tone
|
|
274
307
|
});
|
|
308
|
+
var disabledFocusRingStyles = a11y.useFocusRing({
|
|
309
|
+
tone: 'disabled'
|
|
310
|
+
});
|
|
275
311
|
var variant = variants[prominence][tone];
|
|
276
312
|
var isLarge = size === 'large';
|
|
277
|
-
var
|
|
278
|
-
transitionProperty: 'color, background-color, border-color, text-decoration-color',
|
|
279
|
-
transitionTimingFunction:
|
|
313
|
+
var transitionColors = {
|
|
314
|
+
transitionProperty: 'color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
|
|
315
|
+
transitionTimingFunction: theme$1.animation.standard.easing,
|
|
280
316
|
transitionDuration: "".concat(theme$1.animation.standard.duration, "ms")
|
|
281
317
|
};
|
|
282
|
-
|
|
318
|
+
return [{
|
|
283
319
|
alignItems: 'center',
|
|
284
320
|
background: variant === null || variant === void 0 ? void 0 : variant.background,
|
|
285
321
|
border: variant === null || variant === void 0 ? void 0 : variant.border,
|
|
@@ -292,32 +328,44 @@ function useButtonStyles(_ref) {
|
|
|
292
328
|
justifyContent: 'center',
|
|
293
329
|
paddingX: iconOnly ? undefined : mapTokens.spacing[size],
|
|
294
330
|
position: 'relative',
|
|
295
|
-
width: iconOnly ? mapTokens.size[size] : undefined
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
331
|
+
width: iconOnly ? mapTokens.size[size] : undefined
|
|
332
|
+
}, _objectSpread(_objectSpread({}, transitionColors), {}, {
|
|
333
|
+
// Styles for buttons that aren't disabled.
|
|
334
|
+
// Using the :not() pseudo-class so we don't have to undo the styles when
|
|
335
|
+
// the button is disabled.
|
|
336
|
+
'&:not([aria-disabled=true])': {
|
|
337
|
+
':hover': {
|
|
299
338
|
borderColor: variant !== null && variant !== void 0 && variant.borderHover ? theme$1.border.color[variant.borderHover] : undefined,
|
|
300
339
|
backgroundColor: variant !== null && variant !== void 0 && variant.backgroundHover ? theme$1.backgroundInteractions[variant.backgroundHover] : undefined,
|
|
301
340
|
// Style button text when hovering
|
|
302
|
-
'> *': _objectSpread(_objectSpread({},
|
|
341
|
+
'> *': _objectSpread(_objectSpread({}, transitionColors), {}, {
|
|
303
342
|
color: variant !== null && variant !== void 0 && variant.textToneHover ? theme$1.color.foreground[variant.textToneHover] : undefined,
|
|
304
343
|
stroke: variant !== null && variant !== void 0 && variant.textToneHover ? theme$1.color.foreground[variant.textToneHover] : undefined
|
|
305
344
|
})
|
|
306
345
|
},
|
|
307
|
-
'
|
|
346
|
+
':active': {
|
|
308
347
|
borderColor: variant !== null && variant !== void 0 && variant.borderActive ? theme$1.border.color[variant.borderActive] : undefined,
|
|
309
348
|
backgroundColor: variant !== null && variant !== void 0 && variant.backgroundActive ? theme$1.backgroundInteractions[variant === null || variant === void 0 ? void 0 : variant.backgroundActive] : undefined,
|
|
310
349
|
transform: 'scale(0.98)',
|
|
311
350
|
// Style button text when it's active
|
|
312
|
-
'> *': _objectSpread(_objectSpread({},
|
|
351
|
+
'> *': _objectSpread(_objectSpread({}, transitionColors), {}, {
|
|
313
352
|
color: variant !== null && variant !== void 0 && variant.textToneActive ? theme$1.color.foreground[variant.textToneActive] : undefined,
|
|
314
353
|
stroke: variant !== null && variant !== void 0 && variant.textToneActive ? theme$1.color.foreground[variant.textToneActive] : undefined
|
|
315
354
|
})
|
|
316
355
|
},
|
|
317
356
|
':focus': focusRingStyles
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
|
|
357
|
+
},
|
|
358
|
+
'&[aria-disabled=true]': {
|
|
359
|
+
backgroundColor: variant !== null && variant !== void 0 && variant.backgroundDisabled ? theme$1.color.background[variant === null || variant === void 0 ? void 0 : variant.backgroundDisabled] : undefined,
|
|
360
|
+
borderColor: variant !== null && variant !== void 0 && variant.borderDisabled ? theme$1.border.color[variant.borderDisabled] : undefined,
|
|
361
|
+
cursor: 'default',
|
|
362
|
+
'*': {
|
|
363
|
+
color: variant !== null && variant !== void 0 && variant.textToneDisabled ? theme$1.color.foreground[variant.textToneDisabled] : undefined,
|
|
364
|
+
stroke: variant !== null && variant !== void 0 && variant.textToneDisabled ? theme$1.color.foreground[variant.textToneDisabled] : undefined
|
|
365
|
+
},
|
|
366
|
+
':focus': disabledFocusRingStyles
|
|
367
|
+
}
|
|
368
|
+
})];
|
|
321
369
|
}
|
|
322
370
|
|
|
323
371
|
var _excluded$1 = ["aria-controls", "aria-describedby", "aria-expanded", "data", "disabled", "id", "loading", "onClick", "prominence", "size", "tone", "type"];
|
|
@@ -346,21 +394,26 @@ var Button = /*#__PURE__*/react.forwardRef(function (_ref, forwardedRef) {
|
|
|
346
394
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
347
395
|
|
|
348
396
|
var iconOnly = Boolean(props.label);
|
|
349
|
-
|
|
397
|
+
|
|
398
|
+
var _useButtonStyles = useButtonStyles({
|
|
350
399
|
iconOnly: iconOnly,
|
|
351
400
|
size: size,
|
|
352
401
|
tone: tone,
|
|
353
402
|
prominence: prominence
|
|
354
|
-
})
|
|
403
|
+
}),
|
|
404
|
+
_useButtonStyles2 = _slicedToArray(_useButtonStyles, 2),
|
|
405
|
+
boxProps = _useButtonStyles2[0],
|
|
406
|
+
buttonStyles = _useButtonStyles2[1];
|
|
407
|
+
|
|
355
408
|
var isDisabled = disabled || loading;
|
|
356
409
|
var isLoading = loading && !disabled;
|
|
357
410
|
var variant = variants[prominence][tone];
|
|
358
|
-
return /*#__PURE__*/jsxRuntime.jsxs(BaseButton, _objectSpread(_objectSpread({},
|
|
411
|
+
return /*#__PURE__*/jsxRuntime.jsxs(BaseButton, _objectSpread(_objectSpread({}, boxProps), {}, {
|
|
359
412
|
"aria-controls": ariaControls,
|
|
360
413
|
"aria-describedby": ariaDescribedBy,
|
|
361
|
-
"aria-disabled": isDisabled,
|
|
362
414
|
"aria-expanded": ariaExpanded,
|
|
363
415
|
"aria-label": props.label,
|
|
416
|
+
className: css.css(buttonStyles),
|
|
364
417
|
data: data,
|
|
365
418
|
disabled: isDisabled,
|
|
366
419
|
id: id,
|
|
@@ -403,7 +456,7 @@ function Loading(_ref2) {
|
|
|
403
456
|
var _excluded = ["data", "href", "id", "prominence", "size", "tone"];
|
|
404
457
|
|
|
405
458
|
/** The appearance of a `Button`, with the semantics of a link. */
|
|
406
|
-
var ButtonLink = ts.forwardRefWithAs(function (_ref,
|
|
459
|
+
var ButtonLink = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
407
460
|
var data = _ref.data,
|
|
408
461
|
href = _ref.href,
|
|
409
462
|
id = _ref.id,
|
|
@@ -413,25 +466,31 @@ var ButtonLink = ts.forwardRefWithAs(function (_ref, ref) {
|
|
|
413
466
|
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
414
467
|
_ref$tone = _ref.tone,
|
|
415
468
|
tone = _ref$tone === void 0 ? 'primary' : _ref$tone,
|
|
416
|
-
|
|
469
|
+
consumerProps = _objectWithoutProperties(_ref, _excluded);
|
|
417
470
|
|
|
418
|
-
var LinkComponent = link.useLinkComponent(
|
|
419
|
-
var iconOnly = Boolean(
|
|
420
|
-
|
|
471
|
+
var LinkComponent = link.useLinkComponent(forwardedRef);
|
|
472
|
+
var iconOnly = Boolean(consumerProps.label);
|
|
473
|
+
|
|
474
|
+
var _useButtonStyles = useButtonStyles({
|
|
421
475
|
iconOnly: iconOnly,
|
|
422
476
|
prominence: prominence,
|
|
423
477
|
size: size,
|
|
424
478
|
tone: tone
|
|
425
|
-
})
|
|
426
|
-
|
|
427
|
-
|
|
479
|
+
}),
|
|
480
|
+
_useButtonStyles2 = _slicedToArray(_useButtonStyles, 2),
|
|
481
|
+
boxProps = _useButtonStyles2[0],
|
|
482
|
+
buttonStyles = _useButtonStyles2[1];
|
|
483
|
+
|
|
484
|
+
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, boxProps), {}, {
|
|
485
|
+
"aria-label": consumerProps.label,
|
|
428
486
|
as: LinkComponent,
|
|
429
487
|
asElement: "a",
|
|
430
|
-
|
|
488
|
+
className: css.css(buttonStyles),
|
|
489
|
+
data: data,
|
|
431
490
|
href: href,
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
children: resolveButtonChildren(_objectSpread(_objectSpread({},
|
|
491
|
+
id: id,
|
|
492
|
+
ref: forwardedRef,
|
|
493
|
+
children: resolveButtonChildren(_objectSpread(_objectSpread({}, consumerProps), {}, {
|
|
435
494
|
isLoading: false,
|
|
436
495
|
prominence: prominence,
|
|
437
496
|
size: size,
|
|
@@ -443,3 +502,4 @@ var ButtonLink = ts.forwardRefWithAs(function (_ref, ref) {
|
|
|
443
502
|
exports.BaseButton = BaseButton;
|
|
444
503
|
exports.Button = Button;
|
|
445
504
|
exports.ButtonLink = ButtonLink;
|
|
505
|
+
exports.useButtonStyles = useButtonStyles;
|