@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 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 { LinkOverlay } from './LinkOverlay';
3
+ import { LinkBoxLink } from './LinkBoxLink';
4
+ import { LinkBoxRaised } from './LinkBoxRaised';
4
5
  export declare const LinkBox: FC<LinkBoxProps> & {
5
- Overlay: typeof LinkOverlay;
6
+ Link: typeof LinkBoxLink;
7
+ Raised: typeof LinkBoxRaised;
6
8
  };
7
9
  export { type LinkBoxProps } from './LinkBox';
8
- export { type LinkOverlayProps } from './LinkOverlay';
10
+ export { type LinkBoxLinkProps } from './LinkBoxLink';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),s=require("@spark-ui/slot"),i=require("class-variance-authority"),c=e.forwardRef(({className:a,asChild:o,...r},t)=>{const n=o?s.Slot:"div";return e.createElement(n,{ref:t,"data-spark-component":"link-box",className:i.cx('relative [&_a[href]:not([data-spark-component="link-overlay"])]:relative [&_a[href]:not([data-spark-component="link-overlay"])]:z-raised [&_button]:relative [&_button]:z-raised',a),...r})});c.displayName="LinkBox";const f=e.forwardRef(({className:a,asChild:o,...r},t)=>{const n=o?s.Slot:"a";return e.createElement(n,{ref:t,"data-spark-component":"link-overlay",className:i.cx("static before:absolute before:left-none before:top-none before:z-base before:block before:size-full before:content-['']",a),...r})});f.displayName="LinkBox.Overlay";const l=Object.assign(c,{Overlay:f});l.displayName="LinkBox",l.Overlay.displayName="LinkBox.Overlay",exports.LinkBox=l;
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 s, { forwardRef as l } from "react";
2
- import { Slot as i } from "@spark-ui/slot";
3
- import { cx as c } from "class-variance-authority";
4
- const m = l(({ className: e, asChild: a, ...o }, r) => {
5
- const t = a ? i : "div";
6
- return s.createElement(t, { ref: r, "data-spark-component": "link-box", className: c('relative [&_a[href]:not([data-spark-component="link-overlay"])]:relative [&_a[href]:not([data-spark-component="link-overlay"])]:z-raised [&_button]:relative [&_button]:z-raised', e), ...o });
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
- m.displayName = "LinkBox";
9
- const f = l(({ className: e, asChild: a, ...o }, r) => {
10
- const t = a ? i : "a";
11
- return s.createElement(t, { ref: r, "data-spark-component": "link-overlay", className: c("static before:absolute before:left-none before:top-none before:z-base before:block before:size-full before:content-['']", e), ...o });
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
- f.displayName = "LinkBox.Overlay";
14
- const n = Object.assign(m, { Overlay: f });
15
- n.displayName = "LinkBox", n.Overlay.displayName = "LinkBox.Overlay";
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
  };
@@ -26,10 +26,10 @@
26
26
  }
27
27
  }
28
28
  },
29
- "LinkBox.Overlay": {
29
+ "LinkBox.Link": {
30
30
  "tags": {},
31
31
  "description": "",
32
- "displayName": "LinkBox.Overlay",
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/LinkOverlay.tsx",
41
- "name": "LinkOverlayProps"
40
+ "fileName": "link-box/src/LinkBoxLink.tsx",
41
+ "name": "LinkBoxLinkProps"
42
42
  },
43
43
  "declarations": [
44
44
  {
45
- "fileName": "link-box/src/LinkOverlay.tsx",
46
- "name": "LinkOverlayProps"
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.1.1",
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": "e2262cc062d779c7bafac1d01fe453477f0fdc16"
48
+ "gitHead": "219a782e459843bdfa7900f70d1987c2df819ee0"
49
49
  }
@@ -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>>;