@spark-ui/divider 8.1.8 → 9.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 +10 -0
- package/dist/Divider.d.ts +1 -1
- package/dist/Divider.styles.d.ts +1 -0
- package/dist/DividerContent.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +12 -12
- package/dist/public/docgen.json +19 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,16 @@
|
|
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
|
+
# [9.0.0](https://github.com/adevinta/spark/compare/v8.1.8...v9.0.0) (2025-02-06)
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
- upgrade Tailwind to v4 ([92758fe](https://github.com/adevinta/spark/commit/92758feaab4b69f1c4d7d3394e1421ec36592511))
|
11
|
+
|
12
|
+
### BREAKING CHANGES
|
13
|
+
|
14
|
+
- upgrade tailwind to v4
|
15
|
+
|
6
16
|
## [8.1.8](https://github.com/adevinta/spark/compare/v8.1.7...v8.1.8) (2025-01-28)
|
7
17
|
|
8
18
|
**Note:** Version bump only for package @spark-ui/divider
|
package/dist/Divider.d.ts
CHANGED
@@ -25,6 +25,6 @@ export interface DividerProps extends HTMLAttributes<HTMLDivElement>, Omit<Divid
|
|
25
25
|
ref?: Ref<HTMLDivElement>;
|
26
26
|
}
|
27
27
|
export declare const Divider: {
|
28
|
-
({ asChild, className, isDecorative, children, orientation, alignment, intent, ref, ...props }: DividerProps): import("react").JSX.Element;
|
28
|
+
({ asChild, className, isDecorative, children, orientation, writingMode, alignment, intent, ref, ...props }: DividerProps): import("react").JSX.Element;
|
29
29
|
displayName: string;
|
30
30
|
};
|
package/dist/Divider.styles.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const dividerStyles: (props?: ({
|
3
3
|
isEmpty?: boolean | null | undefined;
|
4
4
|
orientation?: "vertical" | "horizontal" | null | undefined;
|
5
|
+
writingMode?: "horizontal-tb" | "vertical-lr" | null | undefined;
|
5
6
|
alignment?: "start" | "end" | "center" | null | undefined;
|
6
7
|
intent?: "current" | "outline" | null | undefined;
|
7
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
package/dist/DividerContent.d.ts
CHANGED
@@ -8,6 +8,6 @@ export interface DividerContentProps extends HTMLAttributes<HTMLSpanElement> {
|
|
8
8
|
ref?: Ref<HTMLSpanElement>;
|
9
9
|
}
|
10
10
|
export declare const DividerContent: {
|
11
|
-
({ children, ref, ...props }: DividerContentProps): import("react").JSX.Element | null;
|
11
|
+
({ children, ref, className, ...props }: DividerContentProps): import("react").JSX.Element | null;
|
12
12
|
displayName: string;
|
13
13
|
};
|
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 m=require("react"),u=require("@radix-ui/react-separator"),a=require("class-variance-authority"),e=require("@spark-ui/internal-utils"),y=[{intent:"current",isEmpty:!0,class:e.tw(["border-current"])},{intent:"current",isEmpty:!1,class:e.tw(["before:border-current after:border-current"])},{intent:"outline",isEmpty:!0,class:e.tw(["border-outline"])},{intent:"outline",isEmpty:!1,class:e.tw(["before:border-outline after:border-outline"])}],h=a.cva(["overflow-hidden group"],{variants:{isEmpty:{true:["border-solid"],false:["inline-flex items-center","after:border-solid before:border-solid"]},orientation:{vertical:["w-fit inline-flex"],horizontal:["w-full"]},writingMode:{"horizontal-tb":[],"vertical-lr":[]},alignment:{start:[],end:[],center:[]},intent:{current:[],outline:[]}},defaultVariants:{orientation:"horizontal",writingMode:"horizontal-tb",alignment:"center",intent:"outline"},compoundVariants:[{isEmpty:!0,orientation:"horizontal",class:e.tw(["my-lg border-t-sm"])},{isEmpty:!0,orientation:"vertical",class:e.tw(["mx-lg min-h-sz-24 border-l-sm"])},{isEmpty:!1,orientation:"horizontal",writingMode:"horizontal-tb",class:e.tw(["flex-row my-sm grow-0","before:border-t-sm","after:border-t-sm","*:px-lg"])},{isEmpty:!1,orientation:"vertical",writingMode:"horizontal-tb",class:e.tw(["flex-col mx-sm","before:border-l-sm","after:border-l-sm","*:py-lg"])},{isEmpty:!1,orientation:"vertical",writingMode:"vertical-lr",class:e.tw(["flex-col mx-sm","before:border-l-sm","after:border-l-sm","*:px-lg"])},{isEmpty:!1,orientation:"horizontal",alignment:"end",class:e.tw(["after:w-sz-40 before:grow after:grow-0"])},{isEmpty:!1,orientation:"horizontal",alignment:"start",class:e.tw(["before:w-sz-40 before:grow-0 after:grow"])},{isEmpty:!1,orientation:"horizontal",alignment:"center",class:e.tw(["justify-center before:grow after:grow"])},{isEmpty:!1,orientation:"vertical",alignment:"end",class:e.tw(["after:h-sz-40 before:grow after:grow-0 before:min-h-sz-40"])},{isEmpty:!1,orientation:"vertical",alignment:"start",class:e.tw(["before:h-sz-40 before:grow-0 after:grow after:min-h-sz-40"])},{isEmpty:!1,orientation:"vertical",alignment:"center",class:e.tw(["justify-center before:grow after:grow before:min-h-sz-40 after:min-h-sz-40"])},...y]}),c=({asChild:t,className:i,isDecorative:n=!1,children:r,orientation:l="horizontal",writingMode:s="horizontal-tb",alignment:f="center",intent:g="outline",ref:w,...b})=>{const p=t?!r?.props?.children:!r;return m.createElement(u.Root,{"data-spark-component":"divider",asChild:t,className:a.cx(h({isEmpty:p,orientation:l,alignment:f,intent:g,writingMode:s}),i),orientation:l,ref:w,decorative:n,...b,"data-writing-mode":s},r)};c.displayName="Divider";const d=({children:t,ref:i,className:n,...r})=>t?m.createElement("span",{ref:i,...r,className:a.cx("group-data-[writing-mode=vertical-lr]:[writing-mode:vertical-lr]",n)},t):null;d.displayName="Divider.Content";const o=Object.assign(c,{Content:d});o.displayName="Divider",o.Content.displayName="Divider.Content",exports.Divider=o;
|
package/dist/index.mjs
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
import
|
2
|
-
import { Root as
|
3
|
-
import { cva as y, cx as
|
1
|
+
import l from "react";
|
2
|
+
import { Root as h } from "@radix-ui/react-separator";
|
3
|
+
import { cva as y, cx as m } from "class-variance-authority";
|
4
4
|
import { tw as e } from "@spark-ui/internal-utils";
|
5
|
-
const
|
6
|
-
const
|
7
|
-
return
|
5
|
+
const u = [{ intent: "current", isEmpty: !0, class: e(["border-current"]) }, { intent: "current", isEmpty: !1, class: e(["before:border-current after:border-current"]) }, { intent: "outline", isEmpty: !0, class: e(["border-outline"]) }, { intent: "outline", isEmpty: !1, class: e(["before:border-outline after:border-outline"]) }], v = y(["overflow-hidden group"], { variants: { isEmpty: { true: ["border-solid"], false: ["inline-flex items-center", "after:border-solid before:border-solid"] }, orientation: { vertical: ["w-fit inline-flex"], horizontal: ["w-full"] }, writingMode: { "horizontal-tb": [], "vertical-lr": [] }, alignment: { start: [], end: [], center: [] }, intent: { current: [], outline: [] } }, defaultVariants: { orientation: "horizontal", writingMode: "horizontal-tb", alignment: "center", intent: "outline" }, compoundVariants: [{ isEmpty: !0, orientation: "horizontal", class: e(["my-lg border-t-sm"]) }, { isEmpty: !0, orientation: "vertical", class: e(["mx-lg min-h-sz-24 border-l-sm"]) }, { isEmpty: !1, orientation: "horizontal", writingMode: "horizontal-tb", class: e(["flex-row my-sm grow-0", "before:border-t-sm", "after:border-t-sm", "*:px-lg"]) }, { isEmpty: !1, orientation: "vertical", writingMode: "horizontal-tb", class: e(["flex-col mx-sm", "before:border-l-sm", "after:border-l-sm", "*:py-lg"]) }, { isEmpty: !1, orientation: "vertical", writingMode: "vertical-lr", class: e(["flex-col mx-sm", "before:border-l-sm", "after:border-l-sm", "*:px-lg"]) }, { isEmpty: !1, orientation: "horizontal", alignment: "end", class: e(["after:w-sz-40 before:grow after:grow-0"]) }, { isEmpty: !1, orientation: "horizontal", alignment: "start", class: e(["before:w-sz-40 before:grow-0 after:grow"]) }, { isEmpty: !1, orientation: "horizontal", alignment: "center", class: e(["justify-center before:grow after:grow"]) }, { isEmpty: !1, orientation: "vertical", alignment: "end", class: e(["after:h-sz-40 before:grow after:grow-0 before:min-h-sz-40"]) }, { isEmpty: !1, orientation: "vertical", alignment: "start", class: e(["before:h-sz-40 before:grow-0 after:grow after:min-h-sz-40"]) }, { isEmpty: !1, orientation: "vertical", alignment: "center", class: e(["justify-center before:grow after:grow before:min-h-sz-40 after:min-h-sz-40"]) }, ...u] }), c = ({ asChild: t, className: i, isDecorative: o = !1, children: r, orientation: n = "horizontal", writingMode: a = "horizontal-tb", alignment: f = "center", intent: g = "outline", ref: b, ...p }) => {
|
6
|
+
const w = t ? !r?.props?.children : !r;
|
7
|
+
return l.createElement(h, { "data-spark-component": "divider", asChild: t, className: m(v({ isEmpty: w, orientation: n, alignment: f, intent: g, writingMode: a }), i), orientation: n, ref: b, decorative: o, ...p, "data-writing-mode": a }, r);
|
8
8
|
};
|
9
|
-
|
10
|
-
const
|
11
|
-
|
12
|
-
const
|
13
|
-
|
9
|
+
c.displayName = "Divider";
|
10
|
+
const d = ({ children: t, ref: i, className: o, ...r }) => t ? l.createElement("span", { ref: i, ...r, className: m("group-data-[writing-mode=vertical-lr]:[writing-mode:vertical-lr]", o) }, t) : null;
|
11
|
+
d.displayName = "Divider.Content";
|
12
|
+
const s = Object.assign(c, { Content: d });
|
13
|
+
s.displayName = "Divider", s.Content.displayName = "Divider.Content";
|
14
14
|
export {
|
15
|
-
|
15
|
+
s as Divider
|
16
16
|
};
|
package/dist/public/docgen.json
CHANGED
@@ -148,6 +148,25 @@
|
|
148
148
|
"type": {
|
149
149
|
"name": "Ref<HTMLDivElement>"
|
150
150
|
}
|
151
|
+
},
|
152
|
+
"writingMode": {
|
153
|
+
"defaultValue": null,
|
154
|
+
"description": "",
|
155
|
+
"name": "writingMode",
|
156
|
+
"declarations": [],
|
157
|
+
"required": false,
|
158
|
+
"type": {
|
159
|
+
"name": "enum",
|
160
|
+
"raw": "\"horizontal-tb\" | \"vertical-lr\"",
|
161
|
+
"value": [
|
162
|
+
{
|
163
|
+
"value": "\"horizontal-tb\""
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"value": "\"vertical-lr\""
|
167
|
+
}
|
168
|
+
]
|
169
|
+
}
|
151
170
|
}
|
152
171
|
}
|
153
172
|
},
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@spark-ui/divider",
|
3
|
-
"version": "
|
3
|
+
"version": "9.0.0",
|
4
4
|
"description": "A separator between two elements, usually consisting of a horizontal line.",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -24,7 +24,7 @@
|
|
24
24
|
},
|
25
25
|
"dependencies": {
|
26
26
|
"@radix-ui/react-separator": "1.1.1",
|
27
|
-
"@spark-ui/internal-utils": "^
|
27
|
+
"@spark-ui/internal-utils": "^9.0.0"
|
28
28
|
},
|
29
29
|
"peerDependencies": {
|
30
30
|
"react": "^19.0",
|
@@ -45,5 +45,5 @@
|
|
45
45
|
},
|
46
46
|
"homepage": "https://sparkui.vercel.app",
|
47
47
|
"license": "MIT",
|
48
|
-
"gitHead": "
|
48
|
+
"gitHead": "8fe6ef5b52e2440947f6278e00d00c89410a9ca8"
|
49
49
|
}
|