@spark-ui/spinner 7.3.7 → 8.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,14 @@
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
+ ## [8.0.1](https://github.com/adevinta/spark/compare/v8.0.0...v8.0.1) (2025-01-13)
7
+
8
+ **Note:** Version bump only for package @spark-ui/spinner
9
+
10
+ # [8.0.0](https://github.com/adevinta/spark/compare/v7.3.7...v8.0.0) (2025-01-13)
11
+
12
+ **Note:** Version bump only for package @spark-ui/spinner
13
+
6
14
  ## [7.3.7](https://github.com/adevinta/spark/compare/v7.3.6...v7.3.7) (2025-01-08)
7
15
 
8
16
  **Note:** Version bump only for package @spark-ui/spinner
package/dist/Spinner.d.ts CHANGED
@@ -1,11 +1,9 @@
1
- import { ComponentPropsWithoutRef } from 'react';
1
+ import { ComponentPropsWithRef, PropsWithChildren } from 'react';
2
2
  import { SpinnerStylesProps } from './Spinner.styles';
3
- export interface SpinnerProps extends ComponentPropsWithoutRef<'div'>, SpinnerStylesProps {
3
+ export interface SpinnerProps extends ComponentPropsWithRef<'div'>, SpinnerStylesProps {
4
4
  /**
5
5
  * Use `label` prop for accessibility, it is important to add a fallback loading text. This text will be visible to screen readers.
6
6
  */
7
7
  label?: string;
8
8
  }
9
- export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & {
10
- children?: import("react").ReactNode;
11
- } & import("react").RefAttributes<HTMLDivElement>>;
9
+ export declare const Spinner: ({ className, size, intent, label, isBackgroundVisible, ref, ...others }: PropsWithChildren<SpinnerProps>) => import("react").JSX.Element;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),l=require("@spark-ui/visually-hidden"),u=require("@spark-ui/internal-utils"),c=require("class-variance-authority").cva(["inline-block","border-solid","rounded-full","border-md","animate-spin"],{variants:{size:{current:["u-current-font-size"],sm:["w-sz-20","h-sz-20"],md:["w-sz-28","h-sz-28"],full:["w-full","h-full"]},intent:u.makeVariants({current:["border-current"],main:["border-main"],support:["border-support"],accent:["border-accent"],basic:["border-basic"],success:["border-success"],alert:["border-alert"],error:["border-error"],info:["border-info"],neutral:["border-neutral"]}),isBackgroundVisible:{true:["border-b-neutral-container","border-l-neutral-container"],false:["border-b-transparent","border-l-transparent"]}},defaultVariants:{intent:"current",size:"current",isBackgroundVisible:!1}}),d=r.forwardRef(({className:n,size:t="current",intent:a="current",label:e,isBackgroundVisible:s,...i},o)=>r.createElement("div",{role:"status","data-spark-component":"spinner",ref:o,className:c({className:n,size:t,intent:a,isBackgroundVisible:s}),...i},e&&r.createElement(l.VisuallyHidden,null,e)));exports.Spinner=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),o=require("@spark-ui/visually-hidden"),u=require("@spark-ui/internal-utils"),c=require("class-variance-authority").cva(["inline-block","border-solid","rounded-full","border-md","animate-spin"],{variants:{size:{current:["u-current-font-size"],sm:["w-sz-20","h-sz-20"],md:["w-sz-28","h-sz-28"],full:["w-full","h-full"]},intent:u.makeVariants({current:["border-current"],main:["border-main"],support:["border-support"],accent:["border-accent"],basic:["border-basic"],success:["border-success"],alert:["border-alert"],error:["border-error"],info:["border-info"],neutral:["border-neutral"]}),isBackgroundVisible:{true:["border-b-neutral-container","border-l-neutral-container"],false:["border-b-transparent","border-l-transparent"]}},defaultVariants:{intent:"current",size:"current",isBackgroundVisible:!1}});exports.Spinner=({className:n,size:t="current",intent:a="current",label:r,isBackgroundVisible:s,ref:i,...l})=>e.createElement("div",{role:"status","data-spark-component":"spinner",ref:i,className:c({className:n,size:t,intent:a,isBackgroundVisible:s}),...l},r&&e.createElement(o.VisuallyHidden,null,r));
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import e, { forwardRef as l } from "react";
2
- import { VisuallyHidden as c } from "@spark-ui/visually-hidden";
3
- import { makeVariants as d } from "@spark-ui/internal-utils";
1
+ import e from "react";
2
+ import { VisuallyHidden as l } from "@spark-ui/visually-hidden";
3
+ import { makeVariants as c } from "@spark-ui/internal-utils";
4
4
  import { cva as u } from "class-variance-authority";
5
- const b = u(["inline-block", "border-solid", "rounded-full", "border-md", "animate-spin"], { variants: { size: { current: ["u-current-font-size"], sm: ["w-sz-20", "h-sz-20"], md: ["w-sz-28", "h-sz-28"], full: ["w-full", "h-full"] }, intent: d({ current: ["border-current"], main: ["border-main"], support: ["border-support"], accent: ["border-accent"], basic: ["border-basic"], success: ["border-success"], alert: ["border-alert"], error: ["border-error"], info: ["border-info"], neutral: ["border-neutral"] }), isBackgroundVisible: { true: ["border-b-neutral-container", "border-l-neutral-container"], false: ["border-b-transparent", "border-l-transparent"] } }, defaultVariants: { intent: "current", size: "current", isBackgroundVisible: !1 } }), k = l(({ className: n, size: a = "current", intent: s = "current", label: r, isBackgroundVisible: t, ...i }, o) => e.createElement("div", { role: "status", "data-spark-component": "spinner", ref: o, className: b({ className: n, size: a, intent: s, isBackgroundVisible: t }), ...i }, r && e.createElement(c, null, r)));
5
+ const d = u(["inline-block", "border-solid", "rounded-full", "border-md", "animate-spin"], { variants: { size: { current: ["u-current-font-size"], sm: ["w-sz-20", "h-sz-20"], md: ["w-sz-28", "h-sz-28"], full: ["w-full", "h-full"] }, intent: c({ current: ["border-current"], main: ["border-main"], support: ["border-support"], accent: ["border-accent"], basic: ["border-basic"], success: ["border-success"], alert: ["border-alert"], error: ["border-error"], info: ["border-info"], neutral: ["border-neutral"] }), isBackgroundVisible: { true: ["border-b-neutral-container", "border-l-neutral-container"], false: ["border-b-transparent", "border-l-transparent"] } }, defaultVariants: { intent: "current", size: "current", isBackgroundVisible: !1 } }), z = ({ className: n, size: t = "current", intent: a = "current", label: r, isBackgroundVisible: s, ref: i, ...o }) => e.createElement("div", { role: "status", "data-spark-component": "spinner", ref: i, className: d({ className: n, size: t, intent: a, isBackgroundVisible: s }), ...o }, r && e.createElement(l, null, r));
6
6
  export {
7
- k as Spinner
7
+ z as Spinner
8
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-ui/spinner",
3
- "version": "7.3.7",
3
+ "version": "8.0.1",
4
4
  "description": "Spinners provide a visual cue that an action is processing awaiting a course of change or a result.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,8 +23,8 @@
23
23
  "build": "vite build"
24
24
  },
25
25
  "dependencies": {
26
- "@spark-ui/internal-utils": "^7.3.7",
27
- "@spark-ui/visually-hidden": "^7.3.7",
26
+ "@spark-ui/internal-utils": "^8.0.1",
27
+ "@spark-ui/visually-hidden": "^8.0.1",
28
28
  "class-variance-authority": "0.7.0"
29
29
  },
30
30
  "peerDependencies": {
@@ -48,5 +48,5 @@
48
48
  },
49
49
  "homepage": "https://sparkui.vercel.app",
50
50
  "license": "MIT",
51
- "gitHead": "ca2b7a1f2a4a921fd4c6ad8521c2dfd90471f7d6"
51
+ "gitHead": "e95952850b8ff436e3b05a600fdd39820b9a5386"
52
52
  }