@mindtris/ui 0.1.19 → 0.1.21
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.mjs +47 -33
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +2 -0
- package/package.json +6 -3
package/dist/index.mjs
CHANGED
|
@@ -2812,7 +2812,7 @@ var buttonVariants = createVariants({
|
|
|
2812
2812
|
base: [
|
|
2813
2813
|
baseClasses,
|
|
2814
2814
|
// Only apply "disabled" visuals when explicitly disabled (not when loading).
|
|
2815
|
-
"data-[disabled=true]:border-border data-[disabled=true]:
|
|
2815
|
+
"data-[disabled=true]:border-border data-[disabled=true]:opacity-50 data-[disabled=true]:shadow-none",
|
|
2816
2816
|
// Loading should keep variant colors, but look inert.
|
|
2817
2817
|
"data-[loading=true]:shadow-none data-[loading=true]:opacity-90"
|
|
2818
2818
|
],
|
|
@@ -7014,38 +7014,52 @@ function Sidebar({
|
|
|
7014
7014
|
const widthClasses = collapsible === "icon" ? "w-64 lg:w-14 lg:hover:w-64" : "w-64";
|
|
7015
7015
|
const mobilePosition = side === "left" ? "left-0" : "right-0";
|
|
7016
7016
|
const mobileClosedTranslate = side === "left" ? "-translate-x-full" : "translate-x-full";
|
|
7017
|
-
return /* @__PURE__ */ jsxs23(
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
),
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7017
|
+
return /* @__PURE__ */ jsxs23(
|
|
7018
|
+
"div",
|
|
7019
|
+
{
|
|
7020
|
+
className: cn(
|
|
7021
|
+
"transition-all duration-200 ease-out",
|
|
7022
|
+
collapsible === "none" ? "min-w-fit" : open ? "w-64" : "w-0",
|
|
7023
|
+
className
|
|
7024
|
+
),
|
|
7025
|
+
"data-variant": variant,
|
|
7026
|
+
"data-collapsible": collapsible,
|
|
7027
|
+
"data-side": side,
|
|
7028
|
+
children: [
|
|
7029
|
+
showBackdrop ? /* @__PURE__ */ jsx38(
|
|
7030
|
+
"div",
|
|
7031
|
+
{
|
|
7032
|
+
className: cn(
|
|
7033
|
+
"fixed inset-0 z-40 lg:hidden transition-opacity duration-200",
|
|
7034
|
+
open ? "opacity-100 bg-foreground/20" : "opacity-0 pointer-events-none"
|
|
7035
|
+
),
|
|
7036
|
+
"aria-hidden": true,
|
|
7037
|
+
onClick: () => onOpenChange(false)
|
|
7038
|
+
}
|
|
7039
|
+
) : null,
|
|
7040
|
+
/* @__PURE__ */ jsxs23(
|
|
7041
|
+
"div",
|
|
7042
|
+
{
|
|
7043
|
+
ref: sidebarRef,
|
|
7044
|
+
className: cn(
|
|
7045
|
+
"flex flex-col absolute z-50 top-0 min-h-[280px] lg:min-h-[100dvh] overflow-y-auto transition-all duration-200 ease-out",
|
|
7046
|
+
collapsible === "none" ? "lg:static" : "fixed lg:sticky",
|
|
7047
|
+
mobilePosition,
|
|
7048
|
+
widthClasses,
|
|
7049
|
+
containerChrome,
|
|
7050
|
+
open ? "translate-x-0" : mobileClosedTranslate
|
|
7051
|
+
),
|
|
7052
|
+
"aria-hidden": !open && collapsible === "offcanvas",
|
|
7053
|
+
children: [
|
|
7054
|
+
headerSlot != null ? /* @__PURE__ */ jsx38("div", { className: "shrink-0", children: headerSlot }) : null,
|
|
7055
|
+
/* @__PURE__ */ jsx38("div", { className: "flex-1 min-h-0 overflow-auto", children }),
|
|
7056
|
+
footerSlot != null ? /* @__PURE__ */ jsx38("div", { className: "shrink-0 border-t border-sidebar-border", children: footerSlot }) : null
|
|
7057
|
+
]
|
|
7058
|
+
}
|
|
7059
|
+
)
|
|
7060
|
+
]
|
|
7061
|
+
}
|
|
7062
|
+
);
|
|
7049
7063
|
}
|
|
7050
7064
|
__name(Sidebar, "Sidebar");
|
|
7051
7065
|
function SidebarHeader({ className, ...props }) {
|