@womp/kookie-ui 0.10.0 → 0.11.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 +132 -26
- package/dist/cjs/components/app-bar.d.ts +49 -0
- package/dist/cjs/components/app-bar.d.ts.map +1 -0
- package/dist/cjs/components/app-bar.js +2 -0
- package/dist/cjs/components/app-bar.js.map +7 -0
- package/dist/cjs/components/index.d.ts +2 -1
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +4 -4
- package/dist/cjs/components/toolbar.d.ts +88 -36
- package/dist/cjs/components/toolbar.d.ts.map +1 -1
- package/dist/cjs/components/toolbar.js +4 -1
- package/dist/cjs/components/toolbar.js.map +4 -4
- package/dist/cjs/components/toolbar.props.d.ts +28 -0
- package/dist/cjs/components/toolbar.props.d.ts.map +1 -0
- package/dist/cjs/components/toolbar.props.js +2 -0
- package/dist/cjs/components/toolbar.props.js.map +7 -0
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/{chunk-73QGEY2I.js → chunk-3R4YLW4A.js} +2 -2
- package/dist/esm/{chunk-ZZLZGHZQ.js → chunk-4LDVSTXI.js} +2 -2
- package/dist/esm/chunk-54JFIP5S.js +2 -0
- package/dist/esm/chunk-54JFIP5S.js.map +7 -0
- package/dist/esm/{chunk-X3JM2565.js → chunk-6G3MPL4A.js} +2 -2
- package/dist/esm/{chunk-DSJY5RI3.js → chunk-7JJT42J2.js} +2 -2
- package/dist/esm/chunk-C7EVYSWK.js +1 -0
- package/dist/esm/{chunk-ERY5TH2M.js → chunk-CYU6BLZ5.js} +2 -2
- package/dist/esm/{chunk-25LBWKEV.js → chunk-D6PHTHF2.js} +2 -2
- package/dist/esm/{chunk-QK5RBHKV.js → chunk-ENLFKWYV.js} +2 -2
- package/dist/esm/{chunk-4XGGX2V2.js → chunk-ISOLUTZF.js} +2 -2
- package/dist/esm/{chunk-LXWPEDPZ.js → chunk-IYCPYN4Z.js} +2 -2
- package/dist/esm/{chunk-RJP5QUXO.js → chunk-L5PID6BU.js} +2 -2
- package/dist/esm/{chunk-BW5CO4PZ.js → chunk-METRW4HG.js} +2 -2
- package/dist/esm/{chunk-PYHEBG5I.js → chunk-MJOXEUBT.js} +2 -2
- package/dist/esm/{chunk-4D2OAD6I.js → chunk-OIUCV5HK.js} +2 -2
- package/dist/esm/{chunk-65GAANJD.js → chunk-UYCPDGWA.js} +2 -2
- package/dist/esm/chunk-XLMTTSRO.js +2 -0
- package/dist/esm/chunk-XLMTTSRO.js.map +7 -0
- package/dist/esm/{chunk-QWVU2TW4.js → chunk-ZK7A2MZZ.js} +2 -2
- package/dist/esm/chunk-ZUOK3KFY.js +2 -0
- package/dist/esm/chunk-ZUOK3KFY.js.map +7 -0
- package/dist/esm/components/_internal/base-button.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/app-bar.d.ts +49 -0
- package/dist/esm/components/app-bar.d.ts.map +1 -0
- package/dist/esm/components/app-bar.js +2 -0
- package/dist/esm/components/app-bar.js.map +7 -0
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-cards.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/index.d.ts +2 -1
- package/dist/esm/components/index.d.ts.map +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/sheet.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/toggle-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/toolbar.d.ts +88 -36
- package/dist/esm/components/toolbar.d.ts.map +1 -1
- package/dist/esm/components/toolbar.js +1 -1
- package/dist/esm/components/toolbar.props.d.ts +28 -0
- package/dist/esm/components/toolbar.props.d.ts.map +1 -0
- package/dist/esm/components/toolbar.props.js +2 -0
- package/dist/esm/components/toolbar.props.js.map +7 -0
- package/dist/esm/components/user-card.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/package.json +1 -1
- package/src/components/app-bar.css +204 -0
- package/src/components/app-bar.tsx +256 -0
- package/src/components/index.css +2 -0
- package/src/components/index.tsx +13 -1
- package/src/components/toolbar.css +87 -160
- package/src/components/toolbar.props.tsx +27 -0
- package/src/components/toolbar.tsx +259 -193
- package/src/styles/tokens/color.css +19 -0
- package/styles.css +146 -26
- package/tokens/base.css +14 -0
- package/tokens.css +14 -0
- package/dist/esm/chunk-47LMOIW3.js +0 -2
- package/dist/esm/chunk-47LMOIW3.js.map +0 -7
- package/dist/esm/chunk-JKS2YXMS.js +0 -1
- /package/dist/esm/{chunk-73QGEY2I.js.map → chunk-3R4YLW4A.js.map} +0 -0
- /package/dist/esm/{chunk-ZZLZGHZQ.js.map → chunk-4LDVSTXI.js.map} +0 -0
- /package/dist/esm/{chunk-X3JM2565.js.map → chunk-6G3MPL4A.js.map} +0 -0
- /package/dist/esm/{chunk-DSJY5RI3.js.map → chunk-7JJT42J2.js.map} +0 -0
- /package/dist/esm/{chunk-JKS2YXMS.js.map → chunk-C7EVYSWK.js.map} +0 -0
- /package/dist/esm/{chunk-ERY5TH2M.js.map → chunk-CYU6BLZ5.js.map} +0 -0
- /package/dist/esm/{chunk-25LBWKEV.js.map → chunk-D6PHTHF2.js.map} +0 -0
- /package/dist/esm/{chunk-QK5RBHKV.js.map → chunk-ENLFKWYV.js.map} +0 -0
- /package/dist/esm/{chunk-4XGGX2V2.js.map → chunk-ISOLUTZF.js.map} +0 -0
- /package/dist/esm/{chunk-LXWPEDPZ.js.map → chunk-IYCPYN4Z.js.map} +0 -0
- /package/dist/esm/{chunk-RJP5QUXO.js.map → chunk-L5PID6BU.js.map} +0 -0
- /package/dist/esm/{chunk-BW5CO4PZ.js.map → chunk-METRW4HG.js.map} +0 -0
- /package/dist/esm/{chunk-PYHEBG5I.js.map → chunk-MJOXEUBT.js.map} +0 -0
- /package/dist/esm/{chunk-4D2OAD6I.js.map → chunk-OIUCV5HK.js.map} +0 -0
- /package/dist/esm/{chunk-65GAANJD.js.map → chunk-UYCPDGWA.js.map} +0 -0
- /package/dist/esm/{chunk-QWVU2TW4.js.map → chunk-ZK7A2MZZ.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-2N2AQNJH.js";import{a as d}from"./chunk-OLAWVEAI.js";import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-2N2AQNJH.js";import{a as d}from"./chunk-OLAWVEAI.js";import{a as p}from"./chunk-4LDVSTXI.js";import*as r from"react";import h from"classnames";var w=r.forwardRef(({className:b,style:s,tooltip:a,tooltipSide:m="top",tooltipAlign:B="center",tooltipDelayDuration:y,tooltipDisableHoverableContent:g,overrideStyles:e,...v},O)=>{let{tooltipId:R,hasTooltip:S,accessibilityProps:P}=f(a),u=r.useMemo(()=>{if(!e)return;let c={},o=(n,t)=>{t!==void 0&&(c[n]=t)},i=(n,t)=>{t&&(o(`--button-override-${n}color`,t.color),o(`--button-override-${n}background`,t.background),o(`--button-override-${n}background-color`,t.backgroundColor),o(`--button-override-${n}box-shadow`,t.boxShadow),o(`--button-override-${n}filter`,t.filter),o(`--button-override-${n}outline`,t.outline),o(`--button-override-${n}outline-offset`,t.outlineOffset),o(`--button-override-${n}opacity`,t.opacity))};return i("",e.normal),i("hover-",e.hover),i("active-",e.active),i("pressed-",e.pressed),i("open-",e.open),i("disabled-",e.disabled),e.focus&&(o("--button-override-focus-outline",e.focus.outline),o("--button-override-focus-outline-offset",e.focus.outlineOffset)),c},[e]),C=r.useMemo(()=>u?{...u,...s}:s,[u,s]),l=r.createElement(p,{...v,...P,ref:O,className:h("rt-Button",b),style:C});return S?r.createElement(d,{content:a,side:m,align:B,delayDuration:y,disableHoverableContent:g,id:R},l):l});w.displayName="Button";export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3R4YLW4A.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-HF5WY5YE.js";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-HF5WY5YE.js";import{a as B}from"./chunk-AGAQC4HH.js";import{a as b,c as P}from"./chunk-5T6K7VPP.js";import{a as c}from"./chunk-FHOCUZDR.js";import{a as y}from"./chunk-5TXQLK4G.js";import{a as i}from"./chunk-JFWMAYEH.js";import{a as m}from"./chunk-GSTOGDAJ.js";import{a as u}from"./chunk-6FLLFCBU.js";import*as e from"react";import S from"classnames";import{Slot as j}from"radix-ui";var I=e.forwardRef((o,g)=>{let{size:h=i.size.default}=o,{className:R,children:t,asChild:n,as:a,color:x,radius:C,material:k,panelBackground:w,flush:D,disabled:p=o.loading,...d}=u(o,i,m);y(o.panelBackground);let l=k??w,E=n?j.Root:a||"button",T=n||!a||["button","input","textarea","select"].includes(a),v=!n&&(!a||a==="button"),M="type"in d,z=e.useId(),s=o.loading?`${z}-loading`:void 0,r=e.useMemo(()=>typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"button",[t]),N=e.useMemo(()=>o.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":s,"aria-label":`${r} (loading)`}:{},[o.loading,s,r]);return e.createElement(E,{"data-disabled":p||void 0,"data-accent-color":x,"data-radius":C,"data-material":l,"data-panel-background":l,"data-flush":D?"true":void 0,...d,...N,ref:g,className:S("rt-reset","rt-BaseButton",R),...T&&{disabled:p},...v&&!M?{type:"button"}:{}},o.loading?e.createElement(e.Fragment,null,e.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},t),e.createElement(B,null,e.createElement("span",{id:s},r," is loading, please wait..."),t),e.createElement(c,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},e.createElement("span",null,e.createElement(f,{size:b(h,P),"aria-hidden":"true"})))):t)});I.displayName="BaseButton";export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4LDVSTXI.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as u}from"./chunk-JDGJSNWT.js";import{a as h}from"./chunk-GO7OHBHW.js";import{a as A}from"./chunk-FHOCUZDR.js";import*as e from"react";import f from"classnames";var R=e.forwardRef((o,t)=>{let{anchor:p="top",floating:r=!1,offset:s="2",size:n="1",variant:i="ghost",material:x,className:b,style:y,children:v,...N}=o,B=p==="top"||p==="bottom",d=e.useRef(null),L=e.useCallback(a=>{d.current=a,typeof t=="function"?t(a):t&&(t.current=a)},[t]);e.useEffect(()=>{let a=d.current;if(!a)return;let l=a.parentElement;if(!l)return;let g=()=>{let c=B?a.offsetHeight:a.offsetWidth;if(r){let F=getComputedStyle(a),z=parseFloat(F.marginTop)||0;c+=z*2}B?(l.style.setProperty("--rt-app-bar-height",`${c}px`),l.style.setProperty("--rt-toolbar-height",`${c}px`)):(l.style.setProperty("--rt-app-bar-width",`${c}px`),l.style.setProperty("--rt-toolbar-width",`${c}px`))};g();let P=new ResizeObserver(g);return P.observe(a),()=>P.disconnect()},[B,r]);let H=r?{margin:`var(--space-${s})`,...y}:y;return e.createElement(u,{ref:L,size:n,variant:i,material:x,"data-anchor":p,"data-floating":r||void 0,className:f("rt-AppBar",b),style:H,...N},e.createElement("div",{className:"rt-AppBarInner"},v))});R.displayName="AppBar.Root";var S=e.forwardRef(({gap:o="2",align:t="center",className:p,children:r,...s},n)=>e.createElement(A,{ref:n,align:t,gap:o,className:f("rt-AppBarSection","rt-AppBarLeft",p),...s},r));S.displayName="AppBar.Left";var T=e.forwardRef(({gap:o="2",align:t="center",justify:p="center",className:r,children:s,...n},i)=>e.createElement(A,{ref:i,align:t,justify:p,gap:o,className:f("rt-AppBarSection","rt-AppBarCenter",r),...n},s));T.displayName="AppBar.Center";var C=e.forwardRef(({gap:o="2",align:t="center",justify:p="end",className:r,children:s,...n},i)=>e.createElement(A,{ref:i,align:t,justify:p,gap:o,className:f("rt-AppBarSection","rt-AppBarRight",r),...n},s));C.displayName="AppBar.Right";var E=e.forwardRef(({className:o,size:t="2",weight:p="medium",truncate:r=!0,children:s,...n},i)=>e.createElement(h,{ref:i,size:t,weight:p,truncate:r,className:f("rt-AppBarTitle",o),...n},s));E.displayName="AppBar.Title";var m=R;m.Root=R;m.Left=S;m.Center=T;m.Right=C;m.Title=E;export{R as a,S as b,T as c,C as d,E as e,m as f};
|
|
2
|
+
//# sourceMappingURL=chunk-54JFIP5S.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/app-bar.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Card } from './card.js';\nimport { Flex } from './flex.js';\nimport { Heading } from './heading.js';\n\nimport type { CardProps } from './card.js';\nimport type { FlexProps } from './flex.js';\n\n// ============================================================================\n// AppBar Root\n// ============================================================================\n\ntype AppBarRootElement = React.ElementRef<'div'>;\ntype Anchor = 'top' | 'bottom' | 'left' | 'right';\ntype SpaceScale = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';\n\ninterface AppBarRootProps extends Omit<CardProps, 'asChild'> {\n /**\n * Which edge to anchor to. Sets position: sticky and the appropriate edge.\n * @default \"top\"\n */\n anchor?: Anchor;\n /**\n * Floating mode adds margin from edges for a detached look with absolute positioning.\n * When false (default), uses inset mode with negative margins to go edge-to-edge inside Cards.\n * @default false\n */\n floating?: boolean;\n /**\n * Margin offset from edges when floating. Uses space scale values.\n * @default \"2\"\n */\n offset?: SpaceScale;\n}\n\n/**\n * An app bar: the band anchored to one edge of a pane, with left, center and right sections\n * and a title. It publishes its height (or width) to its parent as `--rt-app-bar-height`\n * (`--rt-app-bar-width`) so content can pad itself clear of it.\n *\n * This component was called `Toolbar` until 0.11.0. It is not a `role=\"toolbar\"`: for a row of\n * controls with one tab stop and arrow-key navigation, use `Toolbar`.\n */\nconst AppBarRoot = React.forwardRef<AppBarRootElement, AppBarRootProps>(\n (props, forwardedRef) => {\n const {\n anchor = 'top',\n floating = false,\n offset = '2',\n size = '1',\n variant = 'ghost',\n material,\n className,\n style,\n children,\n ...restProps\n } = props;\n\n const isHorizontal = anchor === 'top' || anchor === 'bottom';\n const internalRef = React.useRef<HTMLDivElement>(null);\n\n // Merge refs\n const mergedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n (internalRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef) {\n forwardedRef.current = node;\n }\n },\n [forwardedRef],\n );\n\n // Expose height/width as CSS variable on parent element\n React.useEffect(() => {\n const element = internalRef.current;\n if (!element) return;\n\n const parent = element.parentElement;\n if (!parent) return;\n\n const update = () => {\n let dimension = isHorizontal ? element.offsetHeight : element.offsetWidth;\n\n // For floating mode, include the margin in the total space\n if (floating) {\n const computedStyle = getComputedStyle(element);\n const margin = parseFloat(computedStyle.marginTop) || 0;\n dimension += margin * 2;\n }\n\n // `--rt-toolbar-*` are the names this bar published while it was called Toolbar.\n // They are still written so existing layouts keep their offset; prefer `--rt-app-bar-*`.\n if (isHorizontal) {\n parent.style.setProperty('--rt-app-bar-height', `${dimension}px`);\n parent.style.setProperty('--rt-toolbar-height', `${dimension}px`);\n } else {\n parent.style.setProperty('--rt-app-bar-width', `${dimension}px`);\n parent.style.setProperty('--rt-toolbar-width', `${dimension}px`);\n }\n };\n\n update();\n\n const resizeObserver = new ResizeObserver(update);\n resizeObserver.observe(element);\n\n return () => resizeObserver.disconnect();\n }, [isHorizontal, floating]);\n\n const computedStyle = floating\n ? { margin: `var(--space-${offset})`, ...style }\n : style;\n\n return (\n <Card\n ref={mergedRef}\n size={size}\n variant={variant}\n material={material}\n data-anchor={anchor}\n data-floating={floating || undefined}\n className={classNames('rt-AppBar', className)}\n style={computedStyle}\n {...restProps}\n >\n <div className=\"rt-AppBarInner\">\n {children}\n </div>\n </Card>\n );\n },\n);\nAppBarRoot.displayName = 'AppBar.Root';\n\n// ============================================================================\n// AppBar Left (for horizontal) / Start (alias)\n// ============================================================================\n\ntype AppBarSectionElement = React.ElementRef<'div'>;\ntype AppBarSectionProps = FlexProps;\n\nconst AppBarLeft = React.forwardRef<AppBarSectionElement, AppBarSectionProps>(\n ({ gap = '2', align = 'center', className, children, ...props }, forwardedRef) => (\n <Flex\n ref={forwardedRef}\n align={align}\n gap={gap}\n className={classNames('rt-AppBarSection', 'rt-AppBarLeft', className)}\n {...props}\n >\n {children}\n </Flex>\n ),\n);\nAppBarLeft.displayName = 'AppBar.Left';\n\n// ============================================================================\n// AppBar Center\n// ============================================================================\n\nconst AppBarCenter = React.forwardRef<AppBarSectionElement, AppBarSectionProps>(\n ({ gap = '2', align = 'center', justify = 'center', className, children, ...props }, forwardedRef) => (\n <Flex\n ref={forwardedRef}\n align={align}\n justify={justify}\n gap={gap}\n className={classNames('rt-AppBarSection', 'rt-AppBarCenter', className)}\n {...props}\n >\n {children}\n </Flex>\n ),\n);\nAppBarCenter.displayName = 'AppBar.Center';\n\n// ============================================================================\n// AppBar Right (for horizontal) / End (alias)\n// ============================================================================\n\nconst AppBarRight = React.forwardRef<AppBarSectionElement, AppBarSectionProps>(\n ({ gap = '2', align = 'center', justify = 'end', className, children, ...props }, forwardedRef) => (\n <Flex\n ref={forwardedRef}\n align={align}\n justify={justify}\n gap={gap}\n className={classNames('rt-AppBarSection', 'rt-AppBarRight', className)}\n {...props}\n >\n {children}\n </Flex>\n ),\n);\nAppBarRight.displayName = 'AppBar.Right';\n\n// ============================================================================\n// AppBar Title\n// ============================================================================\n\ntype AppBarTitleElement = React.ElementRef<typeof Heading>;\ntype AppBarTitleProps = React.ComponentPropsWithoutRef<typeof Heading>;\n\nconst AppBarTitle = React.forwardRef<AppBarTitleElement, AppBarTitleProps>(\n ({ className, size = '2', weight = 'medium', truncate = true, children, ...props }, forwardedRef) => (\n <Heading\n ref={forwardedRef}\n size={size}\n weight={weight}\n truncate={truncate}\n className={classNames('rt-AppBarTitle', className)}\n {...props}\n >\n {children}\n </Heading>\n ),\n);\nAppBarTitle.displayName = 'AppBar.Title';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nconst AppBar = AppBarRoot as typeof AppBarRoot & {\n Root: typeof AppBarRoot;\n Left: typeof AppBarLeft;\n Center: typeof AppBarCenter;\n Right: typeof AppBarRight;\n Title: typeof AppBarTitle;\n};\n\nAppBar.Root = AppBarRoot;\nAppBar.Left = AppBarLeft;\nAppBar.Center = AppBarCenter;\nAppBar.Right = AppBarRight;\nAppBar.Title = AppBarTitle;\n\nexport {\n AppBar,\n AppBarRoot as Root,\n AppBarLeft as Left,\n AppBarCenter as Center,\n AppBarRight as Right,\n AppBarTitle as Title,\n};\nexport type {\n AppBarRootProps as RootProps,\n AppBarSectionProps as LeftProps,\n AppBarSectionProps as CenterProps,\n AppBarSectionProps as RightProps,\n AppBarTitleProps as TitleProps,\n};\n"],
|
|
5
|
+
"mappings": "wHAAA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aA4CvB,IAAMC,EAAmB,aACvB,CAACC,EAAOC,IAAiB,CACvB,GAAM,CACJ,OAAAC,EAAS,MACT,SAAAC,EAAW,GACX,OAAAC,EAAS,IACT,KAAAC,EAAO,IACP,QAAAC,EAAU,QACV,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAAIX,EAEEY,EAAeV,IAAW,OAASA,IAAW,SAC9CW,EAAoB,SAAuB,IAAI,EAG/CC,EAAkB,cACrBC,GAAgC,CAC9BF,EAA8D,QAAUE,EACrE,OAAOd,GAAiB,WAC1BA,EAAac,CAAI,EACRd,IACTA,EAAa,QAAUc,EAE3B,EACA,CAACd,CAAY,CACf,EAGM,YAAU,IAAM,CACpB,IAAMe,EAAUH,EAAY,QAC5B,GAAI,CAACG,EAAS,OAEd,IAAMC,EAASD,EAAQ,cACvB,GAAI,CAACC,EAAQ,OAEb,IAAMC,EAAS,IAAM,CACnB,IAAIC,EAAYP,EAAeI,EAAQ,aAAeA,EAAQ,YAG9D,GAAIb,EAAU,CACZ,IAAMiB,EAAgB,iBAAiBJ,CAAO,EACxCK,EAAS,WAAWD,EAAc,SAAS,GAAK,EACtDD,GAAaE,EAAS,CACxB,CAIIT,GACFK,EAAO,MAAM,YAAY,sBAAuB,GAAGE,CAAS,IAAI,EAChEF,EAAO,MAAM,YAAY,sBAAuB,GAAGE,CAAS,IAAI,IAEhEF,EAAO,MAAM,YAAY,qBAAsB,GAAGE,CAAS,IAAI,EAC/DF,EAAO,MAAM,YAAY,qBAAsB,GAAGE,CAAS,IAAI,EAEnE,EAEAD,EAAO,EAEP,IAAMI,EAAiB,IAAI,eAAeJ,CAAM,EAChD,OAAAI,EAAe,QAAQN,CAAO,EAEvB,IAAMM,EAAe,WAAW,CACzC,EAAG,CAACV,EAAcT,CAAQ,CAAC,EAE3B,IAAMiB,EAAgBjB,EAClB,CAAE,OAAQ,eAAeC,CAAM,IAAK,GAAGK,CAAM,EAC7CA,EAEJ,OACE,gBAACc,EAAA,CACC,IAAKT,EACL,KAAMT,EACN,QAASC,EACT,SAAUC,EACV,cAAaL,EACb,gBAAeC,GAAY,OAC3B,UAAWqB,EAAW,YAAahB,CAAS,EAC5C,MAAOY,EACN,GAAGT,GAEJ,gBAAC,OAAI,UAAU,kBACZD,CACH,CACF,CAEJ,CACF,EACAX,EAAW,YAAc,cASzB,IAAM0B,EAAmB,aACvB,CAAC,CAAE,IAAAC,EAAM,IAAK,MAAAC,EAAQ,SAAU,UAAAnB,EAAW,SAAAE,EAAU,GAAGV,CAAM,EAAGC,IAC/D,gBAAC2B,EAAA,CACC,IAAK3B,EACL,MAAO0B,EACP,IAAKD,EACL,UAAWF,EAAW,mBAAoB,gBAAiBhB,CAAS,EACnE,GAAGR,GAEHU,CACH,CAEJ,EACAe,EAAW,YAAc,cAMzB,IAAMI,EAAqB,aACzB,CAAC,CAAE,IAAAH,EAAM,IAAK,MAAAC,EAAQ,SAAU,QAAAG,EAAU,SAAU,UAAAtB,EAAW,SAAAE,EAAU,GAAGV,CAAM,EAAGC,IACnF,gBAAC2B,EAAA,CACC,IAAK3B,EACL,MAAO0B,EACP,QAASG,EACT,IAAKJ,EACL,UAAWF,EAAW,mBAAoB,kBAAmBhB,CAAS,EACrE,GAAGR,GAEHU,CACH,CAEJ,EACAmB,EAAa,YAAc,gBAM3B,IAAME,EAAoB,aACxB,CAAC,CAAE,IAAAL,EAAM,IAAK,MAAAC,EAAQ,SAAU,QAAAG,EAAU,MAAO,UAAAtB,EAAW,SAAAE,EAAU,GAAGV,CAAM,EAAGC,IAChF,gBAAC2B,EAAA,CACC,IAAK3B,EACL,MAAO0B,EACP,QAASG,EACT,IAAKJ,EACL,UAAWF,EAAW,mBAAoB,iBAAkBhB,CAAS,EACpE,GAAGR,GAEHU,CACH,CAEJ,EACAqB,EAAY,YAAc,eAS1B,IAAMC,EAAoB,aACxB,CAAC,CAAE,UAAAxB,EAAW,KAAAH,EAAO,IAAK,OAAA4B,EAAS,SAAU,SAAAC,EAAW,GAAM,SAAAxB,EAAU,GAAGV,CAAM,EAAGC,IAClF,gBAACkC,EAAA,CACC,IAAKlC,EACL,KAAMI,EACN,OAAQ4B,EACR,SAAUC,EACV,UAAWV,EAAW,iBAAkBhB,CAAS,EAChD,GAAGR,GAEHU,CACH,CAEJ,EACAsB,EAAY,YAAc,eAM1B,IAAMI,EAASrC,EAQfqC,EAAO,KAAOrC,EACdqC,EAAO,KAAOX,EACdW,EAAO,OAASP,EAChBO,EAAO,MAAQL,EACfK,EAAO,MAAQJ",
|
|
6
|
+
"names": ["React", "classNames", "AppBarRoot", "props", "forwardedRef", "anchor", "floating", "offset", "size", "variant", "material", "className", "style", "children", "restProps", "isHorizontal", "internalRef", "mergedRef", "node", "element", "parent", "update", "dimension", "computedStyle", "margin", "resizeObserver", "Card", "classNames", "AppBarLeft", "gap", "align", "Flex", "AppBarCenter", "justify", "AppBarRight", "AppBarTitle", "weight", "truncate", "Heading", "AppBar"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-VK7RNXUO.js";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-VK7RNXUO.js";import{a as n}from"./chunk-3R4YLW4A.js";import*as e from"react";import{Toggle as f}from"radix-ui";var m=e.forwardRef(({pressed:o,onPressedChange:r,defaultPressed:a,children:t,...g},p)=>{let l=e.useCallback(()=>typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"Toggle button",[t]),{handlePressedChange:u}=s({pressed:o,onPressedChange:r,getAccessibleName:l,componentName:"ToggleButton"});return e.createElement(f.Root,{pressed:o,onPressedChange:u,defaultPressed:a,asChild:!0},e.createElement(n,{...g,ref:p},t))});m.displayName="ToggleButton";export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6G3MPL4A.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as v}from"./chunk-MHANZINI.js";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as v}from"./chunk-MHANZINI.js";import{a as g}from"./chunk-MJJ7XDIP.js";import{a as y}from"./chunk-5WRCK4R7.js";import{a as u}from"./chunk-GCUGJXI2.js";import{a as C}from"./chunk-GO7OHBHW.js";import{c as d}from"./chunk-SEY4NA45.js";import{a as P}from"./chunk-5TXQLK4G.js";import{a as n}from"./chunk-6FLLFCBU.js";import{a as O}from"./chunk-OS3FCYZY.js";var I={};O(I,{Close:()=>k,Content:()=>E,Description:()=>B,Root:()=>R,Title:()=>h,Trigger:()=>T});import*as e from"react";import S from"classnames";import{Dialog as r}from"radix-ui";var R=t=>e.createElement(r.Root,{...t,modal:!0});R.displayName="Dialog.Root";var T=e.forwardRef(({children:t,...o},a)=>e.createElement(r.Trigger,{...o,ref:a,asChild:!0},g(t)));T.displayName="Dialog.Trigger";var{align:A,panelBackground:K,material:_,...j}=u,q={align:A},z={panelBackground:K},F={material:_},E=e.forwardRef(({align:t,...o},a)=>{let{className:x}=n({align:t},q),{panelBackground:N}=n({panelBackground:o.panelBackground},z),{material:b}=n({material:o.material},F);P(o.panelBackground);let m=b??N,{className:M,forceMount:w,container:H,panelBackground:V,material:$,...W}=n(o,j),c=e.useRef(null),L=e.useMemo(()=>i=>{c.current=i,typeof a=="function"?a(i):a&&(a.current=i)},[a]);return v(),e.useEffect(()=>{if(typeof window>"u")return;let i=c.current;if(!i)return;let l=i.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(l.length===0)return;let p=l[0],D=l[l.length-1],f=s=>{s.key==="Tab"&&(s.shiftKey?document.activeElement===p&&(s.preventDefault(),D.focus()):document.activeElement===D&&(s.preventDefault(),p.focus()))};return i.addEventListener("keydown",f),p.focus(),()=>{i.removeEventListener("keydown",f)}},[]),e.createElement(r.Portal,{container:H,forceMount:w},e.createElement(d,{asChild:!0},e.createElement(r.Overlay,{className:"rt-BaseDialogOverlay rt-DialogOverlay"},e.createElement("div",{className:"rt-BaseDialogScroll rt-DialogScroll"},e.createElement("div",{className:`rt-BaseDialogScrollPadding rt-DialogScrollPadding ${x}`},e.createElement(r.Content,{...W,ref:L,className:S("rt-BaseDialogContent","rt-DialogContent",M),"data-material":m,"data-panel-background":m,tabIndex:-1,role:"dialog","aria-modal":"true",onCloseAutoFocus:i=>{i.preventDefault(),document.body.style.pointerEvents=""}}),e.createElement("div",{"aria-live":"polite","aria-atomic":"true",className:"rt-sr-only",id:"dialog-announcement"}))))))});E.displayName="Dialog.Content";var h=e.forwardRef((t,o)=>e.createElement(r.Title,{asChild:!0},e.createElement(C,{size:"5",mb:"3",trim:"start",...t,asChild:!1,ref:o})));h.displayName="Dialog.Title";var B=e.forwardRef((t,o)=>e.createElement(r.Description,{asChild:!0},e.createElement(y,{as:"p",size:"3",...t,asChild:!1,ref:o})));B.displayName="Dialog.Description";var k=e.forwardRef(({children:t,...o},a)=>e.createElement(r.Close,{...o,ref:a,asChild:!0},g(t)));k.displayName="Dialog.Close";export{R as a,T as b,E as c,h as d,B as e,k as f,I as g};
|
|
2
|
+
//# sourceMappingURL=chunk-7JJT42J2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-C7EVYSWK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-4WVNMGI5.js";import{a as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-4WVNMGI5.js";import{a as f}from"./chunk-HJU4I34X.js";import{a as d}from"./chunk-PS6NEG5A.js";import{a as o}from"./chunk-5WRCK4R7.js";import{a as c}from"./chunk-JDGJSNWT.js";import{b as m}from"./chunk-SEY4NA45.js";import{a as t}from"./chunk-FHOCUZDR.js";import{a as i}from"./chunk-GSTOGDAJ.js";import{a as p}from"./chunk-6FLLFCBU.js";import*as r from"react";import M from"classnames";var N=r.forwardRef((e,u)=>{let C=m(),P=e.panelBackground??C.panelBackground,{asChild:s,children:y,className:v,src:g,fallback:h,name:x,description:n,avatarVariant:z,radius:U,color:k,panelBackground:b,flush:R,...T}=p(e,l,i),B={1:{avatar:"1",name:"1",description:"0"},2:{avatar:"2",name:"2",description:"1"},3:{avatar:"3",name:"3",description:"2"},4:{avatar:"4",name:"4",description:"3"}},D=e.size||"2",a=B[D],w=r.createElement(t,{align:"center",gap:"3"},r.createElement(f,{size:a.avatar,variant:z,radius:U,src:g,fallback:h,color:k}),r.createElement(t,{direction:"column",gap:"0",style:{minWidth:0}},r.createElement(o,{size:a.name,weight:"medium",truncate:!0},x),n&&r.createElement(o,{size:a.description,emphasis:"medium",truncate:!0},n)));return r.createElement(c,{...T,asChild:s,size:e.size,variant:e.variant,panelBackground:P,flush:R,ref:u,className:M("rt-UserCard",v)},d({asChild:s,children:y},w))});N.displayName="UserCard";export{N as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CYU6BLZ5.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-IBF5U4QW.js";import{a as X,b as q,c as J}from"./chunk-WHFJ4JUN.js";import{a as w}from"./chunk-VX6ARMWP.js";import{a as
|
|
1
|
+
import{a as Q}from"./chunk-IBF5U4QW.js";import{a as X,b as q,c as J}from"./chunk-WHFJ4JUN.js";import{a as w}from"./chunk-VX6ARMWP.js";import{a as T}from"./chunk-4YFJWXL2.js";import{a as W}from"./chunk-ISOLUTZF.js";import{a as U}from"./chunk-COWZAUZR.js";import{a as j}from"./chunk-3R4YLW4A.js";import{a as R}from"./chunk-OLAWVEAI.js";import{a as D}from"./chunk-ERNM3KVF.js";import{a as v}from"./chunk-5WRCK4R7.js";import{a as F}from"./chunk-GO7OHBHW.js";import{b as V,c as x}from"./chunk-SEY4NA45.js";import{a as O}from"./chunk-F22ZRNWL.js";import{a as s}from"./chunk-XYVLQDGR.js";import{a as i}from"./chunk-FHOCUZDR.js";import{a as G}from"./chunk-E67CIG6A.js";import*as e from"react";import{useCallbackRef as ie}from"radix-ui/internal";import{flushSync as re}from"react-dom";var Y=`
|
|
2
2
|
[contenteditable],
|
|
3
3
|
[role="combobox"],
|
|
4
4
|
[role="listbox"],
|
|
@@ -7,4 +7,4 @@ import{a as Q}from"./chunk-IBF5U4QW.js";import{a as X,b as q,c as J}from"./chunk
|
|
|
7
7
|
select,
|
|
8
8
|
textarea
|
|
9
9
|
`,se=e.forwardRef(({defaultOpen:n=!0,...o},r)=>{let[u,d]=e.useState(n),h=e.useRef(null),l=e.useRef(null);return e.useEffect(()=>{function C(c){let k=c.altKey||c.ctrlKey||c.shiftKey||c.metaKey,g=document.activeElement?.closest(Y);if(c.key?.toUpperCase()==="T"&&!k&&!g){let f=!1;re(()=>{d(H=>(f=!H,f))}),f?(l.current=document.activeElement,h.current?.focus()):l.current?.focus()}}return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[]),e.createElement(_,{...o,ref:r,triggerRef:h,open:u,shortcut:e.createElement(R,{content:"Press T to show/hide the Theme Panel",side:"bottom",sideOffset:6},e.createElement(G,{asChild:!0,size:"3",tabIndex:0,className:"rt-ThemePanelShortcut"},e.createElement("button",{type:"button",onClick:()=>d(C=>!C),ref:h,"aria-label":"Toggle the Theme Panel"},"T")))})});se.displayName="ThemePanel";var _=e.forwardRef((n,o)=>{let{open:r,onAppearanceChange:u,shortcut:d,triggerRef:h,...l}=n,C=V();return e.createElement(x,{asChild:!0,radius:"medium",scaling:"100%"},e.createElement(i,{direction:"column",position:"fixed",top:"0",right:"0",mr:{initial:"2",sm:"4"},mt:{initial:"2",sm:"4"},width:{initial:"360px"},maxHeight:{initial:"calc(100svh - var(--space-2) - var(--space-2))",sm:"calc(100svh - var(--space-4) - var(--space-4))"},maxWidth:{initial:"calc(100svw - var(--space-2) - var(--space-2))",sm:"calc(100svw - var(--space-4) - var(--space-4))"},inert:r?void 0:Q,...l,ref:o,style:{zIndex:999999999,overflow:"hidden",borderRadius:"var(--radius-4)",backgroundColor:"var(--color-panel-solid)",transformOrigin:"top center",transitionProperty:"transform, box-shadow",transitionDuration:"200ms",transitionTimingFunction:r?"ease-out":"ease-in",transform:r?"none":"translateX(105%)",boxShadow:r?"var(--shadow-5)":"var(--shadow-2)",...n.style}},e.createElement(U,null,e.createElement(T,{flexGrow:"1",p:{initial:"4",xs:"5"},position:"relative"},!!d&&e.createElement(T,{position:"absolute",top:"0",right:"0",m:"2"},d),e.createElement(ee,{onAppearanceChange:u,context:C})))))});_.displayName="ThemePanelImpl";var ee=e.forwardRef((n,o)=>{let{onAppearanceChange:r,context:u,...d}=n,h=V(),{appearance:l,onAppearanceChange:C,accentColor:c,onAccentColorChange:k,grayColor:g,onGrayColorChange:K,panelBackground:f,onPanelBackgroundChange:H,radius:M,onRadiusChange:te,scaling:Z,onScalingChange:ae}=u??h,[E,S]=e.useState(l==="inherit"?null:l),N=r!==void 0,$=ie(r),A=e.useCallback(t=>{let a=ce();if(l!=="inherit"){C(t);return}N?$(t):(S(t),de(t)),a()},[l,C,N,$]),I=O(c),z=g==="auto"?I:g,[ne,B]=e.useState("idle");async function oe(){let t={appearance:l===s.appearance.default?void 0:l,accentColor:c===s.accentColor.default?void 0:c,grayColor:g===s.grayColor.default?void 0:g,panelBackground:f===s.panelBackground.default?void 0:f,radius:M===s.radius.default?void 0:M,scaling:Z===s.scaling.default?void 0:Z},a=Object.keys(t).filter(p=>t[p]!==void 0).map(p=>`${p}="${t[p]}"`).join(" "),y=a?`<Theme ${a}>`:"<Theme>";B("copying"),await navigator.clipboard.writeText(y),B("copied"),setTimeout(()=>B("idle"),2e3)}return e.useEffect(()=>{function t(a){let y=a.altKey||a.ctrlKey||a.shiftKey||a.metaKey,p=document.activeElement?.closest(Y);a.key?.toUpperCase()==="D"&&!y&&!p&&A(E==="light"?"dark":"light")}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[A,E]),e.useEffect(()=>{let t=document.documentElement,a=document.body;function y(){let L=t.classList.contains("dark")||t.classList.contains("dark-theme")||a.classList.contains("dark")||a.classList.contains("dark-theme");S(l==="inherit"?L?"dark":"light":l)}let p=new MutationObserver(function(L){L.forEach(function(le){le.attributeName==="class"&&y()})});return y(),l==="inherit"&&(p.observe(t,{attributes:!0}),p.observe(a,{attributes:!0})),()=>p.disconnect()},[l]),e.createElement(i,{direction:"column",gap:"5",...d,ref:o},e.createElement(F,{size:{initial:"3",sm:"5"},trim:"both",as:"h2"},"Theme"),e.createElement(i,{direction:"column",gap:"5"},e.createElement(P,null,e.createElement(b,{id:"accent-color-title"},"Accent color"),e.createElement(i,{wrap:"wrap",gap:"2",role:"group","aria-labelledby":"accent-color-title"},s.accentColor.values.map(t=>e.createElement(T,{asChild:!0,key:t},e.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":m(t),style:{backgroundColor:`var(--${t}-9)`}},e.createElement(R,{content:`${m(t)}${c==="gray"&&z!=="gray"?` (${m(z)})`:""}`},e.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"accentColor",value:t,checked:c===t,onChange:a=>k(a.target.value)}))))))),e.createElement(P,null,e.createElement(b,{id:"gray-color-title"},"Gray color"),e.createElement(i,{wrap:"wrap",gap:"2",role:"group","aria-labelledby":"gray-color-title"},s.grayColor.values.map(t=>e.createElement(i,{key:t,asChild:!0,align:"center",justify:"center"},e.createElement("label",{className:"rt-ThemePanelSwatch","aria-label":m(t),style:{backgroundColor:t==="auto"?`var(--${I}-9)`:t==="gray"?"var(--gray-9)":`var(--${t}-9)`,filter:t==="gray"?"saturate(0)":void 0}},e.createElement(R,{content:`${m(t)}${t==="auto"?` (${m(I)})`:""}`},e.createElement("input",{className:"rt-ThemePanelSwatchInput",type:"radio",name:"grayColor",value:t,checked:g===t,onChange:a=>K(a.target.value)}))))))),e.createElement(P,null,e.createElement(b,{id:"appearance-title"},"Appearance"),e.createElement(w,{columns:"2",gap:"2",role:"group","aria-labelledby":"appearance-title"},["light","dark"].map(t=>e.createElement("label",{key:t,className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"appearance",value:t,checked:E===t,onChange:a=>A(a.target.value)}),e.createElement(i,{align:"center",justify:"center",height:"32px",gap:"2"},t==="light"?e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},e.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -1px"}},e.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),e.createElement(v,{size:"1",weight:"medium"},m(t))))))),e.createElement(P,null,e.createElement(b,{id:"radius-title"},"Radius"),e.createElement(i,{gap:"2",role:"group","aria-labelledby":"radius-title",wrap:"wrap"},s.radius.values.map(t=>e.createElement(i,{key:t,direction:"column",align:"center"},e.createElement("label",{className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"radius",id:`theme-panel-radius-${t}`,value:t,checked:M===t,onChange:a=>te(a.target.value)}),e.createElement(x,{asChild:!0,radius:t},e.createElement(T,{m:"3",width:{initial:"24px",sm:"32px"},height:{initial:"24px",sm:"32px"},style:{borderTopLeftRadius:t==="full"?"80%":"var(--radius-5)",backgroundImage:"linear-gradient(to bottom right, var(--accent-3), var(--accent-4))",borderTop:"2px solid var(--accent-a8)",borderLeft:"2px solid var(--accent-a8)"}}))),e.createElement(T,{asChild:!0,pt:"2"},e.createElement(v,{asChild:!0,size:"1",emphasis:"medium"},e.createElement("label",{htmlFor:`theme-panel-radius-${t}`},m(t)))))))),e.createElement(P,null,e.createElement(b,{id:"scaling-title"},"Scaling"),e.createElement(w,{columns:{initial:"repeat(3, 1fr)",sm:"5"},gap:"2",role:"group","aria-labelledby":"scaling-title"},s.scaling.values.map(t=>e.createElement("label",{key:t,className:"rt-ThemePanelRadioCard","aria-label":`Scaling ${t}`},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"scaling",value:t,checked:Z===t,onChange:a=>ae(a.target.value)}),e.createElement(i,{align:"center",justify:"center",height:"32px"},e.createElement(x,{asChild:!0,scaling:t},e.createElement(i,{align:"center",justify:"center"},e.createElement(v,{size:"1",weight:"medium"},m(t))))))))),e.createElement(P,null,e.createElement(i,{align:"center",gap:"2"},e.createElement(b,{id:"panel-background-title"},"Panel background"),e.createElement(X,null,e.createElement(q,null,e.createElement(W,{size:"1",variant:"ghost",color:"gray"},e.createElement(D,{label:"Learn more about panel background options"},e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z",fillRule:"evenodd",clipRule:"evenodd"}))))),e.createElement(J,{size:"1",width:"220px",maxWidth:"90svw",minWidth:"0",side:"top",align:"center"},e.createElement(v,{as:"p",size:"1"},"Whether Card and Table panels are translucent, showing some of the background behind them.")))),e.createElement(w,{columns:{initial:"1",sm:"2"},rows:{initial:"2",sm:"1"},gap:"2",role:"group","aria-labelledby":"panel-background-title"},s.panelBackground.values.map(t=>e.createElement("label",{key:t,className:"rt-ThemePanelRadioCard"},e.createElement("input",{className:"rt-ThemePanelRadioCardInput",type:"radio",name:"panelBackground",value:t,checked:f===t,onChange:a=>H(a.target.value)}),e.createElement(i,{align:"center",justify:"center",height:"32px",gap:"2"},t==="solid"?e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},e.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})):e.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{margin:"0 -2px"}},e.createElement("path",{opacity:".05",d:"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".1",d:"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".15",d:"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".2",d:"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".25",d:"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".3",d:"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".35",d:"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".4",d:"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".45",d:"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{opacity:".5",d:"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}),e.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),e.createElement(v,{size:"1",weight:"medium"},m(t)))))))),e.createElement(j,{style:{width:"100%"},onClick:oe},ne==="copied"?"Copied":"Copy Theme"))});ee.displayName="ThemePanelContent";function P(n){return e.createElement(i,{direction:"column",gap:"3",asChild:!0,...n},e.createElement("section",null,n.children))}function b(n){return e.createElement(F,{as:"h3",size:{initial:"1",sm:"2"},...n})}function ce(){let n=document.createElement("style");return n.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n)},1)}}function m(n){return n.charAt(0).toUpperCase()+n.slice(1)}function de(n){let o=document.documentElement,r=o.classList.contains("light-theme"),u=o.classList.contains("dark-theme"),d=o.classList.contains("light"),h=o.classList.contains("dark");(r||u)&&(o.classList.remove("light-theme","dark-theme"),o.style.colorScheme=n,o.classList.add(`${n}-theme`)),(d||h)&&(o.classList.remove("light","dark"),o.style.colorScheme=n,o.classList.add(n)),!r&&!u&&!d&&!h&&(o.style.colorScheme=n,o.classList.add(n))}export{se as a,ee as b};
|
|
10
|
-
//# sourceMappingURL=chunk-
|
|
10
|
+
//# sourceMappingURL=chunk-D6PHTHF2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as rt}from"./chunk-RJP5QUXO.js";import{a as je}from"./chunk-4XGGX2V2.js";import{a as nt}from"./chunk-COWZAUZR.js";import{g as tt,j as at}from"./chunk-IX5HIHVI.js";import{a as me}from"./chunk-5WRCK4R7.js";import{a as et}from"./chunk-HF5WY5YE.js";import{a as de}from"./chunk-FHOCUZDR.js";import{a as Be}from"./chunk-AGAQC4HH.js";import{b as U}from"./chunk-FWB47YCH.js";import{a as Ot}from"./chunk-OS3FCYZY.js";var $t={};Ot($t,{AttachTrigger:()=>ft,Attachment:()=>Ue,AttachmentsRow:()=>ht,InlineEnd:()=>pt,InlineStart:()=>mt,Root:()=>ut,Row:()=>bt,RowEnd:()=>Ct,RowStart:()=>Rt,Send:()=>gt,Textarea:()=>dt});import*as e from"react";import L from"classnames";import{LazyMotion as Ft,MotionConfig as Ht,domAnimation as zt,m as he}from"motion/react";import{useComposedRefs as it}from"radix-ui/internal";import{useDropzone as It}from"react-dropzone";var Ve=typeof window<"u"?e.useLayoutEffect:e.useEffect;function ot(n,s){let{placeholder:r}=n;if(!r){s();return}n.placeholder="";try{s()}finally{n.placeholder=r}}var fe={layout:{type:"spring",visualDuration:.15,bounce:.1}},ct=e.createContext(null),$e=e.createContext(""),K=()=>{let n=e.useContext(ct);if(!n)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return n},pe=n=>Array.isArray(n)?n:typeof n=="string"?n.split(",").map(s=>s.trim()).filter(Boolean):[],Dt=(n,s)=>{if(s.length===0)return!0;let r=n.type.toLowerCase(),d=n.name.toLowerCase();for(let f of s){let i=f.toLowerCase();if(i.includes("/")){let[b,c]=i.split("/"),[C,p]=r.split("/");if(b==="*"||b===C&&(c==="*"||c===p))return!0}else if(i.startsWith(".")&&d.endsWith(i))return!0}return!1},Bt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,lt=(n,s)=>(s||"").toLowerCase().startsWith("image/")||Bt.test(n),We=n=>n.trim().length>0,st=(n,s)=>`${n} ${s}${n===1?"":"s"}`,jt=0,Vt=()=>`chatbar-attachment-${Date.now()}-${++jt}`,ut=e.forwardRef((n,s)=>{let{className:r,style:d,children:f,value:i,defaultValue:b="",onValueChange:c,open:C,defaultOpen:p=!1,onOpenChange:S,expandOn:A="both",minLines:h=3,maxLines:B=6,sendMode:H="whenDirty",disabled:l,readOnly:g,onSubmit:k,size:P="2",variant:E,color:M,radius:z,panelBackground:v,material:N,width:j,maxWidth:re,attachments:y,defaultAttachments:I,onAttachmentsChange:_,accept:be,multiple:F=!0,maxAttachments:G,maxFileSize:q,paste:D=!0,pasteAccept:O,clearOnSubmit:Y=!0,onAttachmentReject:Ee,dropzone:oe=!0,apiRef:Te,onBlurCapture:Re,notices:Ce,context:ge,...Le}=n,t=N||v,R=i!=null,[w,se]=e.useState(b),V=R?i:w,X=C!=null,[ke,ie]=e.useState(p),Q=X?C:ke,Z="attachments"in n,[Ke,vt]=e.useState(()=>I??[]),ce=e.useMemo(()=>Z?y??[]:Ke,[Z,y,Ke]),[_e,yt]=e.useState({text:"",id:0}),le=e.useCallback(a=>yt(o=>({text:a,id:o.id+1})),[]),Ge=e.useRef(null),xt=it(s,Ge),Me=e.useRef(null),Ne=e.useRef(null),ue=e.useRef(!1),ve=e.useRef(!1),ye=e.useRef(void 0),Oe=e.useRef(null),qe=pe(be).join(","),Fe=pe(O).join(","),He=e.useMemo(()=>pe(qe),[qe]),Pt=e.useMemo(()=>Fe?pe(Fe):He,[Fe,He]),Ye={value:V,attachments:ce,accepts:He,pasteAccepts:Pt,multiple:F,maxAttachments:G,maxFileSize:q,disabled:l,readOnly:g,expandOn:A,isValueControlled:R,isOpenControlled:X,isAttachmentsControlled:Z,onValueChange:c,onOpenChange:S,onAttachmentsChange:_,onAttachmentReject:Ee,onSubmit:k},x=e.useRef(Ye);x.current=Ye;let ze=e.useRef(null),W=e.useCallback(()=>ze.current??x.current.attachments,[]),ee=e.useCallback(a=>{x.current.isOpenControlled||ie(a),x.current.onOpenChange?.(a)},[]),xe=e.useCallback(a=>{x.current.isValueControlled||se(a),x.current.onValueChange?.(a)},[]),te=e.useCallback(a=>{ze.current=a,queueMicrotask(()=>{ze.current=null}),x.current.isAttachmentsControlled||vt(a),x.current.onAttachmentsChange?.(a)},[]),Pe=e.useRef(new Set),ae=e.useCallback((a,o,u=x.current.multiple)=>{let m=x.current;if(m.disabled||m.readOnly||a.length===0)return 0;let $=W(),J=[],ne=[],Mt=typeof m.maxAttachments=="number"?Math.max(m.maxAttachments-$.length,0):1/0,Nt=u?1/0:1;for(let T of a){if(J.length>=Mt||J.length>=Nt){ne.push({file:T,reason:"count"});continue}if(typeof m.maxFileSize=="number"&&T.size>m.maxFileSize){ne.push({file:T,reason:"size"});continue}if(!Dt(T,o)){ne.push({file:T,reason:"type"});continue}let De=lt(T.name,T.type)?URL.createObjectURL(T):void 0;De&&Pe.current.add(De),J.push({id:Vt(),name:T.name,size:T.size,type:T.type,file:T,url:De,status:"idle"})}let Se=[];return J.length>0&&(te($.concat(J)),m.expandOn!=="none"&&ee(!0),Se.push(`${st(J.length,"file")} attached.`)),ne.length>0&&(m.onAttachmentReject?.(ne),Se.push(`${st(ne.length,"file")} could not be attached.`)),Se.length>0&&le(Se.join(" ")),J.length},[W,te,ee,le]),Ae=e.useCallback(a=>ae(a,x.current.accepts),[ae]),Xe=e.useCallback(a=>ae(a,x.current.pasteAccepts),[ae]),Je=e.useCallback(a=>{let o=W(),u=o.find(m=>m.id===a);u&&(te(o.filter(m=>m.id!==a)),le(`Removed ${u.name}.`))},[W,te,le]),Qe=e.useCallback(a=>{let o=x.current;if(o.disabled||o.readOnly)return!1;let u=W();if(!We(o.value)&&u.length===0)return!1;let m={value:o.value,attachments:u};if(a&&o.onSubmit)for(let $ of u)$.url&&Pe.current.delete($.url);return o.onSubmit?.(m),a&&(xe(""),te([])),!0},[W,xe,te]);e.useEffect(()=>{let a=Pe.current;if(a.size===0)return;let o=new Set(ce.map(u=>u.url));for(let u of Array.from(a))o.has(u)||(URL.revokeObjectURL(u),a.delete(u))},[ce]),e.useEffect(()=>{let a=Pe.current;return()=>{if(!x.current.isAttachmentsControlled){for(let o of Array.from(a))URL.revokeObjectURL(o);a.clear()}}},[]);let we=e.useCallback(a=>{let o=x.current,u=Ne.current;if(clearTimeout(ye.current),ve.current=!1,!u||o.disabled||o.readOnly)return;let m=a?.accept!=null?pe(a.accept):o.accepts,$=a?.multiple??o.multiple;Oe.current={patterns:m,multiple:$},u.accept=m.join(","),u.multiple=$,ue.current=!0,u.click(),setTimeout(()=>{document.hasFocus()&&(ue.current=!1)},1e3)},[]),Ze=e.useCallback(()=>{ve.current=!0,clearTimeout(ye.current),ye.current=setTimeout(()=>{ve.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(ye.current),[]),e.useEffect(()=>{let a=Ne.current,o=()=>{ue.current=!1};return window.addEventListener("focus",o),a?.addEventListener("cancel",o),()=>{window.removeEventListener("focus",o),a?.removeEventListener("cancel",o)}},[]);let At=e.useCallback(a=>{let o=a.currentTarget,u=Array.from(o.files??[]),m=Oe.current;ae(u,m?.patterns??x.current.accepts,m?.multiple),ue.current=!1,Oe.current=null,o.value=""},[ae]),wt=e.useCallback(a=>{Re?.(a);let o=x.current,u=Ge.current;if(!u||o.expandOn==="none")return;let m=a.relatedTarget;m&&u.contains(m)||ue.current||ve.current||!We(o.value)&&W().length===0&&ee(!1)},[Re,ee,W]),St=e.useCallback(a=>{Ae(a)},[Ae]),{getRootProps:Et,isDragActive:Tt}=It({onDrop:St,onDragEnter:()=>le(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!oe||l||g}),Ie=oe&&Tt;e.useImperativeHandle(Te,()=>({focusTextarea:()=>Me.current?.focus({preventScroll:!0}),openFilePicker:()=>we()}),[we]);let Lt=e.useCallback(a=>{if(l||a.pointerType==="mouse"&&a.button!==0)return;let o=a.target;o instanceof Element&&o.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(a.preventDefault(),Me.current?.focus({preventScroll:!0}))},[l]),kt=e.useMemo(()=>({open:Q,setOpen:ee,setValue:xe,size:P,expandOn:A,minLines:h,maxLines:B,sendMode:H,disabled:l,readOnly:g,paste:D,clearOnSubmit:Y,multiple:F,textareaRef:Me,attachments:ce,removeAttachment:Je,submit:Qe,appendFiles:Ae,appendFilesFromPaste:Xe,openFilePicker:we,beginFilePickerPress:Ze}),[Q,ee,xe,P,A,h,B,H,l,g,D,Y,F,ce,Je,Qe,Ae,Xe,we,Ze]);return e.createElement(ct.Provider,{value:kt},e.createElement($e.Provider,{value:V},e.createElement(Ft,{features:zt},e.createElement(Ht,{reducedMotion:"user"},e.createElement("div",{...Le,ref:xt,className:L("rt-ChatbarRoot",`rt-r-size-${P}`,r),style:{position:"relative",width:j,maxWidth:re,...d},"data-state":Q?"open":"closed","data-disabled":l?"":void 0,"data-readonly":g?"":void 0,"data-drop-active":Ie?"":void 0,"data-accent-color":M,"data-radius":z,"data-panel-background":t,"data-material":t,onBlurCapture:wt},e.createElement("input",{ref:Ne,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:At}),Ce?e.createElement("div",{className:"rt-ChatbarNotices"},e.createElement(rt.Provider,{value:P},Ce)):null,e.createElement("div",{...oe?Et():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Lt},e.createElement(he.div,{className:L("rt-ChatbarBox",`rt-variant-${E??"surface"}`),style:{position:"relative"},"data-accent-color":M,"data-radius":z,"data-panel-background":t,"data-material":t,layout:!0,transition:fe},e.createElement(he.div,{className:"rt-ChatbarGrid",layout:"position",transition:fe},f),Ie&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(me,{emphasis:"medium",size:P,weight:"medium"},"Drop files here to attach"))))),ge?e.createElement(me,{as:"div",size:P==="3"?"2":"1",emphasis:"medium",className:"rt-ChatbarContext"},ge):null,e.createElement(Be,{role:"status","aria-live":"polite"},Ie?"Drop files here to attach.":e.createElement("span",{key:_e.id},_e.text)))))))});ut.displayName="Chatbar.Root";var dt=e.forwardRef((n,s)=>{let{className:r,style:d,asChild:f,onFocus:i,onChange:b,onPaste:c,onKeyDown:C,onCompositionStart:p,onCompositionEnd:S,submitOnEnter:A=!1,...h}=n,B=K(),H=e.useContext($e),{open:l,minLines:g,maxLines:k,expandOn:P,disabled:E,readOnly:M,setOpen:z,setValue:v,textareaRef:N,paste:j,appendFilesFromPaste:re,size:y,submit:I,clearOnSubmit:_}=B,be=it(s,N),F=e.useRef(0),G=e.useRef(0),q=e.useRef(!1),D=e.useRef({open:l,minLines:g,maxLines:k});Ve(()=>{D.current={open:l,minLines:g,maxLines:k}},[l,g,k]);let O=e.useCallback(()=>{let t=N.current;if(!t)return;let R=window.getComputedStyle(t);F.current=parseFloat(R.lineHeight)||20,G.current=(parseFloat(R.paddingTop)||0)+(parseFloat(R.paddingBottom)||0)},[N]),Y=e.useCallback((t,R)=>{let{minLines:w,maxLines:se}=D.current,V=F.current,X=G.current,ke=Math.ceil((R?w:1)*V)+X,ie=Math.ceil((R?se:1)*V)+X,Q=Math.max(t.scrollHeight,ke);t.style.height=`${Math.min(Q,ie)}px`;let Z=Q>ie;t.style.overflowY=Z?"auto":"hidden",t.style.maxHeight=Z?`${ie}px`:"none"},[]);Ve(()=>{O()},[O,y]),Ve(()=>{let t=N.current;t&&(F.current===0&&O(),ot(t,()=>{t.style.height="auto";let R=l;if(!l&&(P==="overflow"||P==="both")){let w=Math.ceil(F.current)+G.current;t.scrollHeight>w+1&&(R=!0,z(!0))}Y(t,R)}))},[H,l,P,g,k,y,z,N,O,Y]),e.useEffect(()=>{let t=N.current;if(!t||typeof ResizeObserver>"u")return;let R=-1,w=new ResizeObserver(se=>{let V=se[0]?.contentRect.width??0;if(V===R)return;let X=R===-1;R=V,!X&&(O(),ot(t,()=>{t.style.height="auto",Y(t,D.current.open)}))});return w.observe(t),()=>w.disconnect()},[N,O,Y]),e.useEffect(()=>{},[]);let Ee=e.useCallback(t=>{i?.(t),!(E||M)&&(P==="focus"||P==="both")&&!l&&z(!0)},[E,M,P,l,z,i]),oe=e.useCallback(t=>{v(t.currentTarget.value),b?.(t)},[v,b]),Te=e.useCallback(t=>{if(c?.(t),t.defaultPrevented||!j||E||M)return;let R=Array.from(t.clipboardData?.items??[]).filter(w=>w.kind==="file").map(w=>w.getAsFile()).filter(w=>!!w);R.length!==0&&re(R)>0&&t.preventDefault()},[j,E,M,c,re]),Re=e.useCallback(t=>{q.current=!0,p?.(t)},[p]),Ce=e.useCallback(t=>{q.current=!1,S?.(t)},[S]),ge=e.useCallback(t=>{C?.(t),!(t.defaultPrevented||!A)&&(t.key!=="Enter"||t.shiftKey||t.altKey||t.ctrlKey||t.metaKey||q.current||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||(t.preventDefault(),I(_)))},[A,C,I,_]),Le=f?U:"textarea";return e.createElement(he.div,{className:L("rt-ChatbarField","rt-ChatbarTextarea",r),layout:"position",transition:fe},e.createElement(Le,{...h,ref:be,className:"rt-ChatbarInput",value:H,onChange:oe,onFocus:Ee,onPaste:Te,onKeyDown:ge,onCompositionStart:Re,onCompositionEnd:Ce,disabled:E,readOnly:M,rows:l?g:1,spellCheck:h.spellCheck??!0,autoCorrect:h.autoCorrect??"on",style:d}))});dt.displayName="Chatbar.Textarea";var mt=e.forwardRef((n,s)=>{let{children:r,asChild:d,className:f,...i}=n;return K().open?null:e.createElement(d?U:"div",{...i,ref:s,className:L("rt-ChatbarInlineStart",f)},r)});mt.displayName="Chatbar.InlineStart";var pt=e.forwardRef((n,s)=>{let{children:r,asChild:d,className:f,...i}=n;return K().open?null:e.createElement(d?U:"div",{...i,ref:s,className:L("rt-ChatbarInlineEnd",f)},r)});pt.displayName="Chatbar.InlineEnd";var ht=e.forwardRef((n,s)=>{let{asChild:r,forceMount:d,renderAttachment:f,className:i,...b}=n,c=K();if(c.attachments.length===0&&!d)return null;let C=r?U:"div";return e.createElement(he.div,{layout:"position",transition:fe},e.createElement(C,{...b,ref:s,className:L("rt-ChatbarAttachmentsRow",i),role:"list","aria-label":b["aria-label"]??"Attachments"},e.createElement(nt,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(de,{align:"center",gap:"2",minWidth:"fit-content"},c.attachments.map(p=>e.createElement(Ue,{key:p.id,attachment:p,asChild:!!f},f?.(p)))))))});ht.displayName="Chatbar.AttachmentsRow";var Wt={uploading:"uploading",error:"failed to upload"},Ue=e.forwardRef((n,s)=>{let{attachment:r,asChild:d,className:f,children:i,...b}=n,c=K(),C=d?U:"div",p=!!r.url&<(r.name,r.type),S=`${Math.ceil(r.size/1024)} KB`,A=r.status?Wt[r.status]:void 0,h=c.disabled||c.readOnly,B=H=>{let l=H.currentTarget.closest('[role="listitem"]'),g=l?.parentElement?Array.from(l.parentElement.children):[],k=l?g.indexOf(l):-1,E=(g[k+1]??g[k-1])?.querySelector(".rt-ChatbarAttachmentRemove");E?E.focus():c.textareaRef.current?.focus({preventScroll:!0}),c.removeAttachment(r.id)};return e.createElement(C,{...b,ref:s,className:L("rt-ChatbarAttachment",f),role:"listitem","data-kind":p?"image":"file","data-status":r.status,title:r.name},i??e.createElement(de,{align:"center",gap:"2",pr:p?void 0:"6"},e.createElement("div",{className:"rt-ChatbarAttachmentPreview","aria-hidden":!0},p?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:r.url,alt:""}):e.createElement(at,null)),p?e.createElement(Be,null,r.name,", ",S,A?`, ${A}`:""):e.createElement(de,{direction:"column",gap:"0",minWidth:"0"},e.createElement(me,{size:c.size,weight:"medium",truncate:!0},r.name),e.createElement(me,{size:"1",color:r.status==="error"?"red":void 0,emphasis:r.status==="error"?void 0:"medium"},S,A?` \xB7 ${A}`:"")),!h&&e.createElement(je,{className:"rt-ChatbarAttachmentRemove","aria-label":`Remove ${r.name}`,size:"1",variant:"classic",color:"gray",onClick:B},e.createElement(tt,null))))});Ue.displayName="Chatbar.Attachment";var ft=e.forwardRef((n,s)=>{let{asChild:r,accept:d,multiple:f,disabled:i,onPointerDown:b,onClick:c,...C}=n,p=K(),S=i||p.disabled||p.readOnly;return e.createElement(r?U:"button",{...C,ref:s,className:L("rt-ChatbarAttachTrigger",C.className),type:C.type??"button","aria-label":C["aria-label"]??"Add attachments",disabled:S,onPointerDown:h=>{b?.(h),!S&&!h.defaultPrevented&&p.beginFilePickerPress()},onClick:h=>{c?.(h),!(S||h.defaultPrevented)&&p.openFilePicker({accept:d,multiple:f})}})});ft.displayName="Chatbar.AttachTrigger";var bt=e.forwardRef((n,s)=>{let{asChild:r,children:d,className:f,...i}=n;if(!K().open)return null;let c=r?U:"div";return e.createElement(he.div,{layout:"position",transition:fe},e.createElement(c,{...i,ref:s,className:L("rt-ChatbarRow",f)},e.createElement(de,{align:"center",justify:"between",width:"100%"},d)))});bt.displayName="Chatbar.Row";var Rt=e.forwardRef((n,s)=>{let{className:r,...d}=n;return e.createElement("div",{...d,ref:s,className:L("rt-ChatbarRowStart",r)})});Rt.displayName="Chatbar.RowStart";var Ct=e.forwardRef((n,s)=>{let{className:r,...d}=n;return e.createElement("div",{...d,ref:s,className:L("rt-ChatbarRowEnd",r)})});Ct.displayName="Chatbar.RowEnd";var gt=e.forwardRef((n,s)=>{let{asChild:r,clearOnSend:d,disabled:f,children:i,style:b,className:c,size:C,variant:p,tabIndex:S,onClick:A,status:h="ready",onStop:B,onRetry:H,stopLabel:l="Stop",retryLabel:g="Retry",stopIcon:k,retryIcon:P,"aria-label":E,"aria-labelledby":M,...z}=n,v=K(),N=e.useContext($e),j=We(N)||v.attachments.length>0,y=j?"send":h==="submitted"||h==="streaming"?"stop":h==="error"?"retry":"send";if(v.sendMode==="never"&&y==="send")return null;let I=y!=="send"||v.sendMode==="always"||j,_=y==="send"?f||v.disabled||v.readOnly||!j:f||v.disabled,F=y==="stop"?{"aria-label":l}:y==="retry"?{"aria-label":g}:M?{"aria-labelledby":M}:{"aria-label":E??"Send"},G=D=>{if(A?.(D),D.defaultPrevented||_)return;if(y==="stop"){B?.();return}if(y==="retry"){H?.();return}let O=d??v.clearOnSubmit;v.submit(O)&&O&&v.textareaRef.current?.focus({preventScroll:!0})},q=y==="stop"?k??(h==="submitted"?e.createElement(et,{size:v.size}):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"}))):y==="retry"?P??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"})):i??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(je,{...z,ref:s,size:C??v.size,variant:p??(v.open||y!=="send"?"solid":"ghost"),disabled:_,className:L("rt-ChatbarSend",c),style:{opacity:I?1:0,pointerEvents:I?void 0:"none",...b},"aria-hidden":I?void 0:!0,tabIndex:I?S:-1,asChild:r,onClick:G,"data-status":h,"data-mode":y,...F},q)});gt.displayName="Chatbar.Send";export{ut as a,dt as b,mt as c,pt as d,ht as e,Ue as f,ft as g,bt as h,Rt as i,Ct as j,gt as k,$t as l};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as rt}from"./chunk-L5PID6BU.js";import{a as je}from"./chunk-ISOLUTZF.js";import{a as nt}from"./chunk-COWZAUZR.js";import{g as tt,j as at}from"./chunk-IX5HIHVI.js";import{a as me}from"./chunk-5WRCK4R7.js";import{a as et}from"./chunk-HF5WY5YE.js";import{a as Be}from"./chunk-AGAQC4HH.js";import{a as de}from"./chunk-FHOCUZDR.js";import{b as U}from"./chunk-FWB47YCH.js";import{a as Ot}from"./chunk-OS3FCYZY.js";var $t={};Ot($t,{AttachTrigger:()=>ft,Attachment:()=>Ue,AttachmentsRow:()=>ht,InlineEnd:()=>pt,InlineStart:()=>mt,Root:()=>ut,Row:()=>bt,RowEnd:()=>Ct,RowStart:()=>Rt,Send:()=>gt,Textarea:()=>dt});import*as e from"react";import L from"classnames";import{LazyMotion as Ft,MotionConfig as Ht,domAnimation as zt,m as he}from"motion/react";import{useComposedRefs as it}from"radix-ui/internal";import{useDropzone as It}from"react-dropzone";var Ve=typeof window<"u"?e.useLayoutEffect:e.useEffect;function ot(n,s){let{placeholder:r}=n;if(!r){s();return}n.placeholder="";try{s()}finally{n.placeholder=r}}var fe={layout:{type:"spring",visualDuration:.15,bounce:.1}},ct=e.createContext(null),$e=e.createContext(""),K=()=>{let n=e.useContext(ct);if(!n)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return n},pe=n=>Array.isArray(n)?n:typeof n=="string"?n.split(",").map(s=>s.trim()).filter(Boolean):[],Dt=(n,s)=>{if(s.length===0)return!0;let r=n.type.toLowerCase(),d=n.name.toLowerCase();for(let f of s){let i=f.toLowerCase();if(i.includes("/")){let[b,c]=i.split("/"),[C,p]=r.split("/");if(b==="*"||b===C&&(c==="*"||c===p))return!0}else if(i.startsWith(".")&&d.endsWith(i))return!0}return!1},Bt=/\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i,lt=(n,s)=>(s||"").toLowerCase().startsWith("image/")||Bt.test(n),We=n=>n.trim().length>0,st=(n,s)=>`${n} ${s}${n===1?"":"s"}`,jt=0,Vt=()=>`chatbar-attachment-${Date.now()}-${++jt}`,ut=e.forwardRef((n,s)=>{let{className:r,style:d,children:f,value:i,defaultValue:b="",onValueChange:c,open:C,defaultOpen:p=!1,onOpenChange:S,expandOn:A="both",minLines:h=3,maxLines:B=6,sendMode:H="whenDirty",disabled:l,readOnly:g,onSubmit:k,size:P="2",variant:E,color:M,radius:z,panelBackground:v,material:N,width:j,maxWidth:re,attachments:y,defaultAttachments:I,onAttachmentsChange:_,accept:be,multiple:F=!0,maxAttachments:G,maxFileSize:q,paste:D=!0,pasteAccept:O,clearOnSubmit:Y=!0,onAttachmentReject:Ee,dropzone:oe=!0,apiRef:Te,onBlurCapture:Re,notices:Ce,context:ge,...Le}=n,t=N||v,R=i!=null,[w,se]=e.useState(b),V=R?i:w,X=C!=null,[ke,ie]=e.useState(p),Q=X?C:ke,Z="attachments"in n,[Ke,vt]=e.useState(()=>I??[]),ce=e.useMemo(()=>Z?y??[]:Ke,[Z,y,Ke]),[_e,yt]=e.useState({text:"",id:0}),le=e.useCallback(a=>yt(o=>({text:a,id:o.id+1})),[]),Ge=e.useRef(null),xt=it(s,Ge),Me=e.useRef(null),Ne=e.useRef(null),ue=e.useRef(!1),ve=e.useRef(!1),ye=e.useRef(void 0),Oe=e.useRef(null),qe=pe(be).join(","),Fe=pe(O).join(","),He=e.useMemo(()=>pe(qe),[qe]),Pt=e.useMemo(()=>Fe?pe(Fe):He,[Fe,He]),Ye={value:V,attachments:ce,accepts:He,pasteAccepts:Pt,multiple:F,maxAttachments:G,maxFileSize:q,disabled:l,readOnly:g,expandOn:A,isValueControlled:R,isOpenControlled:X,isAttachmentsControlled:Z,onValueChange:c,onOpenChange:S,onAttachmentsChange:_,onAttachmentReject:Ee,onSubmit:k},x=e.useRef(Ye);x.current=Ye;let ze=e.useRef(null),W=e.useCallback(()=>ze.current??x.current.attachments,[]),ee=e.useCallback(a=>{x.current.isOpenControlled||ie(a),x.current.onOpenChange?.(a)},[]),xe=e.useCallback(a=>{x.current.isValueControlled||se(a),x.current.onValueChange?.(a)},[]),te=e.useCallback(a=>{ze.current=a,queueMicrotask(()=>{ze.current=null}),x.current.isAttachmentsControlled||vt(a),x.current.onAttachmentsChange?.(a)},[]),Pe=e.useRef(new Set),ae=e.useCallback((a,o,u=x.current.multiple)=>{let m=x.current;if(m.disabled||m.readOnly||a.length===0)return 0;let $=W(),J=[],ne=[],Mt=typeof m.maxAttachments=="number"?Math.max(m.maxAttachments-$.length,0):1/0,Nt=u?1/0:1;for(let T of a){if(J.length>=Mt||J.length>=Nt){ne.push({file:T,reason:"count"});continue}if(typeof m.maxFileSize=="number"&&T.size>m.maxFileSize){ne.push({file:T,reason:"size"});continue}if(!Dt(T,o)){ne.push({file:T,reason:"type"});continue}let De=lt(T.name,T.type)?URL.createObjectURL(T):void 0;De&&Pe.current.add(De),J.push({id:Vt(),name:T.name,size:T.size,type:T.type,file:T,url:De,status:"idle"})}let Se=[];return J.length>0&&(te($.concat(J)),m.expandOn!=="none"&&ee(!0),Se.push(`${st(J.length,"file")} attached.`)),ne.length>0&&(m.onAttachmentReject?.(ne),Se.push(`${st(ne.length,"file")} could not be attached.`)),Se.length>0&&le(Se.join(" ")),J.length},[W,te,ee,le]),Ae=e.useCallback(a=>ae(a,x.current.accepts),[ae]),Xe=e.useCallback(a=>ae(a,x.current.pasteAccepts),[ae]),Je=e.useCallback(a=>{let o=W(),u=o.find(m=>m.id===a);u&&(te(o.filter(m=>m.id!==a)),le(`Removed ${u.name}.`))},[W,te,le]),Qe=e.useCallback(a=>{let o=x.current;if(o.disabled||o.readOnly)return!1;let u=W();if(!We(o.value)&&u.length===0)return!1;let m={value:o.value,attachments:u};if(a&&o.onSubmit)for(let $ of u)$.url&&Pe.current.delete($.url);return o.onSubmit?.(m),a&&(xe(""),te([])),!0},[W,xe,te]);e.useEffect(()=>{let a=Pe.current;if(a.size===0)return;let o=new Set(ce.map(u=>u.url));for(let u of Array.from(a))o.has(u)||(URL.revokeObjectURL(u),a.delete(u))},[ce]),e.useEffect(()=>{let a=Pe.current;return()=>{if(!x.current.isAttachmentsControlled){for(let o of Array.from(a))URL.revokeObjectURL(o);a.clear()}}},[]);let we=e.useCallback(a=>{let o=x.current,u=Ne.current;if(clearTimeout(ye.current),ve.current=!1,!u||o.disabled||o.readOnly)return;let m=a?.accept!=null?pe(a.accept):o.accepts,$=a?.multiple??o.multiple;Oe.current={patterns:m,multiple:$},u.accept=m.join(","),u.multiple=$,ue.current=!0,u.click(),setTimeout(()=>{document.hasFocus()&&(ue.current=!1)},1e3)},[]),Ze=e.useCallback(()=>{ve.current=!0,clearTimeout(ye.current),ye.current=setTimeout(()=>{ve.current=!1},800)},[]);e.useEffect(()=>()=>clearTimeout(ye.current),[]),e.useEffect(()=>{let a=Ne.current,o=()=>{ue.current=!1};return window.addEventListener("focus",o),a?.addEventListener("cancel",o),()=>{window.removeEventListener("focus",o),a?.removeEventListener("cancel",o)}},[]);let At=e.useCallback(a=>{let o=a.currentTarget,u=Array.from(o.files??[]),m=Oe.current;ae(u,m?.patterns??x.current.accepts,m?.multiple),ue.current=!1,Oe.current=null,o.value=""},[ae]),wt=e.useCallback(a=>{Re?.(a);let o=x.current,u=Ge.current;if(!u||o.expandOn==="none")return;let m=a.relatedTarget;m&&u.contains(m)||ue.current||ve.current||!We(o.value)&&W().length===0&&ee(!1)},[Re,ee,W]),St=e.useCallback(a=>{Ae(a)},[Ae]),{getRootProps:Et,isDragActive:Tt}=It({onDrop:St,onDragEnter:()=>le(""),noClick:!0,noKeyboard:!0,noPaste:!0,disabled:!oe||l||g}),Ie=oe&&Tt;e.useImperativeHandle(Te,()=>({focusTextarea:()=>Me.current?.focus({preventScroll:!0}),openFilePicker:()=>we()}),[we]);let Lt=e.useCallback(a=>{if(l||a.pointerType==="mouse"&&a.button!==0)return;let o=a.target;o instanceof Element&&o.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')||(a.preventDefault(),Me.current?.focus({preventScroll:!0}))},[l]),kt=e.useMemo(()=>({open:Q,setOpen:ee,setValue:xe,size:P,expandOn:A,minLines:h,maxLines:B,sendMode:H,disabled:l,readOnly:g,paste:D,clearOnSubmit:Y,multiple:F,textareaRef:Me,attachments:ce,removeAttachment:Je,submit:Qe,appendFiles:Ae,appendFilesFromPaste:Xe,openFilePicker:we,beginFilePickerPress:Ze}),[Q,ee,xe,P,A,h,B,H,l,g,D,Y,F,ce,Je,Qe,Ae,Xe,we,Ze]);return e.createElement(ct.Provider,{value:kt},e.createElement($e.Provider,{value:V},e.createElement(Ft,{features:zt},e.createElement(Ht,{reducedMotion:"user"},e.createElement("div",{...Le,ref:xt,className:L("rt-ChatbarRoot",`rt-r-size-${P}`,r),style:{position:"relative",width:j,maxWidth:re,...d},"data-state":Q?"open":"closed","data-disabled":l?"":void 0,"data-readonly":g?"":void 0,"data-drop-active":Ie?"":void 0,"data-accent-color":M,"data-radius":z,"data-panel-background":t,"data-material":t,onBlurCapture:wt},e.createElement("input",{ref:Ne,type:"file",tabIndex:-1,"aria-hidden":!0,style:{display:"none"},onChange:At}),Ce?e.createElement("div",{className:"rt-ChatbarNotices"},e.createElement(rt.Provider,{value:P},Ce)):null,e.createElement("div",{...oe?Et():{},style:{width:"100%",flex:"1 1 auto",minHeight:0},onPointerDown:Lt},e.createElement(he.div,{className:L("rt-ChatbarBox",`rt-variant-${E??"surface"}`),style:{position:"relative"},"data-accent-color":M,"data-radius":z,"data-panel-background":t,"data-material":t,layout:!0,transition:fe},e.createElement(he.div,{className:"rt-ChatbarGrid",layout:"position",transition:fe},f),Ie&&e.createElement("div",{className:"rt-ChatbarDropOverlay","aria-hidden":!0},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(me,{emphasis:"medium",size:P,weight:"medium"},"Drop files here to attach"))))),ge?e.createElement(me,{as:"div",size:P==="3"?"2":"1",emphasis:"medium",className:"rt-ChatbarContext"},ge):null,e.createElement(Be,{role:"status","aria-live":"polite"},Ie?"Drop files here to attach.":e.createElement("span",{key:_e.id},_e.text)))))))});ut.displayName="Chatbar.Root";var dt=e.forwardRef((n,s)=>{let{className:r,style:d,asChild:f,onFocus:i,onChange:b,onPaste:c,onKeyDown:C,onCompositionStart:p,onCompositionEnd:S,submitOnEnter:A=!1,...h}=n,B=K(),H=e.useContext($e),{open:l,minLines:g,maxLines:k,expandOn:P,disabled:E,readOnly:M,setOpen:z,setValue:v,textareaRef:N,paste:j,appendFilesFromPaste:re,size:y,submit:I,clearOnSubmit:_}=B,be=it(s,N),F=e.useRef(0),G=e.useRef(0),q=e.useRef(!1),D=e.useRef({open:l,minLines:g,maxLines:k});Ve(()=>{D.current={open:l,minLines:g,maxLines:k}},[l,g,k]);let O=e.useCallback(()=>{let t=N.current;if(!t)return;let R=window.getComputedStyle(t);F.current=parseFloat(R.lineHeight)||20,G.current=(parseFloat(R.paddingTop)||0)+(parseFloat(R.paddingBottom)||0)},[N]),Y=e.useCallback((t,R)=>{let{minLines:w,maxLines:se}=D.current,V=F.current,X=G.current,ke=Math.ceil((R?w:1)*V)+X,ie=Math.ceil((R?se:1)*V)+X,Q=Math.max(t.scrollHeight,ke);t.style.height=`${Math.min(Q,ie)}px`;let Z=Q>ie;t.style.overflowY=Z?"auto":"hidden",t.style.maxHeight=Z?`${ie}px`:"none"},[]);Ve(()=>{O()},[O,y]),Ve(()=>{let t=N.current;t&&(F.current===0&&O(),ot(t,()=>{t.style.height="auto";let R=l;if(!l&&(P==="overflow"||P==="both")){let w=Math.ceil(F.current)+G.current;t.scrollHeight>w+1&&(R=!0,z(!0))}Y(t,R)}))},[H,l,P,g,k,y,z,N,O,Y]),e.useEffect(()=>{let t=N.current;if(!t||typeof ResizeObserver>"u")return;let R=-1,w=new ResizeObserver(se=>{let V=se[0]?.contentRect.width??0;if(V===R)return;let X=R===-1;R=V,!X&&(O(),ot(t,()=>{t.style.height="auto",Y(t,D.current.open)}))});return w.observe(t),()=>w.disconnect()},[N,O,Y]),e.useEffect(()=>{},[]);let Ee=e.useCallback(t=>{i?.(t),!(E||M)&&(P==="focus"||P==="both")&&!l&&z(!0)},[E,M,P,l,z,i]),oe=e.useCallback(t=>{v(t.currentTarget.value),b?.(t)},[v,b]),Te=e.useCallback(t=>{if(c?.(t),t.defaultPrevented||!j||E||M)return;let R=Array.from(t.clipboardData?.items??[]).filter(w=>w.kind==="file").map(w=>w.getAsFile()).filter(w=>!!w);R.length!==0&&re(R)>0&&t.preventDefault()},[j,E,M,c,re]),Re=e.useCallback(t=>{q.current=!0,p?.(t)},[p]),Ce=e.useCallback(t=>{q.current=!1,S?.(t)},[S]),ge=e.useCallback(t=>{C?.(t),!(t.defaultPrevented||!A)&&(t.key!=="Enter"||t.shiftKey||t.altKey||t.ctrlKey||t.metaKey||q.current||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||(t.preventDefault(),I(_)))},[A,C,I,_]),Le=f?U:"textarea";return e.createElement(he.div,{className:L("rt-ChatbarField","rt-ChatbarTextarea",r),layout:"position",transition:fe},e.createElement(Le,{...h,ref:be,className:"rt-ChatbarInput",value:H,onChange:oe,onFocus:Ee,onPaste:Te,onKeyDown:ge,onCompositionStart:Re,onCompositionEnd:Ce,disabled:E,readOnly:M,rows:l?g:1,spellCheck:h.spellCheck??!0,autoCorrect:h.autoCorrect??"on",style:d}))});dt.displayName="Chatbar.Textarea";var mt=e.forwardRef((n,s)=>{let{children:r,asChild:d,className:f,...i}=n;return K().open?null:e.createElement(d?U:"div",{...i,ref:s,className:L("rt-ChatbarInlineStart",f)},r)});mt.displayName="Chatbar.InlineStart";var pt=e.forwardRef((n,s)=>{let{children:r,asChild:d,className:f,...i}=n;return K().open?null:e.createElement(d?U:"div",{...i,ref:s,className:L("rt-ChatbarInlineEnd",f)},r)});pt.displayName="Chatbar.InlineEnd";var ht=e.forwardRef((n,s)=>{let{asChild:r,forceMount:d,renderAttachment:f,className:i,...b}=n,c=K();if(c.attachments.length===0&&!d)return null;let C=r?U:"div";return e.createElement(he.div,{layout:"position",transition:fe},e.createElement(C,{...b,ref:s,className:L("rt-ChatbarAttachmentsRow",i),role:"list","aria-label":b["aria-label"]??"Attachments"},e.createElement(nt,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(de,{align:"center",gap:"2",minWidth:"fit-content"},c.attachments.map(p=>e.createElement(Ue,{key:p.id,attachment:p,asChild:!!f},f?.(p)))))))});ht.displayName="Chatbar.AttachmentsRow";var Wt={uploading:"uploading",error:"failed to upload"},Ue=e.forwardRef((n,s)=>{let{attachment:r,asChild:d,className:f,children:i,...b}=n,c=K(),C=d?U:"div",p=!!r.url&<(r.name,r.type),S=`${Math.ceil(r.size/1024)} KB`,A=r.status?Wt[r.status]:void 0,h=c.disabled||c.readOnly,B=H=>{let l=H.currentTarget.closest('[role="listitem"]'),g=l?.parentElement?Array.from(l.parentElement.children):[],k=l?g.indexOf(l):-1,E=(g[k+1]??g[k-1])?.querySelector(".rt-ChatbarAttachmentRemove");E?E.focus():c.textareaRef.current?.focus({preventScroll:!0}),c.removeAttachment(r.id)};return e.createElement(C,{...b,ref:s,className:L("rt-ChatbarAttachment",f),role:"listitem","data-kind":p?"image":"file","data-status":r.status,title:r.name},i??e.createElement(de,{align:"center",gap:"2",pr:p?void 0:"6"},e.createElement("div",{className:"rt-ChatbarAttachmentPreview","aria-hidden":!0},p?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:r.url,alt:""}):e.createElement(at,null)),p?e.createElement(Be,null,r.name,", ",S,A?`, ${A}`:""):e.createElement(de,{direction:"column",gap:"0",minWidth:"0"},e.createElement(me,{size:c.size,weight:"medium",truncate:!0},r.name),e.createElement(me,{size:"1",color:r.status==="error"?"red":void 0,emphasis:r.status==="error"?void 0:"medium"},S,A?` \xB7 ${A}`:"")),!h&&e.createElement(je,{className:"rt-ChatbarAttachmentRemove","aria-label":`Remove ${r.name}`,size:"1",variant:"classic",color:"gray",onClick:B},e.createElement(tt,null))))});Ue.displayName="Chatbar.Attachment";var ft=e.forwardRef((n,s)=>{let{asChild:r,accept:d,multiple:f,disabled:i,onPointerDown:b,onClick:c,...C}=n,p=K(),S=i||p.disabled||p.readOnly;return e.createElement(r?U:"button",{...C,ref:s,className:L("rt-ChatbarAttachTrigger",C.className),type:C.type??"button","aria-label":C["aria-label"]??"Add attachments",disabled:S,onPointerDown:h=>{b?.(h),!S&&!h.defaultPrevented&&p.beginFilePickerPress()},onClick:h=>{c?.(h),!(S||h.defaultPrevented)&&p.openFilePicker({accept:d,multiple:f})}})});ft.displayName="Chatbar.AttachTrigger";var bt=e.forwardRef((n,s)=>{let{asChild:r,children:d,className:f,...i}=n;if(!K().open)return null;let c=r?U:"div";return e.createElement(he.div,{layout:"position",transition:fe},e.createElement(c,{...i,ref:s,className:L("rt-ChatbarRow",f)},e.createElement(de,{align:"center",justify:"between",width:"100%"},d)))});bt.displayName="Chatbar.Row";var Rt=e.forwardRef((n,s)=>{let{className:r,...d}=n;return e.createElement("div",{...d,ref:s,className:L("rt-ChatbarRowStart",r)})});Rt.displayName="Chatbar.RowStart";var Ct=e.forwardRef((n,s)=>{let{className:r,...d}=n;return e.createElement("div",{...d,ref:s,className:L("rt-ChatbarRowEnd",r)})});Ct.displayName="Chatbar.RowEnd";var gt=e.forwardRef((n,s)=>{let{asChild:r,clearOnSend:d,disabled:f,children:i,style:b,className:c,size:C,variant:p,tabIndex:S,onClick:A,status:h="ready",onStop:B,onRetry:H,stopLabel:l="Stop",retryLabel:g="Retry",stopIcon:k,retryIcon:P,"aria-label":E,"aria-labelledby":M,...z}=n,v=K(),N=e.useContext($e),j=We(N)||v.attachments.length>0,y=j?"send":h==="submitted"||h==="streaming"?"stop":h==="error"?"retry":"send";if(v.sendMode==="never"&&y==="send")return null;let I=y!=="send"||v.sendMode==="always"||j,_=y==="send"?f||v.disabled||v.readOnly||!j:f||v.disabled,F=y==="stop"?{"aria-label":l}:y==="retry"?{"aria-label":g}:M?{"aria-labelledby":M}:{"aria-label":E??"Send"},G=D=>{if(A?.(D),D.defaultPrevented||_)return;if(y==="stop"){B?.();return}if(y==="retry"){H?.();return}let O=d??v.clearOnSubmit;v.submit(O)&&O&&v.textareaRef.current?.focus({preventScroll:!0})},q=y==="stop"?k??(h==="submitted"?e.createElement(et,{size:v.size}):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"}))):y==="retry"?P??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"})):i??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(je,{...z,ref:s,size:C??v.size,variant:p??(v.open||y!=="send"?"solid":"ghost"),disabled:_,className:L("rt-ChatbarSend",c),style:{opacity:I?1:0,pointerEvents:I?void 0:"none",...b},"aria-hidden":I?void 0:!0,tabIndex:I?S:-1,asChild:r,onClick:G,"data-status":h,"data-mode":y,...F},q)});gt.displayName="Chatbar.Send";export{ut as a,dt as b,mt as c,pt as d,ht as e,Ue as f,ft as g,bt as h,Rt as i,Ct as j,gt as k,$t as l};
|
|
2
|
+
//# sourceMappingURL=chunk-ENLFKWYV.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as l}from"./chunk-2N2AQNJH.js";import{a as r}from"./chunk-OLAWVEAI.js";import{a}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-2N2AQNJH.js";import{a as r}from"./chunk-OLAWVEAI.js";import{a}from"./chunk-4LDVSTXI.js";import*as t from"react";import R from"classnames";var P=t.forwardRef(({className:i,tooltip:o,tooltipSide:s="top",tooltipAlign:c="center",tooltipDelayDuration:p,tooltipDisableHoverableContent:b,...e},u)=>{let{tooltipId:m,hasTooltip:d,accessibilityProps:B}=l(o),y="aria-label"in e&&e["aria-label"],f="aria-labelledby"in e&&e["aria-labelledby"],I="children"in e&&e.children;!y&&!f&&!I&&console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
|
|
2
2
|
- aria-label prop with descriptive text
|
|
3
3
|
- aria-labelledby prop referencing a label element
|
|
4
4
|
- or visible text children`);let n=t.createElement(a,{...e,...B,ref:u,className:R("rt-IconButton",i)});return d?t.createElement(r,{content:o,side:s,align:c,delayDuration:p,disableHoverableContent:b,id:m},n):n});P.displayName="IconButton";export{P as a};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-ISOLUTZF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-MJJ7XDIP.js";import{a as C}from"./chunk-5WRCK4R7.js";import{a as d}from"./chunk-XKBLNVOD.js";import{a as u}from"./chunk-GO7OHBHW.js";import{c as P}from"./chunk-SEY4NA45.js";import{a as f}from"./chunk-5TXQLK4G.js";import{a}from"./chunk-6FLLFCBU.js";import{a as L}from"./chunk-OS3FCYZY.js";var I={};L(I,{Action:()=>h,Cancel:()=>x,Content:()=>v,Description:()=>E,Root:()=>y,Title:()=>T,Trigger:()=>R});import*as e from"react";import O from"classnames";import{AlertDialog as l}from"radix-ui";var y=o=>e.createElement(l.Root,{...o});y.displayName="AlertDialog.Root";var R=e.forwardRef(({children:o,...t},r)=>e.createElement(l.Trigger,{...t,ref:r,asChild:!0},c(o)));R.displayName="AlertDialog.Trigger";var{align:S,panelBackground:K,material:_,...j}=d,q={align:S},z={panelBackground:K},F={material:_},v=e.forwardRef(({align:o,...t},r)=>{let{className:N}=a({align:o},q),{panelBackground:k}=a({panelBackground:t.panelBackground},z),{material:B}=a({material:t.material},F);f(t.panelBackground);let g=B??k,{className:b,forceMount:w,container:M,panelBackground:V,material:$,...W}=a(t,j),m=e.useRef(null),H=e.useMemo(()=>i=>{m.current=i,typeof r=="function"?r(i):r&&(r.current=i)},[r]);return e.useEffect(()=>{if(typeof window>"u")return;let i=m.current;if(!i)return;let n=i.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(n.length===0)return;let p=n[0],D=n[n.length-1],A=s=>{s.key==="Tab"&&(s.shiftKey?document.activeElement===p&&(s.preventDefault(),D.focus()):document.activeElement===D&&(s.preventDefault(),p.focus()))};return i.addEventListener("keydown",A),p.focus(),()=>{i.removeEventListener("keydown",A)}},[]),e.createElement(l.Portal,{container:M,forceMount:w},e.createElement(P,{asChild:!0},e.createElement(l.Overlay,{className:"rt-BaseDialogOverlay rt-AlertDialogOverlay"},e.createElement("div",{className:"rt-BaseDialogScroll rt-AlertDialogScroll"},e.createElement("div",{className:`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${N}`},e.createElement(l.Content,{...W,ref:H,className:O("rt-BaseDialogContent","rt-AlertDialogContent",b),"data-material":g,"data-panel-background":g,tabIndex:-1,role:"alertdialog","aria-modal":"true","aria-describedby":"alert-dialog-description",onCloseAutoFocus:i=>{i.preventDefault(),document.body.style.pointerEvents=""}}),e.createElement("div",{"aria-live":"assertive","aria-atomic":"true",className:"rt-sr-only",id:"alert-dialog-announcement"}))))))});v.displayName="AlertDialog.Content";var T=e.forwardRef((o,t)=>e.createElement(l.Title,{asChild:!0},e.createElement(u,{size:"5",mb:"3",trim:"start",...o,asChild:!1,ref:t})));T.displayName="AlertDialog.Title";var E=e.forwardRef((o,t)=>e.createElement(l.Description,{asChild:!0},e.createElement(C,{as:"p",size:"3",...o,asChild:!1,ref:t})));E.displayName="AlertDialog.Description";var h=e.forwardRef(({children:o,...t},r)=>e.createElement(l.Action,{...t,ref:r,asChild:!0},c(o)));h.displayName="AlertDialog.Action";var x=e.forwardRef(({children:o,...t},r)=>e.createElement(l.Cancel,{...t,ref:r,asChild:!0},c(o)));x.displayName="AlertDialog.Cancel";export{y as a,R as b,v as c,T as d,E as e,h as f,x as g,I as h};
|
|
2
|
+
//# sourceMappingURL=chunk-IYCPYN4Z.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R}from"./chunk-ISOLUTZF.js";import{a as m}from"./chunk-3R4YLW4A.js";import{a as N}from"./chunk-5WRCK4R7.js";import*as t from"react";import C from"classnames";var u=t.createContext(void 0),f=t.forwardRef(({kind:c,size:e="2",color:o="gray",material:s,className:i,children:l,trailing:a,leading:n,...r},d)=>t.createElement("div",{role:"status","aria-live":"polite",...r,ref:d,className:C("rt-NoticeRoot",`rt-r-size-${e}`,i),"data-kind":c,"data-accent-color":o,"data-material":s},n?t.createElement("span",{className:"rt-NoticeIcon","aria-hidden":!0},n):null,t.createElement(N,{as:"div",size:e,className:"rt-NoticeText"},l),a));f.displayName="Strip";var g=t.forwardRef(({icon:c,action:e,onDismiss:o,dismissLabel:s="Dismiss",size:i,...l},a)=>{let n=t.useContext(u),r=i??n??"2";return t.createElement(f,{...l,size:r,ref:a,kind:"notice",leading:c,trailing:e||o?t.createElement("span",{className:"rt-NoticeActions"},e,o?t.createElement(R,{size:r,variant:"ghost",color:"gray","aria-label":s,className:"rt-NoticeDismiss",onClick:o},t.createElement("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none","aria-hidden":!0},t.createElement("path",{d:"M4 4l7 7M11 4l-7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))):null):null})});g.displayName="Notice";var v=t.forwardRef(({confirmLabel:c,cancelLabel:e="Not now",onConfirm:o,onCancel:s,busy:i=!1,size:l,color:a="gray",...n},r)=>{let d=t.useContext(u),p=l??d??"2";return t.createElement(f,{...n,size:p,color:a,ref:r,kind:"confirmation",trailing:t.createElement("span",{className:"rt-NoticeActions"},t.createElement(m,{size:p,variant:"ghost",color:"gray",disabled:i,onClick:s},e),t.createElement(m,{size:p,variant:"solid",color:a,loading:i,onClick:o},c))})});v.displayName="Confirmation";export{u as a,g as b,v as c};
|
|
2
|
+
//# sourceMappingURL=chunk-L5PID6BU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as v}from"./chunk-VX6ARMWP.js";import{a as d,e as l,f as u,g as R}from"./chunk-V32EP3S7.js";import{b as P}from"./chunk-IX5HIHVI.js";import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as v}from"./chunk-VX6ARMWP.js";import{a as f}from"./chunk-667BKCUG.js";import{a as d,e as l,f as u,g as R}from"./chunk-V32EP3S7.js";import{b as P}from"./chunk-IX5HIHVI.js";import{b}from"./chunk-SEY4NA45.js";import{a as k}from"./chunk-F6V7GBNQ.js";import{a as h}from"./chunk-GSTOGDAJ.js";import{a as m}from"./chunk-6FLLFCBU.js";import{a as z}from"./chunk-OS3FCYZY.js";var _={};z(_,{Item:()=>N,Root:()=>I});import*as o from"react";import x from"classnames";import{Context as D}from"radix-ui/internal";var y="CheckboxCards",[S]=D.createContextScope(y,[d]),G=d(),[B,E]=S(y),I=o.forwardRef((r,s)=>{let a=b(),c=r.panelBackground??a.panelBackground,{__scopeCheckboxCards:t,className:p,color:e,panelBackground:C,...i}=m(r,f,h),n=G(t);return o.createElement(B,{scope:t,size:r.size,variant:r.variant},o.createElement(v,{asChild:!0},o.createElement(l,{...n,"data-accent-color":e,"data-panel-background":c,...i,ref:s,className:x("rt-CheckboxCardsRoot",p)})))});I.displayName="CheckboxCards.Root";var N=o.forwardRef(({__scopeCheckboxCards:r,children:s,className:a,style:c,...t},p)=>{let e=E("CheckboxCardsItem",r),C=G(r),{className:i}=m({size:e?.size,variant:e?.variant||"solid"},k),n=e?.variant?`rt-variant-${e.variant}`:void 0,g=e?.size?`rt-r-size-${e.size}`:void 0;return o.createElement("label",{className:x("rt-BaseCard","rt-CheckboxCardsItem",n,g,a),style:c},s,o.createElement(u,{...C,...t,ref:p,className:x("rt-reset","rt-BaseCheckboxRoot","rt-CheckboxCardCheckbox",i)},o.createElement(R,{...C,asChild:!0,className:"rt-BaseCheckboxIndicator"},o.createElement(P,null))))});N.displayName="CheckboxCards.Item";export{I as a,N as b,_ as c};
|
|
2
|
+
//# sourceMappingURL=chunk-METRW4HG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as we}from"./chunk-2EQWBT2S.js";import{a as xe,b as He}from"./chunk-ADXZNG4F.js";import{a as ze}from"./chunk-ROSWI2CL.js";import{a as Le}from"./chunk-YAQBIO2B.js";import{a as Te}from"./chunk-AGNIFHOE.js";import{a as Re,b as ne}from"./chunk-HCNO7PX6.js";import{a as re,b as se,c as ie}from"./chunk-GMHA5CFH.js";import{e as oe,f as he,h as Pe,i as Q,j as ve,k as le,l as ae,n as ge,o as Y}from"./chunk-A2XVR7GL.js";import{a as be,b as Se}from"./chunk-BZZXXZ3O.js";import{a as me}from"./chunk-HWQ3NTJP.js";import{a as _,b as Ee,c as Ce,d as ye,g as Me}from"./chunk-3J6AUDID.js";import{a as fe}from"./chunk-3XSB7YIM.js";import{a as Ve}from"./chunk-OS3FCYZY.js";var Ke={};Ve(Ke,{Bottom:()=>Le,Content:()=>Fe,Header:()=>Oe,Inspector:()=>Te,Left:()=>Ae,Panel:()=>pe,Rail:()=>De,Root:()=>Ie,Sidebar:()=>ze,Trigger:()=>Be,useResponsivePresentation:()=>we,useShell:()=>He,useSidebarMode:()=>xe});import*as e from"react";import $ from"classnames";import{useComposedRefs as ue}from"radix-ui/internal";var ce=0;function Ne(r){ce=Math.max(0,ce+r);let s=document.documentElement;ce>0?s.setAttribute("data-rt-shell-lock",""):s.removeAttribute("data-rt-shell-lock")}var de="data-rt-shell-inert",Ue=30;function K(r,s){return s===null||s===r||s===r.body||s===r.documentElement}function ke(r,s,i){for(let d of r.querySelectorAll("[data-shell-trigger][aria-controls]"))if(!(d.getAttribute("aria-controls")!==s||d.closest("[inert]"))&&!(i&&!i.some(h=>h.contains(d))))return d;return null}var Ie=e.forwardRef(({className:r,children:s,height:i="full",style:d,onKeyDown:h,onFocus:I,...H},w)=>{let[u]=e.useState(he),m=e.useCallback(t=>Pe(u,t),[u]);e.useSyncExternalStore(m,()=>u.version,()=>0);let p=e.useRef(null),b=ue(w,p),[S,E]=e.useState(()=>new Set),T=e.useCallback(t=>{E(n=>n.has(t)?n:new Set(n).add(t))},[]),C=e.useCallback(t=>{E(n=>{if(!n.has(t))return n;let l=new Set(n);return l.delete(t),l})},[]),P=e.useMemo(()=>({registerInset:T,unregisterInset:C}),[T,C]),f=e.useCallback(()=>{for(let t of u.entries.values())t.overlayLive&&t.setValue("closed","dismiss")},[u]),g=e.useCallback(()=>[...u.entries.values()].filter(t=>t.overlayLive&&t.el).map(t=>({name:t.name,id:t.id,el:t.el})),[u]),v=[...u.entries.values()].filter(t=>t.overlayLive&&t.el).length,B=i!=="full"&&i!=="auto",y=e.useCallback(()=>{let t=p.current;if(!t)return;let n=g().map(l=>l.el);for(let l of t.children){if(!(l instanceof HTMLElement)||l.classList.contains("rt-ShellScrim"))continue;let a=n.some(M=>l===M||l.contains(M));n.length===0||a?l.hasAttribute(de)&&(l.removeAttribute(de),l.inert=!1):l.inert||(l.setAttribute(de,""),l.inert=!0)}},[g]),N=e.useRef(null),O=e.useRef([]),q=e.useRef(null),A=e.useRef(!1),z=e.useRef(0),D=e.useCallback(()=>{z.current&&cancelAnimationFrame(z.current),z.current=0},[]),j=e.useCallback((t,n)=>{D();let l=0,a=()=>{if(z.current=0,!!t.isConnected){if(n(t.ownerDocument.activeElement)){t.focus({preventScroll:!0});return}l+=1,l<Ue&&(z.current=requestAnimationFrame(a))}};z.current=requestAnimationFrame(a)},[D]);e.useEffect(()=>()=>{D(),A.current&&(A.current=!1,Ne(-1))},[D]),e.useEffect(()=>{let t=p.current;if(!t)return;let n=t.ownerDocument,l=g(),a=l.map(o=>o.el),M=!B&&l.length>0;M!==A.current&&(A.current=M,Ne(M?1:-1));let U=O.current;O.current=l;let k=U.filter(o=>{if(a.includes(o.el))return!1;let c=u.entries.get(o.name);return!o.el.isConnected||!c||c.el!==o.el||c.value==="closed"}),F=o=>o!==null&&k.some(c=>c.el.contains(o));if(U.length===0&&l.length>0){let o=n.activeElement,c=o instanceof HTMLElement&&!K(n,o)&&!a.some(R=>R.contains(o))?o:null;if(c&&!t.contains(c)){let R=q.current;R&&R.isConnected&&!a.some(J=>J.contains(R))&&(c=R)}N.current=c}if(y(),l.length===0){let o=N.current;if(N.current=null,k.length===0)return;let R=(L=>L!==null&&L.isConnected&&!L.closest("[inert]")&&!F(L))(o)?o:null;for(let L of k)R??(R=ke(n,L.id));if(!R)return;let J=L=>K(n,L)||F(L);J(n.activeElement)?R.focus({preventScroll:!0}):j(R,J);return}if(k.length>0){let o=n.activeElement;if(K(n,o)||F(o)){let c=null;for(let R of k)c??(c=ke(n,R.id,a));(c??a[a.length-1]).focus({preventScroll:!0})}}let W=a.filter(o=>!U.some(c=>c.el===o)),te=n.activeElement;W.length>0&&!a.some(o=>o.contains(te))&&(W[0].focus({preventScroll:!0}),j(W[0],o=>K(n,o)||o instanceof Element&&o.closest("[inert]")!==null))}),e.useEffect(()=>{let t=p.current;if(!t||v===0||typeof MutationObserver>"u")return;let n=new MutationObserver(y);return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["inert"]}),()=>n.disconnect()},[v,y]);let G=t=>{h?.(t),!(t.key!=="Escape"||t.defaultPrevented||v===0)&&(f(),t.stopPropagation())};e.useEffect(()=>{let t=p.current;if(!t||v===0)return;let n=t.ownerDocument,l=a=>{a.key!=="Escape"||a.defaultPrevented||!K(n,a.target)||f()};return n.addEventListener("keydown",l),()=>n.removeEventListener("keydown",l)},[v,f]);let Z=t=>{I?.(t),t.target instanceof HTMLElement&&p.current?.contains(t.target)&&(q.current=t.target)},x=u.entries.get("rail"),X=x!==void 0&&x.value!==void 0&&x.value!=="closed"?S.has("rail")?`calc(${x.size}px + 2 * var(--shell-inset-gap))`:`${x.size}px`:void 0,V=i==="full"?{}:i==="auto"?{height:"auto"}:typeof i=="number"?{height:`${i}px`}:{height:i};return e.createElement(ve.Provider,{value:u},e.createElement(ge.Provider,{value:P},e.createElement("div",{...H,ref:b,className:$("rt-ShellRoot",r),"data-height":i==="auto"?"auto":void 0,"data-has-inset":S.size>0||void 0,"data-overlay-live":v>0||void 0,onKeyDown:G,onFocus:Z,style:{...V,...X?{"--shell-rail-offset":X}:{},...d}},s,e.createElement("div",{className:"rt-ShellScrim","aria-hidden":!0,onClick:f}))))});Ie.displayName="Shell.Root";var Oe=e.forwardRef(({className:r,height:s=64,style:i,...d},h)=>e.createElement("header",{...d,ref:h,className:$("rt-ShellHeader",r),style:{...i,"--shell-header-height":`${s}px`}}));Oe.displayName="Shell.Header";var Ae=e.forwardRef(({children:r},s)=>(e.useEffect(()=>{},[]),e.createElement(e.Fragment,null,r)));Ae.displayName="Shell.Left";var We={controlled:"open",default:"defaultOpen"},De=e.forwardRef((r,s)=>{let{className:i,presentation:d,expandedSize:h=64,collapsible:I,onExpand:H,onCollapse:w,children:u,style:m,open:p,defaultOpen:b,onOpenChange:S,inset:E,id:T,...C}=r,{table:P,attributes:f}=ie(d,"fixed"),g=re({name:"rail",label:"Rail",propNames:We,id:T,controlled:_(p),defaultValue:_(b),presentationTable:P,builtIn:Ee,onChange:(B,y)=>S?.(B!=="closed",{reason:y}),onExpand:H,onCollapse:w,size:h});Y("rail",E);let v=ue(s,g.setElement);return e.createElement("div",{...C,id:g.id,ref:v,className:$("rt-ShellPane","rt-ShellRail",i),...se(g,f),"data-inset":E||void 0,tabIndex:g.overlaying?-1:C.tabIndex,style:{...m,"--rail-size":`${h}px`}},e.createElement("div",{className:"rt-ShellRailContent"},u))});De.displayName="Shell.Rail";var _e={controlled:"open",default:"defaultOpen"},pe=e.forwardRef((r,s)=>{let{className:i,presentation:d,defaultOpen:h,open:I,onOpenChange:H,size:w,defaultSize:u,expandedSize:m=288,minSize:p=100,maxSize:b=800,resizable:S=!1,collapsible:E=!0,onExpand:T,onCollapse:C,onResize:P,onResizeStart:f,onResizeEnd:g,snapPoints:v,snapTolerance:B,collapseThreshold:y,paneId:N,persistence:O,children:q,style:A,onSizeChange:z,sizeUpdate:D,sizeUpdateMs:j=50,inset:G,id:Z,...x}=r,ee=le("Shell.Panel"),X=ae(ee,"rail"),V=ie(d,"fixed"),t=d===void 0,n=t?X?.presentationTable??oe:V.table,l=t?{"data-presentation-follows":""}:V.attributes,a=re({name:"panel",label:"Panel",propNames:_e,id:Z,controlled:_(I),defaultValue:_(h),presentationTable:n,builtIn:Ce,onChange:(o,c)=>H?.(o!=="closed",{reason:c}),onExpand:T,onCollapse:C,size:m});Y("panel",G),e.useEffect(()=>{(v!==void 0||y!==void 0||N!==void 0||O!==void 0)&&void 0},[v,y,N,O]);let M=e.useRef(null),U=ue(s,a.setElement,M),k=be({name:"panel",elementId:a.id,elementRef:M,cssVarName:"--panel-size",orientation:"vertical",edge:"end",growth:ye,expandedSize:m,minSize:p,maxSize:b,resizable:S,collapsible:E,size:w,defaultSize:u,onSizeChange:z,sizeUpdate:D,sizeUpdateMs:j,onResize:P,onResizeStart:f,onResizeEnd:g,snapPoints:v,snapTolerance:B,collapseThreshold:y,paneId:N,persistence:O,overlaying:a.overlaying,overlayingNow:()=>(t?ee.entries.get("rail")?.presentationTable??oe:V.table)[fe()]==="overlay",requestCollapse:()=>a.setValue("closed","toggle"),requestToggle:()=>a.toggle("toggle")}),{handles:F,content:W}=Se(q,ne),te=S&&a.shown!==!1&&!a.overlaying?e.createElement(me.Provider,{value:k},F.length>0?F:e.createElement(Re,null)):null;return e.createElement("div",{...Me(x),id:a.id,ref:U,className:$("rt-ShellPane","rt-ShellPanel",i),...se(a,l),"data-inset":G||void 0,tabIndex:a.overlaying?-1:x.tabIndex,style:{...A,"--panel-expanded-size":`${m}px`}},e.createElement("div",{className:"rt-ShellPanelContent"},W),te)});pe.displayName="Shell.Panel";pe.Handle=ne;var Fe=e.forwardRef(({className:r,inset:s,...i},d)=>(Y("content",s),e.createElement("main",{...i,ref:d,className:$("rt-ShellContent",r),"data-inset":s||void 0})));Fe.displayName="Shell.Content";var Be=e.forwardRef(({target:r,action:s="toggle",peekOnHover:i,onClick:d,onMouseEnter:h,onMouseLeave:I,children:H,...w},u)=>{let m=le("Shell.Trigger");e.useEffect(()=>{r==="left"&&void 0,i&&void 0},[r,i]);let p=r==="left"?"rail":r,b=ae(m,p),S=b?.value===void 0?void 0:b.value!=="closed",E=P=>{if(d?.(P),P.defaultPrevented)return;let f=m.entries.get(p);f&&(m.peek===p&&Q(m,null),s==="toggle"?f.toggle("toggle"):s==="expand"?f.setValue("open","toggle"):f.setValue("closed","toggle"))},T=P=>{if(h?.(P),!i)return;let f=m.entries.get(p);f&&f.value==="closed"&&f.presentation!=="overlay"&&Q(m,p)},C=P=>{I?.(P),i&&m.peek===p&&Q(m,null)};return e.createElement("button",{type:"button","aria-controls":b?.id,"aria-expanded":S,...w,ref:u,onClick:E,onMouseEnter:T,onMouseLeave:C,"data-shell-trigger":r,"data-shell-action":s},H)});Be.displayName="Shell.Trigger";export{Ie as a,Oe as b,Ae as c,De as d,pe as e,Fe as f,Be as g,Ke as h};
|
|
2
|
+
//# sourceMappingURL=chunk-MJOXEUBT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-ISOLUTZF.js";import{a as d}from"./chunk-5BWLY27A.js";import{a as v}from"./chunk-OS3FCYZY.js";var C={};v(C,{Button:()=>P,Content:()=>f,Item:()=>g,Root:()=>u,Viewport:()=>S,useMessageScroller:()=>y,useMessageScrollerScrollable:()=>w,useMessageScrollerVisibility:()=>B});import*as e from"react";import c from"classnames";import{MessageScroller as l,useMessageScroller as y,useMessageScrollerScrollable as w,useMessageScrollerVisibility as B}from"@shadcn/react/message-scroller";import{useComposedRefs as h}from"radix-ui/internal";var u=e.forwardRef(({autoScroll:o=!0,defaultScrollPosition:t="end",scrollEdgeThreshold:r,scrollMargin:s,className:a,children:n,...i},p)=>e.createElement(l.Provider,{autoScroll:o,defaultScrollPosition:t,...r!=null?{scrollEdgeThreshold:r}:{},...s!=null?{scrollMargin:s}:{}},e.createElement(l.Root,{...i,ref:p,className:c("rt-MessageScrollerRoot",a)},n)));u.displayName="MessageScroller.Root";var S=e.forwardRef(({className:o,"aria-label":t,fade:r=!0,...s},a)=>{let n=d(r),i=h(a,n);return e.createElement(l.Viewport,{"aria-label":t??"",...s,ref:i,"data-fade":r?"":void 0,className:c("rt-MessageScrollerViewport",o)})});S.displayName="MessageScroller.Viewport";var f=e.forwardRef(({className:o,...t},r)=>e.createElement(l.Content,{...t,ref:r,className:c("rt-MessageScrollerContent",o)}));f.displayName="MessageScroller.Content";var g=e.forwardRef(({className:o,...t},r)=>e.createElement(l.Item,{...t,ref:r,className:c("rt-MessageScrollerItem",o)}));g.displayName="MessageScroller.Item";var P=e.forwardRef(({direction:o="end",behavior:t,className:r,children:s,size:a="2",variant:n="surface",color:i="gray",radius:p="full","aria-label":M,...R},b)=>e.createElement(l.Button,{direction:o,...t?{behavior:t}:{},render:e.createElement(m,{...R,ref:b,size:a,variant:n,color:i,radius:p,"aria-label":M??(o==="end"?"Jump to the latest":"Jump to the first"),className:c("rt-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"})))}));P.displayName="MessageScroller.Button";export{y as a,w as b,B as c,u as d,S as e,f,g,P as h,C as i};
|
|
2
|
+
//# sourceMappingURL=chunk-OIUCV5HK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-VK7RNXUO.js";import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-VK7RNXUO.js";import{a}from"./chunk-ISOLUTZF.js";import*as e from"react";import{Toggle as b}from"radix-ui";var m=e.forwardRef(({pressed:l,onPressedChange:i,defaultPressed:g,...s},p)=>{let{"aria-label":r,"aria-labelledby":o,children:t}=s,n=e.useRef(null);e.useEffect(()=>{n.current=null},[o]);let u=e.useCallback(()=>{if(r)return r;if(o){if(n.current===null){let f=document.getElementById(o);n.current=f?.textContent||"Toggle icon button"}return n.current}return typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"Toggle icon button"},[r,o,t]),{handlePressedChange:d}=c({pressed:l,onPressedChange:i,getAccessibleName:u,componentName:"ToggleIconButton"});return e.createElement(b.Root,{pressed:l,onPressedChange:d,defaultPressed:g,asChild:!0},e.createElement(a,{...s,ref:p}))});m.displayName="ToggleIconButton";export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UYCPDGWA.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as l}from"./chunk-ZUOK3KFY.js";import{a as x}from"./chunk-ISOLUTZF.js";import{a as B}from"./chunk-3R4YLW4A.js";import{a as R}from"./chunk-5WRCK4R7.js";import{a as y}from"./chunk-GSTOGDAJ.js";import{a as d}from"./chunk-6FLLFCBU.js";import*as o from"react";import p from"classnames";import{Toolbar as P}from"radix-ui";var v=o.createContext(null),S=o.createContext(null);function T(t){let r=o.useContext(v);if(!r)throw new Error(`${t} must be rendered inside a Toolbar.`);return r}var c=o.forwardRef((t,r)=>{let e=t.size??l.size.default,a=t.orientation??l.orientation.default,{className:s,orientation:n,children:i,...b}=d(t,l,y),u=o.useMemo(()=>({size:e,orientation:a}),[e,a]);return o.createElement(P.Root,{...b,ref:r,orientation:a,className:p("rt-Toolbar",s)},o.createElement(v.Provider,{value:u},i))});c.displayName="Toolbar";var C=o.forwardRef(({className:t,disabled:r=!1,children:e,...a},s)=>{let{orientation:n}=T("ToolbarGroup"),i=o.useMemo(()=>({disabled:r}),[r]);return o.createElement("div",{role:"group","data-orientation":n,"data-disabled":r||void 0,...a,ref:s,className:p("rt-ToolbarGroup",t)},o.createElement(S.Provider,{value:i},e))});C.displayName="Toolbar.Group";function D(t){return t===!0||t==="true"}var G=o.forwardRef((t,r)=>{let e=T("ToolbarButton"),a=o.useContext(S),{iconOnly:s,size:n,variant:i,color:b,disabled:u,...m}=t,z=D(t["aria-pressed"]),O="data-state"in t||t["aria-pressed"]===void 0?{}:{"data-state":z?"on":"off"},f={size:n??e.size,variant:i??(a?"ghost":"soft"),color:b??(i?void 0:"gray"),...O};return o.createElement(P.Button,{asChild:!0,ref:r,disabled:u||a?.disabled||void 0},s?o.createElement(x,{...m,...f}):o.createElement(B,{...m,...f}))});G.displayName="Toolbar.Button";var N=o.forwardRef(({className:t,...r},e)=>(T("ToolbarSeparator"),o.createElement(P.Separator,{...r,ref:e,className:p("rt-ToolbarSeparator",t)})));N.displayName="Toolbar.Separator";var h={1:"2",2:"3",3:"4",4:"5"},g=o.forwardRef(({className:t,children:r,style:e,id:a},s)=>{let{size:n}=T("ToolbarTitle");return r==null||r===!1?null:o.createElement(R,{ref:s,as:"span",size:h[n],weight:"medium",truncate:!0,id:a,style:e,className:p("rt-ToolbarTitle",t)},r)});g.displayName="Toolbar.Title";var V=Object.assign(c,{Root:c,Group:C,Button:G,Separator:N,Title:g});export{c as a,C as b,G as c,N as d,g as e,V as f};
|
|
2
|
+
//# sourceMappingURL=chunk-XLMTTSRO.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/toolbar.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Toolbar as ToolbarPrimitive } from 'radix-ui';\n\nimport { toolbarRootPropDefs } from './toolbar.props.js';\nimport { Button } from './button.js';\nimport { IconButton } from './icon-button.js';\nimport { Text } from './text.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { ButtonProps } from './button.js';\nimport type { TextProps } from './text.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\n/*\n * Toolbar takes Kookie UI v2's contract (v2: components/toolbar), built on Radix instead of\n * Base UI. A toolbar is a row of controls with ONE tab stop: `role=\"toolbar\"`, and the arrow\n * keys move focus between its controls. That keyboard is the reason it is a component.\n *\n * Its `size` reaches every control inside it that does not state its own. The row itself paints\n * nothing; a `ToolbarGroup` draws a quiet well around controls that belong together, and a\n * `ToolbarSeparator` draws a gray hairline between clusters. Use a `Flex` to cluster controls\n * without a well: the row spaces the clusters with `space-between`.\n *\n * The band anchored to a pane's edge (Left / Center / Right / Title) that this name used to\n * mean is `AppBar` since 0.11.0.\n */\n\ntype ToolbarSize = NonNullable<GetPropDefTypes<typeof toolbarRootPropDefs>['size']>;\ntype ToolbarOrientation = NonNullable<GetPropDefTypes<typeof toolbarRootPropDefs>['orientation']>;\n\ninterface ToolbarContextValue {\n size: ToolbarSize;\n orientation: ToolbarOrientation;\n}\n\nconst ToolbarContext = React.createContext<ToolbarContextValue | null>(null);\n\n/** Set by a `ToolbarGroup`: its children rest quiet, and `disabled` turns them all off. */\nconst ToolbarGroupContext = React.createContext<{ disabled: boolean } | null>(null);\n\nfunction useToolbarContext(consumer: string): ToolbarContextValue {\n const context = React.useContext(ToolbarContext);\n if (!context) {\n throw new Error(`${consumer} must be rendered inside a Toolbar.`);\n }\n return context;\n}\n\n// ============================================================================\n// Toolbar (root)\n// ============================================================================\n\ntype ToolbarOwnProps = GetPropDefTypes<typeof toolbarRootPropDefs>;\n\ninterface ToolbarProps\n extends ComponentPropsWithout<typeof ToolbarPrimitive.Root, RemovedProps | 'orientation'>,\n ToolbarOwnProps,\n MarginProps {}\n\n/**\n * A row of controls with one keyboard tab stop. The arrow keys move focus between the controls.\n *\n * Give it an `aria-label` (or `aria-labelledby`) that says what the controls act on.\n *\n * @example\n * ```tsx\n * <Toolbar aria-label=\"Formatting\">\n * <ToolbarGroup>\n * <ToolbarButton iconOnly aria-label=\"Bold\" aria-pressed={bold} onClick={toggleBold}>\n * <HugeiconsIcon icon={TextBoldIcon} strokeWidth={1.75} />\n * </ToolbarButton>\n * </ToolbarGroup>\n * <ToolbarSeparator />\n * <ToolbarButton>Share</ToolbarButton>\n * </Toolbar>\n * ```\n */\nconst ToolbarRoot = React.forwardRef<HTMLDivElement, ToolbarProps>((props, forwardedRef) => {\n const size: ToolbarSize = props.size ?? toolbarRootPropDefs.size.default;\n const orientation: ToolbarOrientation = props.orientation ?? toolbarRootPropDefs.orientation.default;\n const { className, orientation: _orientation, children, ...rootProps } = extractProps(\n props,\n toolbarRootPropDefs,\n marginPropDefs,\n );\n\n const context = React.useMemo(() => ({ size, orientation }), [size, orientation]);\n\n return (\n <ToolbarPrimitive.Root\n {...rootProps}\n ref={forwardedRef}\n orientation={orientation}\n className={classNames('rt-Toolbar', className)}\n >\n <ToolbarContext.Provider value={context}>{children}</ToolbarContext.Provider>\n </ToolbarPrimitive.Root>\n );\n});\nToolbarRoot.displayName = 'Toolbar';\n\n// ============================================================================\n// ToolbarGroup\n// ============================================================================\n\ninterface ToolbarGroupProps extends ComponentPropsWithout<'div', RemovedProps> {\n /** Turns every control in the group off at once. */\n disabled?: boolean;\n}\n\n/**\n * Controls that belong together, drawn as one quiet well that stands level with a button\n * beside it. Buttons inside it rest as `ghost` unless they state a `variant`.\n * To cluster controls without a well, use a `Flex`.\n */\nconst ToolbarGroup = React.forwardRef<HTMLDivElement, ToolbarGroupProps>(\n ({ className, disabled = false, children, ...props }, forwardedRef) => {\n const { orientation } = useToolbarContext('ToolbarGroup');\n const group = React.useMemo(() => ({ disabled }), [disabled]);\n return (\n <div\n role=\"group\"\n data-orientation={orientation}\n data-disabled={disabled || undefined}\n {...props}\n ref={forwardedRef}\n className={classNames('rt-ToolbarGroup', className)}\n >\n <ToolbarGroupContext.Provider value={group}>{children}</ToolbarGroupContext.Provider>\n </div>\n );\n },\n);\nToolbarGroup.displayName = 'Toolbar.Group';\n\n// ============================================================================\n// ToolbarButton\n// ============================================================================\n\ntype ToolbarButtonBaseProps = Omit<ButtonProps, 'as' | 'asChild'>;\n\n/** A labelled button: takes every `Button` prop. */\ntype ToolbarTextButtonProps = ToolbarButtonBaseProps & {\n iconOnly?: false;\n};\n\n/** An icon-only button: renders an `IconButton`, and the type requires an `aria-label`. */\ntype ToolbarIconButtonProps = Omit<ToolbarButtonBaseProps, 'aria-label' | 'aria-labelledby' | 'overrideStyles'> & {\n iconOnly: true;\n /** The control's accessible name. An icon has no words of its own, so this is required. */\n 'aria-label': string;\n};\n\ntype ToolbarButtonProps = ToolbarTextButtonProps | ToolbarIconButtonProps;\n\nfunction isPressed(value: React.AriaAttributes['aria-pressed']) {\n return value === true || value === 'true';\n}\n\n/**\n * A `Button` that joins the toolbar's keyboard navigation, so a row of them is one tab stop.\n *\n * Set `iconOnly` (with an `aria-label`) for a symbol-only control. Set `aria-pressed` for a\n * control that toggles; a pressed button wears Button's pressed look.\n *\n * It takes the toolbar's `size`, and rests as a gray `soft` button (gray `ghost` inside a\n * `ToolbarGroup`). A stated `size`, `variant` or `color` wins; a stated `variant` without a\n * `color` takes Button's own default colour. It throws outside a `Toolbar`.\n */\nconst ToolbarButton = React.forwardRef<HTMLButtonElement, ToolbarButtonProps>((props, forwardedRef) => {\n const toolbar = useToolbarContext('ToolbarButton');\n const group = React.useContext(ToolbarGroupContext);\n const { iconOnly, size, variant, color, disabled, ...rest } = props;\n\n const pressed = isPressed(props['aria-pressed']);\n const stateProps =\n 'data-state' in props || props['aria-pressed'] === undefined ? {} : { 'data-state': pressed ? 'on' : 'off' };\n\n const shared = {\n size: size ?? toolbar.size,\n variant: variant ?? (group ? 'ghost' : 'soft'),\n // The gray rest is a pair with the default variant: a caller who states a variant gets\n // Button's own colour for it unless they state a colour too.\n color: color ?? (variant ? undefined : 'gray'),\n ...stateProps,\n } as const;\n\n return (\n <ToolbarPrimitive.Button asChild ref={forwardedRef} disabled={disabled || group?.disabled || undefined}>\n {iconOnly ? (\n <IconButton {...(rest as Omit<ToolbarIconButtonProps, 'iconOnly'>)} {...shared} />\n ) : (\n <Button {...(rest as Omit<ToolbarTextButtonProps, 'iconOnly'>)} {...shared} />\n )}\n </ToolbarPrimitive.Button>\n );\n});\nToolbarButton.displayName = 'Toolbar.Button';\n\n// ============================================================================\n// ToolbarSeparator\n// ============================================================================\n\ntype ToolbarSeparatorProps = ComponentPropsWithout<typeof ToolbarPrimitive.Separator, RemovedProps | 'orientation'>;\n\n/**\n * A gray hairline between two clusters, announced as a separator. Its direction is always\n * opposite to the toolbar's.\n */\nconst ToolbarSeparator = React.forwardRef<HTMLDivElement, ToolbarSeparatorProps>(\n ({ className, ...props }, forwardedRef) => {\n useToolbarContext('ToolbarSeparator');\n return (\n <ToolbarPrimitive.Separator\n {...props}\n ref={forwardedRef}\n className={classNames('rt-ToolbarSeparator', className)}\n />\n );\n },\n);\nToolbarSeparator.displayName = 'Toolbar.Separator';\n\n// ============================================================================\n// ToolbarTitle\n// ============================================================================\n\n/** The title's text step: one step above the label of a button at the same size. */\nconst TITLE_SIZE = { '1': '2', '2': '3', '3': '4', '4': '5' } as const satisfies Record<ToolbarSize, TextProps['size']>;\n\ninterface ToolbarTitleProps {\n /** The title text. With none, the title renders nothing. */\n children?: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n /** The id of the title, so that the toolbar's `aria-labelledby` can point at it. */\n id?: string;\n}\n\n/**\n * What the row is about, at its leading edge. One line: it truncates rather than wrapping.\n * Its text step follows the toolbar's `size`, and it takes more air from the controls beside it\n * than they take from each other.\n */\nconst ToolbarTitle = React.forwardRef<HTMLSpanElement, ToolbarTitleProps>(\n ({ className, children, style, id }, forwardedRef) => {\n const { size } = useToolbarContext('ToolbarTitle');\n if (children === undefined || children === null || children === false) return null;\n return (\n <Text\n ref={forwardedRef}\n as=\"span\"\n size={TITLE_SIZE[size]}\n weight=\"medium\"\n truncate\n id={id}\n style={style}\n className={classNames('rt-ToolbarTitle', className)}\n >\n {children}\n </Text>\n );\n },\n);\nToolbarTitle.displayName = 'Toolbar.Title';\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nconst Toolbar = Object.assign(ToolbarRoot, {\n Root: ToolbarRoot,\n Group: ToolbarGroup,\n Button: ToolbarButton,\n Separator: ToolbarSeparator,\n Title: ToolbarTitle,\n});\n\nexport {\n Toolbar,\n ToolbarGroup,\n ToolbarButton,\n ToolbarSeparator,\n ToolbarTitle,\n ToolbarRoot as Root,\n ToolbarGroup as Group,\n ToolbarButton as Button,\n ToolbarSeparator as Separator,\n ToolbarTitle as Title,\n};\nexport type {\n ToolbarProps,\n ToolbarGroupProps,\n ToolbarButtonProps,\n ToolbarSeparatorProps,\n ToolbarTitleProps,\n ToolbarProps as RootProps,\n ToolbarGroupProps as GroupProps,\n ToolbarButtonProps as ButtonProps,\n ToolbarSeparatorProps as SeparatorProps,\n ToolbarTitleProps as TitleProps,\n};\n"],
|
|
5
|
+
"mappings": "gPAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,WAAWC,MAAwB,WAqC5C,IAAMC,EAAuB,gBAA0C,IAAI,EAGrEC,EAA4B,gBAA4C,IAAI,EAElF,SAASC,EAAkBC,EAAuC,CAChE,IAAMC,EAAgB,aAAWJ,CAAc,EAC/C,GAAI,CAACI,EACH,MAAM,IAAI,MAAM,GAAGD,CAAQ,qCAAqC,EAElE,OAAOC,CACT,CA+BA,IAAMC,EAAoB,aAAyC,CAACC,EAAOC,IAAiB,CAC1F,IAAMC,EAAoBF,EAAM,MAAQG,EAAoB,KAAK,QAC3DC,EAAkCJ,EAAM,aAAeG,EAAoB,YAAY,QACvF,CAAE,UAAAE,EAAW,YAAaC,EAAc,SAAAC,EAAU,GAAGC,CAAU,EAAIC,EACvET,EACAG,EACAO,CACF,EAEMZ,EAAgB,UAAQ,KAAO,CAAE,KAAAI,EAAM,YAAAE,CAAY,GAAI,CAACF,EAAME,CAAW,CAAC,EAEhF,OACE,gBAACO,EAAiB,KAAjB,CACE,GAAGH,EACJ,IAAKP,EACL,YAAaG,EACb,UAAWQ,EAAW,aAAcP,CAAS,GAE7C,gBAACX,EAAe,SAAf,CAAwB,MAAOI,GAAUS,CAAS,CACrD,CAEJ,CAAC,EACDR,EAAY,YAAc,UAgB1B,IAAMc,EAAqB,aACzB,CAAC,CAAE,UAAAR,EAAW,SAAAS,EAAW,GAAO,SAAAP,EAAU,GAAGP,CAAM,EAAGC,IAAiB,CACrE,GAAM,CAAE,YAAAG,CAAY,EAAIR,EAAkB,cAAc,EAClDmB,EAAc,UAAQ,KAAO,CAAE,SAAAD,CAAS,GAAI,CAACA,CAAQ,CAAC,EAC5D,OACE,gBAAC,OACC,KAAK,QACL,mBAAkBV,EAClB,gBAAeU,GAAY,OAC1B,GAAGd,EACJ,IAAKC,EACL,UAAWW,EAAW,kBAAmBP,CAAS,GAElD,gBAACV,EAAoB,SAApB,CAA6B,MAAOoB,GAAQR,CAAS,CACxD,CAEJ,CACF,EACAM,EAAa,YAAc,gBAsB3B,SAASG,EAAUC,EAA6C,CAC9D,OAAOA,IAAU,IAAQA,IAAU,MACrC,CAYA,IAAMC,EAAsB,aAAkD,CAAClB,EAAOC,IAAiB,CACrG,IAAMkB,EAAUvB,EAAkB,eAAe,EAC3CmB,EAAc,aAAWpB,CAAmB,EAC5C,CAAE,SAAAyB,EAAU,KAAAlB,EAAM,QAAAmB,EAAS,MAAAC,EAAO,SAAAR,EAAU,GAAGS,CAAK,EAAIvB,EAExDwB,EAAUR,EAAUhB,EAAM,cAAc,CAAC,EACzCyB,EACJ,eAAgBzB,GAASA,EAAM,cAAc,IAAM,OAAY,CAAC,EAAI,CAAE,aAAcwB,EAAU,KAAO,KAAM,EAEvGE,EAAS,CACb,KAAMxB,GAAQiB,EAAQ,KACtB,QAASE,IAAYN,EAAQ,QAAU,QAGvC,MAAOO,IAAUD,EAAU,OAAY,QACvC,GAAGI,CACL,EAEA,OACE,gBAACd,EAAiB,OAAjB,CAAwB,QAAO,GAAC,IAAKV,EAAc,SAAUa,GAAYC,GAAO,UAAY,QAC1FK,EACC,gBAACO,EAAA,CAAY,GAAIJ,EAAoD,GAAGG,EAAQ,EAEhF,gBAACE,EAAA,CAAQ,GAAIL,EAAoD,GAAGG,EAAQ,CAEhF,CAEJ,CAAC,EACDR,EAAc,YAAc,iBAY5B,IAAMW,EAAyB,aAC7B,CAAC,CAAE,UAAAxB,EAAW,GAAGL,CAAM,EAAGC,KACxBL,EAAkB,kBAAkB,EAElC,gBAACe,EAAiB,UAAjB,CACE,GAAGX,EACJ,IAAKC,EACL,UAAWW,EAAW,sBAAuBP,CAAS,EACxD,EAGN,EACAwB,EAAiB,YAAc,oBAO/B,IAAMC,EAAa,CAAE,EAAK,IAAK,EAAK,IAAK,EAAK,IAAK,EAAK,GAAI,EAgBtDC,EAAqB,aACzB,CAAC,CAAE,UAAA1B,EAAW,SAAAE,EAAU,MAAAyB,EAAO,GAAAC,CAAG,EAAGhC,IAAiB,CACpD,GAAM,CAAE,KAAAC,CAAK,EAAIN,EAAkB,cAAc,EACjD,OAA8BW,GAAa,MAAQA,IAAa,GAAc,KAE5E,gBAAC2B,EAAA,CACC,IAAKjC,EACL,GAAG,OACH,KAAM6B,EAAW5B,CAAI,EACrB,OAAO,SACP,SAAQ,GACR,GAAI+B,EACJ,MAAOD,EACP,UAAWpB,EAAW,kBAAmBP,CAAS,GAEjDE,CACH,CAEJ,CACF,EACAwB,EAAa,YAAc,gBAM3B,IAAMI,EAAU,OAAO,OAAOpC,EAAa,CACzC,KAAMA,EACN,MAAOc,EACP,OAAQK,EACR,UAAWW,EACX,MAAOE,CACT,CAAC",
|
|
6
|
+
"names": ["React", "classNames", "ToolbarPrimitive", "ToolbarContext", "ToolbarGroupContext", "useToolbarContext", "consumer", "context", "ToolbarRoot", "props", "forwardedRef", "size", "toolbarRootPropDefs", "orientation", "className", "_orientation", "children", "rootProps", "extractProps", "marginPropDefs", "ToolbarPrimitive", "classNames", "ToolbarGroup", "disabled", "group", "isPressed", "value", "ToolbarButton", "toolbar", "iconOnly", "variant", "color", "rest", "pressed", "stateProps", "shared", "IconButton", "Button", "ToolbarSeparator", "TITLE_SIZE", "ToolbarTitle", "style", "id", "Text", "Toolbar"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as C}from"./chunk-MHANZINI.js";import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as C}from"./chunk-MHANZINI.js";import{a as d}from"./chunk-MJJ7XDIP.js";import{a as R}from"./chunk-5WRCK4R7.js";import{a as S}from"./chunk-GCUGJXI2.js";import{a as D}from"./chunk-GO7OHBHW.js";import{c as y}from"./chunk-SEY4NA45.js";import{a as u}from"./chunk-5TXQLK4G.js";import{a as c}from"./chunk-6FLLFCBU.js";import{a as F}from"./chunk-OS3FCYZY.js";var J={};F(J,{Close:()=>k,Content:()=>b,Description:()=>N,Root:()=>T,Title:()=>x,Trigger:()=>v});import*as e from"react";import K from"classnames";import{Dialog as a}from"radix-ui";var T=o=>e.createElement(a.Root,{...o,modal:!0});T.displayName="Sheet.Root";var v=e.forwardRef(({children:o,...t},r)=>e.createElement(a.Trigger,{...t,ref:r,asChild:!0},d(o)));v.displayName="Sheet.Trigger";var{align:ae,panelBackground:V,material:_,...E}=S,q={panelBackground:V,material:_},{default:ne,...I}=E.maxWidth,G={...E,maxWidth:I},b=e.forwardRef((o,t)=>{let{side:r="start",forceMount:n,container:M,className:B,panelBackground:f,material:W,...w}=o,H={left:"start",right:"end",start:"start",end:"end",top:"top",bottom:"bottom"}[r],{panelBackground:L,material:O}=c({panelBackground:f,material:W},q);u(f);let h=O??L,{className:z,...j}=c(w,G),g=e.useRef(null),A=e.useMemo(()=>i=>{g.current=i,typeof t=="function"?t(i):t&&(t.current=i)},[t]);return C(),e.useEffect(()=>{if(typeof window>"u")return;let i=g.current;if(!i)return;let s=i.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(s.length===0)return;let l=s[0],m=s[s.length-1],P=p=>{p.key==="Tab"&&(p.shiftKey?document.activeElement===l&&(p.preventDefault(),m.focus()):document.activeElement===m&&(p.preventDefault(),l.focus()))};return i.addEventListener("keydown",P),l.focus(),()=>{i.removeEventListener("keydown",P)}},[]),e.createElement(a.Portal,{container:M,forceMount:n},e.createElement(y,{asChild:!0},e.createElement(a.Overlay,{className:"rt-BaseDialogOverlay rt-DialogOverlay rt-SheetOverlay"},e.createElement(a.Content,{...j,ref:A,className:K("rt-BaseDialogContent","rt-SheetContent",B,z),"data-side":H,"data-material":h,"data-panel-background":h,tabIndex:-1,role:"dialog","aria-modal":"true"}))))});b.displayName="Sheet.Content";var x=e.forwardRef(({size:o="4",weight:t="medium",...r},n)=>e.createElement(a.Title,{asChild:!0},e.createElement(D,{ref:n,size:o,weight:t,...r})));x.displayName="Sheet.Title";var N=e.forwardRef(({size:o="2",emphasis:t="medium",...r},n)=>e.createElement(a.Description,{asChild:!0},e.createElement(R,{ref:n,size:o,emphasis:t,...r})));N.displayName="Sheet.Description";var k=e.forwardRef(({children:o,...t},r)=>e.createElement(a.Close,{...t,ref:r,asChild:!0},d(o)));k.displayName="Sheet.Close";export{T as a,v as b,b as c,x as d,N as e,k as f,J as g};
|
|
2
|
+
//# sourceMappingURL=chunk-ZK7A2MZZ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/toolbar.props.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3', '4'] as const;\nconst orientations = ['horizontal', 'vertical'] as const;\n\n/**\n * Toolbar prop definitions.\n *\n * `size` is one value for the whole row (not responsive): the row hands it to every control\n * inside it that does not state its own, through context, so it has to be a single index.\n */\nconst toolbarRootPropDefs = {\n /**\n * Size step of the row and of every control in it that doesn't set its own `size`.\n * Matches Button's sizes: 1 (24px) to 4 (48px).\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2' },\n /**\n * Direction of the row and of the arrow keys. Use `vertical` for a strip of tools along an edge.\n */\n orientation: { type: 'enum', values: orientations, default: 'horizontal' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n orientation: PropDef<(typeof orientations)[number]>;\n};\n\nexport { toolbarRootPropDefs };\n"],
|
|
5
|
+
"mappings": "AAEA,IAAMA,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAC3BC,EAAe,CAAC,aAAc,UAAU,EAQxCC,EAAsB,CAK1B,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQF,EAAO,QAAS,GAAI,EAI1E,YAAa,CAAE,KAAM,OAAQ,OAAQC,EAAc,QAAS,YAAa,CAC3E",
|
|
6
|
+
"names": ["sizes", "orientations", "toolbarRootPropDefs"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-4LDVSTXI.js";import"../../chunk-HF5WY5YE.js";import"../../chunk-3KB2XWBE.js";import"../../chunk-AGAQC4HH.js";import"../../chunk-5T6K7VPP.js";import"../../chunk-FHOCUZDR.js";import"../../chunk-SMGDH54W.js";import"../../chunk-SNR5VFWG.js";import"../../chunk-FWB47YCH.js";import"../../chunk-K53W3ELO.js";import"../../chunk-TTFUM47A.js";import"../../chunk-VX44UTQ5.js";import"../../chunk-ERGJN7FJ.js";import"../../chunk-5TXQLK4G.js";import"../../chunk-JFWMAYEH.js";import"../../chunk-KRJTW535.js";import"../../chunk-GSTOGDAJ.js";import"../../chunk-6FLLFCBU.js";import"../../chunk-AX5S56DS.js";import"../../chunk-E23RKOQJ.js";import"../../chunk-JUY7CBSL.js";import"../../chunk-WRWNN2NW.js";import"../../chunk-QM3RCK5P.js";import"../../chunk-RZCX6IBE.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-ZNK6AH2G.js";import"../../chunk-OS3FCYZY.js";export{a as BaseButton};
|
|
2
2
|
//# sourceMappingURL=base-button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../chunk-IYCPYN4Z.js";import"../chunk-MJJ7XDIP.js";import"../chunk-5WRCK4R7.js";import"../chunk-4XKK32M4.js";import"../chunk-XKBLNVOD.js";import"../chunk-GCUGJXI2.js";import"../chunk-GO7OHBHW.js";import"../chunk-PZ7OYATT.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-ZWZGUBL4.js";import"../chunk-SEY4NA45.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-XYVLQDGR.js";import"../chunk-VX44UTQ5.js";import"../chunk-ERGJN7FJ.js";import"../chunk-5TXQLK4G.js";import"../chunk-KRJTW535.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-NZJGC6ZW.js";import"../chunk-ZNK6AH2G.js";import"../chunk-OS3FCYZY.js";export{f as Action,g as Cancel,c as Content,e as Description,a as Root,d as Title,b as Trigger};
|
|
2
2
|
//# sourceMappingURL=alert-dialog.js.map
|