@spark-ui/divider 8.1.8 → 9.0.1

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,22 @@
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.1](https://github.com/adevinta/spark/compare/v9.0.0...v9.0.1) (2025-02-06)
7
+
8
+ ### Bug Fixes
9
+
10
+ - adjust peer deps following tailwind v4 update ([45d356f](https://github.com/adevinta/spark/commit/45d356f0fe55e0bd44a59b262ab1c6293d0aa8a8))
11
+
12
+ # [9.0.0](https://github.com/adevinta/spark/compare/v8.1.8...v9.0.0) (2025-02-06)
13
+
14
+ ### Features
15
+
16
+ - upgrade Tailwind to v4 ([92758fe](https://github.com/adevinta/spark/commit/92758feaab4b69f1c4d7d3394e1421ec36592511))
17
+
18
+ ### BREAKING CHANGES
19
+
20
+ - upgrade tailwind to v4
21
+
6
22
  ## [8.1.8](https://github.com/adevinta/spark/compare/v8.1.7...v8.1.8) (2025-01-28)
7
23
 
8
24
  **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
  };
@@ -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;
@@ -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 s=require("react"),p=require("@radix-ui/react-separator"),l=require("class-variance-authority"),e=require("@spark-ui/internal-utils"),u=[{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"])}],y=l.cva(["overflow-hidden"],{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"]},alignment:{start:[],end:[],center:[]},intent:{current:[],outline:[]}},defaultVariants:{orientation:"horizontal",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",class:e.tw(["flex-row my-sm grow-0","before:border-t-sm","after:border-t-sm","[&>*]:px-lg"])},{isEmpty:!1,orientation:"vertical",class:e.tw(["flex-col mx-sm","before:border-l-sm","after:border-l-sm","[&>*]:py-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"])},...u]}),c=({asChild:t,className:r,isDecorative:n=!1,children:i,orientation:a="horizontal",alignment:f="center",intent:d="outline",ref:b,...w})=>{const g=t?!i?.props?.children:!i;return s.createElement(p.Root,{"data-spark-component":"divider",asChild:t,className:l.cx(y({isEmpty:g,orientation:a,alignment:f,intent:d}),r),orientation:a,ref:b,decorative:n,...w},i)};c.displayName="Divider";const m=({children:t,ref:r,...n})=>t?s.createElement("span",{ref:r,...n},t):null;m.displayName="Divider.Content";const o=Object.assign(c,{Content:m});o.displayName="Divider",o.Content.displayName="Divider.Content",exports.Divider=o;
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 s from "react";
2
- import { Root as g } from "@radix-ui/react-separator";
3
- import { cva as y, cx as u } from "class-variance-authority";
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 h = [{ 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"]) }], w = y(["overflow-hidden"], { 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"] }, alignment: { start: [], end: [], center: [] }, intent: { current: [], outline: [] } }, defaultVariants: { orientation: "horizontal", 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", class: e(["flex-row my-sm grow-0", "before:border-t-sm", "after:border-t-sm", "[&>*]:px-lg"]) }, { isEmpty: !1, orientation: "vertical", class: e(["flex-col mx-sm", "before:border-l-sm", "after:border-l-sm", "[&>*]:py-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"]) }, ...h] }), l = ({ asChild: t, className: r, isDecorative: n = !1, children: i, orientation: o = "horizontal", alignment: c = "center", intent: f = "outline", ref: d, ...p }) => {
6
- const b = t ? !i?.props?.children : !i;
7
- return s.createElement(g, { "data-spark-component": "divider", asChild: t, className: u(w({ isEmpty: b, orientation: o, alignment: c, intent: f }), r), orientation: o, ref: d, decorative: n, ...p }, i);
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
- l.displayName = "Divider";
10
- const m = ({ children: t, ref: r, ...n }) => t ? s.createElement("span", { ref: r, ...n }, t) : null;
11
- m.displayName = "Divider.Content";
12
- const a = Object.assign(l, { Content: m });
13
- a.displayName = "Divider", a.Content.displayName = "Divider.Content";
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
- a as Divider
15
+ s as Divider
16
16
  };
@@ -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": "8.1.8",
3
+ "version": "9.0.1",
4
4
  "description": "A separator between two elements, usually consisting of a horizontal line.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -24,12 +24,12 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@radix-ui/react-separator": "1.1.1",
27
- "@spark-ui/internal-utils": "^8.1.8"
27
+ "@spark-ui/internal-utils": "^9.0.1"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": "^19.0",
31
31
  "react-dom": "^19.0",
32
- "tailwindcss": "^3.0.0"
32
+ "tailwindcss": "^4.0.0"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",
@@ -45,5 +45,5 @@
45
45
  },
46
46
  "homepage": "https://sparkui.vercel.app",
47
47
  "license": "MIT",
48
- "gitHead": "e29d6cfd8145f8ce93cc94062c33ce62a07476e0"
48
+ "gitHead": "6ae906557586fed35fe306d68806f65eef6c43fa"
49
49
  }