@kushagradhawan/kookie-ui 0.6.0 → 0.6.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/chatbar.tsx", "../../../src/components/icon-button.tsx", "../../../src/components/_internal/base-button.tsx", "../../../src/props/as-child.prop.ts", "../../../src/props/color.prop.ts", "../../../src/props/high-contrast.prop.ts", "../../../src/props/radius.prop.ts", "../../../src/components/_internal/base-button.props.ts", "../../../src/components/flex.tsx", "../../../src/helpers/extract-props.ts", "../../../src/helpers/compile-prop-defs.ts", "../../../src/props/prop-def.ts", "../../../src/helpers/has-own-property.ts", "../../../src/helpers/is-responsive-object.ts", "../../../src/helpers/get-responsive-styles.ts", "../../../src/helpers/merge-styles.ts", "../../../src/props/padding.props.ts", "../../../src/props/height.props.ts", "../../../src/props/width.props.ts", "../../../src/props/layout.props.ts", "../../../src/props/margin.props.ts", "../../../src/components/slot.tsx", "../../../src/props/gap.props.ts", "../../../src/components/flex.props.tsx", "../../../src/components/spinner.tsx", "../../../src/components/spinner.props.tsx", "../../../src/components/visually-hidden.tsx", "../../../src/helpers/use-deprecation-warning.ts", "../../../src/helpers/map-prop-values.ts", "../../../src/components/tooltip.tsx", "../../../src/components/text.tsx", "../../../src/props/leading-trim.prop.ts", "../../../src/props/text-align.prop.ts", "../../../src/props/text-wrap.prop.ts", "../../../src/props/truncate.prop.ts", "../../../src/props/font-family.prop.ts", "../../../src/props/weight.prop.ts", "../../../src/components/text.props.tsx", "../../../src/components/theme.tsx", "../../../src/helpers/get-matching-gray-color.ts", "../../../src/hooks/use-prop-synced-state.ts", "../../../src/components/theme.props.tsx", "../../../src/components/tooltip.props.tsx", "../../../src/hooks/use-tooltip-wrapper.ts", "../../../src/components/icons.tsx", "../../../src/components/scroll-area.tsx", "../../../src/components/scroll-area.props.tsx", "../../../src/helpers/extract-margin-props.ts", "../../../src/helpers/get-margin-styles.ts", "../../../src/helpers/get-subtree.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { LazyMotion, MotionConfig, domAnimation, m } from 'motion/react';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { useDropzone } from 'react-dropzone';\n\nimport { IconButton, type IconButtonProps } from './icon-button.js';\nimport { CloseIcon, FileTextIcon } from './icons.js';\nimport { Flex } from './flex.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Slot } from './slot.js';\nimport { Text } from './text.js';\nimport { VisuallyHidden } from './visually-hidden.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { accentColors } from '../props/color.prop.js';\nimport type { radii } from '../props/radius.prop.js';\n\n// Avoid SSR warnings by using an isomorphic layout effect\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\n// Shared layout spring; hoisted so every motion node receives the same object\nconst LAYOUT_TRANSITION = { layout: { type: 'spring', visualDuration: 0.15, bounce: 0.1 } } as const;\n\ntype ExpandOn = 'none' | 'focus' | 'overflow' | 'both';\ntype SendMode = 'always' | 'whenDirty' | 'never';\n\n// Attachments\n/** Status flag for attachment lifecycle. */\ntype AttachmentStatus = 'idle' | 'uploading' | 'error' | 'done';\n/**\n * Attachment data model used by Chatbar.\n * - `file` exposes the original File object for uploads and processing.\n * - `url` is an object URL used for image previews. Chatbar revokes it when the\n * attachment is removed; once an attachment is handed to `onSubmit`, the\n * consumer owns the URL and is responsible for revoking it.\n */\ninterface ChatbarAttachment {\n id: string;\n name: string;\n size: number;\n type: string;\n /** Original File object for uploads and processing */\n file: File;\n url?: string;\n status?: AttachmentStatus;\n progress?: number;\n meta?: Record<string, unknown>;\n}\n\ntype ChatbarRejectReason = 'type' | 'size' | 'count';\ninterface ChatbarAttachmentRejection {\n file: File;\n reason: ChatbarRejectReason;\n}\n\ninterface ChatbarSubmitPayload {\n value: string;\n attachments: ChatbarAttachment[];\n}\n\ninterface FilePickerOptions {\n accept?: string | string[];\n multiple?: boolean;\n}\n\ninterface ChatbarContextValue {\n open: boolean;\n setOpen(next: boolean): void;\n\n setValue(next: string): void;\n\n size: '1' | '2' | '3';\n expandOn: ExpandOn;\n minLines: number;\n maxLines: number;\n sendMode: SendMode;\n disabled?: boolean;\n readOnly?: boolean;\n paste: boolean;\n clearOnSubmit: boolean;\n multiple: boolean;\n\n textareaRef: React.RefObject<HTMLTextAreaElement | null>;\n\n attachments: ChatbarAttachment[];\n removeAttachment(id: string): void;\n\n /** Validates and submits; returns false when there was nothing to submit */\n submit(clear: boolean): boolean;\n appendFiles(files: File[]): number;\n appendFilesFromPaste(files: File[]): number;\n openFilePicker(options?: FilePickerOptions): void;\n /** Guards blur-collapse between pointerdown on a picker trigger and its click */\n beginFilePickerPress(): void;\n}\n\nconst ChatbarContext = React.createContext<ChatbarContextValue | null>(null);\n// Value lives in its own context so keystrokes only re-render parts that read it\nconst ChatbarValueContext = React.createContext<string>('');\n\nconst useChatbarContext = () => {\n const ctx = React.useContext(ChatbarContext);\n if (!ctx) throw new Error('Chatbar context not found. Wrap parts in <Chatbar.Root>.');\n return ctx;\n};\n\nconst toArray = (val: string | string[] | undefined) =>\n Array.isArray(val) ? val : typeof val === 'string' ? val.split(',').map((s) => s.trim()).filter(Boolean) : [];\n\nconst matchesAccept = (file: File, patterns: string[]) => {\n if (patterns.length === 0) return true;\n const mime = file.type.toLowerCase();\n const name = file.name.toLowerCase();\n for (const patRaw of patterns) {\n const pat = patRaw.toLowerCase();\n if (pat.includes('/')) {\n const [type, subtype] = pat.split('/');\n const [fmType, fmSubtype] = mime.split('/');\n if (type === '*' || (type === fmType && (subtype === '*' || subtype === fmSubtype))) return true;\n } else if (pat.startsWith('.')) {\n if (name.endsWith(pat)) return true;\n }\n }\n return false;\n};\n\nconst IMAGE_EXT_RE = /\\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i;\nconst isImageLike = (name: string, type: string) => (type || '').toLowerCase().startsWith('image/') || IMAGE_EXT_RE.test(name);\n\nconst hasText = (value: string) => value.trim().length > 0;\n\nconst plural = (n: number, word: string) => `${n} ${word}${n === 1 ? '' : 's'}`;\n\nlet attachmentCounter = 0;\nconst createAttachmentId = () => `chatbar-attachment-${Date.now()}-${++attachmentCounter}`;\n\n/**\n * Chatbar container and state provider.\n *\n * Value & Open\n * - Supports controlled/uncontrolled `value` and `open`.\n *\n * Attachments\n * - Controlled/uncontrolled attachments with client-side filtering.\n * - Filters by `accept`/`pasteAccept`, `multiple`, `maxAttachments`, and `maxFileSize`.\n * - Rejections are reported via `onAttachmentReject`.\n *\n * Submit\n * - `onSubmit({ value, attachments })` emits both message and attachments.\n * - Submitting requires text or at least one attachment.\n * - `clearOnSubmit` clears message and attachments by default.\n */\ninterface ChatbarRootBaseProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n\n /** When the chatbar expands on its own. `none` leaves open state entirely to the consumer. */\n expandOn?: ExpandOn;\n\n /** Minimum visible lines when expanded (default: 3). The compact state is always one line. */\n minLines?: number;\n /** Maximum number of lines before scrolling (default: 6) */\n maxLines?: number;\n\n /** Controls Send button visibility only. Enter-to-submit is controlled by `Textarea submitOnEnter`. */\n sendMode?: SendMode;\n\n /** Disables text input, submission and every way of adding attachments */\n disabled?: boolean;\n /** Prevents editing, submission and adding attachments */\n readOnly?: boolean;\n\n /** Combined submit payload */\n onSubmit?: (payload: ChatbarSubmitPayload) => void;\n\n size?: '1' | '2' | '3';\n variant?: 'surface' | 'outline' | 'classic' | 'ghost' | 'soft';\n /** Accent color for the control (matches TextArea) */\n color?: (typeof accentColors)[number];\n /** Optional radius override (matches TextArea) */\n radius?: (typeof radii)[number];\n /** Panel/material translucency flags (matches TextArea) */\n panelBackground?: 'solid' | 'translucent';\n material?: 'solid' | 'translucent';\n\n width?: React.CSSProperties['width'];\n maxWidth?: React.CSSProperties['maxWidth'];\n\n // Attachments API\n attachments?: ChatbarAttachment[];\n defaultAttachments?: ChatbarAttachment[];\n onAttachmentsChange?: (attachments: ChatbarAttachment[]) => void;\n accept?: string | string[];\n /** Allow more than one file per pick, paste or drop */\n multiple?: boolean;\n maxAttachments?: number;\n maxFileSize?: number;\n paste?: boolean;\n /** Accepted types for pasted files. Replaces `accept` for paste when set. */\n pasteAccept?: string | string[];\n /** Clear message and attachments after submit */\n clearOnSubmit?: boolean;\n onAttachmentReject?: (rejections: ChatbarAttachmentRejection[]) => void;\n\n /**\n * Enables drag-and-drop file uploads when true.\n *\n * When enabled:\n * - Files can be dropped anywhere on the chatbar\n * - Same validation rules apply (accept, multiple, maxFileSize, maxAttachments)\n * - Visual feedback shows during drag operations\n * - Rejected files trigger onAttachmentReject\n *\n * @default true\n */\n dropzone?: boolean;\n\n /**\n * Optional API ref to control Chatbar imperatively without relying on DOM refs.\n * Provides methods to focus the textarea and open the file picker.\n */\n apiRef?: React.Ref<ChatbarApi>;\n}\n\ntype RootElement = React.ElementRef<'div'>;\n/** Imperative API for Chatbar.Root */\nexport interface ChatbarApi {\n /** Focus the textarea input */\n focusTextarea: () => void;\n /** Open the file picker dialog (respects accept/multiple). No-op when disabled or read-only. */\n openFilePicker: () => void;\n}\n/**\n * Chatbar container and state provider.\n *\n * Behavior\n * - Supports controlled and uncontrolled `value` and `open` states via props.\n * - Provides context to subcomponents like `Textarea`, `Row`, and `Send`.\n * - Exposes `data-state`, `data-disabled`, and `data-readonly` attributes for styling.\n *\n * Attachments\n * - Paste-to-attach: when `paste` is enabled, pasting files adds attachments.\n * - Additions and rejections are announced through a polite live region.\n *\n * Dropzone\n * - When `dropzone` is true, enables drag-and-drop file uploads.\n * - Visual feedback via `data-drop-active` attribute during drag operations.\n *\n * Accessibility\n * - Consumers should label the `Textarea` via `aria-label`/`aria-labelledby`.\n */\ninterface RootProps extends ComponentPropsWithout<'div', RemovedProps | 'onSubmit' | 'color'>, ChatbarRootBaseProps {}\n\nconst Root = React.forwardRef<RootElement, RootProps>((props, forwardedRef) => {\n const {\n className,\n style,\n children,\n value: valueProp,\n defaultValue = '',\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n expandOn = 'both',\n minLines = 3,\n maxLines = 6,\n sendMode = 'whenDirty',\n disabled,\n readOnly,\n onSubmit,\n size = '2',\n variant,\n color,\n radius,\n panelBackground,\n material,\n width,\n maxWidth,\n attachments: attachmentsProp,\n defaultAttachments,\n onAttachmentsChange,\n accept,\n multiple = true,\n maxAttachments,\n maxFileSize,\n paste = true,\n pasteAccept,\n clearOnSubmit = true,\n onAttachmentReject,\n dropzone = true,\n apiRef,\n onBlurCapture,\n ...divProps\n } = props;\n const effectiveMaterial = material || panelBackground;\n\n const isValueControlled = valueProp != null;\n const [valueUncontrolled, setValueUncontrolled] = React.useState<string>(defaultValue);\n const value = isValueControlled ? valueProp : valueUncontrolled;\n\n const isOpenControlled = openProp != null;\n const [openUncontrolled, setOpenUncontrolled] = React.useState<boolean>(defaultOpen);\n const open = isOpenControlled ? openProp : openUncontrolled;\n\n // Treat `attachments` as controlled if the prop is provided, even if its value is `undefined`.\n // This avoids switching between controlled and uncontrolled when a consumer sets\n // `attachments={undefined}` to clear attachments. In that case we normalize to an empty array.\n const isAttachmentsControlled = 'attachments' in props;\n const [attachmentsUncontrolled, setAttachmentsUncontrolled] = React.useState<ChatbarAttachment[]>(() => defaultAttachments ?? []);\n const attachments = React.useMemo(\n () => (isAttachmentsControlled ? (attachmentsProp ?? []) : attachmentsUncontrolled),\n [isAttachmentsControlled, attachmentsProp, attachmentsUncontrolled],\n );\n\n // `id` changes on every announcement so identical messages still update the live region\n const [announcement, setAnnouncementState] = React.useState({ text: '', id: 0 });\n const announce = React.useCallback((text: string) => setAnnouncementState((prev) => ({ text, id: prev.id + 1 })), []);\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const composedRootRef = useComposedRefs(forwardedRef, rootRef);\n const textareaRef = React.useRef<HTMLTextAreaElement>(null);\n const fileInputRef = React.useRef<HTMLInputElement>(null);\n\n // Blur-collapse guards: `pickerOpenRef` is true while the native dialog is open,\n // `pressGuardRef` covers the gap between pointerdown on a trigger and its click\n // (Safari blurs the textarea before the click fires).\n const pickerOpenRef = React.useRef(false);\n const pressGuardRef = React.useRef(false);\n const pressGuardTimerRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const pickerRef = React.useRef<{ patterns: string[]; multiple: boolean } | null>(null);\n\n const acceptKey = toArray(accept).join(',');\n const pasteAcceptKey = toArray(pasteAccept).join(',');\n const accepts = React.useMemo(() => toArray(acceptKey), [acceptKey]);\n const pasteAccepts = React.useMemo(() => (pasteAcceptKey ? toArray(pasteAcceptKey) : accepts), [pasteAcceptKey, accepts]);\n\n // Latest props/state for stable callbacks. Synced during render (not in an effect) so\n // child layout effects that call setOpen/setValue see this render's handlers.\n const snapshot = {\n value,\n attachments,\n accepts,\n pasteAccepts,\n multiple,\n maxAttachments,\n maxFileSize,\n disabled,\n readOnly,\n expandOn,\n isValueControlled,\n isOpenControlled,\n isAttachmentsControlled,\n onValueChange,\n onOpenChange,\n onAttachmentsChange,\n onAttachmentReject,\n onSubmit,\n };\n const latest = React.useRef(snapshot);\n // eslint-disable-next-line react-hooks/refs -- read only in callbacks/effects; see comment above\n latest.current = snapshot;\n\n // Attachments set during the current event, before Root re-renders. Cleared at the end\n // of the task so a controlled parent that rejects the change is not overridden.\n const pendingAttachmentsRef = React.useRef<ChatbarAttachment[] | null>(null);\n const getAttachments = React.useCallback(() => pendingAttachmentsRef.current ?? latest.current.attachments, []);\n\n const setOpen = React.useCallback((next: boolean) => {\n if (!latest.current.isOpenControlled) setOpenUncontrolled(next);\n latest.current.onOpenChange?.(next);\n }, []);\n\n const setValue = React.useCallback((next: string) => {\n if (!latest.current.isValueControlled) setValueUncontrolled(next);\n latest.current.onValueChange?.(next);\n }, []);\n\n const setAttachments = React.useCallback((next: ChatbarAttachment[]) => {\n // Back-to-back updates in one event must see each other\n pendingAttachmentsRef.current = next;\n queueMicrotask(() => {\n pendingAttachmentsRef.current = null;\n });\n if (!latest.current.isAttachmentsControlled) setAttachmentsUncontrolled(next);\n latest.current.onAttachmentsChange?.(next);\n }, []);\n\n // Object URLs Chatbar created and still owns\n const ownedUrlsRef = React.useRef<Set<string>>(new Set());\n\n const addFiles = React.useCallback(\n (files: File[], patterns: string[], multiple: boolean = latest.current.multiple): number => {\n const cfg = latest.current;\n if (cfg.disabled || cfg.readOnly || files.length === 0) return 0;\n\n const current = getAttachments();\n const next: ChatbarAttachment[] = [];\n const rejected: ChatbarAttachmentRejection[] = [];\n const remainingSlots = typeof cfg.maxAttachments === 'number' ? Math.max(cfg.maxAttachments - current.length, 0) : Infinity;\n const perActionLimit = multiple ? Infinity : 1;\n\n for (const file of files) {\n if (next.length >= remainingSlots || next.length >= perActionLimit) {\n rejected.push({ file, reason: 'count' });\n continue;\n }\n if (typeof cfg.maxFileSize === 'number' && file.size > cfg.maxFileSize) {\n rejected.push({ file, reason: 'size' });\n continue;\n }\n if (!matchesAccept(file, patterns)) {\n rejected.push({ file, reason: 'type' });\n continue;\n }\n const url = isImageLike(file.name, file.type) ? URL.createObjectURL(file) : undefined;\n if (url) ownedUrlsRef.current.add(url);\n next.push({ id: createAttachmentId(), name: file.name, size: file.size, type: file.type, file, url, status: 'idle' });\n }\n\n const messages: string[] = [];\n if (next.length > 0) {\n setAttachments(current.concat(next));\n if (cfg.expandOn !== 'none') setOpen(true);\n messages.push(`${plural(next.length, 'file')} attached.`);\n }\n if (rejected.length > 0) {\n cfg.onAttachmentReject?.(rejected);\n messages.push(`${plural(rejected.length, 'file')} could not be attached.`);\n }\n if (messages.length > 0) announce(messages.join(' '));\n return next.length;\n },\n [getAttachments, setAttachments, setOpen, announce],\n );\n\n const appendFiles = React.useCallback((files: File[]) => addFiles(files, latest.current.accepts), [addFiles]);\n const appendFilesFromPaste = React.useCallback((files: File[]) => addFiles(files, latest.current.pasteAccepts), [addFiles]);\n\n const removeAttachment = React.useCallback(\n (id: string) => {\n const current = getAttachments();\n const removed = current.find((a) => a.id === id);\n if (!removed) return;\n setAttachments(current.filter((a) => a.id !== id));\n announce(`Removed ${removed.name}.`);\n },\n [getAttachments, setAttachments, announce],\n );\n\n const submit = React.useCallback(\n (clear: boolean) => {\n const cfg = latest.current;\n if (cfg.disabled || cfg.readOnly) return false;\n const current = getAttachments();\n if (!hasText(cfg.value) && current.length === 0) return false;\n const payload = { value: cfg.value, attachments: current };\n // Hand preview URLs to the consumer only when they leave the chatbar; URLs still\n // rendered here stay owned so removing them later revokes them\n if (clear && cfg.onSubmit) {\n for (const att of current) if (att.url) ownedUrlsRef.current.delete(att.url);\n }\n cfg.onSubmit?.(payload);\n if (clear) {\n setValue('');\n setAttachments([]);\n }\n return true;\n },\n [getAttachments, setValue, setAttachments],\n );\n\n // Revoke owned object URLs that are no longer referenced by current attachments\n React.useEffect(() => {\n const owned = ownedUrlsRef.current;\n if (owned.size === 0) return;\n const current = new Set(attachments.map((a) => a.url));\n for (const url of Array.from(owned)) {\n if (!current.has(url)) {\n URL.revokeObjectURL(url);\n owned.delete(url);\n }\n }\n }, [attachments]);\n\n // On unmount, revoke URLs only when Chatbar owns the attachment list;\n // controlled attachments may still be rendered by the parent.\n React.useEffect(() => {\n const owned = ownedUrlsRef.current;\n return () => {\n if (latest.current.isAttachmentsControlled) return;\n for (const url of Array.from(owned)) URL.revokeObjectURL(url);\n owned.clear();\n };\n }, []);\n\n const openFilePicker = React.useCallback((options?: FilePickerOptions) => {\n const cfg = latest.current;\n const input = fileInputRef.current;\n // The picker guard takes over from the press guard\n clearTimeout(pressGuardTimerRef.current);\n pressGuardRef.current = false;\n if (!input || cfg.disabled || cfg.readOnly) return;\n const patterns = options?.accept != null ? toArray(options.accept) : cfg.accepts;\n const multiple = options?.multiple ?? cfg.multiple;\n pickerRef.current = { patterns, multiple };\n input.accept = patterns.join(',');\n input.multiple = multiple;\n pickerOpenRef.current = true;\n input.click();\n // Browsers block the dialog outside a user gesture; if the window kept focus,\n // no dialog opened and no focus/cancel/change event will clear the guard\n setTimeout(() => {\n if (document.hasFocus()) pickerOpenRef.current = false;\n }, 1000);\n }, []);\n\n const beginFilePickerPress = React.useCallback(() => {\n // On touch (notably iOS), the compatibility mousedown, blur and click arrive in later\n // tasks than pointerup, so hold the guard until the click or a timeout\n pressGuardRef.current = true;\n clearTimeout(pressGuardTimerRef.current);\n pressGuardTimerRef.current = setTimeout(() => {\n pressGuardRef.current = false;\n }, 800);\n }, []);\n\n React.useEffect(() => () => clearTimeout(pressGuardTimerRef.current), []);\n\n // Clear the picker guard when the dialog closes, whichever way it closes\n React.useEffect(() => {\n const input = fileInputRef.current;\n const reset = () => {\n pickerOpenRef.current = false;\n };\n window.addEventListener('focus', reset);\n input?.addEventListener('cancel', reset);\n return () => {\n window.removeEventListener('focus', reset);\n input?.removeEventListener('cancel', reset);\n };\n }, []);\n\n const handleFileInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const input = event.currentTarget;\n const files = Array.from(input.files ?? []);\n const picker = pickerRef.current;\n addFiles(files, picker?.patterns ?? latest.current.accepts, picker?.multiple);\n pickerOpenRef.current = false;\n pickerRef.current = null;\n // Reset so selecting the same file again still fires change\n input.value = '';\n },\n [addFiles],\n );\n\n const handleBlurCapture = React.useCallback(\n (event: React.FocusEvent<HTMLDivElement>) => {\n onBlurCapture?.(event);\n const cfg = latest.current;\n const rootEl = rootRef.current;\n if (!rootEl || cfg.expandOn === 'none') return;\n const nextTarget = event.relatedTarget as Node | null;\n if (nextTarget && rootEl.contains(nextTarget)) return;\n if (pickerOpenRef.current || pressGuardRef.current) return;\n if (!hasText(cfg.value) && getAttachments().length === 0) setOpen(false);\n },\n [onBlurCapture, setOpen, getAttachments],\n );\n\n const handleDrop = React.useCallback((files: File[]) => {\n appendFiles(files);\n }, [appendFiles]);\n\n // Validation happens in addFiles so drop, paste and picker share one rule set\n const { getRootProps, isDragActive } = useDropzone({\n onDrop: handleDrop,\n // Drop any earlier message so it is not re-announced when the drag hint goes away\n onDragEnter: () => announce(''),\n noClick: true,\n noKeyboard: true,\n // Textarea handles paste itself; letting the dropzone see it attaches twice\n noPaste: true,\n disabled: !dropzone || disabled || readOnly,\n });\n const dragActive = dropzone && isDragActive;\n\n React.useImperativeHandle(\n apiRef,\n () => ({\n focusTextarea: () => textareaRef.current?.focus({ preventScroll: true }),\n openFilePicker: () => openFilePicker(),\n }),\n [openFilePicker],\n );\n\n // Click-to-focus: focus textarea when clicking non-interactive areas inside the container\n const handleContainerPointerDown = React.useCallback(\n (event: React.PointerEvent) => {\n if (disabled) return;\n if (event.pointerType === 'mouse' && event.button !== 0) return;\n const target = event.target;\n if (target instanceof Element && target.closest('button, [role=\"button\"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex=\"-1\"])')) return;\n event.preventDefault();\n textareaRef.current?.focus({ preventScroll: true });\n },\n [disabled],\n );\n\n const contextValue = React.useMemo<ChatbarContextValue>(\n () => ({\n open,\n setOpen,\n setValue,\n size,\n expandOn,\n minLines,\n maxLines,\n sendMode,\n disabled,\n readOnly,\n paste,\n clearOnSubmit,\n multiple,\n textareaRef,\n attachments,\n removeAttachment,\n submit,\n appendFiles,\n appendFilesFromPaste,\n openFilePicker,\n beginFilePickerPress,\n }),\n [\n open, setOpen, setValue, size, expandOn, minLines, maxLines, sendMode, disabled, readOnly, paste,\n clearOnSubmit, multiple, attachments, removeAttachment, submit, appendFiles, appendFilesFromPaste,\n openFilePicker, beginFilePickerPress,\n ],\n );\n\n return (\n <ChatbarContext.Provider value={contextValue}>\n <ChatbarValueContext.Provider value={value}>\n <LazyMotion features={domAnimation}>\n <MotionConfig reducedMotion=\"user\">\n <div\n {...divProps}\n ref={composedRootRef}\n className={classNames('rt-ChatbarRoot', `rt-r-size-${size}`, className)}\n style={{ position: 'relative', width, maxWidth, ...style }}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n data-readonly={readOnly ? '' : undefined}\n data-drop-active={dragActive ? '' : undefined}\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={effectiveMaterial}\n data-material={effectiveMaterial}\n onBlurCapture={handleBlurCapture}\n >\n <input\n ref={fileInputRef}\n type=\"file\"\n tabIndex={-1}\n aria-hidden\n style={{ display: 'none' }}\n onChange={handleFileInputChange}\n />\n <div {...(dropzone ? getRootProps() : {})} style={{ width: '100%', height: '100%' }} onPointerDown={handleContainerPointerDown}>\n <m.div\n className={classNames('rt-ChatbarBox', `rt-variant-${variant ?? 'surface'}`)}\n style={{ position: 'relative' }}\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={effectiveMaterial}\n data-material={effectiveMaterial}\n layout\n transition={LAYOUT_TRANSITION}\n >\n <m.div className=\"rt-ChatbarGrid\" layout=\"position\" transition={LAYOUT_TRANSITION}>\n {children}\n </m.div>\n {dragActive && (\n <div className=\"rt-ChatbarDropOverlay\" aria-hidden>\n <div className=\"rt-ChatbarDropContent\">\n <Text color=\"gray\" size={size} weight=\"medium\">\n Drop files here to attach\n </Text>\n </div>\n </div>\n )}\n </m.div>\n </div>\n <VisuallyHidden role=\"status\" aria-live=\"polite\">\n {dragActive ? 'Drop files here to attach.' : <span key={announcement.id}>{announcement.text}</span>}\n </VisuallyHidden>\n </div>\n </MotionConfig>\n </LazyMotion>\n </ChatbarValueContext.Provider>\n </ChatbarContext.Provider>\n );\n});\nRoot.displayName = 'Chatbar.Root';\n\n/**\n * Multi-line text input for Chatbar.\n * - Uses onChange to control value and avoid duplicate updates.\n * - Auto-resizes between minLines and maxLines.\n * - Expands on focus/overflow per `expandOn`.\n * - Paste-to-attach: when `paste` is enabled on Root, pasting files adds attachments.\n * - Provide `aria-label` or `aria-labelledby` for an accessible name.\n */\ninterface TextareaProps extends Omit<React.ComponentPropsWithoutRef<'textarea'>, 'size' | 'rows' | 'value' | 'defaultValue'> {\n asChild?: boolean;\n /**\n * When true, pressing Enter submits (Shift+Enter inserts a newline).\n * Works with every `sendMode`. Defaults to false.\n */\n submitOnEnter?: boolean;\n}\n\n/**\n * Chatbar multi-line text input.\n *\n * Behavior\n * - Controls the Chatbar value via React onChange.\n * - Auto-resizes between minLines and maxLines in a single layout effect, which\n * also opens the Chatbar when content overflows the compact height and\n * `expandOn` is `overflow` or `both`.\n * - Consumer handlers run first; calling `preventDefault` in `onKeyDown` or\n * `onPaste` skips the built-in submit or attach behavior.\n *\n * Accessibility\n * - Consumers should provide labeling via aria-label or aria-labelledby\n * on this component, as no implicit label is rendered.\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>((props, forwardedRef) => {\n const {\n className,\n style,\n asChild,\n onFocus,\n onChange,\n onPaste,\n onKeyDown,\n onCompositionStart,\n onCompositionEnd,\n submitOnEnter = false,\n ...textareaProps\n } = props;\n const ctx = useChatbarContext();\n const value = React.useContext(ChatbarValueContext);\n const { open, minLines, maxLines, expandOn, disabled, readOnly, setOpen, setValue, textareaRef, paste, appendFilesFromPaste, size, submit, clearOnSubmit } = ctx;\n const composedRef = useComposedRefs(forwardedRef, textareaRef);\n\n // Cached metrics to avoid repeated getComputedStyle calls\n const lineHeightRef = React.useRef(0);\n const paddingRef = React.useRef(0);\n const composingRef = React.useRef(false);\n\n const sizingRef = React.useRef({ open, minLines, maxLines });\n // Declared before the sizing effect so it runs first in the same commit\n useIsomorphicLayoutEffect(() => {\n sizingRef.current = { open, minLines, maxLines };\n }, [open, minLines, maxLines]);\n\n const recomputeMetrics = React.useCallback(() => {\n const el = textareaRef.current;\n if (!el) return;\n const computedStyle = window.getComputedStyle(el);\n lineHeightRef.current = parseFloat(computedStyle.lineHeight) || 20;\n paddingRef.current = (parseFloat(computedStyle.paddingTop) || 0) + (parseFloat(computedStyle.paddingBottom) || 0);\n }, [textareaRef]);\n\n // Sizes `el` for the given open state; caller must have set height to 'auto' first\n const applyHeight = React.useCallback((el: HTMLTextAreaElement, isOpen: boolean) => {\n const { minLines: min, maxLines: max } = sizingRef.current;\n const lineHeight = lineHeightRef.current;\n const padding = paddingRef.current;\n const minHeight = Math.ceil((isOpen ? min : 1) * lineHeight) + padding;\n const maxHeight = Math.ceil((isOpen ? max : 1) * lineHeight) + padding;\n const contentHeight = Math.max(el.scrollHeight, minHeight);\n el.style.height = `${Math.min(contentHeight, maxHeight)}px`;\n const overflowing = contentHeight > maxHeight;\n el.style.overflowY = overflowing ? 'auto' : 'hidden';\n el.style.maxHeight = overflowing ? `${maxHeight}px` : 'none';\n }, []);\n\n // Typography depends on size\n useIsomorphicLayoutEffect(() => {\n recomputeMetrics();\n }, [recomputeMetrics, size]);\n\n // Single place for sizing and overflow auto-open: one height reset, one scrollHeight read\n useIsomorphicLayoutEffect(() => {\n const el = textareaRef.current;\n if (!el) return;\n if (lineHeightRef.current === 0) recomputeMetrics();\n el.style.height = 'auto';\n let isOpen = open;\n if (!open && (expandOn === 'overflow' || expandOn === 'both')) {\n const compactHeight = Math.ceil(lineHeightRef.current) + paddingRef.current;\n if (el.scrollHeight > compactHeight + 1) {\n isOpen = true;\n setOpen(true);\n }\n }\n applyHeight(el, isOpen);\n }, [value, open, expandOn, minLines, maxLines, size, setOpen, textareaRef, recomputeMetrics, applyHeight]);\n\n // Width changes re-wrap text; re-measure only when the width actually changes\n React.useEffect(() => {\n const el = textareaRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return;\n let prevWidth = -1;\n const ro = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width === prevWidth) return;\n const first = prevWidth === -1;\n prevWidth = width;\n if (first) return;\n recomputeMetrics();\n el.style.height = 'auto';\n applyHeight(el, sizingRef.current.open);\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, [textareaRef, recomputeMetrics, applyHeight]);\n\n // Dev-only warning if no accessible name is provided\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n const hasLabel = textareaProps['aria-label'] != null || textareaProps['aria-labelledby'] != null;\n if (!hasLabel) {\n console.warn('[Chatbar.Textarea] Provide aria-label or aria-labelledby to ensure the control has an accessible name.');\n }\n // warn only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleFocus = React.useCallback<React.FocusEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onFocus?.(event);\n if (disabled || readOnly) return;\n if ((expandOn === 'focus' || expandOn === 'both') && !open) setOpen(true);\n },\n [disabled, readOnly, expandOn, open, setOpen, onFocus],\n );\n\n const handleChange = React.useCallback<React.ChangeEventHandler<HTMLTextAreaElement>>(\n (event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n },\n [setValue, onChange],\n );\n\n const handlePaste = React.useCallback<React.ClipboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onPaste?.(event);\n if (event.defaultPrevented || !paste || disabled || readOnly) return;\n const files = Array.from(event.clipboardData?.items ?? [])\n .filter((item) => item.kind === 'file')\n .map((item) => item.getAsFile())\n .filter((f): f is File => !!f);\n if (files.length === 0) return;\n // Suppress the filename/text representation only when a file was actually attached\n if (appendFilesFromPaste(files) > 0) event.preventDefault();\n },\n [paste, disabled, readOnly, onPaste, appendFilesFromPaste],\n );\n\n const handleCompositionStart = React.useCallback<React.CompositionEventHandler<HTMLTextAreaElement>>(\n (event) => {\n composingRef.current = true;\n onCompositionStart?.(event);\n },\n [onCompositionStart],\n );\n\n const handleCompositionEnd = React.useCallback<React.CompositionEventHandler<HTMLTextAreaElement>>(\n (event) => {\n composingRef.current = false;\n onCompositionEnd?.(event);\n },\n [onCompositionEnd],\n );\n\n const handleKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || !submitOnEnter) return;\n if (event.key !== 'Enter' || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;\n // Safari fires the IME-confirming Enter after compositionend with keyCode 229\n if (composingRef.current || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n // Plain Enter never inserts a newline when submitOnEnter is on, even with nothing to send\n event.preventDefault();\n submit(clearOnSubmit);\n },\n [submitOnEnter, onKeyDown, submit, clearOnSubmit],\n );\n\n const Comp = asChild ? Slot : 'textarea';\n return (\n <m.div className={classNames('rt-ChatbarField', 'rt-ChatbarTextarea', className)} layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp\n {...textareaProps}\n ref={composedRef}\n className=\"rt-ChatbarInput\"\n value={value}\n onChange={handleChange}\n onFocus={handleFocus}\n onPaste={handlePaste}\n onKeyDown={handleKeyDown}\n onCompositionStart={handleCompositionStart}\n onCompositionEnd={handleCompositionEnd}\n disabled={disabled}\n readOnly={readOnly}\n rows={open ? minLines : 1}\n spellCheck={textareaProps.spellCheck ?? true}\n autoCorrect={textareaProps.autoCorrect ?? 'on'}\n style={style}\n />\n </m.div>\n );\n});\nTextarea.displayName = 'Chatbar.Textarea';\n\ninterface InlineSlotProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst InlineStart = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarInlineStart', className)}>\n {children}\n </Comp>\n );\n});\nInlineStart.displayName = 'Chatbar.InlineStart';\n\nconst InlineEnd = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarInlineEnd', className)}>\n {children}\n </Comp>\n );\n});\nInlineEnd.displayName = 'Chatbar.InlineEnd';\n\n/**\n * Renders a horizontally scrollable list of attachments above the inline row.\n * Hidden when empty unless `forceMount`. Override per-item with `renderAttachment`.\n */\ninterface AttachmentsRowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n forceMount?: boolean;\n /** If provided, custom-render a tile; otherwise default tile is used */\n renderAttachment?: (attachment: ChatbarAttachment) => React.ReactNode;\n}\n\nconst AttachmentsRow = React.forwardRef<HTMLDivElement, AttachmentsRowProps>((props, forwardedRef) => {\n const { asChild, forceMount, renderAttachment, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.attachments.length === 0 && !forceMount) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <m.div layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarAttachmentsRow', className)} role=\"list\" aria-label={divProps['aria-label'] ?? 'Attachments'}>\n <ScrollArea className=\"rt-ChatbarScrollArea\" scrollbars=\"horizontal\" size=\"1\">\n <Flex align=\"center\" gap=\"2\" minWidth=\"fit-content\">\n {ctx.attachments.map((att) => (\n <Attachment key={att.id} attachment={att} asChild={!!renderAttachment}>\n {renderAttachment?.(att)}\n </Attachment>\n ))}\n </Flex>\n </ScrollArea>\n </Comp>\n </m.div>\n );\n});\nAttachmentsRow.displayName = 'Chatbar.AttachmentsRow';\n\n/** Default tile renderer for a single attachment. */\ninterface AttachmentProps extends React.ComponentPropsWithoutRef<'div'> {\n attachment: ChatbarAttachment;\n asChild?: boolean;\n}\n\nconst STATUS_LABEL: Partial<Record<AttachmentStatus, string>> = { uploading: 'uploading', error: 'failed to upload' };\n\nconst Attachment = React.forwardRef<HTMLDivElement, AttachmentProps>((props, forwardedRef) => {\n const { attachment, asChild, className, children, ...divProps } = props;\n const ctx = useChatbarContext();\n const Comp = asChild ? Slot : 'div';\n const isImage = !!attachment.url && isImageLike(attachment.name, attachment.type);\n const sizeLabel = `${Math.ceil(attachment.size / 1024)} KB`;\n const statusLabel = attachment.status ? STATUS_LABEL[attachment.status] : undefined;\n const locked = ctx.disabled || ctx.readOnly;\n\n const handleRemove = (event: React.MouseEvent<HTMLButtonElement>) => {\n // Move focus before the tile unmounts so keyboard users are not dropped to <body>\n const tile = event.currentTarget.closest('[role=\"listitem\"]');\n const tiles = tile?.parentElement ? Array.from(tile.parentElement.children) : [];\n const index = tile ? tiles.indexOf(tile) : -1;\n const neighbour = tiles[index + 1] ?? tiles[index - 1];\n const nextButton = neighbour?.querySelector<HTMLButtonElement>('.rt-ChatbarAttachmentRemove');\n if (nextButton) nextButton.focus();\n else ctx.textareaRef.current?.focus({ preventScroll: true });\n ctx.removeAttachment(attachment.id);\n };\n\n return (\n <Comp\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarAttachment', className)}\n role=\"listitem\"\n data-kind={isImage ? 'image' : 'file'}\n data-status={attachment.status}\n title={attachment.name}\n >\n {children ?? (\n <Flex align=\"center\" gap=\"2\" pr={!isImage ? '6' : undefined}>\n <div className=\"rt-ChatbarAttachmentPreview\" aria-hidden>\n {isImage ? <img className=\"rt-ChatbarAttachmentImage\" src={attachment.url} alt=\"\" /> : <FileTextIcon />}\n </div>\n {isImage ? (\n <VisuallyHidden>\n {attachment.name}, {sizeLabel}\n {statusLabel ? `, ${statusLabel}` : ''}\n </VisuallyHidden>\n ) : (\n <Flex direction=\"column\" gap=\"0\" minWidth=\"0\">\n <Text size={ctx.size} weight=\"medium\" truncate>\n {attachment.name}\n </Text>\n <Text size=\"1\" color={attachment.status === 'error' ? 'red' : 'gray'}>\n {sizeLabel}\n {statusLabel ? ` \u00B7 ${statusLabel}` : ''}\n </Text>\n </Flex>\n )}\n {!locked && (\n <IconButton\n className=\"rt-ChatbarAttachmentRemove\"\n aria-label={`Remove ${attachment.name}`}\n size=\"1\"\n variant=\"classic\"\n highContrast\n color=\"gray\"\n onClick={handleRemove}\n >\n <CloseIcon />\n </IconButton>\n )}\n </Flex>\n )}\n </Comp>\n );\n});\nAttachment.displayName = 'Chatbar.Attachment';\n\ninterface AttachTriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n /** Overrides Root `accept` for files chosen through this trigger */\n accept?: string | string[];\n multiple?: boolean;\n}\n\nconst AttachTrigger = React.forwardRef<HTMLButtonElement, AttachTriggerProps>((props, forwardedRef) => {\n const { asChild, accept, multiple, disabled: disabledProp, onPointerDown, onClick, ...buttonProps } = props;\n const ctx = useChatbarContext();\n const disabled = disabledProp || ctx.disabled || ctx.readOnly;\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n {...buttonProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarAttachTrigger', buttonProps.className)}\n type={buttonProps.type ?? 'button'}\n aria-label={buttonProps['aria-label'] ?? 'Add attachments'}\n disabled={disabled}\n onPointerDown={(event: React.PointerEvent<HTMLButtonElement>) => {\n onPointerDown?.(event);\n if (!disabled && !event.defaultPrevented) ctx.beginFilePickerPress();\n }}\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (disabled || event.defaultPrevented) return;\n ctx.openFilePicker({ accept, multiple });\n }}\n />\n );\n});\nAttachTrigger.displayName = 'Chatbar.AttachTrigger';\n\ninterface RowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst Row = React.forwardRef<HTMLDivElement, RowProps>((props, forwardedRef) => {\n const { asChild, children, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (!ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <m.div layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRow', className)}>\n <Flex align=\"center\" justify=\"between\" width=\"100%\">\n {children}\n </Flex>\n </Comp>\n </m.div>\n );\n});\nRow.displayName = 'Chatbar.Row';\n\ntype RowSlotProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst RowStart = React.forwardRef<HTMLDivElement, RowSlotProps>((props, forwardedRef) => {\n const { className, ...divProps } = props;\n return <div {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRowStart', className)} />;\n});\nRowStart.displayName = 'Chatbar.RowStart';\n\nconst RowEnd = React.forwardRef<HTMLDivElement, RowSlotProps>((props, forwardedRef) => {\n const { className, ...divProps } = props;\n return <div {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRowEnd', className)} />;\n});\nRowEnd.displayName = 'Chatbar.RowEnd';\n\ntype SendProps = Omit<IconButtonProps, 'aria-label' | 'aria-labelledby'> & {\n /** Optional override for accessible name. Defaults to \"Send\". */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n asChild?: boolean;\n /** Clear message and attachments after sending. Defaults to Root `clearOnSubmit`. */\n clearOnSend?: boolean;\n};\n\nconst Send = React.forwardRef<HTMLButtonElement, SendProps>((props, forwardedRef) => {\n const {\n asChild,\n clearOnSend,\n disabled,\n children,\n style,\n className,\n size: sizeProp,\n variant: variantProp,\n tabIndex,\n onClick,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...buttonProps\n } = props;\n const ctx = useChatbarContext();\n const value = React.useContext(ChatbarValueContext);\n\n if (ctx.sendMode === 'never') return null;\n\n const hasContent = hasText(value) || ctx.attachments.length > 0;\n const visible = ctx.sendMode === 'always' || hasContent;\n const inactive = disabled || ctx.disabled || ctx.readOnly || !hasContent;\n\n const labelProps: { 'aria-label': string } | { 'aria-labelledby': string } = ariaLabelledby\n ? { 'aria-labelledby': ariaLabelledby }\n : { 'aria-label': ariaLabel ?? 'Send' };\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented || inactive) return;\n const clear = clearOnSend ?? ctx.clearOnSubmit;\n // Clearing hides and disables this button; keep keyboard focus in the composer\n if (ctx.submit(clear) && clear) ctx.textareaRef.current?.focus({ preventScroll: true });\n };\n\n return (\n <IconButton\n {...buttonProps}\n ref={forwardedRef}\n size={sizeProp ?? ctx.size}\n variant={variantProp ?? (ctx.open ? 'solid' : 'ghost')}\n disabled={inactive}\n className={classNames('rt-ChatbarSend', className)}\n style={{ opacity: visible ? 1 : 0, pointerEvents: visible ? undefined : 'none', ...style }}\n // Hidden Send must not be reachable by keyboard or announced\n aria-hidden={visible ? undefined : true}\n tabIndex={visible ? tabIndex : -1}\n asChild={asChild}\n onClick={handleClick}\n {...labelProps}\n >\n {children ?? (\n <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>\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n )}\n </IconButton>\n );\n});\nSend.displayName = 'Chatbar.Send';\n\nexport { Root, Textarea, InlineStart, InlineEnd, AttachmentsRow, Attachment, AttachTrigger, Row, RowStart, RowEnd, Send };\nexport type {\n RootProps as ChatbarRootProps,\n TextareaProps as ChatbarTextareaProps,\n InlineSlotProps as ChatbarInlineSlotProps,\n AttachmentsRowProps as ChatbarAttachmentsRowProps,\n AttachmentProps as ChatbarAttachmentProps,\n AttachTriggerProps as ChatbarAttachTriggerProps,\n RowProps as ChatbarRowProps,\n RowSlotProps as ChatbarRowSlotProps,\n SendProps as ChatbarSendProps,\n ChatbarAttachment,\n ChatbarAttachmentRejection,\n ChatbarRejectReason,\n ChatbarSubmitPayload,\n AttachmentStatus as ChatbarAttachmentStatus,\n ExpandOn as ChatbarExpandOn,\n SendMode as ChatbarSendMode,\n};\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport { Tooltip } from './tooltip.js';\nimport { useTooltipWrapper } from '../hooks/use-tooltip-wrapper.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Required accessibility props for icon buttons\n * Icon buttons must have an accessible name to meet WCAG guidelines\n *\n * Three ways to provide accessibility:\n * 1. aria-label: Direct descriptive text\n * 2. aria-labelledby: Reference to a label element\n * 3. children: Visible text content (fallback)\n */\ntype AccessibilityProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string }\n | { 'aria-label'?: never; 'aria-labelledby'?: never; children: React.ReactNode };\n\n/**\n * Tooltip configuration props that can be passed to IconButton\n * These props are forwarded to the underlying Tooltip component\n */\ninterface IconButtonTooltipProps {\n /** Content to display in the tooltip on hover/focus */\n tooltip?: React.ReactNode;\n /** Side of the button where the tooltip should appear */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n /** Alignment of the tooltip relative to the button */\n tooltipAlign?: 'start' | 'center' | 'end';\n /** Delay before showing the tooltip (in milliseconds) */\n tooltipDelayDuration?: number;\n /** Whether to disable hoverable content behavior */\n tooltipDisableHoverableContent?: boolean;\n}\n\n/**\n * Core IconButton props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with accessibility requirements and tooltip functionality\n */\ntype IconButtonOwnProps = Omit<BaseButtonProps, 'as'> & AccessibilityProps & IconButtonTooltipProps;\n\n/**\n * Polymorphic IconButton props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;\n\n/**\n * IconButton component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(props: IconButtonProps<C> & { ref?: React.ForwardedRef<IconButtonElement> }) => React.ReactElement | null;\n\n/**\n * IconButton component for compact, accessible icon-only interactions\n *\n * The IconButton component extends Button with specialized behavior for visual symbols.\n * It enforces accessibility requirements, provides automatic square sizing, and includes\n * built-in tooltip integration. Icon buttons are essential for space-efficient interfaces\n * while maintaining accessibility compliance.\n *\n * Key features:\n * - Enforced accessibility requirements (aria-label, aria-labelledby, or children)\n * - Automatic square aspect ratios for consistent visual alignment\n * - Built-in tooltip support for context and guidance\n * - Same variant and size system as Button for consistency\n * - Runtime validation for accessibility compliance\n *\n * @example\n * ```tsx\n * // Basic icon button with aria-label\n * <IconButton aria-label=\"Settings\">\n * <Settings />\n * </IconButton>\n *\n * // Icon button with tooltip\n * <IconButton aria-label=\"Save\" tooltip=\"Save your progress\">\n * <Save />\n * </IconButton>\n *\n * // Icon button with aria-labelledby\n * <IconButton aria-labelledby=\"settings-label\">\n * <Settings />\n * </IconButton>\n * <span id=\"settings-label\">Open settings panel</span>\n *\n * // Icon button with visible text (fallback)\n * <IconButton>\n * <Settings />\n * Settings\n * </IconButton>\n * ```\n */\nconst IconButton = React.forwardRef(\n (\n { className, tooltip, tooltipSide = 'top', tooltipAlign = 'center', tooltipDelayDuration, tooltipDisableHoverableContent, ...props }: IconButtonProps,\n forwardedRef: React.ForwardedRef<IconButtonElement>,\n ) => {\n // Use shared tooltip wrapper hook for accessibility props\n const { tooltipId, hasTooltip, accessibilityProps: tooltipAccessibilityProps } = useTooltipWrapper(tooltip);\n\n // Runtime accessibility validation to ensure WCAG compliance\n // This helps catch accessibility issues during development\n const hasAriaLabel = 'aria-label' in props && props['aria-label'];\n const hasAriaLabelledBy = 'aria-labelledby' in props && props['aria-labelledby'];\n const hasChildren = 'children' in props && props.children;\n\n // Validate accessible name - throw in development, log error in production\n if (!hasAriaLabel && !hasAriaLabelledBy && !hasChildren) {\n const errorMessage =\n 'IconButton: Icon buttons must have an accessible name. Please provide either:' +\n '\\n- aria-label prop with descriptive text' +\n '\\n- aria-labelledby prop referencing a label element' +\n '\\n- or visible text children';\n\n if (process.env.NODE_ENV === 'development') {\n throw new Error(errorMessage);\n } else {\n console.error(errorMessage);\n }\n }\n\n // Create the base icon button element with accessibility props\n const iconButton = <BaseButton {...props} {...tooltipAccessibilityProps} ref={forwardedRef} className={classNames('rt-IconButton', className)} />;\n\n // If no tooltip is provided, return the icon button as-is for better performance\n if (!hasTooltip) {\n return iconButton;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n // This creates a compound component that handles both button and tooltip functionality\n return (\n <Tooltip content={tooltip} side={tooltipSide} align={tooltipAlign} delayDuration={tooltipDelayDuration} disableHoverableContent={tooltipDisableHoverableContent} id={tooltipId}>\n {iconButton}\n </Tooltip>\n );\n },\n) as IconButtonComponent & { displayName?: string };\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton };\nexport type { IconButtonProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { useDeprecatedPanelBackgroundWarning } from '../../helpers/use-deprecation-warning.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\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\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n/**\n * Polymorphic BaseButton props that support rendering as different HTML elements\n * Uses the proper ComponentPropsWithout pattern for type safety\n * @template C - The element type to render as (defaults to 'button')\n */\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\n/**\n * BaseButton props interface that combines all available props\n */\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\n/**\n * BaseButton component that provides the core button functionality\n *\n * This is the foundational button component that handles all the complex logic\n * including loading states, accessibility, performance optimizations, and\n * polymorphic rendering. It's used by Button, IconButton, and other button\n * variants to ensure consistent behavior across the design system.\n *\n * Key features:\n * - Loading state with spinner and accessibility announcements\n * - Performance optimizations for backdrop-filter effects\n * - Comprehensive accessibility support\n * - Polymorphic rendering support\n * - Material/panel background handling\n *\n * @example\n * ```tsx\n * // Basic usage\n * <BaseButton>Click me</BaseButton>\n *\n * // With loading state\n * <BaseButton loading>Processing...</BaseButton>\n *\n * // Polymorphic rendering\n * <BaseButton as=\"a\" href=\"/link\">Link Button</BaseButton>\n * ```\n */\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n\n // Extract button-specific props from the combined props object\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n material,\n panelBackground,\n flush,\n disabled = props.loading, // Loading state automatically disables the button\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n useDeprecatedPanelBackgroundWarning(props.panelBackground);\n\n // Material takes precedence over panelBackground for backward compatibility\n const effectiveMaterial = material ?? panelBackground;\n\n // asChild takes precedence over as prop for Radix Slot integration\n // When asChild is true, we use Slot.Root to merge props onto the child element\n // When asChild is false, we render as the specified element (or button by default)\n const Comp = asChild ? Slot.Root : (as || 'button');\n\n // Only pass disabled for elements that support it\n // This prevents invalid HTML attributes on unsupported elements\n const shouldPassDisabled = asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Determine if we are rendering a real <button> element so we can set a safe\n // default type. Native <button> defaults to type=\"submit\" which can cause\n // accidental form submissions. We default to type=\"button\" unless the user\n // explicitly provided a type or we're using asChild (unknown underlying node).\n const isNativeButtonElement = !asChild && (!as || as === 'button');\n const hasExplicitTypeAttribute = 'type' in (baseButtonProps as Record<string, unknown>);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = props.loading ? `${loadingId}-loading` : undefined;\n\n // Extract button text for accessibility announcements\n const buttonText = React.useMemo(() => {\n if (typeof children === 'string') return children;\n if (React.isValidElement(children) && typeof (children.props as any)?.children === 'string') {\n return (children.props as any).children;\n }\n return 'button';\n }, [children]);\n\n // Enhanced accessibility props for loading state\n // These ensure screen readers announce the loading state properly\n const accessibilityProps = React.useMemo(() => {\n if (props.loading) {\n return {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': describedById,\n 'aria-label': `${buttonText} (loading)`,\n };\n }\n return {};\n }, [props.loading, describedById, buttonText]);\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n data-material={effectiveMaterial}\n data-panel-background={effectiveMaterial}\n data-flush={flush ? 'true' : undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n {...(isNativeButtonElement && !hasExplicitTypeAttribute ? { type: 'button' } : {})}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n\n {/* Enhanced accessibility for loading state */}\n <VisuallyHidden>\n <span id={describedById}>{buttonText} is loading, please wait...</span>\n {children}\n </VisuallyHidden>\n\n {/* Centered spinner overlay during loading state */}\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)} aria-hidden=\"true\" />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Defines accent color for descendant text components\u00A0with `highContrast={true}`.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst highContrastPropDef = {\n highContrast: {\n type: 'boolean',\n className: 'rt-high-contrast',\n default: undefined,\n },\n} satisfies {\n highContrast: PropDef<boolean>;\n};\n\nexport { highContrastPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 24px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - classic: Premium, sophisticated appearance\n * - solid: Primary actions that should be noticed first\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost', 'override'] as const;\n\n/**\n * Available panel background options (deprecated)\n * @deprecated Use `materials` instead\n */\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\n/**\n * Available material options for visual rendering\n * - solid: Opaque backgrounds and borders\n * - translucent: Elevated effects with depth and visual separation\n */\nconst materials = ['solid', 'translucent'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button, IconButton, etc.)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Material system for visual depth and elevation\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * \n * // Button with material and high contrast\n * <BaseButton material=\"translucent\" highContrast>Elevated Button</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n */\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { Slot } from './slot.js';\nimport { flexPropDefs } from './flex.props.js';\n\nimport type { FlexOwnProps } from './flex.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\n\ntype FlexElement = React.ElementRef<'div'>;\ninterface CommonFlexProps extends MarginProps, LayoutProps, FlexOwnProps {}\ntype FlexDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype FlexSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype FlexProps = CommonFlexProps & (FlexSpanProps | FlexDivProps);\n\nconst Flex = React.forwardRef<FlexElement, FlexProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...flexProps\n } = extractProps(props, flexPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...flexProps} ref={forwardedRef} className={classNames('rt-Flex', className)} />;\n});\nFlex.displayName = 'Flex';\n\nexport { Flex };\nexport type { FlexProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst paddingValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst paddingPropDefs = {\n /**\n * Sets the CSS **padding** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * p=\"4\"\n * p=\"100px\"\n * p={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n */\n p: {\n type: 'enum | string',\n className: 'rt-r-p',\n customProperties: ['--p'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** and **padding-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * px=\"4\"\n * px=\"100px\"\n * px={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n px: {\n type: 'enum | string',\n className: 'rt-r-px',\n customProperties: ['--pl', '--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** and **padding-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * py=\"4\"\n * py=\"100px\"\n * py={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n py: {\n type: 'enum | string',\n className: 'rt-r-py',\n customProperties: ['--pt', '--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pt=\"4\"\n * pt=\"100px\"\n * pt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n */\n pt: {\n type: 'enum | string',\n className: 'rt-r-pt',\n customProperties: ['--pt'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pr=\"4\"\n * pr=\"100px\"\n * pr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n pr: {\n type: 'enum | string',\n className: 'rt-r-pr',\n customProperties: ['--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pb=\"4\"\n * pb=\"100px\"\n * pb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n pb: {\n type: 'enum | string',\n className: 'rt-r-pb',\n customProperties: ['--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pl=\"4\"\n * pl=\"100px\"\n * pl={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n */\n pl: {\n type: 'enum | string',\n className: 'rt-r-pl',\n customProperties: ['--pl'],\n values: paddingValues,\n responsive: true,\n },\n} satisfies {\n p: PropDef<(typeof paddingValues)[number]>;\n px: PropDef<(typeof paddingValues)[number]>;\n py: PropDef<(typeof paddingValues)[number]>;\n pt: PropDef<(typeof paddingValues)[number]>;\n pr: PropDef<(typeof paddingValues)[number]>;\n pb: PropDef<(typeof paddingValues)[number]>;\n pl: PropDef<(typeof paddingValues)[number]>;\n};\n\ntype PaddingProps = GetPropDefTypes<typeof paddingPropDefs>;\n\nexport { paddingPropDefs };\nexport type { PaddingProps };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst heightPropDefs = {\n /**\n * Sets the CSS **height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * height=\"100px\"\n * height={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/height\n */\n height: {\n type: 'string',\n className: 'rt-r-h',\n customProperties: ['--height'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minHeight=\"100px\"\n * minHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\n */\n minHeight: {\n type: 'string',\n className: 'rt-r-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxHeight=\"100px\"\n * maxHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\n */\n maxHeight: {\n type: 'string',\n className: 'rt-r-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst widthPropDefs = {\n /**\n * Sets the CSS **width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * width=\"100px\"\n * width={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/width\n */\n width: {\n type: 'string',\n className: 'rt-r-w',\n customProperties: ['--width'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minWidth=\"100px\"\n * minWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\n */\n minWidth: {\n type: 'string',\n className: 'rt-r-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxWidth=\"100px\"\n * maxWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n */\n maxWidth: {\n type: 'string',\n className: 'rt-r-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n", "import { paddingPropDefs } from './padding.props.js';\nimport { heightPropDefs } from './height.props.js';\nimport { widthPropDefs } from './width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst overflowValues = ['visible', 'hidden', 'clip', 'scroll', 'auto'] as const;\nconst positionValues = ['static', 'relative', 'absolute', 'fixed', 'sticky'] as const;\n// prettier-ignore\nconst positionEdgeValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9'] as const;\nconst flexShrinkValues = ['0', '1'] as const;\nconst flexGrowValues = ['0', '1'] as const;\nconst alignSelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifySelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\n\nconst layoutPropDefs = {\n ...paddingPropDefs,\n ...widthPropDefs,\n ...heightPropDefs,\n /**\n * Sets the CSS **position** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * position=\"absolute\"\n * position={{ sm: 'absolute', lg: 'sticky' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/position\n */\n position: {\n type: 'enum',\n className: 'rt-r-position',\n values: positionValues,\n responsive: true,\n },\n /**\n * Sets the CSS **inset** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * inset=\"4\"\n * inset=\"100px\"\n * inset={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/inset\n */\n inset: {\n type: 'enum | string',\n className: 'rt-r-inset',\n customProperties: ['--inset'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * top=\"4\"\n * top=\"100px\"\n * top={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/top\n */\n top: {\n type: 'enum | string',\n className: 'rt-r-top',\n customProperties: ['--top'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * right=\"4\"\n * right=\"100px\"\n * right={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/right\n */\n right: {\n type: 'enum | string',\n className: 'rt-r-right',\n customProperties: ['--right'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * bottom=\"4\"\n * bottom=\"100px\"\n * bottom={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/bottom\n */\n bottom: {\n type: 'enum | string',\n className: 'rt-r-bottom',\n customProperties: ['--bottom'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * left=\"4\"\n * left=\"100px\"\n * left={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/left\n */\n left: {\n type: 'enum | string',\n className: 'rt-r-left',\n customProperties: ['--left'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflow=\"hidden\"\n * overflow={{ sm: 'hidden', lg: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflow: {\n type: 'enum',\n className: 'rt-r-overflow',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-x** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowX=\"hidden\"\n * overflowX={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowX: {\n type: 'enum',\n className: 'rt-r-ox',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-y** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowY=\"hidden\"\n * overflowY={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowY: {\n type: 'enum',\n className: 'rt-r-oy',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-basis** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexBasis=\"0\"\n * flexBasis=\"100%\"\n * flexBasis={{ sm: '200px', lg: 'auto' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis\n */\n flexBasis: {\n type: 'string',\n className: 'rt-r-fb',\n customProperties: ['--flex-basis'],\n responsive: true,\n },\n /**\n * Sets the CSS **flex-shrink** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexShrink=\"0\"\n * flexShrink=\"1\"\n * flexShrink={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink\n */\n flexShrink: {\n type: 'enum | string',\n className: 'rt-r-fs',\n customProperties: ['--flex-shrink'],\n values: flexShrinkValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-grow** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexGrow=\"0\"\n * flexGrow=\"1\"\n * flexGrow={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow\n */\n flexGrow: {\n type: 'enum | string',\n className: 'rt-r-fg',\n customProperties: ['--flex-grow'],\n values: flexGrowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-area** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridArea=\"header\"\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area\n */\n gridArea: {\n type: 'string',\n className: 'rt-r-ga',\n customProperties: ['--grid-area'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumn=\"1\"\n * gridColumn=\"1 / -1\"\n * gridColumn={{ sm: '1 / 3', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column\n */\n gridColumn: {\n type: 'string',\n className: 'rt-r-gc',\n customProperties: ['--grid-column'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnStart=\"1\"\n * gridColumnStart=\"auto\"\n * gridColumnStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start\n */\n gridColumnStart: {\n type: 'string',\n className: 'rt-r-gcs',\n customProperties: ['--grid-column-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnEnd=\"1\"\n * gridColumnEnd=\"auto\"\n * gridColumnEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end\n */\n gridColumnEnd: {\n type: 'string',\n className: 'rt-r-gce',\n customProperties: ['--grid-column-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRow=\"1\"\n * gridRow=\"auto\"\n * gridRow={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row\n */\n gridRow: {\n type: 'string',\n className: 'rt-r-gr',\n customProperties: ['--grid-row'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowStart=\"1\"\n * gridRowStart=\"auto\"\n * gridRowStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start\n */\n gridRowStart: {\n type: 'string',\n className: 'rt-r-grs',\n customProperties: ['--grid-row-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowEnd=\"1\"\n * gridRowEnd=\"auto\"\n * gridRowEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end\n */\n gridRowEnd: {\n type: 'string',\n className: 'rt-r-gre',\n customProperties: ['--grid-row-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **align-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * alignSelf=\"center\"\n * alignSelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-self\n */\n alignSelf: {\n type: 'enum',\n className: 'rt-r-as',\n values: alignSelfValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justifySelf=\"center\"\n * justifySelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self\n */\n justifySelf: {\n type: 'enum',\n className: 'rt-r-js',\n values: justifySelfValues,\n responsive: true,\n },\n} satisfies {\n position: PropDef<(typeof positionValues)[number]>;\n inset: PropDef<(typeof positionEdgeValues)[number]>;\n top: PropDef<(typeof positionEdgeValues)[number]>;\n right: PropDef<(typeof positionEdgeValues)[number]>;\n bottom: PropDef<(typeof positionEdgeValues)[number]>;\n left: PropDef<(typeof positionEdgeValues)[number]>;\n overflow: PropDef<(typeof overflowValues)[number]>;\n overflowX: PropDef<(typeof overflowValues)[number]>;\n overflowY: PropDef<(typeof overflowValues)[number]>;\n flexBasis: PropDef<string>;\n flexShrink: PropDef<(typeof flexShrinkValues)[number]>;\n flexGrow: PropDef<(typeof flexGrowValues)[number]>;\n gridColumn: PropDef<string>;\n gridColumnStart: PropDef<string>;\n gridColumnEnd: PropDef<string>;\n gridRow: PropDef<string>;\n gridRowStart: PropDef<string>;\n gridRowEnd: PropDef<string>;\n gridArea: PropDef<string>;\n alignSelf: PropDef<(typeof alignSelfValues)[number]>;\n justifySelf: PropDef<(typeof justifySelfValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype LayoutProps = GetPropDefTypes<\n typeof paddingPropDefs & typeof widthPropDefs & typeof heightPropDefs & typeof layoutPropDefs\n>;\n\nexport { layoutPropDefs };\nexport type { LayoutProps };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\n// prettier-ignore\nconst marginValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10', '-11', '-12'] as const;\n\nconst marginPropDefs = {\n /**\n * Sets the CSS **margin** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * m=\"4\"\n * m=\"100px\"\n * m={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n */\n m: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-m',\n customProperties: ['--m'],\n },\n /**\n * Sets the CSS **margin-left** and **margin-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mx=\"4\"\n * mx=\"100px\"\n * mx={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mx: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mx',\n customProperties: ['--ml', '--mr'],\n },\n /**\n * Sets the CSS **margin-top** and **margin-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * my=\"4\"\n * my=\"100px\"\n * my={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n my: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-my',\n customProperties: ['--mt', '--mb'],\n },\n /**\n * Sets the CSS **margin-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mt=\"4\"\n * mt=\"100px\"\n * mt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n */\n mt: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mt',\n customProperties: ['--mt'],\n },\n /**\n * Sets the CSS **margin-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mr=\"4\"\n * mr=\"100px\"\n * mr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mr: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mr',\n customProperties: ['--mr'],\n },\n /**\n * Sets the CSS **margin-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mb=\"4\"\n * mb=\"100px\"\n * mb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n mb: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mb',\n customProperties: ['--mb'],\n },\n /**\n * Sets the CSS **margin-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * ml=\"4\"\n * ml=\"100px\"\n * ml={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n */\n ml: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-ml',\n customProperties: ['--ml'],\n },\n} satisfies {\n m: PropDef<(typeof marginValues)[number]>;\n mx: PropDef<(typeof marginValues)[number]>;\n my: PropDef<(typeof marginValues)[number]>;\n mt: PropDef<(typeof marginValues)[number]>;\n mr: PropDef<(typeof marginValues)[number]>;\n mb: PropDef<(typeof marginValues)[number]>;\n ml: PropDef<(typeof marginValues)[number]>;\n};\n\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n", "import { Slot as SlotPrimitive } from 'radix-ui';\nexport const Root = SlotPrimitive.Root;\nexport const Slot = SlotPrimitive.Root;\nexport const Slottable: typeof SlotPrimitive.Slottable = SlotPrimitive.Slottable;\n", "import type { PropDef } from './prop-def.js';\n\nconst gapValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst gapPropDefs = {\n /**\n * Sets the CSS **gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gap=\"4\"\n * gap=\"20px\"\n * gap={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/gap\n */\n gap: {\n type: 'enum | string',\n className: 'rt-r-gap',\n customProperties: ['--gap'],\n values: gapValues,\n responsive: true,\n },\n /**\n * Sets the CSS **row-gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gapX=\"4\"\n * gapX=\"20px\"\n * gapX={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap\n */\n gapX: {\n type: 'enum | string',\n className: 'rt-r-cg',\n customProperties: ['--column-gap'],\n values: gapValues,\n responsive: true,\n },\n /**\n * Sets the CSS **column-gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gapY=\"4\"\n * gapY=\"20px\"\n * gapY={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap\n */\n gapY: {\n type: 'enum | string',\n className: 'rt-r-rg',\n customProperties: ['--row-gap'],\n values: gapValues,\n responsive: true,\n },\n} satisfies {\n gap: PropDef<(typeof gapValues)[number]>;\n gapX: PropDef<(typeof gapValues)[number]>;\n gapY: PropDef<(typeof gapValues)[number]>;\n};\n\nexport { gapPropDefs };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { gapPropDefs } from '../props/gap.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline-flex', 'flex'] as const;\nconst directionValues = ['row', 'column', 'row-reverse', 'column-reverse'] as const;\nconst alignValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifyValues = ['start', 'center', 'end', 'between'] as const;\nconst wrapValues = ['nowrap', 'wrap', 'wrap-reverse'] as const;\n\nconst flexPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-flex\"\n * display={{ sm: 'none', lg: 'flex' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'rt-r-display',\n values: displayValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-direction** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * direction=\"column\"\n * direction={{ sm: 'column', lg: 'row' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction\n */\n direction: {\n type: 'enum',\n className: 'rt-r-fd',\n values: directionValues,\n responsive: true,\n },\n /**\n * Sets the CSS **align-items** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * align=\"center\"\n * align={{ sm: 'baseline', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-items\n */\n align: {\n type: 'enum',\n className: 'rt-r-ai',\n values: alignValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-content** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justify=\"between\"\n * justify={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content\n */\n justify: {\n type: 'enum',\n className: 'rt-r-jc',\n values: justifyValues,\n parseValue: parseJustifyValue,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-wrap** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * wrap=\"wrap\"\n * wrap={{ sm: 'wrap', lg: 'nowrap' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap\n */\n wrap: {\n type: 'enum',\n className: 'rt-r-fw',\n values: wrapValues,\n responsive: true,\n },\n ...gapPropDefs,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n direction: PropDef<(typeof directionValues)[number]>;\n align: PropDef<(typeof alignValues)[number]>;\n justify: PropDef<(typeof justifyValues)[number]>;\n wrap: PropDef<(typeof wrapValues)[number]>;\n};\n\nfunction parseJustifyValue(value: string) {\n return value === 'between' ? 'space-between' : value;\n}\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype FlexOwnProps = GetPropDefTypes<\n typeof flexPropDefs & typeof gapPropDefs & typeof asChildPropDef\n>;\n\nexport { flexPropDefs };\nexport type { FlexOwnProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Flex } from './flex.js';\nimport { spinnerPropDefs } from './spinner.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\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\ntype SpinnerElement = React.ElementRef<'span'>;\ntype SpinnerOwnProps = GetPropDefTypes<typeof spinnerPropDefs>;\ninterface SpinnerProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n MarginProps,\n SpinnerOwnProps {}\nconst Spinner = React.forwardRef<SpinnerElement, SpinnerProps>((props, forwardedRef) => {\n const { className, children, loading, ...spinnerProps } = extractProps(\n props,\n spinnerPropDefs,\n marginPropDefs\n );\n\n if (!loading) return children;\n\n const spinner = (\n <span {...spinnerProps} ref={forwardedRef} className={classNames('rt-Spinner', className)}>\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n </span>\n );\n\n if (children === undefined) return spinner;\n\n return (\n <Flex asChild position=\"relative\" align=\"center\" justify=\"center\">\n <span>\n {/**\n * `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden`\n */}\n <span aria-hidden style={{ display: 'contents', visibility: 'hidden' }} inert={undefined}>\n {children}\n </span>\n\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>{spinner}</span>\n </Flex>\n </span>\n </Flex>\n );\n});\nSpinner.displayName = 'Spinner';\n\nexport { Spinner };\nexport type { SpinnerProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\n\nconst spinnerPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n loading: { type: 'boolean', default: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n loading: PropDef<boolean>;\n};\n\nexport { spinnerPropDefs };\n", "import { VisuallyHidden as VisuallyHiddenPrimitive } from 'radix-ui';\nexport const VisuallyHidden = VisuallyHiddenPrimitive.Root;\nexport const Root = VisuallyHiddenPrimitive.Root;\nexport type VisuallyHiddenProps = VisuallyHiddenPrimitive.VisuallyHiddenProps;\n", "import * as React from 'react';\n\nconst PANEL_BACKGROUND_MESSAGE = 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.';\n\nconst warned = new Set<string>();\n\nfunction warnOnce(message: string) {\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(message);\n}\n\n/**\n * Warns, in development only, that `panelBackground` is deprecated.\n *\n * The `process.env.NODE_ENV` check is a compile-time constant, so a production\n * bundle minifies the effect body away to an empty function instead of reading\n * props and formatting a message per mounted component. The message is also\n * logged once per session rather than once per component instance.\n */\nexport function useDeprecatedPanelBackgroundWarning(panelBackground: unknown) {\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (panelBackground !== undefined) warnOnce(PANEL_BACKGROUND_MESSAGE);\n }, [panelBackground]);\n}\n", "import type { baseButtonPropDefs } from '../components/_internal/base-button.props.js';\nimport type { calloutRootPropDefs } from '../components/callout.props.js';\nimport type { spinnerPropDefs } from '../components/spinner.props.js';\nimport type { textPropDefs } from '../components/text.props.js';\nimport type { Responsive } from '../props/prop-def.js';\n\nfunction mapResponsiveProp<Input extends string, Output>(\n propValue: Responsive<Input> | undefined,\n mapValue: (value: Input) => Output\n): Responsive<Output> | undefined {\n if (propValue === undefined) return undefined;\n if (typeof propValue === 'string') {\n return mapValue(propValue);\n }\n return Object.fromEntries(\n Object.entries(propValue).map(([key, value]) => [key, mapValue(value)])\n );\n}\n\nfunction mapCalloutSizeToTextSize(\n size: (typeof calloutRootPropDefs.size.values)[number]\n): (typeof textPropDefs.size.values)[number] {\n return size === '3' ? '3' : size === '1' ? '1' : '2';\n}\n\nfunction mapButtonSizeToSpinnerSize(\n size: (typeof baseButtonPropDefs.size.values)[number]\n): (typeof spinnerPropDefs.size.values)[number] {\n switch (size) {\n case '1':\n return '1';\n case '2':\n case '3':\n return '2';\n case '4':\n return '3';\n }\n}\n\nexport { mapResponsiveProp, mapCalloutSizeToTextSize, mapButtonSizeToSpinnerSize };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { tooltipPropDefs } from './tooltip.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TooltipElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs>;\ninterface TooltipProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>,\n ComponentPropsWithout<typeof TooltipPrimitive.Content, RemovedProps | 'content'>,\n TooltipOwnProps {\n content: React.ReactNode;\n container?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Portal>['container'];\n}\nconst Tooltip = React.forwardRef<TooltipElement, TooltipProps>((props, forwardedRef) => {\n const {\n children,\n className,\n open,\n defaultOpen,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n content,\n container,\n forceMount,\n ...tooltipContentProps\n } = extractProps(props, tooltipPropDefs);\n const rootProps = { open, defaultOpen, onOpenChange, delayDuration, disableHoverableContent };\n return (\n <TooltipPrimitive.Root {...rootProps}>\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <TooltipPrimitive.Content\n sideOffset={4}\n collisionPadding={10}\n {...tooltipContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-TooltipContent', className)}\n >\n <Text as=\"p\" className=\"rt-TooltipText\" size=\"1\">\n {content}\n </Text>\n <TooltipPrimitive.Arrow className=\"rt-TooltipArrow\" />\n </TooltipPrimitive.Content>\n </Theme>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n});\nTooltip.displayName = 'Tooltip';\n\nexport { Tooltip };\nexport type { TooltipProps };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends MarginProps, TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...textPropDefs, ...marginPropDefs };\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Text ${className}` : 'rt-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'rt-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'rt-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'rt-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'rt-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'rt-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { usePropSyncedState } from '../hooks/use-prop-synced-state.js';\nimport { useDeprecatedPanelBackgroundWarning } from '../helpers/use-deprecation-warning.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeMaterial = (typeof themePropDefs.material.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n// Headings follow the body font until something sets this, so `undefined` is a\n// meaningful value here rather than a missing one.\ntype ThemeHeadingFontFamily = ThemeFontFamily | undefined;\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onMaterialChange: (material: ThemeMaterial) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n onHeadingFontFamilyChange: (headingFontFamily: ThemeHeadingFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n material: ThemeMaterial;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n fontFamily: ThemeFontFamily;\n headingFontFamily: ThemeHeadingFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n material: themePropDefs.material.default,\n panelBackground: themePropDefs.panelBackground.default,\n radius: themePropDefs.radius.default,\n scaling: themePropDefs.scaling.default,\n fontFamily: themePropDefs.fontFamily.default,\n headingFontFamily: undefined,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onMaterialChange: noop,\n onPanelBackgroundChange: noop,\n onRadiusChange: noop,\n onScalingChange: noop,\n onFontFamilyChange: noop,\n onHeadingFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n material: materialProp = themePropDefs.material.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n headingFontFamily: headingFontFamilyProp,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n useDeprecatedPanelBackgroundWarning(props.panelBackground);\n\n // Each of these follows its prop but stays independently settable, so\n // `ThemePanel` can change the theme at runtime. Syncing during render\n // rather than in an effect matters here: an effect would commit the old\n // theme first and re-render every consumer of the context a second time.\n const [appearance, setAppearance] = usePropSyncedState(appearanceProp);\n const [accentColor, setAccentColor] = usePropSyncedState(accentColorProp);\n const [grayColor, setGrayColor] = usePropSyncedState(grayColorProp);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n materialProp !== themePropDefs.material.default ? materialProp : panelBackgroundProp;\n const [material, setMaterial] = usePropSyncedState(effectiveMaterial);\n\n // Keep panelBackground in sync with material for backward compatibility\n const [panelBackground, setPanelBackground] = usePropSyncedState(material);\n\n const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [scaling, setScaling] = usePropSyncedState(scalingProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n const [headingFontFamily, setHeadingFontFamily] = usePropSyncedState(headingFontFamilyProp);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n material={material}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n fontFamily={fontFamily}\n headingFontFamily={headingFontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onMaterialChange={setMaterial}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n onFontFamilyChange={setFontFamily}\n onHeadingFontFamilyChange={setHeadingFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n material = props.material ?? context?.material ?? themePropDefs.material.default,\n panelBackground = props.panelBackground ??\n context?.panelBackground ??\n themePropDefs.panelBackground.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n headingFontFamily = props.headingFontFamily ?? context?.headingFontFamily,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onMaterialChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n onFontFamilyChange = noop,\n onHeadingFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n // `data-os` can only be resolved on the client. Writing it straight to the\n // DOM keeps it out of the server markup \u2014 so hydration still matches \u2014 without\n // spending a render pass, and a state update here would re-render the whole\n // application on mount.\n const rootRef = React.useRef<ThemeImplElement>(null);\n const composedRef = useComposedRefs(forwardedRef, rootRef);\n const hasExplicitOS = 'data-os' in themeProps;\n\n useLayoutEffect(() => {\n if (!isRoot || hasExplicitOS) return;\n const node = rootRef.current;\n if (!node) return;\n\n const os = getClientOS();\n if (!os) return;\n node.setAttribute('data-os', os);\n return () => node.removeAttribute('data-os');\n }, [isRoot, hasExplicitOS]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-material={material}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n data-font-family={fontFamily}\n data-heading-font-family={headingFontFamily}\n ref={composedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "import * as React from 'react';\n\n/**\n * State that tracks a prop but can also be set imperatively \u2014 the shape `Theme`\n * needs, where a prop sets the value and `ThemePanel` can change it at runtime.\n *\n * Adjusts state during render rather than syncing in a `useEffect`. An effect\n * would commit one render carrying the *old* value and schedule a second one,\n * which for a provider means every consumer renders twice and the browser can\n * paint the stale value in between.\n *\n * @see https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\nexport function usePropSyncedState<T>(propValue: T) {\n const [value, setValue] = React.useState(propValue);\n const [previousPropValue, setPreviousPropValue] = React.useState(propValue);\n\n if (!Object.is(propValue, previousPropValue)) {\n setPreviousPropValue(propValue);\n setValue(propValue);\n }\n\n return [value, setValue] as const;\n}\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'blue' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'slate' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n material: { type: 'enum', values: materials, default: 'translucent' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: 'translucent' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'full' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family used for body text in the theme.\n *\n * Headings follow this unless `headingFontFamily` (or the `--font-heading`\n * token) says otherwise.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n /**\n * Sets the font family used for `Heading`, independently of body text.\n *\n * Deliberately has no default: when it is left unset no attribute is\n * emitted and `--font-heading` keeps following `--font-body`, so a\n * `--font-heading` override in your own CSS survives a `fontFamily` switch.\n */\n headingFontFamily: { type: 'enum', values: fontFamilies },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n headingFontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n", "import { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst tooltipPropDefs = {\n content: { type: 'ReactNode', required: true },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '360px' },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n content: PropDef<React.ReactNode>;\n};\n\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs & typeof widthPropDefs>;\n\nexport { tooltipPropDefs };\nexport type { TooltipOwnProps };\n", "import * as React from 'react';\n\n/**\n * Hook for managing tooltip accessibility props and conditional rendering.\n * Encapsulates tooltip ID generation and aria-describedby binding.\n *\n * @param tooltip - The tooltip content (if any)\n * @returns Object containing tooltipId, hasTooltip flag, and accessibility props\n *\n * @example\n * ```tsx\n * const { tooltipId, hasTooltip, accessibilityProps } = useTooltipWrapper(tooltip);\n *\n * const button = <button {...accessibilityProps}>Click me</button>;\n *\n * if (!hasTooltip) return button;\n *\n * return <Tooltip id={tooltipId} content={tooltip}>{button}</Tooltip>;\n * ```\n */\nexport function useTooltipWrapper(tooltip: React.ReactNode) {\n const tooltipId = React.useId();\n const hasTooltip = Boolean(tooltip);\n\n const accessibilityProps = React.useMemo(() => (hasTooltip ? { 'aria-describedby': tooltipId } : {}), [hasTooltip, tooltipId]);\n\n return { tooltipId, hasTooltip, accessibilityProps };\n}\n", "import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n});\n\nThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';\n\nconst ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z\"\n />\n </svg>\n );\n});\nThickCheckIcon.displayName = 'ThickCheckIcon';\n\nconst ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z\" />\n </svg>\n );\n});\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nconst ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronRightIcon.displayName = 'ThickChevronRightIcon';\n\nconst ThickChevronLeftIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronLeftIcon.displayName = 'ThickChevronLeftIcon';\n\nconst ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <circle cx=\"4.5\" cy=\"4.5\" r=\"2\" />\n </svg>\n );\n});\nThickDotIcon.displayName = 'ThickDotIcon';\n\nexport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon };\nexport type { IconProps };\n\n// Additional minimal icons\nconst CloseIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n {..._props}\n ref={_forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n});\nCloseIcon.displayName = 'CloseIcon';\n\nconst PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n {...props}\n ref={forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n});\nPaperclipIcon.displayName = 'PaperclipIcon';\n\nconst FileIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <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\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n});\nFileIcon.displayName = 'FileIcon';\n\nconst FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <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\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n});\nFileTextIcon.displayName = 'FileTextIcon';\n\nexport { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { scrollAreaPropDefs } from './scroll-area.props.js';\nimport { extractMarginProps } from '../helpers/extract-margin-props.js';\nimport { getMarginStyles } from '../helpers/get-margin-styles.js';\nimport { getResponsiveClassNames } from '../helpers/get-responsive-styles.js';\nimport { getSubtree } from '../helpers/get-subtree.js';\nimport { mergeStyles } from '../helpers/merge-styles.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Viewport>;\ntype ScrollAreaOwnProps = GetPropDefTypes<typeof scrollAreaPropDefs>;\ninterface ScrollAreaProps\n extends ComponentPropsWithout<typeof ScrollAreaPrimitive.Root, RemovedProps>,\n ComponentPropsWithout<typeof ScrollAreaPrimitive.Viewport, RemovedProps | 'dir'>,\n MarginProps,\n ScrollAreaOwnProps {}\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>((props, forwardedRef) => {\n const { rest: marginRest, ...marginProps } = extractMarginProps(props);\n const [marginClassNames, marginCustomProperties] = getMarginStyles(marginProps);\n\n const {\n asChild,\n children,\n className,\n style,\n type,\n scrollHideDelay = type !== 'scroll' ? 0 : undefined,\n dir,\n size = scrollAreaPropDefs.size.default,\n radius = scrollAreaPropDefs.radius.default,\n scrollbars = scrollAreaPropDefs.scrollbars.default,\n ...viewportProps\n } = marginRest;\n\n return (\n <ScrollAreaPrimitive.Root\n type={type}\n scrollHideDelay={scrollHideDelay}\n className={classNames('rt-ScrollAreaRoot', marginClassNames, className)}\n style={mergeStyles(marginCustomProperties, style)}\n asChild={asChild}\n >\n {getSubtree({ asChild, children }, (children) => (\n <>\n <ScrollAreaPrimitive.Viewport\n {...viewportProps}\n ref={forwardedRef}\n className=\"rt-ScrollAreaViewport\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n\n <div className=\"rt-ScrollAreaViewportFocusRing\" />\n\n {scrollbars !== 'vertical' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"horizontal\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars !== 'horizontal' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"vertical\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars === 'both' ? (\n <ScrollAreaPrimitive.Corner className=\"rt-ScrollAreaCorner\" />\n ) : null}\n </>\n ))}\n </ScrollAreaPrimitive.Root>\n );\n});\nScrollArea.displayName = 'ScrollArea';\n\nexport { ScrollArea };\nexport type { ScrollAreaProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst scrollbarsValues = ['vertical', 'horizontal', 'both'] as const;\n\nconst scrollAreaPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n ...radiusPropDef,\n scrollbars: { type: 'enum', values: scrollbarsValues, default: 'both' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n scrollbars: PropDef<(typeof scrollbarsValues)[number]>;\n};\n\nexport { scrollAreaPropDefs };\n", "import type { MarginProps } from '../props/margin.props.js';\n\nexport function extractMarginProps<T extends MarginProps>(props: T) {\n const { m, mx, my, mt, mr, mb, ml, ...rest } = props;\n return { m, mx, my, mt, mr, mb, ml, rest };\n}\n", "import { getResponsiveStyles } from './get-responsive-styles.js';\nimport { mergeStyles } from './merge-styles.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\n\nconst marginValues = marginPropDefs.m.values;\nconst marginValueSet: ReadonlySet<string> = new Set(marginValues);\n\n// Static table so the common case \u2014 a component with no margin props at all \u2014\n// is seven property reads and nothing else.\nconst MARGIN_PROPS: ReadonlyArray<{\n key: keyof MarginProps;\n className: string;\n customProperties: `--${string}`[];\n}> = [\n { key: 'm', className: 'rt-r-m', customProperties: ['--margin'] },\n { key: 'mx', className: 'rt-r-mx', customProperties: ['--margin-left', '--margin-right'] },\n { key: 'my', className: 'rt-r-my', customProperties: ['--margin-top', '--margin-bottom'] },\n { key: 'mt', className: 'rt-r-mt', customProperties: ['--margin-top'] },\n { key: 'mr', className: 'rt-r-mr', customProperties: ['--margin-right'] },\n { key: 'mb', className: 'rt-r-mb', customProperties: ['--margin-bottom'] },\n { key: 'ml', className: 'rt-r-ml', customProperties: ['--margin-left'] },\n];\n\nexport function getMarginStyles(props: MarginProps) {\n let classes: string[] | undefined;\n let style: ReturnType<typeof mergeStyles>;\n\n for (let i = 0; i < MARGIN_PROPS.length; i++) {\n const { key, className, customProperties } = MARGIN_PROPS[i];\n const value = props[key];\n if (value === undefined) continue;\n\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className,\n customProperties,\n propValues: marginValues,\n propValueSet: marginValueSet,\n value,\n });\n\n if (propClassNames) (classes ??= []).push(propClassNames);\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n }\n\n return [classes !== undefined ? classes.join(' ') : '', style] as const;\n}\n", "import * as React from 'react';\n\n/**\n * This is a helper function that is used when a component supports `asChild`\n * using the `Slot` component but its implementation contains nested DOM elements.\n *\n * Using it ensures if a consumer uses the `asChild` prop, the elements are in\n * correct order in the DOM, adopting the intended consumer `children`.\n */\nexport function getSubtree(\n options: { asChild: boolean | undefined; children: React.ReactNode },\n content: React.ReactNode | ((children: React.ReactNode) => React.ReactNode)\n) {\n const { asChild, children } = options;\n if (!asChild) return typeof content === 'function' ? content(children) : content;\n\n const firstChild = React.Children.only(children) as React.ReactElement;\n return React.cloneElement(firstChild, {\n // @ts-expect-error\n children: typeof content === 'function' ? content(firstChild.props.children) : content,\n });\n}\n"],
5
- "mappings": "8kBAAA,IAAAA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zF,cAAasM,EAAU,OAAY,GACnC,SAAUA,EAAUJ,EAAW,GAC/B,QAAS5E,EACT,QAASmF,EACR,GAAGD,GAEHvM,GACC,gBAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,OAAO,eAAe,YAAY,IAAI,cAAc,QAAQ,eAAe,QAAQ,cAAW,IAC3L,gBAAC,QAAK,EAAE,WAAW,EACnB,gBAAC,QAAK,EAAE,gBAAgB,CAC1B,CAEJ,CAEJ,CAAC,EACD6L,GAAK,YAAc",
6
- "names": ["chatbar_exports", "__export", "AttachTrigger", "Attachment", "AttachmentsRow", "InlineEnd", "InlineStart", "Root", "Row", "RowEnd", "RowStart", "Send", "Textarea", "__toCommonJS", "React", "import_classnames", "import_react", "import_internal", "import_react_dropzone", "React", "import_classnames", "React", "import_classnames", "import_radix_ui", "asChildPropDef", "accentColors", "grayColors", "colorPropDef", "accentColorPropDef", "highContrastPropDef", "radii", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "materials", "baseButtonPropDefs", "asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "React", "import_classnames", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "paddingValues", "paddingPropDefs", "heightPropDefs", "widthPropDefs", "overflowValues", "positionValues", "positionEdgeValues", "flexShrinkValues", "flexGrowValues", "alignSelfValues", "justifySelfValues", "layoutPropDefs", "paddingPropDefs", "widthPropDefs", "heightPropDefs", "marginValues", "marginPropDefs", "import_radix_ui", "Root", "SlotPrimitive", "Slot", "Slottable", "gapValues", "gapPropDefs", "as", "displayValues", "directionValues", "alignValues", "justifyValues", "wrapValues", "flexPropDefs", "asChildPropDef", "parseJustifyValue", "gapPropDefs", "value", "Flex", "props", "forwardedRef", "className", "asChild", "Tag", "flexProps", "extractProps", "flexPropDefs", "layoutPropDefs", "marginPropDefs", "Slot", "classNames", "React", "import_classnames", "sizes", "spinnerPropDefs", "Spinner", "props", "forwardedRef", "className", "children", "loading", "spinnerProps", "extractProps", "spinnerPropDefs", "marginPropDefs", "spinner", "classNames", "Flex", "import_radix_ui", "VisuallyHidden", "VisuallyHiddenPrimitive", "Root", "React", "PANEL_BACKGROUND_MESSAGE", "warned", "warnOnce", "message", "useDeprecatedPanelBackgroundWarning", "panelBackground", "mapResponsiveProp", "propValue", "mapValue", "key", "value", "mapButtonSizeToSpinnerSize", "size", "BaseButton", "props", "forwardedRef", "size", "baseButtonPropDefs", "className", "children", "asChild", "as", "color", "radius", "material", "panelBackground", "flush", "disabled", "baseButtonProps", "extractProps", "marginPropDefs", "useDeprecatedPanelBackgroundWarning", "effectiveMaterial", "Comp", "shouldPassDisabled", "isNativeButtonElement", "hasExplicitTypeAttribute", "loadingId", "describedById", "buttonText", "accessibilityProps", "classNames", "VisuallyHidden", "Flex", "Spinner", "mapResponsiveProp", "mapButtonSizeToSpinnerSize", "React", "import_classnames", "import_radix_ui", "React", "import_radix_ui", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "highContrastPropDef", "mergedPropDefs", "textPropDefs", "marginPropDefs", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "combinedClassName", "React", "import_classnames", "import_radix_ui", "import_internal", "getMatchingGrayColor", "accentColor", "React", "usePropSyncedState", "propValue", "value", "setValue", "previousPropValue", "setPreviousPropValue", "appearances", "panelBackgrounds", "materials", "scalings", "fontFamilies", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "Theme", "props", "forwardedRef", "ThemeContext", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "themePropDefs", "accentColorProp", "grayColorProp", "materialProp", "panelBackgroundProp", "radiusProp", "scalingProp", "fontFamilyProp", "headingFontFamilyProp", "hasBackground", "rootProps", "useDeprecatedPanelBackgroundWarning", "appearance", "setAppearance", "usePropSyncedState", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "effectiveMaterial", "material", "setMaterial", "panelBackground", "setPanelBackground", "radius", "setRadius", "scaling", "setScaling", "fontFamily", "setFontFamily", "headingFontFamily", "setHeadingFontFamily", "getClientOS", "ua", "context", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "noop", "onAccentColorChange", "onGrayColorChange", "onMaterialChange", "onPanelBackgroundChange", "onRadiusChange", "onScalingChange", "onFontFamilyChange", "onHeadingFontFamilyChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "rootRef", "composedRef", "hasExplicitOS", "node", "os", "classNames", "tooltipPropDefs", "widthPropDefs", "Tooltip", "props", "forwardedRef", "children", "className", "open", "defaultOpen", "onOpenChange", "delayDuration", "disableHoverableContent", "content", "container", "forceMount", "tooltipContentProps", "extractProps", "tooltipPropDefs", "rootProps", "TooltipPrimitive", "Theme", "classNames", "Text", "React", "useTooltipWrapper", "tooltip", "tooltipId", "hasTooltip", "accessibilityProps", "IconButton", "className", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "props", "forwardedRef", "tooltipId", "hasTooltip", "tooltipAccessibilityProps", "useTooltipWrapper", "hasAriaLabel", "hasAriaLabelledBy", "hasChildren", "iconButton", "BaseButton", "classNames", "Tooltip", "import_react", "ThickDividerHorizontalIcon", "React", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickChevronLeftIcon", "ThickDotIcon", "CloseIcon", "React", "_props", "_forwardedRef", "PaperclipIcon", "props", "forwardedRef", "FileIcon", "FileTextIcon", "React", "import_classnames", "import_radix_ui", "sizes", "scrollbarsValues", "scrollAreaPropDefs", "asChildPropDef", "radiusPropDef", "extractMarginProps", "props", "m", "mx", "my", "mt", "mr", "mb", "ml", "rest", "marginValues", "marginPropDefs", "marginValueSet", "MARGIN_PROPS", "getMarginStyles", "props", "classes", "style", "i", "key", "className", "customProperties", "value", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "React", "getSubtree", "options", "content", "asChild", "children", "firstChild", "ScrollArea", "props", "forwardedRef", "marginRest", "marginProps", "extractMarginProps", "marginClassNames", "marginCustomProperties", "getMarginStyles", "asChild", "children", "className", "style", "type", "scrollHideDelay", "dir", "size", "scrollAreaPropDefs", "radius", "scrollbars", "viewportProps", "ScrollAreaPrimitive", "classNames", "mergeStyles", "getSubtree", "getResponsiveClassNames", "useIsomorphicLayoutEffect", "LAYOUT_TRANSITION", "ChatbarContext", "ChatbarValueContext", "useChatbarContext", "ctx", "toArray", "val", "s", "matchesAccept", "file", "patterns", "mime", "name", "patRaw", "pat", "type", "subtype", "fmType", "fmSubtype", "IMAGE_EXT_RE", "isImageLike", "hasText", "value", "plural", "n", "word", "attachmentCounter", "createAttachmentId", "Root", "props", "forwardedRef", "className", "style", "children", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "expandOn", "minLines", "maxLines", "sendMode", "disabled", "readOnly", "onSubmit", "size", "variant", "color", "radius", "panelBackground", "material", "width", "maxWidth", "attachmentsProp", "defaultAttachments", "onAttachmentsChange", "accept", "multiple", "maxAttachments", "maxFileSize", "paste", "pasteAccept", "clearOnSubmit", "onAttachmentReject", "dropzone", "apiRef", "onBlurCapture", "divProps", "effectiveMaterial", "isValueControlled", "valueUncontrolled", "setValueUncontrolled", "isOpenControlled", "openUncontrolled", "setOpenUncontrolled", "open", "isAttachmentsControlled", "attachmentsUncontrolled", "setAttachmentsUncontrolled", "attachments", "announcement", "setAnnouncementState", "announce", "text", "prev", "rootRef", "composedRootRef", "textareaRef", "fileInputRef", "pickerOpenRef", "pressGuardRef", "pressGuardTimerRef", "pickerRef", "acceptKey", "pasteAcceptKey", "accepts", "pasteAccepts", "snapshot", "latest", "pendingAttachmentsRef", "getAttachments", "setOpen", "next", "setValue", "setAttachments", "ownedUrlsRef", "addFiles", "files", "cfg", "current", "rejected", "remainingSlots", "perActionLimit", "url", "messages", "appendFiles", "appendFilesFromPaste", "removeAttachment", "id", "removed", "a", "submit", "clear", "payload", "att", "owned", "openFilePicker", "options", "input", "beginFilePickerPress", "reset", "handleFileInputChange", "event", "picker", "handleBlurCapture", "rootEl", "nextTarget", "handleDrop", "getRootProps", "isDragActive", "dragActive", "handleContainerPointerDown", "target", "contextValue", "classNames", "Text", "VisuallyHidden", "Textarea", "asChild", "onFocus", "onChange", "onPaste", "onKeyDown", "onCompositionStart", "onCompositionEnd", "submitOnEnter", "textareaProps", "composedRef", "lineHeightRef", "paddingRef", "composingRef", "sizingRef", "recomputeMetrics", "el", "computedStyle", "applyHeight", "isOpen", "min", "max", "lineHeight", "padding", "minHeight", "maxHeight", "contentHeight", "overflowing", "compactHeight", "prevWidth", "ro", "entries", "first", "handleFocus", "handleChange", "handlePaste", "item", "f", "handleCompositionStart", "handleCompositionEnd", "handleKeyDown", "Comp", "Slot", "InlineStart", "InlineEnd", "AttachmentsRow", "forceMount", "renderAttachment", "ScrollArea", "Flex", "Attachment", "STATUS_LABEL", "attachment", "isImage", "sizeLabel", "statusLabel", "locked", "handleRemove", "tile", "tiles", "index", "nextButton", "FileTextIcon", "IconButton", "CloseIcon", "AttachTrigger", "disabledProp", "onPointerDown", "onClick", "buttonProps", "Row", "RowStart", "RowEnd", "Send", "clearOnSend", "sizeProp", "variantProp", "tabIndex", "ariaLabel", "ariaLabelledby", "hasContent", "visible", "inactive", "labelProps", "handleClick"]
4
+ "sourcesContent": ["import * as React from 'react';\nimport classNames from 'classnames';\nimport { LazyMotion, MotionConfig, domAnimation, m } from 'motion/react';\nimport { useComposedRefs } from 'radix-ui/internal';\nimport { useDropzone } from 'react-dropzone';\n\nimport { IconButton, type IconButtonProps } from './icon-button.js';\nimport { CloseIcon, FileTextIcon } from './icons.js';\nimport { Flex } from './flex.js';\nimport { ScrollArea } from './scroll-area.js';\nimport { Slot } from './slot.js';\nimport { Text } from './text.js';\nimport { VisuallyHidden } from './visually-hidden.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { accentColors } from '../props/color.prop.js';\nimport type { radii } from '../props/radius.prop.js';\n\n// Avoid SSR warnings by using an isomorphic layout effect\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n\n/**\n * Runs `measure` with the placeholder taken out of layout, so a height read\n * reflects the value alone.\n *\n * A textarea with an empty value lays its placeholder out as real text, so\n * `scrollHeight` reports the placeholder wrapped at whatever width the field\n * has at that instant. That sizes an empty bar to the suggestion showing in it\n * rather than to `minLines`, and when the read lands before the field has its\n * final width -- a panel still animating open, a flex parent whose basis is 0\n * -- it wraps that text at a fraction of the real width and opens the bar at\n * `maxLines`. The first keystroke takes the placeholder out of layout and the\n * height snaps back, which is what made the bug look intermittent rather than\n * simply wrong.\n *\n * The reset to 'auto' and the `scrollHeight` read sit in different functions\n * here, so the whole measurement window is wrapped rather than a single read.\n * Costs one extra style recalc on a path that is already forcing a reflow.\n */\nfunction withoutPlaceholder(el: HTMLTextAreaElement, measure: () => void): void {\n const { placeholder } = el;\n if (!placeholder) {\n measure();\n return;\n }\n el.placeholder = '';\n try {\n measure();\n } finally {\n el.placeholder = placeholder;\n }\n}\n\n// Shared layout spring; hoisted so every motion node receives the same object\nconst LAYOUT_TRANSITION = { layout: { type: 'spring', visualDuration: 0.15, bounce: 0.1 } } as const;\n\ntype ExpandOn = 'none' | 'focus' | 'overflow' | 'both';\ntype SendMode = 'always' | 'whenDirty' | 'never';\n\n// Attachments\n/** Status flag for attachment lifecycle. */\ntype AttachmentStatus = 'idle' | 'uploading' | 'error' | 'done';\n/**\n * Attachment data model used by Chatbar.\n * - `file` exposes the original File object for uploads and processing.\n * - `url` is an object URL used for image previews. Chatbar revokes it when the\n * attachment is removed; once an attachment is handed to `onSubmit`, the\n * consumer owns the URL and is responsible for revoking it.\n */\ninterface ChatbarAttachment {\n id: string;\n name: string;\n size: number;\n type: string;\n /** Original File object for uploads and processing */\n file: File;\n url?: string;\n status?: AttachmentStatus;\n progress?: number;\n meta?: Record<string, unknown>;\n}\n\ntype ChatbarRejectReason = 'type' | 'size' | 'count';\ninterface ChatbarAttachmentRejection {\n file: File;\n reason: ChatbarRejectReason;\n}\n\ninterface ChatbarSubmitPayload {\n value: string;\n attachments: ChatbarAttachment[];\n}\n\ninterface FilePickerOptions {\n accept?: string | string[];\n multiple?: boolean;\n}\n\ninterface ChatbarContextValue {\n open: boolean;\n setOpen(next: boolean): void;\n\n setValue(next: string): void;\n\n size: '1' | '2' | '3';\n expandOn: ExpandOn;\n minLines: number;\n maxLines: number;\n sendMode: SendMode;\n disabled?: boolean;\n readOnly?: boolean;\n paste: boolean;\n clearOnSubmit: boolean;\n multiple: boolean;\n\n textareaRef: React.RefObject<HTMLTextAreaElement | null>;\n\n attachments: ChatbarAttachment[];\n removeAttachment(id: string): void;\n\n /** Validates and submits; returns false when there was nothing to submit */\n submit(clear: boolean): boolean;\n appendFiles(files: File[]): number;\n appendFilesFromPaste(files: File[]): number;\n openFilePicker(options?: FilePickerOptions): void;\n /** Guards blur-collapse between pointerdown on a picker trigger and its click */\n beginFilePickerPress(): void;\n}\n\nconst ChatbarContext = React.createContext<ChatbarContextValue | null>(null);\n// Value lives in its own context so keystrokes only re-render parts that read it\nconst ChatbarValueContext = React.createContext<string>('');\n\nconst useChatbarContext = () => {\n const ctx = React.useContext(ChatbarContext);\n if (!ctx) throw new Error('Chatbar context not found. Wrap parts in <Chatbar.Root>.');\n return ctx;\n};\n\nconst toArray = (val: string | string[] | undefined) =>\n Array.isArray(val) ? val : typeof val === 'string' ? val.split(',').map((s) => s.trim()).filter(Boolean) : [];\n\nconst matchesAccept = (file: File, patterns: string[]) => {\n if (patterns.length === 0) return true;\n const mime = file.type.toLowerCase();\n const name = file.name.toLowerCase();\n for (const patRaw of patterns) {\n const pat = patRaw.toLowerCase();\n if (pat.includes('/')) {\n const [type, subtype] = pat.split('/');\n const [fmType, fmSubtype] = mime.split('/');\n if (type === '*' || (type === fmType && (subtype === '*' || subtype === fmSubtype))) return true;\n } else if (pat.startsWith('.')) {\n if (name.endsWith(pat)) return true;\n }\n }\n return false;\n};\n\nconst IMAGE_EXT_RE = /\\.(png|jpe?g|gif|webp|bmp|svg|avif)$/i;\nconst isImageLike = (name: string, type: string) => (type || '').toLowerCase().startsWith('image/') || IMAGE_EXT_RE.test(name);\n\nconst hasText = (value: string) => value.trim().length > 0;\n\nconst plural = (n: number, word: string) => `${n} ${word}${n === 1 ? '' : 's'}`;\n\nlet attachmentCounter = 0;\nconst createAttachmentId = () => `chatbar-attachment-${Date.now()}-${++attachmentCounter}`;\n\n/**\n * Chatbar container and state provider.\n *\n * Value & Open\n * - Supports controlled/uncontrolled `value` and `open`.\n *\n * Attachments\n * - Controlled/uncontrolled attachments with client-side filtering.\n * - Filters by `accept`/`pasteAccept`, `multiple`, `maxAttachments`, and `maxFileSize`.\n * - Rejections are reported via `onAttachmentReject`.\n *\n * Submit\n * - `onSubmit({ value, attachments })` emits both message and attachments.\n * - Submitting requires text or at least one attachment.\n * - `clearOnSubmit` clears message and attachments by default.\n */\ninterface ChatbarRootBaseProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n\n /** When the chatbar expands on its own. `none` leaves open state entirely to the consumer. */\n expandOn?: ExpandOn;\n\n /** Minimum visible lines when expanded (default: 3). The compact state is always one line. */\n minLines?: number;\n /** Maximum number of lines before scrolling (default: 6) */\n maxLines?: number;\n\n /** Controls Send button visibility only. Enter-to-submit is controlled by `Textarea submitOnEnter`. */\n sendMode?: SendMode;\n\n /** Disables text input, submission and every way of adding attachments */\n disabled?: boolean;\n /** Prevents editing, submission and adding attachments */\n readOnly?: boolean;\n\n /** Combined submit payload */\n onSubmit?: (payload: ChatbarSubmitPayload) => void;\n\n size?: '1' | '2' | '3';\n variant?: 'surface' | 'outline' | 'classic' | 'ghost' | 'soft';\n /** Accent color for the control (matches TextArea) */\n color?: (typeof accentColors)[number];\n /** Optional radius override (matches TextArea) */\n radius?: (typeof radii)[number];\n /** Panel/material translucency flags (matches TextArea) */\n panelBackground?: 'solid' | 'translucent';\n material?: 'solid' | 'translucent';\n\n width?: React.CSSProperties['width'];\n maxWidth?: React.CSSProperties['maxWidth'];\n\n // Attachments API\n attachments?: ChatbarAttachment[];\n defaultAttachments?: ChatbarAttachment[];\n onAttachmentsChange?: (attachments: ChatbarAttachment[]) => void;\n accept?: string | string[];\n /** Allow more than one file per pick, paste or drop */\n multiple?: boolean;\n maxAttachments?: number;\n maxFileSize?: number;\n paste?: boolean;\n /** Accepted types for pasted files. Replaces `accept` for paste when set. */\n pasteAccept?: string | string[];\n /** Clear message and attachments after submit */\n clearOnSubmit?: boolean;\n onAttachmentReject?: (rejections: ChatbarAttachmentRejection[]) => void;\n\n /**\n * Enables drag-and-drop file uploads when true.\n *\n * When enabled:\n * - Files can be dropped anywhere on the chatbar\n * - Same validation rules apply (accept, multiple, maxFileSize, maxAttachments)\n * - Visual feedback shows during drag operations\n * - Rejected files trigger onAttachmentReject\n *\n * @default true\n */\n dropzone?: boolean;\n\n /**\n * Optional API ref to control Chatbar imperatively without relying on DOM refs.\n * Provides methods to focus the textarea and open the file picker.\n */\n apiRef?: React.Ref<ChatbarApi>;\n}\n\ntype RootElement = React.ElementRef<'div'>;\n/** Imperative API for Chatbar.Root */\nexport interface ChatbarApi {\n /** Focus the textarea input */\n focusTextarea: () => void;\n /** Open the file picker dialog (respects accept/multiple). No-op when disabled or read-only. */\n openFilePicker: () => void;\n}\n/**\n * Chatbar container and state provider.\n *\n * Behavior\n * - Supports controlled and uncontrolled `value` and `open` states via props.\n * - Provides context to subcomponents like `Textarea`, `Row`, and `Send`.\n * - Exposes `data-state`, `data-disabled`, and `data-readonly` attributes for styling.\n *\n * Attachments\n * - Paste-to-attach: when `paste` is enabled, pasting files adds attachments.\n * - Additions and rejections are announced through a polite live region.\n *\n * Dropzone\n * - When `dropzone` is true, enables drag-and-drop file uploads.\n * - Visual feedback via `data-drop-active` attribute during drag operations.\n *\n * Accessibility\n * - Consumers should label the `Textarea` via `aria-label`/`aria-labelledby`.\n */\ninterface RootProps extends ComponentPropsWithout<'div', RemovedProps | 'onSubmit' | 'color'>, ChatbarRootBaseProps {}\n\nconst Root = React.forwardRef<RootElement, RootProps>((props, forwardedRef) => {\n const {\n className,\n style,\n children,\n value: valueProp,\n defaultValue = '',\n onValueChange,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n expandOn = 'both',\n minLines = 3,\n maxLines = 6,\n sendMode = 'whenDirty',\n disabled,\n readOnly,\n onSubmit,\n size = '2',\n variant,\n color,\n radius,\n panelBackground,\n material,\n width,\n maxWidth,\n attachments: attachmentsProp,\n defaultAttachments,\n onAttachmentsChange,\n accept,\n multiple = true,\n maxAttachments,\n maxFileSize,\n paste = true,\n pasteAccept,\n clearOnSubmit = true,\n onAttachmentReject,\n dropzone = true,\n apiRef,\n onBlurCapture,\n ...divProps\n } = props;\n const effectiveMaterial = material || panelBackground;\n\n const isValueControlled = valueProp != null;\n const [valueUncontrolled, setValueUncontrolled] = React.useState<string>(defaultValue);\n const value = isValueControlled ? valueProp : valueUncontrolled;\n\n const isOpenControlled = openProp != null;\n const [openUncontrolled, setOpenUncontrolled] = React.useState<boolean>(defaultOpen);\n const open = isOpenControlled ? openProp : openUncontrolled;\n\n // Treat `attachments` as controlled if the prop is provided, even if its value is `undefined`.\n // This avoids switching between controlled and uncontrolled when a consumer sets\n // `attachments={undefined}` to clear attachments. In that case we normalize to an empty array.\n const isAttachmentsControlled = 'attachments' in props;\n const [attachmentsUncontrolled, setAttachmentsUncontrolled] = React.useState<ChatbarAttachment[]>(() => defaultAttachments ?? []);\n const attachments = React.useMemo(\n () => (isAttachmentsControlled ? (attachmentsProp ?? []) : attachmentsUncontrolled),\n [isAttachmentsControlled, attachmentsProp, attachmentsUncontrolled],\n );\n\n // `id` changes on every announcement so identical messages still update the live region\n const [announcement, setAnnouncementState] = React.useState({ text: '', id: 0 });\n const announce = React.useCallback((text: string) => setAnnouncementState((prev) => ({ text, id: prev.id + 1 })), []);\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const composedRootRef = useComposedRefs(forwardedRef, rootRef);\n const textareaRef = React.useRef<HTMLTextAreaElement>(null);\n const fileInputRef = React.useRef<HTMLInputElement>(null);\n\n // Blur-collapse guards: `pickerOpenRef` is true while the native dialog is open,\n // `pressGuardRef` covers the gap between pointerdown on a trigger and its click\n // (Safari blurs the textarea before the click fires).\n const pickerOpenRef = React.useRef(false);\n const pressGuardRef = React.useRef(false);\n const pressGuardTimerRef = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n const pickerRef = React.useRef<{ patterns: string[]; multiple: boolean } | null>(null);\n\n const acceptKey = toArray(accept).join(',');\n const pasteAcceptKey = toArray(pasteAccept).join(',');\n const accepts = React.useMemo(() => toArray(acceptKey), [acceptKey]);\n const pasteAccepts = React.useMemo(() => (pasteAcceptKey ? toArray(pasteAcceptKey) : accepts), [pasteAcceptKey, accepts]);\n\n // Latest props/state for stable callbacks. Synced during render (not in an effect) so\n // child layout effects that call setOpen/setValue see this render's handlers.\n const snapshot = {\n value,\n attachments,\n accepts,\n pasteAccepts,\n multiple,\n maxAttachments,\n maxFileSize,\n disabled,\n readOnly,\n expandOn,\n isValueControlled,\n isOpenControlled,\n isAttachmentsControlled,\n onValueChange,\n onOpenChange,\n onAttachmentsChange,\n onAttachmentReject,\n onSubmit,\n };\n const latest = React.useRef(snapshot);\n // eslint-disable-next-line react-hooks/refs -- read only in callbacks/effects; see comment above\n latest.current = snapshot;\n\n // Attachments set during the current event, before Root re-renders. Cleared at the end\n // of the task so a controlled parent that rejects the change is not overridden.\n const pendingAttachmentsRef = React.useRef<ChatbarAttachment[] | null>(null);\n const getAttachments = React.useCallback(() => pendingAttachmentsRef.current ?? latest.current.attachments, []);\n\n const setOpen = React.useCallback((next: boolean) => {\n if (!latest.current.isOpenControlled) setOpenUncontrolled(next);\n latest.current.onOpenChange?.(next);\n }, []);\n\n const setValue = React.useCallback((next: string) => {\n if (!latest.current.isValueControlled) setValueUncontrolled(next);\n latest.current.onValueChange?.(next);\n }, []);\n\n const setAttachments = React.useCallback((next: ChatbarAttachment[]) => {\n // Back-to-back updates in one event must see each other\n pendingAttachmentsRef.current = next;\n queueMicrotask(() => {\n pendingAttachmentsRef.current = null;\n });\n if (!latest.current.isAttachmentsControlled) setAttachmentsUncontrolled(next);\n latest.current.onAttachmentsChange?.(next);\n }, []);\n\n // Object URLs Chatbar created and still owns\n const ownedUrlsRef = React.useRef<Set<string>>(new Set());\n\n const addFiles = React.useCallback(\n (files: File[], patterns: string[], multiple: boolean = latest.current.multiple): number => {\n const cfg = latest.current;\n if (cfg.disabled || cfg.readOnly || files.length === 0) return 0;\n\n const current = getAttachments();\n const next: ChatbarAttachment[] = [];\n const rejected: ChatbarAttachmentRejection[] = [];\n const remainingSlots = typeof cfg.maxAttachments === 'number' ? Math.max(cfg.maxAttachments - current.length, 0) : Infinity;\n const perActionLimit = multiple ? Infinity : 1;\n\n for (const file of files) {\n if (next.length >= remainingSlots || next.length >= perActionLimit) {\n rejected.push({ file, reason: 'count' });\n continue;\n }\n if (typeof cfg.maxFileSize === 'number' && file.size > cfg.maxFileSize) {\n rejected.push({ file, reason: 'size' });\n continue;\n }\n if (!matchesAccept(file, patterns)) {\n rejected.push({ file, reason: 'type' });\n continue;\n }\n const url = isImageLike(file.name, file.type) ? URL.createObjectURL(file) : undefined;\n if (url) ownedUrlsRef.current.add(url);\n next.push({ id: createAttachmentId(), name: file.name, size: file.size, type: file.type, file, url, status: 'idle' });\n }\n\n const messages: string[] = [];\n if (next.length > 0) {\n setAttachments(current.concat(next));\n if (cfg.expandOn !== 'none') setOpen(true);\n messages.push(`${plural(next.length, 'file')} attached.`);\n }\n if (rejected.length > 0) {\n cfg.onAttachmentReject?.(rejected);\n messages.push(`${plural(rejected.length, 'file')} could not be attached.`);\n }\n if (messages.length > 0) announce(messages.join(' '));\n return next.length;\n },\n [getAttachments, setAttachments, setOpen, announce],\n );\n\n const appendFiles = React.useCallback((files: File[]) => addFiles(files, latest.current.accepts), [addFiles]);\n const appendFilesFromPaste = React.useCallback((files: File[]) => addFiles(files, latest.current.pasteAccepts), [addFiles]);\n\n const removeAttachment = React.useCallback(\n (id: string) => {\n const current = getAttachments();\n const removed = current.find((a) => a.id === id);\n if (!removed) return;\n setAttachments(current.filter((a) => a.id !== id));\n announce(`Removed ${removed.name}.`);\n },\n [getAttachments, setAttachments, announce],\n );\n\n const submit = React.useCallback(\n (clear: boolean) => {\n const cfg = latest.current;\n if (cfg.disabled || cfg.readOnly) return false;\n const current = getAttachments();\n if (!hasText(cfg.value) && current.length === 0) return false;\n const payload = { value: cfg.value, attachments: current };\n // Hand preview URLs to the consumer only when they leave the chatbar; URLs still\n // rendered here stay owned so removing them later revokes them\n if (clear && cfg.onSubmit) {\n for (const att of current) if (att.url) ownedUrlsRef.current.delete(att.url);\n }\n cfg.onSubmit?.(payload);\n if (clear) {\n setValue('');\n setAttachments([]);\n }\n return true;\n },\n [getAttachments, setValue, setAttachments],\n );\n\n // Revoke owned object URLs that are no longer referenced by current attachments\n React.useEffect(() => {\n const owned = ownedUrlsRef.current;\n if (owned.size === 0) return;\n const current = new Set(attachments.map((a) => a.url));\n for (const url of Array.from(owned)) {\n if (!current.has(url)) {\n URL.revokeObjectURL(url);\n owned.delete(url);\n }\n }\n }, [attachments]);\n\n // On unmount, revoke URLs only when Chatbar owns the attachment list;\n // controlled attachments may still be rendered by the parent.\n React.useEffect(() => {\n const owned = ownedUrlsRef.current;\n return () => {\n if (latest.current.isAttachmentsControlled) return;\n for (const url of Array.from(owned)) URL.revokeObjectURL(url);\n owned.clear();\n };\n }, []);\n\n const openFilePicker = React.useCallback((options?: FilePickerOptions) => {\n const cfg = latest.current;\n const input = fileInputRef.current;\n // The picker guard takes over from the press guard\n clearTimeout(pressGuardTimerRef.current);\n pressGuardRef.current = false;\n if (!input || cfg.disabled || cfg.readOnly) return;\n const patterns = options?.accept != null ? toArray(options.accept) : cfg.accepts;\n const multiple = options?.multiple ?? cfg.multiple;\n pickerRef.current = { patterns, multiple };\n input.accept = patterns.join(',');\n input.multiple = multiple;\n pickerOpenRef.current = true;\n input.click();\n // Browsers block the dialog outside a user gesture; if the window kept focus,\n // no dialog opened and no focus/cancel/change event will clear the guard\n setTimeout(() => {\n if (document.hasFocus()) pickerOpenRef.current = false;\n }, 1000);\n }, []);\n\n const beginFilePickerPress = React.useCallback(() => {\n // On touch (notably iOS), the compatibility mousedown, blur and click arrive in later\n // tasks than pointerup, so hold the guard until the click or a timeout\n pressGuardRef.current = true;\n clearTimeout(pressGuardTimerRef.current);\n pressGuardTimerRef.current = setTimeout(() => {\n pressGuardRef.current = false;\n }, 800);\n }, []);\n\n React.useEffect(() => () => clearTimeout(pressGuardTimerRef.current), []);\n\n // Clear the picker guard when the dialog closes, whichever way it closes\n React.useEffect(() => {\n const input = fileInputRef.current;\n const reset = () => {\n pickerOpenRef.current = false;\n };\n window.addEventListener('focus', reset);\n input?.addEventListener('cancel', reset);\n return () => {\n window.removeEventListener('focus', reset);\n input?.removeEventListener('cancel', reset);\n };\n }, []);\n\n const handleFileInputChange = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const input = event.currentTarget;\n const files = Array.from(input.files ?? []);\n const picker = pickerRef.current;\n addFiles(files, picker?.patterns ?? latest.current.accepts, picker?.multiple);\n pickerOpenRef.current = false;\n pickerRef.current = null;\n // Reset so selecting the same file again still fires change\n input.value = '';\n },\n [addFiles],\n );\n\n const handleBlurCapture = React.useCallback(\n (event: React.FocusEvent<HTMLDivElement>) => {\n onBlurCapture?.(event);\n const cfg = latest.current;\n const rootEl = rootRef.current;\n if (!rootEl || cfg.expandOn === 'none') return;\n const nextTarget = event.relatedTarget as Node | null;\n if (nextTarget && rootEl.contains(nextTarget)) return;\n if (pickerOpenRef.current || pressGuardRef.current) return;\n if (!hasText(cfg.value) && getAttachments().length === 0) setOpen(false);\n },\n [onBlurCapture, setOpen, getAttachments],\n );\n\n const handleDrop = React.useCallback((files: File[]) => {\n appendFiles(files);\n }, [appendFiles]);\n\n // Validation happens in addFiles so drop, paste and picker share one rule set\n const { getRootProps, isDragActive } = useDropzone({\n onDrop: handleDrop,\n // Drop any earlier message so it is not re-announced when the drag hint goes away\n onDragEnter: () => announce(''),\n noClick: true,\n noKeyboard: true,\n // Textarea handles paste itself; letting the dropzone see it attaches twice\n noPaste: true,\n disabled: !dropzone || disabled || readOnly,\n });\n const dragActive = dropzone && isDragActive;\n\n React.useImperativeHandle(\n apiRef,\n () => ({\n focusTextarea: () => textareaRef.current?.focus({ preventScroll: true }),\n openFilePicker: () => openFilePicker(),\n }),\n [openFilePicker],\n );\n\n // Click-to-focus: focus textarea when clicking non-interactive areas inside the container\n const handleContainerPointerDown = React.useCallback(\n (event: React.PointerEvent) => {\n if (disabled) return;\n if (event.pointerType === 'mouse' && event.button !== 0) return;\n const target = event.target;\n if (target instanceof Element && target.closest('button, [role=\"button\"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex=\"-1\"])')) return;\n event.preventDefault();\n textareaRef.current?.focus({ preventScroll: true });\n },\n [disabled],\n );\n\n const contextValue = React.useMemo<ChatbarContextValue>(\n () => ({\n open,\n setOpen,\n setValue,\n size,\n expandOn,\n minLines,\n maxLines,\n sendMode,\n disabled,\n readOnly,\n paste,\n clearOnSubmit,\n multiple,\n textareaRef,\n attachments,\n removeAttachment,\n submit,\n appendFiles,\n appendFilesFromPaste,\n openFilePicker,\n beginFilePickerPress,\n }),\n [\n open, setOpen, setValue, size, expandOn, minLines, maxLines, sendMode, disabled, readOnly, paste,\n clearOnSubmit, multiple, attachments, removeAttachment, submit, appendFiles, appendFilesFromPaste,\n openFilePicker, beginFilePickerPress,\n ],\n );\n\n return (\n <ChatbarContext.Provider value={contextValue}>\n <ChatbarValueContext.Provider value={value}>\n <LazyMotion features={domAnimation}>\n <MotionConfig reducedMotion=\"user\">\n <div\n {...divProps}\n ref={composedRootRef}\n className={classNames('rt-ChatbarRoot', `rt-r-size-${size}`, className)}\n style={{ position: 'relative', width, maxWidth, ...style }}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n data-readonly={readOnly ? '' : undefined}\n data-drop-active={dragActive ? '' : undefined}\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={effectiveMaterial}\n data-material={effectiveMaterial}\n onBlurCapture={handleBlurCapture}\n >\n <input\n ref={fileInputRef}\n type=\"file\"\n tabIndex={-1}\n aria-hidden\n style={{ display: 'none' }}\n onChange={handleFileInputChange}\n />\n <div {...(dropzone ? getRootProps() : {})} style={{ width: '100%', height: '100%' }} onPointerDown={handleContainerPointerDown}>\n <m.div\n className={classNames('rt-ChatbarBox', `rt-variant-${variant ?? 'surface'}`)}\n style={{ position: 'relative' }}\n data-accent-color={color}\n data-radius={radius}\n data-panel-background={effectiveMaterial}\n data-material={effectiveMaterial}\n layout\n transition={LAYOUT_TRANSITION}\n >\n <m.div className=\"rt-ChatbarGrid\" layout=\"position\" transition={LAYOUT_TRANSITION}>\n {children}\n </m.div>\n {dragActive && (\n <div className=\"rt-ChatbarDropOverlay\" aria-hidden>\n <div className=\"rt-ChatbarDropContent\">\n <Text color=\"gray\" size={size} weight=\"medium\">\n Drop files here to attach\n </Text>\n </div>\n </div>\n )}\n </m.div>\n </div>\n <VisuallyHidden role=\"status\" aria-live=\"polite\">\n {dragActive ? 'Drop files here to attach.' : <span key={announcement.id}>{announcement.text}</span>}\n </VisuallyHidden>\n </div>\n </MotionConfig>\n </LazyMotion>\n </ChatbarValueContext.Provider>\n </ChatbarContext.Provider>\n );\n});\nRoot.displayName = 'Chatbar.Root';\n\n/**\n * Multi-line text input for Chatbar.\n * - Uses onChange to control value and avoid duplicate updates.\n * - Auto-resizes between minLines and maxLines.\n * - Expands on focus/overflow per `expandOn`.\n * - Paste-to-attach: when `paste` is enabled on Root, pasting files adds attachments.\n * - Provide `aria-label` or `aria-labelledby` for an accessible name.\n */\ninterface TextareaProps extends Omit<React.ComponentPropsWithoutRef<'textarea'>, 'size' | 'rows' | 'value' | 'defaultValue'> {\n asChild?: boolean;\n /**\n * When true, pressing Enter submits (Shift+Enter inserts a newline).\n * Works with every `sendMode`. Defaults to false.\n */\n submitOnEnter?: boolean;\n}\n\n/**\n * Chatbar multi-line text input.\n *\n * Behavior\n * - Controls the Chatbar value via React onChange.\n * - Auto-resizes between minLines and maxLines in a single layout effect, which\n * also opens the Chatbar when content overflows the compact height and\n * `expandOn` is `overflow` or `both`.\n * - Consumer handlers run first; calling `preventDefault` in `onKeyDown` or\n * `onPaste` skips the built-in submit or attach behavior.\n *\n * Accessibility\n * - Consumers should provide labeling via aria-label or aria-labelledby\n * on this component, as no implicit label is rendered.\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>((props, forwardedRef) => {\n const {\n className,\n style,\n asChild,\n onFocus,\n onChange,\n onPaste,\n onKeyDown,\n onCompositionStart,\n onCompositionEnd,\n submitOnEnter = false,\n ...textareaProps\n } = props;\n const ctx = useChatbarContext();\n const value = React.useContext(ChatbarValueContext);\n const { open, minLines, maxLines, expandOn, disabled, readOnly, setOpen, setValue, textareaRef, paste, appendFilesFromPaste, size, submit, clearOnSubmit } = ctx;\n const composedRef = useComposedRefs(forwardedRef, textareaRef);\n\n // Cached metrics to avoid repeated getComputedStyle calls\n const lineHeightRef = React.useRef(0);\n const paddingRef = React.useRef(0);\n const composingRef = React.useRef(false);\n\n const sizingRef = React.useRef({ open, minLines, maxLines });\n // Declared before the sizing effect so it runs first in the same commit\n useIsomorphicLayoutEffect(() => {\n sizingRef.current = { open, minLines, maxLines };\n }, [open, minLines, maxLines]);\n\n const recomputeMetrics = React.useCallback(() => {\n const el = textareaRef.current;\n if (!el) return;\n const computedStyle = window.getComputedStyle(el);\n lineHeightRef.current = parseFloat(computedStyle.lineHeight) || 20;\n paddingRef.current = (parseFloat(computedStyle.paddingTop) || 0) + (parseFloat(computedStyle.paddingBottom) || 0);\n }, [textareaRef]);\n\n // Sizes `el` for the given open state; caller must have set height to 'auto' first\n const applyHeight = React.useCallback((el: HTMLTextAreaElement, isOpen: boolean) => {\n const { minLines: min, maxLines: max } = sizingRef.current;\n const lineHeight = lineHeightRef.current;\n const padding = paddingRef.current;\n const minHeight = Math.ceil((isOpen ? min : 1) * lineHeight) + padding;\n const maxHeight = Math.ceil((isOpen ? max : 1) * lineHeight) + padding;\n const contentHeight = Math.max(el.scrollHeight, minHeight);\n el.style.height = `${Math.min(contentHeight, maxHeight)}px`;\n const overflowing = contentHeight > maxHeight;\n el.style.overflowY = overflowing ? 'auto' : 'hidden';\n el.style.maxHeight = overflowing ? `${maxHeight}px` : 'none';\n }, []);\n\n // Typography depends on size\n useIsomorphicLayoutEffect(() => {\n recomputeMetrics();\n }, [recomputeMetrics, size]);\n\n // Single place for sizing and overflow auto-open: one height reset, one scrollHeight read\n useIsomorphicLayoutEffect(() => {\n const el = textareaRef.current;\n if (!el) return;\n if (lineHeightRef.current === 0) recomputeMetrics();\n withoutPlaceholder(el, () => {\n el.style.height = 'auto';\n let isOpen = open;\n if (!open && (expandOn === 'overflow' || expandOn === 'both')) {\n const compactHeight = Math.ceil(lineHeightRef.current) + paddingRef.current;\n if (el.scrollHeight > compactHeight + 1) {\n isOpen = true;\n setOpen(true);\n }\n }\n applyHeight(el, isOpen);\n });\n }, [value, open, expandOn, minLines, maxLines, size, setOpen, textareaRef, recomputeMetrics, applyHeight]);\n\n // Width changes re-wrap text; re-measure only when the width actually changes\n React.useEffect(() => {\n const el = textareaRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return;\n let prevWidth = -1;\n const ro = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width === prevWidth) return;\n const first = prevWidth === -1;\n prevWidth = width;\n if (first) return;\n recomputeMetrics();\n withoutPlaceholder(el, () => {\n el.style.height = 'auto';\n applyHeight(el, sizingRef.current.open);\n });\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, [textareaRef, recomputeMetrics, applyHeight]);\n\n // Dev-only warning if no accessible name is provided\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n const hasLabel = textareaProps['aria-label'] != null || textareaProps['aria-labelledby'] != null;\n if (!hasLabel) {\n console.warn('[Chatbar.Textarea] Provide aria-label or aria-labelledby to ensure the control has an accessible name.');\n }\n // warn only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleFocus = React.useCallback<React.FocusEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onFocus?.(event);\n if (disabled || readOnly) return;\n if ((expandOn === 'focus' || expandOn === 'both') && !open) setOpen(true);\n },\n [disabled, readOnly, expandOn, open, setOpen, onFocus],\n );\n\n const handleChange = React.useCallback<React.ChangeEventHandler<HTMLTextAreaElement>>(\n (event) => {\n setValue(event.currentTarget.value);\n onChange?.(event);\n },\n [setValue, onChange],\n );\n\n const handlePaste = React.useCallback<React.ClipboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onPaste?.(event);\n if (event.defaultPrevented || !paste || disabled || readOnly) return;\n const files = Array.from(event.clipboardData?.items ?? [])\n .filter((item) => item.kind === 'file')\n .map((item) => item.getAsFile())\n .filter((f): f is File => !!f);\n if (files.length === 0) return;\n // Suppress the filename/text representation only when a file was actually attached\n if (appendFilesFromPaste(files) > 0) event.preventDefault();\n },\n [paste, disabled, readOnly, onPaste, appendFilesFromPaste],\n );\n\n const handleCompositionStart = React.useCallback<React.CompositionEventHandler<HTMLTextAreaElement>>(\n (event) => {\n composingRef.current = true;\n onCompositionStart?.(event);\n },\n [onCompositionStart],\n );\n\n const handleCompositionEnd = React.useCallback<React.CompositionEventHandler<HTMLTextAreaElement>>(\n (event) => {\n composingRef.current = false;\n onCompositionEnd?.(event);\n },\n [onCompositionEnd],\n );\n\n const handleKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLTextAreaElement>>(\n (event) => {\n onKeyDown?.(event);\n if (event.defaultPrevented || !submitOnEnter) return;\n if (event.key !== 'Enter' || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;\n // Safari fires the IME-confirming Enter after compositionend with keyCode 229\n if (composingRef.current || event.nativeEvent.isComposing || event.nativeEvent.keyCode === 229) return;\n // Plain Enter never inserts a newline when submitOnEnter is on, even with nothing to send\n event.preventDefault();\n submit(clearOnSubmit);\n },\n [submitOnEnter, onKeyDown, submit, clearOnSubmit],\n );\n\n const Comp = asChild ? Slot : 'textarea';\n return (\n <m.div className={classNames('rt-ChatbarField', 'rt-ChatbarTextarea', className)} layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp\n {...textareaProps}\n ref={composedRef}\n className=\"rt-ChatbarInput\"\n value={value}\n onChange={handleChange}\n onFocus={handleFocus}\n onPaste={handlePaste}\n onKeyDown={handleKeyDown}\n onCompositionStart={handleCompositionStart}\n onCompositionEnd={handleCompositionEnd}\n disabled={disabled}\n readOnly={readOnly}\n rows={open ? minLines : 1}\n spellCheck={textareaProps.spellCheck ?? true}\n autoCorrect={textareaProps.autoCorrect ?? 'on'}\n style={style}\n />\n </m.div>\n );\n});\nTextarea.displayName = 'Chatbar.Textarea';\n\ninterface InlineSlotProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst InlineStart = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarInlineStart', className)}>\n {children}\n </Comp>\n );\n});\nInlineStart.displayName = 'Chatbar.InlineStart';\n\nconst InlineEnd = React.forwardRef<HTMLDivElement, InlineSlotProps>((props, forwardedRef) => {\n const { children, asChild, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarInlineEnd', className)}>\n {children}\n </Comp>\n );\n});\nInlineEnd.displayName = 'Chatbar.InlineEnd';\n\n/**\n * Renders a horizontally scrollable list of attachments above the inline row.\n * Hidden when empty unless `forceMount`. Override per-item with `renderAttachment`.\n */\ninterface AttachmentsRowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n forceMount?: boolean;\n /** If provided, custom-render a tile; otherwise default tile is used */\n renderAttachment?: (attachment: ChatbarAttachment) => React.ReactNode;\n}\n\nconst AttachmentsRow = React.forwardRef<HTMLDivElement, AttachmentsRowProps>((props, forwardedRef) => {\n const { asChild, forceMount, renderAttachment, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (ctx.attachments.length === 0 && !forceMount) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <m.div layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarAttachmentsRow', className)} role=\"list\" aria-label={divProps['aria-label'] ?? 'Attachments'}>\n <ScrollArea className=\"rt-ChatbarScrollArea\" scrollbars=\"horizontal\" size=\"1\">\n <Flex align=\"center\" gap=\"2\" minWidth=\"fit-content\">\n {ctx.attachments.map((att) => (\n <Attachment key={att.id} attachment={att} asChild={!!renderAttachment}>\n {renderAttachment?.(att)}\n </Attachment>\n ))}\n </Flex>\n </ScrollArea>\n </Comp>\n </m.div>\n );\n});\nAttachmentsRow.displayName = 'Chatbar.AttachmentsRow';\n\n/** Default tile renderer for a single attachment. */\ninterface AttachmentProps extends React.ComponentPropsWithoutRef<'div'> {\n attachment: ChatbarAttachment;\n asChild?: boolean;\n}\n\nconst STATUS_LABEL: Partial<Record<AttachmentStatus, string>> = { uploading: 'uploading', error: 'failed to upload' };\n\nconst Attachment = React.forwardRef<HTMLDivElement, AttachmentProps>((props, forwardedRef) => {\n const { attachment, asChild, className, children, ...divProps } = props;\n const ctx = useChatbarContext();\n const Comp = asChild ? Slot : 'div';\n const isImage = !!attachment.url && isImageLike(attachment.name, attachment.type);\n const sizeLabel = `${Math.ceil(attachment.size / 1024)} KB`;\n const statusLabel = attachment.status ? STATUS_LABEL[attachment.status] : undefined;\n const locked = ctx.disabled || ctx.readOnly;\n\n const handleRemove = (event: React.MouseEvent<HTMLButtonElement>) => {\n // Move focus before the tile unmounts so keyboard users are not dropped to <body>\n const tile = event.currentTarget.closest('[role=\"listitem\"]');\n const tiles = tile?.parentElement ? Array.from(tile.parentElement.children) : [];\n const index = tile ? tiles.indexOf(tile) : -1;\n const neighbour = tiles[index + 1] ?? tiles[index - 1];\n const nextButton = neighbour?.querySelector<HTMLButtonElement>('.rt-ChatbarAttachmentRemove');\n if (nextButton) nextButton.focus();\n else ctx.textareaRef.current?.focus({ preventScroll: true });\n ctx.removeAttachment(attachment.id);\n };\n\n return (\n <Comp\n {...divProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarAttachment', className)}\n role=\"listitem\"\n data-kind={isImage ? 'image' : 'file'}\n data-status={attachment.status}\n title={attachment.name}\n >\n {children ?? (\n <Flex align=\"center\" gap=\"2\" pr={!isImage ? '6' : undefined}>\n <div className=\"rt-ChatbarAttachmentPreview\" aria-hidden>\n {isImage ? <img className=\"rt-ChatbarAttachmentImage\" src={attachment.url} alt=\"\" /> : <FileTextIcon />}\n </div>\n {isImage ? (\n <VisuallyHidden>\n {attachment.name}, {sizeLabel}\n {statusLabel ? `, ${statusLabel}` : ''}\n </VisuallyHidden>\n ) : (\n <Flex direction=\"column\" gap=\"0\" minWidth=\"0\">\n <Text size={ctx.size} weight=\"medium\" truncate>\n {attachment.name}\n </Text>\n <Text size=\"1\" color={attachment.status === 'error' ? 'red' : 'gray'}>\n {sizeLabel}\n {statusLabel ? ` \u00B7 ${statusLabel}` : ''}\n </Text>\n </Flex>\n )}\n {!locked && (\n <IconButton\n className=\"rt-ChatbarAttachmentRemove\"\n aria-label={`Remove ${attachment.name}`}\n size=\"1\"\n variant=\"classic\"\n highContrast\n color=\"gray\"\n onClick={handleRemove}\n >\n <CloseIcon />\n </IconButton>\n )}\n </Flex>\n )}\n </Comp>\n );\n});\nAttachment.displayName = 'Chatbar.Attachment';\n\ninterface AttachTriggerProps extends React.ComponentPropsWithoutRef<'button'> {\n asChild?: boolean;\n /** Overrides Root `accept` for files chosen through this trigger */\n accept?: string | string[];\n multiple?: boolean;\n}\n\nconst AttachTrigger = React.forwardRef<HTMLButtonElement, AttachTriggerProps>((props, forwardedRef) => {\n const { asChild, accept, multiple, disabled: disabledProp, onPointerDown, onClick, ...buttonProps } = props;\n const ctx = useChatbarContext();\n const disabled = disabledProp || ctx.disabled || ctx.readOnly;\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n {...buttonProps}\n ref={forwardedRef}\n className={classNames('rt-ChatbarAttachTrigger', buttonProps.className)}\n type={buttonProps.type ?? 'button'}\n aria-label={buttonProps['aria-label'] ?? 'Add attachments'}\n disabled={disabled}\n onPointerDown={(event: React.PointerEvent<HTMLButtonElement>) => {\n onPointerDown?.(event);\n if (!disabled && !event.defaultPrevented) ctx.beginFilePickerPress();\n }}\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (disabled || event.defaultPrevented) return;\n ctx.openFilePicker({ accept, multiple });\n }}\n />\n );\n});\nAttachTrigger.displayName = 'Chatbar.AttachTrigger';\n\ninterface RowProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {\n asChild?: boolean;\n children?: React.ReactNode;\n}\n\nconst Row = React.forwardRef<HTMLDivElement, RowProps>((props, forwardedRef) => {\n const { asChild, children, className, ...divProps } = props;\n const ctx = useChatbarContext();\n if (!ctx.open) return null;\n const Comp = asChild ? Slot : 'div';\n return (\n <m.div layout=\"position\" transition={LAYOUT_TRANSITION}>\n <Comp {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRow', className)}>\n <Flex align=\"center\" justify=\"between\" width=\"100%\">\n {children}\n </Flex>\n </Comp>\n </m.div>\n );\n});\nRow.displayName = 'Chatbar.Row';\n\ntype RowSlotProps = React.ComponentPropsWithoutRef<'div'>;\n\nconst RowStart = React.forwardRef<HTMLDivElement, RowSlotProps>((props, forwardedRef) => {\n const { className, ...divProps } = props;\n return <div {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRowStart', className)} />;\n});\nRowStart.displayName = 'Chatbar.RowStart';\n\nconst RowEnd = React.forwardRef<HTMLDivElement, RowSlotProps>((props, forwardedRef) => {\n const { className, ...divProps } = props;\n return <div {...divProps} ref={forwardedRef} className={classNames('rt-ChatbarRowEnd', className)} />;\n});\nRowEnd.displayName = 'Chatbar.RowEnd';\n\ntype SendProps = Omit<IconButtonProps, 'aria-label' | 'aria-labelledby'> & {\n /** Optional override for accessible name. Defaults to \"Send\". */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n asChild?: boolean;\n /** Clear message and attachments after sending. Defaults to Root `clearOnSubmit`. */\n clearOnSend?: boolean;\n};\n\nconst Send = React.forwardRef<HTMLButtonElement, SendProps>((props, forwardedRef) => {\n const {\n asChild,\n clearOnSend,\n disabled,\n children,\n style,\n className,\n size: sizeProp,\n variant: variantProp,\n tabIndex,\n onClick,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...buttonProps\n } = props;\n const ctx = useChatbarContext();\n const value = React.useContext(ChatbarValueContext);\n\n if (ctx.sendMode === 'never') return null;\n\n const hasContent = hasText(value) || ctx.attachments.length > 0;\n const visible = ctx.sendMode === 'always' || hasContent;\n const inactive = disabled || ctx.disabled || ctx.readOnly || !hasContent;\n\n const labelProps: { 'aria-label': string } | { 'aria-labelledby': string } = ariaLabelledby\n ? { 'aria-labelledby': ariaLabelledby }\n : { 'aria-label': ariaLabel ?? 'Send' };\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented || inactive) return;\n const clear = clearOnSend ?? ctx.clearOnSubmit;\n // Clearing hides and disables this button; keep keyboard focus in the composer\n if (ctx.submit(clear) && clear) ctx.textareaRef.current?.focus({ preventScroll: true });\n };\n\n return (\n <IconButton\n {...buttonProps}\n ref={forwardedRef}\n size={sizeProp ?? ctx.size}\n variant={variantProp ?? (ctx.open ? 'solid' : 'ghost')}\n disabled={inactive}\n className={classNames('rt-ChatbarSend', className)}\n style={{ opacity: visible ? 1 : 0, pointerEvents: visible ? undefined : 'none', ...style }}\n // Hidden Send must not be reachable by keyboard or announced\n aria-hidden={visible ? undefined : true}\n tabIndex={visible ? tabIndex : -1}\n asChild={asChild}\n onClick={handleClick}\n {...labelProps}\n >\n {children ?? (\n <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>\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n )}\n </IconButton>\n );\n});\nSend.displayName = 'Chatbar.Send';\n\nexport { Root, Textarea, InlineStart, InlineEnd, AttachmentsRow, Attachment, AttachTrigger, Row, RowStart, RowEnd, Send };\nexport type {\n RootProps as ChatbarRootProps,\n TextareaProps as ChatbarTextareaProps,\n InlineSlotProps as ChatbarInlineSlotProps,\n AttachmentsRowProps as ChatbarAttachmentsRowProps,\n AttachmentProps as ChatbarAttachmentProps,\n AttachTriggerProps as ChatbarAttachTriggerProps,\n RowProps as ChatbarRowProps,\n RowSlotProps as ChatbarRowSlotProps,\n SendProps as ChatbarSendProps,\n ChatbarAttachment,\n ChatbarAttachmentRejection,\n ChatbarRejectReason,\n ChatbarSubmitPayload,\n AttachmentStatus as ChatbarAttachmentStatus,\n ExpandOn as ChatbarExpandOn,\n SendMode as ChatbarSendMode,\n};\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { BaseButton } from './_internal/base-button.js';\nimport { Tooltip } from './tooltip.js';\nimport { useTooltipWrapper } from '../hooks/use-tooltip-wrapper.js';\nimport type { BaseButtonProps } from './_internal/base-button.js';\n\ntype IconButtonElement = React.ElementRef<typeof BaseButton>;\n\n/**\n * Required accessibility props for icon buttons\n * Icon buttons must have an accessible name to meet WCAG guidelines\n *\n * Three ways to provide accessibility:\n * 1. aria-label: Direct descriptive text\n * 2. aria-labelledby: Reference to a label element\n * 3. children: Visible text content (fallback)\n */\ntype AccessibilityProps =\n | { 'aria-label': string; 'aria-labelledby'?: never }\n | { 'aria-label'?: never; 'aria-labelledby': string }\n | { 'aria-label'?: never; 'aria-labelledby'?: never; children: React.ReactNode };\n\n/**\n * Tooltip configuration props that can be passed to IconButton\n * These props are forwarded to the underlying Tooltip component\n */\ninterface IconButtonTooltipProps {\n /** Content to display in the tooltip on hover/focus */\n tooltip?: React.ReactNode;\n /** Side of the button where the tooltip should appear */\n tooltipSide?: 'top' | 'right' | 'bottom' | 'left';\n /** Alignment of the tooltip relative to the button */\n tooltipAlign?: 'start' | 'center' | 'end';\n /** Delay before showing the tooltip (in milliseconds) */\n tooltipDelayDuration?: number;\n /** Whether to disable hoverable content behavior */\n tooltipDisableHoverableContent?: boolean;\n}\n\n/**\n * Core IconButton props excluding the 'as' prop for polymorphic behavior\n * Combines BaseButton props with accessibility requirements and tooltip functionality\n */\ntype IconButtonOwnProps = Omit<BaseButtonProps, 'as'> & AccessibilityProps & IconButtonTooltipProps;\n\n/**\n * Polymorphic IconButton props that support rendering as different HTML elements\n * @template C - The element type to render as (defaults to 'button')\n */\ntype IconButtonProps<C extends React.ElementType = 'button'> = IconButtonOwnProps & {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & Omit<React.ComponentPropsWithoutRef<C>, keyof IconButtonOwnProps>;\n\n/**\n * IconButton component type that supports polymorphic rendering\n * @template C - The element type to render as\n */\ntype IconButtonComponent = <C extends React.ElementType = 'button'>(props: IconButtonProps<C> & { ref?: React.ForwardedRef<IconButtonElement> }) => React.ReactElement | null;\n\n/**\n * IconButton component for compact, accessible icon-only interactions\n *\n * The IconButton component extends Button with specialized behavior for visual symbols.\n * It enforces accessibility requirements, provides automatic square sizing, and includes\n * built-in tooltip integration. Icon buttons are essential for space-efficient interfaces\n * while maintaining accessibility compliance.\n *\n * Key features:\n * - Enforced accessibility requirements (aria-label, aria-labelledby, or children)\n * - Automatic square aspect ratios for consistent visual alignment\n * - Built-in tooltip support for context and guidance\n * - Same variant and size system as Button for consistency\n * - Runtime validation for accessibility compliance\n *\n * @example\n * ```tsx\n * // Basic icon button with aria-label\n * <IconButton aria-label=\"Settings\">\n * <Settings />\n * </IconButton>\n *\n * // Icon button with tooltip\n * <IconButton aria-label=\"Save\" tooltip=\"Save your progress\">\n * <Save />\n * </IconButton>\n *\n * // Icon button with aria-labelledby\n * <IconButton aria-labelledby=\"settings-label\">\n * <Settings />\n * </IconButton>\n * <span id=\"settings-label\">Open settings panel</span>\n *\n * // Icon button with visible text (fallback)\n * <IconButton>\n * <Settings />\n * Settings\n * </IconButton>\n * ```\n */\nconst IconButton = React.forwardRef(\n (\n { className, tooltip, tooltipSide = 'top', tooltipAlign = 'center', tooltipDelayDuration, tooltipDisableHoverableContent, ...props }: IconButtonProps,\n forwardedRef: React.ForwardedRef<IconButtonElement>,\n ) => {\n // Use shared tooltip wrapper hook for accessibility props\n const { tooltipId, hasTooltip, accessibilityProps: tooltipAccessibilityProps } = useTooltipWrapper(tooltip);\n\n // Runtime accessibility validation to ensure WCAG compliance\n // This helps catch accessibility issues during development\n const hasAriaLabel = 'aria-label' in props && props['aria-label'];\n const hasAriaLabelledBy = 'aria-labelledby' in props && props['aria-labelledby'];\n const hasChildren = 'children' in props && props.children;\n\n // Validate accessible name - throw in development, log error in production\n if (!hasAriaLabel && !hasAriaLabelledBy && !hasChildren) {\n const errorMessage =\n 'IconButton: Icon buttons must have an accessible name. Please provide either:' +\n '\\n- aria-label prop with descriptive text' +\n '\\n- aria-labelledby prop referencing a label element' +\n '\\n- or visible text children';\n\n if (process.env.NODE_ENV === 'development') {\n throw new Error(errorMessage);\n } else {\n console.error(errorMessage);\n }\n }\n\n // Create the base icon button element with accessibility props\n const iconButton = <BaseButton {...props} {...tooltipAccessibilityProps} ref={forwardedRef} className={classNames('rt-IconButton', className)} />;\n\n // If no tooltip is provided, return the icon button as-is for better performance\n if (!hasTooltip) {\n return iconButton;\n }\n\n // Wrap with Tooltip when tooltip content is provided\n // This creates a compound component that handles both button and tooltip functionality\n return (\n <Tooltip content={tooltip} side={tooltipSide} align={tooltipAlign} delayDuration={tooltipDelayDuration} disableHoverableContent={tooltipDisableHoverableContent} id={tooltipId}>\n {iconButton}\n </Tooltip>\n );\n },\n) as IconButtonComponent & { displayName?: string };\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton };\nexport type { IconButtonProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Slot } from 'radix-ui';\n\nimport { baseButtonPropDefs } from './base-button.props.js';\nimport { Flex } from '../flex.js';\nimport { Spinner } from '../spinner.js';\nimport { VisuallyHidden } from '../visually-hidden.js';\nimport { extractProps } from '../../helpers/extract-props.js';\nimport { useDeprecatedPanelBackgroundWarning } from '../../helpers/use-deprecation-warning.js';\nimport { mapResponsiveProp, mapButtonSizeToSpinnerSize } from '../../helpers/map-prop-values.js';\nimport { marginPropDefs } from '../../props/margin.props.js';\n\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\ntype BaseButtonElement = React.ElementRef<'button'>;\ntype BaseButtonOwnProps = GetPropDefTypes<typeof baseButtonPropDefs>;\n\n/**\n * Polymorphic BaseButton props that support rendering as different HTML elements\n * Uses the proper ComponentPropsWithout pattern for type safety\n * @template C - The element type to render as (defaults to 'button')\n */\ntype PolymorphicBaseButtonProps<C extends React.ElementType = 'button'> = {\n /** Element type to render as (e.g., 'a', 'span', etc.) */\n as?: C;\n} & BaseButtonOwnProps &\n MarginProps &\n ComponentPropsWithout<C, RemovedProps | keyof BaseButtonOwnProps | keyof MarginProps | 'as'>;\n\n/**\n * BaseButton props interface that combines all available props\n */\ninterface BaseButtonProps extends PolymorphicBaseButtonProps {}\n\n/**\n * BaseButton component that provides the core button functionality\n *\n * This is the foundational button component that handles all the complex logic\n * including loading states, accessibility, performance optimizations, and\n * polymorphic rendering. It's used by Button, IconButton, and other button\n * variants to ensure consistent behavior across the design system.\n *\n * Key features:\n * - Loading state with spinner and accessibility announcements\n * - Performance optimizations for backdrop-filter effects\n * - Comprehensive accessibility support\n * - Polymorphic rendering support\n * - Material/panel background handling\n *\n * @example\n * ```tsx\n * // Basic usage\n * <BaseButton>Click me</BaseButton>\n *\n * // With loading state\n * <BaseButton loading>Processing...</BaseButton>\n *\n * // Polymorphic rendering\n * <BaseButton as=\"a\" href=\"/link\">Link Button</BaseButton>\n * ```\n */\nconst BaseButton = React.forwardRef<BaseButtonElement, BaseButtonProps>((props, forwardedRef) => {\n const { size = baseButtonPropDefs.size.default } = props;\n\n // Extract button-specific props from the combined props object\n const {\n className,\n children,\n asChild,\n as,\n color,\n radius,\n material,\n panelBackground,\n flush,\n disabled = props.loading, // Loading state automatically disables the button\n ...baseButtonProps\n } = extractProps(props, baseButtonPropDefs, marginPropDefs);\n\n useDeprecatedPanelBackgroundWarning(props.panelBackground);\n\n // Material takes precedence over panelBackground for backward compatibility\n const effectiveMaterial = material ?? panelBackground;\n\n // asChild takes precedence over as prop for Radix Slot integration\n // When asChild is true, we use Slot.Root to merge props onto the child element\n // When asChild is false, we render as the specified element (or button by default)\n const Comp = asChild ? Slot.Root : (as || 'button');\n\n // Only pass disabled for elements that support it\n // This prevents invalid HTML attributes on unsupported elements\n const shouldPassDisabled = asChild || !as || ['button', 'input', 'textarea', 'select'].includes(as);\n\n // Determine if we are rendering a real <button> element so we can set a safe\n // default type. Native <button> defaults to type=\"submit\" which can cause\n // accidental form submissions. We default to type=\"button\" unless the user\n // explicitly provided a type or we're using asChild (unknown underlying node).\n const isNativeButtonElement = !asChild && (!as || as === 'button');\n const hasExplicitTypeAttribute = 'type' in (baseButtonProps as Record<string, unknown>);\n\n // Generate unique ID for loading announcements\n const loadingId = React.useId();\n const describedById = props.loading ? `${loadingId}-loading` : undefined;\n\n // Extract button text for accessibility announcements\n const buttonText = React.useMemo(() => {\n if (typeof children === 'string') return children;\n if (React.isValidElement(children) && typeof (children.props as any)?.children === 'string') {\n return (children.props as any).children;\n }\n return 'button';\n }, [children]);\n\n // Enhanced accessibility props for loading state\n // These ensure screen readers announce the loading state properly\n const accessibilityProps = React.useMemo(() => {\n if (props.loading) {\n return {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'aria-describedby': describedById,\n 'aria-label': `${buttonText} (loading)`,\n };\n }\n return {};\n }, [props.loading, describedById, buttonText]);\n\n return (\n <Comp\n // The `data-disabled` attribute enables correct styles when doing `<Button asChild disabled>`\n data-disabled={disabled || undefined}\n data-accent-color={color}\n data-radius={radius}\n data-material={effectiveMaterial}\n data-panel-background={effectiveMaterial}\n data-flush={flush ? 'true' : undefined}\n {...baseButtonProps}\n {...accessibilityProps}\n ref={forwardedRef}\n className={classNames('rt-reset', 'rt-BaseButton', className)}\n {...(shouldPassDisabled && { disabled })}\n {...(isNativeButtonElement && !hasExplicitTypeAttribute ? { type: 'button' } : {})}\n >\n {props.loading ? (\n <>\n {/**\n * We need a wrapper to set `visibility: hidden` to hide the button content whilst we show the `Spinner`.\n * The button is a flex container with a `gap`, so we use `display: contents` to ensure the correct flex layout.\n *\n * However, `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden` and re-add it in the tree with `VisuallyHidden`\n */}\n <span style={{ display: 'contents', visibility: 'hidden' }} aria-hidden>\n {children}\n </span>\n\n {/* Enhanced accessibility for loading state */}\n <VisuallyHidden>\n <span id={describedById}>{buttonText} is loading, please wait...</span>\n {children}\n </VisuallyHidden>\n\n {/* Centered spinner overlay during loading state */}\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>\n <Spinner size={mapResponsiveProp(size, mapButtonSizeToSpinnerSize)} aria-hidden=\"true\" />\n </span>\n </Flex>\n </>\n ) : (\n children\n )}\n </Comp>\n );\n});\nBaseButton.displayName = 'BaseButton';\n\nexport { BaseButton };\nexport type { BaseButtonProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Defines accent color for descendant text components\u00A0with `highContrast={true}`.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst highContrastPropDef = {\n highContrast: {\n type: 'boolean',\n className: 'rt-high-contrast',\n default: undefined,\n },\n} satisfies {\n highContrast: PropDef<boolean>;\n};\n\nexport { highContrastPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n", "import { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { highContrastPropDef } from '../../props/high-contrast.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 24px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - classic: Premium, sophisticated appearance\n * - solid: Primary actions that should be noticed first\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['classic', 'solid', 'soft', 'surface', 'outline', 'ghost', 'override'] as const;\n\n/**\n * Available panel background options (deprecated)\n * @deprecated Use `materials` instead\n */\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\n/**\n * Available material options for visual rendering\n * - solid: Opaque backgrounds and borders\n * - translucent: Elevated effects with depth and visual separation\n */\nconst materials = ['solid', 'translucent'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button, IconButton, etc.)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Material system for visual depth and elevation\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * \n * // Button with material and high contrast\n * <BaseButton material=\"translucent\" highContrast>Elevated Button</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid' },\n ...accentColorPropDef,\n ...highContrastPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n */\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { layoutPropDefs } from '../props/layout.props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { Slot } from './slot.js';\nimport { flexPropDefs } from './flex.props.js';\n\nimport type { FlexOwnProps } from './flex.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { LayoutProps } from '../props/layout.props.js';\nimport type { MarginProps } from '../props/margin.props.js';\n\ntype FlexElement = React.ElementRef<'div'>;\ninterface CommonFlexProps extends MarginProps, LayoutProps, FlexOwnProps {}\ntype FlexDivProps = { as?: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype FlexSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype FlexProps = CommonFlexProps & (FlexSpanProps | FlexDivProps);\n\nconst Flex = React.forwardRef<FlexElement, FlexProps>((props, forwardedRef) => {\n const {\n className,\n asChild,\n as: Tag = 'div',\n ...flexProps\n } = extractProps(props, flexPropDefs, layoutPropDefs, marginPropDefs);\n const Comp = asChild ? Slot : Tag;\n return <Comp {...flexProps} ref={forwardedRef} className={classNames('rt-Flex', className)} />;\n});\nFlex.displayName = 'Flex';\n\nexport { Flex };\nexport type { FlexProps };\n", "import classNames from 'classnames';\n\nimport { getCompiledPropDefs } from './compile-prop-defs.js';\nimport { getResponsiveClassNames, getResponsiveStyles } from './get-responsive-styles.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\nimport { mergeStyles } from './merge-styles.js';\n\nimport type { CompiledPropDef } from './compile-prop-defs.js';\nimport type * as React from 'react';\nimport type { PropDef } from '../props/prop-def.js';\n\ntype PropDefsWithClassName<T> = T extends Record<string, PropDef> ? { [K in keyof T]: T[K] extends { className: string } ? K : never }[keyof T] : never;\n\ntype ResponsiveValue = Record<string, string | undefined>;\n\n/**\n * Fills in the `initial` breakpoint of a responsive value from the prop def's\n * default, and coerces an invalid `initial` enum value back to that default.\n *\n * Returns the value untouched when nothing needs changing, and a copy otherwise\n * \u2014 callers routinely hoist responsive objects to module scope, so mutating the\n * caller's object would corrupt it for every later render.\n */\nfunction normalizeResponsiveValue(value: ResponsiveValue, propDef: CompiledPropDef) {\n let initial = value.initial;\n let changed = false;\n\n if (propDef.hasDefault && initial === undefined) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(initial)) {\n initial = propDef.default as string | undefined;\n changed = true;\n }\n\n return changed ? { ...value, initial } : value;\n}\n\n/**\n * Takes props, checks them against prop defs that have a `className` on them,\n * adds necessary CSS classes and inline styles, and returns the props without\n * the corresponding prop defs that were used to formulate the new `className`\n * and `style` values. Also applies prop def defaults to every prop.\n */\nfunction extractProps<P extends { className?: string; style?: React.CSSProperties; [key: string]: any }, T extends Record<string, PropDef>[]>(\n props: P,\n ...propDefs: T\n): Omit<P & { className?: string; style?: React.CSSProperties }, PropDefsWithClassName<T[number]>> {\n const { styling, passthrough, stylingKeys } = getCompiledPropDefs(propDefs);\n\n // Copy the props that survive to the element rather than spreading and then\n // deleting the styling keys. Deleting off a spread demotes the object to\n // dictionary mode in V8, and this object is on the render path of every\n // component in the library.\n const extractedProps: Record<string, any> = {};\n for (const key in props) {\n if (stylingKeys.has(key)) continue;\n extractedProps[key] = props[key];\n }\n\n for (let i = 0; i < passthrough.length; i++) {\n const propDef = passthrough[i];\n const value = extractedProps[propDef.key];\n\n if (value === undefined) {\n if (propDef.hasDefault) extractedProps[propDef.key] = propDef.default;\n continue;\n }\n\n // Fall back to the default when the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n extractedProps[propDef.key] = propDef.default;\n }\n }\n\n let style: ReturnType<typeof mergeStyles>;\n const classes: string[] = [];\n\n for (let i = 0; i < styling.length; i++) {\n const propDef = styling[i];\n let value = props[propDef.key];\n\n // Apply prop def defaults\n if (value === undefined && propDef.hasDefault) {\n value = propDef.default;\n }\n\n // Apply the default value if the value is not a valid enum value\n if (propDef.enumValueSet !== undefined && !propDef.enumValueSet.has(value) && !isResponsiveObject(value)) {\n value = propDef.default;\n }\n\n if (!value) continue;\n\n if (isResponsiveObject(value)) {\n // Make sure we are not threading through responsive values for non-responsive prop defs\n if (!propDef.responsive) continue;\n value = normalizeResponsiveValue(value, propDef);\n }\n\n if (propDef.type === 'enum') {\n const propClassName = getResponsiveClassNames({\n allowArbitraryValues: false,\n value,\n className: propDef.className!,\n propValues: propDef.values,\n propValueSet: propDef.valueSet,\n parseValue: propDef.parseValue,\n });\n\n if (propClassName) classes.push(propClassName);\n continue;\n }\n\n if (propDef.type === 'string' || propDef.type === 'enum | string') {\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className: propDef.className!,\n customProperties: propDef.customProperties!,\n // `string` prop defs have no enum values, so every value is arbitrary\n propValues: propDef.type === 'string' ? [] : propDef.values,\n propValueSet: propDef.type === 'string' ? undefined : propDef.valueSet,\n parseValue: propDef.parseValue,\n value,\n });\n\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n if (propClassNames) classes.push(propClassNames);\n continue;\n }\n\n if (propDef.type === 'boolean') {\n // TODO handle responsive boolean props\n classes.push(propDef.className!);\n continue;\n }\n }\n\n extractedProps.className = classNames(classes.length > 0 ? classes.join(' ') : undefined, props.className);\n extractedProps.style = mergeStyles(style, props.style);\n return extractedProps as ReturnType<typeof extractProps<P, T>>;\n}\n\nexport { extractProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\n/**\n * A prop def pre-processed into the exact shape `extractProps` needs at render\n * time. Everything that can be derived from the static prop def \u2014 enum\n * membership sets, whether the def is responsive, whether it carries a default\n * \u2014 is computed once here instead of on every render.\n */\ninterface CompiledPropDef {\n key: string;\n type: PropDef['type'];\n default: unknown;\n hasDefault: boolean;\n responsive: boolean;\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n /** The prop def's own enum values, kept for the responsive class name helpers. */\n values: readonly string[];\n /** O(1) membership for `values`. */\n valueSet: ReadonlySet<string>;\n /**\n * `values` plus the default, used to coerce invalid enum values back to the\n * default. Only present for `type: 'enum'` \u2014 `'enum | string'` props accept\n * arbitrary strings and must not be coerced.\n */\n enumValueSet?: ReadonlySet<unknown>;\n}\n\ninterface CompiledPropDefs {\n /** Defs that contribute a class name and/or custom properties. */\n styling: CompiledPropDef[];\n /**\n * Defs that pass through to the element but still need a default applied or\n * an invalid enum value coerced. Defs that can do neither are omitted\n * entirely \u2014 they are already correct as passed.\n */\n passthrough: CompiledPropDef[];\n /** Keys consumed by `styling`, so they can be skipped when copying props. */\n stylingKeys: ReadonlySet<string>;\n}\n\nconst EMPTY_VALUES: readonly string[] = [];\nconst EMPTY_SET: ReadonlySet<string> = new Set();\n\nfunction compile(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n const merged: Record<string, PropDef> = Object.assign({}, ...propDefs);\n const styling: CompiledPropDef[] = [];\n const passthrough: CompiledPropDef[] = [];\n const stylingKeys = new Set<string>();\n\n for (const key in merged) {\n // The PropDef union is narrowed per-field below; reading the optional\n // members off the union directly is what the runtime actually needs.\n const def = merged[key] as PropDef & {\n default?: unknown;\n values?: readonly string[];\n className?: string;\n customProperties?: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n responsive?: true;\n };\n\n const values = def.values ?? EMPTY_VALUES;\n const compiled: CompiledPropDef = {\n key,\n type: def.type,\n default: def.default,\n hasDefault: def.default !== undefined,\n responsive: 'responsive' in def,\n className: def.className,\n customProperties: def.customProperties,\n parseValue: def.parseValue,\n values,\n valueSet: values.length > 0 ? new Set(values) : EMPTY_SET,\n enumValueSet: def.type === 'enum' ? new Set<unknown>([def.default, ...values]) : undefined,\n };\n\n if (def.className) {\n styling.push(compiled);\n stylingKeys.add(key);\n } else if (compiled.hasDefault || def.type === 'enum') {\n // Anything else is copied through untouched, so there is nothing to do.\n passthrough.push(compiled);\n }\n }\n\n return { styling, passthrough, stylingKeys };\n}\n\ninterface CacheNode {\n children: WeakMap<object, CacheNode>;\n compiled?: CompiledPropDefs;\n}\n\nconst cacheRoot: CacheNode = { children: new WeakMap() };\n\n/**\n * Compiles a set of prop defs, memoized on the identity of the prop def objects\n * themselves. Components always pass the same module-level constants, so after\n * the first render of a given component this is a couple of WeakMap lookups\n * instead of merging 50-odd prop defs into a fresh object.\n */\nfunction getCompiledPropDefs(propDefs: readonly Record<string, PropDef>[]): CompiledPropDefs {\n let node = cacheRoot;\n\n for (let i = 0; i < propDefs.length; i++) {\n const propDef = propDefs[i];\n let child = node.children.get(propDef);\n if (child === undefined) {\n child = { children: new WeakMap() };\n node.children.set(propDef, child);\n }\n node = child;\n }\n\n return (node.compiled ??= compile(propDefs));\n}\n\nexport { getCompiledPropDefs };\nexport type { CompiledPropDef, CompiledPropDefs };\n", "import type React from 'react';\n\n// Creates a union type of string literals with strings, but retains intellisense for the literals.\n// Union<string, 'foo' | 'bar'> => string | Omit<string, 'foo' | 'bar'>\ntype Union<S = string, T extends string | number = string> = T | Omit<S, T>;\n\nconst breakpoints = ['initial', 'xs', 'sm', 'md', 'lg', 'xl'] as const;\nconst breakpointSet: Set<string> = new Set(breakpoints);\ntype Breakpoint = (typeof breakpoints)[number];\ntype Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\ntype BooleanPropDef = {\n type: 'boolean';\n default?: boolean;\n required?: boolean;\n className?: string;\n};\ntype StringPropDef = {\n type: 'string';\n default?: string;\n required?: boolean;\n};\ntype ReactNodePropDef = {\n type: 'ReactNode';\n default?: React.ReactNode;\n required?: boolean;\n};\ntype EnumPropDef<T> = {\n type: 'enum';\n values: readonly T[];\n default?: T;\n required?: boolean;\n};\ntype EnumOrStringPropDef<T> = {\n type: 'enum | string';\n values: readonly T[];\n default?: T | string;\n required?: boolean;\n};\n\ntype NonStylingPropDef = {\n className?: never;\n customProperties?: never;\n parseValue?: never;\n};\n\ntype StylingPropDef = {\n className: string;\n parseValue?: (value: string) => string | undefined;\n};\n\ntype ArbitraryStylingPropDef = {\n className: string;\n customProperties: `--${string}`[];\n parseValue?: (value: string) => string | undefined;\n};\n\ntype RegularPropDef<T> =\n | ReactNodePropDef\n | BooleanPropDef\n | (StringPropDef & ArbitraryStylingPropDef)\n | (StringPropDef & NonStylingPropDef)\n | (EnumPropDef<T> & StylingPropDef)\n | (EnumPropDef<T> & NonStylingPropDef)\n | (EnumOrStringPropDef<T> & ArbitraryStylingPropDef)\n | (EnumOrStringPropDef<T> & NonStylingPropDef);\ntype ResponsivePropDef<T = any> = RegularPropDef<T> & { responsive: true };\ntype PropDef<T = any> = RegularPropDef<T> | ResponsivePropDef<T>;\n\n// prettier-ignore\ntype GetPropDefType<Def> =\n Def extends BooleanPropDef ? (Def extends ResponsivePropDef ? Responsive<boolean> : boolean)\n : Def extends StringPropDef ? (Def extends ResponsivePropDef ? Responsive<string> : string)\n : Def extends ReactNodePropDef ? (Def extends ResponsivePropDef ? Responsive<React.ReactNode> : React.ReactNode)\n : Def extends EnumOrStringPropDef<infer Type> ?\n Def extends ResponsivePropDef<infer Type extends string> ? Responsive<Union<string, Type>> : Type\n : Def extends EnumPropDef<infer Type> ? (Def extends ResponsivePropDef<infer Type> ? Responsive<Type> : Type)\n : never;\n\ntype GetPropDefTypes<P> = {\n [K in keyof P]?: GetPropDefType<P[K]>;\n};\n\nexport { breakpoints, breakpointSet };\nexport type {\n PropDef,\n GetPropDefTypes,\n ResponsivePropDef,\n //\n Breakpoint,\n Responsive,\n Union,\n};\n", "/** A util to check whether the object has a key, while inferring the correct key type */\nfunction hasOwnProperty<K extends string | number | symbol>(\n obj: Record<K, unknown>,\n key: string | number | symbol\n): key is K {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexport { hasOwnProperty };\n", "import type { Responsive, Breakpoint } from '../props/prop-def.js';\n\n// Use a Set for O(1) lookup instead of array.includes() which is O(n)\nconst breakpointSet = new Set<string>(['initial', 'xs', 'sm', 'md', 'lg', 'xl']);\n\nexport function isResponsiveObject<Value extends string>(\n obj: Responsive<Value | Omit<string, Value>> | undefined\n): obj is Record<Breakpoint, string> {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n // Use for...in to avoid Object.keys() array allocation\n for (const key in obj) {\n if (breakpointSet.has(key)) {\n return true;\n }\n }\n return false;\n}\n", "import { breakpointSet } from '../props/prop-def.js';\nimport { hasOwnProperty } from './has-own-property.js';\nimport { isResponsiveObject } from './is-responsive-object.js';\n\nimport type { Responsive, Union } from '../props/prop-def.js';\n\n/**\n * Membership test against a prop def's enum values. Callers that already hold a\n * compiled prop def pass `propValueSet` for an O(1) lookup; the handful of call\n * sites that build options inline fall back to scanning the array.\n */\nfunction includesValue(propValues: string[] | readonly string[], propValueSet: ReadonlySet<string> | undefined, value: string): boolean {\n return propValueSet !== undefined ? propValueSet.has(value) : propValues.includes(value);\n}\n\ninterface GetResponsiveStylesOptions {\n className: string;\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveStyles({ className, customProperties, ...args }: GetResponsiveStylesOptions) {\n const responsiveClassNames = getResponsiveClassNames({\n allowArbitraryValues: true,\n className,\n ...args,\n });\n\n const responsiveCustomProperties = getResponsiveCustomProperties({ customProperties, ...args });\n return [responsiveClassNames, responsiveCustomProperties] as const;\n}\n\ninterface GetResponsiveClassNamesOptions {\n allowArbitraryValues?: boolean;\n className: string;\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveClassNames({ allowArbitraryValues, value, className, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveClassNamesOptions): string | undefined {\n if (!value) {\n return undefined;\n }\n\n if (typeof value === 'string') {\n if (includesValue(propValues, propValueSet, value)) {\n return getBaseClassName(className, value, parseValue);\n }\n return allowArbitraryValues ? className : undefined;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n const classNames: string[] = [];\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n if (value !== undefined) {\n if (includesValue(propValues, propValueSet, value)) {\n const baseClassName = getBaseClassName(className, value, parseValue);\n const bpClassName = bp === 'initial' ? baseClassName : `${bp}:${baseClassName}`;\n classNames.push(bpClassName);\n } else if (allowArbitraryValues) {\n const bpClassName = bp === 'initial' ? className : `${bp}:${className}`;\n classNames.push(bpClassName);\n }\n }\n }\n\n return classNames.length > 0 ? classNames.join(' ') : '';\n }\n\n if (allowArbitraryValues) {\n return className;\n }\n}\n\nfunction getBaseClassName(className: string, value: string, parseValue: (value: string) => string | undefined): string {\n const delimiter = className ? '-' : '';\n const matchedValue = parseValue(value);\n const isNegative = matchedValue?.startsWith('-');\n const minus = isNegative ? '-' : '';\n const absoluteValue = isNegative ? matchedValue?.substring(1) : matchedValue;\n return `${minus}${className}${delimiter}${absoluteValue}`;\n}\n\ninterface GetResponsiveCustomPropertiesOptions {\n customProperties: `--${string}`[];\n value: Responsive<Union> | Responsive<string> | undefined;\n propValues: string[] | readonly string[];\n propValueSet?: ReadonlySet<string>;\n parseValue?: (value: string) => string | undefined;\n}\n\nfunction getResponsiveCustomProperties({ customProperties, value, propValues, propValueSet, parseValue = (value) => value }: GetResponsiveCustomPropertiesOptions) {\n // Don't generate custom properties if the value is not arbitrary\n if (!value || (typeof value === 'string' && includesValue(propValues, propValueSet, value))) {\n return undefined;\n }\n\n let styles: Record<string, string | undefined> | undefined;\n\n if (typeof value === 'string') {\n const parsed = parseValue(value);\n styles = {};\n for (const customProperty of customProperties) {\n styles[customProperty] = parsed;\n }\n return styles;\n }\n\n if (isResponsiveObject(value)) {\n const object = value;\n\n for (const bp in object) {\n // Make sure we are not iterating over keys that aren't breakpoints\n if (!hasOwnProperty(object, bp) || !breakpointSet.has(bp)) {\n continue;\n }\n\n const value = object[bp];\n\n // Don't generate a custom property if the value is not arbitrary\n if (value === undefined || includesValue(propValues, propValueSet, value)) {\n continue;\n }\n\n const parsed = parseValue(value);\n styles ??= {};\n for (const customProperty of customProperties) {\n const bpProperty = bp === 'initial' ? customProperty : `${customProperty}-${bp}`;\n styles[bpProperty] = parsed;\n }\n }\n }\n\n return styles ?? {};\n}\n\nexport { getResponsiveStyles, getResponsiveCustomProperties, getResponsiveClassNames };\n", "type InlineStyle =\n | React.CSSProperties\n | Record<string, string | number | null | undefined>\n | undefined;\n\n// Merges CSS styles like `classNames` merges CSS classes\n// Optimized to avoid object spread in loop - uses Object.assign for in-place mutation\nexport function mergeStyles(...styles: Array<InlineStyle>): InlineStyle {\n let result: Record<string, string | number | null | undefined> | undefined;\n\n for (const style of styles) {\n if (style) {\n if (result === undefined) {\n // First non-empty style - create result object\n result = {};\n }\n Object.assign(result, style);\n }\n }\n\n return result;\n}\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst paddingValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst paddingPropDefs = {\n /**\n * Sets the CSS **padding** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * p=\"4\"\n * p=\"100px\"\n * p={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding\n */\n p: {\n type: 'enum | string',\n className: 'rt-r-p',\n customProperties: ['--p'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** and **padding-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * px=\"4\"\n * px=\"100px\"\n * px={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n px: {\n type: 'enum | string',\n className: 'rt-r-px',\n customProperties: ['--pl', '--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** and **padding-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * py=\"4\"\n * py=\"100px\"\n * py={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n py: {\n type: 'enum | string',\n className: 'rt-r-py',\n customProperties: ['--pt', '--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pt=\"4\"\n * pt=\"100px\"\n * pt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top\n */\n pt: {\n type: 'enum | string',\n className: 'rt-r-pt',\n customProperties: ['--pt'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pr=\"4\"\n * pr=\"100px\"\n * pr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right\n */\n pr: {\n type: 'enum | string',\n className: 'rt-r-pr',\n customProperties: ['--pr'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pb=\"4\"\n * pb=\"100px\"\n * pb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom\n */\n pb: {\n type: 'enum | string',\n className: 'rt-r-pb',\n customProperties: ['--pb'],\n values: paddingValues,\n responsive: true,\n },\n /**\n * Sets the CSS **padding-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * pl=\"4\"\n * pl=\"100px\"\n * pl={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left\n */\n pl: {\n type: 'enum | string',\n className: 'rt-r-pl',\n customProperties: ['--pl'],\n values: paddingValues,\n responsive: true,\n },\n} satisfies {\n p: PropDef<(typeof paddingValues)[number]>;\n px: PropDef<(typeof paddingValues)[number]>;\n py: PropDef<(typeof paddingValues)[number]>;\n pt: PropDef<(typeof paddingValues)[number]>;\n pr: PropDef<(typeof paddingValues)[number]>;\n pb: PropDef<(typeof paddingValues)[number]>;\n pl: PropDef<(typeof paddingValues)[number]>;\n};\n\ntype PaddingProps = GetPropDefTypes<typeof paddingPropDefs>;\n\nexport { paddingPropDefs };\nexport type { PaddingProps };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst heightPropDefs = {\n /**\n * Sets the CSS **height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * height=\"100px\"\n * height={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/height\n */\n height: {\n type: 'string',\n className: 'rt-r-h',\n customProperties: ['--height'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minHeight=\"100px\"\n * minHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-height\n */\n minHeight: {\n type: 'string',\n className: 'rt-r-min-h',\n customProperties: ['--min-height'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-height** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxHeight=\"100px\"\n * maxHeight={{ md: '100vh', xl: '600px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-height\n */\n maxHeight: {\n type: 'string',\n className: 'rt-r-max-h',\n customProperties: ['--max-height'],\n responsive: true,\n },\n} satisfies {\n height: PropDef<string>;\n minHeight: PropDef<string>;\n maxHeight: PropDef<string>;\n};\n\ntype HeightProps = GetPropDefTypes<typeof heightPropDefs>;\n\nexport { heightPropDefs };\nexport type { HeightProps };\n", "import type { GetPropDefTypes, PropDef } from './prop-def.js';\n\nconst widthPropDefs = {\n /**\n * Sets the CSS **width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * width=\"100px\"\n * width={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/width\n */\n width: {\n type: 'string',\n className: 'rt-r-w',\n customProperties: ['--width'],\n responsive: true,\n },\n /**\n * Sets the CSS **min-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * minWidth=\"100px\"\n * minWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/min-width\n */\n minWidth: {\n type: 'string',\n className: 'rt-r-min-w',\n customProperties: ['--min-width'],\n responsive: true,\n },\n /**\n * Sets the CSS **max-width** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * maxWidth=\"100px\"\n * maxWidth={{ md: '100vw', xl: '1400px' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/max-width\n */\n maxWidth: {\n type: 'string',\n className: 'rt-r-max-w',\n customProperties: ['--max-width'],\n responsive: true,\n },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n};\n\ntype WidthProps = GetPropDefTypes<typeof widthPropDefs>;\n\nexport { widthPropDefs };\nexport type { WidthProps };\n", "import { paddingPropDefs } from './padding.props.js';\nimport { heightPropDefs } from './height.props.js';\nimport { widthPropDefs } from './width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from './prop-def.js';\n\nconst overflowValues = ['visible', 'hidden', 'clip', 'scroll', 'auto'] as const;\nconst positionValues = ['static', 'relative', 'absolute', 'fixed', 'sticky'] as const;\n// prettier-ignore\nconst positionEdgeValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9'] as const;\nconst flexShrinkValues = ['0', '1'] as const;\nconst flexGrowValues = ['0', '1'] as const;\nconst alignSelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifySelfValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\n\nconst layoutPropDefs = {\n ...paddingPropDefs,\n ...widthPropDefs,\n ...heightPropDefs,\n /**\n * Sets the CSS **position** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * position=\"absolute\"\n * position={{ sm: 'absolute', lg: 'sticky' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/position\n */\n position: {\n type: 'enum',\n className: 'rt-r-position',\n values: positionValues,\n responsive: true,\n },\n /**\n * Sets the CSS **inset** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * inset=\"4\"\n * inset=\"100px\"\n * inset={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/inset\n */\n inset: {\n type: 'enum | string',\n className: 'rt-r-inset',\n customProperties: ['--inset'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * top=\"4\"\n * top=\"100px\"\n * top={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/top\n */\n top: {\n type: 'enum | string',\n className: 'rt-r-top',\n customProperties: ['--top'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * right=\"4\"\n * right=\"100px\"\n * right={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/right\n */\n right: {\n type: 'enum | string',\n className: 'rt-r-right',\n customProperties: ['--right'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * bottom=\"4\"\n * bottom=\"100px\"\n * bottom={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/bottom\n */\n bottom: {\n type: 'enum | string',\n className: 'rt-r-bottom',\n customProperties: ['--bottom'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * left=\"4\"\n * left=\"100px\"\n * left={{ sm: '0', lg: '50%' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/left\n */\n left: {\n type: 'enum | string',\n className: 'rt-r-left',\n customProperties: ['--left'],\n values: positionEdgeValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflow=\"hidden\"\n * overflow={{ sm: 'hidden', lg: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflow: {\n type: 'enum',\n className: 'rt-r-overflow',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-x** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowX=\"hidden\"\n * overflowX={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowX: {\n type: 'enum',\n className: 'rt-r-ox',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **overflow-y** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * overflowY=\"hidden\"\n * overflowY={{ sm: 'hidden', md: 'visible' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflow\n */\n overflowY: {\n type: 'enum',\n className: 'rt-r-oy',\n values: overflowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-basis** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexBasis=\"0\"\n * flexBasis=\"100%\"\n * flexBasis={{ sm: '200px', lg: 'auto' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis\n */\n flexBasis: {\n type: 'string',\n className: 'rt-r-fb',\n customProperties: ['--flex-basis'],\n responsive: true,\n },\n /**\n * Sets the CSS **flex-shrink** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexShrink=\"0\"\n * flexShrink=\"1\"\n * flexShrink={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink\n */\n flexShrink: {\n type: 'enum | string',\n className: 'rt-r-fs',\n customProperties: ['--flex-shrink'],\n values: flexShrinkValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-grow** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * flexGrow=\"0\"\n * flexGrow=\"1\"\n * flexGrow={{ sm: '0', lg: '1' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow\n */\n flexGrow: {\n type: 'enum | string',\n className: 'rt-r-fg',\n customProperties: ['--flex-grow'],\n values: flexGrowValues,\n responsive: true,\n },\n /**\n * Sets the CSS **grid-area** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridArea=\"header\"\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area\n */\n gridArea: {\n type: 'string',\n className: 'rt-r-ga',\n customProperties: ['--grid-area'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumn=\"1\"\n * gridColumn=\"1 / -1\"\n * gridColumn={{ sm: '1 / 3', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column\n */\n gridColumn: {\n type: 'string',\n className: 'rt-r-gc',\n customProperties: ['--grid-column'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnStart=\"1\"\n * gridColumnStart=\"auto\"\n * gridColumnStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start\n */\n gridColumnStart: {\n type: 'string',\n className: 'rt-r-gcs',\n customProperties: ['--grid-column-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-column-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridColumnEnd=\"1\"\n * gridColumnEnd=\"auto\"\n * gridColumnEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end\n */\n gridColumnEnd: {\n type: 'string',\n className: 'rt-r-gce',\n customProperties: ['--grid-column-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRow=\"1\"\n * gridRow=\"auto\"\n * gridRow={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row\n */\n gridRow: {\n type: 'string',\n className: 'rt-r-gr',\n customProperties: ['--grid-row'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-start** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowStart=\"1\"\n * gridRowStart=\"auto\"\n * gridRowStart={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start\n */\n gridRowStart: {\n type: 'string',\n className: 'rt-r-grs',\n customProperties: ['--grid-row-start'],\n responsive: true,\n },\n /**\n * Sets the CSS **grid-row-end** property.\n * Supports CSS strings and responsive objects.\n *\n * @example\n * gridRowEnd=\"1\"\n * gridRowEnd=\"auto\"\n * gridRowEnd={{ sm: '2', lg: 'span 3' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end\n */\n gridRowEnd: {\n type: 'string',\n className: 'rt-r-gre',\n customProperties: ['--grid-row-end'],\n responsive: true,\n },\n /**\n * Sets the CSS **align-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * alignSelf=\"center\"\n * alignSelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-self\n */\n alignSelf: {\n type: 'enum',\n className: 'rt-r-as',\n values: alignSelfValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-self** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justifySelf=\"center\"\n * justifySelf={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self\n */\n justifySelf: {\n type: 'enum',\n className: 'rt-r-js',\n values: justifySelfValues,\n responsive: true,\n },\n} satisfies {\n position: PropDef<(typeof positionValues)[number]>;\n inset: PropDef<(typeof positionEdgeValues)[number]>;\n top: PropDef<(typeof positionEdgeValues)[number]>;\n right: PropDef<(typeof positionEdgeValues)[number]>;\n bottom: PropDef<(typeof positionEdgeValues)[number]>;\n left: PropDef<(typeof positionEdgeValues)[number]>;\n overflow: PropDef<(typeof overflowValues)[number]>;\n overflowX: PropDef<(typeof overflowValues)[number]>;\n overflowY: PropDef<(typeof overflowValues)[number]>;\n flexBasis: PropDef<string>;\n flexShrink: PropDef<(typeof flexShrinkValues)[number]>;\n flexGrow: PropDef<(typeof flexGrowValues)[number]>;\n gridColumn: PropDef<string>;\n gridColumnStart: PropDef<string>;\n gridColumnEnd: PropDef<string>;\n gridRow: PropDef<string>;\n gridRowStart: PropDef<string>;\n gridRowEnd: PropDef<string>;\n gridArea: PropDef<string>;\n alignSelf: PropDef<(typeof alignSelfValues)[number]>;\n justifySelf: PropDef<(typeof justifySelfValues)[number]>;\n};\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype LayoutProps = GetPropDefTypes<\n typeof paddingPropDefs & typeof widthPropDefs & typeof heightPropDefs & typeof layoutPropDefs\n>;\n\nexport { layoutPropDefs };\nexport type { LayoutProps };\n", "import type { PropDef, GetPropDefTypes } from './prop-def.js';\n\n// prettier-ignore\nconst marginValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '-1', '-2', '-3', '-4', '-5', '-6', '-7', '-8', '-9', '-10', '-11', '-12'] as const;\n\nconst marginPropDefs = {\n /**\n * Sets the CSS **margin** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * m=\"4\"\n * m=\"100px\"\n * m={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin\n */\n m: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-m',\n customProperties: ['--m'],\n },\n /**\n * Sets the CSS **margin-left** and **margin-right** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mx=\"4\"\n * mx=\"100px\"\n * mx={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mx: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mx',\n customProperties: ['--ml', '--mr'],\n },\n /**\n * Sets the CSS **margin-top** and **margin-bottom** properties.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * my=\"4\"\n * my=\"100px\"\n * my={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n my: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-my',\n customProperties: ['--mt', '--mb'],\n },\n /**\n * Sets the CSS **margin-top** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mt=\"4\"\n * mt=\"100px\"\n * mt={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top\n */\n mt: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mt',\n customProperties: ['--mt'],\n },\n /**\n * Sets the CSS **margin-right** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mr=\"4\"\n * mr=\"100px\"\n * mr={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right\n */\n mr: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mr',\n customProperties: ['--mr'],\n },\n /**\n * Sets the CSS **margin-bottom** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * mb=\"4\"\n * mb=\"100px\"\n * mb={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom\n */\n mb: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-mb',\n customProperties: ['--mb'],\n },\n /**\n * Sets the CSS **margin-left** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * ml=\"4\"\n * ml=\"100px\"\n * ml={{ sm: '6', lg: '9' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left\n */\n ml: {\n type: 'enum | string',\n values: marginValues,\n responsive: true,\n className: 'rt-r-ml',\n customProperties: ['--ml'],\n },\n} satisfies {\n m: PropDef<(typeof marginValues)[number]>;\n mx: PropDef<(typeof marginValues)[number]>;\n my: PropDef<(typeof marginValues)[number]>;\n mt: PropDef<(typeof marginValues)[number]>;\n mr: PropDef<(typeof marginValues)[number]>;\n mb: PropDef<(typeof marginValues)[number]>;\n ml: PropDef<(typeof marginValues)[number]>;\n};\n\ntype MarginProps = GetPropDefTypes<typeof marginPropDefs>;\n\nexport { marginPropDefs };\nexport type { MarginProps };\n", "import { Slot as SlotPrimitive } from 'radix-ui';\nexport const Root = SlotPrimitive.Root;\nexport const Slot = SlotPrimitive.Root;\nexport const Slottable: typeof SlotPrimitive.Slottable = SlotPrimitive.Slottable;\n", "import type { PropDef } from './prop-def.js';\n\nconst gapValues = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst gapPropDefs = {\n /**\n * Sets the CSS **gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gap=\"4\"\n * gap=\"20px\"\n * gap={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/gap\n */\n gap: {\n type: 'enum | string',\n className: 'rt-r-gap',\n customProperties: ['--gap'],\n values: gapValues,\n responsive: true,\n },\n /**\n * Sets the CSS **row-gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gapX=\"4\"\n * gapX=\"20px\"\n * gapX={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/row-gap\n */\n gapX: {\n type: 'enum | string',\n className: 'rt-r-cg',\n customProperties: ['--column-gap'],\n values: gapValues,\n responsive: true,\n },\n /**\n * Sets the CSS **column-gap** property.\n * Supports space scale values, CSS strings, and responsive objects.\n *\n * @example\n * gapY=\"4\"\n * gapY=\"20px\"\n * gapY={{ sm: '2', lg: '3em' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap\n */\n gapY: {\n type: 'enum | string',\n className: 'rt-r-rg',\n customProperties: ['--row-gap'],\n values: gapValues,\n responsive: true,\n },\n} satisfies {\n gap: PropDef<(typeof gapValues)[number]>;\n gapX: PropDef<(typeof gapValues)[number]>;\n gapY: PropDef<(typeof gapValues)[number]>;\n};\n\nexport { gapPropDefs };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { gapPropDefs } from '../props/gap.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst as = ['div', 'span'] as const;\nconst displayValues = ['none', 'inline-flex', 'flex'] as const;\nconst directionValues = ['row', 'column', 'row-reverse', 'column-reverse'] as const;\nconst alignValues = ['start', 'center', 'end', 'baseline', 'stretch'] as const;\nconst justifyValues = ['start', 'center', 'end', 'between'] as const;\nconst wrapValues = ['nowrap', 'wrap', 'wrap-reverse'] as const;\n\nconst flexPropDefs = {\n /**\n * Controls whether to render **div** or **span**\n *\n * @example\n * as=\"div\"\n * as=\"span\"\n */\n as: { type: 'enum', values: as, default: 'div' },\n ...asChildPropDef,\n /**\n * Sets the CSS **display** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * display=\"inline-flex\"\n * display={{ sm: 'none', lg: 'flex' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/display\n */\n display: {\n type: 'enum',\n className: 'rt-r-display',\n values: displayValues,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-direction** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * direction=\"column\"\n * direction={{ sm: 'column', lg: 'row' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction\n */\n direction: {\n type: 'enum',\n className: 'rt-r-fd',\n values: directionValues,\n responsive: true,\n },\n /**\n * Sets the CSS **align-items** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * align=\"center\"\n * align={{ sm: 'baseline', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/align-items\n */\n align: {\n type: 'enum',\n className: 'rt-r-ai',\n values: alignValues,\n responsive: true,\n },\n /**\n * Sets the CSS **justify-content** property.\n * Supports a subset of the corresponding CSS values and responsive objects.\n *\n * @example\n * justify=\"between\"\n * justify={{ sm: 'start', lg: 'center' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content\n */\n justify: {\n type: 'enum',\n className: 'rt-r-jc',\n values: justifyValues,\n parseValue: parseJustifyValue,\n responsive: true,\n },\n /**\n * Sets the CSS **flex-wrap** property.\n * Supports the corresponding CSS values and responsive objects.\n *\n * @example\n * wrap=\"wrap\"\n * wrap={{ sm: 'wrap', lg: 'nowrap' }}\n *\n * @link\n * https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap\n */\n wrap: {\n type: 'enum',\n className: 'rt-r-fw',\n values: wrapValues,\n responsive: true,\n },\n ...gapPropDefs,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n display: PropDef<(typeof displayValues)[number]>;\n direction: PropDef<(typeof directionValues)[number]>;\n align: PropDef<(typeof alignValues)[number]>;\n justify: PropDef<(typeof justifyValues)[number]>;\n wrap: PropDef<(typeof wrapValues)[number]>;\n};\n\nfunction parseJustifyValue(value: string) {\n return value === 'between' ? 'space-between' : value;\n}\n\n// Use all of the imported prop defs to ensure that JSDoc works\ntype FlexOwnProps = GetPropDefTypes<\n typeof flexPropDefs & typeof gapPropDefs & typeof asChildPropDef\n>;\n\nexport { flexPropDefs };\nexport type { FlexOwnProps };\n", "import * as React from 'react';\nimport classNames from 'classnames';\n\nimport { Flex } from './flex.js';\nimport { spinnerPropDefs } from './spinner.props.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\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\ntype SpinnerElement = React.ElementRef<'span'>;\ntype SpinnerOwnProps = GetPropDefTypes<typeof spinnerPropDefs>;\ninterface SpinnerProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n MarginProps,\n SpinnerOwnProps {}\nconst Spinner = React.forwardRef<SpinnerElement, SpinnerProps>((props, forwardedRef) => {\n const { className, children, loading, ...spinnerProps } = extractProps(\n props,\n spinnerPropDefs,\n marginPropDefs\n );\n\n if (!loading) return children;\n\n const spinner = (\n <span {...spinnerProps} ref={forwardedRef} className={classNames('rt-Spinner', className)}>\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n <span className=\"rt-SpinnerLeaf\" />\n </span>\n );\n\n if (children === undefined) return spinner;\n\n return (\n <Flex asChild position=\"relative\" align=\"center\" justify=\"center\">\n <span>\n {/**\n * `display: contents` removes the content from the accessibility tree in some browsers,\n * so we force remove it with `aria-hidden`\n */}\n <span aria-hidden style={{ display: 'contents', visibility: 'hidden' }} inert={undefined}>\n {children}\n </span>\n\n <Flex asChild align=\"center\" justify=\"center\" position=\"absolute\" inset=\"0\">\n <span>{spinner}</span>\n </Flex>\n </span>\n </Flex>\n );\n});\nSpinner.displayName = 'Spinner';\n\nexport { Spinner };\nexport type { SpinnerProps };\n", "import type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\n\nconst spinnerPropDefs = {\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n loading: { type: 'boolean', default: true },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n loading: PropDef<boolean>;\n};\n\nexport { spinnerPropDefs };\n", "import { VisuallyHidden as VisuallyHiddenPrimitive } from 'radix-ui';\nexport const VisuallyHidden = VisuallyHiddenPrimitive.Root;\nexport const Root = VisuallyHiddenPrimitive.Root;\nexport type VisuallyHiddenProps = VisuallyHiddenPrimitive.VisuallyHiddenProps;\n", "import * as React from 'react';\n\nconst PANEL_BACKGROUND_MESSAGE = 'Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.';\n\nconst warned = new Set<string>();\n\nfunction warnOnce(message: string) {\n if (warned.has(message)) return;\n warned.add(message);\n console.warn(message);\n}\n\n/**\n * Warns, in development only, that `panelBackground` is deprecated.\n *\n * The `process.env.NODE_ENV` check is a compile-time constant, so a production\n * bundle minifies the effect body away to an empty function instead of reading\n * props and formatting a message per mounted component. The message is also\n * logged once per session rather than once per component instance.\n */\nexport function useDeprecatedPanelBackgroundWarning(panelBackground: unknown) {\n React.useEffect(() => {\n if (process.env.NODE_ENV === 'production') return;\n if (panelBackground !== undefined) warnOnce(PANEL_BACKGROUND_MESSAGE);\n }, [panelBackground]);\n}\n", "import type { baseButtonPropDefs } from '../components/_internal/base-button.props.js';\nimport type { calloutRootPropDefs } from '../components/callout.props.js';\nimport type { spinnerPropDefs } from '../components/spinner.props.js';\nimport type { textPropDefs } from '../components/text.props.js';\nimport type { Responsive } from '../props/prop-def.js';\n\nfunction mapResponsiveProp<Input extends string, Output>(\n propValue: Responsive<Input> | undefined,\n mapValue: (value: Input) => Output\n): Responsive<Output> | undefined {\n if (propValue === undefined) return undefined;\n if (typeof propValue === 'string') {\n return mapValue(propValue);\n }\n return Object.fromEntries(\n Object.entries(propValue).map(([key, value]) => [key, mapValue(value)])\n );\n}\n\nfunction mapCalloutSizeToTextSize(\n size: (typeof calloutRootPropDefs.size.values)[number]\n): (typeof textPropDefs.size.values)[number] {\n return size === '3' ? '3' : size === '1' ? '1' : '2';\n}\n\nfunction mapButtonSizeToSpinnerSize(\n size: (typeof baseButtonPropDefs.size.values)[number]\n): (typeof spinnerPropDefs.size.values)[number] {\n switch (size) {\n case '1':\n return '1';\n case '2':\n case '3':\n return '2';\n case '4':\n return '3';\n }\n}\n\nexport { mapResponsiveProp, mapCalloutSizeToTextSize, mapButtonSizeToSpinnerSize };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { Tooltip as TooltipPrimitive } from 'radix-ui';\n\nimport { Text } from './text.js';\nimport { Theme } from './theme.js';\nimport { extractProps } from '../helpers/extract-props.js';\nimport { tooltipPropDefs } from './tooltip.props.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype TooltipElement = React.ElementRef<typeof TooltipPrimitive.Content>;\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs>;\ninterface TooltipProps\n extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Root>,\n ComponentPropsWithout<typeof TooltipPrimitive.Content, RemovedProps | 'content'>,\n TooltipOwnProps {\n content: React.ReactNode;\n container?: React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Portal>['container'];\n}\nconst Tooltip = React.forwardRef<TooltipElement, TooltipProps>((props, forwardedRef) => {\n const {\n children,\n className,\n open,\n defaultOpen,\n onOpenChange,\n delayDuration,\n disableHoverableContent,\n content,\n container,\n forceMount,\n ...tooltipContentProps\n } = extractProps(props, tooltipPropDefs);\n const rootProps = { open, defaultOpen, onOpenChange, delayDuration, disableHoverableContent };\n return (\n <TooltipPrimitive.Root {...rootProps}>\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal container={container} forceMount={forceMount}>\n <Theme asChild>\n <TooltipPrimitive.Content\n sideOffset={4}\n collisionPadding={10}\n {...tooltipContentProps}\n asChild={false}\n ref={forwardedRef}\n className={classNames('rt-TooltipContent', className)}\n >\n <Text as=\"p\" className=\"rt-TooltipText\" size=\"1\">\n {content}\n </Text>\n <TooltipPrimitive.Arrow className=\"rt-TooltipArrow\" />\n </TooltipPrimitive.Content>\n </Theme>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n});\nTooltip.displayName = 'Tooltip';\n\nexport { Tooltip };\nexport type { TooltipProps };\n", "import * as React from 'react';\nimport { Slot } from 'radix-ui';\n\nimport { extractProps } from '../helpers/extract-props.js';\nimport { marginPropDefs } from '../props/margin.props.js';\nimport { textPropDefs } from './text.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype TextElement = React.ElementRef<'span'>;\ntype TextOwnProps = GetPropDefTypes<typeof textPropDefs>;\ninterface CommonTextProps extends MarginProps, TextOwnProps {}\ntype TextSpanProps = { as?: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype TextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype TextLabelProps = { as: 'label' } & ComponentPropsWithout<'label', RemovedProps>;\ntype TextPProps = { as: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\ntype TextProps = CommonTextProps & (TextSpanProps | TextDivProps | TextLabelProps | TextPProps);\n\n// Pre-merge prop definitions at module level to avoid per-render allocation\nconst mergedPropDefs = { ...textPropDefs, ...marginPropDefs };\n\nconst Text = React.memo(\n React.forwardRef<TextElement, TextProps>((props, forwardedRef) => {\n const {\n children,\n className,\n asChild,\n as: Tag = 'span',\n color,\n ...textProps\n } = extractProps(props, mergedPropDefs);\n\n const combinedClassName = className ? `rt-Text ${className}` : 'rt-Text';\n\n if (asChild) {\n return (\n <Slot.Root\n data-accent-color={color}\n {...textProps}\n ref={forwardedRef}\n className={combinedClassName}\n >\n {children}\n </Slot.Root>\n );\n }\n\n return (\n <Tag\n data-accent-color={color}\n {...(textProps as React.HTMLAttributes<HTMLElement>)}\n ref={forwardedRef as any}\n className={combinedClassName}\n >\n {children}\n </Tag>\n );\n })\n);\nText.displayName = 'Text';\n\nexport { Text };\nexport type { TextProps };\n", "import type { PropDef } from './prop-def.js';\n\nconst leadingTrimValues = ['normal', 'start', 'end', 'both'] as const;\n\nconst leadingTrimPropDef = {\n trim: {\n type: 'enum',\n className: 'rt-r-lt',\n values: leadingTrimValues,\n responsive: true,\n },\n} satisfies {\n trim: PropDef<(typeof leadingTrimValues)[number]>;\n};\n\nexport { leadingTrimPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textAlignValues = ['left', 'center', 'right'] as const;\n\nconst textAlignPropDef = {\n align: {\n type: 'enum',\n className: 'rt-r-ta',\n values: textAlignValues,\n responsive: true,\n },\n} satisfies {\n align: PropDef<(typeof textAlignValues)[number]>;\n};\n\nexport { textAlignPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst textWrapValues = ['wrap', 'nowrap', 'pretty', 'balance'] as const;\n\nconst textWrapPropDef = {\n wrap: {\n type: 'enum',\n className: 'rt-r-tw',\n values: textWrapValues,\n responsive: true,\n },\n} satisfies {\n wrap: PropDef<(typeof textWrapValues)[number]>;\n};\n\nexport { textWrapPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst truncatePropDef = {\n truncate: {\n type: 'boolean',\n className: 'rt-truncate',\n },\n} satisfies {\n truncate: PropDef<boolean>;\n};\n\nexport { truncatePropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst fontFamilyPropDef = {\n font: {\n type: 'enum',\n className: 'rt-r-ff',\n values: fontFamilies,\n },\n} satisfies {\n font: PropDef<(typeof fontFamilies)[number]>;\n};\n\nexport { fontFamilyPropDef };\n", "import type { PropDef } from './prop-def.js';\n\nconst weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold'] as const;\n\nconst weightPropDef = {\n weight: {\n type: 'enum',\n className: 'rt-r-weight',\n values: weights,\n responsive: true,\n },\n} satisfies {\n weight: PropDef<(typeof weights)[number]>;\n};\n\nexport { weightPropDef };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { colorPropDef } from '../props/color.prop.js';\nimport { highContrastPropDef } from '../props/high-contrast.prop.js';\nimport { leadingTrimPropDef } from '../props/leading-trim.prop.js';\nimport { textAlignPropDef } from '../props/text-align.prop.js';\nimport { textWrapPropDef } from '../props/text-wrap.prop.js';\nimport { truncatePropDef } from '../props/truncate.prop.js';\nimport { fontFamilyPropDef } from '../props/font-family.prop.js';\nimport { weightPropDef } from '../props/weight.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst as = ['span', 'div', 'label', 'p'] as const;\nconst sizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'] as const;\n\nconst textPropDefs = {\n as: { type: 'enum', values: as, default: 'span' },\n ...asChildPropDef,\n size: {\n type: 'enum',\n className: 'rt-r-size',\n values: sizes,\n responsive: true,\n },\n ...fontFamilyPropDef,\n ...weightPropDef,\n ...textAlignPropDef,\n ...leadingTrimPropDef,\n ...truncatePropDef,\n ...textWrapPropDef,\n ...colorPropDef,\n ...highContrastPropDef,\n} satisfies {\n as: PropDef<(typeof as)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport { textPropDefs };\n", "'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { usePropSyncedState } from '../hooks/use-prop-synced-state.js';\nimport { useDeprecatedPanelBackgroundWarning } from '../helpers/use-deprecation-warning.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeMaterial = (typeof themePropDefs.material.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n// Headings follow the body font until something sets this, so `undefined` is a\n// meaningful value here rather than a missing one.\ntype ThemeHeadingFontFamily = ThemeFontFamily | undefined;\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onMaterialChange: (material: ThemeMaterial) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n onHeadingFontFamilyChange: (headingFontFamily: ThemeHeadingFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n material: ThemeMaterial;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n fontFamily: ThemeFontFamily;\n headingFontFamily: ThemeHeadingFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n material: themePropDefs.material.default,\n panelBackground: themePropDefs.panelBackground.default,\n radius: themePropDefs.radius.default,\n scaling: themePropDefs.scaling.default,\n fontFamily: themePropDefs.fontFamily.default,\n headingFontFamily: undefined,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onMaterialChange: noop,\n onPanelBackgroundChange: noop,\n onRadiusChange: noop,\n onScalingChange: noop,\n onFontFamilyChange: noop,\n onHeadingFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n material: materialProp = themePropDefs.material.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n headingFontFamily: headingFontFamilyProp,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n useDeprecatedPanelBackgroundWarning(props.panelBackground);\n\n // Each of these follows its prop but stays independently settable, so\n // `ThemePanel` can change the theme at runtime. Syncing during render\n // rather than in an effect matters here: an effect would commit the old\n // theme first and re-render every consumer of the context a second time.\n const [appearance, setAppearance] = usePropSyncedState(appearanceProp);\n const [accentColor, setAccentColor] = usePropSyncedState(accentColorProp);\n const [grayColor, setGrayColor] = usePropSyncedState(grayColorProp);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n materialProp !== themePropDefs.material.default ? materialProp : panelBackgroundProp;\n const [material, setMaterial] = usePropSyncedState(effectiveMaterial);\n\n // Keep panelBackground in sync with material for backward compatibility\n const [panelBackground, setPanelBackground] = usePropSyncedState(material);\n\n const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [scaling, setScaling] = usePropSyncedState(scalingProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n const [headingFontFamily, setHeadingFontFamily] = usePropSyncedState(headingFontFamilyProp);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n material={material}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n fontFamily={fontFamily}\n headingFontFamily={headingFontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onMaterialChange={setMaterial}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n onFontFamilyChange={setFontFamily}\n onHeadingFontFamilyChange={setHeadingFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n material = props.material ?? context?.material ?? themePropDefs.material.default,\n panelBackground = props.panelBackground ??\n context?.panelBackground ??\n themePropDefs.panelBackground.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n headingFontFamily = props.headingFontFamily ?? context?.headingFontFamily,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onMaterialChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n onFontFamilyChange = noop,\n onHeadingFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n // `data-os` can only be resolved on the client. Writing it straight to the\n // DOM keeps it out of the server markup \u2014 so hydration still matches \u2014 without\n // spending a render pass, and a state update here would re-render the whole\n // application on mount.\n const rootRef = React.useRef<ThemeImplElement>(null);\n const composedRef = useComposedRefs(forwardedRef, rootRef);\n const hasExplicitOS = 'data-os' in themeProps;\n\n useLayoutEffect(() => {\n if (!isRoot || hasExplicitOS) return;\n const node = rootRef.current;\n if (!node) return;\n\n const os = getClientOS();\n if (!os) return;\n node.setAttribute('data-os', os);\n return () => node.removeAttribute('data-os');\n }, [isRoot, hasExplicitOS]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-material={material}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n data-font-family={fontFamily}\n data-heading-font-family={headingFontFamily}\n ref={composedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n", "import type { accentColors } from '../props/color.prop.js';\n\ntype ThemeAccentColor = (typeof accentColors)[number];\n\nexport function getMatchingGrayColor(accentColor: ThemeAccentColor) {\n switch (accentColor) {\n case 'tomato':\n case 'red':\n case 'ruby':\n case 'crimson':\n case 'pink':\n case 'plum':\n case 'purple':\n case 'violet':\n return 'mauve';\n case 'iris':\n case 'indigo':\n case 'blue':\n case 'sky':\n case 'cyan':\n return 'slate';\n case 'teal':\n case 'jade':\n case 'mint':\n case 'green':\n return 'sage';\n case 'grass':\n case 'lime':\n return 'olive';\n case 'yellow':\n case 'amber':\n case 'orange':\n case 'brown':\n case 'gold':\n case 'bronze':\n return 'sand';\n case 'gray':\n return 'gray';\n }\n}\n", "import * as React from 'react';\n\n/**\n * State that tracks a prop but can also be set imperatively \u2014 the shape `Theme`\n * needs, where a prop sets the value and `ThemePanel` can change it at runtime.\n *\n * Adjusts state during render rather than syncing in a `useEffect`. An effect\n * would commit one render carrying the *old* value and schedule a second one,\n * which for a provider means every consumer renders twice and the browser can\n * paint the stale value in between.\n *\n * @see https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\nexport function usePropSyncedState<T>(propValue: T) {\n const [value, setValue] = React.useState(propValue);\n const [previousPropValue, setPreviousPropValue] = React.useState(propValue);\n\n if (!Object.is(propValue, previousPropValue)) {\n setPreviousPropValue(propValue);\n setValue(propValue);\n }\n\n return [value, setValue] as const;\n}\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { accentColors, grayColors } from '../props/color.prop.js';\nimport { radii } from '../props/radius.prop.js';\n\nimport type { GetPropDefTypes, PropDef } from '../props/prop-def.js';\n\nconst appearances = ['inherit', 'light', 'dark'] as const;\nconst panelBackgrounds = ['solid', 'translucent'] as const;\nconst materials = ['solid', 'translucent'] as const;\nconst scalings = ['90%', '95%', '100%', '105%', '110%'] as const;\nconst fontFamilies = ['sans', 'mono', 'serif'] as const;\n\nconst themePropDefs = {\n ...asChildPropDef,\n /**\n * Whether to apply background color to the Theme element.\n *\n * Defaults to true for the root Theme and for Theme elements that\n * have an explicit light or dark appearance prop.\n */\n hasBackground: { type: 'boolean', default: true },\n /**\n * Sets the color scheme of the theme, typcially referred to as light and dark mode.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/dark-mode\n */\n appearance: { type: 'enum', values: appearances, default: 'inherit' },\n /**\n * Selects one of the accent color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n accentColor: { type: 'enum', values: accentColors, default: 'blue' },\n /**\n * Selects one of the gray color options to use in the Theme.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/color\n */\n grayColor: { type: 'enum', values: grayColors, default: 'slate' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n material: { type: 'enum', values: materials, default: 'translucent' },\n /**\n * Controls whether to use a solid or translucent background color on panelled\n * elements such as Card or Table is solid or translucent.\n *\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: 'translucent' },\n /**\n * Sets the default radius of the components.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/visual-style\n */\n radius: { type: 'enum', values: radii, default: 'full' },\n /**\n * Sets a scaling multiplier for values like spacing, font sizes, line heights, etc. are scaled.\n *\n * @link\n * https://www.radix-ui.com/themes/docs/theme/layout\n */\n scaling: { type: 'enum', values: scalings, default: '100%' },\n /**\n * Sets the font family used for body text in the theme.\n *\n * Headings follow this unless `headingFontFamily` (or the `--font-heading`\n * token) says otherwise.\n *\n * @default 'sans'\n */\n fontFamily: { type: 'enum', values: fontFamilies, default: 'sans' },\n /**\n * Sets the font family used for `Heading`, independently of body text.\n *\n * Deliberately has no default: when it is left unset no attribute is\n * emitted and `--font-heading` keeps following `--font-body`, so a\n * `--font-heading` override in your own CSS survives a `fontFamily` switch.\n */\n headingFontFamily: { type: 'enum', values: fontFamilies },\n} satisfies {\n hasBackground: PropDef<boolean>;\n appearance: PropDef<(typeof appearances)[number]>;\n accentColor: PropDef<(typeof accentColors)[number]>;\n grayColor: PropDef<(typeof grayColors)[number]>;\n material: PropDef<(typeof materials)[number]>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number]>;\n radius: PropDef<(typeof radii)[number]>;\n scaling: PropDef<(typeof scalings)[number]>;\n fontFamily: PropDef<(typeof fontFamilies)[number]>;\n headingFontFamily: PropDef<(typeof fontFamilies)[number]>;\n};\n\ntype ThemeOwnProps = GetPropDefTypes<typeof themePropDefs & typeof asChildPropDef>;\n\nexport { themePropDefs };\nexport type { ThemeOwnProps };\n", "import { widthPropDefs } from '../props/width.props.js';\n\nimport type { PropDef, GetPropDefTypes } from '../props/prop-def.js';\n\nconst tooltipPropDefs = {\n content: { type: 'ReactNode', required: true },\n width: widthPropDefs.width,\n minWidth: widthPropDefs.minWidth,\n maxWidth: { ...widthPropDefs.maxWidth, default: '360px' },\n} satisfies {\n width: PropDef<string>;\n minWidth: PropDef<string>;\n maxWidth: PropDef<string>;\n content: PropDef<React.ReactNode>;\n};\n\ntype TooltipOwnProps = GetPropDefTypes<typeof tooltipPropDefs & typeof widthPropDefs>;\n\nexport { tooltipPropDefs };\nexport type { TooltipOwnProps };\n", "import * as React from 'react';\n\n/**\n * Hook for managing tooltip accessibility props and conditional rendering.\n * Encapsulates tooltip ID generation and aria-describedby binding.\n *\n * @param tooltip - The tooltip content (if any)\n * @returns Object containing tooltipId, hasTooltip flag, and accessibility props\n *\n * @example\n * ```tsx\n * const { tooltipId, hasTooltip, accessibilityProps } = useTooltipWrapper(tooltip);\n *\n * const button = <button {...accessibilityProps}>Click me</button>;\n *\n * if (!hasTooltip) return button;\n *\n * return <Tooltip id={tooltipId} content={tooltip}>{button}</Tooltip>;\n * ```\n */\nexport function useTooltipWrapper(tooltip: React.ReactNode) {\n const tooltipId = React.useId();\n const hasTooltip = Boolean(tooltip);\n\n const accessibilityProps = React.useMemo(() => (hasTooltip ? { 'aria-describedby': tooltipId } : {}), [hasTooltip, tooltipId]);\n\n return { tooltipId, hasTooltip, accessibilityProps };\n}\n", "import React from 'react';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\ntype IconElement = React.ElementRef<'svg'>;\ninterface IconProps extends ComponentPropsWithout<'svg', RemovedProps | 'children'> {}\n\nconst ThickDividerHorizontalIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z\"\n />\n </svg>\n );\n});\n\nThickDividerHorizontalIcon.displayName = 'ThickDividerHorizontalIcon';\n\nconst ThickCheckIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z\"\n />\n </svg>\n );\n});\nThickCheckIcon.displayName = 'ThickCheckIcon';\n\nconst ChevronDownIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path d=\"M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z\" />\n </svg>\n );\n});\nChevronDownIcon.displayName = 'ChevronDownIcon';\n\nconst ThickChevronRightIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronRightIcon.displayName = 'ThickChevronRightIcon';\n\nconst ThickChevronLeftIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M5.76174 0.201711C5.45892 -0.0809141 4.98433 -0.0645489 4.70171 0.238264L1.20171 3.98826C0.932757 4.27642 0.932757 4.72359 1.20171 5.01174L4.70171 8.76174C4.98433 9.06455 5.45892 9.08092 5.76174 8.79829C6.06455 8.51567 6.08091 8.04108 5.79829 7.73826L2.77591 4.5L5.79829 1.26174C6.08091 0.958928 6.06455 0.484337 5.76174 0.201711Z\"\n />\n </svg>\n );\n});\nThickChevronLeftIcon.displayName = 'ThickChevronLeftIcon';\n\nconst ThickDotIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg width=\"9\" height=\"9\" viewBox=\"0 0 9 9\" fill=\"currentcolor\" xmlns=\"http://www.w3.org/2000/svg\" {...props} ref={forwardedRef}>\n <circle cx=\"4.5\" cy=\"4.5\" r=\"2\" />\n </svg>\n );\n});\nThickDotIcon.displayName = 'ThickDotIcon';\n\nexport { ChevronDownIcon, ThickCheckIcon, ThickChevronLeftIcon, ThickChevronRightIcon, ThickDividerHorizontalIcon, ThickDotIcon };\nexport type { IconProps };\n\n// Additional minimal icons\nconst CloseIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <svg\n {..._props}\n ref={_forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n );\n});\nCloseIcon.displayName = 'CloseIcon';\n\nconst PaperclipIcon = React.forwardRef<IconElement, IconProps>((props, forwardedRef) => {\n return (\n <svg\n {...props}\n ref={forwardedRef}\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n});\nPaperclipIcon.displayName = 'PaperclipIcon';\n\nconst FileIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <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\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n </svg>\n );\n});\nFileIcon.displayName = 'FileIcon';\n\nconst FileTextIcon = React.forwardRef<IconElement, IconProps>((_props, _forwardedRef) => {\n return (\n <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\">\n <path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\" />\n <path d=\"M14 2v4a2 2 0 0 0 2 2h4\" />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n});\nFileTextIcon.displayName = 'FileTextIcon';\n\nexport { CloseIcon, PaperclipIcon, FileIcon, FileTextIcon };\n", "import * as React from 'react';\nimport classNames from 'classnames';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\n\nimport { scrollAreaPropDefs } from './scroll-area.props.js';\nimport { extractMarginProps } from '../helpers/extract-margin-props.js';\nimport { getMarginStyles } from '../helpers/get-margin-styles.js';\nimport { getResponsiveClassNames } from '../helpers/get-responsive-styles.js';\nimport { getSubtree } from '../helpers/get-subtree.js';\nimport { mergeStyles } from '../helpers/merge-styles.js';\n\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\nimport type { MarginProps } from '../props/margin.props.js';\nimport type { GetPropDefTypes } from '../props/prop-def.js';\n\ntype ScrollAreaElement = React.ElementRef<typeof ScrollAreaPrimitive.Viewport>;\ntype ScrollAreaOwnProps = GetPropDefTypes<typeof scrollAreaPropDefs>;\ninterface ScrollAreaProps\n extends ComponentPropsWithout<typeof ScrollAreaPrimitive.Root, RemovedProps>,\n ComponentPropsWithout<typeof ScrollAreaPrimitive.Viewport, RemovedProps | 'dir'>,\n MarginProps,\n ScrollAreaOwnProps {}\nconst ScrollArea = React.forwardRef<ScrollAreaElement, ScrollAreaProps>((props, forwardedRef) => {\n const { rest: marginRest, ...marginProps } = extractMarginProps(props);\n const [marginClassNames, marginCustomProperties] = getMarginStyles(marginProps);\n\n const {\n asChild,\n children,\n className,\n style,\n type,\n scrollHideDelay = type !== 'scroll' ? 0 : undefined,\n dir,\n size = scrollAreaPropDefs.size.default,\n radius = scrollAreaPropDefs.radius.default,\n scrollbars = scrollAreaPropDefs.scrollbars.default,\n ...viewportProps\n } = marginRest;\n\n return (\n <ScrollAreaPrimitive.Root\n type={type}\n scrollHideDelay={scrollHideDelay}\n className={classNames('rt-ScrollAreaRoot', marginClassNames, className)}\n style={mergeStyles(marginCustomProperties, style)}\n asChild={asChild}\n >\n {getSubtree({ asChild, children }, (children) => (\n <>\n <ScrollAreaPrimitive.Viewport\n {...viewportProps}\n ref={forwardedRef}\n className=\"rt-ScrollAreaViewport\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n\n <div className=\"rt-ScrollAreaViewportFocusRing\" />\n\n {scrollbars !== 'vertical' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"horizontal\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars !== 'horizontal' ? (\n <ScrollAreaPrimitive.Scrollbar\n data-radius={radius}\n orientation=\"vertical\"\n className={classNames(\n 'rt-ScrollAreaScrollbar',\n getResponsiveClassNames({\n className: 'rt-r-size',\n value: size,\n propValues: scrollAreaPropDefs.size.values,\n }),\n )}\n >\n <ScrollAreaPrimitive.Thumb className=\"rt-ScrollAreaThumb\" />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n\n {scrollbars === 'both' ? (\n <ScrollAreaPrimitive.Corner className=\"rt-ScrollAreaCorner\" />\n ) : null}\n </>\n ))}\n </ScrollAreaPrimitive.Root>\n );\n});\nScrollArea.displayName = 'ScrollArea';\n\nexport { ScrollArea };\nexport type { ScrollAreaProps };\n", "import { asChildPropDef } from '../props/as-child.prop.js';\nimport { radiusPropDef } from '../props/radius.prop.js';\n\nimport type { PropDef } from '../props/prop-def.js';\n\nconst sizes = ['1', '2', '3'] as const;\nconst scrollbarsValues = ['vertical', 'horizontal', 'both'] as const;\n\nconst scrollAreaPropDefs = {\n ...asChildPropDef,\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '1', responsive: true },\n ...radiusPropDef,\n scrollbars: { type: 'enum', values: scrollbarsValues, default: 'both' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n scrollbars: PropDef<(typeof scrollbarsValues)[number]>;\n};\n\nexport { scrollAreaPropDefs };\n", "import type { MarginProps } from '../props/margin.props.js';\n\nexport function extractMarginProps<T extends MarginProps>(props: T) {\n const { m, mx, my, mt, mr, mb, ml, ...rest } = props;\n return { m, mx, my, mt, mr, mb, ml, rest };\n}\n", "import { getResponsiveStyles } from './get-responsive-styles.js';\nimport { mergeStyles } from './merge-styles.js';\nimport { marginPropDefs } from '../props/margin.props.js';\n\nimport type { MarginProps } from '../props/margin.props.js';\n\nconst marginValues = marginPropDefs.m.values;\nconst marginValueSet: ReadonlySet<string> = new Set(marginValues);\n\n// Static table so the common case \u2014 a component with no margin props at all \u2014\n// is seven property reads and nothing else.\nconst MARGIN_PROPS: ReadonlyArray<{\n key: keyof MarginProps;\n className: string;\n customProperties: `--${string}`[];\n}> = [\n { key: 'm', className: 'rt-r-m', customProperties: ['--margin'] },\n { key: 'mx', className: 'rt-r-mx', customProperties: ['--margin-left', '--margin-right'] },\n { key: 'my', className: 'rt-r-my', customProperties: ['--margin-top', '--margin-bottom'] },\n { key: 'mt', className: 'rt-r-mt', customProperties: ['--margin-top'] },\n { key: 'mr', className: 'rt-r-mr', customProperties: ['--margin-right'] },\n { key: 'mb', className: 'rt-r-mb', customProperties: ['--margin-bottom'] },\n { key: 'ml', className: 'rt-r-ml', customProperties: ['--margin-left'] },\n];\n\nexport function getMarginStyles(props: MarginProps) {\n let classes: string[] | undefined;\n let style: ReturnType<typeof mergeStyles>;\n\n for (let i = 0; i < MARGIN_PROPS.length; i++) {\n const { key, className, customProperties } = MARGIN_PROPS[i];\n const value = props[key];\n if (value === undefined) continue;\n\n const [propClassNames, propCustomProperties] = getResponsiveStyles({\n className,\n customProperties,\n propValues: marginValues,\n propValueSet: marginValueSet,\n value,\n });\n\n if (propClassNames) (classes ??= []).push(propClassNames);\n if (propCustomProperties) style = mergeStyles(style, propCustomProperties);\n }\n\n return [classes !== undefined ? classes.join(' ') : '', style] as const;\n}\n", "import * as React from 'react';\n\n/**\n * This is a helper function that is used when a component supports `asChild`\n * using the `Slot` component but its implementation contains nested DOM elements.\n *\n * Using it ensures if a consumer uses the `asChild` prop, the elements are in\n * correct order in the DOM, adopting the intended consumer `children`.\n */\nexport function getSubtree(\n options: { asChild: boolean | undefined; children: React.ReactNode },\n content: React.ReactNode | ((children: React.ReactNode) => React.ReactNode)\n) {\n const { asChild, children } = options;\n if (!asChild) return typeof content === 'function' ? content(children) : content;\n\n const firstChild = React.Children.only(children) as React.ReactElement;\n return React.cloneElement(firstChild, {\n // @ts-expect-error\n children: typeof content === 'function' ? content(firstChild.props.children) : content,\n });\n}\n"],
5
+ "mappings": "8kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,mBAAAE,GAAA,eAAAC,GAAA,mBAAAC,GAAA,cAAAC,GAAA,gBAAAC,GAAA,SAAAC,GAAA,QAAAC,GAAA,WAAAC,GAAA,aAAAC,GAAA,SAAAC,GAAA,aAAAC,KAAA,e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V,aAAW,EAAApF,SAAW,iBAAkBnH,CAAS,EACjD,MAAO,CAAE,QAASsM,EAAU,EAAI,EAAG,cAAeA,EAAU,OAAY,OAAQ,GAAGrM,CAAM,EAEzF,cAAaqM,EAAU,OAAY,GACnC,SAAUA,EAAUJ,EAAW,GAC/B,QAAS3E,EACT,QAASkF,EACR,GAAGD,GAEHtM,GACC,gBAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,OAAO,eAAe,YAAY,IAAI,cAAc,QAAQ,eAAe,QAAQ,cAAW,IAC3L,gBAAC,QAAK,EAAE,WAAW,EACnB,gBAAC,QAAK,EAAE,gBAAgB,CAC1B,CAEJ,CAEJ,CAAC,EACD4L,GAAK,YAAc",
6
+ "names": ["chatbar_exports", "__export", "AttachTrigger", "Attachment", "AttachmentsRow", "InlineEnd", "InlineStart", "Root", "Row", "RowEnd", "RowStart", "Send", "Textarea", "__toCommonJS", "React", "import_classnames", "import_react", "import_internal", "import_react_dropzone", "React", "import_classnames", "React", "import_classnames", "import_radix_ui", "asChildPropDef", "accentColors", "grayColors", "colorPropDef", "accentColorPropDef", "highContrastPropDef", "radii", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "materials", "baseButtonPropDefs", "asChildPropDef", "accentColorPropDef", "highContrastPropDef", "radiusPropDef", "React", "import_classnames", "import_classnames", "EMPTY_VALUES", "EMPTY_SET", "compile", "propDefs", "merged", "styling", "passthrough", "stylingKeys", "key", "def", "values", "compiled", "cacheRoot", "getCompiledPropDefs", "node", "i", "propDef", "child", "breakpoints", "breakpointSet", "hasOwnProperty", "obj", "key", "breakpointSet", "isResponsiveObject", "obj", "key", "includesValue", "propValues", "propValueSet", "value", "getResponsiveStyles", "className", "customProperties", "args", "responsiveClassNames", "getResponsiveClassNames", "responsiveCustomProperties", "getResponsiveCustomProperties", "allowArbitraryValues", "parseValue", "getBaseClassName", "isResponsiveObject", "object", "classNames", "bp", "hasOwnProperty", "breakpointSet", "baseClassName", "bpClassName", "delimiter", "matchedValue", "isNegative", "minus", "absoluteValue", "styles", "parsed", "customProperty", "bpProperty", "mergeStyles", "styles", "result", "style", "normalizeResponsiveValue", "value", "propDef", "initial", "changed", "extractProps", "props", "propDefs", "styling", "passthrough", "stylingKeys", "getCompiledPropDefs", "extractedProps", "key", "i", "isResponsiveObject", "style", "classes", "propClassName", "getResponsiveClassNames", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "classNames", "paddingValues", "paddingPropDefs", "heightPropDefs", "widthPropDefs", "overflowValues", "positionValues", "positionEdgeValues", "flexShrinkValues", "flexGrowValues", "alignSelfValues", "justifySelfValues", "layoutPropDefs", "paddingPropDefs", "widthPropDefs", "heightPropDefs", "marginValues", "marginPropDefs", "import_radix_ui", "Root", "SlotPrimitive", "Slot", "Slottable", "gapValues", "gapPropDefs", "as", "displayValues", "directionValues", "alignValues", "justifyValues", "wrapValues", "flexPropDefs", "asChildPropDef", "parseJustifyValue", "gapPropDefs", "value", "Flex", "props", "forwardedRef", "className", "asChild", "Tag", "flexProps", "extractProps", "flexPropDefs", "layoutPropDefs", "marginPropDefs", "Slot", "classNames", "React", "import_classnames", "sizes", "spinnerPropDefs", "Spinner", "props", "forwardedRef", "className", "children", "loading", "spinnerProps", "extractProps", "spinnerPropDefs", "marginPropDefs", "spinner", "classNames", "Flex", "import_radix_ui", "VisuallyHidden", "VisuallyHiddenPrimitive", "Root", "React", "PANEL_BACKGROUND_MESSAGE", "warned", "warnOnce", "message", "useDeprecatedPanelBackgroundWarning", "panelBackground", "mapResponsiveProp", "propValue", "mapValue", "key", "value", "mapButtonSizeToSpinnerSize", "size", "BaseButton", "props", "forwardedRef", "size", "baseButtonPropDefs", "className", "children", "asChild", "as", "color", "radius", "material", "panelBackground", "flush", "disabled", "baseButtonProps", "extractProps", "marginPropDefs", "useDeprecatedPanelBackgroundWarning", "effectiveMaterial", "Comp", "shouldPassDisabled", "isNativeButtonElement", "hasExplicitTypeAttribute", "loadingId", "describedById", "buttonText", "accessibilityProps", "classNames", "VisuallyHidden", "Flex", "Spinner", "mapResponsiveProp", "mapButtonSizeToSpinnerSize", "React", "import_classnames", "import_radix_ui", "React", "import_radix_ui", "leadingTrimValues", "leadingTrimPropDef", "textAlignValues", "textAlignPropDef", "textWrapValues", "textWrapPropDef", "truncatePropDef", "fontFamilies", "fontFamilyPropDef", "weights", "weightPropDef", "as", "sizes", "textPropDefs", "asChildPropDef", "fontFamilyPropDef", "weightPropDef", "textAlignPropDef", "leadingTrimPropDef", "truncatePropDef", "textWrapPropDef", "colorPropDef", "highContrastPropDef", "mergedPropDefs", "textPropDefs", "marginPropDefs", "Text", "props", "forwardedRef", "children", "className", "asChild", "Tag", "color", "textProps", "extractProps", "combinedClassName", "React", "import_classnames", "import_radix_ui", "import_internal", "getMatchingGrayColor", "accentColor", "React", "usePropSyncedState", "propValue", "value", "setValue", "previousPropValue", "setPreviousPropValue", "appearances", "panelBackgrounds", "materials", "scalings", "fontFamilies", "themePropDefs", "asChildPropDef", "accentColors", "grayColors", "radii", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "Theme", "props", "forwardedRef", "ThemeContext", "TooltipPrimitive", "ThemeRoot", "ThemeImpl", "appearanceProp", "themePropDefs", "accentColorProp", "grayColorProp", "materialProp", "panelBackgroundProp", "radiusProp", "scalingProp", "fontFamilyProp", "headingFontFamilyProp", "hasBackground", "rootProps", "useDeprecatedPanelBackgroundWarning", "appearance", "setAppearance", "usePropSyncedState", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "effectiveMaterial", "material", "setMaterial", "panelBackground", "setPanelBackground", "radius", "setRadius", "scaling", "setScaling", "fontFamily", "setFontFamily", "headingFontFamily", "setHeadingFontFamily", "getClientOS", "ua", "context", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "noop", "onAccentColorChange", "onGrayColorChange", "onMaterialChange", "onPanelBackgroundChange", "onRadiusChange", "onScalingChange", "onFontFamilyChange", "onHeadingFontFamilyChange", "themeProps", "Comp", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "rootRef", "composedRef", "hasExplicitOS", "node", "os", "classNames", "tooltipPropDefs", "widthPropDefs", "Tooltip", "props", "forwardedRef", "children", "className", "open", "defaultOpen", "onOpenChange", "delayDuration", "disableHoverableContent", "content", "container", "forceMount", "tooltipContentProps", "extractProps", "tooltipPropDefs", "rootProps", "TooltipPrimitive", "Theme", "classNames", "Text", "React", "useTooltipWrapper", "tooltip", "tooltipId", "hasTooltip", "accessibilityProps", "IconButton", "className", "tooltip", "tooltipSide", "tooltipAlign", "tooltipDelayDuration", "tooltipDisableHoverableContent", "props", "forwardedRef", "tooltipId", "hasTooltip", "tooltipAccessibilityProps", "useTooltipWrapper", "hasAriaLabel", "hasAriaLabelledBy", "hasChildren", "iconButton", "BaseButton", "classNames", "Tooltip", "import_react", "ThickDividerHorizontalIcon", "React", "props", "forwardedRef", "ThickCheckIcon", "ChevronDownIcon", "ThickChevronRightIcon", "ThickChevronLeftIcon", "ThickDotIcon", "CloseIcon", "React", "_props", "_forwardedRef", "PaperclipIcon", "props", "forwardedRef", "FileIcon", "FileTextIcon", "React", "import_classnames", "import_radix_ui", "sizes", "scrollbarsValues", "scrollAreaPropDefs", "asChildPropDef", "radiusPropDef", "extractMarginProps", "props", "m", "mx", "my", "mt", "mr", "mb", "ml", "rest", "marginValues", "marginPropDefs", "marginValueSet", "MARGIN_PROPS", "getMarginStyles", "props", "classes", "style", "i", "key", "className", "customProperties", "value", "propClassNames", "propCustomProperties", "getResponsiveStyles", "mergeStyles", "React", "getSubtree", "options", "content", "asChild", "children", "firstChild", "ScrollArea", "props", "forwardedRef", "marginRest", "marginProps", "extractMarginProps", "marginClassNames", "marginCustomProperties", "getMarginStyles", "asChild", "children", "className", "style", "type", "scrollHideDelay", "dir", "size", "scrollAreaPropDefs", "radius", "scrollbars", "viewportProps", "ScrollAreaPrimitive", "classNames", "mergeStyles", "getSubtree", "getResponsiveClassNames", "useIsomorphicLayoutEffect", "withoutPlaceholder", "el", "measure", "placeholder", "LAYOUT_TRANSITION", "ChatbarContext", "ChatbarValueContext", "useChatbarContext", "ctx", "toArray", "val", "s", "matchesAccept", "file", "patterns", "mime", "name", "patRaw", "pat", "type", "subtype", "fmType", "fmSubtype", "IMAGE_EXT_RE", "isImageLike", "hasText", "value", "plural", "n", "word", "attachmentCounter", "createAttachmentId", "Root", "props", "forwardedRef", "className", "style", "children", "valueProp", "defaultValue", "onValueChange", "openProp", "defaultOpen", "onOpenChange", "expandOn", "minLines", "maxLines", "sendMode", "disabled", "readOnly", "onSubmit", "size", "variant", "color", "radius", "panelBackground", "material", "width", "maxWidth", "attachmentsProp", "defaultAttachments", "onAttachmentsChange", "accept", "multiple", "maxAttachments", "maxFileSize", "paste", "pasteAccept", "clearOnSubmit", "onAttachmentReject", "dropzone", "apiRef", "onBlurCapture", "divProps", "effectiveMaterial", "isValueControlled", "valueUncontrolled", "setValueUncontrolled", "isOpenControlled", "openUncontrolled", "setOpenUncontrolled", "open", "isAttachmentsControlled", "attachmentsUncontrolled", "setAttachmentsUncontrolled", "attachments", "announcement", "setAnnouncementState", "announce", "text", "prev", "rootRef", "composedRootRef", "textareaRef", "fileInputRef", "pickerOpenRef", "pressGuardRef", "pressGuardTimerRef", "pickerRef", "acceptKey", "pasteAcceptKey", "accepts", "pasteAccepts", "snapshot", "latest", "pendingAttachmentsRef", "getAttachments", "setOpen", "next", "setValue", "setAttachments", "ownedUrlsRef", "addFiles", "files", "cfg", "current", "rejected", "remainingSlots", "perActionLimit", "url", "messages", "appendFiles", "appendFilesFromPaste", "removeAttachment", "id", "removed", "a", "submit", "clear", "payload", "att", "owned", "openFilePicker", "options", "input", "beginFilePickerPress", "reset", "handleFileInputChange", "event", "picker", "handleBlurCapture", "rootEl", "nextTarget", "handleDrop", "getRootProps", "isDragActive", "dragActive", "handleContainerPointerDown", "target", "contextValue", "classNames", "Text", "VisuallyHidden", "Textarea", "asChild", "onFocus", "onChange", "onPaste", "onKeyDown", "onCompositionStart", "onCompositionEnd", "submitOnEnter", "textareaProps", "composedRef", "lineHeightRef", "paddingRef", "composingRef", "sizingRef", "recomputeMetrics", "computedStyle", "applyHeight", "isOpen", "min", "max", "lineHeight", "padding", "minHeight", "maxHeight", "contentHeight", "overflowing", "compactHeight", "prevWidth", "ro", "entries", "first", "handleFocus", "handleChange", "handlePaste", "item", "f", "handleCompositionStart", "handleCompositionEnd", "handleKeyDown", "Comp", "Slot", "InlineStart", "InlineEnd", "AttachmentsRow", "forceMount", "renderAttachment", "ScrollArea", "Flex", "Attachment", "STATUS_LABEL", "attachment", "isImage", "sizeLabel", "statusLabel", "locked", "handleRemove", "tile", "tiles", "index", "nextButton", "FileTextIcon", "IconButton", "CloseIcon", "AttachTrigger", "disabledProp", "onPointerDown", "onClick", "buttonProps", "Row", "RowStart", "RowEnd", "Send", "clearOnSend", "sizeProp", "variantProp", "tabIndex", "ariaLabel", "ariaLabelledby", "hasContent", "visible", "inactive", "labelProps", "handleClick"]
7
7
  }