@adamosuiteservices/ui 1.4.5 → 1.4.6

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/sidebar.cjs CHANGED
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const E=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],y=j.createLucideIcon("menu",E);function R(e){const t=x.useCallback(i=>{const d=window.matchMedia(e);return d.addEventListener("change",i),()=>{d.removeEventListener("change",i)}},[e]),a=()=>window.matchMedia(e).matches,n=()=>{throw Error("useMediaQuery is a client-only hook")};return x.useSyncExternalStore(t,a,n)}const l=m.createContext({});function v({children:e}){const[t,a]=m.useState(!1),[n,i]=m.useState("auto"),d=R("(min-width: 1280px)");return r.jsxRuntimeExports.jsx(l.Provider,{value:{isXl:d,sidebarHeight:n,setSidebarHeight:i,sheetOpen:t,setSheetOpen:a},children:r.jsxRuntimeExports.jsx("nav",{"data-slot":"sidebar",children:e})})}function w({className:e,children:t,...a}){const{isXl:n,setSidebarHeight:i,sheetOpen:d,setSheetOpen:b}=c();return r.jsxRuntimeExports.jsx(p.Portal,{children:r.jsxRuntimeExports.jsxs("div",{ref:u=>{u&&i(n?"auto":`${u.clientHeight}px`)},"data-slot":"sidebar-content",className:s.cn("adm:fixed adm:bg-sidebar-primary adm:text-sidebar-primary-foreground adm:xl:flex adm:xl:flex-col","adm:left-0 adm:top-0 adm:right-0","adm:xl:left-0 adm:xl:top-0 adm:xl:bottom-0 adm:xl:w-3xs adm:xl:h-auto",e),...a,children:[n&&t,r.jsxRuntimeExports.jsx(o.Sheet,{open:d,onOpenChange:b,children:r.jsxRuntimeExports.jsxs(o.SheetContent,{showCloseButton:!1,className:"adm:bg-sidebar-primary adm:text-sidebar-primary-foreground adm:border-sidebar-primary adm:rounded-none",children:[r.jsxRuntimeExports.jsx(h.VisuallyHidden,{children:r.jsxRuntimeExports.jsxs(o.SheetHeader,{children:[r.jsxRuntimeExports.jsx(o.SheetTitle,{children:"Sidebar"}),r.jsxRuntimeExports.jsx(o.SheetDescription,{children:"Sidebar"})]})}),t]})})]})})}function M({className:e,...t}){const{setSheetOpen:a}=c();return r.jsxRuntimeExports.jsx(f.Button,{"data-slot":"sidebar-trigger",className:s.cn("adm:xl:hidden",e),onClick:()=>a(n=>!n),...t,children:r.jsxRuntimeExports.jsx(y,{})})}function C({className:e,children:t,...a}){return r.jsxRuntimeExports.jsx("div",{"data-slot":"sidebar-inset",className:s.cn(e,"adm:xl:ml-[256px] adm:xl:mt-auto"),...a,children:t})}function O({className:e,children:t,...a}){return r.jsxRuntimeExports.jsx("div",{"data-slot":"sidebar-top-bar",className:s.cn("adm:sticky adm:top-0 adm:flex adm:gap-2 adm:items-center adm:justify-between adm:bg-background adm:p-4 adm:border-b",e),...a,children:t})}function N({className:e,children:t,...a}){return r.jsxRuntimeExports.jsx("header",{"data-slot":"sidebar-header",className:s.cn(e,"adm:flex adm:flex-col adm:mt-12"),...a,children:t})}function k({className:e,children:t,...a}){return r.jsxRuntimeExports.jsx("footer",{"data-slot":"sidebar-footer",className:s.cn(e,"adm:mt-auto adm:mb-12 adm:flex adm:flex-col"),...a,children:t})}function H({className:e,children:t,...a}){return r.jsxRuntimeExports.jsx("div",{"data-slot":"sidebar-menu",className:s.cn(e,"adm:flex adm:flex-col adm:gap-4 adm:overflow-y-auto adm:my-12 adm:py-1"),...a,children:t})}function q({asChild:e,className:t,...a}){const n=e?S.Slot:"button";return r.jsxRuntimeExports.jsx(n,{"data-slot":"sidebar-menu-item",className:s.cn(t,"adm:mx-4 adm:flex adm:gap-4 adm:items-center adm:p-4 adm:hover:bg-white/10 adm:rounded-xl adm:transition-all"),...a})}function c(){const e=m.useContext(l);if(!e)throw new Error("useSidebarContext must be used within a Sidebar component");return e}exports.Sidebar=v;exports.SidebarContent=w;exports.SidebarFooter=k;exports.SidebarHeader=N;exports.SidebarInset=C;exports.SidebarMenu=H;exports.SidebarMenuItem=q;exports.SidebarTopBar=O;exports.SidebarTrigger=M;exports.useSidebarContext=c;
6
+ */const E=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],y=j.createLucideIcon("menu",E);function R(e){const t=x.useCallback(i=>{const d=window.matchMedia(e);return d.addEventListener("change",i),()=>{d.removeEventListener("change",i)}},[e]),a=()=>window.matchMedia(e).matches,n=()=>{throw Error("useMediaQuery is a client-only hook")};return x.useSyncExternalStore(t,a,n)}const l=m.createContext({});function v({children:e}){const[t,a]=m.useState(!1),[n,i]=m.useState("auto"),d=R("(min-width: 1280px)");return r.jsxRuntimeExports.jsx(l.Provider,{value:{isXl:d,sidebarHeight:n,setSidebarHeight:i,sheetOpen:t,setSheetOpen:a},children:r.jsxRuntimeExports.jsx("nav",{"data-slot":"sidebar",children:e})})}function w({className:e,children:t,...a}){const{isXl:n,setSidebarHeight:i,sheetOpen:d,setSheetOpen:b}=c();return r.jsxRuntimeExports.jsx(p.Portal,{children:r.jsxRuntimeExports.jsxs("div",{ref:u=>{u&&i(n?"auto":`${u.clientHeight}px`)},"data-slot":"sidebar-content",className:s.cn("adm:fixed adm:bg-sidebar-primary adm:text-sidebar-primary-foreground adm:xl:flex adm:xl:flex-col","adm:left-0 adm:top-0 adm:right-0","adm:xl:left-0 adm:xl:top-0 adm:xl:bottom-0 adm:xl:w-3xs adm:xl:h-auto",e),...a,children:[n&&t,r.jsxRuntimeExports.jsx(o.Sheet,{open:d,onOpenChange:b,children:r.jsxRuntimeExports.jsxs(o.SheetContent,{showCloseButton:!1,className:"adm:bg-sidebar-primary adm:text-sidebar-primary-foreground adm:border-sidebar-primary adm:rounded-none",children:[r.jsxRuntimeExports.jsx(h.VisuallyHidden,{children:r.jsxRuntimeExports.jsxs(o.SheetHeader,{children:[r.jsxRuntimeExports.jsx(o.SheetTitle,{children:"Sidebar"}),r.jsxRuntimeExports.jsx(o.SheetDescription,{children:"Sidebar"})]})}),t]})})]})})}function M({className:e,...t}){const{setSheetOpen:a}=c();return r.jsxRuntimeExports.jsx(f.Button,{"data-slot":"sidebar-trigger",className:s.cn("adm:xl:hidden",e),onClick:()=>a(n=>!n),...t,children:r.jsxRuntimeExports.jsx(y,{})})}function C({className:e,children:t,...a}){return r.jsxRuntimeExports.jsx("div",{"data-slot":"sidebar-inset",className:s.cn(e,"adm:xl:ml-[256px] adm:xl:mt-auto"),...a,children:t})}function O({className:e,children:t,...a}){return r.jsxRuntimeExports.jsx("div",{"data-slot":"sidebar-top-bar",className:s.cn("adm:sticky adm:z-50 adm:top-0 adm:flex adm:gap-2 adm:items-center adm:justify-between adm:bg-background adm:p-4 adm:border-b",e),...a,children:t})}function N({className:e,children:t,...a}){return r.jsxRuntimeExports.jsx("header",{"data-slot":"sidebar-header",className:s.cn(e,"adm:flex adm:flex-col adm:mt-12"),...a,children:t})}function k({className:e,children:t,...a}){return r.jsxRuntimeExports.jsx("footer",{"data-slot":"sidebar-footer",className:s.cn(e,"adm:mt-auto adm:mb-12 adm:flex adm:flex-col"),...a,children:t})}function H({className:e,children:t,...a}){return r.jsxRuntimeExports.jsx("div",{"data-slot":"sidebar-menu",className:s.cn(e,"adm:flex adm:flex-col adm:gap-4 adm:overflow-y-auto adm:my-12 adm:py-1"),...a,children:t})}function q({asChild:e,className:t,...a}){const n=e?S.Slot:"button";return r.jsxRuntimeExports.jsx(n,{"data-slot":"sidebar-menu-item",className:s.cn(t,"adm:mx-4 adm:flex adm:gap-4 adm:items-center adm:p-4 adm:hover:bg-white/10 adm:rounded-xl adm:transition-all"),...a})}function c(){const e=m.useContext(l);if(!e)throw new Error("useSidebarContext must be used within a Sidebar component");return e}exports.Sidebar=v;exports.SidebarContent=w;exports.SidebarFooter=k;exports.SidebarHeader=N;exports.SidebarInset=C;exports.SidebarMenu=H;exports.SidebarMenuItem=q;exports.SidebarTopBar=O;exports.SidebarTrigger=M;exports.useSidebarContext=c;
package/dist/sidebar.js CHANGED
@@ -71,7 +71,7 @@ function _({ className: e, ...a }) {
71
71
  const { setSheetOpen: t } = u();
72
72
  return /* @__PURE__ */ r.jsx(C, { "data-slot": "sidebar-trigger", className: s("adm:xl:hidden", e), onClick: () => t((d) => !d), ...a, children: /* @__PURE__ */ r.jsx(k, {}) });
73
73
  }
74
- function D({ className: e, children: a, ...t }) {
74
+ function z({ className: e, children: a, ...t }) {
75
75
  return /* @__PURE__ */ r.jsx(
76
76
  "div",
77
77
  {
@@ -82,18 +82,18 @@ function D({ className: e, children: a, ...t }) {
82
82
  }
83
83
  );
84
84
  }
85
- function F({ className: e, children: a, ...t }) {
85
+ function D({ className: e, children: a, ...t }) {
86
86
  return /* @__PURE__ */ r.jsx(
87
87
  "div",
88
88
  {
89
89
  "data-slot": "sidebar-top-bar",
90
- className: s("adm:sticky adm:top-0 adm:flex adm:gap-2 adm:items-center adm:justify-between adm:bg-background adm:p-4 adm:border-b", e),
90
+ className: s("adm:sticky adm:z-50 adm:top-0 adm:flex adm:gap-2 adm:items-center adm:justify-between adm:bg-background adm:p-4 adm:border-b", e),
91
91
  ...t,
92
92
  children: a
93
93
  }
94
94
  );
95
95
  }
96
- function $({ className: e, children: a, ...t }) {
96
+ function F({ className: e, children: a, ...t }) {
97
97
  return /* @__PURE__ */ r.jsx(
98
98
  "header",
99
99
  {
@@ -104,7 +104,7 @@ function $({ className: e, children: a, ...t }) {
104
104
  }
105
105
  );
106
106
  }
107
- function z({ className: e, children: a, ...t }) {
107
+ function $({ className: e, children: a, ...t }) {
108
108
  return /* @__PURE__ */ r.jsx(
109
109
  "footer",
110
110
  {
@@ -139,12 +139,12 @@ function u() {
139
139
  export {
140
140
  V as Sidebar,
141
141
  X as SidebarContent,
142
- z as SidebarFooter,
143
- $ as SidebarHeader,
144
- D as SidebarInset,
142
+ $ as SidebarFooter,
143
+ F as SidebarHeader,
144
+ z as SidebarInset,
145
145
  A as SidebarMenu,
146
146
  G as SidebarMenuItem,
147
- F as SidebarTopBar,
147
+ D as SidebarTopBar,
148
148
  _ as SidebarTrigger,
149
149
  u as useSidebarContext
150
150
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamosuiteservices/ui",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",