@spark-ui/link-box 0.1.1 → 1.0.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 +12 -0
- package/dist/LinkBoxLink.d.ts +5 -0
- package/dist/LinkBoxRaised.d.ts +9 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +15 -13
- package/dist/public/docgen.json +33 -6
- package/package.json +2 -2
- package/dist/LinkOverlay.d.ts +0 -5
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,18 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [1.0.0](https://github.com/adevinta/spark/compare/@spark-ui/link-box@0.2.0...@spark-ui/link-box@1.0.0) (2024-05-22)
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
- **link-box:** release stable version of LinkBox ([8606b05](https://github.com/adevinta/spark/commit/8606b0517a5879dfaa7a08b4744781426c69d384))
|
11
|
+
|
12
|
+
# [0.2.0](https://github.com/adevinta/spark/compare/@spark-ui/link-box@0.1.1...@spark-ui/link-box@0.2.0) (2024-05-21)
|
13
|
+
|
14
|
+
### Features
|
15
|
+
|
16
|
+
- **link-box:** added Linkbox.Link to raised components inside the box ([fc48ec4](https://github.com/adevinta/spark/commit/fc48ec46da08b878bf785eb8c92c53f95531b54c))
|
17
|
+
|
6
18
|
## [0.1.1](https://github.com/adevinta/spark/compare/@spark-ui/link-box@0.1.0...@spark-ui/link-box@0.1.1) (2024-04-29)
|
7
19
|
|
8
20
|
**Note:** Version bump only for package @spark-ui/link-box
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
2
|
+
export interface LinkBoxLinkProps extends ComponentPropsWithoutRef<'a'> {
|
3
|
+
asChild?: boolean;
|
4
|
+
}
|
5
|
+
export declare const LinkBoxLink: import("react").ForwardRefExoticComponent<LinkBoxLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
export interface LinkBoxRaisedProps {
|
3
|
+
className?: string;
|
4
|
+
children: ReactNode;
|
5
|
+
}
|
6
|
+
export declare const LinkBoxRaised: {
|
7
|
+
({ className, ...props }: LinkBoxRaisedProps): import("react").JSX.Element;
|
8
|
+
displayName: string;
|
9
|
+
};
|
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
import type { FC } from 'react';
|
2
2
|
import { LinkBoxProps } from './LinkBox';
|
3
|
-
import {
|
3
|
+
import { LinkBoxLink } from './LinkBoxLink';
|
4
|
+
import { LinkBoxRaised } from './LinkBoxRaised';
|
4
5
|
export declare const LinkBox: FC<LinkBoxProps> & {
|
5
|
-
|
6
|
+
Link: typeof LinkBoxLink;
|
7
|
+
Raised: typeof LinkBoxRaised;
|
6
8
|
};
|
7
9
|
export { type LinkBoxProps } from './LinkBox';
|
8
|
-
export { type
|
10
|
+
export { type LinkBoxLinkProps } from './LinkBoxLink';
|
package/dist/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),r=require("@spark-ui/slot"),l=require("class-variance-authority"),c=o.forwardRef(({className:e,asChild:a,...i},n)=>{const t=a?r.Slot:"div";return o.createElement(t,{ref:n,"data-spark-component":"link-box",className:l.cx("relative",e),...i})});c.displayName="LinkBox";const d=o.forwardRef(({className:e,asChild:a,...i},n)=>{const t=a?r.Slot:"a";return o.createElement(t,{ref:n,"data-spark-component":"link-box-link",className:l.cx("static before:absolute before:left-none before:top-none before:z-base before:block before:size-full before:content-['']",e),...i})});d.displayName="LinkBox.Link";const m=({className:e,...a})=>o.createElement(r.Slot,{className:l.cx("relative z-raised",e),...a});m.displayName="LinkBox.Raised";const s=Object.assign(c,{Link:d,Raised:m});s.displayName="LinkBox",s.Link.displayName="LinkBox.Link",s.Raised.displayName="LinkBox.Raised",exports.LinkBox=s;
|
package/dist/index.mjs
CHANGED
@@ -1,18 +1,20 @@
|
|
1
|
-
import
|
2
|
-
import { Slot as
|
3
|
-
import { cx as
|
4
|
-
const
|
5
|
-
const
|
6
|
-
return
|
1
|
+
import t, { forwardRef as m } from "react";
|
2
|
+
import { Slot as r } from "@spark-ui/slot";
|
3
|
+
import { cx as l } from "class-variance-authority";
|
4
|
+
const c = m(({ className: e, asChild: a, ...s }, o) => {
|
5
|
+
const i = a ? r : "div";
|
6
|
+
return t.createElement(i, { ref: o, "data-spark-component": "link-box", className: l("relative", e), ...s });
|
7
7
|
});
|
8
|
-
|
9
|
-
const
|
10
|
-
const
|
11
|
-
return
|
8
|
+
c.displayName = "LinkBox";
|
9
|
+
const d = m(({ className: e, asChild: a, ...s }, o) => {
|
10
|
+
const i = a ? r : "a";
|
11
|
+
return t.createElement(i, { ref: o, "data-spark-component": "link-box-link", className: l("static before:absolute before:left-none before:top-none before:z-base before:block before:size-full before:content-['']", e), ...s });
|
12
12
|
});
|
13
|
-
|
14
|
-
const
|
15
|
-
|
13
|
+
d.displayName = "LinkBox.Link";
|
14
|
+
const k = ({ className: e, ...a }) => t.createElement(r, { className: l("relative z-raised", e), ...a });
|
15
|
+
k.displayName = "LinkBox.Raised";
|
16
|
+
const n = Object.assign(c, { Link: d, Raised: k });
|
17
|
+
n.displayName = "LinkBox", n.Link.displayName = "LinkBox.Link", n.Raised.displayName = "LinkBox.Raised";
|
16
18
|
export {
|
17
19
|
n as LinkBox
|
18
20
|
};
|
package/dist/public/docgen.json
CHANGED
@@ -26,10 +26,10 @@
|
|
26
26
|
}
|
27
27
|
}
|
28
28
|
},
|
29
|
-
"LinkBox.
|
29
|
+
"LinkBox.Link": {
|
30
30
|
"tags": {},
|
31
31
|
"description": "",
|
32
|
-
"displayName": "LinkBox.
|
32
|
+
"displayName": "LinkBox.Link",
|
33
33
|
"methods": [],
|
34
34
|
"props": {
|
35
35
|
"asChild": {
|
@@ -37,13 +37,13 @@
|
|
37
37
|
"description": "",
|
38
38
|
"name": "asChild",
|
39
39
|
"parent": {
|
40
|
-
"fileName": "link-box/src/
|
41
|
-
"name": "
|
40
|
+
"fileName": "link-box/src/LinkBoxLink.tsx",
|
41
|
+
"name": "LinkBoxLinkProps"
|
42
42
|
},
|
43
43
|
"declarations": [
|
44
44
|
{
|
45
|
-
"fileName": "link-box/src/
|
46
|
-
"name": "
|
45
|
+
"fileName": "link-box/src/LinkBoxLink.tsx",
|
46
|
+
"name": "LinkBoxLinkProps"
|
47
47
|
}
|
48
48
|
],
|
49
49
|
"required": false,
|
@@ -52,5 +52,32 @@
|
|
52
52
|
}
|
53
53
|
}
|
54
54
|
}
|
55
|
+
},
|
56
|
+
"LinkBox.Raised": {
|
57
|
+
"tags": {},
|
58
|
+
"description": "",
|
59
|
+
"displayName": "LinkBox.Raised",
|
60
|
+
"methods": [],
|
61
|
+
"props": {
|
62
|
+
"className": {
|
63
|
+
"defaultValue": null,
|
64
|
+
"description": "",
|
65
|
+
"name": "className",
|
66
|
+
"parent": {
|
67
|
+
"fileName": "link-box/src/LinkBoxRaised.tsx",
|
68
|
+
"name": "LinkBoxRaisedProps"
|
69
|
+
},
|
70
|
+
"declarations": [
|
71
|
+
{
|
72
|
+
"fileName": "link-box/src/LinkBoxRaised.tsx",
|
73
|
+
"name": "LinkBoxRaisedProps"
|
74
|
+
}
|
75
|
+
],
|
76
|
+
"required": false,
|
77
|
+
"type": {
|
78
|
+
"name": "string"
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
55
82
|
}
|
56
83
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@spark-ui/link-box",
|
3
|
-
"version": "0.
|
3
|
+
"version": "1.0.0",
|
4
4
|
"description": "Semantic component used to wrap elements (cards, blog posts, articles, etc.) in a link.",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -45,5 +45,5 @@
|
|
45
45
|
},
|
46
46
|
"homepage": "https://sparkui.vercel.app",
|
47
47
|
"license": "MIT",
|
48
|
-
"gitHead": "
|
48
|
+
"gitHead": "219a782e459843bdfa7900f70d1987c2df819ee0"
|
49
49
|
}
|
package/dist/LinkOverlay.d.ts
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
import { ComponentPropsWithoutRef } from 'react';
|
2
|
-
export interface LinkOverlayProps extends ComponentPropsWithoutRef<'a'> {
|
3
|
-
asChild?: boolean;
|
4
|
-
}
|
5
|
-
export declare const LinkOverlay: import("react").ForwardRefExoticComponent<LinkOverlayProps & import("react").RefAttributes<HTMLAnchorElement>>;
|