@versini/ui-spinner 5.0.4 → 5.1.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/dist/index.d.ts CHANGED
@@ -1,26 +1,26 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare const SPINNER_CLASSNAME = "av-spinner";
4
-
5
- type SpinnerProps = {
6
- /**
7
- * The class name to apply to the spinner.
8
- */
9
- className?: string;
10
- /**
11
- * The mode of spinner to render. This will change the color of the spinner.
12
- */
13
- mode?: "dark" | "light" | "system" | "alt-system";
14
- /**
15
- * A ref to the spinner element.
16
- */
17
- spinnerRef?: React.RefObject<HTMLDivElement>;
18
- /**
19
- * The type of spinner to render. This will change the layout of the spinner.
20
- */
21
- type?: "circle" | "dots";
22
- };
23
-
24
- declare const Spinner: ({ spinnerRef, mode, type, className, }: SpinnerProps) => react_jsx_runtime.JSX.Element;
25
-
26
- export { SPINNER_CLASSNAME, Spinner };
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare const Spinner: ({ spinnerRef, mode, type, className, }: SpinnerProps) => JSX.Element;
4
+
5
+ export declare const SPINNER_CLASSNAME = "av-spinner";
6
+
7
+ declare type SpinnerProps = {
8
+ /**
9
+ * The class name to apply to the spinner.
10
+ */
11
+ className?: string;
12
+ /**
13
+ * The mode of spinner to render. This will change the color of the spinner.
14
+ */
15
+ mode?: "dark" | "light" | "system" | "alt-system";
16
+ /**
17
+ * A ref to the spinner element.
18
+ */
19
+ spinnerRef?: React.RefObject<HTMLDivElement>;
20
+ /**
21
+ * The type of spinner to render. This will change the layout of the spinner.
22
+ */
23
+ type?: "circle" | "dots";
24
+ };
25
+
26
+ export { }
package/dist/index.js CHANGED
@@ -1,18 +1,85 @@
1
- import { SPINNER_CLASSNAME as o, Spinner as I } from "./components/Spinner/Spinner.js";
2
1
  /*!
3
- @versini/ui-spinner v5.0.4
2
+ @versini/ui-spinner v5.1.1
4
3
  © 2025 gizmette.com
5
4
  */
6
5
  try {
7
- window.__VERSINI_UI_SPINNER__ || (window.__VERSINI_UI_SPINNER__ = {
8
- version: "5.0.4",
9
- buildTime: "10/24/2025 07:48 PM EDT",
10
- homepage: "https://github.com/aversini/ui-components",
11
- license: "MIT"
12
- });
13
- } catch {
6
+ if (!window.__VERSINI_UI_SPINNER__) {
7
+ window.__VERSINI_UI_SPINNER__ = {
8
+ version: "5.1.1",
9
+ buildTime: "11/16/2025 05:50 PM EST",
10
+ homepage: "https://github.com/aversini/ui-components",
11
+ license: "MIT",
12
+ };
13
+ }
14
+ } catch (error) {
15
+ // nothing to declare officer
14
16
  }
15
- export {
16
- o as SPINNER_CLASSNAME,
17
- I as Spinner
17
+
18
+ import { jsx, jsxs } from "react/jsx-runtime";
19
+ import clsx from "clsx";
20
+
21
+ ;// CONCATENATED MODULE: ./src/common/constants.ts
22
+ const SPINNER_CLASSNAME = "av-spinner";
23
+
24
+ ;// CONCATENATED MODULE: external "react/jsx-runtime"
25
+
26
+ ;// CONCATENATED MODULE: external "clsx"
27
+
28
+ ;// CONCATENATED MODULE: ./src/components/Spinner/Spinner.tsx
29
+
30
+
31
+
32
+ const Spinner = ({ spinnerRef, mode = "system", type = "circle", className })=>{
33
+ const spinnerClassName = type === "circle" ? clsx(SPINNER_CLASSNAME, "h-8 w-8", "align-[-0.125em]", "border-4", "inline-block animate-spin rounded-full border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]", {
34
+ "text-copy-dark": mode === "dark",
35
+ "text-copy-accent": mode === "light",
36
+ "text-copy-dark dark:text-copy-accent": mode === "system",
37
+ "text-copy-accent dark:text-copy-dark": mode === "alt-system"
38
+ }, className) : clsx(SPINNER_CLASSNAME, className);
39
+ const dotClassName = clsx("av-spinner__dot", {
40
+ "fill-copy-dark": mode === "dark",
41
+ "fill-copy-accent": mode === "light",
42
+ "fill-copy-dark dark:fill-copy-accent": mode === "system",
43
+ "fill-copy-accent dark:fill-copy-dark": mode === "alt-system"
44
+ });
45
+ return /*#__PURE__*/ jsxs("div", {
46
+ ref: spinnerRef,
47
+ className: spinnerClassName,
48
+ role: "status",
49
+ children: [
50
+ type === "dots" && /*#__PURE__*/ jsxs("svg", {
51
+ className: "h-8 w-8",
52
+ children: [
53
+ /*#__PURE__*/ jsx("circle", {
54
+ className: dotClassName,
55
+ cx: "6",
56
+ cy: "50%",
57
+ r: "3"
58
+ }),
59
+ /*#__PURE__*/ jsx("circle", {
60
+ className: dotClassName,
61
+ cx: "50%",
62
+ cy: "50%",
63
+ r: "3"
64
+ }),
65
+ /*#__PURE__*/ jsx("circle", {
66
+ className: dotClassName,
67
+ cx: "80%",
68
+ cy: "50%",
69
+ r: "3"
70
+ })
71
+ ]
72
+ }),
73
+ /*#__PURE__*/ jsx("span", {
74
+ className: "sr-only",
75
+ children: "Loading..."
76
+ })
77
+ ]
78
+ });
18
79
  };
80
+
81
+ ;// CONCATENATED MODULE: ./src/components/index.ts
82
+
83
+
84
+
85
+ export { SPINNER_CLASSNAME, Spinner };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-spinner",
3
- "version": "5.0.4",
3
+ "version": "5.1.1",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -20,13 +20,13 @@
20
20
  ],
21
21
  "scripts": {
22
22
  "build:check": "tsc",
23
- "build:js": "vite build",
24
- "build:types": "tsup",
25
- "build": "npm-run-all --serial clean build:check build:js build:types",
23
+ "build:js": "rslib build",
24
+ "build:types": "echo 'Types now built with rslib'",
25
+ "build": "npm-run-all --serial clean build:check build:js",
26
26
  "clean": "rimraf dist tmp",
27
- "dev:js": "vite build --watch --mode development",
28
- "dev:types": "tsup --watch src",
29
- "dev": "npm-run-all clean --parallel dev:js dev:types",
27
+ "dev:js": "rslib build --watch",
28
+ "dev:types": "echo 'Types now watched with rslib'",
29
+ "dev": "rslib build --watch",
30
30
  "lint": "biome lint src",
31
31
  "lint:fix": "biome check src --write --no-errors-on-unmatched",
32
32
  "prettier": "biome check --write --no-errors-on-unmatched",
@@ -41,10 +41,10 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@tailwindcss/typography": "0.5.19",
44
- "tailwindcss": "4.1.16"
44
+ "tailwindcss": "4.1.17"
45
45
  },
46
46
  "sideEffects": [
47
47
  "**/*.css"
48
48
  ],
49
- "gitHead": "26763e1e738bcdcb0806c39612161666e4bc4459"
49
+ "gitHead": "1d0bedfa3a84ea7f2f41d347a59de518f92e4cea"
50
50
  }
@@ -1,40 +0,0 @@
1
- import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import e from "clsx";
3
- const n = "av-spinner", y = ({
4
- spinnerRef: i,
5
- mode: c = "system",
6
- type: s = "circle",
7
- className: t
8
- }) => {
9
- const o = s === "circle" ? e(
10
- n,
11
- "h-8 w-8",
12
- "align-[-0.125em]",
13
- "border-4",
14
- "inline-block animate-spin rounded-full border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]",
15
- {
16
- "text-copy-dark": c === "dark",
17
- "text-copy-accent": c === "light",
18
- "text-copy-dark dark:text-copy-accent": c === "system",
19
- "text-copy-accent dark:text-copy-dark": c === "alt-system"
20
- },
21
- t
22
- ) : e(n, t), a = e("av-spinner__dot", {
23
- "fill-copy-dark": c === "dark",
24
- "fill-copy-accent": c === "light",
25
- "fill-copy-dark dark:fill-copy-accent": c === "system",
26
- "fill-copy-accent dark:fill-copy-dark": c === "alt-system"
27
- });
28
- return /* @__PURE__ */ l("div", { ref: i, className: o, role: "status", children: [
29
- s === "dots" && /* @__PURE__ */ l("svg", { className: "h-8 w-8", children: [
30
- /* @__PURE__ */ r("circle", { className: a, cx: "6", cy: "50%", r: "3" }),
31
- /* @__PURE__ */ r("circle", { className: a, cx: "50%", cy: "50%", r: "3" }),
32
- /* @__PURE__ */ r("circle", { className: a, cx: "80%", cy: "50%", r: "3" })
33
- ] }),
34
- /* @__PURE__ */ r("span", { className: "sr-only", children: "Loading..." })
35
- ] });
36
- };
37
- export {
38
- n as SPINNER_CLASSNAME,
39
- y as Spinner
40
- };