@tapizlabs/ui 0.2.24 → 0.2.26
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 +2 -1
- package/dist/index.js +44 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -121,8 +121,9 @@ interface LogoMarkProps {
|
|
|
121
121
|
* - "cloud" = oblak sa T monogramom (Tapiz Cloud Platform / status)
|
|
122
122
|
* - "specs" = dokument/spec list sa redovima teksta i čekiranom stavkom (Tapiz Specs)
|
|
123
123
|
* - "pulse" = EKG kriva sa T monogramom (Tapiz Pulse — interni monitoring)
|
|
124
|
+
* - "sentinel" = štit sa okom (Tapiz Sentinel — error monitoring / nadzor)
|
|
124
125
|
*/
|
|
125
|
-
variant?: "lms" | "boards" | "playground" | "whiteboard" | "cloud" | "specs" | "pulse";
|
|
126
|
+
variant?: "lms" | "boards" | "playground" | "whiteboard" | "cloud" | "specs" | "pulse" | "sentinel";
|
|
126
127
|
}
|
|
127
128
|
declare const LogoMark: ({ size, className, bgClassName, bgFill, bgOpacity, tone, variant, }: LogoMarkProps) => react.JSX.Element;
|
|
128
129
|
|
package/dist/index.js
CHANGED
|
@@ -639,6 +639,23 @@ var LogoMark = ({
|
|
|
639
639
|
}
|
|
640
640
|
),
|
|
641
641
|
/* @__PURE__ */ jsx6("circle", { cx: "30", cy: "20", r: "3.5", fill: accentDetail })
|
|
642
|
+
] }),
|
|
643
|
+
variant === "sentinel" && /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
644
|
+
/* @__PURE__ */ jsx6(
|
|
645
|
+
"path",
|
|
646
|
+
{
|
|
647
|
+
fill: glyph,
|
|
648
|
+
d: "M32 11 L50 18 V33 q0 13-18 20 Q14 46 14 33 V18 Z"
|
|
649
|
+
}
|
|
650
|
+
),
|
|
651
|
+
/* @__PURE__ */ jsx6(
|
|
652
|
+
"path",
|
|
653
|
+
{
|
|
654
|
+
d: "M21 32 q11-11 22 0 q-11 11-22 0Z",
|
|
655
|
+
fill: accentDetail
|
|
656
|
+
}
|
|
657
|
+
),
|
|
658
|
+
/* @__PURE__ */ jsx6("circle", { cx: "32", cy: "32", r: "4.2", fill: "#d4ff3a" })
|
|
642
659
|
] })
|
|
643
660
|
]
|
|
644
661
|
}
|
|
@@ -2760,6 +2777,31 @@ function Drawer({ open, onClose, title, description, children, footer, side = "r
|
|
|
2760
2777
|
// src/components/overlays/SidePanel.tsx
|
|
2761
2778
|
import { useEffect as useEffect4, useId as useId4, useState as useState10 } from "react";
|
|
2762
2779
|
import { createPortal as createPortal5 } from "react-dom";
|
|
2780
|
+
|
|
2781
|
+
// src/components/overlays/scrollLock.ts
|
|
2782
|
+
var lockCount = 0;
|
|
2783
|
+
var originalHtmlOverflow = "";
|
|
2784
|
+
var originalBodyOverflow = "";
|
|
2785
|
+
function acquireBodyScrollLock() {
|
|
2786
|
+
if (lockCount === 0) {
|
|
2787
|
+
originalHtmlOverflow = document.documentElement.style.overflow;
|
|
2788
|
+
originalBodyOverflow = document.body.style.overflow;
|
|
2789
|
+
document.documentElement.style.overflow = "hidden";
|
|
2790
|
+
document.body.style.overflow = "hidden";
|
|
2791
|
+
}
|
|
2792
|
+
lockCount += 1;
|
|
2793
|
+
return () => {
|
|
2794
|
+
lockCount = Math.max(0, lockCount - 1);
|
|
2795
|
+
if (lockCount === 0) {
|
|
2796
|
+
document.documentElement.style.overflow = originalHtmlOverflow;
|
|
2797
|
+
document.body.style.overflow = originalBodyOverflow;
|
|
2798
|
+
originalHtmlOverflow = "";
|
|
2799
|
+
originalBodyOverflow = "";
|
|
2800
|
+
}
|
|
2801
|
+
};
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
// src/components/overlays/SidePanel.tsx
|
|
2763
2805
|
import { jsx as jsx66, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
2764
2806
|
var widthRem = {
|
|
2765
2807
|
md: 28,
|
|
@@ -2818,17 +2860,13 @@ function SidePanel({
|
|
|
2818
2860
|
}, []);
|
|
2819
2861
|
useEffect4(() => {
|
|
2820
2862
|
if (!isOpen) return;
|
|
2821
|
-
const
|
|
2822
|
-
const body = document.body.style.overflow;
|
|
2823
|
-
document.documentElement.style.overflow = "hidden";
|
|
2824
|
-
document.body.style.overflow = "hidden";
|
|
2863
|
+
const releaseBodyScrollLock = acquireBodyScrollLock();
|
|
2825
2864
|
const onKeyDown = (e) => {
|
|
2826
2865
|
if (e.key === "Escape") onClose();
|
|
2827
2866
|
};
|
|
2828
2867
|
document.addEventListener("keydown", onKeyDown);
|
|
2829
2868
|
return () => {
|
|
2830
|
-
|
|
2831
|
-
document.body.style.overflow = body;
|
|
2869
|
+
releaseBodyScrollLock();
|
|
2832
2870
|
document.removeEventListener("keydown", onKeyDown);
|
|
2833
2871
|
};
|
|
2834
2872
|
}, [isOpen, onClose]);
|