@rinzai/zen 0.4.1 → 0.4.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/backdrop/index.tsx"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,aAAa,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/backdrop/index.tsx"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,aAAa,+BA2LnE;AAED,MAAM,WAAW,aAAa;IAC1B,wFAAwF;IACxF,OAAO,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/spinner/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Small circular spinner in the current text colour; size it with className
|
|
3
|
+
* (default size-4). Decorative by default (e.g. inside a loading Button). Give
|
|
4
|
+
* it a `label` when it stands on its own, and screen readers announce it.
|
|
5
|
+
*/
|
|
6
|
+
export default function Spinner({ label, className }: SpinnerProps): import('react').JSX.Element;
|
|
3
7
|
export interface SpinnerProps {
|
|
8
|
+
/** What is loading, e.g. "Loading entries". Makes the spinner announce itself. */
|
|
9
|
+
label?: string;
|
|
4
10
|
className?: string;
|
|
5
11
|
}
|
|
6
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/spinner/index.tsx"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/spinner/index.tsx"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,YAAY,+BAYjE;AAED,MAAM,WAAW,YAAY;IACzB,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
package/dist/zen.js
CHANGED
|
@@ -586,13 +586,14 @@ function Se({ pattern: e, topoSrc: t }) {
|
|
|
586
586
|
let a = t + " " + n;
|
|
587
587
|
c.get(e) !== a && (c.set(e, a), e.style.setProperty(r, t), e.style.setProperty(i, n));
|
|
588
588
|
}, u = () => {
|
|
589
|
-
|
|
589
|
+
n = 0;
|
|
590
|
+
let e = Array.from(document.querySelectorAll(".glow-edge")), r = e.map((e) => e.getBoundingClientRect()), c = t?.getBoundingClientRect();
|
|
591
|
+
if (t && c) {
|
|
590
592
|
let e = s ? "out" : "in";
|
|
591
593
|
t.dataset.pointer !== e && (t.dataset.pointer = e);
|
|
592
594
|
let n = t.querySelector(".zen-light");
|
|
593
|
-
n && !s && l(n, `${i}px`, `${a}px`, "left", "top");
|
|
595
|
+
n && !s && l(n, `${Math.round(i - c.left)}px`, `${Math.round(a - c.top)}px`, "left", "top");
|
|
594
596
|
}
|
|
595
|
-
let e = Array.from(document.querySelectorAll(".glow-edge")), r = e.map((e) => e.getBoundingClientRect());
|
|
596
597
|
e.forEach((e, t) => {
|
|
597
598
|
let n = r[t];
|
|
598
599
|
i > n.left - 400 && i < n.right + 400 && a > n.top - 400 && a < n.bottom + 400 ? (l(e, `${Math.round(i - n.left)}px`, `${Math.round(a - n.top)}px`), o.delete(e)) : o.has(e) || (l(e, "-9999px", "-9999px"), o.add(e));
|
|
@@ -708,10 +709,12 @@ var Te = we("zen__badge inline-flex items-center rounded-md border px-1.5 py-0.5
|
|
|
708
709
|
});
|
|
709
710
|
//#endregion
|
|
710
711
|
//#region packages/spinner/index.tsx
|
|
711
|
-
function Ee({
|
|
712
|
+
function Ee({ label: e, className: t }) {
|
|
712
713
|
return /* @__PURE__ */ m("span", {
|
|
713
|
-
"
|
|
714
|
-
|
|
714
|
+
role: e ? "status" : void 0,
|
|
715
|
+
"aria-label": e,
|
|
716
|
+
"aria-hidden": !e || void 0,
|
|
717
|
+
className: k("zen__spinner inline-block size-4 shrink-0 animate-spin rounded-full border-2 border-current border-t-transparent", t)
|
|
715
718
|
});
|
|
716
719
|
}
|
|
717
720
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rinzai/zen",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "React components in dark glass: translucent surfaces, hairline borders that catch a pointer light, one accent colour. Tailwind v4, no runtime dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -115,6 +115,6 @@
|
|
|
115
115
|
"build-storybook": "storybook build",
|
|
116
116
|
"chromatic": "npx chromatic --project-token $CHROMATIC_PROJECT_TOKEN",
|
|
117
117
|
"docs:dev": "pnpm --filter zen-docs dev",
|
|
118
|
-
"docs:build": "pnpm --filter zen-docs build && cp docs/build/client/
|
|
118
|
+
"docs:build": "pnpm --filter zen-docs build && cp docs/build/client/404/index.html docs/build/client/404.html && storybook build --output-dir docs/build/client/storybook"
|
|
119
119
|
}
|
|
120
120
|
}
|