@gbmtech/aurora-ui 0.3.56 → 0.3.57
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/cjs/components/app-layout/sidebar/index.cjs +1 -1
- package/dist/cjs/components/app-layout/sidebar/index.cjs.map +1 -1
- package/dist/cjs/components/app-layout/sidebar/sidebar-icons.cjs.map +1 -1
- package/dist/cjs/components/app-layout/sidebar/sidebar-icons.d.ts +1 -1
- package/dist/cjs/components/app-layout/sidebar/sidebar-icons.d.ts.map +1 -1
- package/dist/cjs/components/app-layout/sidebar/sidebar.cjs +1 -1
- package/dist/cjs/components/app-layout/sidebar/sidebar.cjs.map +1 -1
- package/dist/cjs/components/app-layout/sidebar/sidebar.d.ts +1 -1
- package/dist/cjs/components/app-layout/sidebar/sidebar.d.ts.map +1 -1
- package/dist/cjs/components/data-table/index.cjs +1 -1
- package/dist/cjs/components/data-table/index.cjs.map +1 -1
- package/dist/cjs/types/module.d.ts +3 -3
- package/dist/cjs/types/module.d.ts.map +1 -1
- package/dist/cjs/types/user.d.ts +0 -2
- package/dist/cjs/types/user.d.ts.map +1 -1
- package/dist/esm/components/app-layout/sidebar/sidebar-icons.d.ts +1 -1
- package/dist/esm/components/app-layout/sidebar/sidebar-icons.d.ts.map +1 -1
- package/dist/esm/components/app-layout/sidebar/sidebar-icons.js.map +1 -1
- package/dist/esm/components/app-layout/sidebar/sidebar.d.ts +1 -1
- package/dist/esm/components/app-layout/sidebar/sidebar.d.ts.map +1 -1
- package/dist/esm/components/app-layout/sidebar/sidebar.js +1 -1
- package/dist/esm/components/app-layout/sidebar/sidebar.js.map +1 -1
- package/dist/esm/components/data-table/index.js +1 -1
- package/dist/esm/components/data-table/index.js.map +1 -1
- package/dist/esm/types/module.d.ts +3 -3
- package/dist/esm/types/module.d.ts.map +1 -1
- package/dist/esm/types/user.d.ts +0 -2
- package/dist/esm/types/user.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"@/components/app-layout/sidebar/app-sidebar":function(e){e.exports=require("./app-sidebar.cjs")},"@/components/app-layout/sidebar/logo":function(e){e.exports=require("./logo.cjs")},"@/components/app-layout/sidebar/nav-modules":function(e){e.exports=require("./nav-modules.cjs")},"
|
|
1
|
+
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"@/components/app-layout/sidebar/app-sidebar":function(e){e.exports=require("./app-sidebar.cjs")},"@/components/app-layout/sidebar/logo":function(e){e.exports=require("./logo.cjs")},"@/components/app-layout/sidebar/nav-modules":function(e){e.exports=require("./nav-modules.cjs")},"./nav-sub-item":function(e){e.exports=require("./nav-sub-item.cjs")},"@/components/app-layout/sidebar/nav-user":function(e){e.exports=require("./nav-user.cjs")},"./sidebar-icons":function(e){e.exports=require("./sidebar-icons.cjs")},"@/components/app-layout/sidebar/sidebar":function(e){e.exports=require("./sidebar.cjs")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=e=>{var _=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(_,{a:_}),_},__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};for(var __webpack_i__ in(()=>{__webpack_require__.r(__webpack_exports__);var e=__webpack_require__("@/components/app-layout/sidebar/sidebar"),_={};for(var r in e)"default"!==r&&(_[r]=(function(_){return e[_]}).bind(0,r));__webpack_require__.d(__webpack_exports__,_);var a=__webpack_require__("@/components/app-layout/sidebar/app-sidebar"),_={};for(var r in a)"default"!==r&&(_[r]=(function(e){return a[e]}).bind(0,r));__webpack_require__.d(__webpack_exports__,_);var o=__webpack_require__("@/components/app-layout/sidebar/nav-modules"),_={};for(var r in o)"default"!==r&&(_[r]=(function(e){return o[e]}).bind(0,r));__webpack_require__.d(__webpack_exports__,_);var p=__webpack_require__("./nav-sub-item"),_={};for(var r in p)"default"!==r&&(_[r]=(function(e){return p[e]}).bind(0,r));__webpack_require__.d(__webpack_exports__,_);var t=__webpack_require__("@/components/app-layout/sidebar/nav-user"),_={};for(var r in t)"default"!==r&&(_[r]=(function(e){return t[e]}).bind(0,r));__webpack_require__.d(__webpack_exports__,_);var n=__webpack_require__("./sidebar-icons"),_={};for(var r in n)"default"!==r&&(_[r]=(function(e){return n[e]}).bind(0,r));__webpack_require__.d(__webpack_exports__,_);var i=__webpack_require__("@/components/app-layout/sidebar/logo"),_={};for(var r in i)"default"!==r&&(_[r]=(function(e){return i[e]}).bind(0,r));__webpack_require__.d(__webpack_exports__,_)})(),__webpack_exports__)exports[__webpack_i__]=__webpack_exports__[__webpack_i__];Object.defineProperty(exports,"__esModule",{value:!0});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/app-layout/sidebar/index.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/compat_get_default_export","webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["__webpack_require__","e","Object","Symbol"],"mappings":"
|
|
1
|
+
{"version":3,"file":"components/app-layout/sidebar/index.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/compat_get_default_export","webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["__webpack_require__","e","Object","Symbol"],"mappings":"glCACAA,oBAAoB,CAAC,CAAG,AAAC,IACxB,IAAI,EAAS,GAAU,EAAO,UAAU,CACvC,IAAO,EAAO,OAAU,CACxB,IAAO,EAER,OADAA,oBAAoB,CAAC,CAAC,EAAQ,CAAE,EAAG,CAAO,GACnC,CACR,ECPAA,oBAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACLD,oBAAoB,CAAC,CAAC,EAAY,IAAQ,CAACA,oBAAoB,CAAC,CAACC,EAAS,IACzEC,OAAO,cAAc,CAACD,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,AAAC,EAGzF,ECNAD,oBAAoB,CAAC,CAAG,CAAC,EAAK,IAAUE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClFF,oBAAoB,CAAC,CAAG,AAACC,IACrB,AAAkB,aAAlB,OAAOE,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAACD,EAASE,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAACD,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/app-layout/sidebar/sidebar-icons.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object","webpack://@gbmtech/aurora-ui/./src/components/app-layout/sidebar/sidebar-icons.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport { iconNames } from 'lucide-react/dynamic'\n\nimport { Rumo } from '@/components/icons/rumo'\nimport { VLI } from '@/components/icons/vli'\nimport { LucideDynamicIcon } from '@/lib/lucide-dynamic-icon'\n\nconst SidebarIcons = ({ icon }: { icon: string }) => {\n const lucideIcon = iconNames.find(name => name === icon)\n\n if(lucideIcon){\n return <LucideDynamicIcon name={lucideIcon} />\n }\n\n const customIcons = {\n Rumo,\n VLI,\n }\n\n const IconCustom = customIcons[icon as keyof typeof customIcons]\n\n if (!IconCustom) {\n return null\n }\n\n return <IconCustom />\n}\n\nexport { SidebarIcons }\n"],"names":["__webpack_require__","e","Object","Symbol","SidebarIcons","icon","lucideIcon","iconNames","name","LucideDynamicIcon","IconCustom","customIcons","Rumo","VLI"],"mappings":";+PAAAA,CAAAA,oBAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACLD,oBAAoB,CAAC,CAAC,EAAY,IAAQ,CAACA,oBAAoB,CAAC,CAACC,EAAS,IACzEC,OAAO,cAAc,CAACD,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,EAGxF,ECNAD,oBAAoB,CAAC,CAAG,CAAC,EAAK,IAAUE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClFF,oBAAoB,CAAC,CAAG,IACpB,oBAAOG,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAACD,EAASE,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAACD,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E,8cCEMG,aAAe,CAAC,CAAEC,KAAAA,CAAI,
|
|
1
|
+
{"version":3,"file":"components/app-layout/sidebar/sidebar-icons.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object","webpack://@gbmtech/aurora-ui/./src/components/app-layout/sidebar/sidebar-icons.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport { iconNames } from 'lucide-react/dynamic'\n\nimport { Rumo } from '@/components/icons/rumo'\nimport { VLI } from '@/components/icons/vli'\nimport { LucideDynamicIcon } from '@/lib/lucide-dynamic-icon'\n\nconst SidebarIcons = ({ icon }: { icon: string | null }) => {\n const lucideIcon = iconNames.find(name => name === icon)\n\n if(lucideIcon){\n return <LucideDynamicIcon name={lucideIcon} />\n }\n\n const customIcons = {\n Rumo,\n VLI,\n }\n\n const IconCustom = customIcons[icon as keyof typeof customIcons]\n\n if (!IconCustom) {\n return null\n }\n\n return <IconCustom />\n}\n\nexport { SidebarIcons }\n"],"names":["__webpack_require__","e","Object","Symbol","SidebarIcons","icon","lucideIcon","iconNames","name","LucideDynamicIcon","IconCustom","customIcons","Rumo","VLI"],"mappings":";+PAAAA,CAAAA,oBAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACLD,oBAAoB,CAAC,CAAC,EAAY,IAAQ,CAACA,oBAAoB,CAAC,CAACC,EAAS,IACzEC,OAAO,cAAc,CAACD,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,EAGxF,ECNAD,oBAAoB,CAAC,CAAG,CAAC,EAAK,IAAUE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClFF,oBAAoB,CAAC,CAAG,IACpB,oBAAOG,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAACD,EAASE,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAACD,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E,8cCEMG,aAAe,CAAC,CAAEC,KAAAA,CAAI,CAA2B,IACrD,IAAMC,EAAaC,wBAAAA,SAAAA,CAAAA,IAAc,CAACC,GAAQA,IAASH,GAEnD,GAAGC,EACD,MAAO,oCAACG,wCAAAA,iBAAiBA,CAAAA,CAAC,KAAMH,C,GAQlC,IAAMI,EAAaC,CAJjBC,KAAIA,yBAAAA,IAAAA,CACJC,IAAGA,wBAAAA,GAAAA,CAGyB,CAACR,EAAiC,QAEhE,EAIO,oCAACK,EAAAA,CAAAA,GAHC,IAIX,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-icons.d.ts","sourceRoot":"","sources":["../../../../../src/components/app-layout/sidebar/sidebar-icons.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,YAAY,GAAI,UAAU;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"sidebar-icons.d.ts","sourceRoot":"","sources":["../../../../../src/components/app-layout/sidebar/sidebar-icons.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,YAAY,GAAI,UAAU;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,mDAmBtD,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,a)=>{for(var t in a)__webpack_require__.o(a,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SidebarFooter:()=>SidebarFooter,SidebarContent:()=>SidebarContent,SidebarMenuSubItem:()=>SidebarMenuSubItem,SidebarTrigger:()=>SidebarTrigger,SidebarMenuAction:()=>SidebarMenuAction,SidebarMenuItem:()=>SidebarMenuItem,SidebarHeader:()=>SidebarHeader,SidebarGroupLabel:()=>SidebarGroupLabel,SidebarRail:()=>SidebarRail,useSidebar:()=>useSidebar,SidebarSeparator:()=>SidebarSeparator,SidebarProvider:()=>SidebarProvider,SidebarMenuSkeleton:()=>SidebarMenuSkeleton,SidebarGroup:()=>SidebarGroup,Sidebar:()=>Sidebar,SidebarMenu:()=>SidebarMenu,SidebarMenuSub:()=>SidebarMenuSub,SidebarMenuButton:()=>SidebarMenuButton});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_react_namespaceObject=require("react"),react_context_namespaceObject=require("@radix-ui/react-context"),react_slot_namespaceObject=require("@radix-ui/react-slot"),external_lucide_react_namespaceObject=require("lucide-react"),external_button_cjs_namespaceObject=require("../../button.cjs"),external_separator_cjs_namespaceObject=require("../../separator.cjs"),index_cjs_namespaceObject=require("../../sheet/index.cjs"),external_skeleton_cjs_namespaceObject=require("../../skeleton.cjs"),external_tooltip_cjs_namespaceObject=require("../../tooltip.cjs"),use_mobile_cjs_namespaceObject=require("../../../hooks/use-mobile.cjs"),external_lib_index_cjs_namespaceObject=require("../../../lib/index.cjs"),SIDEBAR_COOKIE_NAME="gbm_sidebar_open",SIDEBAR_COOKIE_MAX_AGE=604800,SIDEBAR_WIDTH="16rem",SIDEBAR_WIDTH_MOBILE="18rem",SIDEBAR_WIDTH_ICON="4.5rem",SIDEBAR_KEYBOARD_SHORTCUT="b",SIDEBAR_PROVIDER_NAME="SidebarProvider",[SidebarContextProvider,useSidebar]=(0,react_context_namespaceObject.createContext)("SidebarProvider");function SidebarProvider({defaultOpen:e=!0,open:a,onOpenChange:t,className:r,style:i,user:n,modules:s,locale:d="pt-br",children:c,...o}){let b=(0,use_mobile_cjs_namespaceObject.useIsMobile)(),[l,_]=(0,external_react_namespaceObject.useState)(!1),[u,p]=(0,external_react_namespaceObject.useState)(e),m=a??u,x=(0,external_react_namespaceObject.useCallback)(e=>{let a="function"==typeof e?e(m):e;t?t(a):p(a),document.cookie=`gbm_sidebar_open=${a}; path=/; max-age=604800`},[t,m]),j=(0,external_react_namespaceObject.useCallback)(()=>{b?_(e=>!e):x(e=>!e)},[b,x,_]);(0,external_react_namespaceObject.useEffect)(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),j())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[j]);let S=m?"expanded":"collapsed";return(0,jsx_runtime_namespaceObject.jsx)(SidebarContextProvider,{isMobile:b,open:m,openMobile:l,setOpen:x,setOpenMobile:_,state:S,toggleSidebar:j,user:n,modules:s,locale:d,children:(0,jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipProvider,{delayDuration:0,children:(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,external_lib_index_cjs_namespaceObject.cn)("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"4.5rem",...i},...o,children:c})})})}let SIDEBAR_NAME="Sidebar";function Sidebar({side:e="left",variant:a="sidebar",collapsible:t="icon",className:r,children:i,...n}){let{isMobile:s,state:d,openMobile:c,setOpenMobile:o}=useSidebar("Sidebar");return"none"===t?(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...n,children:i}):s?(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.Sheet,{open:c,onOpenChange:o,...n,children:(0,jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.SheetContent,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:e,children:[(0,jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.SheetHeader,{className:"sr-only",children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.SheetTitle,{children:"Sidebar"}),(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.SheetDescription,{children:"Displays the mobile sidebar."})]}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex h-full w-full flex-col",children:i})]})}):(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":"collapsed"===d?t:"","data-variant":a,"data-side":e,"data-slot":"sidebar",children:[(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-gap",className:(0,external_lib_index_cjs_namespaceObject.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===a||"inset"===a?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-container",className:(0,external_lib_index_cjs_namespaceObject.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===a||"inset"===a?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...n,children:(0,jsx_runtime_namespaceObject.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:i})})]})}let SIDEBAR_TRIGGER_NAME="SidebarTrigger";function SidebarTrigger({className:e,onClick:a,...t}){let{toggleSidebar:r}=useSidebar("SidebarTrigger");return(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:(0,external_lib_index_cjs_namespaceObject.cn)("size-7",e),onClick:e=>{a?.(e),r()},...t,children:[(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.PanelLeftIcon,{}),(0,jsx_runtime_namespaceObject.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})}let SIDEBAR_RAIL_NAME="SidebarRail";function SidebarRail({className:e,...a}){let{toggleSidebar:t}=useSidebar("SidebarRail");return(0,jsx_runtime_namespaceObject.jsx)("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:t,title:"Toggle Sidebar",className:(0,external_lib_index_cjs_namespaceObject.cn)("-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...a})}function SidebarHeader({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4",e),...a})}function SidebarFooter({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4",e),...a})}function SidebarSeparator({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)(external_separator_cjs_namespaceObject.Separator,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:(0,external_lib_index_cjs_namespaceObject.cn)("mx-2 w-auto bg-sidebar-border",e),...a})}function SidebarContent({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto group-data-[collapsible=icon]:overflow-hidden",e),...a})}function SidebarGroup({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:(0,external_lib_index_cjs_namespaceObject.cn)("relative flex w-full min-w-0 flex-col px-5 group-data-[collapsible=icon]:p-4",e),...a})}function SidebarGroupLabel({className:e,asChild:a=!1,...t}){let r=a?react_slot_namespaceObject.Slot:"div";return(0,jsx_runtime_namespaceObject.jsx)(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t})}function SidebarMenu({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex w-full min-w-0 flex-col gap-1",e),...a})}function SidebarMenuItem({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:(0,external_lib_index_cjs_namespaceObject.cn)("group/menu-item relative",e),...a})}let sidebarMenuButtonVariants=(0,external_lib_index_cjs_namespaceObject.tv)({base:"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:p-2.5! group-data-[collapsible=icon]:gap-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:[&>svg]:size-5",variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),SIDEBAR_MENU_BUTTON_NAME="SidebarMenuButton";function SidebarMenuButton({asChild:e=!1,isActive:a=!1,variant:t="default",size:r="default",tooltip:i,className:n,...s}){let d=e?react_slot_namespaceObject.Slot:"button",{isMobile:c,state:o}=useSidebar("SidebarMenuButton"),b=(0,jsx_runtime_namespaceObject.jsx)(d,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":a,className:(0,external_lib_index_cjs_namespaceObject.cn)(sidebarMenuButtonVariants({variant:t,size:r}),n),...s});return i?("string"==typeof i&&(i={children:i}),(0,jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger,{asChild:!0,children:b}),(0,jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent,{side:"right",align:"center",hidden:"collapsed"!==o||c,...i})]})):b}function SidebarMenuAction({className:e,asChild:a=!1,showOnHover:t=!1,...r}){let i=a?react_slot_namespaceObject.Slot:"button";return(0,jsx_runtime_namespaceObject.jsx)(i,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:(0,external_lib_index_cjs_namespaceObject.cn)("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:-inset-2 after:absolute md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}function SidebarMenuSkeleton({className:e,showIcon:a=!1,...t}){let r=(0,external_react_namespaceObject.useMemo)(()=>`${Math.floor(40*Math.random())+50}%`,[]);return(0,jsx_runtime_namespaceObject.jsxs)("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex h-8 items-center gap-2 rounded-md px-2",e),...t,children:[a&&(0,jsx_runtime_namespaceObject.jsx)(external_skeleton_cjs_namespaceObject.Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,jsx_runtime_namespaceObject.jsx)(external_skeleton_cjs_namespaceObject.Skeleton,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function SidebarMenuSub({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:(0,external_lib_index_cjs_namespaceObject.cn)("ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l py-0.5 pl-2.5","group-data-[collapsible=icon]:hidden",e),...a})}function SidebarMenuSubItem({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:(0,external_lib_index_cjs_namespaceObject.cn)("group/menu-sub-item relative",e),...a})}for(var __webpack_i__ in exports.Sidebar=__webpack_exports__.Sidebar,exports.SidebarContent=__webpack_exports__.SidebarContent,exports.SidebarFooter=__webpack_exports__.SidebarFooter,exports.SidebarGroup=__webpack_exports__.SidebarGroup,exports.SidebarGroupLabel=__webpack_exports__.SidebarGroupLabel,exports.SidebarHeader=__webpack_exports__.SidebarHeader,exports.SidebarMenu=__webpack_exports__.SidebarMenu,exports.SidebarMenuAction=__webpack_exports__.SidebarMenuAction,exports.SidebarMenuButton=__webpack_exports__.SidebarMenuButton,exports.SidebarMenuItem=__webpack_exports__.SidebarMenuItem,exports.SidebarMenuSkeleton=__webpack_exports__.SidebarMenuSkeleton,exports.SidebarMenuSub=__webpack_exports__.SidebarMenuSub,exports.SidebarMenuSubItem=__webpack_exports__.SidebarMenuSubItem,exports.SidebarProvider=__webpack_exports__.SidebarProvider,exports.SidebarRail=__webpack_exports__.SidebarRail,exports.SidebarSeparator=__webpack_exports__.SidebarSeparator,exports.SidebarTrigger=__webpack_exports__.SidebarTrigger,exports.useSidebar=__webpack_exports__.useSidebar,__webpack_exports__)-1===["Sidebar","SidebarContent","SidebarFooter","SidebarGroup","SidebarGroupLabel","SidebarHeader","SidebarMenu","SidebarMenuAction","SidebarMenuButton","SidebarMenuItem","SidebarMenuSkeleton","SidebarMenuSub","SidebarMenuSubItem","SidebarProvider","SidebarRail","SidebarSeparator","SidebarTrigger","useSidebar"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
2
|
+
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,a)=>{for(var t in a)__webpack_require__.o(a,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},__webpack_require__.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SidebarFooter:()=>SidebarFooter,SidebarContent:()=>SidebarContent,SidebarMenuSubItem:()=>SidebarMenuSubItem,SidebarTrigger:()=>SidebarTrigger,SidebarMenuAction:()=>SidebarMenuAction,SidebarMenuItem:()=>SidebarMenuItem,SidebarHeader:()=>SidebarHeader,SidebarGroupLabel:()=>SidebarGroupLabel,SidebarRail:()=>SidebarRail,useSidebar:()=>useSidebar,SidebarSeparator:()=>SidebarSeparator,SidebarProvider:()=>SidebarProvider,SidebarMenuSkeleton:()=>SidebarMenuSkeleton,SidebarGroup:()=>SidebarGroup,Sidebar:()=>Sidebar,SidebarMenu:()=>SidebarMenu,SidebarMenuSub:()=>SidebarMenuSub,SidebarMenuButton:()=>SidebarMenuButton});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_react_namespaceObject=require("react"),react_context_namespaceObject=require("@radix-ui/react-context"),react_slot_namespaceObject=require("@radix-ui/react-slot"),external_lucide_react_namespaceObject=require("lucide-react"),external_button_cjs_namespaceObject=require("../../button.cjs"),external_separator_cjs_namespaceObject=require("../../separator.cjs"),index_cjs_namespaceObject=require("../../sheet/index.cjs"),external_skeleton_cjs_namespaceObject=require("../../skeleton.cjs"),external_tooltip_cjs_namespaceObject=require("../../tooltip.cjs"),use_mobile_cjs_namespaceObject=require("../../../hooks/use-mobile.cjs"),external_lib_index_cjs_namespaceObject=require("../../../lib/index.cjs"),SIDEBAR_COOKIE_NAME="gbm_sidebar_open",SIDEBAR_COOKIE_MAX_AGE=604800,SIDEBAR_WIDTH="16rem",SIDEBAR_WIDTH_MOBILE="18rem",SIDEBAR_WIDTH_ICON="4.5rem",SIDEBAR_KEYBOARD_SHORTCUT="b",SIDEBAR_PROVIDER_NAME="SidebarProvider",[SidebarContextProvider,useSidebar]=(0,react_context_namespaceObject.createContext)("SidebarProvider");function SidebarProvider({defaultOpen:e=!0,open:a,onOpenChange:t,className:r,style:i,user:n,modules:s,locale:d="pt-br",children:c,...o}){let b=(0,use_mobile_cjs_namespaceObject.useIsMobile)(),[l,_]=(0,external_react_namespaceObject.useState)(!1),[u,p]=(0,external_react_namespaceObject.useState)(e),m=a??u,x=(0,external_react_namespaceObject.useCallback)(e=>{let a="function"==typeof e?e(m):e;t?t(a):p(a),document.cookie=`gbm_sidebar_open=${a}; path=/; max-age=604800`},[t,m]),j=(0,external_react_namespaceObject.useCallback)(()=>{b?_(e=>!e):x(e=>!e)},[b,x,_]);(0,external_react_namespaceObject.useEffect)(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),j())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[j]);let S=m?"expanded":"collapsed";return(0,jsx_runtime_namespaceObject.jsx)(SidebarContextProvider,{isMobile:b,open:m,openMobile:l,setOpen:x,setOpenMobile:_,state:S,toggleSidebar:j,user:n,modules:s,locale:d,children:(0,jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipProvider,{delayDuration:0,children:(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,external_lib_index_cjs_namespaceObject.cn)("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"4.5rem",...i},...o,children:c})})})}let SIDEBAR_NAME="Sidebar";function Sidebar({side:e="left",variant:a="sidebar",collapsible:t="icon",className:r,children:i,...n}){let{isMobile:s,state:d,openMobile:c,setOpenMobile:o}=useSidebar("Sidebar");return"none"===t?(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...n,children:i}):s?(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.Sheet,{open:c,onOpenChange:o,...n,children:(0,jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.SheetContent,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:e,children:[(0,jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.SheetHeader,{className:"sr-only",children:[(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.SheetTitle,{children:"Sidebar"}),(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.SheetDescription,{children:"Displays the mobile sidebar."})]}),(0,jsx_runtime_namespaceObject.jsx)("div",{className:"flex h-full w-full flex-col",children:i})]})}):(0,jsx_runtime_namespaceObject.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":"collapsed"===d?t:"","data-variant":a,"data-side":e,"data-slot":"sidebar",children:[(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-gap",className:(0,external_lib_index_cjs_namespaceObject.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===a||"inset"===a?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-container",className:(0,external_lib_index_cjs_namespaceObject.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===a||"inset"===a?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...n,children:(0,jsx_runtime_namespaceObject.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:i})})]})}let SIDEBAR_TRIGGER_NAME="SidebarTrigger";function SidebarTrigger({className:e,onClick:a,...t}){let{toggleSidebar:r}=useSidebar("SidebarTrigger");return(0,jsx_runtime_namespaceObject.jsxs)(external_button_cjs_namespaceObject.Button,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:(0,external_lib_index_cjs_namespaceObject.cn)("size-7",e),onClick:e=>{a?.(e),r()},...t,children:[(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.PanelLeftIcon,{}),(0,jsx_runtime_namespaceObject.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})}let SIDEBAR_RAIL_NAME="SidebarRail";function SidebarRail({className:e,...a}){let{toggleSidebar:t}=useSidebar("SidebarRail");return(0,jsx_runtime_namespaceObject.jsx)("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:t,title:"Toggle Sidebar",className:(0,external_lib_index_cjs_namespaceObject.cn)("-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...a})}function SidebarHeader({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4",e),...a})}function SidebarFooter({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4",e),...a})}function SidebarSeparator({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)(external_separator_cjs_namespaceObject.Separator,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:(0,external_lib_index_cjs_namespaceObject.cn)("mx-2 w-auto bg-sidebar-border",e),...a})}function SidebarContent({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto group-data-[collapsible=icon]:overflow-hidden",e),...a})}function SidebarGroup({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:(0,external_lib_index_cjs_namespaceObject.cn)("relative flex w-full min-w-0 flex-col px-5 group-data-[collapsible=icon]:p-4",e),...a})}function SidebarGroupLabel({className:e,asChild:a=!1,...t}){let r=a?react_slot_namespaceObject.Slot:"div";return(0,jsx_runtime_namespaceObject.jsx)(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...t})}function SidebarMenu({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex w-full min-w-0 flex-col gap-1",e),...a})}function SidebarMenuItem({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:(0,external_lib_index_cjs_namespaceObject.cn)("group/menu-item relative",e),...a})}let sidebarMenuButtonVariants=(0,external_lib_index_cjs_namespaceObject.tv)({base:"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:p-2.5! group-data-[collapsible=icon]:gap-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:[&>svg]:size-5",variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),SIDEBAR_MENU_BUTTON_NAME="SidebarMenuButton";function SidebarMenuButton({asChild:e=!1,isActive:a=!1,variant:t="default",size:r="default",tooltip:i,className:n,onClick:s,...d}){let c=e?react_slot_namespaceObject.Slot:"button",{isMobile:o,open:b,setOpen:l,state:_}=useSidebar("SidebarMenuButton"),u=(0,jsx_runtime_namespaceObject.jsx)(c,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":a,className:(0,external_lib_index_cjs_namespaceObject.cn)(sidebarMenuButtonVariants({variant:t,size:r}),n),onClick:e=>{s?.(e),b||l(!0)},...d});return i?("string"==typeof i&&(i={children:i}),(0,jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger,{asChild:!0,children:u}),(0,jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent,{side:"right",align:"center",hidden:"collapsed"!==_||o,...i})]})):u}function SidebarMenuAction({className:e,asChild:a=!1,showOnHover:t=!1,...r}){let i=a?react_slot_namespaceObject.Slot:"button";return(0,jsx_runtime_namespaceObject.jsx)(i,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:(0,external_lib_index_cjs_namespaceObject.cn)("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:-inset-2 after:absolute md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}function SidebarMenuSkeleton({className:e,showIcon:a=!1,...t}){let r=(0,external_react_namespaceObject.useMemo)(()=>`${Math.floor(40*Math.random())+50}%`,[]);return(0,jsx_runtime_namespaceObject.jsxs)("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:(0,external_lib_index_cjs_namespaceObject.cn)("flex h-8 items-center gap-2 rounded-md px-2",e),...t,children:[a&&(0,jsx_runtime_namespaceObject.jsx)(external_skeleton_cjs_namespaceObject.Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,jsx_runtime_namespaceObject.jsx)(external_skeleton_cjs_namespaceObject.Skeleton,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function SidebarMenuSub({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:(0,external_lib_index_cjs_namespaceObject.cn)("ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l py-0.5 pl-2.5","group-data-[collapsible=icon]:hidden",e),...a})}function SidebarMenuSubItem({className:e,...a}){return(0,jsx_runtime_namespaceObject.jsx)("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:(0,external_lib_index_cjs_namespaceObject.cn)("group/menu-sub-item relative",e),...a})}for(var __webpack_i__ in exports.Sidebar=__webpack_exports__.Sidebar,exports.SidebarContent=__webpack_exports__.SidebarContent,exports.SidebarFooter=__webpack_exports__.SidebarFooter,exports.SidebarGroup=__webpack_exports__.SidebarGroup,exports.SidebarGroupLabel=__webpack_exports__.SidebarGroupLabel,exports.SidebarHeader=__webpack_exports__.SidebarHeader,exports.SidebarMenu=__webpack_exports__.SidebarMenu,exports.SidebarMenuAction=__webpack_exports__.SidebarMenuAction,exports.SidebarMenuButton=__webpack_exports__.SidebarMenuButton,exports.SidebarMenuItem=__webpack_exports__.SidebarMenuItem,exports.SidebarMenuSkeleton=__webpack_exports__.SidebarMenuSkeleton,exports.SidebarMenuSub=__webpack_exports__.SidebarMenuSub,exports.SidebarMenuSubItem=__webpack_exports__.SidebarMenuSubItem,exports.SidebarProvider=__webpack_exports__.SidebarProvider,exports.SidebarRail=__webpack_exports__.SidebarRail,exports.SidebarSeparator=__webpack_exports__.SidebarSeparator,exports.SidebarTrigger=__webpack_exports__.SidebarTrigger,exports.useSidebar=__webpack_exports__.useSidebar,__webpack_exports__)-1===["Sidebar","SidebarContent","SidebarFooter","SidebarGroup","SidebarGroupLabel","SidebarHeader","SidebarMenu","SidebarMenuAction","SidebarMenuButton","SidebarMenuItem","SidebarMenuSkeleton","SidebarMenuSub","SidebarMenuSubItem","SidebarProvider","SidebarRail","SidebarSeparator","SidebarTrigger","useSidebar"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
3
3
|
//# sourceMappingURL=sidebar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/app-layout/sidebar/sidebar.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object","webpack://@gbmtech/aurora-ui/./src/components/app-layout/sidebar/sidebar.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport {\n CSSProperties,\n ComponentProps,\n JSX,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react'\n\nimport { createContext } from '@radix-ui/react-context'\nimport { Slot } from '@radix-ui/react-slot'\nimport { PanelLeftIcon } from 'lucide-react'\n\nimport { Button } from '@/components/button'\nimport { Separator } from '@/components/separator'\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from '@/components/sheet'\nimport { Skeleton } from '@/components/skeleton'\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/tooltip'\nimport { useIsMobile } from '@/hooks/use-mobile'\nimport { VariantProps, cn, tv } from '@/lib'\nimport { Locale, Module, User } from '@/types'\n\nconst SIDEBAR_COOKIE_NAME = 'gbm_sidebar_open'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '16rem'\nconst SIDEBAR_WIDTH_MOBILE = '18rem'\nconst SIDEBAR_WIDTH_ICON = '4.5rem'\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b'\n\ntype SidebarContextValue = {\n state: 'expanded' | 'collapsed'\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n user: User\n modules: Module[]\n locale: Locale\n}\n\n/* -----------------------------------------------------------------------------\n * Context: SidebarProvider\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_PROVIDER_NAME = 'SidebarProvider'\n\nconst [SidebarContextProvider, useSidebar] = createContext<SidebarContextValue>(\n SIDEBAR_PROVIDER_NAME\n)\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarProvider\n * -------------------------------------------------------------------------- */\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n user,\n modules,\n locale = 'pt-br',\n children,\n ...props\n}: ComponentProps<'div'> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n user: User\n modules: Module[]\n locale?: Locale\n}): JSX.Element {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [isOpen, setIsOpen] = useState(defaultOpen)\n const open = openProp ?? isOpen\n const setOpen = useCallback(\n (value: ((value: boolean) => boolean) | boolean) => {\n const openState = typeof value === 'function' ? value(open) : value\n\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n setIsOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(() => {\n if (isMobile) {\n setOpenMobile(currentValue => !currentValue)\n } else {\n setOpen(currentValue => !currentValue)\n }\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n useEffect(() => {\n const handleKeyDown: (event: KeyboardEvent) => void = (\n event: KeyboardEvent\n ) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener('keydown', handleKeyDown)\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown)\n }\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed'\n\n return (\n <SidebarContextProvider\n isMobile={isMobile}\n open={open}\n openMobile={openMobile}\n setOpen={setOpen}\n setOpenMobile={setOpenMobile}\n state={state}\n toggleSidebar={toggleSidebar}\n user={user}\n modules={modules}\n locale={locale}\n >\n <TooltipProvider delayDuration={0}>\n <div\n className={cn(\n 'group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar',\n className\n )}\n data-slot=\"sidebar-wrapper\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContextProvider>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: Sidebar\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_NAME = 'Sidebar'\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'icon',\n className,\n children,\n ...props\n}: ComponentProps<'div'> & {\n side?: 'left' | 'right'\n variant?: 'sidebar' | 'floating' | 'inset'\n collapsible?: 'offcanvas' | 'icon' | 'none'\n}) {\n const { isMobile, state, openMobile, setOpenMobile } =\n useSidebar(SIDEBAR_NAME)\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n 'flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground',\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarTrigger\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_TRIGGER_NAME = 'SidebarTrigger'\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar(SIDEBAR_TRIGGER_NAME)\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('size-7', className)}\n onClick={event => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarRail\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_RAIL_NAME = 'SidebarRail'\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar(SIDEBAR_RAIL_NAME)\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n '-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarHeader\n * -------------------------------------------------------------------------- */\n\nfunction SidebarHeader({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\n 'flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarFooter\n * -------------------------------------------------------------------------- */\n\nfunction SidebarFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\n 'flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarSeparator\n * -------------------------------------------------------------------------- */\n\nfunction SidebarSeparator({\n className,\n ...props\n}: ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn('mx-2 w-auto bg-sidebar-border', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarContent\n * -------------------------------------------------------------------------- */\n\nfunction SidebarContent({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroup\n * -------------------------------------------------------------------------- */\n\nfunction SidebarGroup({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\n 'relative flex w-full min-w-0 flex-col px-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroupLabel\n * -------------------------------------------------------------------------- */\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: ComponentProps<'div'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n data-slot=\"sidebar-group-label\"\n data-sidebar=\"group-label\"\n className={cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenu\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenu({ className, ...props }: ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuItem\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuItem({ className, ...props }: ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuButton\n * -------------------------------------------------------------------------- */\n\nconst sidebarMenuButtonVariants = tv({\n base: 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:p-2.5! group-data-[collapsible=icon]:gap-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:[&>svg]:size-5',\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',\n },\n size: {\n default: 'text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n})\n\nconst SIDEBAR_MENU_BUTTON_NAME = 'SidebarMenuButton'\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n}: ComponentProps<'button'> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | ComponentProps<typeof TooltipContent>\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot : 'button'\n const { isMobile, state } = useSidebar(SIDEBAR_MENU_BUTTON_NAME)\n\n const button = (\n <Comp\n data-slot=\"sidebar-menu-button\"\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed' || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuAction\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: ComponentProps<'button'> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot=\"sidebar-menu-action\"\n data-sidebar=\"menu-action\"\n className={cn(\n 'absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:-inset-2 after:absolute md:after:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSkeleton\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: ComponentProps<'div'> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const width = useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as CSSProperties\n }\n />\n </div>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSub\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSub({ className, ...props }: ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l py-0.5 pl-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSubItem\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSubItem({ className, ...props }: ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarSeparator,\n SidebarTrigger,\n SidebarRail,\n useSidebar,\n}\n"],"names":["__webpack_require__","e","Object","Symbol","SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SIDEBAR_PROVIDER_NAME","SidebarContextProvider","useSidebar","createContext","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","user","modules","locale","children","props","isMobile","useIsMobile","openMobile","setOpenMobile","useState","isOpen","setIsOpen","open","setOpen","useCallback","value","openState","document","toggleSidebar","currentValue","useEffect","handleKeyDown","event","window","state","TooltipProvider","cn","SIDEBAR_NAME","Sidebar","side","variant","collapsible","Sheet","SheetContent","SheetHeader","SheetTitle","SheetDescription","SIDEBAR_TRIGGER_NAME","SidebarTrigger","onClick","Button","PanelLeftIcon","SIDEBAR_RAIL_NAME","SidebarRail","SidebarHeader","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","asChild","Comp","Slot","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","tv","SIDEBAR_MENU_BUTTON_NAME","SidebarMenuButton","isActive","size","tooltip","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuSkeleton","showIcon","width","useMemo","Math","Skeleton","SidebarMenuSub","SidebarMenuSubItem"],"mappings":";+PAAAA,CAAAA,oBAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACLD,oBAAoB,CAAC,CAAC,EAA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,UAERkE,GACC,oCAACI,sCAAAA,QAAQA,CAAAA,CACP,UAAU,oBACV,eAAa,oB,GAGjB,oCAACA,sCAAAA,QAAQA,CAAAA,CACP,UAAU,sCACV,eAAa,qBACb,MACE,CACE,mBAAoBH,CACtB,C,KAKV,CAMA,SAASI,eAAe,CAAE7E,UAAAA,CAAS,CAAE,GAAGM,EAA6B,EACnE,MACE,oCAAC,MACC,YAAU,mBACV,eAAa,WACb,UAAWsB,GAAAA,uCAAAA,EAAAA,EACT,iGACA,uCACA5B,GAED,GAAGM,CAAK,EAGf,CAMA,SAASwE,mBAAmB,CAAE9E,UAAAA,CAAS,CAAE,GAAGM,EAA6B,EACvE,MACE,oCAAC,MACC,YAAU,wBACV,eAAa,gBACb,UAAWsB,GAAAA,uCAAAA,EAAAA,EAAG,+BAAgC5B,GAC7C,GAAGM,CAAK,EAGf,C"}
|
|
1
|
+
{"version":3,"file":"components/app-layout/sidebar/sidebar.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object","webpack://@gbmtech/aurora-ui/./src/components/app-layout/sidebar/sidebar.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\n\nimport {\n CSSProperties,\n ComponentProps,\n JSX,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react'\n\nimport { createContext } from '@radix-ui/react-context'\nimport { Slot } from '@radix-ui/react-slot'\nimport { PanelLeftIcon } from 'lucide-react'\n\nimport { Button } from '@/components/button'\nimport { Separator } from '@/components/separator'\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from '@/components/sheet'\nimport { Skeleton } from '@/components/skeleton'\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/tooltip'\nimport { useIsMobile } from '@/hooks/use-mobile'\nimport { VariantProps, cn, tv } from '@/lib'\nimport { Locale, Module, User } from '@/types'\n\nconst SIDEBAR_COOKIE_NAME = 'gbm_sidebar_open'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '16rem'\nconst SIDEBAR_WIDTH_MOBILE = '18rem'\nconst SIDEBAR_WIDTH_ICON = '4.5rem'\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b'\n\ntype SidebarContextValue = {\n state: 'expanded' | 'collapsed'\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n user: User\n modules: Module[]\n locale: Locale\n}\n\n/* -----------------------------------------------------------------------------\n * Context: SidebarProvider\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_PROVIDER_NAME = 'SidebarProvider'\n\nconst [SidebarContextProvider, useSidebar] = createContext<SidebarContextValue>(\n SIDEBAR_PROVIDER_NAME\n)\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarProvider\n * -------------------------------------------------------------------------- */\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n user,\n modules,\n locale = 'pt-br',\n children,\n ...props\n}: ComponentProps<'div'> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n user: User\n modules: Module[]\n locale?: Locale\n}): JSX.Element {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [isOpen, setIsOpen] = useState(defaultOpen)\n const open = openProp ?? isOpen\n const setOpen = useCallback(\n (value: ((value: boolean) => boolean) | boolean) => {\n const openState = typeof value === 'function' ? value(open) : value\n\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n setIsOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(() => {\n if (isMobile) {\n setOpenMobile(currentValue => !currentValue)\n } else {\n setOpen(currentValue => !currentValue)\n }\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n useEffect(() => {\n const handleKeyDown: (event: KeyboardEvent) => void = (\n event: KeyboardEvent\n ) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener('keydown', handleKeyDown)\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown)\n }\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed'\n\n return (\n <SidebarContextProvider\n isMobile={isMobile}\n open={open}\n openMobile={openMobile}\n setOpen={setOpen}\n setOpenMobile={setOpenMobile}\n state={state}\n toggleSidebar={toggleSidebar}\n user={user}\n modules={modules}\n locale={locale}\n >\n <TooltipProvider delayDuration={0}>\n <div\n className={cn(\n 'group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar',\n className\n )}\n data-slot=\"sidebar-wrapper\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContextProvider>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: Sidebar\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_NAME = 'Sidebar'\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'icon',\n className,\n children,\n ...props\n}: ComponentProps<'div'> & {\n side?: 'left' | 'right'\n variant?: 'sidebar' | 'floating' | 'inset'\n collapsible?: 'offcanvas' | 'icon' | 'none'\n}) {\n const { isMobile, state, openMobile, setOpenMobile } =\n useSidebar(SIDEBAR_NAME)\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n 'flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground',\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarTrigger\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_TRIGGER_NAME = 'SidebarTrigger'\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar(SIDEBAR_TRIGGER_NAME)\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('size-7', className)}\n onClick={event => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarRail\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_RAIL_NAME = 'SidebarRail'\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar(SIDEBAR_RAIL_NAME)\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n '-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarHeader\n * -------------------------------------------------------------------------- */\n\nfunction SidebarHeader({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\n 'flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarFooter\n * -------------------------------------------------------------------------- */\n\nfunction SidebarFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\n 'flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarSeparator\n * -------------------------------------------------------------------------- */\n\nfunction SidebarSeparator({\n className,\n ...props\n}: ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn('mx-2 w-auto bg-sidebar-border', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarContent\n * -------------------------------------------------------------------------- */\n\nfunction SidebarContent({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroup\n * -------------------------------------------------------------------------- */\n\nfunction SidebarGroup({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\n 'relative flex w-full min-w-0 flex-col px-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroupLabel\n * -------------------------------------------------------------------------- */\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: ComponentProps<'div'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n data-slot=\"sidebar-group-label\"\n data-sidebar=\"group-label\"\n className={cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenu\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenu({ className, ...props }: ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuItem\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuItem({ className, ...props }: ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuButton\n * -------------------------------------------------------------------------- */\n\nconst sidebarMenuButtonVariants = tv({\n base: 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:p-2.5! group-data-[collapsible=icon]:gap-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:[&>svg]:size-5',\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',\n },\n size: {\n default: 'text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n})\n\nconst SIDEBAR_MENU_BUTTON_NAME = 'SidebarMenuButton'\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n onClick,\n ...props\n}: ComponentProps<'button'> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | ComponentProps<typeof TooltipContent>\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot : 'button'\n const { isMobile, open, setOpen, state } = useSidebar(SIDEBAR_MENU_BUTTON_NAME)\n\n const button = (\n <Comp\n data-slot=\"sidebar-menu-button\"\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n onClick={event => {\n onClick?.(event)\n\n if(!open) {\n setOpen(true)\n }\n }}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed' || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuAction\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: ComponentProps<'button'> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot=\"sidebar-menu-action\"\n data-sidebar=\"menu-action\"\n className={cn(\n 'absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:-inset-2 after:absolute md:after:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSkeleton\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: ComponentProps<'div'> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const width = useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as CSSProperties\n }\n />\n </div>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSub\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSub({ className, ...props }: ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l py-0.5 pl-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSubItem\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSubItem({ className, ...props }: ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarSeparator,\n SidebarTrigger,\n SidebarRail,\n useSidebar,\n}\n"],"names":["__webpack_require__","e","Object","Symbol","SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SIDEBAR_PROVIDER_NAME","SidebarContextProvider","useSidebar","createContext","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","user","modules","locale","children","props","isMobile","useIsMobile","openMobile","setOpenMobile","useState","isOpen","setIsOpen","open","setOpen","useCallback","value","openState","document","toggleSidebar","currentValue","useEffect","handleKeyDown","event","window","state","TooltipProvider","cn","SIDEBAR_NAME","Sidebar","side","variant","collapsible","Sheet","SheetContent","SheetHeader","SheetTitle","SheetDescription","SIDEBAR_TRIGGER_NAME","SidebarTrigger","onClick","Button","PanelLeftIcon","SIDEBAR_RAIL_NAME","SidebarRail","SidebarHeader","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","asChild","Comp","Slot","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","tv","SIDEBAR_MENU_BUTTON_NAME","SidebarMenuButton","isActive","size","tooltip","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuSkeleton","showIcon","width","useMemo","Math","Skeleton","SidebarMenuSub","SidebarMenuSubItem"],"mappings":";+PAAAA,CAAAA,oBAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACLD,oBAAoB,CAAC,CAAC,EAAY,IAAQ,CAACA,oBAAoB,CAAC,CAACC,EAAS,IACzEC,OAAO,cAAc,CAACD,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,EAGxF,ECNAD,oBAAoB,CAAC,CAAG,CAAC,EAAK,IAAUE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClFF,oBAAoB,CAAC,CAAG,IACpB,oBAAOG,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAACD,EAASE,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAACD,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E,w9CC8BMG,oBAAsB,mBACtBC,uBAAyB,OACzBC,cAAgB,QAChBC,qBAAuB,QACvBC,mBAAqB,SACrBC,0BAA4B,IAmB5BC,sBAAwB,kBAExB,CAACC,uBAAwBC,WAAW,CAAGC,GAAAA,8BAAAA,aAAAA,EAFf,mBAU9B,SAASC,gBAAgB,CACvBC,YAAAA,EAAc,EAAI,CAClB,KAAMC,CAAQ,CACd,aAAcC,CAAW,CACzBC,UAAAA,CAAS,CACTC,MAAAA,CAAK,CACLC,KAAAA,CAAI,CACJC,QAAAA,CAAO,CACPC,OAAAA,EAAS,OAAO,CAChBC,SAAAA,CAAQ,CACR,GAAGC,EAQJ,EACC,IAAMC,EAAWC,GAAAA,+BAAAA,WAAAA,IACX,CAACC,EAAYC,EAAc,CAAGC,GAAAA,+BAAAA,QAAAA,EAAS,IAIvC,CAACC,EAAQC,EAAU,CAAGF,GAAAA,+BAAAA,QAAAA,EAASd,GAC/BiB,EAAOhB,GAAYc,EACnBG,EAAUC,GAAA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ACTwE,SAAAA,EAAW,EAAK,CAChB,GAAGlE,EAGJ,EAEC,IAAMmE,EAAQC,GAAAA,+BAAAA,OAAAA,EAAQ,IACb,CAAC,EAAEC,KAAK,KAAK,CAACA,GAAAA,KAAK,MAAM,IAAW,GAAG,CAAC,CAAC,CAC/C,EAAE,EAEL,MACE,qCAAC,OACC,YAAU,wBACV,eAAa,gBACb,UAAW/C,GAAAA,uCAAAA,EAAAA,EAAG,8CAA+C5B,GAC5D,GAAGM,CAAK,C,UAERkE,GACC,oCAACI,sCAAAA,QAAQA,CAAAA,CACP,UAAU,oBACV,eAAa,oB,GAGjB,oCAACA,sCAAAA,QAAQA,CAAAA,CACP,UAAU,sCACV,eAAa,qBACb,MACE,CACE,mBAAoBH,CACtB,C,KAKV,CAMA,SAASI,eAAe,CAAE7E,UAAAA,CAAS,CAAE,GAAGM,EAA6B,EACnE,MACE,oCAAC,MACC,YAAU,mBACV,eAAa,WACb,UAAWsB,GAAAA,uCAAAA,EAAAA,EACT,iGACA,uCACA5B,GAED,GAAGM,CAAK,EAGf,CAMA,SAASwE,mBAAmB,CAAE9E,UAAAA,CAAS,CAAE,GAAGM,EAA6B,EACvE,MACE,oCAAC,MACC,YAAU,wBACV,eAAa,gBACb,UAAWsB,GAAAA,uCAAAA,EAAAA,EAAG,+BAAgC5B,GAC7C,GAAGM,CAAK,EAGf,C"}
|
|
@@ -73,7 +73,7 @@ declare const sidebarMenuButtonVariants: import("tailwind-variants").TVReturnTyp
|
|
|
73
73
|
lg: string;
|
|
74
74
|
};
|
|
75
75
|
}, undefined, "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:p-2.5! group-data-[collapsible=icon]:gap-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:[&>svg]:size-5", unknown, unknown, undefined>>;
|
|
76
|
-
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: ComponentProps<'button'> & {
|
|
76
|
+
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, onClick, ...props }: ComponentProps<'button'> & {
|
|
77
77
|
asChild?: boolean;
|
|
78
78
|
isActive?: boolean;
|
|
79
79
|
tooltip?: string | ComponentProps<typeof TooltipContent>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../../src/components/app-layout/sidebar/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,cAAc,EACd,GAAG,EAKJ,MAAM,OAAO,CAAA;AAMd,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AASlD,OAAO,EAEL,cAAc,EAGf,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,YAAY,EAAU,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAS9C,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,UAAU,GAAG,WAAW,CAAA;IAC/B,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAChC,UAAU,EAAE,OAAO,CAAA;IACnB,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IAC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O,CAAA;CACnB,2CA8BA;AAMD,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,2CAapE;AAMD,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,2CASxE;AAMD,OAAO,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,UAAU,GACX,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./data-table-action-bar":function(e){e.exports=require("./data-table-action-bar.cjs")},"./data-table-advanced-toolbar":function(e){e.exports=require("./data-table-advanced-toolbar.cjs")},"./data-table-column-header":function(e){e.exports=require("./data-table-column-header.cjs")},"
|
|
1
|
+
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_modules__={"./data-table-action-bar":function(e){e.exports=require("./data-table-action-bar.cjs")},"./data-table-advanced-toolbar":function(e){e.exports=require("./data-table-advanced-toolbar.cjs")},"./data-table-column-header":function(e){e.exports=require("./data-table-column-header.cjs")},"@/components/data-table/data-table-date-filter":function(e){e.exports=require("./data-table-date-filter.cjs")},"@/components/data-table/data-table-faceted-filter":function(e){e.exports=require("./data-table-faceted-filter.cjs")},"./data-table-filter-list":function(e){e.exports=require("./data-table-filter-list.cjs")},"./data-table-filter-menu":function(e){e.exports=require("./data-table-filter-menu.cjs")},"./data-table-pagination":function(e){e.exports=require("./data-table-pagination.cjs")},"@/components/data-table/data-table-range-filter":function(e){e.exports=require("./data-table-range-filter.cjs")},"./data-table-skeleton":function(e){e.exports=require("./data-table-skeleton.cjs")},"@/components/data-table/data-table-slider-filter":function(e){e.exports=require("./data-table-slider-filter.cjs")},"./data-table-sort-list":function(e){e.exports=require("./data-table-sort-list.cjs")},"./data-table-toolbar":function(e){e.exports=require("./data-table-toolbar.cjs")},"@/components/data-table/data-table-view-options":function(e){e.exports=require("./data-table-view-options.cjs")},"./data-table":function(e){e.exports=require("./data-table.cjs")}},__webpack_module_cache__={};function __webpack_require__(e){var _=__webpack_module_cache__[e];if(void 0!==_)return _.exports;var a=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](a,a.exports,__webpack_require__),a.exports}__webpack_require__.n=e=>{var _=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(_,{a:_}),_},__webpack_require__.d=(e,_)=>{for(var a in _)__webpack_require__.o(_,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:_[a]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};for(var __webpack_i__ in(()=>{__webpack_require__.r(__webpack_exports__);var e=__webpack_require__("./data-table-action-bar"),_={};for(var a in e)"default"!==a&&(_[a]=(function(_){return e[_]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var r=__webpack_require__("./data-table-advanced-toolbar"),_={};for(var a in r)"default"!==a&&(_[a]=(function(e){return r[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var t=__webpack_require__("./data-table-column-header"),_={};for(var a in t)"default"!==a&&(_[a]=(function(e){return t[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var i=__webpack_require__("@/components/data-table/data-table-date-filter"),_={};for(var a in i)"default"!==a&&(_[a]=(function(e){return i[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var n=__webpack_require__("@/components/data-table/data-table-faceted-filter"),_={};for(var a in n)"default"!==a&&(_[a]=(function(e){return n[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var o=__webpack_require__("./data-table-filter-list"),_={};for(var a in o)"default"!==a&&(_[a]=(function(e){return o[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var c=__webpack_require__("./data-table-filter-menu"),_={};for(var a in c)"default"!==a&&(_[a]=(function(e){return c[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var b=__webpack_require__("./data-table-pagination"),_={};for(var a in b)"default"!==a&&(_[a]=(function(e){return b[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var u=__webpack_require__("@/components/data-table/data-table-range-filter"),_={};for(var a in u)"default"!==a&&(_[a]=(function(e){return u[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var d=__webpack_require__("./data-table-skeleton"),_={};for(var a in d)"default"!==a&&(_[a]=(function(e){return d[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var p=__webpack_require__("@/components/data-table/data-table-slider-filter"),_={};for(var a in p)"default"!==a&&(_[a]=(function(e){return p[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var l=__webpack_require__("./data-table-sort-list"),_={};for(var a in l)"default"!==a&&(_[a]=(function(e){return l[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var f=__webpack_require__("./data-table-toolbar"),_={};for(var a in f)"default"!==a&&(_[a]=(function(e){return f[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var s=__webpack_require__("@/components/data-table/data-table-view-options"),_={};for(var a in s)"default"!==a&&(_[a]=(function(e){return s[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_);var w=__webpack_require__("./data-table"),_={};for(var a in w)"default"!==a&&(_[a]=(function(e){return w[e]}).bind(0,a));__webpack_require__.d(__webpack_exports__,_)})(),__webpack_exports__)exports[__webpack_i__]=__webpack_exports__[__webpack_i__];Object.defineProperty(exports,"__esModule",{value:!0});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/data-table/index.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/compat_get_default_export","webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["__webpack_require__","e","Object","Symbol"],"mappings":"
|
|
1
|
+
{"version":3,"file":"components/data-table/index.cjs","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/compat_get_default_export","webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object"],"sourcesContent":["// getDefaultExport function for compatibility with non-ESM modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};\n","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["__webpack_require__","e","Object","Symbol"],"mappings":"s5DACAA,oBAAoB,CAAC,CAAG,AAAC,IACxB,IAAI,EAAS,GAAU,EAAO,UAAU,CACvC,IAAO,EAAO,OAAU,CACxB,IAAO,EAER,OADAA,oBAAoB,CAAC,CAAC,EAAQ,CAAE,EAAG,CAAO,GACnC,CACR,ECPAA,oBAAoB,CAAC,CAAG,CAACC,EAAS,KACjC,IAAI,IAAI,KAAO,EACLD,oBAAoB,CAAC,CAAC,EAAY,IAAQ,CAACA,oBAAoB,CAAC,CAACC,EAAS,IACzEC,OAAO,cAAc,CAACD,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,AAAC,EAGzF,ECNAD,oBAAoB,CAAC,CAAG,CAAC,EAAK,IAAUE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClFF,oBAAoB,CAAC,CAAG,AAACC,IACrB,AAAkB,aAAlB,OAAOE,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAACD,EAASE,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAACD,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export interface Module {
|
|
2
2
|
id: number;
|
|
3
3
|
name: string;
|
|
4
|
-
icon: string;
|
|
5
|
-
order: number;
|
|
4
|
+
icon: string | null;
|
|
5
|
+
order: number | null;
|
|
6
6
|
read: boolean;
|
|
7
7
|
create: boolean;
|
|
8
8
|
edit: boolean;
|
|
9
9
|
delete: boolean;
|
|
10
10
|
path: string;
|
|
11
|
-
submodules
|
|
11
|
+
submodules?: Module[];
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/types/module.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/types/module.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB"}
|
package/dist/cjs/types/user.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/types/user.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/types/user.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,OAAO,CAAA;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-icons.d.ts","sourceRoot":"","sources":["../../../../../src/components/app-layout/sidebar/sidebar-icons.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,YAAY,GAAI,UAAU;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"sidebar-icons.d.ts","sourceRoot":"","sources":["../../../../../src/components/app-layout/sidebar/sidebar-icons.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,YAAY,GAAI,UAAU;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,mDAmBtD,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/app-layout/sidebar/sidebar-icons.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/app-layout/sidebar/sidebar-icons.tsx"],"sourcesContent":["\n\nimport { iconNames } from 'lucide-react/dynamic'\n\nimport { Rumo } from '@/components/icons/rumo'\nimport { VLI } from '@/components/icons/vli'\nimport { LucideDynamicIcon } from '@/lib/lucide-dynamic-icon'\n\nconst SidebarIcons = ({ icon }: { icon: string }) => {\n const lucideIcon = iconNames.find(name => name === icon)\n\n if(lucideIcon){\n return <LucideDynamicIcon name={lucideIcon} />\n }\n\n const customIcons = {\n Rumo,\n VLI,\n }\n\n const IconCustom = customIcons[icon as keyof typeof customIcons]\n\n if (!IconCustom) {\n return null\n }\n\n return <IconCustom />\n}\n\nexport { SidebarIcons }\n"],"names":["SidebarIcons","icon","lucideIcon","iconNames","name","LucideDynamicIcon","IconCustom","customIcons","Rumo","VLI"],"mappings":";4MAQA,IAAMA,EAAe,CAAC,CAAEC,KAAAA,CAAI,
|
|
1
|
+
{"version":3,"file":"components/app-layout/sidebar/sidebar-icons.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/app-layout/sidebar/sidebar-icons.tsx"],"sourcesContent":["\n\nimport { iconNames } from 'lucide-react/dynamic'\n\nimport { Rumo } from '@/components/icons/rumo'\nimport { VLI } from '@/components/icons/vli'\nimport { LucideDynamicIcon } from '@/lib/lucide-dynamic-icon'\n\nconst SidebarIcons = ({ icon }: { icon: string | null }) => {\n const lucideIcon = iconNames.find(name => name === icon)\n\n if(lucideIcon){\n return <LucideDynamicIcon name={lucideIcon} />\n }\n\n const customIcons = {\n Rumo,\n VLI,\n }\n\n const IconCustom = customIcons[icon as keyof typeof customIcons]\n\n if (!IconCustom) {\n return null\n }\n\n return <IconCustom />\n}\n\nexport { SidebarIcons }\n"],"names":["SidebarIcons","icon","lucideIcon","iconNames","name","LucideDynamicIcon","IconCustom","customIcons","Rumo","VLI"],"mappings":";4MAQA,IAAMA,EAAe,CAAC,CAAEC,KAAAA,CAAI,CAA2B,IACrD,IAAMC,EAAaC,EAAAA,SAAAA,CAAAA,IAAc,CAACC,GAAQA,IAASH,GAEnD,GAAGC,EACD,MAAO,UAACG,EAAAA,iBAAiBA,CAAAA,CAAC,KAAMH,C,GAQlC,IAAMI,EAAaC,CAJjBC,KAAIA,EAAAA,IAAAA,CACJC,IAAGA,EAAAA,GAAAA,CAGyB,CAACR,EAAiC,QAEhE,EAIO,UAACK,EAAAA,CAAAA,GAHC,IAIX,S"}
|
|
@@ -73,7 +73,7 @@ declare const sidebarMenuButtonVariants: import("tailwind-variants").TVReturnTyp
|
|
|
73
73
|
lg: string;
|
|
74
74
|
};
|
|
75
75
|
}, undefined, "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:p-2.5! group-data-[collapsible=icon]:gap-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:[&>svg]:size-5", unknown, unknown, undefined>>;
|
|
76
|
-
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: ComponentProps<'button'> & {
|
|
76
|
+
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, onClick, ...props }: ComponentProps<'button'> & {
|
|
77
77
|
asChild?: boolean;
|
|
78
78
|
isActive?: boolean;
|
|
79
79
|
tooltip?: string | ComponentProps<typeof TooltipContent>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../../src/components/app-layout/sidebar/sidebar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,cAAc,EACd,GAAG,EAKJ,MAAM,OAAO,CAAA;AAMd,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AASlD,OAAO,EAEL,cAAc,EAGf,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,YAAY,EAAU,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,MAAM,EAA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,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,2CAsBA;AAMD,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,QAAgB,EAChB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,2CA8BA;AAMD,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,2CAapE;AAMD,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,2CASxE;AAMD,OAAO,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,UAAU,GACX,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import*as e from"react/jsx-runtime";import*as a from"react";import*as t from"@radix-ui/react-context";import*as r from"@radix-ui/react-slot";import*as i from"lucide-react";import*as s from"../../button.js";import*as d from"../../separator.js";import*as o from"../../sheet/index.js";import*as n from"../../skeleton.js";import*as l from"../../tooltip.js";import*as c from"../../../hooks/use-mobile.js";import*as u from"../../../lib/index.js";let[b,p]=(0,t.createContext)("SidebarProvider");function f({defaultOpen:t=!0,open:r,onOpenChange:i,className:s,style:d,user:o,modules:n,locale:p="pt-br",children:f,...g}){let m=(0,c.useIsMobile)(),[h,x]=(0,a.useState)(!1),[v,w]=(0,a.useState)(t),j=r??v,S=(0,a.useCallback)(e=>{let a="function"==typeof e?e(j):e;i?i(a):w(a),document.cookie=`gbm_sidebar_open=${a}; path=/; max-age=604800`},[i,j]),y=(0,a.useCallback)(()=>{m?x(e=>!e):S(e=>!e)},[m,S,x]);(0,a.useEffect)(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[y]);let N=j?"expanded":"collapsed";return(0,e.jsx)(b,{isMobile:m,open:j,openMobile:h,setOpen:S,setOpenMobile:x,state:N,toggleSidebar:y,user:o,modules:n,locale:p,children:(0,e.jsx)(l.TooltipProvider,{delayDuration:0,children:(0,e.jsx)("div",{className:(0,u.cn)("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"4.5rem",...d},...g,children:f})})})}function g({side:a="left",variant:t="sidebar",collapsible:r="icon",className:i,children:s,...d}){let{isMobile:n,state:l,openMobile:c,setOpenMobile:b}=p("Sidebar");return"none"===r?(0,e.jsx)("div",{"data-slot":"sidebar",className:(0,u.cn)("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),...d,children:s}):n?(0,e.jsx)(o.Sheet,{open:c,onOpenChange:b,...d,children:(0,e.jsxs)(o.SheetContent,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:a,children:[(0,e.jsxs)(o.SheetHeader,{className:"sr-only",children:[(0,e.jsx)(o.SheetTitle,{children:"Sidebar"}),(0,e.jsx)(o.SheetDescription,{children:"Displays the mobile sidebar."})]}),(0,e.jsx)("div",{className:"flex h-full w-full flex-col",children:s})]})}):(0,e.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":"collapsed"===l?r:"","data-variant":t,"data-side":a,"data-slot":"sidebar",children:[(0,e.jsx)("div",{"data-slot":"sidebar-gap",className:(0,u.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,e.jsx)("div",{"data-slot":"sidebar-container",className:(0,u.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex","left"===a?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...d,children:(0,e.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:s})})]})}function m({className:a,onClick:t,...r}){let{toggleSidebar:d}=p("SidebarTrigger");return(0,e.jsxs)(s.Button,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:(0,u.cn)("size-7",a),onClick:e=>{t?.(e),d()},...r,children:[(0,e.jsx)(i.PanelLeftIcon,{}),(0,e.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function h({className:a,...t}){let{toggleSidebar:r}=p("SidebarRail");return(0,e.jsx)("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:(0,u.cn)("-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...t})}function x({className:a,...t}){return(0,e.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:(0,u.cn)("flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4",a),...t})}function v({className:a,...t}){return(0,e.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:(0,u.cn)("flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4",a),...t})}function w({className:a,...t}){return(0,e.jsx)(d.Separator,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:(0,u.cn)("mx-2 w-auto bg-sidebar-border",a),...t})}function j({className:a,...t}){return(0,e.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:(0,u.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto group-data-[collapsible=icon]:overflow-hidden",a),...t})}function S({className:a,...t}){return(0,e.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:(0,u.cn)("relative flex w-full min-w-0 flex-col px-5 group-data-[collapsible=icon]:p-4",a),...t})}function y({className:a,asChild:t=!1,...i}){let s=t?r.Slot:"div";return(0,e.jsx)(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:(0,u.cn)("flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...i})}function N({className:a,...t}){return(0,e.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:(0,u.cn)("flex w-full min-w-0 flex-col gap-1",a),...t})}function k({className:a,...t}){return(0,e.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:(0,u.cn)("group/menu-item relative",a),...t})}let z=(0,u.tv)({base:"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:p-2.5! group-data-[collapsible=icon]:gap-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:[&>svg]:size-5",variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function M({asChild:a=!1,isActive:t=!1,variant:i="default",size:s="default",tooltip:d,className:o,...n}){let c=a?r.Slot:"button",{isMobile:b,state:f}=p("SidebarMenuButton"),g=(0,e.jsx)(c,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":t,className:(0,u.cn)(z({variant:i,size:s}),o),...n});return d?("string"==typeof d&&(d={children:d}),(0,e.jsxs)(l.Tooltip,{children:[(0,e.jsx)(l.TooltipTrigger,{asChild:!0,children:g}),(0,e.jsx)(l.TooltipContent,{side:"right",align:"center",hidden:"collapsed"!==f||b,...d})]})):g}function _({className:a,asChild:t=!1,showOnHover:i=!1,...s}){let d=t?r.Slot:"button";return(0,e.jsx)(d,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:(0,u.cn)("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:-inset-2 after:absolute md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",i&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",a),...s})}function C({className:t,showIcon:r=!1,...i}){let s=(0,a.useMemo)(()=>`${Math.floor(40*Math.random())+50}%`,[]);return(0,e.jsxs)("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:(0,u.cn)("flex h-8 items-center gap-2 rounded-md px-2",t),...i,children:[r&&(0,e.jsx)(n.Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,e.jsx)(n.Skeleton,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})}function T({className:a,...t}){return(0,e.jsx)("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:(0,u.cn)("ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l py-0.5 pl-2.5","group-data-[collapsible=icon]:hidden",a),...t})}function I({className:a,...t}){return(0,e.jsx)("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:(0,u.cn)("group/menu-sub-item relative",a),...t})}export{g as Sidebar,j as SidebarContent,v as SidebarFooter,S as SidebarGroup,y as SidebarGroupLabel,x as SidebarHeader,N as SidebarMenu,_ as SidebarMenuAction,M as SidebarMenuButton,k as SidebarMenuItem,C as SidebarMenuSkeleton,T as SidebarMenuSub,I as SidebarMenuSubItem,f as SidebarProvider,h as SidebarRail,w as SidebarSeparator,m as SidebarTrigger,p as useSidebar};
|
|
2
|
+
import*as e from"react/jsx-runtime";import*as a from"react";import*as t from"@radix-ui/react-context";import*as r from"@radix-ui/react-slot";import*as i from"lucide-react";import*as s from"../../button.js";import*as d from"../../separator.js";import*as o from"../../sheet/index.js";import*as n from"../../skeleton.js";import*as l from"../../tooltip.js";import*as c from"../../../hooks/use-mobile.js";import*as u from"../../../lib/index.js";let[b,p]=(0,t.createContext)("SidebarProvider");function f({defaultOpen:t=!0,open:r,onOpenChange:i,className:s,style:d,user:o,modules:n,locale:p="pt-br",children:f,...g}){let m=(0,c.useIsMobile)(),[h,x]=(0,a.useState)(!1),[v,w]=(0,a.useState)(t),j=r??v,S=(0,a.useCallback)(e=>{let a="function"==typeof e?e(j):e;i?i(a):w(a),document.cookie=`gbm_sidebar_open=${a}; path=/; max-age=604800`},[i,j]),y=(0,a.useCallback)(()=>{m?x(e=>!e):S(e=>!e)},[m,S,x]);(0,a.useEffect)(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[y]);let N=j?"expanded":"collapsed";return(0,e.jsx)(b,{isMobile:m,open:j,openMobile:h,setOpen:S,setOpenMobile:x,state:N,toggleSidebar:y,user:o,modules:n,locale:p,children:(0,e.jsx)(l.TooltipProvider,{delayDuration:0,children:(0,e.jsx)("div",{className:(0,u.cn)("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",s),"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"16rem","--sidebar-width-icon":"4.5rem",...d},...g,children:f})})})}function g({side:a="left",variant:t="sidebar",collapsible:r="icon",className:i,children:s,...d}){let{isMobile:n,state:l,openMobile:c,setOpenMobile:b}=p("Sidebar");return"none"===r?(0,e.jsx)("div",{"data-slot":"sidebar",className:(0,u.cn)("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),...d,children:s}):n?(0,e.jsx)(o.Sheet,{open:c,onOpenChange:b,...d,children:(0,e.jsxs)(o.SheetContent,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:a,children:[(0,e.jsxs)(o.SheetHeader,{className:"sr-only",children:[(0,e.jsx)(o.SheetTitle,{children:"Sidebar"}),(0,e.jsx)(o.SheetDescription,{children:"Displays the mobile sidebar."})]}),(0,e.jsx)("div",{className:"flex h-full w-full flex-col",children:s})]})}):(0,e.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":"collapsed"===l?r:"","data-variant":t,"data-side":a,"data-slot":"sidebar",children:[(0,e.jsx)("div",{"data-slot":"sidebar-gap",className:(0,u.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,e.jsx)("div",{"data-slot":"sidebar-container",className:(0,u.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex","left"===a?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...d,children:(0,e.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm",children:s})})]})}function m({className:a,onClick:t,...r}){let{toggleSidebar:d}=p("SidebarTrigger");return(0,e.jsxs)(s.Button,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:(0,u.cn)("size-7",a),onClick:e=>{t?.(e),d()},...r,children:[(0,e.jsx)(i.PanelLeftIcon,{}),(0,e.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function h({className:a,...t}){let{toggleSidebar:r}=p("SidebarRail");return(0,e.jsx)("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:(0,u.cn)("-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...t})}function x({className:a,...t}){return(0,e.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:(0,u.cn)("flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4",a),...t})}function v({className:a,...t}){return(0,e.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:(0,u.cn)("flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4",a),...t})}function w({className:a,...t}){return(0,e.jsx)(d.Separator,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:(0,u.cn)("mx-2 w-auto bg-sidebar-border",a),...t})}function j({className:a,...t}){return(0,e.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:(0,u.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto group-data-[collapsible=icon]:overflow-hidden",a),...t})}function S({className:a,...t}){return(0,e.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:(0,u.cn)("relative flex w-full min-w-0 flex-col px-5 group-data-[collapsible=icon]:p-4",a),...t})}function y({className:a,asChild:t=!1,...i}){let s=t?r.Slot:"div";return(0,e.jsx)(s,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:(0,u.cn)("flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...i})}function N({className:a,...t}){return(0,e.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:(0,u.cn)("flex w-full min-w-0 flex-col gap-1",a),...t})}function k({className:a,...t}){return(0,e.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:(0,u.cn)("group/menu-item relative",a),...t})}let z=(0,u.tv)({base:"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:p-2.5! group-data-[collapsible=icon]:gap-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:[&>svg]:size-5",variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function M({asChild:a=!1,isActive:t=!1,variant:i="default",size:s="default",tooltip:d,className:o,onClick:n,...c}){let b=a?r.Slot:"button",{isMobile:f,open:g,setOpen:m,state:h}=p("SidebarMenuButton"),x=(0,e.jsx)(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":t,className:(0,u.cn)(z({variant:i,size:s}),o),onClick:e=>{n?.(e),g||m(!0)},...c});return d?("string"==typeof d&&(d={children:d}),(0,e.jsxs)(l.Tooltip,{children:[(0,e.jsx)(l.TooltipTrigger,{asChild:!0,children:x}),(0,e.jsx)(l.TooltipContent,{side:"right",align:"center",hidden:"collapsed"!==h||f,...d})]})):x}function _({className:a,asChild:t=!1,showOnHover:i=!1,...s}){let d=t?r.Slot:"button";return(0,e.jsx)(d,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:(0,u.cn)("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:-inset-2 after:absolute md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",i&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",a),...s})}function C({className:t,showIcon:r=!1,...i}){let s=(0,a.useMemo)(()=>`${Math.floor(40*Math.random())+50}%`,[]);return(0,e.jsxs)("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:(0,u.cn)("flex h-8 items-center gap-2 rounded-md px-2",t),...i,children:[r&&(0,e.jsx)(n.Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,e.jsx)(n.Skeleton,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})}function T({className:a,...t}){return(0,e.jsx)("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:(0,u.cn)("ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l py-0.5 pl-2.5","group-data-[collapsible=icon]:hidden",a),...t})}function I({className:a,...t}){return(0,e.jsx)("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:(0,u.cn)("group/menu-sub-item relative",a),...t})}export{g as Sidebar,j as SidebarContent,v as SidebarFooter,S as SidebarGroup,y as SidebarGroupLabel,x as SidebarHeader,N as SidebarMenu,_ as SidebarMenuAction,M as SidebarMenuButton,k as SidebarMenuItem,C as SidebarMenuSkeleton,T as SidebarMenuSub,I as SidebarMenuSubItem,f as SidebarProvider,h as SidebarRail,w as SidebarSeparator,m as SidebarTrigger,p as useSidebar};
|
|
3
3
|
//# sourceMappingURL=sidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/app-layout/sidebar/sidebar.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/app-layout/sidebar/sidebar.tsx"],"sourcesContent":["\n\nimport {\n CSSProperties,\n ComponentProps,\n JSX,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react'\n\nimport { createContext } from '@radix-ui/react-context'\nimport { Slot } from '@radix-ui/react-slot'\nimport { PanelLeftIcon } from 'lucide-react'\n\nimport { Button } from '@/components/button'\nimport { Separator } from '@/components/separator'\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from '@/components/sheet'\nimport { Skeleton } from '@/components/skeleton'\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/tooltip'\nimport { useIsMobile } from '@/hooks/use-mobile'\nimport { VariantProps, cn, tv } from '@/lib'\nimport { Locale, Module, User } from '@/types'\n\nconst SIDEBAR_COOKIE_NAME = 'gbm_sidebar_open'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '16rem'\nconst SIDEBAR_WIDTH_MOBILE = '18rem'\nconst SIDEBAR_WIDTH_ICON = '4.5rem'\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b'\n\ntype SidebarContextValue = {\n state: 'expanded' | 'collapsed'\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n user: User\n modules: Module[]\n locale: Locale\n}\n\n/* -----------------------------------------------------------------------------\n * Context: SidebarProvider\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_PROVIDER_NAME = 'SidebarProvider'\n\nconst [SidebarContextProvider, useSidebar] = createContext<SidebarContextValue>(\n SIDEBAR_PROVIDER_NAME\n)\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarProvider\n * -------------------------------------------------------------------------- */\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n user,\n modules,\n locale = 'pt-br',\n children,\n ...props\n}: ComponentProps<'div'> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n user: User\n modules: Module[]\n locale?: Locale\n}): JSX.Element {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [isOpen, setIsOpen] = useState(defaultOpen)\n const open = openProp ?? isOpen\n const setOpen = useCallback(\n (value: ((value: boolean) => boolean) | boolean) => {\n const openState = typeof value === 'function' ? value(open) : value\n\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n setIsOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(() => {\n if (isMobile) {\n setOpenMobile(currentValue => !currentValue)\n } else {\n setOpen(currentValue => !currentValue)\n }\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n useEffect(() => {\n const handleKeyDown: (event: KeyboardEvent) => void = (\n event: KeyboardEvent\n ) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener('keydown', handleKeyDown)\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown)\n }\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed'\n\n return (\n <SidebarContextProvider\n isMobile={isMobile}\n open={open}\n openMobile={openMobile}\n setOpen={setOpen}\n setOpenMobile={setOpenMobile}\n state={state}\n toggleSidebar={toggleSidebar}\n user={user}\n modules={modules}\n locale={locale}\n >\n <TooltipProvider delayDuration={0}>\n <div\n className={cn(\n 'group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar',\n className\n )}\n data-slot=\"sidebar-wrapper\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContextProvider>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: Sidebar\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_NAME = 'Sidebar'\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'icon',\n className,\n children,\n ...props\n}: ComponentProps<'div'> & {\n side?: 'left' | 'right'\n variant?: 'sidebar' | 'floating' | 'inset'\n collapsible?: 'offcanvas' | 'icon' | 'none'\n}) {\n const { isMobile, state, openMobile, setOpenMobile } =\n useSidebar(SIDEBAR_NAME)\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n 'flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground',\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarTrigger\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_TRIGGER_NAME = 'SidebarTrigger'\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar(SIDEBAR_TRIGGER_NAME)\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('size-7', className)}\n onClick={event => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarRail\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_RAIL_NAME = 'SidebarRail'\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar(SIDEBAR_RAIL_NAME)\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n '-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarHeader\n * -------------------------------------------------------------------------- */\n\nfunction SidebarHeader({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\n 'flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarFooter\n * -------------------------------------------------------------------------- */\n\nfunction SidebarFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\n 'flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarSeparator\n * -------------------------------------------------------------------------- */\n\nfunction SidebarSeparator({\n className,\n ...props\n}: ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn('mx-2 w-auto bg-sidebar-border', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarContent\n * -------------------------------------------------------------------------- */\n\nfunction SidebarContent({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroup\n * -------------------------------------------------------------------------- */\n\nfunction SidebarGroup({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\n 'relative flex w-full min-w-0 flex-col px-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroupLabel\n * -------------------------------------------------------------------------- */\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: ComponentProps<'div'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n data-slot=\"sidebar-group-label\"\n data-sidebar=\"group-label\"\n className={cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenu\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenu({ className, ...props }: ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuItem\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuItem({ className, ...props }: ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuButton\n * -------------------------------------------------------------------------- */\n\nconst sidebarMenuButtonVariants = tv({\n base: 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:p-2.5! group-data-[collapsible=icon]:gap-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:[&>svg]:size-5',\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',\n },\n size: {\n default: 'text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n})\n\nconst SIDEBAR_MENU_BUTTON_NAME = 'SidebarMenuButton'\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n ...props\n}: ComponentProps<'button'> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | ComponentProps<typeof TooltipContent>\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot : 'button'\n const { isMobile, state } = useSidebar(SIDEBAR_MENU_BUTTON_NAME)\n\n const button = (\n <Comp\n data-slot=\"sidebar-menu-button\"\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed' || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuAction\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: ComponentProps<'button'> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot=\"sidebar-menu-action\"\n data-sidebar=\"menu-action\"\n className={cn(\n 'absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:-inset-2 after:absolute md:after:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSkeleton\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: ComponentProps<'div'> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const width = useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as CSSProperties\n }\n />\n </div>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSub\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSub({ className, ...props }: ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l py-0.5 pl-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSubItem\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSubItem({ className, ...props }: ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarSeparator,\n SidebarTrigger,\n SidebarRail,\n useSidebar,\n}\n"],"names":["SidebarContextProvider","useSidebar","createContext","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","user","modules","locale","children","props","isMobile","useIsMobile","openMobile","setOpenMobile","useState","isOpen","setIsOpen","open","setOpen","useCallback","value","openState","document","toggleSidebar","currentValue","useEffect","handleKeyDown","event","window","state","TooltipProvider","cn","Sidebar","side","variant","collapsible","Sheet","SheetContent","SheetHeader","SheetTitle","SheetDescription","SidebarTrigger","onClick","Button","PanelLeftIcon","SidebarRail","SidebarHeader","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","asChild","Comp","Slot","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","tv","SidebarMenuButton","isActive","size","tooltip","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuSkeleton","showIcon","width","useMemo","Math","Skeleton","SidebarMenuSub","SidebarMenuSubItem"],"mappings":";wbA8DA,GAAM,CAACA,EAAwBC,EAAW,CAAGC,GAAAA,EAAAA,aAAAA,EAFf,mBAU9B,SAASC,EAAgB,CACvBC,YAAAA,EAAc,EAAI,CAClB,KAAMC,CAAQ,CACd,aAAcC,CAAW,CACzBC,UAAAA,CAAS,CACTC,MAAAA,CAAK,CACLC,KAAAA,CAAI,CACJC,QAAAA,CAAO,CACPC,OAAAA,EAAS,OAAO,CAChBC,SAAAA,CAAQ,CACR,GAAGC,EAQJ,EACC,IAAMC,EAAWC,GAAAA,EAAAA,WAAAA,IACX,CAACC,EAAYC,EAAc,CAAGC,GAAAA,EAAAA,QAAAA,EAAS,IAIvC,CAACC,EAAQC,EAAU,CAAGF,GAAAA,EAAAA,QAAAA,EAASd,GAC/BiB,EAAOhB,GAAYc,EACnBG,EAAUC,GAAAA,EAAAA,WAAAA,EACd,IACE,IAAME,EAAY,mBAAOD,EAAuBA,EAAMH,GAAQG,EAE1DlB,EACFA,EAAYmB,GAEZL,EAAUK,GAIZC,SAAS,MAAM,CAAG,oBAA0BD,2BAAsD,EAEpG,CAACnB,EAAae,EAAK,EAIfM,EAAgBJ,GAAAA,EAAAA,WAAAA,EAAY,KAC5BT,EACFG,EAAcW,GAAgB,CAACA,GAE/BN,EAAQM,GAAgB,CAACA,EAE7B,EAAG,CAACd,EAAUQ,EAASL,EAAc,EAGrCY,GAAAA,EAAAA,SAAAA,EAAU,KACR,IAAMC,EAAgD,IAlFxB,MAsF1BC,EAAM,GAAG,EACRA,CAAAA,EAAM,OAAO,EAAIA,EAAM,OAAM,IAE9BA,EAAM,cAAc,GACpBJ,IAEJ,EAIA,OAFAK,OAAO,gBAAgB,CAAC,UAAWF,GAE5B,KACLE,OAAO,mBAAmB,CAAC,UAAWF,EACxC,CACF,EAAG,CAACH,EAAc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gbmtech/aurora-ui/./src/components/app-layout/sidebar/sidebar.tsx"],"sourcesContent":["\n\nimport {\n CSSProperties,\n ComponentProps,\n JSX,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react'\n\nimport { createContext } from '@radix-ui/react-context'\nimport { Slot } from '@radix-ui/react-slot'\nimport { PanelLeftIcon } from 'lucide-react'\n\nimport { Button } from '@/components/button'\nimport { Separator } from '@/components/separator'\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from '@/components/sheet'\nimport { Skeleton } from '@/components/skeleton'\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/tooltip'\nimport { useIsMobile } from '@/hooks/use-mobile'\nimport { VariantProps, cn, tv } from '@/lib'\nimport { Locale, Module, User } from '@/types'\n\nconst SIDEBAR_COOKIE_NAME = 'gbm_sidebar_open'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '16rem'\nconst SIDEBAR_WIDTH_MOBILE = '18rem'\nconst SIDEBAR_WIDTH_ICON = '4.5rem'\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b'\n\ntype SidebarContextValue = {\n state: 'expanded' | 'collapsed'\n open: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n isMobile: boolean\n toggleSidebar: () => void\n user: User\n modules: Module[]\n locale: Locale\n}\n\n/* -----------------------------------------------------------------------------\n * Context: SidebarProvider\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_PROVIDER_NAME = 'SidebarProvider'\n\nconst [SidebarContextProvider, useSidebar] = createContext<SidebarContextValue>(\n SIDEBAR_PROVIDER_NAME\n)\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarProvider\n * -------------------------------------------------------------------------- */\n\nfunction SidebarProvider({\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n user,\n modules,\n locale = 'pt-br',\n children,\n ...props\n}: ComponentProps<'div'> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n user: User\n modules: Module[]\n locale?: Locale\n}): JSX.Element {\n const isMobile = useIsMobile()\n const [openMobile, setOpenMobile] = useState(false)\n\n // This is the internal state of the sidebar.\n // We use openProp and setOpenProp for control from outside the component.\n const [isOpen, setIsOpen] = useState(defaultOpen)\n const open = openProp ?? isOpen\n const setOpen = useCallback(\n (value: ((value: boolean) => boolean) | boolean) => {\n const openState = typeof value === 'function' ? value(open) : value\n\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n setIsOpen(openState)\n }\n\n // This sets the cookie to keep the sidebar state.\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n // Helper to toggle the sidebar.\n const toggleSidebar = useCallback(() => {\n if (isMobile) {\n setOpenMobile(currentValue => !currentValue)\n } else {\n setOpen(currentValue => !currentValue)\n }\n }, [isMobile, setOpen, setOpenMobile])\n\n // Adds a keyboard shortcut to toggle the sidebar.\n useEffect(() => {\n const handleKeyDown: (event: KeyboardEvent) => void = (\n event: KeyboardEvent\n ) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener('keydown', handleKeyDown)\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown)\n }\n }, [toggleSidebar])\n\n // We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n // This makes it easier to style the sidebar with Tailwind classes.\n const state = open ? 'expanded' : 'collapsed'\n\n return (\n <SidebarContextProvider\n isMobile={isMobile}\n open={open}\n openMobile={openMobile}\n setOpen={setOpen}\n setOpenMobile={setOpenMobile}\n state={state}\n toggleSidebar={toggleSidebar}\n user={user}\n modules={modules}\n locale={locale}\n >\n <TooltipProvider delayDuration={0}>\n <div\n className={cn(\n 'group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar',\n className\n )}\n data-slot=\"sidebar-wrapper\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContextProvider>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: Sidebar\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_NAME = 'Sidebar'\n\nfunction Sidebar({\n side = 'left',\n variant = 'sidebar',\n collapsible = 'icon',\n className,\n children,\n ...props\n}: ComponentProps<'div'> & {\n side?: 'left' | 'right'\n variant?: 'sidebar' | 'floating' | 'inset'\n collapsible?: 'offcanvas' | 'icon' | 'none'\n}) {\n const { isMobile, state, openMobile, setOpenMobile } =\n useSidebar(SIDEBAR_NAME)\n\n if (collapsible === 'none') {\n return (\n <div\n data-slot=\"sidebar\"\n className={cn(\n 'flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground',\n className\n )}\n {...props}\n >\n {children}\n </div>\n )\n }\n\n if (isMobile) {\n return (\n <Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar\"\n data-mobile=\"true\"\n className=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH_MOBILE,\n } as CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n )\n }\n\n return (\n <div\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-slot=\"sidebar\"\n >\n {/* This is what handles the sidebar gap on desktop */}\n <div\n data-slot=\"sidebar-gap\"\n className={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n variant === 'floating' || variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)'\n )}\n />\n <div\n data-slot=\"sidebar-container\"\n className={cn(\n 'fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex',\n side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n // Adjust the padding for floating and inset variants.\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n data-slot=\"sidebar-inner\"\n className=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm\"\n >\n {children}\n </div>\n </div>\n </div>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarTrigger\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_TRIGGER_NAME = 'SidebarTrigger'\n\nfunction SidebarTrigger({\n className,\n onClick,\n ...props\n}: ComponentProps<typeof Button>) {\n const { toggleSidebar } = useSidebar(SIDEBAR_TRIGGER_NAME)\n\n return (\n <Button\n data-sidebar=\"trigger\"\n data-slot=\"sidebar-trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('size-7', className)}\n onClick={event => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <PanelLeftIcon />\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarRail\n * -------------------------------------------------------------------------- */\n\nconst SIDEBAR_RAIL_NAME = 'SidebarRail'\n\nfunction SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {\n const { toggleSidebar } = useSidebar(SIDEBAR_RAIL_NAME)\n\n return (\n <button\n data-sidebar=\"rail\"\n data-slot=\"sidebar-rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n '-translate-x-1/2 group-data-[side=left]:-right-4 absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=right]:left-0 sm:flex',\n 'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:after:left-full',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarHeader\n * -------------------------------------------------------------------------- */\n\nfunction SidebarHeader({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-header\"\n data-sidebar=\"header\"\n className={cn(\n 'flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarFooter\n * -------------------------------------------------------------------------- */\n\nfunction SidebarFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-footer\"\n data-sidebar=\"footer\"\n className={cn(\n 'flex flex-col gap-2 p-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarSeparator\n * -------------------------------------------------------------------------- */\n\nfunction SidebarSeparator({\n className,\n ...props\n}: ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"sidebar-separator\"\n data-sidebar=\"separator\"\n className={cn('mx-2 w-auto bg-sidebar-border', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarContent\n * -------------------------------------------------------------------------- */\n\nfunction SidebarContent({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-content\"\n data-sidebar=\"content\"\n className={cn(\n 'flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroup\n * -------------------------------------------------------------------------- */\n\nfunction SidebarGroup({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sidebar-group\"\n data-sidebar=\"group\"\n className={cn(\n 'relative flex w-full min-w-0 flex-col px-5 group-data-[collapsible=icon]:p-4',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarGroupLabel\n * -------------------------------------------------------------------------- */\n\nfunction SidebarGroupLabel({\n className,\n asChild = false,\n ...props\n}: ComponentProps<'div'> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n data-slot=\"sidebar-group-label\"\n data-sidebar=\"group-label\"\n className={cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 font-medium text-sidebar-foreground/70 text-xs outline-hidden ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenu\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenu({ className, ...props }: ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu\"\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuItem\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuItem({ className, ...props }: ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-item\"\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuButton\n * -------------------------------------------------------------------------- */\n\nconst sidebarMenuButtonVariants = tv({\n base: 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:p-2.5! group-data-[collapsible=icon]:gap-3 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:[&>svg]:size-5',\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]',\n },\n size: {\n default: 'text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:p-0!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n})\n\nconst SIDEBAR_MENU_BUTTON_NAME = 'SidebarMenuButton'\n\nfunction SidebarMenuButton({\n asChild = false,\n isActive = false,\n variant = 'default',\n size = 'default',\n tooltip,\n className,\n onClick,\n ...props\n}: ComponentProps<'button'> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | ComponentProps<typeof TooltipContent>\n} & VariantProps<typeof sidebarMenuButtonVariants>) {\n const Comp = asChild ? Slot : 'button'\n const { isMobile, open, setOpen, state } = useSidebar(SIDEBAR_MENU_BUTTON_NAME)\n\n const button = (\n <Comp\n data-slot=\"sidebar-menu-button\"\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n onClick={event => {\n onClick?.(event)\n\n if(!open) {\n setOpen(true)\n }\n }}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === 'string') {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed' || isMobile}\n {...tooltip}\n />\n </Tooltip>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuAction\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuAction({\n className,\n asChild = false,\n showOnHover = false,\n ...props\n}: ComponentProps<'button'> & {\n asChild?: boolean\n showOnHover?: boolean\n}) {\n const Comp = asChild ? Slot : 'button'\n\n return (\n <Comp\n data-slot=\"sidebar-menu-action\"\n data-sidebar=\"menu-action\"\n className={cn(\n 'absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',\n // Increases the hit area of the button on mobile.\n 'after:-inset-2 after:absolute md:after:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover &&\n 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSkeleton\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSkeleton({\n className,\n showIcon = false,\n ...props\n}: ComponentProps<'div'> & {\n showIcon?: boolean\n}) {\n // Random width between 50 to 90%.\n const width = useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n data-slot=\"sidebar-menu-skeleton\"\n data-sidebar=\"menu-skeleton\"\n className={cn('flex h-8 items-center gap-2 rounded-md px-2', className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-(--skeleton-width) flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n '--skeleton-width': width,\n } as CSSProperties\n }\n />\n </div>\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSub\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSub({ className, ...props }: ComponentProps<'ul'>) {\n return (\n <ul\n data-slot=\"sidebar-menu-sub\"\n data-sidebar=\"menu-sub\"\n className={cn(\n 'ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-sidebar-border border-l py-0.5 pl-2.5',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SidebarMenuSubItem\n * -------------------------------------------------------------------------- */\n\nfunction SidebarMenuSubItem({ className, ...props }: ComponentProps<'li'>) {\n return (\n <li\n data-slot=\"sidebar-menu-sub-item\"\n data-sidebar=\"menu-sub-item\"\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n )\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarSeparator,\n SidebarTrigger,\n SidebarRail,\n useSidebar,\n}\n"],"names":["SidebarContextProvider","useSidebar","createContext","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","user","modules","locale","children","props","isMobile","useIsMobile","openMobile","setOpenMobile","useState","isOpen","setIsOpen","open","setOpen","useCallback","value","openState","document","toggleSidebar","currentValue","useEffect","handleKeyDown","event","window","state","TooltipProvider","cn","Sidebar","side","variant","collapsible","Sheet","SheetContent","SheetHeader","SheetTitle","SheetDescription","SidebarTrigger","onClick","Button","PanelLeftIcon","SidebarRail","SidebarHeader","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","asChild","Comp","Slot","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","tv","SidebarMenuButton","isActive","size","tooltip","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuSkeleton","showIcon","width","useMemo","Math","Skeleton","SidebarMenuSub","SidebarMenuSubItem"],"mappings":";wbA8DA,GAAM,CAAC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EAAK,CACfgB,YAAAA,EAAc,EAAK,CACnB,GAAG5D,EAIJ,EACC,IAAM6C,EAAOD,EAAUE,EAAAA,IAAIA,CAAG,SAE9B,MACE,UAACD,EAAAA,CACC,YAAU,sBACV,eAAa,cACb,UAAWvB,GAAAA,EAAAA,EAAAA,EACT,mVAEA,gDACA,wCACA,+CACA,0CACA,uCACAsC,GACE,2LACFlE,GAED,GAAGM,CAAK,EAGf,CAMA,SAAS6D,EAAoB,CAC3BnE,UAAAA,CAAS,CACToE,SAAAA,EAAW,EAAK,CAChB,GAAG9D,EAGJ,EAEC,IAAM+D,EAAQC,GAAAA,EAAAA,OAAAA,EAAQ,IACb,CAAC,EAAEC,KAAK,KAAK,CAACA,GAAAA,KAAK,MAAM,IAAW,GAAG,CAAC,CAAC,CAC/C,EAAE,EAEL,MACE,WAAC,OACC,YAAU,wBACV,eAAa,gBACb,UAAW3C,GAAAA,EAAAA,EAAAA,EAAG,8CAA+C5B,GAC5D,GAAGM,CAAK,C,UAER8D,GACC,UAACI,EAAAA,QAAQA,CAAAA,CACP,UAAU,oBACV,eAAa,oB,GAGjB,UAACA,EAAAA,QAAQA,CAAAA,CACP,UAAU,sCACV,eAAa,qBACb,MACE,CACE,mBAAoBH,CACtB,C,KAKV,CAMA,SAASI,EAAe,CAAEzE,UAAAA,CAAS,CAAE,GAAGM,EAA6B,EACnE,MACE,UAAC,MACC,YAAU,mBACV,eAAa,WACb,UAAWsB,GAAAA,EAAAA,EAAAA,EACT,iGACA,uCACA5B,GAED,GAAGM,CAAK,EAGf,CAMA,SAASoE,EAAmB,CAAE1E,UAAAA,CAAS,CAAE,GAAGM,EAA6B,EACvE,MACE,UAAC,MACC,YAAU,wBACV,eAAa,gBACb,UAAWsB,GAAAA,EAAAA,EAAAA,EAAG,+BAAgC5B,GAC7C,GAAGM,CAAK,EAGf,Q"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as t from"./data-table-date-filter.js";import*as a from"./data-table-faceted-filter.js";import*as e from"./data-table-
|
|
1
|
+
import*as t from"./data-table-date-filter.js";import*as a from"./data-table-faceted-filter.js";import*as e from"./data-table-pagination.js";import*as o from"./data-table-slider-filter.js";import*as r from"./data-table-view-options.js";export*from"./data-table-action-bar.js";export*from"./data-table-advanced-toolbar.js";export*from"./data-table-column-header.js";export*from"./data-table-filter-list.js";export*from"./data-table-filter-menu.js";export*from"./data-table-range-filter.js";export*from"./data-table-skeleton.js";export*from"./data-table-sort-list.js";export*from"./data-table-toolbar.js";export*from"./data-table.js";var n={"@/components/data-table/data-table-date-filter":function(a){a.exports=t},"@/components/data-table/data-table-faceted-filter":function(t){t.exports=a},"@/components/data-table/data-table-pagination":function(t){t.exports=e},"@/components/data-table/data-table-slider-filter":function(t){t.exports=o},"@/components/data-table/data-table-view-options":function(t){t.exports=r}},d={};function l(t){var a=d[t];if(void 0!==a)return a.exports;var e=d[t]={exports:{}};return n[t](e,e.exports,l),e.exports}l.d=(t,a)=>{for(var e in a)l.o(a,e)&&!l.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:a[e]})},l.o=(t,a)=>Object.prototype.hasOwnProperty.call(t,a),l.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};l.r(i);var f=l("@/components/data-table/data-table-date-filter"),b={};for(var s in f)"default"!==s&&(b[s]=(function(t){return f[t]}).bind(0,s));l.d(i,b);var p=l("@/components/data-table/data-table-faceted-filter"),b={};for(var s in p)"default"!==s&&(b[s]=(function(t){return p[t]}).bind(0,s));l.d(i,b);var m=l("@/components/data-table/data-table-pagination"),b={};for(var s in m)"default"!==s&&(b[s]=(function(t){return m[t]}).bind(0,s));l.d(i,b);var c=l("@/components/data-table/data-table-slider-filter"),b={};for(var s in c)"default"!==s&&(b[s]=(function(t){return c[t]}).bind(0,s));l.d(i,b);var u=l("@/components/data-table/data-table-view-options"),b={};for(var s in u)"default"!==s&&(b[s]=(function(t){return u[t]}).bind(0,s));l.d(i,b);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/data-table/index.js","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["Object","Symbol"],"mappings":"
|
|
1
|
+
{"version":3,"file":"components/data-table/index.js","sources":["webpack://@gbmtech/aurora-ui/webpack/runtime/define_property_getters","webpack://@gbmtech/aurora-ui/webpack/runtime/has_own_property","webpack://@gbmtech/aurora-ui/webpack/runtime/make_namespace_object"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["Object","Symbol"],"mappings":"gnCAAA,EAAoB,CAAC,CAAG,CAAC,EAAS,KACjC,IAAI,IAAI,KAAO,EACL,EAAoB,CAAC,CAAC,EAAY,IAAQ,CAAC,EAAoB,CAAC,CAAC,EAAS,IACzEA,OAAO,cAAc,CAAC,EAAS,EAAK,CAAE,WAAY,GAAM,IAAK,CAAU,CAAC,EAAI,AAAC,EAGzF,ECNA,EAAoB,CAAC,CAAG,CAAC,EAAK,IAAUA,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,EAAK,GCClF,EAAoB,CAAC,CAAG,AAAC,IACrB,AAAkB,aAAlB,OAAOC,QAA0BA,OAAO,WAAW,EACrDD,OAAO,cAAc,CAAC,EAASC,OAAO,WAAW,CAAE,CAAE,MAAO,QAAS,GAEtED,OAAO,cAAc,CAAC,EAAS,aAAc,CAAE,MAAO,EAAK,EAC5D,E"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export interface Module {
|
|
2
2
|
id: number;
|
|
3
3
|
name: string;
|
|
4
|
-
icon: string;
|
|
5
|
-
order: number;
|
|
4
|
+
icon: string | null;
|
|
5
|
+
order: number | null;
|
|
6
6
|
read: boolean;
|
|
7
7
|
create: boolean;
|
|
8
8
|
edit: boolean;
|
|
9
9
|
delete: boolean;
|
|
10
10
|
path: string;
|
|
11
|
-
submodules
|
|
11
|
+
submodules?: Module[];
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/types/module.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/types/module.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACtB"}
|
package/dist/esm/types/user.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/types/user.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/types/user.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,OAAO,CAAA;CACvB"}
|