@syscore/ui-library 1.23.0 → 1.25.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/client/components/icons/AlphaIcon.tsx +1 -1
- package/client/components/icons/achievement-badges/BadgeCertificationBronze.tsx +5 -5
- package/client/components/icons/achievement-badges/BadgeCertificationPlatinum.tsx +5 -5
- package/client/components/icons/achievement-badges/BadgeCertificationSilver.tsx +5 -5
- package/client/components/ui/dialog.tsx +1 -1
- package/client/components/ui/height-container.tsx +54 -0
- package/client/components/ui/tabs.tsx +3 -45
- package/client/components/ui/tooltip.tsx +1 -1
- package/client/global.css +10 -6
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +56 -51
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -145,6 +145,7 @@ import { FormField } from '../client/components/ui/form';
|
|
|
145
145
|
import { FormItem } from '../client/components/ui/form';
|
|
146
146
|
import { FormLabel } from '../client/components/ui/form';
|
|
147
147
|
import { FormMessage } from '../client/components/ui/form';
|
|
148
|
+
import { HeightContainer } from '../client/components/ui/height-container';
|
|
148
149
|
import { HoverCard } from '../client/components/ui/hover-card';
|
|
149
150
|
import { HoverCardContent } from '../client/components/ui/hover-card';
|
|
150
151
|
import { HoverCardTrigger } from '../client/components/ui/hover-card';
|
|
@@ -662,6 +663,8 @@ export { FormLabel }
|
|
|
662
663
|
|
|
663
664
|
export { FormMessage }
|
|
664
665
|
|
|
666
|
+
export { HeightContainer }
|
|
667
|
+
|
|
665
668
|
export { HoverCard }
|
|
666
669
|
|
|
667
670
|
export { HoverCardContent }
|
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { useState, useEffect, useCallback, useRef, createContext, Children, isValidElement, cloneElement,
|
|
4
|
-
import { motion, AnimatePresence,
|
|
3
|
+
import { useState, useEffect, useCallback, useRef, useLayoutEffect, createContext, Children, isValidElement, cloneElement, useContext, useMemo } from "react";
|
|
4
|
+
import { motion, AnimatePresence, animate, useMotionValue } from "motion/react";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { twMerge } from "tailwind-merge";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
@@ -1097,7 +1097,7 @@ function ToggleClose({ className }) {
|
|
|
1097
1097
|
"data-slot": "tooltip-close",
|
|
1098
1098
|
onClick: close,
|
|
1099
1099
|
className,
|
|
1100
|
-
children: /* @__PURE__ */ jsx(UtilityClose, {})
|
|
1100
|
+
children: /* @__PURE__ */ jsx(UtilityClose, { className: "text-inherit" })
|
|
1101
1101
|
}
|
|
1102
1102
|
);
|
|
1103
1103
|
}
|
|
@@ -2464,7 +2464,7 @@ function DialogContent({
|
|
|
2464
2464
|
UtilityClose,
|
|
2465
2465
|
{
|
|
2466
2466
|
className: cn(
|
|
2467
|
-
"dialog-close-icon text-gray-400 hover:text-gray-
|
|
2467
|
+
"dialog-close-icon text-gray-400 hover:text-gray-600 transition-colors duration-200 ",
|
|
2468
2468
|
closeClassName
|
|
2469
2469
|
)
|
|
2470
2470
|
}
|
|
@@ -2767,6 +2767,40 @@ const Tag = React.forwardRef(
|
|
|
2767
2767
|
}
|
|
2768
2768
|
);
|
|
2769
2769
|
Tag.displayName = "Tag";
|
|
2770
|
+
function HeightContainer({
|
|
2771
|
+
children,
|
|
2772
|
+
stateKey,
|
|
2773
|
+
className
|
|
2774
|
+
}) {
|
|
2775
|
+
const containerRef = useRef(null);
|
|
2776
|
+
const innerRef = useRef(null);
|
|
2777
|
+
const currentHeight = useRef(0);
|
|
2778
|
+
useLayoutEffect(() => {
|
|
2779
|
+
const container = containerRef.current;
|
|
2780
|
+
const inner = innerRef.current;
|
|
2781
|
+
if (!container || !inner) return;
|
|
2782
|
+
const initialHeight = inner.offsetHeight;
|
|
2783
|
+
if (currentHeight.current === 0 && initialHeight > 0) {
|
|
2784
|
+
currentHeight.current = initialHeight;
|
|
2785
|
+
container.style.height = `${initialHeight}px`;
|
|
2786
|
+
}
|
|
2787
|
+
const ro = new ResizeObserver(() => {
|
|
2788
|
+
const targetHeight = inner.offsetHeight;
|
|
2789
|
+
if (targetHeight > 0 && targetHeight !== currentHeight.current) {
|
|
2790
|
+
const shouldAnimate = currentHeight.current > 0;
|
|
2791
|
+
currentHeight.current = targetHeight;
|
|
2792
|
+
if (shouldAnimate) {
|
|
2793
|
+
animate(container, { height: targetHeight }, { duration: 0.25, ease: "easeInOut" });
|
|
2794
|
+
} else {
|
|
2795
|
+
container.style.height = `${targetHeight}px`;
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
});
|
|
2799
|
+
ro.observe(inner);
|
|
2800
|
+
return () => ro.disconnect();
|
|
2801
|
+
}, [stateKey]);
|
|
2802
|
+
return /* @__PURE__ */ jsx("div", { ref: containerRef, className: cn("overflow-clip", className), children: /* @__PURE__ */ jsx("div", { ref: innerRef, children }) });
|
|
2803
|
+
}
|
|
2770
2804
|
const TabsContext = createContext(null);
|
|
2771
2805
|
function useTabsContext() {
|
|
2772
2806
|
const ctx = useContext(TabsContext);
|
|
@@ -2790,36 +2824,6 @@ const contentVariants = {
|
|
|
2790
2824
|
center: { opacity: 1, x: 0 },
|
|
2791
2825
|
exit: (dir) => ({ opacity: 0, x: dir * -20 })
|
|
2792
2826
|
};
|
|
2793
|
-
function AnimatedHeight({
|
|
2794
|
-
children,
|
|
2795
|
-
selectedValue
|
|
2796
|
-
}) {
|
|
2797
|
-
const containerRef = useRef(null);
|
|
2798
|
-
const innerRef = useRef(null);
|
|
2799
|
-
const currentHeight = useRef(0);
|
|
2800
|
-
useLayoutEffect(() => {
|
|
2801
|
-
const container = containerRef.current;
|
|
2802
|
-
const inner = innerRef.current;
|
|
2803
|
-
if (!container || !inner) return;
|
|
2804
|
-
const initialHeight = inner.offsetHeight;
|
|
2805
|
-
if (currentHeight.current === 0) {
|
|
2806
|
-
currentHeight.current = initialHeight;
|
|
2807
|
-
container.style.height = `${initialHeight}px`;
|
|
2808
|
-
return;
|
|
2809
|
-
}
|
|
2810
|
-
const ro = new ResizeObserver(() => {
|
|
2811
|
-
const targetHeight = inner.offsetHeight;
|
|
2812
|
-
if (targetHeight > 0 && targetHeight !== currentHeight.current) {
|
|
2813
|
-
currentHeight.current = targetHeight;
|
|
2814
|
-
ro.disconnect();
|
|
2815
|
-
animate(container, { height: targetHeight }, { duration: 0.25, ease: "easeInOut" });
|
|
2816
|
-
}
|
|
2817
|
-
});
|
|
2818
|
-
ro.observe(inner);
|
|
2819
|
-
return () => ro.disconnect();
|
|
2820
|
-
}, [selectedValue]);
|
|
2821
|
-
return /* @__PURE__ */ jsx("div", { ref: containerRef, className: "overflow-clip", children: /* @__PURE__ */ jsx("div", { ref: innerRef, children }) });
|
|
2822
|
-
}
|
|
2823
2827
|
function Tabs({
|
|
2824
2828
|
children,
|
|
2825
2829
|
defaultValue,
|
|
@@ -2857,7 +2861,7 @@ function Tabs({
|
|
|
2857
2861
|
value: { selectedValue, setSelectedValue: handleSetSelectedValue, direction, registerValue },
|
|
2858
2862
|
children: /* @__PURE__ */ jsxs("div", { className: cn("tabs-container", className), children: [
|
|
2859
2863
|
nonContentChildren,
|
|
2860
|
-
/* @__PURE__ */ jsx(
|
|
2864
|
+
/* @__PURE__ */ jsx(HeightContainer, { stateKey: selectedValue, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", custom: direction, children: activeContent && cloneElement(activeContent, { key: activeContent.props.value }) }) })
|
|
2861
2865
|
] })
|
|
2862
2866
|
}
|
|
2863
2867
|
);
|
|
@@ -10721,7 +10725,7 @@ const BadgeCertificationBronze = ({
|
|
|
10721
10725
|
{
|
|
10722
10726
|
d: "M26.8122 52.8121C24.5706 52.8121 22.2424 52.5414 20.0875 51.9133C17.9325 51.2853 15.7884 50.4839 13.8176 49.3144C11.8467 48.1449 10.0491 46.8021 8.43565 45.1886C6.82216 43.5751 5.47939 41.7884 4.30987 39.8067C3.14036 37.8359 2.33903 35.7784 1.71096 33.5368C1.08288 31.3819 0.812164 29.0537 0.812164 26.8121C0.812164 24.5706 1.08288 22.2424 1.71096 20.0874C2.33903 17.9325 3.14036 15.7884 4.30987 13.8175C5.47939 11.8467 6.82216 10.0491 8.43565 8.43562C10.0491 6.82213 11.8359 5.47936 13.8176 4.30984C15.7884 3.14033 17.8459 2.339 20.0875 1.71093C22.2424 1.08285 24.5706 0.812134 26.8122 0.812134C29.0537 0.812134 31.3819 1.08285 33.5369 1.71093C35.6918 2.339 37.8359 3.14033 39.8067 4.30984C41.7776 5.47936 43.5752 6.82213 45.1887 8.43562C46.8022 10.0491 48.1449 11.8359 49.3145 13.8175C50.484 15.7884 51.2853 17.8459 51.9134 20.0874C52.5414 22.2424 52.8122 24.5706 52.8122 26.8121C52.8122 29.0537 52.5414 31.3819 51.9134 33.5368C51.2853 35.6918 50.484 37.8359 49.3145 39.8067C48.1449 41.7776 46.8022 43.5751 45.1887 45.1886C43.5752 46.8021 41.7884 48.1449 39.8067 49.3144C37.8359 50.4839 35.7784 51.2853 33.5369 51.9133C31.3819 52.5414 29.0537 52.8121 26.8122 52.8121Z",
|
|
10723
10727
|
fill: "url(#paint0_linear_9834_265)",
|
|
10724
|
-
|
|
10728
|
+
fillOpacity: "0.8"
|
|
10725
10729
|
}
|
|
10726
10730
|
),
|
|
10727
10731
|
/* @__PURE__ */ jsx(
|
|
@@ -10824,10 +10828,10 @@ const BadgeCertificationBronze = ({
|
|
|
10824
10828
|
y2: "0.822974",
|
|
10825
10829
|
gradientUnits: "userSpaceOnUse",
|
|
10826
10830
|
children: [
|
|
10827
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.173077",
|
|
10828
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.324306",
|
|
10829
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.484968",
|
|
10830
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.826923",
|
|
10831
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.173077", stopColor: "#DCBA8E" }),
|
|
10832
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.324306", stopColor: "#ECDDBA" }),
|
|
10833
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.484968", stopColor: "#F2E9C9" }),
|
|
10834
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.826923", stopColor: "#DFC196" })
|
|
10831
10835
|
]
|
|
10832
10836
|
}
|
|
10833
10837
|
) })
|
|
@@ -10860,7 +10864,7 @@ const BadgeCertificationSilver = ({
|
|
|
10860
10864
|
{
|
|
10861
10865
|
d: "M26.8122 52.8121C24.5706 52.8121 22.2424 52.5414 20.0875 51.9133C17.9325 51.2853 15.7884 50.4839 13.8176 49.3144C11.8467 48.1449 10.0491 46.8021 8.43565 45.1886C6.82216 43.5751 5.47939 41.7884 4.30987 39.8067C3.14036 37.8359 2.33903 35.7784 1.71096 33.5368C1.08288 31.3819 0.812164 29.0537 0.812164 26.8121C0.812164 24.5706 1.08288 22.2424 1.71096 20.0874C2.33903 17.9325 3.14036 15.7884 4.30987 13.8175C5.47939 11.8467 6.82216 10.0491 8.43565 8.43562C10.0491 6.82213 11.8359 5.47936 13.8176 4.30984C15.7884 3.14033 17.8459 2.339 20.0875 1.71093C22.2424 1.08285 24.5706 0.812134 26.8122 0.812134C29.0537 0.812134 31.3819 1.08285 33.5369 1.71093C35.6918 2.339 37.8359 3.14033 39.8067 4.30984C41.7776 5.47936 43.5752 6.82213 45.1887 8.43562C46.8022 10.0491 48.1449 11.8359 49.3145 13.8175C50.484 15.7884 51.2853 17.8459 51.9134 20.0874C52.5414 22.2424 52.8122 24.5706 52.8122 26.8121C52.8122 29.0537 52.5414 31.3819 51.9134 33.5368C51.2853 35.6918 50.484 37.8359 49.3145 39.8067C48.1449 41.7776 46.8022 43.5751 45.1887 45.1886C43.5752 46.8021 41.7884 48.1449 39.8067 49.3144C37.8359 50.4839 35.7784 51.2853 33.5369 51.9133C31.3819 52.5414 29.0537 52.8121 26.8122 52.8121Z",
|
|
10862
10866
|
fill: "url(#paint0_linear_9834_296)",
|
|
10863
|
-
|
|
10867
|
+
fillOpacity: "0.8"
|
|
10864
10868
|
}
|
|
10865
10869
|
),
|
|
10866
10870
|
/* @__PURE__ */ jsx(
|
|
@@ -10963,10 +10967,10 @@ const BadgeCertificationSilver = ({
|
|
|
10963
10967
|
y2: "0.822974",
|
|
10964
10968
|
gradientUnits: "userSpaceOnUse",
|
|
10965
10969
|
children: [
|
|
10966
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.173077",
|
|
10967
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.324306",
|
|
10968
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.484968",
|
|
10969
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.826923",
|
|
10970
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.173077", stopColor: "#BCC4CD" }),
|
|
10971
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.324306", stopColor: "#FCFCFD" }),
|
|
10972
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.484968", stopColor: "#FCFCFD" }),
|
|
10973
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.826923", stopColor: "#BCC4CD" })
|
|
10970
10974
|
]
|
|
10971
10975
|
}
|
|
10972
10976
|
) })
|
|
@@ -11138,7 +11142,7 @@ const BadgeCertificationPlatinum = ({
|
|
|
11138
11142
|
{
|
|
11139
11143
|
d: "M26.8122 52.8121C24.5706 52.8121 22.2424 52.5414 20.0875 51.9133C17.9325 51.2853 15.7884 50.4839 13.8176 49.3144C11.8467 48.1449 10.0491 46.8021 8.43565 45.1886C6.82216 43.5751 5.47939 41.7884 4.30987 39.8067C3.14036 37.8359 2.33903 35.7784 1.71096 33.5368C1.08288 31.3819 0.812164 29.0537 0.812164 26.8121C0.812164 24.5706 1.08288 22.2424 1.71096 20.0874C2.33903 17.9325 3.14036 15.7884 4.30987 13.8175C5.47939 11.8467 6.82216 10.0491 8.43565 8.43562C10.0491 6.82213 11.8359 5.47936 13.8176 4.30984C15.7884 3.14033 17.8459 2.339 20.0875 1.71093C22.2424 1.08285 24.5706 0.812134 26.8122 0.812134C29.0537 0.812134 31.3819 1.08285 33.5369 1.71093C35.6918 2.339 37.8359 3.14033 39.8067 4.30984C41.7776 5.47936 43.5752 6.82213 45.1887 8.43562C46.8022 10.0491 48.1449 11.8359 49.3145 13.8175C50.484 15.7884 51.2853 17.8459 51.9134 20.0874C52.5414 22.2424 52.8122 24.5706 52.8122 26.8121C52.8122 29.0537 52.5414 31.3819 51.9134 33.5368C51.2853 35.6918 50.484 37.8359 49.3145 39.8067C48.1449 41.7776 46.8022 43.5751 45.1887 45.1886C43.5752 46.8021 41.7884 48.1449 39.8067 49.3144C37.8359 50.4839 35.7784 51.2853 33.5369 51.9133C31.3819 52.5414 29.0537 52.8121 26.8122 52.8121Z",
|
|
11140
11144
|
fill: "url(#paint0_linear_9834_358)",
|
|
11141
|
-
|
|
11145
|
+
fillOpacity: "0.8"
|
|
11142
11146
|
}
|
|
11143
11147
|
),
|
|
11144
11148
|
/* @__PURE__ */ jsx(
|
|
@@ -11241,10 +11245,10 @@ const BadgeCertificationPlatinum = ({
|
|
|
11241
11245
|
y2: "0.822974",
|
|
11242
11246
|
gradientUnits: "userSpaceOnUse",
|
|
11243
11247
|
children: [
|
|
11244
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.173077",
|
|
11245
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.365337",
|
|
11246
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.542584",
|
|
11247
|
-
/* @__PURE__ */ jsx("stop", { offset: "0.826923",
|
|
11248
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.173077", stopColor: "#B4B3BC" }),
|
|
11249
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.365337", stopColor: "#E2E1E5" }),
|
|
11250
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.542584", stopColor: "#E2E1E5" }),
|
|
11251
|
+
/* @__PURE__ */ jsx("stop", { offset: "0.826923", stopColor: "#C6C5CC" })
|
|
11248
11252
|
]
|
|
11249
11253
|
}
|
|
11250
11254
|
) })
|
|
@@ -13404,7 +13408,7 @@ function AlphaIcon({
|
|
|
13404
13408
|
y2: "-2.36962",
|
|
13405
13409
|
gradientUnits: "userSpaceOnUse",
|
|
13406
13410
|
children: [
|
|
13407
|
-
/* @__PURE__ */ jsx("stop", {
|
|
13411
|
+
/* @__PURE__ */ jsx("stop", { stopColor: "#8AEFDB" }),
|
|
13408
13412
|
/* @__PURE__ */ jsx("stop", { offset: "0.5", stopColor: "#D4BACE" }),
|
|
13409
13413
|
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "#CBE0F1" })
|
|
13410
13414
|
]
|
|
@@ -13625,6 +13629,7 @@ export {
|
|
|
13625
13629
|
FormItem,
|
|
13626
13630
|
FormLabel,
|
|
13627
13631
|
FormMessage,
|
|
13632
|
+
HeightContainer,
|
|
13628
13633
|
HoverCard,
|
|
13629
13634
|
HoverCardContent,
|
|
13630
13635
|
HoverCardTrigger,
|