@versini/ui-spinner 1.1.1 → 1.2.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SpacingProps } from '@versini/ui-private/dist/utilities';
2
+ import { SpacingTypes } from '@versini/ui-spacing-types';
3
3
 
4
4
  declare const SPINNER_CLASSNAME = "av-spinner";
5
5
 
@@ -16,7 +16,7 @@ type SpinnerProps = {
16
16
  * The type of spinner to render. This will change the layout of the spinner.
17
17
  */
18
18
  type?: "circle" | "dots";
19
- } & SpacingProps;
19
+ } & SpacingTypes.Props;
20
20
 
21
21
  declare const Spinner: ({ spinnerRef, mode, type, spacing, }: SpinnerProps) => react_jsx_runtime.JSX.Element;
22
22
 
package/dist/index.js CHANGED
@@ -1,62 +1,76 @@
1
- import { jsxs as a, jsx as s } from "react/jsx-runtime";
2
- import l from "clsx";
1
+ import { jsxs as e, jsx as i } from "react/jsx-runtime";
2
+ import n from "clsx";
3
3
  /*!
4
- @versini/ui-spinner v1.1.1
4
+ @versini/ui-spinner v1.2.0
5
5
  © 2024 gizmette.com
6
6
  */
7
7
  try {
8
8
  window.__VERSINI_UI_SPINNER__ || (window.__VERSINI_UI_SPINNER__ = {
9
- version: "1.1.1",
10
- buildTime: "12/18/2024 01:22 PM EST",
9
+ version: "1.2.0",
10
+ buildTime: "12/24/2024 06:47 PM EST",
11
11
  homepage: "https://github.com/aversini/ui-components",
12
12
  license: "MIT"
13
13
  });
14
14
  } catch {
15
15
  }
16
- const o = "av-spinner", t = (r) => {
17
- let e = "";
16
+ const o = "av-spinner";
17
+ /*!
18
+ @versini/ui-spacing v1.0.0
19
+ © 2024 gizmette.com
20
+ */
21
+ try {
22
+ window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
23
+ version: "1.0.0",
24
+ buildTime: "12/24/2024 06:47 PM EST",
25
+ homepage: "https://github.com/aversini/ui-components",
26
+ license: "MIT"
27
+ });
28
+ } catch {
29
+ }
30
+ const a = (r) => {
31
+ let t = "";
18
32
  if (typeof r == "number" || typeof r == "string")
19
- e = "m-" + r;
33
+ t = "m-" + r;
20
34
  else {
21
35
  const c = [];
22
- (r == null ? void 0 : r.t) !== void 0 && c.push(`mt-${r.t}`), (r == null ? void 0 : r.r) !== void 0 && c.push(`mr-${r.r}`), (r == null ? void 0 : r.b) !== void 0 && c.push(`mb-${r.b}`), (r == null ? void 0 : r.l) !== void 0 && c.push(`ml-${r.l}`), e = c.join(" ");
36
+ (r == null ? void 0 : r.t) !== void 0 && c.push(`mt-${r.t}`), (r == null ? void 0 : r.r) !== void 0 && c.push(`mr-${r.r}`), (r == null ? void 0 : r.b) !== void 0 && c.push(`mb-${r.b}`), (r == null ? void 0 : r.l) !== void 0 && c.push(`ml-${r.l}`), t = c.join(" ");
23
37
  }
24
- return e;
25
- }, y = ({
38
+ return t;
39
+ }, m = ({
26
40
  spinnerRef: r,
27
- mode: e = "system",
41
+ mode: t = "system",
28
42
  type: c = "circle",
29
- spacing: n
43
+ spacing: l
30
44
  }) => {
31
- const d = c === "circle" ? l(
45
+ const d = c === "circle" ? n(
32
46
  o,
33
- t(n),
47
+ a(l),
34
48
  "h-8 w-8",
35
49
  "align-[-0.125em]",
36
50
  "border-4",
37
51
  "inline-block animate-spin rounded-full border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]",
38
52
  {
39
- "text-copy-dark": e === "dark",
40
- "text-copy-accent": e === "light",
41
- "text-copy-dark dark:text-copy-accent": e === "system",
42
- "text-copy-accent dark:text-copy-dark": e === "alt-system"
53
+ "text-copy-dark": t === "dark",
54
+ "text-copy-accent": t === "light",
55
+ "text-copy-dark dark:text-copy-accent": t === "system",
56
+ "text-copy-accent dark:text-copy-dark": t === "alt-system"
43
57
  }
44
- ) : l(o, t(n)), i = l("av-spinner__dot", {
45
- "fill-copy-dark": e === "dark",
46
- "fill-copy-accent": e === "light",
47
- "fill-copy-dark dark:fill-copy-accent": e === "system",
48
- "fill-copy-accent dark:fill-copy-dark": e === "alt-system"
58
+ ) : n(o, a(l)), s = n("av-spinner__dot", {
59
+ "fill-copy-dark": t === "dark",
60
+ "fill-copy-accent": t === "light",
61
+ "fill-copy-dark dark:fill-copy-accent": t === "system",
62
+ "fill-copy-accent dark:fill-copy-dark": t === "alt-system"
49
63
  });
50
- return /* @__PURE__ */ a("div", { ref: r, className: d, role: "status", children: [
51
- c === "dots" && /* @__PURE__ */ a("svg", { className: "h-8 w-8", children: [
52
- /* @__PURE__ */ s("circle", { className: i, cx: "6", cy: "50%", r: "3" }),
53
- /* @__PURE__ */ s("circle", { className: i, cx: "50%", cy: "50%", r: "3" }),
54
- /* @__PURE__ */ s("circle", { className: i, cx: "80%", cy: "50%", r: "3" })
64
+ return /* @__PURE__ */ e("div", { ref: r, className: d, role: "status", children: [
65
+ c === "dots" && /* @__PURE__ */ e("svg", { className: "h-8 w-8", children: [
66
+ /* @__PURE__ */ i("circle", { className: s, cx: "6", cy: "50%", r: "3" }),
67
+ /* @__PURE__ */ i("circle", { className: s, cx: "50%", cy: "50%", r: "3" }),
68
+ /* @__PURE__ */ i("circle", { className: s, cx: "80%", cy: "50%", r: "3" })
55
69
  ] }),
56
- /* @__PURE__ */ s("span", { className: "sr-only", children: "Loading..." })
70
+ /* @__PURE__ */ i("span", { className: "sr-only", children: "Loading..." })
57
71
  ] });
58
72
  };
59
73
  export {
60
74
  o as SPINNER_CLASSNAME,
61
- y as Spinner
75
+ m as Spinner
62
76
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-spinner",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -39,11 +39,13 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@tailwindcss/typography": "0.5.15",
42
- "@versini/ui-private": "1.5.1",
42
+ "@versini/ui-private": "1.6.0",
43
+ "@versini/ui-spacing": "1.0.0",
44
+ "@versini/ui-spacing-types": "1.0.0",
43
45
  "tailwindcss": "3.4.17"
44
46
  },
45
47
  "sideEffects": [
46
48
  "**/*.css"
47
49
  ],
48
- "gitHead": "123c2555b25210da73697c4fdd3b6a5f67a3b993"
50
+ "gitHead": "cb948414a675c01f3328ed6470ccf4b58f73534f"
49
51
  }