@womp/kookie-ui 0.26.3 → 0.27.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/components.css +138 -0
- package/dist/cjs/components/_internal/pane-chrome.d.ts +7 -1
- package/dist/cjs/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js +1 -1
- package/dist/cjs/components/_internal/pane-chrome.js.map +4 -4
- package/dist/cjs/components/_internal/shell-page-scroll.d.ts +15 -0
- package/dist/cjs/components/_internal/shell-page-scroll.d.ts.map +1 -0
- package/dist/cjs/components/_internal/shell-page-scroll.js +3 -0
- package/dist/cjs/components/_internal/shell-page-scroll.js.map +7 -0
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +4 -4
- package/dist/cjs/components/index.js +2 -2
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/schemas/index.js +1 -1
- package/dist/cjs/components/schemas/index.js.map +2 -2
- package/dist/cjs/components/schemas/shell.schema.d.ts +1 -0
- package/dist/cjs/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/cjs/components/schemas/shell.schema.js +1 -1
- package/dist/cjs/components/schemas/shell.schema.js.map +2 -2
- package/dist/cjs/components/shell.d.ts +11 -0
- package/dist/cjs/components/shell.d.ts.map +1 -1
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +4 -4
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +4 -4
- package/dist/cjs/components/toolbar.js +1 -1
- package/dist/cjs/components/toolbar.js.map +4 -4
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/{chunk-FK434VPA.js → chunk-25ZRMILM.js} +2 -2
- package/dist/esm/{chunk-GMWCTK5G.js → chunk-2E57H3NH.js} +2 -2
- package/dist/esm/{chunk-W3ES2XSB.js → chunk-2S7HPQVX.js} +2 -2
- package/dist/esm/{chunk-27XQ5PN5.js → chunk-2ZKEQS76.js} +2 -2
- package/dist/esm/{chunk-Q2TLWILH.js → chunk-3MFSQ6PN.js} +2 -2
- package/dist/esm/{chunk-WYKNBNM5.js → chunk-5BX2YZV6.js} +2 -2
- package/dist/esm/{chunk-VPP5IDW7.js → chunk-67UEMB4K.js} +2 -2
- package/dist/esm/chunk-6HEORZNJ.js +3 -0
- package/dist/esm/chunk-6HEORZNJ.js.map +7 -0
- package/dist/esm/{chunk-MPCCYR7L.js → chunk-6YWHNLSC.js} +2 -2
- package/dist/esm/{chunk-6C6EK2B5.js → chunk-7V6M3MIR.js} +2 -2
- package/dist/esm/{chunk-T2DZDW5Y.js → chunk-AQKSO3SW.js} +2 -2
- package/dist/esm/{chunk-IDEDEPBM.js → chunk-B6OFKABP.js} +2 -2
- package/dist/esm/chunk-CZ24FOFS.js +3 -0
- package/dist/esm/chunk-CZ24FOFS.js.map +7 -0
- package/dist/esm/{chunk-RP5ORPPH.js → chunk-DP7MPGR7.js} +2 -2
- package/dist/esm/{chunk-UMR4AF35.js → chunk-FMVOB367.js} +2 -2
- package/dist/esm/{chunk-YOZXIUZY.js → chunk-FVRVBB6O.js} +2 -2
- package/dist/esm/{chunk-6JGF6PQH.js → chunk-H2J25HXP.js} +2 -2
- package/dist/esm/{chunk-ACMANOVD.js → chunk-H73AMXCH.js} +2 -2
- package/dist/esm/{chunk-E2LSWNWZ.js → chunk-HBO7W7SS.js} +2 -2
- package/dist/esm/{chunk-2R7WQPXX.js → chunk-HR2VHGJ5.js} +2 -2
- package/dist/esm/{chunk-3UIODOPE.js → chunk-J54GYD7A.js} +2 -2
- package/dist/esm/{chunk-DSM5SUH3.js → chunk-JKQN6QCP.js} +2 -2
- package/dist/esm/{chunk-R7YHDIFM.js → chunk-K3GDM26A.js} +2 -2
- package/dist/esm/{chunk-CGFLZ3DC.js → chunk-KJZSXLIX.js} +2 -2
- package/dist/esm/{chunk-KLYI5E6F.js → chunk-LABMK6Q7.js} +2 -2
- package/dist/esm/{chunk-OLWUS7PC.js → chunk-MJKVVGGV.js} +2 -2
- package/dist/esm/{chunk-Z5W4ACO2.js → chunk-MMDZBPSX.js} +2 -2
- package/dist/esm/chunk-QEDKL23P.js +3 -0
- package/dist/esm/chunk-QEDKL23P.js.map +7 -0
- package/dist/esm/{chunk-ZIAA2C4H.js → chunk-REORAMUH.js} +2 -2
- package/dist/esm/{chunk-MCHK36NI.js → chunk-SUQJ7DD4.js} +2 -2
- package/dist/esm/chunk-TSWHVZ47.js +3 -0
- package/dist/esm/chunk-TSWHVZ47.js.map +7 -0
- package/dist/esm/{chunk-OUOP6Q3Z.js → chunk-VQDCHBZR.js} +2 -2
- package/dist/esm/{chunk-2NWHEGKZ.js → chunk-WAXRIARV.js} +2 -2
- package/dist/esm/{chunk-4CIQRUYW.js → chunk-ZOUIIO4C.js} +2 -2
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/_internal/pane-chrome.d.ts +7 -1
- package/dist/esm/components/_internal/pane-chrome.d.ts.map +1 -1
- package/dist/esm/components/_internal/pane-chrome.js +1 -1
- package/dist/esm/components/_internal/portal-theme.js +1 -1
- package/dist/esm/components/_internal/shell-page-scroll.d.ts +15 -0
- package/dist/esm/components/_internal/shell-page-scroll.d.ts.map +1 -0
- package/dist/esm/components/_internal/shell-page-scroll.js +3 -0
- package/dist/esm/components/_internal/shell-page-scroll.js.map +7 -0
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/accordion.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/avatar.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox.js +1 -1
- package/dist/esm/components/chip.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/message-scroller.js +1 -1
- package/dist/esm/components/notice.js +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/radio.js +1 -1
- package/dist/esm/components/schemas/index.js +1 -1
- package/dist/esm/components/schemas/shell.schema.d.ts +1 -0
- package/dist/esm/components/schemas/shell.schema.d.ts.map +1 -1
- package/dist/esm/components/schemas/shell.schema.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.d.ts +11 -0
- package/dist/esm/components/shell.d.ts.map +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/slider.js +1 -1
- package/dist/esm/components/switch.js +1 -1
- package/dist/esm/components/tabs.js +1 -1
- package/dist/esm/components/text-area.js +1 -1
- package/dist/esm/components/text-field.js +1 -1
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/toggle.js +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/schemas/index.json +6 -1
- package/schemas/shell-root.json +6 -1
- package/src/components/_internal/pane-chrome.tsx +15 -2
- package/src/components/_internal/shell-page-scroll.ts +49 -0
- package/src/components/schemas/shell.schema.ts +4 -1
- package/src/components/shell.css +201 -0
- package/src/components/shell.tsx +128 -22
- package/styles.css +138 -0
- package/dist/esm/chunk-OLTRWCQK.js +0 -3
- package/dist/esm/chunk-OLTRWCQK.js.map +0 -7
- package/dist/esm/chunk-SCIFT27R.js +0 -3
- package/dist/esm/chunk-SCIFT27R.js.map +0 -7
- package/dist/esm/chunk-XGES2VBG.js +0 -3
- package/dist/esm/chunk-XGES2VBG.js.map +0 -7
- /package/dist/esm/{chunk-FK434VPA.js.map → chunk-25ZRMILM.js.map} +0 -0
- /package/dist/esm/{chunk-GMWCTK5G.js.map → chunk-2E57H3NH.js.map} +0 -0
- /package/dist/esm/{chunk-W3ES2XSB.js.map → chunk-2S7HPQVX.js.map} +0 -0
- /package/dist/esm/{chunk-27XQ5PN5.js.map → chunk-2ZKEQS76.js.map} +0 -0
- /package/dist/esm/{chunk-Q2TLWILH.js.map → chunk-3MFSQ6PN.js.map} +0 -0
- /package/dist/esm/{chunk-WYKNBNM5.js.map → chunk-5BX2YZV6.js.map} +0 -0
- /package/dist/esm/{chunk-VPP5IDW7.js.map → chunk-67UEMB4K.js.map} +0 -0
- /package/dist/esm/{chunk-MPCCYR7L.js.map → chunk-6YWHNLSC.js.map} +0 -0
- /package/dist/esm/{chunk-6C6EK2B5.js.map → chunk-7V6M3MIR.js.map} +0 -0
- /package/dist/esm/{chunk-T2DZDW5Y.js.map → chunk-AQKSO3SW.js.map} +0 -0
- /package/dist/esm/{chunk-IDEDEPBM.js.map → chunk-B6OFKABP.js.map} +0 -0
- /package/dist/esm/{chunk-RP5ORPPH.js.map → chunk-DP7MPGR7.js.map} +0 -0
- /package/dist/esm/{chunk-UMR4AF35.js.map → chunk-FMVOB367.js.map} +0 -0
- /package/dist/esm/{chunk-YOZXIUZY.js.map → chunk-FVRVBB6O.js.map} +0 -0
- /package/dist/esm/{chunk-6JGF6PQH.js.map → chunk-H2J25HXP.js.map} +0 -0
- /package/dist/esm/{chunk-ACMANOVD.js.map → chunk-H73AMXCH.js.map} +0 -0
- /package/dist/esm/{chunk-E2LSWNWZ.js.map → chunk-HBO7W7SS.js.map} +0 -0
- /package/dist/esm/{chunk-2R7WQPXX.js.map → chunk-HR2VHGJ5.js.map} +0 -0
- /package/dist/esm/{chunk-3UIODOPE.js.map → chunk-J54GYD7A.js.map} +0 -0
- /package/dist/esm/{chunk-DSM5SUH3.js.map → chunk-JKQN6QCP.js.map} +0 -0
- /package/dist/esm/{chunk-R7YHDIFM.js.map → chunk-K3GDM26A.js.map} +0 -0
- /package/dist/esm/{chunk-CGFLZ3DC.js.map → chunk-KJZSXLIX.js.map} +0 -0
- /package/dist/esm/{chunk-KLYI5E6F.js.map → chunk-LABMK6Q7.js.map} +0 -0
- /package/dist/esm/{chunk-OLWUS7PC.js.map → chunk-MJKVVGGV.js.map} +0 -0
- /package/dist/esm/{chunk-Z5W4ACO2.js.map → chunk-MMDZBPSX.js.map} +0 -0
- /package/dist/esm/{chunk-ZIAA2C4H.js.map → chunk-REORAMUH.js.map} +0 -0
- /package/dist/esm/{chunk-MCHK36NI.js.map → chunk-SUQJ7DD4.js.map} +0 -0
- /package/dist/esm/{chunk-OUOP6Q3Z.js.map → chunk-VQDCHBZR.js.map} +0 -0
- /package/dist/esm/{chunk-2NWHEGKZ.js.map → chunk-WAXRIARV.js.map} +0 -0
- /package/dist/esm/{chunk-4CIQRUYW.js.map → chunk-ZOUIIO4C.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{c as j}from"./chunk-OKQAVYW4.js";import{c as
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{c as j}from"./chunk-OKQAVYW4.js";import{c as I}from"./chunk-5ON3XLRD.js";import{c as E}from"./chunk-HBWBPBSA.js";import{b as L}from"./chunk-XU74PNM2.js";import*as r from"react";import re from"classnames";import{Direction as ae,Slider as v}from"radix-ui";var te=["1","2","3","4"],g={size:{type:"enum",className:"kui-r-size",values:te,default:"2",responsive:!0},showTickLabels:{type:"boolean"},snapToTicks:{type:"boolean"},...E,...L};var ne=r.forwardRef((K,O)=>{let W=I(K,g.size),{className:B,color:G,radius:A,tabIndex:C,...H}=j(W,g),{ticks:c,unit:u,showTickLabels:U,snapToTicks:y,value:$,defaultValue:q,onValueChange:x,onValueCommit:p,"aria-label":F,"aria-labelledby":J,...i}=H,k=i.min??0,d=i.max??100,[Q,X]=r.useState(()=>q??[k]),P=$!==void 0,s=P?$:Q,D=r.useId(),Y=i.step,l=r.useMemo(()=>c?[...c].sort((e,t)=>e.value-t.value):[],[c]),m=r.useCallback(e=>{let t=l[0].value;for(let a of l)Math.abs(a.value-e)<Math.abs(t-e)&&(t=a.value);return t},[l]),R=r.useCallback((e,t)=>{let a=m(e);return e>t&&a<=t?l.find(n=>n.value>t)?.value??t:e<t&&a>=t?[...l].reverse().find(n=>n.value<t)?.value??t:a},[m,l]),f=r.useRef(!1),N=r.useCallback(e=>{let t=a=>u?`${a} ${u}`:a.toString();return e.length===1?`${t(e[0])} out of ${t(d)}`:e.length===2?`${t(e[0])} to ${t(e[1])} out of ${t(d)}`:`${e.map(t).join(", ")} out of ${t(d)}`},[u,d]),Z=ae.useDirection(i.dir),T=i.orientation??"horizontal",V=T==="vertical"?!i.inverted:Z==="rtl"!=!!i.inverted,S=r.useMemo(()=>c?c.map((e,t)=>{let a=(e.value-k)/(d-k)*100;return{...e,percentage:V?100-a:a,index:t}}):null,[c,k,d,V]),b=r.useRef(null),h=r.useRef(null),_=r.useCallback(e=>{b.current&&(b.current.textContent=N(e),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{b.current&&(b.current.textContent="")},1e3))},[N]),w=r.useCallback(e=>{let a=y&&l.length>0?e.map((n,o)=>f.current&&s[o]!==void 0?R(n,s[o]):m(n)):e;P||X(a),x?.(a)},[y,l,R,m,s,x,P]),ee=r.useCallback(e=>{if(!p)return;if(!y||l.length===0){p(e);return}let t=f.current,a=e.map((n,o)=>t&&s[o]!==void 0?R(n,s[o]):m(n));t&&a.every((n,o)=>n===s[o])||p(a)},[p,y,l,R,m,s]);return r.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),r.createElement("div",{className:"kui-SliderContainer","data-orientation":T,"data-has-ticks":S?"":void 0},r.createElement("div",{ref:b,"aria-live":"polite","aria-atomic":"true",className:"kui-sr-only"}),r.createElement(v.Root,{"data-accent-color":G,"data-radius":A,ref:O,...i,value:s,step:Y,onKeyDown:e=>{f.current=!0,i.onKeyDown?.(e)},onPointerDown:e=>{f.current=!1,i.onPointerDown?.(e)},onValueChange:w,onValueCommit:ee,asChild:!1,className:re("kui-SliderRoot",B)},r.createElement(v.Track,{className:"kui-SliderTrack"},r.createElement(v.Range,{className:"kui-SliderRange","data-inverted":i.inverted?"":void 0})),s.map((e,t)=>r.createElement(v.Thumb,{key:t,className:"kui-SliderThumb",...C!==void 0?{tabIndex:C}:void 0,"aria-label":F,"aria-labelledby":J,"aria-valuetext":u?`${e} ${u}`:void 0}))),S&&r.createElement("div",{className:"kui-SliderTicks","data-orientation":T,role:"group","aria-label":"Slider tick marks"},S.map(e=>r.createElement("button",{key:e.index,className:"kui-SliderTick",style:T==="vertical"?{top:`${e.percentage}%`}:{left:`${e.percentage}%`},disabled:i.disabled,onClick:()=>{let t=0;s.forEach((n,o)=>{let M=Math.abs(n-e.value),z=Math.abs(s[t]-e.value);(M<z||M===z&&e.value>n)&&(t=o)});let a=s.map((n,o)=>o===t?e.value:n).sort((n,o)=>n-o);f.current=!1,w(a),p?.(a),_(a)},"aria-label":`Set to ${e.label||(u?`${e.value} ${u}`:e.value)}`,"aria-describedby":e.label?void 0:`${D}-tick-${e.index}`,type:"button"},r.createElement("div",{className:"kui-SliderTickMark"}),e.label&&U!==!1&&r.createElement("div",{className:"kui-SliderTickLabel"},e.label),!e.label&&r.createElement("span",{id:`${D}-tick-${e.index}`,className:"kui-sr-only"},u?`${e.value} ${u}`:e.value)))))});ne.displayName="Slider";export{ne as a};
|
|
3
|
+
//# sourceMappingURL=chunk-B6OFKABP.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{z as e}from"zod";var h=e.enum(["expanded","collapsed"]).describe("Pane state mode"),l=e.enum(["collapsed","expanded"]).describe("Sidebar state"),b=e.enum(["fixed","overlay","stacked"]).describe("Presentation mode"),z=e.enum(["initial","xs","sm","md","lg","xl"]).describe("Responsive breakpoint"),u=e.enum(["left","rail","panel","sidebar","inspector","bottom"]).describe("Pane target. `left` is deprecated: use `rail`."),m=e.enum(["toggle","expand","collapse"]).describe("Trigger action"),d=e.enum(["toggle","dismiss"]).describe("Why the state changed: `toggle` for a trigger or the resize handle, `dismiss` for Escape or the scrim"),S=e.enum(["init","resize","controlled"]).describe("Why the size changed");function r(n){return e.union([n,e.object({initial:n.optional(),xs:n.optional(),sm:n.optional(),md:n.optional(),lg:n.optional(),xl:n.optional()})])}var x=r(h).describe("Responsive pane mode configuration"),p=r(l).describe("Responsive sidebar state"),o=r(b).describe("Responsive presentation configuration"),c=r(e.boolean()).describe("Responsive open state"),f=e.object({load:e.function({output:e.union([e.number(),e.promise(e.number()),e.undefined()])}).optional(),save:e.function({input:[e.number()],output:e.union([e.void(),e.promise(e.void())])}).optional()}).describe("Deprecated, removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`."),t=e.record(e.string(),e.union([e.string(),e.number()])).optional().describe("Inline styles"),a={open:e.union([e.boolean(),c]).optional().describe("The open state, when controlled. A responsive object is deprecated."),defaultOpen:e.union([e.boolean(),c]).optional().describe("The starting state. A responsive object leaves the pane untouched, with that object as the answer at each breakpoint."),onOpenChange:e.function({input:[e.boolean(),e.object({reason:d})],output:e.void()}).optional().describe("Called when a user opens or closes the pane. Never called on mount or on a resize.")},i={id:e.string().optional().describe("The pane id. A Trigger points `aria-controls` at it."),presentation:o.optional(),expandedSize:e.number().optional(),inset:e.boolean().optional().describe("Lifts the pane off the frame and paints the backdrop behind it"),onExpand:e.function({output:e.void()}).optional().describe("Deprecated: use `onOpenChange`"),onCollapse:e.function({output:e.void()}).optional().describe("Deprecated: use `onOpenChange`"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional()},s={minSize:e.number().optional(),maxSize:e.number().optional().describe("The largest size. A drag also stops before the handle leaves the frame."),resizable:e.boolean().optional(),collapsible:e.boolean().optional().describe("A double-click on the handle closes the pane"),size:e.union([e.number(),e.string()]).optional().describe("The size, when controlled"),defaultSize:e.union([e.number(),e.string()]).optional().describe("The starting size"),onSizeChange:e.function({input:[e.number(),e.object({reason:S})],output:e.void()}).optional(),sizeUpdate:e.enum(["throttle","debounce"]).optional().describe("Rate-limits onSizeChange across repeated resize ends, such as key presses on the handle. A drag calls it once, when the drag ends; use onResize for live sizes."),sizeUpdateMs:e.number().optional(),onResize:e.function({input:[e.number()],output:e.void()}).optional().describe("Called during a drag, at most once per animation frame"),onResizeStart:e.function({input:[e.number()],output:e.void()}).optional(),onResizeEnd:e.function({input:[e.number()],output:e.void()}).optional(),snapPoints:e.array(e.number()).optional().describe("Deprecated, removed in 1.0"),snapTolerance:e.number().optional().describe("Deprecated, removed in 1.0"),collapseThreshold:e.number().optional().describe("Deprecated, removed in 1.0"),paneId:e.string().optional().describe("Deprecated, removed in 1.0"),persistence:f.optional()},P=e.object({height:e.union([e.literal("full"),e.literal("auto"),e.string(),e.number()]).default("full").describe("Height of the frame. `full` is the window: 100dvh, with 100vh where dvh is not supported, and on a narrow touch screen the page scrolls. Any value other than `full` or `auto` makes the Shell contained."),contained:e.boolean().default(!1).describe("Fills the parent instead of the window and always scrolls inside itself. An explicit `height` implies it."),size:e.enum(["1","2","3"]).default("2").describe("Index of the pane chrome and the Sidebar rows in it"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("The Shell parts, and anything else, rendered in order")}).strict(),y=e.object({height:e.number().default(64).describe("Height of the header, in pixels"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Header content")}).strict(),v=e.object({...i,...a,presentation:o.default("fixed").describe("Presentation mode"),expandedSize:e.number().default(64).describe("Width in pixels"),collapsible:e.boolean().optional()}).strict(),w=e.object({...i,...a,...s,presentation:o.optional().describe("Presentation mode. With no value the panel follows the Rail's."),expandedSize:e.number().default(288).describe("Open width in pixels"),minSize:e.number().default(100).describe("Minimum width when resizing"),maxSize:e.number().default(800).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the panel can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the panel")}).strict(),R=e.object({...i,...s,state:e.union([l,p]).optional().describe("The state, when controlled. A responsive object is deprecated."),defaultState:p.optional().describe("The starting state. With no value the sidebar is open where it is in the frame and closed where it is an overlay."),onStateChange:e.function({input:[l,e.object({reason:d})],output:e.void()}).optional().describe("Called when a user changes the state. Never called on mount or on a resize."),presentation:o.default({initial:"overlay",sm:"fixed"}).describe("Presentation mode"),expandedSize:e.number().default(288).describe("Open width in pixels"),minSize:e.number().default(200).describe("Minimum width when resizing"),maxSize:e.number().default(400).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the sidebar can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the sidebar")}).strict(),T=e.object({inset:e.boolean().optional().describe("Lifts the pane off the frame and paints the backdrop behind it"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Main content")}).strict(),C=e.object({...i,...a,...s,presentation:o.default({initial:"overlay",sm:"fixed"}).describe("Presentation mode"),expandedSize:e.number().default(320).describe("Open width in pixels"),minSize:e.number().default(200).describe("Minimum width when resizing"),maxSize:e.number().default(500).describe("Maximum width when resizing"),resizable:e.boolean().default(!1).describe("Whether the inspector can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the inspector")}).strict(),N=e.object({...i,...a,...s,presentation:o.default("fixed").describe("Presentation mode"),expandedSize:e.number().default(200).describe("Open height in pixels"),minSize:e.number().default(100).describe("Minimum height when resizing"),maxSize:e.number().default(400).describe("Maximum height when resizing"),resizable:e.boolean().default(!1).describe("Whether the bottom panel can be resized"),collapsible:e.boolean().default(!0).describe("Whether a double-click on the handle closes the panel")}).strict(),k=e.object({target:u.describe("Which pane to drive"),action:m.default("toggle").describe("Action to perform"),peekOnHover:e.boolean().default(!1).describe("Deprecated, removed in 1.0. Shows a preview of a closed pane on hover."),type:e.enum(["button","submit","reset"]).default("button").describe("The button type"),className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Trigger content"),onClick:e.function().optional().describe("Runs before the trigger acts. Call `event.preventDefault()` to cancel it."),onMouseEnter:e.function().optional().describe("Mouse enter handler"),onMouseLeave:e.function().optional().describe("Mouse leave handler"),"aria-label":e.string().optional().describe("ARIA label for accessibility"),"aria-labelledby":e.string().optional().describe("ARIA labelled by reference"),"aria-describedby":e.string().optional().describe("ARIA described by reference")}).strict(),A=e.object({className:e.string().optional().describe("Additional CSS class name"),style:t,children:e.any().optional().describe("Handle content")}).strict();function M(n){return n}function E(n){return n}function O(n){return n}function j(n){return n}function D(n){return n}function H(n){return n}function W(n){return n}function _(n){return n}function I(n){return n}function V(n){return n}export{P as a,y as b,v as c,w as d,R as e,T as f,C as g,N as h,k as i,A as j,M as k,E as l,O as m,j as n,D as o,H as p,W as q,_ as r,I as s,V as t};
|
|
3
|
+
//# sourceMappingURL=chunk-CZ24FOFS.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/schemas/shell.schema.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod';\n\n/**\n * Shell Zod schema: the Shell's props, for tools that read a schema\n * (editors, assistants, documentation).\n *\n * Shell is the frame of an application. Each pane holds its own open state;\n * a pane nobody has touched follows the window, and the stylesheet resolves\n * it at each breakpoint. Callbacks report user actions only.\n *\n * @example\n * ```tsx\n * const props = ShellRootSchema.parse({ height: 'full' });\n *\n * const sidebarProps = ShellSidebarSchema.parse({\n * defaultState: { initial: 'collapsed', md: 'expanded' },\n * presentation: { initial: 'overlay', sm: 'fixed' },\n * });\n * ```\n */\n\n// Common types\nconst PaneModeSchema = z.enum(['expanded', 'collapsed']).describe('Pane state mode');\nconst SidebarModeSchema = z.enum(['collapsed', 'expanded']).describe('Sidebar state');\nconst PresentationValueSchema = z.enum(['fixed', 'overlay', 'stacked']).describe('Presentation mode');\nconst _BreakpointSchema = z.enum(['initial', 'xs', 'sm', 'md', 'lg', 'xl']).describe('Responsive breakpoint');\nconst PaneTargetSchema = z.enum(['left', 'rail', 'panel', 'sidebar', 'inspector', 'bottom']).describe('Pane target. `left` is deprecated: use `rail`.');\nconst TriggerActionSchema = z.enum(['toggle', 'expand', 'collapse']).describe('Trigger action');\nconst OpenChangeReasonSchema = z.enum(['toggle', 'dismiss']).describe('Why the state changed: `toggle` for a trigger or the resize handle, `dismiss` for Escape or the scrim');\nconst SizeChangeReasonSchema = z.enum(['init', 'resize', 'controlled']).describe('Why the size changed');\n\nfunction responsive<T extends z.ZodTypeAny>(value: T) {\n return z.union([\n value,\n z.object({\n initial: value.optional(),\n xs: value.optional(),\n sm: value.optional(),\n md: value.optional(),\n lg: value.optional(),\n xl: value.optional(),\n }),\n ]);\n}\n\n// Responsive schemas\nconst _ResponsiveModeSchema = responsive(PaneModeSchema).describe('Responsive pane mode configuration');\nconst ResponsiveSidebarModeSchema = responsive(SidebarModeSchema).describe('Responsive sidebar state');\nconst ResponsivePresentationSchema = responsive(PresentationValueSchema).describe('Responsive presentation configuration');\nconst ResponsiveOpenSchema = responsive(z.boolean()).describe('Responsive open state');\n\n// Size persistence adapter (deprecated)\nconst PaneSizePersistenceSchema = z\n .object({\n load: z.function({ output: z.union([z.number(), z.promise(z.number()), z.undefined()]) }).optional(),\n save: z.function({ input: [z.number()], output: z.union([z.void(), z.promise(z.void())]) }).optional(),\n })\n .describe('Deprecated, removed in 1.0. Keep the size in your own state with `size`/`onSizeChange`.');\n\nconst StyleSchema = z\n .record(z.string(), z.union([z.string(), z.number()]))\n .optional()\n .describe('Inline styles');\n\nconst OpenPropsSchema = {\n open: z.union([z.boolean(), ResponsiveOpenSchema]).optional().describe('The open state, when controlled. A responsive object is deprecated.'),\n defaultOpen: z\n .union([z.boolean(), ResponsiveOpenSchema])\n .optional()\n .describe('The starting state. A responsive object leaves the pane untouched, with that object as the answer at each breakpoint.'),\n onOpenChange: z\n .function({ input: [z.boolean(), z.object({ reason: OpenChangeReasonSchema })], output: z.void() })\n .optional()\n .describe('Called when a user opens or closes the pane. Never called on mount or on a resize.'),\n};\n\n// Props shared by every pane\nconst PaneBaseShape = {\n id: z.string().optional().describe('The pane id. A Trigger points `aria-controls` at it.'),\n presentation: ResponsivePresentationSchema.optional(),\n expandedSize: z.number().optional(),\n inset: z.boolean().optional().describe('Lifts the pane off the frame and paints the backdrop behind it'),\n onExpand: z.function({ output: z.void() }).optional().describe('Deprecated: use `onOpenChange`'),\n onCollapse: z.function({ output: z.void() }).optional().describe('Deprecated: use `onOpenChange`'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional(),\n};\n\n// Props of a pane that resizes\nconst ResizeShape = {\n minSize: z.number().optional(),\n maxSize: z.number().optional().describe('The largest size. A drag also stops before the handle leaves the frame.'),\n resizable: z.boolean().optional(),\n collapsible: z.boolean().optional().describe('A double-click on the handle closes the pane'),\n size: z.union([z.number(), z.string()]).optional().describe('The size, when controlled'),\n defaultSize: z.union([z.number(), z.string()]).optional().describe('The starting size'),\n onSizeChange: z.function({ input: [z.number(), z.object({ reason: SizeChangeReasonSchema })], output: z.void() }).optional(),\n sizeUpdate: z\n .enum(['throttle', 'debounce'])\n .optional()\n .describe('Rate-limits onSizeChange across repeated resize ends, such as key presses on the handle. A drag calls it once, when the drag ends; use onResize for live sizes.'),\n sizeUpdateMs: z.number().optional(),\n onResize: z\n .function({ input: [z.number()], output: z.void() })\n .optional()\n .describe('Called during a drag, at most once per animation frame'),\n onResizeStart: z.function({ input: [z.number()], output: z.void() }).optional(),\n onResizeEnd: z.function({ input: [z.number()], output: z.void() }).optional(),\n snapPoints: z.array(z.number()).optional().describe('Deprecated, removed in 1.0'),\n snapTolerance: z.number().optional().describe('Deprecated, removed in 1.0'),\n collapseThreshold: z.number().optional().describe('Deprecated, removed in 1.0'),\n paneId: z.string().optional().describe('Deprecated, removed in 1.0'),\n persistence: PaneSizePersistenceSchema.optional(),\n};\n\n/**\n * Shell.Root component schema\n */\nexport const ShellRootSchema = z\n .object({\n height: z\n .union([z.literal('full'), z.literal('auto'), z.string(), z.number()])\n .default('full')\n .describe(\n 'Height of the frame. `full` is the window: 100dvh, with 100vh where dvh is not supported, and on a narrow touch screen the page scrolls. Any value other than `full` or `auto` makes the Shell contained.',\n ),\n contained: z.boolean().default(false).describe('Fills the parent instead of the window and always scrolls inside itself. An explicit `height` implies it.'),\n size: z.enum(['1', '2', '3']).default('2').describe('Index of the pane chrome and the Sidebar rows in it'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('The Shell parts, and anything else, rendered in order'),\n })\n .strict();\n\n/**\n * Shell.Header component schema\n */\nexport const ShellHeaderSchema = z\n .object({\n height: z.number().default(64).describe('Height of the header, in pixels'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Header content'),\n })\n .strict();\n\n/**\n * Shell.Rail component schema\n */\nexport const ShellRailSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n presentation: ResponsivePresentationSchema.default('fixed').describe('Presentation mode'),\n expandedSize: z.number().default(64).describe('Width in pixels'),\n collapsible: z.boolean().optional(),\n })\n .strict();\n\n/**\n * Shell.Panel component schema\n */\nexport const ShellPanelSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n ...ResizeShape,\n presentation: ResponsivePresentationSchema.optional().describe(\"Presentation mode. With no value the panel follows the Rail's.\"),\n expandedSize: z.number().default(288).describe('Open width in pixels'),\n minSize: z.number().default(100).describe('Minimum width when resizing'),\n maxSize: z.number().default(800).describe('Maximum width when resizing'),\n resizable: z.boolean().default(false).describe('Whether the panel can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the panel'),\n })\n .strict();\n\n/**\n * Shell.Sidebar component schema\n */\nexport const ShellSidebarSchema = z\n .object({\n ...PaneBaseShape,\n ...ResizeShape,\n state: z.union([SidebarModeSchema, ResponsiveSidebarModeSchema]).optional().describe('The state, when controlled. A responsive object is deprecated.'),\n defaultState: ResponsiveSidebarModeSchema.optional().describe('The starting state. With no value the sidebar is open where it is in the frame and closed where it is an overlay.'),\n onStateChange: z\n .function({ input: [SidebarModeSchema, z.object({ reason: OpenChangeReasonSchema })], output: z.void() })\n .optional()\n .describe('Called when a user changes the state. Never called on mount or on a resize.'),\n presentation: ResponsivePresentationSchema.default({ initial: 'overlay', sm: 'fixed' }).describe('Presentation mode'),\n expandedSize: z.number().default(288).describe('Open width in pixels'),\n minSize: z.number().default(200).describe('Minimum width when resizing'),\n maxSize: z.number().default(400).describe('Maximum width when resizing'),\n resizable: z.boolean().default(false).describe('Whether the sidebar can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the sidebar'),\n })\n .strict();\n\n/**\n * Shell.Content component schema\n */\nexport const ShellContentSchema = z\n .object({\n inset: z.boolean().optional().describe('Lifts the pane off the frame and paints the backdrop behind it'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Main content'),\n })\n .strict();\n\n/**\n * Shell.Inspector component schema\n */\nexport const ShellInspectorSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n ...ResizeShape,\n presentation: ResponsivePresentationSchema.default({ initial: 'overlay', sm: 'fixed' }).describe('Presentation mode'),\n expandedSize: z.number().default(320).describe('Open width in pixels'),\n minSize: z.number().default(200).describe('Minimum width when resizing'),\n maxSize: z.number().default(500).describe('Maximum width when resizing'),\n resizable: z.boolean().default(false).describe('Whether the inspector can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the inspector'),\n })\n .strict();\n\n/**\n * Shell.Bottom component schema\n */\nexport const ShellBottomSchema = z\n .object({\n ...PaneBaseShape,\n ...OpenPropsSchema,\n ...ResizeShape,\n presentation: ResponsivePresentationSchema.default('fixed').describe('Presentation mode'),\n expandedSize: z.number().default(200).describe('Open height in pixels'),\n minSize: z.number().default(100).describe('Minimum height when resizing'),\n maxSize: z.number().default(400).describe('Maximum height when resizing'),\n resizable: z.boolean().default(false).describe('Whether the bottom panel can be resized'),\n collapsible: z.boolean().default(true).describe('Whether a double-click on the handle closes the panel'),\n })\n .strict();\n\n/**\n * Shell.Trigger component schema\n */\nexport const ShellTriggerSchema = z\n .object({\n target: PaneTargetSchema.describe('Which pane to drive'),\n action: TriggerActionSchema.default('toggle').describe('Action to perform'),\n peekOnHover: z.boolean().default(false).describe('Deprecated, removed in 1.0. Shows a preview of a closed pane on hover.'),\n type: z.enum(['button', 'submit', 'reset']).default('button').describe('The button type'),\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Trigger content'),\n onClick: z.function().optional().describe('Runs before the trigger acts. Call `event.preventDefault()` to cancel it.'),\n onMouseEnter: z.function().optional().describe('Mouse enter handler'),\n onMouseLeave: z.function().optional().describe('Mouse leave handler'),\n 'aria-label': z.string().optional().describe('ARIA label for accessibility'),\n 'aria-labelledby': z.string().optional().describe('ARIA labelled by reference'),\n 'aria-describedby': z.string().optional().describe('ARIA described by reference'),\n })\n .strict();\n\n/**\n * Shell.Handle component schema (for resize handles)\n */\nexport const ShellHandleSchema = z\n .object({\n className: z.string().optional().describe('Additional CSS class name'),\n style: StyleSchema,\n children: z.any().optional().describe('Handle content'),\n })\n .strict();\n\n// Type exports\nexport type ShellRootProps = z.infer<typeof ShellRootSchema>;\nexport type ShellHeaderProps = z.infer<typeof ShellHeaderSchema>;\nexport type ShellRailProps = z.infer<typeof ShellRailSchema>;\nexport type ShellPanelProps = z.infer<typeof ShellPanelSchema>;\nexport type ShellSidebarProps = z.infer<typeof ShellSidebarSchema>;\nexport type ShellContentProps = z.infer<typeof ShellContentSchema>;\nexport type ShellInspectorProps = z.infer<typeof ShellInspectorSchema>;\nexport type ShellBottomProps = z.infer<typeof ShellBottomSchema>;\nexport type ShellTriggerProps = z.infer<typeof ShellTriggerSchema>;\nexport type ShellHandleProps = z.infer<typeof ShellHandleSchema>;\n\n// Common type exports\nexport type PaneMode = z.infer<typeof PaneModeSchema>;\nexport type SidebarMode = z.infer<typeof SidebarModeSchema>;\nexport type PresentationValue = z.infer<typeof PresentationValueSchema>;\nexport type Breakpoint = z.infer<typeof _BreakpointSchema>;\nexport type PaneTarget = z.infer<typeof PaneTargetSchema>;\nexport type TriggerAction = z.infer<typeof TriggerActionSchema>;\nexport type ResponsiveMode = z.infer<typeof _ResponsiveModeSchema>;\nexport type ResponsiveSidebarMode = z.infer<typeof ResponsiveSidebarModeSchema>;\nexport type ResponsivePresentation = z.infer<typeof ResponsivePresentationSchema>;\nexport type PaneSizePersistence = z.infer<typeof PaneSizePersistenceSchema>;\n\n/**\n * Development-only helper to validate and normalize Shell props\n * This function should only be used in development mode\n *\n * @param props - Props to validate and normalize\n * @returns Validated and normalized props\n *\n * @example\n * ```tsx\n * // In development, this will validate props and show helpful errors\n * const validatedProps = parseShellRootProps({ height: 'invalid' });\n * // Throws validation errors for invalid values\n * ```\n */\nexport function parseShellRootProps(props: unknown): ShellRootProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellRootSchema.parse(props);\n }\n return props as ShellRootProps;\n}\n\nexport function parseShellHeaderProps(props: unknown): ShellHeaderProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellHeaderSchema.parse(props);\n }\n return props as ShellHeaderProps;\n}\n\nexport function parseShellRailProps(props: unknown): ShellRailProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellRailSchema.parse(props);\n }\n return props as ShellRailProps;\n}\n\nexport function parseShellPanelProps(props: unknown): ShellPanelProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellPanelSchema.parse(props);\n }\n return props as ShellPanelProps;\n}\n\nexport function parseShellSidebarProps(props: unknown): ShellSidebarProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellSidebarSchema.parse(props);\n }\n return props as ShellSidebarProps;\n}\n\nexport function parseShellContentProps(props: unknown): ShellContentProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellContentSchema.parse(props);\n }\n return props as ShellContentProps;\n}\n\nexport function parseShellInspectorProps(props: unknown): ShellInspectorProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellInspectorSchema.parse(props);\n }\n return props as ShellInspectorProps;\n}\n\nexport function parseShellBottomProps(props: unknown): ShellBottomProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellBottomSchema.parse(props);\n }\n return props as ShellBottomProps;\n}\n\nexport function parseShellTriggerProps(props: unknown): ShellTriggerProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellTriggerSchema.parse(props);\n }\n return props as ShellTriggerProps;\n}\n\nexport function parseShellHandleProps(props: unknown): ShellHandleProps {\n if (process.env.NODE_ENV === 'development') {\n return ShellHandleSchema.parse(props);\n }\n return props as ShellHandleProps;\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["z", "PaneModeSchema", "SidebarModeSchema", "PresentationValueSchema", "_BreakpointSchema", "PaneTargetSchema", "TriggerActionSchema", "OpenChangeReasonSchema", "SizeChangeReasonSchema", "responsive", "value", "_ResponsiveModeSchema", "ResponsiveSidebarModeSchema", "ResponsivePresentationSchema", "ResponsiveOpenSchema", "PaneSizePersistenceSchema", "StyleSchema", "OpenPropsSchema", "PaneBaseShape", "ResizeShape", "ShellRootSchema", "ShellHeaderSchema", "ShellRailSchema", "ShellPanelSchema", "ShellSidebarSchema", "ShellContentSchema", "ShellInspectorSchema", "ShellBottomSchema", "ShellTriggerSchema", "ShellHandleSchema", "parseShellRootProps", "props", "parseShellHeaderProps", "parseShellRailProps", "parseShellPanelProps", "parseShellSidebarProps", "parseShellContentProps", "parseShellInspectorProps", "parseShellBottomProps", "parseShellTriggerProps", "parseShellHandleProps"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{c as A}from"./chunk-GKDGNPBD.js";import{c as l}from"./chunk-5KMEUZWN.js";import{c}from"./chunk-OKQAVYW4.js";import{c as
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{c as A}from"./chunk-GKDGNPBD.js";import{c as l}from"./chunk-5KMEUZWN.js";import{c}from"./chunk-OKQAVYW4.js";import{c as R}from"./chunk-5ON3XLRD.js";import{c as P}from"./chunk-HBWBPBSA.js";import{b as f}from"./chunk-XU74PNM2.js";import{a as n}from"./chunk-CLJ6SEGP.js";import{a as x}from"./chunk-VQPANPMI.js";var b={};x(b,{Content:()=>I,Header:()=>w,Item:()=>h,Root:()=>v,Trigger:()=>D});import*as o from"react";import a from"classnames";import{Accordion as d}from"radix-ui";var H=["1","2","3","4"],O=["raised","soft","surface","outline","ghost"],m={...n,size:{type:"enum",className:"kui-r-size",values:H,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:O,default:"raised"},...P,...f},g={...n},u={...n},C={...n},y={...n};var v=o.forwardRef((e,r)=>{let t=R(e,m.size),{className:i,radius:s,color:N,...T}=c(t,m),p=T;return p.type==="single"&&p.collapsible===void 0&&(p.collapsible=!0),o.createElement(d.Root,{...p,ref:r,className:a("kui-AccordionRoot",i),"data-accent-color":N,"data-radius":s})});v.displayName="Accordion.Root";var h=o.forwardRef((e,r)=>{let{className:t,...i}=c(e,g);return o.createElement(d.Item,{...i,ref:r,className:a("kui-AccordionItem",t)})});h.displayName="Accordion.Item";var w=o.forwardRef((e,r)=>{let{className:t,...i}=c(e,u);return o.createElement(d.Header,{...i,ref:r,className:a("kui-AccordionHeader",t)})});w.displayName="Accordion.Header";var D=o.forwardRef(({children:e,...r},t)=>{let{className:i,...s}=c(r,C);return o.createElement(d.Trigger,{...s,ref:t,className:a("kui-AccordionTrigger",i)},o.createElement(l,null,e),o.createElement(A,{className:"kui-AccordionChevron","aria-hidden":!0}))});D.displayName="Accordion.Trigger";var I=o.forwardRef((e,r)=>{let{className:t,children:i,...s}=c(e,y);return o.createElement(d.Content,{...s,ref:r,className:a("kui-AccordionContent",t)},o.createElement("div",{className:"kui-AccordionContentInner"},i))});I.displayName="Accordion.Content";export{v as a,h as b,w as c,D as d,I as e,b as f};
|
|
3
|
+
//# sourceMappingURL=chunk-DP7MPGR7.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as r}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as r}from"./chunk-KJZSXLIX.js";import*as e from"react";import d from"classnames";import{Toggle as g}from"radix-ui";var i=e.forwardRef(({pressed:o,onPressedChange:t,defaultPressed:s,children:a,className:l,...n},p)=>{delete n.done;let u=e.useRef(!1);return e.useEffect(()=>{},[o,t]),e.createElement(g.Root,{pressed:o,onPressedChange:t,defaultPressed:s,asChild:!0},e.createElement(r,{...n,ref:p,className:d("kui-Toggle",l)},a))});i.displayName="Toggle";export{i as a};
|
|
3
|
+
//# sourceMappingURL=chunk-FMVOB367.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as r}from"./chunk-GHUAUFG7.js";import{a as
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as r}from"./chunk-GHUAUFG7.js";import{a as B}from"./chunk-5ON3XLRD.js";import{a as S,b as H}from"./chunk-HBWBPBSA.js";import{a as w}from"./chunk-XU74PNM2.js";import{a as I}from"./chunk-CLJ6SEGP.js";import*as o from"react";import W from"classnames";import{Direction as j,Slot as q}from"radix-ui";function E(a){switch(a){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var V=["inherit","light","dark"],N=["sans","mono","serif"],M=["1","2","3","4"],e={...I,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:V,default:"inherit"},accentColor:{type:"enum",values:S,default:"gray"},grayColor:{type:"enum",values:H,default:"gray"},radius:{type:"enum",values:w,default:"full"},fontFamily:{type:"enum",values:N,default:"sans"},headingFontFamily:{type:"enum",values:N},size:{type:"enum",values:M,default:"2"}};var t=()=>{},J={appearance:e.appearance.default,accentColor:e.accentColor.default,grayColor:e.grayColor.default,resolvedGrayColor:e.grayColor.default,radius:e.radius.default,fontFamily:e.fontFamily.default,headingFontFamily:void 0,size:e.size.default,onAppearanceChange:t,onAccentColorChange:t,onGrayColorChange:t,onRadiusChange:t,onFontFamilyChange:t,onHeadingFontFamilyChange:t,onSizeChange:t},b=o.createContext(void 0);function ne(){return o.useContext(b)??J}var K=o.forwardRef((a,i)=>{let n=o.useContext(b),c=j.useDirection();return n===void 0?o.createElement(j.Provider,{dir:c},o.createElement(O,{...a,ref:i})):o.createElement(k,{...a,ref:i})});K.displayName="Theme";var O=o.forwardRef((a,i)=>{let{appearance:n=e.appearance.default,accentColor:c=e.accentColor.default,grayColor:p=e.grayColor.default,radius:C=e.radius.default,fontFamily:s=e.fontFamily.default,headingFontFamily:l,size:m=e.size.default,hasBackground:d=e.hasBackground.default,...h}=a,[u,y]=r(n),[g,F]=r(c),[T,P]=r(p),[v,R]=r(C),[z,x]=r(s),[D,f]=r(l),[A,G]=r(m);return o.createElement(k,{...h,ref:i,isRoot:!0,hasBackground:d,appearance:u,accentColor:g,grayColor:T,radius:v,fontFamily:z,headingFontFamily:D,size:A,onAppearanceChange:y,onAccentColorChange:F,onGrayColorChange:P,onRadiusChange:R,onFontFamilyChange:x,onHeadingFontFamilyChange:f,onSizeChange:G})});O.displayName="ThemeRoot";var k=o.forwardRef((a,i)=>{let n=o.useContext(b),{asChild:c,isRoot:p,hasBackground:C,appearance:s=a.appearance??n?.appearance??e.appearance.default,accentColor:l=a.accentColor??n?.accentColor??e.accentColor.default,grayColor:m=a.grayColor??n?.resolvedGrayColor??e.grayColor.default,radius:d=a.radius??n?.radius??e.radius.default,fontFamily:h=a.fontFamily??n?.fontFamily??e.fontFamily.default,headingFontFamily:u=a.headingFontFamily??n?.headingFontFamily,size:y=a.size??n?.size??e.size.default,onAppearanceChange:g=n?.onAppearanceChange??t,onAccentColorChange:F=n?.onAccentColorChange??t,onGrayColorChange:T=n?.onGrayColorChange??t,onRadiusChange:P=n?.onRadiusChange??t,onFontFamilyChange:v=n?.onFontFamilyChange??t,onHeadingFontFamilyChange:R=n?.onHeadingFontFamilyChange??t,onSizeChange:z=n?.onSizeChange??t,...x}=a,D=c?q.Root:"div",f=m==="auto"?E(l):m,A=a.appearance==="light"||a.appearance==="dark",G=C===void 0?p||A:C;return o.createElement(b.Provider,{value:o.useMemo(()=>({appearance:s,accentColor:l,grayColor:m,resolvedGrayColor:f,radius:d,fontFamily:h,headingFontFamily:u,size:y,onAppearanceChange:g,onAccentColorChange:F,onGrayColorChange:T,onRadiusChange:P,onFontFamilyChange:v,onHeadingFontFamilyChange:R,onSizeChange:z}),[s,l,m,f,d,h,u,y,g,F,T,P,v,R,z])},o.createElement(B.Provider,{value:y},o.createElement(D,{"data-is-root-theme":p?"true":"false","data-accent-color":l,"data-gray-color":f,"data-has-background":G?"true":"false","data-radius":d,"data-font-family":h,"data-heading-font-family":u,ref:i,...x,className:W("kui-theme",{light:s==="light",dark:s==="dark"},x.className)})))});k.displayName="ThemeImpl";export{b as a,ne as b,K as c};
|
|
3
|
+
//# sourceMappingURL=chunk-FVRVBB6O.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{c as t}from"./chunk-OKQAVYW4.js";import{c as
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{c as t}from"./chunk-OKQAVYW4.js";import{c as p}from"./chunk-5ON3XLRD.js";import{c as r}from"./chunk-HBWBPBSA.js";import*as e from"react";import R from"classnames";import{composeEventHandlers as P}from"radix-ui/internal";var c=["1","2","3","4"],o={size:{type:"enum",className:"kui-r-size",values:c,default:"2",responsive:!0},...r};var y=e.forwardRef((s,a)=>{let i=p(s,o.size),{className:n,color:m,onChange:f,onValueChange:u,...d}=t(i,o);return e.createElement("input",{type:"radio","data-accent-color":m,...d,onChange:P(f,l=>u?.(l.currentTarget.value)),ref:a,className:R("kui-reset","kui-BaseRadioRoot","kui-RadioRoot",n)})});y.displayName="Radio";export{y as a};
|
|
3
|
+
//# sourceMappingURL=chunk-H2J25HXP.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{f as x}from"./chunk-TSWHVZ47.js";import{a as T,c as b}from"./chunk-3QWGSRYC.js";import{a as V,b as k,c as I}from"./chunk-LTUW36HM.js";import{a as N,b as w,c as B}from"./chunk-QKCNGEX4.js";import{a as E}from"./chunk-WEBNIUEX.js";import{b as A,d as H,g as U}from"./chunk-XUCR7L4G.js";import{a as y}from"./chunk-G66WDIIV.js";import{o as M}from"./chunk-GHWEXMF6.js";import*as e from"react";import pe from"classnames";import{useComposedRefs as ue}from"radix-ui/internal";var D=t=>t==="collapsed"?"closed":"open",Se=t=>t==="closed"?"collapsed":"expanded";function L(t){if(t===void 0)return;if(typeof t=="string")return D(t);let n={};for(let[r,i]of Object.entries(t))i!==void 0&&(n[r]=D(i));return n}var ce={controlled:"state",default:"defaultState"},be={initial:"overlay",sm:"fixed"},O=e.forwardRef((t,n)=>{let{className:r,presentation:i=be,expandedSize:o=288,minSize:s=200,maxSize:d=400,resizable:m=!1,collapsible:_=!0,onExpand:$,onCollapse:W,onResize:j,onResizeStart:q,onResizeEnd:F,snapPoints:l,snapTolerance:G,collapseThreshold:p,paneId:u,persistence:S,children:K,style:J,state:Q,defaultState:X,onStateChange:Y,size:f,defaultSize:P,onSizeChange:Z,sizeUpdate:ee,sizeUpdateMs:ae=50,inset:h,id:te,...c}=t,{table:g,attributes:ne}=I(i,"fixed"),a=V({name:"sidebar",label:"Sidebar",propNames:ce,id:te,controlled:L(Q),defaultValue:L(X),presentationTable:g,builtIn:A,onChange:(de,le)=>Y?.(Se(de),{reason:le}),onExpand:$,onCollapse:W,size:o});M("sidebar",h),e.useEffect(()=>{(l!==void 0||p!==void 0||u!==void 0||S!==void 0)&&void 0},[l,p,u,S]);let z=e.useRef(null),ie=ue(n,a.setElement,z),oe=w({name:"sidebar",elementId:a.id,elementRef:z,cssVarName:"--sidebar-size",orientation:"vertical",edge:"end",growth:H,expandedSize:o,minSize:s,maxSize:d,resizable:m,collapsible:_,size:f,defaultSize:P,onSizeChange:Z,sizeUpdate:ee,sizeUpdateMs:ae,onResize:j,onResizeStart:q,onResizeEnd:F,snapPoints:l,snapTolerance:G,collapseThreshold:p,paneId:u,persistence:S,overlaying:a.overlaying,overlayingNow:()=>g[y()]==="overlay",requestCollapse:()=>a.setValue("closed","toggle"),requestToggle:()=>a.toggle("toggle")}),{handles:v,content:re}=B(K,b),se=m&&a.value!=="closed"&&!a.overlaying?e.createElement(E.Provider,{value:oe},v.length>0?v:e.createElement(T,null)):null,R=a.peeking?`var(--sidebar-size, ${o}px)`:void 0,C=N(f,P,s,d);return e.createElement("div",{...U(c),role:c.role??"navigation",id:a.id,ref:ie,className:pe("kui-ShellPane","kui-ShellSidebar",r),...k(a,ne),"data-inset":h||void 0,tabIndex:a.overlaying?-1:c.tabIndex,style:{...J,"--sidebar-expanded-size":`${o}px`,...C?{"--sidebar-size":C}:{},"--sidebar-min-size":`${s}px`,"--sidebar-max-size":`${d}px`,...R?{"--peek-sidebar-width":R}:{}}},e.createElement("div",{className:"kui-ShellSidebarContent"},e.createElement(x,null,re)),se)});O.displayName="Shell.Sidebar";O.Handle=b;export{O as a};
|
|
3
|
+
//# sourceMappingURL=chunk-H73AMXCH.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as P}from"./chunk-4MNRLB57.js";import{c as f}from"./chunk-OKQAVYW4.js";import{
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as P}from"./chunk-4MNRLB57.js";import{c as f}from"./chunk-OKQAVYW4.js";import{b as l}from"./chunk-5ON3XLRD.js";import{c as G}from"./chunk-HBWBPBSA.js";import{a as n}from"./chunk-CLJ6SEGP.js";import{a as S}from"./chunk-VQPANPMI.js";var _={};S(_,{Item:()=>N,Root:()=>C});import*as o from"react";import c from"classnames";import{Context as v}from"radix-ui/internal";import{RadioGroup as d}from"radix-ui";var h=["1","2","3","4"],R={...n,size:{type:"enum",className:"kui-r-size",values:h,default:"2",responsive:!0},...G};var y="RadioGroup",[D]=v.createContextScope(y,[d.createRadioGroupScope]),I=d.createRadioGroupScope(),[E,x]=D(y),C=o.forwardRef(({color:a=R.color.default,size:e,...t},r)=>{let i=l(e,R.size),{__scopeRadioGroup:p,className:s,...m}=t,z=I(p);return o.createElement(E,{scope:p,color:a,size:i},o.createElement(d.Root,{...z,...m,ref:r,className:c("kui-RadioGroupRoot",s)}))});C.displayName="RadioGroup.Root";var N=o.forwardRef((a,e)=>{let{__scopeRadioGroup:t,children:r,className:i,style:p,...s}=a,{size:m}=x("RadioGroupItem",t);return r?o.createElement(P,{as:"label",size:m,className:c("kui-RadioGroupItem",i),style:p},o.createElement(u,{__scopeRadioGroup:t,...s,ref:e}),r&&o.createElement("span",{className:"kui-RadioGroupItemInner"},r)):o.createElement(u,{__scopeRadioGroup:t,...s,ref:e,className:i,style:p})});N.displayName="RadioGroup.Item";var u=o.forwardRef(({__scopeRadioGroup:a,...e},t)=>{let r=x("RadioGroupItemRadio",a),i=I(a),{color:p,className:s}=f({...e,...r},R);return o.createElement(d.Item,{...i,"data-accent-color":p,...e,asChild:!1,ref:t,className:c("kui-reset","kui-BaseRadioRoot",s)})});u.displayName="RadioGroup.ItemRadio";export{C as a,N as b,_ as c};
|
|
3
|
+
//# sourceMappingURL=chunk-HBO7W7SS.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as P}from"./chunk-FATCGZZE.js";import{a as g}from"./chunk-7VJF6EXN.js";import{a as h}from"./chunk-JP36JSNP.js";import{a}from"./chunk-TGRHRMQI.js";import{a as f}from"./chunk-4MNRLB57.js";import{c as p}from"./chunk-OKQAVYW4.js";import{a as c}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as P}from"./chunk-FATCGZZE.js";import{a as g}from"./chunk-7VJF6EXN.js";import{a as h}from"./chunk-JP36JSNP.js";import{a}from"./chunk-TGRHRMQI.js";import{a as f}from"./chunk-4MNRLB57.js";import{c as p}from"./chunk-OKQAVYW4.js";import{a as c}from"./chunk-AQKSO3SW.js";import{c as m}from"./chunk-5ON3XLRD.js";import{a as W}from"./chunk-VQPANPMI.js";var B={};W(B,{Close:()=>T,Content:()=>R,Description:()=>D,Root:()=>C,Title:()=>y,Trigger:()=>u});import*as e from"react";import k from"classnames";import{Dialog as r}from"radix-ui";var C=o=>e.createElement(r.Root,{...o,modal:!0});C.displayName="Sheet.Root";var u=e.forwardRef(({children:o,...t},i)=>e.createElement(r.Trigger,{...t,ref:i,asChild:!0},a(o)));u.displayName="Sheet.Trigger";var{align:Q,...w}=P,d=w,S=e.createContext(null),R=e.forwardRef((o,t)=>{let{side:i="start",forceMount:s,container:n,className:v,...E}=o,b=m(E,d.size),N={left:"start",right:"end",start:"start",end:"end",top:"top",bottom:"bottom"}[i],{className:x,...O}=p(b,d),z=e.useRef(0),M=e.useCallback(l=>{typeof t=="function"?t(l):t&&(t.current=l)},[t]);return g(),e.createElement(r.Portal,{container:n,forceMount:s},e.createElement(S.Provider,{value:z},e.createElement(c,{asChild:!0},e.createElement(r.Overlay,{className:"kui-BaseDialogOverlay kui-DialogOverlay kui-SheetOverlay"},e.createElement(r.Content,{...O,ref:M,className:k("kui-BaseDialogContent","kui-SheetContent",v,x),"data-side":N,"aria-modal":"true"})))))});R.displayName="Sheet.Content";var y=e.forwardRef(({size:o="4",weight:t="medium",...i},s)=>{let n=e.useContext(S);return e.useLayoutEffect(()=>{if(n)return n.current+=1,()=>{n.current-=1}},[n]),e.createElement(r.Title,{asChild:!0},e.createElement(h,{ref:s,size:o,weight:t,...i}))});y.displayName="Sheet.Title";var D=e.forwardRef(({size:o="2",emphasis:t="medium",...i},s)=>e.createElement(r.Description,{asChild:!0},e.createElement(f,{ref:s,size:o,emphasis:t,...i})));D.displayName="Sheet.Description";var T=e.forwardRef(({children:o,...t},i)=>e.createElement(r.Close,{...t,ref:i,asChild:!0},a(o)));T.displayName="Sheet.Close";export{C as a,u as b,R as c,y as d,D as e,T as f,B as g};
|
|
3
|
+
//# sourceMappingURL=chunk-HR2VHGJ5.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{b as a}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{b as a}from"./chunk-6YWHNLSC.js";import{c as s}from"./chunk-OKQAVYW4.js";import{e as r}from"./chunk-HBWBPBSA.js";import{b as i}from"./chunk-XU74PNM2.js";import{a as p}from"./chunk-CLJ6SEGP.js";import*as o from"react";import g from"classnames";import{Slot as x}from"radix-ui";var R=["1","2","3","4"],N=["raised","solid","soft","surface","outline","ghost"],n={...p,size:{type:"enum",className:"kui-r-size",values:R,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:N,default:"raised"},...r,...i};var T=o.forwardRef((l,m)=>{let{asChild:f,className:c,children:d,color:h,radius:u,tooltip:e,tooltipSide:P="top",tooltipAlign:C="center",tooltipDelayDuration:y,tooltipDisableHoverableContent:D,...b}=s(l,n),v=f?x.Root:"span",t=o.createElement(v,{"data-accent-color":h,"data-radius":u,tabIndex:e?0:void 0,...b,ref:m,className:g("kui-reset","kui-Chip",c)},d);return e?o.createElement(a,{content:e,side:P,align:C,delayDuration:y,disableHoverableContent:D},t):t});T.displayName="Chip";export{T as a};
|
|
3
|
+
//# sourceMappingURL=chunk-J54GYD7A.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{c as r}from"./chunk-OKQAVYW4.js";import{c as
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{c as r}from"./chunk-OKQAVYW4.js";import{c as s}from"./chunk-5ON3XLRD.js";import{c as o}from"./chunk-HBWBPBSA.js";import*as e from"react";import w from"classnames";import{Switch as i}from"radix-ui";var n=["1","2","3","4"],t={size:{type:"enum",className:"kui-r-size",values:n,default:"2",responsive:!0},...o};var l=e.forwardRef((p,c)=>{let m=s(p,t.size),{className:f,color:a,...h}=r(m,t);return e.createElement(i.Root,{"data-accent-color":a,...h,asChild:!1,ref:c,className:w("kui-reset","kui-SwitchRoot",f)},e.createElement(i.Thumb,{className:"kui-SwitchThumb"}))});l.displayName="Switch";export{l as a};
|
|
3
|
+
//# sourceMappingURL=chunk-JKQN6QCP.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{b,c as P}from"./chunk-OKQAVYW4.js";import{c}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{b,c as P}from"./chunk-OKQAVYW4.js";import{c as v}from"./chunk-5ON3XLRD.js";import{c}from"./chunk-HBWBPBSA.js";import{b as y}from"./chunk-XU74PNM2.js";import*as e from"react";import x from"classnames";var w=["1","2","3","4"],I=["raised","surface","soft","outline","ghost"],j=["none","vertical","horizontal","both"],p={size:{type:"enum",className:"kui-r-size",values:w,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:I,default:"raised"},resize:{type:"enum",className:"kui-r-resize",values:j,responsive:!0},error:{type:"boolean",default:!1},errorMessage:{type:"string",default:void 0},required:{type:"boolean",default:!1},"aria-describedby":{type:"string",default:void 0},"aria-labelledby":{type:"string",default:void 0},...c,...y};var q=e.forwardRef((g,A)=>{let{className:d,style:l,...D}=v(g,p.size),{className:T,color:z,radius:N,style:u,...r}=P(D,p),a=!!r.errorMessage,o=e.useId(),{"aria-describedby":i,"aria-labelledby":f,"aria-invalid":s}=r,n=!!r.error||s===!0||s==="true",m=e.useMemo(()=>{let t=[];return r.errorMessage&&t.push(o),i&&t.push(i),t.length>0?t.join(" "):void 0},[r.errorMessage,i,o]),h=e.useMemo(()=>({"aria-invalid":n?!0:s,"aria-describedby":m,"aria-labelledby":f}),[n,s,m,f]),{error:E,errorMessage:B,required:R,"aria-describedby":C,"aria-labelledby":S,...M}=r,k=e.createElement("div",{"data-accent-color":z,"data-radius":N,className:x("kui-TextAreaRoot",T,!a&&d,{"kui-error":n}),style:a?u:b(u,l)},e.createElement("textarea",{className:"kui-reset kui-TextAreaInput",ref:A,...M,required:R||void 0,...h}));return e.createElement("div",{className:x("kui-TextAreaWrapper",a&&d),style:a?l:void 0,"data-message":a||void 0},k,a?e.createElement("div",{id:o,className:"kui-TextAreaErrorMessage",role:"alert"},r.errorMessage):null)});q.displayName="TextArea";export{q as a};
|
|
3
|
+
//# sourceMappingURL=chunk-K3GDM26A.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as c}from"./chunk-Y2DBXOLT.js";import{b as p}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as c}from"./chunk-Y2DBXOLT.js";import{b as p}from"./chunk-6YWHNLSC.js";import{a as u}from"./chunk-2ZKEQS76.js";import*as t from"react";import O from"classnames";var C={loud:"solid",medium:"raised",quiet:"ghost"};function T(e){if(e["aria-label"]||e["aria-labelledby"])return;console.error("Button: an `iconOnly` button must have an accessible name. Pass `aria-label`, or `aria-labelledby` referencing a label element.")}var w=t.forwardRef(({className:e,style:a,tooltip:r,tooltipSide:d="top",tooltipAlign:m="center",tooltipDelayDuration:B,tooltipDisableHoverableContent:b,iconOnly:s=!1,emphasis:n,variant:i,...o},y)=>{let{tooltipId:f,hasTooltip:P,accessibilityProps:R}=c(r);s&&(T(o),o.fullWidth=!1);let h=n!==void 0?C[n]:i,g=o["aria-describedby"],v=R["aria-describedby"],E=[g,v].filter(Boolean).join(" ")||void 0,l=t.createElement(u,{...o,variant:h,"aria-describedby":E,ref:y,"data-icon-only":s||void 0,className:O("kui-Button",e),style:a});return P?t.createElement(p,{content:r,side:d,align:m,delayDuration:B,disableHoverableContent:b,id:f},l):l});w.displayName="Button";export{w as a};
|
|
3
|
+
//# sourceMappingURL=chunk-KJZSXLIX.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as nt}from"./chunk-6C6EK2B5.js";import{a as Be}from"./chunk-WUCBFB25.js";import{a as we}from"./chunk-CGFLZ3DC.js";import{a as Ae}from"./chunk-4MNRLB57.js";import{a as De}from"./chunk-BUXK5VGR.js";import{a as ze}from"./chunk-KVVRFWGQ.js";import{g as Qe,h as Ze,j as et}from"./chunk-GKDGNPBD.js";import{b as U}from"./chunk-5KMEUZWN.js";import{a as at}from"./chunk-MGWGD6KI.js";import{b as tt}from"./chunk-5ON3XLRD.js";import{a as Ht}from"./chunk-VQPANPMI.js";var Wt={};Ht(Wt,{AttachTrigger:()=>Rt,Attachment:()=>$e,AttachmentsRow:()=>pt,InlineEnd:()=>mt,InlineStart:()=>dt,Item:()=>bt,Root:()=>lt,Row:()=>Ct,RowEnd:()=>vt,RowStart:()=>gt,Send:()=>yt,Textarea:()=>ut});import*as e from"react";import E from"classnames";import{useComposedRefs as st,useLayoutEffect as je}from"radix-ui/internal";import{useDropzone as Ft}from"react-dropzone";function ot(t,r){let{placeholder:a}=t;if(!a){r();return}t.placeholder="";try{r()}finally{t.placeholder=a}}var It={values:["1","2","3"]},it=e.createContext(null),We=e.createContext(""),I=()=>{let t=e.useContext(it);if(!t)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return t},me=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(r=>r.trim()).filter(Boolean):[],zt=(t,r)=>{if(r.length===0)return!0;let a=t.type.toLowerCase(),i=t.name.toLowerCase();for(let c of r){let l=c.toLowerCase();if(l.includes("/")){let[u,d]=l.split("/"),[g,y]=a.split("/");if(u==="*"||u===g&&(d==="*"||d===y))return!0}else if(l.startsWith(".")&&i.endsWith(l))return!0}return!1},Dt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,ct=(t,r)=>(r||"").toLowerCase().startsWith("image/")||Dt.test(t),Ve=t=>t.trim().length>0,rt=(t,r)=>`${t} ${r}${t===1?"":"s"}`,Bt=0,jt=()=>`chatbar-attachment-${Date.now()}-${++Bt}`,lt=e.forwardRef((t,r)=>{let{className:a,style:i,children:c,value:l,defaultValue:u="",onValueChange:d,open:g,defaultOpen:y=!1,onOpenChange:R,expandOn:p="both",minLines:v=3,maxLines:x=6,sendMode:w="whenDirty",disabled:b,readOnly:S,onSubmit:D,size:O,variant:z,color:H,radius:F,width:Q,maxWidth:f,attachments:_,defaultAttachments:B,onAttachmentsChange:se,accept:A,multiple:L=!0,maxAttachments:Z,maxFileSize:G,paste:j=!0,pasteAccept:q,clearOnSubmit:V=!0,onAttachmentReject:N,dropzone:M=!0,apiRef:ke,onBlurCapture:pe,notices:he,context:fe,...Se}=t,W=tt(O,It),Ee=l!=null,[n,C]=e.useState(u),k=Ee?l:n,ee=g!=null,[X,te]=e.useState(y),ie=ee?g:X,Y="attachments"in t,[ce,be]=e.useState(()=>B??[]),le=e.useMemo(()=>Y?_??[]:ce,[Y,_,ce]),[Ke,xt]=e.useState({text:"",id:0}),ue=e.useCallback(o=>xt(s=>({text:o,id:s.id+1})),[]),Ue=e.useRef(null),Pt=st(r,Ue),Te=e.useRef(null),Le=e.useRef(null),de=e.useRef(!1),Re=e.useRef(!1),Ce=e.useRef(void 0),Ne=e.useRef(null),_e=me(A).join(","),Me=me(q).join(","),Oe=e.useMemo(()=>me(_e),[_e]),At=e.useMemo(()=>Me?me(Me):Oe,[Me,Oe]),Ge={value:k,attachments:le,accepts:Oe,pasteAccepts:At,multiple:L,maxAttachments:Z,maxFileSize:G,disabled:b,readOnly:S,expandOn:p,isValueControlled:Ee,isOpenControlled:ee,isAttachmentsControlled:Y,onValueChange:d,onOpenChange:R,onAttachmentsChange:se,onAttachmentReject:N,onSubmit:D},P=e.useRef(Ge);P.current=Ge;let He=e.useRef(null),$=e.useCallback(()=>He.current??P.current.attachments,[]),ae=e.useCallback(o=>{P.current.isOpenControlled||te(o),P.current.onOpenChange?.(o)},[]),ge=e.useCallback(o=>{P.current.isValueControlled||C(o),P.current.onValueChange?.(o)},[]),ne=e.useCallback(o=>{He.current=o,queueMicrotask(()=>{He.current=null}),P.current.isAttachmentsControlled||be(o),P.current.onAttachmentsChange?.(o)},[]),ve=e.useRef(new Set),oe=e.useCallback((o,s,m=P.current.multiple)=>{let h=P.current;if(h.disabled||h.readOnly||o.length===0)return 0;let K=$(),J=[],re=[],Mt=typeof h.maxAttachments=="number"?Math.max(h.maxAttachments-K.length,0):1/0,Ot=m?1/0:1;for(let T of o){if(J.length>=Mt||J.length>=Ot){re.push({file:T,reason:"count"});continue}if(typeof h.maxFileSize=="number"&&T.size>h.maxFileSize){re.push({file:T,reason:"size"});continue}if(!zt(T,s)){re.push({file:T,reason:"type"});continue}let Ie=ct(T.name,T.type)?URL.createObjectURL(T):void 0;Ie&&ve.current.add(Ie),J.push({id:jt(),name:T.name,size:T.size,type:T.type,file:T,url:Ie,status:"idle"})}let Pe=[];return J.length>0&&(ne(K.concat(J)),h.expandOn!=="none"&&ae(!0),Pe.push(`${rt(J.length,"file")} attached.`)),re.length>0&&(h.onAttachmentReject?.(re),Pe.push(`${rt(re.length,"file")} could not be attached.`)),Pe.length>0&&ue(Pe.join(" ")),J.length},[$,ne,ae,ue]),ye=e.useCallback(o=>oe(o,P.current.accepts),[oe]),qe=e.useCallback(o=>oe(o,P.current.pasteAccepts),[oe]),Xe=e.useCallback(o=>{let s=$(),m=s.find(h=>h.id===o);m&&(ne(s.filter(h=>h.id!==o)),ue(`Removed ${m.name}.`))},[$,ne,ue]),Ye=e.useCallback(o=>{let s=P.current;if(s.disabled||s.readOnly)return!1;let m=$();if(!Ve(s.value)&&m.length===0)return!1;let h={value:s.value,attachments:m};if(o&&s.onSubmit)for(let K of m)K.url&&ve.current.delete(K.url);return s.onSubmit?.(h),o&&(ge(""),ne([])),!0},[$,ge,ne]);e.useEffect(()=>{let o=ve.current;if(o.size===0)return;let s=new Set(le.map(m=>m.url));for(let m of Array.from(o))s.has(m)||(URL.revokeObjectURL(m),o.delete(m))},[le]),e.useEffect(()=>{let o=ve.current;return()=>{if(!P.current.isAttachmentsControlled){for(let s of Array.from(o))URL.revokeObjectURL(s);o.clear()}}},[]);let xe=e.useCallback(o=>{let s=P.current,m=Le.current;if(clearTimeout(Ce.current),Re.current=!1,!m||s.disabled||s.readOnly)return;let h=o?.accept!=null?me(o.accept):s.accepts,K=o?.multiple??s.multiple;Ne.current={patterns:h,multiple:K},m.accept=h.join(","),m.multiple=K,de.current=!0,m.click(),setTimeout(()=>{document.hasFocus()&&(de.current=!1)},1e3)},[]),Je=e.useCallback(()=>{Re.current=!0,clearTimeout(Ce.current),Ce.current=setTimeout(()=>{Re.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(Ce.current),[]),e.useEffect(()=>{let o=Le.current,s=()=>{de.current=!1};return window.addEventListener("focus",s),o?.addEventListener("cancel",s),()=>{window.removeEventListener("focus",s),o?.removeEventListener("cancel",s)}},[]);let wt=e.useCallback(o=>{let s=o.currentTarget,m=Array.from(s.files??[]),h=Ne.current;oe(m,h?.patterns??P.current.accepts,h?.multiple),de.current=!1,Ne.current=null,s.value=""},[oe]),kt=e.useCallback(o=>{pe?.(o);let s=P.current,m=Ue.current;if(!m||s.expandOn==="none")return;let h=o.relatedTarget;h&&m.contains(h)||de.current||Re.current||!Ve(s.value)&&$().length===0&&ae(!1)},[pe,ae,$]),St=e.useCallback(o=>{ye(o)},[ye]),{getRootProps:Et,isDragActive:Tt}=Ft({onDrop:St,onDragEnter:()=>ue(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!M||b||S}),Fe=M&&Tt;e.useImperativeHandle(ke,()=>({focusTextarea:()=>Te.current?.focus({preventScroll:!0}),openFilePicker:()=>xe()}),[xe]);let Lt=e.useCallback(o=>{if(b||o.pointerType==="mouse"&&o.button!==0)return;let s=o.target;s instanceof Element&&s.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(o.preventDefault(),Te.current?.focus({preventScroll:!0}))},[b]),Nt=e.useMemo(()=>({open:ie,setOpen:ae,setValue:ge,size:W,expandOn:p,minLines:v,maxLines:x,sendMode:w,disabled:b,readOnly:S,paste:j,clearOnSubmit:V,multiple:L,textareaRef:Te,attachments:le,removeAttachment:Xe,submit:Ye,appendFiles:ye,appendFilesFromPaste:qe,openFilePicker:xe,beginFilePickerPress:Je}),[ie,ae,ge,W,p,v,x,w,b,S,j,V,L,le,Xe,Ye,ye,qe,xe,Je]);return e.createElement(it.Provider,{value:Nt},e.createElement(We.Provider,{value:k},e.createElement(e.Fragment,null,e.createElement("div",{...Se,ref:Pt,className:E("kui-ChatbarRoot",`kui-r-size-${W}`,a),style:{position:"relative",width:Q,maxWidth:f,...i},"data-state":ie?"open":"closed","data-disabled":b?"":void 0,"data-readonly":S?"":void 0,"data-drop-active":Fe?"":void 0,"data-accent-color":H,"data-radius":F,onBlurCapture:kt},e.createElement("input",{ref:Le,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:wt}),he?e.createElement("div",{className:"kui-ChatbarNotices"},e.createElement(nt.Provider,{value:W},he)):null,e.createElement("div",{...M?Et():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Lt},e.createElement("div",{className:E("kui-ChatbarBox",`kui-variant-${z??"raised"}`),style:{position:"relative"},"data-accent-color":H,"data-radius":F},e.createElement("div",{className:"kui-ChatbarGrid"},c),Fe&&e.createElement("div",{className:"kui-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"kui-ChatbarDropContent"},e.createElement(Ae,{emphasis:"medium",size:W,weight:"medium"},"Drop files here to attach"))))),fe?e.createElement(Ae,{as:"div",size:W==="3"?"2":"1",emphasis:"medium",className:"kui-ChatbarContext"},fe):null,e.createElement(Be,{role:"status","aria-live":"polite"},Fe?"Drop files here to attach.":e.createElement("span",{key:Ke.id},Ke.text))))))});lt.displayName="Chatbar.Root";var ut=e.forwardRef((t,r)=>{let{className:a,style:i,asChild:c,onFocus:l,onChange:u,onPaste:d,onKeyDown:g,onCompositionStart:y,onCompositionEnd:R,submitOnEnter:p=!1,...v}=t,x=I(),w=e.useContext(We),{open:b,minLines:S,maxLines:D,expandOn:O,disabled:z,readOnly:H,setOpen:F,setValue:Q,textareaRef:f,paste:_,appendFilesFromPaste:B,size:se,submit:A,clearOnSubmit:L}=x,Z=st(r,f),G=e.useRef(0),j=e.useRef(0),q=e.useRef(!1),V=e.useRef({open:b,minLines:S,maxLines:D});je(()=>{V.current={open:b,minLines:S,maxLines:D}},[b,S,D]);let N=e.useCallback(()=>{let n=f.current;if(!n)return;let C=window.getComputedStyle(n);G.current=parseFloat(C.lineHeight)||20,j.current=(parseFloat(C.paddingTop)||0)+(parseFloat(C.paddingBottom)||0)},[f]),M=e.useCallback((n,C)=>{let{minLines:k,maxLines:ee}=V.current,X=G.current,te=j.current,ie=Math.ceil((C?k:1)*X)+te,Y=Math.ceil((C?ee:1)*X)+te,ce=Math.max(n.scrollHeight,ie);n.style.height=`${Math.min(ce,Y)}px`;let be=ce>Y;n.style.overflowY=be?"auto":"hidden",n.style.maxHeight=be?`${Y}px`:"none"},[]);je(()=>{N()},[N,se]),je(()=>{let n=f.current;n&&(G.current===0&&N(),ot(n,()=>{n.style.height="auto";let C=b;if(!b&&(O==="overflow"||O==="both")){let k=Math.ceil(G.current)+j.current;n.scrollHeight>k+1&&(C=!0,F(!0))}M(n,C)}))},[w,b,O,S,D,se,F,f,N,M]),e.useEffect(()=>{let n=f.current;if(!n||typeof ResizeObserver>"u")return;let C=-1,k=new ResizeObserver(ee=>{let X=ee[0]?.contentRect.width??0;if(X===C)return;let te=C===-1;C=X,!te&&(N(),ot(n,()=>{n.style.height="auto",M(n,V.current.open)}))});return k.observe(n),()=>k.disconnect()},[f,N,M]),e.useEffect(()=>{},[]);let ke=e.useCallback(n=>{l?.(n),!(z||H)&&(O==="focus"||O==="both")&&!b&&F(!0)},[z,H,O,b,F,l]),pe=e.useCallback(n=>{Q(n.currentTarget.value),u?.(n)},[Q,u]),he=e.useCallback(n=>{if(d?.(n),n.defaultPrevented||!_||z||H)return;let C=Array.from(n.clipboardData?.items??[]).filter(k=>k.kind==="file").map(k=>k.getAsFile()).filter(k=>!!k);C.length!==0&&B(C)>0&&n.preventDefault()},[_,z,H,d,B]),fe=e.useCallback(n=>{q.current=!0,y?.(n)},[y]),Se=e.useCallback(n=>{q.current=!1,R?.(n)},[R]),W=e.useCallback(n=>{g?.(n),!(n.defaultPrevented||!p)&&(n.key!=="Enter"||n.shiftKey||n.altKey||n.ctrlKey||n.metaKey||q.current||n.nativeEvent.isComposing||n.nativeEvent.keyCode===229||(n.preventDefault(),A(L)))},[p,g,A,L]);return e.createElement("div",{className:"kui-ChatbarField kui-ChatbarTextarea"},e.createElement(c?U:"textarea",{...v,ref:Z,className:E("kui-ChatbarInput",a),value:w,onChange:pe,onFocus:ke,onPaste:he,onKeyDown:W,onCompositionStart:fe,onCompositionEnd:Se,disabled:z,readOnly:H,rows:b?S:1,spellCheck:v.spellCheck??!0,autoCorrect:v.autoCorrect??"on",style:i}))});ut.displayName="Chatbar.Textarea";var dt=e.forwardRef((t,r)=>{let{children:a,asChild:i,className:c,...l}=t;return I().open?null:e.createElement(i?U:"div",{...l,ref:r,className:E("kui-ChatbarInlineStart",c)},a)});dt.displayName="Chatbar.InlineStart";var mt=e.forwardRef((t,r)=>{let{children:a,asChild:i,className:c,...l}=t;return I().open?null:e.createElement(i?U:"div",{...l,ref:r,className:E("kui-ChatbarInlineEnd",c)},a)});mt.displayName="Chatbar.InlineEnd";var pt=e.forwardRef((t,r)=>{let{asChild:a,forceMount:i,renderAttachment:c,className:l,children:u,...d}=t,g=I(),y=e.Children.toArray(u).length>0;return g.attachments.length===0&&!y&&!i?null:e.createElement("div",null,e.createElement(a?U:"div",{...d,ref:r,className:E("kui-ChatbarAttachmentsRow",l),role:"list","aria-label":d["aria-label"]??"Attachments"},e.createElement(at,{className:"kui-ChatbarScrollArea",scrollbars:"horizontal"},e.createElement(ze,{align:"center",gap:"3",minWidth:"fit-content"},g.attachments.map(p=>e.createElement($e,{key:p.id,attachment:p,asChild:!!c},c?.(p))),u))))});pt.displayName="Chatbar.AttachmentsRow";function ht(t,r){let a=t.closest('[role="listitem"]'),i=a?.parentElement?Array.from(a.parentElement.children):[],c=a?i.indexOf(a):-1,u=(i[c+1]??i[c-1])?.querySelector(".kui-ChatbarItemRemove");u?u.focus():r.current?.focus({preventScroll:!0})}var ft=({lead:t,leadKind:r,label:a,detail:i,removeLabel:c,onRemove:l})=>{let u=I();return e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-ChatbarItemLead","data-kind":r,"aria-hidden":!0},t),e.createElement(Ae,{className:"kui-ChatbarItemLabel",size:u.size,truncate:!0},a,i?e.createElement(Be,null,", ",i):null),l&&e.createElement(we,{iconOnly:!0,className:"kui-ChatbarItemRemove","aria-label":c,size:"1",variant:"ghost",color:"gray",onClick:l},e.createElement(Qe,null)))},Vt={uploading:"uploading",error:"failed to upload"},$e=e.forwardRef((t,r)=>{let{attachment:a,asChild:i,className:c,children:l,...u}=t,d=I(),g=i?U:"div",y=!!a.url&&ct(a.name,a.type),R=`${Math.ceil(a.size/1024)} KB`,p=a.status?Vt[a.status]:void 0,v=d.disabled||d.readOnly,x=b=>{ht(b.currentTarget,d.textareaRef),d.removeAttachment(a.id)},w=a.status==="uploading"?e.createElement(De,null):y?e.createElement("img",{className:"kui-ChatbarAttachmentImage",src:a.url,alt:""}):e.createElement(et,null);return e.createElement(g,{...u,ref:r,className:E(l?"kui-ChatbarAttachment":"kui-ChatbarAttachment kui-ChatbarItem",c),role:"listitem","data-kind":y?"image":"file","data-status":a.status,title:a.name},l??e.createElement(ft,{lead:w,leadKind:y&&a.status!=="uploading"?"image":"icon",label:a.name,detail:p?`${R}, ${p}`:R,removeLabel:`Remove ${a.name}`,onRemove:v?void 0:x}))});$e.displayName="Chatbar.Attachment";var bt=e.forwardRef((t,r)=>{let{children:a,icon:i,image:c,color:l,onRemove:u,removeLabel:d,className:g,...y}=t,R=I(),p=R.disabled||R.readOnly,v=u?x=>{ht(x.currentTarget,R.textareaRef),u()}:void 0;return e.createElement("div",{...y,ref:r,className:E("kui-ChatbarItem",g),role:"listitem","data-accent-color":c?void 0:l??"gray",title:a},e.createElement(ft,{lead:c?e.createElement("img",{className:"kui-ChatbarAttachmentImage",src:c,alt:""}):i,leadKind:c?"image":"icon",label:a,removeLabel:d??`Remove ${a}`,onRemove:p?void 0:v}))});bt.displayName="Chatbar.Item";var Rt=e.forwardRef((t,r)=>{let{asChild:a,accept:i,multiple:c,disabled:l,onPointerDown:u,onClick:d,children:g,color:y,...R}=t,p=I(),v=l||p.disabled||p.readOnly,x={...R,ref:r,className:E("kui-ChatbarAttachTrigger",R.className),type:R.type??"button","aria-label":R["aria-label"]??"Add attachments",disabled:v,onPointerDown:w=>{u?.(w),!v&&!w.defaultPrevented&&p.beginFilePickerPress()},onClick:w=>{d?.(w),!(v||w.defaultPrevented)&&p.openFilePicker({accept:i,multiple:c})}};return a?e.createElement(U,{...x},g):e.createElement(we,{iconOnly:!0,emphasis:"quiet",color:"gray",size:p.size,...x},g??e.createElement(Ze,{"aria-hidden":!0}))});Rt.displayName="Chatbar.AttachTrigger";var Ct=e.forwardRef((t,r)=>{let{asChild:a,children:i,className:c,...l}=t;return I().open?e.createElement("div",null,e.createElement(a?U:"div",{...l,ref:r,className:E("kui-ChatbarRow",c)},e.createElement(ze,{align:"center",justify:"between",width:"100%"},i))):null});Ct.displayName="Chatbar.Row";var gt=e.forwardRef((t,r)=>{let{className:a,...i}=t;return e.createElement("div",{...i,ref:r,className:E("kui-ChatbarRowStart",a)})});gt.displayName="Chatbar.RowStart";var vt=e.forwardRef((t,r)=>{let{className:a,...i}=t;return e.createElement("div",{...i,ref:r,className:E("kui-ChatbarRowEnd",a)})});vt.displayName="Chatbar.RowEnd";var yt=e.forwardRef((t,r)=>{let{asChild:a,clearOnSend:i,disabled:c,children:l,style:u,className:d,size:g,variant:y,emphasis:R,tabIndex:p,onClick:v,status:x="ready",onStop:w,onRetry:b,stopLabel:S="Stop",retryLabel:D="Retry",stopIcon:O,retryIcon:z,"aria-label":H,"aria-labelledby":F,...Q}=t,f=I(),_=e.useContext(We),B=Ve(_)||f.attachments.length>0,A=B?"send":x==="submitted"||x==="streaming"?"stop":x==="error"?"retry":"send";if(f.sendMode==="never"&&A==="send")return null;let L=A!=="send"||f.sendMode==="always"||B,Z=A==="send"?c||f.disabled||f.readOnly||!B:c||f.disabled,j=A==="stop"?{"aria-label":S}:A==="retry"?{"aria-label":D}:F?{"aria-labelledby":F}:{"aria-label":H??"Send"},q=N=>{if(v?.(N),N.defaultPrevented||Z)return;if(A==="stop"){w?.();return}if(A==="retry"){b?.();return}let M=i??f.clearOnSubmit;f.submit(M)&&M&&f.textareaRef.current?.focus({preventScroll:!0})},V=A==="stop"?O??(x==="submitted"?e.createElement(De,null):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):A==="retry"?z??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):l??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(we,{iconOnly:!0,...Q,ref:r,size:g??f.size,...R?{emphasis:R}:{variant:y??(f.open||A!=="send"?"solid":"ghost")},disabled:Z,className:E("kui-ChatbarSend",d),style:{opacity:L?1:0,pointerEvents:L?void 0:"none",...u},"aria-hidden":L?void 0:!0,tabIndex:L?p:-1,asChild:a,onClick:q,"data-status":x,"data-mode":A,...j},V)});yt.displayName="Chatbar.Send";export{lt as a,ut as b,dt as c,mt as d,pt as e,$e as f,bt as g,Rt as h,Ct as i,gt as j,vt as k,yt as l,Wt as m};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as nt}from"./chunk-7V6M3MIR.js";import{a as Be}from"./chunk-WUCBFB25.js";import{a as we}from"./chunk-KJZSXLIX.js";import{a as Ae}from"./chunk-4MNRLB57.js";import{a as De}from"./chunk-BUXK5VGR.js";import{a as ze}from"./chunk-KVVRFWGQ.js";import{g as Qe,h as Ze,j as et}from"./chunk-GKDGNPBD.js";import{b as U}from"./chunk-5KMEUZWN.js";import{a as at}from"./chunk-MGWGD6KI.js";import{b as tt}from"./chunk-5ON3XLRD.js";import{a as Ht}from"./chunk-VQPANPMI.js";var Wt={};Ht(Wt,{AttachTrigger:()=>Rt,Attachment:()=>$e,AttachmentsRow:()=>pt,InlineEnd:()=>mt,InlineStart:()=>dt,Item:()=>bt,Root:()=>lt,Row:()=>Ct,RowEnd:()=>vt,RowStart:()=>gt,Send:()=>yt,Textarea:()=>ut});import*as e from"react";import E from"classnames";import{useComposedRefs as st,useLayoutEffect as je}from"radix-ui/internal";import{useDropzone as Ft}from"react-dropzone";function ot(t,r){let{placeholder:a}=t;if(!a){r();return}t.placeholder="";try{r()}finally{t.placeholder=a}}var It={values:["1","2","3"]},it=e.createContext(null),We=e.createContext(""),I=()=>{let t=e.useContext(it);if(!t)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return t},me=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(r=>r.trim()).filter(Boolean):[],zt=(t,r)=>{if(r.length===0)return!0;let a=t.type.toLowerCase(),i=t.name.toLowerCase();for(let c of r){let l=c.toLowerCase();if(l.includes("/")){let[u,d]=l.split("/"),[g,y]=a.split("/");if(u==="*"||u===g&&(d==="*"||d===y))return!0}else if(l.startsWith(".")&&i.endsWith(l))return!0}return!1},Dt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,ct=(t,r)=>(r||"").toLowerCase().startsWith("image/")||Dt.test(t),Ve=t=>t.trim().length>0,rt=(t,r)=>`${t} ${r}${t===1?"":"s"}`,Bt=0,jt=()=>`chatbar-attachment-${Date.now()}-${++Bt}`,lt=e.forwardRef((t,r)=>{let{className:a,style:i,children:c,value:l,defaultValue:u="",onValueChange:d,open:g,defaultOpen:y=!1,onOpenChange:R,expandOn:p="both",minLines:v=3,maxLines:x=6,sendMode:w="whenDirty",disabled:b,readOnly:S,onSubmit:D,size:O,variant:z,color:H,radius:F,width:Q,maxWidth:f,attachments:_,defaultAttachments:B,onAttachmentsChange:se,accept:A,multiple:L=!0,maxAttachments:Z,maxFileSize:G,paste:j=!0,pasteAccept:q,clearOnSubmit:V=!0,onAttachmentReject:N,dropzone:M=!0,apiRef:ke,onBlurCapture:pe,notices:he,context:fe,...Se}=t,W=tt(O,It),Ee=l!=null,[n,C]=e.useState(u),k=Ee?l:n,ee=g!=null,[X,te]=e.useState(y),ie=ee?g:X,Y="attachments"in t,[ce,be]=e.useState(()=>B??[]),le=e.useMemo(()=>Y?_??[]:ce,[Y,_,ce]),[Ke,xt]=e.useState({text:"",id:0}),ue=e.useCallback(o=>xt(s=>({text:o,id:s.id+1})),[]),Ue=e.useRef(null),Pt=st(r,Ue),Te=e.useRef(null),Le=e.useRef(null),de=e.useRef(!1),Re=e.useRef(!1),Ce=e.useRef(void 0),Ne=e.useRef(null),_e=me(A).join(","),Me=me(q).join(","),Oe=e.useMemo(()=>me(_e),[_e]),At=e.useMemo(()=>Me?me(Me):Oe,[Me,Oe]),Ge={value:k,attachments:le,accepts:Oe,pasteAccepts:At,multiple:L,maxAttachments:Z,maxFileSize:G,disabled:b,readOnly:S,expandOn:p,isValueControlled:Ee,isOpenControlled:ee,isAttachmentsControlled:Y,onValueChange:d,onOpenChange:R,onAttachmentsChange:se,onAttachmentReject:N,onSubmit:D},P=e.useRef(Ge);P.current=Ge;let He=e.useRef(null),$=e.useCallback(()=>He.current??P.current.attachments,[]),ae=e.useCallback(o=>{P.current.isOpenControlled||te(o),P.current.onOpenChange?.(o)},[]),ge=e.useCallback(o=>{P.current.isValueControlled||C(o),P.current.onValueChange?.(o)},[]),ne=e.useCallback(o=>{He.current=o,queueMicrotask(()=>{He.current=null}),P.current.isAttachmentsControlled||be(o),P.current.onAttachmentsChange?.(o)},[]),ve=e.useRef(new Set),oe=e.useCallback((o,s,m=P.current.multiple)=>{let h=P.current;if(h.disabled||h.readOnly||o.length===0)return 0;let K=$(),J=[],re=[],Mt=typeof h.maxAttachments=="number"?Math.max(h.maxAttachments-K.length,0):1/0,Ot=m?1/0:1;for(let T of o){if(J.length>=Mt||J.length>=Ot){re.push({file:T,reason:"count"});continue}if(typeof h.maxFileSize=="number"&&T.size>h.maxFileSize){re.push({file:T,reason:"size"});continue}if(!zt(T,s)){re.push({file:T,reason:"type"});continue}let Ie=ct(T.name,T.type)?URL.createObjectURL(T):void 0;Ie&&ve.current.add(Ie),J.push({id:jt(),name:T.name,size:T.size,type:T.type,file:T,url:Ie,status:"idle"})}let Pe=[];return J.length>0&&(ne(K.concat(J)),h.expandOn!=="none"&&ae(!0),Pe.push(`${rt(J.length,"file")} attached.`)),re.length>0&&(h.onAttachmentReject?.(re),Pe.push(`${rt(re.length,"file")} could not be attached.`)),Pe.length>0&&ue(Pe.join(" ")),J.length},[$,ne,ae,ue]),ye=e.useCallback(o=>oe(o,P.current.accepts),[oe]),qe=e.useCallback(o=>oe(o,P.current.pasteAccepts),[oe]),Xe=e.useCallback(o=>{let s=$(),m=s.find(h=>h.id===o);m&&(ne(s.filter(h=>h.id!==o)),ue(`Removed ${m.name}.`))},[$,ne,ue]),Ye=e.useCallback(o=>{let s=P.current;if(s.disabled||s.readOnly)return!1;let m=$();if(!Ve(s.value)&&m.length===0)return!1;let h={value:s.value,attachments:m};if(o&&s.onSubmit)for(let K of m)K.url&&ve.current.delete(K.url);return s.onSubmit?.(h),o&&(ge(""),ne([])),!0},[$,ge,ne]);e.useEffect(()=>{let o=ve.current;if(o.size===0)return;let s=new Set(le.map(m=>m.url));for(let m of Array.from(o))s.has(m)||(URL.revokeObjectURL(m),o.delete(m))},[le]),e.useEffect(()=>{let o=ve.current;return()=>{if(!P.current.isAttachmentsControlled){for(let s of Array.from(o))URL.revokeObjectURL(s);o.clear()}}},[]);let xe=e.useCallback(o=>{let s=P.current,m=Le.current;if(clearTimeout(Ce.current),Re.current=!1,!m||s.disabled||s.readOnly)return;let h=o?.accept!=null?me(o.accept):s.accepts,K=o?.multiple??s.multiple;Ne.current={patterns:h,multiple:K},m.accept=h.join(","),m.multiple=K,de.current=!0,m.click(),setTimeout(()=>{document.hasFocus()&&(de.current=!1)},1e3)},[]),Je=e.useCallback(()=>{Re.current=!0,clearTimeout(Ce.current),Ce.current=setTimeout(()=>{Re.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(Ce.current),[]),e.useEffect(()=>{let o=Le.current,s=()=>{de.current=!1};return window.addEventListener("focus",s),o?.addEventListener("cancel",s),()=>{window.removeEventListener("focus",s),o?.removeEventListener("cancel",s)}},[]);let wt=e.useCallback(o=>{let s=o.currentTarget,m=Array.from(s.files??[]),h=Ne.current;oe(m,h?.patterns??P.current.accepts,h?.multiple),de.current=!1,Ne.current=null,s.value=""},[oe]),kt=e.useCallback(o=>{pe?.(o);let s=P.current,m=Ue.current;if(!m||s.expandOn==="none")return;let h=o.relatedTarget;h&&m.contains(h)||de.current||Re.current||!Ve(s.value)&&$().length===0&&ae(!1)},[pe,ae,$]),St=e.useCallback(o=>{ye(o)},[ye]),{getRootProps:Et,isDragActive:Tt}=Ft({onDrop:St,onDragEnter:()=>ue(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!M||b||S}),Fe=M&&Tt;e.useImperativeHandle(ke,()=>({focusTextarea:()=>Te.current?.focus({preventScroll:!0}),openFilePicker:()=>xe()}),[xe]);let Lt=e.useCallback(o=>{if(b||o.pointerType==="mouse"&&o.button!==0)return;let s=o.target;s instanceof Element&&s.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(o.preventDefault(),Te.current?.focus({preventScroll:!0}))},[b]),Nt=e.useMemo(()=>({open:ie,setOpen:ae,setValue:ge,size:W,expandOn:p,minLines:v,maxLines:x,sendMode:w,disabled:b,readOnly:S,paste:j,clearOnSubmit:V,multiple:L,textareaRef:Te,attachments:le,removeAttachment:Xe,submit:Ye,appendFiles:ye,appendFilesFromPaste:qe,openFilePicker:xe,beginFilePickerPress:Je}),[ie,ae,ge,W,p,v,x,w,b,S,j,V,L,le,Xe,Ye,ye,qe,xe,Je]);return e.createElement(it.Provider,{value:Nt},e.createElement(We.Provider,{value:k},e.createElement(e.Fragment,null,e.createElement("div",{...Se,ref:Pt,className:E("kui-ChatbarRoot",`kui-r-size-${W}`,a),style:{position:"relative",width:Q,maxWidth:f,...i},"data-state":ie?"open":"closed","data-disabled":b?"":void 0,"data-readonly":S?"":void 0,"data-drop-active":Fe?"":void 0,"data-accent-color":H,"data-radius":F,onBlurCapture:kt},e.createElement("input",{ref:Le,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:wt}),he?e.createElement("div",{className:"kui-ChatbarNotices"},e.createElement(nt.Provider,{value:W},he)):null,e.createElement("div",{...M?Et():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Lt},e.createElement("div",{className:E("kui-ChatbarBox",`kui-variant-${z??"raised"}`),style:{position:"relative"},"data-accent-color":H,"data-radius":F},e.createElement("div",{className:"kui-ChatbarGrid"},c),Fe&&e.createElement("div",{className:"kui-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"kui-ChatbarDropContent"},e.createElement(Ae,{emphasis:"medium",size:W,weight:"medium"},"Drop files here to attach"))))),fe?e.createElement(Ae,{as:"div",size:W==="3"?"2":"1",emphasis:"medium",className:"kui-ChatbarContext"},fe):null,e.createElement(Be,{role:"status","aria-live":"polite"},Fe?"Drop files here to attach.":e.createElement("span",{key:Ke.id},Ke.text))))))});lt.displayName="Chatbar.Root";var ut=e.forwardRef((t,r)=>{let{className:a,style:i,asChild:c,onFocus:l,onChange:u,onPaste:d,onKeyDown:g,onCompositionStart:y,onCompositionEnd:R,submitOnEnter:p=!1,...v}=t,x=I(),w=e.useContext(We),{open:b,minLines:S,maxLines:D,expandOn:O,disabled:z,readOnly:H,setOpen:F,setValue:Q,textareaRef:f,paste:_,appendFilesFromPaste:B,size:se,submit:A,clearOnSubmit:L}=x,Z=st(r,f),G=e.useRef(0),j=e.useRef(0),q=e.useRef(!1),V=e.useRef({open:b,minLines:S,maxLines:D});je(()=>{V.current={open:b,minLines:S,maxLines:D}},[b,S,D]);let N=e.useCallback(()=>{let n=f.current;if(!n)return;let C=window.getComputedStyle(n);G.current=parseFloat(C.lineHeight)||20,j.current=(parseFloat(C.paddingTop)||0)+(parseFloat(C.paddingBottom)||0)},[f]),M=e.useCallback((n,C)=>{let{minLines:k,maxLines:ee}=V.current,X=G.current,te=j.current,ie=Math.ceil((C?k:1)*X)+te,Y=Math.ceil((C?ee:1)*X)+te,ce=Math.max(n.scrollHeight,ie);n.style.height=`${Math.min(ce,Y)}px`;let be=ce>Y;n.style.overflowY=be?"auto":"hidden",n.style.maxHeight=be?`${Y}px`:"none"},[]);je(()=>{N()},[N,se]),je(()=>{let n=f.current;n&&(G.current===0&&N(),ot(n,()=>{n.style.height="auto";let C=b;if(!b&&(O==="overflow"||O==="both")){let k=Math.ceil(G.current)+j.current;n.scrollHeight>k+1&&(C=!0,F(!0))}M(n,C)}))},[w,b,O,S,D,se,F,f,N,M]),e.useEffect(()=>{let n=f.current;if(!n||typeof ResizeObserver>"u")return;let C=-1,k=new ResizeObserver(ee=>{let X=ee[0]?.contentRect.width??0;if(X===C)return;let te=C===-1;C=X,!te&&(N(),ot(n,()=>{n.style.height="auto",M(n,V.current.open)}))});return k.observe(n),()=>k.disconnect()},[f,N,M]),e.useEffect(()=>{},[]);let ke=e.useCallback(n=>{l?.(n),!(z||H)&&(O==="focus"||O==="both")&&!b&&F(!0)},[z,H,O,b,F,l]),pe=e.useCallback(n=>{Q(n.currentTarget.value),u?.(n)},[Q,u]),he=e.useCallback(n=>{if(d?.(n),n.defaultPrevented||!_||z||H)return;let C=Array.from(n.clipboardData?.items??[]).filter(k=>k.kind==="file").map(k=>k.getAsFile()).filter(k=>!!k);C.length!==0&&B(C)>0&&n.preventDefault()},[_,z,H,d,B]),fe=e.useCallback(n=>{q.current=!0,y?.(n)},[y]),Se=e.useCallback(n=>{q.current=!1,R?.(n)},[R]),W=e.useCallback(n=>{g?.(n),!(n.defaultPrevented||!p)&&(n.key!=="Enter"||n.shiftKey||n.altKey||n.ctrlKey||n.metaKey||q.current||n.nativeEvent.isComposing||n.nativeEvent.keyCode===229||(n.preventDefault(),A(L)))},[p,g,A,L]);return e.createElement("div",{className:"kui-ChatbarField kui-ChatbarTextarea"},e.createElement(c?U:"textarea",{...v,ref:Z,className:E("kui-ChatbarInput",a),value:w,onChange:pe,onFocus:ke,onPaste:he,onKeyDown:W,onCompositionStart:fe,onCompositionEnd:Se,disabled:z,readOnly:H,rows:b?S:1,spellCheck:v.spellCheck??!0,autoCorrect:v.autoCorrect??"on",style:i}))});ut.displayName="Chatbar.Textarea";var dt=e.forwardRef((t,r)=>{let{children:a,asChild:i,className:c,...l}=t;return I().open?null:e.createElement(i?U:"div",{...l,ref:r,className:E("kui-ChatbarInlineStart",c)},a)});dt.displayName="Chatbar.InlineStart";var mt=e.forwardRef((t,r)=>{let{children:a,asChild:i,className:c,...l}=t;return I().open?null:e.createElement(i?U:"div",{...l,ref:r,className:E("kui-ChatbarInlineEnd",c)},a)});mt.displayName="Chatbar.InlineEnd";var pt=e.forwardRef((t,r)=>{let{asChild:a,forceMount:i,renderAttachment:c,className:l,children:u,...d}=t,g=I(),y=e.Children.toArray(u).length>0;return g.attachments.length===0&&!y&&!i?null:e.createElement("div",null,e.createElement(a?U:"div",{...d,ref:r,className:E("kui-ChatbarAttachmentsRow",l),role:"list","aria-label":d["aria-label"]??"Attachments"},e.createElement(at,{className:"kui-ChatbarScrollArea",scrollbars:"horizontal"},e.createElement(ze,{align:"center",gap:"3",minWidth:"fit-content"},g.attachments.map(p=>e.createElement($e,{key:p.id,attachment:p,asChild:!!c},c?.(p))),u))))});pt.displayName="Chatbar.AttachmentsRow";function ht(t,r){let a=t.closest('[role="listitem"]'),i=a?.parentElement?Array.from(a.parentElement.children):[],c=a?i.indexOf(a):-1,u=(i[c+1]??i[c-1])?.querySelector(".kui-ChatbarItemRemove");u?u.focus():r.current?.focus({preventScroll:!0})}var ft=({lead:t,leadKind:r,label:a,detail:i,removeLabel:c,onRemove:l})=>{let u=I();return e.createElement(e.Fragment,null,e.createElement("span",{className:"kui-ChatbarItemLead","data-kind":r,"aria-hidden":!0},t),e.createElement(Ae,{className:"kui-ChatbarItemLabel",size:u.size,truncate:!0},a,i?e.createElement(Be,null,", ",i):null),l&&e.createElement(we,{iconOnly:!0,className:"kui-ChatbarItemRemove","aria-label":c,size:"1",variant:"ghost",color:"gray",onClick:l},e.createElement(Qe,null)))},Vt={uploading:"uploading",error:"failed to upload"},$e=e.forwardRef((t,r)=>{let{attachment:a,asChild:i,className:c,children:l,...u}=t,d=I(),g=i?U:"div",y=!!a.url&&ct(a.name,a.type),R=`${Math.ceil(a.size/1024)} KB`,p=a.status?Vt[a.status]:void 0,v=d.disabled||d.readOnly,x=b=>{ht(b.currentTarget,d.textareaRef),d.removeAttachment(a.id)},w=a.status==="uploading"?e.createElement(De,null):y?e.createElement("img",{className:"kui-ChatbarAttachmentImage",src:a.url,alt:""}):e.createElement(et,null);return e.createElement(g,{...u,ref:r,className:E(l?"kui-ChatbarAttachment":"kui-ChatbarAttachment kui-ChatbarItem",c),role:"listitem","data-kind":y?"image":"file","data-status":a.status,title:a.name},l??e.createElement(ft,{lead:w,leadKind:y&&a.status!=="uploading"?"image":"icon",label:a.name,detail:p?`${R}, ${p}`:R,removeLabel:`Remove ${a.name}`,onRemove:v?void 0:x}))});$e.displayName="Chatbar.Attachment";var bt=e.forwardRef((t,r)=>{let{children:a,icon:i,image:c,color:l,onRemove:u,removeLabel:d,className:g,...y}=t,R=I(),p=R.disabled||R.readOnly,v=u?x=>{ht(x.currentTarget,R.textareaRef),u()}:void 0;return e.createElement("div",{...y,ref:r,className:E("kui-ChatbarItem",g),role:"listitem","data-accent-color":c?void 0:l??"gray",title:a},e.createElement(ft,{lead:c?e.createElement("img",{className:"kui-ChatbarAttachmentImage",src:c,alt:""}):i,leadKind:c?"image":"icon",label:a,removeLabel:d??`Remove ${a}`,onRemove:p?void 0:v}))});bt.displayName="Chatbar.Item";var Rt=e.forwardRef((t,r)=>{let{asChild:a,accept:i,multiple:c,disabled:l,onPointerDown:u,onClick:d,children:g,color:y,...R}=t,p=I(),v=l||p.disabled||p.readOnly,x={...R,ref:r,className:E("kui-ChatbarAttachTrigger",R.className),type:R.type??"button","aria-label":R["aria-label"]??"Add attachments",disabled:v,onPointerDown:w=>{u?.(w),!v&&!w.defaultPrevented&&p.beginFilePickerPress()},onClick:w=>{d?.(w),!(v||w.defaultPrevented)&&p.openFilePicker({accept:i,multiple:c})}};return a?e.createElement(U,{...x},g):e.createElement(we,{iconOnly:!0,emphasis:"quiet",color:"gray",size:p.size,...x},g??e.createElement(Ze,{"aria-hidden":!0}))});Rt.displayName="Chatbar.AttachTrigger";var Ct=e.forwardRef((t,r)=>{let{asChild:a,children:i,className:c,...l}=t;return I().open?e.createElement("div",null,e.createElement(a?U:"div",{...l,ref:r,className:E("kui-ChatbarRow",c)},e.createElement(ze,{align:"center",justify:"between",width:"100%"},i))):null});Ct.displayName="Chatbar.Row";var gt=e.forwardRef((t,r)=>{let{className:a,...i}=t;return e.createElement("div",{...i,ref:r,className:E("kui-ChatbarRowStart",a)})});gt.displayName="Chatbar.RowStart";var vt=e.forwardRef((t,r)=>{let{className:a,...i}=t;return e.createElement("div",{...i,ref:r,className:E("kui-ChatbarRowEnd",a)})});vt.displayName="Chatbar.RowEnd";var yt=e.forwardRef((t,r)=>{let{asChild:a,clearOnSend:i,disabled:c,children:l,style:u,className:d,size:g,variant:y,emphasis:R,tabIndex:p,onClick:v,status:x="ready",onStop:w,onRetry:b,stopLabel:S="Stop",retryLabel:D="Retry",stopIcon:O,retryIcon:z,"aria-label":H,"aria-labelledby":F,...Q}=t,f=I(),_=e.useContext(We),B=Ve(_)||f.attachments.length>0,A=B?"send":x==="submitted"||x==="streaming"?"stop":x==="error"?"retry":"send";if(f.sendMode==="never"&&A==="send")return null;let L=A!=="send"||f.sendMode==="always"||B,Z=A==="send"?c||f.disabled||f.readOnly||!B:c||f.disabled,j=A==="stop"?{"aria-label":S}:A==="retry"?{"aria-label":D}:F?{"aria-labelledby":F}:{"aria-label":H??"Send"},q=N=>{if(v?.(N),N.defaultPrevented||Z)return;if(A==="stop"){w?.();return}if(A==="retry"){b?.();return}let M=i??f.clearOnSubmit;f.submit(M)&&M&&f.textareaRef.current?.focus({preventScroll:!0})},V=A==="stop"?O??(x==="submitted"?e.createElement(De,null):e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0},e.createElement("rect",{x:"7",y:"7",width:"10",height:"10",rx:"2"}))):A==="retry"?z??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.createElement("path",{d:"M3 3v5h5"})):l??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"}));return e.createElement(we,{iconOnly:!0,...Q,ref:r,size:g??f.size,...R?{emphasis:R}:{variant:y??(f.open||A!=="send"?"solid":"ghost")},disabled:Z,className:E("kui-ChatbarSend",d),style:{opacity:L?1:0,pointerEvents:L?void 0:"none",...u},"aria-hidden":L?void 0:!0,tabIndex:L?p:-1,asChild:a,onClick:q,"data-status":x,"data-mode":A,...j},V)});yt.displayName="Chatbar.Send";export{lt as a,ut as b,dt as c,mt as d,pt as e,$e as f,bt as g,Rt as h,Ct as i,gt as j,vt as k,yt as l,Wt as m};
|
|
3
|
+
//# sourceMappingURL=chunk-LABMK6Q7.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as v}from"./chunk-TGRHRMQI.js";import{a as d}from"./chunk-LPLW7OWA.js";import{a as P}from"./chunk-L54FWKJE.js";import{c as m}from"./chunk-OKQAVYW4.js";import{a as C}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as v}from"./chunk-TGRHRMQI.js";import{a as d}from"./chunk-LPLW7OWA.js";import{a as P}from"./chunk-L54FWKJE.js";import{c as m}from"./chunk-OKQAVYW4.js";import{a as C}from"./chunk-AQKSO3SW.js";import{c as T}from"./chunk-5ON3XLRD.js";import{a as f}from"./chunk-CLJ6SEGP.js";import{a as k}from"./chunk-VQPANPMI.js";var I={};k(I,{Anchor:()=>x,Close:()=>g,Content:()=>y,Root:()=>u,Toolbar:()=>z,Trigger:()=>h});import*as o from"react";import i from"classnames";import{Popover as n}from"radix-ui";var M=["1","2","3","4"],c={...f,size:{type:"enum",className:"kui-r-size",values:M,default:"2",responsive:!0},width:P.width,minWidth:P.minWidth,maxWidth:{...P.maxWidth,default:"480px"},...d};var R=o.createContext(null),b=e=>{let r=o.useContext(R);return r},u=e=>o.createElement(n.Root,{...e});u.displayName="Popover.Root";var h=o.forwardRef(({children:e,...r},t)=>o.createElement(n.Trigger,{...r,ref:t,asChild:!0},v(e)));h.displayName="Popover.Trigger";var y=o.forwardRef((e,r)=>{let t=T(e,c.size),{className:s,forceMount:a,container:l,...p}=m(t,c),[L,A]=o.useState(void 0),S=o.useMemo(()=>({setLabelId:A}),[]);return o.createElement(n.Portal,{container:l,forceMount:a},o.createElement(C,{asChild:!0},o.createElement(n.Content,{align:"start",sideOffset:8,collisionPadding:10,...p,ref:r,"aria-labelledby":L??p["aria-labelledby"],className:i("kui-PopperContent","kui-PopoverContent",s)},o.createElement(R.Provider,{value:S},t.children))))});y.displayName="Popover.Content";var g=o.forwardRef(({children:e,...r},t)=>o.createElement(n.Close,{...r,ref:t,asChild:!0},v(e)));g.displayName="Popover.Close";var x=o.forwardRef((e,r)=>o.createElement(n.Anchor,{...e,ref:r}));x.displayName="Popover.Anchor";var E=o.forwardRef(({className:e,children:r,...t},s)=>(b("Popover.Toolbar"),o.createElement("div",{...t,ref:s,className:i("kui-PopoverToolbar",e)},r)));E.displayName="Popover.Toolbar";var w=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarLeft",e)}));w.displayName="Popover.Toolbar.Left";var D=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarCenter",e)}));D.displayName="Popover.Toolbar.Center";var N=o.forwardRef(({className:e,...r},t)=>o.createElement("div",{...r,ref:t,className:i("kui-PopoverToolbarSection","kui-PopoverToolbarRight",e)}));N.displayName="Popover.Toolbar.Right";var W=o.forwardRef(({className:e,id:r,...t},s)=>{let a=b("Popover.Toolbar.Title"),l=o.useId(),p=r??`kui-popover-toolbar-title-${l}`;return o.useEffect(()=>(a?.setLabelId(p),()=>a?.setLabelId(void 0)),[a,p]),o.createElement("span",{...t,id:p,ref:s,className:i("kui-PopoverToolbarTitle",e)})});W.displayName="Popover.Toolbar.Title";var z=Object.assign(E,{Left:w,Center:D,Right:N,Title:W});export{u as a,h as b,y as c,g as d,x as e,z as f,I as g};
|
|
3
|
+
//# sourceMappingURL=chunk-MJKVVGGV.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as d}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as d}from"./chunk-KJZSXLIX.js";import{b as m}from"./chunk-5KJIPH2N.js";import{a as E}from"./chunk-VQPANPMI.js";var L={};E(L,{Button:()=>R,Content:()=>M,Item:()=>P,Root:()=>S,Viewport:()=>g,useMessageScroller:()=>f,useMessageScrollerScrollable:()=>V,useMessageScrollerVisibility:()=>N});import*as e from"react";import c from"classnames";import{MessageScroller as a,useMessageScroller as f,useMessageScrollerScrollable as V,useMessageScrollerVisibility as N}from"@shadcn/react/message-scroller";import{useComposedRefs as T}from"radix-ui/internal";var S=e.forwardRef(({autoScroll:o=!0,defaultScrollPosition:t="end",scrollEdgeThreshold:r,scrollMargin:s,className:n,children:i,...l},u)=>e.createElement(a.Provider,{autoScroll:o,defaultScrollPosition:t,...r!=null?{scrollEdgeThreshold:r}:{},...s!=null?{scrollMargin:s}:{}},e.createElement(a.Root,{...l,ref:u,className:c("kui-MessageScrollerRoot",n)},i)));S.displayName="MessageScroller.Root";var g=e.forwardRef(({className:o,"aria-label":t,fade:r=!0,...s},n)=>{let i=m(r),l=T(n,i);return e.createElement(a.Viewport,{"aria-label":t??"",...s,ref:l,"data-fade":r?"":void 0,className:c("kui-MessageScrollerViewport",o)})});g.displayName="MessageScroller.Viewport";var M=e.forwardRef(({className:o,...t},r)=>e.createElement(a.Content,{...t,ref:r,className:c("kui-MessageScrollerContent",o)}));M.displayName="MessageScroller.Content";var P=e.forwardRef(({className:o,...t},r)=>e.createElement(a.Item,{...t,ref:r,className:c("kui-MessageScrollerItem",o)}));P.displayName="MessageScroller.Item";var R=e.forwardRef(({direction:o="end",behavior:t="auto",className:r,children:s,size:n,variant:i="surface",emphasis:l,color:u="gray",radius:v="full","aria-label":b,onClick:y,...B},w)=>{let{scrollToEnd:h,scrollToStart:C}=f(),k=p=>{if(y?.(p),p.defaultPrevented)return;p.preventDefault(),p.currentTarget.closest(".kui-MessageScrollerRoot")?.querySelector(".kui-MessageScrollerViewport")?.focus({preventScroll:!0}),o==="start"?C({behavior:t}):h({behavior:t})};return e.createElement(a.Button,{direction:o,behavior:t,onClick:k,render:e.createElement(d,{iconOnly:!0,...B,ref:w,size:n,...l?{emphasis:l}:{variant:i},color:u,radius:v,"aria-label":b??(o==="end"?"Jump to the latest":"Jump to the first"),className:c("kui-MessageScrollerButton",r),"data-direction":o},s??e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0,style:o==="start"?{transform:"rotate(180deg)"}:void 0},e.createElement("path",{d:"M7.5 2.5v10M3.5 8.5l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})))})});R.displayName="MessageScroller.Button";export{f as a,V as b,N as c,S as d,g as e,M as f,P as g,R as h,L as i};
|
|
3
|
+
//# sourceMappingURL=chunk-MMDZBPSX.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import*as i from"react";var a="(max-width: 767.98px) and (pointer: coarse)",o,n=()=>o??(o=window.matchMedia(a));function r(e,t){return typeof e.addEventListener=="function"?(e.addEventListener("change",t),()=>e.removeEventListener("change",t)):(e.addListener?.(t),()=>e.removeListener?.(t))}function c(e){return r(n(),e)}function s(){return i.useSyncExternalStore(c,()=>n().matches,()=>!1)}function d(){return n().matches}function u(e){let t=n();return r(t,()=>e(t.matches))}export{a,s as b,d as c,u as d};
|
|
3
|
+
//# sourceMappingURL=chunk-QEDKL23P.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/_internal/shell-page-scroll.ts"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\n\n/**\n * When a window Shell lets the page scroll: a narrow window (below the `sm` breakpoint) under a\n * coarse pointer. The stylesheet decides it (shell.css, the page-scroll block), so first paint is\n * right with no script. This is the script's copy, for the few things only script can do when the\n * answer changes: carry the reading position between the two scrollers, and take the content's\n * unused viewport out of the tab order. A test holds it equal to the stylesheet's.\n */\nexport const PAGE_SCROLL_QUERY = '(max-width: 767.98px) and (pointer: coarse)';\n\nlet list: MediaQueryList | undefined;\nconst media = () => (list ??= window.matchMedia(PAGE_SCROLL_QUERY));\n\nfunction listen(m: MediaQueryList, handler: () => void): () => void {\n // Safari below 14 has only the deprecated listener API.\n if (typeof m.addEventListener === 'function') {\n m.addEventListener('change', handler);\n return () => m.removeEventListener('change', handler);\n }\n m.addListener?.(handler);\n return () => m.removeListener?.(handler);\n}\n\nfunction subscribe(onChange: () => void): () => void {\n return listen(media(), onChange);\n}\n\n/** True where a window Shell lets the page scroll. False on the server and through hydration. */\nexport function usePageScrollMedia(): boolean {\n return React.useSyncExternalStore(\n subscribe,\n () => media().matches,\n () => false,\n );\n}\n\n/** Whether the page scrolls right now. */\nexport function pageScrollMatches(): boolean {\n return media().matches;\n}\n\n/** Subscribes to the answer changing, outside React. */\nexport function onPageScrollMediaChange(onChange: (matches: boolean) => void): () => void {\n const m = media();\n return listen(m, () => onChange(m.matches));\n}\n"],
|
|
5
|
+
"mappings": ";AAEA,UAAYA,MAAW,QAShB,IAAMC,EAAoB,8CAE7BC,EACEC,EAAQ,IAAOD,MAAS,OAAO,WAAWD,CAAiB,GAEjE,SAASG,EAAOC,EAAmBC,EAAiC,CAElE,OAAI,OAAOD,EAAE,kBAAqB,YAChCA,EAAE,iBAAiB,SAAUC,CAAO,EAC7B,IAAMD,EAAE,oBAAoB,SAAUC,CAAO,IAEtDD,EAAE,cAAcC,CAAO,EAChB,IAAMD,EAAE,iBAAiBC,CAAO,EACzC,CAEA,SAASC,EAAUC,EAAkC,CACnD,OAAOJ,EAAOD,EAAM,EAAGK,CAAQ,CACjC,CAGO,SAASC,GAA8B,CAC5C,OAAa,uBACXF,EACA,IAAMJ,EAAM,EAAE,QACd,IAAM,EACR,CACF,CAGO,SAASO,GAA6B,CAC3C,OAAOP,EAAM,EAAE,OACjB,CAGO,SAASQ,EAAwBH,EAAkD,CACxF,IAAMH,EAAIF,EAAM,EAChB,OAAOC,EAAOC,EAAG,IAAMG,EAASH,EAAE,OAAO,CAAC,CAC5C",
|
|
6
|
+
"names": ["React", "PAGE_SCROLL_QUERY", "list", "media", "listen", "m", "handler", "subscribe", "onChange", "usePageScrollMedia", "pageScrollMatches", "onPageScrollMediaChange"]
|
|
7
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{c as P}from"./chunk-OKQAVYW4.js";import{c
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{c as P}from"./chunk-OKQAVYW4.js";import{c}from"./chunk-5ON3XLRD.js";import{c as b}from"./chunk-HBWBPBSA.js";import{a as f}from"./chunk-CLJ6SEGP.js";import{a as R}from"./chunk-VQPANPMI.js";var v={};R(v,{Content:()=>g,List:()=>u,Root:()=>l,Trigger:()=>y});import*as e from"react";import p from"classnames";import{Tabs as i}from"radix-ui";var d=["1","2","3","4"],C=["nowrap","wrap","wrap-reverse"],L=["start","center","end"],a={size:{type:"enum",className:"kui-r-size",values:d,default:"2",responsive:!0},wrap:{type:"enum",className:"kui-r-fw",values:C,responsive:!0},justify:{type:"enum",className:"kui-r-jc",values:L,responsive:!0},...b};var k={...f},h={...f};var l=e.forwardRef((t,o)=>{let{className:r,...s}=t;return e.createElement(i.Root,{...s,ref:o,className:p("kui-TabsRoot",r)})});l.displayName="Tabs.Root";var u=e.forwardRef((t,o)=>{let r=c(t,a.size),{className:s,color:n,...m}=P(r,a);return e.createElement(i.List,{"data-accent-color":n,...m,asChild:!1,ref:o,className:p("kui-BaseTabList","kui-TabsList",s)})});u.displayName="Tabs.List";var y=e.forwardRef((t,o)=>{let{className:r,children:s,...n}=t,m=e.Children.toArray(s).every(T=>typeof T=="string"||typeof T=="number");return e.createElement(i.Trigger,{...n,asChild:!1,ref:o,className:p("kui-reset","kui-BaseTabListTrigger","kui-TabsTrigger",r)},e.createElement("span",{className:"kui-BaseTabListTriggerInner kui-TabsTriggerInner"},s),m?e.createElement("span",{className:"kui-BaseTabListTriggerInnerHidden kui-TabsTriggerInnerHidden","aria-hidden":!0},s):null)});y.displayName="Tabs.Trigger";var g=e.forwardRef((t,o)=>{let{className:r,...s}=t;return e.createElement(i.Content,{...s,ref:o,className:p("kui-TabsContent",r)})});g.displayName="Tabs.Content";export{l as a,u as b,y as c,g as d,v as e};
|
|
3
|
+
//# sourceMappingURL=chunk-REORAMUH.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as b}from"./chunk-YOSLXJI5.js";import{c as g}from"./chunk-OKQAVYW4.js";import{
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as b}from"./chunk-YOSLXJI5.js";import{c as g}from"./chunk-OKQAVYW4.js";import{c as y}from"./chunk-5ON3XLRD.js";import{a as m,e as v}from"./chunk-HBWBPBSA.js";import{b as P}from"./chunk-XU74PNM2.js";import{a as f}from"./chunk-CLJ6SEGP.js";import*as e from"react";import A from"classnames";import{Avatar as u}from"radix-ui";var q=["1","2","3","4","5","6","7","8","9"],B=["raised","solid","soft","surface","outline"],U=["cover","contain","fill","scale-down","none"],c={...f,size:{type:"enum",className:"kui-r-size",values:q,default:"2",responsive:!0},variant:{type:"enum",className:"kui-variant",values:B,default:"raised"},...v,...P,fallback:{type:"ReactNode",required:!0},status:{type:"enum",values:m,default:void 0},statusLabel:{type:"string",default:void 0},badge:{type:"ReactNode",default:void 0},fit:{type:"enum",className:"kui-r-fit",values:U,default:"cover",responsive:!0}};var _=e.forwardRef((a,s)=>{let o=y(a,c.size),{asChild:t,children:r,className:n,style:i,color:h,radius:N,status:d,statusLabel:l,badge:p,fallback:k,onLoadingStatusChange:D,src:C,alt:I,srcSet:z,sizes:S,crossOrigin:w,referrerPolicy:E,loading:L,decoding:x,onLoad:F,onError:O,...j}=g(o,c),T={fallback:k,onLoadingStatusChange:D,src:C,alt:I,srcSet:z,sizes:S,crossOrigin:w,referrerPolicy:E,loading:L,decoding:x,onLoad:F,onError:O},V=t&&r!=null&&e.isValidElement(r)&&(r.props.disabled===!0||r.props["data-disabled"]===!0),W=p!==void 0||d!==void 0,G=p!==void 0?e.createElement("span",{className:"kui-AvatarBadge"},p):d!==void 0?e.createElement("span",{className:"kui-AvatarStatus","data-accent-color":d,role:l?"img":void 0,"aria-label":l||void 0,"aria-hidden":l?void 0:!0}):null;return e.createElement(u.Root,{...j,ref:s,"data-accent-color":h,"data-radius":N,"data-disabled":V||void 0,"data-has-indicator":W||void 0,className:A("kui-reset","kui-AvatarRoot",n),style:i,asChild:t},b({asChild:t,children:r},e.createElement(e.Fragment,null,e.createElement(R,{...T}),G)))});_.displayName="Avatar";var R=e.memo(({fallback:a,onLoadingStatusChange:s,...o})=>{let[t,r]=e.useState("idle"),n=e.useCallback(i=>{s?.(i),r(i)},[s]);return e.createElement(e.Fragment,null,t==="idle"||t==="loading"?e.createElement("span",{className:"kui-AvatarFallback"}):null,t==="error"?e.createElement(u.Fallback,{className:A("kui-AvatarFallback",{"kui-one-letter":typeof a=="string"&&a.length===1,"kui-two-letters":typeof a=="string"&&a.length===2}),...o.alt?{role:"img","aria-label":o.alt}:{"aria-hidden":!0}},a):null,e.createElement(u.Image,{className:"kui-AvatarImage",...o,onLoadingStatusChange:n}))});R.displayName="AvatarImpl";export{_ as a};
|
|
3
|
+
//# sourceMappingURL=chunk-SUQJ7DD4.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as d}from"./chunk-MGWGD6KI.js";import{b as C}from"./chunk-QEDKL23P.js";import{a as s}from"./chunk-ANQLWGFN.js";import{j as m}from"./chunk-GHWEXMF6.js";import*as e from"react";import c from"classnames";var v=e.createContext(null);function u(){return e.useContext(v)}var S=e.createContext("2"),k=e.createContext(!1),B=e.createContext(!1);function T({children:t,presentation:n}){let o=e.useContext(S),a=e.useMemo(()=>({size:o,menuVariant:"soft",presentation:n}),[o,n]);return e.createElement(v.Provider,{value:a},t)}function P(){let t=u(),n=e.useContext(S),o=t?.size??n,a=t?.menuVariant??"soft";return["kui-ShellPaneChrome",`kui-r-size-${o}`,`kui-menu-variant-${a}`]}var N={1:"2",2:"3",3:"4",4:"4"};function f(){let t=u(),n=e.useContext(S);return N[t?.size??n]}function W(){let t=e.useContext(s),n=e.useContext(m)!==null,o=f();return t!==void 0?t:n?o:null}var H=e.forwardRef(({className:t,float:n,children:o,...a},i)=>{let r=P(),l=f();return e.createElement("div",{...a,ref:i,"data-float":n||void 0,className:c("kui-ShellPaneHeader","kui-SidebarHeader","kui-SidebarHeader--container",...r,t)},e.createElement(s.Provider,{value:l},o))});H.displayName="Shell.PaneHeader";var y=e.forwardRef(({className:t,float:n,children:o,...a},i)=>{let r=P(),l=f();return e.createElement("div",{...a,ref:i,"data-float":n||void 0,className:c("kui-ShellPaneFooter","kui-SidebarFooter","kui-SidebarFooter--container",...r,t)},e.createElement(s.Provider,{value:l},o))});y.displayName="Shell.PaneFooter";var F=e.forwardRef(({className:t,style:n,dir:o,children:a,fade:i=!1,...r},l)=>{let x=P(),p=e.useContext(k),h=u(),R=p&&h===null,z=e.useContext(B),b=C();if(R){let V=r.tabIndex??(z&&b?-1:void 0);return e.createElement(d,{...r,tabIndex:V,ref:l,type:"hover",fade:i,className:"kui-ShellScroll"},e.createElement("div",{style:n,dir:o,className:c("kui-ShellScrollContent",t)},a))}return e.createElement(d,{...r,ref:l,type:"hover",fade:i,className:"kui-ShellScroll"},e.createElement("div",{style:n,dir:o,className:c("kui-BaseMenuContent","kui-SidebarContent",...x,t)},e.createElement(s.Provider,{value:null},e.createElement("div",{className:"kui-BaseMenuViewport"},a))))});F.displayName="Shell.Scroll";export{v as a,u as b,S as c,k as d,B as e,T as f,N as g,W as h,H as i,y as j,F as k};
|
|
3
|
+
//# sourceMappingURL=chunk-TSWHVZ47.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/_internal/pane-chrome.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\n/**\n * A pane's own chrome: a header row, a scrolling region and a footer row.\n *\n * Shell.Sidebar and Shell.Panel render these as `Shell.PaneHeader`, `Shell.Scroll` and\n * `Shell.PaneFooter`. The pane renders anything; with these parts it is the presentation, so\n * Sidebar's menu parts work inside it with no `Sidebar.Root`. The index comes from the nearest\n * Shell (`Shell.Root size`), or from a deprecated `Sidebar.Root` that still wraps them.\n */\n\nimport * as React from 'react';\nimport classNames from 'classnames';\n\nimport { ScrollArea } from '../scroll-area.js';\nimport { ShellStoreContext } from './shell-store.js';\nimport { PaneBandSizeContext, type BandSize } from './pane-band-context.js';\nimport { usePageScrollMedia } from './shell-page-scroll.js';\n\ntype PaneSize = '1' | '2' | '3';\n\ntype SidebarVisualContextValue = {\n size: PaneSize;\n menuVariant: 'solid' | 'soft';\n presentation?: 'thin' | 'expanded';\n color?: string;\n};\n\n/** Size, menu highlight and presentation for the Sidebar parts. Internal: not exported. */\nconst SidebarVisualContext = React.createContext<SidebarVisualContextValue | null>(null);\n\nfunction useSidebarVisual() {\n return React.useContext(SidebarVisualContext);\n}\n\n/** The Shell's index. `Shell.Root size` sets it; panes hand it to their chrome. */\nconst ShellSizeContext = React.createContext<PaneSize>('2');\n\n/**\n * True inside `Shell.Content`. `Shell.Root` sets it back to false, so a Shell nested in the\n * content gets pane chrome in its own panes. Read by `Shell.Scroll`: in the content it holds a\n * page, not a menu, so it takes none of the menu's padding, gap or layering.\n */\nconst ShellContentContext = React.createContext(false);\n\n/**\n * True inside a window Shell: one with no `contained` and no `height`, which lets the page scroll\n * on a narrow touch screen. Each `Shell.Root` sets its own, so a Shell nested in another answers\n * for itself.\n */\nconst ShellWindowContext = React.createContext(false);\n\n/**\n * Gives a Shell pane's children the Shell's index, so Sidebar parts size themselves. In a Rail\n * the rows are `thin`: icon tiles with a small label, sub-menus as dropdowns.\n */\nfunction PaneChromeScope({ children, presentation }: { children: React.ReactNode; presentation?: 'thin' }) {\n const size = React.useContext(ShellSizeContext);\n const value = React.useMemo<SidebarVisualContextValue>(() => ({ size, menuVariant: 'soft', presentation }), [size, presentation]);\n return <SidebarVisualContext.Provider value={value}>{children}</SidebarVisualContext.Provider>;\n}\n\nfunction useChromeClasses() {\n const visual = useSidebarVisual();\n // A pane with no scope (Inspector, Bottom) still takes the Shell's index.\n const shellSize = React.useContext(ShellSizeContext);\n const size = visual?.size ?? shellSize;\n const menuVariant = visual?.menuVariant ?? 'soft';\n return ['kui-ShellPaneChrome', `kui-r-size-${size}`, `kui-menu-variant-${menuVariant}`];\n}\n\n/**\n * The index a Toolbar in a pane's header or footer rests at when it states none: one step above\n * the Shell's, so the band reads as chrome over the rows (v2 BAND_STEP). 4 has no step above.\n */\nconst BAND_STEP = { '1': '2', '2': '3', '3': '4', '4': '4' } as const satisfies Record<BandSize, BandSize>;\n\nfunction useBandSize(): BandSize {\n const visual = useSidebarVisual();\n const shellSize = React.useContext(ShellSizeContext);\n return BAND_STEP[visual?.size ?? shellSize];\n}\n\n/**\n * The size a Toolbar with no `size` of its own rests at, or null for none.\n *\n * In a pane's header or footer it is that band's size. Anywhere else inside a Shell, such as\n * `Shell.Content` or a pane's body, it is the same step: one above the Shell's index, so a\n * toolbar in the content area matches the ones in the pane headers beside it (v2 sizes every\n * toolbar this way). A pane's scrolling list, and anything outside a Shell, has none.\n */\nfunction usePaneBandSize(): BandSize | null {\n const band = React.useContext(PaneBandSizeContext);\n const inShell = React.useContext(ShellStoreContext) !== null;\n const step = useBandSize();\n if (band !== undefined) return band;\n return inShell ? step : null;\n}\n\ninterface PaneHeaderProps extends React.ComponentPropsWithoutRef<'div'> {\n /**\n * Floats the row over the top of `Shell.Scroll`, so the list scrolls behind it. The list\n * starts below the row, and `Shell.Scroll fade` fades it out under the row. The row paints\n * nothing and lets clicks through between its controls; a `Toolbar backdrop` in it keeps\n * the controls readable.\n */\n float?: boolean;\n}\n\n/** A pane's header row, pinned above its scrolling region. */\nconst PaneHeader = React.forwardRef<HTMLDivElement, PaneHeaderProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneHeader', 'kui-SidebarHeader', 'kui-SidebarHeader--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneHeader.displayName = 'Shell.PaneHeader';\n\ninterface PaneFooterProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Floats the row over the bottom of `Shell.Scroll`, the way `Shell.PaneHeader float` does at the top. */\n float?: boolean;\n}\n\n/** A pane's footer row, pinned below its scrolling region. */\nconst PaneFooter = React.forwardRef<HTMLDivElement, PaneFooterProps>(({ className, float, children, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n const band = useBandSize();\n return (\n <div\n {...props}\n ref={forwardedRef}\n data-float={float || undefined}\n className={classNames('kui-ShellPaneFooter', 'kui-SidebarFooter', 'kui-SidebarFooter--container', ...chrome, className)}\n >\n <PaneBandSizeContext.Provider value={band}>{children}</PaneBandSizeContext.Provider>\n </div>\n );\n});\nPaneFooter.displayName = 'Shell.PaneFooter';\n\ninterface ScrollProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Fades the list out toward an edge with more past it, and under a floating header or footer. */\n fade?: boolean;\n}\n\n/**\n * The one region of a pane that scrolls; it takes the room the header and footer leave.\n * In `Shell.Content` it is the page's scroller, and a `Shell.PaneHeader float` beside it pins\n * the page's toolbar over it. The ref, events and ARIA props land on the element that scrolls;\n * `className`, `style` and `dir` apply to the content inside it. In a Rail, Panel or Sidebar the pane is\n * already a navigation landmark, so it needs no role of its own.\n */\nconst Scroll = React.forwardRef<HTMLDivElement, ScrollProps>(({ className, style, dir, children, fade = false, ...props }, forwardedRef) => {\n const chrome = useChromeClasses();\n // A Sidebar.Root inside the content still gets a menu.\n const contentPane = React.useContext(ShellContentContext);\n const visual = useSidebarVisual();\n const inContent = contentPane && visual === null;\n // While the page scrolls, the content's viewport scrolls nothing: as a tab stop it would take a\n // Tab, ring the whole page and move nothing. Resolved after mount; a `tabIndex` of the caller's wins.\n const windowShell = React.useContext(ShellWindowContext);\n const pageScrolls = usePageScrollMedia();\n if (inContent) {\n const tabIndex = props.tabIndex ?? (windowShell && pageScrolls ? -1 : undefined);\n return (\n <ScrollArea {...props} tabIndex={tabIndex} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-ShellScrollContent', className)}>\n {children}\n </div>\n </ScrollArea>\n );\n }\n return (\n <ScrollArea {...props} ref={forwardedRef} type=\"hover\" fade={fade} className=\"kui-ShellScroll\">\n <div style={style} dir={dir} className={classNames('kui-BaseMenuContent', 'kui-SidebarContent', ...chrome, className)}>\n {/* A header's band does not reach a Toolbar in the scrolling list. */}\n <PaneBandSizeContext.Provider value={null}>\n <div className=\"kui-BaseMenuViewport\">{children}</div>\n </PaneBandSizeContext.Provider>\n </div>\n </ScrollArea>\n );\n});\nScroll.displayName = 'Shell.Scroll';\n\nexport { SidebarVisualContext, useSidebarVisual, ShellSizeContext, ShellContentContext, ShellWindowContext, PaneChromeScope, PaneHeader, PaneFooter, Scroll, BAND_STEP, usePaneBandSize };\nexport type { SidebarVisualContextValue, PaneSize, BandSize, PaneHeaderProps, PaneFooterProps, ScrollProps };\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["React", "classNames", "SidebarVisualContext", "useSidebarVisual", "ShellSizeContext", "ShellContentContext", "ShellWindowContext", "PaneChromeScope", "children", "presentation", "size", "value", "useChromeClasses", "visual", "shellSize", "menuVariant", "BAND_STEP", "useBandSize", "usePaneBandSize", "band", "PaneBandSizeContext", "inShell", "ShellStoreContext", "step", "PaneHeader", "className", "float", "props", "forwardedRef", "chrome", "classNames", "PaneFooter", "Scroll", "style", "dir", "fade", "contentPane", "inContent", "windowShell", "pageScrolls", "usePageScrollMedia", "tabIndex", "ScrollArea"]
|
|
7
|
+
}
|