@spark-web/button 5.0.0-rc.26 → 5.0.0-rc.28
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 +36 -0
- package/dist/declarations/src/button-link.d.ts +1 -0
- package/dist/declarations/src/use-button-styles.d.ts +1 -1
- package/dist/spark-web-button.cjs.dev.js +1 -10
- package/dist/spark-web-button.cjs.prod.js +1 -10
- package/dist/spark-web-button.esm.js +2 -11
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @spark-web/button
|
|
2
2
|
|
|
3
|
+
## 5.0.0-rc.28
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Move fonts to theme package; Introduce Pantheon font family and stylesheet
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @spark-web/spinner@5.0.0-rc.28
|
|
13
|
+
- @spark-web/theme@5.0.0-rc.28
|
|
14
|
+
- @spark-web/utils@5.0.0-rc.28
|
|
15
|
+
- @spark-web/a11y@5.0.0-rc.28
|
|
16
|
+
- @spark-web/icon@5.0.0-rc.28
|
|
17
|
+
- @spark-web/link@5.0.0-rc.28
|
|
18
|
+
- @spark-web/text@5.0.0-rc.28
|
|
19
|
+
- @spark-web/box@5.0.0-rc.28
|
|
20
|
+
|
|
21
|
+
## 5.0.0-rc.27
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- Remove theme prop in button link
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies []:
|
|
30
|
+
- @spark-web/spinner@5.0.0-rc.27
|
|
31
|
+
- @spark-web/theme@5.0.0-rc.27
|
|
32
|
+
- @spark-web/utils@5.0.0-rc.27
|
|
33
|
+
- @spark-web/a11y@5.0.0-rc.27
|
|
34
|
+
- @spark-web/icon@5.0.0-rc.27
|
|
35
|
+
- @spark-web/link@5.0.0-rc.27
|
|
36
|
+
- @spark-web/text@5.0.0-rc.27
|
|
37
|
+
- @spark-web/box@5.0.0-rc.27
|
|
38
|
+
|
|
3
39
|
## 5.0.0-rc.26
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { LinkComponentProps } from '@spark-web/link';
|
|
3
3
|
import type { CommonButtonProps } from "./types.js";
|
|
4
4
|
export declare type ButtonLinkProps = LinkComponentProps & CommonButtonProps;
|
|
5
|
+
/** The appearance of a `Button`, with the semantics of a link. */
|
|
5
6
|
export declare const ButtonLink: <Comp extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "a">(props: {
|
|
6
7
|
as?: Comp | undefined;
|
|
7
8
|
ref?: import("react").Ref<Comp extends "symbol" | "text" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "text" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "textPath" | "tspan" | "use" | "view">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
|
|
@@ -403,7 +403,7 @@ export declare function useButtonStyles({ css, iconOnly, prominence, rounded, si
|
|
|
403
403
|
readonly borderRight?: readonly (string | (string & {}))[] | import("csstype").Property.BorderRight<string | number> | readonly import("csstype").Property.BorderRight<string | number>[] | undefined;
|
|
404
404
|
readonly borderStyle?: import("csstype").Property.BorderStyle | readonly import("csstype").Property.BorderStyle[] | undefined;
|
|
405
405
|
readonly borderTop?: readonly (string | (string & {}))[] | import("csstype").Property.BorderTop<string | number> | readonly import("csstype").Property.BorderTop<string | number>[] | undefined;
|
|
406
|
-
borderWidth: string | number |
|
|
406
|
+
borderWidth: string | number | Partial<Record<"mobile" | "tablet" | "desktop" | "wide", "large" | "standard">> | readonly import("csstype").Property.BorderWidth<string | number>[] | undefined;
|
|
407
407
|
readonly caret?: import("csstype").Property.Caret | readonly import("csstype").Property.Caret[] | undefined;
|
|
408
408
|
readonly columnRule?: readonly (string | (string & {}))[] | import("csstype").Property.ColumnRule<string | number> | readonly import("csstype").Property.ColumnRule<string | number>[] | undefined;
|
|
409
409
|
readonly columns?: readonly (string | (string & {}))[] | import("csstype").Property.Columns<string | number> | readonly import("csstype").Property.Columns<string | number>[] | undefined;
|
|
@@ -451,7 +451,7 @@ function Loading(_ref2) {
|
|
|
451
451
|
|
|
452
452
|
var _excluded = ["data", "href", "target", "id", "css", "prominence", "rounded", "size", "tone"];
|
|
453
453
|
/** The appearance of a `Button`, with the semantics of a link. */
|
|
454
|
-
var
|
|
454
|
+
var ButtonLink = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
455
455
|
var data = _ref.data,
|
|
456
456
|
href = _ref.href,
|
|
457
457
|
target = _ref.target,
|
|
@@ -497,15 +497,6 @@ var UnthemedButtonLink = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
497
497
|
}))
|
|
498
498
|
}));
|
|
499
499
|
});
|
|
500
|
-
var ButtonLink = ts.forwardRefWithAs(function (props, ref) {
|
|
501
|
-
var theme$1 = props.theme;
|
|
502
|
-
return jsxRuntime.jsx(theme.ThemeProvider, {
|
|
503
|
-
theme: theme$1,
|
|
504
|
-
children: jsxRuntime.jsx(UnthemedButtonLink, _objectSpread(_objectSpread({}, props), {}, {
|
|
505
|
-
forwardedRef: ref
|
|
506
|
-
}))
|
|
507
|
-
});
|
|
508
|
-
});
|
|
509
500
|
|
|
510
501
|
exports.BaseButton = BaseButton;
|
|
511
502
|
exports.Button = Button;
|
|
@@ -451,7 +451,7 @@ function Loading(_ref2) {
|
|
|
451
451
|
|
|
452
452
|
var _excluded = ["data", "href", "target", "id", "css", "prominence", "rounded", "size", "tone"];
|
|
453
453
|
/** The appearance of a `Button`, with the semantics of a link. */
|
|
454
|
-
var
|
|
454
|
+
var ButtonLink = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
455
455
|
var data = _ref.data,
|
|
456
456
|
href = _ref.href,
|
|
457
457
|
target = _ref.target,
|
|
@@ -497,15 +497,6 @@ var UnthemedButtonLink = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
497
497
|
}))
|
|
498
498
|
}));
|
|
499
499
|
});
|
|
500
|
-
var ButtonLink = ts.forwardRefWithAs(function (props, ref) {
|
|
501
|
-
var theme$1 = props.theme;
|
|
502
|
-
return jsxRuntime.jsx(theme.ThemeProvider, {
|
|
503
|
-
theme: theme$1,
|
|
504
|
-
children: jsxRuntime.jsx(UnthemedButtonLink, _objectSpread(_objectSpread({}, props), {}, {
|
|
505
|
-
forwardedRef: ref
|
|
506
|
-
}))
|
|
507
|
-
});
|
|
508
|
-
});
|
|
509
500
|
|
|
510
501
|
exports.BaseButton = BaseButton;
|
|
511
502
|
exports.Button = Button;
|
|
@@ -9,7 +9,7 @@ import { css } from '@emotion/react';
|
|
|
9
9
|
import { useFocusRing, VisuallyHidden } from '@spark-web/a11y';
|
|
10
10
|
import { Spinner } from '@spark-web/spinner';
|
|
11
11
|
import { Text } from '@spark-web/text';
|
|
12
|
-
import { useTheme
|
|
12
|
+
import { useTheme } from '@spark-web/theme';
|
|
13
13
|
import { useLinkComponent } from '@spark-web/link';
|
|
14
14
|
import { forwardRefWithAs } from '@spark-web/utils/ts';
|
|
15
15
|
|
|
@@ -447,7 +447,7 @@ function Loading(_ref2) {
|
|
|
447
447
|
|
|
448
448
|
var _excluded = ["data", "href", "target", "id", "css", "prominence", "rounded", "size", "tone"];
|
|
449
449
|
/** The appearance of a `Button`, with the semantics of a link. */
|
|
450
|
-
var
|
|
450
|
+
var ButtonLink = forwardRefWithAs(function (_ref, forwardedRef) {
|
|
451
451
|
var data = _ref.data,
|
|
452
452
|
href = _ref.href,
|
|
453
453
|
target = _ref.target,
|
|
@@ -493,14 +493,5 @@ var UnthemedButtonLink = forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
493
493
|
}))
|
|
494
494
|
}));
|
|
495
495
|
});
|
|
496
|
-
var ButtonLink = forwardRefWithAs(function (props, ref) {
|
|
497
|
-
var theme = props.theme;
|
|
498
|
-
return jsx(ThemeProvider, {
|
|
499
|
-
theme: theme,
|
|
500
|
-
children: jsx(UnthemedButtonLink, _objectSpread(_objectSpread({}, props), {}, {
|
|
501
|
-
forwardedRef: ref
|
|
502
|
-
}))
|
|
503
|
-
});
|
|
504
|
-
});
|
|
505
496
|
|
|
506
497
|
export { BaseButton, Button, ButtonLink, useButtonStyles };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-web/button",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.28",
|
|
4
4
|
"homepage": "https://github.com/brighte-labs/spark-web#readme",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime": "^7.25.0",
|
|
19
19
|
"@emotion/react": "^11.14.0",
|
|
20
|
-
"@spark-web/a11y": "^5.0.0-rc.
|
|
21
|
-
"@spark-web/box": "^5.0.0-rc.
|
|
22
|
-
"@spark-web/icon": "^5.0.0-rc.
|
|
23
|
-
"@spark-web/link": "^5.0.0-rc.
|
|
24
|
-
"@spark-web/spinner": "^5.0.0-rc.
|
|
25
|
-
"@spark-web/text": "^5.0.0-rc.
|
|
26
|
-
"@spark-web/theme": "^5.0.0-rc.
|
|
27
|
-
"@spark-web/utils": "^5.0.0-rc.
|
|
20
|
+
"@spark-web/a11y": "^5.0.0-rc.28",
|
|
21
|
+
"@spark-web/box": "^5.0.0-rc.28",
|
|
22
|
+
"@spark-web/icon": "^5.0.0-rc.28",
|
|
23
|
+
"@spark-web/link": "^5.0.0-rc.28",
|
|
24
|
+
"@spark-web/spinner": "^5.0.0-rc.28",
|
|
25
|
+
"@spark-web/text": "^5.0.0-rc.28",
|
|
26
|
+
"@spark-web/theme": "^5.0.0-rc.28",
|
|
27
|
+
"@spark-web/utils": "^5.0.0-rc.28"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/react": "^18.2.0",
|