@spark-web/button 5.0.2 → 5.1.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @spark-web/button
|
|
2
2
|
|
|
3
|
+
## 5.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#558](https://github.com/brighte-labs/spark-web/pull/558)
|
|
8
|
+
[`b89f043`](https://github.com/brighte-labs/spark-web/commit/b89f043f45bb817295496d24a3ec65f867343efa)
|
|
9
|
+
Thanks [@yaminibrighte](https://github.com/yaminibrighte)! - added focus for
|
|
10
|
+
buttons
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
[[`b89f043`](https://github.com/brighte-labs/spark-web/commit/b89f043f45bb817295496d24a3ec65f867343efa)]:
|
|
16
|
+
- @spark-web/theme@5.5.0
|
|
17
|
+
|
|
18
|
+
## 5.0.3
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#546](https://github.com/brighte-labs/spark-web/pull/546)
|
|
23
|
+
[`a805c87`](https://github.com/brighte-labs/spark-web/commit/a805c87c9ffc2776f0235a0203de232092464aa3)
|
|
24
|
+
Thanks [@peterp-brighte](https://github.com/peterp-brighte)! - update theme
|
|
25
|
+
and pass extra props
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
[[`a805c87`](https://github.com/brighte-labs/spark-web/commit/a805c87c9ffc2776f0235a0203de232092464aa3)]:
|
|
29
|
+
- @spark-web/theme@5.3.1
|
|
30
|
+
|
|
3
31
|
## 5.0.2
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
|
@@ -47,12 +47,13 @@ export declare function useButtonStyles({ iconOnly, prominence, rounded, size, t
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
readonly ':focus': {
|
|
50
|
-
boxShadow: string;
|
|
51
50
|
outline: string;
|
|
52
51
|
outlineOffset: string;
|
|
53
52
|
} | {
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
border?: string | undefined;
|
|
54
|
+
outline?: string | undefined;
|
|
55
|
+
outlineOffset?: string | undefined;
|
|
56
|
+
boxShadow?: string | undefined;
|
|
56
57
|
};
|
|
57
58
|
};
|
|
58
59
|
readonly '&[aria-disabled=true]': {
|
|
@@ -293,6 +293,7 @@ function HiddenWhenLoading(_ref2) {
|
|
|
293
293
|
* passed to Emotion's `css` function.
|
|
294
294
|
*/
|
|
295
295
|
function useButtonStyles(_ref) {
|
|
296
|
+
var _theme$components$but, _theme$components;
|
|
296
297
|
var iconOnly = _ref.iconOnly,
|
|
297
298
|
prominence = _ref.prominence,
|
|
298
299
|
_ref$rounded = _ref.rounded,
|
|
@@ -351,7 +352,7 @@ function useButtonStyles(_ref) {
|
|
|
351
352
|
stroke: variant !== null && variant !== void 0 && variant.textToneActive ? theme$1.color.foreground[variant.textToneActive] : undefined
|
|
352
353
|
})
|
|
353
354
|
},
|
|
354
|
-
':focus': focusRingStyles
|
|
355
|
+
':focus': (_theme$components$but = (_theme$components = theme$1.components) === null || _theme$components === void 0 || (_theme$components = _theme$components.buttons) === null || _theme$components === void 0 ? void 0 : _theme$components.focus) !== null && _theme$components$but !== void 0 ? _theme$components$but : focusRingStyles
|
|
355
356
|
},
|
|
356
357
|
'&[aria-disabled=true]': {
|
|
357
358
|
backgroundColor: variant !== null && variant !== void 0 && variant.backgroundDisabled ? theme$1.color.background[variant === null || variant === void 0 ? void 0 : variant.backgroundDisabled] : undefined,
|
|
@@ -478,7 +479,7 @@ var ButtonLink = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
478
479
|
_useButtonStyles2 = _slicedToArray(_useButtonStyles, 2),
|
|
479
480
|
boxProps = _useButtonStyles2[0],
|
|
480
481
|
buttonStyles = _useButtonStyles2[1];
|
|
481
|
-
return jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, boxProps), {}, {
|
|
482
|
+
return jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread(_objectSpread({}, boxProps), {}, {
|
|
482
483
|
"aria-label": consumerProps.label,
|
|
483
484
|
as: LinkComponent,
|
|
484
485
|
asElement: "a",
|
|
@@ -487,7 +488,8 @@ var ButtonLink = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
487
488
|
href: href,
|
|
488
489
|
id: id,
|
|
489
490
|
target: target,
|
|
490
|
-
ref: forwardedRef
|
|
491
|
+
ref: forwardedRef
|
|
492
|
+
}, consumerProps), {}, {
|
|
491
493
|
children: resolveButtonChildren(_objectSpread(_objectSpread({}, consumerProps), {}, {
|
|
492
494
|
isLoading: false,
|
|
493
495
|
prominence: prominence,
|
|
@@ -293,6 +293,7 @@ function HiddenWhenLoading(_ref2) {
|
|
|
293
293
|
* passed to Emotion's `css` function.
|
|
294
294
|
*/
|
|
295
295
|
function useButtonStyles(_ref) {
|
|
296
|
+
var _theme$components$but, _theme$components;
|
|
296
297
|
var iconOnly = _ref.iconOnly,
|
|
297
298
|
prominence = _ref.prominence,
|
|
298
299
|
_ref$rounded = _ref.rounded,
|
|
@@ -351,7 +352,7 @@ function useButtonStyles(_ref) {
|
|
|
351
352
|
stroke: variant !== null && variant !== void 0 && variant.textToneActive ? theme$1.color.foreground[variant.textToneActive] : undefined
|
|
352
353
|
})
|
|
353
354
|
},
|
|
354
|
-
':focus': focusRingStyles
|
|
355
|
+
':focus': (_theme$components$but = (_theme$components = theme$1.components) === null || _theme$components === void 0 || (_theme$components = _theme$components.buttons) === null || _theme$components === void 0 ? void 0 : _theme$components.focus) !== null && _theme$components$but !== void 0 ? _theme$components$but : focusRingStyles
|
|
355
356
|
},
|
|
356
357
|
'&[aria-disabled=true]': {
|
|
357
358
|
backgroundColor: variant !== null && variant !== void 0 && variant.backgroundDisabled ? theme$1.color.background[variant === null || variant === void 0 ? void 0 : variant.backgroundDisabled] : undefined,
|
|
@@ -478,7 +479,7 @@ var ButtonLink = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
478
479
|
_useButtonStyles2 = _slicedToArray(_useButtonStyles, 2),
|
|
479
480
|
boxProps = _useButtonStyles2[0],
|
|
480
481
|
buttonStyles = _useButtonStyles2[1];
|
|
481
|
-
return jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, boxProps), {}, {
|
|
482
|
+
return jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread(_objectSpread({}, boxProps), {}, {
|
|
482
483
|
"aria-label": consumerProps.label,
|
|
483
484
|
as: LinkComponent,
|
|
484
485
|
asElement: "a",
|
|
@@ -487,7 +488,8 @@ var ButtonLink = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
487
488
|
href: href,
|
|
488
489
|
id: id,
|
|
489
490
|
target: target,
|
|
490
|
-
ref: forwardedRef
|
|
491
|
+
ref: forwardedRef
|
|
492
|
+
}, consumerProps), {}, {
|
|
491
493
|
children: resolveButtonChildren(_objectSpread(_objectSpread({}, consumerProps), {}, {
|
|
492
494
|
isLoading: false,
|
|
493
495
|
prominence: prominence,
|
|
@@ -289,6 +289,7 @@ function HiddenWhenLoading(_ref2) {
|
|
|
289
289
|
* passed to Emotion's `css` function.
|
|
290
290
|
*/
|
|
291
291
|
function useButtonStyles(_ref) {
|
|
292
|
+
var _theme$components$but, _theme$components;
|
|
292
293
|
var iconOnly = _ref.iconOnly,
|
|
293
294
|
prominence = _ref.prominence,
|
|
294
295
|
_ref$rounded = _ref.rounded,
|
|
@@ -347,7 +348,7 @@ function useButtonStyles(_ref) {
|
|
|
347
348
|
stroke: variant !== null && variant !== void 0 && variant.textToneActive ? theme.color.foreground[variant.textToneActive] : undefined
|
|
348
349
|
})
|
|
349
350
|
},
|
|
350
|
-
':focus': focusRingStyles
|
|
351
|
+
':focus': (_theme$components$but = (_theme$components = theme.components) === null || _theme$components === void 0 || (_theme$components = _theme$components.buttons) === null || _theme$components === void 0 ? void 0 : _theme$components.focus) !== null && _theme$components$but !== void 0 ? _theme$components$but : focusRingStyles
|
|
351
352
|
},
|
|
352
353
|
'&[aria-disabled=true]': {
|
|
353
354
|
backgroundColor: variant !== null && variant !== void 0 && variant.backgroundDisabled ? theme.color.background[variant === null || variant === void 0 ? void 0 : variant.backgroundDisabled] : undefined,
|
|
@@ -474,7 +475,7 @@ var ButtonLink = forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
474
475
|
_useButtonStyles2 = _slicedToArray(_useButtonStyles, 2),
|
|
475
476
|
boxProps = _useButtonStyles2[0],
|
|
476
477
|
buttonStyles = _useButtonStyles2[1];
|
|
477
|
-
return jsx(Box, _objectSpread(_objectSpread({}, boxProps), {}, {
|
|
478
|
+
return jsx(Box, _objectSpread(_objectSpread(_objectSpread({}, boxProps), {}, {
|
|
478
479
|
"aria-label": consumerProps.label,
|
|
479
480
|
as: LinkComponent,
|
|
480
481
|
asElement: "a",
|
|
@@ -483,7 +484,8 @@ var ButtonLink = forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
483
484
|
href: href,
|
|
484
485
|
id: id,
|
|
485
486
|
target: target,
|
|
486
|
-
ref: forwardedRef
|
|
487
|
+
ref: forwardedRef
|
|
488
|
+
}, consumerProps), {}, {
|
|
487
489
|
children: resolveButtonChildren(_objectSpread(_objectSpread({}, consumerProps), {}, {
|
|
488
490
|
isLoading: false,
|
|
489
491
|
prominence: prominence,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-web/button",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"homepage": "https://github.com/brighte-labs/spark-web#readme",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@spark-web/link": "^5.0.0",
|
|
24
24
|
"@spark-web/spinner": "^5.0.0",
|
|
25
25
|
"@spark-web/text": "^5.1.0",
|
|
26
|
-
"@spark-web/theme": "^5.
|
|
26
|
+
"@spark-web/theme": "^5.5.0",
|
|
27
27
|
"@spark-web/utils": "^5.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|