@keslers/kui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -0
- package/dist/index.cjs +54 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +45 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +69 -0
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# @keslers/kui Component Library
|
|
2
|
+
|
|
3
|
+
A hyper-opinionated React component library built with Tailwind v4, shadcn/ui, and react-icons. Provides pre-styled components like Header, Footer, and Layout for quick setup in dark-themed apps.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @keslers/kui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Import the stylesheet once in your main entry file (e.g., `index.tsx` or `App.tsx`):
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import "@keslers/kui/styles.css";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Then import and use components:
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { Header } from "@keslers/kui";
|
|
23
|
+
import { Footer } from "@keslers/kui";
|
|
24
|
+
import { Layout } from "@keslers/kui";
|
|
25
|
+
import { FaGithub, FaLinkedin } from "react-icons/fa"; // For social icons
|
|
26
|
+
|
|
27
|
+
function App() {
|
|
28
|
+
return (
|
|
29
|
+
<Layout
|
|
30
|
+
header={
|
|
31
|
+
<Header
|
|
32
|
+
logo="KESLER"
|
|
33
|
+
navItems={[
|
|
34
|
+
{
|
|
35
|
+
label: "SERVICES",
|
|
36
|
+
onClick: () => console.log("Services clicked"),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: "PORTFOLIO",
|
|
40
|
+
onClick: () => console.log("Portfolio clicked"),
|
|
41
|
+
},
|
|
42
|
+
{ label: "CONTACT", onClick: () => console.log("Contact clicked") },
|
|
43
|
+
]}
|
|
44
|
+
onLogoClick={() => console.log("Logo clicked")}
|
|
45
|
+
/>
|
|
46
|
+
}
|
|
47
|
+
footer={
|
|
48
|
+
<Footer
|
|
49
|
+
links={[
|
|
50
|
+
{ label: "About", href: "/about" },
|
|
51
|
+
{ label: "Privacy Policy", href: "/privacy" },
|
|
52
|
+
]}
|
|
53
|
+
socials={[
|
|
54
|
+
{ icon: FaGithub, href: "https://github.com/keslertechnologies" },
|
|
55
|
+
{
|
|
56
|
+
icon: FaLinkedin,
|
|
57
|
+
href: "https://linkedin.com/company/keslertechnologies",
|
|
58
|
+
},
|
|
59
|
+
]}
|
|
60
|
+
copyright={{
|
|
61
|
+
companyName: "KESLER TECHNOLOGIES",
|
|
62
|
+
companyUrl: "https://keslertechnologies.com",
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
}
|
|
66
|
+
>
|
|
67
|
+
{/* Your page content */}
|
|
68
|
+
<main className="flex-1 p-4">
|
|
69
|
+
<h1>Hello, World!</h1>
|
|
70
|
+
</main>
|
|
71
|
+
</Layout>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Components
|
|
77
|
+
|
|
78
|
+
- **Header**: Sticky navigation bar with logo, nav items, and mobile menu.
|
|
79
|
+
- Props: `logo: ReactNode`, `navItems: { label: string; onClick: () => void }[]`, `onLogoClick: () => void`
|
|
80
|
+
- **Footer**: Bottom bar with links, social icons, and copyright.
|
|
81
|
+
- Props: `links: { label: string; href: string; isExternal?: boolean; onClick?: () => void }[]`, `socials: { icon: IconType; href: string; label?: string; onClick?: () => void }[]`, `copyright: { companyName: string; companyUrl: string }`
|
|
82
|
+
- **Layout**: Wrapper for Header + main content + Footer.
|
|
83
|
+
- Props: `header?: ReactNode`, `footer?: ReactNode`, `children: ReactNode`
|
|
84
|
+
- **Custom Sheet**: Modified shadcn sheet with custom overlay and close button.
|
|
85
|
+
|
|
86
|
+
## Development
|
|
87
|
+
|
|
88
|
+
- Clone the repo: `git clone https://github.com/keslertechnologies/kui.git`
|
|
89
|
+
- Install deps: `npm install`
|
|
90
|
+
- Run Storybook: `npm run storybook`
|
|
91
|
+
- Build: `npm run build`
|
|
92
|
+
- Test locally: Use `npm link` in the library, then `npm link @keslers/kui` in a test app.
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
MIT
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";var oo=Object.create;var gt=Object.defineProperty;var no=Object.getOwnPropertyDescriptor;var io=Object.getOwnPropertyNames;var ao=Object.getPrototypeOf,co=Object.prototype.hasOwnProperty;var lo=(t,e)=>{for(var r in e)gt(t,r,{get:e[r],enumerable:!0})},me=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of io(e))!co.call(t,n)&&n!==r&>(t,n,{get:()=>e[n],enumerable:!(o=no(e,n))||o.enumerable});return t};var y=(t,e,r)=>(r=t!=null?oo(ao(t)):{},me(e||!t||!t.__esModule?gt(r,"default",{value:t,enumerable:!0}):r,t)),so=t=>me(gt({},"__esModule",{value:!0}),t);var Dn={};lo(Dn,{Footer:()=>eo,Header:()=>qr,Layout:()=>ro});module.exports=so(Dn);var Xr=require("react");var Hn=require("react"),we=require("class-variance-authority"),tt=require("radix-ui");var ke=require("clsx"),Le=require("tailwind-merge");function W(...t){return(0,Le.twMerge)((0,ke.clsx)(t))}var uo=require("lucide-react"),G=require("react/jsx-runtime");function Ce({className:t,children:e,viewport:r=!0,...o}){return(0,G.jsxs)(tt.NavigationMenu.Root,{"data-slot":"navigation-menu","data-viewport":r,className:W("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",t),...o,children:[e,r&&(0,G.jsx)(ho,{})]})}function be({className:t,...e}){return(0,G.jsx)(tt.NavigationMenu.List,{"data-slot":"navigation-menu-list",className:W("group flex flex-1 list-none items-center justify-center gap-0",t),...e})}function Re({className:t,...e}){return(0,G.jsx)(tt.NavigationMenu.Item,{"data-slot":"navigation-menu-item",className:W("relative",t),...e})}var Me=(0,we.cva)("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg bg-background px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");function ho({className:t,...e}){return(0,G.jsx)("div",{className:W("absolute top-full left-0 isolate z-50 flex justify-center"),children:(0,G.jsx)(tt.NavigationMenu.Viewport,{"data-slot":"navigation-menu-viewport",className:W("origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100 md:w-(--radix-navigation-menu-viewport-width) data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-90",t),...e})})}function je({className:t,...e}){return(0,G.jsx)(tt.NavigationMenu.Link,{"data-slot":"navigation-menu-link",className:W("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",t),...e})}var Gn=require("react"),Fe=require("class-variance-authority"),Se=require("radix-ui");var We=require("react/jsx-runtime"),po=(0,Fe.cva)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Be({className:t,variant:e="default",size:r="default",asChild:o=!1,...n}){let i=o?Se.Slot.Root:"button";return(0,We.jsx)(i,{"data-slot":"button","data-variant":e,"data-size":r,className:W(po({variant:e,size:r,className:t})),...n})}var ht=y(require("react"),1);var k=y(require("react"),1);var Yn=!!(typeof window<"u"&&window.document&&window.document.createElement);function H(t,e,{checkForDefaultPrevented:r=!0}={}){return function(n){if(t?.(n),r===!1||!n.defaultPrevented)return e?.(n)}}var Pe=y(require("react"),1);function Ee(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function At(...t){return e=>{let r=!1,o=t.map(n=>{let i=Ee(n,e);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let n=0;n<o.length;n++){let i=o[n];typeof i=="function"?i():Ee(t[n],null)}}}}function _(...t){return Pe.useCallback(At(...t),t)}var T=y(require("react"),1),Ot=require("react/jsx-runtime");function Ne(t,e){let r=T.createContext(e),o=i=>{let{children:c,...a}=i,d=T.useMemo(()=>a,Object.values(a));return(0,Ot.jsx)(r.Provider,{value:d,children:c})};o.displayName=t+"Provider";function n(i){let c=T.useContext(r);if(c)return c;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[o,n]}function Ae(t,e=[]){let r=[];function o(i,c){let a=T.createContext(c),d=r.length;r=[...r,c];let l=h=>{let{scope:p,children:g,...b}=h,s=p?.[t]?.[d]||a,f=T.useMemo(()=>b,Object.values(b));return(0,Ot.jsx)(s.Provider,{value:f,children:g})};l.displayName=i+"Provider";function u(h,p){let g=p?.[t]?.[d]||a,b=T.useContext(g);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[l,u]}let n=()=>{let i=r.map(c=>T.createContext(c));return function(a){let d=a?.[t]||i;return T.useMemo(()=>({[`__scope${t}`]:{...a,[t]:d}}),[a,d])}};return n.scopeName=t,[o,go(n,...e)]}function go(...t){let e=t[0];if(t.length===1)return e;let r=()=>{let o=t.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(i){let c=o.reduce((a,{useScope:d,scopeName:l})=>{let h=d(i)[`__scope${l}`];return{...a,...h}},{});return T.useMemo(()=>({[`__scope${e.scopeName}`]:c}),[c])}};return r.scopeName=e.scopeName,r}var Tt=y(require("react"),1);var Oe=y(require("react"),1),K=globalThis?.document?Oe.useLayoutEffect:()=>{};var fo=Tt[" useId ".trim().toString()]||(()=>{}),xo=0;function ft(t){let[e,r]=Tt.useState(fo());return K(()=>{t||r(o=>o??String(xo++))},[t]),t||(e?`radix-${e}`:"")}var I=y(require("react"),1);var xt=y(require("react"),1);var vo=I[" useInsertionEffect ".trim().toString()]||K;function Te({prop:t,defaultProp:e,onChange:r=()=>{},caller:o}){let[n,i,c]=yo({defaultProp:e,onChange:r}),a=t!==void 0,d=a?t:n;{let u=I.useRef(t!==void 0);I.useEffect(()=>{let h=u.current;h!==a&&console.warn(`${o} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,o])}let l=I.useCallback(u=>{if(a){let h=mo(u)?u(t):u;h!==t&&c.current?.(h)}else i(u)},[a,t,i,c]);return[d,l]}function yo({defaultProp:t,onChange:e}){let[r,o]=I.useState(t),n=I.useRef(r),i=I.useRef(e);return vo(()=>{i.current=e},[e]),I.useEffect(()=>{n.current!==r&&(i.current?.(r),n.current=r)},[r,n]),[r,o,i]}function mo(t){return typeof t=="function"}var C=y(require("react"),1);var Ie=y(require("react"),1),De=y(require("react-dom"),1);var S=y(require("react"),1);var vt=require("react/jsx-runtime");function yt(t){let e=ko(t),r=S.forwardRef((o,n)=>{let{children:i,...c}=o,a=S.Children.toArray(i),d=a.find(wo);if(d){let l=d.props.children,u=a.map(h=>h===d?S.Children.count(l)>1?S.Children.only(null):S.isValidElement(l)?l.props.children:null:h);return(0,vt.jsx)(e,{...c,ref:n,children:S.isValidElement(l)?S.cloneElement(l,void 0,u):null})}return(0,vt.jsx)(e,{...c,ref:n,children:i})});return r.displayName=`${t}.Slot`,r}function ko(t){let e=S.forwardRef((r,o)=>{let{children:n,...i}=r;if(S.isValidElement(n)){let c=bo(n),a=Co(i,n.props);return n.type!==S.Fragment&&(a.ref=o?At(o,c):c),S.cloneElement(n,a)}return S.Children.count(n)>1?S.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Lo=Symbol("radix.slottable");function wo(t){return S.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Lo}function Co(t,e){let r={...e};for(let o in e){let n=t[o],i=e[o];/^on[A-Z]/.test(o)?n&&i?r[o]=(...a)=>{let d=i(...a);return n(...a),d}:n&&(r[o]=n):o==="style"?r[o]={...n,...i}:o==="className"&&(r[o]=[n,i].filter(Boolean).join(" "))}return{...t,...r}}function bo(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var _e=require("react/jsx-runtime"),Ro=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],O=Ro.reduce((t,e)=>{let r=yt(`Primitive.${e}`),o=Ie.forwardRef((n,i)=>{let{asChild:c,...a}=n,d=c?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,_e.jsx)(d,{...a,ref:i})});return o.displayName=`Primitive.${e}`,{...t,[e]:o}},{});function ze(t,e){t&&De.flushSync(()=>t.dispatchEvent(e))}var et=y(require("react"),1);function $(t){let e=et.useRef(t);return et.useEffect(()=>{e.current=t}),et.useMemo(()=>(...r)=>e.current?.(...r),[])}var He=y(require("react"),1);function Ve(t,e=globalThis?.document){let r=$(t);He.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n)};return e.addEventListener("keydown",o,{capture:!0}),()=>e.removeEventListener("keydown",o,{capture:!0})},[r,e])}var Dt=require("react/jsx-runtime"),Mo="DismissableLayer",It="dismissableLayer.update",jo="dismissableLayer.pointerDownOutside",Fo="dismissableLayer.focusOutside",Ue,Ke=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_t=C.forwardRef((t,e)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:i,onInteractOutside:c,onDismiss:a,...d}=t,l=C.useContext(Ke),[u,h]=C.useState(null),p=u?.ownerDocument??globalThis?.document,[,g]=C.useState({}),b=_(e,x=>h(x)),s=Array.from(l.layers),[f]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=s.indexOf(f),L=u?s.indexOf(u):-1,M=l.layersWithOutsidePointerEventsDisabled.size>0,F=L>=v,j=Wo(x=>{let U=x.target,J=[...l.branches].some(ct=>ct.contains(U));!F||J||(n?.(x),c?.(x),x.defaultPrevented||a?.())},p),B=Eo(x=>{let U=x.target;[...l.branches].some(ct=>ct.contains(U))||(i?.(x),c?.(x),x.defaultPrevented||a?.())},p);return Ve(x=>{L===l.layers.size-1&&(o?.(x),!x.defaultPrevented&&a&&(x.preventDefault(),a()))},p),C.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Ue=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Ge(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ue)}},[u,p,r,l]),C.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Ge())},[u,l]),C.useEffect(()=>{let x=()=>g({});return document.addEventListener(It,x),()=>document.removeEventListener(It,x)},[]),(0,Dt.jsx)(O.div,{...d,ref:b,style:{pointerEvents:M?F?"auto":"none":void 0,...t.style},onFocusCapture:H(t.onFocusCapture,B.onFocusCapture),onBlurCapture:H(t.onBlurCapture,B.onBlurCapture),onPointerDownCapture:H(t.onPointerDownCapture,j.onPointerDownCapture)})});_t.displayName=Mo;var So="DismissableLayerBranch",Bo=C.forwardRef((t,e)=>{let r=C.useContext(Ke),o=C.useRef(null),n=_(e,o);return C.useEffect(()=>{let i=o.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),(0,Dt.jsx)(O.div,{...t,ref:n})});Bo.displayName=So;function Wo(t,e=globalThis?.document){let r=$(t),o=C.useRef(!1),n=C.useRef(()=>{});return C.useEffect(()=>{let i=a=>{if(a.target&&!o.current){let l=function(){$e(jo,r,u,{discrete:!0})};var d=l;let u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",n.current),n.current=l,e.addEventListener("click",n.current,{once:!0})):l()}else e.removeEventListener("click",n.current);o.current=!1},c=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),e.removeEventListener("pointerdown",i),e.removeEventListener("click",n.current)}},[e,r]),{onPointerDownCapture:()=>o.current=!0}}function Eo(t,e=globalThis?.document){let r=$(t),o=C.useRef(!1);return C.useEffect(()=>{let n=i=>{i.target&&!o.current&&$e(Fo,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",n),()=>e.removeEventListener("focusin",n)},[e,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ge(){let t=new CustomEvent(It);document.dispatchEvent(t)}function $e(t,e,r,{discrete:o}){let n=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&n.addEventListener(t,e,{once:!0}),o?ze(n,i):n.dispatchEvent(i)}var D=y(require("react"),1);var Qe=require("react/jsx-runtime"),zt="focusScope.autoFocusOnMount",Ht="focusScope.autoFocusOnUnmount",Ye={bubbles:!1,cancelable:!0},Po="FocusScope",Vt=D.forwardRef((t,e)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:i,...c}=t,[a,d]=D.useState(null),l=$(n),u=$(i),h=D.useRef(null),p=_(e,s=>d(s)),g=D.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;D.useEffect(()=>{if(o){let L=function(B){if(g.paused||!a)return;let x=B.target;a.contains(x)?h.current=x:Y(h.current,{select:!0})},M=function(B){if(g.paused||!a)return;let x=B.relatedTarget;x!==null&&(a.contains(x)||Y(h.current,{select:!0}))},F=function(B){if(document.activeElement===document.body)for(let U of B)U.removedNodes.length>0&&Y(a)};var s=L,f=M,v=F;document.addEventListener("focusin",L),document.addEventListener("focusout",M);let j=new MutationObserver(F);return a&&j.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",L),document.removeEventListener("focusout",M),j.disconnect()}}},[o,a,g.paused]),D.useEffect(()=>{if(a){qe.add(g);let s=document.activeElement;if(!a.contains(s)){let v=new CustomEvent(zt,Ye);a.addEventListener(zt,l),a.dispatchEvent(v),v.defaultPrevented||(No(Do(Je(a)),{select:!0}),document.activeElement===s&&Y(a))}return()=>{a.removeEventListener(zt,l),setTimeout(()=>{let v=new CustomEvent(Ht,Ye);a.addEventListener(Ht,u),a.dispatchEvent(v),v.defaultPrevented||Y(s??document.body,{select:!0}),a.removeEventListener(Ht,u),qe.remove(g)},0)}}},[a,l,u,g]);let b=D.useCallback(s=>{if(!r&&!o||g.paused)return;let f=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,v=document.activeElement;if(f&&v){let L=s.currentTarget,[M,F]=Ao(L);M&&F?!s.shiftKey&&v===F?(s.preventDefault(),r&&Y(M,{select:!0})):s.shiftKey&&v===M&&(s.preventDefault(),r&&Y(F,{select:!0})):v===L&&s.preventDefault()}},[r,o,g.paused]);return(0,Qe.jsx)(O.div,{tabIndex:-1,...c,ref:p,onKeyDown:b})});Vt.displayName=Po;function No(t,{select:e=!1}={}){let r=document.activeElement;for(let o of t)if(Y(o,{select:e}),document.activeElement!==r)return}function Ao(t){let e=Je(t),r=Xe(e,t),o=Xe(e.reverse(),t);return[r,o]}function Je(t){let e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Xe(t,e){for(let r of t)if(!Oo(r,{upTo:e}))return r}function Oo(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function To(t){return t instanceof HTMLInputElement&&"select"in t}function Y(t,{select:e=!1}={}){if(t&&t.focus){let r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&To(t)&&e&&t.select()}}var qe=Io();function Io(){let t=[];return{add(e){let r=t[0];e!==r&&r?.pause(),t=Ze(t,e),t.unshift(e)},remove(e){t=Ze(t,e),t[0]?.resume()}}}function Ze(t,e){let r=[...t],o=r.indexOf(e);return o!==-1&&r.splice(o,1),r}function Do(t){return t.filter(e=>e.tagName!=="A")}var mt=y(require("react"),1),tr=y(require("react-dom"),1);var er=require("react/jsx-runtime"),_o="Portal",Ut=mt.forwardRef((t,e)=>{let{container:r,...o}=t,[n,i]=mt.useState(!1);K(()=>i(!0),[]);let c=r||n&&globalThis?.document?.body;return c?tr.default.createPortal((0,er.jsx)(O.div,{...o,ref:e}),c):null});Ut.displayName=_o;var N=y(require("react"),1);var rr=y(require("react"),1);function zo(t,e){return rr.useReducer((r,o)=>e[r][o]??r,t)}var lt=t=>{let{present:e,children:r}=t,o=Ho(e),n=typeof r=="function"?r({present:o.isPresent}):N.Children.only(r),i=_(o.ref,Vo(n));return typeof r=="function"||o.isPresent?N.cloneElement(n,{ref:i}):null};lt.displayName="Presence";function Ho(t){let[e,r]=N.useState(),o=N.useRef(null),n=N.useRef(t),i=N.useRef("none"),c=t?"mounted":"unmounted",[a,d]=zo(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{let l=kt(o.current);i.current=a==="mounted"?l:"none"},[a]),K(()=>{let l=o.current,u=n.current;if(u!==t){let p=i.current,g=kt(l);t?d("MOUNT"):g==="none"||l?.display==="none"?d("UNMOUNT"):d(u&&p!==g?"ANIMATION_OUT":"UNMOUNT"),n.current=t}},[t,d]),K(()=>{if(e){let l,u=e.ownerDocument.defaultView??window,h=g=>{let s=kt(o.current).includes(CSS.escape(g.animationName));if(g.target===e&&s&&(d("ANIMATION_END"),!n.current)){let f=e.style.animationFillMode;e.style.animationFillMode="forwards",l=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=f)})}},p=g=>{g.target===e&&(i.current=kt(o.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{u.clearTimeout(l),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:N.useCallback(l=>{o.current=l?getComputedStyle(l):null,r(l)},[])}}function kt(t){return t?.animationName||"none"}function Vo(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var nr=y(require("react"),1),Gt=0;function ir(){nr.useEffect(()=>{let t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??or()),document.body.insertAdjacentElement("beforeend",t[1]??or()),Gt++,()=>{Gt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Gt--}},[])}function or(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var A=function(){return A=Object.assign||function(e){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},A.apply(this,arguments)};function Lt(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(t);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(r[o[n]]=t[o[n]]);return r}function ar(t,e,r){if(r||arguments.length===2)for(var o=0,n=e.length,i;o<n;o++)(i||!(o in e))&&(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}var Mt=y(require("react"));var E=y(require("react"));var X="right-scroll-bar-position",q="width-before-scroll-bar",Kt="with-scroll-bars-hidden",$t="--removed-body-scroll-bar-size";function wt(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}var cr=require("react");function lr(t,e){var r=(0,cr.useState)(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=e,r.facade}var Ct=y(require("react"));var Uo=typeof window<"u"?Ct.useLayoutEffect:Ct.useEffect,sr=new WeakMap;function Yt(t,e){var r=lr(e||null,function(o){return t.forEach(function(n){return wt(n,o)})});return Uo(function(){var o=sr.get(r);if(o){var n=new Set(o),i=new Set(t),c=r.current;n.forEach(function(a){i.has(a)||wt(a,null)}),i.forEach(function(a){n.has(a)||wt(a,c)})}sr.set(r,t)},[t]),r}function Go(t){return t}function Ko(t,e){e===void 0&&(e=Go);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var c=e(i,o);return r.push(c),function(){r=r.filter(function(a){return a!==c})}},assignSyncMedium:function(i){for(o=!0;r.length;){var c=r;r=[],c.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){o=!0;var c=[];if(r.length){var a=r;r=[],a.forEach(i),c=r}var d=function(){var u=c;c=[],u.forEach(i)},l=function(){return Promise.resolve().then(d)};l(),r={push:function(u){c.push(u),l()},filter:function(u){return c=c.filter(u),r}}}};return n}function Xt(t){t===void 0&&(t={});var e=Ko(null);return e.options=A({async:!0,ssr:!1},t),e}var dr=y(require("react")),ur=function(t){var e=t.sideCar,r=Lt(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=e.read();if(!o)throw new Error("Sidecar medium not found");return dr.createElement(o,A({},r))};ur.isSideCarExport=!0;function qt(t,e){return t.useMedium(e),ur}var bt=Xt();var Zt=function(){},st=E.forwardRef(function(t,e){var r=E.useRef(null),o=E.useState({onScrollCapture:Zt,onWheelCapture:Zt,onTouchMoveCapture:Zt}),n=o[0],i=o[1],c=t.forwardProps,a=t.children,d=t.className,l=t.removeScrollBar,u=t.enabled,h=t.shards,p=t.sideCar,g=t.noRelative,b=t.noIsolation,s=t.inert,f=t.allowPinchZoom,v=t.as,L=v===void 0?"div":v,M=t.gapMode,F=Lt(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=p,B=Yt([r,e]),x=A(A({},F),n);return E.createElement(E.Fragment,null,u&&E.createElement(j,{sideCar:bt,removeScrollBar:l,shards:h,noRelative:g,noIsolation:b,inert:s,setCallbacks:i,allowPinchZoom:!!f,lockRef:r,gapMode:M}),c?E.cloneElement(E.Children.only(a),A(A({},x),{ref:B})):E.createElement(L,A({},x,{className:d,ref:B}),a))});st.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};st.classNames={fullWidth:q,zeroRight:X};var w=y(require("react"));var ot=y(require("react"));var gr=y(require("react"));var hr;var pr=function(){if(hr)return hr;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $o(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=pr();return e&&t.setAttribute("nonce",e),t}function Yo(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Xo(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Qt=function(){var t=0,e=null;return{add:function(r){t==0&&(e=$o())&&(Yo(e,r),Xo(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var Jt=function(){var t=Qt();return function(e,r){gr.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}};var dt=function(){var t=Jt(),e=function(r){var o=r.styles,n=r.dynamic;return t(o,n),null};return e};var qo={left:0,top:0,right:0,gap:0},te=function(t){return parseInt(t||"",10)||0},Zo=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],o=e[t==="padding"?"paddingTop":"marginTop"],n=e[t==="padding"?"paddingRight":"marginRight"];return[te(r),te(o),te(n)]},ee=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return qo;var e=Zo(t),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,o-r+e[2]-e[0])}};var Qo=dt(),rt="data-scroll-locked",Jo=function(t,e,r,o){var n=t.left,i=t.top,c=t.right,a=t.gap;return r===void 0&&(r="margin"),`
|
|
2
|
+
.`.concat(Kt,` {
|
|
3
|
+
overflow: hidden `).concat(o,`;
|
|
4
|
+
padding-right: `).concat(a,"px ").concat(o,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(rt,`] {
|
|
7
|
+
overflow: hidden `).concat(o,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([e&&"position: relative ".concat(o,";"),r==="margin"&&`
|
|
10
|
+
padding-left: `.concat(n,`px;
|
|
11
|
+
padding-top: `).concat(i,`px;
|
|
12
|
+
padding-right: `).concat(c,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(a,"px ").concat(o,`;
|
|
16
|
+
`),r==="padding"&&"padding-right: ".concat(a,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(X,` {
|
|
20
|
+
right: `).concat(a,"px ").concat(o,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(q,` {
|
|
24
|
+
margin-right: `).concat(a,"px ").concat(o,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(X," .").concat(X,` {
|
|
28
|
+
right: 0 `).concat(o,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(q," .").concat(q,` {
|
|
32
|
+
margin-right: 0 `).concat(o,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(rt,`] {
|
|
36
|
+
`).concat($t,": ").concat(a,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},fr=function(){var t=parseInt(document.body.getAttribute(rt)||"0",10);return isFinite(t)?t:0},tn=function(){ot.useEffect(function(){return document.body.setAttribute(rt,(fr()+1).toString()),function(){var t=fr()-1;t<=0?document.body.removeAttribute(rt):document.body.setAttribute(rt,t.toString())}},[])},re=function(t){var e=t.noRelative,r=t.noImportant,o=t.gapMode,n=o===void 0?"margin":o;tn();var i=ot.useMemo(function(){return ee(n)},[n]);return ot.createElement(Qo,{styles:Jo(i,!e,n,r?"":"!important")})};var oe=!1;if(typeof window<"u")try{ut=Object.defineProperty({},"passive",{get:function(){return oe=!0,!0}}),window.addEventListener("test",ut,ut),window.removeEventListener("test",ut,ut)}catch{oe=!1}var ut,Z=oe?{passive:!1}:!1;var en=function(t){return t.tagName==="TEXTAREA"},xr=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!en(t)&&r[e]==="visible")},rn=function(t){return xr(t,"overflowY")},on=function(t){return xr(t,"overflowX")},ne=function(t,e){var r=e.ownerDocument,o=e;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=vr(t,o);if(n){var i=yr(t,o),c=i[1],a=i[2];if(c>a)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},nn=function(t){var e=t.scrollTop,r=t.scrollHeight,o=t.clientHeight;return[e,r,o]},an=function(t){var e=t.scrollLeft,r=t.scrollWidth,o=t.clientWidth;return[e,r,o]},vr=function(t,e){return t==="v"?rn(e):on(e)},yr=function(t,e){return t==="v"?nn(e):an(e)},cn=function(t,e){return t==="h"&&e==="rtl"?-1:1},mr=function(t,e,r,o,n){var i=cn(t,window.getComputedStyle(e).direction),c=i*o,a=r.target,d=e.contains(a),l=!1,u=c>0,h=0,p=0;do{if(!a)break;var g=yr(t,a),b=g[0],s=g[1],f=g[2],v=s-f-i*b;(b||v)&&vr(t,a)&&(h+=v,p+=b);var L=a.parentNode;a=L&&L.nodeType===Node.DOCUMENT_FRAGMENT_NODE?L.host:L}while(!d&&a!==document.body||d&&(e.contains(a)||e===a));return(u&&(n&&Math.abs(h)<1||!n&&c>h)||!u&&(n&&Math.abs(p)<1||!n&&-c>p))&&(l=!0),l};var Rt=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},kr=function(t){return[t.deltaX,t.deltaY]},Lr=function(t){return t&&"current"in t?t.current:t},ln=function(t,e){return t[0]===e[0]&&t[1]===e[1]},sn=function(t){return`
|
|
39
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
41
|
+
`)},dn=0,nt=[];function wr(t){var e=w.useRef([]),r=w.useRef([0,0]),o=w.useRef(),n=w.useState(dn++)[0],i=w.useState(dt)[0],c=w.useRef(t);w.useEffect(function(){c.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(n));var s=ar([t.lockRef.current],(t.shards||[]).map(Lr),!0).filter(Boolean);return s.forEach(function(f){return f.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),s.forEach(function(f){return f.classList.remove("allow-interactivity-".concat(n))})}}},[t.inert,t.lockRef.current,t.shards]);var a=w.useCallback(function(s,f){if("touches"in s&&s.touches.length===2||s.type==="wheel"&&s.ctrlKey)return!c.current.allowPinchZoom;var v=Rt(s),L=r.current,M="deltaX"in s?s.deltaX:L[0]-v[0],F="deltaY"in s?s.deltaY:L[1]-v[1],j,B=s.target,x=Math.abs(M)>Math.abs(F)?"h":"v";if("touches"in s&&x==="h"&&B.type==="range")return!1;var U=window.getSelection(),J=U&&U.anchorNode,ct=J?J===B||J.contains(B):!1;if(ct)return!1;var pt=ne(x,B);if(!pt)return!0;if(pt?j=x:(j=x==="v"?"h":"v",pt=ne(x,B)),!pt)return!1;if(!o.current&&"changedTouches"in s&&(M||F)&&(o.current=j),!j)return!0;var ye=o.current||j;return mr(ye,f,s,ye==="h"?M:F,!0)},[]),d=w.useCallback(function(s){var f=s;if(!(!nt.length||nt[nt.length-1]!==i)){var v="deltaY"in f?kr(f):Rt(f),L=e.current.filter(function(j){return j.name===f.type&&(j.target===f.target||f.target===j.shadowParent)&&ln(j.delta,v)})[0];if(L&&L.should){f.cancelable&&f.preventDefault();return}if(!L){var M=(c.current.shards||[]).map(Lr).filter(Boolean).filter(function(j){return j.contains(f.target)}),F=M.length>0?a(f,M[0]):!c.current.noIsolation;F&&f.cancelable&&f.preventDefault()}}},[]),l=w.useCallback(function(s,f,v,L){var M={name:s,delta:f,target:v,should:L,shadowParent:un(v)};e.current.push(M),setTimeout(function(){e.current=e.current.filter(function(F){return F!==M})},1)},[]),u=w.useCallback(function(s){r.current=Rt(s),o.current=void 0},[]),h=w.useCallback(function(s){l(s.type,kr(s),s.target,a(s,t.lockRef.current))},[]),p=w.useCallback(function(s){l(s.type,Rt(s),s.target,a(s,t.lockRef.current))},[]);w.useEffect(function(){return nt.push(i),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",d,Z),document.addEventListener("touchmove",d,Z),document.addEventListener("touchstart",u,Z),function(){nt=nt.filter(function(s){return s!==i}),document.removeEventListener("wheel",d,Z),document.removeEventListener("touchmove",d,Z),document.removeEventListener("touchstart",u,Z)}},[]);var g=t.removeScrollBar,b=t.inert;return w.createElement(w.Fragment,null,b?w.createElement(i,{styles:sn(n)}):null,g?w.createElement(re,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function un(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}var Cr=qt(bt,wr);var br=Mt.forwardRef(function(t,e){return Mt.createElement(st,A({},t,{ref:e,sideCar:Cr}))});br.classNames=st.classNames;var ie=br;var hn=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},it=new WeakMap,jt=new WeakMap,Ft={},ae=0,Rr=function(t){return t&&(t.host||Rr(t.parentNode))},pn=function(t,e){return e.map(function(r){if(t.contains(r))return r;var o=Rr(r);return o&&t.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},gn=function(t,e,r,o){var n=pn(e,Array.isArray(t)?t:[t]);Ft[r]||(Ft[r]=new WeakMap);var i=Ft[r],c=[],a=new Set,d=new Set(n),l=function(h){!h||a.has(h)||(a.add(h),l(h.parentNode))};n.forEach(l);var u=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(p){if(a.has(p))u(p);else try{var g=p.getAttribute(o),b=g!==null&&g!=="false",s=(it.get(p)||0)+1,f=(i.get(p)||0)+1;it.set(p,s),i.set(p,f),c.push(p),s===1&&b&&jt.set(p,!0),f===1&&p.setAttribute(r,"true"),b||p.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return u(e),a.clear(),ae++,function(){c.forEach(function(h){var p=it.get(h)-1,g=i.get(h)-1;it.set(h,p),i.set(h,g),p||(jt.has(h)||h.removeAttribute(o),jt.delete(h)),g||h.removeAttribute(r)}),ae--,ae||(it=new WeakMap,it=new WeakMap,jt=new WeakMap,Ft={})}},Mr=function(t,e,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),n=e||hn(t);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),gn(o,n,r,"aria-hidden")):function(){return null}};var m=require("react/jsx-runtime"),Bt="Dialog",[jr,qa]=Ae(Bt),[fn,z]=jr(Bt),Fr=t=>{let{__scopeDialog:e,children:r,open:o,defaultOpen:n,onOpenChange:i,modal:c=!0}=t,a=k.useRef(null),d=k.useRef(null),[l,u]=Te({prop:o,defaultProp:n??!1,onChange:i,caller:Bt});return(0,m.jsx)(fn,{scope:e,triggerRef:a,contentRef:d,contentId:ft(),titleId:ft(),descriptionId:ft(),open:l,onOpenChange:u,onOpenToggle:k.useCallback(()=>u(h=>!h),[u]),modal:c,children:r})};Fr.displayName=Bt;var Sr="DialogTrigger",Br=k.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=z(Sr,r),i=_(e,n.triggerRef);return(0,m.jsx)(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":se(n.open),...o,ref:i,onClick:H(t.onClick,n.onOpenToggle)})});Br.displayName=Sr;var ce="DialogPortal",[xn,Wr]=jr(ce,{forceMount:void 0}),Er=t=>{let{__scopeDialog:e,forceMount:r,children:o,container:n}=t,i=z(ce,e);return(0,m.jsx)(xn,{scope:e,forceMount:r,children:k.Children.map(o,c=>(0,m.jsx)(lt,{present:r||i.open,children:(0,m.jsx)(Ut,{asChild:!0,container:n,children:c})}))})};Er.displayName=ce;var St="DialogOverlay",Pr=k.forwardRef((t,e)=>{let r=Wr(St,t.__scopeDialog),{forceMount:o=r.forceMount,...n}=t,i=z(St,t.__scopeDialog);return i.modal?(0,m.jsx)(lt,{present:o||i.open,children:(0,m.jsx)(yn,{...n,ref:e})}):null});Pr.displayName=St;var vn=yt("DialogOverlay.RemoveScroll"),yn=k.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=z(St,r);return(0,m.jsx)(ie,{as:vn,allowPinchZoom:!0,shards:[n.contentRef],children:(0,m.jsx)(O.div,{"data-state":se(n.open),...o,ref:e,style:{pointerEvents:"auto",...o.style}})})}),Q="DialogContent",Nr=k.forwardRef((t,e)=>{let r=Wr(Q,t.__scopeDialog),{forceMount:o=r.forceMount,...n}=t,i=z(Q,t.__scopeDialog);return(0,m.jsx)(lt,{present:o||i.open,children:i.modal?(0,m.jsx)(mn,{...n,ref:e}):(0,m.jsx)(kn,{...n,ref:e})})});Nr.displayName=Q;var mn=k.forwardRef((t,e)=>{let r=z(Q,t.__scopeDialog),o=k.useRef(null),n=_(e,r.contentRef,o);return k.useEffect(()=>{let i=o.current;if(i)return Mr(i)},[]),(0,m.jsx)(Ar,{...t,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H(t.onCloseAutoFocus,i=>{i.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:H(t.onPointerDownOutside,i=>{let c=i.detail.originalEvent,a=c.button===0&&c.ctrlKey===!0;(c.button===2||a)&&i.preventDefault()}),onFocusOutside:H(t.onFocusOutside,i=>i.preventDefault())})}),kn=k.forwardRef((t,e)=>{let r=z(Q,t.__scopeDialog),o=k.useRef(!1),n=k.useRef(!1);return(0,m.jsx)(Ar,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{t.onCloseAutoFocus?.(i),i.defaultPrevented||(o.current||r.triggerRef.current?.focus(),i.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:i=>{t.onInteractOutside?.(i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let c=i.target;r.triggerRef.current?.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&n.current&&i.preventDefault()}})}),Ar=k.forwardRef((t,e)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:i,...c}=t,a=z(Q,r),d=k.useRef(null),l=_(e,d);return ir(),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Vt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:i,children:(0,m.jsx)(_t,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":se(a.open),...c,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(wn,{titleId:a.titleId}),(0,m.jsx)(bn,{contentRef:d,descriptionId:a.descriptionId})]})]})}),le="DialogTitle",Or=k.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=z(le,r);return(0,m.jsx)(O.h2,{id:n.titleId,...o,ref:e})});Or.displayName=le;var Tr="DialogDescription",Ir=k.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=z(Tr,r);return(0,m.jsx)(O.p,{id:n.descriptionId,...o,ref:e})});Ir.displayName=Tr;var Dr="DialogClose",Ln=k.forwardRef((t,e)=>{let{__scopeDialog:r,...o}=t,n=z(Dr,r);return(0,m.jsx)(O.button,{type:"button",...o,ref:e,onClick:H(t.onClick,()=>n.onOpenChange(!1))})});Ln.displayName=Dr;function se(t){return t?"open":"closed"}var _r="DialogTitleWarning",[Za,zr]=Ne(_r,{contentName:Q,titleName:le,docsSlug:"dialog"}),wn=({titleId:t})=>{let e=zr(_r),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
+
|
|
43
|
+
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
+
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return k.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},Cn="DialogDescriptionWarning",bn=({contentRef:t,descriptionId:e})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zr(Cn).contentName}}.`;return k.useEffect(()=>{let n=t.current?.getAttribute("aria-describedby");e&&n&&(document.getElementById(e)||console.warn(o))},[o,t,e]),null},Hr=Fr,Vr=Br,Ur=Er,de=Pr,ue=Nr,he=Or,pe=Ir;var Gr=require("class-variance-authority");var V=require("react/jsx-runtime"),Kr=Hr,$r=Vr;var Mn=Ur,Yr=ht.forwardRef(({className:t,...e},r)=>(0,V.jsx)(de,{className:W("fixed inset-0 z-50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:r}));Yr.displayName=de.displayName;var jn=(0,Gr.cva)("fixed z-50 gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ge=ht.forwardRef(({side:t="right",className:e,children:r,...o},n)=>(0,V.jsxs)(Mn,{children:[(0,V.jsx)(Yr,{}),(0,V.jsx)(ue,{ref:n,className:W(jn({side:t}),e),...o,children:r})]}));ge.displayName=ue.displayName;var Fn=({className:t,...e})=>(0,V.jsx)("div",{className:W("flex flex-col space-y-2 text-center sm:text-left",t),...e});Fn.displayName="SheetHeader";var Sn=({className:t,...e})=>(0,V.jsx)("div",{className:W("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Sn.displayName="SheetFooter";var Bn=ht.forwardRef(({className:t,...e},r)=>(0,V.jsx)(he,{ref:r,className:W("text-lg font-semibold text-foreground",t),...e}));Bn.displayName=he.displayName;var Wn=ht.forwardRef(({className:t,...e},r)=>(0,V.jsx)(pe,{ref:r,className:W("text-sm text-muted-foreground",t),...e}));Wn.displayName=pe.displayName;var Wt=require("lucide-react"),R=require("react/jsx-runtime");function qr({navItems:t=[],onLogoClick:e=()=>{},logo:r}){let[o,n]=(0,Xr.useState)(!1);return(0,R.jsx)("header",{className:"sticky top-0 z-60 w-full border-b border-border/20 bg-background/95 backdrop-blur supports-backdrop-filter:bg-background/60 pointer-events-auto uppercase",style:{pointerEvents:"auto"},children:(0,R.jsxs)("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[(0,R.jsx)("div",{className:"flex items-center gap-1 cursor-pointer group",onClick:()=>{e(),n(!1)},children:(0,R.jsx)("h1",{className:"font-ddin text-1xl md:text-2xl tracking-tight",children:r})}),(0,R.jsx)("div",{className:"hidden md:flex items-center gap-6",children:(0,R.jsx)(()=>(0,R.jsx)(Ce,{children:(0,R.jsx)(be,{className:"gap-2 md:gap-6",children:t.map(c=>(0,R.jsx)(Re,{children:(0,R.jsx)(je,{className:Me(),onClick:c.onClick,children:(0,R.jsx)("span",{className:"font-ddin text-1xl",children:c.label})})},c.label))})}),{})}),(0,R.jsxs)(Kr,{open:o,onOpenChange:n,children:[(0,R.jsx)($r,{asChild:!0,className:"md:hidden",children:(0,R.jsx)(Be,{variant:"ghost",size:"icon","aria-label":"Toggle menu",children:o?(0,R.jsx)(Wt.X,{className:"h-6 w-6"}):(0,R.jsx)(Wt.Menu,{className:"h-6 w-6"})})}),(0,R.jsx)(ge,{side:"right",className:"w-100 border-l border-border/30 mt-16",children:(0,R.jsx)("div",{className:"flex min-h-[calc(100vh-5rem)] flex-col justify-center px-8 py-12 bg-background",children:(0,R.jsx)("nav",{className:"flex flex-col gap-12 md:gap-16",children:t.map(c=>(0,R.jsx)("button",{onClick:()=>{c.onClick(),n(!1)},className:`
|
|
46
|
+
w-full text-left
|
|
47
|
+
text-3xl md:text-4xl
|
|
48
|
+
font-ddin font-medium tracking-wider
|
|
49
|
+
text-foreground hover:text-primary
|
|
50
|
+
transition-colors duration-300
|
|
51
|
+
py-4 px-4 rounded-lg
|
|
52
|
+
hover:bg-muted/30 focus:outline-none focus:ring-2 focus:ring-ring
|
|
53
|
+
`,children:c.label},c.label))})})})]})]})})}var at=y(require("react"),1);var fe=y(require("react"),1),xe={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ve=fe.default.createContext&&fe.default.createContext(xe);var En=["attr","size","title"];function Pn(t,e){if(t==null)return{};var r,o,n=Nn(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Nn(t,e){if(t==null)return{};var r={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(e.indexOf(o)!==-1)continue;r[o]=t[o]}return r}function Et(){return Et=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)({}).hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Et.apply(null,arguments)}function Zr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,o)}return r}function Pt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Zr(Object(r),!0).forEach(function(o){An(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zr(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function An(t,e,r){return(e=On(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function On(t){var e=Tn(t,"string");return typeof e=="symbol"?e:e+""}function Tn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qr(t){return t&&t.map((e,r)=>at.default.createElement(e.tag,Pt({key:r},e.attr),Qr(e.child)))}function Jr(t){return e=>at.default.createElement(In,Et({attr:Pt({},t.attr)},e),Qr(t.child))}function In(t){var e=r=>{var{attr:o,size:n,title:i}=t,c=Pn(t,En),a=n||r.size||"1em",d;return r.className&&(d=r.className),t.className&&(d=(d?d+" ":"")+t.className),at.default.createElement("svg",Et({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,o,c,{className:d,style:Pt(Pt({color:t.color||r.color},r.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&at.default.createElement("title",null,i),t.children)};return ve!==void 0?at.default.createElement(ve.Consumer,null,r=>e(r)):e(xe)}function to(t){return Jr({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(t)}var P=require("react/jsx-runtime");function eo({links:t=[],socials:e=[],copyright:r,...o}){return(0,P.jsx)("footer",{className:"bg-background pt-12 pb-8 w-full font-ddin uppercase text-[10px] sm:text-xs",...o,children:(0,P.jsx)("div",{className:"container mx-auto px-6 max-w-[1400px]",children:(0,P.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6 md:gap-4 text-muted-foreground",children:[(0,P.jsx)("div",{className:"flex items-center gap-6 order-3 md:order-1",children:e.map(n=>{let i=n.icon;return(0,P.jsx)("a",{href:n.href,className:"hover:text-foreground transition-colors",target:"_blank",rel:"noopener noreferrer","aria-label":n.label??"Social link",children:(0,P.jsx)(i,{className:"w-4 h-4"})},n.href)})}),(0,P.jsx)("ul",{className:"flex flex-wrap justify-center items-center gap-6 md:gap-10 order-1 md:order-2 font-medium tracking-widest text-foreground",children:t.map(n=>(0,P.jsx)("li",{children:(0,P.jsxs)("a",{href:n.href,onClick:n.onClick,target:n.isExternal?"_blank":void 0,rel:n.isExternal?"noopener noreferrer":void 0,className:"inline-flex items-center gap-1.5 hover:text-muted-foreground transition-colors",children:[(0,P.jsx)("span",{children:n.label}),n.isExternal&&(0,P.jsx)(to,{className:"inline-block h-3.5 w-3.5 text-muted-foreground/60","aria-hidden":"true"})]})},n.href))}),r&&(0,P.jsx)("div",{className:"order-2 md:order-3 font-medium tracking-widest whitespace-nowrap",children:(0,P.jsxs)("a",{href:r?.companyUrl,target:"_blank",rel:"noopener noreferrer",className:"focus-visible:underline outline-none",children:["\xA9 ",new Date().getFullYear()," ",r?.companyName]})})]})})})}var Nt=require("react/jsx-runtime");function ro({header:t,footer:e,children:r}){return(0,Nt.jsxs)("div",{className:"min-h-screen bg-background text-foreground font-ddin flex flex-col",children:[t,(0,Nt.jsx)("div",{className:"flex-1",children:r}),e]})}0&&(module.exports={Footer,Header,Layout});
|
|
54
|
+
//# sourceMappingURL=index.cjs.map
|