@phreshos/react-ui 0.1.2 → 0.1.3
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/surface-material.js +3 -1
- package/package.json +1 -1
package/dist/surface-material.js
CHANGED
|
@@ -26,12 +26,14 @@ export function SurfaceMaterial({ animation, color, grain, opacity }) {
|
|
|
26
26
|
height: "100%",
|
|
27
27
|
overflow: "hidden",
|
|
28
28
|
borderRadius: "inherit",
|
|
29
|
+
border: "1px solid rgba(15, 17, 21, 0.08)",
|
|
30
|
+
boxSizing: "border-box",
|
|
29
31
|
opacity,
|
|
30
32
|
pointerEvents: "none"
|
|
31
33
|
}, children: [_jsx("defs", { children: _jsx("pattern", { id: identity, width: patternSize, height: patternSize, patternUnits: "userSpaceOnUse", children: initial.map((path, tone) => {
|
|
32
34
|
const channel = Math.round(tone / (toneCount - 1) * 255);
|
|
33
35
|
return _jsx("path", { ref: node => { paths.current[tone] = node; }, "data-surface-grain-tone": tone, d: path, fill: `rgb(${channel}, ${channel}, ${channel})`, shapeRendering: "crispEdges" }, tone);
|
|
34
|
-
}) }) }), _jsx("rect", { "data-surface-base": "", width: "100%", height: "100%", fill: color }), _jsx("rect", { "data-surface-grain": "", width: "100%", height: "100%", fill: `url(#${identity})`, opacity: grain, shapeRendering: "crispEdges" })
|
|
36
|
+
}) }) }), _jsx("rect", { "data-surface-base": "", width: "100%", height: "100%", fill: color }), _jsx("rect", { "data-surface-grain": "", width: "100%", height: "100%", fill: `url(#${identity})`, opacity: grain, shapeRendering: "crispEdges" })] });
|
|
35
37
|
}
|
|
36
38
|
class AnimationClock {
|
|
37
39
|
#entries = new Set();
|