@motech-development/breeze-ui 3.8.2 → 3.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1154 -1058
- package/lib/index.js.map +1 -1
- package/lib/internal/react-aria/OverlayParts.d.ts +2 -1
- package/lib/internal/react-aria/OverlayParts.d.ts.map +1 -1
- package/lib/patterns/ConfirmationDialog/ConfirmationDialog.d.ts +1 -1
- package/lib/patterns/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +1 -1
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["#overscan","#compactHiddenColumns","#compactCellHeights"],"sources":["../src/internal/hooks/useForwardedRef.ts","../src/provider/BreezeContext.ts","../src/formatting/FormattedDateTime/FormattedDateTime.tsx","../src/formatting/FormattedList/FormattedList.tsx","../src/formatting/FormattedNumber/FormattedNumber.tsx","../src/formatting/RelativeTime/RelativeTime.tsx","../src/internal/react-aria/renderNativeButton.ts","../src/internal/styling/actions.ts","../src/primitives/Button/Button.tsx","../src/internal/react-aria/OverlayParts.tsx","../src/internal/styling/responsive.ts","../src/primitives/Drawer/Drawer.tsx","../src/primitives/Link/Link.tsx","../src/primitives/SkipLink/SkipLink.tsx","../src/patterns/ApplicationShell/ApplicationShell.tsx","../src/patterns/ButtonGroup/ButtonGroup.tsx","../src/primitives/AlertDialog/AlertDialog.tsx","../src/primitives/IconTile/IconTile.tsx","../src/patterns/ConfirmationDialog/ConfirmationDialog.tsx","../src/internal/collections/useCollectionEmptyContent.ts","../src/primitives/Menu/Menu.tsx","../src/patterns/ContextSwitcher/ContextSwitcher.tsx","../src/patterns/FileAttachment/FileAttachment.tsx","../src/internal/files/validation.ts","../src/primitives/file/FileFeedback.tsx","../src/primitives/DropZone/DropZone.tsx","../src/primitives/FileTrigger/FileTrigger.tsx","../src/patterns/FileUpload/FileUpload.tsx","../src/patterns/FormActions/FormActions.tsx","../src/patterns/FormSection/FormSection.tsx","../src/patterns/MetricCard/MetricCard.tsx","../src/patterns/NavigationSection/NavigationSection.tsx","../src/patterns/PageHeader/PageHeader.tsx","../src/primitives/IconButton/IconButton.tsx","../src/patterns/Pagination/Pagination.tsx","../src/primitives/InputGroup/InputGroup.tsx","../src/internal/styling/formControls.ts","../src/primitives/TextField/TextField.tsx","../src/patterns/PasswordField/PasswordField.tsx","../src/patterns/SectionHeader/SectionHeader.tsx","../src/primitives/ToggleButton/ToggleButton.tsx","../src/primitives/ToggleGroup/ToggleGroup.tsx","../src/patterns/SegmentedControl/SegmentedControl.tsx","../src/patterns/StatePanel/StatePanel.tsx","../src/primitives/Avatar/Avatar.tsx","../src/patterns/UserMenu/UserMenu.tsx","../src/internal/react-aria/DisclosureParts.tsx","../src/primitives/Accordion/Accordion.tsx","../src/primitives/Alert/Alert.tsx","../src/primitives/Badge/Badge.tsx","../src/primitives/Breadcrumbs/Breadcrumbs.tsx","../src/internal/date/conversion.ts","../src/primitives/date/CalendarParts.tsx","../src/primitives/Calendar/Calendar.tsx","../src/primitives/Card/Card.tsx","../src/primitives/Center/Center.tsx","../src/primitives/Checkbox/Checkbox.tsx","../src/primitives/CheckboxGroup/CheckboxGroup.tsx","../src/internal/collections/useLoadMoreHandler.ts","../src/internal/styling/breakpoints.ts","../src/internal/collections/collectionKey.ts","../src/internal/collections/VirtualizedCollection.tsx","../src/primitives/ListBox/ListBox.tsx","../src/primitives/ComboBox/ComboBox.tsx","../src/internal/styling/layout.ts","../src/primitives/Container/Container.tsx","../src/primitives/date/DateInput.tsx","../src/primitives/DateField/DateField.tsx","../src/primitives/date/PickerParts.tsx","../src/primitives/DatePicker/DatePicker.tsx","../src/primitives/date/PickerFieldParts.tsx","../src/primitives/DateRangePicker/DateRangePicker.tsx","../src/primitives/DateTimePicker/DateTimePicker.tsx","../src/primitives/DescriptionList/DescriptionList.tsx","../src/primitives/Dialog/Dialog.tsx","../src/primitives/Disclosure/Disclosure.tsx","../src/primitives/Fieldset/Fieldset.tsx","../src/primitives/Grid/Grid.tsx","../src/primitives/GridList/GridList.tsx","../src/primitives/Inline/Inline.tsx","../src/primitives/LinkButton/LinkButton.tsx","../src/primitives/List/List.tsx","../src/primitives/Logo/Logo.tsx","../src/primitives/Meter/Meter.tsx","../src/primitives/NavigationList/NavigationList.tsx","../src/primitives/NumberField/NumberField.tsx","../src/primitives/Popover/Popover.tsx","../src/primitives/ProgressBar/ProgressBar.tsx","../src/primitives/RadioGroup/RadioGroup.tsx","../src/primitives/RangeCalendar/RangeCalendar.tsx","../src/primitives/SearchField/SearchField.tsx","../src/primitives/Select/Select.tsx","../src/primitives/Separator/Separator.tsx","../src/primitives/Skeleton/Skeleton.tsx","../src/primitives/Slider/Slider.tsx","../src/primitives/VisuallyHidden/VisuallyHidden.tsx","../src/primitives/Spinner/Spinner.tsx","../src/primitives/Stack/Stack.tsx","../src/primitives/Stepper/Stepper.tsx","../src/primitives/Surface/Surface.tsx","../src/primitives/Switch/Switch.tsx","../src/primitives/Table/Table.tsx","../src/primitives/Tabs/Tabs.tsx","../src/primitives/Tag/Tag.tsx","../src/primitives/TagGroup/TagGroup.tsx","../src/primitives/TextArea/TextArea.tsx","../src/primitives/TimeField/TimeField.tsx","../src/primitives/Toast/Toast.tsx","../src/primitives/Toolbar/Toolbar.tsx","../src/primitives/Tooltip/Tooltip.tsx","../src/primitives/Typography/Typography.tsx","../src/provider/messages.ts","../src/provider/BreezeProvider.tsx"],"sourcesContent":["import type { Ref, RefCallback } from 'react';\nimport { useCallback } from 'react';\n\nexport default function useForwardedRef<Element>(\n ref: Ref<Element> | undefined,\n): RefCallback<Element> {\n return useCallback(\n (element: Element | null) => {\n if (typeof ref === 'function') {\n ref(element);\n } else if (ref !== null && ref !== undefined) {\n Object.assign(ref, {\n current: element,\n });\n }\n },\n [ref],\n );\n}\n","import { createContext, useContext } from 'react';\nimport type { BreezeMessages } from './messages';\n\n/** Reading direction applied to the Breeze component subtree. */\nexport type BreezeDirection = 'ltr' | 'rtl';\n\n/** Router-neutral navigation contract used by link-capable Breeze components. */\nexport interface BreezeRouterAdapter {\n /** Performs client-side navigation to an application-owned URL. */\n navigate: (href: string) => void;\n}\n\nexport interface BreezeContextValue {\n direction: BreezeDirection;\n locale: string;\n messages: BreezeMessages;\n portalContainer: HTMLElement | null;\n router: BreezeRouterAdapter | undefined;\n timeZone: string | undefined;\n}\n\nexport const BreezeContext = createContext<BreezeContextValue | null>(null);\n\nexport function useBreezeContext(): BreezeContextValue {\n const context = useContext(BreezeContext);\n\n if (context === null) {\n throw new Error(\n 'Breeze components must be rendered within BreezeProvider.',\n );\n }\n\n return context;\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for locale-aware date and time output. */\nexport interface FormattedDateTimeProps\n extends Omit<\n HTMLAttributes<HTMLTimeElement>,\n 'children' | 'dateTime' | 'style'\n > {\n /** `Intl.DateTimeFormat` options applied using provider locale and time zone. */\n options?: Intl.DateTimeFormatOptions;\n /** Ref to the rendered time element. */\n ref?: Ref<HTMLTimeElement>;\n /** ISO 8601 value with an explicit offset. */\n value: string;\n}\n\n/**\n * Formats an ISO date-time while preserving its machine-readable value.\n *\n * @summary locale-aware date-time output with machine-readable semantics\n */\nexport function FormattedDateTime({\n options,\n ref,\n value,\n ...props\n}: Readonly<FormattedDateTimeProps>): ReactElement {\n const { locale, timeZone } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const resolvedOptions =\n timeZone === undefined\n ? options\n : {\n ...options,\n timeZone,\n };\n\n return createElement(\n 'time',\n {\n ...props,\n dateTime: value,\n ref: forwardedRef,\n },\n new Intl.DateTimeFormat(locale, resolvedOptions).format(new Date(value)),\n );\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for locale-aware list output. */\nexport interface FormattedListProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** `Intl.ListFormat` options. */\n options?: Intl.ListFormatOptions;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Ordered text values to join. */\n values: readonly string[];\n}\n\n/**\n * Joins an ordered text list using the provider locale.\n *\n * @summary locale-aware inline conjunction or disjunction text\n */\nexport function FormattedList({\n options,\n ref,\n values,\n ...props\n}: Readonly<FormattedListProps>): ReactElement {\n const { locale } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n ref: forwardedRef,\n },\n new Intl.ListFormat(locale, options).format(values),\n );\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for locale-aware numeric output. */\nexport interface FormattedNumberProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** `Intl.NumberFormat` options applied using the provider locale. */\n options?: Intl.NumberFormatOptions;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Numeric value to format. */\n value: bigint | number;\n}\n\n/**\n * Formats a domain-neutral number using the Breeze provider locale.\n *\n * @summary locale-aware domain-neutral numeric output\n */\nexport function FormattedNumber({\n options,\n ref,\n value,\n ...props\n}: Readonly<FormattedNumberProps>): ReactElement {\n const { locale } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n ref: forwardedRef,\n },\n new Intl.NumberFormat(locale, options).format(value),\n );\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Units accepted by locale-aware relative-time output. */\nexport type RelativeTimeUnit = Intl.RelativeTimeFormatUnit;\n\n/** Props for locale-aware relative-time output. */\nexport interface RelativeTimeProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** `Intl.RelativeTimeFormat` options. */\n options?: Intl.RelativeTimeFormatOptions;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Unit applied to the relative value. */\n unit: RelativeTimeUnit;\n /** Signed distance from the reference time. */\n value: number;\n}\n\n/**\n * Formats an application-calculated relative duration in the provider locale.\n *\n * @summary locale-aware relative duration from an application-owned value\n */\nexport function RelativeTime({\n options,\n ref,\n unit,\n value,\n ...props\n}: Readonly<RelativeTimeProps>): ReactElement {\n const { locale } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n ref: forwardedRef,\n },\n new Intl.RelativeTimeFormat(locale, options).format(value, unit),\n );\n}\n","import type { ComponentProps, ReactElement } from 'react';\nimport { createElement } from 'react';\n\n/** Native form behaviors supported by Breeze action buttons. */\nexport type NativeButtonType = 'button' | 'submit';\n\n/** Renders the concrete button expected by React Aria's DOM render contract. */\nexport default function renderNativeButton(\n props: ComponentProps<'button'>,\n type: NativeButtonType,\n): ReactElement {\n if (type === 'submit') {\n return createElement('button', {\n ...props,\n type: 'submit',\n });\n }\n\n return createElement('button', {\n ...props,\n type: 'button',\n });\n}\n","import { tv } from 'tailwind-variants';\n\nconst action = tv({\n base: 'breeze-action inline-flex shrink-0 items-center justify-center gap-2 border font-[family-name:var(--breeze-font-display)] font-bold no-underline transition-colors duration-[var(--breeze-duration-fast)] disabled:cursor-not-allowed disabled:opacity-55 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55 data-[pressed]:translate-y-px',\n compoundVariants: [\n {\n appearance: 'solid',\n class:\n 'bg-[var(--breeze-primary)] text-white data-[hovered]:bg-[var(--breeze-primary-hover)]',\n variant: 'primary',\n },\n {\n appearance: 'solid',\n class:\n 'bg-[var(--breeze-danger)] text-white data-[hovered]:bg-[var(--breeze-danger-hover)]',\n variant: 'danger',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-success)] text-white',\n variant: 'success',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-warning)] text-white',\n variant: 'warning',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-info)] text-white',\n variant: 'info',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-shell)] text-white',\n variant: 'dark',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-surface)]',\n variant: 'light',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-ink-soft)] text-white',\n variant: 'secondary',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-primary-soft)]',\n variant: 'primary',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-danger-soft)]',\n variant: 'danger',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-success-soft)]',\n variant: 'success',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-warning-soft)]',\n variant: 'warning',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-info-soft)]',\n variant: 'info',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-shell-soft)] text-white',\n variant: 'dark',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-surface)]',\n variant: 'light',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-surface-subtle)]',\n variant: 'secondary',\n },\n {\n appearance: ['ghost', 'outline'],\n class: 'data-[hovered]:bg-[var(--breeze-surface-subtle)]',\n },\n {\n appearance: 'text',\n class:\n 'min-h-11 border-0 bg-transparent px-1 py-0 data-[hovered]:bg-transparent',\n },\n ],\n defaultVariants: {\n appearance: 'solid',\n size: 'md',\n variant: 'primary',\n },\n variants: {\n appearance: {\n ghost: 'border-0 bg-transparent',\n outline: 'bg-[var(--breeze-surface)]',\n solid: '',\n subtle: 'border-0',\n text: 'border-0',\n },\n size: {\n lg: 'min-h-12 px-5 py-3 text-base leading-[1.4]',\n md: 'min-h-11 px-4 py-2.5 text-base leading-[1.4]',\n sm: 'min-h-8 px-3 py-1.5 text-xs leading-[1.4]',\n },\n variant: {\n danger: 'border-[var(--breeze-danger)] text-[var(--breeze-danger)]',\n dark: 'border-[var(--breeze-shell)] text-[var(--breeze-shell)]',\n info: 'border-[var(--breeze-info)] text-[var(--breeze-info)]',\n light: 'border-[var(--breeze-border)] text-[var(--breeze-ink)]',\n primary: 'border-[var(--breeze-primary)] text-[var(--breeze-primary)]',\n secondary:\n 'border-[var(--breeze-border-strong)] text-[var(--breeze-ink)]',\n success: 'border-[var(--breeze-success)] text-[var(--breeze-success)]',\n warning: 'border-[var(--breeze-warning)] text-[var(--breeze-warning)]',\n },\n },\n});\n\nexport default action;\n","import type { ComponentProps, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport renderNativeButton, {\n type NativeButtonType,\n} from '../../internal/react-aria/renderNativeButton';\nimport action from '../../internal/styling/actions';\nimport type {\n ControlSize,\n VisualAppearance,\n VisualVariant,\n} from '../../internal/styling/visual';\nimport type { NativeButtonProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Visual emphasis treatments supported by buttons with visible text. */\nexport type ButtonAppearance = VisualAppearance | 'text';\n\n/** Props for a semantic action button. */\nexport interface ButtonProps extends NativeButtonProps {\n /** Visual emphasis treatment. Defaults to `solid`. */\n appearance?: ButtonAppearance;\n /** Button content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents interaction. Defaults to `false`. */\n disabled?: boolean;\n /** Shows and announces an in-progress state while preventing activation. Defaults to `false`. */\n loading?: boolean;\n /** Called once when the user activates the button. */\n onAction?: () => void;\n /** Ref to the rendered button. */\n ref?: Ref<HTMLButtonElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n /** Constrained native form behavior: `button` or `submit`. Defaults to `button`. */\n type?: NativeButtonType;\n /** Semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\n/**\n * Performs an application action through pointer or keyboard activation.\n *\n * @summary semantic action with accessible disabled and loading states\n */\nexport function Button({\n appearance,\n children,\n className,\n disabled = false,\n loading = false,\n onAction,\n ref,\n size,\n type = 'button',\n variant,\n ...props\n}: Readonly<ButtonProps>): ReactElement {\n useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-busy': loading || undefined,\n className: action({\n appearance,\n class: className,\n size,\n variant,\n }),\n isDisabled: disabled,\n isPending: loading,\n onPress: onAction,\n ref: forwardedRef,\n render: (renderProps) => {\n const nativeProps = {\n ...props,\n 'aria-busy': loading || undefined,\n ...renderProps,\n };\n\n return renderNativeButton(nativeProps, type);\n },\n type,\n } as ComponentProps<typeof AriaButton>,\n loading ? (\n <>\n <span\n aria-hidden=\"true\"\n className=\"size-4 animate-spin rounded-full border-2 border-current border-r-transparent\"\n />\n <span>{children}</span>\n </>\n ) : (\n children\n ),\n );\n}\n","import type {\n ComponentProps,\n CSSProperties,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createContext, createElement, useContext, useId } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport { Dialog as AriaDialog } from 'react-aria-components/Dialog';\nimport { Heading as AriaHeading } from 'react-aria-components/Heading';\nimport {\n Modal as AriaModal,\n ModalOverlay as AriaModalOverlay,\n} from 'react-aria-components/Modal';\nimport { Text as AriaText } from 'react-aria-components/Text';\nimport { tv } from 'tailwind-variants';\nimport { Button, type ButtonProps } from '../../primitives/Button/Button';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport useForwardedRef from '../hooks/useForwardedRef';\nimport action from '../styling/actions';\nimport type { VisualAppearance } from '../styling/visual';\n\nconst overlay = tv({\n base: 'breeze-modal-overlay fixed inset-0 z-50 flex items-center justify-center overflow-y-auto bg-[var(--breeze-overlay)] p-4 forced-colors:bg-[Canvas]',\n});\nconst modal = tv({ base: 'max-h-full max-w-full outline-none' });\nconst surface = tv({\n base: 'max-h-[calc(100dvh-2rem)] w-[min(36rem,calc(100vw-2rem))] overflow-y-auto border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-6 text-[var(--breeze-ink)] shadow-xl outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n});\nconst title = tv({\n base: 'm-0 mb-2 font-[family-name:var(--breeze-font-display)] text-xl font-bold leading-tight',\n});\nconst description = tv({ base: 'mb-5 block text-[var(--breeze-ink-muted)]' });\n\nexport const OverlayDescriptionContext = createContext<string | undefined>(\n undefined,\n);\n\n/** Shared Breeze trigger props for overlays. */\nexport type SharedOverlayTriggerProps = Omit<ButtonProps, 'appearance'> & {\n appearance?: VisualAppearance;\n};\n\n/** Shared Breeze close-button props for overlays. */\nexport interface SharedOverlayCloseProps\n extends Omit<ButtonProps, 'appearance'> {\n appearance?: VisualAppearance;\n}\n\n/** Shared Breeze title props for overlays. */\nexport interface SharedOverlayTitleProps\n extends Omit<HTMLAttributes<HTMLHeadingElement>, 'style'> {\n /** Required accessible overlay title. */\n children: ReactNode;\n /** Semantic heading level. Defaults to `2`. */\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Ref to the rendered heading. */\n ref?: Ref<HTMLHeadingElement>;\n}\n\n/** Shared Breeze description props for overlays. */\nexport interface SharedOverlayDescriptionProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Required accessible overlay description. */\n children: ReactNode;\n /** Ref to the rendered description. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Internal modal-dialog surface configuration. */\nexport interface SharedModalContentProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n children: ReactNode;\n dismissible?: boolean;\n keyboardDismissDisabled?: boolean;\n modalClassName?: string;\n modalState?: {\n onOpenChange: (open: boolean) => void;\n open: boolean;\n };\n overlayClassName?: string;\n overlayStyle?: CSSProperties;\n ref?: Ref<HTMLElement>;\n role?: 'dialog' | 'alertdialog';\n surfaceClassName?: string;\n}\n\n/** React Aria-backed semantic trigger. */\nexport function SharedOverlayTrigger({\n appearance,\n ...props\n}: Readonly<SharedOverlayTriggerProps>): ReactElement {\n return createElement(Button, {\n ...props,\n appearance,\n });\n}\n\n/** React Aria-backed semantic close action. */\nexport function SharedOverlayClose({\n appearance,\n children,\n className,\n disabled = false,\n onAction,\n ref,\n size,\n variant,\n ...props\n}: Readonly<SharedOverlayCloseProps>): ReactElement {\n return createElement(\n AriaButton,\n {\n ...props,\n className: action({ appearance, class: className, size, variant }),\n isDisabled: disabled,\n onPress: onAction,\n ref: useForwardedRef(ref),\n slot: 'close',\n } as ComponentProps<typeof AriaButton>,\n children,\n );\n}\n\n/** React Aria title slot used as the overlay accessible name. */\nexport function SharedOverlayTitle({\n className,\n level = 2,\n ref,\n ...props\n}: Readonly<SharedOverlayTitleProps>): ReactElement {\n return createElement(AriaHeading, {\n ...props,\n className: title({ class: className }),\n level,\n ref: useForwardedRef(ref),\n slot: 'title',\n });\n}\n\n/** React Aria description slot used as the overlay accessible description. */\nexport function SharedOverlayDescription({\n className,\n ref,\n ...props\n}: Readonly<SharedOverlayDescriptionProps>): ReactElement {\n const generatedId = useContext(OverlayDescriptionContext);\n\n return createElement(AriaText, {\n ...props,\n className: description({ class: className }),\n elementType: 'p',\n id: props.id ?? generatedId,\n ref: useForwardedRef(ref),\n slot: 'description',\n });\n}\n\n/** React Aria modal engine shared by Dialog, AlertDialog, and Drawer. */\nexport function SharedModalContent({\n children,\n className,\n dismissible = true,\n keyboardDismissDisabled = false,\n modalClassName,\n modalState,\n overlayClassName,\n overlayStyle,\n ref,\n role = 'dialog',\n surfaceClassName,\n ...props\n}: Readonly<SharedModalContentProps>): ReactElement {\n useBreezeContext();\n const descriptionId = useId();\n\n return createElement(\n AriaModalOverlay,\n {\n className: overlay({ class: overlayClassName }),\n isDismissable: dismissible,\n isKeyboardDismissDisabled: keyboardDismissDisabled,\n isOpen: modalState?.open,\n onOpenChange: modalState?.onOpenChange,\n style: overlayStyle,\n } as ComponentProps<typeof AriaModalOverlay>,\n createElement(\n AriaModal,\n { className: modal({ class: modalClassName }) },\n createElement(\n AriaDialog,\n {\n ...props,\n 'aria-describedby': descriptionId,\n className: surface({ class: [surfaceClassName, className] }),\n ref: useForwardedRef(ref),\n role,\n } as ComponentProps<typeof AriaDialog>,\n createElement(\n OverlayDescriptionContext,\n { value: descriptionId },\n children,\n ),\n ),\n ),\n );\n}\n","/** Breakpoints available to Breeze responsive layout props. */\nexport type BreezeBreakpoint = 'base' | 'sm' | 'md' | 'lg';\n\n/**\n * A mobile-first layout value with required base behaviour and optional\n * overrides at Breeze breakpoints.\n */\nexport interface ResponsiveValueObject<Value> {\n /** Value used below the first breakpoint and inherited until overridden. */\n base: Value;\n /** Value applied at 1181px and wider. */\n lg?: Value;\n /** Value applied at 901px and wider. */\n md?: Value;\n /** Value applied at 681px and wider. */\n sm?: Value;\n}\n\n/** A scalar layout value or mobile-first responsive value. */\nexport type ResponsiveValue<Value> = Value | ResponsiveValueObject<Value>;\n\ntype ResponsiveClassMap<Value extends PropertyKey> = Record<\n BreezeBreakpoint,\n Record<Value, string>\n>;\n\nconst breakpoints: BreezeBreakpoint[] = ['base', 'sm', 'md', 'lg'];\n\nfunction isResponsiveValue<Value>(\n value: ResponsiveValue<Value>,\n): value is ResponsiveValueObject<Value> {\n return typeof value === 'object' && value !== null && 'base' in value;\n}\n\nexport function resolveResponsiveClasses<Value extends PropertyKey>(\n value: ResponsiveValue<Value>,\n classes: ResponsiveClassMap<Value>,\n): string {\n if (!isResponsiveValue(value)) {\n return classes.base[value];\n }\n\n return breakpoints\n .map((breakpoint) => {\n const breakpointValue = value[breakpoint];\n\n return breakpointValue === undefined\n ? undefined\n : classes[breakpoint][breakpointValue];\n })\n .filter((className): className is string => className !== undefined)\n .join(' ');\n}\n","import type { CSSProperties, Key, ReactElement, ReactNode } from 'react';\nimport {\n Children,\n cloneElement,\n createContext,\n createElement,\n isValidElement,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from 'react';\nimport { DialogTrigger as AriaDialogTrigger } from 'react-aria-components/Dialog';\nimport { CloseIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n SharedModalContent,\n type SharedModalContentProps,\n SharedOverlayClose,\n type SharedOverlayCloseProps,\n SharedOverlayDescription,\n type SharedOverlayDescriptionProps,\n SharedOverlayTitle,\n type SharedOverlayTitleProps,\n SharedOverlayTrigger,\n type SharedOverlayTriggerProps,\n} from '../../internal/react-aria/OverlayParts';\nimport {\n resolveResponsiveClasses,\n type ResponsiveValue,\n} from '../../internal/styling/responsive';\nimport {\n type BreezeDirection,\n useBreezeContext,\n} from '../../provider/BreezeContext';\n\n/** Supported physical modes expressed with logical inline placement. */\nexport type DrawerPlacement = 'start' | 'end' | 'bottom';\n/** Canonical inline drawer widths. Bottom drawers always remain full width. */\nexport type DrawerSize = 'default' | 'medium' | 'wide';\n/** Desktop-only boundary used to layer a nested drawer beside existing content. */\nexport interface DrawerAdjacentLayer {\n /** Inline-end viewport space reserved for the existing layer, in CSS pixels. */\n inlineEndOffset: number;\n}\nconst placementClasses = {\n base: {\n bottom:\n 'fixed inset-y-0 start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] end-auto h-dvh w-[var(--breeze-drawer-visual-viewport-width,100vw)] max-h-none max-w-none',\n end: 'fixed inset-y-0 end-[var(--breeze-drawer-visual-viewport-offset-inline-end,0px)] h-dvh w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] max-h-none max-w-[var(--breeze-drawer-width)]',\n start:\n 'fixed inset-y-0 start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] h-dvh w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] max-h-none max-w-[var(--breeze-drawer-width)]',\n },\n lg: {\n bottom:\n 'lg:fixed lg:inset-y-0 lg:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] lg:end-auto lg:h-dvh lg:w-[var(--breeze-drawer-visual-viewport-width,100vw)] lg:max-w-none',\n end: 'lg:fixed lg:inset-y-0 lg:end-[var(--breeze-drawer-visual-viewport-offset-inline-end,0px)] lg:start-auto lg:h-dvh lg:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] lg:max-h-none lg:max-w-[var(--breeze-drawer-width)]',\n start:\n 'lg:fixed lg:inset-y-0 lg:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] lg:end-auto lg:h-dvh lg:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] lg:max-h-none lg:max-w-[var(--breeze-drawer-width)]',\n },\n md: {\n bottom:\n 'md:fixed md:inset-y-0 md:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] md:end-auto md:h-dvh md:w-[var(--breeze-drawer-visual-viewport-width,100vw)] md:max-w-none',\n end: 'md:fixed md:inset-y-0 md:end-[var(--breeze-drawer-visual-viewport-offset-inline-end,0px)] md:start-auto md:h-dvh md:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] md:max-h-none md:max-w-[var(--breeze-drawer-width)]',\n start:\n 'md:fixed md:inset-y-0 md:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] md:end-auto md:h-dvh md:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] md:max-h-none md:max-w-[var(--breeze-drawer-width)]',\n },\n sm: {\n bottom:\n 'sm:fixed sm:inset-y-0 sm:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] sm:end-auto sm:h-dvh sm:w-[var(--breeze-drawer-visual-viewport-width,100vw)] sm:max-w-none',\n end: 'sm:fixed sm:inset-y-0 sm:end-[var(--breeze-drawer-visual-viewport-offset-inline-end,0px)] sm:start-auto sm:h-dvh sm:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] sm:max-h-none sm:max-w-[var(--breeze-drawer-width)]',\n start:\n 'sm:fixed sm:inset-y-0 sm:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] sm:end-auto sm:h-dvh sm:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] sm:max-h-none sm:max-w-[var(--breeze-drawer-width)]',\n },\n};\n\nconst drawerWidths: Record<DrawerSize, string> = {\n default: '36rem',\n medium: '38rem',\n wide: '48rem',\n};\nconst adjacentDrawerWidth = '38rem';\nconst visualViewportSurfaces = new Map<HTMLElement, BreezeDirection>();\nlet removeVisualViewportListeners: (() => void) | undefined;\n\nfunction updateVisualViewportSurface(\n surface: HTMLElement,\n viewport: VisualViewport,\n direction: BreezeDirection,\n): void {\n const offsetRight = Math.max(\n 0,\n window.innerWidth - viewport.offsetLeft - viewport.width,\n );\n const offsetInlineStart =\n direction === 'rtl' ? offsetRight : viewport.offsetLeft;\n const offsetInlineEnd =\n direction === 'rtl' ? viewport.offsetLeft : offsetRight;\n const offsetBottom = Math.max(\n 0,\n window.innerHeight - viewport.offsetTop - viewport.height,\n );\n\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-height',\n `${viewport.height}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-width',\n `${viewport.width}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-top',\n `${viewport.offsetTop}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-left',\n `${viewport.offsetLeft}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-right',\n `${offsetRight}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-inline-start',\n `${offsetInlineStart}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-inline-end',\n `${offsetInlineEnd}px`,\n );\n const overlay = surface.closest<HTMLElement>('.breeze-modal-overlay');\n const surfaceBounds = surface.getBoundingClientRect();\n\n overlay?.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-inline-end',\n `${offsetInlineEnd}px`,\n );\n overlay?.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-bottom',\n `${offsetBottom}px`,\n );\n overlay?.style.setProperty(\n '--breeze-drawer-visual-viewport-surface-left',\n `${surfaceBounds.left}px`,\n );\n overlay?.style.setProperty(\n '--breeze-drawer-visual-viewport-surface-width',\n `${surfaceBounds.width}px`,\n );\n overlay?.style.setProperty(\n '--breeze-drawer-visual-viewport-surface-background',\n window.getComputedStyle(surface).backgroundColor,\n );\n}\n\nfunction updateVisualViewportSurfaces(): void {\n const viewport = window.visualViewport ?? null;\n\n if (viewport === null) return;\n\n visualViewportSurfaces.forEach((direction, surface) => {\n updateVisualViewportSurface(surface, viewport, direction);\n });\n}\n\nfunction registerVisualViewportSurface(\n surface: HTMLElement,\n direction: BreezeDirection,\n): () => void {\n const viewport = window.visualViewport ?? null;\n\n if (viewport === null) return () => undefined;\n\n const refreshAfterEntry = (event: AnimationEvent) => {\n if (\n event.target === surface &&\n event.animationName === 'breeze-drawer-in'\n ) {\n updateVisualViewportSurface(surface, viewport, direction);\n }\n };\n\n surface.addEventListener('animationend', refreshAfterEntry);\n visualViewportSurfaces.set(surface, direction);\n updateVisualViewportSurface(surface, viewport, direction);\n\n if (removeVisualViewportListeners === undefined) {\n viewport.addEventListener('resize', updateVisualViewportSurfaces);\n viewport.addEventListener('scroll', updateVisualViewportSurfaces);\n removeVisualViewportListeners = () => {\n viewport.removeEventListener('resize', updateVisualViewportSurfaces);\n viewport.removeEventListener('scroll', updateVisualViewportSurfaces);\n };\n }\n\n return () => {\n surface.removeEventListener('animationend', refreshAfterEntry);\n visualViewportSurfaces.delete(surface);\n\n if (visualViewportSurfaces.size === 0) {\n removeVisualViewportListeners?.();\n removeVisualViewportListeners = undefined;\n }\n };\n}\n\ninterface DrawerModalState {\n onOpenChange: (open: boolean) => void;\n open: boolean;\n}\n\nconst DrawerModalStateContext = createContext<DrawerModalState | undefined>(\n undefined,\n);\n\nconst placementMotionClasses = {\n base: {\n bottom: 'breeze-drawer-offset-bottom',\n end: 'breeze-drawer-offset-end',\n start: 'breeze-drawer-offset-start',\n },\n lg: {\n bottom: 'breeze-drawer-offset-lg-bottom',\n end: 'breeze-drawer-offset-lg-end',\n start: 'breeze-drawer-offset-lg-start',\n },\n md: {\n bottom: 'breeze-drawer-offset-md-bottom',\n end: 'breeze-drawer-offset-md-end',\n start: 'breeze-drawer-offset-md-start',\n },\n sm: {\n bottom: 'breeze-drawer-offset-sm-bottom',\n end: 'breeze-drawer-offset-sm-end',\n start: 'breeze-drawer-offset-sm-start',\n },\n};\n\ninterface DrawerRootSharedProps {\n /** Trigger and drawer content. */ children: ReactNode;\n}\ninterface ControlledDrawerRootProps {\n /** Current open state. */ open: boolean;\n /** Called with the next open state. */ onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\ninterface ReadOnlyDrawerRootProps {\n /** Current immutable open state. */ open: boolean;\n /** Marks controlled state immutable. */ readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\ninterface UncontrolledDrawerRootProps {\n /** Initial open state. */ defaultOpen?: boolean;\n /** Called with the next open state. */ onOpenChange?: (\n open: boolean,\n ) => void;\n open?: never;\n readOnly?: false;\n}\ninterface TriggeredDrawerRootProps extends DrawerRootSharedProps {\n /** Uses a compound trigger to coordinate drawer state. */\n triggerless?: false;\n}\ninterface TriggerlessDrawerRootProps extends DrawerRootSharedProps {\n defaultOpen?: never;\n /** Called with the next externally controlled open state. */\n onOpenChange: (open: boolean) => void;\n /** Current externally controlled open state. */\n open: boolean;\n readOnly?: never;\n /** Omits a compound trigger for state controlled by an external action. */\n triggerless: true;\n}\n/** Props for controlled, read-only, or uncontrolled drawer state. */ export type DrawerRootProps =\n\n | (TriggeredDrawerRootProps &\n (\n | ControlledDrawerRootProps\n | ReadOnlyDrawerRootProps\n | UncontrolledDrawerRootProps\n ))\n | TriggerlessDrawerRootProps;\n/** Props for the drawer trigger. */ export type DrawerTriggerProps =\n SharedOverlayTriggerProps;\n/** Props for a responsive modal drawer surface. */ export interface DrawerContentProps\n extends Omit<\n SharedModalContentProps,\n | 'modalClassName'\n | 'modalState'\n | 'overlayClassName'\n | 'overlayStyle'\n | 'surfaceClassName'\n > {\n /** Clips and positions this layer beside reserved content on wide screens. */\n adjacent?: DrawerAdjacentLayer;\n /** Header treatment. `none` leaves all content unframed for application-owned shell drawers. Defaults to `default`. */\n chrome?: 'default' | 'none' | 'soft';\n /** Responsive logical edge. Defaults to `end`. */ placement?: ResponsiveValue<DrawerPlacement>;\n /** Resets the scrollable body to the start whenever this value changes. */ scrollResetKey?: Key;\n /** Canonical inline width. Bottom placement remains full width. Defaults to `default`. */\n size?: DrawerSize;\n}\n/** Props for the required drawer title. */ export type DrawerTitleProps =\n SharedOverlayTitleProps;\n/** Props for the required drawer description. */ export type DrawerDescriptionProps =\n SharedOverlayDescriptionProps;\n/** Props for a semantic drawer close action. */ export type DrawerCloseProps =\n SharedOverlayCloseProps;\n\n/** Coordinates a modal panel that enters from a logical viewport edge. */\nexport function Root(props: Readonly<DrawerRootProps>): ReactElement {\n useBreezeContext();\n const { children, triggerless } = props;\n\n if (triggerless) {\n const { onOpenChange, open } = props;\n\n return createElement(\n DrawerModalStateContext.Provider,\n {\n value: {\n onOpenChange,\n open,\n },\n },\n children,\n );\n }\n\n const { defaultOpen, onOpenChange, open } = props;\n\n return createElement(\n DrawerModalStateContext.Provider,\n { value: undefined },\n <AriaDialogTrigger\n defaultOpen={defaultOpen}\n isOpen={open}\n onOpenChange={onOpenChange}\n >\n {children}\n </AriaDialogTrigger>,\n );\n}\nexport function Content({\n adjacent,\n children,\n chrome = 'default',\n placement = 'end',\n ref,\n scrollResetKey,\n size = 'default',\n ...props\n}: Readonly<DrawerContentProps>): ReactElement {\n const { direction, messages } = useBreezeContext();\n const modalState = useContext(DrawerModalStateContext);\n const bodyRef = useRef<HTMLDivElement>(null);\n const visualViewportCleanupRef = useRef<(() => void) | undefined>(undefined);\n const forwardedRef = useForwardedRef(ref);\n const surfaceRef = useCallback(\n (surface: HTMLElement | null) => {\n visualViewportCleanupRef.current?.();\n visualViewportCleanupRef.current =\n surface === null\n ? undefined\n : registerVisualViewportSurface(surface, direction);\n forwardedRef(surface);\n },\n [direction, forwardedRef],\n );\n const childElements = Children.toArray(children);\n const titleElement = childElements.find(\n (child): child is ReactElement<DrawerTitleProps> =>\n isValidElement<DrawerTitleProps>(child) &&\n child.type === SharedOverlayTitle,\n );\n const descriptionElement = childElements.find(\n (child): child is ReactElement<DrawerDescriptionProps> =>\n isValidElement<DrawerDescriptionProps>(child) &&\n child.type === SharedOverlayDescription,\n );\n const body = childElements.filter(\n (child) => child !== titleElement && child !== descriptionElement,\n );\n const headerTone =\n chrome === 'soft'\n ? 'bg-[var(--breeze-shell-soft)]'\n : 'bg-[var(--breeze-shell)]';\n const overlayStyle = {\n '--breeze-drawer-width':\n adjacent === undefined ? drawerWidths[size] : adjacentDrawerWidth,\n ...(adjacent === undefined\n ? {}\n : {\n '--breeze-drawer-adjacent-inline-end': `${adjacent.inlineEndOffset}px`,\n }),\n } as CSSProperties;\n\n useEffect(() => {\n if (bodyRef.current !== null) {\n bodyRef.current.scrollTop = 0;\n }\n }, [scrollResetKey]);\n\n const framedChildren = (\n <>\n <header\n className={`flex shrink-0 items-center justify-between gap-5 px-4 py-4 text-[var(--breeze-ink-inverse)] sm:px-6 sm:py-5 ${headerTone}`}\n >\n <div className=\"min-w-0\">\n {descriptionElement === undefined\n ? null\n : cloneElement(descriptionElement, {\n className: `mb-0 text-[var(--breeze-ink-inverse-muted)] ${descriptionElement.props.className ?? ''}`,\n })}\n {titleElement === undefined\n ? null\n : cloneElement(titleElement, {\n className: `mt-1 mb-0 text-2xl leading-[1.2] text-[var(--breeze-ink-inverse)] ${titleElement.props.className ?? ''}`,\n })}\n </div>\n <SharedOverlayClose\n aria-label={messages.close}\n autoFocus\n appearance=\"ghost\"\n className=\"size-11 min-h-0 shrink-0 border-0 p-0 text-[var(--breeze-ink-inverse)] data-[hovered]:bg-white/10\"\n variant=\"light\"\n >\n <CloseIcon size=\"1rem\" />\n </SharedOverlayClose>\n </header>\n <div\n className=\"min-h-0 flex-1 overflow-y-auto px-4 py-5 sm:p-6\"\n ref={bodyRef}\n >\n {body}\n </div>\n </>\n );\n\n return createElement(\n SharedModalContent,\n {\n ...props,\n modalClassName: `breeze-drawer-motion ${adjacent === undefined ? '' : 'breeze-drawer-adjacent-motion'}`,\n modalState,\n overlayClassName: `breeze-drawer-overlay items-stretch justify-stretch overflow-hidden p-0 sm:p-0 ${adjacent === undefined ? '' : 'breeze-drawer-adjacent-overlay'}`,\n overlayStyle,\n ref: surfaceRef,\n surfaceClassName: `breeze-drawer-surface breeze-drawer-visual-viewport flex max-h-none flex-col overflow-clip border-0 p-0 shadow-xl ${adjacent === undefined ? '' : 'breeze-drawer-adjacent-surface'} ${resolveResponsiveClasses(placement, placementClasses)} ${resolveResponsiveClasses(placement, placementMotionClasses)}`,\n } as SharedModalContentProps,\n chrome === 'none' ? children : framedChildren,\n );\n}\n/**\n * Presents a modal task surface from a logical viewport edge with responsive\n * placement, focus containment, and controlled or trigger-owned state.\n *\n * @summary responsive edge-mounted modal task surface\n */\nexport const Drawer = {\n /** Semantic action that closes the current drawer layer. */\n Close: SharedOverlayClose,\n /** Responsive modal drawer surface and focus scope. */\n Content,\n /** Required accessible drawer description. */\n Description: SharedOverlayDescription,\n /** Controlled, read-only, or uncontrolled open-state coordinator. */\n Root,\n /** Required accessible drawer title. */\n Title: SharedOverlayTitle,\n /** Semantic action that opens the drawer. */\n Trigger: SharedOverlayTrigger,\n};\n","import type {\n ComponentProps,\n MouseEvent,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Link as AriaLink } from 'react-aria-components/Link';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { NativeLinkProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst link = tv({\n base: 'font-medium underline decoration-1 underline-offset-2 transition-colors duration-[var(--breeze-duration-fast)] data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55',\n defaultVariants: {\n variant: 'primary',\n },\n variants: {\n variant: {\n danger:\n 'text-[var(--breeze-danger)] data-[hovered]:text-[var(--breeze-danger-hover)]',\n inverse:\n 'text-[var(--breeze-ink-inverse)] data-[hovered]:text-[var(--breeze-ink-inverse-muted)]',\n muted:\n 'text-[var(--breeze-ink-soft)] data-[hovered]:text-[var(--breeze-ink)]',\n primary:\n 'text-[var(--breeze-primary)] data-[hovered]:text-[var(--breeze-primary-hover)]',\n },\n },\n});\n\n/** Props for a router-neutral navigation link. */\nexport interface LinkProps extends NativeLinkProps {\n /** Link content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents navigation. Defaults to `false`. */\n disabled?: boolean;\n /** Prompts download instead of navigation when provided. */\n download?: boolean | string;\n /** Native destination URL. */\n href: string;\n /** Called after semantic link activation. */\n onAction?: () => void;\n /** Ref to the rendered anchor. */\n ref?: Ref<HTMLAnchorElement>;\n /** Semantic text colour. Defaults to `primary`. */\n variant?: 'primary' | 'muted' | 'danger' | 'inverse';\n}\n\nfunction shouldUseRouter(\n href: string,\n target: string | undefined,\n download: LinkProps['download'],\n): boolean {\n return (\n href.startsWith('/') &&\n !href.startsWith('//') &&\n download !== true &&\n typeof download !== 'string' &&\n (target === undefined || target === '_self')\n );\n}\n\n/**\n * Navigates with the provider router for local URLs and native browser behaviour otherwise.\n *\n * @summary router-neutral inline navigation with native browser behaviour\n */\nexport function Link({\n children,\n className,\n disabled = false,\n download,\n href,\n onAction,\n ref,\n target,\n variant,\n ...props\n}: Readonly<LinkProps>): ReactElement {\n const { router } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const useRouter =\n router !== undefined && shouldUseRouter(href, target, download);\n const routerClick = {\n onClick: (event: MouseEvent<Element>) => {\n if (\n useRouter &&\n event.button === 0 &&\n !event.altKey &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.shiftKey\n ) {\n event.preventDefault();\n router.navigate(href);\n }\n },\n };\n\n return createElement(\n AriaLink,\n {\n ...props,\n ...routerClick,\n className: link({\n class: className,\n variant,\n }),\n download,\n href,\n isDisabled: disabled,\n onPress: onAction,\n ref: forwardedRef,\n render: (renderProps) => {\n if (disabled || !('href' in renderProps)) {\n return createElement('span', {\n ...renderProps,\n href: undefined,\n } as unknown as ComponentProps<'span'>);\n }\n\n return createElement('a', {\n ...props,\n ...renderProps,\n });\n },\n target,\n } as ComponentProps<typeof AriaLink>,\n children,\n );\n}\n","import type { ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport type { NativeLinkProps } from '../../internal/types/native';\nimport { Link, type LinkProps } from '../Link/Link';\n\nconst skipLink = tv({\n base: 'fixed start-4 top-4 z-50 -translate-y-24 bg-[var(--breeze-primary)] px-4 py-3 font-semibold text-white outline-none transition-transform focus:translate-y-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--breeze-focus)] motion-reduce:transition-none',\n});\n\n/** Props for the keyboard-first link that bypasses repeated page chrome. */\nexport interface SkipLinkProps extends NativeLinkProps {\n /** Accessible link content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Ref to the rendered anchor. */\n ref?: Ref<HTMLAnchorElement>;\n /** Id of the focusable main content target, without a leading hash. */\n targetId: string;\n}\n\n/**\n * Reveals a native fragment link on focus so keyboard users can bypass\n * repeated content.\n *\n * @summary focus-revealed bypass link to a main-content target\n */\nexport function SkipLink({\n children,\n className,\n ref,\n targetId,\n ...props\n}: Readonly<SkipLinkProps>): ReactElement {\n return createElement(\n Link,\n {\n ...props,\n className: skipLink({ class: className }),\n href: `#${targetId}`,\n ref,\n } as LinkProps,\n children,\n );\n}\n","import type { HTMLAttributes, Key, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useEffect, useRef } from 'react';\nimport { CloseIcon, MenuIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { Drawer } from '../../primitives/Drawer/Drawer';\nimport { SkipLink } from '../../primitives/SkipLink/SkipLink';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\ninterface ApplicationShellSharedProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style' | 'title'> {\n /** Account or user-menu slot in the wide rail footer and compact header. */\n account: ReactNode;\n /** Canonical product brand slot. */\n brand: ReactNode;\n /** Main application page content. */\n children: ReactNode;\n /** Compact-header product name. Defaults to `brand`. */\n compactBrand?: ReactNode;\n /** Focuses the main-content target after this application-owned content key changes. */\n contentFocusKey?: Key;\n /** Optional active application-context slot. */\n context?: ReactNode;\n /** Accessible title for the compact navigation drawer. */\n navigationLabel: string;\n /** Primary application navigation. */\n navigation: ReactNode;\n /** Ref to the rendered shell root. */\n ref?: Ref<HTMLDivElement>;\n /** Visible-on-focus skip-link label. */\n skipLinkLabel: ReactNode;\n /** Stable id assigned to the main-content target. Defaults to `main-content`. */\n mainId?: string;\n}\n\ninterface ControlledApplicationShellProps {\n /** Current compact-navigation drawer state. */\n compactNavigationOpen: boolean;\n defaultCompactNavigationOpen?: never;\n /** Called with the next compact-navigation drawer state. */\n onCompactNavigationOpenChange: (open: boolean) => void;\n}\n\ninterface UncontrolledApplicationShellProps {\n compactNavigationOpen?: never;\n /** Initial compact-navigation drawer state. Defaults to `false`. */\n defaultCompactNavigationOpen?: boolean;\n /** Called with the next compact-navigation drawer state. */\n onCompactNavigationOpenChange?: (open: boolean) => void;\n}\n\n/** Props for the shared responsive application frame. */\nexport type ApplicationShellProps = ApplicationShellSharedProps &\n (ControlledApplicationShellProps | UncontrolledApplicationShellProps);\n\n/**\n * Frames brand, navigation, context, account controls, and main content\n * responsively.\n *\n * @summary responsive application frame with accessible primary navigation\n */\nexport function ApplicationShell({\n account,\n brand,\n children,\n className,\n compactBrand,\n compactNavigationOpen,\n context,\n contentFocusKey,\n defaultCompactNavigationOpen,\n mainId = 'main-content',\n navigation,\n navigationLabel,\n onCompactNavigationOpenChange,\n ref,\n skipLinkLabel,\n ...props\n}: Readonly<ApplicationShellProps>): ReactElement {\n const { messages } = useBreezeContext();\n const mainRef = useRef<HTMLElement>(null);\n const previousContentFocusKey = useRef(contentFocusKey);\n\n useEffect(() => {\n const previousKey = previousContentFocusKey.current;\n\n previousContentFocusKey.current = contentFocusKey;\n\n if (contentFocusKey === undefined || contentFocusKey === previousKey) {\n return undefined;\n }\n\n const frame = window.requestAnimationFrame(() => {\n mainRef.current?.focus();\n });\n\n return () => window.cancelAnimationFrame(frame);\n }, [contentFocusKey]);\n\n const compactNavigationContent = (\n <>\n <Drawer.Trigger\n aria-label={navigationLabel}\n appearance=\"ghost\"\n className=\"size-11 border-0 p-0 text-[var(--breeze-ink-inverse)] data-[hovered]:bg-[var(--breeze-shell-soft)]\"\n variant=\"light\"\n >\n <MenuIcon size=\"1.5rem\" />\n </Drawer.Trigger>\n <Drawer.Content\n className=\"max-h-none w-64 border-0 bg-[var(--breeze-shell)] p-0 text-[var(--breeze-ink-inverse)]\"\n chrome=\"none\"\n placement=\"start\"\n >\n <div className=\"flex min-h-16 items-center justify-between border-b border-[var(--breeze-shell-soft)] px-4\">\n <div>{brand}</div>\n <Drawer.Title className=\"sr-only\">{navigationLabel}</Drawer.Title>\n <Drawer.Close\n aria-label={messages.close}\n appearance=\"ghost\"\n className=\"size-11 border-0 p-0 text-[var(--breeze-ink-inverse)] data-[hovered]:bg-[var(--breeze-shell-soft)]\"\n variant=\"light\"\n >\n <CloseIcon size=\"1.5rem\" />\n </Drawer.Close>\n </div>\n <Drawer.Description className=\"sr-only\">\n {navigationLabel}\n </Drawer.Description>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-3 py-6 [&_a]:flex [&_a]:min-h-11 [&_a]:items-center [&_a]:gap-3 [&_a]:text-[var(--breeze-ink-inverse-muted)] [&_a]:no-underline [&_a[data-current]]:bg-[var(--breeze-primary-selected)] [&_a[data-current]]:text-white [&_a[data-current][data-hovered]]:bg-[var(--breeze-primary-selected)] [&_a[data-hovered]]:bg-[var(--breeze-shell-soft)] [&_a[data-hovered]]:text-white\">\n {navigation}\n </div>\n <footer className=\"grid gap-2 border-t border-[var(--breeze-shell-soft)] p-3\">\n {context}\n </footer>\n </Drawer.Content>\n </>\n );\n const compactNavigation =\n compactNavigationOpen === undefined ? (\n <Drawer.Root\n defaultOpen={defaultCompactNavigationOpen}\n onOpenChange={onCompactNavigationOpenChange}\n >\n {compactNavigationContent}\n </Drawer.Root>\n ) : (\n <Drawer.Root\n onOpenChange={onCompactNavigationOpenChange}\n open={compactNavigationOpen}\n >\n {compactNavigationContent}\n </Drawer.Root>\n );\n\n return createElement(\n 'div',\n {\n ...props,\n className: `min-h-dvh bg-[var(--breeze-canvas)] text-[var(--breeze-ink)] ${className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <SkipLink targetId={mainId}>{skipLinkLabel}</SkipLink>\n <aside className=\"fixed inset-y-0 start-0 z-20 hidden w-64 flex-col bg-[var(--breeze-shell)] text-[var(--breeze-ink-inverse)] md:flex\">\n <div className=\"flex min-h-20 items-center border-b border-[var(--breeze-shell-soft)] px-5\">\n {brand}\n </div>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-3 py-7 [&_a]:flex [&_a]:min-h-11 [&_a]:items-center [&_a]:gap-3 [&_a]:text-[var(--breeze-ink-inverse-muted)] [&_a]:no-underline [&_a[data-current]]:bg-[var(--breeze-primary-selected)] [&_a[data-current]]:text-white [&_a[data-current][data-hovered]]:bg-[var(--breeze-primary-selected)] [&_a[data-hovered]]:bg-[var(--breeze-shell-soft)] [&_a[data-hovered]]:text-white\">\n {navigation}\n </div>\n <footer className=\"grid gap-2 border-t border-[var(--breeze-shell-soft)] p-3\">\n {context}\n {account}\n </footer>\n </aside>\n <header className=\"sticky top-0 z-20 grid min-h-16 grid-cols-[2.75rem_minmax(0,1fr)_2.75rem] items-center gap-3 bg-[var(--breeze-shell)] px-3 text-[var(--breeze-ink-inverse)] md:hidden\">\n {compactNavigation}\n <div className=\"min-w-0 justify-self-center font-[family-name:var(--breeze-font-display)] text-xl font-semibold\">\n {compactBrand ?? brand}\n </div>\n <div className=\"size-11 justify-self-end overflow-visible [&_[data-breeze-user-menu-trigger]]:min-h-11 [&_[data-breeze-user-menu-trigger]]:p-1 [&_[data-breeze-user-name]]:hidden\">\n {account}\n </div>\n </header>\n <main\n className=\"min-h-dvh px-4 py-6 sm:px-8 sm:py-12 md:ms-64 lg:px-12\"\n id={mainId}\n ref={mainRef}\n tabIndex={-1}\n >\n {children}\n </main>\n </>,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ResponsiveValue } from '../../internal/styling/responsive';\nimport { resolveResponsiveClasses } from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst orientationClasses = {\n base: {\n horizontal: 'flex-row',\n vertical: 'flex-col items-stretch',\n verticalReverse: 'flex-col-reverse items-stretch',\n },\n lg: {\n horizontal: 'lg:flex-row',\n vertical: 'lg:flex-col lg:items-stretch',\n verticalReverse: 'lg:flex-col-reverse lg:items-stretch',\n },\n md: {\n horizontal: 'md:flex-row',\n vertical: 'md:flex-col md:items-stretch',\n verticalReverse: 'md:flex-col-reverse md:items-stretch',\n },\n sm: {\n horizontal: 'sm:flex-row',\n vertical: 'sm:flex-col sm:items-stretch',\n verticalReverse: 'sm:flex-col-reverse sm:items-stretch',\n },\n} as const;\n\nconst buttonGroup = tv({\n base: 'flex flex-wrap gap-3',\n defaultVariants: { align: 'start' },\n variants: {\n align: {\n center: 'justify-center',\n end: 'justify-end',\n spaceBetween: 'justify-between',\n start: 'justify-start',\n },\n },\n});\n\n/** Props for a related set of application actions. */\nexport interface ButtonGroupProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Horizontal alignment. Defaults to `start`. */\n align?: 'start' | 'center' | 'end' | 'spaceBetween';\n /** Related Button, LinkButton, or IconButton children. */\n children: ReactNode;\n /** Responsive action-flow direction. Defaults to `horizontal`. */\n orientation?: ResponsiveValue<'horizontal' | 'vertical' | 'verticalReverse'>;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * Arranges semantically related actions with responsive flow.\n *\n * @summary responsive visual grouping for related application actions\n */\nexport function ButtonGroup({\n align,\n className,\n orientation = 'horizontal',\n ref,\n ...props\n}: Readonly<ButtonGroupProps>): ReactElement {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: buttonGroup({\n align,\n class: [\n resolveResponsiveClasses(orientation, orientationClasses),\n className,\n ],\n }),\n ref: useForwardedRef(ref),\n role: props.role ?? 'group',\n });\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createContext, createElement, useContext } from 'react';\nimport { DialogTrigger as AriaDialogTrigger } from 'react-aria-components/Dialog';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n SharedModalContent,\n type SharedModalContentProps,\n SharedOverlayClose,\n type SharedOverlayCloseProps,\n SharedOverlayDescription,\n type SharedOverlayDescriptionProps,\n SharedOverlayTitle,\n type SharedOverlayTitleProps,\n SharedOverlayTrigger,\n type SharedOverlayTriggerProps,\n} from '../../internal/react-aria/OverlayParts';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst alertDialogActions = tv({\n base: 'flex flex-col-reverse items-stretch gap-2.5 sm:flex-row sm:items-center sm:justify-end [&>*]:w-full sm:[&>*]:w-auto',\n});\n\ninterface AlertDialogRootSharedProps {\n /** Trigger and alert content. */ children: ReactNode;\n}\ninterface ControlledAlertDialogRootProps {\n /** Current open state. */ open: boolean;\n /** Called with the next open state. */ onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\ninterface ReadOnlyAlertDialogRootProps {\n /** Current immutable open state. */ open: boolean;\n /** Marks controlled state immutable. */ readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\ninterface UncontrolledAlertDialogRootProps {\n /** Initial open state. */ defaultOpen?: boolean;\n /** Called with the next open state. */ onOpenChange?: (\n open: boolean,\n ) => void;\n open?: never;\n readOnly?: false;\n}\ninterface TriggeredAlertDialogRootProps extends AlertDialogRootSharedProps {\n /** Uses a compound trigger to coordinate alert-dialog state. */\n triggerless?: false;\n}\ninterface TriggerlessAlertDialogRootProps extends AlertDialogRootSharedProps {\n defaultOpen?: never;\n /** Called with the next externally controlled open state. */\n onOpenChange: (open: boolean) => void;\n /** Current externally controlled open state. */\n open: boolean;\n readOnly?: never;\n /** Omits a compound trigger for state controlled by an external action. */\n triggerless: true;\n}\n/** Props for controlled, read-only, or uncontrolled alert-dialog state. */ export type AlertDialogRootProps =\n\n | (TriggeredAlertDialogRootProps &\n (\n | ControlledAlertDialogRootProps\n | ReadOnlyAlertDialogRootProps\n | UncontrolledAlertDialogRootProps\n ))\n | TriggerlessAlertDialogRootProps;\n/** Props for the alert-dialog trigger. */ export type AlertDialogTriggerProps =\n SharedOverlayTriggerProps;\n/** Props for alert-dialog content requiring explicit action. */ export type AlertDialogContentProps =\n Omit<SharedModalContentProps, 'dismissible' | 'modalState' | 'role'>;\n/** Props for the required alert-dialog title. */ export type AlertDialogTitleProps =\n SharedOverlayTitleProps;\n/** Props for the required alert-dialog consequence description. */ export type AlertDialogDescriptionProps =\n SharedOverlayDescriptionProps;\n/** Props for an explicit alert-dialog close action. */ export type AlertDialogCloseProps =\n SharedOverlayCloseProps;\n/** Props for the canonical alert-dialog action region. */\nexport interface AlertDialogActionsProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Explicit decision actions. */\n children: ReactNode;\n /** Ref to the rendered action group. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface AlertDialogModalState {\n onOpenChange: (open: boolean) => void;\n open: boolean;\n}\n\nconst AlertDialogModalStateContext = createContext<\n AlertDialogModalState | undefined\n>(undefined);\n\n/** Coordinates an accessible modal decision that requires acknowledgement. */\nexport function Root(props: Readonly<AlertDialogRootProps>): ReactElement {\n useBreezeContext();\n const { children, triggerless } = props;\n\n if (triggerless) {\n const { onOpenChange, open } = props;\n\n return createElement(\n AlertDialogModalStateContext.Provider,\n { value: { onOpenChange, open } },\n children,\n );\n }\n\n const { defaultOpen, onOpenChange, open } = props;\n\n return createElement(\n AlertDialogModalStateContext.Provider,\n { value: undefined },\n <AriaDialogTrigger\n defaultOpen={defaultOpen}\n isOpen={open}\n onOpenChange={onOpenChange}\n >\n {children}\n </AriaDialogTrigger>,\n );\n}\nexport function Content(\n props: Readonly<AlertDialogContentProps>,\n): ReactElement {\n const modalState = useContext(AlertDialogModalStateContext);\n\n return createElement(SharedModalContent, {\n ...props,\n dismissible: false,\n modalState,\n role: 'alertdialog',\n });\n}\n\nexport function Actions({\n className,\n ref,\n ...props\n}: Readonly<AlertDialogActionsProps>): ReactElement {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: alertDialogActions({ class: className }),\n ref: useForwardedRef(ref),\n role: props.role ?? 'group',\n });\n}\n/**\n * Presents an accessible modal alert that requires an explicit decision.\n *\n * @summary modal decision requiring explicit confirmation\n */\nexport const AlertDialog = {\n /** Responsive, end-aligned region for explicit decision actions. */\n Actions,\n /** Explicit decision action that closes the alert dialog. */\n Close: SharedOverlayClose,\n /** Non-outside-dismissible alert-dialog surface and focus scope. */\n Content,\n /** Required accessible consequence description. */\n Description: SharedOverlayDescription,\n /** Controlled, read-only, or uncontrolled open-state coordinator. */\n Root,\n /** Required accessible alert title. */\n Title: SharedOverlayTitle,\n /** Semantic action that opens the alert dialog. */\n Trigger: SharedOverlayTrigger,\n};\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize, VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst iconTile = tv({\n base: 'inline-flex shrink-0 items-center justify-center font-[family-name:var(--breeze-font-display)] font-bold forced-colors:border forced-colors:border-[CanvasText]',\n defaultVariants: {\n bordered: true,\n shape: 'square',\n size: 'md',\n variant: 'primary',\n },\n variants: {\n bordered: {\n false: 'border-0',\n true: 'border',\n },\n shape: {\n circle: 'rounded-full',\n square: 'rounded-none',\n },\n size: {\n lg: 'size-14 text-2xl',\n md: 'size-10 text-xl',\n sm: 'size-9 text-base',\n },\n variant: {\n danger:\n 'border-[var(--breeze-danger)] bg-[var(--breeze-danger-soft)] text-[var(--breeze-danger)]',\n dark: 'border-[var(--breeze-shell)] bg-[var(--breeze-shell)] text-white',\n info: 'border-[var(--breeze-info)] bg-[var(--breeze-info-soft)] text-[var(--breeze-info)]',\n light:\n 'border-[var(--breeze-border)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n neutral:\n 'border-[var(--breeze-neutral)] bg-[var(--breeze-neutral-soft)] text-[var(--breeze-neutral)]',\n primary:\n 'border-[var(--breeze-primary)] bg-[var(--breeze-primary-soft)] text-[var(--breeze-primary)]',\n secondary:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink-soft)]',\n success:\n 'border-[var(--breeze-success)] bg-[var(--breeze-success-soft)] text-[var(--breeze-success)]',\n warning:\n 'border-[var(--breeze-warning)] bg-[var(--breeze-warning-soft)] text-[var(--breeze-warning)]',\n },\n },\n});\n\n/** Semantic colours supported by a presentation tile. */\nexport type IconTileVariant = VisualVariant | 'neutral';\n\n/** Props for a semantic visual-marker tile. */\nexport interface IconTileProps\n extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'aria-hidden' | 'children' | 'style'\n > {\n /** Adds the semantic variant border. Defaults to `true`. */\n bordered?: boolean;\n /** The visual marker content rendered inside the tile. */\n children: ReactNode;\n /** Hides marker content from assistive technology. Defaults to `true`. */\n decorative?: boolean;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Square or circular marker geometry. Defaults to `square`. */\n shape?: 'circle' | 'square';\n /** Canonical tile size. Defaults to `md`. */\n size?: ControlSize;\n /** Semantic colour. Defaults to `primary`. */\n variant?: IconTileVariant;\n}\n\n/**\n * Presents decorative or meaningful marker content with canonical geometry,\n * sizing, and constrained semantic colour emphasis.\n *\n * @summary semantic presentation tile for icons and short markers\n */\nexport function IconTile({\n bordered = true,\n children,\n className,\n decorative = true,\n ref,\n shape = 'square',\n size = 'md',\n variant = 'primary',\n ...props\n}: Readonly<IconTileProps>) {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n 'aria-hidden': decorative ? true : undefined,\n className: iconTile({\n bordered,\n class: className,\n shape,\n size,\n variant,\n }),\n 'data-bordered': bordered,\n 'data-size': size,\n 'data-variant': variant,\n ref: forwardedRef,\n },\n children,\n );\n}\n","import type { ReactElement, ReactNode } from 'react';\nimport { CloseIcon, WarningIcon } from '../../icons';\nimport type { VisualAppearance } from '../../internal/styling/visual';\nimport { AlertDialog } from '../../primitives/AlertDialog/AlertDialog';\nimport { IconTile } from '../../primitives/IconTile/IconTile';\n\ninterface ConfirmationDialogSharedProps {\n /** Visible label for the non-confirming close action. */\n cancelLabel: ReactNode;\n /** Accessible label for the icon-only header close action. */\n closeLabel: string;\n /** Visible label for the confirming action. */\n confirmLabel: ReactNode;\n /** Consequence or decision context announced by the dialog. */\n description: ReactNode;\n /** Prevents the confirming action. Defaults to `false`. */\n disabled?: boolean;\n /** Uses the backdrop supplied by an existing modal layer. Defaults to `false`. */\n nested?: boolean;\n /** Reports the explicit confirming decision. */\n onConfirm: () => void;\n /** Dialog heading. */\n title: ReactNode;\n /** Semantic confirming action colour. Defaults to `danger`. */\n variant?: 'danger' | 'warning' | 'primary';\n}\n\ninterface ControlledConfirmationDialogProps {\n /** Current open state. */\n open: boolean;\n /** Called with the next open state. */\n onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyConfirmationDialogProps {\n /** Current immutable open state. */\n open: boolean;\n /** Marks controlled state as intentionally immutable. */\n readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\n\ninterface UncontrolledConfirmationDialogProps {\n /** Initial open state. Defaults to `false`. */\n defaultOpen?: boolean;\n /** Called with the next open state. */\n onOpenChange?: (open: boolean) => void;\n open?: never;\n readOnly?: false;\n}\n\ninterface TriggeredConfirmationDialogProps {\n /** Semantic action content that opens the dialog. */\n trigger: ReactNode;\n /** Visual treatment for the trigger. Defaults to `solid`. */\n triggerAppearance?: VisualAppearance;\n /** Uses the pattern's semantic trigger to coordinate dialog state. */\n triggerless?: false;\n}\n\ninterface TriggerlessConfirmationDialogProps {\n defaultOpen?: never;\n /** Called with the next externally controlled open state. */\n onOpenChange: (open: boolean) => void;\n /** Current externally controlled open state. */\n open: boolean;\n readOnly?: never;\n trigger?: never;\n triggerAppearance?: never;\n /** Omits the pattern trigger for state controlled by an external action. */\n triggerless: true;\n}\n\n/** Props for a controlled, read-only, or uncontrolled confirmation dialog. */\nexport type ConfirmationDialogProps = ConfirmationDialogSharedProps &\n (\n | (TriggeredConfirmationDialogProps &\n (\n | ControlledConfirmationDialogProps\n | ReadOnlyConfirmationDialogProps\n | UncontrolledConfirmationDialogProps\n ))\n | TriggerlessConfirmationDialogProps\n );\n\n/**\n * Presents a focused explicit decision while retaining focus restoration.\n *\n * @summary consequential decision pattern with safe initial focus\n */\nexport function ConfirmationDialog({\n cancelLabel,\n closeLabel,\n confirmLabel,\n defaultOpen,\n description,\n disabled = false,\n nested = false,\n onConfirm,\n onOpenChange,\n open,\n readOnly,\n title,\n trigger,\n triggerAppearance,\n triggerless = false,\n variant = 'danger',\n}: Readonly<ConfirmationDialogProps>): ReactElement {\n const content = (\n <>\n {triggerless ? null : (\n <AlertDialog.Trigger appearance={triggerAppearance} variant={variant}>\n {trigger}\n </AlertDialog.Trigger>\n )}\n <AlertDialog.Content\n className=\"breeze-confirmation-dialog max-h-[calc(100dvh-2rem)] w-full max-w-md border-0 border-b-2 border-b-[var(--breeze-border-strong)] p-0 shadow-[0_8px_0_rgb(6_12_24_/_22%)]\"\n overlayClassName={`p-5 ${nested ? 'bg-transparent forced-colors:bg-transparent' : ''}`}\n >\n <div className=\"flex items-center justify-between gap-4 border-b border-[var(--breeze-border)] p-4 sm:px-5\">\n <div className=\"flex min-w-0 items-center gap-3\">\n <IconTile\n bordered={false}\n data-confirmation-icon\n size=\"sm\"\n variant={variant}\n >\n <WarningIcon size={20} />\n </IconTile>\n <AlertDialog.Title className=\"mb-0 text-2xl leading-[1.2]\">\n {title}\n </AlertDialog.Title>\n </div>\n <AlertDialog.Close\n aria-label={closeLabel}\n appearance=\"ghost\"\n className=\"size-11 min-h-11 border-0 p-0 text-[var(--breeze-ink)]\"\n variant=\"secondary\"\n >\n <CloseIcon size={20} />\n </AlertDialog.Close>\n </div>\n <AlertDialog.Description className=\"mb-0 p-4 text-base leading-relaxed sm:p-5\">\n {description}\n </AlertDialog.Description>\n <AlertDialog.Actions className=\"px-4 pb-4 sm:px-5 sm:pb-5\">\n <AlertDialog.Close\n appearance=\"outline\"\n autoFocus\n className=\"text-[var(--breeze-ink)]\"\n variant=\"secondary\"\n >\n {cancelLabel}\n </AlertDialog.Close>\n <AlertDialog.Close\n disabled={disabled}\n onAction={onConfirm}\n variant={variant}\n >\n {confirmLabel}\n </AlertDialog.Close>\n </AlertDialog.Actions>\n </AlertDialog.Content>\n </>\n );\n\n if (triggerless) {\n if (open === undefined || onOpenChange === undefined) {\n throw new Error(\n 'Triggerless ConfirmationDialog requires controlled open state.',\n );\n }\n\n return (\n <AlertDialog.Root onOpenChange={onOpenChange} open={open} triggerless>\n {content}\n </AlertDialog.Root>\n );\n }\n\n if (open === undefined) {\n return (\n <AlertDialog.Root defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n {content}\n </AlertDialog.Root>\n );\n }\n\n if (readOnly === true) {\n return (\n <AlertDialog.Root open={open} readOnly>\n {content}\n </AlertDialog.Root>\n );\n }\n\n if (onOpenChange === undefined) {\n throw new Error('Controlled ConfirmationDialog requires onOpenChange.');\n }\n\n return (\n <AlertDialog.Root onOpenChange={onOpenChange} open={open}>\n {content}\n </AlertDialog.Root>\n );\n}\n","import type { ReactNode } from 'react';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nexport default function useCollectionEmptyContent(\n emptyContent: ReactNode | undefined,\n): ReactNode {\n const { messages } = useBreezeContext();\n\n return emptyContent === undefined ? messages.noResults : emptyContent;\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport { createElement, useContext, useRef } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport {\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuTrigger as AriaMenuTrigger,\n Popover as AriaPopover,\n RootMenuTriggerStateContext as AriaRootMenuTriggerStateContext,\n SubmenuTrigger as AriaSubmenuTrigger,\n} from 'react-aria-components/Menu';\nimport { tv } from 'tailwind-variants';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n CollectionSelection,\n} from '../../internal/types/collection';\nimport type {\n NativeButtonProps,\n NativeLinkProps,\n} from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst menuTrigger = tv({\n base: 'inline-flex min-h-11 min-w-0 items-center justify-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] px-3 font-semibold text-[var(--breeze-ink)] outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n});\nconst menuPopover = tv({\n base: 'min-w-48 border border-b-2 border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] shadow-[0_8px_0_rgb(6_12_24_/_18%)]',\n});\nconst menuList = tv({\n base: 'max-h-80 overflow-y-auto outline-none',\n});\nconst menuItem = tv({\n base: 'flex min-h-11 cursor-default items-center border-b border-[var(--breeze-border)] px-4 py-2 text-base text-[var(--breeze-ink)] no-underline outline-none last:border-b-0 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:bg-[var(--breeze-primary-soft)] data-[hovered]:bg-[var(--breeze-primary-soft)] data-[selected]:bg-[var(--breeze-primary-soft)]',\n});\n\ninterface MenuRootSharedProps {\n /** Trigger and popover parts. */\n children: ReactNode;\n}\n\ninterface ControlledMenuRootProps {\n /** Current popup state. */\n open: boolean;\n /** Called with the next popup state. */\n onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyMenuRootProps {\n /** Current immutable popup state. */\n open: boolean;\n /** Marks controlled popup state as intentionally immutable. */\n readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\n\ninterface UncontrolledMenuRootProps {\n /** Initial popup state. Defaults to `false`. */\n defaultOpen?: boolean;\n /** Called with the next popup state. */\n onOpenChange?: (open: boolean) => void;\n open?: never;\n readOnly?: false;\n}\n\n/** Props for controlled, read-only, or uncontrolled menu popup state. */\nexport type MenuRootProps = MenuRootSharedProps &\n (ControlledMenuRootProps | ReadOnlyMenuRootProps | UncontrolledMenuRootProps);\n\n/** Props for the button that opens a menu. */\nexport interface MenuTriggerProps extends NativeButtonProps {\n /** Trigger label or content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents opening the menu. Defaults to `false`. */\n disabled?: boolean;\n /** Ref to the rendered trigger button. */\n ref?: Ref<HTMLButtonElement>;\n}\n\n/** Props for the positioned menu popup. */\nexport interface MenuPopoverProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Menu list content. */\n children: ReactNode;\n /** Allows interaction outside the popover while retaining outside-dismissal. Defaults to `false`. */\n nonModal?: boolean;\n /** Popup placement relative to its trigger. Defaults to `bottom start`. */\n placement?: 'bottom start' | 'bottom end' | 'top start' | 'top end';\n /** Ref to the rendered popover. */\n ref?: Ref<HTMLElement>;\n}\n\ntype MenuListNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ntype MenuListSharedProps<Item extends BreezeCollectionItem> =\n MenuListNativeProps &\n CollectionContentProps<Item> & {\n /** Keys whose items cannot receive focus, selection, or actions. */\n disabledKeys?: Iterable<CollectionKey>;\n /** Content displayed when the menu has no items. */\n emptyContent?: ReactNode;\n /** Enables multiple selection. Defaults to `false`. */\n multiple?: boolean;\n /** Ref to the rendered menu. */\n ref?: Ref<HTMLDivElement>;\n };\n\ninterface ControlledMenuListProps {\n /** Current selected item keys. */\n selection: CollectionSelection;\n /** Called with the next selected item keys. */\n onSelectionChange: (selection: CollectionSelection) => void;\n defaultSelection?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyMenuListProps {\n /** Current immutable selected item keys. */\n selection: CollectionSelection;\n /** Marks controlled selection as intentionally immutable. */\n readOnly: true;\n defaultSelection?: never;\n onSelectionChange?: never;\n}\n\ninterface UncontrolledMenuListProps {\n /** Initial selected item keys. */\n defaultSelection?: CollectionSelection;\n /** Called with the next selected item keys. */\n onSelectionChange?: (selection: CollectionSelection) => void;\n readOnly?: false;\n selection?: never;\n}\n\n/** Props for a static or generic menu with optional selection state. */\nexport type MenuListProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = MenuListSharedProps<Item> &\n (ControlledMenuListProps | ReadOnlyMenuListProps | UncontrolledMenuListProps);\n\n/** Props for one keyed menu action or destination. */\nexport interface MenuItemProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Visible item content. */\n children: ReactNode;\n /** Prevents focus, selection, and action. Defaults to `false`. */\n disabled?: boolean;\n /** Optional native destination URL. */\n href?: string;\n /** Stable string or number item key. */\n id: CollectionKey;\n /** Called with this item key when activated. */\n onAction?: (key: CollectionKey) => void;\n /** Ref to the rendered menu item. */\n ref?: Ref<HTMLDivElement>;\n /** Plain-text representation used for typeahead and accessibility. */\n textValue: string;\n}\n\n/** Props for a nested menu trigger and its popup. */\nexport interface MenuSubmenuProps {\n /** Trigger item followed by a submenu popover. */\n children: [ReactElement, ReactElement];\n /** Hover delay before opening, in milliseconds. Defaults to `200`. */\n delay?: number;\n /** Ref to the rendered submenu trigger item. */\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction normaliseSelection(\n selection: 'all' | Set<CollectionKey>,\n): CollectionSelection {\n return selection === 'all' ? 'all' : [...selection];\n}\n\nfunction shouldUseRouter(href: string | undefined): href is string {\n return href !== undefined && href.startsWith('/') && !href.startsWith('//');\n}\n\n/** Coordinates popup state, trigger focus, and dismissal. */\nexport function Root({\n defaultOpen,\n onOpenChange,\n open,\n readOnly: _readOnly,\n ...props\n}: Readonly<MenuRootProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaMenuTrigger, {\n ...props,\n defaultOpen,\n isOpen: open,\n onOpenChange,\n });\n}\n\n/** Renders the menu trigger button. */\nexport function Trigger({\n className,\n disabled = false,\n ref,\n ...props\n}: Readonly<MenuTriggerProps>): ReactElement {\n const triggerState = useContext(AriaRootMenuTriggerStateContext);\n // MenuTrigger may open before Button's onPress runs, so preserve the state\n // from the start of the interaction when deciding whether this is a close.\n const wasOpenOnPressStart = useRef(false);\n\n return createElement(AriaButton, {\n ...props,\n className: menuTrigger({ class: className }),\n isDisabled: disabled,\n onPress: () => {\n if (wasOpenOnPressStart.current) {\n triggerState?.close();\n }\n },\n onPressStart: () => {\n wasOpenOnPressStart.current = triggerState?.isOpen === true;\n },\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaButton>);\n}\n\n/** Positions a root or nested menu and portals it through the Breeze provider. */\nexport function Popover({\n className,\n nonModal = false,\n placement = 'bottom start',\n ref,\n ...props\n}: Readonly<MenuPopoverProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaPopover, {\n ...props,\n className: menuPopover({ class: className }),\n isNonModal: nonModal,\n placement,\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaPopover>);\n}\n\ninterface NonModalMenuPopoverProps extends Omit<MenuPopoverProps, 'nonModal'> {\n triggerRef: RefObject<Element | null>;\n}\n\n/**\n * Positions a non-modal menu without treating its own trigger as an outside\n * dismissal target.\n *\n * @internal\n */\nexport function NonModalMenuPopover({\n className,\n placement = 'bottom start',\n ref,\n triggerRef,\n ...props\n}: Readonly<NonModalMenuPopoverProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaPopover, {\n ...props,\n className: menuPopover({ class: className }),\n isNonModal: true,\n placement,\n ref: useForwardedRef(ref),\n shouldCloseOnInteractOutside: (element: Element) =>\n triggerRef.current?.contains(element) !== true,\n } as ComponentProps<typeof AriaPopover>);\n}\n\n/** Renders a static or generic collection with keyboard focus and optional selection. */\nexport function List<Item extends BreezeCollectionItem>({\n children,\n className,\n defaultSelection,\n disabledKeys,\n emptyContent,\n items,\n multiple = false,\n onSelectionChange,\n ref,\n selection,\n ...props\n}: Readonly<MenuListProps<Item>>): ReactElement {\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n const hasSelection =\n selection !== undefined || defaultSelection !== undefined;\n let selectionMode: 'none' | 'single' | 'multiple' = 'none';\n\n if (hasSelection) {\n selectionMode = multiple ? 'multiple' : 'single';\n }\n\n return createElement(AriaMenu, {\n ...props,\n children,\n className: menuList({ class: className }),\n defaultSelectedKeys: defaultSelection,\n disabledKeys,\n items,\n onSelectionChange: (keys: 'all' | Set<CollectionKey>) =>\n onSelectionChange?.(normaliseSelection(keys)),\n ref: useForwardedRef(ref),\n renderEmptyState: () => resolvedEmptyContent,\n selectedKeys: selection,\n selectionMode,\n } as unknown as ComponentProps<typeof AriaMenu>);\n}\n\n/** Renders one action, selectable item, or router-neutral destination. */\nexport function Item({\n className,\n disabled = false,\n href,\n id,\n onAction,\n ref,\n textValue,\n ...props\n}: Readonly<MenuItemProps>): ReactElement {\n const { router } = useBreezeContext();\n const useRouter = router !== undefined && shouldUseRouter(href);\n const navigationProps =\n href === undefined || useRouter\n ? {}\n : {\n href,\n };\n\n return createElement(AriaMenuItem, {\n ...props,\n ...navigationProps,\n className: menuItem({ class: className }),\n id,\n isDisabled: disabled,\n onAction: () => {\n if (useRouter) {\n router.navigate(href);\n }\n\n onAction?.(id);\n },\n ref: useForwardedRef(ref),\n textValue,\n } as ComponentProps<typeof AriaMenuItem> & NativeLinkProps);\n}\n\n/** Coordinates nested-menu focus, opening, direction, and Escape dismissal. */\nexport function Submenu({\n ref,\n ...props\n}: Readonly<MenuSubmenuProps>): ReactElement {\n return createElement(AriaSubmenuTrigger, {\n ...props,\n ref: useForwardedRef(ref),\n });\n}\n\n/**\n * Accessible compound action-menu primitive.\n *\n * @summary transient keyboard-navigable actions, destinations, and submenus\n */\nexport const Menu = {\n /** One keyed action, selectable item, or destination. */\n Item,\n /** Static or generic keyboard-navigable collection. */\n List,\n /** Positioned root or nested popup. */\n Popover,\n /** Popup state and focus coordination root. */\n Root,\n /** Nested-menu trigger and popup pair. */\n Submenu,\n /** Button that opens the root popup. */\n Trigger,\n};\n","import type { ReactElement, ReactNode } from 'react';\nimport { Menu } from '../../primitives/Menu/Menu';\n\n/** One application-owned context available for selection. */\nexport interface ContextSwitcherItem {\n /** Optional supporting identifier or description. */\n description?: ReactNode;\n /** Prevents selection. Defaults to `false`. */\n disabled?: boolean;\n /** Optional visual context marker. */\n icon?: ReactNode;\n /** Stable context key. */\n id: string;\n /** Visible and typeahead-readable context name. */\n name: string;\n}\n\n/** Props for switching one visible application context. */\nexport interface ContextSwitcherProps {\n /** Accessible name for the menu trigger. */\n 'aria-label': string;\n /** Current selected context key, or `null` when selection is required. */\n currentId: string | null;\n /** Optional visual marker shown when selection is required. */\n emptyIcon?: ReactNode;\n /** Application-owned prompt shown when selection is required. */\n emptyName?: ReactNode;\n /** Ordered application-owned contexts. */\n items: readonly ContextSwitcherItem[];\n /** Optional label for a management action after the contexts. */\n manageLabel?: string;\n /** Called when the optional management action is selected. */\n onManage?: () => void;\n /** Called with the next selected context key. */\n onChange: (id: string) => void;\n /** Short text describing the selected context role. */\n triggerLabel?: ReactNode;\n}\n\n/**\n * Switches one application-owned context through a keyboard-complete menu.\n *\n * @summary controlled application-context selection menu\n */\nexport function ContextSwitcher({\n 'aria-label': ariaLabel,\n currentId,\n emptyIcon,\n emptyName,\n items,\n manageLabel,\n onChange,\n onManage,\n triggerLabel,\n}: Readonly<ContextSwitcherProps>): ReactElement {\n const current = items.find((item) => item.id === currentId);\n const itemIds = new Set(items.map((item) => item.id));\n let manageItemId = '__breeze-manage-contexts';\n\n while (itemIds.has(manageItemId)) {\n manageItemId = `_${manageItemId}`;\n }\n\n return (\n <Menu.Root>\n <Menu.Trigger\n aria-label={ariaLabel}\n className=\"min-h-14 w-full justify-start gap-3 border-0 bg-transparent p-2 text-start text-inherit data-[hovered]:bg-[var(--breeze-shell-soft)]\"\n >\n <span aria-hidden=\"true\" className=\"empty:hidden\">\n {current?.icon ?? emptyIcon}\n </span>\n <span className=\"grid min-w-0 flex-1 gap-0.5\">\n {triggerLabel === undefined ? null : (\n <small className=\"text-base text-[var(--breeze-ink-inverse-muted)]\">\n {triggerLabel}\n </small>\n )}\n <strong className=\"truncate text-base\">\n {current?.name ?? emptyName ?? ariaLabel}\n </strong>\n </span>\n </Menu.Trigger>\n <Menu.Popover className=\"w-80\" nonModal placement=\"top start\">\n <div className=\"border-b border-[var(--breeze-border)] px-4 py-3 font-[family-name:var(--breeze-font-display)] text-xl font-bold\">\n {ariaLabel}\n </div>\n <Menu.List\n aria-label={ariaLabel}\n onSelectionChange={(selection) => {\n if (selection === 'all') {\n return;\n }\n\n const [nextId] = selection;\n\n if (nextId !== undefined && nextId !== manageItemId) {\n onChange(String(nextId));\n }\n }}\n selection={currentId === null ? [] : [currentId]}\n >\n {items.map((item) => (\n <Menu.Item\n disabled={item.disabled}\n id={item.id}\n key={item.id}\n textValue={item.name}\n >\n <span className=\"flex min-w-0 items-center gap-3\">\n <span aria-hidden=\"true\" className=\"empty:hidden\">\n {item.icon}\n </span>\n <span className=\"grid min-w-0 gap-0.5\">\n <strong>{item.name}</strong>\n {item.description === undefined ? null : (\n <small>{item.description}</small>\n )}\n </span>\n </span>\n </Menu.Item>\n ))}\n {manageLabel === undefined || onManage === undefined ? null : (\n <Menu.Item\n className=\"font-bold text-[var(--breeze-primary)]\"\n id={manageItemId}\n onAction={onManage}\n textValue={manageLabel}\n >\n {manageLabel}\n </Menu.Item>\n )}\n </Menu.List>\n </Menu.Popover>\n </Menu.Root>\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { PaperclipIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for a selected file with persistent application-owned actions. */\nexport interface FileAttachmentProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** View, replace, download, or removal actions owned by the application. */\n actions: ReactNode;\n /** Persistent visible file name. */\n name: ReactNode;\n /** Ref to the rendered attachment row. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface FileAttachmentElementProps extends HTMLAttributes<HTMLDivElement> {\n 'data-breeze-file-attachment': string;\n ref: Ref<HTMLDivElement>;\n}\n\n/**\n * Presents a selected file and its actions with canonical responsive geometry.\n *\n * @summary responsive selected-file row with application-owned actions\n */\nexport function FileAttachment({\n actions,\n className,\n name,\n ref,\n ...props\n}: Readonly<FileAttachmentProps>): ReactElement {\n useBreezeContext();\n\n return createElement(\n 'div',\n {\n ...props,\n className: `flex min-h-16 flex-col items-stretch justify-between gap-4 py-2.5 sm:flex-row sm:items-center ${className ?? ''}`,\n 'data-breeze-file-attachment': '',\n ref: useForwardedRef(ref),\n } as FileAttachmentElementProps,\n <>\n <span className=\"flex min-w-0 items-center gap-2.5\">\n <PaperclipIcon size={16} />\n <strong className=\"min-w-0 truncate font-bold\">{name}</strong>\n </span>\n <div\n className=\"flex flex-wrap gap-2.5 [&>*]:w-full sm:[&>*]:w-auto\"\n data-breeze-file-attachment-actions=\"\"\n >\n {actions}\n </div>\n </>,\n );\n}\n","import type { FileRejection, FileRejectionReason } from '../types/file';\n\ninterface FileConstraints {\n acceptedFileTypes?: readonly string[];\n allowsMultiple: boolean;\n maxFileSize?: number;\n}\n\n/** Result of applying Breeze-owned file constraints. */\nexport interface FileValidationResult {\n /** Files that satisfy every constraint. */\n accepted: File[];\n /** Files that failed one or more constraints. */\n rejected: FileRejection[];\n}\n\nfunction matchesAcceptedType(\n file: File,\n acceptedFileTypes: readonly string[],\n): boolean {\n const normalizedName = file.name.toLowerCase();\n const normalizedType = file.type.toLowerCase();\n\n return acceptedFileTypes.some((acceptedType) => {\n const normalizedAcceptedType = acceptedType.toLowerCase();\n\n if (normalizedAcceptedType.startsWith('.')) {\n return normalizedName.endsWith(normalizedAcceptedType);\n }\n\n if (normalizedAcceptedType.endsWith('/*')) {\n return normalizedType.startsWith(normalizedAcceptedType.slice(0, -1));\n }\n\n return normalizedType === normalizedAcceptedType;\n });\n}\n\n/** Splits native files into accepted files and stable rejection records. */\nexport default function validateFiles(\n files: readonly File[],\n { acceptedFileTypes, allowsMultiple, maxFileSize }: FileConstraints,\n): FileValidationResult {\n const validation = files.map((file, index) => {\n const reasons: FileRejectionReason[] = [];\n\n if (!allowsMultiple && index > 0) {\n reasons.push('file-count');\n }\n\n if (\n acceptedFileTypes?.length &&\n !matchesAcceptedType(file, acceptedFileTypes)\n ) {\n reasons.push('file-type');\n }\n\n if (maxFileSize !== undefined && file.size > maxFileSize) {\n reasons.push('file-size');\n }\n\n return { file, reasons };\n });\n\n return {\n accepted: validation\n .filter(({ reasons }) => reasons.length === 0)\n .map(({ file }) => file),\n rejected: validation.filter(({ reasons }) => reasons.length > 0),\n };\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { FileRejection } from '../../internal/types/file';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props shared by Breeze file-rejection feedback parts. */\nexport interface FileFeedbackPartProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Ref to the rendered feedback region. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface FileFeedbackProps extends FileFeedbackPartProps {\n rejections: FileRejection[];\n}\n\n/** Renders and announces stable Breeze file rejection feedback. */\nexport default function FileFeedback({\n className,\n ref,\n rejections,\n ...props\n}: Readonly<FileFeedbackProps>): ReactElement | null {\n const forwardedRef = useForwardedRef(ref);\n const { messages } = useBreezeContext();\n const rejectionMessages = {\n 'file-count': messages.fileCountRejection,\n 'file-size': messages.fileSizeRejection,\n 'file-type': messages.fileTypeRejection,\n } as const;\n\n if (rejections.length === 0) {\n return null;\n }\n\n return createElement(\n 'div',\n { ...props, className, ref: forwardedRef, role: 'alert' },\n rejections.map(({ file, reasons }) =>\n createElement(\n 'p',\n { key: `${file.name}-${file.size}-${file.lastModified}` },\n `${file.name}: ${reasons.map((reason) => rejectionMessages[reason]).join(' ')}`,\n ),\n ),\n );\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport {\n createContext,\n createElement,\n useCallback,\n useContext,\n useId,\n useState,\n} from 'react';\nimport {\n DropZone as AriaDropZone,\n Text as AriaText,\n} from 'react-aria-components/DropZone';\nimport { tv } from 'tailwind-variants';\nimport validateFiles from '../../internal/files/validation';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n DropZoneFileReadFailure,\n FileRejection,\n} from '../../internal/types/file';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport FileFeedback, { type FileFeedbackPartProps } from '../file/FileFeedback';\n\nconst dropZoneStyle = tv({\n base: 'flex min-h-36 flex-col items-center justify-center gap-2 border-2 border-dashed border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-6 text-center text-[var(--breeze-ink)] transition-colors data-[drop-target]:border-[var(--breeze-primary)] data-[drop-target]:bg-[var(--breeze-primary-soft)]',\n});\n\ninterface DropZoneContextValue {\n descriptionId: string;\n errorId: string;\n invalid: boolean;\n rejections: FileRejection[];\n}\n\ninterface FileReadSuccess {\n file: File;\n}\n\ninterface FileReadFailure {\n failure: DropZoneFileReadFailure;\n}\n\ntype FileReadResult = FileReadFailure | FileReadSuccess;\n\nconst DropZoneContext = createContext<DropZoneContextValue | null>(null);\n\ntype WithoutEventHandlers<Props> = {\n [Key in keyof Props as Key extends `on${string}` ? never : Key]: Props[Key];\n};\n\ntype DropZoneNativeProps = Omit<\n WithoutEventHandlers<HTMLAttributes<HTMLDivElement>>,\n 'children' | 'style'\n>;\n\n/** Props for an accessible native-file drop target. */\nexport interface DropZoneRootProps extends DropZoneNativeProps {\n /** Drop-zone label, guidance, trigger, and feedback. */\n children: ReactNode;\n /** Accepted MIME types, wildcard MIME groups, or extensions. */\n acceptedFileTypes?: readonly string[];\n /** Allows more than one dropped file. Defaults to `false`. */\n allowsMultiple?: boolean;\n /** Prevents focus and dropping. Defaults to `false`. */\n disabled?: boolean;\n /** Exposes invalid state to assistive technology. Defaults to `false`. */\n invalid?: boolean;\n /** Maximum accepted file size in bytes. */\n maxFileSize?: number;\n /** Called with dropped native files. */\n onFiles: (files: File[]) => void;\n /** Called with files rejected by Breeze constraints. */\n onReject?: (rejections: FileRejection[]) => void;\n /** Called once when native file reading fails. Mixed drops are atomic: `onFiles` and `onReject` are not called when any item fails to read. */\n onFileReadError?: (failures: DropZoneFileReadFailure[]) => void;\n /** Ref to the rendered drop-zone root. */\n ref?: Ref<HTMLDivElement>;\n /** Exposes required presentation and validation state. Defaults to `false`. */\n required?: boolean;\n}\n\n/** Props for built-in dropped-file rejection feedback. */\nexport type DropZoneFeedbackProps = FileFeedbackPartProps;\n\n/** Props for supporting drop-zone guidance. */\nexport interface DropZoneDescriptionProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'id' | 'style'> {\n /** Guidance describing accepted files or interaction. */\n children: ReactNode;\n /** Ref to the rendered description. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Props for accessible invalid-state feedback. */\nexport interface DropZoneErrorProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'id' | 'style'> {\n /** Validation message shown while the root is invalid. */\n children: ReactNode;\n /** Ref to the rendered error. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Props for the visible drop-zone label. */\nexport interface DropZoneLabelProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Persistent label that names the drop target. */\n children: ReactNode;\n /** Ref to the rendered label. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Receives file drops through React Aria's pointer and keyboard model. */\nexport function Root({\n acceptedFileTypes,\n allowsMultiple = false,\n children,\n className,\n disabled = false,\n invalid = false,\n maxFileSize,\n onFiles,\n onFileReadError,\n onReject,\n ref,\n required = false,\n ...props\n}: Readonly<DropZoneRootProps>): ReactElement {\n useBreezeContext();\n\n const suppliedRef = useForwardedRef(ref);\n const [rejections, setRejections] = useState<FileRejection[]>([]);\n const descriptionId = useId();\n const errorId = useId();\n const describedBy = [\n props['aria-describedby'],\n descriptionId,\n invalid ? errorId : undefined,\n ]\n .filter(Boolean)\n .join(' ');\n const forwardedRef = useCallback(\n (element: HTMLDivElement | null) => {\n suppliedRef(element);\n if (!element) {\n return;\n }\n\n const { dataset } = element;\n\n element.setAttribute('aria-describedby', describedBy);\n if (invalid) {\n element.setAttribute('aria-invalid', 'true');\n } else {\n element.removeAttribute('aria-invalid');\n }\n if (required) {\n dataset.required = 'true';\n } else {\n delete dataset.required;\n }\n },\n [describedBy, invalid, required, suppliedRef],\n );\n\n return createElement(\n DropZoneContext.Provider,\n { value: { descriptionId, errorId, invalid, rejections } },\n createElement(\n AriaDropZone,\n {\n ...props,\n 'aria-describedby': describedBy,\n 'aria-invalid': invalid || undefined,\n className: dropZoneStyle({ class: className }),\n isDisabled: disabled,\n onDrop: (event) => {\n const fileItems = event.items.filter((item) => item.kind === 'file');\n\n Promise.all(\n fileItems.map(async (item, itemIndex): Promise<FileReadResult> => {\n try {\n const file = await item.getFile();\n\n return { file };\n } catch (cause: unknown) {\n return {\n failure: {\n cause,\n itemIndex,\n name: item.name,\n type: item.type,\n },\n };\n }\n }),\n ).then(\n (readResults) => {\n const failures = readResults.flatMap((result) =>\n 'failure' in result ? [result.failure] : [],\n );\n\n if (failures.length > 0) {\n setRejections([]);\n onFileReadError?.(failures);\n } else {\n const files = readResults.flatMap((result) =>\n 'file' in result ? [result.file] : [],\n );\n const result = validateFiles(files, {\n acceptedFileTypes,\n allowsMultiple,\n maxFileSize,\n });\n\n setRejections(result.rejected);\n onFiles(result.accepted);\n if (result.rejected.length > 0) {\n onReject?.(result.rejected);\n }\n }\n },\n (cause: unknown) => {\n const failures = fileItems.map((item, itemIndex) => ({\n cause,\n itemIndex,\n name: item.name,\n type: item.type,\n }));\n\n setRejections([]);\n onFileReadError?.(failures);\n },\n );\n },\n ref: forwardedRef,\n } as ComponentProps<typeof AriaDropZone>,\n children,\n ),\n );\n}\n\n/** Renders supporting guidance associated with the drop target. */\nexport function Description({\n ref,\n ...props\n}: Readonly<DropZoneDescriptionProps>): ReactElement {\n const context = useContext(DropZoneContext);\n const forwardedRef = useForwardedRef(ref);\n\n if (!context) {\n throw new globalThis.Error(\n 'DropZone.Description must be inside DropZone.Root.',\n );\n }\n\n return createElement('p', {\n ...props,\n id: context.descriptionId,\n ref: forwardedRef,\n });\n}\n\n/** Renders an associated validation message while the root is invalid. */\nfunction ErrorMessage({\n ref,\n ...props\n}: Readonly<DropZoneErrorProps>): ReactElement | null {\n const context = useContext(DropZoneContext);\n const forwardedRef = useForwardedRef(ref);\n\n if (!context) {\n throw new globalThis.Error('DropZone.Error must be inside DropZone.Root.');\n }\n\n if (!context.invalid) {\n return null;\n }\n\n return createElement('p', {\n ...props,\n id: context.errorId,\n ref: forwardedRef,\n role: 'alert',\n });\n}\n\nexport { ErrorMessage as Error };\n\n/** Announces Breeze-owned type, size, and count rejection feedback. */\nexport function Feedback(\n props: Readonly<DropZoneFeedbackProps>,\n): ReactElement | null {\n const context = useContext(DropZoneContext);\n\n if (!context) {\n throw new globalThis.Error(\n 'DropZone.Feedback must be inside DropZone.Root.',\n );\n }\n\n return createElement(FileFeedback, {\n ...props,\n rejections: context.rejections,\n });\n}\n\n/** Renders the visible label consumed by React Aria's drop affordance. */\nexport function Label({\n className,\n ref,\n ...props\n}: Readonly<DropZoneLabelProps>): ReactElement {\n return createElement(AriaText, {\n ...props,\n className,\n ref: useForwardedRef(ref),\n slot: 'label',\n });\n}\n\n/**\n * Accepts native file drops through an accessible drop target while Breeze\n * validates file constraints and applications own upload processing.\n *\n * @summary accessible native-file drop target with validation feedback\n */\nexport const DropZone = {\n /** Supporting drop guidance. */\n Description,\n /** Invalid-state validation feedback. */\n Error: ErrorMessage,\n /** Accessible Breeze-owned file rejection feedback. */\n Feedback,\n /** Persistent accessible drop-target label. */\n Label,\n /** Native-file drop interaction boundary. */\n Root,\n};\n","import type {\n ComponentProps,\n InputHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport {\n createContext,\n createElement,\n useCallback,\n useContext,\n useRef,\n useState,\n} from 'react';\nimport { PressResponder } from 'react-aria/private/interactions/PressResponder';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport validateFiles from '../../internal/files/validation';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport action from '../../internal/styling/actions';\nimport type { FileRejection } from '../../internal/types/file';\nimport type { NativeButtonProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport FileFeedback, { type FileFeedbackPartProps } from '../file/FileFeedback';\n\ninterface FileTriggerContextValue {\n disabled: boolean;\n invalid: boolean;\n rejections: FileRejection[];\n triggerRef: RefObject<HTMLButtonElement | null>;\n}\n\nconst FileTriggerContext = createContext<FileTriggerContextValue | null>(null);\n\ntype WithoutEventHandlers<Props> = {\n [Key in keyof Props as Key extends `on${string}` ? never : Key]: Props[Key];\n};\n\ntype NativeFileInputProps = Omit<\n WithoutEventHandlers<InputHTMLAttributes<HTMLInputElement>>,\n | 'accept'\n | 'capture'\n | 'children'\n | 'className'\n | 'disabled'\n | 'form'\n | 'multiple'\n | 'name'\n | 'required'\n | 'style'\n | 'type'\n>;\n\ninterface DirectoryFileInputProps\n extends InputHTMLAttributes<HTMLInputElement> {\n webkitdirectory?: string;\n}\n\n/** Props for the native file-dialog boundary. */\nexport interface FileTriggerRootProps extends NativeFileInputProps {\n /** Pressable trigger and file-selection feedback. */\n children: ReactNode;\n /** Accepted MIME types, wildcard MIME groups, or extensions. */\n acceptedFileTypes?: readonly string[];\n /** Enables native directory selection instead of individual files. Defaults to `false`. */\n acceptDirectory?: boolean;\n /** Allows more than one file to be selected. Defaults to `false`. */\n allowsMultiple?: boolean;\n /** Prevents opening the native file dialog. Defaults to `false`. */\n disabled?: boolean;\n /** Requests the user-facing or environment camera for media capture. */\n defaultCamera?: 'environment' | 'user';\n /** External native form id. */\n form?: string;\n /** Exposes invalid state to assistive technology. Defaults to `false`. */\n invalid?: boolean;\n /** Maximum accepted file size in bytes. */\n maxFileSize?: number;\n /** Native form field name. */\n name?: string;\n /** Called with selected native files. */\n onFiles: (files: File[]) => void;\n /** Called with files rejected by Breeze constraints. */\n onReject?: (rejections: FileRejection[]) => void;\n /** Marks file selection as required for assistive technology. Defaults to `false`. */\n required?: boolean;\n /** Ref to the hidden native file input. */\n ref?: Ref<HTMLInputElement>;\n}\n\n/** Props for built-in file-selection rejection feedback. */\nexport type FileTriggerFeedbackProps = FileFeedbackPartProps;\n\n/** Props for the keyboard-operable dialog trigger. */\nexport interface FileTriggerButtonProps extends NativeButtonProps {\n /** Trigger label or content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Ref to the rendered trigger button. */\n ref?: Ref<HTMLButtonElement>;\n}\n\n/** Coordinates native file selection with a React Aria pressable trigger. */\nexport function Root({\n acceptDirectory = false,\n acceptedFileTypes,\n allowsMultiple = false,\n children,\n disabled = false,\n defaultCamera,\n form,\n invalid = false,\n maxFileSize,\n name,\n onFiles,\n onReject,\n ref,\n required = false,\n ...props\n}: Readonly<FileTriggerRootProps>): ReactElement {\n const { messages } = useBreezeContext();\n\n const suppliedRef = useForwardedRef(ref);\n const inputRef = useRef<HTMLInputElement | null>(null);\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n const [nativeInvalid, setNativeInvalid] = useState(false);\n const [rejections, setRejections] = useState<FileRejection[]>([]);\n const forwardedRef = useCallback(\n (input: HTMLInputElement | null) => {\n inputRef.current = input;\n suppliedRef(input);\n },\n [suppliedRef],\n );\n\n const selectFiles = (fileList: FileList | null) => {\n if (disabled) {\n return;\n }\n\n const result = validateFiles(fileList ? Array.from(fileList) : [], {\n acceptedFileTypes,\n allowsMultiple,\n maxFileSize,\n });\n\n if (result.rejected.length > 0 && inputRef.current !== null) {\n if (typeof DataTransfer === 'undefined') {\n inputRef.current.value = '';\n } else {\n const acceptedFiles = new DataTransfer();\n\n result.accepted.forEach((file) => acceptedFiles.items.add(file));\n inputRef.current.files = acceptedFiles.files;\n }\n }\n\n setNativeInvalid(required && result.accepted.length === 0);\n setRejections(result.rejected);\n onFiles(result.accepted);\n if (result.rejected.length > 0) {\n onReject?.(result.rejected);\n }\n };\n\n return createElement(\n FileTriggerContext.Provider,\n {\n value: {\n disabled,\n invalid: invalid || nativeInvalid,\n rejections,\n triggerRef,\n },\n },\n createElement(\n PressResponder,\n {\n isDisabled: disabled,\n onPress: () => {\n if (inputRef.current?.value) {\n inputRef.current.value = '';\n }\n\n inputRef.current?.click();\n },\n } as unknown as ComponentProps<typeof PressResponder>,\n children,\n ),\n createElement('input', {\n ...props,\n accept: acceptedFileTypes?.join(','),\n 'aria-invalid': invalid || undefined,\n 'aria-label': messages.selectFiles,\n 'aria-required': required || undefined,\n capture: defaultCamera,\n disabled,\n form,\n multiple: allowsMultiple,\n name,\n onChange: (event) => selectFiles(event.currentTarget.files),\n onInvalid: (event) => {\n event.preventDefault();\n setNativeInvalid(true);\n triggerRef.current?.setAttribute('aria-invalid', 'true');\n triggerRef.current?.focus();\n },\n ref: forwardedRef,\n required,\n style: {\n border: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px',\n },\n type: 'file',\n webkitdirectory: acceptDirectory ? '' : undefined,\n } as DirectoryFileInputProps),\n );\n}\n\n/** Announces Breeze-owned type, size, and count rejection feedback. */\nexport function Feedback(\n props: Readonly<FileTriggerFeedbackProps>,\n): ReactElement | null {\n const context = useContext(FileTriggerContext);\n\n if (!context) {\n throw new Error('FileTrigger.Feedback must be inside FileTrigger.Root.');\n }\n\n return createElement(FileFeedback, {\n ...props,\n rejections: context.rejections,\n });\n}\n\n/** Opens the associated native file dialog by pointer or keyboard. */\nexport function Trigger({\n children,\n className,\n ref,\n ...props\n}: Readonly<FileTriggerButtonProps>): ReactElement {\n const context = useContext(FileTriggerContext);\n\n if (!context) {\n throw new Error('FileTrigger.Trigger must be inside FileTrigger.Root.');\n }\n\n const suppliedRef = useForwardedRef(ref);\n const forwardedRef = useCallback(\n (button: HTMLButtonElement | null) => {\n context.triggerRef.current = button;\n suppliedRef(button);\n },\n [context.triggerRef, suppliedRef],\n );\n\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-invalid': context.invalid || undefined,\n className: action({ class: className }),\n isDisabled: context.disabled,\n ref: forwardedRef,\n } as ComponentProps<typeof AriaButton>,\n children,\n );\n}\n\n/**\n * Opens the native file dialog from a keyboard-operable trigger, validates the\n * selected files, and returns accepted files through semantic callbacks.\n *\n * @summary accessible native file selection with validation feedback\n */\nexport const FileTrigger = {\n /** Accessible Breeze-owned file rejection feedback. */\n Feedback,\n /** Native input and selection boundary. */\n Root,\n /** Keyboard-operable file-dialog trigger. */\n Trigger,\n};\n","import type { ReactElement, ReactNode } from 'react';\nimport { FormattedList } from '../../formatting/FormattedList/FormattedList';\nimport { PaperclipIcon } from '../../icons';\nimport type { FileRejection } from '../../internal/types/file';\nimport { DropZone } from '../../primitives/DropZone/DropZone';\nimport { FileTrigger } from '../../primitives/FileTrigger/FileTrigger';\n\n/** Props for an accessible browse-and-drop file selection surface. */\nexport interface FileUploadProps {\n /** Accepted MIME types, wildcard MIME groups, or extensions. */\n acceptedFileTypes?: readonly string[];\n /** Allows more than one file. Defaults to `false`. */\n allowsMultiple?: boolean;\n /** Visible label for the browse action. */\n browseLabel: ReactNode;\n /** Prevents browse and drop interaction. Defaults to `false`. */\n disabled?: boolean;\n /** Supporting accepted-file or workflow guidance. */\n guidance?: ReactNode;\n /** Exposes invalid state and error association. Defaults to `false`. */\n invalid?: boolean;\n /** Persistent visible drop-zone label. */\n label: ReactNode;\n /** Maximum accepted file size in bytes. */\n maxFileSize?: number;\n /** Called with files selected through browse or drop. */\n onFiles: (files: File[]) => void;\n /** Called with files rejected by Breeze constraints. */\n onReject?: (rejections: FileRejection[]) => void;\n /** Selected files owned by the application and presented as feedback. */\n selectedFiles?: readonly File[];\n}\n\n/**\n * Selects files through browse or drop while leaving upload transport\n * application-owned.\n *\n * @summary accessible browse-and-drop file selection with persistent feedback\n */\nexport function FileUpload({\n acceptedFileTypes,\n allowsMultiple = false,\n browseLabel,\n disabled = false,\n guidance,\n invalid = false,\n label,\n maxFileSize,\n onFiles,\n onReject,\n selectedFiles = [],\n}: Readonly<FileUploadProps>): ReactElement {\n return (\n <DropZone.Root\n acceptedFileTypes={acceptedFileTypes}\n allowsMultiple={allowsMultiple}\n disabled={disabled}\n invalid={invalid}\n maxFileSize={maxFileSize}\n onFiles={onFiles}\n onReject={onReject}\n className=\"grid min-h-16 w-full grid-cols-[1.5rem_minmax(0,1fr)_auto] items-center gap-x-4 border border-solid border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-0 text-left transition-colors outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55 data-[drop-target]:border-[var(--breeze-primary)] data-[drop-target]:bg-[var(--breeze-surface)] data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[focus-visible]:outline-solid data-[hovered]:border-[var(--breeze-primary)]\"\n data-breeze-file-upload=\"\"\n >\n <span className=\"ml-4 flex size-6 items-center text-[var(--breeze-primary)]\">\n <PaperclipIcon aria-hidden=\"true\" size={20} />\n </span>\n <span className=\"flex min-w-0 flex-col\">\n <DropZone.Label className=\"overflow-hidden font-[family-name:var(--breeze-font-display)] text-base leading-[1.4] font-bold text-ellipsis whitespace-nowrap\">\n {selectedFiles.length === 0 ? (\n label\n ) : (\n <FormattedList values={selectedFiles.map((file) => file.name)} />\n )}\n </DropZone.Label>\n {guidance === undefined ? null : (\n <DropZone.Description className=\"m-0 mt-1 text-base leading-[1.4] text-[var(--breeze-ink-soft)]\">\n {guidance}\n </DropZone.Description>\n )}\n </span>\n <FileTrigger.Root\n acceptedFileTypes={acceptedFileTypes}\n allowsMultiple={allowsMultiple}\n disabled={disabled}\n invalid={invalid}\n maxFileSize={maxFileSize}\n onFiles={onFiles}\n onReject={onReject}\n >\n <FileTrigger.Trigger className=\"h-full min-h-0 self-stretch border-0 border-l border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] px-4 py-0 text-base text-[var(--breeze-primary)] data-[focus-visible]:outline-solid data-[hovered]:bg-[var(--breeze-primary-soft)]\">\n {browseLabel}\n </FileTrigger.Trigger>\n <FileTrigger.Feedback className=\"col-span-3 px-4 pb-3\" />\n </FileTrigger.Root>\n <DropZone.Feedback className=\"col-span-3 px-4 pb-3\" />\n </DropZone.Root>\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst formActions = tv({\n base: 'mt-auto flex flex-col gap-3 pt-0.5 sm:flex-row sm:items-center sm:gap-2.5 [&>*]:w-full sm:[&>*]:w-auto [&>*>*]:w-full sm:[&>*>*]:w-auto',\n defaultVariants: {\n divided: false,\n },\n variants: {\n divided: {\n false: '',\n true: 'border-t border-[var(--breeze-border)] pt-6',\n },\n },\n});\n\nconst secondaryAction =\n '[&_button]:border-[var(--breeze-border-strong)] [&_button]:bg-[var(--breeze-surface)] [&_button]:text-[var(--breeze-ink)]';\n\n/** Props for a canonical form action region. */\nexport interface FormActionsProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style'> {\n /** Optional back action placed at the leading edge on wide layouts and after primary on compact layouts. */\n back?: ReactNode;\n /** Optional cancellation action displayed after the back action. */\n cancel?: ReactNode;\n /** Optional destructive action placed at the leading edge on wide layouts and last on compact layouts. */\n danger?: ReactNode;\n /** Replaces the compact action spacing with the canonical separated-page spacing. Defaults to `false`. */\n divided?: boolean;\n /** Primary submit or continuation action, first on compact layouts and in the trailing group on wide layouts. */\n primary: ReactNode;\n /** Ref to the rendered action container. */\n ref?: Ref<HTMLElement>;\n /** Additional non-primary action displayed after cancellation. */\n secondary?: ReactNode;\n}\n\n/**\n * Orders form actions consistently across compact and wide layouts.\n *\n * @summary responsive ordering for primary and supporting form actions\n */\nexport function FormActions({\n back,\n cancel,\n className,\n danger,\n divided = false,\n primary,\n ref,\n secondary,\n ...props\n}: Readonly<FormActionsProps>): ReactElement {\n useBreezeContext();\n\n const hasAccessibleName =\n props['aria-label'] !== undefined || props['aria-labelledby'] !== undefined;\n let trailingStart = 'primary';\n\n if (cancel !== null && cancel !== undefined) {\n trailingStart = 'cancel';\n } else if (secondary !== null && secondary !== undefined) {\n trailingStart = 'secondary';\n }\n\n return createElement(\n 'div',\n {\n ...props,\n className: formActions({ class: className, divided }),\n ref: useForwardedRef(ref),\n role: hasAccessibleName ? 'group' : undefined,\n },\n <>\n {danger === null || danger === undefined ? null : (\n <div className=\"order-5 sm:order-none\" data-action-position=\"leading\">\n {danger}\n </div>\n )}\n {back === null || back === undefined ? null : (\n <div\n className={`order-2 sm:order-none ${secondaryAction}`}\n data-action-position=\"leading\"\n >\n {back}\n </div>\n )}\n {cancel === null || cancel === undefined ? null : (\n <div\n className={`order-3 sm:order-none ${secondaryAction} ${trailingStart === 'cancel' ? 'sm:ms-auto' : ''}`}\n data-action-position=\"trailing\"\n >\n {cancel}\n </div>\n )}\n {secondary === null || secondary === undefined ? null : (\n <div\n className={`order-4 sm:order-none ${secondaryAction} ${trailingStart === 'secondary' ? 'sm:ms-auto' : ''}`}\n data-action-position=\"trailing\"\n >\n {secondary}\n </div>\n )}\n <div\n className={`order-1 sm:order-none ${trailingStart === 'primary' ? 'sm:ms-auto' : ''}`}\n data-action-position=\"trailing\"\n >\n {primary}\n </div>\n </>,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useId } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst formSection = tv({\n base: 'grid min-w-0',\n compoundVariants: [\n {\n class:\n 'border-t border-[var(--breeze-border)] pt-6 first:border-t-0 first:pt-0',\n divided: true,\n layout: 'split',\n },\n {\n class: 'border-b border-[var(--breeze-border)] pb-6',\n divided: true,\n layout: 'stacked',\n },\n ],\n defaultVariants: {\n divided: false,\n layout: 'split',\n },\n variants: {\n divided: {\n false: '',\n true: '',\n },\n layout: {\n split:\n 'gap-4 py-6 first:pt-0 md:grid-cols-[minmax(12.5rem,15rem)_minmax(0,1fr)] md:gap-12 md:py-7',\n stacked: 'gap-6',\n },\n },\n});\n\nconst formSectionHeader = tv({\n base: 'grid content-start',\n defaultVariants: {\n layout: 'split',\n },\n variants: {\n layout: {\n split: 'gap-1',\n stacked: 'gap-1 border-b border-[var(--breeze-border)] pb-5 sm:pb-6',\n },\n },\n});\n\n/** Canonical section arrangements for page and overlay forms. */\nexport type FormSectionLayout = 'split' | 'stacked';\n\n/** Semantic heading levels supported by a form section. */\nexport type FormSectionHeadingLevel = 2 | 3 | 4 | 5 | 6;\n\n/** Props for one titled region of a longer form. */\nexport interface FormSectionProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style' | 'title'> {\n /** Optional action aligned with the section introduction. */\n action?: ReactNode;\n /** Form fields or other related controls. */\n children: ReactNode;\n /** Supporting explanation. */\n description?: ReactNode;\n /** Adds the canonical outer divider for the selected layout. Defaults to `false`. */\n divided?: boolean;\n /** Semantic level for the persistent section heading. Defaults to `2`. */\n headingLevel?: FormSectionHeadingLevel;\n /** Page split or overlay stacked arrangement. Defaults to `split`. */\n layout?: FormSectionLayout;\n /** Ref to the rendered section. */\n ref?: Ref<HTMLElement>;\n /** Persistent section heading. */\n title: ReactNode;\n}\n\n/**\n * Groups related form controls with a consistent heading and divider rhythm.\n *\n * @summary titled form region with responsive field and action layout\n */\nexport function FormSection({\n action,\n children,\n className,\n description,\n divided = false,\n headingLevel = 2,\n layout = 'split',\n ref,\n title,\n ...props\n}: Readonly<FormSectionProps>): ReactElement {\n useBreezeContext();\n\n const titleId = useId();\n\n return createElement(\n 'section',\n {\n ...props,\n 'aria-labelledby': titleId,\n className: formSection({\n class: className,\n divided,\n layout,\n }),\n ref: useForwardedRef(ref),\n },\n <>\n <header className={formSectionHeader({ layout })}>\n {createElement(\n `h${headingLevel}`,\n {\n className:\n 'm-0 font-[family-name:var(--breeze-font-display)] text-xl leading-[1.2] font-bold',\n id: titleId,\n },\n title,\n )}\n {description === null || description === undefined ? null : (\n <p className=\"m-0 max-w-[65ch] text-base leading-[1.4] text-[var(--breeze-ink-soft)]\">\n {description}\n </p>\n )}\n </header>\n <div\n className={\n action === undefined\n ? 'grid min-w-0 content-start gap-5'\n : 'flex min-w-0 flex-col-reverse gap-3 md:flex-col md:gap-5'\n }\n >\n {action === undefined ? null : (\n <div\n className=\"flex min-h-11 items-center justify-start md:justify-end\"\n data-breeze-form-section-action=\"\"\n >\n {action}\n </div>\n )}\n <div\n className=\"grid min-w-0 content-start gap-5\"\n data-breeze-form-section-fields=\"\"\n >\n {children}\n </div>\n </div>\n </>,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useId } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst metricCard = tv({\n defaultVariants: {\n density: 'regular',\n tone: 'default',\n },\n slots: {\n description: 'text-base',\n label: 'font-[family-name:var(--breeze-font-display)] text-base leading-5',\n root: 'grid min-w-0 content-center border-b-2 p-5 sm:p-7',\n value:\n 'font-[family-name:var(--breeze-font-display)] text-[2rem] font-bold leading-[1.2] tabular-nums',\n },\n variants: {\n density: {\n regular: {\n root: 'gap-2',\n },\n spacious: {\n root: 'gap-3',\n },\n },\n tone: {\n default: {\n description: 'text-[var(--breeze-ink-soft)]',\n label: 'font-bold',\n root: 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n },\n inverse: {\n description: 'text-[var(--breeze-ink-inverse-muted)]',\n label: 'font-normal text-[var(--breeze-ink-inverse-muted)]',\n root: 'border-[var(--breeze-shell-border)] bg-[var(--breeze-shell-soft)] text-[var(--breeze-ink-inverse)]',\n },\n subtle: {\n description: 'text-[var(--breeze-ink-soft)]',\n label: 'font-bold',\n root: 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink)]',\n },\n },\n },\n});\n\n/** Internal rhythm supported by a metric card. */\nexport type MetricCardDensity = 'regular' | 'spacious';\n\n/** Semantic surface tones supported by a metric card. */\nexport type MetricCardTone = 'default' | 'subtle' | 'inverse';\n\n/** Props for one prominent domain-neutral metric summary. */\nexport interface MetricCardProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style'> {\n /** Internal content rhythm. Defaults to `regular`. */\n density?: MetricCardDensity;\n /** Optional supporting explanation or comparison. */\n description?: ReactNode;\n /** Persistent metric label. */\n label: ReactNode;\n /** Ref to the rendered article. */\n ref?: Ref<HTMLElement>;\n /** Semantic surface tone. Defaults to `default`. */\n tone?: MetricCardTone;\n /** Prominent application-formatted value. */\n value: ReactNode;\n}\n\n/**\n * Presents one prominent application-formatted metric without domain\n * calculation.\n *\n * @summary prominent labelled metric with optional supporting context\n */\nexport function MetricCard({\n className,\n density = 'regular',\n description,\n label,\n ref,\n tone = 'default',\n value,\n ...props\n}: Readonly<MetricCardProps>): ReactElement {\n useBreezeContext();\n\n const labelId = useId();\n const styles = metricCard({ density, tone });\n\n return createElement(\n 'article',\n {\n ...props,\n 'aria-labelledby': labelId,\n className: styles.root({ class: className }),\n ref: useForwardedRef(ref),\n },\n <>\n <div className={styles.label()} id={labelId}>\n {label}\n </div>\n <div className={styles.value()}>{value}</div>\n {description === null || description === undefined ? null : (\n <div className={styles.description()}>{description}</div>\n )}\n </>,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useId } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for a visibly titled navigation group. */\nexport interface NavigationSectionProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style' | 'title'> {\n /** Navigation destinations, commonly NavigationList.Item elements. */\n children: ReactNode;\n /** Ref to the rendered navigation landmark. */\n ref?: Ref<HTMLElement>;\n /** Persistent visible navigation-group title. */\n title: ReactNode;\n}\n\n/**\n * Groups related destinations under one visible navigation heading.\n *\n * @summary labelled navigation landmark for related destinations\n */\nexport function NavigationSection({\n children,\n className,\n ref,\n title,\n ...props\n}: Readonly<NavigationSectionProps>): ReactElement {\n useBreezeContext();\n\n const titleId = useId();\n\n return createElement(\n 'nav',\n {\n ...props,\n 'aria-labelledby': titleId,\n className: `grid gap-2 ${className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <h2\n className=\"m-0 px-3 font-[family-name:var(--breeze-font-display)] text-base font-bold\"\n id={titleId}\n >\n {title}\n </h2>\n {children}\n </>,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useId } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for a page title, context, back destination, and actions. */\nexport interface PageHeaderProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style' | 'title'> {\n /** Page-level actions that stack below the title on compact layouts. */\n actions?: ReactNode;\n /** Optional back navigation displayed before the page heading. */\n back?: ReactNode;\n /** Concise page purpose or status. */\n description?: ReactNode;\n /** Ref to the rendered header. */\n ref?: Ref<HTMLElement>;\n /** Unique page heading. */\n title: ReactNode;\n}\n\n/**\n * Establishes page hierarchy and responsive page-level actions.\n *\n * @summary responsive page heading with context, back link, and actions\n */\nexport function PageHeader({\n actions,\n back,\n className,\n description,\n ref,\n title,\n ...props\n}: Readonly<PageHeaderProps>): ReactElement {\n useBreezeContext();\n\n const titleId = useId();\n\n return createElement(\n 'header',\n {\n ...props,\n 'aria-labelledby': titleId,\n className: `grid gap-5 pb-6 sm:gap-8 sm:pb-8 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-end ${className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <div className=\"grid min-w-0 gap-6\">\n {back === null || back === undefined ? null : (\n <div className=\"justify-self-start\" data-page-header-back>\n {back}\n </div>\n )}\n <div className=\"grid gap-2\">\n <h1\n className=\"m-0 font-[family-name:var(--breeze-font-display)] text-[2rem] leading-[1.12] font-bold tracking-[-0.025em] sm:text-[2.5rem]\"\n id={titleId}\n >\n {title}\n </h1>\n {description === null || description === undefined ? null : (\n <div className=\"m-0 max-w-[65ch] text-base leading-[1.4] text-[var(--breeze-ink-soft)]\">\n {description}\n </div>\n )}\n </div>\n </div>\n {actions === null || actions === undefined ? null : (\n <div className=\"flex flex-col items-stretch sm:items-start lg:items-end\">\n {actions}\n </div>\n )}\n </>,\n );\n}\n","import type { ComponentProps, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport renderNativeButton, {\n type NativeButtonType,\n} from '../../internal/react-aria/renderNativeButton';\nimport action from '../../internal/styling/actions';\nimport type {\n ControlSize,\n VisualAppearance,\n VisualVariant,\n} from '../../internal/styling/visual';\nimport type { NativeButtonProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for an icon-only action with a required accessible name. */\nexport interface IconButtonProps extends NativeButtonProps {\n /** Accessible action name. */\n 'aria-label': string;\n /** Visual emphasis treatment. Defaults to `ghost`. */\n appearance?: VisualAppearance;\n /** Decorative icon. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents interaction. Defaults to `false`. */\n disabled?: boolean;\n /** Shows and announces an in-progress state while preventing activation. Defaults to `false`. */\n loading?: boolean;\n /** Called once when the user activates the button. */\n onAction?: () => void;\n /** Ref to the rendered button. */\n ref?: Ref<HTMLButtonElement>;\n /** Canonical square control size. Defaults to `md`. */\n size?: ControlSize;\n /** Constrained native form behavior: `button` or `submit`. Defaults to `button`. */\n type?: NativeButtonType;\n /** Semantic colour. Defaults to `secondary`. */\n variant?: VisualVariant;\n}\n\nconst squareSizes = {\n lg: 'size-12 p-0',\n md: 'size-11 p-0',\n sm: 'size-8 p-0',\n} as const;\n\n/**\n * Performs an application action through a compact icon-only control whose\n * required accessible label supplies its semantic name.\n *\n * @summary icon-only action with a mandatory accessible label\n */\nexport function IconButton({\n appearance = 'ghost',\n children,\n className,\n disabled = false,\n loading = false,\n onAction,\n ref,\n size = 'md',\n type = 'button',\n variant = 'secondary',\n ...props\n}: Readonly<IconButtonProps>): ReactElement {\n useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-busy': loading || undefined,\n className: action({\n appearance,\n class: [squareSizes[size], className],\n size,\n variant,\n }),\n isDisabled: disabled,\n isPending: loading,\n onPress: onAction,\n ref: forwardedRef,\n render: (renderProps) => {\n const nativeProps = {\n ...props,\n 'aria-busy': loading || undefined,\n ...renderProps,\n };\n\n return renderNativeButton(nativeProps, type);\n },\n type,\n } as ComponentProps<typeof AriaButton>,\n loading ? (\n <span\n aria-hidden=\"true\"\n className=\"size-4 animate-spin rounded-full border-2 border-current border-r-transparent\"\n />\n ) : (\n <span aria-hidden=\"true\">{children}</span>\n ),\n );\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport { ArrowLeftIcon, ArrowRightIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { Button } from '../../primitives/Button/Button';\nimport { IconButton } from '../../primitives/IconButton/IconButton';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\ntype PaginationEntry = 'ellipsis' | number;\n\nfunction createEntries(\n currentPage: number,\n pageCount: number,\n): PaginationEntry[] {\n if (pageCount <= 7) {\n return Array.from({ length: pageCount }, (_, index) => index + 1);\n }\n\n const candidates = new Set([\n 1,\n pageCount,\n currentPage - 1,\n currentPage,\n currentPage + 1,\n ]);\n const pages = [...candidates]\n .filter((page) => page >= 1 && page <= pageCount)\n .sort((first, second) => first - second);\n\n return pages.flatMap((page, index) => {\n const previous = pages[index - 1];\n\n if (previous === undefined) {\n return [page];\n }\n\n if (page - previous === 2) {\n return [previous + 1, page];\n }\n\n return page - previous > 2 ? ['ellipsis' as const, page] : [page];\n });\n}\n\n/** Props for page-based application-owned navigation. */\nexport interface PaginationProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'onChange' | 'style'> {\n /** Accessible name for the pagination landmark. */\n 'aria-label': string;\n /** Current one-based page. */\n currentPage: number;\n /** Prevents all page changes. Defaults to `false`. */\n disabled?: boolean;\n /** Called with the requested one-based page. */\n onChange: (page: number) => void;\n /** Total number of pages. */\n pageCount: number;\n /** Ref to the rendered navigation landmark. */\n ref?: Ref<HTMLElement>;\n}\n\n/**\n * Navigates application-owned paginated data without owning fetching or cursors.\n *\n * @summary one-based navigation across a known page range\n */\nexport function Pagination({\n currentPage,\n disabled = false,\n onChange,\n pageCount,\n ref,\n ...props\n}: Readonly<PaginationProps>): ReactElement {\n const { direction, messages } = useBreezeContext();\n\n if (!Number.isInteger(pageCount) || pageCount < 1) {\n throw new RangeError('pageCount must be a positive integer.');\n }\n\n if (\n !Number.isInteger(currentPage) ||\n currentPage < 1 ||\n currentPage > pageCount\n ) {\n throw new RangeError('currentPage must be within the page range.');\n }\n\n const entries = createEntries(currentPage, pageCount);\n const PreviousIcon = direction === 'rtl' ? ArrowRightIcon : ArrowLeftIcon;\n const NextIcon = direction === 'rtl' ? ArrowLeftIcon : ArrowRightIcon;\n const renderEntry = (entry: PaginationEntry, index: number) => {\n if (entry === 'ellipsis') {\n const nextPage = entries[index + 1];\n\n return (\n <span\n aria-hidden=\"true\"\n className=\"px-1\"\n key={`ellipsis-before-${nextPage}`}\n >\n …\n </span>\n );\n }\n\n if (entry === currentPage) {\n return (\n <span\n aria-current=\"page\"\n aria-label={`${messages.page} ${entry}`}\n className=\"grid min-h-10 min-w-10 place-items-center bg-[var(--breeze-primary)] px-3 font-[family-name:var(--breeze-font-display)] font-bold text-white\"\n key={entry}\n >\n {entry}\n </span>\n );\n }\n\n return (\n <Button\n aria-label={`${messages.page} ${entry}`}\n appearance=\"ghost\"\n disabled={disabled}\n key={entry}\n onAction={() => onChange(entry)}\n variant=\"secondary\"\n >\n {entry}\n </Button>\n );\n };\n\n return createElement(\n 'nav',\n {\n ...props,\n className: `flex flex-wrap items-center gap-2 ${props.className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <IconButton\n aria-label={messages.previousPage}\n disabled={disabled || currentPage <= 1}\n onAction={() => onChange(currentPage - 1)}\n >\n <PreviousIcon />\n </IconButton>\n {entries.map((entry, index) => renderEntry(entry, index))}\n <IconButton\n aria-label={messages.nextPage}\n disabled={disabled || currentPage >= pageCount}\n onAction={() => onChange(currentPage + 1)}\n >\n <NextIcon />\n </IconButton>\n </>,\n );\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Group as AriaGroup } from 'react-aria-components/Group';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst inputGroupRoot = tv({\n base: \"breeze-input-group relative flex min-w-0 items-stretch bg-[var(--breeze-surface)] outline-none after:pointer-events-none after:absolute after:inset-0 after:z-10 after:border after:border-[var(--breeze-border-strong)] after:transition-colors after:duration-[var(--breeze-duration-fast)] after:content-[''] data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[focus-within]:after:border-[var(--breeze-primary)] data-[hovered]:after:border-[var(--breeze-primary)] data-[invalid]:after:!border-[var(--breeze-danger)] [&>*]:!border-0 [&>*:not([data-breeze-input-group-addon])+*:not([data-breeze-input-group-addon])]:!border-s [&>*:not([data-breeze-input-group-addon])+*:not([data-breeze-input-group-addon])]:!border-s-[var(--breeze-border-strong)] [&>[data-breeze-input-group-addon]:not(:first-child)]:ps-0 [&>[data-breeze-input-group-addon]:not(:last-child)]:pe-0 [&>[data-focus-visible]]:!outline-none\",\n});\n\nconst inputGroupAddon = tv({\n base: 'inline-flex shrink-0 items-center justify-center bg-transparent font-[family-name:var(--breeze-font-display)] font-bold text-[var(--breeze-ink-soft)]',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-12 px-4 text-base',\n md: 'min-h-10 px-3 text-sm',\n sm: 'min-h-8 px-2.5 text-xs',\n },\n },\n});\n\n/** Props for visually grouping a field control with related adornments or actions. */\nexport interface InputGroupRootProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'style'> {\n /** Field control, addons, and related actions in visual order. */\n children: ReactNode;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n /** Accessible grouping role. Defaults to `presentation` for visual-only composition. */\n role?: 'group' | 'presentation' | 'region';\n}\n\n/** Props for a non-interactive input prefix or suffix. */\nexport interface InputGroupAddonProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Prefix or suffix content such as a unit or protocol. */\n children: ReactNode;\n /** Ref to the rendered addon. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical addon size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Visually composes a field control with ordered addons or related actions. */\nexport function Root({\n className,\n ref,\n role = 'presentation',\n ...props\n}: Readonly<InputGroupRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaGroup, {\n ...props,\n className: inputGroupRoot({ class: className }),\n 'data-breeze-input-group': '',\n ref: forwardedRef,\n role,\n } as ComponentProps<typeof AriaGroup>);\n}\n\n/** Renders a non-interactive prefix or suffix within an InputGroup. */\nexport function Addon({\n className,\n ref,\n size,\n ...props\n}: Readonly<InputGroupAddonProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n className: inputGroupAddon({ class: className, size }),\n 'data-breeze-input-group-addon': '',\n ref: forwardedRef,\n });\n}\n\n/**\n * Compound visual composition primitive for field controls and addons.\n *\n * @summary visually unified field controls, addons, and related actions\n */\nexport const InputGroup = {\n /** Non-interactive prefix or suffix. */\n Addon,\n /** Visual grouping root. */\n Root,\n};\n","import { tv } from 'tailwind-variants';\n\n/** Shared value typography and sizing for Breeze form controls. */\nexport const formControlValueTypography =\n 'font-[family-name:var(--breeze-font-body)] font-normal';\n\nconst formControlValue = tv({\n base: formControlValueTypography,\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-12 px-4 py-3 text-base leading-[1.4]',\n md: 'min-h-11 px-3 py-2.5 text-base leading-[1.4]',\n sm: 'min-h-8 px-2.5 py-1.5 text-xs leading-[1.4]',\n },\n },\n});\n\nexport default formControlValue;\n","import type {\n ComponentProps,\n HTMLAttributes,\n InputHTMLAttributes,\n LabelHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { FieldError as AriaFieldError } from 'react-aria-components/FieldError';\nimport { Input as AriaInput } from 'react-aria-components/Input';\nimport { Label as AriaLabel } from 'react-aria-components/Label';\nimport { Text as AriaText } from 'react-aria-components/Text';\nimport { TextField as AriaTextField } from 'react-aria-components/TextField';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport formControlValue from '../../internal/styling/formControls';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst textFieldRoot = tv({\n base: 'flex min-w-0 flex-col gap-1.5',\n});\n\nconst textFieldInput = tv({\n base: 'w-full border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] placeholder:text-[var(--breeze-ink-muted)] data-[hovered]:border-[var(--breeze-primary)] data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] disabled:cursor-not-allowed disabled:bg-[var(--breeze-surface-subtle)] disabled:opacity-70 read-only:cursor-default read-only:bg-[var(--breeze-surface-subtle)] aria-invalid:border-[var(--breeze-danger)]',\n});\n\nconst label = tv({\n base: 'font-[family-name:var(--breeze-font-display)] text-base font-bold text-[var(--breeze-ink)]',\n});\n\nconst description = tv({\n base: 'text-sm text-[var(--breeze-ink-soft)]',\n});\n\nconst error = tv({\n base: 'text-sm font-medium text-[var(--breeze-danger)]',\n});\n\ntype TextFieldRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface TextFieldRootSharedProps extends TextFieldRootNativeProps {\n /** Compound label, input, description, and error parts. */\n children: ReactNode;\n /** Prevents editing and focus. Defaults to `false`. */\n disabled?: boolean;\n /** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Marks the field as required for native validation and assistive technology. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered field container. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledTextFieldRootProps {\n /** Current text value. */\n value: string;\n /** Called with the next text value. */\n onChange: (value: string) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyTextFieldRootProps {\n /** Current immutable text value. */\n value: string;\n /** Marks a controlled value as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledTextFieldRootProps {\n /** Initial text value. Defaults to an empty string. */\n defaultValue?: string;\n /** Called with the next text value. */\n onChange?: (value: string) => void;\n readOnly?: false;\n value?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled text field state. */\nexport type TextFieldRootProps = TextFieldRootSharedProps &\n (\n | ControlledTextFieldRootProps\n | ReadOnlyTextFieldRootProps\n | UncontrolledTextFieldRootProps\n );\n\n/** Props for the visible text field label. */\nexport interface TextFieldLabelProps\n extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'style'> {\n /** Label content that persistently names the input. */\n children: ReactNode;\n /** Ref to the rendered label. */\n ref?: Ref<HTMLLabelElement>;\n}\n\n/** Props for the native text input part. */\nexport interface TextFieldInputProps\n extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n | 'children'\n | 'className'\n | 'defaultValue'\n | 'disabled'\n | 'onChange'\n | 'readOnly'\n | 'required'\n | 'size'\n | 'style'\n | 'type'\n | 'value'\n > {\n /** Placement and composition classes. */\n className?: string;\n /** Ref to the rendered input. */\n ref?: Ref<HTMLInputElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n /** Native text-entry purpose. Defaults to `text`. */\n type?: 'email' | 'password' | 'tel' | 'text' | 'url';\n}\n\n/** Props for supporting text associated with the input. */\nexport interface TextFieldDescriptionProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Supporting guidance for the input. */\n children: ReactNode;\n /** Ref to the rendered description. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Props for an accessible validation message. */\nexport interface TextFieldErrorProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Validation message shown while the root is invalid. */\n children: ReactNode;\n /** Ref to the rendered error message. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Coordinates accessible text field state and compound anatomy. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n invalid = false,\n onChange,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<TextFieldRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaTextField,\n {\n ...props,\n className: textFieldRoot({ class: className }),\n defaultValue,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n onChange,\n ref: forwardedRef,\n value,\n } as ComponentProps<typeof AriaTextField>,\n children,\n );\n}\n\n/** Renders the persistent accessible label for a TextField. */\nexport function Label({\n className,\n ref,\n ...props\n}: Readonly<TextFieldLabelProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaLabel, {\n ...props,\n className: label({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the editable native input for a TextField. */\nexport function Input({\n className,\n ref,\n size,\n type = 'text',\n ...props\n}: Readonly<TextFieldInputProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaInput, {\n ...props,\n className: formControlValue({\n class: textFieldInput({ class: className }),\n size,\n }),\n ref: forwardedRef,\n type,\n });\n}\n\n/** Renders supporting guidance and associates it with a TextField input. */\nexport function Description({\n className,\n ref,\n ...props\n}: Readonly<TextFieldDescriptionProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaText, {\n ...props,\n className: description({ class: className }),\n ref: forwardedRef,\n slot: 'description',\n });\n}\n\n/** Renders an associated validation message while a TextField is invalid. */\nfunction ErrorMessage({\n className,\n ref,\n ...props\n}: Readonly<TextFieldErrorProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaFieldError, {\n ...props,\n className: error({ class: className }),\n ref: forwardedRef,\n });\n}\n\nexport { ErrorMessage as Error };\n\n/**\n * Accessible compound single-line text-entry primitive.\n *\n * @summary labelled single-line text entry with validation anatomy\n */\nexport const TextField = {\n /** Supporting guidance associated with the input. */\n Description,\n /** Validation message associated with an invalid input. */\n Error: ErrorMessage,\n /** Editable native input. */\n Input,\n /** Persistent accessible label. */\n Label,\n /** State and accessibility root. */\n Root,\n};\n","import type { ReactElement, ReactNode } from 'react';\nimport { useState } from 'react';\nimport { tv } from 'tailwind-variants';\nimport { EyeIcon, EyeOffIcon } from '../../icons';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { IconButton } from '../../primitives/IconButton/IconButton';\nimport { InputGroup } from '../../primitives/InputGroup/InputGroup';\nimport { TextField } from '../../primitives/TextField/TextField';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst passwordFieldGroup = tv({\n base: '[&>*:not([data-breeze-input-group-addon])+*:not([data-breeze-input-group-addon])]:!border-s-0 [&>.breeze-action:focus-visible]:!outline-0 [&>.breeze-action[data-focus-visible]]:!outline-0 data-[disabled]:opacity-70 data-[focus-within]:outline-2 data-[focus-within]:outline-offset-[-2px] data-[focus-within]:outline-solid data-[focus-within]:outline-[var(--breeze-focus)] has-[input:read-only]:bg-[var(--breeze-surface-subtle)] has-[input:read-only]:opacity-70',\n});\n\nconst passwordFieldInput = tv({\n base: 'min-w-0 w-auto flex-1 bg-transparent disabled:!bg-transparent disabled:!opacity-100 read-only:!bg-transparent read-only:!opacity-100',\n});\n\nconst passwordVisibilityButton = tv({\n base: '!border-0 !bg-transparent !outline-none text-[var(--breeze-ink-soft)] disabled:!opacity-100 data-[disabled]:!opacity-100 data-[hovered]:!bg-transparent data-[hovered]:text-[var(--breeze-primary)] data-[pressed]:!translate-y-0',\n});\n\ninterface PasswordFieldSharedProps {\n /** Native autocomplete purpose. */\n autoComplete?: 'current-password' | 'new-password' | 'off';\n /** Supporting guidance associated with the input. */\n description?: ReactNode;\n /** Prevents editing and focus. Defaults to `false`. */\n disabled?: boolean;\n /** Validation message shown when invalid. */\n error?: ReactNode;\n /** Exposes invalid state. Defaults to `false`. */\n invalid?: boolean;\n /** Persistent visible input label. */\n label: ReactNode;\n /** Native form field name. */\n name?: string;\n /** Placeholder shown while empty. */\n placeholder?: string;\n /** Marks the input as required. Defaults to `false`. */\n required?: boolean;\n /** Canonical input and action size. Defaults to `md`. */\n size?: ControlSize;\n}\n\ninterface ControlledPasswordFieldProps {\n /** Current password value. */\n value: string;\n /** Called with the next password value. */\n onChange: (value: string) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyPasswordFieldProps {\n /** Current immutable password value. */\n value: string;\n /** Marks the controlled value as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledPasswordFieldProps {\n /** Initial password value. Defaults to an empty string. */\n defaultValue?: string;\n /** Called with the next password value. */\n onChange?: (value: string) => void;\n value?: never;\n readOnly?: false;\n}\n\n/** Props for controlled, read-only, or uncontrolled password entry. */\nexport type PasswordFieldProps = PasswordFieldSharedProps &\n (\n | ControlledPasswordFieldProps\n | ReadOnlyPasswordFieldProps\n | UncontrolledPasswordFieldProps\n );\n\n/**\n * Provides accessible password entry with a keyboard-operable visibility toggle.\n *\n * @summary labelled password entry with a visibility action\n */\nexport function PasswordField({\n autoComplete,\n defaultValue,\n description,\n disabled = false,\n error,\n invalid = false,\n label,\n name,\n onChange,\n placeholder,\n readOnly = false,\n required = false,\n size = 'md',\n value,\n}: Readonly<PasswordFieldProps>): ReactElement {\n const { messages } = useBreezeContext();\n const [visible, setVisible] = useState(false);\n\n const content = (\n <>\n <TextField.Label>{label}</TextField.Label>\n <InputGroup.Root className={passwordFieldGroup()}>\n <TextField.Input\n autoComplete={autoComplete}\n className={passwordFieldInput()}\n name={name}\n placeholder={placeholder}\n size={size}\n type={visible ? 'text' : 'password'}\n />\n <IconButton\n aria-label={visible ? messages.hidePassword : messages.showPassword}\n className={passwordVisibilityButton()}\n disabled={disabled}\n onAction={() => setVisible((current) => !current)}\n size={size}\n >\n {visible ? <EyeOffIcon /> : <EyeIcon />}\n </IconButton>\n </InputGroup.Root>\n {description === undefined ? null : (\n <TextField.Description>{description}</TextField.Description>\n )}\n {error === undefined ? null : <TextField.Error>{error}</TextField.Error>}\n </>\n );\n\n if (value === undefined) {\n return (\n <TextField.Root\n defaultValue={defaultValue}\n disabled={disabled}\n invalid={invalid}\n onChange={onChange}\n required={required}\n >\n {content}\n </TextField.Root>\n );\n }\n\n if (readOnly) {\n return (\n <TextField.Root\n disabled={disabled}\n invalid={invalid}\n readOnly\n required={required}\n value={value}\n >\n {content}\n </TextField.Root>\n );\n }\n\n if (onChange === undefined) {\n throw new Error('Controlled PasswordField requires onChange.');\n }\n\n return (\n <TextField.Root\n disabled={disabled}\n invalid={invalid}\n onChange={onChange}\n required={required}\n value={value}\n >\n {content}\n </TextField.Root>\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for a content-section heading and optional action. */\nexport interface SectionHeaderProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style' | 'title'> {\n /** Optional section action. */\n action?: ReactNode;\n /** Optional concise supporting context. */\n description?: ReactNode;\n /** Stable id for heading relationships. */\n id?: string;\n /** Ref to the rendered header. */\n ref?: Ref<HTMLElement>;\n /** Section heading. */\n title: ReactNode;\n}\n\n/**\n * Aligns a section heading, supporting context, and one related action.\n *\n * @summary content-section heading with context and one related action\n */\nexport function SectionHeader({\n action,\n className,\n description,\n id,\n ref,\n title,\n ...props\n}: Readonly<SectionHeaderProps>): ReactElement {\n useBreezeContext();\n\n return createElement(\n 'header',\n {\n ...props,\n className: `flex items-start justify-between gap-3 border-b border-[var(--breeze-border)] px-5 py-4 ${className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <div className=\"grid min-w-0 gap-1\">\n <h2\n className=\"m-0 font-[family-name:var(--breeze-font-display)] text-xl font-bold\"\n id={id}\n >\n {title}\n </h2>\n {description === null || description === undefined ? null : (\n <p className=\"m-0 max-w-[65ch] text-base text-[var(--breeze-ink-soft)]\">\n {description}\n </p>\n )}\n </div>\n {action === null || action === undefined ? null : (\n <div className=\"shrink-0\">{action}</div>\n )}\n </>,\n );\n}\n","import type { ComponentProps, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { ToggleButton as AriaToggleButton } from 'react-aria-components/ToggleButton';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport action from '../../internal/styling/actions';\nimport type {\n ControlSize,\n VisualAppearance,\n VisualVariant,\n} from '../../internal/styling/visual';\nimport type { NativeButtonProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\ninterface ToggleButtonSharedProps extends Omit<NativeButtonProps, 'value'> {\n /** Visual emphasis treatment. Defaults to `outline`. */\n appearance?: VisualAppearance;\n /** Toggle content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents interaction. Defaults to `false`. */\n disabled?: boolean;\n /** Ref to the rendered button. */\n ref?: Ref<HTMLButtonElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n /** Stable value when the toggle is composed inside a ToggleGroup. */\n value?: string;\n /** Semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\ninterface ControlledToggleButtonProps {\n /** Current selected state. */\n selected: boolean;\n /** Called with the next selected state. */\n onChange: (selected: boolean) => void;\n defaultSelected?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyToggleButtonProps {\n /** Current selected state. */\n selected: boolean;\n /** Marks controlled state as intentionally immutable while preserving focus. */\n readOnly: true;\n defaultSelected?: never;\n onChange?: never;\n}\n\ninterface UncontrolledToggleButtonProps {\n /** Initial selected state. Defaults to `false`. */\n defaultSelected?: boolean;\n /** Called with the next selected state. */\n onChange?: (selected: boolean) => void;\n readOnly?: false;\n selected?: never;\n}\n\n/** Props for a controlled or uncontrolled two-state action. */\nexport type ToggleButtonProps = ToggleButtonSharedProps &\n (\n | ControlledToggleButtonProps\n | ReadOnlyToggleButtonProps\n | UncontrolledToggleButtonProps\n );\n\n/**\n * Selects or deselects a two-state action through pointer or keyboard input.\n *\n * @summary two-state action with controlled or uncontrolled selection\n */\nexport function ToggleButton({\n appearance = 'outline',\n children,\n className,\n defaultSelected,\n disabled = false,\n id,\n onChange,\n readOnly = false,\n ref,\n selected,\n size,\n value,\n variant,\n ...props\n}: Readonly<ToggleButtonProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaToggleButton,\n {\n ...props,\n className: ({ isSelected }) =>\n action({\n appearance: isSelected ? 'solid' : appearance,\n class: className,\n size,\n variant,\n }),\n defaultSelected,\n id: value ?? id,\n isDisabled: disabled,\n isSelected: selected,\n onChange: readOnly ? undefined : onChange,\n ref: forwardedRef,\n } as ComponentProps<typeof AriaToggleButton>,\n children,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { ToggleButtonGroup as AriaToggleButtonGroup } from 'react-aria-components/ToggleButtonGroup';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst toggleGroup = tv({\n base: 'inline-flex gap-1',\n defaultVariants: {\n orientation: 'horizontal',\n },\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col items-stretch',\n },\n },\n});\n\ntype ToggleGroupNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface ToggleGroupSharedProps extends ToggleGroupNativeProps {\n /** ToggleButton children with stable `value` props. */\n children: ReactNode;\n /** Prevents all contained toggles from changing. Defaults to `false`. */\n disabled?: boolean;\n /** Allows more than one selected value. Defaults to `false`. */\n multiple?: boolean;\n /** Layout and keyboard navigation axis. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledToggleGroupProps {\n /** Current selected values. */\n selection: string[];\n /** Called with the next selected values. */\n onSelectionChange: (selection: string[]) => void;\n defaultSelection?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyToggleGroupProps {\n /** Current selected values. */\n selection: string[];\n /** Marks a controlled selection as intentionally immutable. */\n readOnly: true;\n defaultSelection?: never;\n onSelectionChange?: never;\n}\n\ninterface UncontrolledToggleGroupProps {\n /** Initial selected values. Defaults to an empty selection. */\n defaultSelection?: string[];\n /** Called with the next selected values. */\n onSelectionChange?: (selection: string[]) => void;\n readOnly?: false;\n selection?: never;\n}\n\n/** Props for a controlled, read-only, or uncontrolled toggle collection. */\nexport type ToggleGroupProps = ToggleGroupSharedProps &\n (\n | ControlledToggleGroupProps\n | ReadOnlyToggleGroupProps\n | UncontrolledToggleGroupProps\n );\n\n/**\n * Coordinates single or multiple toggle selection and arrow-key navigation.\n *\n * @summary related toggle actions with single or multiple selection\n */\nexport function ToggleGroup({\n children,\n className,\n defaultSelection,\n disabled = false,\n multiple = false,\n onSelectionChange,\n orientation,\n readOnly: _readOnly,\n ref,\n selection,\n ...props\n}: Readonly<ToggleGroupProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaToggleButtonGroup,\n {\n ...props,\n className: toggleGroup({\n class: className,\n orientation,\n }),\n defaultSelectedKeys: defaultSelection,\n isDisabled: disabled,\n onSelectionChange: (keys) => onSelectionChange?.([...keys].map(String)),\n orientation,\n ref: forwardedRef,\n selectedKeys: selection,\n selectionMode: multiple ? 'multiple' : 'single',\n },\n children,\n );\n}\n","import type { ReactElement, ReactNode } from 'react';\nimport { ToggleButton } from '../../primitives/ToggleButton/ToggleButton';\nimport { ToggleGroup } from '../../primitives/ToggleGroup/ToggleGroup';\n\n/** One option displayed by SegmentedControl. */\nexport interface SegmentedControlOption {\n /** Prevents selection of this option. Defaults to `false`. */\n disabled?: boolean;\n /** Visible option label. */\n label: ReactNode;\n /** Stable semantic value. */\n value: string;\n}\n\ninterface SegmentedControlSharedProps {\n /** Accessible name for the exclusive choice. */\n 'aria-label': string;\n /** Optional placement class for application composition. */\n className?: string;\n /** Prevents all choices from changing. Defaults to `false`. */\n disabled?: boolean;\n /** Choice layout and keyboard axis. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ordered application-owned options. */\n options: readonly SegmentedControlOption[];\n}\n\ninterface ControlledSegmentedControlProps {\n /** Current selected option. */\n value: string;\n /** Called with the next selected option. */\n onChange: (value: string) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlySegmentedControlProps {\n /** Current immutable selected option. */\n value: string;\n /** Marks the controlled value as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledSegmentedControlProps {\n /** Initial selected option. */\n defaultValue?: string;\n /** Called with the next selected option. */\n onChange?: (value: string) => void;\n value?: never;\n readOnly?: false;\n}\n\n/** Props for a controlled, read-only, or uncontrolled segmented choice. */\nexport type SegmentedControlProps = SegmentedControlSharedProps &\n (\n | ControlledSegmentedControlProps\n | ReadOnlySegmentedControlProps\n | UncontrolledSegmentedControlProps\n );\n\n/**\n * Presents a compact exclusive choice with arrow-key navigation.\n *\n * @summary exclusive compact choice with controlled or uncontrolled state\n */\nexport function SegmentedControl({\n 'aria-label': ariaLabel,\n className,\n defaultValue,\n disabled = false,\n onChange,\n options,\n orientation = 'horizontal',\n readOnly = false,\n value,\n}: Readonly<SegmentedControlProps>): ReactElement {\n const selection = value === undefined ? undefined : [value];\n const defaultSelection =\n defaultValue === undefined ? undefined : [defaultValue];\n const reportSelection = (nextSelection: string[]) => {\n const [nextValue] = nextSelection;\n\n if (nextValue !== undefined) {\n onChange?.(nextValue);\n }\n };\n const content = (\n <>\n {options.map((option) => (\n <ToggleButton\n disabled={option.disabled}\n key={option.value}\n value={option.value}\n >\n {option.label}\n </ToggleButton>\n ))}\n </>\n );\n\n const adjacentBorderClass =\n orientation === 'vertical'\n ? '[&>button+button]:border-t-0'\n : '[&>button+button]:border-s-0';\n const resolvedClassName = `gap-0 ${adjacentBorderClass} ${className ?? ''}`;\n\n if (selection === undefined) {\n return (\n <ToggleGroup\n aria-label={ariaLabel}\n className={resolvedClassName}\n defaultSelection={defaultSelection}\n disabled={disabled}\n onSelectionChange={reportSelection}\n orientation={orientation}\n >\n {content}\n </ToggleGroup>\n );\n }\n\n if (readOnly) {\n return (\n <ToggleGroup\n aria-label={ariaLabel}\n className={resolvedClassName}\n disabled={disabled}\n orientation={orientation}\n readOnly\n selection={selection}\n >\n {content}\n </ToggleGroup>\n );\n }\n\n if (onChange === undefined) {\n throw new Error('Controlled SegmentedControl requires onChange.');\n }\n\n return (\n <ToggleGroup\n aria-label={ariaLabel}\n className={resolvedClassName}\n disabled={disabled}\n onSelectionChange={reportSelection}\n orientation={orientation}\n selection={selection}\n >\n {content}\n </ToggleGroup>\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useId } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { VisualVariant } from '../../internal/styling/visual';\nimport { IconTile } from '../../primitives/IconTile/IconTile';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for a complete contextual state message. */\nexport interface StatePanelProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style' | 'title'> {\n /** Optional recovery or next-step action. */\n action?: ReactNode;\n /** Concise supporting guidance. */\n description: ReactNode;\n /** Decorative state icon. */\n icon: ReactNode;\n /** Ref to the rendered section. */\n ref?: Ref<HTMLElement>;\n /** Contextual state heading. */\n title: ReactNode;\n /** Semantic state colour. Defaults to `info`. */\n variant?: Extract<\n VisualVariant,\n 'danger' | 'info' | 'primary' | 'success' | 'warning'\n >;\n}\n\n/**\n * Communicates empty, error, success, warning, or informational state and\n * recovery.\n *\n * @summary complete contextual state with guidance and optional recovery\n */\nexport function StatePanel({\n action,\n className,\n description,\n icon,\n ref,\n title,\n variant = 'info',\n ...props\n}: Readonly<StatePanelProps>): ReactElement {\n useBreezeContext();\n\n const titleId = useId();\n\n return createElement(\n 'section',\n {\n ...props,\n 'aria-labelledby': titleId,\n className: `grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-4 border-b-2 border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-5 sm:gap-x-5 sm:p-8 ${className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <IconTile size=\"lg\" variant={variant}>\n {icon}\n </IconTile>\n <div className=\"grid min-w-0 content-center gap-2\">\n <h2\n className=\"m-0 font-[family-name:var(--breeze-font-display)] text-2xl font-bold\"\n id={titleId}\n >\n {title}\n </h2>\n <div className=\"col-span-2 m-0 max-w-[65ch] text-base text-[var(--breeze-ink-soft)] sm:col-span-1\">\n {description}\n </div>\n {action === null || action === undefined ? null : (\n <div className=\"col-span-2 mt-3 flex flex-col items-stretch sm:col-span-1 sm:items-start\">\n {action}\n </div>\n )}\n </div>\n </>,\n );\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { createElement, useState } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst avatar = tv({\n base: 'inline-flex shrink-0 items-center justify-center overflow-hidden font-[family-name:var(--breeze-font-display)] font-bold',\n defaultVariants: {\n shape: 'circle',\n size: 'md',\n tone: 'primary',\n },\n variants: {\n shape: {\n circle: 'rounded-full',\n square: 'rounded-none',\n },\n size: {\n lg: 'size-14 text-lg',\n md: 'size-9 text-sm',\n sm: 'size-9 text-xs',\n },\n tone: {\n accent: 'bg-[var(--breeze-accent-soft)] text-[var(--breeze-accent)]',\n primary: 'bg-[var(--breeze-primary-soft)] text-[var(--breeze-primary)]',\n },\n },\n});\n\n/** Canonical entity-marker colour treatments. */\nexport type AvatarTone = 'accent' | 'primary';\n\n/** Props for a person or entity representation. */\nexport interface AvatarProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Accessible name for the represented person or entity. */\n name: string;\n /** Optional initials override for compact entity marks. */\n initials?: string;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Circular person mark or square entity mark. Defaults to `circle`. */\n shape?: 'circle' | 'square';\n /** Canonical avatar size. Defaults to `md`. */\n size?: 'sm' | 'md' | 'lg';\n /** Optional image URL. Initials are shown when absent or unavailable. */\n src?: string;\n /** Canonical entity-marker colour. Defaults to `primary`. */\n tone?: AvatarTone;\n}\n\nfunction getInitials(name: string): string {\n return name\n .trim()\n .split(/\\s+/u)\n .filter(Boolean)\n .slice(0, 2)\n .map((part) => Array.from(part).at(0)?.toUpperCase())\n .join('');\n}\n\n/**\n * Renders a named image with a deterministic initials fallback.\n *\n * @summary named image with deterministic initials fallback\n */\nexport function Avatar({\n className,\n initials,\n name,\n ref,\n shape,\n size,\n src,\n tone = 'primary',\n ...props\n}: Readonly<AvatarProps>) {\n useBreezeContext();\n\n const [failedSource, setFailedSource] = useState<string>();\n const forwardedRef = useForwardedRef(ref);\n const showImage = src !== undefined && failedSource !== src;\n\n return createElement(\n 'span',\n {\n ...props,\n 'aria-label': name,\n className: avatar({\n class: className,\n shape,\n size,\n tone,\n }),\n 'data-tone': tone,\n ref: forwardedRef,\n role: 'img',\n },\n showImage ? (\n <img\n alt=\"\"\n className=\"size-full object-cover\"\n onError={() => setFailedSource(src)}\n src={src}\n />\n ) : (\n initials ?? getInitials(name)\n ),\n );\n}\n","import type { ReactElement, ReactNode } from 'react';\nimport { useRef } from 'react';\nimport { Avatar } from '../../primitives/Avatar/Avatar';\nimport { Menu, NonModalMenuPopover } from '../../primitives/Menu/Menu';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** One application-owned user-menu action or destination. */\nexport interface UserMenuAction {\n /** Prevents action. Defaults to `false`. */\n disabled?: boolean;\n /** Optional router-neutral or native destination. */\n href?: string;\n /** Optional decorative action icon. */\n icon?: ReactNode;\n /** Stable action key. */\n id: string;\n /** Visible and typeahead-readable label. */\n label: string;\n /** Called with this action key after activation. */\n onAction?: (id: string) => void;\n /** Visual treatment for the action. Defaults to `default`. */\n variant?: 'default' | 'danger';\n}\n\ninterface UserMenuSharedProps {\n /** Accessible name for the menu trigger. */\n 'aria-label': string;\n /** Ordered application-owned actions. */\n actions: readonly UserMenuAction[];\n /** Indicates unread notification content. Defaults to `false`. */\n hasUnread?: boolean;\n /** Optional notification or account content above the actions. */\n notifications?: ReactNode;\n /** Optional heading displayed above notification content. */\n notificationHeading?: ReactNode;\n /** Optional count or state displayed beside the notification heading. */\n notificationState?: ReactNode;\n /** Optional avatar image URL. */\n src?: string;\n /** Complete accessible trigger name used when unread content is present. */\n unreadLabel?: string;\n /** Visible represented user name. */\n userName: string;\n}\n\ninterface ControlledUserMenuProps {\n defaultOpen?: never;\n /** Called with the next menu state. */\n onOpenChange: (open: boolean) => void;\n /** Current menu state. */\n open: boolean;\n}\n\ninterface UncontrolledUserMenuProps {\n /** Initial menu state. Defaults to `false`. */\n defaultOpen?: boolean;\n /** Called with the next menu state. */\n onOpenChange?: (open: boolean) => void;\n open?: never;\n}\n\n/** Props for account identity, notifications, and application-owned user actions. */\nexport type UserMenuProps = UserMenuSharedProps &\n (ControlledUserMenuProps | UncontrolledUserMenuProps);\n\n/**\n * Presents user identity, notification content, and keyboard-complete account\n * actions.\n *\n * @summary user identity menu with notifications and account actions\n */\nexport function UserMenu({\n 'aria-label': ariaLabel,\n actions,\n defaultOpen,\n hasUnread = false,\n notificationHeading,\n notificationState,\n notifications,\n onOpenChange,\n open,\n src,\n unreadLabel,\n userName,\n}: Readonly<UserMenuProps>): ReactElement {\n const { messages } = useBreezeContext();\n const triggerRef = useRef<HTMLButtonElement>(null);\n const menuContent = (\n <>\n <Menu.Trigger\n aria-label={\n hasUnread\n ? unreadLabel ?? `${ariaLabel}, ${messages.unreadNotifications}`\n : ariaLabel\n }\n className=\"relative min-h-14 w-full justify-start gap-3 border-0 bg-transparent p-2 text-start text-inherit data-[hovered]:bg-[var(--breeze-shell-soft)]\"\n data-breeze-user-menu-trigger=\"\"\n ref={triggerRef}\n >\n <span className=\"relative\">\n <Avatar name={userName} size=\"md\" src={src} />\n {hasUnread ? (\n <span\n aria-hidden=\"true\"\n className=\"absolute -end-0.5 -top-0.5 size-3 rounded-full border-2 border-[var(--breeze-shell)] bg-[var(--breeze-danger)]\"\n />\n ) : null}\n </span>\n <strong className=\"min-w-0 truncate text-base\" data-breeze-user-name=\"\">\n {userName}\n </strong>\n </Menu.Trigger>\n <NonModalMenuPopover\n className=\"w-80\"\n placement=\"top start\"\n triggerRef={triggerRef}\n >\n {notifications === undefined ? null : (\n <div className=\"border-b border-[var(--breeze-border)]\">\n {notificationHeading === undefined ? null : (\n <div className=\"flex items-center justify-between gap-3 border-b border-[var(--breeze-border)] px-4 py-3\">\n <strong className=\"font-[family-name:var(--breeze-font-display)] text-xl\">\n {notificationHeading}\n </strong>\n {notificationState === undefined ? null : (\n <span className=\"bg-[var(--breeze-danger-soft)] px-2 py-1 font-bold text-[var(--breeze-danger)]\">\n {notificationState}\n </span>\n )}\n </div>\n )}\n <div className=\"bg-[var(--breeze-primary-soft)] p-4\">\n {notifications}\n </div>\n </div>\n )}\n <Menu.List aria-label={ariaLabel}>\n {actions.map((action) => (\n <Menu.Item\n className={\n action.variant === 'danger'\n ? 'justify-center border-b-0 bg-[var(--breeze-danger)] font-bold text-white data-[focus-visible]:bg-[var(--breeze-danger-hover)] data-[hovered]:bg-[var(--breeze-danger-hover)] data-[selected]:bg-[var(--breeze-danger-hover)]'\n : undefined\n }\n disabled={action.disabled}\n href={action.href}\n id={action.id}\n key={action.id}\n onAction={() => action.onAction?.(action.id)}\n textValue={action.label}\n >\n <span className=\"flex items-center gap-2.5\">\n {action.icon}\n {action.label}\n </span>\n </Menu.Item>\n ))}\n </Menu.List>\n </NonModalMenuPopover>\n </>\n );\n\n if (open === undefined) {\n return (\n <Menu.Root defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n {menuContent}\n </Menu.Root>\n );\n }\n\n return (\n <Menu.Root onOpenChange={onOpenChange} open={open}>\n {menuContent}\n </Menu.Root>\n );\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport { DisclosurePanel as AriaDisclosurePanel } from 'react-aria-components/Disclosure';\nimport { Heading as AriaHeading } from 'react-aria-components/Heading';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../hooks/useForwardedRef';\nimport type { NativeButtonProps } from '../types/native';\n\nconst disclosureTrigger = tv({\n base: 'flex min-h-11 w-full items-center justify-between gap-3 px-3 py-2 text-start font-semibold text-[var(--breeze-ink)] outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n});\nconst disclosurePanel = tv({\n base: 'px-3 pb-4 text-[var(--breeze-ink)]',\n});\n\n/** Shared Breeze props for a disclosure or accordion trigger. */\nexport interface SharedDisclosureTriggerProps extends NativeButtonProps {\n /** Trigger label. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Heading level around the trigger. Defaults to `3`. */\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /** Ref to the rendered trigger button. */\n ref?: Ref<HTMLButtonElement>;\n}\n\n/** Shared Breeze props for a disclosure or accordion panel. */\nexport interface SharedDisclosurePanelProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Collapsible panel content. */\n children: ReactNode;\n /** Announces the panel as a region instead of a group. */\n role?: 'group' | 'region';\n /** Ref to the rendered panel. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Internal React Aria-backed trigger shared by disclosures and accordions. */\nexport function SharedDisclosureTrigger({\n children,\n className,\n headingLevel = 3,\n ref,\n ...props\n}: Readonly<SharedDisclosureTriggerProps>): ReactElement {\n return (\n <AriaHeading level={headingLevel}>\n {createElement(\n AriaButton,\n {\n ...props,\n className: disclosureTrigger({ class: className }),\n ref: useForwardedRef(ref),\n slot: 'trigger',\n } as ComponentProps<typeof AriaButton>,\n children,\n )}\n </AriaHeading>\n );\n}\n\n/** Internal React Aria-backed panel shared by disclosures and accordions. */\nexport function SharedDisclosurePanel({\n className,\n ref,\n ...props\n}: Readonly<SharedDisclosurePanelProps>): ReactElement {\n return createElement(AriaDisclosurePanel, {\n ...props,\n className: disclosurePanel({ class: className }),\n ref: useForwardedRef(ref),\n });\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport {\n Disclosure as AriaDisclosure,\n DisclosureGroup as AriaDisclosureGroup,\n} from 'react-aria-components/DisclosureGroup';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n SharedDisclosurePanel,\n type SharedDisclosurePanelProps,\n SharedDisclosureTrigger,\n type SharedDisclosureTriggerProps,\n} from '../../internal/react-aria/DisclosureParts';\nimport type { CollectionKey } from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst accordionRoot = tv({\n base: 'divide-y divide-[var(--breeze-border)] border border-[var(--breeze-border)] bg-[var(--breeze-surface)]',\n});\nconst accordionItem = tv({\n base: 'group',\n});\n\ntype AccordionRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface AccordionRootSharedProps extends AccordionRootNativeProps {\n /** Accordion items. */\n children: ReactNode;\n /** Disables every item. Defaults to `false`. */\n disabled?: boolean;\n /** Allows more than one expanded item. Defaults to `false`. */\n multiple?: boolean;\n /** Ref to the rendered accordion root. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledAccordionRootProps {\n /** Current expanded item keys. */\n value: CollectionKey[];\n /** Called with the next expanded item keys. */\n onChange: (value: CollectionKey[]) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyAccordionRootProps {\n /** Current immutable expanded item keys. */\n value: CollectionKey[];\n /** Marks controlled state as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledAccordionRootProps {\n /** Initially expanded item keys. */\n defaultValue?: CollectionKey[];\n /** Called with the next expanded item keys. */\n onChange?: (value: CollectionKey[]) => void;\n readOnly?: false;\n value?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled accordion expansion. */\nexport type AccordionRootProps = AccordionRootSharedProps &\n (\n | ControlledAccordionRootProps\n | ReadOnlyAccordionRootProps\n | UncontrolledAccordionRootProps\n );\n\n/** Props for one keyed accordion item. */\nexport interface AccordionItemProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'style'> {\n /** Item trigger and panel parts. */\n children: ReactNode;\n /** Prevents this item from changing state. Defaults to `false`. */\n disabled?: boolean;\n /** Stable string or number item key. */\n id: CollectionKey;\n /** Ref to the rendered item root. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for an accordion item heading button. */\nexport type AccordionTriggerProps = SharedDisclosureTriggerProps;\n\n/** Props for collapsible accordion item content. */\nexport type AccordionPanelProps = SharedDisclosurePanelProps;\n\n/** Coordinates single or multiple item expansion. */\nexport function Root({\n className,\n defaultValue,\n disabled = false,\n multiple = false,\n onChange,\n readOnly: _readOnly,\n ref,\n value,\n ...props\n}: Readonly<AccordionRootProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaDisclosureGroup, {\n ...props,\n allowsMultipleExpanded: multiple,\n className: accordionRoot({ class: className }),\n defaultExpandedKeys: defaultValue,\n expandedKeys: value,\n isDisabled: disabled,\n onExpandedChange: (keys: Set<CollectionKey>) => onChange?.([...keys]),\n ref: useForwardedRef(ref),\n });\n}\n\n/** Renders one keyed disclosure inside the accordion group. */\nexport function Item({\n className,\n disabled = false,\n id,\n ref,\n ...props\n}: Readonly<AccordionItemProps>): ReactElement {\n return createElement(AriaDisclosure, {\n ...props,\n className: accordionItem({ class: className }),\n id,\n isDisabled: disabled,\n ref: useForwardedRef(ref),\n });\n}\n\n/**\n * Groups coordinated disclosures with single or multiple expansion state.\n *\n * @summary coordinated expandable disclosure group\n */\nexport const Accordion = {\n /** One keyed expandable item. */\n Item,\n /** Collapsible item content. */\n Panel: SharedDisclosurePanel,\n /** Expansion policy and state root. */\n Root,\n /** Item heading button. */\n Trigger: SharedDisclosureTrigger,\n};\n","import type {\n ComponentPropsWithRef,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst alert = tv({\n base: 'flex min-w-0 items-center gap-3 border px-4 py-3 font-[family-name:var(--breeze-font-body)] text-base leading-[1.4] forced-colors:border-[CanvasText]',\n defaultVariants: {\n variant: 'info',\n },\n variants: {\n variant: {\n danger:\n 'border-[var(--breeze-danger)] bg-[var(--breeze-danger-soft)] text-[var(--breeze-ink)]',\n dark: 'border-[var(--breeze-shell)] bg-[var(--breeze-shell)] text-white',\n info: 'border-[var(--breeze-info-border)] bg-[var(--breeze-info-soft)] text-[var(--breeze-info-ink)]',\n light:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n primary:\n 'border-[var(--breeze-primary)] bg-[var(--breeze-primary-soft)] text-[var(--breeze-ink)]',\n secondary:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink)]',\n success:\n 'border-[var(--breeze-success)] bg-[var(--breeze-success-soft)] text-[var(--breeze-ink)]',\n warning:\n 'border-[var(--breeze-warning)] bg-[var(--breeze-warning-soft)] text-[var(--breeze-ink)]',\n },\n },\n});\n\n/** Announcement urgency supported by persistent alerts. */\nexport type AlertAnnouncement = 'assertive' | 'polite' | 'off';\n\n/** Props for a persistent live-region alert. */\nexport interface AlertProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'style'> {\n /** Announcement urgency. Defaults to `assertive`; use `off` for content already present when the page loads. */\n announcement?: AlertAnnouncement;\n /** Application-owned translated alert content. */\n children: ReactNode;\n /** Ref to the rendered alert element. */\n ref?: Ref<HTMLDivElement>;\n /** Breeze semantic colour. Defaults to `info`. */\n variant?: VisualVariant;\n}\n\nfunction getAlertRole(\n announcement: AlertAnnouncement,\n): 'alert' | 'status' | undefined {\n if (announcement === 'assertive') {\n return 'alert';\n }\n\n if (announcement === 'polite') {\n return 'status';\n }\n\n return undefined;\n}\n\n/**\n * Displays persistent inline application feedback with explicit announcement\n * urgency.\n *\n * @summary persistent inline feedback with explicit announcement urgency\n */\nexport function Alert({\n announcement = 'assertive',\n className,\n ref,\n variant = 'info',\n ...props\n}: Readonly<AlertProps>): ReactElement {\n useBreezeContext();\n\n const alertProps: ComponentPropsWithRef<'div'> & {\n 'data-variant': VisualVariant;\n } = {\n ...props,\n 'aria-atomic': announcement === 'off' ? undefined : 'true',\n 'aria-live': announcement,\n className: alert({ class: className, variant }),\n 'data-variant': variant,\n ref: useForwardedRef(ref),\n role: getAlertRole(announcement),\n };\n\n return createElement('div', alertProps);\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n VisualAppearance,\n VisualVariant,\n} from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst badge = tv({\n base: 'inline-flex min-h-6 items-center gap-1 rounded-full border px-2 py-0.5 font-[family-name:var(--breeze-font-display)] text-xs font-bold leading-none',\n compoundVariants: [\n { appearance: 'solid', class: 'text-white', variant: 'primary' },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-primary)]',\n variant: 'primary',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-danger)] text-white',\n variant: 'danger',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-success)] text-white',\n variant: 'success',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-warning)] text-white',\n variant: 'warning',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-info)] text-white',\n variant: 'info',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-shell)] text-white',\n variant: 'dark',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-surface)]',\n variant: 'light',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-ink-soft)] text-white',\n variant: 'secondary',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-primary-soft)]',\n variant: 'primary',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-danger-soft)]',\n variant: 'danger',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-success-soft)]',\n variant: 'success',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-warning-soft)]',\n variant: 'warning',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-info-soft)]',\n variant: 'info',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-shell-soft)] text-white',\n variant: 'dark',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-surface)]',\n variant: 'light',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-surface-subtle)]',\n variant: 'secondary',\n },\n ],\n defaultVariants: {\n appearance: 'subtle',\n variant: 'secondary',\n },\n variants: {\n appearance: {\n ghost: 'border-transparent bg-transparent',\n outline: 'bg-transparent',\n solid: '',\n subtle: '',\n },\n variant: {\n danger: 'border-[var(--breeze-danger)] text-[var(--breeze-danger)]',\n dark: 'border-[var(--breeze-shell)] text-[var(--breeze-shell)]',\n info: 'border-[var(--breeze-info)] text-[var(--breeze-info)]',\n light: 'border-[var(--breeze-border)] text-[var(--breeze-ink-soft)]',\n primary: 'border-[var(--breeze-primary)] text-[var(--breeze-primary)]',\n secondary:\n 'border-[var(--breeze-border-strong)] text-[var(--breeze-ink-soft)]',\n success: 'border-[var(--breeze-success)] text-[var(--breeze-success)]',\n warning: 'border-[var(--breeze-warning)] text-[var(--breeze-warning)]',\n },\n },\n});\n\n/** Props for a compact status or classification label. */\nexport interface BadgeProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Visual emphasis treatment. Defaults to `subtle`. */\n appearance?: VisualAppearance;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Semantic colour. Defaults to `secondary`. */\n variant?: VisualVariant;\n}\n\n/**\n * Renders a non-interactive status or classification label.\n *\n * @summary non-interactive status or classification label\n */\nexport function Badge({\n appearance,\n className,\n ref,\n variant,\n ...props\n}: Readonly<BadgeProps>) {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n className: badge({\n appearance,\n class: className,\n variant,\n }),\n ref: forwardedRef,\n });\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport {\n Breadcrumb as AriaBreadcrumb,\n Breadcrumbs as AriaBreadcrumbs,\n} from 'react-aria-components/Breadcrumbs';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { CollectionKey } from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { Link } from '../Link/Link';\n\nconst breadcrumbsRoot = tv({\n base: 'flex min-w-0 flex-wrap items-center gap-2',\n});\nconst breadcrumbItem = tv({\n base: 'flex min-w-0 items-center gap-2 text-sm text-[var(--breeze-ink-muted)] after:content-[\"/\"] last:text-[var(--breeze-ink)] last:after:hidden',\n});\n\n/** Props for the ordered breadcrumb trail. */\nexport interface BreadcrumbsRootProps\n extends Omit<HTMLAttributes<HTMLOListElement>, 'style'> {\n /** Ordered hierarchy ending with the current location. */\n children: ReactNode;\n /** Disables every navigable crumb. Defaults to `false`. */\n disabled?: boolean;\n /** Ref to the rendered ordered list. */\n ref?: Ref<HTMLOListElement>;\n}\n\n/** Props for one location in a breadcrumb hierarchy. */\nexport interface BreadcrumbsItemProps\n extends Omit<HTMLAttributes<HTMLLIElement>, 'id' | 'style'> {\n /** Visible location label. */\n children: ReactNode;\n /** Prevents navigation for this crumb. Defaults to `false`. */\n disabled?: boolean;\n /** Destination URL. Omit for the current location. */\n href?: string;\n /** Stable string or number crumb key. */\n id: CollectionKey;\n /** Ref to the rendered list item. */\n ref?: Ref<HTMLLIElement>;\n}\n\n/** Renders the semantic ordered trail and supplies current-item semantics. */\nexport function Root({\n className,\n disabled = false,\n ref,\n ...props\n}: Readonly<BreadcrumbsRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaBreadcrumbs, {\n ...props,\n className: breadcrumbsRoot({ class: className }),\n isDisabled: disabled,\n ref: forwardedRef,\n });\n}\n\n/** Renders one navigable or current breadcrumb. */\nexport function Item({\n children,\n className,\n disabled = false,\n href,\n id,\n ref,\n ...props\n}: Readonly<BreadcrumbsItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaBreadcrumb,\n {\n ...props,\n className: breadcrumbItem({ class: className }),\n id,\n ref: forwardedRef,\n },\n href === undefined ? (\n <span aria-current=\"page\">{children}</span>\n ) : (\n <Link disabled={disabled} href={href} variant=\"muted\">\n {children}\n </Link>\n ),\n );\n}\n\n/**\n * Renders an ordered navigation hierarchy with current-location semantics.\n *\n * @summary ordered hierarchy navigation with current-location semantics\n */\nexport const Breadcrumbs = {\n /** One keyed location in the hierarchy. */\n Item,\n /** Ordered breadcrumb trail root. */\n Root,\n};\n","import {\n type CalendarDate,\n parseAbsolute,\n parseDate,\n parseTime,\n type Time,\n type ZonedDateTime,\n} from '@internationalized/date';\nimport type { DateRangeValue } from '../types/date';\n\nconst EXPLICIT_OFFSET = /(?:Z|[+-]\\d{2}:\\d{2})$/;\n\nconst pad = (value: number): string => String(value).padStart(2, '0');\n\n/** Internal parsed date range used only at the React Aria boundary. */\nexport interface InternalDateRange {\n start: CalendarDate;\n end: CalendarDate;\n}\n\nexport function parseDateValue(value: string | null): CalendarDate | null {\n return value === null ? null : parseDate(value);\n}\n\nexport function formatDateValue(value: CalendarDate | null): string | null {\n return value?.toString() ?? null;\n}\n\nexport function parseTimeValue(value: string | null): Time | null {\n return value === null ? null : parseTime(value);\n}\n\nexport function formatTimeValue(value: Time | null): string | null {\n if (value === null) {\n return null;\n }\n\n const base = `${pad(value.hour)}:${pad(value.minute)}`;\n\n return value.second === 0 ? base : `${base}:${pad(value.second)}`;\n}\n\nexport function parseDateRangeValue(\n value: DateRangeValue | null,\n): InternalDateRange | null {\n return value === null\n ? null\n : {\n end: parseDate(value.end),\n start: parseDate(value.start),\n };\n}\n\nexport function formatDateRangeValue(\n value: InternalDateRange | null,\n): DateRangeValue | null {\n return value === null\n ? null\n : {\n end: value.end.toString(),\n start: value.start.toString(),\n };\n}\n\nexport function parseDateTimeValue(\n value: string | null,\n timeZone: string,\n): ZonedDateTime | null {\n if (value === null) {\n return null;\n }\n\n if (!EXPLICIT_OFFSET.test(value)) {\n throw new Error(\n 'DateTimePicker values require an explicit ISO 8601 offset.',\n );\n }\n\n return parseAbsolute(value, timeZone);\n}\n\nexport function formatDateTimeValue(\n value: ZonedDateTime | null,\n): string | null {\n if (value === null) {\n return null;\n }\n\n const offsetMinutes = value.offset / 60_000;\n const sign = offsetMinutes < 0 ? '-' : '+';\n const absoluteOffset = Math.abs(offsetMinutes);\n const offset = `${sign}${pad(Math.floor(absoluteOffset / 60))}:${pad(\n absoluteOffset % 60,\n )}`;\n\n return `${value.year}-${pad(value.month)}-${pad(value.day)}T${pad(\n value.hour,\n )}:${pad(value.minute)}:${pad(value.second)}${offset}`;\n}\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n TableHTMLAttributes,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n Button as AriaButton,\n CalendarCell as AriaCalendarCell,\n CalendarGrid as AriaCalendarGrid,\n CalendarGridBody as AriaCalendarGridBody,\n CalendarGridHeader as AriaCalendarGridHeader,\n CalendarHeaderCell as AriaCalendarHeaderCell,\n CalendarHeading as AriaCalendarHeading,\n} from 'react-aria-components/Calendar';\nimport { tv } from 'tailwind-variants';\nimport { ArrowLeftIcon, ArrowRightIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\n\nconst headerStyle = tv({\n base: 'grid h-11 w-full grid-cols-[2.75rem_minmax(0,1fr)_2.75rem] items-center bg-[var(--breeze-shell-soft)] text-white',\n});\nconst buttonStyle = tv({\n base: 'grid size-11 place-items-center justify-self-center border-0 bg-transparent p-0 text-white outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] data-[hovered]:bg-white/10',\n});\nconst headingStyle = tv({\n base: 'text-center font-[family-name:var(--breeze-font-display)] text-base font-bold',\n});\nconst gridStyle = tv({\n base: \"w-full table-fixed border-separate border-spacing-0 [&_tbody]:before:table-row [&_tbody]:before:h-1 [&_tbody]:before:content-[''] [&_th]:h-9 [&_th]:text-center [&_th]:font-[family-name:var(--breeze-font-display)] [&_th]:text-base [&_th]:font-bold [&_th]:text-[var(--breeze-ink-muted)]\",\n});\nconst cellStyle = tv({\n base: 'grid h-11 w-full place-items-center text-center font-[family-name:var(--breeze-font-body)] text-base font-normal outline-none data-[focused]:outline-2 data-[focused]:outline-offset-[-2px] data-[focused]:outline-[var(--breeze-focus)] data-[hovered]:bg-[var(--breeze-primary-soft)] data-[selected]:bg-[var(--breeze-primary)] data-[selected]:font-bold data-[selected]:text-white data-[disabled]:opacity-40 data-[outside-month]:invisible data-[unavailable]:line-through',\n});\n\n/** Props for a calendar navigation header. */\nexport interface CalendarHeaderPartProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Navigation buttons and visible month heading. */ children?: ReactNode;\n /** Ref to the rendered header. */ ref?: Ref<HTMLDivElement>;\n}\n/** Props for a calendar navigation button. */\nexport interface CalendarButtonPartProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'style'> {\n /** Visible button content. Defaults to the directional Breeze arrow icon. */ children?: ReactNode;\n /** Ref to the rendered navigation button. */ ref?: Ref<HTMLButtonElement>;\n}\n/** Props for the locale-formatted calendar heading. */\nexport interface CalendarHeadingPartProps\n extends Omit<HTMLAttributes<HTMLHeadingElement>, 'children' | 'style'> {\n /** Ref to the rendered heading. */ ref?: Ref<HTMLHeadingElement>;\n}\n/** Props for a Breeze-owned calendar grid. */\nexport interface CalendarGridPartProps\n extends Omit<TableHTMLAttributes<HTMLTableElement>, 'children' | 'style'> {\n /** Ref to the rendered calendar table. */ ref?: Ref<HTMLTableElement>;\n /** Locale weekday label width. Defaults to `short`. */ weekdayStyle?:\n | 'long'\n | 'narrow'\n | 'short';\n}\n\nexport function CalendarHeaderPart({\n className,\n ref,\n ...props\n}: Readonly<CalendarHeaderPartProps>): ReactElement {\n return createElement('div', {\n ...props,\n className: headerStyle({ class: className }),\n ref: useForwardedRef(ref),\n });\n}\nexport function CalendarPreviousButtonPart({\n 'aria-label': ariaLabel,\n children,\n className,\n ref,\n ...props\n}: Readonly<CalendarButtonPartProps>): ReactElement {\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-label': ariaLabel,\n className: buttonStyle({ class: className }),\n ref: useForwardedRef(ref),\n slot: 'previous',\n } as unknown as ComponentProps<typeof AriaButton>,\n children === undefined\n ? createElement(ArrowLeftIcon, {\n className: 'rtl:rotate-180',\n size: '1.25rem',\n })\n : children,\n );\n}\nexport function CalendarNextButtonPart({\n 'aria-label': ariaLabel,\n children,\n className,\n ref,\n ...props\n}: Readonly<CalendarButtonPartProps>): ReactElement {\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-label': ariaLabel,\n className: buttonStyle({ class: className }),\n ref: useForwardedRef(ref),\n slot: 'next',\n } as unknown as ComponentProps<typeof AriaButton>,\n children === undefined\n ? createElement(ArrowRightIcon, {\n className: 'rtl:rotate-180',\n size: '1.25rem',\n })\n : children,\n );\n}\n\nfunction renderWeekday(day: string): ReactElement {\n return createElement(AriaCalendarHeaderCell, null, day);\n}\n\nfunction renderCalendarDate(date: CalendarDate): ReactElement {\n return createElement(AriaCalendarCell, {\n className: cellStyle(),\n date,\n });\n}\nexport function CalendarHeadingPart({\n className,\n ref,\n ...props\n}: Readonly<CalendarHeadingPartProps>): ReactElement {\n return createElement(AriaCalendarHeading, {\n ...props,\n className: headingStyle({ class: className }),\n ref: useForwardedRef(ref),\n });\n}\nexport function CalendarGridPart({\n className,\n ref,\n weekdayStyle = 'short',\n ...props\n}: Readonly<CalendarGridPartProps>): ReactElement {\n return createElement(\n AriaCalendarGrid,\n {\n ...props,\n className: gridStyle({ class: className }),\n ref: useForwardedRef(ref),\n weekdayStyle,\n },\n createElement(\n AriaCalendarGridHeader,\n null,\n renderWeekday as unknown as ReactNode,\n ),\n createElement(\n AriaCalendarGridBody,\n null,\n renderCalendarDate as unknown as ReactNode,\n ),\n );\n}\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Calendar as AriaCalendar } from 'react-aria-components/Calendar';\nimport { tv } from 'tailwind-variants';\nimport {\n formatDateValue,\n parseDateValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n type CalendarButtonPartProps,\n CalendarGridPart,\n type CalendarGridPartProps,\n CalendarHeaderPart,\n type CalendarHeaderPartProps,\n CalendarHeadingPart,\n type CalendarHeadingPartProps,\n CalendarNextButtonPart,\n CalendarPreviousButtonPart,\n} from '../date/CalendarParts';\n\nconst rootStyle = tv({\n base: 'inline-flex w-full flex-col gap-3',\n});\ninterface SharedProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'style'\n > {\n /** Calendar navigation, heading, grid, and guidance. */ children: ReactNode;\n /** Prevents focus and selection. */ disabled?: boolean;\n /** Exposes invalid selection state. */ invalid?: boolean;\n /** Returns whether a stable date is unavailable. */ isDateUnavailable?: (\n date: string,\n ) => boolean;\n /** Latest selectable date. */ maxValue?: string;\n /** Earliest selectable date. */ minValue?: string;\n /** Ref to the rendered calendar root. */ ref?: Ref<HTMLDivElement>;\n /** Number of visible months. Defaults to `1`. */ visibleMonths?: number;\n}\ntype State =\n | {\n /** Current controlled date, or `null` when empty. */ value:\n | string\n | null;\n /** Called with the next stable date or `null`. */ onChange: (\n value: string | null,\n ) => void;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Mutable controlled calendars cannot be read-only. */ readOnly?: false;\n }\n | {\n /** Current immutable date, or `null` when empty. */ value: string | null;\n /** Prevents selection changes. */ readOnly: true;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Excluded because read-only calendars cannot change. */ onChange?: never;\n }\n | {\n /** Initial uncontrolled date, or `null` when empty. */ defaultValue?:\n | string\n | null;\n /** Called with the next stable date or `null`. */ onChange?: (\n value: string | null,\n ) => void;\n /** Uncontrolled calendars cannot be read-only. */ readOnly?: false;\n /** Excluded when uncontrolled. */ value?: never;\n };\n/** Props for stable single-date calendar selection. */\nexport type CalendarRootProps = SharedProps & State;\n/** Props for the navigation header. */\nexport type CalendarHeaderProps = CalendarHeaderPartProps;\n/** Props for previous and next buttons. */\nexport type CalendarButtonProps = CalendarButtonPartProps;\n/** Props for the locale-formatted heading. */\nexport type CalendarHeadingProps = CalendarHeadingPartProps;\n/** Props for the calendar grid. */\nexport type CalendarGridProps = CalendarGridPartProps;\n\n/** Coordinates a single-date calendar with locale-aware navigation. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n invalid = false,\n isDateUnavailable,\n maxValue,\n minValue,\n onChange,\n readOnly = false,\n ref,\n value,\n visibleMonths = 1,\n ...props\n}: Readonly<CalendarRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaCalendar, {\n ...props,\n children,\n className: rootStyle({ class: className }),\n defaultValue: parseDateValue(defaultValue ?? null) ?? undefined,\n isDateUnavailable: isDateUnavailable\n ? (date: CalendarDate) => isDateUnavailable(date.toString())\n : undefined,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n maxValue: parseDateValue(maxValue ?? null) ?? undefined,\n minValue: parseDateValue(minValue ?? null) ?? undefined,\n onChange: readOnly\n ? undefined\n : (date: CalendarDate | null) => onChange?.(formatDateValue(date)),\n ref: useForwardedRef(ref),\n value: value === undefined ? undefined : parseDateValue(value),\n visibleDuration: { months: visibleMonths },\n } as unknown as ComponentProps<typeof AriaCalendar>);\n}\n/**\n * Selects one stable ISO date from an accessible locale-aware calendar.\n *\n * @summary locale-aware selection of one ISO date\n */\nexport const Calendar = {\n /** Locale-aware weekday and day grid. */\n Grid: CalendarGridPart,\n /** Navigation header container. */\n Header: CalendarHeaderPart,\n /** Visible month heading. */\n Heading: CalendarHeadingPart,\n /** Next-page navigation. */\n NextButton: CalendarNextButtonPart,\n /** Previous-page navigation. */\n PreviousButton: CalendarPreviousButtonPart,\n /** Stable date state and constraints. */\n Root,\n};\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst cardRoot = tv({\n base: 'min-w-0 border border-b-2 border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n});\n\nconst cardHeader = tv({\n base: 'grid gap-1 border-b border-[var(--breeze-border)] px-5 py-4',\n});\n\nconst cardTitle = tv({\n base: 'm-0 font-[family-name:var(--breeze-font-display)] text-xl font-bold leading-tight',\n});\n\nconst cardDescription = tv({\n base: 'm-0 text-sm text-[var(--breeze-ink-muted)]',\n});\n\nconst cardBody = tv({ base: 'min-w-0 px-5 py-4' });\n\nconst cardFooter = tv({\n base: 'flex min-h-11 flex-wrap items-center gap-3 border-t border-[var(--breeze-border)] px-5 py-3',\n});\n\n/** Props for the semantic card container. */\nexport interface CardRootProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Ref to the rendered article element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Props for the card heading region. */\nexport interface CardHeaderProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Ref to the rendered header element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Props for the card title. */\nexport interface CardTitleProps\n extends Omit<HTMLAttributes<HTMLHeadingElement>, 'style'> {\n /** Ref to the rendered level-three heading. */\n ref?: Ref<HTMLHeadingElement>;\n}\n\n/** Props for supporting card title context. */\nexport interface CardDescriptionProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'style'> {\n /** Ref to the rendered paragraph element. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Props for the card's primary content region. */\nexport interface CardBodyProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Ref to the rendered body element. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for the card's supporting action or metadata region. */\nexport interface CardFooterProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Ref to the rendered footer element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Renders the semantic article that contains one domain-neutral summary. */\nexport function Root({\n className,\n ref,\n ...props\n}: Readonly<CardRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('article', {\n ...props,\n className: cardRoot({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Groups a card title and its optional description or controls. */\nexport function Header({\n className,\n ref,\n ...props\n}: Readonly<CardHeaderProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('header', {\n ...props,\n className: cardHeader({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the canonical level-three card heading. */\nexport function Title({\n className,\n ref,\n ...props\n}: Readonly<CardTitleProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('h3', {\n ...props,\n className: cardTitle({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders supporting context directly associated with a card title. */\nexport function Description({\n className,\n ref,\n ...props\n}: Readonly<CardDescriptionProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('p', {\n ...props,\n className: cardDescription({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the primary card content region. */\nexport function Body({\n className,\n ref,\n ...props\n}: Readonly<CardBodyProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('div', {\n ...props,\n className: cardBody({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders a supporting action or metadata footer. */\nexport function Footer({\n className,\n ref,\n ...props\n}: Readonly<CardFooterProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('footer', {\n ...props,\n className: cardFooter({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/**\n * Groups one related content summary in a domain-neutral compound surface.\n *\n * @summary compound surface for one related content summary\n */\nexport const Card = {\n /** Primary content region. */\n Body,\n /** Supporting title context. */\n Description,\n /** Supporting action or metadata region. */\n Footer,\n /** Title and description region. */\n Header,\n /** Semantic article container. */\n Root,\n /** Canonical level-three card heading. */\n Title,\n};\n","import { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport type { LayoutElementProps } from '../../internal/styling/layout';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst center = tv({\n base: 'grid place-items-center',\n defaultVariants: {\n minHeight: 'none',\n },\n variants: {\n minHeight: {\n none: '',\n screen: 'min-h-screen',\n },\n },\n});\n\n/** Props for a layout that centres one composition in both axes. */\nexport interface CenterProps extends LayoutElementProps {\n /** Minimum block size. Defaults to `none`; `screen` fills the viewport. */\n minHeight?: 'none' | 'screen';\n}\n\n/**\n * Centres content horizontally and vertically without imposing presentation.\n *\n * @summary two-axis layout centring with optional viewport height\n */\nexport function Center({\n className,\n minHeight,\n ...props\n}: Readonly<CenterProps>) {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: center({\n class: className,\n minHeight,\n }),\n });\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n LabelHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport { createElement, useRef } from 'react';\nimport {\n CheckboxButton as AriaCheckboxButton,\n CheckboxField as AriaCheckboxField,\n} from 'react-aria-components/Checkbox';\nimport { tv } from 'tailwind-variants';\nimport { CheckIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n} from '../TextField/TextField';\n\nconst checkboxRoot = tv({\n base: 'flex min-w-0 flex-col gap-1',\n});\n\nconst checkboxControl = tv({\n base: 'group inline-flex min-h-11 w-fit cursor-pointer items-center gap-2 font-[family-name:var(--breeze-font-display)] text-sm font-bold text-[var(--breeze-ink)] data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55',\n});\n\nconst checkboxIndicator = tv({\n base: 'inline-flex shrink-0 items-center justify-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-white transition-colors duration-[var(--breeze-duration-fast)] group-data-[indeterminate]:border-[var(--breeze-primary)] group-data-[indeterminate]:bg-[var(--breeze-primary)] group-data-[selected]:border-[var(--breeze-primary)] group-data-[selected]:bg-[var(--breeze-primary)] [&>svg]:opacity-0 group-data-[indeterminate]:[&>svg]:opacity-100 group-data-[selected]:[&>svg]:opacity-100',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-6 text-base',\n md: 'size-5 text-sm',\n sm: 'size-4 text-xs',\n },\n },\n});\n\ntype CheckboxRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface CheckboxRootSharedProps extends CheckboxRootNativeProps {\n /** Compound control, description, and error parts. */\n children: ReactNode;\n /** Prevents focus and selection changes. Defaults to `false`. */\n disabled?: boolean;\n /** Associates the hidden native checkbox with an external form. */\n form?: string;\n /** Renders a mixed-state checkbox. Defaults to `false`. */\n indeterminate?: boolean;\n /** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Native form field name. */\n name?: string;\n /** Marks the checkbox as required. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered field container. */\n ref?: Ref<HTMLDivElement>;\n /** Ref to the hidden native checkbox used for focus and form integration. */\n inputRef?: RefObject<HTMLInputElement | null>;\n /** Native submitted value when selected. Defaults to `on`. */\n value?: string;\n}\n\ninterface ControlledCheckboxRootProps {\n /** Current selected state. */\n selected: boolean;\n /** Called with the next selected state. */\n onChange: (selected: boolean) => void;\n defaultSelected?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyCheckboxRootProps {\n /** Current immutable selected state. */\n selected: boolean;\n /** Marks a controlled selection as intentionally immutable. */\n readOnly: true;\n defaultSelected?: never;\n onChange?: never;\n}\n\ninterface UncontrolledCheckboxRootProps {\n /** Initial selected state. Defaults to `false`. */\n defaultSelected?: boolean;\n /** Called with the next selected state. */\n onChange?: (selected: boolean) => void;\n readOnly?: false;\n selected?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled checkbox state. */\nexport type CheckboxRootProps = CheckboxRootSharedProps &\n (\n | ControlledCheckboxRootProps\n | ReadOnlyCheckboxRootProps\n | UncontrolledCheckboxRootProps\n );\n\n/** Props for the clickable checkbox control and native label. */\nexport interface CheckboxControlProps\n extends Omit<\n LabelHTMLAttributes<HTMLLabelElement>,\n 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Indicator and persistent label content. */\n children: ReactNode;\n /** Ref to the rendered native label. */\n ref?: Ref<HTMLLabelElement>;\n}\n\n/** Props for the visual checkbox indicator. */\nexport interface CheckboxIndicatorProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Ref to the rendered indicator. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical indicator size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for the visible checkbox label text. */\nexport interface CheckboxLabelProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Persistent text naming the checkbox. */\n children: ReactNode;\n /** Ref to the rendered label text. */\n ref?: Ref<HTMLSpanElement>;\n}\n\n/** Props for supporting text associated with the checkbox. */\nexport type CheckboxDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible checkbox validation message. */\nexport type CheckboxErrorProps = TextFieldErrorProps;\n\n/** Coordinates accessible checkbox state, validation, and native form participation. */\nexport function Root({\n children,\n className,\n defaultSelected,\n disabled = false,\n form,\n indeterminate = false,\n inputRef,\n invalid = false,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n selected,\n value,\n ...props\n}: Readonly<CheckboxRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const fallbackInputRef = useRef<HTMLInputElement>(null);\n\n return createElement(\n AriaCheckboxField,\n {\n ...props,\n className: checkboxRoot({ class: className }),\n defaultSelected,\n form,\n inputRef: inputRef ?? fallbackInputRef,\n isDisabled: disabled,\n isIndeterminate: indeterminate,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n isSelected: selected,\n name,\n onChange,\n ref: forwardedRef,\n value,\n } as ComponentProps<typeof AriaCheckboxField>,\n children,\n );\n}\n\n/** Renders the pointer, touch, and keyboard checkbox target. */\nexport function Control({\n className,\n ref,\n ...props\n}: Readonly<CheckboxControlProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaCheckboxButton, {\n ...props,\n className: checkboxControl({ class: className }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaCheckboxButton>);\n}\n\n/** Renders the selected or indeterminate visual checkbox mark. */\nexport function Indicator({\n className,\n ref,\n size,\n ...props\n}: Readonly<CheckboxIndicatorProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n 'aria-hidden': true,\n className: checkboxIndicator({ class: className, size }),\n ref: forwardedRef,\n },\n <CheckIcon />,\n );\n}\n\n/** Renders persistent visible label text within Checkbox.Control. */\nexport function Label({\n ref,\n ...props\n}: Readonly<CheckboxLabelProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n ref: forwardedRef,\n });\n}\n\n/**\n * Coordinates accessible Boolean selection with native form participation.\n *\n * @summary Boolean selection with native form participation\n */\nexport const Checkbox = {\n /** Pointer, touch, and keyboard selection target. */\n Control,\n /** Supporting guidance associated with the checkbox. */\n Description: TextField.Description,\n /** Validation message associated with an invalid checkbox. */\n Error: TextField.Error,\n /** Visual selected or indeterminate mark. */\n Indicator,\n /** Persistent visible label text. */\n Label,\n /** State, validation, and native form root. */\n Root,\n};\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { CheckboxGroup as AriaCheckboxGroup } from 'react-aria-components/CheckboxGroup';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst checkboxGroupRoot = tv({\n base: 'flex min-w-0 gap-2',\n defaultVariants: {\n orientation: 'vertical',\n },\n variants: {\n orientation: {\n horizontal:\n 'flex-row flex-wrap items-start gap-x-5 [&>[data-breeze-checkbox-group-description]]:basis-full [&>[data-breeze-checkbox-group-error]]:basis-full [&>[data-breeze-checkbox-group-label]]:basis-full',\n vertical: 'flex-col items-start',\n },\n },\n});\n\ntype CheckboxGroupRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface CheckboxGroupRootSharedProps extends CheckboxGroupRootNativeProps {\n /** Compound label, checkboxes, description, and error parts. */\n children: ReactNode;\n /** Prevents focus and selection changes for every checkbox. Defaults to `false`. */\n disabled?: boolean;\n /** Exposes invalid group state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Native form field name shared by grouped checkboxes. */\n name?: string;\n /** Visual option layout. Defaults to `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n /** Marks the group as requiring at least one selection. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledCheckboxGroupRootProps {\n /** Current selected checkbox values. */\n selection: string[];\n /** Called with the next selected checkbox values. */\n onSelectionChange: (selection: string[]) => void;\n defaultSelection?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyCheckboxGroupRootProps {\n /** Current immutable selected checkbox values. */\n selection: string[];\n /** Marks a controlled selection as intentionally immutable. */\n readOnly: true;\n defaultSelection?: never;\n onSelectionChange?: never;\n}\n\ninterface UncontrolledCheckboxGroupRootProps {\n /** Initial selected checkbox values. Defaults to an empty selection. */\n defaultSelection?: string[];\n /** Called with the next selected checkbox values. */\n onSelectionChange?: (selection: string[]) => void;\n readOnly?: false;\n selection?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled checkbox-group selection. */\nexport type CheckboxGroupRootProps = CheckboxGroupRootSharedProps &\n (\n | ControlledCheckboxGroupRootProps\n | ReadOnlyCheckboxGroupRootProps\n | UncontrolledCheckboxGroupRootProps\n );\n\n/** Props for the visible checkbox-group label. */\nexport type CheckboxGroupLabelProps = TextFieldLabelProps;\n\n/** Props for supporting text associated with the checkbox group. */\nexport type CheckboxGroupDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible checkbox-group validation message. */\nexport type CheckboxGroupErrorProps = TextFieldErrorProps;\n\n/** Coordinates multiple checkbox selection, validation, layout, and form naming. */\nexport function Root({\n children,\n className,\n defaultSelection,\n disabled = false,\n invalid = false,\n name,\n onSelectionChange,\n orientation,\n readOnly = false,\n ref,\n required = false,\n selection,\n ...props\n}: Readonly<CheckboxGroupRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaCheckboxGroup,\n {\n ...props,\n className: checkboxGroupRoot({ class: className, orientation }),\n defaultValue: defaultSelection,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n name,\n onChange: onSelectionChange,\n ref: forwardedRef,\n value: selection,\n } as ComponentProps<typeof AriaCheckboxGroup>,\n children,\n );\n}\n\n/** Renders the persistent accessible label owned by the checkbox group. */\nexport function Label(props: Readonly<CheckboxGroupLabelProps>): ReactElement {\n return createElement(TextField.Label, {\n ...props,\n 'data-breeze-checkbox-group-label': true,\n } as CheckboxGroupLabelProps & {\n 'data-breeze-checkbox-group-label': true;\n });\n}\n\n/** Renders supporting guidance on its own checkbox-group row. */\nexport function Description(\n props: Readonly<CheckboxGroupDescriptionProps>,\n): ReactElement {\n return createElement(TextField.Description, {\n ...props,\n 'data-breeze-checkbox-group-description': true,\n } as CheckboxGroupDescriptionProps & {\n 'data-breeze-checkbox-group-description': true;\n });\n}\n\n/** Renders associated validation feedback on its own checkbox-group row. */\nfunction ErrorMessage(props: Readonly<CheckboxGroupErrorProps>): ReactElement {\n return createElement(TextField.Error, {\n ...props,\n 'data-breeze-checkbox-group-error': true,\n } as CheckboxGroupErrorProps & {\n 'data-breeze-checkbox-group-error': true;\n });\n}\n\nexport { ErrorMessage as Error };\n\n/**\n * Coordinates labelled multiple selection with native checkbox semantics.\n *\n * @summary labelled multiple selection with native checkbox semantics\n */\nexport const CheckboxGroup = {\n /** Supporting guidance associated with the group. */\n Description,\n /** Validation message associated with an invalid group. */\n Error: ErrorMessage,\n /** Persistent accessible group label. */\n Label,\n /** Selection, validation, layout, and native form root. */\n Root,\n};\n","import { useCallback, useEffect, useRef } from 'react';\n\ninterface LoadMoreHandlerOptions {\n loading: boolean;\n onLoadMore: () => void | Promise<void>;\n}\n\nexport default function useLoadMoreHandler({\n loading,\n onLoadMore,\n}: LoadMoreHandlerOptions): () => void {\n const activeRequestRef = useRef(false);\n const loadingRef = useRef(loading);\n\n useEffect(() => {\n loadingRef.current = loading;\n\n if (!loading) {\n activeRequestRef.current = false;\n }\n }, [loading]);\n\n return useCallback(() => {\n if (loadingRef.current || activeRequestRef.current) {\n return;\n }\n\n activeRequestRef.current = true;\n\n const result = onLoadMore();\n\n if (result instanceof Promise) {\n const clearActiveRequest = () => {\n if (!loadingRef.current) {\n activeRequestRef.current = false;\n }\n };\n\n result.then(clearActiveRequest, clearActiveRequest);\n\n return;\n }\n\n queueMicrotask(() => {\n if (!loadingRef.current) {\n activeRequestRef.current = false;\n }\n });\n }, [onLoadMore]);\n}\n","/** Media query used by Breeze's compact variants below the small breakpoint. */\nexport const breezeSmallBreakpointQuery = '(width < 42.5625rem)';\n\n/** Returns whether the viewport currently matches Breeze's compact range. */\nexport default function isBreezeSmallViewport(\n view: Pick<Window, 'matchMedia'>,\n): boolean {\n return (\n typeof view.matchMedia === 'function' &&\n view.matchMedia(breezeSmallBreakpointQuery).matches\n );\n}\n","import type { CollectionKey } from '../types/collection';\n\n/** Encodes collection keys for collision-safe DOM metadata. */\nexport default function encodeCollectionKey(key: CollectionKey): string {\n return `${typeof key}:${key}`;\n}\n\n/** Encodes an iterable while treating a bare string as one collection key. */\nexport function encodeCollectionKeys(\n keys: CollectionKey | Iterable<CollectionKey>,\n): ReadonlySet<string> {\n const values =\n typeof keys === 'string' || typeof keys === 'number' ? [keys] : keys;\n\n return new Set(Array.from(values, encodeCollectionKey));\n}\n","import type {\n ComponentProps,\n CSSProperties,\n ReactElement,\n ReactNode,\n} from 'react';\nimport { createElement, useMemo } from 'react';\nimport {\n GridLayout,\n ListLayout,\n Rect,\n Size,\n TableLayout,\n Virtualizer as AriaVirtualizer,\n} from 'react-aria-components/Virtualizer';\nimport isBreezeSmallViewport from '../styling/breakpoints';\nimport type {\n CollectionKey,\n CollectionVirtualization,\n} from '../types/collection';\nimport encodeCollectionKey from './collectionKey';\n\nconst compactTableCellGap = 8;\nconst compactTableMeasurementAllowance = 1;\nconst compactTableRowBorder = 1;\nconst compactTableRowPadding = 34;\nconst emptyCompactHiddenColumns: ReadonlySet<string> = new Set();\n\nfunction tableLayoutColumnKey(node: unknown): string | undefined {\n const key = (node as { column?: { key?: CollectionKey } } | undefined)?.column\n ?.key;\n\n return key === undefined ? undefined : encodeCollectionKey(key);\n}\n\ninterface VirtualizedCollectionProps {\n children?: ReactNode;\n compactHiddenColumns?: ReadonlySet<string>;\n configuration: CollectionVirtualization;\n kind: 'grid' | 'list' | 'table';\n direction?: 'ltr' | 'rtl';\n maximumColumns?: number;\n minimumItemWidth?: number;\n orientation?: 'horizontal' | 'vertical';\n}\n\ninterface LayoutOptions {\n estimatedHeadingSize?: number;\n estimatedRowSize?: number;\n gap?: number;\n headingSize?: number;\n loaderSize?: number;\n orientation?: 'horizontal' | 'vertical';\n rowSize?: number;\n}\n\ninterface TableOptions {\n estimatedHeadingHeight?: number;\n estimatedRowHeight?: number;\n gap?: number;\n headingHeight?: number;\n loaderHeight?: number;\n rowHeight?: number;\n}\n\ninterface GridOptions {\n direction?: 'ltr' | 'rtl';\n loaderHeight?: number;\n maxColumns?: number;\n minItemSize?: Size;\n minSpace?: Size;\n preserveAspectRatio?: boolean;\n}\n\nfunction overscanRect(rect: Rect, amount: number): Rect {\n const expandedRect = rect.copy();\n\n expandedRect.x = Math.max(0, expandedRect.x - amount);\n expandedRect.y = Math.max(0, expandedRect.y - amount);\n expandedRect.width += amount * 2;\n expandedRect.height += amount * 2;\n\n return expandedRect;\n}\n\nclass BreezeListLayout extends ListLayout<unknown, LayoutOptions> {\n readonly #overscan: number;\n\n constructor(options: LayoutOptions, overscan: number) {\n super(options);\n this.#overscan = overscan;\n }\n\n override getVisibleLayoutInfos(rect: Rect) {\n return super.getVisibleLayoutInfos(overscanRect(rect, this.#overscan));\n }\n}\n\nclass BreezeTableLayout extends TableLayout<unknown, TableOptions> {\n readonly #compactHiddenColumns: ReadonlySet<string>;\n\n readonly #overscan: number;\n\n readonly #compactCellHeights = new Map<CollectionKey, number>();\n\n constructor(\n options: TableOptions,\n overscan: number,\n compactHiddenColumns: ReadonlySet<string>,\n ) {\n super(options);\n this.#compactHiddenColumns = compactHiddenColumns;\n this.#overscan = overscan;\n }\n\n override getVisibleLayoutInfos(rect: Rect) {\n return super.getVisibleLayoutInfos(overscanRect(rect, this.#overscan));\n }\n\n override updateItemSize(key: CollectionKey, size: Size): boolean {\n const layoutNode = this.layoutNodes.get(key);\n const compact =\n typeof window !== 'undefined' && isBreezeSmallViewport(window);\n\n if (\n !compact ||\n this.rowHeight !== null ||\n layoutNode?.layoutInfo.type !== 'cell' ||\n layoutNode.layoutInfo.parentKey === null\n ) {\n return super.updateItemSize(key, size);\n }\n\n this.#compactCellHeights.set(key, size.height);\n\n const row = this.layoutNodes.get(layoutNode.layoutInfo.parentKey);\n const cells = row?.children ?? [];\n const visibleCells = cells.filter(\n (cell) =>\n !this.#compactHiddenColumns.has(tableLayoutColumnKey(cell.node) ?? ''),\n );\n\n if (visibleCells.length === 0) {\n return super.updateItemSize(key, size);\n }\n\n if (\n this.#compactHiddenColumns.has(\n tableLayoutColumnKey(layoutNode.node) ?? '',\n )\n ) {\n return false;\n }\n\n const measuredHeight = Math.ceil(\n visibleCells.reduce(\n (height, cell) =>\n height +\n (this.#compactCellHeights.get(cell.layoutInfo.key) ?? size.height),\n compactTableRowBorder +\n compactTableMeasurementAllowance +\n compactTableRowPadding +\n compactTableCellGap * (visibleCells.length - 1),\n ),\n );\n\n return cells.reduce(\n (changed, cell) =>\n super.updateItemSize(\n cell.layoutInfo.key,\n new Size(cell.layoutInfo.rect.width, measuredHeight),\n ) || changed,\n false,\n );\n }\n}\n\nclass BreezeGridLayout extends GridLayout<unknown, GridOptions> {\n readonly #overscan: number;\n\n constructor(overscan: number) {\n super();\n this.#overscan = overscan;\n }\n\n override getVisibleLayoutInfos(rect: Rect) {\n return super.getVisibleLayoutInfos(overscanRect(rect, this.#overscan));\n }\n}\n\nfunction rowHeightOptions(configuration: CollectionVirtualization) {\n return configuration.mode === 'fixed'\n ? {\n estimatedRowHeight: undefined,\n rowHeight: configuration.rowHeight,\n }\n : {\n estimatedRowHeight: configuration.estimatedRowHeight ?? 48,\n rowHeight: undefined,\n };\n}\n\nexport function collectionViewportStyle(\n configuration: CollectionVirtualization | undefined,\n): CSSProperties | undefined {\n return configuration === undefined\n ? undefined\n : {\n height: configuration.viewportHeight,\n };\n}\n\nexport default function VirtualizedCollection({\n children,\n compactHiddenColumns = emptyCompactHiddenColumns,\n configuration,\n direction = 'ltr',\n kind,\n maximumColumns,\n minimumItemWidth = 224,\n orientation = 'vertical',\n}: Readonly<VirtualizedCollectionProps>): ReactElement {\n const {\n estimatedSectionHeight,\n gap = 0,\n loadingRowHeight = 48,\n overscan = 0,\n } = configuration;\n const { estimatedRowHeight, rowHeight } = rowHeightOptions(configuration);\n const gridLayoutOptions = useMemo<GridOptions | undefined>(\n () =>\n kind === 'grid'\n ? {\n direction,\n loaderHeight: loadingRowHeight,\n maxColumns: maximumColumns,\n minItemSize: new Size(\n minimumItemWidth,\n rowHeight ?? estimatedRowHeight ?? 48,\n ),\n minSpace: new Size(gap, gap),\n preserveAspectRatio: configuration.mode === 'fixed',\n }\n : undefined,\n [\n configuration.mode,\n direction,\n estimatedRowHeight,\n gap,\n kind,\n loadingRowHeight,\n maximumColumns,\n minimumItemWidth,\n rowHeight,\n ],\n );\n const layout = useMemo(() => {\n if (kind === 'table') {\n return new BreezeTableLayout(\n {\n estimatedHeadingHeight: estimatedSectionHeight,\n estimatedRowHeight,\n gap,\n loaderHeight: loadingRowHeight,\n rowHeight,\n },\n overscan,\n compactHiddenColumns,\n );\n }\n\n if (kind === 'grid') {\n return new BreezeGridLayout(overscan);\n }\n\n return new BreezeListLayout(\n {\n estimatedHeadingSize: estimatedSectionHeight,\n estimatedRowSize: estimatedRowHeight,\n gap,\n loaderSize: loadingRowHeight,\n orientation,\n rowSize: rowHeight,\n },\n overscan,\n );\n }, [\n estimatedRowHeight,\n estimatedSectionHeight,\n gap,\n kind,\n loadingRowHeight,\n compactHiddenColumns,\n orientation,\n overscan,\n rowHeight,\n ]);\n\n const virtualizerProps = {\n children,\n layout,\n layoutOptions: gridLayoutOptions,\n } as unknown as ComponentProps<typeof AriaVirtualizer>;\n\n return createElement(AriaVirtualizer, virtualizerProps);\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useCallback, useLayoutEffect, useRef } from 'react';\nimport {\n ListBox as AriaListBox,\n ListBoxItem as AriaListBoxItem,\n ListBoxLoadMoreItem as AriaListBoxLoadMoreItem,\n} from 'react-aria-components/ListBox';\nimport { tv } from 'tailwind-variants';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useLoadMoreHandler from '../../internal/collections/useLoadMoreHandler';\nimport VirtualizedCollection, {\n collectionViewportStyle,\n} from '../../internal/collections/VirtualizedCollection';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n CollectionSelection,\n CollectionVirtualization,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst listBoxRoot = tv({\n base: 'flex min-w-48 flex-col gap-1 border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-1 outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] aria-invalid:border-[var(--breeze-danger)]',\n defaultVariants: {\n orientation: 'vertical',\n virtualized: false,\n },\n variants: {\n orientation: {\n horizontal: 'flex-row overflow-x-auto',\n vertical: 'max-h-72 overflow-y-auto',\n },\n virtualized: {\n false: '',\n true: 'max-h-none overflow-auto',\n },\n },\n});\n\nconst listBoxItem = tv({\n base: 'flex min-h-10 cursor-default items-center px-3 py-2 text-sm text-[var(--breeze-ink)] outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focused]:bg-[var(--breeze-primary-soft)] data-[selected]:bg-[var(--breeze-primary)] data-[selected]:text-white',\n});\n\nconst listBoxLoadMore = tv({\n base: 'flex min-h-11 items-center justify-center px-3 py-2 text-sm text-[var(--breeze-ink-muted)]',\n});\n\ntype ListBoxRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface ListBoxRootSharedProps extends ListBoxRootNativeProps {\n /** Keys whose items cannot receive focus, selection, or actions. */\n disabledKeys?: Iterable<CollectionKey>;\n /** Content displayed when the collection has no items. */\n emptyContent?: ReactNode;\n /** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Enables multiple selection. Defaults to `false`. */\n multiple?: boolean;\n /** Primary item layout and arrow-key navigation axis. Defaults to `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n /** Marks the listbox as requiring a selection. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered listbox. */\n ref?: Ref<HTMLDivElement>;\n /** Optional fixed- or variable-height windowing configuration. */\n virtualization?: CollectionVirtualization;\n}\n\ninterface ControlledListBoxRootProps {\n /** Current selected keys. */\n selection: CollectionSelection;\n /** Called with the next selected keys. */\n onSelectionChange: (selection: CollectionSelection) => void;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Controlled mutable state cannot be marked read-only. */\n readOnly?: false;\n}\n\ninterface ReadOnlyListBoxRootProps {\n /** Current immutable selected keys. */\n selection: CollectionSelection;\n /** Marks a controlled selection as intentionally immutable. */\n readOnly: true;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n}\n\ninterface UncontrolledListBoxRootProps {\n /** Initial selected keys. Defaults to an empty selection. */\n defaultSelection?: CollectionSelection;\n /** Called with the next selected keys. */\n onSelectionChange?: (selection: CollectionSelection) => void;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n /** Excluded when selection is uncontrolled. */\n selection?: never;\n}\n\n/** Props for a static or generic, controlled, read-only, or uncontrolled listbox. */\nexport type ListBoxRootProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = ListBoxRootSharedProps &\n CollectionContentProps<Item> &\n (\n | ControlledListBoxRootProps\n | ReadOnlyListBoxRootProps\n | UncontrolledListBoxRootProps\n );\n\n/** Props for one selectable listbox option. */\nexport interface ListBoxItemProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Visible option content. */\n children: ReactNode;\n /** Prevents focus, selection, and actions for this option. Defaults to `false`. */\n disabled?: boolean;\n /** Stable string or number option key. */\n id: CollectionKey;\n /** Called with this option key when its action is invoked. */\n onAction?: (key: CollectionKey) => void;\n /** Ref to the rendered option. */\n ref?: Ref<HTMLDivElement>;\n /** Plain-text representation used for typeahead and accessibility. */\n textValue: string;\n}\n\n/** Props for a listbox loading row and load-more sentinel. */\nexport interface ListBoxLoadMoreProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Visible loading-row content. */\n children: ReactNode;\n /** Shows the loading row and suppresses duplicate requests. Defaults to `false`. */\n loading?: boolean;\n /** Called once when more consumer-owned items should be requested. */\n onLoadMore: () => void | Promise<void>;\n /** Trigger distance as a proportion of the scroll viewport. Defaults to `1`. */\n offset?: number;\n /** Ref to the rendered loading row. */\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction normaliseSelection(\n selection: 'all' | Set<CollectionKey>,\n): CollectionSelection {\n return selection === 'all' ? 'all' : [...selection];\n}\n\n/** Coordinates collection rendering, focus, typeahead, and semantic selection. */\nexport function Root<Item extends BreezeCollectionItem>({\n children,\n className,\n defaultSelection,\n disabledKeys,\n emptyContent,\n invalid = false,\n items,\n multiple = false,\n onSelectionChange,\n orientation = 'vertical',\n readOnly = false,\n ref,\n required = false,\n selection,\n virtualization,\n ...props\n}: Readonly<ListBoxRootProps<Item>>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n const elementRef = useRef<HTMLDivElement | null>(null);\n const stableRef = useCallback(\n (element: HTMLDivElement | null) => {\n elementRef.current = element;\n forwardedRef(element);\n },\n [forwardedRef],\n );\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n\n if (element === null) {\n return;\n }\n\n if (invalid) {\n element.setAttribute('aria-invalid', 'true');\n } else {\n element.removeAttribute('aria-invalid');\n }\n\n if (required) {\n element.setAttribute('aria-required', 'true');\n } else {\n element.removeAttribute('aria-required');\n }\n }, [invalid, required]);\n\n const listBox = createElement(AriaListBox, {\n ...props,\n 'aria-readonly': readOnly || undefined,\n children,\n className: listBoxRoot({\n class: className,\n orientation,\n virtualized: virtualization !== undefined,\n }),\n 'data-virtualized': virtualization === undefined ? undefined : 'true',\n defaultSelectedKeys: defaultSelection,\n disabledKeys,\n items,\n onSelectionChange: (nextSelection: 'all' | Set<CollectionKey>) =>\n onSelectionChange?.(normaliseSelection(nextSelection)),\n orientation,\n ref: stableRef,\n renderEmptyState: () => resolvedEmptyContent,\n selectedKeys: selection,\n selectionMode: multiple ? 'multiple' : 'single',\n style: collectionViewportStyle(virtualization),\n } as unknown as ComponentProps<typeof AriaListBox>);\n\n return virtualization === undefined\n ? listBox\n : createElement(\n VirtualizedCollection,\n {\n configuration: virtualization,\n kind: 'list',\n orientation,\n },\n listBox,\n );\n}\n\n/** Renders one keyed option within a Breeze collection. */\nexport function Item({\n className,\n disabled = false,\n id,\n onAction,\n ref,\n textValue,\n ...props\n}: Readonly<ListBoxItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaListBoxItem, {\n ...props,\n className: listBoxItem({ class: className }),\n id,\n isDisabled: disabled,\n onAction: onAction === undefined ? undefined : () => onAction(id),\n ref: forwardedRef,\n textValue,\n });\n}\n\n/** Renders a loading row and deduplicated intersection sentinel. */\nexport function LoadMore({\n className,\n loading = false,\n offset = 1,\n onLoadMore,\n ref,\n ...props\n}: Readonly<ListBoxLoadMoreProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const handleLoadMore = useLoadMoreHandler({ loading, onLoadMore });\n\n return createElement(AriaListBoxLoadMoreItem, {\n ...props,\n className: listBoxLoadMore({ class: className }),\n isLoading: loading,\n onLoadMore: handleLoadMore,\n ref: forwardedRef,\n scrollOffset: offset,\n });\n}\n\n/**\n * Accessible compound collection primitive for selectable options.\n *\n * @summary visible selectable options with optional collection virtualization\n */\nexport const ListBox = {\n /** One keyed selectable option. */\n Item,\n /** Loading row and deduplicated load-more sentinel. */\n LoadMore,\n /** Collection rendering, focus, typeahead, and selection root. */\n Root,\n};\n","import type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n InputHTMLAttributes,\n KeyboardEvent,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createContext, createElement, useContext } from 'react';\nimport {\n Button as AriaButton,\n ComboBox as AriaComboBox,\n type ComboBoxRenderProps,\n Input as AriaInput,\n ListBox as AriaListBox,\n Popover as AriaPopover,\n} from 'react-aria-components/ComboBox';\nimport { Group as AriaGroup } from 'react-aria-components/Group';\nimport { tv } from 'tailwind-variants';\nimport { ChevronDownIcon } from '../../icons';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport formControlValue from '../../internal/styling/formControls';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n ListBox as BreezeListBox,\n type ListBoxItemProps,\n} from '../ListBox/ListBox';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst root = tv({ base: 'flex min-w-0 flex-col gap-1.5' });\nconst input = tv({\n base: 'w-full border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] placeholder:text-[var(--breeze-ink-muted)] data-[hovered]:border-[var(--breeze-primary)] data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] disabled:cursor-not-allowed disabled:bg-[var(--breeze-surface-subtle)] disabled:opacity-70 read-only:cursor-default read-only:bg-[var(--breeze-surface-subtle)] aria-invalid:border-[var(--breeze-danger)]',\n});\nconst group = tv({\n base: \"relative inline-flex w-full min-w-0 items-stretch bg-[var(--breeze-surface)] outline-none after:pointer-events-none after:absolute after:inset-0 after:z-10 after:border after:border-[var(--breeze-border-strong)] after:transition-colors after:duration-[var(--breeze-duration-fast)] after:content-[''] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-solid data-[focus-visible]:outline-[var(--breeze-focus)] data-[focus-within]:after:border-[var(--breeze-primary)] data-[hovered]:after:border-[var(--breeze-primary)] data-[invalid]:after:!border-[var(--breeze-danger)] data-[readonly]:bg-[var(--breeze-surface-subtle)] data-[readonly]:opacity-70\",\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-12',\n md: 'min-h-11',\n sm: 'min-h-8',\n },\n },\n});\nconst groupedInput = tv({\n base: 'min-w-0 w-auto flex-1 border-0 bg-transparent disabled:!bg-transparent disabled:!opacity-100 read-only:!bg-transparent read-only:!opacity-100 data-[focus-visible]:!outline-none aria-invalid:!border-0',\n});\nconst button = tv({\n base: 'inline-flex shrink-0 items-center justify-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink-soft)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] data-[hovered]:border-[var(--breeze-primary)] data-[hovered]:text-[var(--breeze-primary)] disabled:cursor-not-allowed disabled:bg-[var(--breeze-surface-subtle)] disabled:opacity-70',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-12 min-w-12 px-3',\n md: 'min-h-11 min-w-11 px-3',\n sm: 'min-h-8 min-w-8 px-2',\n },\n },\n});\nconst groupedButton = tv({\n base: 'border-0 bg-transparent data-[focus-visible]:!outline-none data-[hovered]:border-0 data-[hovered]:bg-transparent disabled:!bg-transparent disabled:!opacity-100',\n});\nconst popover = tv({\n base: 'min-w-[var(--trigger-width)] border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] shadow-lg',\n});\nconst list = tv({ base: 'max-h-72 overflow-y-auto p-1 outline-none' });\nconst loading = tv({\n base: 'px-3 py-2 text-sm text-[var(--breeze-ink-muted)]',\n});\nconst optionsError = tv({\n base: 'px-3 py-2 text-sm text-[var(--breeze-danger)]',\n});\n\ninterface ComboBoxContextValue {\n onCommit?: (value: string) => void;\n}\n\ninterface ComboBoxCompositionContextValue {\n size: ControlSize;\n}\n\ninterface ComboBoxStateContextValue {\n isDisabled: boolean;\n isInvalid: boolean;\n isReadOnly: boolean;\n}\n\nconst ComboBoxContext = createContext<ComboBoxContextValue | null>(null);\nconst ComboBoxCompositionContext = createContext<\n ComboBoxCompositionContextValue | undefined\n>(undefined);\nconst ComboBoxStateContext = createContext<\n ComboBoxStateContextValue | undefined\n>(undefined);\nconst includeAllOptions = () => true;\n\nfunction renderComboBoxChildren(\n children: ReactNode,\n { isDisabled, isInvalid, isReadOnly }: ComboBoxRenderProps,\n): ReactElement {\n return createElement(\n ComboBoxStateContext.Provider,\n {\n value: {\n isDisabled,\n isInvalid,\n isReadOnly,\n },\n },\n children,\n );\n}\n\ntype Native = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\ninterface Shared extends Native {\n /** Compound label, input, trigger, popover, options, and guidance parts. */ children: ReactNode;\n /** Prevents focus, input, and selection. Defaults to `false`. */ disabled?: boolean;\n /** Associates the native form value with an external form. */ form?: string;\n /** Exposes invalid state to the input and validation message. Defaults to `false`. */ invalid?: boolean;\n /** Native form field name for the selected key or free-form text. */ name?: string;\n /** Temporary text shown when the input is empty. */ placeholder?: string;\n /** Marks the combobox as required. Defaults to `false`. */ required?: boolean;\n /** Ref to the rendered field root. */ ref?: Ref<HTMLDivElement>;\n}\ntype SelectionControlled =\n | {\n /** Current selected key, or `null` when no option is selected. */\n selection: CollectionKey | null;\n /** Called when the selected key changes. */\n onSelectionChange: (selection: CollectionKey | null) => void;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n }\n | {\n /** Initial selected key. */\n defaultSelection?: CollectionKey;\n /** Called when the selected key changes. */\n onSelectionChange?: (selection: CollectionKey | null) => void;\n /** Excluded when selection is uncontrolled. */\n selection?: never;\n };\ntype InputControlled =\n | {\n /** Current text displayed in the input. */\n inputValue: string;\n /** Called when the displayed input text changes. */\n onInputChange: (value: string) => void;\n /** Excluded when input text is controlled. */\n defaultInputValue?: never;\n }\n | {\n /** Initial text displayed in the input. */\n defaultInputValue?: string;\n /** Called when the displayed input text changes. */\n onInputChange?: (value: string) => void;\n /** Excluded when input text is uncontrolled. */\n inputValue?: never;\n };\ntype Mutable = SelectionControlled &\n InputControlled & {\n /** Mutable state cannot be marked read-only. */\n readOnly?: false;\n };\ninterface SelectionReadOnly {\n /** Current selected key, or `null` when no option is selected. */\n selection: CollectionKey | null;\n /** Current immutable input text. */\n inputValue: string;\n /** Prevents changes to the controlled input and selection. */\n readOnly: true;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Excluded when input text is controlled. */\n defaultInputValue?: never;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n /** Excluded because read-only input text cannot change. */\n onInputChange?: never;\n}\ninterface CustomValueReadOnly {\n /** Current immutable free-form input text. */\n inputValue: string;\n /** Current suggestion key, or `null` when no option is selected. */\n selection?: CollectionKey | null;\n /** Prevents changes to the controlled input and selection. */\n readOnly: true;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Excluded when input text is controlled. */\n defaultInputValue?: never;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n /** Excluded because read-only input text cannot change. */\n onInputChange?: never;\n}\ntype SelectionOnly = {\n /** Requires the committed value to match an option. This is the default. */\n allowsCustomValue?: false;\n /** Free-form commits are unavailable in selection-only mode. */\n onCommit?: never;\n} & (Mutable | SelectionReadOnly);\ntype CustomValue = {\n /** Allows arbitrary text to be committed without selecting an option. */\n allowsCustomValue: true;\n /** Called with the current text when Enter commits without a highlighted option. */\n onCommit?: (value: string) => void;\n} & (Mutable | CustomValueReadOnly);\n/** Props for selection-only or free-form ComboBox state. */ export type ComboBoxRootProps =\n Shared & (SelectionOnly | CustomValue);\n/** Props for the visible combobox label. */ export type ComboBoxLabelProps =\n TextFieldLabelProps;\n/** Props for supporting combobox guidance. */ export type ComboBoxDescriptionProps =\n TextFieldDescriptionProps;\n/** Props for a combobox validation message. */ export type ComboBoxErrorProps =\n TextFieldErrorProps;\n/** Props for the single-surface combobox input and trigger group. */\nexport interface ComboBoxGroupProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Editable input and popup trigger. */\n children: ReactNode;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n /** Canonical size applied to every grouped control part. Defaults to `md`. */\n size?: ControlSize;\n}\n/** Editable combobox input props. */ export interface ComboBoxInputProps\n extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n | 'defaultValue'\n | 'disabled'\n | 'onChange'\n | 'readOnly'\n | 'required'\n | 'size'\n | 'style'\n | 'value'\n > {\n /** Ref to the rendered native text input. */ ref?: Ref<HTMLInputElement>;\n /** Standalone input size. A containing Group takes precedence. Defaults to `md`. */\n size?: ControlSize;\n}\n/** Popup trigger props. */ export interface ComboBoxTriggerProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'style'> {\n /** Optional trigger content. Defaults to the Breeze down chevron. */ children?: ReactNode;\n /** Ref to the popup trigger button. */ ref?: Ref<HTMLButtonElement>;\n /** Standalone trigger size. A containing Group takes precedence. Defaults to `md`. */\n size?: ControlSize;\n}\n/** Popover props. */ export interface ComboBoxPopoverProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Option-list content. */ children: ReactNode;\n /** Ref to the positioned popover element. */ ref?: Ref<HTMLElement>;\n}\n/** Static or typed generic option-list props. */ export type ComboBoxListBoxProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> &\n CollectionContentProps<Item> & {\n /** Content announced and displayed when filtering leaves no matching options. */ emptyContent?: ReactNode;\n /** Ref to the rendered listbox. */ ref?: Ref<HTMLDivElement>;\n };\n/** Props for one keyed combobox option. */ export type ComboBoxItemProps =\n ListBoxItemProps;\n/** Props for application-owned asynchronous option loading presentation. */\nexport interface ComboBoxLoadingProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Loading message announced politely while options are pending. */\n children: ReactNode;\n /** Ref to the rendered loading status. */\n ref?: Ref<HTMLDivElement>;\n}\n/** Props for application-owned option loading failure presentation. */\nexport interface ComboBoxOptionsErrorProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Failure message announced assertively when options cannot load. */\n children: ReactNode;\n /** Ref to the rendered option failure alert. */\n ref?: Ref<HTMLDivElement>;\n}\n/** Coordinates selection-only or free-form input, options, and form state. */\nexport function Root({\n allowsCustomValue = false,\n children,\n className,\n defaultInputValue,\n defaultSelection,\n disabled = false,\n form,\n inputValue,\n invalid = false,\n name,\n onCommit,\n onInputChange,\n onSelectionChange,\n placeholder,\n readOnly = false,\n ref,\n required = false,\n selection,\n ...props\n}: Readonly<ComboBoxRootProps>): ReactElement {\n useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const commit =\n allowsCustomValue && !disabled && !readOnly ? onCommit : undefined;\n\n return createElement(\n ComboBoxContext.Provider,\n { value: { onCommit: commit } },\n createElement(AriaComboBox, {\n ...props,\n allowsCustomValue,\n allowsEmptyCollection: true,\n children: renderComboBoxChildren.bind(null, children),\n className: root({ class: className }),\n defaultFilter: allowsCustomValue ? includeAllOptions : undefined,\n defaultInputValue,\n defaultSelectedKey: defaultSelection,\n form,\n inputValue,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n name,\n onInputChange,\n onSelectionChange,\n placeholder,\n ref: forwardedRef,\n selectedKey: selection,\n } as unknown as ComponentProps<typeof AriaComboBox>),\n );\n}\n/** Groups the editable input and popup trigger as one visual control. */\nexport function Group({\n className,\n ref,\n role = 'presentation',\n size = 'md',\n ...props\n}: Readonly<ComboBoxGroupProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const rootState = useContext(ComboBoxStateContext);\n\n return createElement(\n ComboBoxCompositionContext.Provider,\n { value: { size } },\n createElement(AriaGroup, {\n ...props,\n className: group({ class: className, size }),\n 'data-breeze-combobox-group': '',\n 'data-size': size,\n isDisabled: rootState?.isDisabled,\n isInvalid: rootState?.isInvalid,\n isReadOnly: rootState?.isReadOnly,\n ref: forwardedRef,\n role,\n } as ComponentProps<typeof AriaGroup>),\n );\n}\n/** Renders the editable option filter or free-form input. */ export function Input({\n className,\n onKeyDownCapture,\n ref,\n size,\n ...props\n}: Readonly<ComboBoxInputProps>): ReactElement {\n const context = useContext(ComboBoxContext);\n const composition = useContext(ComboBoxCompositionContext);\n const r = useForwardedRef(ref);\n const handleKeyDownCapture = (event: KeyboardEvent<HTMLInputElement>) => {\n onKeyDownCapture?.(event);\n\n const activeOptionId = event.currentTarget.getAttribute(\n 'aria-activedescendant',\n );\n\n if (\n !event.defaultPrevented &&\n event.key === 'Enter' &&\n activeOptionId === null\n ) {\n context?.onCommit?.(event.currentTarget.value);\n }\n };\n\n return createElement(AriaInput, {\n ...props,\n className: formControlValue({\n class: input({\n class: composition ? groupedInput({ class: className }) : className,\n }),\n size: composition?.size ?? size,\n }),\n onKeyDownCapture: handleKeyDownCapture,\n ref: r,\n });\n}\n/** Opens the option popup. */ export function Trigger({\n children,\n className,\n ref,\n size,\n ...props\n}: Readonly<ComboBoxTriggerProps>): ReactElement {\n const composition = useContext(ComboBoxCompositionContext);\n const r = useForwardedRef(ref);\n\n return createElement(\n AriaButton,\n {\n ...props,\n className: button({\n class: composition ? groupedButton({ class: className }) : className,\n size: composition?.size ?? size,\n }),\n ref: r,\n } as ComponentProps<typeof AriaButton>,\n children ?? (\n <ChevronDownIcon className=\"size-4\" data-breeze-combobox-indicator=\"\" />\n ),\n );\n}\n/** Positions options. */ export function Popover({\n className,\n ref,\n ...props\n}: Readonly<ComboBoxPopoverProps>): ReactElement {\n const r = useForwardedRef(ref);\n return createElement(AriaPopover, {\n ...props,\n className: popover({ class: className }),\n ref: r,\n } as ComponentProps<typeof AriaPopover>);\n}\n/** Renders static or generic options. */ export function ListBox<\n Item extends BreezeCollectionItem,\n>({\n children,\n className,\n emptyContent,\n items,\n ref,\n ...props\n}: Readonly<ComboBoxListBoxProps<Item>>): ReactElement {\n const r = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n\n return createElement(AriaListBox, {\n ...props,\n children,\n className: list({ class: className }),\n items,\n ref: r,\n renderEmptyState: () =>\n resolvedEmptyContent === null\n ? null\n : createElement(\n 'div',\n { 'aria-live': 'polite', role: 'status' },\n resolvedEmptyContent,\n ),\n } as unknown as ComponentProps<typeof AriaListBox>);\n}\n/** Announces application-owned option loading without orchestrating data. */\nexport function Loading({\n className,\n ref,\n ...props\n}: Readonly<ComboBoxLoadingProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('div', {\n ...props,\n 'aria-live': 'polite',\n className: loading({ class: className }),\n ref: forwardedRef,\n role: 'status',\n });\n}\n/** Announces an application-owned option loading failure. */\nexport function OptionsError({\n className,\n ref,\n ...props\n}: Readonly<ComboBoxOptionsErrorProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('div', {\n ...props,\n 'aria-live': 'assertive',\n className: optionsError({ class: className }),\n ref: forwardedRef,\n role: 'alert',\n });\n}\n/**\n * Accessible selection-only or free-form combobox primitive.\n *\n * @summary editable keyed option selection with explicit free-form mode\n */\nexport const ComboBox = {\n /** Supporting guidance associated with the combobox. */ Description:\n TextField.Description,\n /** Validation feedback associated with the combobox. */ Error:\n TextField.Error,\n /** Single-surface editable input and popup trigger group. */ Group,\n /** Editable input that filters and displays the selected option. */ Input,\n /** One keyed option within `ComboBox.ListBox`. */ Item: BreezeListBox.Item,\n /** Visible label associated with the combobox input. */ Label:\n TextField.Label,\n /** Static or typed generic option collection. */ ListBox,\n /** Polite application-owned asynchronous option loading status. */ Loading,\n /** Assertive application-owned option loading failure alert. */ OptionsError,\n /** Popup positioned relative to the input and trigger. */ Popover,\n /** Input, selection, validation, and native-form coordination root. */ Root,\n /** Button that opens and closes the option popup. */ Trigger,\n};\n","import type { ComponentPropsWithRef } from 'react';\nimport type { ResponsiveValue } from './responsive';\n\nexport type LayoutElementProps = Omit<ComponentPropsWithRef<'div'>, 'style'>;\n\n/** Named spacing steps available to Breeze layout primitives. */\nexport type Space =\n | 'none'\n | 'xs'\n | 'sm'\n | 'control'\n | 'compact'\n | 'md'\n | 'lg'\n | 'xl'\n | 'xxl'\n | 'page';\n\n/** A scalar spacing step or mobile-first responsive spacing value. */\nexport type ResponsiveSpace = ResponsiveValue<Space>;\n\nexport const paddingClasses = {\n base: {\n compact: 'p-3',\n control: 'p-2.5',\n lg: 'p-5',\n md: 'p-4',\n none: 'p-0',\n page: 'p-12',\n sm: 'p-2',\n xl: 'p-6',\n xs: 'p-1',\n xxl: 'p-8',\n },\n lg: {\n compact: 'lg:p-3',\n control: 'lg:p-2.5',\n lg: 'lg:p-5',\n md: 'lg:p-4',\n none: 'lg:p-0',\n page: 'lg:p-12',\n sm: 'lg:p-2',\n xl: 'lg:p-6',\n xs: 'lg:p-1',\n xxl: 'lg:p-8',\n },\n md: {\n compact: 'md:p-3',\n control: 'md:p-2.5',\n lg: 'md:p-5',\n md: 'md:p-4',\n none: 'md:p-0',\n page: 'md:p-12',\n sm: 'md:p-2',\n xl: 'md:p-6',\n xs: 'md:p-1',\n xxl: 'md:p-8',\n },\n sm: {\n compact: 'sm:p-3',\n control: 'sm:p-2.5',\n lg: 'sm:p-5',\n md: 'sm:p-4',\n none: 'sm:p-0',\n page: 'sm:p-12',\n sm: 'sm:p-2',\n xl: 'sm:p-6',\n xs: 'sm:p-1',\n xxl: 'sm:p-8',\n },\n} as const;\n\nexport const gapClasses = {\n base: {\n compact: 'gap-3',\n control: 'gap-2.5',\n lg: 'gap-5',\n md: 'gap-4',\n none: 'gap-0',\n page: 'gap-12',\n sm: 'gap-2',\n xl: 'gap-6',\n xs: 'gap-1',\n xxl: 'gap-8',\n },\n lg: {\n compact: 'lg:gap-3',\n control: 'lg:gap-2.5',\n lg: 'lg:gap-5',\n md: 'lg:gap-4',\n none: 'lg:gap-0',\n page: 'lg:gap-12',\n sm: 'lg:gap-2',\n xl: 'lg:gap-6',\n xs: 'lg:gap-1',\n xxl: 'lg:gap-8',\n },\n md: {\n compact: 'md:gap-3',\n control: 'md:gap-2.5',\n lg: 'md:gap-5',\n md: 'md:gap-4',\n none: 'md:gap-0',\n page: 'md:gap-12',\n sm: 'md:gap-2',\n xl: 'md:gap-6',\n xs: 'md:gap-1',\n xxl: 'md:gap-8',\n },\n sm: {\n compact: 'sm:gap-3',\n control: 'sm:gap-2.5',\n lg: 'sm:gap-5',\n md: 'sm:gap-4',\n none: 'sm:gap-0',\n page: 'sm:gap-12',\n sm: 'sm:gap-2',\n xl: 'sm:gap-6',\n xs: 'sm:gap-1',\n xxl: 'sm:gap-8',\n },\n} as const;\n","import { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport {\n type LayoutElementProps,\n paddingClasses,\n type ResponsiveSpace,\n} from '../../internal/styling/layout';\nimport { resolveResponsiveClasses } from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst container = tv({\n base: 'mx-auto w-full max-w-screen-2xl',\n});\n\nconst defaultPadding: ResponsiveSpace = {\n base: 'md',\n lg: 'page',\n md: 'xxl',\n sm: 'xl',\n};\n\n/** Props for the bounded Breeze application workspace. */\nexport interface ContainerProps extends LayoutElementProps {\n /** Responsive inline and block gutter. Defaults from `md` at base to `page` at `lg`. */\n padding?: ResponsiveSpace;\n}\n\n/**\n * Centers content in a full-width workspace with responsive\n * page gutters.\n *\n * @summary bounded application workspace with responsive page gutters\n */\nexport function Container({\n className,\n padding = defaultPadding,\n ...props\n}: Readonly<ContainerProps>) {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: container({\n class: [resolveResponsiveClasses(padding, paddingClasses), className],\n }),\n });\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n DateInput as AriaDateInput,\n DateSegment as AriaDateSegment,\n} from 'react-aria-components/DateField';\nimport type { DateSegment as InternalDateSegment } from 'react-stately/useDateFieldState';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\n\nconst inputStyle = tv({\n base: 'flex min-h-10 items-center gap-0.5 border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] px-3 text-sm data-[focus-within]:outline-2 data-[focus-within]:outline-[var(--breeze-focus)] data-[invalid]:border-[var(--breeze-danger)]',\n});\nconst segmentStyle = tv({\n base: 'rounded-sm px-0.5 outline-none data-[focused]:bg-[var(--breeze-primary)] data-[focused]:text-white data-[placeholder]:text-[var(--breeze-ink-muted)]',\n});\nconst timeZoneStyle = tv({\n base: 'cursor-default select-none px-0.5 text-[var(--breeze-ink)]',\n});\n\n/** Props for a Breeze-owned segmented date or time input. */\nexport interface DateInputPartProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Ref to the rendered segment group. */\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction renderSegment(segment: InternalDateSegment): ReactElement {\n if (segment.type === 'timeZoneName') {\n return createElement(\n 'span',\n {\n className: timeZoneStyle(),\n 'data-breeze-time-zone': '',\n 'data-type': segment.type,\n },\n segment.text,\n );\n }\n\n return createElement(AriaDateSegment, {\n className: segmentStyle(),\n segment,\n });\n}\n\n/** Renders React Aria segments without exposing their internal value objects. */\nexport function DateInputPart({\n className,\n ref,\n ...props\n}: Readonly<DateInputPartProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaDateInput,\n {\n ...props,\n className: inputStyle({ class: className }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaDateInput>,\n renderSegment as unknown as ReactNode,\n );\n}\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { DateField as AriaDateField } from 'react-aria-components/DateField';\nimport { tv } from 'tailwind-variants';\nimport {\n formatDateValue,\n parseDateValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { DateInputPart, type DateInputPartProps } from '../date/DateInput';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst rootStyle = tv({ base: 'flex min-w-0 flex-col gap-1.5' });\n\ntype NativeRootProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface SharedDateFieldRootProps extends NativeRootProps {\n /** Compound label, segmented input, description, and error parts. */\n children: ReactNode;\n /** Prevents focus and date editing. Defaults to `false`. */\n disabled?: boolean;\n /** Associates the hidden native date input with an external form. */\n form?: string;\n /** Hidden native date input ref used for form integration. */\n inputRef?: Ref<HTMLInputElement>;\n /** Exposes invalid state to the segmented input. Defaults to `false`. */\n invalid?: boolean;\n /** Returns whether a stable date string is unavailable. */\n isDateUnavailable?: (date: string) => boolean;\n /** Latest selectable `YYYY-MM-DD` date. */\n maxValue?: string;\n /** Earliest selectable `YYYY-MM-DD` date. */\n minValue?: string;\n /** Native form field name for the stable date string. */\n name?: string;\n /** Marks the date as required. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered date-field root. */\n ref?: Ref<HTMLDivElement>;\n}\n\ntype DateFieldState =\n | {\n /** Current controlled date, or `null` when empty. */\n value: string | null;\n /** Called with the next stable date string or `null`. */\n onChange: (value: string | null) => void;\n /** Excluded when the date is controlled. */\n defaultValue?: never;\n /** Mutable controlled state cannot be marked read-only. */\n readOnly?: false;\n }\n | {\n /** Current immutable date, or `null` when empty. */\n value: string | null;\n /** Prevents changes to the controlled date. */\n readOnly: true;\n /** Excluded when the date is controlled. */\n defaultValue?: never;\n /** Excluded because read-only dates cannot change. */\n onChange?: never;\n }\n | {\n /** Initial uncontrolled date, or `null` when empty. */\n defaultValue?: string | null;\n /** Called with the next stable date string or `null`. */\n onChange?: (value: string | null) => void;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n /** Excluded when the date is uncontrolled. */\n value?: never;\n };\n\n/** Props for controlled, uncontrolled, or read-only stable date state. */\nexport type DateFieldRootProps = SharedDateFieldRootProps & DateFieldState;\n/** Props for the visible date-field label. */\nexport type DateFieldLabelProps = TextFieldLabelProps;\n/** Props for the segmented date input. */\nexport type DateFieldInputProps = DateInputPartProps;\n/** Props for supporting date-field guidance. */\nexport type DateFieldDescriptionProps = TextFieldDescriptionProps;\n/** Props for a date-field validation message. */\nexport type DateFieldErrorProps = TextFieldErrorProps;\n\n/** Coordinates stable date strings with locale-aware editable segments. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n inputRef,\n invalid = false,\n isDateUnavailable,\n maxValue,\n minValue,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<DateFieldRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const forwardedInputRef = useForwardedRef(inputRef);\n\n return createElement(AriaDateField, {\n ...props,\n children,\n className: rootStyle({ class: className }),\n defaultValue: parseDateValue(defaultValue ?? null) ?? undefined,\n form,\n granularity: 'day',\n inputRef: forwardedInputRef,\n isDateUnavailable: isDateUnavailable\n ? (date: CalendarDate) => isDateUnavailable(date.toString())\n : undefined,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: parseDateValue(maxValue ?? null) ?? undefined,\n minValue: parseDateValue(minValue ?? null) ?? undefined,\n name,\n onChange: readOnly\n ? undefined\n : (date: CalendarDate | null) => onChange?.(formatDateValue(date)),\n ref: forwardedRef,\n value: value === undefined ? undefined : parseDateValue(value),\n } as unknown as ComponentProps<typeof AriaDateField>);\n}\n\n/**\n * Accessible compound date field with stable string values.\n *\n * @summary locale-aware segmented entry for one stable date\n */\nexport const DateField = {\n /** Supporting guidance associated with the date field. */\n Description: TextField.Description,\n /** Validation feedback associated with the date field. */\n Error: TextField.Error,\n /** Locale-aware editable date segments. */\n Input: DateInputPart,\n /** Visible label associated with the segmented input. */\n Label: TextField.Label,\n /** Stable date state, constraints, validation, and form root. */\n Root,\n};\n","import type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useCallback } from 'react';\nimport {\n Button as AriaButton,\n Calendar as AriaCalendar,\n Group as AriaGroup,\n Popover as AriaPopover,\n} from 'react-aria-components/DatePicker';\nimport { RangeCalendar as AriaRangeCalendar } from 'react-aria-components/DateRangePicker';\nimport { tv } from 'tailwind-variants';\nimport { CalendarIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n CalendarGridPart,\n CalendarHeaderPart,\n CalendarHeadingPart,\n CalendarNextButtonPart,\n CalendarPreviousButtonPart,\n} from './CalendarParts';\n\nconst groupStyle = tv({ base: 'flex items-stretch' });\nconst triggerStyle = tv({\n base: 'inline-flex min-h-11 items-center border border-l-0 border-[var(--breeze-border-strong)] px-3',\n});\nconst popoverStyle = tv({\n base: 'z-50 w-88 max-w-[calc(100vw-2rem)] border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-3 [box-shadow:0_8px_0_rgb(6_12_24_/_18%)]',\n});\nconst calendarStyle = tv({\n base: 'inline-flex w-full flex-col gap-2.5',\n});\n\n/** Supported logical picker popup placements. */\nexport type PickerPopoverPlacement =\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'top start'\n | 'top end'\n | 'bottom start'\n | 'bottom end';\n\n/** Props for a picker input-and-trigger group. */\nexport interface PickerGroupPartProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Segmented input and calendar trigger. */ children: ReactNode;\n /** Ref to the rendered group. */ ref?: Ref<HTMLDivElement>;\n}\n/** Props for a picker calendar trigger. */\nexport interface PickerTriggerPartProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'style'> {\n /** Visible trigger content. Defaults to the Breeze calendar icon. */ children?: ReactNode;\n /** Ref to the rendered trigger. */ ref?: Ref<HTMLButtonElement>;\n}\n/** Props for a picker calendar popover. */\nexport interface PickerPopoverPartProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Calendar content. */ children: ReactNode;\n /** Logical placement relative to the field trigger. */ placement?: PickerPopoverPlacement;\n /** Ref to the rendered popover. */ ref?: Ref<HTMLElement>;\n}\n/** Props for a Breeze-owned picker calendar. */\nexport interface PickerCalendarPartProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Ref to the rendered calendar. */ ref?: Ref<HTMLDivElement>;\n}\n\nexport function PickerGroupPart({\n children,\n className,\n ref,\n ...props\n}: Readonly<PickerGroupPartProps>): ReactElement {\n return createElement(\n AriaGroup,\n {\n ...props,\n className: groupStyle({ class: className }),\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaGroup>,\n children,\n );\n}\nexport function PickerTriggerPart({\n children,\n className,\n ref,\n ...props\n}: Readonly<PickerTriggerPartProps>): ReactElement {\n return createElement(\n AriaButton,\n {\n ...props,\n className: triggerStyle({ class: className }),\n ref: useForwardedRef(ref),\n } as unknown as ComponentProps<typeof AriaButton>,\n children === undefined ? createElement(CalendarIcon) : children,\n );\n}\nexport function PickerPopoverPart({\n children,\n className,\n dir,\n placement,\n ref,\n ...props\n}: Readonly<PickerPopoverPartProps>): ReactElement {\n const { direction } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const resolvedDirection = dir ?? direction;\n const popoverRef = useCallback(\n (element: HTMLElement | null) => {\n element?.setAttribute('dir', resolvedDirection);\n forwardedRef(element);\n },\n [forwardedRef, resolvedDirection],\n );\n\n return createElement(\n AriaPopover,\n {\n ...props,\n className: popoverStyle({ class: className }),\n placement,\n ref: popoverRef,\n } as ComponentProps<typeof AriaPopover>,\n children,\n );\n}\nconst calendarChildren = (): ReactElement[] => [\n createElement(\n CalendarHeaderPart,\n { className: '-mx-3 -mt-3 w-[calc(100%+1.5rem)]', key: 'header' },\n createElement(CalendarPreviousButtonPart, { key: 'previous' }),\n createElement(CalendarHeadingPart, { key: 'heading' }),\n createElement(CalendarNextButtonPart, { key: 'next' }),\n ),\n createElement(CalendarGridPart, { key: 'grid' }),\n];\nexport function PickerCalendarPart({\n className,\n ref,\n ...props\n}: Readonly<PickerCalendarPartProps>): ReactElement {\n return createElement(\n AriaCalendar,\n {\n ...props,\n className: calendarStyle({ class: className }),\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaCalendar>,\n calendarChildren(),\n );\n}\nexport function PickerRangeCalendarPart({\n className,\n ref,\n ...props\n}: Readonly<PickerCalendarPartProps>): ReactElement {\n return createElement(\n AriaRangeCalendar,\n {\n ...props,\n className: calendarStyle({ class: className }),\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaRangeCalendar>,\n calendarChildren(),\n );\n}\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useContext } from 'react';\nimport {\n DatePicker as AriaDatePicker,\n DatePickerStateContext,\n} from 'react-aria-components/DatePicker';\nimport { tv } from 'tailwind-variants';\nimport { CalendarIcon } from '../../icons';\nimport {\n formatDateValue,\n parseDateValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport formControlValue from '../../internal/styling/formControls';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { DateInputPart, type DateInputPartProps } from '../date/DateInput';\nimport {\n PickerCalendarPart,\n type PickerCalendarPartProps,\n PickerGroupPart,\n type PickerGroupPartProps,\n PickerPopoverPart,\n type PickerPopoverPartProps,\n PickerTriggerPart,\n type PickerTriggerPartProps,\n} from '../date/PickerParts';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst rootStyle = tv({ base: 'flex w-full min-w-0 flex-col gap-1.5' });\nconst groupStyle = tv({ base: 'w-full' });\nconst hiddenInputStyle = tv({ base: 'hidden' });\nconst triggerStyle = tv({\n base: 'w-full justify-between border-l bg-[var(--breeze-surface)] text-start text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] data-[hovered]:!border-[var(--breeze-primary)]',\n});\ninterface Shared\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'style'\n > {\n /** Label, hidden state input, long-date trigger, calendar popup, and guidance. */ children: ReactNode;\n /** Prevents focus and selection. */ disabled?: boolean;\n /** External native form id. */ form?: string;\n /** Exposes invalid state. */ invalid?: boolean;\n /** Returns whether a stable date is unavailable. */ isDateUnavailable?: (\n date: string,\n ) => boolean;\n /** Latest selectable date. */ maxValue?: string;\n /** Earliest selectable date. */ minValue?: string;\n /** Native form field name. */ name?: string;\n /** Marks the picker as required. */ required?: boolean;\n /** Ref to the rendered picker root. */ ref?: Ref<HTMLDivElement>;\n}\ntype State =\n | {\n /** Current controlled date, or `null` when empty. */ value:\n | string\n | null;\n /** Called with the next stable date or `null`. */ onChange: (\n value: string | null,\n ) => void;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Mutable controlled pickers cannot be read-only. */ readOnly?: false;\n }\n | {\n /** Current immutable date, or `null` when empty. */ value: string | null;\n /** Prevents date changes. */ readOnly: true;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Excluded because read-only pickers cannot change. */ onChange?: never;\n }\n | {\n /** Initial uncontrolled date, or `null` when empty. */ defaultValue?:\n | string\n | null;\n /** Called with the next stable date or `null`. */ onChange?: (\n value: string | null,\n ) => void;\n /** Uncontrolled pickers cannot be read-only. */ readOnly?: false;\n /** Excluded when uncontrolled. */ value?: never;\n };\n/** Props for controlled, uncontrolled, or read-only stable date picker state. */\nexport type DatePickerRootProps = Shared & State;\n/** Props for the visible label. */\nexport type DatePickerLabelProps = TextFieldLabelProps;\n/** Props for the hidden date-state input. */\nexport type DatePickerInputProps = DateInputPartProps;\n/** Props for the full-width calendar trigger group. */\nexport type DatePickerGroupProps = PickerGroupPartProps;\n/** Props for the visible long-date calendar trigger. */\nexport type DatePickerTriggerProps = PickerTriggerPartProps;\n/** Props for the calendar popover, positioned at `bottom end` by default. */\nexport type DatePickerPopoverProps = PickerPopoverPartProps;\n/** Props for the picker calendar. */\nexport type DatePickerCalendarProps = PickerCalendarPartProps;\n/** Props for supporting guidance. */\nexport type DatePickerDescriptionProps = TextFieldDescriptionProps;\n/** Props for validation feedback. */\nexport type DatePickerErrorProps = TextFieldErrorProps;\n\nexport function Group({\n className,\n ...props\n}: Readonly<DatePickerGroupProps>): ReactElement {\n return createElement(PickerGroupPart, {\n ...props,\n className: groupStyle({ class: className }),\n });\n}\n\nexport function Input({\n className,\n ...props\n}: Readonly<DatePickerInputProps>): ReactElement {\n return createElement(DateInputPart, {\n ...props,\n 'aria-hidden': true,\n className: hiddenInputStyle({ class: className }),\n hidden: true,\n inert: true,\n });\n}\n\nexport function Trigger({\n children,\n className,\n ...props\n}: Readonly<DatePickerTriggerProps>): ReactElement {\n const state = useContext(DatePickerStateContext);\n const { locale, messages, timeZone } = useBreezeContext();\n const resolvedTimeZone = timeZone ?? 'UTC';\n const dateValue = state?.value ?? null;\n const displayValue =\n dateValue === null\n ? null\n : new Intl.DateTimeFormat(locale, {\n day: 'numeric',\n month: 'long',\n timeZone: resolvedTimeZone,\n year: 'numeric',\n }).format(dateValue.toDate(resolvedTimeZone));\n const defaultChildren = [\n createElement(\n 'span',\n { key: 'value' },\n displayValue ?? messages.selectDate,\n ),\n createElement(CalendarIcon, {\n className: 'ms-3 text-[var(--breeze-primary)]',\n key: 'icon',\n size: '1.25rem',\n }),\n ];\n\n return createElement(\n PickerTriggerPart,\n {\n ...props,\n className: formControlValue({\n class: triggerStyle({ class: className }),\n }),\n },\n children === undefined ? defaultChildren : children,\n );\n}\n\nexport function Popover({\n placement = 'bottom end',\n ...props\n}: Readonly<DatePickerPopoverProps>): ReactElement {\n return createElement(PickerPopoverPart, {\n ...props,\n placement,\n });\n}\n\n/** Coordinates date entry with an optional calendar popover. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n invalid = false,\n isDateUnavailable,\n maxValue,\n minValue,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<DatePickerRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaDatePicker, {\n ...props,\n children,\n className: rootStyle({ class: className }),\n defaultValue: parseDateValue(defaultValue ?? null) ?? undefined,\n form,\n granularity: 'day',\n isDateUnavailable: isDateUnavailable\n ? (date: CalendarDate) => isDateUnavailable(date.toString())\n : undefined,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: parseDateValue(maxValue ?? null) ?? undefined,\n minValue: parseDateValue(minValue ?? null) ?? undefined,\n name,\n onChange: readOnly\n ? undefined\n : (date: CalendarDate | null) => onChange?.(formatDateValue(date)),\n ref: useForwardedRef(ref),\n value: value === undefined ? undefined : parseDateValue(value),\n } as unknown as ComponentProps<typeof AriaDatePicker>);\n}\n/**\n * Accessible full-width calendar-selection control with stable date strings.\n *\n * @summary long-date control with a locale-aware calendar popup\n */\nexport const DatePicker = {\n /** Locale-aware calendar. */ Calendar: PickerCalendarPart,\n /** Supporting guidance. */ Description: TextField.Description,\n /** Validation feedback. */ Error: TextField.Error,\n /** Hidden date-state input and trigger group. */ Group,\n /** Hidden date-state input. */ Input,\n /** Visible field label. */ Label: TextField.Label,\n /** Positioned calendar popup. */ Popover,\n /** Stable date state and constraints. */ Root,\n /** Visible long-date calendar popup trigger. */ Trigger,\n};\n","import type { ReactElement } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport { CalendarIcon } from '../../icons';\nimport { DateInputPart, type DateInputPartProps } from './DateInput';\nimport {\n PickerGroupPart,\n type PickerGroupPartProps,\n PickerTriggerPart,\n type PickerTriggerPartProps,\n} from './PickerParts';\n\nexport const pickerFieldRootStyle = tv({\n base: 'group/picker-field flex w-full min-w-0 flex-col gap-1.5',\n});\nconst pickerFieldGroupStyle = tv({\n base: 'flex min-h-11 w-full min-w-0 items-stretch border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 data-[focus-within]:outline-2 data-[focus-within]:outline-offset-[-2px] data-[focus-within]:outline-[var(--breeze-focus)] data-[hovered]:border-[var(--breeze-primary)] data-[invalid]:!border-[var(--breeze-danger)] group-data-[readonly]/picker-field:bg-[var(--breeze-surface-subtle)] group-data-[readonly]/picker-field:opacity-70',\n});\nconst pickerFieldInputStyle = tv({\n base: 'min-h-11 min-w-0 flex-1 border-0 bg-transparent px-2 font-[family-name:var(--breeze-font-body)] text-base font-normal leading-[1.4] data-[focus-within]:outline-none data-[invalid]:border-0 [&_[data-type]]:px-0 sm:px-3',\n});\nconst pickerFieldTriggerStyle = tv({\n base: 'min-h-11 shrink-0 border-0 bg-transparent px-2 text-[var(--breeze-primary)] outline-none data-[disabled]:cursor-not-allowed data-[focus-visible]:outline-none sm:px-3',\n});\n\nexport type PickerFieldGroupPartProps = PickerGroupPartProps;\nexport type PickerFieldInputPartProps = DateInputPartProps;\nexport type PickerFieldTriggerPartProps = PickerTriggerPartProps;\n\nexport function PickerFieldGroupPart({\n className,\n ...props\n}: Readonly<PickerFieldGroupPartProps>): ReactElement {\n return createElement(PickerGroupPart, {\n ...props,\n className: pickerFieldGroupStyle({ class: className }),\n });\n}\n\nexport function PickerFieldInputPart({\n className,\n ...props\n}: Readonly<PickerFieldInputPartProps>): ReactElement {\n return createElement(DateInputPart, {\n ...props,\n className: pickerFieldInputStyle({ class: className }),\n });\n}\n\nexport function PickerFieldTriggerPart({\n children,\n className,\n ...props\n}: Readonly<PickerFieldTriggerPartProps>): ReactElement {\n return createElement(\n PickerTriggerPart,\n {\n ...props,\n className: pickerFieldTriggerStyle({ class: className }),\n },\n children === undefined\n ? createElement(CalendarIcon, { size: '1.25rem' })\n : children,\n );\n}\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport {\n createElement,\n Fragment,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { DateRangePicker as AriaDateRangePicker } from 'react-aria-components/DateRangePicker';\nimport { tv } from 'tailwind-variants';\nimport { ArrowRightIcon } from '../../icons';\nimport {\n formatDateRangeValue,\n type InternalDateRange,\n parseDateRangeValue,\n parseDateValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { DateRangeValue } from '../../internal/types/date';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n PickerFieldGroupPart,\n type PickerFieldGroupPartProps,\n PickerFieldInputPart,\n type PickerFieldInputPartProps,\n pickerFieldRootStyle,\n PickerFieldTriggerPart,\n type PickerFieldTriggerPartProps,\n} from '../date/PickerFieldParts';\nimport {\n type PickerCalendarPartProps,\n PickerPopoverPart,\n type PickerPopoverPartProps,\n PickerRangeCalendarPart,\n} from '../date/PickerParts';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst separatorStyle = tv({\n base: 'inline-flex min-h-11 shrink-0 items-center justify-center px-0.5 text-[var(--breeze-ink-muted)] sm:px-1',\n});\n\ninterface Shared\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'style'\n > {\n /** Label, start/end inputs, trigger, range calendar, and guidance. */\n children: ReactNode;\n /** Allows ranges containing unavailable dates. */\n allowsNonContiguousRanges?: boolean;\n /** Prevents focus and editing. */\n disabled?: boolean;\n /** External native form id. */\n form?: string;\n /** Exposes invalid state. */\n invalid?: boolean;\n /** Returns whether a stable date is unavailable for an optional anchor. */\n isDateUnavailable?: (date: string, anchorDate: string | null) => boolean;\n /** Latest selectable date. */\n maxValue?: string;\n /** Earliest selectable date. */\n minValue?: string;\n /** Marks the range as required. */\n required?: boolean;\n /** Ref to the rendered picker root. */\n ref?: Ref<HTMLDivElement>;\n}\ntype FormNames =\n | {\n /** Native form field name for the inclusive range end. */\n endName: string;\n /** Native form field name for the inclusive range start. */\n startName: string;\n }\n | {\n /** End name is unavailable without a start name. */\n endName?: never;\n /** Start name is unavailable without an end name. */\n startName?: never;\n };\ntype State =\n | {\n /** Current controlled range, or `null` when empty. */\n value: DateRangeValue | null;\n /** Called with the next stable range or `null`. */\n onChange: (value: DateRangeValue | null) => void;\n /** Excluded when controlled. */\n defaultValue?: never;\n /** Mutable controlled pickers cannot be read-only. */\n readOnly?: false;\n }\n | {\n /** Current immutable range, or `null` when empty. */\n value: DateRangeValue | null;\n /** Prevents range changes. */\n readOnly: true;\n /** Excluded when controlled. */\n defaultValue?: never;\n /** Excluded because read-only pickers cannot change. */\n onChange?: never;\n }\n | {\n /** Initial uncontrolled range, or `null` when empty. */\n defaultValue?: DateRangeValue | null;\n /** Called with the next stable range or `null`. */\n onChange?: (value: DateRangeValue | null) => void;\n /** Uncontrolled pickers cannot be read-only. */\n readOnly?: false;\n /** Excluded when uncontrolled. */\n value?: never;\n };\n/** Props for controlled, uncontrolled, or read-only stable range state. */\nexport type DateRangePickerRootProps = Shared & FormNames & State;\n/** Props for the visible label. */\nexport type DateRangePickerLabelProps = TextFieldLabelProps;\n/** Props shared by the start and end segmented inputs. */\nexport type DateRangePickerInputProps = PickerFieldInputPartProps;\n/** Props for the coherent start-input, separator, end-input, and trigger group. */\nexport type DateRangePickerGroupProps = PickerFieldGroupPartProps;\n/** Props for the visual range separator. */\nexport interface DateRangePickerSeparatorProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Ref to the rendered visual separator. */\n ref?: Ref<HTMLSpanElement>;\n}\n/** Props for the calendar trigger. */\nexport type DateRangePickerTriggerProps = PickerFieldTriggerPartProps;\n/** Props for the range-calendar popover. */\nexport type DateRangePickerPopoverProps = PickerPopoverPartProps;\n/** Props for the range calendar. */\nexport type DateRangePickerCalendarProps = PickerCalendarPartProps;\n/** Props for supporting guidance. */\nexport type DateRangePickerDescriptionProps = TextFieldDescriptionProps;\n/** Props for validation feedback. */\nexport type DateRangePickerErrorProps = TextFieldErrorProps;\n\nexport function Group({\n ...props\n}: Readonly<DateRangePickerGroupProps>): ReactElement {\n return createElement(PickerFieldGroupPart, props);\n}\n\nexport function StartInput({\n className,\n ...props\n}: Readonly<DateRangePickerInputProps>): ReactElement {\n return createElement(PickerFieldInputPart, {\n ...props,\n className,\n slot: 'start',\n });\n}\n\nexport function EndInput({\n className,\n ...props\n}: Readonly<DateRangePickerInputProps>): ReactElement {\n return createElement(PickerFieldInputPart, {\n ...props,\n className,\n slot: 'end',\n });\n}\n\nexport function Separator({\n className,\n ref,\n ...props\n}: Readonly<DateRangePickerSeparatorProps>): ReactElement {\n return createElement(\n 'span',\n {\n ...props,\n 'aria-hidden': true,\n className: separatorStyle({ class: className }),\n ref: useForwardedRef(ref),\n },\n createElement(ArrowRightIcon, {\n className: 'rtl:rotate-180',\n size: '1rem',\n }),\n );\n}\n\nexport function Trigger({\n ...props\n}: Readonly<DateRangePickerTriggerProps>): ReactElement {\n return createElement(PickerFieldTriggerPart, props);\n}\n\n/** Coordinates start and end date entry with a range-calendar popover. */\nexport function Root({\n allowsNonContiguousRanges = false,\n children,\n className,\n defaultValue,\n disabled = false,\n endName,\n form,\n invalid = false,\n isDateUnavailable,\n maxValue,\n minValue,\n onChange,\n readOnly = false,\n ref,\n required = false,\n startName,\n value,\n ...props\n}: Readonly<DateRangePickerRootProps>): ReactElement {\n useBreezeContext();\n\n const controlled = value !== undefined;\n const defaultEnd = defaultValue?.end ?? null;\n const defaultStart = defaultValue?.start ?? null;\n const [uncontrolledValue, setUncontrolledValue] =\n useState<DateRangeValue | null>(defaultValue ?? null);\n const liveValue = controlled ? value : uncontrolledValue;\n const rootElement = useRef<HTMLDivElement | null>(null);\n const forwardedRef = useForwardedRef(ref);\n const assignRoot = useCallback(\n (element: HTMLDivElement | null) => {\n rootElement.current = element;\n forwardedRef(element);\n },\n [forwardedRef],\n );\n\n useEffect(() => {\n if (controlled) {\n return undefined;\n }\n\n const element = rootElement.current;\n const formElement = form\n ? element?.ownerDocument.getElementById(form)\n : element?.closest('form');\n\n const FormElement = element?.ownerDocument.defaultView?.HTMLFormElement;\n\n if (FormElement === undefined || !(formElement instanceof FormElement)) {\n return undefined;\n }\n\n const resetValue =\n defaultEnd === null || defaultStart === null\n ? null\n : { end: defaultEnd, start: defaultStart };\n const handleReset = () => setUncontrolledValue(resetValue);\n\n formElement.addEventListener('reset', handleReset);\n\n return () => formElement.removeEventListener('reset', handleReset);\n }, [controlled, defaultEnd, defaultStart, form]);\n\n const handleChange = (range: InternalDateRange | null) => {\n const nextValue = formatDateRangeValue(range);\n\n if (!controlled) {\n setUncontrolledValue(nextValue);\n }\n\n onChange?.(nextValue);\n };\n\n const rangeInputs =\n startName === undefined\n ? null\n : [\n createElement('input', {\n 'aria-hidden': true,\n 'data-breeze-range-input': 'start',\n disabled,\n form,\n key: 'start-input',\n name: startName,\n readOnly: true,\n type: 'hidden',\n value: liveValue?.start ?? '',\n }),\n createElement('input', {\n 'aria-hidden': true,\n 'data-breeze-range-input': 'end',\n disabled,\n form,\n key: 'end-input',\n name: endName,\n readOnly: true,\n type: 'hidden',\n value: liveValue?.end ?? '',\n }),\n ];\n\n return createElement(AriaDateRangePicker, {\n ...props,\n allowsNonContiguousRanges,\n children: createElement(Fragment, null, children, rangeInputs),\n className: pickerFieldRootStyle({ class: className }),\n form,\n isDateUnavailable: isDateUnavailable\n ? (date: CalendarDate, anchor: CalendarDate | null) =>\n isDateUnavailable(date.toString(), anchor?.toString() ?? null)\n : undefined,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: parseDateValue(maxValue ?? null) ?? undefined,\n minValue: parseDateValue(minValue ?? null) ?? undefined,\n onChange: readOnly ? undefined : handleChange,\n ref: assignRoot,\n value: parseDateRangeValue(liveValue),\n } as unknown as ComponentProps<typeof AriaDateRangePicker>);\n}\n\n/**\n * Accessible compound date-range picker with stable string values.\n *\n * @summary segmented start and end dates with a range-calendar popup\n */\nexport const DateRangePicker = {\n /** Range calendar. */ Calendar: PickerRangeCalendarPart,\n /** Supporting guidance. */ Description: TextField.Description,\n /** End-date segmented input. */ EndInput,\n /** Validation feedback. */ Error: TextField.Error,\n /** Coherent start-input, separator, end-input, and trigger control. */ Group,\n /** Visible field label. */ Label: TextField.Label,\n /** Positioned range-calendar popup. */ Popover: PickerPopoverPart,\n /** Stable range state and constraints. */ Root,\n /** Visual direction between the start and end inputs. */ Separator,\n /** Start-date segmented input. */ StartInput,\n /** Range-calendar popup trigger. */ Trigger,\n};\n","import type { ZonedDateTime } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createContext, createElement, useContext } from 'react';\nimport {\n DatePicker as AriaDatePicker,\n DatePickerStateContext,\n} from 'react-aria-components/DatePicker';\nimport { TimeField as AriaTimeField } from 'react-aria-components/TimeField';\nimport type { TimeValue } from 'react-stately/useTimeFieldState';\nimport { tv } from 'tailwind-variants';\nimport {\n formatDateTimeValue,\n parseDateTimeValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { DateInputPart } from '../date/DateInput';\nimport {\n PickerFieldGroupPart,\n type PickerFieldGroupPartProps,\n PickerFieldInputPart,\n type PickerFieldInputPartProps,\n pickerFieldRootStyle,\n PickerFieldTriggerPart,\n type PickerFieldTriggerPartProps,\n} from '../date/PickerFieldParts';\nimport {\n PickerCalendarPart,\n type PickerCalendarPartProps,\n PickerPopoverPart,\n type PickerPopoverPartProps,\n} from '../date/PickerParts';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst calendarSurfaceStyle = tv({\n base: 'flex w-full flex-col gap-3',\n});\nconst timeFieldStyle = tv({\n base: 'flex min-w-0 flex-col gap-1.5 border-t border-[var(--breeze-border)] pt-3',\n});\nconst timeInputStyle = tv({\n base: 'min-h-11 w-full text-base font-normal leading-[1.4]',\n});\n\ninterface DateTimePickerConfiguration {\n disabled: boolean;\n readOnly: boolean;\n}\n\nconst DateTimePickerConfigurationContext =\n createContext<DateTimePickerConfiguration | null>(null);\n\ninterface Shared\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'style'\n > {\n /** Label, segmented input, trigger, calendar popup, and guidance. */\n children: ReactNode;\n /** Prevents focus and editing. */\n disabled?: boolean;\n /** External native form id. */\n form?: string;\n /** Exposes invalid state. */\n invalid?: boolean;\n /** Latest selectable explicit-offset ISO instant. */\n maxValue?: string;\n /** Earliest selectable explicit-offset ISO instant. */\n minValue?: string;\n /** Native form field name. */\n name?: string;\n /** Marks the picker as required. */\n required?: boolean;\n /** Ref to the rendered picker root. */\n ref?: Ref<HTMLDivElement>;\n}\ntype State =\n | {\n /** Current controlled explicit-offset instant. */\n value: string | null;\n /** Called with the next explicit-offset instant. */\n onChange: (value: string | null) => void;\n /** Excluded when controlled. */\n defaultValue?: never;\n /** Mutable controlled pickers cannot be read-only. */\n readOnly?: false;\n }\n | {\n /** Current immutable explicit-offset instant. */\n value: string | null;\n /** Prevents changes. */\n readOnly: true;\n /** Excluded when controlled. */\n defaultValue?: never;\n /** Excluded because read-only pickers cannot change. */\n onChange?: never;\n }\n | {\n /** Initial uncontrolled explicit-offset instant. */\n defaultValue?: string | null;\n /** Called with the next explicit-offset instant. */\n onChange?: (value: string | null) => void;\n /** Uncontrolled state cannot be read-only. */\n readOnly?: false;\n /** Excluded when uncontrolled. */\n value?: never;\n };\n/** Props for stable explicit-offset date-time picker state. */\nexport type DateTimePickerRootProps = Shared & State;\n/** Props for the visible label. */\nexport type DateTimePickerLabelProps = TextFieldLabelProps;\n/** Props for the segmented input. */\nexport type DateTimePickerInputProps = PickerFieldInputPartProps;\n/** Props for the coherent segmented-input and trigger group. */\nexport type DateTimePickerGroupProps = PickerFieldGroupPartProps;\n/** Props for the calendar trigger. */\nexport type DateTimePickerTriggerProps = PickerFieldTriggerPartProps;\n/** Props for the calendar popover. */\nexport type DateTimePickerPopoverProps = PickerPopoverPartProps;\n/** Props for the complete date-and-time calendar surface. */\nexport type DateTimePickerCalendarProps = PickerCalendarPartProps;\n/** Props for supporting guidance. */\nexport type DateTimePickerDescriptionProps = TextFieldDescriptionProps;\n/** Props for validation feedback. */\nexport type DateTimePickerErrorProps = TextFieldErrorProps;\n\nfunction useDateTimePickerConfiguration(): DateTimePickerConfiguration {\n const configuration = useContext(DateTimePickerConfigurationContext);\n\n if (configuration === null) {\n throw new Error(\n 'DateTimePicker parts must be rendered within DateTimePicker.Root.',\n );\n }\n\n return configuration;\n}\n\nexport function Calendar({\n className,\n ref,\n ...props\n}: Readonly<DateTimePickerCalendarProps>): ReactElement {\n const state = useContext(DatePickerStateContext);\n const { disabled, readOnly } = useDateTimePickerConfiguration();\n const { messages } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n if (state === null) {\n throw new Error(\n 'DateTimePicker.Calendar must be rendered within DateTimePicker.Root.',\n );\n }\n\n const handleTimeChange = (time: TimeValue | null) => {\n if (time !== null) {\n state.setTimeValue(time);\n }\n };\n\n return createElement(\n 'div',\n {\n ...props,\n className: calendarSurfaceStyle({ class: className }),\n 'data-breeze-date-time-calendar': '',\n ref: forwardedRef,\n },\n createElement(PickerCalendarPart),\n createElement(\n AriaTimeField,\n {\n className: timeFieldStyle(),\n granularity: 'minute',\n isDisabled: disabled,\n isInvalid: state.isInvalid,\n isReadOnly: readOnly,\n onChange: disabled || readOnly ? undefined : handleTimeChange,\n value: state.timeValue,\n } as ComponentProps<typeof AriaTimeField>,\n createElement(TextField.Label, null, messages.selectTime),\n createElement(DateInputPart, {\n className: timeInputStyle(),\n }),\n ),\n );\n}\n\nexport function Popover({\n 'aria-label': ariaLabel,\n placement = 'bottom end',\n ...props\n}: Readonly<DateTimePickerPopoverProps>): ReactElement {\n const { messages } = useBreezeContext();\n\n return createElement(PickerPopoverPart, {\n ...props,\n 'aria-label': ariaLabel ?? messages.selectDateTime,\n placement,\n });\n}\n\n/** Coordinates explicit-offset instants with provider-zone display and behavior. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n invalid = false,\n maxValue,\n minValue,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<DateTimePickerRootProps>): ReactElement {\n const { timeZone = 'UTC' } = useBreezeContext();\n const configuration = { disabled, readOnly };\n\n return createElement(AriaDatePicker, {\n ...props,\n children: createElement(\n DateTimePickerConfigurationContext,\n { value: configuration },\n children,\n ),\n className: pickerFieldRootStyle({ class: className }),\n defaultValue:\n parseDateTimeValue(defaultValue ?? null, timeZone) ?? undefined,\n form,\n granularity: 'minute',\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: parseDateTimeValue(maxValue ?? null, timeZone) ?? undefined,\n minValue: parseDateTimeValue(minValue ?? null, timeZone) ?? undefined,\n name,\n onChange: readOnly\n ? undefined\n : (date: ZonedDateTime | null) => onChange?.(formatDateTimeValue(date)),\n ref: useForwardedRef(ref),\n value:\n value === undefined ? undefined : parseDateTimeValue(value, timeZone),\n } as unknown as ComponentProps<typeof AriaDatePicker>);\n}\n\n/**\n * Accessible compound date-time picker with stable explicit-offset values.\n *\n * @summary locale-aware instant selection with explicit-offset values\n */\nexport const DateTimePicker = {\n /** Complete provider-zone date and segmented-time selection surface. */\n Calendar,\n /** Supporting guidance. */ Description: TextField.Description,\n /** Validation feedback. */ Error: TextField.Error,\n /** Coherent segmented-input and trigger control. */ Group:\n PickerFieldGroupPart,\n /** Borderless locale-aware date and time segments. */ Input:\n PickerFieldInputPart,\n /** Visible field label. */ Label: TextField.Label,\n /** Positioned complete date-and-time popup. */ Popover,\n /** Stable instant state and constraints. */ Root,\n /** Integrated calendar popup trigger. */ Trigger: PickerFieldTriggerPart,\n};\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst descriptionListRoot = tv({\n base: 'm-0 grid gap-0 border-y border-[var(--breeze-border)]',\n});\n\nconst descriptionListItem = tv({\n base: 'grid min-w-0 gap-1 border-b border-[var(--breeze-border)] py-3 last:border-b-0 sm:grid-cols-[minmax(8rem,1fr)_minmax(0,2fr)] sm:gap-6',\n});\n\nconst descriptionListTerm = tv({\n base: 'm-0 font-[family-name:var(--breeze-font-display)] font-bold text-[var(--breeze-ink)]',\n});\n\nconst descriptionListDescription = tv({\n base: 'm-0 min-w-0 text-[var(--breeze-ink)]',\n});\n\n/** Props for the native description-list container. */\nexport interface DescriptionListRootProps\n extends Omit<HTMLAttributes<HTMLDListElement>, 'style'> {\n /** Ref to the rendered description list. */\n ref?: Ref<HTMLDListElement>;\n}\n\n/** Props for one visually grouped term-description pair. */\nexport interface DescriptionListItemProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Ref to the rendered pair container. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for a native description-list term. */\nexport interface DescriptionListTermProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Ref to the rendered term element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Props for the description associated with a term. */\nexport interface DescriptionListDescriptionProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Ref to the rendered description element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Renders a native description list that becomes two columns when space permits. */\nexport function Root({\n className,\n ref,\n ...props\n}: Readonly<DescriptionListRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('dl', {\n ...props,\n className: descriptionListRoot({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Visually groups one or more native terms with their descriptions. */\nexport function Item({\n className,\n ref,\n ...props\n}: Readonly<DescriptionListItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('div', {\n ...props,\n className: descriptionListItem({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders a native description-list term. */\nexport function Term({\n className,\n ref,\n ...props\n}: Readonly<DescriptionListTermProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('dt', {\n ...props,\n className: descriptionListTerm({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the native description associated with a preceding term. */\nexport function Description({\n className,\n ref,\n ...props\n}: Readonly<DescriptionListDescriptionProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('dd', {\n ...props,\n className: descriptionListDescription({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/**\n * Semantic compound primitive for term-description metadata.\n *\n * @summary responsive native term-description metadata\n */\nexport const DescriptionList = {\n /** Description associated with a term. */\n Description,\n /** Visual grouping for a term-description pair. */\n Item,\n /** Native description-list container. */\n Root,\n /** Native description-list term. */\n Term,\n};\n","import type { ReactElement, ReactNode } from 'react';\nimport { createElement } from 'react';\nimport { DialogTrigger as AriaDialogTrigger } from 'react-aria-components/Dialog';\nimport {\n SharedModalContent,\n type SharedModalContentProps,\n SharedOverlayClose,\n type SharedOverlayCloseProps,\n SharedOverlayDescription,\n type SharedOverlayDescriptionProps,\n SharedOverlayTitle,\n type SharedOverlayTitleProps,\n SharedOverlayTrigger,\n type SharedOverlayTriggerProps,\n} from '../../internal/react-aria/OverlayParts';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\ninterface DialogRootSharedProps {\n /** Trigger and content parts. */ children: ReactNode;\n}\ninterface ControlledDialogRootProps {\n /** Current open state. */ open: boolean;\n /** Called with the next open state. */ onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\ninterface ReadOnlyDialogRootProps {\n /** Current immutable open state. */ open: boolean;\n /** Marks controlled state as intentionally immutable. */ readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\ninterface UncontrolledDialogRootProps {\n /** Initial open state. Defaults to `false`. */ defaultOpen?: boolean;\n /** Called with the next open state. */ onOpenChange?: (\n open: boolean,\n ) => void;\n open?: never;\n readOnly?: false;\n}\n/** Props for controlled, read-only, or uncontrolled dialog state. */\nexport type DialogRootProps = DialogRootSharedProps &\n (\n | ControlledDialogRootProps\n | ReadOnlyDialogRootProps\n | UncontrolledDialogRootProps\n );\n/** Props for the dialog trigger action. */ export type DialogTriggerProps =\n SharedOverlayTriggerProps;\n/** Props for modal dialog content. */ export interface DialogContentProps\n extends Omit<SharedModalContentProps, 'modalState'> {\n /** Allows pointer dismissal outside the dialog. Defaults to `true`. */ dismissible?: boolean;\n /** Prevents Escape dismissal. Defaults to `false`. */ keyboardDismissDisabled?: boolean;\n}\n/** Props for the required accessible dialog title. */ export type DialogTitleProps =\n SharedOverlayTitleProps;\n/** Props for the required accessible dialog description. */ export type DialogDescriptionProps =\n SharedOverlayDescriptionProps;\n/** Props for a semantic dialog close action. */ export type DialogCloseProps =\n SharedOverlayCloseProps;\n\n/** Coordinates dialog trigger, open state, focus, and restoration. */\nexport function Root({\n defaultOpen,\n onOpenChange,\n open,\n readOnly: _readOnly,\n ...props\n}: Readonly<DialogRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaDialogTrigger, {\n ...props,\n defaultOpen,\n isOpen: open,\n onOpenChange,\n });\n}\n\n/**\n * Accessible compound modal dialog primitive.\n *\n * @summary modal content with focus containment and restoration\n */\nexport const Dialog = {\n /** Semantic action that closes the dialog and restores trigger focus. */\n Close: SharedOverlayClose,\n /** Modal surface, focus scope, backdrop, and dismissal boundary. */\n Content: SharedModalContent,\n /** Required accessible dialog description. */\n Description: SharedOverlayDescription,\n /** Controlled, read-only, or uncontrolled open-state coordinator. */\n Root,\n /** Required accessible dialog title. */\n Title: SharedOverlayTitle,\n /** Semantic action that opens the dialog. */\n Trigger: SharedOverlayTrigger,\n};\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { Disclosure as AriaDisclosure } from 'react-aria-components/Disclosure';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n SharedDisclosurePanel,\n type SharedDisclosurePanelProps,\n SharedDisclosureTrigger,\n type SharedDisclosureTriggerProps,\n} from '../../internal/react-aria/DisclosureParts';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst disclosureRoot = tv({\n base: 'border border-[var(--breeze-border)] bg-[var(--breeze-surface)]',\n});\n\ntype DisclosureRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'onChange' | 'style'\n>;\n\ninterface DisclosureRootSharedProps extends DisclosureRootNativeProps {\n /** Trigger and panel parts. */\n children: ReactNode;\n /** Prevents the trigger from changing state. Defaults to `false`. */\n disabled?: boolean;\n /** Ref to the rendered disclosure root. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledDisclosureRootProps {\n /** Current expanded state. */\n open: boolean;\n /** Called with the next expanded state. */\n onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyDisclosureRootProps {\n /** Current immutable expanded state. */\n open: boolean;\n /** Marks controlled state as intentionally immutable. */\n readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\n\ninterface UncontrolledDisclosureRootProps {\n /** Initial expanded state. Defaults to `false`. */\n defaultOpen?: boolean;\n /** Called with the next expanded state. */\n onOpenChange?: (open: boolean) => void;\n open?: never;\n readOnly?: false;\n}\n\n/** Props for controlled, read-only, or uncontrolled disclosure state. */\nexport type DisclosureRootProps = DisclosureRootSharedProps &\n (\n | ControlledDisclosureRootProps\n | ReadOnlyDisclosureRootProps\n | UncontrolledDisclosureRootProps\n );\n\n/** Props for the disclosure heading button. */\nexport type DisclosureTriggerProps = SharedDisclosureTriggerProps;\n\n/** Props for the collapsible disclosure content. */\nexport type DisclosurePanelProps = SharedDisclosurePanelProps;\n\n/** Coordinates the trigger and collapsible panel state. */\nexport function Root({\n className,\n defaultOpen,\n disabled = false,\n onOpenChange,\n open,\n readOnly: _readOnly,\n ref,\n ...props\n}: Readonly<DisclosureRootProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaDisclosure, {\n ...props,\n className: disclosureRoot({ class: className }),\n defaultExpanded: defaultOpen,\n isDisabled: disabled,\n isExpanded: open,\n onExpandedChange: onOpenChange,\n ref: useForwardedRef(ref),\n });\n}\n\n/**\n * Reveals supporting content from a labelled trigger while preserving controlled,\n * read-only, and uncontrolled state ownership.\n *\n * @summary collapsible supporting content with accessible trigger semantics\n */\nexport const Disclosure = {\n /** Collapsible panel content. */\n Panel: SharedDisclosurePanel,\n /** State and semantic root. */\n Root,\n /** Heading button that toggles the panel. */\n Trigger: SharedDisclosureTrigger,\n};\n","import type {\n FieldsetHTMLAttributes,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport {\n createContext,\n createElement,\n useContext,\n useId,\n useMemo,\n} from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst fieldsetRoot = tv({\n base: 'm-0 flex min-w-0 flex-col gap-3 border-0 p-0 disabled:opacity-70',\n});\n\nconst fieldsetLegend = tv({\n base: 'mb-1 p-0 font-[family-name:var(--breeze-font-display)] text-base font-bold text-[var(--breeze-ink)]',\n});\n\nconst fieldsetDescription = tv({\n base: 'text-sm text-[var(--breeze-ink-soft)]',\n});\n\nconst fieldsetError = tv({\n base: 'text-sm font-medium text-[var(--breeze-danger)]',\n});\n\ninterface FieldsetContextValue {\n descriptionId: string;\n errorId: string;\n}\n\nconst FieldsetContext = createContext<FieldsetContextValue | null>(null);\n\nfunction useFieldsetContext(): FieldsetContextValue {\n const context = useContext(FieldsetContext);\n\n if (context === null) {\n throw new globalThis.Error(\n 'Fieldset parts must be rendered within Fieldset.Root.',\n );\n }\n\n return context;\n}\n\n/** Props for a native group of related form controls. */\nexport interface FieldsetRootProps\n extends Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'style'> {\n /** Legend, description, error, and related controls. */\n children: ReactNode;\n /** Exposes invalid group state to assistive technology and error association. Defaults to `false`. */\n invalid?: boolean;\n /** Ref to the rendered fieldset. */\n ref?: Ref<HTMLFieldSetElement>;\n}\n\n/** Props for the native fieldset legend. */\nexport interface FieldsetLegendProps\n extends Omit<HTMLAttributes<HTMLLegendElement>, 'style'> {\n /** Persistent group name. */\n children: ReactNode;\n /** Ref to the rendered legend. */\n ref?: Ref<HTMLLegendElement>;\n}\n\n/** Props for supporting text associated with the fieldset. */\nexport interface FieldsetDescriptionProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'id' | 'style'> {\n /** Supporting guidance for the control group. */\n children: ReactNode;\n /** Ref to the rendered description. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Props for an accessible fieldset validation message. */\nexport interface FieldsetErrorProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'id' | 'style'> {\n /** Validation message for the control group. */\n children: ReactNode;\n /** Ref to the rendered error message. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Renders a native form-control group with associated compound guidance. */\nexport function Root({\n 'aria-describedby': ariaDescribedBy,\n children,\n className,\n invalid = false,\n ref,\n ...props\n}: Readonly<FieldsetRootProps>): ReactElement {\n useBreezeContext();\n\n const generatedId = useId();\n const descriptionId = `${generatedId}-description`;\n const errorId = `${generatedId}-error`;\n const forwardedRef = useForwardedRef(ref);\n const contextValue = useMemo(\n () => ({ descriptionId, errorId }),\n [descriptionId, errorId],\n );\n const describedBy = [\n ariaDescribedBy,\n descriptionId,\n invalid ? errorId : undefined,\n ]\n .filter(Boolean)\n .join(' ');\n\n return createElement(\n FieldsetContext.Provider,\n { value: contextValue },\n createElement(\n 'fieldset',\n {\n ...props,\n 'aria-describedby': describedBy,\n 'aria-invalid': invalid || undefined,\n className: fieldsetRoot({ class: className }),\n ref: forwardedRef,\n },\n children,\n ),\n );\n}\n\n/** Renders the native accessible name for a Fieldset. */\nexport function Legend({\n className,\n ref,\n ...props\n}: Readonly<FieldsetLegendProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('legend', {\n ...props,\n className: fieldsetLegend({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders supporting guidance associated with a Fieldset. */\nexport function Description({\n className,\n ref,\n ...props\n}: Readonly<FieldsetDescriptionProps>): ReactElement {\n const { descriptionId } = useFieldsetContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('p', {\n ...props,\n className: fieldsetDescription({ class: className }),\n id: descriptionId,\n ref: forwardedRef,\n });\n}\n\n/** Renders a validation message associated with an invalid Fieldset. */\nfunction ErrorMessage({\n className,\n ref,\n ...props\n}: Readonly<FieldsetErrorProps>): ReactElement {\n const { errorId } = useFieldsetContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('p', {\n ...props,\n className: fieldsetError({ class: className }),\n id: errorId,\n ref: forwardedRef,\n });\n}\n\nexport { ErrorMessage as Error };\n\n/**\n * Groups related form controls with native fieldset and legend semantics plus\n * associated guidance and group-level validation feedback.\n *\n * @summary native form-control group with accessible compound guidance\n */\nexport const Fieldset = {\n /** Supporting guidance associated with the group. */\n Description,\n /** Validation message associated with an invalid group. */\n Error: ErrorMessage,\n /** Persistent native group name. */\n Legend,\n /** Native fieldset and accessibility root. */\n Root,\n};\n","import { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport {\n gapClasses,\n type LayoutElementProps,\n type ResponsiveSpace,\n} from '../../internal/styling/layout';\nimport {\n resolveResponsiveClasses,\n type ResponsiveValue,\n} from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\ntype GridColumns = 1 | 2 | 3 | 4 | 6 | 12;\n\nconst columnClasses = {\n base: {\n 1: 'grid-cols-1',\n 12: 'grid-cols-12',\n 2: 'grid-cols-2',\n 3: 'grid-cols-3',\n 4: 'grid-cols-4',\n 6: 'grid-cols-6',\n },\n lg: {\n 1: 'lg:grid-cols-1',\n 12: 'lg:grid-cols-12',\n 2: 'lg:grid-cols-2',\n 3: 'lg:grid-cols-3',\n 4: 'lg:grid-cols-4',\n 6: 'lg:grid-cols-6',\n },\n md: {\n 1: 'md:grid-cols-1',\n 12: 'md:grid-cols-12',\n 2: 'md:grid-cols-2',\n 3: 'md:grid-cols-3',\n 4: 'md:grid-cols-4',\n 6: 'md:grid-cols-6',\n },\n sm: {\n 1: 'sm:grid-cols-1',\n 12: 'sm:grid-cols-12',\n 2: 'sm:grid-cols-2',\n 3: 'sm:grid-cols-3',\n 4: 'sm:grid-cols-4',\n 6: 'sm:grid-cols-6',\n },\n} as const;\n\nconst grid = tv({\n base: 'grid',\n defaultVariants: {\n align: 'stretch',\n template: 'equal',\n },\n variants: {\n align: {\n center: 'items-center',\n end: 'items-end',\n start: 'items-start',\n stretch: 'items-stretch',\n },\n template: {\n equal: '',\n 'field-control-action':\n 'grid-cols-[minmax(0,1fr)_auto_auto] [&>:last-child]:size-11',\n },\n },\n});\n\n/** Canonical unequal-track arrangements for reusable form rows. */\nexport type GridTemplate = 'field-control-action';\n\n/** Props for a bounded responsive column layout. */\nexport interface GridProps extends LayoutElementProps {\n /** Alignment of children within their grid cells. Defaults to `stretch`. */\n align?: 'start' | 'center' | 'end' | 'stretch';\n /** Responsive column count. Defaults to one column. */\n columns?: ResponsiveValue<GridColumns>;\n /** Responsive row and column gap. Defaults to `lg`. */\n gap?: ResponsiveSpace;\n /** Canonical unequal tracks. Excludes equal `columns` while active. */\n template?: GridTemplate;\n}\n\n/**\n * Arranges related content in bounded responsive columns while preserving the\n * authored source order across every breakpoint.\n *\n * @summary bounded responsive columns with stable source order\n */\nexport function Grid({\n align,\n className,\n columns = 1,\n gap = 'lg',\n template,\n ...props\n}: Readonly<GridProps>) {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: grid({\n align,\n class: [\n template === undefined\n ? resolveResponsiveClasses(columns, columnClasses)\n : undefined,\n resolveResponsiveClasses(gap, gapClasses),\n className,\n ],\n template: template ?? 'equal',\n }),\n });\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n GridList as AriaGridList,\n GridListHeader as AriaGridListHeader,\n GridListItem as AriaGridListItem,\n GridListLoadMoreItem as AriaGridListLoadMoreItem,\n GridListSection as AriaGridListSection,\n} from 'react-aria-components/GridList';\nimport { tv } from 'tailwind-variants';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useLoadMoreHandler from '../../internal/collections/useLoadMoreHandler';\nimport VirtualizedCollection, {\n collectionViewportStyle,\n} from '../../internal/collections/VirtualizedCollection';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n CollectionSelection,\n CollectionVirtualization,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst gridListRoot = tv({\n base: 'grid min-w-0 gap-2 outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n defaultVariants: {\n layout: 'stack',\n virtualized: false,\n },\n variants: {\n layout: {\n grid: 'grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))]',\n stack: 'grid-cols-1',\n },\n virtualized: {\n false: '',\n true: 'overflow-auto',\n },\n },\n});\n\nconst gridListItem = tv({\n base: 'flex min-h-11 min-w-0 items-center border border-b-2 border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] px-4 py-3 text-[var(--breeze-ink)] outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[selected]:border-[var(--breeze-primary)] data-[selected]:bg-[var(--breeze-primary-soft)] forced-colors:data-[selected]:border-[Highlight]',\n});\n\nconst gridListSection = tv({ base: 'grid gap-2' });\n\nconst gridListHeader = tv({\n base: 'font-[family-name:var(--breeze-font-display)] text-base font-bold text-[var(--breeze-ink)]',\n});\n\nconst gridListLoadMore = tv({\n base: 'flex min-h-11 items-center justify-center px-4 py-3 text-sm text-[var(--breeze-ink-muted)]',\n});\n\ninterface GridListVirtualizationLayout {\n /** Maximum responsive grid column count. Defaults to the available width. */\n maximumColumns?: number;\n /** Minimum grid item width in pixels. Defaults to `224`. */\n minimumItemWidth?: number;\n}\n\n/** Breeze virtualization configuration with optional responsive grid sizing. */\nexport type GridListVirtualization = CollectionVirtualization &\n GridListVirtualizationLayout;\n\ntype GridListRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface GridListRootSharedProps extends GridListRootNativeProps {\n /** Keys whose items cannot receive focus, selection, or actions. */\n disabledKeys?: Iterable<CollectionKey>;\n /** Content displayed when the collection has no items. */\n emptyContent?: ReactNode;\n /** Arranges items as one stack or a responsive wrapping grid. Defaults to `stack`. */\n layout?: 'stack' | 'grid';\n /** Enables multiple selection. Defaults to `false`. */\n multiple?: boolean;\n /** Primary arrow-key navigation axis. Defaults to `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered grid element. */\n ref?: Ref<HTMLDivElement>;\n /** Optional fixed- or variable-height windowing configuration. */\n virtualization?: GridListVirtualization;\n}\n\ninterface ControlledGridListRootProps {\n /** Current selected keys. */\n selection: CollectionSelection;\n /** Called with the next selected keys. */\n onSelectionChange: (selection: CollectionSelection) => void;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Controlled mutable state cannot be marked read-only. */\n readOnly?: false;\n}\n\ninterface ReadOnlyGridListRootProps {\n /** Current immutable selected keys. */\n selection: CollectionSelection;\n /** Marks controlled selection as intentionally immutable. */\n readOnly: true;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n}\n\ninterface UncontrolledGridListRootProps {\n /** Initial selected keys. Defaults to an empty selection. */\n defaultSelection?: CollectionSelection;\n /** Called with the next selected keys. */\n onSelectionChange?: (selection: CollectionSelection) => void;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n /** Excluded when selection is uncontrolled. */\n selection?: never;\n}\n\n/** Props for a static or generic, controlled, read-only, or uncontrolled grid list. */\nexport type GridListRootProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = GridListRootSharedProps &\n CollectionContentProps<Item> &\n (\n | ControlledGridListRootProps\n | ReadOnlyGridListRootProps\n | UncontrolledGridListRootProps\n );\n\n/** Props for one interactive grid-list row. */\nexport interface GridListItemProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Visible row content, including any independently focusable controls. */\n children: ReactNode;\n /** Prevents focus, selection, and actions for this row. Defaults to `false`. */\n disabled?: boolean;\n /** Stable string or number row key. */\n id: CollectionKey;\n /** Called with this row key when its action is invoked. */\n onAction?: (key: CollectionKey) => void;\n /** Ref to the rendered row. */\n ref?: Ref<HTMLDivElement>;\n /** Plain-text representation used for typeahead and accessibility. */\n textValue: string;\n}\n\n/** Props for one static grid-list section. */\nexport interface GridListSectionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'style'> {\n /** Section header followed by keyed grid-list items. */\n children: ReactNode;\n /** Stable string or number section key. */\n id: CollectionKey;\n /** Ref to the rendered section. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for a visible grid-list section heading. */\nexport interface GridListHeaderProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Ref to the rendered section heading. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for a grid-list loading row and load-more sentinel. */\nexport interface GridListLoadMoreProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Visible loading-row content. */\n children: ReactNode;\n /** Shows the loading row and suppresses duplicate requests. Defaults to `false`. */\n loading?: boolean;\n /** Called once when more consumer-owned items should be requested. */\n onLoadMore: () => void | Promise<void>;\n /** Trigger distance as a proportion of the scroll viewport. Defaults to `1`. */\n offset?: number;\n /** Ref to the rendered loading row. */\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction normaliseSelection(\n selection: 'all' | Set<CollectionKey>,\n): CollectionSelection {\n return selection === 'all' ? 'all' : [...selection];\n}\n\n/** Coordinates grid semantics, focus, typeahead, row actions, and selection. */\nexport function Root<Item extends BreezeCollectionItem>({\n children,\n className,\n defaultSelection,\n disabledKeys,\n emptyContent,\n items,\n layout = 'stack',\n multiple = false,\n onSelectionChange,\n orientation = 'vertical',\n readOnly = false,\n ref,\n selection,\n virtualization,\n ...props\n}: Readonly<GridListRootProps<Item>>): ReactElement {\n const { direction } = useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n\n const gridList = createElement(AriaGridList, {\n ...props,\n 'aria-readonly': readOnly || undefined,\n children,\n className: gridListRoot({\n class: className,\n layout,\n virtualized: virtualization !== undefined,\n }),\n 'data-virtualized': virtualization === undefined ? undefined : 'true',\n defaultSelectedKeys: defaultSelection,\n disabledKeys,\n items,\n layout,\n onSelectionChange: (nextSelection: 'all' | Set<CollectionKey>) =>\n onSelectionChange?.(normaliseSelection(nextSelection)),\n orientation,\n ref: forwardedRef,\n renderEmptyState: () => resolvedEmptyContent,\n selectedKeys: selection,\n selectionMode: multiple ? 'multiple' : 'single',\n style: collectionViewportStyle(virtualization),\n } as unknown as ComponentProps<typeof AriaGridList>);\n\n return virtualization === undefined\n ? gridList\n : createElement(\n VirtualizedCollection,\n {\n configuration: virtualization,\n direction,\n kind: layout === 'grid' ? 'grid' : 'list',\n maximumColumns: virtualization.maximumColumns,\n minimumItemWidth: virtualization.minimumItemWidth,\n orientation,\n },\n gridList,\n );\n}\n\n/** Renders one keyed interactive row within a grid list. */\nexport function Item({\n className,\n disabled = false,\n id,\n onAction,\n ref,\n textValue,\n ...props\n}: Readonly<GridListItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaGridListItem, {\n ...props,\n className: gridListItem({ class: className }),\n id,\n isDisabled: disabled,\n onAction: onAction === undefined ? undefined : () => onAction(id),\n ref: forwardedRef,\n textValue,\n });\n}\n\n/** Groups related grid-list rows under a stable collection key. */\nexport function Section({\n className,\n ref,\n ...props\n}: Readonly<GridListSectionProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaGridListSection, {\n ...props,\n className: gridListSection({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the visible heading for a grid-list section. */\nexport function Header({\n className,\n ref,\n ...props\n}: Readonly<GridListHeaderProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaGridListHeader, {\n ...props,\n className: gridListHeader({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders a loading row and deduplicated intersection sentinel. */\nexport function LoadMore({\n className,\n loading = false,\n offset = 1,\n onLoadMore,\n ref,\n ...props\n}: Readonly<GridListLoadMoreProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const handleLoadMore = useLoadMoreHandler({ loading, onLoadMore });\n\n return createElement(AriaGridListLoadMoreItem, {\n ...props,\n className: gridListLoadMore({ class: className }),\n isLoading: loading,\n onLoadMore: handleLoadMore,\n ref: forwardedRef,\n scrollOffset: offset,\n });\n}\n\n/**\n * Presents selectable interactive rows that may contain embedded controls,\n * static sections, responsive grids, or application-configured virtualization.\n *\n * @summary accessible selectable rows with embedded controls\n */\nexport const GridList = {\n /** Visible section heading. */\n Header,\n /** One keyed interactive row. */\n Item,\n /** Loading row and deduplicated load-more sentinel. */\n LoadMore,\n /** Grid semantics, focus, actions, and selection root. */\n Root,\n /** Stable grouping for related rows. */\n Section,\n};\n","import { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport {\n gapClasses,\n type LayoutElementProps,\n type ResponsiveSpace,\n} from '../../internal/styling/layout';\nimport { resolveResponsiveClasses } from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst inline = tv({\n base: 'flex flex-row',\n defaultVariants: {\n align: 'center',\n justify: 'start',\n wrap: true,\n },\n variants: {\n align: {\n baseline: 'items-baseline',\n center: 'items-center',\n end: 'items-end',\n start: 'items-start',\n stretch: 'items-stretch',\n },\n justify: {\n around: 'justify-around',\n between: 'justify-between',\n center: 'justify-center',\n end: 'justify-end',\n evenly: 'justify-evenly',\n start: 'justify-start',\n },\n wrap: {\n false: 'flex-nowrap',\n true: 'flex-wrap',\n },\n },\n});\n\n/** Props for a horizontal layout of related content. */\nexport interface InlineProps extends LayoutElementProps {\n /** Cross-axis alignment. Defaults to `center`. */\n align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';\n /** Responsive space between children. Defaults to `md`. */\n gap?: ResponsiveSpace;\n /** Main-axis distribution. Defaults to `start`. */\n justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';\n /** Whether children may flow onto additional rows. Defaults to `true`. */\n wrap?: boolean;\n}\n\n/**\n * Arranges related content along the inline axis with bounded alignment,\n * distribution, responsive spacing, and wrapping controls.\n *\n * @summary horizontal layout with responsive spacing and wrapping\n */\nexport function Inline({\n align,\n className,\n gap = 'md',\n justify,\n wrap,\n ...props\n}: Readonly<InlineProps>) {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: inline({\n align,\n class: [resolveResponsiveClasses(gap, gapClasses), className],\n justify,\n wrap,\n }),\n });\n}\n","import type {\n ComponentProps,\n MouseEvent,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Link as AriaLink } from 'react-aria-components/Link';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport action from '../../internal/styling/actions';\nimport type {\n ControlSize,\n VisualAppearance,\n VisualVariant,\n} from '../../internal/styling/visual';\nimport type { NativeLinkProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for navigation presented with button emphasis. */\nexport interface LinkButtonProps extends NativeLinkProps {\n /** Visual emphasis treatment. Defaults to `solid`. */\n appearance?: VisualAppearance;\n /** Link content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents navigation. Defaults to `false`. */\n disabled?: boolean;\n /** Prompts download instead of navigation when provided. */\n download?: boolean | string;\n /** Native destination URL. */\n href: string;\n /** Ref to the rendered anchor. */\n ref?: Ref<HTMLAnchorElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n /** Semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\nfunction isLocalNavigation(\n href: string,\n target: string | undefined,\n download: LinkButtonProps['download'],\n): boolean {\n return (\n href.startsWith('/') &&\n !href.startsWith('//') &&\n download !== true &&\n typeof download !== 'string' &&\n (target === undefined || target === '_self')\n );\n}\n\n/**\n * Navigates like a link while using the visual hierarchy of an action button.\n *\n * @summary router-neutral navigation with canonical button emphasis\n */\nexport function LinkButton({\n appearance,\n children,\n className,\n disabled = false,\n download,\n href,\n ref,\n size,\n target,\n variant,\n ...props\n}: Readonly<LinkButtonProps>): ReactElement {\n const { router } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const useRouter =\n router !== undefined && isLocalNavigation(href, target, download);\n const routerClick = {\n onClick: (event: MouseEvent<Element>) => {\n if (\n useRouter &&\n event.button === 0 &&\n !event.altKey &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.shiftKey\n ) {\n event.preventDefault();\n router.navigate(href);\n }\n },\n };\n\n return createElement(\n AriaLink,\n {\n ...props,\n ...routerClick,\n className: action({\n appearance,\n class: className,\n size,\n variant,\n }),\n download,\n href,\n isDisabled: disabled,\n ref: forwardedRef,\n render: (renderProps) => {\n if (disabled || !('href' in renderProps)) {\n return createElement('span', {\n ...renderProps,\n href: undefined,\n } as unknown as ComponentProps<'span'>);\n }\n\n return createElement('a', {\n ...props,\n ...renderProps,\n });\n },\n target,\n } as ComponentProps<typeof AriaLink>,\n children,\n );\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst listRoot = tv({\n base: 'm-0 grid gap-2 ps-6 text-[var(--breeze-ink)] marker:text-[var(--breeze-ink-muted)]',\n defaultVariants: {\n ordered: false,\n },\n variants: {\n ordered: {\n false: 'list-disc',\n true: 'list-decimal',\n },\n },\n});\n\nconst listItem = tv({ base: 'min-w-0 ps-1' });\n\n/** Props for a native ordered or unordered content list. */\nexport interface ListRootProps\n extends Omit<HTMLAttributes<HTMLOListElement | HTMLUListElement>, 'style'> {\n /** Renders an ordered list when true and an unordered list otherwise. Defaults to `false`. */\n ordered?: boolean;\n /** Ref to the rendered ordered or unordered list element. */\n ref?: Ref<HTMLOListElement | HTMLUListElement>;\n}\n\n/** Props for one semantic content-list item. */\nexport interface ListItemProps\n extends Omit<HTMLAttributes<HTMLLIElement>, 'style'> {\n /** Ref to the rendered list item. */\n ref?: Ref<HTMLLIElement>;\n}\n\n/** Renders a native ordered or unordered list without interactive collection behaviour. */\nexport function Root({\n className,\n ordered = false,\n ref,\n ...props\n}: Readonly<ListRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(ordered ? 'ol' : 'ul', {\n ...props,\n className: listRoot({ class: className, ordered }),\n ref: forwardedRef,\n });\n}\n\n/** Renders one native list item. */\nexport function Item({\n className,\n ref,\n ...props\n}: Readonly<ListItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('li', {\n ...props,\n className: listItem({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/**\n * Semantic ordered or unordered content list with no selection behaviour.\n *\n * @summary native ordered and unordered lists for structured content\n */\nexport const List = {\n /** One native list item. */\n Item,\n /** Ordered or unordered native list container. */\n Root,\n};\n","import type { HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst logo = tv({\n base: 'inline-flex items-center',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'text-2xl',\n md: 'text-xl',\n sm: 'text-base',\n },\n },\n});\n\n/** Props for the canonical Motech Development mark. */\nexport interface LogoProps\n extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n | 'aria-hidden'\n | 'aria-label'\n | 'aria-labelledby'\n | 'children'\n | 'color'\n | 'style'\n > {\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical logo size. Defaults to `md`. */\n size?: 'sm' | 'md' | 'lg';\n}\n\n/**\n * Renders the canonical Motech Development mark without application-owned text.\n *\n * @summary canonical accessible Motech Development brand mark\n */\nexport function Logo({ className, ref, size, ...props }: Readonly<LogoProps>) {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n 'aria-label': 'Motech Development',\n className: logo({\n class: className,\n size,\n }),\n ref: forwardedRef,\n role: 'img',\n },\n <svg\n aria-hidden=\"true\"\n className=\"h-[1.2em] w-[1.04em]\"\n viewBox=\"0 0 345.21 398.61\"\n >\n <polygon\n fill=\"var(--breeze-brand-mark)\"\n points=\"172.6 199.31 57.53 132.87 57.53 332.18 0 298.96 0 99.65 172.6 0 345.21 99.65 345.21 298.96 287.67 332.18 287.67 132.87 172.6 199.31\"\n />\n <polygon\n fill=\"var(--breeze-brand-mark)\"\n points=\"115.07 365.39 115.07 232.53 172.6 265.74 230.14 232.53 230.14 365.39 172.6 398.61 115.07 365.39\"\n />\n </svg>,\n );\n}\n","import type {\n ComponentPropsWithRef,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { useMeter } from 'react-aria/useMeter';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst meterRoot = tv({ base: 'grid min-w-0 gap-2 text-sm' });\nconst meterHeader = tv({\n base: 'flex min-w-0 items-baseline justify-between gap-4',\n});\nconst meterTrack = tv({\n base: 'h-3 w-full overflow-hidden border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] forced-colors:border-[CanvasText]',\n});\nconst meterFill = tv({\n base: 'h-full forced-colors:bg-[Highlight]',\n defaultVariants: {\n variant: 'primary',\n },\n variants: {\n variant: {\n danger: 'bg-[var(--breeze-danger)]',\n dark: 'bg-[var(--breeze-shell)]',\n info: 'bg-[var(--breeze-info)]',\n light: 'bg-[var(--breeze-surface)]',\n primary: 'bg-[var(--breeze-primary)]',\n secondary: 'bg-[var(--breeze-ink-soft)]',\n success: 'bg-[var(--breeze-success)]',\n warning: 'bg-[var(--breeze-warning)]',\n },\n },\n});\n\ntype MeterNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'role' | 'style'\n>;\n\n/** Props for a scalar measurement within a known range. */\nexport interface MeterProps extends MeterNativeProps {\n /** Visible application-owned translated measurement label. */\n label: ReactNode;\n /** Finite maximum range value, greater than or equal to `minimum`. Defaults to `100`. */\n maximum?: number;\n /** Finite minimum range value. Defaults to `0`. */\n minimum?: number;\n /** Ref to the rendered meter element. */\n ref?: Ref<HTMLDivElement>;\n /** Current measurement. Finite values are clamped to the configured range. */\n value: number;\n /** Optional translated value announced instead of the numeric value. */\n valueText?: ReactNode;\n /** Bootstrap-aligned semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\n/**\n * Displays a scalar measurement with explicit range semantics.\n *\n * @summary labelled scalar measurement within a known finite range\n */\nexport function Meter({\n className,\n label,\n maximum = 100,\n minimum = 0,\n ref,\n value,\n valueText,\n variant = 'primary',\n ...props\n}: Readonly<MeterProps>): ReactElement {\n useBreezeContext();\n\n if (\n !Number.isFinite(minimum) ||\n !Number.isFinite(maximum) ||\n maximum < minimum\n ) {\n throw new RangeError(\n 'Meter bounds must be finite and maximum must be greater than or equal to minimum.',\n );\n }\n\n const clampedValue = Number.isFinite(value)\n ? Math.min(maximum, Math.max(minimum, value))\n : value;\n const { labelProps, meterProps } = useMeter({\n label,\n maxValue: maximum,\n minValue: minimum,\n value: clampedValue,\n valueLabel: valueText,\n });\n const range = maximum - minimum;\n const percentage =\n range === 0\n ? 0\n : Math.min(100, Math.max(0, ((clampedValue - minimum) / range) * 100));\n const rootProps: ComponentPropsWithRef<'div'> & {\n 'data-variant': VisualVariant;\n } = {\n ...props,\n ...meterProps,\n className: meterRoot({ class: className }),\n 'data-variant': variant,\n ref: useForwardedRef(ref),\n role: 'meter',\n };\n\n return createElement(\n 'div',\n rootProps,\n createElement(\n 'div',\n {\n className: meterHeader(),\n },\n createElement('span', labelProps, label),\n createElement(\n 'span',\n { 'aria-hidden': 'true' },\n valueText ?? clampedValue,\n ),\n ),\n createElement(\n 'div',\n {\n 'aria-hidden': 'true',\n className: meterTrack(),\n },\n createElement('div', {\n className: meterFill({ variant }),\n style: {\n width: `${Number.isFinite(percentage) ? percentage : 0}%`,\n },\n }),\n ),\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { CollectionKey } from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { Link } from '../Link/Link';\n\nconst navigationList = tv({\n base: 'flex gap-1',\n defaultVariants: { orientation: 'vertical' },\n variants: {\n orientation: {\n horizontal: 'flex-row flex-wrap items-center',\n vertical: 'flex-col items-stretch',\n },\n },\n});\nconst navigationItem = tv({\n base: 'block min-h-10 px-3 py-2 no-underline data-[current]:bg-[var(--breeze-primary-soft)] data-[current]:font-semibold',\n});\n\n/** Props for a semantic application navigation list. */\nexport interface NavigationListRootProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Navigation items. */\n children: ReactNode;\n /** Layout direction. Defaults to `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered navigation landmark. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Props for one navigation destination. */\nexport interface NavigationListItemProps\n extends Omit<\n HTMLAttributes<HTMLLIElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Visible destination label. */\n children: ReactNode;\n /** Marks this destination as the current page. Defaults to `false`. */\n current?: boolean;\n /** Prevents navigation and action. Defaults to `false`. */\n disabled?: boolean;\n /** Destination URL. */\n href: string;\n /** Stable string or number destination key. */\n id: CollectionKey;\n /** Called with this destination key after activation. */\n onAction?: (key: CollectionKey) => void;\n /** Ref to the rendered list item. */\n ref?: Ref<HTMLLIElement>;\n}\n\n/** Renders a navigation landmark with horizontal or vertical list layout. */\nexport function Root({\n children,\n className,\n orientation = 'vertical',\n ref,\n ...props\n}: Readonly<NavigationListRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'nav',\n {\n ...props,\n ref: forwardedRef,\n },\n <ul className={navigationList({ class: className, orientation })}>\n {children}\n </ul>,\n );\n}\n\n/** Renders one router-neutral navigation destination. */\nexport function Item({\n children,\n className,\n current = false,\n disabled = false,\n href,\n id,\n onAction,\n ref,\n ...props\n}: Readonly<NavigationListItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'li',\n {\n ...props,\n ref: forwardedRef,\n },\n <Link\n aria-current={current ? 'page' : undefined}\n className={navigationItem({ class: className })}\n data-current={current || undefined}\n disabled={disabled}\n href={href}\n onAction={disabled ? undefined : () => onAction?.(id)}\n >\n {children}\n </Link>,\n );\n}\n\n/**\n * Semantic compound navigation-list primitive.\n *\n * @summary labelled persistent navigation with current destination state\n */\nexport const NavigationList = {\n /** One keyed destination. */\n Item,\n /** Navigation landmark and list root. */\n Root,\n};\n","import type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n InputHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport { Group as AriaGroup } from 'react-aria-components/Group';\nimport { Input as AriaInput } from 'react-aria-components/Input';\nimport { NumberField as AriaNumberField } from 'react-aria-components/NumberField';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport formControlValue from '../../internal/styling/formControls';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst numberFieldRoot = tv({\n base: 'flex min-w-0 flex-col gap-1.5',\n});\n\nconst numberFieldGroup = tv({\n base: \"breeze-number-field-group group/number-field-control relative inline-flex min-w-0 items-stretch bg-[var(--breeze-surface)] outline-none after:pointer-events-none after:absolute after:inset-0 after:z-10 after:border after:border-[var(--breeze-border-strong)] after:transition-colors after:duration-[var(--breeze-duration-fast)] after:content-[''] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 data-[hovered]:after:border-[var(--breeze-primary)] data-[invalid]:after:!border-[var(--breeze-danger)]\",\n});\n\nconst numberFieldInput = tv({\n base: 'min-w-0 flex-1 border-0 bg-transparent text-left text-[var(--breeze-ink)] outline-none group-has-[button]/number-field-control:text-center disabled:cursor-not-allowed read-only:cursor-default',\n});\n\nconst stepButton = tv({\n base: 'inline-flex shrink-0 items-center justify-center border-0 bg-transparent font-bold text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[hovered]:text-[var(--breeze-primary)] disabled:cursor-not-allowed disabled:opacity-55 group-data-[disabled]/number-field-control:opacity-100',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-12 text-base',\n md: 'size-11 text-base',\n sm: 'size-8 text-xs',\n },\n },\n});\n\ntype NumberFieldRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface NumberFieldRootSharedProps extends NumberFieldRootNativeProps {\n /** Compound label, group, input, stepper, description, and error parts. */\n children: ReactNode;\n /** Prevents editing, stepping, and focus. Defaults to `false`. */\n disabled?: boolean;\n /** Locale-aware number formatting options. */\n formatOptions?: Intl.NumberFormatOptions;\n /** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Largest permitted value. */\n max?: number;\n /** Smallest permitted value. */\n min?: number;\n /** Marks the field as required for native validation and assistive technology. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered field container. */\n ref?: Ref<HTMLDivElement>;\n /** Amount applied by stepper buttons and arrow keys. Defaults to `1`. */\n step?: number;\n}\n\ninterface ControlledNumberFieldRootProps {\n /** Current number, or `null` for an empty input. */\n value: number | null;\n /** Called with the next number, or `null` when the input becomes empty. */\n onChange: (value: number | null) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyNumberFieldRootProps {\n /** Current immutable number, or `null` for an empty input. */\n value: number | null;\n /** Marks a controlled value as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledNumberFieldRootProps {\n /** Initial number, or `null` for an empty input. */\n defaultValue?: number | null;\n /** Called with the next number, or `null` when the input becomes empty. */\n onChange?: (value: number | null) => void;\n readOnly?: false;\n value?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled numeric field state. */\nexport type NumberFieldRootProps = NumberFieldRootSharedProps &\n (\n | ControlledNumberFieldRootProps\n | ReadOnlyNumberFieldRootProps\n | UncontrolledNumberFieldRootProps\n );\n\n/** Props for the visible numeric field label. */\nexport type NumberFieldLabelProps = TextFieldLabelProps;\n\n/** Props for the numeric input and stepper layout group. */\nexport interface NumberFieldGroupProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Numeric input and stepper buttons. */\n children: ReactNode;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for the native locale-aware numeric input part. */\nexport interface NumberFieldInputProps\n extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n | 'children'\n | 'className'\n | 'defaultValue'\n | 'disabled'\n | 'max'\n | 'min'\n | 'onChange'\n | 'readOnly'\n | 'required'\n | 'size'\n | 'step'\n | 'style'\n | 'type'\n | 'value'\n > {\n /** Placement and composition classes. */\n className?: string;\n /** Ref to the rendered input. */\n ref?: Ref<HTMLInputElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props shared by numeric increment and decrement actions. */\nexport interface NumberFieldStepButtonProps\n extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'onClick' | 'onClickCapture' | 'style' | 'type'\n > {\n /** Accessible action name describing the step direction. */\n 'aria-label': string;\n /** Visible stepper content. */\n children: ReactNode;\n /** Ref to the rendered stepper button. */\n ref?: Ref<HTMLButtonElement>;\n /** Canonical square control size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for supporting text associated with the numeric input. */\nexport type NumberFieldDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible numeric validation message. */\nexport type NumberFieldErrorProps = TextFieldErrorProps;\n\n/** Coordinates locale-aware numeric state, constraints, and compound anatomy. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n formatOptions,\n invalid = false,\n max,\n min,\n onChange,\n readOnly = false,\n ref,\n required = false,\n step,\n value,\n ...props\n}: Readonly<NumberFieldRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const normaliseValue = (nextValue: number) =>\n onChange?.(Number.isNaN(nextValue) ? null : nextValue);\n\n return createElement(\n AriaNumberField,\n {\n ...props,\n className: numberFieldRoot({ class: className }),\n defaultValue: defaultValue === null ? Number.NaN : defaultValue,\n formatOptions,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: max,\n minValue: min,\n onChange: normaliseValue,\n ref: forwardedRef,\n step,\n value: value === null ? Number.NaN : value,\n } as ComponentProps<typeof AriaNumberField>,\n children,\n );\n}\n\n/** Groups the NumberField input and stepper buttons as one interactive control. */\nexport function Group({\n className,\n ref,\n ...props\n}: Readonly<NumberFieldGroupProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaGroup, {\n ...props,\n className: numberFieldGroup({ class: className }),\n 'data-breeze-number-field-group': '',\n ref: forwardedRef,\n } as ComponentProps<typeof AriaGroup>);\n}\n\n/** Renders the editable locale-aware spinbutton for a NumberField. */\nexport function Input({\n className,\n ref,\n size,\n ...props\n}: Readonly<NumberFieldInputProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaInput, {\n ...props,\n className: formControlValue({\n class: numberFieldInput({ class: className }),\n size,\n }),\n ref: forwardedRef,\n });\n}\n\ninterface NumberFieldStepButtonInternalProps\n extends Omit<NumberFieldStepButtonProps, 'children'> {\n children?: ReactNode;\n slot: 'decrement' | 'increment';\n}\n\nfunction NumberFieldStepButton({\n className,\n ref,\n size,\n slot,\n ...props\n}: Readonly<NumberFieldStepButtonInternalProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaButton, {\n ...props,\n className: stepButton({ class: className, size }),\n ref: forwardedRef,\n slot,\n type: 'button',\n } as ComponentProps<typeof AriaButton>);\n}\n\n/** Decreases the NumberField value by its configured step. */\nexport function DecrementButton({\n 'aria-label': ariaLabel,\n children,\n ref,\n size,\n ...props\n}: Readonly<NumberFieldStepButtonProps>): ReactElement {\n return createElement(\n NumberFieldStepButton,\n {\n ...props,\n 'aria-label': ariaLabel,\n ref,\n size,\n slot: 'decrement',\n },\n children,\n );\n}\n\n/** Increases the NumberField value by its configured step. */\nexport function IncrementButton({\n 'aria-label': ariaLabel,\n children,\n ref,\n size,\n ...props\n}: Readonly<NumberFieldStepButtonProps>): ReactElement {\n return createElement(\n NumberFieldStepButton,\n {\n ...props,\n 'aria-label': ariaLabel,\n ref,\n size,\n slot: 'increment',\n },\n children,\n );\n}\n\n/**\n * Accessible compound locale-aware numeric-entry primitive.\n *\n * @summary locale-aware numeric entry with optional stepper controls\n */\nexport const NumberField = {\n /** Decrement action. */\n DecrementButton,\n /** Supporting guidance associated with the numeric input. */\n Description: TextField.Description,\n /** Validation message associated with an invalid numeric input. */\n Error: TextField.Error,\n /** Numeric input and stepper layout group. */\n Group,\n /** Increment action. */\n IncrementButton,\n /** Locale-aware native spinbutton. */\n Input,\n /** Persistent accessible label. */\n Label: TextField.Label,\n /** State, constraints, and accessibility root. */\n Root,\n};\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useId } from 'react';\nimport {\n Dialog as AriaDialog,\n DialogTrigger as AriaDialogTrigger,\n} from 'react-aria-components/Dialog';\nimport { Popover as AriaPopover } from 'react-aria-components/Popover';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n OverlayDescriptionContext,\n SharedOverlayClose,\n type SharedOverlayCloseProps,\n SharedOverlayDescription,\n type SharedOverlayDescriptionProps,\n SharedOverlayTitle,\n type SharedOverlayTitleProps,\n SharedOverlayTrigger,\n type SharedOverlayTriggerProps,\n} from '../../internal/react-aria/OverlayParts';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst popover = tv({\n base: 'z-50 max-h-[min(24rem,var(--available-height))] w-[min(22rem,calc(100vw-2rem))] overflow-y-auto border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-4 text-[var(--breeze-ink)] shadow-xl outline-none data-[entering]:animate-in data-[exiting]:animate-out motion-reduce:transition-none forced-colors:border-[CanvasText]',\n});\ninterface PopoverRootSharedProps {\n /** Trigger and content. */ children: ReactNode;\n}\ninterface ControlledPopoverRootProps {\n /** Current open state. */ open: boolean;\n /** Called with next open state. */ onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\ninterface ReadOnlyPopoverRootProps {\n /** Current immutable open state. */ open: boolean;\n /** Marks controlled state immutable. */ readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\ninterface UncontrolledPopoverRootProps {\n /** Initial open state. */ defaultOpen?: boolean;\n /** Called with next open state. */ onOpenChange?: (open: boolean) => void;\n open?: never;\n readOnly?: false;\n}\n/** Props for controlled, read-only, or uncontrolled popover state. */ export type PopoverRootProps =\n PopoverRootSharedProps &\n (\n | ControlledPopoverRootProps\n | ReadOnlyPopoverRootProps\n | UncontrolledPopoverRootProps\n );\n/** Props for the popover trigger. */ export type PopoverTriggerProps =\n SharedOverlayTriggerProps;\n/** Props for positioned popover content. */ export interface PopoverContentProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Popover anatomy. */ children: ReactNode;\n /** Allows outside pointer dismissal. Defaults to `true`. */ dismissible?: boolean;\n /** Prevents Escape dismissal. */ keyboardDismissDisabled?: boolean;\n /** Traps outside interaction when true. Defaults to `false`. */ modal?: boolean;\n /** Gap from trigger. Defaults to `8`. */ offset?: number;\n /** Logical placement. Defaults to `bottom start`. */ placement?:\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'top start'\n | 'top end'\n | 'bottom start'\n | 'bottom end';\n /** Ref to rendered dialog surface. */ ref?: Ref<HTMLElement>;\n}\n/** Props for required popover title. */ export type PopoverTitleProps =\n SharedOverlayTitleProps;\n/** Props for required popover description. */ export type PopoverDescriptionProps =\n SharedOverlayDescriptionProps;\n/** Props for semantic popover close action. */ export type PopoverCloseProps =\n SharedOverlayCloseProps;\n\n/** Coordinates non-modal contextual content anchored to a trigger. */\nexport function Root({\n defaultOpen,\n onOpenChange,\n open,\n readOnly: _readOnly,\n ...props\n}: Readonly<PopoverRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaDialogTrigger, {\n ...props,\n defaultOpen,\n isOpen: open,\n onOpenChange,\n });\n}\nexport function Content({\n children,\n className,\n dismissible = true,\n keyboardDismissDisabled = false,\n modal = false,\n offset = 8,\n placement = 'bottom start',\n ref,\n ...props\n}: Readonly<PopoverContentProps>): ReactElement {\n useBreezeContext();\n const descriptionId = useId();\n\n return createElement(\n AriaPopover,\n {\n className: popover({ class: className }),\n isDismissable: dismissible,\n isKeyboardDismissDisabled: keyboardDismissDisabled,\n isNonModal: !modal,\n offset,\n placement,\n } as ComponentProps<typeof AriaPopover>,\n createElement(\n AriaDialog,\n {\n ...props,\n 'aria-describedby': descriptionId,\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaDialog>,\n createElement(\n OverlayDescriptionContext,\n { value: descriptionId },\n children,\n ),\n ),\n );\n}\n/**\n * Accessible compound positioned popover primitive.\n *\n * @summary contextual modal or nonmodal dialog anchored to a trigger\n */\nexport const Popover = {\n /** Semantic action that closes the popover. */\n Close: SharedOverlayClose,\n /** Positioned modal or nonmodal dialog surface. */\n Content,\n /** Required accessible popover description. */\n Description: SharedOverlayDescription,\n /** Controlled, read-only, or uncontrolled open-state coordinator. */\n Root,\n /** Required accessible popover title. */\n Title: SharedOverlayTitle,\n /** Semantic action that opens the popover. */\n Trigger: SharedOverlayTrigger,\n};\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useId } from 'react';\nimport type { ProgressBarRenderProps } from 'react-aria-components/ProgressBar';\nimport { ProgressBar as AriaProgressBar } from 'react-aria-components/ProgressBar';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst progressRoot = tv({ base: 'grid min-w-0 gap-2 text-sm' });\nconst progressHeader = tv({\n base: 'flex min-w-0 items-baseline justify-between gap-4',\n});\nconst progressTrack = tv({\n base: 'h-3 w-full overflow-hidden border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] forced-colors:border-[CanvasText]',\n});\nconst progressFill = tv({\n base: 'h-full forced-colors:bg-[Highlight]',\n defaultVariants: {\n variant: 'primary',\n },\n variants: {\n variant: {\n danger: 'bg-[var(--breeze-danger)]',\n dark: 'bg-[var(--breeze-shell)]',\n info: 'bg-[var(--breeze-info)]',\n light: 'bg-[var(--breeze-surface)]',\n primary: 'bg-[var(--breeze-primary)]',\n secondary: 'bg-[var(--breeze-ink-soft)]',\n success: 'bg-[var(--breeze-success)]',\n warning: 'bg-[var(--breeze-warning)]',\n },\n },\n});\n\ntype ProgressBarNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'role' | 'style'\n>;\n\ninterface ProgressBarSharedProps extends ProgressBarNativeProps {\n /** Visible application-owned translated progress label. */\n label: ReactNode;\n /** Maximum range value. Defaults to `100`. */\n maximum?: number;\n /** Minimum range value. Defaults to `0`. */\n minimum?: number;\n /** Ref to the rendered progress element. */\n ref?: Ref<HTMLDivElement>;\n /** Bootstrap-aligned semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\ninterface DeterminateProgressBarProps {\n /** Excluded or false when progress has a measurable value. */\n indeterminate?: false;\n /** Current progress value within the configured range. */\n value: number;\n /** Optional translated value announced instead of the numeric value. */\n valueText?: string;\n}\n\ninterface IndeterminateProgressBarProps {\n /** Marks progress as ongoing without a measurable value. */\n indeterminate: true;\n /** Excluded because indeterminate progress has no current value. */\n value?: never;\n /** Excluded because indeterminate progress has no current value text. */\n valueText?: never;\n}\n\n/** Props for determinate or indeterminate operation progress. */\nexport type ProgressBarProps = ProgressBarSharedProps &\n (DeterminateProgressBarProps | IndeterminateProgressBarProps);\n\n/**\n * Shows measurable or indeterminate operation progress with range semantics.\n *\n * @summary labelled determinate or indeterminate operation progress\n */\nexport function ProgressBar({\n className,\n indeterminate = false,\n label,\n maximum = 100,\n minimum = 0,\n ref,\n value,\n valueText,\n variant = 'primary',\n ...props\n}: Readonly<ProgressBarProps>): ReactElement {\n useBreezeContext();\n\n const labelId = useId();\n const renderProgress = ({\n percentage,\n valueText: formattedValue,\n }: ProgressBarRenderProps): ReactElement =>\n createElement(\n 'div',\n {\n className: 'contents',\n },\n createElement(\n 'div',\n {\n className: progressHeader(),\n },\n createElement('span', { id: labelId }, label),\n indeterminate\n ? null\n : createElement('span', { 'aria-hidden': 'true' }, formattedValue),\n ),\n createElement(\n 'div',\n {\n 'aria-hidden': 'true',\n className: progressTrack(),\n },\n createElement('div', {\n className: progressFill({\n class: indeterminate\n ? 'w-2/5 animate-pulse motion-reduce:animate-none'\n : undefined,\n variant,\n }),\n style: indeterminate\n ? undefined\n : {\n width: `${percentage ?? 0}%`,\n },\n }),\n ),\n );\n const progressProps = {\n ...props,\n 'aria-labelledby': labelId,\n children: renderProgress,\n className: progressRoot({ class: className }),\n 'data-variant': variant,\n isIndeterminate: indeterminate,\n maxValue: maximum,\n minValue: minimum,\n ref: useForwardedRef(ref),\n value,\n valueLabel: valueText,\n } as unknown as ComponentProps<typeof AriaProgressBar>;\n\n return createElement(AriaProgressBar, progressProps);\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n LabelHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport { createElement, useRef } from 'react';\nimport {\n RadioButton as AriaRadioButton,\n RadioField as AriaRadioField,\n RadioGroup as AriaRadioGroup,\n} from 'react-aria-components/RadioGroup';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { formControlValueTypography } from '../../internal/styling/formControls';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst radioGroupRoot = tv({\n base: 'flex min-w-0 gap-2',\n defaultVariants: {\n orientation: 'vertical',\n },\n variants: {\n orientation: {\n horizontal:\n 'flex-row flex-wrap items-start gap-x-5 [&>[data-breeze-radio-group-description]]:basis-full [&>[data-breeze-radio-group-error]]:basis-full [&>[data-breeze-radio-group-label]]:basis-full',\n vertical: 'flex-col items-start',\n },\n },\n});\n\nconst radioItem = tv({\n base: 'flex min-w-0 flex-col gap-1',\n});\n\nconst radioControl = tv({\n base: `${formControlValueTypography} group inline-flex w-fit cursor-pointer items-center gap-2 rounded-sm text-base leading-[1.4] text-[var(--breeze-ink)] data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]`,\n});\n\nconst radioIndicator = tv({\n base: 'inline-flex shrink-0 items-center justify-center rounded-full border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] transition-colors duration-[var(--breeze-duration-fast)] after:rounded-full after:bg-[var(--breeze-primary)] after:opacity-0 group-data-[selected]:border-[var(--breeze-primary)] group-data-[selected]:after:opacity-100',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-6 after:size-3',\n md: 'size-5 after:size-2',\n sm: 'size-4 after:size-2',\n },\n },\n});\n\ntype RadioGroupRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface RadioGroupRootSharedProps extends RadioGroupRootNativeProps {\n /** Compound label, radio items, description, and error parts. */\n children: ReactNode;\n /** Prevents focus and selection changes for every option. Defaults to `false`. */\n disabled?: boolean;\n /** Exposes invalid group state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Native form field name shared by every radio option. */\n name?: string;\n /** Option layout and arrow-key navigation axis. Defaults to `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n /** Marks the radio group as requiring a selection. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered radio group. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledRadioGroupRootProps {\n /** Current selected option, or `null` when no option is selected. */\n selection: string | null;\n /** Called with the next selected option value. */\n onSelectionChange: (selection: string) => void;\n defaultSelection?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyRadioGroupRootProps {\n /** Current immutable option, or `null` when no option is selected. */\n selection: string | null;\n /** Marks a controlled selection as intentionally immutable. */\n readOnly: true;\n defaultSelection?: never;\n onSelectionChange?: never;\n}\n\ninterface UncontrolledRadioGroupRootProps {\n /** Initial selected option. Defaults to no selection. */\n defaultSelection?: string;\n /** Called with the next selected option value. */\n onSelectionChange?: (selection: string) => void;\n readOnly?: false;\n selection?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled radio-group selection. */\nexport type RadioGroupRootProps = RadioGroupRootSharedProps &\n (\n | ControlledRadioGroupRootProps\n | ReadOnlyRadioGroupRootProps\n | UncontrolledRadioGroupRootProps\n );\n\n/** Props for the visible radio-group label. */\nexport type RadioGroupLabelProps = TextFieldLabelProps;\n\n/** Props for supporting text associated with the radio group. */\nexport type RadioGroupDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible radio-group validation message. */\nexport type RadioGroupErrorProps = TextFieldErrorProps;\n\n/** Props for one radio option and its optional description. */\nexport interface RadioGroupItemProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Compound control and optional item description. */\n children: ReactNode;\n /** Prevents selection of this option. Defaults to `false`. */\n disabled?: boolean;\n /** Ref to the hidden native radio input. */\n inputRef?: RefObject<HTMLInputElement | null>;\n /** Ref to the rendered option field. */\n ref?: Ref<HTMLDivElement>;\n /** Stable native form value for this option. */\n value: string;\n}\n\n/** Props for the clickable radio option and native label. */\nexport interface RadioGroupControlProps\n extends Omit<\n LabelHTMLAttributes<HTMLLabelElement>,\n 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Indicator and persistent option label. */\n children: ReactNode;\n /** Ref to the rendered native label. */\n ref?: Ref<HTMLLabelElement>;\n}\n\n/** Props for the visual radio selection indicator. */\nexport interface RadioGroupIndicatorProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Ref to the rendered indicator. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical indicator size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for persistent visible radio-option label text. */\nexport interface RadioGroupItemLabelProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Text naming the radio option. */\n children: ReactNode;\n /** Ref to the rendered option label text. */\n ref?: Ref<HTMLSpanElement>;\n}\n\n/** Props for supporting text associated with one radio option. */\nexport type RadioGroupItemDescriptionProps = TextFieldDescriptionProps;\n\n/** Coordinates exclusive selection, validation, orientation, and native form naming. */\nexport function Root({\n children,\n className,\n defaultSelection,\n disabled = false,\n invalid = false,\n name,\n onSelectionChange,\n orientation = 'vertical',\n readOnly = false,\n ref,\n required = false,\n selection,\n ...props\n}: Readonly<RadioGroupRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaRadioGroup,\n {\n ...props,\n className: radioGroupRoot({ class: className, orientation }),\n defaultValue: defaultSelection,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n name,\n onChange: onSelectionChange,\n orientation,\n ref: forwardedRef,\n value: selection,\n } as ComponentProps<typeof AriaRadioGroup>,\n children,\n );\n}\n\n/** Renders one radio option field with native form value and optional guidance. */\nexport function Item({\n children,\n className,\n disabled = false,\n inputRef,\n ref,\n value,\n ...props\n}: Readonly<RadioGroupItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const fallbackInputRef = useRef<HTMLInputElement>(null);\n\n return createElement(\n AriaRadioField,\n {\n ...props,\n className: radioItem({ class: className }),\n inputRef: inputRef ?? fallbackInputRef,\n isDisabled: disabled,\n ref: forwardedRef,\n value,\n } as ComponentProps<typeof AriaRadioField>,\n children,\n );\n}\n\n/** Renders the persistent accessible label owned by the radio group. */\nexport function Label({\n className,\n ref,\n ...props\n}: Readonly<RadioGroupLabelProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(TextField.Label, {\n ...props,\n className: `leading-[1.4] ${className ?? ''}`,\n 'data-breeze-radio-group-label': true,\n ref: forwardedRef,\n } as RadioGroupLabelProps & {\n 'data-breeze-radio-group-label': true;\n });\n}\n\n/** Renders supporting guidance on its own radio-group row. */\nexport function Description(\n props: Readonly<RadioGroupDescriptionProps>,\n): ReactElement {\n return createElement(TextField.Description, {\n ...props,\n 'data-breeze-radio-group-description': true,\n } as RadioGroupDescriptionProps & {\n 'data-breeze-radio-group-description': true;\n });\n}\n\n/** Renders associated validation feedback on its own radio-group row. */\nfunction ErrorMessage(props: Readonly<RadioGroupErrorProps>): ReactElement {\n return createElement(TextField.Error, {\n ...props,\n 'data-breeze-radio-group-error': true,\n } as RadioGroupErrorProps & {\n 'data-breeze-radio-group-error': true;\n });\n}\n\nexport { ErrorMessage as Error };\n\n/** Renders the pointer, touch, and keyboard target for one radio option. */\nexport function Control({\n className,\n ref,\n ...props\n}: Readonly<RadioGroupControlProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaRadioButton, {\n ...props,\n className: radioControl({ class: className }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaRadioButton>);\n}\n\n/** Renders the visual selected state for one radio option. */\nexport function Indicator({\n className,\n ref,\n size,\n ...props\n}: Readonly<RadioGroupIndicatorProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n 'aria-hidden': true,\n className: radioIndicator({ class: className, size }),\n ref: forwardedRef,\n });\n}\n\n/** Renders persistent visible label text within RadioGroup.Control. */\nexport function ItemLabel({\n ref,\n ...props\n}: Readonly<RadioGroupItemLabelProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n ref: forwardedRef,\n });\n}\n\n/**\n * Accessible compound exclusive-selection primitive.\n *\n * @summary labelled exclusive selection with native radio semantics\n */\nexport const RadioGroup = {\n /** Pointer, touch, and keyboard selection target for one option. */\n Control,\n /** Supporting guidance associated with the group. */\n Description,\n /** Validation message associated with an invalid group. */\n Error: ErrorMessage,\n /** Visual selected-state indicator. */\n Indicator,\n /** One radio option field. */\n Item,\n /** Supporting guidance associated with one option. */\n ItemDescription: TextField.Description,\n /** Persistent visible option label text. */\n ItemLabel,\n /** Persistent accessible group label. */\n Label,\n /** Selection, validation, orientation, and native form root. */\n Root,\n};\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { RangeCalendar as AriaRangeCalendar } from 'react-aria-components/RangeCalendar';\nimport { tv } from 'tailwind-variants';\nimport {\n formatDateRangeValue,\n parseDateRangeValue,\n parseDateValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { DateRangeValue } from '../../internal/types/date';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n type CalendarButtonPartProps,\n CalendarGridPart,\n type CalendarGridPartProps,\n CalendarHeaderPart,\n type CalendarHeaderPartProps,\n CalendarHeadingPart,\n type CalendarHeadingPartProps,\n CalendarNextButtonPart,\n CalendarPreviousButtonPart,\n} from '../date/CalendarParts';\n\nconst rootStyle = tv({\n base: 'inline-flex w-full flex-col gap-3',\n});\ninterface SharedProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'style'\n > {\n /** Calendar navigation, heading, range grid, and guidance. */ children: ReactNode;\n /** Allows ranges containing unavailable dates. */ allowsNonContiguousRanges?: boolean;\n /** Prevents focus and selection. */ disabled?: boolean;\n /** Exposes invalid selection state. */ invalid?: boolean;\n /** Returns whether a stable date is unavailable. */ isDateUnavailable?: (\n date: string,\n anchorDate: string | null,\n ) => boolean;\n /** Latest selectable date. */ maxValue?: string;\n /** Earliest selectable date. */ minValue?: string;\n /** Ref to the rendered range-calendar root. */ ref?: Ref<HTMLDivElement>;\n /** Number of visible months. Defaults to `1`. */ visibleMonths?: number;\n}\ntype State =\n | {\n /** Current controlled range, or `null` when empty. */ value: DateRangeValue | null;\n /** Called with the next stable range or `null`. */ onChange: (\n value: DateRangeValue | null,\n ) => void;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Mutable controlled calendars cannot be read-only. */ readOnly?: false;\n }\n | {\n /** Current immutable range, or `null` when empty. */ value: DateRangeValue | null;\n /** Prevents range changes. */ readOnly: true;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Excluded because read-only calendars cannot change. */ onChange?: never;\n }\n | {\n /** Initial uncontrolled range, or `null` when empty. */ defaultValue?: DateRangeValue | null;\n /** Called with the next stable range or `null`. */ onChange?: (\n value: DateRangeValue | null,\n ) => void;\n /** Uncontrolled calendars cannot be read-only. */ readOnly?: false;\n /** Excluded when uncontrolled. */ value?: never;\n };\n/** Props for stable date-range calendar selection. */\nexport type RangeCalendarRootProps = SharedProps & State;\n/** Props for the navigation header. */\nexport type RangeCalendarHeaderProps = CalendarHeaderPartProps;\n/** Props for previous and next buttons. */\nexport type RangeCalendarButtonProps = CalendarButtonPartProps;\n/** Props for the locale-formatted heading. */\nexport type RangeCalendarHeadingProps = CalendarHeadingPartProps;\n/** Props for the range calendar grid. */\nexport type RangeCalendarGridProps = CalendarGridPartProps;\n\n/** Coordinates locale-aware selection of a start and end date. */\nexport function Root({\n allowsNonContiguousRanges = false,\n children,\n className,\n defaultValue,\n disabled = false,\n invalid = false,\n isDateUnavailable,\n maxValue,\n minValue,\n onChange,\n readOnly = false,\n ref,\n value,\n visibleMonths = 1,\n ...props\n}: Readonly<RangeCalendarRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaRangeCalendar, {\n ...props,\n allowsNonContiguousRanges,\n children,\n className: rootStyle({ class: className }),\n defaultValue: parseDateRangeValue(defaultValue ?? null) ?? undefined,\n isDateUnavailable: isDateUnavailable\n ? (date: CalendarDate, anchor: CalendarDate | null) =>\n isDateUnavailable(date.toString(), anchor?.toString() ?? null)\n : undefined,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n maxValue: parseDateValue(maxValue ?? null) ?? undefined,\n minValue: parseDateValue(minValue ?? null) ?? undefined,\n onChange: readOnly\n ? undefined\n : (range: { start: CalendarDate; end: CalendarDate }) =>\n onChange?.(formatDateRangeValue(range)),\n ref: useForwardedRef(ref),\n value: value === undefined ? undefined : parseDateRangeValue(value),\n visibleDuration: { months: visibleMonths },\n } as unknown as ComponentProps<typeof AriaRangeCalendar>);\n}\n/**\n * Accessible locale-aware date-range calendar.\n *\n * @summary inclusive ISO date-range selection from calendar grids\n */\nexport const RangeCalendar = {\n /** Locale-aware weekday and range grid. */ Grid: CalendarGridPart,\n /** Navigation header container. */ Header: CalendarHeaderPart,\n /** Visible month heading. */ Heading: CalendarHeadingPart,\n /** Next-page navigation. */ NextButton: CalendarNextButtonPart,\n /** Previous-page navigation. */ PreviousButton: CalendarPreviousButtonPart,\n /** Stable range state and constraints. */ Root,\n};\n","import type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createContext, createElement, useContext } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport { Group as AriaGroup } from 'react-aria-components/Group';\nimport {\n SearchField as AriaSearchField,\n type SearchFieldRenderProps,\n} from 'react-aria-components/SearchField';\nimport { tv } from 'tailwind-variants';\nimport { CloseIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldInputProps,\n type TextFieldLabelProps,\n type TextFieldRootProps,\n} from '../TextField/TextField';\n\nconst searchFieldRoot = tv({\n base: 'flex min-w-0 flex-col gap-1.5',\n});\n\nconst searchFieldGroup = tv({\n base: \"relative inline-flex w-full min-w-0 items-stretch bg-[var(--breeze-surface)] outline-none after:pointer-events-none after:absolute after:inset-0 after:z-10 after:border after:border-[var(--breeze-border-strong)] after:transition-colors after:duration-[var(--breeze-duration-fast)] after:content-[''] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-solid data-[focus-visible]:outline-[var(--breeze-focus)] data-[focus-within]:after:border-[var(--breeze-primary)] data-[hovered]:after:border-[var(--breeze-primary)] data-[invalid]:after:!border-[var(--breeze-danger)] data-[readonly]:bg-[var(--breeze-surface-subtle)] data-[readonly]:opacity-70\",\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-12',\n md: 'min-h-11',\n sm: 'min-h-8',\n },\n },\n});\n\nconst searchInput = tv({\n base: '[&::-webkit-search-cancel-button]:hidden',\n});\n\nconst groupedInput = tv({\n base: 'min-w-0 w-auto flex-1 border-0 bg-transparent disabled:!bg-transparent disabled:!opacity-100 read-only:!bg-transparent read-only:!opacity-100 data-[focus-visible]:!outline-none',\n});\n\nconst clearButton = tv({\n base: 'inline-flex shrink-0 items-center justify-center border-0 bg-transparent text-[var(--breeze-ink-soft)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[focus-visible]:outline-none data-[hovered]:text-[var(--breeze-primary)] disabled:cursor-not-allowed disabled:opacity-55',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-12 text-base',\n md: 'size-11 text-base',\n sm: 'size-8 text-xs',\n },\n },\n});\n\ninterface SearchFieldCompositionContextValue {\n size: ControlSize;\n}\n\ninterface SearchFieldStateContextValue {\n isDisabled: boolean;\n isEmpty: boolean;\n isReadOnly: boolean;\n}\n\nconst SearchFieldCompositionContext = createContext<\n SearchFieldCompositionContextValue | undefined\n>(undefined);\nconst SearchFieldStateContext = createContext<\n SearchFieldStateContextValue | undefined\n>(undefined);\n\nfunction renderSearchFieldChildren(\n children: ReactNode,\n { isDisabled, isEmpty, isReadOnly }: SearchFieldRenderProps,\n): ReactElement {\n return createElement(\n SearchFieldStateContext.Provider,\n {\n value: {\n isDisabled,\n isEmpty,\n isReadOnly,\n },\n },\n children,\n );\n}\n\ninterface SearchFieldRootCallbacks {\n /** Called after the query is cleared with the clear button or Escape key. */\n onClear?: () => void;\n /** Called with the current query when the user submits the search. */\n onSubmit?: (value: string) => void;\n}\n\n/** Props for controlled, read-only, or uncontrolled search field state. */\nexport type SearchFieldRootProps = TextFieldRootProps &\n SearchFieldRootCallbacks;\n\n/** Props for the visible search field label. */\nexport type SearchFieldLabelProps = TextFieldLabelProps;\n\n/** Props for the single-surface search input and clear-action group. */\nexport interface SearchFieldGroupProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Search input and optional clear action. */\n children: ReactNode;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n /** Canonical size applied to every grouped control part. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for the native search input part. */\nexport type SearchFieldInputProps = Omit<TextFieldInputProps, 'type'>;\n\n/** Props for supporting text associated with the search input. */\nexport type SearchFieldDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible search validation message. */\nexport type SearchFieldErrorProps = TextFieldErrorProps;\n\n/** Props for the search clear action. */\nexport interface SearchFieldClearButtonProps\n extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'children' | 'onClick' | 'onClickCapture' | 'style' | 'type'\n > {\n /** Accessible action name. Defaults to the provider's `clear` message. */\n 'aria-label'?: string;\n /** Optional clear-action content. Defaults to the Breeze close icon. */\n children?: ReactNode;\n /** Ref to the rendered clear button. */\n ref?: Ref<HTMLButtonElement>;\n /** Standalone action size. A containing Group takes precedence. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Coordinates accessible query state, submission, clearing, and compound anatomy. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n invalid = false,\n onChange,\n onClear,\n onSubmit,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<SearchFieldRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaSearchField, {\n ...props,\n children: renderSearchFieldChildren.bind(null, children),\n className: searchFieldRoot({ class: className }),\n defaultValue,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n onChange,\n onClear,\n onSubmit,\n ref: forwardedRef,\n value,\n } as ComponentProps<typeof AriaSearchField>);\n}\n\n/** Groups the SearchField input and clear action as one visual control. */\nexport function Group({\n className,\n ref,\n role = 'presentation',\n size = 'md',\n ...props\n}: Readonly<SearchFieldGroupProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const rootState = useContext(SearchFieldStateContext);\n\n return createElement(\n SearchFieldCompositionContext.Provider,\n { value: { size } },\n createElement(AriaGroup, {\n ...props,\n className: searchFieldGroup({ class: className, size }),\n 'data-breeze-search-field-group': '',\n 'data-size': size,\n isReadOnly: rootState?.isReadOnly,\n ref: forwardedRef,\n role,\n } as ComponentProps<typeof AriaGroup>),\n );\n}\n\n/** Renders the native search input for a SearchField. */\nexport function Input({\n className,\n size,\n ...props\n}: Readonly<SearchFieldInputProps>): ReactElement {\n const composition = useContext(SearchFieldCompositionContext);\n\n return createElement(TextField.Input, {\n ...props,\n className: searchInput({\n class: composition ? groupedInput({ class: className }) : className,\n }),\n size: composition?.size ?? size,\n type: 'search',\n } as unknown as TextFieldInputProps);\n}\n\n/** Clears the current SearchField value with pointer or keyboard activation. */\nexport function ClearButton({\n 'aria-label': ariaLabel,\n children,\n className,\n ref,\n size,\n ...props\n}: Readonly<SearchFieldClearButtonProps>): ReactElement | null {\n const { messages } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const composition = useContext(SearchFieldCompositionContext);\n const rootState = useContext(SearchFieldStateContext);\n\n if (rootState?.isDisabled || rootState?.isEmpty || rootState?.isReadOnly) {\n return null;\n }\n\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-label': ariaLabel ?? messages.clear,\n className: clearButton({\n class: className,\n size: composition?.size ?? size,\n }),\n 'data-breeze-search-field-clear': '',\n ref: forwardedRef,\n type: 'button',\n } as ComponentProps<typeof AriaButton>,\n <span aria-hidden=\"true\">{children ?? <CloseIcon />}</span>,\n );\n}\n\n/**\n * Accessible compound search-query primitive.\n *\n * @summary labelled search entry with submission and clearing\n */\nexport const SearchField = {\n /** Query clear action. */\n ClearButton,\n /** Supporting guidance associated with the search input. */\n Description: TextField.Description,\n /** Validation message associated with an invalid search input. */\n Error: TextField.Error,\n /** Single-surface input and clear-action composition. */\n Group,\n /** Native search input. */\n Input,\n /** Persistent accessible label. */\n Label: TextField.Label,\n /** State, submission, and accessibility root. */\n Root,\n};\n","import type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n Button as AriaButton,\n ListBox as AriaListBox,\n Popover as AriaPopover,\n Select as AriaSelect,\n SelectValue as AriaSelectValue,\n} from 'react-aria-components/Select';\nimport { tv } from 'tailwind-variants';\nimport { ChevronDownIcon } from '../../icons';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport formControlValue from '../../internal/styling/formControls';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n ListBox as BreezeListBox,\n type ListBoxItemProps,\n} from '../ListBox/ListBox';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst rootStyle = tv({ base: 'group/select flex min-w-0 flex-col gap-1.5' });\nconst triggerStyle = tv({\n base: 'inline-flex w-full items-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-left text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[hovered]:border-[var(--breeze-primary)] data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 group-data-[invalid]/select:border-[var(--breeze-danger)]',\n});\nconst popoverStyle = tv({\n base: 'min-w-[var(--trigger-width)] border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] shadow-lg',\n});\nconst listStyle = tv({ base: 'max-h-72 overflow-y-auto p-1 outline-none' });\n\ntype NativeRoot = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\ninterface SharedRoot extends NativeRoot {\n /** Compound label, trigger, popover, listbox, description, and error parts. */ children: ReactNode;\n /** Prevents focus and selection. Defaults to `false`. */ disabled?: boolean;\n /** Associates the native form value with an external form. */ form?: string;\n /** Exposes invalid state. Defaults to `false`. */ invalid?: boolean;\n /** Native form field name. */ name?: string;\n /** Placeholder shown before selection. */ placeholder?: string;\n /** Marks the select as required. Defaults to `false`. */ required?: boolean;\n /** Ref to the rendered field root. */ ref?: Ref<HTMLDivElement>;\n}\ninterface Controlled {\n /** Current selected key, or `null` when no option is selected. */\n value: CollectionKey | null;\n /** Called when the selected key changes. */\n onChange: (value: CollectionKey | null) => void;\n /** Excluded when value is controlled. */\n defaultValue?: never;\n /** Controlled mutable state cannot be marked read-only. */\n readOnly?: false;\n}\ninterface ReadOnly {\n /** Current immutable selected key, or `null` when no option is selected. */\n value: CollectionKey | null;\n /** Prevents interaction with the controlled value. */\n readOnly: true;\n /** Excluded when value is controlled. */\n defaultValue?: never;\n /** Excluded because read-only values cannot change. */\n onChange?: never;\n}\ninterface Uncontrolled {\n /** Initial selected key. */\n defaultValue?: CollectionKey;\n /** Called when the selected key changes. */\n onChange?: (value: CollectionKey | null) => void;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n /** Excluded when value is uncontrolled. */\n value?: never;\n}\n/** Props for controlled, read-only, or uncontrolled single-value select state. */\nexport type SelectRootProps = SharedRoot &\n (Controlled | ReadOnly | Uncontrolled);\n/** Props for the visible select label. */ export type SelectLabelProps =\n TextFieldLabelProps;\n/** Props for select supporting text. */ export type SelectDescriptionProps =\n TextFieldDescriptionProps;\n/** Props for a select validation message. */ export type SelectErrorProps =\n TextFieldErrorProps;\n/** Props for the native select trigger button. */\nexport interface SelectTriggerProps\n extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Trigger content. */ children: ReactNode;\n /** Ref to the trigger. */ ref?: Ref<HTMLButtonElement>;\n /** Canonical control size. Defaults to `md`. */ size?: ControlSize;\n}\n/** Props for the displayed selected value. */\nexport interface SelectValueProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Optional custom value content. */ children?: ReactNode;\n /** Ref to the value element. */ ref?: Ref<HTMLSpanElement>;\n}\n/** Props for the select popover. */\nexport interface SelectPopoverProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Select listbox content. */ children: ReactNode;\n /** Ref to the popover. */ ref?: Ref<HTMLElement>;\n}\n/** Props for static or generic select options. */\nexport type SelectListBoxProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> &\n CollectionContentProps<Item> & {\n /** Empty-state content. */ emptyContent?: ReactNode;\n /** Ref to the listbox. */ ref?: Ref<HTMLDivElement>;\n };\n/** Props for one keyed select option. */ export type SelectItemProps =\n ListBoxItemProps;\n\n/** Coordinates select state, validation, and native form participation. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n invalid = false,\n name,\n onChange,\n placeholder,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<SelectRootProps>): ReactElement {\n useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n return createElement(AriaSelect, {\n ...props,\n allowsEmptyCollection: true,\n children,\n className: rootStyle({ class: className }),\n defaultSelectedKey: defaultValue,\n form,\n isDisabled: disabled || readOnly,\n isInvalid: invalid,\n isRequired: required,\n name,\n onSelectionChange: onChange,\n placeholder,\n ref: forwardedRef,\n selectedKey: value,\n } as unknown as ComponentProps<typeof AriaSelect>);\n}\n/** Renders the select trigger button. */\nexport function Trigger({\n children,\n className,\n ref,\n size,\n ...props\n}: Readonly<SelectTriggerProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaButton,\n {\n ...props,\n className: formControlValue({\n class: triggerStyle({ class: className }),\n size,\n }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaButton>,\n <>\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n <ChevronDownIcon\n className=\"ms-3 size-4 text-[var(--breeze-ink-muted)]\"\n data-breeze-select-indicator\n />\n </>,\n );\n}\n/** Renders selected option text or the placeholder. */\nexport function Value({\n className,\n ref,\n ...props\n}: Readonly<SelectValueProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n return createElement(AriaSelectValue, {\n ...props,\n className,\n ref: forwardedRef,\n });\n}\n/** Positions the select listbox relative to its trigger. */\nexport function Popover({\n className,\n ref,\n ...props\n}: Readonly<SelectPopoverProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n return createElement(AriaPopover, {\n ...props,\n className: popoverStyle({ class: className }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaPopover>);\n}\n/** Renders static or typed generic select options. */\nexport function ListBox<Item extends BreezeCollectionItem>({\n children,\n className,\n emptyContent,\n items,\n ref,\n ...props\n}: Readonly<SelectListBoxProps<Item>>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n\n return createElement(AriaListBox, {\n ...props,\n children,\n className: listStyle({ class: className }),\n items,\n ref: forwardedRef,\n renderEmptyState: () => resolvedEmptyContent,\n } as unknown as ComponentProps<typeof AriaListBox>);\n}\n\n/**\n * Accessible compound native-form select primitive.\n *\n * @summary compact single selection from a keyed option collection\n */\nexport const Select = {\n /** Supporting guidance associated with the select. */\n Description: TextField.Description,\n /** Validation feedback associated with the select. */\n Error: TextField.Error,\n /** One keyed option within `Select.ListBox`. */\n Item: BreezeListBox.Item,\n /** Visible label associated with the select trigger. */\n Label: TextField.Label,\n /** Static or typed generic option collection. */\n ListBox,\n /** Popup positioned relative to the trigger. */\n Popover,\n /** State, validation, and native-form coordination root. */\n Root,\n /** Button that opens and closes the option popup. */\n Trigger,\n /** Selected option text or placeholder content. */\n Value,\n};\n","import type { ElementType, HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst separator = tv({\n base: 'm-0 shrink-0 border-0 bg-current',\n defaultVariants: {\n orientation: 'horizontal',\n tone: 'default',\n },\n variants: {\n orientation: {\n horizontal: 'h-px w-full',\n vertical: 'h-full min-h-4 w-px self-stretch',\n },\n tone: {\n default: 'text-[var(--breeze-border)]',\n strong: 'text-[var(--breeze-border-strong)]',\n },\n },\n});\n\ntype SeparatorNativeProps = Omit<\n HTMLAttributes<HTMLElement>,\n 'aria-orientation' | 'children' | 'role' | 'style'\n>;\n\n/** Props for a visual or semantic divider between related regions. */\nexport interface SeparatorProps extends SeparatorNativeProps {\n /** Hides the divider from assistive technology. Defaults to `false`. */\n decorative?: boolean;\n /** Divider axis. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered HTML element. */\n ref?: Ref<HTMLElement>;\n /** Visual border emphasis. Defaults to `default`. */\n tone?: 'default' | 'strong';\n}\n\n/**\n * Separates related regions and exposes separator semantics unless marked as\n * decorative.\n *\n * @summary semantic or decorative horizontal and vertical divider\n */\nexport function Separator({\n className,\n decorative = false,\n orientation = 'horizontal',\n ref,\n tone,\n ...props\n}: Readonly<SeparatorProps>) {\n useBreezeContext();\n\n const Element: ElementType = orientation === 'horizontal' ? 'hr' : 'div';\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(Element, {\n ...props,\n 'aria-hidden': decorative || undefined,\n 'aria-orientation':\n !decorative && orientation === 'vertical' ? 'vertical' : undefined,\n className: separator({\n class: className,\n orientation,\n tone,\n }),\n ref: forwardedRef,\n role: decorative ? 'presentation' : 'separator',\n });\n}\n","import type { ComponentPropsWithoutRef, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst skeleton = tv({\n base: 'animate-pulse motion-reduce:animate-none forced-colors:border forced-colors:border-[CanvasText]',\n defaultVariants: {\n shape: 'text',\n tone: 'default',\n },\n variants: {\n shape: {\n circle: 'size-12 rounded-full',\n rectangle: 'min-h-16',\n text: 'h-3.5 w-full',\n },\n tone: {\n danger: 'bg-[var(--breeze-skeleton-danger)]',\n default: 'bg-[var(--breeze-skeleton)]',\n inverse: 'bg-[var(--breeze-skeleton-inverse)]',\n },\n },\n});\n\n/** Visual shapes supported by a loading skeleton. */\nexport type SkeletonShape = 'circle' | 'rectangle' | 'text';\n/** Semantic surface tones supported by loading placeholders. */\nexport type SkeletonTone = 'default' | 'inverse' | 'danger';\n/** Elements supported by a loading skeleton. */\nexport type SkeletonElement = 'div' | 'span';\n\ntype SkeletonElementNode<Element extends SkeletonElement> =\n Element extends 'span' ? HTMLSpanElement : HTMLDivElement;\n\n/** Props for a non-announcing visual loading placeholder. */\nexport type SkeletonProps<Element extends SkeletonElement = 'div'> = Omit<\n ComponentPropsWithoutRef<Element>,\n 'children' | 'role' | 'style'\n> & {\n /** Render as a `span` when the placeholder must sit inside text content. */\n as?: Element;\n /** Ref to the rendered placeholder element. */\n ref?: Ref<SkeletonElementNode<Element>>;\n /** Placeholder geometry. Defaults to `text`. */\n shape?: SkeletonShape;\n /** Surface-aware placeholder colour. Defaults to `default`. */\n tone?: SkeletonTone;\n};\n\n/**\n * Reserves loading layout without adding content to the accessibility tree.\n *\n * @summary non-announcing loading placeholder with canonical shapes\n */\nexport function Skeleton<Element extends SkeletonElement = 'div'>({\n as,\n className,\n ref,\n shape = 'text',\n tone = 'default',\n ...props\n}: Readonly<SkeletonProps<Element>>): ReactElement {\n useBreezeContext();\n\n const skeletonProps = {\n ...props,\n 'aria-hidden': 'true',\n className: skeleton({ class: className, shape, tone }),\n 'data-shape': shape,\n 'data-tone': tone,\n ref: useForwardedRef(ref),\n };\n\n return createElement(as ?? 'div', skeletonProps);\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n OutputHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport {\n createContext,\n createElement,\n useContext,\n useId,\n useMemo,\n useRef,\n} from 'react';\nimport {\n Slider as AriaSlider,\n SliderFill as AriaSliderFill,\n SliderOutput as AriaSliderOutput,\n SliderThumb as AriaSliderThumb,\n SliderTrack as AriaSliderTrack,\n} from 'react-aria-components/Slider';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { TextField, type TextFieldLabelProps } from '../TextField/TextField';\n\nconst sliderRoot = tv({\n base: 'flex min-w-0 gap-2 data-[disabled]:opacity-65',\n defaultVariants: {\n orientation: 'horizontal',\n },\n variants: {\n orientation: {\n horizontal: 'w-full flex-col',\n vertical:\n 'grid w-fit grid-cols-[minmax(0,1fr)_auto] items-start [&>[data-breeze-slider-description]]:col-span-2 [&>[data-breeze-slider-error]]:col-span-2 [&>[data-breeze-slider-label]]:col-start-1 [&>[data-breeze-slider-output]]:col-start-2 [&>[data-breeze-slider-track]]:col-span-2 [&>[data-breeze-slider-track]]:justify-self-center',\n },\n },\n});\n\nconst sliderOutput = tv({\n base: 'font-[family-name:var(--breeze-font-display)] text-sm font-bold tabular-nums text-[var(--breeze-ink)]',\n});\n\nconst sliderTrack = tv({\n base: 'relative rounded-full bg-[var(--breeze-border)] data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full data-[orientation=vertical]:my-3 data-[orientation=vertical]:h-64 data-[orientation=vertical]:w-2',\n});\n\nconst sliderFill = tv({\n base: 'absolute rounded-full bg-[var(--breeze-primary)] data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full',\n});\n\nconst sliderThumb = tv({\n base: 'left-1/2 top-1/2 rounded-full border-2 border-[var(--breeze-primary)] bg-[var(--breeze-surface)] shadow-sm transition-transform duration-[var(--breeze-duration-fast)] data-[dragging]:scale-110 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[orientation=horizontal]:top-1/2 data-[orientation=horizontal]:-translate-y-1/2 data-[orientation=vertical]:-translate-x-1/2',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-7',\n md: 'size-6',\n sm: 'size-5',\n },\n },\n});\n\nconst sliderDescription = tv({\n base: 'text-sm text-[var(--breeze-ink-soft)]',\n});\n\nconst sliderError = tv({\n base: 'text-sm font-medium text-[var(--breeze-danger)]',\n});\n\ninterface SliderContextValue {\n descriptionId: string;\n errorId: string;\n invalid: boolean;\n readOnly: boolean;\n required: boolean;\n}\n\nconst SliderContext = createContext<SliderContextValue | null>(null);\n\nfunction useSliderContext(): SliderContextValue {\n const context = useContext(SliderContext);\n\n if (context === null) {\n throw new globalThis.Error(\n 'Slider parts must be rendered within Slider.Root.',\n );\n }\n\n return context;\n}\n\ntype SliderRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface SliderRootSharedProps extends SliderRootNativeProps {\n /** Compound label, output, track, fill, thumb, description, and error parts. */\n children: ReactNode;\n /** Prevents focus, dragging, and value changes. Defaults to `false`. */\n disabled?: boolean;\n /** Locale-aware number formatting options. */\n formatOptions?: Intl.NumberFormatOptions;\n /** Exposes invalid state to the thumb input and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Largest permitted value. Defaults to `100`. */\n max?: number;\n /** Smallest permitted value. Defaults to `0`. */\n min?: number;\n /** Track and keyboard direction. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Called with the final value after a drag or keyboard sequence ends. */\n onChangeEnd?: (value: number) => void;\n /** Marks the native range input as required. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered slider group. */\n ref?: Ref<HTMLDivElement>;\n /** Keyboard and drag increment. Defaults to `1`. */\n step?: number;\n}\n\ninterface ControlledSliderRootProps {\n /** Current slider value. */\n value: number;\n /** Called with the next slider value. */\n onChange: (value: number) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlySliderRootProps {\n /** Current immutable slider value. */\n value: number;\n /** Marks a controlled value as intentionally immutable and non-interactive. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledSliderRootProps {\n /** Initial slider value. Defaults to the minimum value. */\n defaultValue?: number;\n /** Called with the next slider value. */\n onChange?: (value: number) => void;\n readOnly?: false;\n value?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled single-value slider state. */\nexport type SliderRootProps = SliderRootSharedProps &\n (\n | ControlledSliderRootProps\n | ReadOnlySliderRootProps\n | UncontrolledSliderRootProps\n );\n\n/** Props for the visible slider label. */\nexport type SliderLabelProps = TextFieldLabelProps;\n\n/** Props for the locale-formatted slider output. */\nexport interface SliderOutputProps\n extends Omit<OutputHTMLAttributes<HTMLOutputElement>, 'style'> {\n /** Optional custom output content. Defaults to the formatted current value. */\n children?: ReactNode;\n /** Ref to the rendered output. */\n ref?: Ref<HTMLOutputElement>;\n}\n\n/** Props for the interactive slider track. */\nexport interface SliderTrackProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Fill and thumb parts. */\n children: ReactNode;\n /** Ref to the rendered track. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for the selected-value track fill. */\nexport interface SliderFillProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Ref to the rendered fill. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for the draggable slider thumb and hidden native range input. */\nexport interface SliderThumbProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Accessible thumb name when the root label is insufficient. */\n 'aria-label'?: string;\n /** Associates the hidden range input with additional guidance. */\n 'aria-describedby'?: string;\n /** Associates the hidden native range input with an external form. */\n form?: string;\n /** Ref to the hidden native range input used for focus and form integration. */\n inputRef?: RefObject<HTMLInputElement | null>;\n /** Native form field name. */\n name?: string;\n /** Ref to the rendered draggable thumb. */\n ref?: Ref<HTMLDivElement>;\n /** Canonical thumb size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for supporting text associated with the slider thumb. */\nexport interface SliderDescriptionProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'style'> {\n /** Supporting guidance for the slider. */\n children: ReactNode;\n /** Ref to the rendered description. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Props for an accessible slider validation message. */\nexport interface SliderErrorProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'style'> {\n /** Validation message for the slider. */\n children: ReactNode;\n /** Ref to the rendered error message. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Coordinates a locale-aware, single-value slider and its compound anatomy. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n formatOptions,\n invalid = false,\n max,\n min,\n onChange,\n onChangeEnd,\n orientation = 'horizontal',\n readOnly = false,\n ref,\n required = false,\n step,\n value,\n ...props\n}: Readonly<SliderRootProps>): ReactElement {\n useBreezeContext();\n\n const generatedId = useId();\n const descriptionId = `${generatedId}-description`;\n const errorId = `${generatedId}-error`;\n const forwardedRef = useForwardedRef(ref);\n const contextValue = useMemo(\n () => ({ descriptionId, errorId, invalid, readOnly, required }),\n [descriptionId, errorId, invalid, readOnly, required],\n );\n\n return createElement(\n SliderContext.Provider,\n { value: contextValue },\n createElement(\n AriaSlider,\n {\n ...props,\n className: sliderRoot({ class: className, orientation }),\n defaultValue,\n formatOptions,\n isDisabled: disabled,\n maxValue: max,\n minValue: min,\n onChange,\n onChangeEnd,\n orientation,\n ref: forwardedRef,\n step,\n value,\n } as ComponentProps<typeof AriaSlider>,\n children,\n ),\n );\n}\n\n/** Renders the locale-formatted current Slider value. */\nexport function Output({\n className,\n ref,\n ...props\n}: Readonly<SliderOutputProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaSliderOutput, {\n ...props,\n className: sliderOutput({ class: className }),\n 'data-breeze-slider-output': true,\n ref: forwardedRef,\n } as SliderOutputProps & { 'data-breeze-slider-output': true });\n}\n\n/** Renders the pointer and touch interaction surface for a Slider. */\nexport function Track({\n className,\n ref,\n ...props\n}: Readonly<SliderTrackProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaSliderTrack, {\n ...props,\n className: sliderTrack({ class: className }),\n 'data-breeze-slider-track': true,\n ref: forwardedRef,\n } as SliderTrackProps & { 'data-breeze-slider-track': true });\n}\n\n/** Renders the persistent accessible label owned by the Slider. */\nexport function Label(props: Readonly<SliderLabelProps>): ReactElement {\n return createElement(TextField.Label, {\n ...props,\n 'data-breeze-slider-label': true,\n } as SliderLabelProps & { 'data-breeze-slider-label': true });\n}\n\n/** Renders the selected portion of a Slider track. */\nexport function Fill({\n className,\n ref,\n ...props\n}: Readonly<SliderFillProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaSliderFill, {\n ...props,\n className: sliderFill({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the draggable Slider thumb and hidden native range input. */\nexport function Thumb({\n 'aria-describedby': ariaDescribedBy,\n className,\n inputRef,\n ref,\n size,\n ...props\n}: Readonly<SliderThumbProps>): ReactElement {\n const { descriptionId, errorId, invalid, readOnly, required } =\n useSliderContext();\n const forwardedRef = useForwardedRef(ref);\n const fallbackInputRef = useRef<HTMLInputElement>(null);\n const describedBy = [\n ariaDescribedBy,\n descriptionId,\n invalid ? errorId : undefined,\n ]\n .filter(Boolean)\n .join(' ');\n\n return createElement(AriaSliderThumb, {\n ...props,\n 'aria-describedby': describedBy,\n className: sliderThumb({ class: className, size }),\n inputRef: inputRef ?? fallbackInputRef,\n isDisabled: readOnly,\n isInvalid: invalid,\n isRequired: required,\n ref: forwardedRef,\n } as ComponentProps<typeof AriaSliderThumb>);\n}\n\n/** Renders supporting guidance associated with a Slider thumb. */\nexport function Description({\n className,\n id,\n ref,\n ...props\n}: Readonly<SliderDescriptionProps>): ReactElement {\n const { descriptionId } = useSliderContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('p', {\n ...props,\n className: sliderDescription({ class: className }),\n 'data-breeze-slider-description': true,\n id: id ?? descriptionId,\n ref: forwardedRef,\n });\n}\n\n/** Renders a validation message associated with an invalid Slider thumb. */\nfunction ErrorMessage({\n className,\n id,\n ref,\n ...props\n}: Readonly<SliderErrorProps>): ReactElement {\n const { errorId } = useSliderContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('p', {\n ...props,\n className: sliderError({ class: className }),\n 'data-breeze-slider-error': true,\n id: id ?? errorId,\n ref: forwardedRef,\n });\n}\n\nexport { ErrorMessage as Error };\n\n/**\n * Coordinates a labelled, locale-aware single-value range with explicit\n * track, fill, thumb, output, description, and validation parts.\n *\n * @summary accessible compound single-value range input\n */\nexport const Slider = {\n /** Supporting guidance associated with the thumb. */\n Description,\n /** Validation message associated with an invalid thumb. */\n Error: ErrorMessage,\n /** Selected portion of the track. */\n Fill,\n /** Persistent accessible label. */\n Label,\n /** Locale-formatted current value. */\n Output,\n /** State, constraints, orientation, and accessibility root. */\n Root,\n /** Draggable thumb and hidden native range input. */\n Thumb,\n /** Pointer and touch interaction surface. */\n Track,\n};\n","import type { HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for content exposed to assistive technology but hidden visually. */\nexport interface VisuallyHiddenProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * Preserves accessible content while removing it from visual layout.\n *\n * @summary visually concealed span that remains available to assistive technology\n */\nexport function VisuallyHidden({\n className,\n ref,\n ...props\n}: Readonly<VisuallyHiddenProps>) {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n className: [\n 'absolute size-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]',\n className,\n ]\n .filter(Boolean)\n .join(' '),\n ref: forwardedRef,\n });\n}\n","import type {\n ComponentPropsWithRef,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useId } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize, VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden';\n\nconst spinner = tv({\n base: 'inline-block shrink-0 animate-spin rounded-full border-2 border-current border-e-transparent motion-reduce:animate-none forced-colors:border-[CanvasText] forced-colors:border-e-transparent',\n defaultVariants: {\n size: 'md',\n variant: 'primary',\n },\n variants: {\n size: {\n lg: 'size-8',\n md: 'size-6',\n sm: 'size-4',\n },\n variant: {\n danger: 'text-[var(--breeze-danger)]',\n dark: 'text-[var(--breeze-shell)]',\n info: 'text-[var(--breeze-info)]',\n light: 'text-[var(--breeze-surface)]',\n primary: 'text-[var(--breeze-primary)]',\n secondary: 'text-[var(--breeze-ink-soft)]',\n success: 'text-[var(--breeze-success)]',\n warning: 'text-[var(--breeze-warning)]',\n },\n },\n});\n\ntype SpinnerNativeProps = Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children' | 'role' | 'style'\n>;\n\n/** Props for a labelled or decorative activity spinner. */\nexport interface SpinnerProps extends SpinnerNativeProps {\n /** Application-owned translated status label. Omit for a decorative spinner. */\n label?: ReactNode;\n /** Ref to the rendered spinner element. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical spinner size. Defaults to `md`. */\n size?: ControlSize;\n /** Bootstrap-aligned semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\n/**\n * Indicates ongoing activity, announcing only an explicit translated label\n * and otherwise remaining decorative beside an existing status message.\n *\n * @summary labelled or decorative indeterminate activity indicator\n */\nexport function Spinner({\n className,\n label,\n ref,\n size = 'md',\n variant = 'primary',\n ...props\n}: Readonly<SpinnerProps>): ReactElement {\n useBreezeContext();\n\n const labelId = useId();\n const spinnerProps: ComponentPropsWithRef<'span'> & {\n 'data-variant': VisualVariant;\n } = {\n ...props,\n 'aria-hidden': label === undefined ? 'true' : undefined,\n 'aria-labelledby': label === undefined ? undefined : labelId,\n className: spinner({ class: className, size, variant }),\n 'data-variant': variant,\n ref: useForwardedRef(ref),\n role: label === undefined ? undefined : 'status',\n };\n\n return createElement(\n 'span',\n spinnerProps,\n label === undefined\n ? null\n : createElement(VisuallyHidden, { id: labelId }, label),\n );\n}\n","import { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport {\n gapClasses,\n type LayoutElementProps,\n type ResponsiveSpace,\n} from '../../internal/styling/layout';\nimport { resolveResponsiveClasses } from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst stack = tv({\n base: 'flex flex-col',\n defaultVariants: {\n align: 'stretch',\n justify: 'start',\n },\n variants: {\n align: {\n center: 'items-center',\n end: 'items-end',\n start: 'items-start',\n stretch: 'items-stretch',\n },\n justify: {\n between: 'justify-between',\n center: 'justify-center',\n end: 'justify-end',\n start: 'justify-start',\n },\n },\n});\n\n/** Props for a vertical layout of related content. */\nexport interface StackProps extends LayoutElementProps {\n /** Cross-axis alignment. Defaults to `stretch`. */\n align?: 'start' | 'center' | 'end' | 'stretch';\n /** Responsive space between children. Defaults to `md`. */\n gap?: ResponsiveSpace;\n /** Main-axis distribution. Defaults to `start`. */\n justify?: 'start' | 'center' | 'end' | 'between';\n}\n\n/**\n * Arranges children vertically with bounded alignment, distribution, and\n * responsive spacing while preserving authored reading order.\n *\n * @summary vertical layout with responsive bounded spacing\n */\nexport function Stack({\n align,\n className,\n gap = 'md',\n justify,\n ...props\n}: Readonly<StackProps>) {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: stack({\n align,\n class: [resolveResponsiveClasses(gap, gapClasses), className],\n justify,\n }),\n });\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst stepperRoot = tv({\n base: 'm-0 flex list-none gap-4 p-0',\n defaultVariants: { orientation: 'horizontal' },\n variants: {\n orientation: {\n horizontal: 'flex-row flex-wrap',\n vertical: 'flex-col',\n },\n },\n});\n\nconst stepperItem = tv({\n base: 'group flex min-w-0 flex-1 items-start gap-3 text-[var(--breeze-ink-soft)]',\n variants: {\n status: {\n complete: 'text-[var(--breeze-success)]',\n current: 'text-[var(--breeze-primary)]',\n upcoming: '',\n },\n },\n});\n\nconst stepperIndicator = tv({\n base: 'grid size-8 shrink-0 place-items-center rounded-full border-2 border-current font-[family-name:var(--breeze-font-display)] text-sm font-bold',\n variants: {\n status: {\n complete: 'bg-[var(--breeze-success)] text-white',\n current: 'bg-[var(--breeze-primary)] text-white',\n upcoming: 'bg-[var(--breeze-surface)]',\n },\n },\n});\n\n/** Semantic state of one progression step. */\nexport type StepperStatus = 'complete' | 'current' | 'upcoming';\n\n/** Props for an accessible ordered progression list. */\nexport interface StepperRootProps\n extends Omit<HTMLAttributes<HTMLOListElement>, 'style'> {\n /** Ordered Stepper.Item children. */\n children: ReactNode;\n /** Visual layout direction. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered ordered list. */\n ref?: Ref<HTMLOListElement>;\n}\n\n/** Props for one step in a progression. */\nexport interface StepperItemProps\n extends Omit<HTMLAttributes<HTMLLIElement>, 'style' | 'title'> {\n /** Optional supporting step description. */\n description?: ReactNode;\n /** Position or compact marker rendered in the indicator. */\n indicator: ReactNode;\n /** Ref to the rendered list item. */\n ref?: Ref<HTMLLIElement>;\n /** Completion state. */\n status: StepperStatus;\n /** Persistent visible step title. */\n title: ReactNode;\n}\n\n/** Renders a semantic ordered list describing multi-stage progress. */\nexport function Root({\n className,\n orientation = 'horizontal',\n ref,\n ...props\n}: Readonly<StepperRootProps>): ReactElement {\n useBreezeContext();\n\n return createElement('ol', {\n ...props,\n className: stepperRoot({ class: className, orientation }),\n ref: useForwardedRef(ref),\n role: 'list',\n });\n}\n\n/** Renders one completed, current, or upcoming progression step. */\nexport function Item({\n className,\n description,\n indicator,\n ref,\n status,\n title,\n ...props\n}: Readonly<StepperItemProps>): ReactElement {\n return createElement(\n 'li',\n {\n ...props,\n 'aria-current': status === 'current' ? 'step' : undefined,\n className: stepperItem({ class: className, status }),\n ref: useForwardedRef(ref),\n },\n <>\n <span aria-hidden=\"true\" className={stepperIndicator({ status })}>\n {indicator}\n </span>\n <span className=\"grid min-w-0 gap-1 pt-1\">\n <strong className=\"font-[family-name:var(--breeze-font-display)] text-base text-current\">\n {title}\n </strong>\n {description === undefined ? null : (\n <span className=\"text-base text-[var(--breeze-ink-soft)]\">\n {description}\n </span>\n )}\n </span>\n </>,\n );\n}\n\n/**\n * Describes application-owned multi-stage progress as an accessible ordered\n * list without owning navigation, validation, or persistence.\n *\n * @summary ordered progression with current-step semantics\n */\nexport const Stepper = {\n /** One completed, current, or upcoming stage. */\n Item,\n /** Ordered progression-list root. */\n Root,\n};\n","import type { ElementType, HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n paddingClasses,\n type ResponsiveSpace,\n} from '../../internal/styling/layout';\nimport { resolveResponsiveClasses } from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst surface = tv({\n defaultVariants: {\n border: 'default',\n tone: 'default',\n },\n variants: {\n border: {\n default: 'border border-b-2 border-[var(--breeze-border)]',\n none: 'border-0',\n strong: 'border border-b-2 border-[var(--breeze-border-strong)]',\n },\n tone: {\n canvas: 'bg-[var(--breeze-canvas)] text-[var(--breeze-ink)]',\n default: 'bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n inverse: 'bg-[var(--breeze-shell)] text-[var(--breeze-ink-inverse)]',\n subtle: 'bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink)]',\n },\n },\n});\n\ntype SurfaceElement = 'article' | 'div' | 'section';\n\n/** Props for a canonical Breeze background and inset container. */\nexport interface SurfaceProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Constrained semantic element. Defaults to `div`. */\n as?: SurfaceElement;\n /** Border emphasis. Defaults to `default`. */\n border?: 'none' | 'default' | 'strong';\n /** Responsive inset spacing. Defaults to `lg`. */\n padding?: ResponsiveSpace;\n /** Ref to the rendered HTML element. */\n ref?: Ref<HTMLElement>;\n /** Semantic surface colour treatment. Defaults to `default`. */\n tone?: 'default' | 'subtle' | 'canvas' | 'inverse';\n}\n\n/**\n * Renders a canonical background, border, and responsive inset treatment with\n * a constrained neutral or semantic section element.\n *\n * @summary canonical inset surface with bounded semantic elements\n */\nexport function Surface({\n as = 'div',\n border,\n className,\n padding = 'lg',\n ref,\n tone,\n ...props\n}: Readonly<SurfaceProps>) {\n useBreezeContext();\n\n const Element: ElementType = as;\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(Element, {\n ...props,\n className: surface({\n border,\n class: [resolveResponsiveClasses(padding, paddingClasses), className],\n tone,\n }),\n ref: forwardedRef,\n });\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n LabelHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport { createElement, useRef } from 'react';\nimport {\n SwitchButton as AriaSwitchButton,\n SwitchField as AriaSwitchField,\n} from 'react-aria-components/Switch';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n} from '../TextField/TextField';\n\nconst switchRoot = tv({\n base: 'flex min-w-0 flex-col gap-1',\n});\n\nconst switchControl = tv({\n base: 'group inline-flex min-h-11 w-fit cursor-pointer items-center gap-2 font-[family-name:var(--breeze-font-display)] text-sm font-bold text-[var(--breeze-ink)] data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55',\n});\n\nconst switchTrack = tv({\n base: 'inline-flex shrink-0 items-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] p-0.5 transition-colors duration-[var(--breeze-duration-fast)] group-data-[selected]:border-[var(--breeze-primary)] group-data-[selected]:bg-[var(--breeze-primary)]',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'h-7 w-12',\n md: 'h-6 w-10',\n sm: 'h-5 w-8',\n },\n },\n});\n\nconst switchThumb = tv({\n base: 'block translate-x-0 bg-[var(--breeze-ink-muted)] transition-[transform,background-color] duration-[var(--breeze-duration-fast)] group-data-[selected]:bg-white',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-5 group-data-[selected]:translate-x-5',\n md: 'size-4 group-data-[selected]:translate-x-4',\n sm: 'size-3 group-data-[selected]:translate-x-3',\n },\n },\n});\n\ntype SwitchRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface SwitchRootSharedProps extends SwitchRootNativeProps {\n /** Compound control, description, and error parts. */\n children: ReactNode;\n /** Prevents focus and state changes. Defaults to `false`. */\n disabled?: boolean;\n /** Associates the hidden native checkbox with an external form. */\n form?: string;\n /** Ref to the hidden native checkbox used for focus and form integration. */\n inputRef?: RefObject<HTMLInputElement | null>;\n /** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Native form field name. */\n name?: string;\n /** Marks the switch as required. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered field container. */\n ref?: Ref<HTMLDivElement>;\n /** Native submitted value when selected. Defaults to `on`. */\n value?: string;\n}\n\ninterface ControlledSwitchRootProps {\n /** Current selected state. */\n selected: boolean;\n /** Called with the next selected state. */\n onChange: (selected: boolean) => void;\n defaultSelected?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlySwitchRootProps {\n /** Current immutable selected state. */\n selected: boolean;\n /** Marks a controlled state as intentionally immutable. */\n readOnly: true;\n defaultSelected?: never;\n onChange?: never;\n}\n\ninterface UncontrolledSwitchRootProps {\n /** Initial selected state. Defaults to `false`. */\n defaultSelected?: boolean;\n /** Called with the next selected state. */\n onChange?: (selected: boolean) => void;\n readOnly?: false;\n selected?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled switch state. */\nexport type SwitchRootProps = SwitchRootSharedProps &\n (\n | ControlledSwitchRootProps\n | ReadOnlySwitchRootProps\n | UncontrolledSwitchRootProps\n );\n\n/** Props for the clickable switch control and native label. */\nexport interface SwitchControlProps\n extends Omit<\n LabelHTMLAttributes<HTMLLabelElement>,\n 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Track, thumb, and persistent label content. */\n children: ReactNode;\n /** Ref to the rendered native label. */\n ref?: Ref<HTMLLabelElement>;\n}\n\n/** Props for the visual switch track. */\nexport interface SwitchTrackProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Switch thumb. */\n children: ReactNode;\n /** Ref to the rendered track. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical track size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for the visual switch thumb. */\nexport interface SwitchThumbProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Ref to the rendered thumb. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical thumb size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for persistent visible switch label text. */\nexport interface SwitchLabelProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Text naming the switch. */\n children: ReactNode;\n /** Ref to the rendered label text. */\n ref?: Ref<HTMLSpanElement>;\n}\n\n/** Props for supporting text associated with the switch. */\nexport type SwitchDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible switch validation message. */\nexport type SwitchErrorProps = TextFieldErrorProps;\n\n/** Coordinates accessible switch state, validation, and native form participation. */\nexport function Root({\n children,\n className,\n defaultSelected,\n disabled = false,\n form,\n inputRef,\n invalid = false,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n selected,\n value,\n ...props\n}: Readonly<SwitchRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const fallbackInputRef = useRef<HTMLInputElement>(null);\n\n return createElement(\n AriaSwitchField,\n {\n ...props,\n className: switchRoot({ class: className }),\n defaultSelected,\n form,\n inputRef: inputRef ?? fallbackInputRef,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n isSelected: selected,\n name,\n onChange,\n ref: forwardedRef,\n value,\n } as ComponentProps<typeof AriaSwitchField>,\n children,\n );\n}\n\n/** Renders the pointer, touch, and keyboard switch target. */\nexport function Control({\n className,\n ref,\n ...props\n}: Readonly<SwitchControlProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaSwitchButton, {\n ...props,\n className: switchControl({ class: className }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaSwitchButton>);\n}\n\n/** Renders the visual switch track. */\nexport function Track({\n className,\n ref,\n size,\n ...props\n}: Readonly<SwitchTrackProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n 'aria-hidden': true,\n className: switchTrack({ class: className, size }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the visual switch thumb within Switch.Track. */\nexport function Thumb({\n className,\n ref,\n size,\n ...props\n}: Readonly<SwitchThumbProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n 'aria-hidden': true,\n className: switchThumb({ class: className, size }),\n ref: forwardedRef,\n });\n}\n\n/** Renders persistent visible label text within Switch.Control. */\nexport function Label({\n ref,\n ...props\n}: Readonly<SwitchLabelProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n ref: forwardedRef,\n });\n}\n\n/**\n * Coordinates a visible label, native switch semantics, Boolean state,\n * validation guidance, and checkbox form participation.\n *\n * @summary accessible compound Boolean setting control\n */\nexport const Switch = {\n /** Pointer, touch, and keyboard state-change target. */\n Control,\n /** Supporting guidance associated with the switch. */\n Description: TextField.Description,\n /** Validation message associated with an invalid switch. */\n Error: TextField.Error,\n /** Persistent visible label text. */\n Label,\n /** State, validation, and native form root. */\n Root,\n /** Visual switch thumb. */\n Thumb,\n /** Visual switch track. */\n Track,\n};\n","import type {\n ComponentProps,\n CSSProperties,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n TdHTMLAttributes,\n} from 'react';\nimport {\n Children,\n cloneElement,\n createContext,\n createElement,\n Fragment,\n isValidElement,\n useCallback,\n useContext,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n Cell as AriaCell,\n Column as AriaColumn,\n Row as AriaRow,\n Table as AriaTable,\n TableBody as AriaTableBody,\n TableFooter as AriaTableFooter,\n TableHeader as AriaTableHeader,\n TableLoadMoreItem as AriaTableLoadMoreItem,\n} from 'react-aria-components/Table';\nimport { tv } from 'tailwind-variants';\nimport { ArrowRightIcon } from '../../icons';\nimport encodeCollectionKey, {\n encodeCollectionKeys,\n} from '../../internal/collections/collectionKey';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useLoadMoreHandler from '../../internal/collections/useLoadMoreHandler';\nimport VirtualizedCollection, {\n collectionViewportStyle,\n} from '../../internal/collections/VirtualizedCollection';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport isBreezeSmallViewport from '../../internal/styling/breakpoints';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n CollectionSelection,\n CollectionVirtualization,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst responsiveTableLayout =\n '[&>tbody>tr]:relative [&>tbody>tr]:flex [&>tbody>tr]:flex-col [&>tbody>tr]:items-start [&>tbody>tr]:gap-2 [&>tbody>tr]:px-4 [&>tbody>tr]:py-4 [&>tfoot>tr]:relative [&>tfoot>tr]:flex [&>tfoot>tr]:flex-col [&>tfoot>tr]:items-start [&>tfoot>tr]:gap-2 [&>tfoot>tr]:px-4 [&>tfoot>tr]:py-4 [&>tbody>tr>td]:block [&>tbody>tr>td]:max-w-full [&>tbody>tr>td]:border-0 [&>tbody>tr>td]:p-0 [&>tfoot>tr>td]:block [&>tfoot>tr>td]:max-w-full [&>tfoot>tr>td]:border-0 [&>tfoot>tr>td]:p-0 sm:[&>thead>tr>th]:px-6 sm:[&>thead>tr>th]:py-3 sm:[&>thead>tr>th]:align-middle sm:[&>tbody>tr]:table-row sm:[&>tbody>tr]:border-0 sm:[&>tbody>tr]:p-0 sm:[&>tfoot>tr]:table-row sm:[&>tfoot>tr]:border-0 sm:[&>tfoot>tr]:p-0 sm:[&>tbody>tr>td]:table-cell sm:[&>tbody>tr>td]:border-b sm:[&>tbody>tr>td]:border-[var(--breeze-border)] sm:[&>tbody>tr>td]:px-6 sm:[&>tbody>tr>td]:py-3 sm:[&>tbody>tr>td]:align-middle sm:[&>tfoot>tr>td]:table-cell sm:[&>tfoot>tr>td]:border-b sm:[&>tfoot>tr>td]:border-[var(--breeze-border)] sm:[&>tfoot>tr>td]:px-6 sm:[&>tfoot>tr>td]:py-3 sm:[&>tfoot>tr>td]:align-middle';\n\nconst desktopGridTableLayout =\n 'sm:!grid sm:grid-cols-[var(--breeze-table-columns)] sm:gap-x-4 sm:[&>thead]:col-span-full sm:[&>thead]:!grid sm:[&>thead]:grid-cols-subgrid sm:[&>tbody]:col-span-full sm:[&>tbody]:!grid sm:[&>tbody]:grid-cols-subgrid sm:[&>tfoot]:col-span-full sm:[&>tfoot]:!grid sm:[&>tfoot]:grid-cols-subgrid sm:[&>thead>tr]:col-span-full sm:[&>thead>tr]:!grid sm:[&>thead>tr]:grid-cols-subgrid sm:[&>thead>tr]:items-center sm:[&>thead>tr]:gap-x-4 sm:[&>thead>tr]:px-6 sm:[&>thead>tr]:py-3 sm:[&>tbody>tr]:col-span-full sm:[&>tbody>tr]:!grid sm:[&>tbody>tr]:grid-cols-subgrid sm:[&>tbody>tr]:items-center sm:[&>tbody>tr]:gap-x-4 sm:[&>tbody>tr]:border-b sm:[&>tbody>tr]:border-[var(--breeze-border)] sm:[&>tbody>tr]:px-6 sm:[&>tbody>tr]:py-3 sm:[&>tfoot>tr]:col-span-full sm:[&>tfoot>tr]:!grid sm:[&>tfoot>tr]:grid-cols-subgrid sm:[&>tfoot>tr]:items-center sm:[&>tfoot>tr]:gap-x-4 sm:[&>tfoot>tr]:px-6 sm:[&>tfoot>tr]:py-3 sm:[&>thead>tr>th]:!flex sm:[&>thead>tr>th]:!h-auto sm:[&>thead>tr>th]:!w-full sm:[&>thead>tr>th]:items-center sm:[&>thead>tr>th]:!border-0 sm:[&>thead>tr>th]:!p-0 sm:[&>tbody>tr>td]:!flex sm:[&>tbody>tr>td]:!h-auto sm:[&>tbody>tr>td]:items-center sm:[&>tbody>tr>td]:!border-0 sm:[&>tbody>tr>td]:!p-0 sm:[&>tfoot>tr>td]:!flex sm:[&>tfoot>tr>td]:!h-auto sm:[&>tfoot>tr>td]:items-center sm:[&>tfoot>tr>td]:!border-0 sm:[&>tfoot>tr>td]:!p-0';\n\nconst compactGridTableLayout =\n '!grid grid-cols-[var(--breeze-table-compact-columns)] gap-x-4 [&>thead]:col-span-full [&>thead]:grid-cols-subgrid [&>tbody]:col-span-full [&>tbody]:grid [&>tbody]:grid-cols-subgrid [&>tfoot]:col-span-full [&>tfoot]:grid [&>tfoot]:grid-cols-subgrid [&>tbody>tr]:col-span-full [&>tbody>tr]:grid [&>tbody>tr]:min-h-11 [&>tbody>tr]:grid-cols-subgrid [&>tbody>tr]:items-center [&>tbody>tr]:px-4 [&>tbody>tr]:py-4 [&>tfoot>tr]:col-span-full [&>tfoot>tr]:grid [&>tfoot>tr]:min-h-11 [&>tfoot>tr]:grid-cols-subgrid [&>tfoot>tr]:items-center [&>tfoot>tr]:px-4 [&>tfoot>tr]:py-4 [&>tbody>tr>td]:block [&>tbody>tr>td]:!p-0 [&>tfoot>tr>td]:block [&>tfoot>tr>td]:!p-0 [&>tbody>tr]:border-b [&>tbody>tr]:border-[var(--breeze-border)] [&>tbody>tr>td]:border-0 [&>tfoot>tr>td]:border-0';\n\nconst responsiveGridColumnDefaults: Record<\n TableDesktopColumns,\n readonly string[]\n> = {\n equal: [],\n mediaDetailsAction: [\n 'max-content',\n 'minmax(0, 1.3fr)',\n 'minmax(0, 0.8fr)',\n 'minmax(0, 1.2fr)',\n 'max-content',\n ],\n};\n\nconst tableRoot = tv({\n base: 'group/table block w-full border-separate border-spacing-0 text-start text-[var(--breeze-ink)] outline-none sm:table [&>tbody:last-of-type>tr:last-child]:border-b-0 sm:[&>tbody:last-of-type>tr:last-child>td]:border-b-0 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n defaultVariants: {\n boundary: 'none',\n desktopColumns: 'equal',\n layout: 'responsive',\n virtualized: false,\n },\n variants: {\n boundary: {\n none: '',\n strong:\n 'min-w-0 border-b-2 border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)]',\n },\n desktopColumns: {\n equal: '',\n mediaDetailsAction: '',\n },\n layout: {\n grid: `${compactGridTableLayout} ${desktopGridTableLayout}`,\n responsive: responsiveTableLayout,\n responsiveGrid: `${responsiveTableLayout} ${desktopGridTableLayout}`,\n },\n virtualized: {\n false: '',\n true: 'overflow-auto sm:block',\n },\n },\n});\n\nconst tableHeader = tv({\n base: 'hidden bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink-muted)] sm:table-header-group',\n});\n\nconst tableColumn = tv({\n base: 'border-b border-[var(--breeze-border)] px-4 py-3 text-start font-[family-name:var(--breeze-font-display)] text-base font-bold outline-none data-[focus-visible]:outline-2 data-[focus-visible]:-outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[allows-sorting]:cursor-pointer forced-colors:border-[CanvasText]',\n defaultVariants: {\n align: 'start',\n },\n variants: {\n align: {\n center: 'text-center sm:justify-center',\n end: 'text-end sm:justify-end',\n start: 'text-start sm:justify-start',\n },\n },\n});\n\nconst tableBody = tv({\n base: 'block sm:table-row-group',\n});\n\nconst tableFooter = tv({\n base: 'block bg-[var(--breeze-surface-subtle)] sm:table-footer-group',\n});\n\nconst tableLoadMore = tv({\n base: 'flex min-h-11 items-center justify-center px-4 py-3 text-sm text-[var(--breeze-ink-muted)]',\n});\n\nconst tableRow = tv({\n base: 'grid min-w-0 border-b border-[var(--breeze-border)] bg-[var(--breeze-surface)] py-2 outline-none sm:table-row sm:border-0 sm:py-0 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[selected]:bg-[var(--breeze-primary-soft)] forced-colors:data-[selected]:border-[Highlight]',\n compoundVariants: [\n {\n actionable: true,\n class: 'data-[hovered]:bg-[var(--breeze-table-row-hover)]',\n presentation: 'data',\n tone: 'default',\n },\n {\n actionable: true,\n class: 'data-[hovered]:bg-[var(--breeze-table-row-muted-hover)]',\n presentation: 'data',\n tone: 'muted',\n },\n ],\n defaultVariants: {\n presentation: 'data',\n tone: 'default',\n },\n variants: {\n actionable: {\n false: '',\n true: 'cursor-pointer',\n },\n presentation: {\n data: '',\n section:\n 'min-h-11 items-center bg-[var(--breeze-table-section)] px-4 py-2 sm:bg-[var(--breeze-table-section)] sm:px-6 [&>td]:!h-auto [&>td]:!border-0 [&>td]:!p-0 [&>td]:before:!hidden',\n },\n tone: {\n default: '',\n muted: 'bg-[var(--breeze-table-row-muted)] text-[var(--breeze-neutral)]',\n },\n },\n});\n\nconst tableCell = tv({\n base: 'grid min-w-0 grid-cols-[minmax(5rem,auto)_minmax(0,1fr)] gap-4 border-b border-[var(--breeze-border)] px-4 py-2 text-start [overflow-wrap:anywhere] last:border-b-0 before:me-1 before:hidden before:font-[family-name:var(--breeze-font-display)] before:text-base before:leading-[1.4] before:font-bold before:text-[var(--breeze-ink-muted)] data-[label]:before:inline-block data-[label]:before:content-[attr(data-label)] max-sm:data-[breeze-compact-hidden]:!hidden sm:table-cell sm:border-b sm:border-[var(--breeze-border)] sm:px-4 sm:py-3 sm:last:border-b sm:data-[label]:before:hidden [&>*]:min-w-0',\n defaultVariants: {\n align: 'start',\n },\n variants: {\n align: {\n center: 'sm:text-center sm:justify-center',\n end: 'sm:text-end sm:justify-end',\n start: 'sm:text-start sm:justify-start',\n },\n presentation: {\n data: '',\n disclosure:\n 'absolute end-4 top-6 h-4 w-4 text-[var(--breeze-ink-muted)] sm:static sm:h-auto sm:w-5 sm:self-stretch sm:text-end [&>*]:ms-auto [&>svg]:size-4',\n },\n spanning: {\n true: '[grid-column:var(--breeze-table-compact-column-span)] sm:[grid-column:var(--breeze-table-column-span)]',\n },\n },\n});\n\n/** Consumer-owned table sort descriptor. */\nexport interface TableSort {\n /** Stable key of the sorted column. */\n column: CollectionKey;\n /** Current sort direction. */\n direction: 'ascending' | 'descending';\n}\n\n/** Supported structural table presentation modes. */\nexport type TableLayout = 'responsive' | 'responsiveGrid' | 'grid';\n\n/** Optional visual treatment for the table's lower edge. */\nexport type TableBoundary = 'none' | 'strong';\n\n/** Supported desktop column arrangements for responsive grid tables. */\nexport type TableDesktopColumns = 'equal' | 'mediaDetailsAction';\n\n/** CSS width or grid-track size for one table column. Numeric values are pixels. */\nexport type TableColumnWidth = NonNullable<CSSProperties['width']>;\n\n/** Domain-neutral emphasis applied to one data row. */\nexport type TableRowTone = 'default' | 'muted';\n\n/** Structural presentation for records and grouped section rows. */\nexport type TableRowPresentation = 'data' | 'section';\n\ntype TableRootNativeProps = Omit<\n HTMLAttributes<HTMLTableElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ntype CompactHiddenColumns =\n | CollectionKey\n | readonly CollectionKey[]\n | ReadonlySet<CollectionKey>;\n\ninterface TableRootSharedProps extends TableRootNativeProps {\n /** Optional visual treatment for the table's lower edge. Defaults to `none`. */\n boundary?: TableBoundary;\n /** Ordered header, body, and optional footer sections. */\n children: ReactNode;\n /** One key or reusable key collection omitted below the Breeze small breakpoint. */\n compactHiddenColumns?: CompactHiddenColumns;\n /** Keys whose rows cannot receive focus, selection, or actions. */\n disabledKeys?: Iterable<CollectionKey>;\n /** Typed desktop column arrangement for `responsiveGrid` layout. Defaults to `equal`. */\n desktopColumns?: TableDesktopColumns;\n /** Responsive native table, responsive desktop grid, or persistent CSS grid rows. Defaults to `responsive`. */\n layout?: TableLayout;\n /** Enables multiple row selection. Defaults to `false`. */\n multiple?: boolean;\n /** Ref to the rendered table or virtualized grid element. */\n ref?: Ref<HTMLElement>;\n /** Optional fixed- or variable-height row windowing configuration. */\n virtualization?: CollectionVirtualization;\n}\n\ninterface ControlledTableSelectionProps {\n /** Current selected row keys. */\n selection: CollectionSelection;\n /** Called with the next selected row keys. */\n onSelectionChange: (selection: CollectionSelection) => void;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Controlled mutable state cannot be marked read-only. */\n readOnly?: false;\n}\n\ninterface ReadOnlyTableSelectionProps {\n /** Current immutable selected row keys. */\n selection: CollectionSelection;\n /** Marks controlled row selection and sorting as intentionally immutable. */\n readOnly: true;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n}\n\ninterface UncontrolledTableSelectionProps {\n /** Initial selected row keys. Defaults to an empty selection. */\n defaultSelection?: CollectionSelection;\n /** Called with the next selected row keys. */\n onSelectionChange?: (selection: CollectionSelection) => void;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n /** Excluded when selection is uncontrolled. */\n selection?: never;\n}\n\ninterface ControlledTableSortProps {\n /** Current consumer-owned sort descriptor. */\n sort: TableSort;\n /** Called when a sortable heading requests a new descriptor. */\n onSortChange: (sort: TableSort) => void;\n /** Excluded when sorting is controlled. */\n defaultSort?: never;\n}\n\ninterface UncontrolledTableSortProps {\n /** Initial sort descriptor. */\n defaultSort?: TableSort;\n /** Called when the internally retained descriptor changes. */\n onSortChange?: (sort: TableSort) => void;\n /** Excluded when sorting is uncontrolled. */\n sort?: never;\n}\n\n/** Props for a controlled, read-only, or uncontrolled interactive table. */\nexport type TableRootProps = TableRootSharedProps &\n (\n | ControlledTableSelectionProps\n | ReadOnlyTableSelectionProps\n | UncontrolledTableSelectionProps\n ) &\n (ControlledTableSortProps | UncontrolledTableSortProps);\n\n/** Props for static or generic table columns. */\nexport type TableHeaderProps<\n Column extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLTableSectionElement>, 'children' | 'style'> &\n CollectionContentProps<Column> & {\n /** Stable key for this measurable ordered header section. */\n id?: CollectionKey;\n /** Ref to the rendered table header. */\n ref?: Ref<HTMLTableSectionElement>;\n };\n\n/** Props for one accessible table column heading. */\nexport interface TableColumnProps\n extends Omit<HTMLAttributes<HTMLTableCellElement>, 'align' | 'id' | 'style'> {\n /** Heading alignment. Defaults to `start`. */\n align?: 'start' | 'center' | 'end';\n /** Visible accessible column heading. */\n children: ReactNode;\n /** Derives a compact record label from this heading. Defaults to `true`. */\n compactLabel?: boolean;\n /** Stable string or number column key. */\n id: CollectionKey;\n /** Marks this heading as the row label announced during cell navigation. Defaults to `false`. */\n rowHeader?: boolean;\n /** Allows this heading to request sort changes. Defaults to `false`. */\n sortable?: boolean;\n /** Ref to the rendered column heading. */\n ref?: Ref<HTMLTableCellElement>;\n /** Plain-text accessible and compact label used when the visible heading is not a string. */\n textValue?: string;\n /** CSS width or grid-track size. Numeric values are pixels; omitted columns share remaining responsive-grid space. */\n width?: TableColumnWidth;\n}\n\n/** Props for a static or generic ordered table body section. */\nexport type TableBodyProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLTableSectionElement>, 'children' | 'style'> &\n CollectionContentProps<Item> & {\n /** Content displayed when this body has no rows. */\n emptyContent?: ReactNode;\n /** Stable key for this measurable ordered body section. */\n id?: CollectionKey;\n /** Ref to the rendered table body. */\n ref?: Ref<HTMLTableSectionElement>;\n };\n\n/** Props for a static or generic ordered table footer section. */\nexport type TableFooterProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLTableSectionElement>, 'children' | 'style'> &\n CollectionContentProps<Item> & {\n /** Stable key for this measurable ordered footer section. */\n id?: CollectionKey;\n /** Ref to the rendered table footer. */\n ref?: Ref<HTMLTableSectionElement>;\n };\n\n/** Props for one keyed table row. */\nexport interface TableRowProps\n extends Omit<\n HTMLAttributes<HTMLTableRowElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Ordered cells matching every visible table heading exactly once and in the same order, including after conditional column changes. */\n children: ReactNode;\n /** Prevents focus, selection, and actions for this row. Defaults to `false`. */\n disabled?: boolean;\n /** Stable string or number row key. */\n id: CollectionKey;\n /** Called with this row key when its action is invoked. */\n onAction?: (key: CollectionKey) => void;\n /** Record or grouped section geometry. Defaults to `data`. */\n presentation?: TableRowPresentation;\n /** Ref to the rendered row. */\n ref?: Ref<HTMLTableRowElement>;\n /** Plain-text row representation used for typeahead and accessibility. */\n textValue: string;\n /** Domain-neutral visual emphasis. Defaults to `default`. */\n tone?: TableRowTone;\n}\n\n/** Props for one table data cell. */\nexport interface TableCellProps\n extends Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n 'align' | 'id' | 'style'\n > {\n /** Cell alignment at table widths. Defaults to `start`. */\n align?: 'start' | 'center' | 'end';\n /** Visible cell content. */\n children: ReactNode;\n /** Stable key of the corresponding column heading. */\n column: CollectionKey;\n /** Canonical content geometry. `disclosure` positions one bare arrow for an actionable row. Defaults to `data`. */\n presentation?: 'data' | 'disclosure';\n /** Ref to the rendered data cell. */\n ref?: Ref<HTMLTableCellElement>;\n /** Plain-text cell value used for accessibility when content is not text. */\n textValue?: string;\n}\n\n/** Props for the canonical action indicator of an actionable row. */\nexport interface TableDisclosureProps\n extends Omit<TableCellProps, 'children' | 'presentation' | 'textValue'> {\n /** Position over a standard compact row or remain in an explicit grid track. Defaults to `overlay`. */\n position?: 'flow' | 'overlay';\n}\n\n/** Props for a table loading row and load-more sentinel. */\nexport interface TableLoadMoreProps\n extends Omit<HTMLAttributes<HTMLTableRowElement>, 'style'> {\n /** Visible loading-row content. */\n children: ReactNode;\n /** Shows the loading row and suppresses duplicate requests. Defaults to `false`. */\n loading?: boolean;\n /** Called once when more consumer-owned rows should be requested. */\n onLoadMore: () => void | Promise<void>;\n /** Trigger distance as a proportion of the scroll viewport. Defaults to `1`. */\n offset?: number;\n /** Ref to the rendered native or virtualized loading row. */\n ref?: Ref<HTMLTableRowElement | HTMLDivElement>;\n}\n\nfunction normaliseSelection(\n selection: 'all' | Set<CollectionKey>,\n): CollectionSelection {\n return selection === 'all' ? 'all' : [...selection];\n}\n\n/** Mirrors the HTML table-cell span range for derived CSS Grid geometry. */\nfunction normaliseColumnSpan(colSpan: number | undefined): number | undefined {\n if (colSpan === undefined) {\n return undefined;\n }\n\n if (!Number.isInteger(colSpan)) {\n return 1;\n }\n\n return Math.min(Math.max(colSpan, 1), 1000);\n}\n\nfunction serializeColumnWidth(\n width: TableColumnWidth | undefined,\n): string | undefined {\n return typeof width === 'number' ? `${width}px` : width;\n}\n\nfunction renderTableColumn({\n align = 'start',\n children,\n className,\n compactLabel = true,\n id,\n ref,\n rowHeader = false,\n sortable = false,\n textValue,\n width,\n ...props\n}: TableColumnProps): ReactElement {\n const serializedWidth = serializeColumnWidth(width);\n const inferredCompactLabel =\n typeof children === 'string' ? children.trim() : undefined;\n const compactLabelText = compactLabel\n ? textValue ?? inferredCompactLabel\n : undefined;\n\n return createElement(AriaColumn, {\n ...props,\n allowsSorting: sortable,\n children,\n className: tableColumn({\n align,\n class: className,\n }),\n 'data-breeze-column': String(id),\n 'data-breeze-column-key': encodeCollectionKey(id),\n 'data-breeze-column-width': serializedWidth,\n 'data-breeze-compact-label': String(compactLabel),\n 'data-breeze-compact-label-text': compactLabelText,\n id,\n isRowHeader: rowHeader,\n ref,\n style: serializedWidth === undefined ? undefined : { width },\n textValue,\n } as unknown as ComponentProps<typeof AriaColumn>);\n}\n\n/** Renders one accessible heading that can optionally request sorting. */\nexport function Column(props: Readonly<TableColumnProps>): ReactElement {\n return renderTableColumn(props);\n}\n\nfunction normaliseColumnElement(element: ReactNode): ReactNode {\n if (isValidElement<TableColumnProps>(element) && element.type === Column) {\n return renderTableColumn(element.props);\n }\n\n return element;\n}\n\n/** Renders static or generic accessible column headings. */\nexport function Header<Column extends BreezeCollectionItem>({\n children,\n className,\n id,\n items,\n ref,\n ...props\n}: Readonly<TableHeaderProps<Column>>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const renderedChildren =\n typeof children === 'function'\n ? (column: Column) => normaliseColumnElement(children(column))\n : Children.map(children, normaliseColumnElement);\n\n return createElement(AriaTableHeader, {\n ...props,\n children: renderedChildren,\n className: tableHeader({ class: className }),\n columns: items,\n 'data-section-key': id,\n dependencies: [children],\n ref: forwardedRef,\n } as unknown as ComponentProps<typeof AriaTableHeader>);\n}\n\nfunction resolveSelectionMode(\n enabled: boolean,\n multiple: boolean,\n): 'multiple' | 'none' | 'single' {\n if (!enabled) {\n return 'none';\n }\n\n return multiple ? 'multiple' : 'single';\n}\n\ninterface ResponsiveColumnMetadata {\n compactHidden: boolean;\n label: string | undefined;\n track: string;\n}\n\ninterface TableCellSpanStyle extends CSSProperties {\n '--breeze-table-column-span': string;\n '--breeze-table-compact-column-span': string;\n}\n\nconst emptyCompactHiddenColumns: readonly CollectionKey[] = [];\nconst emptyCompactHiddenColumnKeys: ReadonlySet<string> = new Set();\nconst emptyTableColumnKeys: readonly string[] = [];\nconst materializedTableHeaderItems = new WeakMap<\n object,\n readonly BreezeCollectionItem[]\n>();\nconst compactHiddenColumnsContext = createContext<ReadonlySet<string>>(\n emptyCompactHiddenColumnKeys,\n);\nconst tableColumnKeysContext =\n createContext<readonly string[]>(emptyTableColumnKeys);\n\nfunction staticTableColumnKeys(children: ReactNode): string[] {\n const keys: string[] = [];\n\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n return;\n }\n\n if (child.type === Column) {\n keys.push(encodeCollectionKey((child.props as TableColumnProps).id));\n } else if (child.type === Fragment) {\n keys.push(\n ...staticTableColumnKeys(\n (child.props as { children?: ReactNode }).children,\n ),\n );\n }\n });\n\n return keys;\n}\n\nfunction materializeTableHeaderItems(\n items: Iterable<BreezeCollectionItem>,\n): readonly BreezeCollectionItem[] {\n if (Array.isArray(items)) {\n return items as readonly BreezeCollectionItem[];\n }\n\n const iterator = items[Symbol.iterator]();\n\n if (!Object.is(iterator, items[Symbol.iterator]())) {\n return Array.from(items);\n }\n\n const cacheKey = items as object;\n const cachedItems = materializedTableHeaderItems.get(cacheKey);\n\n if (cachedItems !== undefined) {\n return cachedItems;\n }\n\n const materializedItems = Array.from(items);\n\n materializedTableHeaderItems.set(cacheKey, materializedItems);\n\n return materializedItems;\n}\n\nfunction normaliseTableHeaderItems(children: ReactNode): ReactNode {\n let changed = false;\n const normalisedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n if (child.type === Header) {\n const header = child as ReactElement<TableHeaderProps>;\n const { items } = header.props;\n\n if (items === undefined) {\n return child;\n }\n\n const materializedItems = materializeTableHeaderItems(items);\n\n if (Object.is(materializedItems, items)) {\n return child;\n }\n\n changed = true;\n\n return cloneElement(header, { items: materializedItems });\n }\n\n if (child.type === Fragment) {\n const fragment = child as ReactElement<{ children?: ReactNode }>;\n const normalisedFragmentChildren = normaliseTableHeaderItems(\n fragment.props.children,\n );\n\n if (Object.is(normalisedFragmentChildren, fragment.props.children)) {\n return child;\n }\n\n changed = true;\n\n return cloneElement(fragment, {\n children: normalisedFragmentChildren,\n });\n }\n\n return child;\n });\n\n return changed ? normalisedChildren : children;\n}\n\nfunction tableHeaderColumnKeys(\n header: ReactElement<TableHeaderProps>,\n): string[] {\n const { children, items } = header.props;\n\n if (items === undefined) {\n return staticTableColumnKeys(children);\n }\n\n return Array.from(items, ({ id }) => encodeCollectionKey(id));\n}\n\nfunction authoredTableColumnKeys(children: ReactNode): string[] {\n let keys: string[] = [];\n\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n return;\n }\n\n if (child.type === Header) {\n keys = tableHeaderColumnKeys(child as ReactElement<TableHeaderProps>);\n } else if (child.type === Fragment) {\n const nestedKeys = authoredTableColumnKeys(\n (child.props as { children?: ReactNode }).children,\n );\n\n if (nestedKeys.length > 0) {\n keys = nestedKeys;\n }\n }\n });\n\n return keys;\n}\n\nfunction readResponsiveColumnMetadata(\n root: HTMLElement | null,\n desktopColumns: TableDesktopColumns = 'equal',\n compactHiddenColumns: ReadonlySet<string> = emptyCompactHiddenColumnKeys,\n): Map<string, ResponsiveColumnMetadata> {\n if (root === null) {\n return new Map();\n }\n\n return new Map(\n [...root.querySelectorAll<HTMLElement>('[data-breeze-column]')]\n .filter((heading) =>\n heading.closest('[data-breeze-table]')?.isSameNode(root),\n )\n .flatMap((heading, index): [string, ResponsiveColumnMetadata][] => {\n const column = heading.dataset.breezeColumnKey;\n\n if (column === undefined) {\n return [];\n }\n\n const compactLabel =\n heading.dataset.breezeCompactLabel === 'false'\n ? undefined\n : heading.dataset.breezeCompactLabelText;\n\n return [\n [\n column,\n {\n compactHidden: compactHiddenColumns.has(column),\n label:\n compactLabel === undefined || compactLabel.length === 0\n ? undefined\n : `${compactLabel}:`,\n track:\n heading.dataset.breezeColumnWidth ??\n responsiveGridColumnDefaults[desktopColumns][index] ??\n 'minmax(0, 1fr)',\n },\n ],\n ];\n }),\n );\n}\n\ninterface CompactSpanMetadata {\n compactHidden: boolean | undefined;\n span: number;\n}\n\nfunction compactSpanMetadata(\n columnKey: string,\n colSpan: number,\n orderedColumns: readonly string[],\n isCompactHidden: (key: string) => boolean,\n): CompactSpanMetadata {\n const firstColumnIndex = orderedColumns.indexOf(columnKey);\n\n if (firstColumnIndex < 0) {\n return { compactHidden: undefined, span: colSpan };\n }\n\n const visibleColumns = orderedColumns\n .slice(firstColumnIndex, firstColumnIndex + colSpan)\n .filter((key) => !isCompactHidden(key)).length;\n\n return {\n compactHidden: visibleColumns === 0,\n span: Math.max(visibleColumns, 1),\n };\n}\n\nfunction syncResponsiveCells(\n root: HTMLElement | null,\n columns = readResponsiveColumnMetadata(root),\n): void {\n if (root === null) {\n return;\n }\n\n const orderedColumns = [...columns.keys()];\n const isCompactHidden = (key: string) =>\n columns.get(key)?.compactHidden ?? false;\n\n root\n .querySelectorAll<HTMLTableCellElement>('[data-breeze-cell-column]')\n .forEach((cell) => {\n if (!cell.closest('[data-breeze-table]')?.isSameNode(root)) {\n return;\n }\n\n const { dataset } = cell;\n const columnKey = dataset.breezeCellColumnKey ?? '';\n const column = columns.get(columnKey);\n const label = column?.label;\n const spanMetadata =\n cell.colSpan > 1\n ? compactSpanMetadata(\n columnKey,\n cell.colSpan,\n orderedColumns,\n isCompactHidden,\n )\n : null;\n const compactHidden =\n spanMetadata === null\n ? column?.compactHidden\n : spanMetadata.compactHidden;\n\n if (compactHidden === true) {\n dataset.breezeCompactHidden = '';\n } else if (compactHidden === false) {\n delete dataset.breezeCompactHidden;\n }\n\n if (label !== undefined && label.length > 0) {\n dataset.label = label;\n } else {\n delete dataset.label;\n }\n\n if (spanMetadata !== null) {\n cell.style.setProperty(\n '--breeze-table-compact-column-span',\n `span ${spanMetadata.span} / span ${spanMetadata.span}`,\n );\n }\n });\n}\n\nfunction serializeResponsiveGridTracks(\n columns: Map<string, ResponsiveColumnMetadata>,\n compact = false,\n): string | undefined {\n if (columns.size === 0) {\n return undefined;\n }\n\n return [...columns.values()]\n .filter(({ compactHidden }) => !compact || !compactHidden)\n .map(({ track }) => track)\n .join(' ');\n}\n\ninterface ResponsiveGridTracks {\n compact: string | undefined;\n full: string | undefined;\n}\n\nfunction syncResponsiveTableMetadata(\n root: HTMLElement | null,\n desktopColumns: TableDesktopColumns,\n compactHiddenColumns: ReadonlySet<string>,\n): ResponsiveGridTracks {\n const columns = readResponsiveColumnMetadata(\n root,\n desktopColumns,\n compactHiddenColumns,\n );\n\n syncResponsiveCells(root, columns);\n\n return {\n compact: serializeResponsiveGridTracks(columns, true),\n full: serializeResponsiveGridTracks(columns),\n };\n}\n\nconst compactHorizontalNavigationKeys = new Set([\n 'ArrowLeft',\n 'ArrowRight',\n 'End',\n 'Home',\n]);\n\ntype BrowserWindow = Window & typeof globalThis;\n\nfunction isOwnedTableElement(element: HTMLElement, root: HTMLElement): boolean {\n return element.closest('[data-breeze-table]')?.isSameNode(root) ?? false;\n}\n\nfunction closestTableCell(element: Element | null): HTMLElement | null {\n return element?.closest<HTMLElement>('[data-breeze-cell-column]') ?? null;\n}\n\nfunction navigationCell(\n event: KeyboardEvent,\n root: HTMLElement,\n view: BrowserWindow,\n): HTMLElement | null {\n const eventElement =\n event.target instanceof view.Element ? event.target : null;\n const activeElement =\n root.ownerDocument.activeElement instanceof view.Element\n ? root.ownerDocument.activeElement\n : null;\n const targetCell = closestTableCell(eventElement);\n const currentCell = targetCell ?? closestTableCell(activeElement);\n const origin = targetCell === null ? activeElement : eventElement;\n\n return currentCell !== null &&\n origin === currentCell &&\n isOwnedTableElement(currentCell, root)\n ? currentCell\n : null;\n}\n\nfunction rowTableCells(\n cell: HTMLElement,\n root: HTMLElement,\n view: BrowserWindow,\n): HTMLElement[] {\n const row = cell.closest<HTMLElement>('[role=\"row\"]');\n\n if (row === null) {\n return [];\n }\n\n return [\n ...row.querySelectorAll<HTMLElement>('[data-breeze-cell-column]'),\n ].filter(\n (candidate) =>\n candidate instanceof view.HTMLElement &&\n candidate.closest('[role=\"row\"]')?.isSameNode(row) === true &&\n isOwnedTableElement(candidate, root),\n );\n}\n\nfunction ownedTableCells(root: HTMLElement): HTMLElement[] {\n return [\n ...root.querySelectorAll<HTMLElement>('[data-breeze-cell-column]'),\n ].filter((cell) => isOwnedTableElement(cell, root));\n}\n\nfunction isCompactHiddenCell(cell: HTMLElement | undefined): boolean {\n return cell?.dataset.breezeCompactHidden !== undefined;\n}\n\ntype TableCellSelector = (\n cells: readonly HTMLElement[],\n) => HTMLElement | undefined;\n\nfunction firstTableCell(\n cells: readonly HTMLElement[],\n): HTMLElement | undefined {\n return cells[0];\n}\n\nfunction lastTableCell(cells: readonly HTMLElement[]): HTMLElement | undefined {\n return cells.at(-1);\n}\n\nfunction firstVisibleTableCell(\n cells: readonly HTMLElement[],\n): HTMLElement | undefined {\n return cells.find((cell) => !isCompactHiddenCell(cell));\n}\n\nfunction lastVisibleTableCell(\n cells: readonly HTMLElement[],\n): HTMLElement | undefined {\n return cells.findLast((cell) => !isCompactHiddenCell(cell));\n}\n\nconst tableCellSelectorsByBoundary = {\n End: {\n boundary: lastTableCell,\n visibleBoundary: lastVisibleTableCell,\n },\n Home: {\n boundary: firstTableCell,\n visibleBoundary: firstVisibleTableCell,\n },\n};\n\nfunction focusVirtualizedBoundary(\n root: HTMLElement,\n view: BrowserWindow,\n selectVisibleBoundary: TableCellSelector,\n): void {\n view.requestAnimationFrame(() => {\n selectVisibleBoundary(ownedTableCells(root))?.focus();\n });\n}\n\nfunction handleCompactBoundaryNavigation(\n event: KeyboardEvent,\n root: HTMLElement,\n view: BrowserWindow,\n rowCells: HTMLElement[],\n virtualized: boolean,\n selectors: Readonly<{\n boundary: TableCellSelector;\n visibleBoundary: TableCellSelector;\n }>,\n): void {\n const globally = event.ctrlKey || event.metaKey;\n\n if (globally && virtualized) {\n focusVirtualizedBoundary(root, view, selectors.visibleBoundary);\n return;\n }\n\n const candidateCells = globally ? ownedTableCells(root) : rowCells;\n\n if (!isCompactHiddenCell(selectors.boundary(candidateCells))) {\n return;\n }\n\n const nextCell = selectors.visibleBoundary(candidateCells);\n\n if (nextCell !== undefined) {\n event.preventDefault();\n view.queueMicrotask(() => nextCell.focus());\n }\n}\n\nfunction handleCompactArrowNavigation(\n event: KeyboardEvent,\n root: HTMLElement,\n view: BrowserWindow,\n currentCell: HTMLElement,\n cells: HTMLElement[],\n): void {\n const forwardsKey =\n view.getComputedStyle(root).direction === 'rtl'\n ? 'ArrowLeft'\n : 'ArrowRight';\n const increment = event.key === forwardsKey ? 1 : -1;\n const currentIndex = cells.indexOf(currentCell);\n\n if (!isCompactHiddenCell(cells[currentIndex + increment])) {\n return;\n }\n\n const followingCells =\n increment > 0\n ? cells.slice(currentIndex + 1)\n : cells.slice(0, currentIndex).reverse();\n const nextCell = followingCells.find((cell) => !isCompactHiddenCell(cell));\n\n event.preventDefault();\n view.queueMicrotask(() => nextCell?.focus());\n}\n\nfunction handleCompactHorizontalNavigation(\n event: KeyboardEvent,\n root: HTMLElement,\n virtualized: boolean,\n): void {\n if (!compactHorizontalNavigationKeys.has(event.key)) {\n return;\n }\n\n const view = root.ownerDocument.defaultView;\n\n if (view === null || !isBreezeSmallViewport(view)) {\n return;\n }\n\n const currentCell = navigationCell(event, root, view);\n\n if (currentCell === null) {\n return;\n }\n\n const cells = rowTableCells(currentCell, root, view);\n\n if (event.key === 'Home' || event.key === 'End') {\n handleCompactBoundaryNavigation(\n event,\n root,\n view,\n cells,\n virtualized,\n tableCellSelectorsByBoundary[event.key],\n );\n return;\n }\n\n handleCompactArrowNavigation(event, root, view, currentCell, cells);\n}\n\n/** Coordinates semantic table navigation, row state, sorting, and responsive labels. */\nexport function Root({\n boundary = 'none',\n children,\n className,\n compactHiddenColumns = emptyCompactHiddenColumns,\n defaultSelection,\n defaultSort,\n desktopColumns = 'equal',\n disabledKeys,\n layout = 'responsive',\n multiple = false,\n onSelectionChange,\n onSortChange,\n readOnly = false,\n ref,\n selection,\n sort,\n virtualization,\n ...props\n}: Readonly<TableRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const rootRef = useRef<HTMLElement | null>(null);\n const [internalSort, setInternalSort] = useState(defaultSort);\n const [gridTemplateColumns, setGridTemplateColumns] =\n useState<ResponsiveGridTracks>({ compact: undefined, full: undefined });\n const compactHiddenColumnKeys = useMemo(\n () => encodeCollectionKeys(compactHiddenColumns),\n [compactHiddenColumns],\n );\n const tableChildren = useMemo(\n () => normaliseTableHeaderItems(children),\n [children],\n );\n const tableColumnKeys = useMemo(\n () => authoredTableColumnKeys(tableChildren),\n [tableChildren],\n );\n const selectionEnabled =\n defaultSelection !== undefined ||\n multiple ||\n onSelectionChange !== undefined ||\n selection !== undefined;\n const resolvedSort = sort ?? internalSort;\n const compactNavigationListener = useCallback(\n (event: KeyboardEvent) => {\n const root = rootRef.current;\n\n if (root !== null) {\n handleCompactHorizontalNavigation(\n event,\n root,\n virtualization !== undefined,\n );\n }\n },\n [virtualization],\n );\n const tableRef = useCallback(\n (element: HTMLElement | null) => {\n rootRef.current?.removeEventListener(\n 'keydown',\n compactNavigationListener,\n true,\n );\n rootRef.current = element;\n element?.addEventListener('keydown', compactNavigationListener, true);\n forwardedRef(element);\n },\n [compactNavigationListener, forwardedRef],\n );\n\n useLayoutEffect(() => {\n const root = rootRef.current;\n\n if (root === null) {\n return () => undefined;\n }\n\n const syncTable = () => {\n const nextGridTemplateColumns = syncResponsiveTableMetadata(\n root,\n desktopColumns,\n compactHiddenColumnKeys,\n );\n\n setGridTemplateColumns((currentGridTemplateColumns) =>\n currentGridTemplateColumns.compact ===\n nextGridTemplateColumns.compact &&\n currentGridTemplateColumns.full === nextGridTemplateColumns.full\n ? currentGridTemplateColumns\n : nextGridTemplateColumns,\n );\n };\n\n syncTable();\n\n const observer = new MutationObserver(syncTable);\n\n observer.observe(root, {\n attributeFilter: [\n 'colspan',\n 'data-breeze-cell-column-key',\n 'data-breeze-column-width',\n 'data-breeze-compact-label',\n 'data-breeze-compact-label-text',\n ],\n attributes: true,\n childList: true,\n subtree: true,\n });\n\n return () => observer.disconnect();\n }, [tableChildren, compactHiddenColumnKeys, desktopColumns]);\n\n const viewportStyle = collectionViewportStyle(virtualization);\n const tableStyle =\n gridTemplateColumns.full === undefined && viewportStyle === undefined\n ? undefined\n : ({\n ...viewportStyle,\n '--breeze-table-columns': gridTemplateColumns.full,\n '--breeze-table-compact-columns': gridTemplateColumns.compact,\n } as CSSProperties);\n\n const table = createElement(AriaTable, {\n ...props,\n 'aria-readonly': readOnly || undefined,\n children: tableChildren,\n className: tableRoot({\n boundary,\n class: className,\n desktopColumns,\n layout,\n virtualized: virtualization !== undefined,\n }),\n 'data-boundary': boundary,\n 'data-breeze-table': '',\n 'data-layout': layout,\n 'data-virtualized': virtualization === undefined ? undefined : 'true',\n defaultSelectedKeys: defaultSelection,\n disabledKeys,\n onSelectionChange: (nextSelection: 'all' | Set<CollectionKey>) =>\n onSelectionChange?.(normaliseSelection(nextSelection)),\n onSortChange: readOnly\n ? undefined\n : (nextSort: {\n column: CollectionKey;\n direction: TableSort['direction'];\n }) => {\n const semanticSort = {\n column: nextSort.column,\n direction: nextSort.direction,\n };\n\n if (sort === undefined) {\n setInternalSort(semanticSort);\n }\n\n onSortChange?.(semanticSort);\n },\n ref: tableRef,\n selectedKeys: selection,\n selectionMode: resolveSelectionMode(selectionEnabled, multiple),\n sortDescriptor:\n resolvedSort === undefined\n ? undefined\n : {\n column: resolvedSort.column,\n direction: resolvedSort.direction,\n },\n style: tableStyle,\n } as unknown as ComponentProps<typeof AriaTable>);\n\n const renderedTable =\n virtualization === undefined\n ? table\n : createElement(\n VirtualizedCollection,\n {\n compactHiddenColumns: compactHiddenColumnKeys,\n configuration: virtualization,\n kind: 'table',\n },\n table,\n );\n\n return createElement(\n compactHiddenColumnsContext.Provider,\n { value: compactHiddenColumnKeys },\n createElement(\n tableColumnKeysContext.Provider,\n { value: tableColumnKeys },\n renderedTable,\n ),\n );\n}\n\n/** Renders a stable ordered table body with static or generic rows. */\nexport function Body<Item extends BreezeCollectionItem>({\n children,\n className,\n emptyContent,\n id,\n items,\n ref,\n ...props\n}: Readonly<TableBodyProps<Item>>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n\n return createElement(AriaTableBody, {\n ...props,\n children,\n className: tableBody({ class: className }),\n 'data-section-key': id,\n dependencies: [children],\n items,\n ref: forwardedRef,\n renderEmptyState: () => resolvedEmptyContent,\n } as unknown as ComponentProps<typeof AriaTableBody>);\n}\n\n/** Renders a stable ordered table footer with static or generic rows. */\nexport function Footer<Item extends BreezeCollectionItem>({\n children,\n className,\n id,\n items,\n ref,\n ...props\n}: Readonly<TableFooterProps<Item>>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaTableFooter, {\n ...props,\n children,\n className: tableFooter({ class: className }),\n 'data-section-key': id,\n dependencies: [children],\n items,\n ref: forwardedRef,\n } as unknown as ComponentProps<typeof AriaTableFooter>);\n}\n\n/** Renders one keyed row whose cells follow heading order. */\nexport function Row({\n 'aria-describedby': describedBy,\n className,\n disabled = false,\n id,\n onAction,\n presentation = 'data',\n ref,\n textValue,\n tone = 'default',\n ...props\n}: Readonly<TableRowProps>): ReactElement {\n const suppliedRef = useForwardedRef(ref);\n const forwardedRef = useCallback(\n (element: HTMLTableRowElement | null) => {\n suppliedRef(element);\n if (!element) {\n return;\n }\n\n if (describedBy) {\n element.setAttribute('aria-describedby', describedBy);\n } else {\n element.removeAttribute('aria-describedby');\n }\n },\n [describedBy, suppliedRef],\n );\n\n return createElement(AriaRow, {\n ...props,\n className: tableRow({\n actionable: onAction !== undefined,\n class: className,\n presentation,\n tone,\n }),\n 'data-presentation': presentation,\n 'data-tone': tone,\n id,\n isDisabled: disabled,\n onAction: onAction === undefined ? undefined : () => onAction(id),\n ref: forwardedRef,\n textValue,\n } as unknown as ComponentProps<typeof AriaRow>);\n}\n\n/** Renders one data cell and derives its compact label from the matching heading. */\nexport function Cell({\n align = 'start',\n className,\n column,\n colSpan,\n presentation = 'data',\n ref,\n textValue,\n ...props\n}: Readonly<TableCellProps>): ReactElement {\n const compactHiddenColumns = useContext(compactHiddenColumnsContext);\n const tableColumnKeys = useContext(tableColumnKeysContext);\n const forwardedRef = useForwardedRef(ref);\n const normalisedColSpan = normaliseColumnSpan(colSpan);\n const spanningColumnCount =\n normalisedColSpan !== undefined && normalisedColSpan > 1\n ? normalisedColSpan\n : undefined;\n const compactHidden = compactHiddenColumns.has(encodeCollectionKey(column));\n const compactSpan =\n spanningColumnCount === undefined\n ? null\n : compactSpanMetadata(\n encodeCollectionKey(column),\n spanningColumnCount,\n tableColumnKeys,\n (key) => compactHiddenColumns.has(key),\n );\n const spanStyle: TableCellSpanStyle | undefined =\n spanningColumnCount === undefined\n ? undefined\n : (() => {\n const span = `span ${spanningColumnCount} / span ${spanningColumnCount}`;\n const compactSpanValue =\n compactSpan === null\n ? span\n : `span ${compactSpan.span} / span ${compactSpan.span}`;\n\n return {\n '--breeze-table-column-span': span,\n '--breeze-table-compact-column-span': compactSpanValue,\n };\n })();\n const cellRef = useCallback(\n (element: HTMLTableCellElement | null) => {\n forwardedRef(element);\n const root = element?.closest<HTMLElement>('[data-breeze-table]') ?? null;\n\n syncResponsiveCells(\n root,\n readResponsiveColumnMetadata(root, undefined, compactHiddenColumns),\n );\n },\n [compactHiddenColumns, forwardedRef],\n );\n const isCompactHidden =\n (compactSpan === null ? compactHidden : compactSpan.compactHidden) === true;\n\n return createElement(AriaCell, {\n ...props,\n className: tableCell({\n align,\n class: className,\n presentation,\n spanning: spanningColumnCount !== undefined,\n }),\n colSpan: normalisedColSpan,\n 'data-breeze-cell-column': String(column),\n 'data-breeze-cell-column-key': encodeCollectionKey(column),\n 'data-breeze-compact-hidden': isCompactHidden ? '' : undefined,\n ref: cellRef,\n style: spanStyle,\n textValue,\n } as unknown as ComponentProps<typeof AriaCell>);\n}\n\n/** Renders the canonical bare arrow for an actionable row. */\nexport function Disclosure({\n position = 'overlay',\n ...props\n}: Readonly<TableDisclosureProps>): ReactElement {\n const cellProps: TableCellProps = {\n ...props,\n children: <ArrowRightIcon className=\"!block\" size={16} />,\n presentation: position === 'overlay' ? 'disclosure' : 'data',\n };\n\n return createElement(Cell, cellProps);\n}\n\n/** Renders a loading row and deduplicated intersection sentinel. */\nexport function LoadMore({\n className,\n loading = false,\n offset = 1,\n onLoadMore,\n ref,\n ...props\n}: Readonly<TableLoadMoreProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const handleLoadMore = useLoadMoreHandler({ loading, onLoadMore });\n const loadingRowRef = useRef<HTMLTableRowElement | HTMLDivElement | null>(\n null,\n );\n const semanticRef = useCallback(\n (element: HTMLTableRowElement | HTMLDivElement | null) => {\n loadingRowRef.current = element;\n element?.removeAttribute('aria-level');\n forwardedRef(element);\n },\n [forwardedRef],\n );\n\n useLayoutEffect(() => {\n loadingRowRef.current?.removeAttribute('aria-level');\n });\n\n return createElement(AriaTableLoadMoreItem, {\n ...props,\n className: tableLoadMore({ class: className }),\n isLoading: loading,\n onLoadMore: handleLoadMore,\n ref: semanticRef,\n scrollOffset: offset,\n });\n}\n\n/**\n * Coordinates ordered static or generic table sections, responsive record\n * labels, row interaction, consumer-owned sorting, and optional virtualization.\n *\n * @summary responsive compound data table with optional virtualization\n */\nexport const Table = {\n /** Ordered static or generic row section. */\n Body,\n /** One cell associated with a stable heading key. */\n Cell,\n /** One sortable or static accessible column heading. */\n Column,\n /** Canonical bare action indicator for an actionable row. */\n Disclosure,\n /** Ordered static or generic footer section. */\n Footer,\n /** Ordered static or generic heading section. */\n Header,\n /** Loading row and deduplicated load-more sentinel. */\n LoadMore,\n /** Interactive semantic table root. */\n Root,\n /** One keyed selectable or actionable row. */\n Row,\n};\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n TabPanel as AriaTabPanel,\n TabPanels as AriaTabPanels,\n Tabs as AriaTabs,\n} from 'react-aria-components/Tabs';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { CollectionKey } from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst tabsRoot = tv({\n base: 'flex gap-4',\n defaultVariants: { orientation: 'horizontal' },\n variants: {\n orientation: {\n horizontal: 'flex-col',\n vertical: 'flex-row items-start',\n },\n },\n});\nconst tabsList = tv({\n base: 'flex gap-1 border-[var(--breeze-border)]',\n defaultVariants: { orientation: 'horizontal' },\n variants: {\n orientation: {\n horizontal: 'flex-row border-b',\n vertical: 'flex-col border-e',\n },\n },\n});\nconst tab = tv({\n base: 'min-h-10 cursor-default px-3 py-2 font-semibold text-[var(--breeze-ink-muted)] outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[selected]:text-[var(--breeze-primary)]',\n});\nconst tabPanel = tv({\n base: 'min-w-0 outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n});\n\ntype TabsRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface TabsRootSharedProps extends TabsRootNativeProps {\n /** Tab list and panels. */\n children: ReactNode;\n /** Disables every tab. Defaults to `false`. */\n disabled?: boolean;\n /** Arrow-key and layout direction. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered tabs root. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledTabsRootProps {\n /** Current selected tab key. */\n value: CollectionKey;\n /** Called with the next selected tab key. */\n onChange: (value: CollectionKey) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyTabsRootProps {\n /** Current immutable selected tab key. */\n value: CollectionKey;\n /** Marks controlled selection as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledTabsRootProps {\n /** Initial selected tab key. */\n defaultValue?: CollectionKey;\n /** Called with the next selected tab key. */\n onChange?: (value: CollectionKey) => void;\n readOnly?: false;\n value?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled tab selection. */\nexport type TabsRootProps = TabsRootSharedProps &\n (ControlledTabsRootProps | ReadOnlyTabsRootProps | UncontrolledTabsRootProps);\n\n/** Props for the accessible list of tab labels. */\nexport interface TabsListProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Tab label parts. */\n children: ReactNode;\n /** Ref to the rendered tab list. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for one selectable tab label. */\nexport interface TabsTabProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Visible tab label. */\n children: ReactNode;\n /** Prevents focus and selection. Defaults to `false`. */\n disabled?: boolean;\n /** Stable string or number key matching its panel. */\n id: CollectionKey;\n /** Ref to the rendered tab. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for the optional grouping of tab panels. */\nexport interface TabsPanelsProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Tab panels. */\n children: ReactNode;\n /** Ref to the rendered panel group. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for content associated with one tab. */\nexport interface TabsPanelProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'style'> {\n /** Panel content. */\n children: ReactNode;\n /** Stable key matching its tab. */\n id: CollectionKey;\n /** Keeps inactive content mounted and inert. Defaults to `false`. */\n forceMount?: boolean;\n /** Ref to the rendered panel. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Coordinates tab selection, keyboard navigation, and panel visibility. */\nexport function Root({\n className,\n defaultValue,\n disabled = false,\n onChange,\n orientation = 'horizontal',\n readOnly: _readOnly,\n ref,\n value,\n ...props\n}: Readonly<TabsRootProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaTabs, {\n ...props,\n className: tabsRoot({ class: className, orientation }),\n defaultSelectedKey: defaultValue,\n isDisabled: disabled,\n onSelectionChange: onChange,\n orientation,\n ref: useForwardedRef(ref),\n selectedKey: value,\n });\n}\n\n/** Groups tab labels and inherits root orientation. */\nexport function List({\n className,\n ref,\n ...props\n}: Readonly<TabsListProps>): ReactElement {\n return createElement(AriaTabList, {\n ...props,\n className: ({ orientation }: { orientation: 'horizontal' | 'vertical' }) =>\n tabsList({ class: className, orientation }),\n ref: useForwardedRef(ref),\n });\n}\n\n/** Renders one keyed tab label. */\nexport function Tab({\n className,\n disabled = false,\n id,\n ref,\n ...props\n}: Readonly<TabsTabProps>): ReactElement {\n return createElement(AriaTab, {\n ...props,\n className: tab({ class: className }),\n id,\n isDisabled: disabled,\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaTab>);\n}\n\n/** Groups keyed panels for transition coordination. */\nexport function Panels({\n className,\n ref,\n ...props\n}: Readonly<TabsPanelsProps>): ReactElement {\n return createElement(AriaTabPanels, {\n ...props,\n className,\n ref: useForwardedRef(ref),\n });\n}\n\n/** Renders content associated with a keyed tab. */\nexport function Panel({\n className,\n forceMount = false,\n id,\n ref,\n ...props\n}: Readonly<TabsPanelProps>): ReactElement {\n return createElement(AriaTabPanel, {\n ...props,\n className: tabPanel({ class: className }),\n id,\n ref: useForwardedRef(ref),\n shouldForceMount: forceMount,\n });\n}\n\n/**\n * Coordinates keyed tab labels, orientation-aware keyboard navigation, and\n * visibility of their associated panels.\n *\n * @summary accessible compound tabbed content navigation\n */\nexport const Tabs = {\n /** List of selectable tab labels. */\n List,\n /** Content associated with one tab. */\n Panel,\n /** Optional panel collection wrapper. */\n Panels,\n /** Selection and orientation root. */\n Root,\n /** One keyed selectable label. */\n Tab,\n};\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Tag as AriaTag } from 'react-aria-components/TagGroup';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { CollectionKey } from '../../internal/types/collection';\n\nconst style = tv({\n base: 'inline-flex min-h-8 items-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] px-3 text-sm outline-none data-[focused]:outline-2 data-[selected]:border-[var(--breeze-primary)] data-[selected]:bg-[var(--breeze-primary-soft)] data-[disabled]:opacity-45',\n});\n/** Props for one keyed tag. */ export interface TagProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'onClick' | 'style'> {\n /** Visible tag content. */ children: ReactNode;\n /** Prevents focus, selection, actions, and removal. Defaults to `false`. */ disabled?: boolean;\n /** Stable tag key. */ id: CollectionKey;\n /** Called with this tag key when its semantic action is invoked. */ onAction?: (\n key: CollectionKey,\n ) => void;\n /** Ref to the rendered tag. */ ref?: Ref<HTMLDivElement>;\n /** Plain text for accessibility/typeahead. */ textValue: string;\n}\n/**\n * Renders one keyed, focusable tag for selection, semantic actions, or removal\n * by its containing TagGroup.\n *\n * @summary keyed interactive item for a tag collection\n */\nexport function Tag({\n className,\n disabled = false,\n id,\n onAction,\n ref,\n ...props\n}: Readonly<TagProps>): ReactElement {\n const r = useForwardedRef(ref);\n return createElement(AriaTag, {\n ...props,\n className: style({ class: className }),\n id,\n isDisabled: disabled,\n onAction: onAction ? () => onAction(id) : undefined,\n ref: r,\n textValue: props.textValue,\n } as ComponentProps<typeof AriaTag>);\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n TagGroup as AriaTagGroup,\n TagList as AriaTagList,\n} from 'react-aria-components/TagGroup';\nimport { tv } from 'tailwind-variants';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n CollectionSelection,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst root = tv({ base: 'flex min-w-0 flex-col gap-2' });\nconst list = tv({ base: 'flex flex-wrap gap-2 outline-none' });\ninterface Shared\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'onChange' | 'style'\n > {\n /** Compound label, tag list, and supporting guidance parts. */ children: ReactNode;\n /** Keys whose tags cannot receive focus, selection, actions, or removal. */ disabledKeys?: Iterable<CollectionKey>;\n /** Called with the stable keys removed through keyboard interaction. */ onRemove?: (\n keys: CollectionKey[],\n ) => void;\n /** Ref to the rendered tag-group root. */ ref?: Ref<HTMLDivElement>;\n}\ntype State =\n | {\n /** Current selected tag keys, or every key for select-all state. */\n selection: CollectionSelection;\n /** Called with the next selected tag keys. */\n onSelectionChange: (selection: CollectionSelection) => void;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Controlled mutable state cannot be marked read-only. */\n readOnly?: false;\n }\n | {\n /** Current immutable selected tag keys. */\n selection: CollectionSelection;\n /** Prevents selection changes and removal. */\n readOnly: true;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n }\n | {\n /** Initial selected tag keys. */\n defaultSelection?: CollectionSelection;\n /** Called with the next selected tag keys. */\n onSelectionChange?: (selection: CollectionSelection) => void;\n /** Excluded when selection is uncontrolled. */\n selection?: never;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n };\n/** Tag-group selection and removal props. */ export type TagGroupRootProps =\n Shared & State;\n/** Props for the visible tag-group label. */ export type TagGroupLabelProps =\n TextFieldLabelProps;\n/** Props for supporting tag-group guidance. */ export type TagGroupDescriptionProps =\n TextFieldDescriptionProps;\n/** Static or generic tag list props. */ export type TagGroupListProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> &\n CollectionContentProps<Item> & {\n /** Content displayed when the tag collection has no items. */ emptyContent?: ReactNode;\n /** Ref to the rendered tag-list element. */ ref?: Ref<HTMLDivElement>;\n };\nconst normalise = (value: 'all' | Set<CollectionKey>): CollectionSelection =>\n value === 'all' ? 'all' : [...value];\n/** Coordinates tag selection, focus, and removal. */ export function Root({\n children,\n className,\n defaultSelection,\n disabledKeys,\n onRemove,\n onSelectionChange,\n readOnly = false,\n ref,\n selection,\n ...props\n}: Readonly<TagGroupRootProps>): ReactElement {\n useBreezeContext();\n const r = useForwardedRef(ref);\n return createElement(AriaTagGroup, {\n ...props,\n children,\n className: root({ class: className }),\n defaultSelectedKeys: defaultSelection,\n disabledKeys,\n onRemove:\n readOnly || !onRemove\n ? undefined\n : (keys: Set<CollectionKey>) => onRemove([...keys]),\n onSelectionChange: readOnly\n ? undefined\n : (keys: 'all' | Set<CollectionKey>) =>\n onSelectionChange?.(normalise(keys)),\n ref: r,\n selectedKeys: selection,\n selectionMode:\n selection !== undefined ||\n defaultSelection !== undefined ||\n onSelectionChange !== undefined\n ? 'multiple'\n : 'none',\n } as unknown as ComponentProps<typeof AriaTagGroup>);\n}\n/** Renders static or typed generic tags. */ export function List<\n Item extends BreezeCollectionItem,\n>({\n children,\n className,\n emptyContent,\n items,\n ref,\n ...props\n}: Readonly<TagGroupListProps<Item>>): ReactElement {\n const r = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n\n return createElement(AriaTagList, {\n ...props,\n children,\n className: list({ class: className }),\n items,\n ref: r,\n renderEmptyState: () => resolvedEmptyContent,\n } as unknown as ComponentProps<typeof AriaTagList>);\n}\n/**\n * Coordinates a labelled static or generic tag collection with optional\n * multiple selection, disabled keys, and application-owned removal.\n *\n * @summary accessible selectable and removable tag collection\n */\nexport const TagGroup = {\n /** Supporting guidance associated with the tag group. */ Description:\n TextField.Description,\n /** Visible label associated with the tag list. */ Label: TextField.Label,\n /** Static or typed generic tag collection. */ List,\n /** Selection, focus, and removal coordination root. */ Root,\n};\n","import type { ReactElement, Ref, TextareaHTMLAttributes } from 'react';\nimport { createElement } from 'react';\nimport { TextArea as AriaTextArea } from 'react-aria-components/TextField';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n type TextFieldRootProps,\n} from '../TextField/TextField';\n\nconst textAreaControl = tv({\n base: 'block w-full resize-y border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)] transition-colors duration-[var(--breeze-duration-fast)] placeholder:text-[var(--breeze-ink-muted)] disabled:cursor-not-allowed disabled:bg-[var(--breeze-surface-subtle)] disabled:opacity-70 aria-invalid:border-[var(--breeze-danger)]',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-32 px-4 py-3 text-base',\n md: 'min-h-24 px-3 py-2 text-sm',\n sm: 'min-h-20 px-2.5 py-1.5 text-xs',\n },\n },\n});\n\n/** Props for controlled, read-only, or uncontrolled multiline field state. */\nexport type TextAreaRootProps = TextFieldRootProps;\n\n/** Props for the visible multiline field label. */\nexport type TextAreaLabelProps = TextFieldLabelProps;\n\n/** Props for supporting text associated with the multiline control. */\nexport type TextAreaDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible multiline validation message. */\nexport type TextAreaErrorProps = TextFieldErrorProps;\n\n/** Props for the native multiline control part. */\nexport interface TextAreaControlProps\n extends Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n | 'children'\n | 'className'\n | 'defaultValue'\n | 'disabled'\n | 'onChange'\n | 'readOnly'\n | 'required'\n | 'style'\n | 'value'\n > {\n /** Placement and composition classes. */\n className?: string;\n /** Ref to the rendered textarea. */\n ref?: Ref<HTMLTextAreaElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Renders the editable native multiline control for a TextArea. */\nexport function Control({\n className,\n ref,\n size,\n ...props\n}: Readonly<TextAreaControlProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaTextArea, {\n ...props,\n className: textAreaControl({ class: className, size }),\n ref: forwardedRef,\n });\n}\n\n/**\n * Accessible compound multiline text-entry primitive.\n *\n * @summary labelled multiline text entry with validation anatomy\n */\nexport const TextArea = {\n /** Editable native multiline control. */\n Control,\n /** Supporting guidance associated with the control. */\n Description: TextField.Description,\n /** Validation message associated with an invalid control. */\n Error: TextField.Error,\n /** Persistent accessible label. */\n Label: TextField.Label,\n /** State and accessibility root. */\n Root: TextField.Root,\n};\n","import type { Time } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { TimeField as AriaTimeField } from 'react-aria-components/TimeField';\nimport { tv } from 'tailwind-variants';\nimport {\n formatTimeValue,\n parseTimeValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { DateInputPart, type DateInputPartProps } from '../date/DateInput';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst rootStyle = tv({ base: 'flex min-w-0 flex-col gap-1.5' });\ntype NativeRootProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\ninterface SharedProps extends NativeRootProps {\n /** Compound label, segmented input, description, and error parts. */ children: ReactNode;\n /** Prevents focus and time editing. Defaults to `false`. */ disabled?: boolean;\n /** Associates the hidden native time input with an external form. */ form?: string;\n /** Hidden native time input ref used for form integration. */ inputRef?: Ref<HTMLInputElement>;\n /** Exposes invalid state. Defaults to `false`. */ invalid?: boolean;\n /** Latest selectable `HH:mm` or `HH:mm:ss` time. */ maxValue?: string;\n /** Earliest selectable `HH:mm` or `HH:mm:ss` time. */ minValue?: string;\n /** Native form field name for the stable time string. */ name?: string;\n /** Marks the time as required. Defaults to `false`. */ required?: boolean;\n /** Ref to the rendered time-field root. */ ref?: Ref<HTMLDivElement>;\n}\ntype State =\n | {\n /** Current controlled time, or `null` when empty. */ value:\n | string\n | null;\n /** Called with the next stable time string or `null`. */ onChange: (\n value: string | null,\n ) => void;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Mutable state cannot be read-only. */ readOnly?: false;\n }\n | {\n /** Current immutable time, or `null` when empty. */ value: string | null;\n /** Prevents changes to the controlled time. */ readOnly: true;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Excluded because read-only times cannot change. */ onChange?: never;\n }\n | {\n /** Initial uncontrolled time, or `null` when empty. */ defaultValue?:\n | string\n | null;\n /** Called with the next stable time string or `null`. */ onChange?: (\n value: string | null,\n ) => void;\n /** Uncontrolled state cannot be read-only. */ readOnly?: false;\n /** Excluded when uncontrolled. */ value?: never;\n };\n/** Props for controlled, uncontrolled, or read-only stable time state. */\nexport type TimeFieldRootProps = SharedProps & State;\n/** Props for the visible time-field label. */\nexport type TimeFieldLabelProps = TextFieldLabelProps;\n/** Props for the segmented time input. */\nexport type TimeFieldInputProps = DateInputPartProps;\n/** Props for supporting time-field guidance. */\nexport type TimeFieldDescriptionProps = TextFieldDescriptionProps;\n/** Props for a time-field validation message. */\nexport type TimeFieldErrorProps = TextFieldErrorProps;\n\n/** Coordinates stable time strings with locale-aware editable segments. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n inputRef,\n invalid = false,\n maxValue,\n minValue,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<TimeFieldRootProps>): ReactElement {\n useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const forwardedInputRef = useForwardedRef(inputRef);\n const hasSeconds = [value, defaultValue, minValue, maxValue].some(\n (candidate) => candidate?.split(':').length === 3,\n );\n\n return createElement(AriaTimeField, {\n ...props,\n children,\n className: rootStyle({ class: className }),\n defaultValue: parseTimeValue(defaultValue ?? null) ?? undefined,\n form,\n granularity: hasSeconds ? 'second' : 'minute',\n inputRef: forwardedInputRef,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: parseTimeValue(maxValue ?? null) ?? undefined,\n minValue: parseTimeValue(minValue ?? null) ?? undefined,\n name,\n onChange: readOnly\n ? undefined\n : (time: Time | null) => onChange?.(formatTimeValue(time)),\n ref: forwardedRef,\n value: value === undefined ? undefined : parseTimeValue(value),\n } as unknown as ComponentProps<typeof AriaTimeField>);\n}\n/**\n * Accessible compound time field with stable string values.\n *\n * @summary locale-aware segmented entry for one stable time value\n */\nexport const TimeField = {\n /** Supporting guidance associated with the time field. */ Description:\n TextField.Description,\n /** Validation feedback associated with the time field. */ Error:\n TextField.Error,\n /** Locale-aware editable time segments. */ Input: DateInputPart,\n /** Visible label associated with the segmented input. */ Label:\n TextField.Label,\n /** Stable time state, constraints, validation, and form root. */ Root,\n};\n","import type {\n ComponentProps,\n ComponentPropsWithRef,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport {\n createContext,\n createElement,\n useContext,\n useEffect,\n useId,\n useMemo,\n} from 'react';\nimport type { QueuedToast } from 'react-aria-components/Toast';\nimport {\n Button as AriaButton,\n Text as AriaText,\n UNSTABLE_Toast as AriaToast,\n UNSTABLE_ToastContent as AriaToastContent,\n UNSTABLE_ToastQueue as AriaToastQueue,\n UNSTABLE_ToastRegion as AriaToastRegion,\n} from 'react-aria-components/Toast';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst DEFAULT_LIFETIME = 5000;\n\nconst toastSurface = tv({\n base: 'grid min-w-72 max-w-md grid-cols-[minmax(0,1fr)_auto] gap-x-3 gap-y-2 border border-s-4 px-4 py-3 text-sm shadow-lg outline-none forced-colors:border-[CanvasText] data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--breeze-focus)]',\n defaultVariants: {\n variant: 'info',\n },\n variants: {\n variant: {\n danger:\n 'border-[var(--breeze-danger)] bg-[var(--breeze-danger-soft)] text-[var(--breeze-ink)]',\n dark: 'border-[var(--breeze-shell)] bg-[var(--breeze-shell)] text-white',\n info: 'border-[var(--breeze-info)] bg-[var(--breeze-info-soft)] text-[var(--breeze-ink)]',\n light:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n primary:\n 'border-[var(--breeze-primary)] bg-[var(--breeze-primary-soft)] text-[var(--breeze-ink)]',\n secondary:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink)]',\n success:\n 'border-[var(--breeze-success)] bg-[var(--breeze-success-soft)] text-[var(--breeze-ink)]',\n warning:\n 'border-[var(--breeze-warning)] bg-[var(--breeze-warning-soft)] text-[var(--breeze-ink)]',\n },\n },\n});\nconst toastRegion = tv({\n base: 'fixed inset-block-start-4 inset-inline-end-4 z-50 grid max-h-[calc(100dvh-2rem)] gap-3 overflow-auto outline-none',\n});\nconst toastContent = tv({ base: 'contents' });\nconst toastCopy = tv({ base: 'grid min-w-0 gap-1' });\nconst toastTitle = tv({ base: 'font-semibold' });\nconst toastDescription = tv({ base: 'text-current/80' });\nconst toastAction = tv({\n base: 'inline-flex min-h-11 items-center justify-self-start font-semibold underline underline-offset-2 outline-none hover:no-underline focus-visible:ring-2 focus-visible:ring-current',\n});\nconst toastClose = tv({\n base: 'col-start-2 row-start-1 grid size-11 place-items-center self-start rounded-sm text-xl leading-none outline-none hover:bg-black/10 focus-visible:ring-2 focus-visible:ring-current forced-colors:border forced-colors:border-[ButtonText]',\n});\n\n/** Application action shown within a toast. */\nexport interface ToastAction {\n /** Application-owned translated action label. */\n label: ReactNode;\n /** Called once when the action is activated. */\n onAction: () => void;\n}\n\n/** Content and lifecycle options for a queued toast. */\nexport interface ToastOptions {\n /** Optional action that dismisses the toast after activation. */\n action?: ToastAction;\n /** Optional application-owned translated supporting content. */\n description?: ReactNode;\n /** Auto-dismiss delay in finite non-negative milliseconds; `0` dismisses immediately and `null` persists. Defaults to `5000`. */\n lifetime?: number | null;\n /** Called once when the toast is dismissed, except during provider teardown. */\n onDismiss?: () => void;\n /** Application-owned translated primary content. */\n title: ReactNode;\n /** Bootstrap-aligned semantic colour. Defaults to `info`. */\n variant?: VisualVariant;\n}\n\n/** Provider-scoped commands for showing and dismissing toasts. */\nexport interface ToastController {\n /** Dismisses the toast with the returned queue identifier. */\n dismiss: (id: string) => void;\n /** Adds a toast and returns its provider-scoped queue identifier. */\n show: (options: ToastOptions) => string;\n}\n\ninterface ToastContentData {\n action: ToastAction | undefined;\n description: ReactNode | undefined;\n title: ReactNode;\n variant: VisualVariant;\n}\n\ninterface ToastContextValue {\n closeLabel: string;\n controller: ToastController;\n queue: AriaToastQueue<ToastContentData>;\n regionLabel: string;\n}\n\nconst ToastContext = createContext<ToastContextValue | null>(null);\n\ntype ToastNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'role' | 'style' | 'title'\n>;\n\n/** Props for rendering an individually controlled toast. Prefer `useToast` for queued application notifications. */\nexport interface ToastProps extends ToastNativeProps {\n /** Optional application action. */\n action?: ToastAction;\n /** Accessible label for the dismiss button. Defaults to the provider close message. */\n closeLabel?: string;\n /** Optional application-owned translated supporting content. */\n description?: ReactNode;\n /** Called when the dismiss button or action closes the toast. */\n onDismiss: () => void;\n /** Ref to the rendered toast element. */\n ref?: Ref<HTMLDivElement>;\n /** Application-owned translated primary content. */\n title: ReactNode;\n /** Bootstrap-aligned semantic colour. Defaults to `info`. */\n variant?: VisualVariant;\n}\n\ninterface ToastViewProps {\n action: ToastAction | undefined;\n closeLabel: string;\n description: ReactNode | undefined;\n onAction: (() => void) | undefined;\n onDismiss: () => void;\n title: ReactNode;\n}\n\nfunction ToastView({\n action,\n closeLabel,\n description,\n onAction,\n onDismiss,\n title,\n}: Readonly<ToastViewProps>): ReactElement {\n return createElement(\n AriaToastContent,\n {\n className: toastContent(),\n },\n createElement(\n 'div',\n {\n className: toastCopy(),\n },\n createElement(\n AriaText,\n {\n className: toastTitle(),\n slot: 'title',\n },\n title,\n ),\n description === undefined\n ? null\n : createElement(\n AriaText,\n {\n className: toastDescription(),\n slot: 'description',\n },\n description,\n ),\n action === undefined\n ? null\n : createElement(\n AriaButton,\n {\n className: toastAction(),\n onPress: onAction,\n },\n action.label,\n ),\n ),\n createElement(\n AriaButton,\n {\n 'aria-label': closeLabel,\n className: toastClose(),\n onPress: onDismiss,\n slot: 'close',\n },\n '×',\n ),\n );\n}\n\n/**\n * Displays one explicitly controlled notification. Queued application\n * notifications should use `useToast`.\n *\n * @summary for explicitly controlled notifications outside the provider queue\n */\nexport function Toast({\n action,\n className,\n closeLabel,\n description,\n onDismiss,\n ref,\n title,\n variant = 'info',\n ...props\n}: Readonly<ToastProps>): ReactElement {\n const { messages } = useBreezeContext();\n const titleId = useId();\n const descriptionId = useId();\n const actionHandler =\n action === undefined\n ? undefined\n : () => {\n action.onAction();\n onDismiss();\n };\n const rootProps: ComponentPropsWithRef<'div'> & {\n 'data-variant': VisualVariant;\n } = {\n ...props,\n 'aria-atomic': 'true',\n 'aria-describedby': description === undefined ? undefined : descriptionId,\n 'aria-labelledby': titleId,\n 'aria-live': 'polite',\n 'aria-modal': 'false',\n className: toastSurface({ class: className, variant }),\n 'data-variant': variant,\n ref: useForwardedRef(ref),\n role: 'alertdialog',\n tabIndex: 0,\n };\n\n return createElement(\n 'div',\n rootProps,\n createElement(\n 'div',\n {\n className: toastContent(),\n },\n createElement(\n 'div',\n {\n className: toastCopy(),\n },\n createElement('div', { className: toastTitle(), id: titleId }, title),\n description === undefined\n ? null\n : createElement(\n 'div',\n {\n className: toastDescription(),\n id: descriptionId,\n },\n description,\n ),\n action === undefined\n ? null\n : createElement(\n AriaButton,\n {\n className: toastAction(),\n onPress: actionHandler,\n },\n action.label,\n ),\n ),\n createElement(\n AriaButton,\n {\n 'aria-label': closeLabel ?? messages.close,\n className: toastClose(),\n onPress: onDismiss,\n },\n '×',\n ),\n ),\n );\n}\n\n/** Props for the provider-scoped toast stack. BreezeProvider renders this automatically. */\nexport interface ToastRegionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'role' | 'style'> {\n /** Accessible translated label for the notification stack. Defaults to the provider message. */\n label?: string;\n /** Ref to the rendered region element. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * Renders the current provider's toast queue into its scoped portal host.\n * BreezeProvider already renders the primary region; add another only when an\n * advanced layout requires a separately labelled queue presentation.\n *\n * @summary for rendering an additional provider-scoped toast queue region\n */\nexport function ToastRegion({\n className,\n label,\n ref,\n ...props\n}: Readonly<ToastRegionProps>): ReactElement | null {\n const context = useContext(ToastContext);\n const forwardedRef = useForwardedRef(ref);\n\n if (context === null) {\n throw new Error('ToastRegion must be rendered within BreezeProvider.');\n }\n\n const renderToast = ({\n toast,\n }: {\n toast: QueuedToast<ToastContentData>;\n }): ReactElement => {\n const { action, description, title, variant } = toast.content;\n const actionHandler =\n action === undefined\n ? undefined\n : () => {\n action.onAction();\n context.controller.dismiss(toast.key);\n };\n const queuedToastProps = {\n children: createElement(ToastView, {\n action,\n closeLabel: context.closeLabel,\n description,\n onAction: actionHandler,\n onDismiss: () => {\n context.controller.dismiss(toast.key);\n },\n title,\n }),\n className: toastSurface({ variant }),\n 'data-variant': variant,\n toast,\n } as unknown as ComponentProps<typeof AriaToast<ToastContentData>>;\n\n return createElement(AriaToast<ToastContentData>, queuedToastProps);\n };\n const regionProps = {\n ...props,\n 'aria-label': label ?? context.regionLabel,\n children: renderToast,\n className: toastRegion({ class: className }),\n queue: context.queue,\n ref: forwardedRef,\n } as ComponentProps<typeof AriaToastRegion<ToastContentData>>;\n\n return createElement(AriaToastRegion<ToastContentData>, regionProps);\n}\n\ninterface ToastProviderBoundaryProps {\n children: ReactNode;\n closeLabel: string;\n limit: number;\n regionLabel: string;\n}\n\nfunction validateLifetime(lifetime: number | null): void {\n if (lifetime !== null && (!Number.isFinite(lifetime) || lifetime < 0)) {\n throw new RangeError(\n 'Toast lifetime must be null or a finite non-negative number of milliseconds.',\n );\n }\n}\n\n/** @internal Establishes the queue owned by one BreezeProvider instance. */\nexport function ToastProviderBoundary({\n children,\n closeLabel,\n limit,\n regionLabel,\n}: Readonly<ToastProviderBoundaryProps>): ReactElement {\n const queue = useMemo(\n () => new AriaToastQueue<ToastContentData>({ maxVisibleToasts: limit }),\n [limit],\n );\n const controller = useMemo<ToastController>(\n () => ({\n dismiss: (id) => {\n queue.close(id);\n },\n show: ({\n action,\n description,\n lifetime = DEFAULT_LIFETIME,\n onDismiss,\n title,\n variant = 'info',\n }) => {\n validateLifetime(lifetime);\n\n const id = queue.add(\n {\n action,\n description,\n title,\n variant,\n },\n {\n onClose: onDismiss,\n timeout: lifetime === null || lifetime === 0 ? undefined : lifetime,\n },\n );\n\n if (lifetime === 0) {\n queue.close(id);\n }\n\n return id;\n },\n }),\n [queue],\n );\n const context = useMemo<ToastContextValue>(\n () => ({\n closeLabel,\n controller,\n queue,\n regionLabel,\n }),\n [closeLabel, controller, queue, regionLabel],\n );\n\n useEffect(\n () => () => {\n queue.pauseAll();\n queue.clear();\n },\n [queue],\n );\n\n return createElement(\n ToastContext,\n {\n value: context,\n },\n children,\n createElement(ToastRegion),\n );\n}\n\n/**\n * Returns commands for showing and dismissing notifications in the nearest\n * BreezeProvider queue. Call this hook only below BreezeProvider.\n *\n * @summary for controlling the nearest BreezeProvider toast queue\n */\nexport function useToast(): ToastController {\n const context = useContext(ToastContext);\n\n if (context === null) {\n throw new Error('useToast must be called within BreezeProvider.');\n }\n\n return context.controller;\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { Toolbar as AriaToolbar } from 'react-aria-components/Toolbar';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst toolbar = tv({\n base: 'flex gap-2',\n defaultVariants: {\n orientation: 'horizontal',\n },\n variants: {\n orientation: {\n horizontal: 'flex-row items-center',\n vertical: 'flex-col items-stretch',\n },\n },\n});\n\n/** Props for a keyboard-navigable collection of related controls. */\nexport interface ToolbarProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Related interactive controls. */\n children: ReactNode;\n /** Arrow-key navigation axis. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered toolbar. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * Groups related controls under toolbar semantics and arrow-key navigation.\n *\n * @summary related controls with orientation-aware arrow navigation\n */\nexport function Toolbar({\n children,\n className,\n orientation,\n ref,\n ...props\n}: Readonly<ToolbarProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaToolbar,\n {\n ...props,\n className: toolbar({\n class: className,\n orientation,\n }),\n orientation,\n ref: forwardedRef,\n },\n children,\n );\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useId } from 'react';\nimport {\n Focusable,\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n} from 'react-aria-components/Tooltip';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { Button, type ButtonProps } from '../Button/Button';\nimport { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden';\n\nconst tooltip = tv({\n base: 'z-50 max-w-64 border border-[var(--breeze-border-strong)] bg-[var(--breeze-ink)] px-2.5 py-1.5 text-sm text-[var(--breeze-ink-inverse)] shadow-lg data-[entering]:animate-in data-[exiting]:animate-out motion-reduce:transition-none forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]',\n defaultVariants: {\n variant: 'secondary',\n },\n variants: {\n variant: {\n danger:\n 'border-[var(--breeze-danger)] bg-[var(--breeze-danger)] text-[var(--breeze-ink-inverse)]',\n primary:\n 'border-[var(--breeze-primary)] bg-[var(--breeze-primary)] text-[var(--breeze-ink-inverse)]',\n secondary:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-ink)] text-[var(--breeze-ink-inverse)]',\n },\n },\n});\n\nconst tooltipIconTrigger = tv({\n base: 'inline-flex size-5 shrink-0 cursor-help items-center justify-center outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--breeze-focus)]',\n defaultVariants: {\n variant: 'secondary',\n },\n variants: {\n variant: {\n danger: 'text-[var(--breeze-danger)]',\n primary: 'text-[var(--breeze-primary)]',\n secondary: 'text-[var(--breeze-ink-muted)]',\n },\n },\n});\n\ninterface TooltipRootSharedProps {\n /** Trigger and tooltip content. */ children: ReactNode;\n /** Delay before opening in milliseconds. Defaults to `700`. */ delay?: number;\n /** Delay before closing in milliseconds. Defaults to `0`. */ closeDelay?: number;\n}\ninterface ControlledTooltipRootProps {\n /** Current open state. */ open: boolean;\n /** Called with next open state. */ onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\ninterface ReadOnlyTooltipRootProps {\n /** Current immutable open state. */ open: boolean;\n /** Marks controlled state immutable. */ readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\ninterface UncontrolledTooltipRootProps {\n /** Initial open state. */ defaultOpen?: boolean;\n /** Called with next open state. */ onOpenChange?: (open: boolean) => void;\n open?: never;\n readOnly?: false;\n}\n/** Props for controlled, read-only, or uncontrolled tooltip state. */ export type TooltipRootProps =\n TooltipRootSharedProps &\n (\n | ControlledTooltipRootProps\n | ReadOnlyTooltipRootProps\n | UncontrolledTooltipRootProps\n );\n/** Props for the tooltip trigger action. */ export type TooltipTriggerProps =\n ButtonProps;\n/** Props for a compact non-action tooltip trigger with a required accessible name. */ export interface TooltipIconTriggerProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Accessible name for the informational icon. */\n 'aria-label': string;\n /** Decorative icon. */\n children: ReactNode;\n /** Ref to the rendered focusable informational icon. */\n ref?: Ref<HTMLSpanElement>;\n /** Semantic icon colour. Defaults to `secondary`. */\n variant?: 'danger' | 'primary' | 'secondary';\n}\n/** Props for descriptive tooltip content. */ export interface TooltipContentProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Concise descriptive text. */ children: ReactNode;\n /** Gap from trigger. Defaults to `6`. */ offset?: number;\n /** Placement. Defaults to `top`. */ placement?:\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'top start'\n | 'top end'\n | 'bottom start'\n | 'bottom end';\n /** Ref to rendered tooltip. */ ref?: Ref<HTMLDivElement>;\n /** Semantic tooltip colour. Defaults to `secondary`. */\n variant?: 'danger' | 'primary' | 'secondary';\n}\n\n/** Coordinates concise supplementary information for a trigger. */\nexport function Root({\n closeDelay = 0,\n defaultOpen,\n delay = 700,\n onOpenChange,\n open,\n readOnly: _readOnly,\n ...props\n}: Readonly<TooltipRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaTooltipTrigger, {\n ...props,\n closeDelay,\n defaultOpen,\n delay,\n isOpen: open,\n onOpenChange,\n });\n}\nconst TooltipTrigger = Button;\nexport function IconTrigger({\n 'aria-label': ariaLabel,\n children,\n className,\n ref,\n variant = 'secondary',\n ...props\n}: Readonly<TooltipIconTriggerProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const labelId = useId();\n\n const trigger = createElement(\n 'span',\n {\n ...props,\n 'aria-labelledby': labelId,\n className: tooltipIconTrigger({ class: className, variant }),\n role: 'img',\n tabIndex: 0,\n },\n createElement(VisuallyHidden, { id: labelId }, ariaLabel),\n children,\n );\n\n return <Focusable ref={forwardedRef}>{trigger}</Focusable>;\n}\nexport function Content({\n className,\n offset = 6,\n placement = 'top',\n ref,\n variant = 'secondary',\n ...props\n}: Readonly<TooltipContentProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaTooltip, {\n ...props,\n className: tooltip({ class: className, variant }),\n offset,\n placement,\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaTooltip>);\n}\n/**\n * Accessible compound descriptive tooltip primitive.\n *\n * @summary concise non-interactive help revealed from a trigger\n */\nexport const Tooltip = {\n /** Concise descriptive popup positioned against its trigger. */\n Content,\n /** Focusable informational icon described by the tooltip. */\n IconTrigger,\n /** Controlled, read-only, or uncontrolled hover and focus coordinator. */\n Root,\n /** Semantic action described by the tooltip. */\n Trigger: TooltipTrigger,\n};\n","import type { HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst typography = tv({\n base: 'm-0 min-w-0',\n compoundVariants: [\n {\n class: 'mb-4',\n gutterBottom: true,\n level: ['body', 'label'],\n },\n {\n class: 'mb-6',\n gutterBottom: true,\n level: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'metric', 'summary'],\n },\n ],\n defaultVariants: {\n colour: 'default',\n level: 'body',\n weight: 'default',\n },\n variants: {\n align: {\n center: 'text-center',\n end: 'text-end',\n start: 'text-start',\n },\n colour: {\n danger: 'text-[var(--breeze-danger)]',\n default: 'text-[var(--breeze-ink)]',\n info: 'text-[var(--breeze-info)]',\n inverse: 'text-[var(--breeze-ink-inverse)]',\n 'inverse-muted': 'text-[var(--breeze-ink-inverse-muted)]',\n muted: 'text-[var(--breeze-ink-muted)]',\n primary: 'text-[var(--breeze-primary)]',\n success: 'text-[var(--breeze-success)]',\n warning: 'text-[var(--breeze-warning)]',\n },\n gutterBottom: {\n false: '',\n true: '',\n },\n level: {\n body: 'font-[family-name:var(--breeze-font-body)] text-base leading-[1.4]',\n h1: 'font-[family-name:var(--breeze-font-display)] text-[2.5rem] font-bold leading-[1.12]',\n h2: 'font-[family-name:var(--breeze-font-display)] text-[2rem] font-bold leading-[1.15]',\n h3: 'font-[family-name:var(--breeze-font-display)] text-2xl font-bold leading-[1.2]',\n h4: 'font-[family-name:var(--breeze-font-display)] text-xl font-bold leading-[1.2]',\n h5: 'font-[family-name:var(--breeze-font-display)] text-lg font-bold leading-[1.25]',\n h6: 'font-[family-name:var(--breeze-font-display)] text-base font-bold leading-[1.25]',\n label:\n 'font-[family-name:var(--breeze-font-display)] text-base font-bold leading-[1.25]',\n metric:\n 'font-[family-name:var(--breeze-font-display)] text-[2rem] font-bold leading-[1.2] tabular-nums',\n summary:\n 'font-[family-name:var(--breeze-font-display)] text-xl font-bold leading-[1.2] sm:text-2xl',\n },\n lineClamp: {\n 2: 'line-clamp-2',\n 3: 'line-clamp-3',\n 4: 'line-clamp-4',\n none: '',\n },\n tabularNumbers: {\n false: '',\n true: 'tabular-nums',\n },\n truncate: {\n false: '',\n true: 'truncate',\n },\n weight: {\n bold: 'font-bold',\n default: '',\n medium: 'font-medium',\n regular: 'font-normal',\n semibold: 'font-semibold',\n },\n },\n});\n\n/** Semantic elements supported by the non-interactive text primitive. */\nexport type TypographyElement =\n | 'span'\n | 'p'\n | 'div'\n | 'strong'\n | 'em'\n | 'small'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'dt'\n | 'dd';\n\n/** Visual typography levels independent from rendered semantics. */\nexport type TypographyLevel =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'metric'\n | 'summary'\n | 'label'\n | 'body';\n\n/** Semantic text colours backed by Breeze theme tokens. */\nexport type TypographyColour =\n | 'default'\n | 'muted'\n | 'primary'\n | 'inverse'\n | 'inverse-muted'\n | 'success'\n | 'danger'\n | 'warning'\n | 'info';\n\n/** Props for Breeze non-interactive text. */\nexport interface TypographyProps\n extends Omit<HTMLAttributes<HTMLElement>, 'align' | 'color' | 'style'> {\n /** Text alignment. Inherits from the containing layout by default. */\n align?: 'start' | 'center' | 'end';\n /** Constrained semantic element. Defaults to `p`. */\n as?: TypographyElement;\n /** Semantic text colour. Defaults to `default`. */\n colour?: TypographyColour;\n /** Adds canonical bottom rhythm to block elements. Defaults to `false`. */\n gutterBottom?: boolean;\n /** Visual level. Defaults from `as`, otherwise `body`. */\n level?: TypographyLevel;\n /** Bounds text to a supported number of lines. Defaults to no clamp. */\n lineClamp?: 2 | 3 | 4;\n /** Ref to the rendered element. */\n ref?: Ref<HTMLElement>;\n /** Uses tabular numeral glyphs. Defaults to `false`. */\n tabularNumbers?: boolean;\n /** Truncates one line with an ellipsis. Defaults to `false`. */\n truncate?: boolean;\n /** Font weight override. Defaults to the selected level. */\n weight?: 'regular' | 'medium' | 'semibold' | 'bold';\n}\n\nconst headingLevels: Partial<Record<TypographyElement, TypographyLevel>> = {\n dt: 'label',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n strong: 'label',\n};\n\nconst inlineElements = new Set<TypographyElement>([\n 'em',\n 'small',\n 'span',\n 'strong',\n]);\n\n/**\n * Renders non-interactive text with independent semantic and visual choices.\n *\n * @summary semantic non-interactive text with a separate visual level\n */\nexport function Typography({\n align,\n as = 'p',\n className,\n colour,\n gutterBottom = false,\n level,\n lineClamp,\n ref,\n tabularNumbers = false,\n truncate = false,\n weight,\n ...props\n}: Readonly<TypographyProps>) {\n useBreezeContext();\n\n const resolvedLevel = level ?? headingLevels[as] ?? 'body';\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(as, {\n ...props,\n className: typography({\n align,\n class: className,\n colour,\n gutterBottom: gutterBottom && !inlineElements.has(as),\n level: resolvedLevel,\n lineClamp: lineClamp ?? 'none',\n tabularNumbers,\n truncate,\n weight: weight ?? 'default',\n }),\n ref: forwardedRef,\n });\n}\n","/** Generic, domain-neutral text used by Breeze controls and announcements. */\nexport interface BreezeMessages {\n /** Accessible label for clearing a value or selection. */\n clear: string;\n /** Accessible label for closing layered content. */\n close: string;\n /** Rejection text when only one file may be selected. */\n fileCountRejection: string;\n /** Rejection text when a file exceeds the configured maximum size. */\n fileSizeRejection: string;\n /** Rejection text when a file does not match the accepted types. */\n fileTypeRejection: string;\n /** Status text announced while content is loading. */\n loading: string;\n /** Status text announced when a collection has no matching results. */\n noResults: string;\n /** Accessible label for the provider-owned notification stack. */\n notifications: string;\n /** Accessible label for moving to the next pagination page. */\n nextPage: string;\n /** Accessible label prefix for a numbered pagination destination. */\n page: string;\n /** Accessible label for moving to the previous pagination page. */\n previousPage: string;\n /** Visible guidance when no date-picker value is selected. */\n selectDate: string;\n /** Accessible label for a complete date-and-time selection surface. */\n selectDateTime: string;\n /** Accessible label for the visually hidden native file input. */\n selectFiles: string;\n /** Visible label for selecting a time within a date-time picker. */\n selectTime: string;\n /** Accessible label for concealing a password value. */\n hidePassword: string;\n /** Accessible label for revealing a password value. */\n showPassword: string;\n /** Generic unread-notification state. */\n unreadNotifications: string;\n}\n\n/** Application-provided replacements for built-in `en-GB` Breeze messages. */\nexport type BreezeMessageOverrides = Partial<BreezeMessages>;\n\nconst defaultMessages: BreezeMessages = {\n clear: 'Clear',\n close: 'Close',\n fileCountRejection: 'Only one file may be selected.',\n fileSizeRejection: 'File exceeds the maximum size.',\n fileTypeRejection: 'File type is not accepted.',\n hidePassword: 'Hide password',\n loading: 'Loading',\n nextPage: 'Next page',\n noResults: 'No results',\n notifications: 'Notifications',\n page: 'Page',\n previousPage: 'Previous page',\n selectDate: 'Select date',\n selectDateTime: 'Select date and time',\n selectFiles: 'Select files',\n selectTime: 'Select time',\n showPassword: 'Show password',\n unreadNotifications: 'Unread notifications',\n};\n\nexport function resolveMessages(\n overrides: BreezeMessageOverrides = {},\n): BreezeMessages {\n return {\n ...defaultMessages,\n ...overrides,\n };\n}\n","import type { ReactNode } from 'react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { UNSAFE_PortalProvider as AriaPortalProvider } from 'react-aria/PortalProvider';\nimport { I18nProvider } from 'react-aria-components/I18nProvider';\nimport { createPortal } from 'react-dom';\nimport { ToastProviderBoundary } from '../primitives/Toast/Toast';\nimport {\n BreezeContext,\n type BreezeContextValue,\n type BreezeDirection,\n type BreezeRouterAdapter,\n} from './BreezeContext';\nimport { type BreezeMessageOverrides, resolveMessages } from './messages';\n\nconst rtlLanguages = new Set([\n 'ar',\n 'ckb',\n 'dv',\n 'fa',\n 'he',\n 'ku',\n 'ps',\n 'sd',\n 'ug',\n 'ur',\n 'yi',\n]);\n\ntype BreezeDatasetKey = 'breezePortalRoot' | 'breezeRoot';\n\n/** Props for the required environment boundary shared by Breeze components. */\nexport interface BreezeProviderProps {\n /** Breeze components and application content rendered inside the boundary. */\n children: ReactNode;\n /** Reading direction override. Defaults to the direction inferred from `locale`. */\n direction?: BreezeDirection;\n /** BCP 47 locale used by Breeze formatting and accessible interactions. */\n locale: string;\n /** Partial replacements for the built-in `en-GB` generic messages. */\n messages?: BreezeMessageOverrides;\n /** Portal host for layered content. Defaults to a provider-owned host. */\n portalContainer?: HTMLElement | null;\n /** Optional router adapter used for internal client-side navigation. */\n router?: BreezeRouterAdapter;\n /** Optional IANA time-zone name used by date and time formatting components. */\n timeZone?: string;\n /** Maximum visible provider-scoped toasts before pending items queue. Defaults to `3`. */\n toastLimit?: number;\n}\n\nfunction inferDirection(locale: string): BreezeDirection {\n const { language } = new Intl.Locale(locale);\n\n return rtlLanguages.has(language) ? 'rtl' : 'ltr';\n}\n\nfunction restoreDatasetValue(\n element: HTMLElement,\n key: BreezeDatasetKey,\n value: string | undefined,\n): void {\n const { dataset } = element;\n\n if (value === undefined) {\n delete dataset[key];\n\n return;\n }\n\n dataset[key] = value;\n}\n\nfunction restoreAttribute(\n element: HTMLElement,\n name: string,\n value: string | null,\n): void {\n if (value === null) {\n element.removeAttribute(name);\n\n return;\n }\n\n element.setAttribute(name, value);\n}\n\n/**\n * Establishes the locale, direction, messages, routing, and portal environment\n * required by every Breeze component.\n *\n * @summary required environment boundary for every Breeze component\n */\nexport function BreezeProvider({\n children,\n direction,\n locale,\n messages: messageOverrides,\n portalContainer: suppliedPortalContainer,\n router,\n timeZone,\n toastLimit = 3,\n}: Readonly<BreezeProviderProps>) {\n if (!Number.isInteger(toastLimit) || toastLimit < 1) {\n throw new RangeError(\n 'BreezeProvider toastLimit must be a positive integer.',\n );\n }\n\n const [localPortalContainer, setLocalPortalContainer] =\n useState<HTMLDivElement | null>(null);\n const resolvedDirection = direction ?? inferDirection(locale);\n const messages = useMemo(\n () => resolveMessages(messageOverrides),\n [messageOverrides],\n );\n const portalContainer = suppliedPortalContainer ?? localPortalContainer;\n const portalContainerRef = useRef<HTMLElement | null>(portalContainer);\n\n portalContainerRef.current = portalContainer;\n\n const getPortalContainer = useCallback(() => portalContainerRef.current, []);\n const portalHost =\n suppliedPortalContainer === undefined && typeof document !== 'undefined'\n ? createPortal(\n <div\n data-breeze-portal-root=\"\"\n data-breeze-root=\"\"\n dir={resolvedDirection}\n lang={locale}\n ref={setLocalPortalContainer}\n />,\n document.body,\n )\n : null;\n\n useEffect(() => {\n if (\n suppliedPortalContainer === undefined ||\n suppliedPortalContainer === null\n ) {\n return undefined;\n }\n\n const { dataset: portalDataset } = suppliedPortalContainer;\n const previousPortalScope = portalDataset.breezePortalRoot;\n const previousRootScope = portalDataset.breezeRoot;\n const previousDirection = suppliedPortalContainer.getAttribute('dir');\n const previousLocale = suppliedPortalContainer.getAttribute('lang');\n\n portalDataset.breezePortalRoot = '';\n portalDataset.breezeRoot = '';\n suppliedPortalContainer.setAttribute('dir', resolvedDirection);\n suppliedPortalContainer.setAttribute('lang', locale);\n\n return () => {\n restoreDatasetValue(\n suppliedPortalContainer,\n 'breezePortalRoot',\n previousPortalScope,\n );\n restoreDatasetValue(\n suppliedPortalContainer,\n 'breezeRoot',\n previousRootScope,\n );\n restoreAttribute(suppliedPortalContainer, 'dir', previousDirection);\n restoreAttribute(suppliedPortalContainer, 'lang', previousLocale);\n };\n }, [locale, resolvedDirection, suppliedPortalContainer]);\n const context = useMemo<BreezeContextValue>(\n () => ({\n direction: resolvedDirection,\n locale,\n messages,\n portalContainer,\n router,\n timeZone,\n }),\n [locale, messages, portalContainer, resolvedDirection, router, timeZone],\n );\n\n return (\n <I18nProvider locale={locale}>\n <AriaPortalProvider getContainer={getPortalContainer}>\n <BreezeContext value={context}>\n <ToastProviderBoundary\n closeLabel={messages.close}\n limit={toastLimit}\n regionLabel={messages.notifications}\n >\n <div data-breeze-root=\"\" dir={resolvedDirection} lang={locale}>\n {children}\n </div>\n {portalHost}\n </ToastProviderBoundary>\n </BreezeContext>\n </AriaPortalProvider>\n </I18nProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAwB,EACtB,GACsB;CACtB,OAAO,GACJ,MAA4B;EAC3B,AAAI,OAAO,KAAQ,aACjB,EAAI,CAAO,IACF,KAAQ,QACjB,OAAO,O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,MAAA;AACpE,GChHM,KAAmB,KAEnB,KAAe,EAAG;CACtB,MAAM;CACN,iBAAiB,EACf,SAAS,OACX;CACA,UAAU,EACR,SAAS;EACP,QACE;EACF,MAAM;EACN,MAAM;EACN,OACE;EACF,SACE;EACF,WACE;EACF,SACE;EACF,SACE;CACJ,EACF;AACF,CAAC,GACK,KAAc,EAAG,EACrB,MAAM,oHACR,CAAC,GACK,KAAe,EAAG,EAAE,MAAM,WAAW,CAAC,GACtC,KAAY,EAAG,EAAE,MAAM,qBAAqB,CAAC,GAC7C,KAAa,EAAG,EAAE,MAAM,gBAAgB,CAAC,GACzC,KAAmB,EAAG,EAAE,MAAM,kBAAkB,CAAC,GACjD,KAAc,EAAG,EACrB,MAAM,kLACR,CAAC,GACK,KAAa,EAAG,EACpB,MAAM,2OACR,CAAC,GAgDK,KAAe,EAAwC,IAAI;AAkCjE,SAAS,GAAU,EACjB,WACA,eACA,gBACA,aACA,cACA,YACyC;CACzC,OAAO,EACL,IACA,EACE,WAAW,GAAa,EAC1B,GACA,EACE,OACA,EACE,WAAW,GAAU,EACvB,GACA,EACE,IACA;EACE,WAAW,GAAW;EACtB,MAAM;CACR,GACA,CACF,GACA,MAAgB,KAAA,IACZ,OACA,EACE,IACA;EACE,WAAW,GAAiB;EAC5B,MAAM;CACR,GACA,CACF,GACJ,MAAW,KAAA,IACP,OACA,EACE,IACA;EACE,WAAW,GAAY;EACvB,SAAS;CACX,GACA,EAAO,KACT,CACN,GACA,EACE,IACA;EACE,cAAc;EACd,WAAW,GAAW;EACtB,SAAS;EACT,MAAM;CACR,GACA,GACF,CACF;AACF;AAQA,SAAgB,GAAM,EACpB,WACA,cACA,eACA,gBACA,cACA,QACA,UACA,aAAU,QACV,GAAG,KACkC;CACrC,IAAM,EAAE,gBAAa,EAAiB,GAChC,IAAU,EAAM,GAChB,IAAgB,EAAM,GACtB,IACJ,MAAW,KAAA,IACP,KAAA,UACM;EAEJ,AADA,EAAO,SAAS,GAChB,EAAU;CACZ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AAO;KACP,aAAa,EAAS;eAHxB,CAKE,kBAAC,OAAD;MAAK,oBAAiB;MAAG,KAAK;MAAmB,MAAM;MACpD;KACE,CAAA,GACJ,CACoB;;GACV,CAAA;EACG,CAAA;CACR,CAAA;AAElB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["#overscan","#compactHiddenColumns","#compactCellHeights"],"sources":["../src/internal/hooks/useForwardedRef.ts","../src/provider/BreezeContext.ts","../src/formatting/FormattedDateTime/FormattedDateTime.tsx","../src/formatting/FormattedList/FormattedList.tsx","../src/formatting/FormattedNumber/FormattedNumber.tsx","../src/formatting/RelativeTime/RelativeTime.tsx","../src/internal/react-aria/renderNativeButton.ts","../src/internal/styling/actions.ts","../src/primitives/Button/Button.tsx","../src/internal/react-aria/OverlayParts.tsx","../src/internal/styling/responsive.ts","../src/primitives/Drawer/Drawer.tsx","../src/primitives/Link/Link.tsx","../src/primitives/SkipLink/SkipLink.tsx","../src/patterns/ApplicationShell/ApplicationShell.tsx","../src/patterns/ButtonGroup/ButtonGroup.tsx","../src/primitives/AlertDialog/AlertDialog.tsx","../src/primitives/IconTile/IconTile.tsx","../src/patterns/ConfirmationDialog/ConfirmationDialog.tsx","../src/internal/collections/useCollectionEmptyContent.ts","../src/primitives/Menu/Menu.tsx","../src/patterns/ContextSwitcher/ContextSwitcher.tsx","../src/patterns/FileAttachment/FileAttachment.tsx","../src/internal/files/validation.ts","../src/primitives/file/FileFeedback.tsx","../src/primitives/DropZone/DropZone.tsx","../src/primitives/FileTrigger/FileTrigger.tsx","../src/patterns/FileUpload/FileUpload.tsx","../src/patterns/FormActions/FormActions.tsx","../src/patterns/FormSection/FormSection.tsx","../src/patterns/MetricCard/MetricCard.tsx","../src/patterns/NavigationSection/NavigationSection.tsx","../src/patterns/PageHeader/PageHeader.tsx","../src/primitives/IconButton/IconButton.tsx","../src/patterns/Pagination/Pagination.tsx","../src/primitives/InputGroup/InputGroup.tsx","../src/internal/styling/formControls.ts","../src/primitives/TextField/TextField.tsx","../src/patterns/PasswordField/PasswordField.tsx","../src/patterns/SectionHeader/SectionHeader.tsx","../src/primitives/ToggleButton/ToggleButton.tsx","../src/primitives/ToggleGroup/ToggleGroup.tsx","../src/patterns/SegmentedControl/SegmentedControl.tsx","../src/patterns/StatePanel/StatePanel.tsx","../src/primitives/Avatar/Avatar.tsx","../src/patterns/UserMenu/UserMenu.tsx","../src/internal/react-aria/DisclosureParts.tsx","../src/primitives/Accordion/Accordion.tsx","../src/primitives/Alert/Alert.tsx","../src/primitives/Badge/Badge.tsx","../src/primitives/Breadcrumbs/Breadcrumbs.tsx","../src/internal/date/conversion.ts","../src/primitives/date/CalendarParts.tsx","../src/primitives/Calendar/Calendar.tsx","../src/primitives/Card/Card.tsx","../src/primitives/Center/Center.tsx","../src/primitives/Checkbox/Checkbox.tsx","../src/primitives/CheckboxGroup/CheckboxGroup.tsx","../src/internal/collections/useLoadMoreHandler.ts","../src/internal/styling/breakpoints.ts","../src/internal/collections/collectionKey.ts","../src/internal/collections/VirtualizedCollection.tsx","../src/primitives/ListBox/ListBox.tsx","../src/primitives/ComboBox/ComboBox.tsx","../src/internal/styling/layout.ts","../src/primitives/Container/Container.tsx","../src/primitives/date/DateInput.tsx","../src/primitives/DateField/DateField.tsx","../src/primitives/date/PickerParts.tsx","../src/primitives/DatePicker/DatePicker.tsx","../src/primitives/date/PickerFieldParts.tsx","../src/primitives/DateRangePicker/DateRangePicker.tsx","../src/primitives/DateTimePicker/DateTimePicker.tsx","../src/primitives/DescriptionList/DescriptionList.tsx","../src/primitives/Dialog/Dialog.tsx","../src/primitives/Disclosure/Disclosure.tsx","../src/primitives/Fieldset/Fieldset.tsx","../src/primitives/Grid/Grid.tsx","../src/primitives/GridList/GridList.tsx","../src/primitives/Inline/Inline.tsx","../src/primitives/LinkButton/LinkButton.tsx","../src/primitives/List/List.tsx","../src/primitives/Logo/Logo.tsx","../src/primitives/Meter/Meter.tsx","../src/primitives/NavigationList/NavigationList.tsx","../src/primitives/NumberField/NumberField.tsx","../src/primitives/Popover/Popover.tsx","../src/primitives/ProgressBar/ProgressBar.tsx","../src/primitives/RadioGroup/RadioGroup.tsx","../src/primitives/RangeCalendar/RangeCalendar.tsx","../src/primitives/SearchField/SearchField.tsx","../src/primitives/Select/Select.tsx","../src/primitives/Separator/Separator.tsx","../src/primitives/Skeleton/Skeleton.tsx","../src/primitives/Slider/Slider.tsx","../src/primitives/VisuallyHidden/VisuallyHidden.tsx","../src/primitives/Spinner/Spinner.tsx","../src/primitives/Stack/Stack.tsx","../src/primitives/Stepper/Stepper.tsx","../src/primitives/Surface/Surface.tsx","../src/primitives/Switch/Switch.tsx","../src/primitives/Table/Table.tsx","../src/primitives/Tabs/Tabs.tsx","../src/primitives/Tag/Tag.tsx","../src/primitives/TagGroup/TagGroup.tsx","../src/primitives/TextArea/TextArea.tsx","../src/primitives/TimeField/TimeField.tsx","../src/primitives/Toast/Toast.tsx","../src/primitives/Toolbar/Toolbar.tsx","../src/primitives/Tooltip/Tooltip.tsx","../src/primitives/Typography/Typography.tsx","../src/provider/messages.ts","../src/provider/BreezeProvider.tsx"],"sourcesContent":["import type { Ref, RefCallback } from 'react';\nimport { useCallback } from 'react';\n\nexport default function useForwardedRef<Element>(\n ref: Ref<Element> | undefined,\n): RefCallback<Element> {\n return useCallback(\n (element: Element | null) => {\n if (typeof ref === 'function') {\n ref(element);\n } else if (ref !== null && ref !== undefined) {\n Object.assign(ref, {\n current: element,\n });\n }\n },\n [ref],\n );\n}\n","import { createContext, useContext } from 'react';\nimport type { BreezeMessages } from './messages';\n\n/** Reading direction applied to the Breeze component subtree. */\nexport type BreezeDirection = 'ltr' | 'rtl';\n\n/** Router-neutral navigation contract used by link-capable Breeze components. */\nexport interface BreezeRouterAdapter {\n /** Performs client-side navigation to an application-owned URL. */\n navigate: (href: string) => void;\n}\n\nexport interface BreezeContextValue {\n direction: BreezeDirection;\n locale: string;\n messages: BreezeMessages;\n portalContainer: HTMLElement | null;\n router: BreezeRouterAdapter | undefined;\n timeZone: string | undefined;\n}\n\nexport const BreezeContext = createContext<BreezeContextValue | null>(null);\n\nexport function useBreezeContext(): BreezeContextValue {\n const context = useContext(BreezeContext);\n\n if (context === null) {\n throw new Error(\n 'Breeze components must be rendered within BreezeProvider.',\n );\n }\n\n return context;\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for locale-aware date and time output. */\nexport interface FormattedDateTimeProps\n extends Omit<\n HTMLAttributes<HTMLTimeElement>,\n 'children' | 'dateTime' | 'style'\n > {\n /** `Intl.DateTimeFormat` options applied using provider locale and time zone. */\n options?: Intl.DateTimeFormatOptions;\n /** Ref to the rendered time element. */\n ref?: Ref<HTMLTimeElement>;\n /** ISO 8601 value with an explicit offset. */\n value: string;\n}\n\n/**\n * Formats an ISO date-time while preserving its machine-readable value.\n *\n * @summary locale-aware date-time output with machine-readable semantics\n */\nexport function FormattedDateTime({\n options,\n ref,\n value,\n ...props\n}: Readonly<FormattedDateTimeProps>): ReactElement {\n const { locale, timeZone } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const resolvedOptions =\n timeZone === undefined\n ? options\n : {\n ...options,\n timeZone,\n };\n\n return createElement(\n 'time',\n {\n ...props,\n dateTime: value,\n ref: forwardedRef,\n },\n new Intl.DateTimeFormat(locale, resolvedOptions).format(new Date(value)),\n );\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for locale-aware list output. */\nexport interface FormattedListProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** `Intl.ListFormat` options. */\n options?: Intl.ListFormatOptions;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Ordered text values to join. */\n values: readonly string[];\n}\n\n/**\n * Joins an ordered text list using the provider locale.\n *\n * @summary locale-aware inline conjunction or disjunction text\n */\nexport function FormattedList({\n options,\n ref,\n values,\n ...props\n}: Readonly<FormattedListProps>): ReactElement {\n const { locale } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n ref: forwardedRef,\n },\n new Intl.ListFormat(locale, options).format(values),\n );\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for locale-aware numeric output. */\nexport interface FormattedNumberProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** `Intl.NumberFormat` options applied using the provider locale. */\n options?: Intl.NumberFormatOptions;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Numeric value to format. */\n value: bigint | number;\n}\n\n/**\n * Formats a domain-neutral number using the Breeze provider locale.\n *\n * @summary locale-aware domain-neutral numeric output\n */\nexport function FormattedNumber({\n options,\n ref,\n value,\n ...props\n}: Readonly<FormattedNumberProps>): ReactElement {\n const { locale } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n ref: forwardedRef,\n },\n new Intl.NumberFormat(locale, options).format(value),\n );\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Units accepted by locale-aware relative-time output. */\nexport type RelativeTimeUnit = Intl.RelativeTimeFormatUnit;\n\n/** Props for locale-aware relative-time output. */\nexport interface RelativeTimeProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** `Intl.RelativeTimeFormat` options. */\n options?: Intl.RelativeTimeFormatOptions;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Unit applied to the relative value. */\n unit: RelativeTimeUnit;\n /** Signed distance from the reference time. */\n value: number;\n}\n\n/**\n * Formats an application-calculated relative duration in the provider locale.\n *\n * @summary locale-aware relative duration from an application-owned value\n */\nexport function RelativeTime({\n options,\n ref,\n unit,\n value,\n ...props\n}: Readonly<RelativeTimeProps>): ReactElement {\n const { locale } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n ref: forwardedRef,\n },\n new Intl.RelativeTimeFormat(locale, options).format(value, unit),\n );\n}\n","import type { ComponentProps, ReactElement } from 'react';\nimport { createElement } from 'react';\n\n/** Native form behaviors supported by Breeze action buttons. */\nexport type NativeButtonType = 'button' | 'submit';\n\n/** Renders the concrete button expected by React Aria's DOM render contract. */\nexport default function renderNativeButton(\n props: ComponentProps<'button'>,\n type: NativeButtonType,\n): ReactElement {\n if (type === 'submit') {\n return createElement('button', {\n ...props,\n type: 'submit',\n });\n }\n\n return createElement('button', {\n ...props,\n type: 'button',\n });\n}\n","import { tv } from 'tailwind-variants';\n\nconst action = tv({\n base: 'breeze-action inline-flex shrink-0 items-center justify-center gap-2 border font-[family-name:var(--breeze-font-display)] font-bold no-underline transition-colors duration-[var(--breeze-duration-fast)] disabled:cursor-not-allowed disabled:opacity-55 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55 data-[pressed]:translate-y-px',\n compoundVariants: [\n {\n appearance: 'solid',\n class:\n 'bg-[var(--breeze-primary)] text-white data-[hovered]:bg-[var(--breeze-primary-hover)]',\n variant: 'primary',\n },\n {\n appearance: 'solid',\n class:\n 'bg-[var(--breeze-danger)] text-white data-[hovered]:bg-[var(--breeze-danger-hover)]',\n variant: 'danger',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-success)] text-white',\n variant: 'success',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-warning)] text-white',\n variant: 'warning',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-info)] text-white',\n variant: 'info',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-shell)] text-white',\n variant: 'dark',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-surface)]',\n variant: 'light',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-ink-soft)] text-white',\n variant: 'secondary',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-primary-soft)]',\n variant: 'primary',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-danger-soft)]',\n variant: 'danger',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-success-soft)]',\n variant: 'success',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-warning-soft)]',\n variant: 'warning',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-info-soft)]',\n variant: 'info',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-shell-soft)] text-white',\n variant: 'dark',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-surface)]',\n variant: 'light',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-surface-subtle)]',\n variant: 'secondary',\n },\n {\n appearance: ['ghost', 'outline'],\n class: 'data-[hovered]:bg-[var(--breeze-surface-subtle)]',\n },\n {\n appearance: 'text',\n class:\n 'min-h-11 border-0 bg-transparent px-1 py-0 data-[hovered]:bg-transparent',\n },\n ],\n defaultVariants: {\n appearance: 'solid',\n size: 'md',\n variant: 'primary',\n },\n variants: {\n appearance: {\n ghost: 'border-0 bg-transparent',\n outline: 'bg-[var(--breeze-surface)]',\n solid: '',\n subtle: 'border-0',\n text: 'border-0',\n },\n size: {\n lg: 'min-h-12 px-5 py-3 text-base leading-[1.4]',\n md: 'min-h-11 px-4 py-2.5 text-base leading-[1.4]',\n sm: 'min-h-8 px-3 py-1.5 text-xs leading-[1.4]',\n },\n variant: {\n danger: 'border-[var(--breeze-danger)] text-[var(--breeze-danger)]',\n dark: 'border-[var(--breeze-shell)] text-[var(--breeze-shell)]',\n info: 'border-[var(--breeze-info)] text-[var(--breeze-info)]',\n light: 'border-[var(--breeze-border)] text-[var(--breeze-ink)]',\n primary: 'border-[var(--breeze-primary)] text-[var(--breeze-primary)]',\n secondary:\n 'border-[var(--breeze-border-strong)] text-[var(--breeze-ink)]',\n success: 'border-[var(--breeze-success)] text-[var(--breeze-success)]',\n warning: 'border-[var(--breeze-warning)] text-[var(--breeze-warning)]',\n },\n },\n});\n\nexport default action;\n","import type { ComponentProps, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport renderNativeButton, {\n type NativeButtonType,\n} from '../../internal/react-aria/renderNativeButton';\nimport action from '../../internal/styling/actions';\nimport type {\n ControlSize,\n VisualAppearance,\n VisualVariant,\n} from '../../internal/styling/visual';\nimport type { NativeButtonProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Visual emphasis treatments supported by buttons with visible text. */\nexport type ButtonAppearance = VisualAppearance | 'text';\n\n/** Props for a semantic action button. */\nexport interface ButtonProps extends NativeButtonProps {\n /** Visual emphasis treatment. Defaults to `solid`. */\n appearance?: ButtonAppearance;\n /** Button content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents interaction. Defaults to `false`. */\n disabled?: boolean;\n /** Shows and announces an in-progress state while preventing activation. Defaults to `false`. */\n loading?: boolean;\n /** Called once when the user activates the button. */\n onAction?: () => void;\n /** Ref to the rendered button. */\n ref?: Ref<HTMLButtonElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n /** Constrained native form behavior: `button` or `submit`. Defaults to `button`. */\n type?: NativeButtonType;\n /** Semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\n/**\n * Performs an application action through pointer or keyboard activation.\n *\n * @summary semantic action with accessible disabled and loading states\n */\nexport function Button({\n appearance,\n children,\n className,\n disabled = false,\n loading = false,\n onAction,\n ref,\n size,\n type = 'button',\n variant,\n ...props\n}: Readonly<ButtonProps>): ReactElement {\n useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-busy': loading || undefined,\n className: action({\n appearance,\n class: className,\n size,\n variant,\n }),\n isDisabled: disabled,\n isPending: loading,\n onPress: onAction,\n ref: forwardedRef,\n render: (renderProps) => {\n const nativeProps = {\n ...props,\n 'aria-busy': loading || undefined,\n ...renderProps,\n };\n\n return renderNativeButton(nativeProps, type);\n },\n type,\n } as ComponentProps<typeof AriaButton>,\n loading ? (\n <>\n <span\n aria-hidden=\"true\"\n className=\"size-4 animate-spin rounded-full border-2 border-current border-r-transparent\"\n />\n <span>{children}</span>\n </>\n ) : (\n children\n ),\n );\n}\n","import type {\n ComponentProps,\n CSSProperties,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport {\n createContext,\n createElement,\n useCallback,\n useContext,\n useId,\n useMemo,\n useRef,\n} from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport { Dialog as AriaDialog } from 'react-aria-components/Dialog';\nimport { Heading as AriaHeading } from 'react-aria-components/Heading';\nimport {\n Modal as AriaModal,\n ModalOverlay as AriaModalOverlay,\n} from 'react-aria-components/Modal';\nimport { Text as AriaText } from 'react-aria-components/Text';\nimport { tv } from 'tailwind-variants';\nimport { Button, type ButtonProps } from '../../primitives/Button/Button';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport useForwardedRef from '../hooks/useForwardedRef';\nimport action from '../styling/actions';\nimport type { VisualAppearance } from '../styling/visual';\n\nconst overlay = tv({\n base: 'breeze-modal-overlay fixed inset-0 z-50 flex items-center justify-center overflow-y-auto bg-[var(--breeze-overlay)] p-4 forced-colors:bg-[Canvas]',\n});\nconst modal = tv({ base: 'max-h-full max-w-full outline-none' });\nconst surface = tv({\n base: 'breeze-modal-surface max-h-[calc(100dvh-2rem)] w-[min(36rem,calc(100vw-2rem))] overflow-y-auto border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-6 text-[var(--breeze-ink)] shadow-xl outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n});\nconst title = tv({\n base: 'm-0 mb-2 font-[family-name:var(--breeze-font-display)] text-xl font-bold leading-tight',\n});\nconst description = tv({ base: 'mb-5 block text-[var(--breeze-ink-muted)]' });\n\nconst nestedBoundaryProperties = [\n '--breeze-nested-overlay-left',\n '--breeze-nested-overlay-top',\n '--breeze-nested-overlay-width',\n '--breeze-nested-overlay-height',\n] as const;\nconst nestedBackdropSuppressedAttribute = 'data-nested-backdrop-suppressed';\n\ninterface ModalSurfaceContextValue {\n depth: number;\n ref: RefObject<HTMLElement | null>;\n stack: object;\n}\n\nconst ModalSurfaceContext = createContext<ModalSurfaceContextValue | undefined>(\n undefined,\n);\nconst modalSurfaceDepth = new WeakMap<HTMLElement, number>();\nconst modalSurfaceStack = new WeakMap<HTMLElement, object>();\nexport const OverlayDescriptionContext = createContext<string | undefined>(\n undefined,\n);\n\nfunction isOpenModalSurface(\n candidate: HTMLElement | undefined,\n): candidate is HTMLElement {\n return (\n candidate !== undefined &&\n candidate.isConnected &&\n candidate.closest('[data-exiting]') === null\n );\n}\n\nfunction resolvePortalRoot(\n currentOverlay: HTMLElement,\n portalContainer: HTMLElement | null,\n): HTMLElement | undefined {\n const portal =\n portalContainer ??\n currentOverlay.closest<HTMLElement>('[data-breeze-portal-root]');\n\n return portal?.contains(currentOverlay) ? portal : undefined;\n}\n\nfunction findTopmostModalSurface(\n currentOverlay: HTMLElement,\n portalContainer: HTMLElement | null,\n parentSurface: ModalSurfaceContextValue | undefined,\n): HTMLElement | undefined {\n const portal = resolvePortalRoot(currentOverlay, portalContainer);\n\n if (portal === undefined) return undefined;\n\n const surfaces = Array.from(\n portal.querySelectorAll<HTMLElement>('.breeze-modal-surface'),\n ).filter(\n (candidateSurface) =>\n !currentOverlay.contains(candidateSurface) &&\n isOpenModalSurface(candidateSurface),\n );\n\n const latestSurface = surfaces.at(-1);\n const activeStack =\n parentSurface?.stack ??\n (latestSurface === undefined\n ? undefined\n : modalSurfaceStack.get(latestSurface));\n const activeSurfaces =\n activeStack === undefined\n ? surfaces\n : surfaces.filter(\n (candidateSurface) =>\n modalSurfaceStack.get(candidateSurface) === activeStack,\n );\n\n return activeSurfaces.reduce<HTMLElement | undefined>(\n (topmost, candidate) => {\n const topmostDepth =\n topmost === undefined ? -1 : modalSurfaceDepth.get(topmost) ?? -1;\n const candidateDepth = modalSurfaceDepth.get(candidate) ?? -1;\n\n return candidateDepth >= topmostDepth ? candidate : topmost;\n },\n undefined,\n );\n}\n\nfunction findExitingModalOverlays(\n currentOverlay: HTMLElement,\n portalContainer: HTMLElement | null,\n): HTMLElement[] {\n const portal = resolvePortalRoot(currentOverlay, portalContainer);\n\n if (portal === undefined) return [];\n\n return Array.from(\n portal.querySelectorAll<HTMLElement>('.breeze-modal-surface'),\n ).reduce<HTMLElement[]>((exitingOverlays, candidateSurface) => {\n if (\n currentOverlay.contains(candidateSurface) ||\n candidateSurface.closest('[data-exiting]') === null\n ) {\n return exitingOverlays;\n }\n\n const candidateOverlay = candidateSurface.closest<HTMLElement>(\n '.breeze-modal-overlay',\n );\n\n if (\n candidateOverlay !== null &&\n !exitingOverlays.includes(candidateOverlay)\n ) {\n exitingOverlays.push(candidateOverlay);\n }\n\n return exitingOverlays;\n }, []);\n}\n\nfunction resolveNestedBoundary(\n currentOverlay: HTMLElement,\n portalContainer: HTMLElement | null,\n parentSurface: ModalSurfaceContextValue | undefined,\n): HTMLElement | undefined {\n const contextualCandidate = parentSurface?.ref.current ?? undefined;\n const contextualSurface = isOpenModalSurface(contextualCandidate)\n ? contextualCandidate\n : undefined;\n const topmostSurface = findTopmostModalSurface(\n currentOverlay,\n portalContainer,\n parentSurface,\n );\n\n return topmostSurface ?? contextualSurface;\n}\n\nfunction clearNestedBoundary(overlayElement: HTMLElement): void {\n const { dataset } = overlayElement;\n\n delete dataset.nestedBoundary;\n nestedBoundaryProperties.forEach((property) =>\n overlayElement.style.removeProperty(property),\n );\n}\n\nfunction trackNestedBoundary(\n overlayElement: HTMLElement,\n boundary: HTMLElement,\n): () => void {\n const updateBoundary = () => {\n const bounds = boundary.getBoundingClientRect();\n\n if (bounds.width <= 0 || bounds.height <= 0) {\n clearNestedBoundary(overlayElement);\n return;\n }\n\n const { dataset } = overlayElement;\n\n dataset.nestedBoundary = '';\n overlayElement.style.setProperty(\n '--breeze-nested-overlay-left',\n `${bounds.left}px`,\n );\n overlayElement.style.setProperty(\n '--breeze-nested-overlay-top',\n `${bounds.top}px`,\n );\n overlayElement.style.setProperty(\n '--breeze-nested-overlay-width',\n `${bounds.width}px`,\n );\n overlayElement.style.setProperty(\n '--breeze-nested-overlay-height',\n `${bounds.height}px`,\n );\n };\n let motionFrame: number | undefined;\n const hasActiveBoundaryMotion = () =>\n boundary\n .getAnimations?.()\n .some(\n (animation) => animation.pending || animation.playState === 'running',\n ) ?? false;\n const trackBoundaryMotion = () => {\n motionFrame = undefined;\n updateBoundary();\n\n if (hasActiveBoundaryMotion()) {\n motionFrame = window.requestAnimationFrame(trackBoundaryMotion);\n }\n };\n const scheduleBoundaryTracking = () => {\n motionFrame ??= window.requestAnimationFrame(trackBoundaryMotion);\n };\n const observer =\n typeof ResizeObserver === 'undefined'\n ? undefined\n : new ResizeObserver(updateBoundary);\n const viewport = window.visualViewport;\n\n updateBoundary();\n scheduleBoundaryTracking();\n observer?.observe(boundary);\n boundary.addEventListener('animationstart', scheduleBoundaryTracking);\n boundary.addEventListener('animationend', scheduleBoundaryTracking);\n boundary.addEventListener('animationcancel', scheduleBoundaryTracking);\n boundary.addEventListener('transitionrun', scheduleBoundaryTracking);\n boundary.addEventListener('transitionend', scheduleBoundaryTracking);\n boundary.addEventListener('transitioncancel', scheduleBoundaryTracking);\n window.addEventListener('resize', updateBoundary);\n viewport?.addEventListener('resize', updateBoundary);\n viewport?.addEventListener('scroll', updateBoundary);\n\n return () => {\n if (motionFrame !== undefined) {\n window.cancelAnimationFrame(motionFrame);\n }\n observer?.disconnect();\n boundary.removeEventListener('animationstart', scheduleBoundaryTracking);\n boundary.removeEventListener('animationend', scheduleBoundaryTracking);\n boundary.removeEventListener('animationcancel', scheduleBoundaryTracking);\n boundary.removeEventListener('transitionrun', scheduleBoundaryTracking);\n boundary.removeEventListener('transitionend', scheduleBoundaryTracking);\n boundary.removeEventListener('transitioncancel', scheduleBoundaryTracking);\n window.removeEventListener('resize', updateBoundary);\n viewport?.removeEventListener('resize', updateBoundary);\n viewport?.removeEventListener('scroll', updateBoundary);\n clearNestedBoundary(overlayElement);\n };\n}\n\n/** Shared Breeze trigger props for overlays. */\nexport type SharedOverlayTriggerProps = Omit<ButtonProps, 'appearance'> & {\n appearance?: VisualAppearance;\n};\n\n/** Shared Breeze close-button props for overlays. */\nexport interface SharedOverlayCloseProps\n extends Omit<ButtonProps, 'appearance'> {\n appearance?: VisualAppearance;\n}\n\n/** Shared Breeze title props for overlays. */\nexport interface SharedOverlayTitleProps\n extends Omit<HTMLAttributes<HTMLHeadingElement>, 'style'> {\n /** Required accessible overlay title. */\n children: ReactNode;\n /** Semantic heading level. Defaults to `2`. */\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Ref to the rendered heading. */\n ref?: Ref<HTMLHeadingElement>;\n}\n\n/** Shared Breeze description props for overlays. */\nexport interface SharedOverlayDescriptionProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Required accessible overlay description. */\n children: ReactNode;\n /** Ref to the rendered description. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Internal modal-dialog surface configuration. */\nexport interface SharedModalContentProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n children: ReactNode;\n dismissible?: boolean;\n keyboardDismissDisabled?: boolean;\n modalClassName?: string;\n nested?: boolean;\n modalState?: {\n onOpenChange: (open: boolean) => void;\n open: boolean;\n };\n overlayClassName?: string;\n overlayStyle?: CSSProperties;\n ref?: Ref<HTMLElement>;\n role?: 'dialog' | 'alertdialog';\n surfaceClassName?: string;\n}\n\n/** React Aria-backed semantic trigger. */\nexport function SharedOverlayTrigger({\n appearance,\n ...props\n}: Readonly<SharedOverlayTriggerProps>): ReactElement {\n return createElement(Button, {\n ...props,\n appearance,\n });\n}\n\n/** React Aria-backed semantic close action. */\nexport function SharedOverlayClose({\n appearance,\n children,\n className,\n disabled = false,\n onAction,\n ref,\n size,\n variant,\n ...props\n}: Readonly<SharedOverlayCloseProps>): ReactElement {\n return createElement(\n AriaButton,\n {\n ...props,\n className: action({ appearance, class: className, size, variant }),\n isDisabled: disabled,\n onPress: onAction,\n ref: useForwardedRef(ref),\n slot: 'close',\n } as ComponentProps<typeof AriaButton>,\n children,\n );\n}\n\n/** React Aria title slot used as the overlay accessible name. */\nexport function SharedOverlayTitle({\n className,\n level = 2,\n ref,\n ...props\n}: Readonly<SharedOverlayTitleProps>): ReactElement {\n return createElement(AriaHeading, {\n ...props,\n className: title({ class: className }),\n level,\n ref: useForwardedRef(ref),\n slot: 'title',\n });\n}\n\n/** React Aria description slot used as the overlay accessible description. */\nexport function SharedOverlayDescription({\n className,\n ref,\n ...props\n}: Readonly<SharedOverlayDescriptionProps>): ReactElement {\n const generatedId = useContext(OverlayDescriptionContext);\n\n return createElement(AriaText, {\n ...props,\n className: description({ class: className }),\n elementType: 'p',\n id: props.id ?? generatedId,\n ref: useForwardedRef(ref),\n slot: 'description',\n });\n}\n\n/** React Aria modal engine shared by Dialog, AlertDialog, and Drawer. */\nexport function SharedModalContent({\n children,\n className,\n dismissible = true,\n keyboardDismissDisabled = false,\n modalClassName,\n modalState,\n nested = false,\n overlayClassName,\n overlayStyle,\n ref,\n role = 'dialog',\n surfaceClassName,\n ...props\n}: Readonly<SharedModalContentProps>): ReactElement {\n const { portalContainer } = useBreezeContext();\n const descriptionId = useId();\n const parentSurface = useContext(ModalSurfaceContext);\n const surfaceRef = useRef<HTMLElement | null>(null);\n const surfaceDepth = (parentSurface?.depth ?? -1) + 1;\n const surfaceStack = useMemo(\n () => parentSurface?.stack ?? {},\n [parentSurface?.stack],\n );\n const surfaceContext = useMemo<ModalSurfaceContextValue>(\n () => ({ depth: surfaceDepth, ref: surfaceRef, stack: surfaceStack }),\n [surfaceDepth, surfaceStack],\n );\n const forwardedSurfaceRef = useForwardedRef(ref);\n const setSurfaceRef = useCallback(\n (currentSurface: HTMLElement | null) => {\n surfaceRef.current = currentSurface;\n if (currentSurface !== null) {\n modalSurfaceDepth.set(currentSurface, surfaceDepth);\n modalSurfaceStack.set(currentSurface, surfaceStack);\n }\n forwardedSurfaceRef(currentSurface);\n },\n [forwardedSurfaceRef, surfaceDepth, surfaceStack],\n );\n const nestedOverlayCleanupRef = useRef<(() => void) | undefined>(undefined);\n const overlayRef = useCallback(\n (currentOverlay: HTMLDivElement | null) => {\n nestedOverlayCleanupRef.current?.();\n nestedOverlayCleanupRef.current = undefined;\n\n if (!nested || currentOverlay === null) return;\n\n let boundaryCleanup: (() => void) | undefined;\n let boundaryRetryFrame: number | undefined;\n let trackedBoundary: HTMLElement | undefined;\n const suppressedBackdrops = new Set<HTMLElement>();\n const syncSuppressedBackdrops = () => {\n const exitingOverlays = new Set(\n findExitingModalOverlays(currentOverlay, portalContainer),\n );\n\n suppressedBackdrops.forEach((suppressedOverlay) => {\n if (!exitingOverlays.has(suppressedOverlay)) {\n suppressedOverlay.removeAttribute(\n nestedBackdropSuppressedAttribute,\n );\n suppressedBackdrops.delete(suppressedOverlay);\n }\n });\n exitingOverlays.forEach((exitingOverlay) => {\n exitingOverlay.setAttribute(nestedBackdropSuppressedAttribute, '');\n suppressedBackdrops.add(exitingOverlay);\n });\n };\n const releaseSuppressedBackdrops = () => {\n suppressedBackdrops.forEach((suppressedOverlay) =>\n suppressedOverlay.removeAttribute(nestedBackdropSuppressedAttribute),\n );\n suppressedBackdrops.clear();\n };\n const bindBoundary = () => {\n syncSuppressedBackdrops();\n const boundary = resolveNestedBoundary(\n currentOverlay,\n portalContainer,\n parentSurface,\n );\n\n if (boundary === trackedBoundary) return;\n\n boundaryCleanup?.();\n boundaryCleanup = undefined;\n trackedBoundary = boundary;\n\n if (boundary === undefined) {\n clearNestedBoundary(currentOverlay);\n } else {\n boundaryCleanup = trackNestedBoundary(currentOverlay, boundary);\n }\n };\n\n const portalRoot = resolvePortalRoot(currentOverlay, portalContainer);\n const boundaryObserver =\n typeof MutationObserver === 'undefined' || portalRoot === undefined\n ? undefined\n : new MutationObserver(bindBoundary);\n\n bindBoundary();\n\n // React completes all refs in the current commit before the next paint.\n // Reconcile once so a simultaneously mounted inner layer takes precedence\n // over an inherited outer surface.\n boundaryRetryFrame = window.requestAnimationFrame(() => {\n boundaryRetryFrame = undefined;\n bindBoundary();\n });\n if (boundaryObserver !== undefined && portalRoot !== undefined) {\n boundaryObserver.observe(portalRoot, {\n attributeFilter: ['data-exiting'],\n attributes: true,\n childList: true,\n subtree: true,\n });\n }\n\n nestedOverlayCleanupRef.current = () => {\n if (boundaryRetryFrame !== undefined) {\n window.cancelAnimationFrame(boundaryRetryFrame);\n }\n boundaryObserver?.disconnect();\n boundaryCleanup?.();\n releaseSuppressedBackdrops();\n };\n },\n [nested, parentSurface, portalContainer],\n );\n\n return createElement(\n AriaModalOverlay,\n {\n className: overlay({\n class: [\n nested ? 'breeze-modal-overlay-nested' : undefined,\n overlayClassName,\n ],\n }),\n isDismissable: dismissible,\n isKeyboardDismissDisabled: keyboardDismissDisabled,\n isOpen: modalState?.open,\n onOpenChange: modalState?.onOpenChange,\n ref: overlayRef,\n style: overlayStyle,\n } as ComponentProps<typeof AriaModalOverlay>,\n createElement(\n AriaModal,\n {\n className: modal({\n class: [nested ? 'breeze-modal-nested' : undefined, modalClassName],\n }),\n },\n createElement(\n AriaDialog,\n {\n ...props,\n 'aria-describedby': descriptionId,\n className: surface({ class: [surfaceClassName, className] }),\n ref: setSurfaceRef,\n role,\n } as ComponentProps<typeof AriaDialog>,\n createElement(\n ModalSurfaceContext.Provider,\n { value: surfaceContext },\n createElement(\n OverlayDescriptionContext,\n { value: descriptionId },\n children,\n ),\n ),\n ),\n ),\n );\n}\n","/** Breakpoints available to Breeze responsive layout props. */\nexport type BreezeBreakpoint = 'base' | 'sm' | 'md' | 'lg';\n\n/**\n * A mobile-first layout value with required base behaviour and optional\n * overrides at Breeze breakpoints.\n */\nexport interface ResponsiveValueObject<Value> {\n /** Value used below the first breakpoint and inherited until overridden. */\n base: Value;\n /** Value applied at 1181px and wider. */\n lg?: Value;\n /** Value applied at 901px and wider. */\n md?: Value;\n /** Value applied at 681px and wider. */\n sm?: Value;\n}\n\n/** A scalar layout value or mobile-first responsive value. */\nexport type ResponsiveValue<Value> = Value | ResponsiveValueObject<Value>;\n\ntype ResponsiveClassMap<Value extends PropertyKey> = Record<\n BreezeBreakpoint,\n Record<Value, string>\n>;\n\nconst breakpoints: BreezeBreakpoint[] = ['base', 'sm', 'md', 'lg'];\n\nfunction isResponsiveValue<Value>(\n value: ResponsiveValue<Value>,\n): value is ResponsiveValueObject<Value> {\n return typeof value === 'object' && value !== null && 'base' in value;\n}\n\nexport function resolveResponsiveClasses<Value extends PropertyKey>(\n value: ResponsiveValue<Value>,\n classes: ResponsiveClassMap<Value>,\n): string {\n if (!isResponsiveValue(value)) {\n return classes.base[value];\n }\n\n return breakpoints\n .map((breakpoint) => {\n const breakpointValue = value[breakpoint];\n\n return breakpointValue === undefined\n ? undefined\n : classes[breakpoint][breakpointValue];\n })\n .filter((className): className is string => className !== undefined)\n .join(' ');\n}\n","import type { CSSProperties, Key, ReactElement, ReactNode } from 'react';\nimport {\n Children,\n cloneElement,\n createContext,\n createElement,\n isValidElement,\n useCallback,\n useContext,\n useEffect,\n useRef,\n} from 'react';\nimport { DialogTrigger as AriaDialogTrigger } from 'react-aria-components/Dialog';\nimport { CloseIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n SharedModalContent,\n type SharedModalContentProps,\n SharedOverlayClose,\n type SharedOverlayCloseProps,\n SharedOverlayDescription,\n type SharedOverlayDescriptionProps,\n SharedOverlayTitle,\n type SharedOverlayTitleProps,\n SharedOverlayTrigger,\n type SharedOverlayTriggerProps,\n} from '../../internal/react-aria/OverlayParts';\nimport {\n resolveResponsiveClasses,\n type ResponsiveValue,\n} from '../../internal/styling/responsive';\nimport {\n type BreezeDirection,\n useBreezeContext,\n} from '../../provider/BreezeContext';\n\n/** Supported physical modes expressed with logical inline placement. */\nexport type DrawerPlacement = 'start' | 'end' | 'bottom';\n/** Canonical inline drawer widths. Bottom drawers always remain full width. */\nexport type DrawerSize = 'default' | 'medium' | 'wide';\n/** Desktop-only boundary used to layer a nested drawer beside existing content. */\nexport interface DrawerAdjacentLayer {\n /** Inline-end viewport space reserved for the existing layer, in CSS pixels. */\n inlineEndOffset: number;\n}\nconst placementClasses = {\n base: {\n bottom:\n 'fixed inset-y-0 start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] end-auto h-dvh w-[var(--breeze-drawer-visual-viewport-width,100vw)] max-h-none max-w-none',\n end: 'fixed inset-y-0 end-[var(--breeze-drawer-visual-viewport-offset-inline-end,0px)] h-dvh w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] max-h-none max-w-[var(--breeze-drawer-width)]',\n start:\n 'fixed inset-y-0 start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] h-dvh w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] max-h-none max-w-[var(--breeze-drawer-width)]',\n },\n lg: {\n bottom:\n 'lg:fixed lg:inset-y-0 lg:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] lg:end-auto lg:h-dvh lg:w-[var(--breeze-drawer-visual-viewport-width,100vw)] lg:max-w-none',\n end: 'lg:fixed lg:inset-y-0 lg:end-[var(--breeze-drawer-visual-viewport-offset-inline-end,0px)] lg:start-auto lg:h-dvh lg:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] lg:max-h-none lg:max-w-[var(--breeze-drawer-width)]',\n start:\n 'lg:fixed lg:inset-y-0 lg:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] lg:end-auto lg:h-dvh lg:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] lg:max-h-none lg:max-w-[var(--breeze-drawer-width)]',\n },\n md: {\n bottom:\n 'md:fixed md:inset-y-0 md:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] md:end-auto md:h-dvh md:w-[var(--breeze-drawer-visual-viewport-width,100vw)] md:max-w-none',\n end: 'md:fixed md:inset-y-0 md:end-[var(--breeze-drawer-visual-viewport-offset-inline-end,0px)] md:start-auto md:h-dvh md:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] md:max-h-none md:max-w-[var(--breeze-drawer-width)]',\n start:\n 'md:fixed md:inset-y-0 md:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] md:end-auto md:h-dvh md:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] md:max-h-none md:max-w-[var(--breeze-drawer-width)]',\n },\n sm: {\n bottom:\n 'sm:fixed sm:inset-y-0 sm:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] sm:end-auto sm:h-dvh sm:w-[var(--breeze-drawer-visual-viewport-width,100vw)] sm:max-w-none',\n end: 'sm:fixed sm:inset-y-0 sm:end-[var(--breeze-drawer-visual-viewport-offset-inline-end,0px)] sm:start-auto sm:h-dvh sm:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] sm:max-h-none sm:max-w-[var(--breeze-drawer-width)]',\n start:\n 'sm:fixed sm:inset-y-0 sm:start-[var(--breeze-drawer-visual-viewport-offset-inline-start,0px)] sm:end-auto sm:h-dvh sm:w-[min(var(--breeze-drawer-width),var(--breeze-drawer-visual-viewport-width,100vw))] sm:max-h-none sm:max-w-[var(--breeze-drawer-width)]',\n },\n};\n\nconst drawerWidths: Record<DrawerSize, string> = {\n default: '36rem',\n medium: '38rem',\n wide: '48rem',\n};\nconst adjacentDrawerWidth = '38rem';\nconst visualViewportSurfaces = new Map<HTMLElement, BreezeDirection>();\nlet removeVisualViewportListeners: (() => void) | undefined;\n\nfunction updateVisualViewportSurface(\n surface: HTMLElement,\n viewport: VisualViewport,\n direction: BreezeDirection,\n): void {\n const offsetRight = Math.max(\n 0,\n window.innerWidth - viewport.offsetLeft - viewport.width,\n );\n const offsetInlineStart =\n direction === 'rtl' ? offsetRight : viewport.offsetLeft;\n const offsetInlineEnd =\n direction === 'rtl' ? viewport.offsetLeft : offsetRight;\n const offsetBottom = Math.max(\n 0,\n window.innerHeight - viewport.offsetTop - viewport.height,\n );\n\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-height',\n `${viewport.height}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-width',\n `${viewport.width}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-top',\n `${viewport.offsetTop}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-left',\n `${viewport.offsetLeft}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-right',\n `${offsetRight}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-inline-start',\n `${offsetInlineStart}px`,\n );\n surface.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-inline-end',\n `${offsetInlineEnd}px`,\n );\n const overlay = surface.closest<HTMLElement>('.breeze-modal-overlay');\n const surfaceBounds = surface.getBoundingClientRect();\n\n overlay?.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-inline-end',\n `${offsetInlineEnd}px`,\n );\n overlay?.style.setProperty(\n '--breeze-drawer-visual-viewport-offset-bottom',\n `${offsetBottom}px`,\n );\n overlay?.style.setProperty(\n '--breeze-drawer-visual-viewport-surface-left',\n `${surfaceBounds.left}px`,\n );\n overlay?.style.setProperty(\n '--breeze-drawer-visual-viewport-surface-width',\n `${surfaceBounds.width}px`,\n );\n overlay?.style.setProperty(\n '--breeze-drawer-visual-viewport-surface-background',\n window.getComputedStyle(surface).backgroundColor,\n );\n}\n\nfunction updateVisualViewportSurfaces(): void {\n const viewport = window.visualViewport ?? null;\n\n if (viewport === null) return;\n\n visualViewportSurfaces.forEach((direction, surface) => {\n updateVisualViewportSurface(surface, viewport, direction);\n });\n}\n\nfunction registerVisualViewportSurface(\n surface: HTMLElement,\n direction: BreezeDirection,\n): () => void {\n const viewport = window.visualViewport ?? null;\n\n if (viewport === null) return () => undefined;\n\n const refreshAfterEntry = (event: AnimationEvent) => {\n if (\n event.target === surface &&\n event.animationName === 'breeze-drawer-in'\n ) {\n updateVisualViewportSurface(surface, viewport, direction);\n }\n };\n\n surface.addEventListener('animationend', refreshAfterEntry);\n visualViewportSurfaces.set(surface, direction);\n updateVisualViewportSurface(surface, viewport, direction);\n\n if (removeVisualViewportListeners === undefined) {\n viewport.addEventListener('resize', updateVisualViewportSurfaces);\n viewport.addEventListener('scroll', updateVisualViewportSurfaces);\n removeVisualViewportListeners = () => {\n viewport.removeEventListener('resize', updateVisualViewportSurfaces);\n viewport.removeEventListener('scroll', updateVisualViewportSurfaces);\n };\n }\n\n return () => {\n surface.removeEventListener('animationend', refreshAfterEntry);\n visualViewportSurfaces.delete(surface);\n\n if (visualViewportSurfaces.size === 0) {\n removeVisualViewportListeners?.();\n removeVisualViewportListeners = undefined;\n }\n };\n}\n\ninterface DrawerModalState {\n onOpenChange: (open: boolean) => void;\n open: boolean;\n}\n\nconst DrawerModalStateContext = createContext<DrawerModalState | undefined>(\n undefined,\n);\n\nconst placementMotionClasses = {\n base: {\n bottom: 'breeze-drawer-offset-bottom',\n end: 'breeze-drawer-offset-end',\n start: 'breeze-drawer-offset-start',\n },\n lg: {\n bottom: 'breeze-drawer-offset-lg-bottom',\n end: 'breeze-drawer-offset-lg-end',\n start: 'breeze-drawer-offset-lg-start',\n },\n md: {\n bottom: 'breeze-drawer-offset-md-bottom',\n end: 'breeze-drawer-offset-md-end',\n start: 'breeze-drawer-offset-md-start',\n },\n sm: {\n bottom: 'breeze-drawer-offset-sm-bottom',\n end: 'breeze-drawer-offset-sm-end',\n start: 'breeze-drawer-offset-sm-start',\n },\n};\n\ninterface DrawerRootSharedProps {\n /** Trigger and drawer content. */ children: ReactNode;\n}\ninterface ControlledDrawerRootProps {\n /** Current open state. */ open: boolean;\n /** Called with the next open state. */ onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\ninterface ReadOnlyDrawerRootProps {\n /** Current immutable open state. */ open: boolean;\n /** Marks controlled state immutable. */ readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\ninterface UncontrolledDrawerRootProps {\n /** Initial open state. */ defaultOpen?: boolean;\n /** Called with the next open state. */ onOpenChange?: (\n open: boolean,\n ) => void;\n open?: never;\n readOnly?: false;\n}\ninterface TriggeredDrawerRootProps extends DrawerRootSharedProps {\n /** Uses a compound trigger to coordinate drawer state. */\n triggerless?: false;\n}\ninterface TriggerlessDrawerRootProps extends DrawerRootSharedProps {\n defaultOpen?: never;\n /** Called with the next externally controlled open state. */\n onOpenChange: (open: boolean) => void;\n /** Current externally controlled open state. */\n open: boolean;\n readOnly?: never;\n /** Omits a compound trigger for state controlled by an external action. */\n triggerless: true;\n}\n/** Props for controlled, read-only, or uncontrolled drawer state. */ export type DrawerRootProps =\n\n | (TriggeredDrawerRootProps &\n (\n | ControlledDrawerRootProps\n | ReadOnlyDrawerRootProps\n | UncontrolledDrawerRootProps\n ))\n | TriggerlessDrawerRootProps;\n/** Props for the drawer trigger. */ export type DrawerTriggerProps =\n SharedOverlayTriggerProps;\n/** Props for a responsive modal drawer surface. */ export interface DrawerContentProps\n extends Omit<\n SharedModalContentProps,\n | 'modalClassName'\n | 'modalState'\n | 'overlayClassName'\n | 'overlayStyle'\n | 'surfaceClassName'\n > {\n /** Clips and positions this layer beside reserved content on wide screens. */\n adjacent?: DrawerAdjacentLayer;\n /** Header treatment. `none` leaves all content unframed for application-owned shell drawers. Defaults to `default`. */\n chrome?: 'default' | 'none' | 'soft';\n /** Responsive logical edge. Defaults to `end`. */ placement?: ResponsiveValue<DrawerPlacement>;\n /** Resets the scrollable body to the start whenever this value changes. */ scrollResetKey?: Key;\n /** Canonical inline width. Bottom placement remains full width. Defaults to `default`. */\n size?: DrawerSize;\n}\n/** Props for the required drawer title. */ export type DrawerTitleProps =\n SharedOverlayTitleProps;\n/** Props for the required drawer description. */ export type DrawerDescriptionProps =\n SharedOverlayDescriptionProps;\n/** Props for a semantic drawer close action. */ export type DrawerCloseProps =\n SharedOverlayCloseProps;\n\n/** Coordinates a modal panel that enters from a logical viewport edge. */\nexport function Root(props: Readonly<DrawerRootProps>): ReactElement {\n useBreezeContext();\n const { children, triggerless } = props;\n\n if (triggerless) {\n const { onOpenChange, open } = props;\n\n return createElement(\n DrawerModalStateContext.Provider,\n {\n value: {\n onOpenChange,\n open,\n },\n },\n children,\n );\n }\n\n const { defaultOpen, onOpenChange, open } = props;\n\n return createElement(\n DrawerModalStateContext.Provider,\n { value: undefined },\n <AriaDialogTrigger\n defaultOpen={defaultOpen}\n isOpen={open}\n onOpenChange={onOpenChange}\n >\n {children}\n </AriaDialogTrigger>,\n );\n}\nexport function Content({\n adjacent,\n children,\n chrome = 'default',\n placement = 'end',\n ref,\n scrollResetKey,\n size = 'default',\n ...props\n}: Readonly<DrawerContentProps>): ReactElement {\n const { direction, messages } = useBreezeContext();\n const modalState = useContext(DrawerModalStateContext);\n const bodyRef = useRef<HTMLDivElement>(null);\n const visualViewportCleanupRef = useRef<(() => void) | undefined>(undefined);\n const forwardedRef = useForwardedRef(ref);\n const surfaceRef = useCallback(\n (surface: HTMLElement | null) => {\n visualViewportCleanupRef.current?.();\n visualViewportCleanupRef.current =\n surface === null\n ? undefined\n : registerVisualViewportSurface(surface, direction);\n forwardedRef(surface);\n },\n [direction, forwardedRef],\n );\n const childElements = Children.toArray(children);\n const titleElement = childElements.find(\n (child): child is ReactElement<DrawerTitleProps> =>\n isValidElement<DrawerTitleProps>(child) &&\n child.type === SharedOverlayTitle,\n );\n const descriptionElement = childElements.find(\n (child): child is ReactElement<DrawerDescriptionProps> =>\n isValidElement<DrawerDescriptionProps>(child) &&\n child.type === SharedOverlayDescription,\n );\n const body = childElements.filter(\n (child) => child !== titleElement && child !== descriptionElement,\n );\n const headerTone =\n chrome === 'soft'\n ? 'bg-[var(--breeze-shell-soft)]'\n : 'bg-[var(--breeze-shell)]';\n const overlayStyle = {\n '--breeze-drawer-width':\n adjacent === undefined ? drawerWidths[size] : adjacentDrawerWidth,\n ...(adjacent === undefined\n ? {}\n : {\n '--breeze-drawer-adjacent-inline-end': `${adjacent.inlineEndOffset}px`,\n }),\n } as CSSProperties;\n\n useEffect(() => {\n if (bodyRef.current !== null) {\n bodyRef.current.scrollTop = 0;\n }\n }, [scrollResetKey]);\n\n const framedChildren = (\n <>\n <header\n className={`flex shrink-0 items-center justify-between gap-5 px-4 py-4 text-[var(--breeze-ink-inverse)] sm:px-6 sm:py-5 ${headerTone}`}\n >\n <div className=\"min-w-0\">\n {descriptionElement === undefined\n ? null\n : cloneElement(descriptionElement, {\n className: `mb-0 text-[var(--breeze-ink-inverse-muted)] ${descriptionElement.props.className ?? ''}`,\n })}\n {titleElement === undefined\n ? null\n : cloneElement(titleElement, {\n className: `mt-1 mb-0 text-2xl leading-[1.2] text-[var(--breeze-ink-inverse)] ${titleElement.props.className ?? ''}`,\n })}\n </div>\n <SharedOverlayClose\n aria-label={messages.close}\n autoFocus\n appearance=\"ghost\"\n className=\"size-11 min-h-0 shrink-0 border-0 p-0 text-[var(--breeze-ink-inverse)] data-[hovered]:bg-white/10\"\n variant=\"light\"\n >\n <CloseIcon size=\"1rem\" />\n </SharedOverlayClose>\n </header>\n <div\n className=\"min-h-0 flex-1 overflow-y-auto px-4 py-5 sm:p-6\"\n ref={bodyRef}\n >\n {body}\n </div>\n </>\n );\n\n return createElement(\n SharedModalContent,\n {\n ...props,\n modalClassName: `breeze-drawer-motion ${adjacent === undefined ? '' : 'breeze-drawer-adjacent-motion'}`,\n modalState,\n overlayClassName: `breeze-drawer-overlay items-stretch justify-stretch overflow-hidden p-0 sm:p-0 ${adjacent === undefined ? '' : 'breeze-drawer-adjacent-overlay'}`,\n overlayStyle,\n ref: surfaceRef,\n surfaceClassName: `breeze-drawer-surface breeze-drawer-visual-viewport flex max-h-none flex-col overflow-clip border-0 p-0 shadow-xl ${adjacent === undefined ? '' : 'breeze-drawer-adjacent-surface'} ${resolveResponsiveClasses(placement, placementClasses)} ${resolveResponsiveClasses(placement, placementMotionClasses)}`,\n } as SharedModalContentProps,\n chrome === 'none' ? children : framedChildren,\n );\n}\n/**\n * Presents a modal task surface from a logical viewport edge with responsive\n * placement, focus containment, and controlled or trigger-owned state.\n *\n * @summary responsive edge-mounted modal task surface\n */\nexport const Drawer = {\n /** Semantic action that closes the current drawer layer. */\n Close: SharedOverlayClose,\n /** Responsive modal drawer surface and focus scope. */\n Content,\n /** Required accessible drawer description. */\n Description: SharedOverlayDescription,\n /** Controlled, read-only, or uncontrolled open-state coordinator. */\n Root,\n /** Required accessible drawer title. */\n Title: SharedOverlayTitle,\n /** Semantic action that opens the drawer. */\n Trigger: SharedOverlayTrigger,\n};\n","import type {\n ComponentProps,\n MouseEvent,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Link as AriaLink } from 'react-aria-components/Link';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { NativeLinkProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst link = tv({\n base: 'font-medium underline decoration-1 underline-offset-2 transition-colors duration-[var(--breeze-duration-fast)] data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55',\n defaultVariants: {\n variant: 'primary',\n },\n variants: {\n variant: {\n danger:\n 'text-[var(--breeze-danger)] data-[hovered]:text-[var(--breeze-danger-hover)]',\n inverse:\n 'text-[var(--breeze-ink-inverse)] data-[hovered]:text-[var(--breeze-ink-inverse-muted)]',\n muted:\n 'text-[var(--breeze-ink-soft)] data-[hovered]:text-[var(--breeze-ink)]',\n primary:\n 'text-[var(--breeze-primary)] data-[hovered]:text-[var(--breeze-primary-hover)]',\n },\n },\n});\n\n/** Props for a router-neutral navigation link. */\nexport interface LinkProps extends NativeLinkProps {\n /** Link content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents navigation. Defaults to `false`. */\n disabled?: boolean;\n /** Prompts download instead of navigation when provided. */\n download?: boolean | string;\n /** Native destination URL. */\n href: string;\n /** Called after semantic link activation. */\n onAction?: () => void;\n /** Ref to the rendered anchor. */\n ref?: Ref<HTMLAnchorElement>;\n /** Semantic text colour. Defaults to `primary`. */\n variant?: 'primary' | 'muted' | 'danger' | 'inverse';\n}\n\nfunction shouldUseRouter(\n href: string,\n target: string | undefined,\n download: LinkProps['download'],\n): boolean {\n return (\n href.startsWith('/') &&\n !href.startsWith('//') &&\n download !== true &&\n typeof download !== 'string' &&\n (target === undefined || target === '_self')\n );\n}\n\n/**\n * Navigates with the provider router for local URLs and native browser behaviour otherwise.\n *\n * @summary router-neutral inline navigation with native browser behaviour\n */\nexport function Link({\n children,\n className,\n disabled = false,\n download,\n href,\n onAction,\n ref,\n target,\n variant,\n ...props\n}: Readonly<LinkProps>): ReactElement {\n const { router } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const useRouter =\n router !== undefined && shouldUseRouter(href, target, download);\n const routerClick = {\n onClick: (event: MouseEvent<Element>) => {\n if (\n useRouter &&\n event.button === 0 &&\n !event.altKey &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.shiftKey\n ) {\n event.preventDefault();\n router.navigate(href);\n }\n },\n };\n\n return createElement(\n AriaLink,\n {\n ...props,\n ...routerClick,\n className: link({\n class: className,\n variant,\n }),\n download,\n href,\n isDisabled: disabled,\n onPress: onAction,\n ref: forwardedRef,\n render: (renderProps) => {\n if (disabled || !('href' in renderProps)) {\n return createElement('span', {\n ...renderProps,\n href: undefined,\n } as unknown as ComponentProps<'span'>);\n }\n\n return createElement('a', {\n ...props,\n ...renderProps,\n });\n },\n target,\n } as ComponentProps<typeof AriaLink>,\n children,\n );\n}\n","import type { ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport type { NativeLinkProps } from '../../internal/types/native';\nimport { Link, type LinkProps } from '../Link/Link';\n\nconst skipLink = tv({\n base: 'fixed start-4 top-4 z-50 -translate-y-24 bg-[var(--breeze-primary)] px-4 py-3 font-semibold text-white outline-none transition-transform focus:translate-y-0 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--breeze-focus)] motion-reduce:transition-none',\n});\n\n/** Props for the keyboard-first link that bypasses repeated page chrome. */\nexport interface SkipLinkProps extends NativeLinkProps {\n /** Accessible link content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Ref to the rendered anchor. */\n ref?: Ref<HTMLAnchorElement>;\n /** Id of the focusable main content target, without a leading hash. */\n targetId: string;\n}\n\n/**\n * Reveals a native fragment link on focus so keyboard users can bypass\n * repeated content.\n *\n * @summary focus-revealed bypass link to a main-content target\n */\nexport function SkipLink({\n children,\n className,\n ref,\n targetId,\n ...props\n}: Readonly<SkipLinkProps>): ReactElement {\n return createElement(\n Link,\n {\n ...props,\n className: skipLink({ class: className }),\n href: `#${targetId}`,\n ref,\n } as LinkProps,\n children,\n );\n}\n","import type { HTMLAttributes, Key, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useEffect, useRef } from 'react';\nimport { CloseIcon, MenuIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { Drawer } from '../../primitives/Drawer/Drawer';\nimport { SkipLink } from '../../primitives/SkipLink/SkipLink';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\ninterface ApplicationShellSharedProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style' | 'title'> {\n /** Account or user-menu slot in the wide rail footer and compact header. */\n account: ReactNode;\n /** Canonical product brand slot. */\n brand: ReactNode;\n /** Main application page content. */\n children: ReactNode;\n /** Compact-header product name. Defaults to `brand`. */\n compactBrand?: ReactNode;\n /** Focuses the main-content target after this application-owned content key changes. */\n contentFocusKey?: Key;\n /** Optional active application-context slot. */\n context?: ReactNode;\n /** Accessible title for the compact navigation drawer. */\n navigationLabel: string;\n /** Primary application navigation. */\n navigation: ReactNode;\n /** Ref to the rendered shell root. */\n ref?: Ref<HTMLDivElement>;\n /** Visible-on-focus skip-link label. */\n skipLinkLabel: ReactNode;\n /** Stable id assigned to the main-content target. Defaults to `main-content`. */\n mainId?: string;\n}\n\ninterface ControlledApplicationShellProps {\n /** Current compact-navigation drawer state. */\n compactNavigationOpen: boolean;\n defaultCompactNavigationOpen?: never;\n /** Called with the next compact-navigation drawer state. */\n onCompactNavigationOpenChange: (open: boolean) => void;\n}\n\ninterface UncontrolledApplicationShellProps {\n compactNavigationOpen?: never;\n /** Initial compact-navigation drawer state. Defaults to `false`. */\n defaultCompactNavigationOpen?: boolean;\n /** Called with the next compact-navigation drawer state. */\n onCompactNavigationOpenChange?: (open: boolean) => void;\n}\n\n/** Props for the shared responsive application frame. */\nexport type ApplicationShellProps = ApplicationShellSharedProps &\n (ControlledApplicationShellProps | UncontrolledApplicationShellProps);\n\n/**\n * Frames brand, navigation, context, account controls, and main content\n * responsively.\n *\n * @summary responsive application frame with accessible primary navigation\n */\nexport function ApplicationShell({\n account,\n brand,\n children,\n className,\n compactBrand,\n compactNavigationOpen,\n context,\n contentFocusKey,\n defaultCompactNavigationOpen,\n mainId = 'main-content',\n navigation,\n navigationLabel,\n onCompactNavigationOpenChange,\n ref,\n skipLinkLabel,\n ...props\n}: Readonly<ApplicationShellProps>): ReactElement {\n const { messages } = useBreezeContext();\n const mainRef = useRef<HTMLElement>(null);\n const previousContentFocusKey = useRef(contentFocusKey);\n\n useEffect(() => {\n const previousKey = previousContentFocusKey.current;\n\n previousContentFocusKey.current = contentFocusKey;\n\n if (contentFocusKey === undefined || contentFocusKey === previousKey) {\n return undefined;\n }\n\n const frame = window.requestAnimationFrame(() => {\n mainRef.current?.focus();\n });\n\n return () => window.cancelAnimationFrame(frame);\n }, [contentFocusKey]);\n\n const compactNavigationContent = (\n <>\n <Drawer.Trigger\n aria-label={navigationLabel}\n appearance=\"ghost\"\n className=\"size-11 border-0 p-0 text-[var(--breeze-ink-inverse)] data-[hovered]:bg-[var(--breeze-shell-soft)]\"\n variant=\"light\"\n >\n <MenuIcon size=\"1.5rem\" />\n </Drawer.Trigger>\n <Drawer.Content\n className=\"max-h-none w-64 border-0 bg-[var(--breeze-shell)] p-0 text-[var(--breeze-ink-inverse)]\"\n chrome=\"none\"\n placement=\"start\"\n >\n <div className=\"flex min-h-16 items-center justify-between border-b border-[var(--breeze-shell-soft)] px-4\">\n <div>{brand}</div>\n <Drawer.Title className=\"sr-only\">{navigationLabel}</Drawer.Title>\n <Drawer.Close\n aria-label={messages.close}\n appearance=\"ghost\"\n className=\"size-11 border-0 p-0 text-[var(--breeze-ink-inverse)] data-[hovered]:bg-[var(--breeze-shell-soft)]\"\n variant=\"light\"\n >\n <CloseIcon size=\"1.5rem\" />\n </Drawer.Close>\n </div>\n <Drawer.Description className=\"sr-only\">\n {navigationLabel}\n </Drawer.Description>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-3 py-6 [&_a]:flex [&_a]:min-h-11 [&_a]:items-center [&_a]:gap-3 [&_a]:text-[var(--breeze-ink-inverse-muted)] [&_a]:no-underline [&_a[data-current]]:bg-[var(--breeze-primary-selected)] [&_a[data-current]]:text-white [&_a[data-current][data-hovered]]:bg-[var(--breeze-primary-selected)] [&_a[data-hovered]]:bg-[var(--breeze-shell-soft)] [&_a[data-hovered]]:text-white\">\n {navigation}\n </div>\n <footer className=\"grid gap-2 border-t border-[var(--breeze-shell-soft)] p-3\">\n {context}\n </footer>\n </Drawer.Content>\n </>\n );\n const compactNavigation =\n compactNavigationOpen === undefined ? (\n <Drawer.Root\n defaultOpen={defaultCompactNavigationOpen}\n onOpenChange={onCompactNavigationOpenChange}\n >\n {compactNavigationContent}\n </Drawer.Root>\n ) : (\n <Drawer.Root\n onOpenChange={onCompactNavigationOpenChange}\n open={compactNavigationOpen}\n >\n {compactNavigationContent}\n </Drawer.Root>\n );\n\n return createElement(\n 'div',\n {\n ...props,\n className: `min-h-dvh bg-[var(--breeze-canvas)] text-[var(--breeze-ink)] ${className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <SkipLink targetId={mainId}>{skipLinkLabel}</SkipLink>\n <aside className=\"fixed inset-y-0 start-0 z-20 hidden w-64 flex-col bg-[var(--breeze-shell)] text-[var(--breeze-ink-inverse)] md:flex\">\n <div className=\"flex min-h-20 items-center border-b border-[var(--breeze-shell-soft)] px-5\">\n {brand}\n </div>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-3 py-7 [&_a]:flex [&_a]:min-h-11 [&_a]:items-center [&_a]:gap-3 [&_a]:text-[var(--breeze-ink-inverse-muted)] [&_a]:no-underline [&_a[data-current]]:bg-[var(--breeze-primary-selected)] [&_a[data-current]]:text-white [&_a[data-current][data-hovered]]:bg-[var(--breeze-primary-selected)] [&_a[data-hovered]]:bg-[var(--breeze-shell-soft)] [&_a[data-hovered]]:text-white\">\n {navigation}\n </div>\n <footer className=\"grid gap-2 border-t border-[var(--breeze-shell-soft)] p-3\">\n {context}\n {account}\n </footer>\n </aside>\n <header className=\"sticky top-0 z-20 grid min-h-16 grid-cols-[2.75rem_minmax(0,1fr)_2.75rem] items-center gap-3 bg-[var(--breeze-shell)] px-3 text-[var(--breeze-ink-inverse)] md:hidden\">\n {compactNavigation}\n <div className=\"min-w-0 justify-self-center font-[family-name:var(--breeze-font-display)] text-xl font-semibold\">\n {compactBrand ?? brand}\n </div>\n <div className=\"size-11 justify-self-end overflow-visible [&_[data-breeze-user-menu-trigger]]:min-h-11 [&_[data-breeze-user-menu-trigger]]:p-1 [&_[data-breeze-user-name]]:hidden\">\n {account}\n </div>\n </header>\n <main\n className=\"min-h-dvh px-4 py-6 sm:px-8 sm:py-12 md:ms-64 lg:px-12\"\n id={mainId}\n ref={mainRef}\n tabIndex={-1}\n >\n {children}\n </main>\n </>,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ResponsiveValue } from '../../internal/styling/responsive';\nimport { resolveResponsiveClasses } from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst orientationClasses = {\n base: {\n horizontal: 'flex-row',\n vertical: 'flex-col items-stretch',\n verticalReverse: 'flex-col-reverse items-stretch',\n },\n lg: {\n horizontal: 'lg:flex-row',\n vertical: 'lg:flex-col lg:items-stretch',\n verticalReverse: 'lg:flex-col-reverse lg:items-stretch',\n },\n md: {\n horizontal: 'md:flex-row',\n vertical: 'md:flex-col md:items-stretch',\n verticalReverse: 'md:flex-col-reverse md:items-stretch',\n },\n sm: {\n horizontal: 'sm:flex-row',\n vertical: 'sm:flex-col sm:items-stretch',\n verticalReverse: 'sm:flex-col-reverse sm:items-stretch',\n },\n} as const;\n\nconst buttonGroup = tv({\n base: 'flex flex-wrap gap-3',\n defaultVariants: { align: 'start' },\n variants: {\n align: {\n center: 'justify-center',\n end: 'justify-end',\n spaceBetween: 'justify-between',\n start: 'justify-start',\n },\n },\n});\n\n/** Props for a related set of application actions. */\nexport interface ButtonGroupProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Horizontal alignment. Defaults to `start`. */\n align?: 'start' | 'center' | 'end' | 'spaceBetween';\n /** Related Button, LinkButton, or IconButton children. */\n children: ReactNode;\n /** Responsive action-flow direction. Defaults to `horizontal`. */\n orientation?: ResponsiveValue<'horizontal' | 'vertical' | 'verticalReverse'>;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * Arranges semantically related actions with responsive flow.\n *\n * @summary responsive visual grouping for related application actions\n */\nexport function ButtonGroup({\n align,\n className,\n orientation = 'horizontal',\n ref,\n ...props\n}: Readonly<ButtonGroupProps>): ReactElement {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: buttonGroup({\n align,\n class: [\n resolveResponsiveClasses(orientation, orientationClasses),\n className,\n ],\n }),\n ref: useForwardedRef(ref),\n role: props.role ?? 'group',\n });\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createContext, createElement, useContext } from 'react';\nimport { DialogTrigger as AriaDialogTrigger } from 'react-aria-components/Dialog';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n SharedModalContent,\n type SharedModalContentProps,\n SharedOverlayClose,\n type SharedOverlayCloseProps,\n SharedOverlayDescription,\n type SharedOverlayDescriptionProps,\n SharedOverlayTitle,\n type SharedOverlayTitleProps,\n SharedOverlayTrigger,\n type SharedOverlayTriggerProps,\n} from '../../internal/react-aria/OverlayParts';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst alertDialogActions = tv({\n base: 'flex flex-col-reverse items-stretch gap-2.5 sm:flex-row sm:items-center sm:justify-end [&>*]:w-full sm:[&>*]:w-auto',\n});\n\ninterface AlertDialogRootSharedProps {\n /** Trigger and alert content. */ children: ReactNode;\n}\ninterface ControlledAlertDialogRootProps {\n /** Current open state. */ open: boolean;\n /** Called with the next open state. */ onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\ninterface ReadOnlyAlertDialogRootProps {\n /** Current immutable open state. */ open: boolean;\n /** Marks controlled state immutable. */ readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\ninterface UncontrolledAlertDialogRootProps {\n /** Initial open state. */ defaultOpen?: boolean;\n /** Called with the next open state. */ onOpenChange?: (\n open: boolean,\n ) => void;\n open?: never;\n readOnly?: false;\n}\ninterface TriggeredAlertDialogRootProps extends AlertDialogRootSharedProps {\n /** Uses a compound trigger to coordinate alert-dialog state. */\n triggerless?: false;\n}\ninterface TriggerlessAlertDialogRootProps extends AlertDialogRootSharedProps {\n defaultOpen?: never;\n /** Called with the next externally controlled open state. */\n onOpenChange: (open: boolean) => void;\n /** Current externally controlled open state. */\n open: boolean;\n readOnly?: never;\n /** Omits a compound trigger for state controlled by an external action. */\n triggerless: true;\n}\n/** Props for controlled, read-only, or uncontrolled alert-dialog state. */ export type AlertDialogRootProps =\n\n | (TriggeredAlertDialogRootProps &\n (\n | ControlledAlertDialogRootProps\n | ReadOnlyAlertDialogRootProps\n | UncontrolledAlertDialogRootProps\n ))\n | TriggerlessAlertDialogRootProps;\n/** Props for the alert-dialog trigger. */ export type AlertDialogTriggerProps =\n SharedOverlayTriggerProps;\n/** Props for alert-dialog content requiring explicit action. */ export type AlertDialogContentProps =\n Omit<SharedModalContentProps, 'dismissible' | 'modalState' | 'role'>;\n/** Props for the required alert-dialog title. */ export type AlertDialogTitleProps =\n SharedOverlayTitleProps;\n/** Props for the required alert-dialog consequence description. */ export type AlertDialogDescriptionProps =\n SharedOverlayDescriptionProps;\n/** Props for an explicit alert-dialog close action. */ export type AlertDialogCloseProps =\n SharedOverlayCloseProps;\n/** Props for the canonical alert-dialog action region. */\nexport interface AlertDialogActionsProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Explicit decision actions. */\n children: ReactNode;\n /** Ref to the rendered action group. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface AlertDialogModalState {\n onOpenChange: (open: boolean) => void;\n open: boolean;\n}\n\nconst AlertDialogModalStateContext = createContext<\n AlertDialogModalState | undefined\n>(undefined);\n\n/** Coordinates an accessible modal decision that requires acknowledgement. */\nexport function Root(props: Readonly<AlertDialogRootProps>): ReactElement {\n useBreezeContext();\n const { children, triggerless } = props;\n\n if (triggerless) {\n const { onOpenChange, open } = props;\n\n return createElement(\n AlertDialogModalStateContext.Provider,\n { value: { onOpenChange, open } },\n children,\n );\n }\n\n const { defaultOpen, onOpenChange, open } = props;\n\n return createElement(\n AlertDialogModalStateContext.Provider,\n { value: undefined },\n <AriaDialogTrigger\n defaultOpen={defaultOpen}\n isOpen={open}\n onOpenChange={onOpenChange}\n >\n {children}\n </AriaDialogTrigger>,\n );\n}\nexport function Content(\n props: Readonly<AlertDialogContentProps>,\n): ReactElement {\n const modalState = useContext(AlertDialogModalStateContext);\n\n return createElement(SharedModalContent, {\n ...props,\n dismissible: false,\n modalState,\n role: 'alertdialog',\n });\n}\n\nexport function Actions({\n className,\n ref,\n ...props\n}: Readonly<AlertDialogActionsProps>): ReactElement {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: alertDialogActions({ class: className }),\n ref: useForwardedRef(ref),\n role: props.role ?? 'group',\n });\n}\n/**\n * Presents an accessible modal alert that requires an explicit decision.\n *\n * @summary modal decision requiring explicit confirmation\n */\nexport const AlertDialog = {\n /** Responsive, end-aligned region for explicit decision actions. */\n Actions,\n /** Explicit decision action that closes the alert dialog. */\n Close: SharedOverlayClose,\n /** Non-outside-dismissible alert-dialog surface and focus scope. */\n Content,\n /** Required accessible consequence description. */\n Description: SharedOverlayDescription,\n /** Controlled, read-only, or uncontrolled open-state coordinator. */\n Root,\n /** Required accessible alert title. */\n Title: SharedOverlayTitle,\n /** Semantic action that opens the alert dialog. */\n Trigger: SharedOverlayTrigger,\n};\n","import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize, VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst iconTile = tv({\n base: 'inline-flex shrink-0 items-center justify-center font-[family-name:var(--breeze-font-display)] font-bold forced-colors:border forced-colors:border-[CanvasText]',\n defaultVariants: {\n bordered: true,\n shape: 'square',\n size: 'md',\n variant: 'primary',\n },\n variants: {\n bordered: {\n false: 'border-0',\n true: 'border',\n },\n shape: {\n circle: 'rounded-full',\n square: 'rounded-none',\n },\n size: {\n lg: 'size-14 text-2xl',\n md: 'size-10 text-xl',\n sm: 'size-9 text-base',\n },\n variant: {\n danger:\n 'border-[var(--breeze-danger)] bg-[var(--breeze-danger-soft)] text-[var(--breeze-danger)]',\n dark: 'border-[var(--breeze-shell)] bg-[var(--breeze-shell)] text-white',\n info: 'border-[var(--breeze-info)] bg-[var(--breeze-info-soft)] text-[var(--breeze-info)]',\n light:\n 'border-[var(--breeze-border)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n neutral:\n 'border-[var(--breeze-neutral)] bg-[var(--breeze-neutral-soft)] text-[var(--breeze-neutral)]',\n primary:\n 'border-[var(--breeze-primary)] bg-[var(--breeze-primary-soft)] text-[var(--breeze-primary)]',\n secondary:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink-soft)]',\n success:\n 'border-[var(--breeze-success)] bg-[var(--breeze-success-soft)] text-[var(--breeze-success)]',\n warning:\n 'border-[var(--breeze-warning)] bg-[var(--breeze-warning-soft)] text-[var(--breeze-warning)]',\n },\n },\n});\n\n/** Semantic colours supported by a presentation tile. */\nexport type IconTileVariant = VisualVariant | 'neutral';\n\n/** Props for a semantic visual-marker tile. */\nexport interface IconTileProps\n extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'aria-hidden' | 'children' | 'style'\n > {\n /** Adds the semantic variant border. Defaults to `true`. */\n bordered?: boolean;\n /** The visual marker content rendered inside the tile. */\n children: ReactNode;\n /** Hides marker content from assistive technology. Defaults to `true`. */\n decorative?: boolean;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Square or circular marker geometry. Defaults to `square`. */\n shape?: 'circle' | 'square';\n /** Canonical tile size. Defaults to `md`. */\n size?: ControlSize;\n /** Semantic colour. Defaults to `primary`. */\n variant?: IconTileVariant;\n}\n\n/**\n * Presents decorative or meaningful marker content with canonical geometry,\n * sizing, and constrained semantic colour emphasis.\n *\n * @summary semantic presentation tile for icons and short markers\n */\nexport function IconTile({\n bordered = true,\n children,\n className,\n decorative = true,\n ref,\n shape = 'square',\n size = 'md',\n variant = 'primary',\n ...props\n}: Readonly<IconTileProps>) {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n 'aria-hidden': decorative ? true : undefined,\n className: iconTile({\n bordered,\n class: className,\n shape,\n size,\n variant,\n }),\n 'data-bordered': bordered,\n 'data-size': size,\n 'data-variant': variant,\n ref: forwardedRef,\n },\n children,\n );\n}\n","import type { ReactElement, ReactNode } from 'react';\nimport { CloseIcon, WarningIcon } from '../../icons';\nimport type { VisualAppearance } from '../../internal/styling/visual';\nimport { AlertDialog } from '../../primitives/AlertDialog/AlertDialog';\nimport { IconTile } from '../../primitives/IconTile/IconTile';\n\ninterface ConfirmationDialogSharedProps {\n /** Visible label for the non-confirming close action. */\n cancelLabel: ReactNode;\n /** Accessible label for the icon-only header close action. */\n closeLabel: string;\n /** Visible label for the confirming action. */\n confirmLabel: ReactNode;\n /** Consequence or decision context announced by the dialog. */\n description: ReactNode;\n /** Prevents the confirming action. Defaults to `false`. */\n disabled?: boolean;\n /** Dims and centres within the nearest existing modal layer. Defaults to `false`. */\n nested?: boolean;\n /** Reports the explicit confirming decision. */\n onConfirm: () => void;\n /** Dialog heading. */\n title: ReactNode;\n /** Semantic confirming action colour. Defaults to `danger`. */\n variant?: 'danger' | 'warning' | 'primary';\n}\n\ninterface ControlledConfirmationDialogProps {\n /** Current open state. */\n open: boolean;\n /** Called with the next open state. */\n onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyConfirmationDialogProps {\n /** Current immutable open state. */\n open: boolean;\n /** Marks controlled state as intentionally immutable. */\n readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\n\ninterface UncontrolledConfirmationDialogProps {\n /** Initial open state. Defaults to `false`. */\n defaultOpen?: boolean;\n /** Called with the next open state. */\n onOpenChange?: (open: boolean) => void;\n open?: never;\n readOnly?: false;\n}\n\ninterface TriggeredConfirmationDialogProps {\n /** Semantic action content that opens the dialog. */\n trigger: ReactNode;\n /** Visual treatment for the trigger. Defaults to `solid`. */\n triggerAppearance?: VisualAppearance;\n /** Uses the pattern's semantic trigger to coordinate dialog state. */\n triggerless?: false;\n}\n\ninterface TriggerlessConfirmationDialogProps {\n defaultOpen?: never;\n /** Called with the next externally controlled open state. */\n onOpenChange: (open: boolean) => void;\n /** Current externally controlled open state. */\n open: boolean;\n readOnly?: never;\n trigger?: never;\n triggerAppearance?: never;\n /** Omits the pattern trigger for state controlled by an external action. */\n triggerless: true;\n}\n\n/** Props for a controlled, read-only, or uncontrolled confirmation dialog. */\nexport type ConfirmationDialogProps = ConfirmationDialogSharedProps &\n (\n | (TriggeredConfirmationDialogProps &\n (\n | ControlledConfirmationDialogProps\n | ReadOnlyConfirmationDialogProps\n | UncontrolledConfirmationDialogProps\n ))\n | TriggerlessConfirmationDialogProps\n );\n\n/**\n * Presents a focused explicit decision while retaining focus restoration.\n *\n * @summary consequential decision pattern with safe initial focus\n */\nexport function ConfirmationDialog({\n cancelLabel,\n closeLabel,\n confirmLabel,\n defaultOpen,\n description,\n disabled = false,\n nested = false,\n onConfirm,\n onOpenChange,\n open,\n readOnly,\n title,\n trigger,\n triggerAppearance,\n triggerless = false,\n variant = 'danger',\n}: Readonly<ConfirmationDialogProps>): ReactElement {\n const content = (\n <>\n {triggerless ? null : (\n <AlertDialog.Trigger appearance={triggerAppearance} variant={variant}>\n {trigger}\n </AlertDialog.Trigger>\n )}\n <AlertDialog.Content\n className=\"breeze-confirmation-dialog max-h-[calc(100dvh-2rem)] w-full max-w-md border-0 border-b-2 border-b-[var(--breeze-border-strong)] p-0 shadow-[0_8px_0_rgb(6_12_24_/_22%)]\"\n nested={nested}\n overlayClassName=\"p-5\"\n >\n <div className=\"flex items-center justify-between gap-4 border-b border-[var(--breeze-border)] p-4 sm:px-5\">\n <div className=\"flex min-w-0 items-center gap-3\">\n <IconTile\n bordered={false}\n data-confirmation-icon\n size=\"sm\"\n variant={variant}\n >\n <WarningIcon size={20} />\n </IconTile>\n <AlertDialog.Title className=\"mb-0 text-2xl leading-[1.2]\">\n {title}\n </AlertDialog.Title>\n </div>\n <AlertDialog.Close\n aria-label={closeLabel}\n appearance=\"ghost\"\n className=\"size-11 min-h-11 border-0 p-0 text-[var(--breeze-ink)]\"\n variant=\"secondary\"\n >\n <CloseIcon size={20} />\n </AlertDialog.Close>\n </div>\n <AlertDialog.Description className=\"mb-0 p-4 text-base leading-relaxed sm:p-5\">\n {description}\n </AlertDialog.Description>\n <AlertDialog.Actions className=\"px-4 pb-4 sm:px-5 sm:pb-5\">\n <AlertDialog.Close\n appearance=\"outline\"\n autoFocus\n className=\"text-[var(--breeze-ink)]\"\n variant=\"secondary\"\n >\n {cancelLabel}\n </AlertDialog.Close>\n <AlertDialog.Close\n disabled={disabled}\n onAction={onConfirm}\n variant={variant}\n >\n {confirmLabel}\n </AlertDialog.Close>\n </AlertDialog.Actions>\n </AlertDialog.Content>\n </>\n );\n\n if (triggerless) {\n if (open === undefined || onOpenChange === undefined) {\n throw new Error(\n 'Triggerless ConfirmationDialog requires controlled open state.',\n );\n }\n\n return (\n <AlertDialog.Root onOpenChange={onOpenChange} open={open} triggerless>\n {content}\n </AlertDialog.Root>\n );\n }\n\n if (open === undefined) {\n return (\n <AlertDialog.Root defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n {content}\n </AlertDialog.Root>\n );\n }\n\n if (readOnly === true) {\n return (\n <AlertDialog.Root open={open} readOnly>\n {content}\n </AlertDialog.Root>\n );\n }\n\n if (onOpenChange === undefined) {\n throw new Error('Controlled ConfirmationDialog requires onOpenChange.');\n }\n\n return (\n <AlertDialog.Root onOpenChange={onOpenChange} open={open}>\n {content}\n </AlertDialog.Root>\n );\n}\n","import type { ReactNode } from 'react';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nexport default function useCollectionEmptyContent(\n emptyContent: ReactNode | undefined,\n): ReactNode {\n const { messages } = useBreezeContext();\n\n return emptyContent === undefined ? messages.noResults : emptyContent;\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport { createElement, useContext, useRef } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport {\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuTrigger as AriaMenuTrigger,\n Popover as AriaPopover,\n RootMenuTriggerStateContext as AriaRootMenuTriggerStateContext,\n SubmenuTrigger as AriaSubmenuTrigger,\n} from 'react-aria-components/Menu';\nimport { tv } from 'tailwind-variants';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n CollectionSelection,\n} from '../../internal/types/collection';\nimport type {\n NativeButtonProps,\n NativeLinkProps,\n} from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst menuTrigger = tv({\n base: 'inline-flex min-h-11 min-w-0 items-center justify-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] px-3 font-semibold text-[var(--breeze-ink)] outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n});\nconst menuPopover = tv({\n base: 'min-w-48 border border-b-2 border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] shadow-[0_8px_0_rgb(6_12_24_/_18%)]',\n});\nconst menuList = tv({\n base: 'max-h-80 overflow-y-auto outline-none',\n});\nconst menuItem = tv({\n base: 'flex min-h-11 cursor-default items-center border-b border-[var(--breeze-border)] px-4 py-2 text-base text-[var(--breeze-ink)] no-underline outline-none last:border-b-0 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:bg-[var(--breeze-primary-soft)] data-[hovered]:bg-[var(--breeze-primary-soft)] data-[selected]:bg-[var(--breeze-primary-soft)]',\n});\n\ninterface MenuRootSharedProps {\n /** Trigger and popover parts. */\n children: ReactNode;\n}\n\ninterface ControlledMenuRootProps {\n /** Current popup state. */\n open: boolean;\n /** Called with the next popup state. */\n onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyMenuRootProps {\n /** Current immutable popup state. */\n open: boolean;\n /** Marks controlled popup state as intentionally immutable. */\n readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\n\ninterface UncontrolledMenuRootProps {\n /** Initial popup state. Defaults to `false`. */\n defaultOpen?: boolean;\n /** Called with the next popup state. */\n onOpenChange?: (open: boolean) => void;\n open?: never;\n readOnly?: false;\n}\n\n/** Props for controlled, read-only, or uncontrolled menu popup state. */\nexport type MenuRootProps = MenuRootSharedProps &\n (ControlledMenuRootProps | ReadOnlyMenuRootProps | UncontrolledMenuRootProps);\n\n/** Props for the button that opens a menu. */\nexport interface MenuTriggerProps extends NativeButtonProps {\n /** Trigger label or content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents opening the menu. Defaults to `false`. */\n disabled?: boolean;\n /** Ref to the rendered trigger button. */\n ref?: Ref<HTMLButtonElement>;\n}\n\n/** Props for the positioned menu popup. */\nexport interface MenuPopoverProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Menu list content. */\n children: ReactNode;\n /** Allows interaction outside the popover while retaining outside-dismissal. Defaults to `false`. */\n nonModal?: boolean;\n /** Popup placement relative to its trigger. Defaults to `bottom start`. */\n placement?: 'bottom start' | 'bottom end' | 'top start' | 'top end';\n /** Ref to the rendered popover. */\n ref?: Ref<HTMLElement>;\n}\n\ntype MenuListNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ntype MenuListSharedProps<Item extends BreezeCollectionItem> =\n MenuListNativeProps &\n CollectionContentProps<Item> & {\n /** Keys whose items cannot receive focus, selection, or actions. */\n disabledKeys?: Iterable<CollectionKey>;\n /** Content displayed when the menu has no items. */\n emptyContent?: ReactNode;\n /** Enables multiple selection. Defaults to `false`. */\n multiple?: boolean;\n /** Ref to the rendered menu. */\n ref?: Ref<HTMLDivElement>;\n };\n\ninterface ControlledMenuListProps {\n /** Current selected item keys. */\n selection: CollectionSelection;\n /** Called with the next selected item keys. */\n onSelectionChange: (selection: CollectionSelection) => void;\n defaultSelection?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyMenuListProps {\n /** Current immutable selected item keys. */\n selection: CollectionSelection;\n /** Marks controlled selection as intentionally immutable. */\n readOnly: true;\n defaultSelection?: never;\n onSelectionChange?: never;\n}\n\ninterface UncontrolledMenuListProps {\n /** Initial selected item keys. */\n defaultSelection?: CollectionSelection;\n /** Called with the next selected item keys. */\n onSelectionChange?: (selection: CollectionSelection) => void;\n readOnly?: false;\n selection?: never;\n}\n\n/** Props for a static or generic menu with optional selection state. */\nexport type MenuListProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = MenuListSharedProps<Item> &\n (ControlledMenuListProps | ReadOnlyMenuListProps | UncontrolledMenuListProps);\n\n/** Props for one keyed menu action or destination. */\nexport interface MenuItemProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Visible item content. */\n children: ReactNode;\n /** Prevents focus, selection, and action. Defaults to `false`. */\n disabled?: boolean;\n /** Optional native destination URL. */\n href?: string;\n /** Stable string or number item key. */\n id: CollectionKey;\n /** Called with this item key when activated. */\n onAction?: (key: CollectionKey) => void;\n /** Ref to the rendered menu item. */\n ref?: Ref<HTMLDivElement>;\n /** Plain-text representation used for typeahead and accessibility. */\n textValue: string;\n}\n\n/** Props for a nested menu trigger and its popup. */\nexport interface MenuSubmenuProps {\n /** Trigger item followed by a submenu popover. */\n children: [ReactElement, ReactElement];\n /** Hover delay before opening, in milliseconds. Defaults to `200`. */\n delay?: number;\n /** Ref to the rendered submenu trigger item. */\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction normaliseSelection(\n selection: 'all' | Set<CollectionKey>,\n): CollectionSelection {\n return selection === 'all' ? 'all' : [...selection];\n}\n\nfunction shouldUseRouter(href: string | undefined): href is string {\n return href !== undefined && href.startsWith('/') && !href.startsWith('//');\n}\n\n/** Coordinates popup state, trigger focus, and dismissal. */\nexport function Root({\n defaultOpen,\n onOpenChange,\n open,\n readOnly: _readOnly,\n ...props\n}: Readonly<MenuRootProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaMenuTrigger, {\n ...props,\n defaultOpen,\n isOpen: open,\n onOpenChange,\n });\n}\n\n/** Renders the menu trigger button. */\nexport function Trigger({\n className,\n disabled = false,\n ref,\n ...props\n}: Readonly<MenuTriggerProps>): ReactElement {\n const triggerState = useContext(AriaRootMenuTriggerStateContext);\n // MenuTrigger may open before Button's onPress runs, so preserve the state\n // from the start of the interaction when deciding whether this is a close.\n const wasOpenOnPressStart = useRef(false);\n\n return createElement(AriaButton, {\n ...props,\n className: menuTrigger({ class: className }),\n isDisabled: disabled,\n onPress: () => {\n if (wasOpenOnPressStart.current) {\n triggerState?.close();\n }\n },\n onPressStart: () => {\n wasOpenOnPressStart.current = triggerState?.isOpen === true;\n },\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaButton>);\n}\n\n/** Positions a root or nested menu and portals it through the Breeze provider. */\nexport function Popover({\n className,\n nonModal = false,\n placement = 'bottom start',\n ref,\n ...props\n}: Readonly<MenuPopoverProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaPopover, {\n ...props,\n className: menuPopover({ class: className }),\n isNonModal: nonModal,\n placement,\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaPopover>);\n}\n\ninterface NonModalMenuPopoverProps extends Omit<MenuPopoverProps, 'nonModal'> {\n triggerRef: RefObject<Element | null>;\n}\n\n/**\n * Positions a non-modal menu without treating its own trigger as an outside\n * dismissal target.\n *\n * @internal\n */\nexport function NonModalMenuPopover({\n className,\n placement = 'bottom start',\n ref,\n triggerRef,\n ...props\n}: Readonly<NonModalMenuPopoverProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaPopover, {\n ...props,\n className: menuPopover({ class: className }),\n isNonModal: true,\n placement,\n ref: useForwardedRef(ref),\n shouldCloseOnInteractOutside: (element: Element) =>\n triggerRef.current?.contains(element) !== true,\n } as ComponentProps<typeof AriaPopover>);\n}\n\n/** Renders a static or generic collection with keyboard focus and optional selection. */\nexport function List<Item extends BreezeCollectionItem>({\n children,\n className,\n defaultSelection,\n disabledKeys,\n emptyContent,\n items,\n multiple = false,\n onSelectionChange,\n ref,\n selection,\n ...props\n}: Readonly<MenuListProps<Item>>): ReactElement {\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n const hasSelection =\n selection !== undefined || defaultSelection !== undefined;\n let selectionMode: 'none' | 'single' | 'multiple' = 'none';\n\n if (hasSelection) {\n selectionMode = multiple ? 'multiple' : 'single';\n }\n\n return createElement(AriaMenu, {\n ...props,\n children,\n className: menuList({ class: className }),\n defaultSelectedKeys: defaultSelection,\n disabledKeys,\n items,\n onSelectionChange: (keys: 'all' | Set<CollectionKey>) =>\n onSelectionChange?.(normaliseSelection(keys)),\n ref: useForwardedRef(ref),\n renderEmptyState: () => resolvedEmptyContent,\n selectedKeys: selection,\n selectionMode,\n } as unknown as ComponentProps<typeof AriaMenu>);\n}\n\n/** Renders one action, selectable item, or router-neutral destination. */\nexport function Item({\n className,\n disabled = false,\n href,\n id,\n onAction,\n ref,\n textValue,\n ...props\n}: Readonly<MenuItemProps>): ReactElement {\n const { router } = useBreezeContext();\n const useRouter = router !== undefined && shouldUseRouter(href);\n const navigationProps =\n href === undefined || useRouter\n ? {}\n : {\n href,\n };\n\n return createElement(AriaMenuItem, {\n ...props,\n ...navigationProps,\n className: menuItem({ class: className }),\n id,\n isDisabled: disabled,\n onAction: () => {\n if (useRouter) {\n router.navigate(href);\n }\n\n onAction?.(id);\n },\n ref: useForwardedRef(ref),\n textValue,\n } as ComponentProps<typeof AriaMenuItem> & NativeLinkProps);\n}\n\n/** Coordinates nested-menu focus, opening, direction, and Escape dismissal. */\nexport function Submenu({\n ref,\n ...props\n}: Readonly<MenuSubmenuProps>): ReactElement {\n return createElement(AriaSubmenuTrigger, {\n ...props,\n ref: useForwardedRef(ref),\n });\n}\n\n/**\n * Accessible compound action-menu primitive.\n *\n * @summary transient keyboard-navigable actions, destinations, and submenus\n */\nexport const Menu = {\n /** One keyed action, selectable item, or destination. */\n Item,\n /** Static or generic keyboard-navigable collection. */\n List,\n /** Positioned root or nested popup. */\n Popover,\n /** Popup state and focus coordination root. */\n Root,\n /** Nested-menu trigger and popup pair. */\n Submenu,\n /** Button that opens the root popup. */\n Trigger,\n};\n","import type { ReactElement, ReactNode } from 'react';\nimport { Menu } from '../../primitives/Menu/Menu';\n\n/** One application-owned context available for selection. */\nexport interface ContextSwitcherItem {\n /** Optional supporting identifier or description. */\n description?: ReactNode;\n /** Prevents selection. Defaults to `false`. */\n disabled?: boolean;\n /** Optional visual context marker. */\n icon?: ReactNode;\n /** Stable context key. */\n id: string;\n /** Visible and typeahead-readable context name. */\n name: string;\n}\n\n/** Props for switching one visible application context. */\nexport interface ContextSwitcherProps {\n /** Accessible name for the menu trigger. */\n 'aria-label': string;\n /** Current selected context key, or `null` when selection is required. */\n currentId: string | null;\n /** Optional visual marker shown when selection is required. */\n emptyIcon?: ReactNode;\n /** Application-owned prompt shown when selection is required. */\n emptyName?: ReactNode;\n /** Ordered application-owned contexts. */\n items: readonly ContextSwitcherItem[];\n /** Optional label for a management action after the contexts. */\n manageLabel?: string;\n /** Called when the optional management action is selected. */\n onManage?: () => void;\n /** Called with the next selected context key. */\n onChange: (id: string) => void;\n /** Short text describing the selected context role. */\n triggerLabel?: ReactNode;\n}\n\n/**\n * Switches one application-owned context through a keyboard-complete menu.\n *\n * @summary controlled application-context selection menu\n */\nexport function ContextSwitcher({\n 'aria-label': ariaLabel,\n currentId,\n emptyIcon,\n emptyName,\n items,\n manageLabel,\n onChange,\n onManage,\n triggerLabel,\n}: Readonly<ContextSwitcherProps>): ReactElement {\n const current = items.find((item) => item.id === currentId);\n const itemIds = new Set(items.map((item) => item.id));\n let manageItemId = '__breeze-manage-contexts';\n\n while (itemIds.has(manageItemId)) {\n manageItemId = `_${manageItemId}`;\n }\n\n return (\n <Menu.Root>\n <Menu.Trigger\n aria-label={ariaLabel}\n className=\"min-h-14 w-full justify-start gap-3 border-0 bg-transparent p-2 text-start text-inherit data-[hovered]:bg-[var(--breeze-shell-soft)]\"\n >\n <span aria-hidden=\"true\" className=\"empty:hidden\">\n {current?.icon ?? emptyIcon}\n </span>\n <span className=\"grid min-w-0 flex-1 gap-0.5\">\n {triggerLabel === undefined ? null : (\n <small className=\"text-base text-[var(--breeze-ink-inverse-muted)]\">\n {triggerLabel}\n </small>\n )}\n <strong className=\"truncate text-base\">\n {current?.name ?? emptyName ?? ariaLabel}\n </strong>\n </span>\n </Menu.Trigger>\n <Menu.Popover className=\"w-80\" nonModal placement=\"top start\">\n <div className=\"border-b border-[var(--breeze-border)] px-4 py-3 font-[family-name:var(--breeze-font-display)] text-xl font-bold\">\n {ariaLabel}\n </div>\n <Menu.List\n aria-label={ariaLabel}\n onSelectionChange={(selection) => {\n if (selection === 'all') {\n return;\n }\n\n const [nextId] = selection;\n\n if (nextId !== undefined && nextId !== manageItemId) {\n onChange(String(nextId));\n }\n }}\n selection={currentId === null ? [] : [currentId]}\n >\n {items.map((item) => (\n <Menu.Item\n disabled={item.disabled}\n id={item.id}\n key={item.id}\n textValue={item.name}\n >\n <span className=\"flex min-w-0 items-center gap-3\">\n <span aria-hidden=\"true\" className=\"empty:hidden\">\n {item.icon}\n </span>\n <span className=\"grid min-w-0 gap-0.5\">\n <strong>{item.name}</strong>\n {item.description === undefined ? null : (\n <small>{item.description}</small>\n )}\n </span>\n </span>\n </Menu.Item>\n ))}\n {manageLabel === undefined || onManage === undefined ? null : (\n <Menu.Item\n className=\"font-bold text-[var(--breeze-primary)]\"\n id={manageItemId}\n onAction={onManage}\n textValue={manageLabel}\n >\n {manageLabel}\n </Menu.Item>\n )}\n </Menu.List>\n </Menu.Popover>\n </Menu.Root>\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { PaperclipIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for a selected file with persistent application-owned actions. */\nexport interface FileAttachmentProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** View, replace, download, or removal actions owned by the application. */\n actions: ReactNode;\n /** Persistent visible file name. */\n name: ReactNode;\n /** Ref to the rendered attachment row. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface FileAttachmentElementProps extends HTMLAttributes<HTMLDivElement> {\n 'data-breeze-file-attachment': string;\n ref: Ref<HTMLDivElement>;\n}\n\n/**\n * Presents a selected file and its actions with canonical responsive geometry.\n *\n * @summary responsive selected-file row with application-owned actions\n */\nexport function FileAttachment({\n actions,\n className,\n name,\n ref,\n ...props\n}: Readonly<FileAttachmentProps>): ReactElement {\n useBreezeContext();\n\n return createElement(\n 'div',\n {\n ...props,\n className: `flex min-h-16 flex-col items-stretch justify-between gap-4 py-2.5 sm:flex-row sm:items-center ${className ?? ''}`,\n 'data-breeze-file-attachment': '',\n ref: useForwardedRef(ref),\n } as FileAttachmentElementProps,\n <>\n <span className=\"flex min-w-0 items-center gap-2.5\">\n <PaperclipIcon size={16} />\n <strong className=\"min-w-0 truncate font-bold\">{name}</strong>\n </span>\n <div\n className=\"flex flex-wrap gap-2.5 [&>*]:w-full sm:[&>*]:w-auto\"\n data-breeze-file-attachment-actions=\"\"\n >\n {actions}\n </div>\n </>,\n );\n}\n","import type { FileRejection, FileRejectionReason } from '../types/file';\n\ninterface FileConstraints {\n acceptedFileTypes?: readonly string[];\n allowsMultiple: boolean;\n maxFileSize?: number;\n}\n\n/** Result of applying Breeze-owned file constraints. */\nexport interface FileValidationResult {\n /** Files that satisfy every constraint. */\n accepted: File[];\n /** Files that failed one or more constraints. */\n rejected: FileRejection[];\n}\n\nfunction matchesAcceptedType(\n file: File,\n acceptedFileTypes: readonly string[],\n): boolean {\n const normalizedName = file.name.toLowerCase();\n const normalizedType = file.type.toLowerCase();\n\n return acceptedFileTypes.some((acceptedType) => {\n const normalizedAcceptedType = acceptedType.toLowerCase();\n\n if (normalizedAcceptedType.startsWith('.')) {\n return normalizedName.endsWith(normalizedAcceptedType);\n }\n\n if (normalizedAcceptedType.endsWith('/*')) {\n return normalizedType.startsWith(normalizedAcceptedType.slice(0, -1));\n }\n\n return normalizedType === normalizedAcceptedType;\n });\n}\n\n/** Splits native files into accepted files and stable rejection records. */\nexport default function validateFiles(\n files: readonly File[],\n { acceptedFileTypes, allowsMultiple, maxFileSize }: FileConstraints,\n): FileValidationResult {\n const validation = files.map((file, index) => {\n const reasons: FileRejectionReason[] = [];\n\n if (!allowsMultiple && index > 0) {\n reasons.push('file-count');\n }\n\n if (\n acceptedFileTypes?.length &&\n !matchesAcceptedType(file, acceptedFileTypes)\n ) {\n reasons.push('file-type');\n }\n\n if (maxFileSize !== undefined && file.size > maxFileSize) {\n reasons.push('file-size');\n }\n\n return { file, reasons };\n });\n\n return {\n accepted: validation\n .filter(({ reasons }) => reasons.length === 0)\n .map(({ file }) => file),\n rejected: validation.filter(({ reasons }) => reasons.length > 0),\n };\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { FileRejection } from '../../internal/types/file';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props shared by Breeze file-rejection feedback parts. */\nexport interface FileFeedbackPartProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Ref to the rendered feedback region. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface FileFeedbackProps extends FileFeedbackPartProps {\n rejections: FileRejection[];\n}\n\n/** Renders and announces stable Breeze file rejection feedback. */\nexport default function FileFeedback({\n className,\n ref,\n rejections,\n ...props\n}: Readonly<FileFeedbackProps>): ReactElement | null {\n const forwardedRef = useForwardedRef(ref);\n const { messages } = useBreezeContext();\n const rejectionMessages = {\n 'file-count': messages.fileCountRejection,\n 'file-size': messages.fileSizeRejection,\n 'file-type': messages.fileTypeRejection,\n } as const;\n\n if (rejections.length === 0) {\n return null;\n }\n\n return createElement(\n 'div',\n { ...props, className, ref: forwardedRef, role: 'alert' },\n rejections.map(({ file, reasons }) =>\n createElement(\n 'p',\n { key: `${file.name}-${file.size}-${file.lastModified}` },\n `${file.name}: ${reasons.map((reason) => rejectionMessages[reason]).join(' ')}`,\n ),\n ),\n );\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport {\n createContext,\n createElement,\n useCallback,\n useContext,\n useId,\n useState,\n} from 'react';\nimport {\n DropZone as AriaDropZone,\n Text as AriaText,\n} from 'react-aria-components/DropZone';\nimport { tv } from 'tailwind-variants';\nimport validateFiles from '../../internal/files/validation';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n DropZoneFileReadFailure,\n FileRejection,\n} from '../../internal/types/file';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport FileFeedback, { type FileFeedbackPartProps } from '../file/FileFeedback';\n\nconst dropZoneStyle = tv({\n base: 'flex min-h-36 flex-col items-center justify-center gap-2 border-2 border-dashed border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-6 text-center text-[var(--breeze-ink)] transition-colors data-[drop-target]:border-[var(--breeze-primary)] data-[drop-target]:bg-[var(--breeze-primary-soft)]',\n});\n\ninterface DropZoneContextValue {\n descriptionId: string;\n errorId: string;\n invalid: boolean;\n rejections: FileRejection[];\n}\n\ninterface FileReadSuccess {\n file: File;\n}\n\ninterface FileReadFailure {\n failure: DropZoneFileReadFailure;\n}\n\ntype FileReadResult = FileReadFailure | FileReadSuccess;\n\nconst DropZoneContext = createContext<DropZoneContextValue | null>(null);\n\ntype WithoutEventHandlers<Props> = {\n [Key in keyof Props as Key extends `on${string}` ? never : Key]: Props[Key];\n};\n\ntype DropZoneNativeProps = Omit<\n WithoutEventHandlers<HTMLAttributes<HTMLDivElement>>,\n 'children' | 'style'\n>;\n\n/** Props for an accessible native-file drop target. */\nexport interface DropZoneRootProps extends DropZoneNativeProps {\n /** Drop-zone label, guidance, trigger, and feedback. */\n children: ReactNode;\n /** Accepted MIME types, wildcard MIME groups, or extensions. */\n acceptedFileTypes?: readonly string[];\n /** Allows more than one dropped file. Defaults to `false`. */\n allowsMultiple?: boolean;\n /** Prevents focus and dropping. Defaults to `false`. */\n disabled?: boolean;\n /** Exposes invalid state to assistive technology. Defaults to `false`. */\n invalid?: boolean;\n /** Maximum accepted file size in bytes. */\n maxFileSize?: number;\n /** Called with dropped native files. */\n onFiles: (files: File[]) => void;\n /** Called with files rejected by Breeze constraints. */\n onReject?: (rejections: FileRejection[]) => void;\n /** Called once when native file reading fails. Mixed drops are atomic: `onFiles` and `onReject` are not called when any item fails to read. */\n onFileReadError?: (failures: DropZoneFileReadFailure[]) => void;\n /** Ref to the rendered drop-zone root. */\n ref?: Ref<HTMLDivElement>;\n /** Exposes required presentation and validation state. Defaults to `false`. */\n required?: boolean;\n}\n\n/** Props for built-in dropped-file rejection feedback. */\nexport type DropZoneFeedbackProps = FileFeedbackPartProps;\n\n/** Props for supporting drop-zone guidance. */\nexport interface DropZoneDescriptionProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'id' | 'style'> {\n /** Guidance describing accepted files or interaction. */\n children: ReactNode;\n /** Ref to the rendered description. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Props for accessible invalid-state feedback. */\nexport interface DropZoneErrorProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'id' | 'style'> {\n /** Validation message shown while the root is invalid. */\n children: ReactNode;\n /** Ref to the rendered error. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Props for the visible drop-zone label. */\nexport interface DropZoneLabelProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Persistent label that names the drop target. */\n children: ReactNode;\n /** Ref to the rendered label. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Receives file drops through React Aria's pointer and keyboard model. */\nexport function Root({\n acceptedFileTypes,\n allowsMultiple = false,\n children,\n className,\n disabled = false,\n invalid = false,\n maxFileSize,\n onFiles,\n onFileReadError,\n onReject,\n ref,\n required = false,\n ...props\n}: Readonly<DropZoneRootProps>): ReactElement {\n useBreezeContext();\n\n const suppliedRef = useForwardedRef(ref);\n const [rejections, setRejections] = useState<FileRejection[]>([]);\n const descriptionId = useId();\n const errorId = useId();\n const describedBy = [\n props['aria-describedby'],\n descriptionId,\n invalid ? errorId : undefined,\n ]\n .filter(Boolean)\n .join(' ');\n const forwardedRef = useCallback(\n (element: HTMLDivElement | null) => {\n suppliedRef(element);\n if (!element) {\n return;\n }\n\n const { dataset } = element;\n\n element.setAttribute('aria-describedby', describedBy);\n if (invalid) {\n element.setAttribute('aria-invalid', 'true');\n } else {\n element.removeAttribute('aria-invalid');\n }\n if (required) {\n dataset.required = 'true';\n } else {\n delete dataset.required;\n }\n },\n [describedBy, invalid, required, suppliedRef],\n );\n\n return createElement(\n DropZoneContext.Provider,\n { value: { descriptionId, errorId, invalid, rejections } },\n createElement(\n AriaDropZone,\n {\n ...props,\n 'aria-describedby': describedBy,\n 'aria-invalid': invalid || undefined,\n className: dropZoneStyle({ class: className }),\n isDisabled: disabled,\n onDrop: (event) => {\n const fileItems = event.items.filter((item) => item.kind === 'file');\n\n Promise.all(\n fileItems.map(async (item, itemIndex): Promise<FileReadResult> => {\n try {\n const file = await item.getFile();\n\n return { file };\n } catch (cause: unknown) {\n return {\n failure: {\n cause,\n itemIndex,\n name: item.name,\n type: item.type,\n },\n };\n }\n }),\n ).then(\n (readResults) => {\n const failures = readResults.flatMap((result) =>\n 'failure' in result ? [result.failure] : [],\n );\n\n if (failures.length > 0) {\n setRejections([]);\n onFileReadError?.(failures);\n } else {\n const files = readResults.flatMap((result) =>\n 'file' in result ? [result.file] : [],\n );\n const result = validateFiles(files, {\n acceptedFileTypes,\n allowsMultiple,\n maxFileSize,\n });\n\n setRejections(result.rejected);\n onFiles(result.accepted);\n if (result.rejected.length > 0) {\n onReject?.(result.rejected);\n }\n }\n },\n (cause: unknown) => {\n const failures = fileItems.map((item, itemIndex) => ({\n cause,\n itemIndex,\n name: item.name,\n type: item.type,\n }));\n\n setRejections([]);\n onFileReadError?.(failures);\n },\n );\n },\n ref: forwardedRef,\n } as ComponentProps<typeof AriaDropZone>,\n children,\n ),\n );\n}\n\n/** Renders supporting guidance associated with the drop target. */\nexport function Description({\n ref,\n ...props\n}: Readonly<DropZoneDescriptionProps>): ReactElement {\n const context = useContext(DropZoneContext);\n const forwardedRef = useForwardedRef(ref);\n\n if (!context) {\n throw new globalThis.Error(\n 'DropZone.Description must be inside DropZone.Root.',\n );\n }\n\n return createElement('p', {\n ...props,\n id: context.descriptionId,\n ref: forwardedRef,\n });\n}\n\n/** Renders an associated validation message while the root is invalid. */\nfunction ErrorMessage({\n ref,\n ...props\n}: Readonly<DropZoneErrorProps>): ReactElement | null {\n const context = useContext(DropZoneContext);\n const forwardedRef = useForwardedRef(ref);\n\n if (!context) {\n throw new globalThis.Error('DropZone.Error must be inside DropZone.Root.');\n }\n\n if (!context.invalid) {\n return null;\n }\n\n return createElement('p', {\n ...props,\n id: context.errorId,\n ref: forwardedRef,\n role: 'alert',\n });\n}\n\nexport { ErrorMessage as Error };\n\n/** Announces Breeze-owned type, size, and count rejection feedback. */\nexport function Feedback(\n props: Readonly<DropZoneFeedbackProps>,\n): ReactElement | null {\n const context = useContext(DropZoneContext);\n\n if (!context) {\n throw new globalThis.Error(\n 'DropZone.Feedback must be inside DropZone.Root.',\n );\n }\n\n return createElement(FileFeedback, {\n ...props,\n rejections: context.rejections,\n });\n}\n\n/** Renders the visible label consumed by React Aria's drop affordance. */\nexport function Label({\n className,\n ref,\n ...props\n}: Readonly<DropZoneLabelProps>): ReactElement {\n return createElement(AriaText, {\n ...props,\n className,\n ref: useForwardedRef(ref),\n slot: 'label',\n });\n}\n\n/**\n * Accepts native file drops through an accessible drop target while Breeze\n * validates file constraints and applications own upload processing.\n *\n * @summary accessible native-file drop target with validation feedback\n */\nexport const DropZone = {\n /** Supporting drop guidance. */\n Description,\n /** Invalid-state validation feedback. */\n Error: ErrorMessage,\n /** Accessible Breeze-owned file rejection feedback. */\n Feedback,\n /** Persistent accessible drop-target label. */\n Label,\n /** Native-file drop interaction boundary. */\n Root,\n};\n","import type {\n ComponentProps,\n InputHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport {\n createContext,\n createElement,\n useCallback,\n useContext,\n useRef,\n useState,\n} from 'react';\nimport { PressResponder } from 'react-aria/private/interactions/PressResponder';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport validateFiles from '../../internal/files/validation';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport action from '../../internal/styling/actions';\nimport type { FileRejection } from '../../internal/types/file';\nimport type { NativeButtonProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport FileFeedback, { type FileFeedbackPartProps } from '../file/FileFeedback';\n\ninterface FileTriggerContextValue {\n disabled: boolean;\n invalid: boolean;\n rejections: FileRejection[];\n triggerRef: RefObject<HTMLButtonElement | null>;\n}\n\nconst FileTriggerContext = createContext<FileTriggerContextValue | null>(null);\n\ntype WithoutEventHandlers<Props> = {\n [Key in keyof Props as Key extends `on${string}` ? never : Key]: Props[Key];\n};\n\ntype NativeFileInputProps = Omit<\n WithoutEventHandlers<InputHTMLAttributes<HTMLInputElement>>,\n | 'accept'\n | 'capture'\n | 'children'\n | 'className'\n | 'disabled'\n | 'form'\n | 'multiple'\n | 'name'\n | 'required'\n | 'style'\n | 'type'\n>;\n\ninterface DirectoryFileInputProps\n extends InputHTMLAttributes<HTMLInputElement> {\n webkitdirectory?: string;\n}\n\n/** Props for the native file-dialog boundary. */\nexport interface FileTriggerRootProps extends NativeFileInputProps {\n /** Pressable trigger and file-selection feedback. */\n children: ReactNode;\n /** Accepted MIME types, wildcard MIME groups, or extensions. */\n acceptedFileTypes?: readonly string[];\n /** Enables native directory selection instead of individual files. Defaults to `false`. */\n acceptDirectory?: boolean;\n /** Allows more than one file to be selected. Defaults to `false`. */\n allowsMultiple?: boolean;\n /** Prevents opening the native file dialog. Defaults to `false`. */\n disabled?: boolean;\n /** Requests the user-facing or environment camera for media capture. */\n defaultCamera?: 'environment' | 'user';\n /** External native form id. */\n form?: string;\n /** Exposes invalid state to assistive technology. Defaults to `false`. */\n invalid?: boolean;\n /** Maximum accepted file size in bytes. */\n maxFileSize?: number;\n /** Native form field name. */\n name?: string;\n /** Called with selected native files. */\n onFiles: (files: File[]) => void;\n /** Called with files rejected by Breeze constraints. */\n onReject?: (rejections: FileRejection[]) => void;\n /** Marks file selection as required for assistive technology. Defaults to `false`. */\n required?: boolean;\n /** Ref to the hidden native file input. */\n ref?: Ref<HTMLInputElement>;\n}\n\n/** Props for built-in file-selection rejection feedback. */\nexport type FileTriggerFeedbackProps = FileFeedbackPartProps;\n\n/** Props for the keyboard-operable dialog trigger. */\nexport interface FileTriggerButtonProps extends NativeButtonProps {\n /** Trigger label or content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Ref to the rendered trigger button. */\n ref?: Ref<HTMLButtonElement>;\n}\n\n/** Coordinates native file selection with a React Aria pressable trigger. */\nexport function Root({\n acceptDirectory = false,\n acceptedFileTypes,\n allowsMultiple = false,\n children,\n disabled = false,\n defaultCamera,\n form,\n invalid = false,\n maxFileSize,\n name,\n onFiles,\n onReject,\n ref,\n required = false,\n ...props\n}: Readonly<FileTriggerRootProps>): ReactElement {\n const { messages } = useBreezeContext();\n\n const suppliedRef = useForwardedRef(ref);\n const inputRef = useRef<HTMLInputElement | null>(null);\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n const [nativeInvalid, setNativeInvalid] = useState(false);\n const [rejections, setRejections] = useState<FileRejection[]>([]);\n const forwardedRef = useCallback(\n (input: HTMLInputElement | null) => {\n inputRef.current = input;\n suppliedRef(input);\n },\n [suppliedRef],\n );\n\n const selectFiles = (fileList: FileList | null) => {\n if (disabled) {\n return;\n }\n\n const result = validateFiles(fileList ? Array.from(fileList) : [], {\n acceptedFileTypes,\n allowsMultiple,\n maxFileSize,\n });\n\n if (result.rejected.length > 0 && inputRef.current !== null) {\n if (typeof DataTransfer === 'undefined') {\n inputRef.current.value = '';\n } else {\n const acceptedFiles = new DataTransfer();\n\n result.accepted.forEach((file) => acceptedFiles.items.add(file));\n inputRef.current.files = acceptedFiles.files;\n }\n }\n\n setNativeInvalid(required && result.accepted.length === 0);\n setRejections(result.rejected);\n onFiles(result.accepted);\n if (result.rejected.length > 0) {\n onReject?.(result.rejected);\n }\n };\n\n return createElement(\n FileTriggerContext.Provider,\n {\n value: {\n disabled,\n invalid: invalid || nativeInvalid,\n rejections,\n triggerRef,\n },\n },\n createElement(\n PressResponder,\n {\n isDisabled: disabled,\n onPress: () => {\n if (inputRef.current?.value) {\n inputRef.current.value = '';\n }\n\n inputRef.current?.click();\n },\n } as unknown as ComponentProps<typeof PressResponder>,\n children,\n ),\n createElement('input', {\n ...props,\n accept: acceptedFileTypes?.join(','),\n 'aria-invalid': invalid || undefined,\n 'aria-label': messages.selectFiles,\n 'aria-required': required || undefined,\n capture: defaultCamera,\n disabled,\n form,\n multiple: allowsMultiple,\n name,\n onChange: (event) => selectFiles(event.currentTarget.files),\n onInvalid: (event) => {\n event.preventDefault();\n setNativeInvalid(true);\n triggerRef.current?.setAttribute('aria-invalid', 'true');\n triggerRef.current?.focus();\n },\n ref: forwardedRef,\n required,\n style: {\n border: 0,\n clip: 'rect(0, 0, 0, 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px',\n },\n type: 'file',\n webkitdirectory: acceptDirectory ? '' : undefined,\n } as DirectoryFileInputProps),\n );\n}\n\n/** Announces Breeze-owned type, size, and count rejection feedback. */\nexport function Feedback(\n props: Readonly<FileTriggerFeedbackProps>,\n): ReactElement | null {\n const context = useContext(FileTriggerContext);\n\n if (!context) {\n throw new Error('FileTrigger.Feedback must be inside FileTrigger.Root.');\n }\n\n return createElement(FileFeedback, {\n ...props,\n rejections: context.rejections,\n });\n}\n\n/** Opens the associated native file dialog by pointer or keyboard. */\nexport function Trigger({\n children,\n className,\n ref,\n ...props\n}: Readonly<FileTriggerButtonProps>): ReactElement {\n const context = useContext(FileTriggerContext);\n\n if (!context) {\n throw new Error('FileTrigger.Trigger must be inside FileTrigger.Root.');\n }\n\n const suppliedRef = useForwardedRef(ref);\n const forwardedRef = useCallback(\n (button: HTMLButtonElement | null) => {\n context.triggerRef.current = button;\n suppliedRef(button);\n },\n [context.triggerRef, suppliedRef],\n );\n\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-invalid': context.invalid || undefined,\n className: action({ class: className }),\n isDisabled: context.disabled,\n ref: forwardedRef,\n } as ComponentProps<typeof AriaButton>,\n children,\n );\n}\n\n/**\n * Opens the native file dialog from a keyboard-operable trigger, validates the\n * selected files, and returns accepted files through semantic callbacks.\n *\n * @summary accessible native file selection with validation feedback\n */\nexport const FileTrigger = {\n /** Accessible Breeze-owned file rejection feedback. */\n Feedback,\n /** Native input and selection boundary. */\n Root,\n /** Keyboard-operable file-dialog trigger. */\n Trigger,\n};\n","import type { ReactElement, ReactNode } from 'react';\nimport { FormattedList } from '../../formatting/FormattedList/FormattedList';\nimport { PaperclipIcon } from '../../icons';\nimport type { FileRejection } from '../../internal/types/file';\nimport { DropZone } from '../../primitives/DropZone/DropZone';\nimport { FileTrigger } from '../../primitives/FileTrigger/FileTrigger';\n\n/** Props for an accessible browse-and-drop file selection surface. */\nexport interface FileUploadProps {\n /** Accepted MIME types, wildcard MIME groups, or extensions. */\n acceptedFileTypes?: readonly string[];\n /** Allows more than one file. Defaults to `false`. */\n allowsMultiple?: boolean;\n /** Visible label for the browse action. */\n browseLabel: ReactNode;\n /** Prevents browse and drop interaction. Defaults to `false`. */\n disabled?: boolean;\n /** Supporting accepted-file or workflow guidance. */\n guidance?: ReactNode;\n /** Exposes invalid state and error association. Defaults to `false`. */\n invalid?: boolean;\n /** Persistent visible drop-zone label. */\n label: ReactNode;\n /** Maximum accepted file size in bytes. */\n maxFileSize?: number;\n /** Called with files selected through browse or drop. */\n onFiles: (files: File[]) => void;\n /** Called with files rejected by Breeze constraints. */\n onReject?: (rejections: FileRejection[]) => void;\n /** Selected files owned by the application and presented as feedback. */\n selectedFiles?: readonly File[];\n}\n\n/**\n * Selects files through browse or drop while leaving upload transport\n * application-owned.\n *\n * @summary accessible browse-and-drop file selection with persistent feedback\n */\nexport function FileUpload({\n acceptedFileTypes,\n allowsMultiple = false,\n browseLabel,\n disabled = false,\n guidance,\n invalid = false,\n label,\n maxFileSize,\n onFiles,\n onReject,\n selectedFiles = [],\n}: Readonly<FileUploadProps>): ReactElement {\n return (\n <DropZone.Root\n acceptedFileTypes={acceptedFileTypes}\n allowsMultiple={allowsMultiple}\n disabled={disabled}\n invalid={invalid}\n maxFileSize={maxFileSize}\n onFiles={onFiles}\n onReject={onReject}\n className=\"grid min-h-16 w-full grid-cols-[1.5rem_minmax(0,1fr)_auto] items-center gap-x-4 border border-solid border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-0 text-left transition-colors outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55 data-[drop-target]:border-[var(--breeze-primary)] data-[drop-target]:bg-[var(--breeze-surface)] data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[focus-visible]:outline-solid data-[hovered]:border-[var(--breeze-primary)]\"\n data-breeze-file-upload=\"\"\n >\n <span className=\"ml-4 flex size-6 items-center text-[var(--breeze-primary)]\">\n <PaperclipIcon aria-hidden=\"true\" size={20} />\n </span>\n <span className=\"flex min-w-0 flex-col\">\n <DropZone.Label className=\"overflow-hidden font-[family-name:var(--breeze-font-display)] text-base leading-[1.4] font-bold text-ellipsis whitespace-nowrap\">\n {selectedFiles.length === 0 ? (\n label\n ) : (\n <FormattedList values={selectedFiles.map((file) => file.name)} />\n )}\n </DropZone.Label>\n {guidance === undefined ? null : (\n <DropZone.Description className=\"m-0 mt-1 text-base leading-[1.4] text-[var(--breeze-ink-soft)]\">\n {guidance}\n </DropZone.Description>\n )}\n </span>\n <FileTrigger.Root\n acceptedFileTypes={acceptedFileTypes}\n allowsMultiple={allowsMultiple}\n disabled={disabled}\n invalid={invalid}\n maxFileSize={maxFileSize}\n onFiles={onFiles}\n onReject={onReject}\n >\n <FileTrigger.Trigger className=\"h-full min-h-0 self-stretch border-0 border-l border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] px-4 py-0 text-base text-[var(--breeze-primary)] data-[focus-visible]:outline-solid data-[hovered]:bg-[var(--breeze-primary-soft)]\">\n {browseLabel}\n </FileTrigger.Trigger>\n <FileTrigger.Feedback className=\"col-span-3 px-4 pb-3\" />\n </FileTrigger.Root>\n <DropZone.Feedback className=\"col-span-3 px-4 pb-3\" />\n </DropZone.Root>\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst formActions = tv({\n base: 'mt-auto flex flex-col gap-3 pt-0.5 sm:flex-row sm:items-center sm:gap-2.5 [&>*]:w-full sm:[&>*]:w-auto [&>*>*]:w-full sm:[&>*>*]:w-auto',\n defaultVariants: {\n divided: false,\n },\n variants: {\n divided: {\n false: '',\n true: 'border-t border-[var(--breeze-border)] pt-6',\n },\n },\n});\n\nconst secondaryAction =\n '[&_button]:border-[var(--breeze-border-strong)] [&_button]:bg-[var(--breeze-surface)] [&_button]:text-[var(--breeze-ink)]';\n\n/** Props for a canonical form action region. */\nexport interface FormActionsProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style'> {\n /** Optional back action placed at the leading edge on wide layouts and after primary on compact layouts. */\n back?: ReactNode;\n /** Optional cancellation action displayed after the back action. */\n cancel?: ReactNode;\n /** Optional destructive action placed at the leading edge on wide layouts and last on compact layouts. */\n danger?: ReactNode;\n /** Replaces the compact action spacing with the canonical separated-page spacing. Defaults to `false`. */\n divided?: boolean;\n /** Primary submit or continuation action, first on compact layouts and in the trailing group on wide layouts. */\n primary: ReactNode;\n /** Ref to the rendered action container. */\n ref?: Ref<HTMLElement>;\n /** Additional non-primary action displayed after cancellation. */\n secondary?: ReactNode;\n}\n\n/**\n * Orders form actions consistently across compact and wide layouts.\n *\n * @summary responsive ordering for primary and supporting form actions\n */\nexport function FormActions({\n back,\n cancel,\n className,\n danger,\n divided = false,\n primary,\n ref,\n secondary,\n ...props\n}: Readonly<FormActionsProps>): ReactElement {\n useBreezeContext();\n\n const hasAccessibleName =\n props['aria-label'] !== undefined || props['aria-labelledby'] !== undefined;\n let trailingStart = 'primary';\n\n if (cancel !== null && cancel !== undefined) {\n trailingStart = 'cancel';\n } else if (secondary !== null && secondary !== undefined) {\n trailingStart = 'secondary';\n }\n\n return createElement(\n 'div',\n {\n ...props,\n className: formActions({ class: className, divided }),\n ref: useForwardedRef(ref),\n role: hasAccessibleName ? 'group' : undefined,\n },\n <>\n {danger === null || danger === undefined ? null : (\n <div className=\"order-5 sm:order-none\" data-action-position=\"leading\">\n {danger}\n </div>\n )}\n {back === null || back === undefined ? null : (\n <div\n className={`order-2 sm:order-none ${secondaryAction}`}\n data-action-position=\"leading\"\n >\n {back}\n </div>\n )}\n {cancel === null || cancel === undefined ? null : (\n <div\n className={`order-3 sm:order-none ${secondaryAction} ${trailingStart === 'cancel' ? 'sm:ms-auto' : ''}`}\n data-action-position=\"trailing\"\n >\n {cancel}\n </div>\n )}\n {secondary === null || secondary === undefined ? null : (\n <div\n className={`order-4 sm:order-none ${secondaryAction} ${trailingStart === 'secondary' ? 'sm:ms-auto' : ''}`}\n data-action-position=\"trailing\"\n >\n {secondary}\n </div>\n )}\n <div\n className={`order-1 sm:order-none ${trailingStart === 'primary' ? 'sm:ms-auto' : ''}`}\n data-action-position=\"trailing\"\n >\n {primary}\n </div>\n </>,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useId } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst formSection = tv({\n base: 'grid min-w-0',\n compoundVariants: [\n {\n class:\n 'border-t border-[var(--breeze-border)] pt-6 first:border-t-0 first:pt-0',\n divided: true,\n layout: 'split',\n },\n {\n class: 'border-b border-[var(--breeze-border)] pb-6',\n divided: true,\n layout: 'stacked',\n },\n ],\n defaultVariants: {\n divided: false,\n layout: 'split',\n },\n variants: {\n divided: {\n false: '',\n true: '',\n },\n layout: {\n split:\n 'gap-4 py-6 first:pt-0 md:grid-cols-[minmax(12.5rem,15rem)_minmax(0,1fr)] md:gap-12 md:py-7',\n stacked: 'gap-6',\n },\n },\n});\n\nconst formSectionHeader = tv({\n base: 'grid content-start',\n defaultVariants: {\n layout: 'split',\n },\n variants: {\n layout: {\n split: 'gap-1',\n stacked: 'gap-1 border-b border-[var(--breeze-border)] pb-5 sm:pb-6',\n },\n },\n});\n\n/** Canonical section arrangements for page and overlay forms. */\nexport type FormSectionLayout = 'split' | 'stacked';\n\n/** Semantic heading levels supported by a form section. */\nexport type FormSectionHeadingLevel = 2 | 3 | 4 | 5 | 6;\n\n/** Props for one titled region of a longer form. */\nexport interface FormSectionProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style' | 'title'> {\n /** Optional action aligned with the section introduction. */\n action?: ReactNode;\n /** Form fields or other related controls. */\n children: ReactNode;\n /** Supporting explanation. */\n description?: ReactNode;\n /** Adds the canonical outer divider for the selected layout. Defaults to `false`. */\n divided?: boolean;\n /** Semantic level for the persistent section heading. Defaults to `2`. */\n headingLevel?: FormSectionHeadingLevel;\n /** Page split or overlay stacked arrangement. Defaults to `split`. */\n layout?: FormSectionLayout;\n /** Ref to the rendered section. */\n ref?: Ref<HTMLElement>;\n /** Persistent section heading. */\n title: ReactNode;\n}\n\n/**\n * Groups related form controls with a consistent heading and divider rhythm.\n *\n * @summary titled form region with responsive field and action layout\n */\nexport function FormSection({\n action,\n children,\n className,\n description,\n divided = false,\n headingLevel = 2,\n layout = 'split',\n ref,\n title,\n ...props\n}: Readonly<FormSectionProps>): ReactElement {\n useBreezeContext();\n\n const titleId = useId();\n\n return createElement(\n 'section',\n {\n ...props,\n 'aria-labelledby': titleId,\n className: formSection({\n class: className,\n divided,\n layout,\n }),\n ref: useForwardedRef(ref),\n },\n <>\n <header className={formSectionHeader({ layout })}>\n {createElement(\n `h${headingLevel}`,\n {\n className:\n 'm-0 font-[family-name:var(--breeze-font-display)] text-xl leading-[1.2] font-bold',\n id: titleId,\n },\n title,\n )}\n {description === null || description === undefined ? null : (\n <p className=\"m-0 max-w-[65ch] text-base leading-[1.4] text-[var(--breeze-ink-soft)]\">\n {description}\n </p>\n )}\n </header>\n <div\n className={\n action === undefined\n ? 'grid min-w-0 content-start gap-5'\n : 'flex min-w-0 flex-col-reverse gap-3 md:flex-col md:gap-5'\n }\n >\n {action === undefined ? null : (\n <div\n className=\"flex min-h-11 items-center justify-start md:justify-end\"\n data-breeze-form-section-action=\"\"\n >\n {action}\n </div>\n )}\n <div\n className=\"grid min-w-0 content-start gap-5\"\n data-breeze-form-section-fields=\"\"\n >\n {children}\n </div>\n </div>\n </>,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useId } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst metricCard = tv({\n defaultVariants: {\n density: 'regular',\n tone: 'default',\n },\n slots: {\n description: 'text-base',\n label: 'font-[family-name:var(--breeze-font-display)] text-base leading-5',\n root: 'grid min-w-0 content-center border-b-2 p-5 sm:p-7',\n value:\n 'font-[family-name:var(--breeze-font-display)] text-[2rem] font-bold leading-[1.2] tabular-nums',\n },\n variants: {\n density: {\n regular: {\n root: 'gap-2',\n },\n spacious: {\n root: 'gap-3',\n },\n },\n tone: {\n default: {\n description: 'text-[var(--breeze-ink-soft)]',\n label: 'font-bold',\n root: 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n },\n inverse: {\n description: 'text-[var(--breeze-ink-inverse-muted)]',\n label: 'font-normal text-[var(--breeze-ink-inverse-muted)]',\n root: 'border-[var(--breeze-shell-border)] bg-[var(--breeze-shell-soft)] text-[var(--breeze-ink-inverse)]',\n },\n subtle: {\n description: 'text-[var(--breeze-ink-soft)]',\n label: 'font-bold',\n root: 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink)]',\n },\n },\n },\n});\n\n/** Internal rhythm supported by a metric card. */\nexport type MetricCardDensity = 'regular' | 'spacious';\n\n/** Semantic surface tones supported by a metric card. */\nexport type MetricCardTone = 'default' | 'subtle' | 'inverse';\n\n/** Props for one prominent domain-neutral metric summary. */\nexport interface MetricCardProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style'> {\n /** Internal content rhythm. Defaults to `regular`. */\n density?: MetricCardDensity;\n /** Optional supporting explanation or comparison. */\n description?: ReactNode;\n /** Persistent metric label. */\n label: ReactNode;\n /** Ref to the rendered article. */\n ref?: Ref<HTMLElement>;\n /** Semantic surface tone. Defaults to `default`. */\n tone?: MetricCardTone;\n /** Prominent application-formatted value. */\n value: ReactNode;\n}\n\n/**\n * Presents one prominent application-formatted metric without domain\n * calculation.\n *\n * @summary prominent labelled metric with optional supporting context\n */\nexport function MetricCard({\n className,\n density = 'regular',\n description,\n label,\n ref,\n tone = 'default',\n value,\n ...props\n}: Readonly<MetricCardProps>): ReactElement {\n useBreezeContext();\n\n const labelId = useId();\n const styles = metricCard({ density, tone });\n\n return createElement(\n 'article',\n {\n ...props,\n 'aria-labelledby': labelId,\n className: styles.root({ class: className }),\n ref: useForwardedRef(ref),\n },\n <>\n <div className={styles.label()} id={labelId}>\n {label}\n </div>\n <div className={styles.value()}>{value}</div>\n {description === null || description === undefined ? null : (\n <div className={styles.description()}>{description}</div>\n )}\n </>,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useId } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for a visibly titled navigation group. */\nexport interface NavigationSectionProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style' | 'title'> {\n /** Navigation destinations, commonly NavigationList.Item elements. */\n children: ReactNode;\n /** Ref to the rendered navigation landmark. */\n ref?: Ref<HTMLElement>;\n /** Persistent visible navigation-group title. */\n title: ReactNode;\n}\n\n/**\n * Groups related destinations under one visible navigation heading.\n *\n * @summary labelled navigation landmark for related destinations\n */\nexport function NavigationSection({\n children,\n className,\n ref,\n title,\n ...props\n}: Readonly<NavigationSectionProps>): ReactElement {\n useBreezeContext();\n\n const titleId = useId();\n\n return createElement(\n 'nav',\n {\n ...props,\n 'aria-labelledby': titleId,\n className: `grid gap-2 ${className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <h2\n className=\"m-0 px-3 font-[family-name:var(--breeze-font-display)] text-base font-bold\"\n id={titleId}\n >\n {title}\n </h2>\n {children}\n </>,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useId } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for a page title, context, back destination, and actions. */\nexport interface PageHeaderProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style' | 'title'> {\n /** Page-level actions that stack below the title on compact layouts. */\n actions?: ReactNode;\n /** Optional back navigation displayed before the page heading. */\n back?: ReactNode;\n /** Concise page purpose or status. */\n description?: ReactNode;\n /** Ref to the rendered header. */\n ref?: Ref<HTMLElement>;\n /** Unique page heading. */\n title: ReactNode;\n}\n\n/**\n * Establishes page hierarchy and responsive page-level actions.\n *\n * @summary responsive page heading with context, back link, and actions\n */\nexport function PageHeader({\n actions,\n back,\n className,\n description,\n ref,\n title,\n ...props\n}: Readonly<PageHeaderProps>): ReactElement {\n useBreezeContext();\n\n const titleId = useId();\n\n return createElement(\n 'header',\n {\n ...props,\n 'aria-labelledby': titleId,\n className: `grid gap-5 pb-6 sm:gap-8 sm:pb-8 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-end ${className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <div className=\"grid min-w-0 gap-6\">\n {back === null || back === undefined ? null : (\n <div className=\"justify-self-start\" data-page-header-back>\n {back}\n </div>\n )}\n <div className=\"grid gap-2\">\n <h1\n className=\"m-0 font-[family-name:var(--breeze-font-display)] text-[2rem] leading-[1.12] font-bold tracking-[-0.025em] sm:text-[2.5rem]\"\n id={titleId}\n >\n {title}\n </h1>\n {description === null || description === undefined ? null : (\n <div className=\"m-0 max-w-[65ch] text-base leading-[1.4] text-[var(--breeze-ink-soft)]\">\n {description}\n </div>\n )}\n </div>\n </div>\n {actions === null || actions === undefined ? null : (\n <div className=\"flex flex-col items-stretch sm:items-start lg:items-end\">\n {actions}\n </div>\n )}\n </>,\n );\n}\n","import type { ComponentProps, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport renderNativeButton, {\n type NativeButtonType,\n} from '../../internal/react-aria/renderNativeButton';\nimport action from '../../internal/styling/actions';\nimport type {\n ControlSize,\n VisualAppearance,\n VisualVariant,\n} from '../../internal/styling/visual';\nimport type { NativeButtonProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for an icon-only action with a required accessible name. */\nexport interface IconButtonProps extends NativeButtonProps {\n /** Accessible action name. */\n 'aria-label': string;\n /** Visual emphasis treatment. Defaults to `ghost`. */\n appearance?: VisualAppearance;\n /** Decorative icon. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents interaction. Defaults to `false`. */\n disabled?: boolean;\n /** Shows and announces an in-progress state while preventing activation. Defaults to `false`. */\n loading?: boolean;\n /** Called once when the user activates the button. */\n onAction?: () => void;\n /** Ref to the rendered button. */\n ref?: Ref<HTMLButtonElement>;\n /** Canonical square control size. Defaults to `md`. */\n size?: ControlSize;\n /** Constrained native form behavior: `button` or `submit`. Defaults to `button`. */\n type?: NativeButtonType;\n /** Semantic colour. Defaults to `secondary`. */\n variant?: VisualVariant;\n}\n\nconst squareSizes = {\n lg: 'size-12 p-0',\n md: 'size-11 p-0',\n sm: 'size-8 p-0',\n} as const;\n\n/**\n * Performs an application action through a compact icon-only control whose\n * required accessible label supplies its semantic name.\n *\n * @summary icon-only action with a mandatory accessible label\n */\nexport function IconButton({\n appearance = 'ghost',\n children,\n className,\n disabled = false,\n loading = false,\n onAction,\n ref,\n size = 'md',\n type = 'button',\n variant = 'secondary',\n ...props\n}: Readonly<IconButtonProps>): ReactElement {\n useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-busy': loading || undefined,\n className: action({\n appearance,\n class: [squareSizes[size], className],\n size,\n variant,\n }),\n isDisabled: disabled,\n isPending: loading,\n onPress: onAction,\n ref: forwardedRef,\n render: (renderProps) => {\n const nativeProps = {\n ...props,\n 'aria-busy': loading || undefined,\n ...renderProps,\n };\n\n return renderNativeButton(nativeProps, type);\n },\n type,\n } as ComponentProps<typeof AriaButton>,\n loading ? (\n <span\n aria-hidden=\"true\"\n className=\"size-4 animate-spin rounded-full border-2 border-current border-r-transparent\"\n />\n ) : (\n <span aria-hidden=\"true\">{children}</span>\n ),\n );\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport { ArrowLeftIcon, ArrowRightIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { Button } from '../../primitives/Button/Button';\nimport { IconButton } from '../../primitives/IconButton/IconButton';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\ntype PaginationEntry = 'ellipsis' | number;\n\nfunction createEntries(\n currentPage: number,\n pageCount: number,\n): PaginationEntry[] {\n if (pageCount <= 7) {\n return Array.from({ length: pageCount }, (_, index) => index + 1);\n }\n\n const candidates = new Set([\n 1,\n pageCount,\n currentPage - 1,\n currentPage,\n currentPage + 1,\n ]);\n const pages = [...candidates]\n .filter((page) => page >= 1 && page <= pageCount)\n .sort((first, second) => first - second);\n\n return pages.flatMap((page, index) => {\n const previous = pages[index - 1];\n\n if (previous === undefined) {\n return [page];\n }\n\n if (page - previous === 2) {\n return [previous + 1, page];\n }\n\n return page - previous > 2 ? ['ellipsis' as const, page] : [page];\n });\n}\n\n/** Props for page-based application-owned navigation. */\nexport interface PaginationProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'onChange' | 'style'> {\n /** Accessible name for the pagination landmark. */\n 'aria-label': string;\n /** Current one-based page. */\n currentPage: number;\n /** Prevents all page changes. Defaults to `false`. */\n disabled?: boolean;\n /** Called with the requested one-based page. */\n onChange: (page: number) => void;\n /** Total number of pages. */\n pageCount: number;\n /** Ref to the rendered navigation landmark. */\n ref?: Ref<HTMLElement>;\n}\n\n/**\n * Navigates application-owned paginated data without owning fetching or cursors.\n *\n * @summary one-based navigation across a known page range\n */\nexport function Pagination({\n currentPage,\n disabled = false,\n onChange,\n pageCount,\n ref,\n ...props\n}: Readonly<PaginationProps>): ReactElement {\n const { direction, messages } = useBreezeContext();\n\n if (!Number.isInteger(pageCount) || pageCount < 1) {\n throw new RangeError('pageCount must be a positive integer.');\n }\n\n if (\n !Number.isInteger(currentPage) ||\n currentPage < 1 ||\n currentPage > pageCount\n ) {\n throw new RangeError('currentPage must be within the page range.');\n }\n\n const entries = createEntries(currentPage, pageCount);\n const PreviousIcon = direction === 'rtl' ? ArrowRightIcon : ArrowLeftIcon;\n const NextIcon = direction === 'rtl' ? ArrowLeftIcon : ArrowRightIcon;\n const renderEntry = (entry: PaginationEntry, index: number) => {\n if (entry === 'ellipsis') {\n const nextPage = entries[index + 1];\n\n return (\n <span\n aria-hidden=\"true\"\n className=\"px-1\"\n key={`ellipsis-before-${nextPage}`}\n >\n …\n </span>\n );\n }\n\n if (entry === currentPage) {\n return (\n <span\n aria-current=\"page\"\n aria-label={`${messages.page} ${entry}`}\n className=\"grid min-h-10 min-w-10 place-items-center bg-[var(--breeze-primary)] px-3 font-[family-name:var(--breeze-font-display)] font-bold text-white\"\n key={entry}\n >\n {entry}\n </span>\n );\n }\n\n return (\n <Button\n aria-label={`${messages.page} ${entry}`}\n appearance=\"ghost\"\n disabled={disabled}\n key={entry}\n onAction={() => onChange(entry)}\n variant=\"secondary\"\n >\n {entry}\n </Button>\n );\n };\n\n return createElement(\n 'nav',\n {\n ...props,\n className: `flex flex-wrap items-center gap-2 ${props.className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <IconButton\n aria-label={messages.previousPage}\n disabled={disabled || currentPage <= 1}\n onAction={() => onChange(currentPage - 1)}\n >\n <PreviousIcon />\n </IconButton>\n {entries.map((entry, index) => renderEntry(entry, index))}\n <IconButton\n aria-label={messages.nextPage}\n disabled={disabled || currentPage >= pageCount}\n onAction={() => onChange(currentPage + 1)}\n >\n <NextIcon />\n </IconButton>\n </>,\n );\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Group as AriaGroup } from 'react-aria-components/Group';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst inputGroupRoot = tv({\n base: \"breeze-input-group relative flex min-w-0 items-stretch bg-[var(--breeze-surface)] outline-none after:pointer-events-none after:absolute after:inset-0 after:z-10 after:border after:border-[var(--breeze-border-strong)] after:transition-colors after:duration-[var(--breeze-duration-fast)] after:content-[''] data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[focus-within]:after:border-[var(--breeze-primary)] data-[hovered]:after:border-[var(--breeze-primary)] data-[invalid]:after:!border-[var(--breeze-danger)] [&>*]:!border-0 [&>*:not([data-breeze-input-group-addon])+*:not([data-breeze-input-group-addon])]:!border-s [&>*:not([data-breeze-input-group-addon])+*:not([data-breeze-input-group-addon])]:!border-s-[var(--breeze-border-strong)] [&>[data-breeze-input-group-addon]:not(:first-child)]:ps-0 [&>[data-breeze-input-group-addon]:not(:last-child)]:pe-0 [&>[data-focus-visible]]:!outline-none\",\n});\n\nconst inputGroupAddon = tv({\n base: 'inline-flex shrink-0 items-center justify-center bg-transparent font-[family-name:var(--breeze-font-display)] font-bold text-[var(--breeze-ink-soft)]',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-12 px-4 text-base',\n md: 'min-h-10 px-3 text-sm',\n sm: 'min-h-8 px-2.5 text-xs',\n },\n },\n});\n\n/** Props for visually grouping a field control with related adornments or actions. */\nexport interface InputGroupRootProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'style'> {\n /** Field control, addons, and related actions in visual order. */\n children: ReactNode;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n /** Accessible grouping role. Defaults to `presentation` for visual-only composition. */\n role?: 'group' | 'presentation' | 'region';\n}\n\n/** Props for a non-interactive input prefix or suffix. */\nexport interface InputGroupAddonProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Prefix or suffix content such as a unit or protocol. */\n children: ReactNode;\n /** Ref to the rendered addon. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical addon size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Visually composes a field control with ordered addons or related actions. */\nexport function Root({\n className,\n ref,\n role = 'presentation',\n ...props\n}: Readonly<InputGroupRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaGroup, {\n ...props,\n className: inputGroupRoot({ class: className }),\n 'data-breeze-input-group': '',\n ref: forwardedRef,\n role,\n } as ComponentProps<typeof AriaGroup>);\n}\n\n/** Renders a non-interactive prefix or suffix within an InputGroup. */\nexport function Addon({\n className,\n ref,\n size,\n ...props\n}: Readonly<InputGroupAddonProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n className: inputGroupAddon({ class: className, size }),\n 'data-breeze-input-group-addon': '',\n ref: forwardedRef,\n });\n}\n\n/**\n * Compound visual composition primitive for field controls and addons.\n *\n * @summary visually unified field controls, addons, and related actions\n */\nexport const InputGroup = {\n /** Non-interactive prefix or suffix. */\n Addon,\n /** Visual grouping root. */\n Root,\n};\n","import { tv } from 'tailwind-variants';\n\n/** Shared value typography and sizing for Breeze form controls. */\nexport const formControlValueTypography =\n 'font-[family-name:var(--breeze-font-body)] font-normal';\n\nconst formControlValue = tv({\n base: formControlValueTypography,\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-12 px-4 py-3 text-base leading-[1.4]',\n md: 'min-h-11 px-3 py-2.5 text-base leading-[1.4]',\n sm: 'min-h-8 px-2.5 py-1.5 text-xs leading-[1.4]',\n },\n },\n});\n\nexport default formControlValue;\n","import type {\n ComponentProps,\n HTMLAttributes,\n InputHTMLAttributes,\n LabelHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { FieldError as AriaFieldError } from 'react-aria-components/FieldError';\nimport { Input as AriaInput } from 'react-aria-components/Input';\nimport { Label as AriaLabel } from 'react-aria-components/Label';\nimport { Text as AriaText } from 'react-aria-components/Text';\nimport { TextField as AriaTextField } from 'react-aria-components/TextField';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport formControlValue from '../../internal/styling/formControls';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst textFieldRoot = tv({\n base: 'flex min-w-0 flex-col gap-1.5',\n});\n\nconst textFieldInput = tv({\n base: 'w-full border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] placeholder:text-[var(--breeze-ink-muted)] data-[hovered]:border-[var(--breeze-primary)] data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] disabled:cursor-not-allowed disabled:bg-[var(--breeze-surface-subtle)] disabled:opacity-70 read-only:cursor-default read-only:bg-[var(--breeze-surface-subtle)] aria-invalid:border-[var(--breeze-danger)]',\n});\n\nconst label = tv({\n base: 'font-[family-name:var(--breeze-font-display)] text-base font-bold text-[var(--breeze-ink)]',\n});\n\nconst description = tv({\n base: 'text-sm text-[var(--breeze-ink-soft)]',\n});\n\nconst error = tv({\n base: 'text-sm font-medium text-[var(--breeze-danger)]',\n});\n\ntype TextFieldRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface TextFieldRootSharedProps extends TextFieldRootNativeProps {\n /** Compound label, input, description, and error parts. */\n children: ReactNode;\n /** Prevents editing and focus. Defaults to `false`. */\n disabled?: boolean;\n /** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Marks the field as required for native validation and assistive technology. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered field container. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledTextFieldRootProps {\n /** Current text value. */\n value: string;\n /** Called with the next text value. */\n onChange: (value: string) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyTextFieldRootProps {\n /** Current immutable text value. */\n value: string;\n /** Marks a controlled value as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledTextFieldRootProps {\n /** Initial text value. Defaults to an empty string. */\n defaultValue?: string;\n /** Called with the next text value. */\n onChange?: (value: string) => void;\n readOnly?: false;\n value?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled text field state. */\nexport type TextFieldRootProps = TextFieldRootSharedProps &\n (\n | ControlledTextFieldRootProps\n | ReadOnlyTextFieldRootProps\n | UncontrolledTextFieldRootProps\n );\n\n/** Props for the visible text field label. */\nexport interface TextFieldLabelProps\n extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'style'> {\n /** Label content that persistently names the input. */\n children: ReactNode;\n /** Ref to the rendered label. */\n ref?: Ref<HTMLLabelElement>;\n}\n\n/** Props for the native text input part. */\nexport interface TextFieldInputProps\n extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n | 'children'\n | 'className'\n | 'defaultValue'\n | 'disabled'\n | 'onChange'\n | 'readOnly'\n | 'required'\n | 'size'\n | 'style'\n | 'type'\n | 'value'\n > {\n /** Placement and composition classes. */\n className?: string;\n /** Ref to the rendered input. */\n ref?: Ref<HTMLInputElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n /** Native text-entry purpose. Defaults to `text`. */\n type?: 'email' | 'password' | 'tel' | 'text' | 'url';\n}\n\n/** Props for supporting text associated with the input. */\nexport interface TextFieldDescriptionProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Supporting guidance for the input. */\n children: ReactNode;\n /** Ref to the rendered description. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Props for an accessible validation message. */\nexport interface TextFieldErrorProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Validation message shown while the root is invalid. */\n children: ReactNode;\n /** Ref to the rendered error message. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Coordinates accessible text field state and compound anatomy. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n invalid = false,\n onChange,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<TextFieldRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaTextField,\n {\n ...props,\n className: textFieldRoot({ class: className }),\n defaultValue,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n onChange,\n ref: forwardedRef,\n value,\n } as ComponentProps<typeof AriaTextField>,\n children,\n );\n}\n\n/** Renders the persistent accessible label for a TextField. */\nexport function Label({\n className,\n ref,\n ...props\n}: Readonly<TextFieldLabelProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaLabel, {\n ...props,\n className: label({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the editable native input for a TextField. */\nexport function Input({\n className,\n ref,\n size,\n type = 'text',\n ...props\n}: Readonly<TextFieldInputProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaInput, {\n ...props,\n className: formControlValue({\n class: textFieldInput({ class: className }),\n size,\n }),\n ref: forwardedRef,\n type,\n });\n}\n\n/** Renders supporting guidance and associates it with a TextField input. */\nexport function Description({\n className,\n ref,\n ...props\n}: Readonly<TextFieldDescriptionProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaText, {\n ...props,\n className: description({ class: className }),\n ref: forwardedRef,\n slot: 'description',\n });\n}\n\n/** Renders an associated validation message while a TextField is invalid. */\nfunction ErrorMessage({\n className,\n ref,\n ...props\n}: Readonly<TextFieldErrorProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaFieldError, {\n ...props,\n className: error({ class: className }),\n ref: forwardedRef,\n });\n}\n\nexport { ErrorMessage as Error };\n\n/**\n * Accessible compound single-line text-entry primitive.\n *\n * @summary labelled single-line text entry with validation anatomy\n */\nexport const TextField = {\n /** Supporting guidance associated with the input. */\n Description,\n /** Validation message associated with an invalid input. */\n Error: ErrorMessage,\n /** Editable native input. */\n Input,\n /** Persistent accessible label. */\n Label,\n /** State and accessibility root. */\n Root,\n};\n","import type { ReactElement, ReactNode } from 'react';\nimport { useState } from 'react';\nimport { tv } from 'tailwind-variants';\nimport { EyeIcon, EyeOffIcon } from '../../icons';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { IconButton } from '../../primitives/IconButton/IconButton';\nimport { InputGroup } from '../../primitives/InputGroup/InputGroup';\nimport { TextField } from '../../primitives/TextField/TextField';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst passwordFieldGroup = tv({\n base: '[&>*:not([data-breeze-input-group-addon])+*:not([data-breeze-input-group-addon])]:!border-s-0 [&>.breeze-action:focus-visible]:!outline-0 [&>.breeze-action[data-focus-visible]]:!outline-0 data-[disabled]:opacity-70 data-[focus-within]:outline-2 data-[focus-within]:outline-offset-[-2px] data-[focus-within]:outline-solid data-[focus-within]:outline-[var(--breeze-focus)] has-[input:read-only]:bg-[var(--breeze-surface-subtle)] has-[input:read-only]:opacity-70',\n});\n\nconst passwordFieldInput = tv({\n base: 'min-w-0 w-auto flex-1 bg-transparent disabled:!bg-transparent disabled:!opacity-100 read-only:!bg-transparent read-only:!opacity-100',\n});\n\nconst passwordVisibilityButton = tv({\n base: '!border-0 !bg-transparent !outline-none text-[var(--breeze-ink-soft)] disabled:!opacity-100 data-[disabled]:!opacity-100 data-[hovered]:!bg-transparent data-[hovered]:text-[var(--breeze-primary)] data-[pressed]:!translate-y-0',\n});\n\ninterface PasswordFieldSharedProps {\n /** Native autocomplete purpose. */\n autoComplete?: 'current-password' | 'new-password' | 'off';\n /** Supporting guidance associated with the input. */\n description?: ReactNode;\n /** Prevents editing and focus. Defaults to `false`. */\n disabled?: boolean;\n /** Validation message shown when invalid. */\n error?: ReactNode;\n /** Exposes invalid state. Defaults to `false`. */\n invalid?: boolean;\n /** Persistent visible input label. */\n label: ReactNode;\n /** Native form field name. */\n name?: string;\n /** Placeholder shown while empty. */\n placeholder?: string;\n /** Marks the input as required. Defaults to `false`. */\n required?: boolean;\n /** Canonical input and action size. Defaults to `md`. */\n size?: ControlSize;\n}\n\ninterface ControlledPasswordFieldProps {\n /** Current password value. */\n value: string;\n /** Called with the next password value. */\n onChange: (value: string) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyPasswordFieldProps {\n /** Current immutable password value. */\n value: string;\n /** Marks the controlled value as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledPasswordFieldProps {\n /** Initial password value. Defaults to an empty string. */\n defaultValue?: string;\n /** Called with the next password value. */\n onChange?: (value: string) => void;\n value?: never;\n readOnly?: false;\n}\n\n/** Props for controlled, read-only, or uncontrolled password entry. */\nexport type PasswordFieldProps = PasswordFieldSharedProps &\n (\n | ControlledPasswordFieldProps\n | ReadOnlyPasswordFieldProps\n | UncontrolledPasswordFieldProps\n );\n\n/**\n * Provides accessible password entry with a keyboard-operable visibility toggle.\n *\n * @summary labelled password entry with a visibility action\n */\nexport function PasswordField({\n autoComplete,\n defaultValue,\n description,\n disabled = false,\n error,\n invalid = false,\n label,\n name,\n onChange,\n placeholder,\n readOnly = false,\n required = false,\n size = 'md',\n value,\n}: Readonly<PasswordFieldProps>): ReactElement {\n const { messages } = useBreezeContext();\n const [visible, setVisible] = useState(false);\n\n const content = (\n <>\n <TextField.Label>{label}</TextField.Label>\n <InputGroup.Root className={passwordFieldGroup()}>\n <TextField.Input\n autoComplete={autoComplete}\n className={passwordFieldInput()}\n name={name}\n placeholder={placeholder}\n size={size}\n type={visible ? 'text' : 'password'}\n />\n <IconButton\n aria-label={visible ? messages.hidePassword : messages.showPassword}\n className={passwordVisibilityButton()}\n disabled={disabled}\n onAction={() => setVisible((current) => !current)}\n size={size}\n >\n {visible ? <EyeOffIcon /> : <EyeIcon />}\n </IconButton>\n </InputGroup.Root>\n {description === undefined ? null : (\n <TextField.Description>{description}</TextField.Description>\n )}\n {error === undefined ? null : <TextField.Error>{error}</TextField.Error>}\n </>\n );\n\n if (value === undefined) {\n return (\n <TextField.Root\n defaultValue={defaultValue}\n disabled={disabled}\n invalid={invalid}\n onChange={onChange}\n required={required}\n >\n {content}\n </TextField.Root>\n );\n }\n\n if (readOnly) {\n return (\n <TextField.Root\n disabled={disabled}\n invalid={invalid}\n readOnly\n required={required}\n value={value}\n >\n {content}\n </TextField.Root>\n );\n }\n\n if (onChange === undefined) {\n throw new Error('Controlled PasswordField requires onChange.');\n }\n\n return (\n <TextField.Root\n disabled={disabled}\n invalid={invalid}\n onChange={onChange}\n required={required}\n value={value}\n >\n {content}\n </TextField.Root>\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for a content-section heading and optional action. */\nexport interface SectionHeaderProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style' | 'title'> {\n /** Optional section action. */\n action?: ReactNode;\n /** Optional concise supporting context. */\n description?: ReactNode;\n /** Stable id for heading relationships. */\n id?: string;\n /** Ref to the rendered header. */\n ref?: Ref<HTMLElement>;\n /** Section heading. */\n title: ReactNode;\n}\n\n/**\n * Aligns a section heading, supporting context, and one related action.\n *\n * @summary content-section heading with context and one related action\n */\nexport function SectionHeader({\n action,\n className,\n description,\n id,\n ref,\n title,\n ...props\n}: Readonly<SectionHeaderProps>): ReactElement {\n useBreezeContext();\n\n return createElement(\n 'header',\n {\n ...props,\n className: `flex items-start justify-between gap-3 border-b border-[var(--breeze-border)] px-5 py-4 ${className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <div className=\"grid min-w-0 gap-1\">\n <h2\n className=\"m-0 font-[family-name:var(--breeze-font-display)] text-xl font-bold\"\n id={id}\n >\n {title}\n </h2>\n {description === null || description === undefined ? null : (\n <p className=\"m-0 max-w-[65ch] text-base text-[var(--breeze-ink-soft)]\">\n {description}\n </p>\n )}\n </div>\n {action === null || action === undefined ? null : (\n <div className=\"shrink-0\">{action}</div>\n )}\n </>,\n );\n}\n","import type { ComponentProps, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { ToggleButton as AriaToggleButton } from 'react-aria-components/ToggleButton';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport action from '../../internal/styling/actions';\nimport type {\n ControlSize,\n VisualAppearance,\n VisualVariant,\n} from '../../internal/styling/visual';\nimport type { NativeButtonProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\ninterface ToggleButtonSharedProps extends Omit<NativeButtonProps, 'value'> {\n /** Visual emphasis treatment. Defaults to `outline`. */\n appearance?: VisualAppearance;\n /** Toggle content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents interaction. Defaults to `false`. */\n disabled?: boolean;\n /** Ref to the rendered button. */\n ref?: Ref<HTMLButtonElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n /** Stable value when the toggle is composed inside a ToggleGroup. */\n value?: string;\n /** Semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\ninterface ControlledToggleButtonProps {\n /** Current selected state. */\n selected: boolean;\n /** Called with the next selected state. */\n onChange: (selected: boolean) => void;\n defaultSelected?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyToggleButtonProps {\n /** Current selected state. */\n selected: boolean;\n /** Marks controlled state as intentionally immutable while preserving focus. */\n readOnly: true;\n defaultSelected?: never;\n onChange?: never;\n}\n\ninterface UncontrolledToggleButtonProps {\n /** Initial selected state. Defaults to `false`. */\n defaultSelected?: boolean;\n /** Called with the next selected state. */\n onChange?: (selected: boolean) => void;\n readOnly?: false;\n selected?: never;\n}\n\n/** Props for a controlled or uncontrolled two-state action. */\nexport type ToggleButtonProps = ToggleButtonSharedProps &\n (\n | ControlledToggleButtonProps\n | ReadOnlyToggleButtonProps\n | UncontrolledToggleButtonProps\n );\n\n/**\n * Selects or deselects a two-state action through pointer or keyboard input.\n *\n * @summary two-state action with controlled or uncontrolled selection\n */\nexport function ToggleButton({\n appearance = 'outline',\n children,\n className,\n defaultSelected,\n disabled = false,\n id,\n onChange,\n readOnly = false,\n ref,\n selected,\n size,\n value,\n variant,\n ...props\n}: Readonly<ToggleButtonProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaToggleButton,\n {\n ...props,\n className: ({ isSelected }) =>\n action({\n appearance: isSelected ? 'solid' : appearance,\n class: className,\n size,\n variant,\n }),\n defaultSelected,\n id: value ?? id,\n isDisabled: disabled,\n isSelected: selected,\n onChange: readOnly ? undefined : onChange,\n ref: forwardedRef,\n } as ComponentProps<typeof AriaToggleButton>,\n children,\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { ToggleButtonGroup as AriaToggleButtonGroup } from 'react-aria-components/ToggleButtonGroup';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst toggleGroup = tv({\n base: 'inline-flex gap-1',\n defaultVariants: {\n orientation: 'horizontal',\n },\n variants: {\n orientation: {\n horizontal: 'flex-row',\n vertical: 'flex-col items-stretch',\n },\n },\n});\n\ntype ToggleGroupNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface ToggleGroupSharedProps extends ToggleGroupNativeProps {\n /** ToggleButton children with stable `value` props. */\n children: ReactNode;\n /** Prevents all contained toggles from changing. Defaults to `false`. */\n disabled?: boolean;\n /** Allows more than one selected value. Defaults to `false`. */\n multiple?: boolean;\n /** Layout and keyboard navigation axis. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledToggleGroupProps {\n /** Current selected values. */\n selection: string[];\n /** Called with the next selected values. */\n onSelectionChange: (selection: string[]) => void;\n defaultSelection?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyToggleGroupProps {\n /** Current selected values. */\n selection: string[];\n /** Marks a controlled selection as intentionally immutable. */\n readOnly: true;\n defaultSelection?: never;\n onSelectionChange?: never;\n}\n\ninterface UncontrolledToggleGroupProps {\n /** Initial selected values. Defaults to an empty selection. */\n defaultSelection?: string[];\n /** Called with the next selected values. */\n onSelectionChange?: (selection: string[]) => void;\n readOnly?: false;\n selection?: never;\n}\n\n/** Props for a controlled, read-only, or uncontrolled toggle collection. */\nexport type ToggleGroupProps = ToggleGroupSharedProps &\n (\n | ControlledToggleGroupProps\n | ReadOnlyToggleGroupProps\n | UncontrolledToggleGroupProps\n );\n\n/**\n * Coordinates single or multiple toggle selection and arrow-key navigation.\n *\n * @summary related toggle actions with single or multiple selection\n */\nexport function ToggleGroup({\n children,\n className,\n defaultSelection,\n disabled = false,\n multiple = false,\n onSelectionChange,\n orientation,\n readOnly: _readOnly,\n ref,\n selection,\n ...props\n}: Readonly<ToggleGroupProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaToggleButtonGroup,\n {\n ...props,\n className: toggleGroup({\n class: className,\n orientation,\n }),\n defaultSelectedKeys: defaultSelection,\n isDisabled: disabled,\n onSelectionChange: (keys) => onSelectionChange?.([...keys].map(String)),\n orientation,\n ref: forwardedRef,\n selectedKeys: selection,\n selectionMode: multiple ? 'multiple' : 'single',\n },\n children,\n );\n}\n","import type { ReactElement, ReactNode } from 'react';\nimport { ToggleButton } from '../../primitives/ToggleButton/ToggleButton';\nimport { ToggleGroup } from '../../primitives/ToggleGroup/ToggleGroup';\n\n/** One option displayed by SegmentedControl. */\nexport interface SegmentedControlOption {\n /** Prevents selection of this option. Defaults to `false`. */\n disabled?: boolean;\n /** Visible option label. */\n label: ReactNode;\n /** Stable semantic value. */\n value: string;\n}\n\ninterface SegmentedControlSharedProps {\n /** Accessible name for the exclusive choice. */\n 'aria-label': string;\n /** Optional placement class for application composition. */\n className?: string;\n /** Prevents all choices from changing. Defaults to `false`. */\n disabled?: boolean;\n /** Choice layout and keyboard axis. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ordered application-owned options. */\n options: readonly SegmentedControlOption[];\n}\n\ninterface ControlledSegmentedControlProps {\n /** Current selected option. */\n value: string;\n /** Called with the next selected option. */\n onChange: (value: string) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlySegmentedControlProps {\n /** Current immutable selected option. */\n value: string;\n /** Marks the controlled value as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledSegmentedControlProps {\n /** Initial selected option. */\n defaultValue?: string;\n /** Called with the next selected option. */\n onChange?: (value: string) => void;\n value?: never;\n readOnly?: false;\n}\n\n/** Props for a controlled, read-only, or uncontrolled segmented choice. */\nexport type SegmentedControlProps = SegmentedControlSharedProps &\n (\n | ControlledSegmentedControlProps\n | ReadOnlySegmentedControlProps\n | UncontrolledSegmentedControlProps\n );\n\n/**\n * Presents a compact exclusive choice with arrow-key navigation.\n *\n * @summary exclusive compact choice with controlled or uncontrolled state\n */\nexport function SegmentedControl({\n 'aria-label': ariaLabel,\n className,\n defaultValue,\n disabled = false,\n onChange,\n options,\n orientation = 'horizontal',\n readOnly = false,\n value,\n}: Readonly<SegmentedControlProps>): ReactElement {\n const selection = value === undefined ? undefined : [value];\n const defaultSelection =\n defaultValue === undefined ? undefined : [defaultValue];\n const reportSelection = (nextSelection: string[]) => {\n const [nextValue] = nextSelection;\n\n if (nextValue !== undefined) {\n onChange?.(nextValue);\n }\n };\n const content = (\n <>\n {options.map((option) => (\n <ToggleButton\n disabled={option.disabled}\n key={option.value}\n value={option.value}\n >\n {option.label}\n </ToggleButton>\n ))}\n </>\n );\n\n const adjacentBorderClass =\n orientation === 'vertical'\n ? '[&>button+button]:border-t-0'\n : '[&>button+button]:border-s-0';\n const resolvedClassName = `gap-0 ${adjacentBorderClass} ${className ?? ''}`;\n\n if (selection === undefined) {\n return (\n <ToggleGroup\n aria-label={ariaLabel}\n className={resolvedClassName}\n defaultSelection={defaultSelection}\n disabled={disabled}\n onSelectionChange={reportSelection}\n orientation={orientation}\n >\n {content}\n </ToggleGroup>\n );\n }\n\n if (readOnly) {\n return (\n <ToggleGroup\n aria-label={ariaLabel}\n className={resolvedClassName}\n disabled={disabled}\n orientation={orientation}\n readOnly\n selection={selection}\n >\n {content}\n </ToggleGroup>\n );\n }\n\n if (onChange === undefined) {\n throw new Error('Controlled SegmentedControl requires onChange.');\n }\n\n return (\n <ToggleGroup\n aria-label={ariaLabel}\n className={resolvedClassName}\n disabled={disabled}\n onSelectionChange={reportSelection}\n orientation={orientation}\n selection={selection}\n >\n {content}\n </ToggleGroup>\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement, useId } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { VisualVariant } from '../../internal/styling/visual';\nimport { IconTile } from '../../primitives/IconTile/IconTile';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for a complete contextual state message. */\nexport interface StatePanelProps\n extends Omit<HTMLAttributes<HTMLElement>, 'children' | 'style' | 'title'> {\n /** Optional recovery or next-step action. */\n action?: ReactNode;\n /** Concise supporting guidance. */\n description: ReactNode;\n /** Decorative state icon. */\n icon: ReactNode;\n /** Ref to the rendered section. */\n ref?: Ref<HTMLElement>;\n /** Contextual state heading. */\n title: ReactNode;\n /** Semantic state colour. Defaults to `info`. */\n variant?: Extract<\n VisualVariant,\n 'danger' | 'info' | 'primary' | 'success' | 'warning'\n >;\n}\n\n/**\n * Communicates empty, error, success, warning, or informational state and\n * recovery.\n *\n * @summary complete contextual state with guidance and optional recovery\n */\nexport function StatePanel({\n action,\n className,\n description,\n icon,\n ref,\n title,\n variant = 'info',\n ...props\n}: Readonly<StatePanelProps>): ReactElement {\n useBreezeContext();\n\n const titleId = useId();\n\n return createElement(\n 'section',\n {\n ...props,\n 'aria-labelledby': titleId,\n className: `grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-4 border-b-2 border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-5 sm:gap-x-5 sm:p-8 ${className ?? ''}`,\n ref: useForwardedRef(ref),\n },\n <>\n <IconTile size=\"lg\" variant={variant}>\n {icon}\n </IconTile>\n <div className=\"grid min-w-0 content-center gap-2\">\n <h2\n className=\"m-0 font-[family-name:var(--breeze-font-display)] text-2xl font-bold\"\n id={titleId}\n >\n {title}\n </h2>\n <div className=\"col-span-2 m-0 max-w-[65ch] text-base text-[var(--breeze-ink-soft)] sm:col-span-1\">\n {description}\n </div>\n {action === null || action === undefined ? null : (\n <div className=\"col-span-2 mt-3 flex flex-col items-stretch sm:col-span-1 sm:items-start\">\n {action}\n </div>\n )}\n </div>\n </>,\n );\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { createElement, useState } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst avatar = tv({\n base: 'inline-flex shrink-0 items-center justify-center overflow-hidden font-[family-name:var(--breeze-font-display)] font-bold',\n defaultVariants: {\n shape: 'circle',\n size: 'md',\n tone: 'primary',\n },\n variants: {\n shape: {\n circle: 'rounded-full',\n square: 'rounded-none',\n },\n size: {\n lg: 'size-14 text-lg',\n md: 'size-9 text-sm',\n sm: 'size-9 text-xs',\n },\n tone: {\n accent: 'bg-[var(--breeze-accent-soft)] text-[var(--breeze-accent)]',\n primary: 'bg-[var(--breeze-primary-soft)] text-[var(--breeze-primary)]',\n },\n },\n});\n\n/** Canonical entity-marker colour treatments. */\nexport type AvatarTone = 'accent' | 'primary';\n\n/** Props for a person or entity representation. */\nexport interface AvatarProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Accessible name for the represented person or entity. */\n name: string;\n /** Optional initials override for compact entity marks. */\n initials?: string;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Circular person mark or square entity mark. Defaults to `circle`. */\n shape?: 'circle' | 'square';\n /** Canonical avatar size. Defaults to `md`. */\n size?: 'sm' | 'md' | 'lg';\n /** Optional image URL. Initials are shown when absent or unavailable. */\n src?: string;\n /** Canonical entity-marker colour. Defaults to `primary`. */\n tone?: AvatarTone;\n}\n\nfunction getInitials(name: string): string {\n return name\n .trim()\n .split(/\\s+/u)\n .filter(Boolean)\n .slice(0, 2)\n .map((part) => Array.from(part).at(0)?.toUpperCase())\n .join('');\n}\n\n/**\n * Renders a named image with a deterministic initials fallback.\n *\n * @summary named image with deterministic initials fallback\n */\nexport function Avatar({\n className,\n initials,\n name,\n ref,\n shape,\n size,\n src,\n tone = 'primary',\n ...props\n}: Readonly<AvatarProps>) {\n useBreezeContext();\n\n const [failedSource, setFailedSource] = useState<string>();\n const forwardedRef = useForwardedRef(ref);\n const showImage = src !== undefined && failedSource !== src;\n\n return createElement(\n 'span',\n {\n ...props,\n 'aria-label': name,\n className: avatar({\n class: className,\n shape,\n size,\n tone,\n }),\n 'data-tone': tone,\n ref: forwardedRef,\n role: 'img',\n },\n showImage ? (\n <img\n alt=\"\"\n className=\"size-full object-cover\"\n onError={() => setFailedSource(src)}\n src={src}\n />\n ) : (\n initials ?? getInitials(name)\n ),\n );\n}\n","import type { ReactElement, ReactNode } from 'react';\nimport { useRef } from 'react';\nimport { Avatar } from '../../primitives/Avatar/Avatar';\nimport { Menu, NonModalMenuPopover } from '../../primitives/Menu/Menu';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** One application-owned user-menu action or destination. */\nexport interface UserMenuAction {\n /** Prevents action. Defaults to `false`. */\n disabled?: boolean;\n /** Optional router-neutral or native destination. */\n href?: string;\n /** Optional decorative action icon. */\n icon?: ReactNode;\n /** Stable action key. */\n id: string;\n /** Visible and typeahead-readable label. */\n label: string;\n /** Called with this action key after activation. */\n onAction?: (id: string) => void;\n /** Visual treatment for the action. Defaults to `default`. */\n variant?: 'default' | 'danger';\n}\n\ninterface UserMenuSharedProps {\n /** Accessible name for the menu trigger. */\n 'aria-label': string;\n /** Ordered application-owned actions. */\n actions: readonly UserMenuAction[];\n /** Indicates unread notification content. Defaults to `false`. */\n hasUnread?: boolean;\n /** Optional notification or account content above the actions. */\n notifications?: ReactNode;\n /** Optional heading displayed above notification content. */\n notificationHeading?: ReactNode;\n /** Optional count or state displayed beside the notification heading. */\n notificationState?: ReactNode;\n /** Optional avatar image URL. */\n src?: string;\n /** Complete accessible trigger name used when unread content is present. */\n unreadLabel?: string;\n /** Visible represented user name. */\n userName: string;\n}\n\ninterface ControlledUserMenuProps {\n defaultOpen?: never;\n /** Called with the next menu state. */\n onOpenChange: (open: boolean) => void;\n /** Current menu state. */\n open: boolean;\n}\n\ninterface UncontrolledUserMenuProps {\n /** Initial menu state. Defaults to `false`. */\n defaultOpen?: boolean;\n /** Called with the next menu state. */\n onOpenChange?: (open: boolean) => void;\n open?: never;\n}\n\n/** Props for account identity, notifications, and application-owned user actions. */\nexport type UserMenuProps = UserMenuSharedProps &\n (ControlledUserMenuProps | UncontrolledUserMenuProps);\n\n/**\n * Presents user identity, notification content, and keyboard-complete account\n * actions.\n *\n * @summary user identity menu with notifications and account actions\n */\nexport function UserMenu({\n 'aria-label': ariaLabel,\n actions,\n defaultOpen,\n hasUnread = false,\n notificationHeading,\n notificationState,\n notifications,\n onOpenChange,\n open,\n src,\n unreadLabel,\n userName,\n}: Readonly<UserMenuProps>): ReactElement {\n const { messages } = useBreezeContext();\n const triggerRef = useRef<HTMLButtonElement>(null);\n const menuContent = (\n <>\n <Menu.Trigger\n aria-label={\n hasUnread\n ? unreadLabel ?? `${ariaLabel}, ${messages.unreadNotifications}`\n : ariaLabel\n }\n className=\"relative min-h-14 w-full justify-start gap-3 border-0 bg-transparent p-2 text-start text-inherit data-[hovered]:bg-[var(--breeze-shell-soft)]\"\n data-breeze-user-menu-trigger=\"\"\n ref={triggerRef}\n >\n <span className=\"relative\">\n <Avatar name={userName} size=\"md\" src={src} />\n {hasUnread ? (\n <span\n aria-hidden=\"true\"\n className=\"absolute -end-0.5 -top-0.5 size-3 rounded-full border-2 border-[var(--breeze-shell)] bg-[var(--breeze-danger)]\"\n />\n ) : null}\n </span>\n <strong className=\"min-w-0 truncate text-base\" data-breeze-user-name=\"\">\n {userName}\n </strong>\n </Menu.Trigger>\n <NonModalMenuPopover\n className=\"w-80\"\n placement=\"top start\"\n triggerRef={triggerRef}\n >\n {notifications === undefined ? null : (\n <div className=\"border-b border-[var(--breeze-border)]\">\n {notificationHeading === undefined ? null : (\n <div className=\"flex items-center justify-between gap-3 border-b border-[var(--breeze-border)] px-4 py-3\">\n <strong className=\"font-[family-name:var(--breeze-font-display)] text-xl\">\n {notificationHeading}\n </strong>\n {notificationState === undefined ? null : (\n <span className=\"bg-[var(--breeze-danger-soft)] px-2 py-1 font-bold text-[var(--breeze-danger)]\">\n {notificationState}\n </span>\n )}\n </div>\n )}\n <div className=\"bg-[var(--breeze-primary-soft)] p-4\">\n {notifications}\n </div>\n </div>\n )}\n <Menu.List aria-label={ariaLabel}>\n {actions.map((action) => (\n <Menu.Item\n className={\n action.variant === 'danger'\n ? 'justify-center border-b-0 bg-[var(--breeze-danger)] font-bold text-white data-[focus-visible]:bg-[var(--breeze-danger-hover)] data-[hovered]:bg-[var(--breeze-danger-hover)] data-[selected]:bg-[var(--breeze-danger-hover)]'\n : undefined\n }\n disabled={action.disabled}\n href={action.href}\n id={action.id}\n key={action.id}\n onAction={() => action.onAction?.(action.id)}\n textValue={action.label}\n >\n <span className=\"flex items-center gap-2.5\">\n {action.icon}\n {action.label}\n </span>\n </Menu.Item>\n ))}\n </Menu.List>\n </NonModalMenuPopover>\n </>\n );\n\n if (open === undefined) {\n return (\n <Menu.Root defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n {menuContent}\n </Menu.Root>\n );\n }\n\n return (\n <Menu.Root onOpenChange={onOpenChange} open={open}>\n {menuContent}\n </Menu.Root>\n );\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport { DisclosurePanel as AriaDisclosurePanel } from 'react-aria-components/Disclosure';\nimport { Heading as AriaHeading } from 'react-aria-components/Heading';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../hooks/useForwardedRef';\nimport type { NativeButtonProps } from '../types/native';\n\nconst disclosureTrigger = tv({\n base: 'flex min-h-11 w-full items-center justify-between gap-3 px-3 py-2 text-start font-semibold text-[var(--breeze-ink)] outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n});\nconst disclosurePanel = tv({\n base: 'px-3 pb-4 text-[var(--breeze-ink)]',\n});\n\n/** Shared Breeze props for a disclosure or accordion trigger. */\nexport interface SharedDisclosureTriggerProps extends NativeButtonProps {\n /** Trigger label. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Heading level around the trigger. Defaults to `3`. */\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /** Ref to the rendered trigger button. */\n ref?: Ref<HTMLButtonElement>;\n}\n\n/** Shared Breeze props for a disclosure or accordion panel. */\nexport interface SharedDisclosurePanelProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Collapsible panel content. */\n children: ReactNode;\n /** Announces the panel as a region instead of a group. */\n role?: 'group' | 'region';\n /** Ref to the rendered panel. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Internal React Aria-backed trigger shared by disclosures and accordions. */\nexport function SharedDisclosureTrigger({\n children,\n className,\n headingLevel = 3,\n ref,\n ...props\n}: Readonly<SharedDisclosureTriggerProps>): ReactElement {\n return (\n <AriaHeading level={headingLevel}>\n {createElement(\n AriaButton,\n {\n ...props,\n className: disclosureTrigger({ class: className }),\n ref: useForwardedRef(ref),\n slot: 'trigger',\n } as ComponentProps<typeof AriaButton>,\n children,\n )}\n </AriaHeading>\n );\n}\n\n/** Internal React Aria-backed panel shared by disclosures and accordions. */\nexport function SharedDisclosurePanel({\n className,\n ref,\n ...props\n}: Readonly<SharedDisclosurePanelProps>): ReactElement {\n return createElement(AriaDisclosurePanel, {\n ...props,\n className: disclosurePanel({ class: className }),\n ref: useForwardedRef(ref),\n });\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport {\n Disclosure as AriaDisclosure,\n DisclosureGroup as AriaDisclosureGroup,\n} from 'react-aria-components/DisclosureGroup';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n SharedDisclosurePanel,\n type SharedDisclosurePanelProps,\n SharedDisclosureTrigger,\n type SharedDisclosureTriggerProps,\n} from '../../internal/react-aria/DisclosureParts';\nimport type { CollectionKey } from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst accordionRoot = tv({\n base: 'divide-y divide-[var(--breeze-border)] border border-[var(--breeze-border)] bg-[var(--breeze-surface)]',\n});\nconst accordionItem = tv({\n base: 'group',\n});\n\ntype AccordionRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface AccordionRootSharedProps extends AccordionRootNativeProps {\n /** Accordion items. */\n children: ReactNode;\n /** Disables every item. Defaults to `false`. */\n disabled?: boolean;\n /** Allows more than one expanded item. Defaults to `false`. */\n multiple?: boolean;\n /** Ref to the rendered accordion root. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledAccordionRootProps {\n /** Current expanded item keys. */\n value: CollectionKey[];\n /** Called with the next expanded item keys. */\n onChange: (value: CollectionKey[]) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyAccordionRootProps {\n /** Current immutable expanded item keys. */\n value: CollectionKey[];\n /** Marks controlled state as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledAccordionRootProps {\n /** Initially expanded item keys. */\n defaultValue?: CollectionKey[];\n /** Called with the next expanded item keys. */\n onChange?: (value: CollectionKey[]) => void;\n readOnly?: false;\n value?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled accordion expansion. */\nexport type AccordionRootProps = AccordionRootSharedProps &\n (\n | ControlledAccordionRootProps\n | ReadOnlyAccordionRootProps\n | UncontrolledAccordionRootProps\n );\n\n/** Props for one keyed accordion item. */\nexport interface AccordionItemProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'style'> {\n /** Item trigger and panel parts. */\n children: ReactNode;\n /** Prevents this item from changing state. Defaults to `false`. */\n disabled?: boolean;\n /** Stable string or number item key. */\n id: CollectionKey;\n /** Ref to the rendered item root. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for an accordion item heading button. */\nexport type AccordionTriggerProps = SharedDisclosureTriggerProps;\n\n/** Props for collapsible accordion item content. */\nexport type AccordionPanelProps = SharedDisclosurePanelProps;\n\n/** Coordinates single or multiple item expansion. */\nexport function Root({\n className,\n defaultValue,\n disabled = false,\n multiple = false,\n onChange,\n readOnly: _readOnly,\n ref,\n value,\n ...props\n}: Readonly<AccordionRootProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaDisclosureGroup, {\n ...props,\n allowsMultipleExpanded: multiple,\n className: accordionRoot({ class: className }),\n defaultExpandedKeys: defaultValue,\n expandedKeys: value,\n isDisabled: disabled,\n onExpandedChange: (keys: Set<CollectionKey>) => onChange?.([...keys]),\n ref: useForwardedRef(ref),\n });\n}\n\n/** Renders one keyed disclosure inside the accordion group. */\nexport function Item({\n className,\n disabled = false,\n id,\n ref,\n ...props\n}: Readonly<AccordionItemProps>): ReactElement {\n return createElement(AriaDisclosure, {\n ...props,\n className: accordionItem({ class: className }),\n id,\n isDisabled: disabled,\n ref: useForwardedRef(ref),\n });\n}\n\n/**\n * Groups coordinated disclosures with single or multiple expansion state.\n *\n * @summary coordinated expandable disclosure group\n */\nexport const Accordion = {\n /** One keyed expandable item. */\n Item,\n /** Collapsible item content. */\n Panel: SharedDisclosurePanel,\n /** Expansion policy and state root. */\n Root,\n /** Item heading button. */\n Trigger: SharedDisclosureTrigger,\n};\n","import type {\n ComponentPropsWithRef,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst alert = tv({\n base: 'flex min-w-0 items-center gap-3 border px-4 py-3 font-[family-name:var(--breeze-font-body)] text-base leading-[1.4] forced-colors:border-[CanvasText]',\n defaultVariants: {\n variant: 'info',\n },\n variants: {\n variant: {\n danger:\n 'border-[var(--breeze-danger)] bg-[var(--breeze-danger-soft)] text-[var(--breeze-ink)]',\n dark: 'border-[var(--breeze-shell)] bg-[var(--breeze-shell)] text-white',\n info: 'border-[var(--breeze-info-border)] bg-[var(--breeze-info-soft)] text-[var(--breeze-info-ink)]',\n light:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n primary:\n 'border-[var(--breeze-primary)] bg-[var(--breeze-primary-soft)] text-[var(--breeze-ink)]',\n secondary:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink)]',\n success:\n 'border-[var(--breeze-success)] bg-[var(--breeze-success-soft)] text-[var(--breeze-ink)]',\n warning:\n 'border-[var(--breeze-warning)] bg-[var(--breeze-warning-soft)] text-[var(--breeze-ink)]',\n },\n },\n});\n\n/** Announcement urgency supported by persistent alerts. */\nexport type AlertAnnouncement = 'assertive' | 'polite' | 'off';\n\n/** Props for a persistent live-region alert. */\nexport interface AlertProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'style'> {\n /** Announcement urgency. Defaults to `assertive`; use `off` for content already present when the page loads. */\n announcement?: AlertAnnouncement;\n /** Application-owned translated alert content. */\n children: ReactNode;\n /** Ref to the rendered alert element. */\n ref?: Ref<HTMLDivElement>;\n /** Breeze semantic colour. Defaults to `info`. */\n variant?: VisualVariant;\n}\n\nfunction getAlertRole(\n announcement: AlertAnnouncement,\n): 'alert' | 'status' | undefined {\n if (announcement === 'assertive') {\n return 'alert';\n }\n\n if (announcement === 'polite') {\n return 'status';\n }\n\n return undefined;\n}\n\n/**\n * Displays persistent inline application feedback with explicit announcement\n * urgency.\n *\n * @summary persistent inline feedback with explicit announcement urgency\n */\nexport function Alert({\n announcement = 'assertive',\n className,\n ref,\n variant = 'info',\n ...props\n}: Readonly<AlertProps>): ReactElement {\n useBreezeContext();\n\n const alertProps: ComponentPropsWithRef<'div'> & {\n 'data-variant': VisualVariant;\n } = {\n ...props,\n 'aria-atomic': announcement === 'off' ? undefined : 'true',\n 'aria-live': announcement,\n className: alert({ class: className, variant }),\n 'data-variant': variant,\n ref: useForwardedRef(ref),\n role: getAlertRole(announcement),\n };\n\n return createElement('div', alertProps);\n}\n","import type { HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n VisualAppearance,\n VisualVariant,\n} from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst badge = tv({\n base: 'inline-flex min-h-6 items-center gap-1 rounded-full border px-2 py-0.5 font-[family-name:var(--breeze-font-display)] text-xs font-bold leading-none',\n compoundVariants: [\n { appearance: 'solid', class: 'text-white', variant: 'primary' },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-primary)]',\n variant: 'primary',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-danger)] text-white',\n variant: 'danger',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-success)] text-white',\n variant: 'success',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-warning)] text-white',\n variant: 'warning',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-info)] text-white',\n variant: 'info',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-shell)] text-white',\n variant: 'dark',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-surface)]',\n variant: 'light',\n },\n {\n appearance: 'solid',\n class: 'bg-[var(--breeze-ink-soft)] text-white',\n variant: 'secondary',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-primary-soft)]',\n variant: 'primary',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-danger-soft)]',\n variant: 'danger',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-success-soft)]',\n variant: 'success',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-warning-soft)]',\n variant: 'warning',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-info-soft)]',\n variant: 'info',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-shell-soft)] text-white',\n variant: 'dark',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-surface)]',\n variant: 'light',\n },\n {\n appearance: 'subtle',\n class: 'bg-[var(--breeze-surface-subtle)]',\n variant: 'secondary',\n },\n ],\n defaultVariants: {\n appearance: 'subtle',\n variant: 'secondary',\n },\n variants: {\n appearance: {\n ghost: 'border-transparent bg-transparent',\n outline: 'bg-transparent',\n solid: '',\n subtle: '',\n },\n variant: {\n danger: 'border-[var(--breeze-danger)] text-[var(--breeze-danger)]',\n dark: 'border-[var(--breeze-shell)] text-[var(--breeze-shell)]',\n info: 'border-[var(--breeze-info)] text-[var(--breeze-info)]',\n light: 'border-[var(--breeze-border)] text-[var(--breeze-ink-soft)]',\n primary: 'border-[var(--breeze-primary)] text-[var(--breeze-primary)]',\n secondary:\n 'border-[var(--breeze-border-strong)] text-[var(--breeze-ink-soft)]',\n success: 'border-[var(--breeze-success)] text-[var(--breeze-success)]',\n warning: 'border-[var(--breeze-warning)] text-[var(--breeze-warning)]',\n },\n },\n});\n\n/** Props for a compact status or classification label. */\nexport interface BadgeProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Visual emphasis treatment. Defaults to `subtle`. */\n appearance?: VisualAppearance;\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Semantic colour. Defaults to `secondary`. */\n variant?: VisualVariant;\n}\n\n/**\n * Renders a non-interactive status or classification label.\n *\n * @summary non-interactive status or classification label\n */\nexport function Badge({\n appearance,\n className,\n ref,\n variant,\n ...props\n}: Readonly<BadgeProps>) {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n className: badge({\n appearance,\n class: className,\n variant,\n }),\n ref: forwardedRef,\n });\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport {\n Breadcrumb as AriaBreadcrumb,\n Breadcrumbs as AriaBreadcrumbs,\n} from 'react-aria-components/Breadcrumbs';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { CollectionKey } from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { Link } from '../Link/Link';\n\nconst breadcrumbsRoot = tv({\n base: 'flex min-w-0 flex-wrap items-center gap-2',\n});\nconst breadcrumbItem = tv({\n base: 'flex min-w-0 items-center gap-2 text-sm text-[var(--breeze-ink-muted)] after:content-[\"/\"] last:text-[var(--breeze-ink)] last:after:hidden',\n});\n\n/** Props for the ordered breadcrumb trail. */\nexport interface BreadcrumbsRootProps\n extends Omit<HTMLAttributes<HTMLOListElement>, 'style'> {\n /** Ordered hierarchy ending with the current location. */\n children: ReactNode;\n /** Disables every navigable crumb. Defaults to `false`. */\n disabled?: boolean;\n /** Ref to the rendered ordered list. */\n ref?: Ref<HTMLOListElement>;\n}\n\n/** Props for one location in a breadcrumb hierarchy. */\nexport interface BreadcrumbsItemProps\n extends Omit<HTMLAttributes<HTMLLIElement>, 'id' | 'style'> {\n /** Visible location label. */\n children: ReactNode;\n /** Prevents navigation for this crumb. Defaults to `false`. */\n disabled?: boolean;\n /** Destination URL. Omit for the current location. */\n href?: string;\n /** Stable string or number crumb key. */\n id: CollectionKey;\n /** Ref to the rendered list item. */\n ref?: Ref<HTMLLIElement>;\n}\n\n/** Renders the semantic ordered trail and supplies current-item semantics. */\nexport function Root({\n className,\n disabled = false,\n ref,\n ...props\n}: Readonly<BreadcrumbsRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaBreadcrumbs, {\n ...props,\n className: breadcrumbsRoot({ class: className }),\n isDisabled: disabled,\n ref: forwardedRef,\n });\n}\n\n/** Renders one navigable or current breadcrumb. */\nexport function Item({\n children,\n className,\n disabled = false,\n href,\n id,\n ref,\n ...props\n}: Readonly<BreadcrumbsItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaBreadcrumb,\n {\n ...props,\n className: breadcrumbItem({ class: className }),\n id,\n ref: forwardedRef,\n },\n href === undefined ? (\n <span aria-current=\"page\">{children}</span>\n ) : (\n <Link disabled={disabled} href={href} variant=\"muted\">\n {children}\n </Link>\n ),\n );\n}\n\n/**\n * Renders an ordered navigation hierarchy with current-location semantics.\n *\n * @summary ordered hierarchy navigation with current-location semantics\n */\nexport const Breadcrumbs = {\n /** One keyed location in the hierarchy. */\n Item,\n /** Ordered breadcrumb trail root. */\n Root,\n};\n","import {\n type CalendarDate,\n parseAbsolute,\n parseDate,\n parseTime,\n type Time,\n type ZonedDateTime,\n} from '@internationalized/date';\nimport type { DateRangeValue } from '../types/date';\n\nconst EXPLICIT_OFFSET = /(?:Z|[+-]\\d{2}:\\d{2})$/;\n\nconst pad = (value: number): string => String(value).padStart(2, '0');\n\n/** Internal parsed date range used only at the React Aria boundary. */\nexport interface InternalDateRange {\n start: CalendarDate;\n end: CalendarDate;\n}\n\nexport function parseDateValue(value: string | null): CalendarDate | null {\n return value === null ? null : parseDate(value);\n}\n\nexport function formatDateValue(value: CalendarDate | null): string | null {\n return value?.toString() ?? null;\n}\n\nexport function parseTimeValue(value: string | null): Time | null {\n return value === null ? null : parseTime(value);\n}\n\nexport function formatTimeValue(value: Time | null): string | null {\n if (value === null) {\n return null;\n }\n\n const base = `${pad(value.hour)}:${pad(value.minute)}`;\n\n return value.second === 0 ? base : `${base}:${pad(value.second)}`;\n}\n\nexport function parseDateRangeValue(\n value: DateRangeValue | null,\n): InternalDateRange | null {\n return value === null\n ? null\n : {\n end: parseDate(value.end),\n start: parseDate(value.start),\n };\n}\n\nexport function formatDateRangeValue(\n value: InternalDateRange | null,\n): DateRangeValue | null {\n return value === null\n ? null\n : {\n end: value.end.toString(),\n start: value.start.toString(),\n };\n}\n\nexport function parseDateTimeValue(\n value: string | null,\n timeZone: string,\n): ZonedDateTime | null {\n if (value === null) {\n return null;\n }\n\n if (!EXPLICIT_OFFSET.test(value)) {\n throw new Error(\n 'DateTimePicker values require an explicit ISO 8601 offset.',\n );\n }\n\n return parseAbsolute(value, timeZone);\n}\n\nexport function formatDateTimeValue(\n value: ZonedDateTime | null,\n): string | null {\n if (value === null) {\n return null;\n }\n\n const offsetMinutes = value.offset / 60_000;\n const sign = offsetMinutes < 0 ? '-' : '+';\n const absoluteOffset = Math.abs(offsetMinutes);\n const offset = `${sign}${pad(Math.floor(absoluteOffset / 60))}:${pad(\n absoluteOffset % 60,\n )}`;\n\n return `${value.year}-${pad(value.month)}-${pad(value.day)}T${pad(\n value.hour,\n )}:${pad(value.minute)}:${pad(value.second)}${offset}`;\n}\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n TableHTMLAttributes,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n Button as AriaButton,\n CalendarCell as AriaCalendarCell,\n CalendarGrid as AriaCalendarGrid,\n CalendarGridBody as AriaCalendarGridBody,\n CalendarGridHeader as AriaCalendarGridHeader,\n CalendarHeaderCell as AriaCalendarHeaderCell,\n CalendarHeading as AriaCalendarHeading,\n} from 'react-aria-components/Calendar';\nimport { tv } from 'tailwind-variants';\nimport { ArrowLeftIcon, ArrowRightIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\n\nconst headerStyle = tv({\n base: 'grid h-11 w-full grid-cols-[2.75rem_minmax(0,1fr)_2.75rem] items-center bg-[var(--breeze-shell-soft)] text-white',\n});\nconst buttonStyle = tv({\n base: 'grid size-11 place-items-center justify-self-center border-0 bg-transparent p-0 text-white outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] data-[hovered]:bg-white/10',\n});\nconst headingStyle = tv({\n base: 'text-center font-[family-name:var(--breeze-font-display)] text-base font-bold',\n});\nconst gridStyle = tv({\n base: \"w-full table-fixed border-separate border-spacing-0 [&_tbody]:before:table-row [&_tbody]:before:h-1 [&_tbody]:before:content-[''] [&_th]:h-9 [&_th]:text-center [&_th]:font-[family-name:var(--breeze-font-display)] [&_th]:text-base [&_th]:font-bold [&_th]:text-[var(--breeze-ink-muted)]\",\n});\nconst cellStyle = tv({\n base: 'grid h-11 w-full place-items-center text-center font-[family-name:var(--breeze-font-body)] text-base font-normal outline-none data-[focused]:outline-2 data-[focused]:outline-offset-[-2px] data-[focused]:outline-[var(--breeze-focus)] data-[hovered]:bg-[var(--breeze-primary-soft)] data-[selected]:bg-[var(--breeze-primary)] data-[selected]:font-bold data-[selected]:text-white data-[disabled]:opacity-40 data-[outside-month]:invisible data-[unavailable]:line-through',\n});\n\n/** Props for a calendar navigation header. */\nexport interface CalendarHeaderPartProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Navigation buttons and visible month heading. */ children?: ReactNode;\n /** Ref to the rendered header. */ ref?: Ref<HTMLDivElement>;\n}\n/** Props for a calendar navigation button. */\nexport interface CalendarButtonPartProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'style'> {\n /** Visible button content. Defaults to the directional Breeze arrow icon. */ children?: ReactNode;\n /** Ref to the rendered navigation button. */ ref?: Ref<HTMLButtonElement>;\n}\n/** Props for the locale-formatted calendar heading. */\nexport interface CalendarHeadingPartProps\n extends Omit<HTMLAttributes<HTMLHeadingElement>, 'children' | 'style'> {\n /** Ref to the rendered heading. */ ref?: Ref<HTMLHeadingElement>;\n}\n/** Props for a Breeze-owned calendar grid. */\nexport interface CalendarGridPartProps\n extends Omit<TableHTMLAttributes<HTMLTableElement>, 'children' | 'style'> {\n /** Ref to the rendered calendar table. */ ref?: Ref<HTMLTableElement>;\n /** Locale weekday label width. Defaults to `short`. */ weekdayStyle?:\n | 'long'\n | 'narrow'\n | 'short';\n}\n\nexport function CalendarHeaderPart({\n className,\n ref,\n ...props\n}: Readonly<CalendarHeaderPartProps>): ReactElement {\n return createElement('div', {\n ...props,\n className: headerStyle({ class: className }),\n ref: useForwardedRef(ref),\n });\n}\nexport function CalendarPreviousButtonPart({\n 'aria-label': ariaLabel,\n children,\n className,\n ref,\n ...props\n}: Readonly<CalendarButtonPartProps>): ReactElement {\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-label': ariaLabel,\n className: buttonStyle({ class: className }),\n ref: useForwardedRef(ref),\n slot: 'previous',\n } as unknown as ComponentProps<typeof AriaButton>,\n children === undefined\n ? createElement(ArrowLeftIcon, {\n className: 'rtl:rotate-180',\n size: '1.25rem',\n })\n : children,\n );\n}\nexport function CalendarNextButtonPart({\n 'aria-label': ariaLabel,\n children,\n className,\n ref,\n ...props\n}: Readonly<CalendarButtonPartProps>): ReactElement {\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-label': ariaLabel,\n className: buttonStyle({ class: className }),\n ref: useForwardedRef(ref),\n slot: 'next',\n } as unknown as ComponentProps<typeof AriaButton>,\n children === undefined\n ? createElement(ArrowRightIcon, {\n className: 'rtl:rotate-180',\n size: '1.25rem',\n })\n : children,\n );\n}\n\nfunction renderWeekday(day: string): ReactElement {\n return createElement(AriaCalendarHeaderCell, null, day);\n}\n\nfunction renderCalendarDate(date: CalendarDate): ReactElement {\n return createElement(AriaCalendarCell, {\n className: cellStyle(),\n date,\n });\n}\nexport function CalendarHeadingPart({\n className,\n ref,\n ...props\n}: Readonly<CalendarHeadingPartProps>): ReactElement {\n return createElement(AriaCalendarHeading, {\n ...props,\n className: headingStyle({ class: className }),\n ref: useForwardedRef(ref),\n });\n}\nexport function CalendarGridPart({\n className,\n ref,\n weekdayStyle = 'short',\n ...props\n}: Readonly<CalendarGridPartProps>): ReactElement {\n return createElement(\n AriaCalendarGrid,\n {\n ...props,\n className: gridStyle({ class: className }),\n ref: useForwardedRef(ref),\n weekdayStyle,\n },\n createElement(\n AriaCalendarGridHeader,\n null,\n renderWeekday as unknown as ReactNode,\n ),\n createElement(\n AriaCalendarGridBody,\n null,\n renderCalendarDate as unknown as ReactNode,\n ),\n );\n}\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Calendar as AriaCalendar } from 'react-aria-components/Calendar';\nimport { tv } from 'tailwind-variants';\nimport {\n formatDateValue,\n parseDateValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n type CalendarButtonPartProps,\n CalendarGridPart,\n type CalendarGridPartProps,\n CalendarHeaderPart,\n type CalendarHeaderPartProps,\n CalendarHeadingPart,\n type CalendarHeadingPartProps,\n CalendarNextButtonPart,\n CalendarPreviousButtonPart,\n} from '../date/CalendarParts';\n\nconst rootStyle = tv({\n base: 'inline-flex w-full flex-col gap-3',\n});\ninterface SharedProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'style'\n > {\n /** Calendar navigation, heading, grid, and guidance. */ children: ReactNode;\n /** Prevents focus and selection. */ disabled?: boolean;\n /** Exposes invalid selection state. */ invalid?: boolean;\n /** Returns whether a stable date is unavailable. */ isDateUnavailable?: (\n date: string,\n ) => boolean;\n /** Latest selectable date. */ maxValue?: string;\n /** Earliest selectable date. */ minValue?: string;\n /** Ref to the rendered calendar root. */ ref?: Ref<HTMLDivElement>;\n /** Number of visible months. Defaults to `1`. */ visibleMonths?: number;\n}\ntype State =\n | {\n /** Current controlled date, or `null` when empty. */ value:\n | string\n | null;\n /** Called with the next stable date or `null`. */ onChange: (\n value: string | null,\n ) => void;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Mutable controlled calendars cannot be read-only. */ readOnly?: false;\n }\n | {\n /** Current immutable date, or `null` when empty. */ value: string | null;\n /** Prevents selection changes. */ readOnly: true;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Excluded because read-only calendars cannot change. */ onChange?: never;\n }\n | {\n /** Initial uncontrolled date, or `null` when empty. */ defaultValue?:\n | string\n | null;\n /** Called with the next stable date or `null`. */ onChange?: (\n value: string | null,\n ) => void;\n /** Uncontrolled calendars cannot be read-only. */ readOnly?: false;\n /** Excluded when uncontrolled. */ value?: never;\n };\n/** Props for stable single-date calendar selection. */\nexport type CalendarRootProps = SharedProps & State;\n/** Props for the navigation header. */\nexport type CalendarHeaderProps = CalendarHeaderPartProps;\n/** Props for previous and next buttons. */\nexport type CalendarButtonProps = CalendarButtonPartProps;\n/** Props for the locale-formatted heading. */\nexport type CalendarHeadingProps = CalendarHeadingPartProps;\n/** Props for the calendar grid. */\nexport type CalendarGridProps = CalendarGridPartProps;\n\n/** Coordinates a single-date calendar with locale-aware navigation. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n invalid = false,\n isDateUnavailable,\n maxValue,\n minValue,\n onChange,\n readOnly = false,\n ref,\n value,\n visibleMonths = 1,\n ...props\n}: Readonly<CalendarRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaCalendar, {\n ...props,\n children,\n className: rootStyle({ class: className }),\n defaultValue: parseDateValue(defaultValue ?? null) ?? undefined,\n isDateUnavailable: isDateUnavailable\n ? (date: CalendarDate) => isDateUnavailable(date.toString())\n : undefined,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n maxValue: parseDateValue(maxValue ?? null) ?? undefined,\n minValue: parseDateValue(minValue ?? null) ?? undefined,\n onChange: readOnly\n ? undefined\n : (date: CalendarDate | null) => onChange?.(formatDateValue(date)),\n ref: useForwardedRef(ref),\n value: value === undefined ? undefined : parseDateValue(value),\n visibleDuration: { months: visibleMonths },\n } as unknown as ComponentProps<typeof AriaCalendar>);\n}\n/**\n * Selects one stable ISO date from an accessible locale-aware calendar.\n *\n * @summary locale-aware selection of one ISO date\n */\nexport const Calendar = {\n /** Locale-aware weekday and day grid. */\n Grid: CalendarGridPart,\n /** Navigation header container. */\n Header: CalendarHeaderPart,\n /** Visible month heading. */\n Heading: CalendarHeadingPart,\n /** Next-page navigation. */\n NextButton: CalendarNextButtonPart,\n /** Previous-page navigation. */\n PreviousButton: CalendarPreviousButtonPart,\n /** Stable date state and constraints. */\n Root,\n};\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst cardRoot = tv({\n base: 'min-w-0 border border-b-2 border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n});\n\nconst cardHeader = tv({\n base: 'grid gap-1 border-b border-[var(--breeze-border)] px-5 py-4',\n});\n\nconst cardTitle = tv({\n base: 'm-0 font-[family-name:var(--breeze-font-display)] text-xl font-bold leading-tight',\n});\n\nconst cardDescription = tv({\n base: 'm-0 text-sm text-[var(--breeze-ink-muted)]',\n});\n\nconst cardBody = tv({ base: 'min-w-0 px-5 py-4' });\n\nconst cardFooter = tv({\n base: 'flex min-h-11 flex-wrap items-center gap-3 border-t border-[var(--breeze-border)] px-5 py-3',\n});\n\n/** Props for the semantic card container. */\nexport interface CardRootProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Ref to the rendered article element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Props for the card heading region. */\nexport interface CardHeaderProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Ref to the rendered header element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Props for the card title. */\nexport interface CardTitleProps\n extends Omit<HTMLAttributes<HTMLHeadingElement>, 'style'> {\n /** Ref to the rendered level-three heading. */\n ref?: Ref<HTMLHeadingElement>;\n}\n\n/** Props for supporting card title context. */\nexport interface CardDescriptionProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'style'> {\n /** Ref to the rendered paragraph element. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Props for the card's primary content region. */\nexport interface CardBodyProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Ref to the rendered body element. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for the card's supporting action or metadata region. */\nexport interface CardFooterProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Ref to the rendered footer element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Renders the semantic article that contains one domain-neutral summary. */\nexport function Root({\n className,\n ref,\n ...props\n}: Readonly<CardRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('article', {\n ...props,\n className: cardRoot({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Groups a card title and its optional description or controls. */\nexport function Header({\n className,\n ref,\n ...props\n}: Readonly<CardHeaderProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('header', {\n ...props,\n className: cardHeader({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the canonical level-three card heading. */\nexport function Title({\n className,\n ref,\n ...props\n}: Readonly<CardTitleProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('h3', {\n ...props,\n className: cardTitle({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders supporting context directly associated with a card title. */\nexport function Description({\n className,\n ref,\n ...props\n}: Readonly<CardDescriptionProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('p', {\n ...props,\n className: cardDescription({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the primary card content region. */\nexport function Body({\n className,\n ref,\n ...props\n}: Readonly<CardBodyProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('div', {\n ...props,\n className: cardBody({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders a supporting action or metadata footer. */\nexport function Footer({\n className,\n ref,\n ...props\n}: Readonly<CardFooterProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('footer', {\n ...props,\n className: cardFooter({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/**\n * Groups one related content summary in a domain-neutral compound surface.\n *\n * @summary compound surface for one related content summary\n */\nexport const Card = {\n /** Primary content region. */\n Body,\n /** Supporting title context. */\n Description,\n /** Supporting action or metadata region. */\n Footer,\n /** Title and description region. */\n Header,\n /** Semantic article container. */\n Root,\n /** Canonical level-three card heading. */\n Title,\n};\n","import { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport type { LayoutElementProps } from '../../internal/styling/layout';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst center = tv({\n base: 'grid place-items-center',\n defaultVariants: {\n minHeight: 'none',\n },\n variants: {\n minHeight: {\n none: '',\n screen: 'min-h-screen',\n },\n },\n});\n\n/** Props for a layout that centres one composition in both axes. */\nexport interface CenterProps extends LayoutElementProps {\n /** Minimum block size. Defaults to `none`; `screen` fills the viewport. */\n minHeight?: 'none' | 'screen';\n}\n\n/**\n * Centres content horizontally and vertically without imposing presentation.\n *\n * @summary two-axis layout centring with optional viewport height\n */\nexport function Center({\n className,\n minHeight,\n ...props\n}: Readonly<CenterProps>) {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: center({\n class: className,\n minHeight,\n }),\n });\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n LabelHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport { createElement, useRef } from 'react';\nimport {\n CheckboxButton as AriaCheckboxButton,\n CheckboxField as AriaCheckboxField,\n} from 'react-aria-components/Checkbox';\nimport { tv } from 'tailwind-variants';\nimport { CheckIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n} from '../TextField/TextField';\n\nconst checkboxRoot = tv({\n base: 'flex min-w-0 flex-col gap-1',\n});\n\nconst checkboxControl = tv({\n base: 'group inline-flex min-h-11 w-fit cursor-pointer items-center gap-2 font-[family-name:var(--breeze-font-display)] text-sm font-bold text-[var(--breeze-ink)] data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55',\n});\n\nconst checkboxIndicator = tv({\n base: 'inline-flex shrink-0 items-center justify-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-white transition-colors duration-[var(--breeze-duration-fast)] group-data-[indeterminate]:border-[var(--breeze-primary)] group-data-[indeterminate]:bg-[var(--breeze-primary)] group-data-[selected]:border-[var(--breeze-primary)] group-data-[selected]:bg-[var(--breeze-primary)] [&>svg]:opacity-0 group-data-[indeterminate]:[&>svg]:opacity-100 group-data-[selected]:[&>svg]:opacity-100',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-6 text-base',\n md: 'size-5 text-sm',\n sm: 'size-4 text-xs',\n },\n },\n});\n\ntype CheckboxRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface CheckboxRootSharedProps extends CheckboxRootNativeProps {\n /** Compound control, description, and error parts. */\n children: ReactNode;\n /** Prevents focus and selection changes. Defaults to `false`. */\n disabled?: boolean;\n /** Associates the hidden native checkbox with an external form. */\n form?: string;\n /** Renders a mixed-state checkbox. Defaults to `false`. */\n indeterminate?: boolean;\n /** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Native form field name. */\n name?: string;\n /** Marks the checkbox as required. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered field container. */\n ref?: Ref<HTMLDivElement>;\n /** Ref to the hidden native checkbox used for focus and form integration. */\n inputRef?: RefObject<HTMLInputElement | null>;\n /** Native submitted value when selected. Defaults to `on`. */\n value?: string;\n}\n\ninterface ControlledCheckboxRootProps {\n /** Current selected state. */\n selected: boolean;\n /** Called with the next selected state. */\n onChange: (selected: boolean) => void;\n defaultSelected?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyCheckboxRootProps {\n /** Current immutable selected state. */\n selected: boolean;\n /** Marks a controlled selection as intentionally immutable. */\n readOnly: true;\n defaultSelected?: never;\n onChange?: never;\n}\n\ninterface UncontrolledCheckboxRootProps {\n /** Initial selected state. Defaults to `false`. */\n defaultSelected?: boolean;\n /** Called with the next selected state. */\n onChange?: (selected: boolean) => void;\n readOnly?: false;\n selected?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled checkbox state. */\nexport type CheckboxRootProps = CheckboxRootSharedProps &\n (\n | ControlledCheckboxRootProps\n | ReadOnlyCheckboxRootProps\n | UncontrolledCheckboxRootProps\n );\n\n/** Props for the clickable checkbox control and native label. */\nexport interface CheckboxControlProps\n extends Omit<\n LabelHTMLAttributes<HTMLLabelElement>,\n 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Indicator and persistent label content. */\n children: ReactNode;\n /** Ref to the rendered native label. */\n ref?: Ref<HTMLLabelElement>;\n}\n\n/** Props for the visual checkbox indicator. */\nexport interface CheckboxIndicatorProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Ref to the rendered indicator. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical indicator size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for the visible checkbox label text. */\nexport interface CheckboxLabelProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Persistent text naming the checkbox. */\n children: ReactNode;\n /** Ref to the rendered label text. */\n ref?: Ref<HTMLSpanElement>;\n}\n\n/** Props for supporting text associated with the checkbox. */\nexport type CheckboxDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible checkbox validation message. */\nexport type CheckboxErrorProps = TextFieldErrorProps;\n\n/** Coordinates accessible checkbox state, validation, and native form participation. */\nexport function Root({\n children,\n className,\n defaultSelected,\n disabled = false,\n form,\n indeterminate = false,\n inputRef,\n invalid = false,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n selected,\n value,\n ...props\n}: Readonly<CheckboxRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const fallbackInputRef = useRef<HTMLInputElement>(null);\n\n return createElement(\n AriaCheckboxField,\n {\n ...props,\n className: checkboxRoot({ class: className }),\n defaultSelected,\n form,\n inputRef: inputRef ?? fallbackInputRef,\n isDisabled: disabled,\n isIndeterminate: indeterminate,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n isSelected: selected,\n name,\n onChange,\n ref: forwardedRef,\n value,\n } as ComponentProps<typeof AriaCheckboxField>,\n children,\n );\n}\n\n/** Renders the pointer, touch, and keyboard checkbox target. */\nexport function Control({\n className,\n ref,\n ...props\n}: Readonly<CheckboxControlProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaCheckboxButton, {\n ...props,\n className: checkboxControl({ class: className }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaCheckboxButton>);\n}\n\n/** Renders the selected or indeterminate visual checkbox mark. */\nexport function Indicator({\n className,\n ref,\n size,\n ...props\n}: Readonly<CheckboxIndicatorProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n 'aria-hidden': true,\n className: checkboxIndicator({ class: className, size }),\n ref: forwardedRef,\n },\n <CheckIcon />,\n );\n}\n\n/** Renders persistent visible label text within Checkbox.Control. */\nexport function Label({\n ref,\n ...props\n}: Readonly<CheckboxLabelProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n ref: forwardedRef,\n });\n}\n\n/**\n * Coordinates accessible Boolean selection with native form participation.\n *\n * @summary Boolean selection with native form participation\n */\nexport const Checkbox = {\n /** Pointer, touch, and keyboard selection target. */\n Control,\n /** Supporting guidance associated with the checkbox. */\n Description: TextField.Description,\n /** Validation message associated with an invalid checkbox. */\n Error: TextField.Error,\n /** Visual selected or indeterminate mark. */\n Indicator,\n /** Persistent visible label text. */\n Label,\n /** State, validation, and native form root. */\n Root,\n};\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { CheckboxGroup as AriaCheckboxGroup } from 'react-aria-components/CheckboxGroup';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst checkboxGroupRoot = tv({\n base: 'flex min-w-0 gap-2',\n defaultVariants: {\n orientation: 'vertical',\n },\n variants: {\n orientation: {\n horizontal:\n 'flex-row flex-wrap items-start gap-x-5 [&>[data-breeze-checkbox-group-description]]:basis-full [&>[data-breeze-checkbox-group-error]]:basis-full [&>[data-breeze-checkbox-group-label]]:basis-full',\n vertical: 'flex-col items-start',\n },\n },\n});\n\ntype CheckboxGroupRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface CheckboxGroupRootSharedProps extends CheckboxGroupRootNativeProps {\n /** Compound label, checkboxes, description, and error parts. */\n children: ReactNode;\n /** Prevents focus and selection changes for every checkbox. Defaults to `false`. */\n disabled?: boolean;\n /** Exposes invalid group state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Native form field name shared by grouped checkboxes. */\n name?: string;\n /** Visual option layout. Defaults to `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n /** Marks the group as requiring at least one selection. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledCheckboxGroupRootProps {\n /** Current selected checkbox values. */\n selection: string[];\n /** Called with the next selected checkbox values. */\n onSelectionChange: (selection: string[]) => void;\n defaultSelection?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyCheckboxGroupRootProps {\n /** Current immutable selected checkbox values. */\n selection: string[];\n /** Marks a controlled selection as intentionally immutable. */\n readOnly: true;\n defaultSelection?: never;\n onSelectionChange?: never;\n}\n\ninterface UncontrolledCheckboxGroupRootProps {\n /** Initial selected checkbox values. Defaults to an empty selection. */\n defaultSelection?: string[];\n /** Called with the next selected checkbox values. */\n onSelectionChange?: (selection: string[]) => void;\n readOnly?: false;\n selection?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled checkbox-group selection. */\nexport type CheckboxGroupRootProps = CheckboxGroupRootSharedProps &\n (\n | ControlledCheckboxGroupRootProps\n | ReadOnlyCheckboxGroupRootProps\n | UncontrolledCheckboxGroupRootProps\n );\n\n/** Props for the visible checkbox-group label. */\nexport type CheckboxGroupLabelProps = TextFieldLabelProps;\n\n/** Props for supporting text associated with the checkbox group. */\nexport type CheckboxGroupDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible checkbox-group validation message. */\nexport type CheckboxGroupErrorProps = TextFieldErrorProps;\n\n/** Coordinates multiple checkbox selection, validation, layout, and form naming. */\nexport function Root({\n children,\n className,\n defaultSelection,\n disabled = false,\n invalid = false,\n name,\n onSelectionChange,\n orientation,\n readOnly = false,\n ref,\n required = false,\n selection,\n ...props\n}: Readonly<CheckboxGroupRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaCheckboxGroup,\n {\n ...props,\n className: checkboxGroupRoot({ class: className, orientation }),\n defaultValue: defaultSelection,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n name,\n onChange: onSelectionChange,\n ref: forwardedRef,\n value: selection,\n } as ComponentProps<typeof AriaCheckboxGroup>,\n children,\n );\n}\n\n/** Renders the persistent accessible label owned by the checkbox group. */\nexport function Label(props: Readonly<CheckboxGroupLabelProps>): ReactElement {\n return createElement(TextField.Label, {\n ...props,\n 'data-breeze-checkbox-group-label': true,\n } as CheckboxGroupLabelProps & {\n 'data-breeze-checkbox-group-label': true;\n });\n}\n\n/** Renders supporting guidance on its own checkbox-group row. */\nexport function Description(\n props: Readonly<CheckboxGroupDescriptionProps>,\n): ReactElement {\n return createElement(TextField.Description, {\n ...props,\n 'data-breeze-checkbox-group-description': true,\n } as CheckboxGroupDescriptionProps & {\n 'data-breeze-checkbox-group-description': true;\n });\n}\n\n/** Renders associated validation feedback on its own checkbox-group row. */\nfunction ErrorMessage(props: Readonly<CheckboxGroupErrorProps>): ReactElement {\n return createElement(TextField.Error, {\n ...props,\n 'data-breeze-checkbox-group-error': true,\n } as CheckboxGroupErrorProps & {\n 'data-breeze-checkbox-group-error': true;\n });\n}\n\nexport { ErrorMessage as Error };\n\n/**\n * Coordinates labelled multiple selection with native checkbox semantics.\n *\n * @summary labelled multiple selection with native checkbox semantics\n */\nexport const CheckboxGroup = {\n /** Supporting guidance associated with the group. */\n Description,\n /** Validation message associated with an invalid group. */\n Error: ErrorMessage,\n /** Persistent accessible group label. */\n Label,\n /** Selection, validation, layout, and native form root. */\n Root,\n};\n","import { useCallback, useEffect, useRef } from 'react';\n\ninterface LoadMoreHandlerOptions {\n loading: boolean;\n onLoadMore: () => void | Promise<void>;\n}\n\nexport default function useLoadMoreHandler({\n loading,\n onLoadMore,\n}: LoadMoreHandlerOptions): () => void {\n const activeRequestRef = useRef(false);\n const loadingRef = useRef(loading);\n\n useEffect(() => {\n loadingRef.current = loading;\n\n if (!loading) {\n activeRequestRef.current = false;\n }\n }, [loading]);\n\n return useCallback(() => {\n if (loadingRef.current || activeRequestRef.current) {\n return;\n }\n\n activeRequestRef.current = true;\n\n const result = onLoadMore();\n\n if (result instanceof Promise) {\n const clearActiveRequest = () => {\n if (!loadingRef.current) {\n activeRequestRef.current = false;\n }\n };\n\n result.then(clearActiveRequest, clearActiveRequest);\n\n return;\n }\n\n queueMicrotask(() => {\n if (!loadingRef.current) {\n activeRequestRef.current = false;\n }\n });\n }, [onLoadMore]);\n}\n","/** Media query used by Breeze's compact variants below the small breakpoint. */\nexport const breezeSmallBreakpointQuery = '(width < 42.5625rem)';\n\n/** Returns whether the viewport currently matches Breeze's compact range. */\nexport default function isBreezeSmallViewport(\n view: Pick<Window, 'matchMedia'>,\n): boolean {\n return (\n typeof view.matchMedia === 'function' &&\n view.matchMedia(breezeSmallBreakpointQuery).matches\n );\n}\n","import type { CollectionKey } from '../types/collection';\n\n/** Encodes collection keys for collision-safe DOM metadata. */\nexport default function encodeCollectionKey(key: CollectionKey): string {\n return `${typeof key}:${key}`;\n}\n\n/** Encodes an iterable while treating a bare string as one collection key. */\nexport function encodeCollectionKeys(\n keys: CollectionKey | Iterable<CollectionKey>,\n): ReadonlySet<string> {\n const values =\n typeof keys === 'string' || typeof keys === 'number' ? [keys] : keys;\n\n return new Set(Array.from(values, encodeCollectionKey));\n}\n","import type {\n ComponentProps,\n CSSProperties,\n ReactElement,\n ReactNode,\n} from 'react';\nimport { createElement, useMemo } from 'react';\nimport {\n GridLayout,\n ListLayout,\n Rect,\n Size,\n TableLayout,\n Virtualizer as AriaVirtualizer,\n} from 'react-aria-components/Virtualizer';\nimport isBreezeSmallViewport from '../styling/breakpoints';\nimport type {\n CollectionKey,\n CollectionVirtualization,\n} from '../types/collection';\nimport encodeCollectionKey from './collectionKey';\n\nconst compactTableCellGap = 8;\nconst compactTableMeasurementAllowance = 1;\nconst compactTableRowBorder = 1;\nconst compactTableRowPadding = 34;\nconst emptyCompactHiddenColumns: ReadonlySet<string> = new Set();\n\nfunction tableLayoutColumnKey(node: unknown): string | undefined {\n const key = (node as { column?: { key?: CollectionKey } } | undefined)?.column\n ?.key;\n\n return key === undefined ? undefined : encodeCollectionKey(key);\n}\n\ninterface VirtualizedCollectionProps {\n children?: ReactNode;\n compactHiddenColumns?: ReadonlySet<string>;\n configuration: CollectionVirtualization;\n kind: 'grid' | 'list' | 'table';\n direction?: 'ltr' | 'rtl';\n maximumColumns?: number;\n minimumItemWidth?: number;\n orientation?: 'horizontal' | 'vertical';\n}\n\ninterface LayoutOptions {\n estimatedHeadingSize?: number;\n estimatedRowSize?: number;\n gap?: number;\n headingSize?: number;\n loaderSize?: number;\n orientation?: 'horizontal' | 'vertical';\n rowSize?: number;\n}\n\ninterface TableOptions {\n estimatedHeadingHeight?: number;\n estimatedRowHeight?: number;\n gap?: number;\n headingHeight?: number;\n loaderHeight?: number;\n rowHeight?: number;\n}\n\ninterface GridOptions {\n direction?: 'ltr' | 'rtl';\n loaderHeight?: number;\n maxColumns?: number;\n minItemSize?: Size;\n minSpace?: Size;\n preserveAspectRatio?: boolean;\n}\n\nfunction overscanRect(rect: Rect, amount: number): Rect {\n const expandedRect = rect.copy();\n\n expandedRect.x = Math.max(0, expandedRect.x - amount);\n expandedRect.y = Math.max(0, expandedRect.y - amount);\n expandedRect.width += amount * 2;\n expandedRect.height += amount * 2;\n\n return expandedRect;\n}\n\nclass BreezeListLayout extends ListLayout<unknown, LayoutOptions> {\n readonly #overscan: number;\n\n constructor(options: LayoutOptions, overscan: number) {\n super(options);\n this.#overscan = overscan;\n }\n\n override getVisibleLayoutInfos(rect: Rect) {\n return super.getVisibleLayoutInfos(overscanRect(rect, this.#overscan));\n }\n}\n\nclass BreezeTableLayout extends TableLayout<unknown, TableOptions> {\n readonly #compactHiddenColumns: ReadonlySet<string>;\n\n readonly #overscan: number;\n\n readonly #compactCellHeights = new Map<CollectionKey, number>();\n\n constructor(\n options: TableOptions,\n overscan: number,\n compactHiddenColumns: ReadonlySet<string>,\n ) {\n super(options);\n this.#compactHiddenColumns = compactHiddenColumns;\n this.#overscan = overscan;\n }\n\n override getVisibleLayoutInfos(rect: Rect) {\n return super.getVisibleLayoutInfos(overscanRect(rect, this.#overscan));\n }\n\n override updateItemSize(key: CollectionKey, size: Size): boolean {\n const layoutNode = this.layoutNodes.get(key);\n const compact =\n typeof window !== 'undefined' && isBreezeSmallViewport(window);\n\n if (\n !compact ||\n this.rowHeight !== null ||\n layoutNode?.layoutInfo.type !== 'cell' ||\n layoutNode.layoutInfo.parentKey === null\n ) {\n return super.updateItemSize(key, size);\n }\n\n this.#compactCellHeights.set(key, size.height);\n\n const row = this.layoutNodes.get(layoutNode.layoutInfo.parentKey);\n const cells = row?.children ?? [];\n const visibleCells = cells.filter(\n (cell) =>\n !this.#compactHiddenColumns.has(tableLayoutColumnKey(cell.node) ?? ''),\n );\n\n if (visibleCells.length === 0) {\n return super.updateItemSize(key, size);\n }\n\n if (\n this.#compactHiddenColumns.has(\n tableLayoutColumnKey(layoutNode.node) ?? '',\n )\n ) {\n return false;\n }\n\n const measuredHeight = Math.ceil(\n visibleCells.reduce(\n (height, cell) =>\n height +\n (this.#compactCellHeights.get(cell.layoutInfo.key) ?? size.height),\n compactTableRowBorder +\n compactTableMeasurementAllowance +\n compactTableRowPadding +\n compactTableCellGap * (visibleCells.length - 1),\n ),\n );\n\n return cells.reduce(\n (changed, cell) =>\n super.updateItemSize(\n cell.layoutInfo.key,\n new Size(cell.layoutInfo.rect.width, measuredHeight),\n ) || changed,\n false,\n );\n }\n}\n\nclass BreezeGridLayout extends GridLayout<unknown, GridOptions> {\n readonly #overscan: number;\n\n constructor(overscan: number) {\n super();\n this.#overscan = overscan;\n }\n\n override getVisibleLayoutInfos(rect: Rect) {\n return super.getVisibleLayoutInfos(overscanRect(rect, this.#overscan));\n }\n}\n\nfunction rowHeightOptions(configuration: CollectionVirtualization) {\n return configuration.mode === 'fixed'\n ? {\n estimatedRowHeight: undefined,\n rowHeight: configuration.rowHeight,\n }\n : {\n estimatedRowHeight: configuration.estimatedRowHeight ?? 48,\n rowHeight: undefined,\n };\n}\n\nexport function collectionViewportStyle(\n configuration: CollectionVirtualization | undefined,\n): CSSProperties | undefined {\n return configuration === undefined\n ? undefined\n : {\n height: configuration.viewportHeight,\n };\n}\n\nexport default function VirtualizedCollection({\n children,\n compactHiddenColumns = emptyCompactHiddenColumns,\n configuration,\n direction = 'ltr',\n kind,\n maximumColumns,\n minimumItemWidth = 224,\n orientation = 'vertical',\n}: Readonly<VirtualizedCollectionProps>): ReactElement {\n const {\n estimatedSectionHeight,\n gap = 0,\n loadingRowHeight = 48,\n overscan = 0,\n } = configuration;\n const { estimatedRowHeight, rowHeight } = rowHeightOptions(configuration);\n const gridLayoutOptions = useMemo<GridOptions | undefined>(\n () =>\n kind === 'grid'\n ? {\n direction,\n loaderHeight: loadingRowHeight,\n maxColumns: maximumColumns,\n minItemSize: new Size(\n minimumItemWidth,\n rowHeight ?? estimatedRowHeight ?? 48,\n ),\n minSpace: new Size(gap, gap),\n preserveAspectRatio: configuration.mode === 'fixed',\n }\n : undefined,\n [\n configuration.mode,\n direction,\n estimatedRowHeight,\n gap,\n kind,\n loadingRowHeight,\n maximumColumns,\n minimumItemWidth,\n rowHeight,\n ],\n );\n const layout = useMemo(() => {\n if (kind === 'table') {\n return new BreezeTableLayout(\n {\n estimatedHeadingHeight: estimatedSectionHeight,\n estimatedRowHeight,\n gap,\n loaderHeight: loadingRowHeight,\n rowHeight,\n },\n overscan,\n compactHiddenColumns,\n );\n }\n\n if (kind === 'grid') {\n return new BreezeGridLayout(overscan);\n }\n\n return new BreezeListLayout(\n {\n estimatedHeadingSize: estimatedSectionHeight,\n estimatedRowSize: estimatedRowHeight,\n gap,\n loaderSize: loadingRowHeight,\n orientation,\n rowSize: rowHeight,\n },\n overscan,\n );\n }, [\n estimatedRowHeight,\n estimatedSectionHeight,\n gap,\n kind,\n loadingRowHeight,\n compactHiddenColumns,\n orientation,\n overscan,\n rowHeight,\n ]);\n\n const virtualizerProps = {\n children,\n layout,\n layoutOptions: gridLayoutOptions,\n } as unknown as ComponentProps<typeof AriaVirtualizer>;\n\n return createElement(AriaVirtualizer, virtualizerProps);\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useCallback, useLayoutEffect, useRef } from 'react';\nimport {\n ListBox as AriaListBox,\n ListBoxItem as AriaListBoxItem,\n ListBoxLoadMoreItem as AriaListBoxLoadMoreItem,\n} from 'react-aria-components/ListBox';\nimport { tv } from 'tailwind-variants';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useLoadMoreHandler from '../../internal/collections/useLoadMoreHandler';\nimport VirtualizedCollection, {\n collectionViewportStyle,\n} from '../../internal/collections/VirtualizedCollection';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n CollectionSelection,\n CollectionVirtualization,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst listBoxRoot = tv({\n base: 'flex min-w-48 flex-col gap-1 border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-1 outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] aria-invalid:border-[var(--breeze-danger)]',\n defaultVariants: {\n orientation: 'vertical',\n virtualized: false,\n },\n variants: {\n orientation: {\n horizontal: 'flex-row overflow-x-auto',\n vertical: 'max-h-72 overflow-y-auto',\n },\n virtualized: {\n false: '',\n true: 'max-h-none overflow-auto',\n },\n },\n});\n\nconst listBoxItem = tv({\n base: 'flex min-h-10 cursor-default items-center px-3 py-2 text-sm text-[var(--breeze-ink)] outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focused]:bg-[var(--breeze-primary-soft)] data-[selected]:bg-[var(--breeze-primary)] data-[selected]:text-white',\n});\n\nconst listBoxLoadMore = tv({\n base: 'flex min-h-11 items-center justify-center px-3 py-2 text-sm text-[var(--breeze-ink-muted)]',\n});\n\ntype ListBoxRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface ListBoxRootSharedProps extends ListBoxRootNativeProps {\n /** Keys whose items cannot receive focus, selection, or actions. */\n disabledKeys?: Iterable<CollectionKey>;\n /** Content displayed when the collection has no items. */\n emptyContent?: ReactNode;\n /** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Enables multiple selection. Defaults to `false`. */\n multiple?: boolean;\n /** Primary item layout and arrow-key navigation axis. Defaults to `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n /** Marks the listbox as requiring a selection. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered listbox. */\n ref?: Ref<HTMLDivElement>;\n /** Optional fixed- or variable-height windowing configuration. */\n virtualization?: CollectionVirtualization;\n}\n\ninterface ControlledListBoxRootProps {\n /** Current selected keys. */\n selection: CollectionSelection;\n /** Called with the next selected keys. */\n onSelectionChange: (selection: CollectionSelection) => void;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Controlled mutable state cannot be marked read-only. */\n readOnly?: false;\n}\n\ninterface ReadOnlyListBoxRootProps {\n /** Current immutable selected keys. */\n selection: CollectionSelection;\n /** Marks a controlled selection as intentionally immutable. */\n readOnly: true;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n}\n\ninterface UncontrolledListBoxRootProps {\n /** Initial selected keys. Defaults to an empty selection. */\n defaultSelection?: CollectionSelection;\n /** Called with the next selected keys. */\n onSelectionChange?: (selection: CollectionSelection) => void;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n /** Excluded when selection is uncontrolled. */\n selection?: never;\n}\n\n/** Props for a static or generic, controlled, read-only, or uncontrolled listbox. */\nexport type ListBoxRootProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = ListBoxRootSharedProps &\n CollectionContentProps<Item> &\n (\n | ControlledListBoxRootProps\n | ReadOnlyListBoxRootProps\n | UncontrolledListBoxRootProps\n );\n\n/** Props for one selectable listbox option. */\nexport interface ListBoxItemProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Visible option content. */\n children: ReactNode;\n /** Prevents focus, selection, and actions for this option. Defaults to `false`. */\n disabled?: boolean;\n /** Stable string or number option key. */\n id: CollectionKey;\n /** Called with this option key when its action is invoked. */\n onAction?: (key: CollectionKey) => void;\n /** Ref to the rendered option. */\n ref?: Ref<HTMLDivElement>;\n /** Plain-text representation used for typeahead and accessibility. */\n textValue: string;\n}\n\n/** Props for a listbox loading row and load-more sentinel. */\nexport interface ListBoxLoadMoreProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Visible loading-row content. */\n children: ReactNode;\n /** Shows the loading row and suppresses duplicate requests. Defaults to `false`. */\n loading?: boolean;\n /** Called once when more consumer-owned items should be requested. */\n onLoadMore: () => void | Promise<void>;\n /** Trigger distance as a proportion of the scroll viewport. Defaults to `1`. */\n offset?: number;\n /** Ref to the rendered loading row. */\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction normaliseSelection(\n selection: 'all' | Set<CollectionKey>,\n): CollectionSelection {\n return selection === 'all' ? 'all' : [...selection];\n}\n\n/** Coordinates collection rendering, focus, typeahead, and semantic selection. */\nexport function Root<Item extends BreezeCollectionItem>({\n children,\n className,\n defaultSelection,\n disabledKeys,\n emptyContent,\n invalid = false,\n items,\n multiple = false,\n onSelectionChange,\n orientation = 'vertical',\n readOnly = false,\n ref,\n required = false,\n selection,\n virtualization,\n ...props\n}: Readonly<ListBoxRootProps<Item>>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n const elementRef = useRef<HTMLDivElement | null>(null);\n const stableRef = useCallback(\n (element: HTMLDivElement | null) => {\n elementRef.current = element;\n forwardedRef(element);\n },\n [forwardedRef],\n );\n\n useLayoutEffect(() => {\n const element = elementRef.current;\n\n if (element === null) {\n return;\n }\n\n if (invalid) {\n element.setAttribute('aria-invalid', 'true');\n } else {\n element.removeAttribute('aria-invalid');\n }\n\n if (required) {\n element.setAttribute('aria-required', 'true');\n } else {\n element.removeAttribute('aria-required');\n }\n }, [invalid, required]);\n\n const listBox = createElement(AriaListBox, {\n ...props,\n 'aria-readonly': readOnly || undefined,\n children,\n className: listBoxRoot({\n class: className,\n orientation,\n virtualized: virtualization !== undefined,\n }),\n 'data-virtualized': virtualization === undefined ? undefined : 'true',\n defaultSelectedKeys: defaultSelection,\n disabledKeys,\n items,\n onSelectionChange: (nextSelection: 'all' | Set<CollectionKey>) =>\n onSelectionChange?.(normaliseSelection(nextSelection)),\n orientation,\n ref: stableRef,\n renderEmptyState: () => resolvedEmptyContent,\n selectedKeys: selection,\n selectionMode: multiple ? 'multiple' : 'single',\n style: collectionViewportStyle(virtualization),\n } as unknown as ComponentProps<typeof AriaListBox>);\n\n return virtualization === undefined\n ? listBox\n : createElement(\n VirtualizedCollection,\n {\n configuration: virtualization,\n kind: 'list',\n orientation,\n },\n listBox,\n );\n}\n\n/** Renders one keyed option within a Breeze collection. */\nexport function Item({\n className,\n disabled = false,\n id,\n onAction,\n ref,\n textValue,\n ...props\n}: Readonly<ListBoxItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaListBoxItem, {\n ...props,\n className: listBoxItem({ class: className }),\n id,\n isDisabled: disabled,\n onAction: onAction === undefined ? undefined : () => onAction(id),\n ref: forwardedRef,\n textValue,\n });\n}\n\n/** Renders a loading row and deduplicated intersection sentinel. */\nexport function LoadMore({\n className,\n loading = false,\n offset = 1,\n onLoadMore,\n ref,\n ...props\n}: Readonly<ListBoxLoadMoreProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const handleLoadMore = useLoadMoreHandler({ loading, onLoadMore });\n\n return createElement(AriaListBoxLoadMoreItem, {\n ...props,\n className: listBoxLoadMore({ class: className }),\n isLoading: loading,\n onLoadMore: handleLoadMore,\n ref: forwardedRef,\n scrollOffset: offset,\n });\n}\n\n/**\n * Accessible compound collection primitive for selectable options.\n *\n * @summary visible selectable options with optional collection virtualization\n */\nexport const ListBox = {\n /** One keyed selectable option. */\n Item,\n /** Loading row and deduplicated load-more sentinel. */\n LoadMore,\n /** Collection rendering, focus, typeahead, and selection root. */\n Root,\n};\n","import type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n InputHTMLAttributes,\n KeyboardEvent,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createContext, createElement, useContext } from 'react';\nimport {\n Button as AriaButton,\n ComboBox as AriaComboBox,\n type ComboBoxRenderProps,\n Input as AriaInput,\n ListBox as AriaListBox,\n Popover as AriaPopover,\n} from 'react-aria-components/ComboBox';\nimport { Group as AriaGroup } from 'react-aria-components/Group';\nimport { tv } from 'tailwind-variants';\nimport { ChevronDownIcon } from '../../icons';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport formControlValue from '../../internal/styling/formControls';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n ListBox as BreezeListBox,\n type ListBoxItemProps,\n} from '../ListBox/ListBox';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst root = tv({ base: 'flex min-w-0 flex-col gap-1.5' });\nconst input = tv({\n base: 'w-full border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] placeholder:text-[var(--breeze-ink-muted)] data-[hovered]:border-[var(--breeze-primary)] data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] disabled:cursor-not-allowed disabled:bg-[var(--breeze-surface-subtle)] disabled:opacity-70 read-only:cursor-default read-only:bg-[var(--breeze-surface-subtle)] aria-invalid:border-[var(--breeze-danger)]',\n});\nconst group = tv({\n base: \"relative inline-flex w-full min-w-0 items-stretch bg-[var(--breeze-surface)] outline-none after:pointer-events-none after:absolute after:inset-0 after:z-10 after:border after:border-[var(--breeze-border-strong)] after:transition-colors after:duration-[var(--breeze-duration-fast)] after:content-[''] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-solid data-[focus-visible]:outline-[var(--breeze-focus)] data-[focus-within]:after:border-[var(--breeze-primary)] data-[hovered]:after:border-[var(--breeze-primary)] data-[invalid]:after:!border-[var(--breeze-danger)] data-[readonly]:bg-[var(--breeze-surface-subtle)] data-[readonly]:opacity-70\",\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-12',\n md: 'min-h-11',\n sm: 'min-h-8',\n },\n },\n});\nconst groupedInput = tv({\n base: 'min-w-0 w-auto flex-1 border-0 bg-transparent disabled:!bg-transparent disabled:!opacity-100 read-only:!bg-transparent read-only:!opacity-100 data-[focus-visible]:!outline-none aria-invalid:!border-0',\n});\nconst button = tv({\n base: 'inline-flex shrink-0 items-center justify-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink-soft)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] data-[hovered]:border-[var(--breeze-primary)] data-[hovered]:text-[var(--breeze-primary)] disabled:cursor-not-allowed disabled:bg-[var(--breeze-surface-subtle)] disabled:opacity-70',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-12 min-w-12 px-3',\n md: 'min-h-11 min-w-11 px-3',\n sm: 'min-h-8 min-w-8 px-2',\n },\n },\n});\nconst groupedButton = tv({\n base: 'border-0 bg-transparent data-[focus-visible]:!outline-none data-[hovered]:border-0 data-[hovered]:bg-transparent disabled:!bg-transparent disabled:!opacity-100',\n});\nconst popover = tv({\n base: 'min-w-[var(--trigger-width)] border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] shadow-lg',\n});\nconst list = tv({ base: 'max-h-72 overflow-y-auto p-1 outline-none' });\nconst loading = tv({\n base: 'px-3 py-2 text-sm text-[var(--breeze-ink-muted)]',\n});\nconst optionsError = tv({\n base: 'px-3 py-2 text-sm text-[var(--breeze-danger)]',\n});\n\ninterface ComboBoxContextValue {\n onCommit?: (value: string) => void;\n}\n\ninterface ComboBoxCompositionContextValue {\n size: ControlSize;\n}\n\ninterface ComboBoxStateContextValue {\n isDisabled: boolean;\n isInvalid: boolean;\n isReadOnly: boolean;\n}\n\nconst ComboBoxContext = createContext<ComboBoxContextValue | null>(null);\nconst ComboBoxCompositionContext = createContext<\n ComboBoxCompositionContextValue | undefined\n>(undefined);\nconst ComboBoxStateContext = createContext<\n ComboBoxStateContextValue | undefined\n>(undefined);\nconst includeAllOptions = () => true;\n\nfunction renderComboBoxChildren(\n children: ReactNode,\n { isDisabled, isInvalid, isReadOnly }: ComboBoxRenderProps,\n): ReactElement {\n return createElement(\n ComboBoxStateContext.Provider,\n {\n value: {\n isDisabled,\n isInvalid,\n isReadOnly,\n },\n },\n children,\n );\n}\n\ntype Native = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\ninterface Shared extends Native {\n /** Compound label, input, trigger, popover, options, and guidance parts. */ children: ReactNode;\n /** Prevents focus, input, and selection. Defaults to `false`. */ disabled?: boolean;\n /** Associates the native form value with an external form. */ form?: string;\n /** Exposes invalid state to the input and validation message. Defaults to `false`. */ invalid?: boolean;\n /** Native form field name for the selected key or free-form text. */ name?: string;\n /** Temporary text shown when the input is empty. */ placeholder?: string;\n /** Marks the combobox as required. Defaults to `false`. */ required?: boolean;\n /** Ref to the rendered field root. */ ref?: Ref<HTMLDivElement>;\n}\ntype SelectionControlled =\n | {\n /** Current selected key, or `null` when no option is selected. */\n selection: CollectionKey | null;\n /** Called when the selected key changes. */\n onSelectionChange: (selection: CollectionKey | null) => void;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n }\n | {\n /** Initial selected key. */\n defaultSelection?: CollectionKey;\n /** Called when the selected key changes. */\n onSelectionChange?: (selection: CollectionKey | null) => void;\n /** Excluded when selection is uncontrolled. */\n selection?: never;\n };\ntype InputControlled =\n | {\n /** Current text displayed in the input. */\n inputValue: string;\n /** Called when the displayed input text changes. */\n onInputChange: (value: string) => void;\n /** Excluded when input text is controlled. */\n defaultInputValue?: never;\n }\n | {\n /** Initial text displayed in the input. */\n defaultInputValue?: string;\n /** Called when the displayed input text changes. */\n onInputChange?: (value: string) => void;\n /** Excluded when input text is uncontrolled. */\n inputValue?: never;\n };\ntype Mutable = SelectionControlled &\n InputControlled & {\n /** Mutable state cannot be marked read-only. */\n readOnly?: false;\n };\ninterface SelectionReadOnly {\n /** Current selected key, or `null` when no option is selected. */\n selection: CollectionKey | null;\n /** Current immutable input text. */\n inputValue: string;\n /** Prevents changes to the controlled input and selection. */\n readOnly: true;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Excluded when input text is controlled. */\n defaultInputValue?: never;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n /** Excluded because read-only input text cannot change. */\n onInputChange?: never;\n}\ninterface CustomValueReadOnly {\n /** Current immutable free-form input text. */\n inputValue: string;\n /** Current suggestion key, or `null` when no option is selected. */\n selection?: CollectionKey | null;\n /** Prevents changes to the controlled input and selection. */\n readOnly: true;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Excluded when input text is controlled. */\n defaultInputValue?: never;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n /** Excluded because read-only input text cannot change. */\n onInputChange?: never;\n}\ntype SelectionOnly = {\n /** Requires the committed value to match an option. This is the default. */\n allowsCustomValue?: false;\n /** Free-form commits are unavailable in selection-only mode. */\n onCommit?: never;\n} & (Mutable | SelectionReadOnly);\ntype CustomValue = {\n /** Allows arbitrary text to be committed without selecting an option. */\n allowsCustomValue: true;\n /** Called with the current text when Enter commits without a highlighted option. */\n onCommit?: (value: string) => void;\n} & (Mutable | CustomValueReadOnly);\n/** Props for selection-only or free-form ComboBox state. */ export type ComboBoxRootProps =\n Shared & (SelectionOnly | CustomValue);\n/** Props for the visible combobox label. */ export type ComboBoxLabelProps =\n TextFieldLabelProps;\n/** Props for supporting combobox guidance. */ export type ComboBoxDescriptionProps =\n TextFieldDescriptionProps;\n/** Props for a combobox validation message. */ export type ComboBoxErrorProps =\n TextFieldErrorProps;\n/** Props for the single-surface combobox input and trigger group. */\nexport interface ComboBoxGroupProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Editable input and popup trigger. */\n children: ReactNode;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n /** Canonical size applied to every grouped control part. Defaults to `md`. */\n size?: ControlSize;\n}\n/** Editable combobox input props. */ export interface ComboBoxInputProps\n extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n | 'defaultValue'\n | 'disabled'\n | 'onChange'\n | 'readOnly'\n | 'required'\n | 'size'\n | 'style'\n | 'value'\n > {\n /** Ref to the rendered native text input. */ ref?: Ref<HTMLInputElement>;\n /** Standalone input size. A containing Group takes precedence. Defaults to `md`. */\n size?: ControlSize;\n}\n/** Popup trigger props. */ export interface ComboBoxTriggerProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'style'> {\n /** Optional trigger content. Defaults to the Breeze down chevron. */ children?: ReactNode;\n /** Ref to the popup trigger button. */ ref?: Ref<HTMLButtonElement>;\n /** Standalone trigger size. A containing Group takes precedence. Defaults to `md`. */\n size?: ControlSize;\n}\n/** Popover props. */ export interface ComboBoxPopoverProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Option-list content. */ children: ReactNode;\n /** Ref to the positioned popover element. */ ref?: Ref<HTMLElement>;\n}\n/** Static or typed generic option-list props. */ export type ComboBoxListBoxProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> &\n CollectionContentProps<Item> & {\n /** Content announced and displayed when filtering leaves no matching options. */ emptyContent?: ReactNode;\n /** Ref to the rendered listbox. */ ref?: Ref<HTMLDivElement>;\n };\n/** Props for one keyed combobox option. */ export type ComboBoxItemProps =\n ListBoxItemProps;\n/** Props for application-owned asynchronous option loading presentation. */\nexport interface ComboBoxLoadingProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Loading message announced politely while options are pending. */\n children: ReactNode;\n /** Ref to the rendered loading status. */\n ref?: Ref<HTMLDivElement>;\n}\n/** Props for application-owned option loading failure presentation. */\nexport interface ComboBoxOptionsErrorProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Failure message announced assertively when options cannot load. */\n children: ReactNode;\n /** Ref to the rendered option failure alert. */\n ref?: Ref<HTMLDivElement>;\n}\n/** Coordinates selection-only or free-form input, options, and form state. */\nexport function Root({\n allowsCustomValue = false,\n children,\n className,\n defaultInputValue,\n defaultSelection,\n disabled = false,\n form,\n inputValue,\n invalid = false,\n name,\n onCommit,\n onInputChange,\n onSelectionChange,\n placeholder,\n readOnly = false,\n ref,\n required = false,\n selection,\n ...props\n}: Readonly<ComboBoxRootProps>): ReactElement {\n useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const commit =\n allowsCustomValue && !disabled && !readOnly ? onCommit : undefined;\n\n return createElement(\n ComboBoxContext.Provider,\n { value: { onCommit: commit } },\n createElement(AriaComboBox, {\n ...props,\n allowsCustomValue,\n allowsEmptyCollection: true,\n children: renderComboBoxChildren.bind(null, children),\n className: root({ class: className }),\n defaultFilter: allowsCustomValue ? includeAllOptions : undefined,\n defaultInputValue,\n defaultSelectedKey: defaultSelection,\n form,\n inputValue,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n name,\n onInputChange,\n onSelectionChange,\n placeholder,\n ref: forwardedRef,\n selectedKey: selection,\n } as unknown as ComponentProps<typeof AriaComboBox>),\n );\n}\n/** Groups the editable input and popup trigger as one visual control. */\nexport function Group({\n className,\n ref,\n role = 'presentation',\n size = 'md',\n ...props\n}: Readonly<ComboBoxGroupProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const rootState = useContext(ComboBoxStateContext);\n\n return createElement(\n ComboBoxCompositionContext.Provider,\n { value: { size } },\n createElement(AriaGroup, {\n ...props,\n className: group({ class: className, size }),\n 'data-breeze-combobox-group': '',\n 'data-size': size,\n isDisabled: rootState?.isDisabled,\n isInvalid: rootState?.isInvalid,\n isReadOnly: rootState?.isReadOnly,\n ref: forwardedRef,\n role,\n } as ComponentProps<typeof AriaGroup>),\n );\n}\n/** Renders the editable option filter or free-form input. */ export function Input({\n className,\n onKeyDownCapture,\n ref,\n size,\n ...props\n}: Readonly<ComboBoxInputProps>): ReactElement {\n const context = useContext(ComboBoxContext);\n const composition = useContext(ComboBoxCompositionContext);\n const r = useForwardedRef(ref);\n const handleKeyDownCapture = (event: KeyboardEvent<HTMLInputElement>) => {\n onKeyDownCapture?.(event);\n\n const activeOptionId = event.currentTarget.getAttribute(\n 'aria-activedescendant',\n );\n\n if (\n !event.defaultPrevented &&\n event.key === 'Enter' &&\n activeOptionId === null\n ) {\n context?.onCommit?.(event.currentTarget.value);\n }\n };\n\n return createElement(AriaInput, {\n ...props,\n className: formControlValue({\n class: input({\n class: composition ? groupedInput({ class: className }) : className,\n }),\n size: composition?.size ?? size,\n }),\n onKeyDownCapture: handleKeyDownCapture,\n ref: r,\n });\n}\n/** Opens the option popup. */ export function Trigger({\n children,\n className,\n ref,\n size,\n ...props\n}: Readonly<ComboBoxTriggerProps>): ReactElement {\n const composition = useContext(ComboBoxCompositionContext);\n const r = useForwardedRef(ref);\n\n return createElement(\n AriaButton,\n {\n ...props,\n className: button({\n class: composition ? groupedButton({ class: className }) : className,\n size: composition?.size ?? size,\n }),\n ref: r,\n } as ComponentProps<typeof AriaButton>,\n children ?? (\n <ChevronDownIcon className=\"size-4\" data-breeze-combobox-indicator=\"\" />\n ),\n );\n}\n/** Positions options. */ export function Popover({\n className,\n ref,\n ...props\n}: Readonly<ComboBoxPopoverProps>): ReactElement {\n const r = useForwardedRef(ref);\n return createElement(AriaPopover, {\n ...props,\n className: popover({ class: className }),\n ref: r,\n } as ComponentProps<typeof AriaPopover>);\n}\n/** Renders static or generic options. */ export function ListBox<\n Item extends BreezeCollectionItem,\n>({\n children,\n className,\n emptyContent,\n items,\n ref,\n ...props\n}: Readonly<ComboBoxListBoxProps<Item>>): ReactElement {\n const r = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n\n return createElement(AriaListBox, {\n ...props,\n children,\n className: list({ class: className }),\n items,\n ref: r,\n renderEmptyState: () =>\n resolvedEmptyContent === null\n ? null\n : createElement(\n 'div',\n { 'aria-live': 'polite', role: 'status' },\n resolvedEmptyContent,\n ),\n } as unknown as ComponentProps<typeof AriaListBox>);\n}\n/** Announces application-owned option loading without orchestrating data. */\nexport function Loading({\n className,\n ref,\n ...props\n}: Readonly<ComboBoxLoadingProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('div', {\n ...props,\n 'aria-live': 'polite',\n className: loading({ class: className }),\n ref: forwardedRef,\n role: 'status',\n });\n}\n/** Announces an application-owned option loading failure. */\nexport function OptionsError({\n className,\n ref,\n ...props\n}: Readonly<ComboBoxOptionsErrorProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('div', {\n ...props,\n 'aria-live': 'assertive',\n className: optionsError({ class: className }),\n ref: forwardedRef,\n role: 'alert',\n });\n}\n/**\n * Accessible selection-only or free-form combobox primitive.\n *\n * @summary editable keyed option selection with explicit free-form mode\n */\nexport const ComboBox = {\n /** Supporting guidance associated with the combobox. */ Description:\n TextField.Description,\n /** Validation feedback associated with the combobox. */ Error:\n TextField.Error,\n /** Single-surface editable input and popup trigger group. */ Group,\n /** Editable input that filters and displays the selected option. */ Input,\n /** One keyed option within `ComboBox.ListBox`. */ Item: BreezeListBox.Item,\n /** Visible label associated with the combobox input. */ Label:\n TextField.Label,\n /** Static or typed generic option collection. */ ListBox,\n /** Polite application-owned asynchronous option loading status. */ Loading,\n /** Assertive application-owned option loading failure alert. */ OptionsError,\n /** Popup positioned relative to the input and trigger. */ Popover,\n /** Input, selection, validation, and native-form coordination root. */ Root,\n /** Button that opens and closes the option popup. */ Trigger,\n};\n","import type { ComponentPropsWithRef } from 'react';\nimport type { ResponsiveValue } from './responsive';\n\nexport type LayoutElementProps = Omit<ComponentPropsWithRef<'div'>, 'style'>;\n\n/** Named spacing steps available to Breeze layout primitives. */\nexport type Space =\n | 'none'\n | 'xs'\n | 'sm'\n | 'control'\n | 'compact'\n | 'md'\n | 'lg'\n | 'xl'\n | 'xxl'\n | 'page';\n\n/** A scalar spacing step or mobile-first responsive spacing value. */\nexport type ResponsiveSpace = ResponsiveValue<Space>;\n\nexport const paddingClasses = {\n base: {\n compact: 'p-3',\n control: 'p-2.5',\n lg: 'p-5',\n md: 'p-4',\n none: 'p-0',\n page: 'p-12',\n sm: 'p-2',\n xl: 'p-6',\n xs: 'p-1',\n xxl: 'p-8',\n },\n lg: {\n compact: 'lg:p-3',\n control: 'lg:p-2.5',\n lg: 'lg:p-5',\n md: 'lg:p-4',\n none: 'lg:p-0',\n page: 'lg:p-12',\n sm: 'lg:p-2',\n xl: 'lg:p-6',\n xs: 'lg:p-1',\n xxl: 'lg:p-8',\n },\n md: {\n compact: 'md:p-3',\n control: 'md:p-2.5',\n lg: 'md:p-5',\n md: 'md:p-4',\n none: 'md:p-0',\n page: 'md:p-12',\n sm: 'md:p-2',\n xl: 'md:p-6',\n xs: 'md:p-1',\n xxl: 'md:p-8',\n },\n sm: {\n compact: 'sm:p-3',\n control: 'sm:p-2.5',\n lg: 'sm:p-5',\n md: 'sm:p-4',\n none: 'sm:p-0',\n page: 'sm:p-12',\n sm: 'sm:p-2',\n xl: 'sm:p-6',\n xs: 'sm:p-1',\n xxl: 'sm:p-8',\n },\n} as const;\n\nexport const gapClasses = {\n base: {\n compact: 'gap-3',\n control: 'gap-2.5',\n lg: 'gap-5',\n md: 'gap-4',\n none: 'gap-0',\n page: 'gap-12',\n sm: 'gap-2',\n xl: 'gap-6',\n xs: 'gap-1',\n xxl: 'gap-8',\n },\n lg: {\n compact: 'lg:gap-3',\n control: 'lg:gap-2.5',\n lg: 'lg:gap-5',\n md: 'lg:gap-4',\n none: 'lg:gap-0',\n page: 'lg:gap-12',\n sm: 'lg:gap-2',\n xl: 'lg:gap-6',\n xs: 'lg:gap-1',\n xxl: 'lg:gap-8',\n },\n md: {\n compact: 'md:gap-3',\n control: 'md:gap-2.5',\n lg: 'md:gap-5',\n md: 'md:gap-4',\n none: 'md:gap-0',\n page: 'md:gap-12',\n sm: 'md:gap-2',\n xl: 'md:gap-6',\n xs: 'md:gap-1',\n xxl: 'md:gap-8',\n },\n sm: {\n compact: 'sm:gap-3',\n control: 'sm:gap-2.5',\n lg: 'sm:gap-5',\n md: 'sm:gap-4',\n none: 'sm:gap-0',\n page: 'sm:gap-12',\n sm: 'sm:gap-2',\n xl: 'sm:gap-6',\n xs: 'sm:gap-1',\n xxl: 'sm:gap-8',\n },\n} as const;\n","import { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport {\n type LayoutElementProps,\n paddingClasses,\n type ResponsiveSpace,\n} from '../../internal/styling/layout';\nimport { resolveResponsiveClasses } from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst container = tv({\n base: 'mx-auto w-full max-w-screen-2xl',\n});\n\nconst defaultPadding: ResponsiveSpace = {\n base: 'md',\n lg: 'page',\n md: 'xxl',\n sm: 'xl',\n};\n\n/** Props for the bounded Breeze application workspace. */\nexport interface ContainerProps extends LayoutElementProps {\n /** Responsive inline and block gutter. Defaults from `md` at base to `page` at `lg`. */\n padding?: ResponsiveSpace;\n}\n\n/**\n * Centers content in a full-width workspace with responsive\n * page gutters.\n *\n * @summary bounded application workspace with responsive page gutters\n */\nexport function Container({\n className,\n padding = defaultPadding,\n ...props\n}: Readonly<ContainerProps>) {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: container({\n class: [resolveResponsiveClasses(padding, paddingClasses), className],\n }),\n });\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n DateInput as AriaDateInput,\n DateSegment as AriaDateSegment,\n} from 'react-aria-components/DateField';\nimport type { DateSegment as InternalDateSegment } from 'react-stately/useDateFieldState';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\n\nconst inputStyle = tv({\n base: 'flex min-h-10 items-center gap-0.5 border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] px-3 text-sm data-[focus-within]:outline-2 data-[focus-within]:outline-[var(--breeze-focus)] data-[invalid]:border-[var(--breeze-danger)]',\n});\nconst segmentStyle = tv({\n base: 'rounded-sm px-0.5 outline-none data-[focused]:bg-[var(--breeze-primary)] data-[focused]:text-white data-[placeholder]:text-[var(--breeze-ink-muted)]',\n});\nconst timeZoneStyle = tv({\n base: 'cursor-default select-none px-0.5 text-[var(--breeze-ink)]',\n});\n\n/** Props for a Breeze-owned segmented date or time input. */\nexport interface DateInputPartProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Ref to the rendered segment group. */\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction renderSegment(segment: InternalDateSegment): ReactElement {\n if (segment.type === 'timeZoneName') {\n return createElement(\n 'span',\n {\n className: timeZoneStyle(),\n 'data-breeze-time-zone': '',\n 'data-type': segment.type,\n },\n segment.text,\n );\n }\n\n return createElement(AriaDateSegment, {\n className: segmentStyle(),\n segment,\n });\n}\n\n/** Renders React Aria segments without exposing their internal value objects. */\nexport function DateInputPart({\n className,\n ref,\n ...props\n}: Readonly<DateInputPartProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaDateInput,\n {\n ...props,\n className: inputStyle({ class: className }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaDateInput>,\n renderSegment as unknown as ReactNode,\n );\n}\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { DateField as AriaDateField } from 'react-aria-components/DateField';\nimport { tv } from 'tailwind-variants';\nimport {\n formatDateValue,\n parseDateValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { DateInputPart, type DateInputPartProps } from '../date/DateInput';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst rootStyle = tv({ base: 'flex min-w-0 flex-col gap-1.5' });\n\ntype NativeRootProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface SharedDateFieldRootProps extends NativeRootProps {\n /** Compound label, segmented input, description, and error parts. */\n children: ReactNode;\n /** Prevents focus and date editing. Defaults to `false`. */\n disabled?: boolean;\n /** Associates the hidden native date input with an external form. */\n form?: string;\n /** Hidden native date input ref used for form integration. */\n inputRef?: Ref<HTMLInputElement>;\n /** Exposes invalid state to the segmented input. Defaults to `false`. */\n invalid?: boolean;\n /** Returns whether a stable date string is unavailable. */\n isDateUnavailable?: (date: string) => boolean;\n /** Latest selectable `YYYY-MM-DD` date. */\n maxValue?: string;\n /** Earliest selectable `YYYY-MM-DD` date. */\n minValue?: string;\n /** Native form field name for the stable date string. */\n name?: string;\n /** Marks the date as required. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered date-field root. */\n ref?: Ref<HTMLDivElement>;\n}\n\ntype DateFieldState =\n | {\n /** Current controlled date, or `null` when empty. */\n value: string | null;\n /** Called with the next stable date string or `null`. */\n onChange: (value: string | null) => void;\n /** Excluded when the date is controlled. */\n defaultValue?: never;\n /** Mutable controlled state cannot be marked read-only. */\n readOnly?: false;\n }\n | {\n /** Current immutable date, or `null` when empty. */\n value: string | null;\n /** Prevents changes to the controlled date. */\n readOnly: true;\n /** Excluded when the date is controlled. */\n defaultValue?: never;\n /** Excluded because read-only dates cannot change. */\n onChange?: never;\n }\n | {\n /** Initial uncontrolled date, or `null` when empty. */\n defaultValue?: string | null;\n /** Called with the next stable date string or `null`. */\n onChange?: (value: string | null) => void;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n /** Excluded when the date is uncontrolled. */\n value?: never;\n };\n\n/** Props for controlled, uncontrolled, or read-only stable date state. */\nexport type DateFieldRootProps = SharedDateFieldRootProps & DateFieldState;\n/** Props for the visible date-field label. */\nexport type DateFieldLabelProps = TextFieldLabelProps;\n/** Props for the segmented date input. */\nexport type DateFieldInputProps = DateInputPartProps;\n/** Props for supporting date-field guidance. */\nexport type DateFieldDescriptionProps = TextFieldDescriptionProps;\n/** Props for a date-field validation message. */\nexport type DateFieldErrorProps = TextFieldErrorProps;\n\n/** Coordinates stable date strings with locale-aware editable segments. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n inputRef,\n invalid = false,\n isDateUnavailable,\n maxValue,\n minValue,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<DateFieldRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const forwardedInputRef = useForwardedRef(inputRef);\n\n return createElement(AriaDateField, {\n ...props,\n children,\n className: rootStyle({ class: className }),\n defaultValue: parseDateValue(defaultValue ?? null) ?? undefined,\n form,\n granularity: 'day',\n inputRef: forwardedInputRef,\n isDateUnavailable: isDateUnavailable\n ? (date: CalendarDate) => isDateUnavailable(date.toString())\n : undefined,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: parseDateValue(maxValue ?? null) ?? undefined,\n minValue: parseDateValue(minValue ?? null) ?? undefined,\n name,\n onChange: readOnly\n ? undefined\n : (date: CalendarDate | null) => onChange?.(formatDateValue(date)),\n ref: forwardedRef,\n value: value === undefined ? undefined : parseDateValue(value),\n } as unknown as ComponentProps<typeof AriaDateField>);\n}\n\n/**\n * Accessible compound date field with stable string values.\n *\n * @summary locale-aware segmented entry for one stable date\n */\nexport const DateField = {\n /** Supporting guidance associated with the date field. */\n Description: TextField.Description,\n /** Validation feedback associated with the date field. */\n Error: TextField.Error,\n /** Locale-aware editable date segments. */\n Input: DateInputPart,\n /** Visible label associated with the segmented input. */\n Label: TextField.Label,\n /** Stable date state, constraints, validation, and form root. */\n Root,\n};\n","import type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useCallback } from 'react';\nimport {\n Button as AriaButton,\n Calendar as AriaCalendar,\n Group as AriaGroup,\n Popover as AriaPopover,\n} from 'react-aria-components/DatePicker';\nimport { RangeCalendar as AriaRangeCalendar } from 'react-aria-components/DateRangePicker';\nimport { tv } from 'tailwind-variants';\nimport { CalendarIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n CalendarGridPart,\n CalendarHeaderPart,\n CalendarHeadingPart,\n CalendarNextButtonPart,\n CalendarPreviousButtonPart,\n} from './CalendarParts';\n\nconst groupStyle = tv({ base: 'flex items-stretch' });\nconst triggerStyle = tv({\n base: 'inline-flex min-h-11 items-center border border-l-0 border-[var(--breeze-border-strong)] px-3',\n});\nconst popoverStyle = tv({\n base: 'z-50 w-88 max-w-[calc(100vw-2rem)] border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-3 [box-shadow:0_8px_0_rgb(6_12_24_/_18%)]',\n});\nconst calendarStyle = tv({\n base: 'inline-flex w-full flex-col gap-2.5',\n});\n\n/** Supported logical picker popup placements. */\nexport type PickerPopoverPlacement =\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'top start'\n | 'top end'\n | 'bottom start'\n | 'bottom end';\n\n/** Props for a picker input-and-trigger group. */\nexport interface PickerGroupPartProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Segmented input and calendar trigger. */ children: ReactNode;\n /** Ref to the rendered group. */ ref?: Ref<HTMLDivElement>;\n}\n/** Props for a picker calendar trigger. */\nexport interface PickerTriggerPartProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'style'> {\n /** Visible trigger content. Defaults to the Breeze calendar icon. */ children?: ReactNode;\n /** Ref to the rendered trigger. */ ref?: Ref<HTMLButtonElement>;\n}\n/** Props for a picker calendar popover. */\nexport interface PickerPopoverPartProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Calendar content. */ children: ReactNode;\n /** Logical placement relative to the field trigger. */ placement?: PickerPopoverPlacement;\n /** Ref to the rendered popover. */ ref?: Ref<HTMLElement>;\n}\n/** Props for a Breeze-owned picker calendar. */\nexport interface PickerCalendarPartProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Ref to the rendered calendar. */ ref?: Ref<HTMLDivElement>;\n}\n\nexport function PickerGroupPart({\n children,\n className,\n ref,\n ...props\n}: Readonly<PickerGroupPartProps>): ReactElement {\n return createElement(\n AriaGroup,\n {\n ...props,\n className: groupStyle({ class: className }),\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaGroup>,\n children,\n );\n}\nexport function PickerTriggerPart({\n children,\n className,\n ref,\n ...props\n}: Readonly<PickerTriggerPartProps>): ReactElement {\n return createElement(\n AriaButton,\n {\n ...props,\n className: triggerStyle({ class: className }),\n ref: useForwardedRef(ref),\n } as unknown as ComponentProps<typeof AriaButton>,\n children === undefined ? createElement(CalendarIcon) : children,\n );\n}\nexport function PickerPopoverPart({\n children,\n className,\n dir,\n placement,\n ref,\n ...props\n}: Readonly<PickerPopoverPartProps>): ReactElement {\n const { direction } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const resolvedDirection = dir ?? direction;\n const popoverRef = useCallback(\n (element: HTMLElement | null) => {\n element?.setAttribute('dir', resolvedDirection);\n forwardedRef(element);\n },\n [forwardedRef, resolvedDirection],\n );\n\n return createElement(\n AriaPopover,\n {\n ...props,\n className: popoverStyle({ class: className }),\n placement,\n ref: popoverRef,\n } as ComponentProps<typeof AriaPopover>,\n children,\n );\n}\nconst calendarChildren = (): ReactElement[] => [\n createElement(\n CalendarHeaderPart,\n { className: '-mx-3 -mt-3 w-[calc(100%+1.5rem)]', key: 'header' },\n createElement(CalendarPreviousButtonPart, { key: 'previous' }),\n createElement(CalendarHeadingPart, { key: 'heading' }),\n createElement(CalendarNextButtonPart, { key: 'next' }),\n ),\n createElement(CalendarGridPart, { key: 'grid' }),\n];\nexport function PickerCalendarPart({\n className,\n ref,\n ...props\n}: Readonly<PickerCalendarPartProps>): ReactElement {\n return createElement(\n AriaCalendar,\n {\n ...props,\n className: calendarStyle({ class: className }),\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaCalendar>,\n calendarChildren(),\n );\n}\nexport function PickerRangeCalendarPart({\n className,\n ref,\n ...props\n}: Readonly<PickerCalendarPartProps>): ReactElement {\n return createElement(\n AriaRangeCalendar,\n {\n ...props,\n className: calendarStyle({ class: className }),\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaRangeCalendar>,\n calendarChildren(),\n );\n}\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useContext } from 'react';\nimport {\n DatePicker as AriaDatePicker,\n DatePickerStateContext,\n} from 'react-aria-components/DatePicker';\nimport { tv } from 'tailwind-variants';\nimport { CalendarIcon } from '../../icons';\nimport {\n formatDateValue,\n parseDateValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport formControlValue from '../../internal/styling/formControls';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { DateInputPart, type DateInputPartProps } from '../date/DateInput';\nimport {\n PickerCalendarPart,\n type PickerCalendarPartProps,\n PickerGroupPart,\n type PickerGroupPartProps,\n PickerPopoverPart,\n type PickerPopoverPartProps,\n PickerTriggerPart,\n type PickerTriggerPartProps,\n} from '../date/PickerParts';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst rootStyle = tv({ base: 'flex w-full min-w-0 flex-col gap-1.5' });\nconst groupStyle = tv({ base: 'w-full' });\nconst hiddenInputStyle = tv({ base: 'hidden' });\nconst triggerStyle = tv({\n base: 'w-full justify-between border-l bg-[var(--breeze-surface)] text-start text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] data-[hovered]:!border-[var(--breeze-primary)]',\n});\ninterface Shared\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'style'\n > {\n /** Label, hidden state input, long-date trigger, calendar popup, and guidance. */ children: ReactNode;\n /** Prevents focus and selection. */ disabled?: boolean;\n /** External native form id. */ form?: string;\n /** Exposes invalid state. */ invalid?: boolean;\n /** Returns whether a stable date is unavailable. */ isDateUnavailable?: (\n date: string,\n ) => boolean;\n /** Latest selectable date. */ maxValue?: string;\n /** Earliest selectable date. */ minValue?: string;\n /** Native form field name. */ name?: string;\n /** Marks the picker as required. */ required?: boolean;\n /** Ref to the rendered picker root. */ ref?: Ref<HTMLDivElement>;\n}\ntype State =\n | {\n /** Current controlled date, or `null` when empty. */ value:\n | string\n | null;\n /** Called with the next stable date or `null`. */ onChange: (\n value: string | null,\n ) => void;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Mutable controlled pickers cannot be read-only. */ readOnly?: false;\n }\n | {\n /** Current immutable date, or `null` when empty. */ value: string | null;\n /** Prevents date changes. */ readOnly: true;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Excluded because read-only pickers cannot change. */ onChange?: never;\n }\n | {\n /** Initial uncontrolled date, or `null` when empty. */ defaultValue?:\n | string\n | null;\n /** Called with the next stable date or `null`. */ onChange?: (\n value: string | null,\n ) => void;\n /** Uncontrolled pickers cannot be read-only. */ readOnly?: false;\n /** Excluded when uncontrolled. */ value?: never;\n };\n/** Props for controlled, uncontrolled, or read-only stable date picker state. */\nexport type DatePickerRootProps = Shared & State;\n/** Props for the visible label. */\nexport type DatePickerLabelProps = TextFieldLabelProps;\n/** Props for the hidden date-state input. */\nexport type DatePickerInputProps = DateInputPartProps;\n/** Props for the full-width calendar trigger group. */\nexport type DatePickerGroupProps = PickerGroupPartProps;\n/** Props for the visible long-date calendar trigger. */\nexport type DatePickerTriggerProps = PickerTriggerPartProps;\n/** Props for the calendar popover, positioned at `bottom end` by default. */\nexport type DatePickerPopoverProps = PickerPopoverPartProps;\n/** Props for the picker calendar. */\nexport type DatePickerCalendarProps = PickerCalendarPartProps;\n/** Props for supporting guidance. */\nexport type DatePickerDescriptionProps = TextFieldDescriptionProps;\n/** Props for validation feedback. */\nexport type DatePickerErrorProps = TextFieldErrorProps;\n\nexport function Group({\n className,\n ...props\n}: Readonly<DatePickerGroupProps>): ReactElement {\n return createElement(PickerGroupPart, {\n ...props,\n className: groupStyle({ class: className }),\n });\n}\n\nexport function Input({\n className,\n ...props\n}: Readonly<DatePickerInputProps>): ReactElement {\n return createElement(DateInputPart, {\n ...props,\n 'aria-hidden': true,\n className: hiddenInputStyle({ class: className }),\n hidden: true,\n inert: true,\n });\n}\n\nexport function Trigger({\n children,\n className,\n ...props\n}: Readonly<DatePickerTriggerProps>): ReactElement {\n const state = useContext(DatePickerStateContext);\n const { locale, messages, timeZone } = useBreezeContext();\n const resolvedTimeZone = timeZone ?? 'UTC';\n const dateValue = state?.value ?? null;\n const displayValue =\n dateValue === null\n ? null\n : new Intl.DateTimeFormat(locale, {\n day: 'numeric',\n month: 'long',\n timeZone: resolvedTimeZone,\n year: 'numeric',\n }).format(dateValue.toDate(resolvedTimeZone));\n const defaultChildren = [\n createElement(\n 'span',\n { key: 'value' },\n displayValue ?? messages.selectDate,\n ),\n createElement(CalendarIcon, {\n className: 'ms-3 text-[var(--breeze-primary)]',\n key: 'icon',\n size: '1.25rem',\n }),\n ];\n\n return createElement(\n PickerTriggerPart,\n {\n ...props,\n className: formControlValue({\n class: triggerStyle({ class: className }),\n }),\n },\n children === undefined ? defaultChildren : children,\n );\n}\n\nexport function Popover({\n placement = 'bottom end',\n ...props\n}: Readonly<DatePickerPopoverProps>): ReactElement {\n return createElement(PickerPopoverPart, {\n ...props,\n placement,\n });\n}\n\n/** Coordinates date entry with an optional calendar popover. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n invalid = false,\n isDateUnavailable,\n maxValue,\n minValue,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<DatePickerRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaDatePicker, {\n ...props,\n children,\n className: rootStyle({ class: className }),\n defaultValue: parseDateValue(defaultValue ?? null) ?? undefined,\n form,\n granularity: 'day',\n isDateUnavailable: isDateUnavailable\n ? (date: CalendarDate) => isDateUnavailable(date.toString())\n : undefined,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: parseDateValue(maxValue ?? null) ?? undefined,\n minValue: parseDateValue(minValue ?? null) ?? undefined,\n name,\n onChange: readOnly\n ? undefined\n : (date: CalendarDate | null) => onChange?.(formatDateValue(date)),\n ref: useForwardedRef(ref),\n value: value === undefined ? undefined : parseDateValue(value),\n } as unknown as ComponentProps<typeof AriaDatePicker>);\n}\n/**\n * Accessible full-width calendar-selection control with stable date strings.\n *\n * @summary long-date control with a locale-aware calendar popup\n */\nexport const DatePicker = {\n /** Locale-aware calendar. */ Calendar: PickerCalendarPart,\n /** Supporting guidance. */ Description: TextField.Description,\n /** Validation feedback. */ Error: TextField.Error,\n /** Hidden date-state input and trigger group. */ Group,\n /** Hidden date-state input. */ Input,\n /** Visible field label. */ Label: TextField.Label,\n /** Positioned calendar popup. */ Popover,\n /** Stable date state and constraints. */ Root,\n /** Visible long-date calendar popup trigger. */ Trigger,\n};\n","import type { ReactElement } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport { CalendarIcon } from '../../icons';\nimport { DateInputPart, type DateInputPartProps } from './DateInput';\nimport {\n PickerGroupPart,\n type PickerGroupPartProps,\n PickerTriggerPart,\n type PickerTriggerPartProps,\n} from './PickerParts';\n\nexport const pickerFieldRootStyle = tv({\n base: 'group/picker-field flex w-full min-w-0 flex-col gap-1.5',\n});\nconst pickerFieldGroupStyle = tv({\n base: 'flex min-h-11 w-full min-w-0 items-stretch border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 data-[focus-within]:outline-2 data-[focus-within]:outline-offset-[-2px] data-[focus-within]:outline-[var(--breeze-focus)] data-[hovered]:border-[var(--breeze-primary)] data-[invalid]:!border-[var(--breeze-danger)] group-data-[readonly]/picker-field:bg-[var(--breeze-surface-subtle)] group-data-[readonly]/picker-field:opacity-70',\n});\nconst pickerFieldInputStyle = tv({\n base: 'min-h-11 min-w-0 flex-1 border-0 bg-transparent px-2 font-[family-name:var(--breeze-font-body)] text-base font-normal leading-[1.4] data-[focus-within]:outline-none data-[invalid]:border-0 [&_[data-type]]:px-0 sm:px-3',\n});\nconst pickerFieldTriggerStyle = tv({\n base: 'min-h-11 shrink-0 border-0 bg-transparent px-2 text-[var(--breeze-primary)] outline-none data-[disabled]:cursor-not-allowed data-[focus-visible]:outline-none sm:px-3',\n});\n\nexport type PickerFieldGroupPartProps = PickerGroupPartProps;\nexport type PickerFieldInputPartProps = DateInputPartProps;\nexport type PickerFieldTriggerPartProps = PickerTriggerPartProps;\n\nexport function PickerFieldGroupPart({\n className,\n ...props\n}: Readonly<PickerFieldGroupPartProps>): ReactElement {\n return createElement(PickerGroupPart, {\n ...props,\n className: pickerFieldGroupStyle({ class: className }),\n });\n}\n\nexport function PickerFieldInputPart({\n className,\n ...props\n}: Readonly<PickerFieldInputPartProps>): ReactElement {\n return createElement(DateInputPart, {\n ...props,\n className: pickerFieldInputStyle({ class: className }),\n });\n}\n\nexport function PickerFieldTriggerPart({\n children,\n className,\n ...props\n}: Readonly<PickerFieldTriggerPartProps>): ReactElement {\n return createElement(\n PickerTriggerPart,\n {\n ...props,\n className: pickerFieldTriggerStyle({ class: className }),\n },\n children === undefined\n ? createElement(CalendarIcon, { size: '1.25rem' })\n : children,\n );\n}\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport {\n createElement,\n Fragment,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { DateRangePicker as AriaDateRangePicker } from 'react-aria-components/DateRangePicker';\nimport { tv } from 'tailwind-variants';\nimport { ArrowRightIcon } from '../../icons';\nimport {\n formatDateRangeValue,\n type InternalDateRange,\n parseDateRangeValue,\n parseDateValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { DateRangeValue } from '../../internal/types/date';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n PickerFieldGroupPart,\n type PickerFieldGroupPartProps,\n PickerFieldInputPart,\n type PickerFieldInputPartProps,\n pickerFieldRootStyle,\n PickerFieldTriggerPart,\n type PickerFieldTriggerPartProps,\n} from '../date/PickerFieldParts';\nimport {\n type PickerCalendarPartProps,\n PickerPopoverPart,\n type PickerPopoverPartProps,\n PickerRangeCalendarPart,\n} from '../date/PickerParts';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst separatorStyle = tv({\n base: 'inline-flex min-h-11 shrink-0 items-center justify-center px-0.5 text-[var(--breeze-ink-muted)] sm:px-1',\n});\n\ninterface Shared\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'style'\n > {\n /** Label, start/end inputs, trigger, range calendar, and guidance. */\n children: ReactNode;\n /** Allows ranges containing unavailable dates. */\n allowsNonContiguousRanges?: boolean;\n /** Prevents focus and editing. */\n disabled?: boolean;\n /** External native form id. */\n form?: string;\n /** Exposes invalid state. */\n invalid?: boolean;\n /** Returns whether a stable date is unavailable for an optional anchor. */\n isDateUnavailable?: (date: string, anchorDate: string | null) => boolean;\n /** Latest selectable date. */\n maxValue?: string;\n /** Earliest selectable date. */\n minValue?: string;\n /** Marks the range as required. */\n required?: boolean;\n /** Ref to the rendered picker root. */\n ref?: Ref<HTMLDivElement>;\n}\ntype FormNames =\n | {\n /** Native form field name for the inclusive range end. */\n endName: string;\n /** Native form field name for the inclusive range start. */\n startName: string;\n }\n | {\n /** End name is unavailable without a start name. */\n endName?: never;\n /** Start name is unavailable without an end name. */\n startName?: never;\n };\ntype State =\n | {\n /** Current controlled range, or `null` when empty. */\n value: DateRangeValue | null;\n /** Called with the next stable range or `null`. */\n onChange: (value: DateRangeValue | null) => void;\n /** Excluded when controlled. */\n defaultValue?: never;\n /** Mutable controlled pickers cannot be read-only. */\n readOnly?: false;\n }\n | {\n /** Current immutable range, or `null` when empty. */\n value: DateRangeValue | null;\n /** Prevents range changes. */\n readOnly: true;\n /** Excluded when controlled. */\n defaultValue?: never;\n /** Excluded because read-only pickers cannot change. */\n onChange?: never;\n }\n | {\n /** Initial uncontrolled range, or `null` when empty. */\n defaultValue?: DateRangeValue | null;\n /** Called with the next stable range or `null`. */\n onChange?: (value: DateRangeValue | null) => void;\n /** Uncontrolled pickers cannot be read-only. */\n readOnly?: false;\n /** Excluded when uncontrolled. */\n value?: never;\n };\n/** Props for controlled, uncontrolled, or read-only stable range state. */\nexport type DateRangePickerRootProps = Shared & FormNames & State;\n/** Props for the visible label. */\nexport type DateRangePickerLabelProps = TextFieldLabelProps;\n/** Props shared by the start and end segmented inputs. */\nexport type DateRangePickerInputProps = PickerFieldInputPartProps;\n/** Props for the coherent start-input, separator, end-input, and trigger group. */\nexport type DateRangePickerGroupProps = PickerFieldGroupPartProps;\n/** Props for the visual range separator. */\nexport interface DateRangePickerSeparatorProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Ref to the rendered visual separator. */\n ref?: Ref<HTMLSpanElement>;\n}\n/** Props for the calendar trigger. */\nexport type DateRangePickerTriggerProps = PickerFieldTriggerPartProps;\n/** Props for the range-calendar popover. */\nexport type DateRangePickerPopoverProps = PickerPopoverPartProps;\n/** Props for the range calendar. */\nexport type DateRangePickerCalendarProps = PickerCalendarPartProps;\n/** Props for supporting guidance. */\nexport type DateRangePickerDescriptionProps = TextFieldDescriptionProps;\n/** Props for validation feedback. */\nexport type DateRangePickerErrorProps = TextFieldErrorProps;\n\nexport function Group({\n ...props\n}: Readonly<DateRangePickerGroupProps>): ReactElement {\n return createElement(PickerFieldGroupPart, props);\n}\n\nexport function StartInput({\n className,\n ...props\n}: Readonly<DateRangePickerInputProps>): ReactElement {\n return createElement(PickerFieldInputPart, {\n ...props,\n className,\n slot: 'start',\n });\n}\n\nexport function EndInput({\n className,\n ...props\n}: Readonly<DateRangePickerInputProps>): ReactElement {\n return createElement(PickerFieldInputPart, {\n ...props,\n className,\n slot: 'end',\n });\n}\n\nexport function Separator({\n className,\n ref,\n ...props\n}: Readonly<DateRangePickerSeparatorProps>): ReactElement {\n return createElement(\n 'span',\n {\n ...props,\n 'aria-hidden': true,\n className: separatorStyle({ class: className }),\n ref: useForwardedRef(ref),\n },\n createElement(ArrowRightIcon, {\n className: 'rtl:rotate-180',\n size: '1rem',\n }),\n );\n}\n\nexport function Trigger({\n ...props\n}: Readonly<DateRangePickerTriggerProps>): ReactElement {\n return createElement(PickerFieldTriggerPart, props);\n}\n\n/** Coordinates start and end date entry with a range-calendar popover. */\nexport function Root({\n allowsNonContiguousRanges = false,\n children,\n className,\n defaultValue,\n disabled = false,\n endName,\n form,\n invalid = false,\n isDateUnavailable,\n maxValue,\n minValue,\n onChange,\n readOnly = false,\n ref,\n required = false,\n startName,\n value,\n ...props\n}: Readonly<DateRangePickerRootProps>): ReactElement {\n useBreezeContext();\n\n const controlled = value !== undefined;\n const defaultEnd = defaultValue?.end ?? null;\n const defaultStart = defaultValue?.start ?? null;\n const [uncontrolledValue, setUncontrolledValue] =\n useState<DateRangeValue | null>(defaultValue ?? null);\n const liveValue = controlled ? value : uncontrolledValue;\n const rootElement = useRef<HTMLDivElement | null>(null);\n const forwardedRef = useForwardedRef(ref);\n const assignRoot = useCallback(\n (element: HTMLDivElement | null) => {\n rootElement.current = element;\n forwardedRef(element);\n },\n [forwardedRef],\n );\n\n useEffect(() => {\n if (controlled) {\n return undefined;\n }\n\n const element = rootElement.current;\n const formElement = form\n ? element?.ownerDocument.getElementById(form)\n : element?.closest('form');\n\n const FormElement = element?.ownerDocument.defaultView?.HTMLFormElement;\n\n if (FormElement === undefined || !(formElement instanceof FormElement)) {\n return undefined;\n }\n\n const resetValue =\n defaultEnd === null || defaultStart === null\n ? null\n : { end: defaultEnd, start: defaultStart };\n const handleReset = () => setUncontrolledValue(resetValue);\n\n formElement.addEventListener('reset', handleReset);\n\n return () => formElement.removeEventListener('reset', handleReset);\n }, [controlled, defaultEnd, defaultStart, form]);\n\n const handleChange = (range: InternalDateRange | null) => {\n const nextValue = formatDateRangeValue(range);\n\n if (!controlled) {\n setUncontrolledValue(nextValue);\n }\n\n onChange?.(nextValue);\n };\n\n const rangeInputs =\n startName === undefined\n ? null\n : [\n createElement('input', {\n 'aria-hidden': true,\n 'data-breeze-range-input': 'start',\n disabled,\n form,\n key: 'start-input',\n name: startName,\n readOnly: true,\n type: 'hidden',\n value: liveValue?.start ?? '',\n }),\n createElement('input', {\n 'aria-hidden': true,\n 'data-breeze-range-input': 'end',\n disabled,\n form,\n key: 'end-input',\n name: endName,\n readOnly: true,\n type: 'hidden',\n value: liveValue?.end ?? '',\n }),\n ];\n\n return createElement(AriaDateRangePicker, {\n ...props,\n allowsNonContiguousRanges,\n children: createElement(Fragment, null, children, rangeInputs),\n className: pickerFieldRootStyle({ class: className }),\n form,\n isDateUnavailable: isDateUnavailable\n ? (date: CalendarDate, anchor: CalendarDate | null) =>\n isDateUnavailable(date.toString(), anchor?.toString() ?? null)\n : undefined,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: parseDateValue(maxValue ?? null) ?? undefined,\n minValue: parseDateValue(minValue ?? null) ?? undefined,\n onChange: readOnly ? undefined : handleChange,\n ref: assignRoot,\n value: parseDateRangeValue(liveValue),\n } as unknown as ComponentProps<typeof AriaDateRangePicker>);\n}\n\n/**\n * Accessible compound date-range picker with stable string values.\n *\n * @summary segmented start and end dates with a range-calendar popup\n */\nexport const DateRangePicker = {\n /** Range calendar. */ Calendar: PickerRangeCalendarPart,\n /** Supporting guidance. */ Description: TextField.Description,\n /** End-date segmented input. */ EndInput,\n /** Validation feedback. */ Error: TextField.Error,\n /** Coherent start-input, separator, end-input, and trigger control. */ Group,\n /** Visible field label. */ Label: TextField.Label,\n /** Positioned range-calendar popup. */ Popover: PickerPopoverPart,\n /** Stable range state and constraints. */ Root,\n /** Visual direction between the start and end inputs. */ Separator,\n /** Start-date segmented input. */ StartInput,\n /** Range-calendar popup trigger. */ Trigger,\n};\n","import type { ZonedDateTime } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createContext, createElement, useContext } from 'react';\nimport {\n DatePicker as AriaDatePicker,\n DatePickerStateContext,\n} from 'react-aria-components/DatePicker';\nimport { TimeField as AriaTimeField } from 'react-aria-components/TimeField';\nimport type { TimeValue } from 'react-stately/useTimeFieldState';\nimport { tv } from 'tailwind-variants';\nimport {\n formatDateTimeValue,\n parseDateTimeValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { DateInputPart } from '../date/DateInput';\nimport {\n PickerFieldGroupPart,\n type PickerFieldGroupPartProps,\n PickerFieldInputPart,\n type PickerFieldInputPartProps,\n pickerFieldRootStyle,\n PickerFieldTriggerPart,\n type PickerFieldTriggerPartProps,\n} from '../date/PickerFieldParts';\nimport {\n PickerCalendarPart,\n type PickerCalendarPartProps,\n PickerPopoverPart,\n type PickerPopoverPartProps,\n} from '../date/PickerParts';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst calendarSurfaceStyle = tv({\n base: 'flex w-full flex-col gap-3',\n});\nconst timeFieldStyle = tv({\n base: 'flex min-w-0 flex-col gap-1.5 border-t border-[var(--breeze-border)] pt-3',\n});\nconst timeInputStyle = tv({\n base: 'min-h-11 w-full text-base font-normal leading-[1.4]',\n});\n\ninterface DateTimePickerConfiguration {\n disabled: boolean;\n readOnly: boolean;\n}\n\nconst DateTimePickerConfigurationContext =\n createContext<DateTimePickerConfiguration | null>(null);\n\ninterface Shared\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'style'\n > {\n /** Label, segmented input, trigger, calendar popup, and guidance. */\n children: ReactNode;\n /** Prevents focus and editing. */\n disabled?: boolean;\n /** External native form id. */\n form?: string;\n /** Exposes invalid state. */\n invalid?: boolean;\n /** Latest selectable explicit-offset ISO instant. */\n maxValue?: string;\n /** Earliest selectable explicit-offset ISO instant. */\n minValue?: string;\n /** Native form field name. */\n name?: string;\n /** Marks the picker as required. */\n required?: boolean;\n /** Ref to the rendered picker root. */\n ref?: Ref<HTMLDivElement>;\n}\ntype State =\n | {\n /** Current controlled explicit-offset instant. */\n value: string | null;\n /** Called with the next explicit-offset instant. */\n onChange: (value: string | null) => void;\n /** Excluded when controlled. */\n defaultValue?: never;\n /** Mutable controlled pickers cannot be read-only. */\n readOnly?: false;\n }\n | {\n /** Current immutable explicit-offset instant. */\n value: string | null;\n /** Prevents changes. */\n readOnly: true;\n /** Excluded when controlled. */\n defaultValue?: never;\n /** Excluded because read-only pickers cannot change. */\n onChange?: never;\n }\n | {\n /** Initial uncontrolled explicit-offset instant. */\n defaultValue?: string | null;\n /** Called with the next explicit-offset instant. */\n onChange?: (value: string | null) => void;\n /** Uncontrolled state cannot be read-only. */\n readOnly?: false;\n /** Excluded when uncontrolled. */\n value?: never;\n };\n/** Props for stable explicit-offset date-time picker state. */\nexport type DateTimePickerRootProps = Shared & State;\n/** Props for the visible label. */\nexport type DateTimePickerLabelProps = TextFieldLabelProps;\n/** Props for the segmented input. */\nexport type DateTimePickerInputProps = PickerFieldInputPartProps;\n/** Props for the coherent segmented-input and trigger group. */\nexport type DateTimePickerGroupProps = PickerFieldGroupPartProps;\n/** Props for the calendar trigger. */\nexport type DateTimePickerTriggerProps = PickerFieldTriggerPartProps;\n/** Props for the calendar popover. */\nexport type DateTimePickerPopoverProps = PickerPopoverPartProps;\n/** Props for the complete date-and-time calendar surface. */\nexport type DateTimePickerCalendarProps = PickerCalendarPartProps;\n/** Props for supporting guidance. */\nexport type DateTimePickerDescriptionProps = TextFieldDescriptionProps;\n/** Props for validation feedback. */\nexport type DateTimePickerErrorProps = TextFieldErrorProps;\n\nfunction useDateTimePickerConfiguration(): DateTimePickerConfiguration {\n const configuration = useContext(DateTimePickerConfigurationContext);\n\n if (configuration === null) {\n throw new Error(\n 'DateTimePicker parts must be rendered within DateTimePicker.Root.',\n );\n }\n\n return configuration;\n}\n\nexport function Calendar({\n className,\n ref,\n ...props\n}: Readonly<DateTimePickerCalendarProps>): ReactElement {\n const state = useContext(DatePickerStateContext);\n const { disabled, readOnly } = useDateTimePickerConfiguration();\n const { messages } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n\n if (state === null) {\n throw new Error(\n 'DateTimePicker.Calendar must be rendered within DateTimePicker.Root.',\n );\n }\n\n const handleTimeChange = (time: TimeValue | null) => {\n if (time !== null) {\n state.setTimeValue(time);\n }\n };\n\n return createElement(\n 'div',\n {\n ...props,\n className: calendarSurfaceStyle({ class: className }),\n 'data-breeze-date-time-calendar': '',\n ref: forwardedRef,\n },\n createElement(PickerCalendarPart),\n createElement(\n AriaTimeField,\n {\n className: timeFieldStyle(),\n granularity: 'minute',\n isDisabled: disabled,\n isInvalid: state.isInvalid,\n isReadOnly: readOnly,\n onChange: disabled || readOnly ? undefined : handleTimeChange,\n value: state.timeValue,\n } as ComponentProps<typeof AriaTimeField>,\n createElement(TextField.Label, null, messages.selectTime),\n createElement(DateInputPart, {\n className: timeInputStyle(),\n }),\n ),\n );\n}\n\nexport function Popover({\n 'aria-label': ariaLabel,\n placement = 'bottom end',\n ...props\n}: Readonly<DateTimePickerPopoverProps>): ReactElement {\n const { messages } = useBreezeContext();\n\n return createElement(PickerPopoverPart, {\n ...props,\n 'aria-label': ariaLabel ?? messages.selectDateTime,\n placement,\n });\n}\n\n/** Coordinates explicit-offset instants with provider-zone display and behavior. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n invalid = false,\n maxValue,\n minValue,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<DateTimePickerRootProps>): ReactElement {\n const { timeZone = 'UTC' } = useBreezeContext();\n const configuration = { disabled, readOnly };\n\n return createElement(AriaDatePicker, {\n ...props,\n children: createElement(\n DateTimePickerConfigurationContext,\n { value: configuration },\n children,\n ),\n className: pickerFieldRootStyle({ class: className }),\n defaultValue:\n parseDateTimeValue(defaultValue ?? null, timeZone) ?? undefined,\n form,\n granularity: 'minute',\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: parseDateTimeValue(maxValue ?? null, timeZone) ?? undefined,\n minValue: parseDateTimeValue(minValue ?? null, timeZone) ?? undefined,\n name,\n onChange: readOnly\n ? undefined\n : (date: ZonedDateTime | null) => onChange?.(formatDateTimeValue(date)),\n ref: useForwardedRef(ref),\n value:\n value === undefined ? undefined : parseDateTimeValue(value, timeZone),\n } as unknown as ComponentProps<typeof AriaDatePicker>);\n}\n\n/**\n * Accessible compound date-time picker with stable explicit-offset values.\n *\n * @summary locale-aware instant selection with explicit-offset values\n */\nexport const DateTimePicker = {\n /** Complete provider-zone date and segmented-time selection surface. */\n Calendar,\n /** Supporting guidance. */ Description: TextField.Description,\n /** Validation feedback. */ Error: TextField.Error,\n /** Coherent segmented-input and trigger control. */ Group:\n PickerFieldGroupPart,\n /** Borderless locale-aware date and time segments. */ Input:\n PickerFieldInputPart,\n /** Visible field label. */ Label: TextField.Label,\n /** Positioned complete date-and-time popup. */ Popover,\n /** Stable instant state and constraints. */ Root,\n /** Integrated calendar popup trigger. */ Trigger: PickerFieldTriggerPart,\n};\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst descriptionListRoot = tv({\n base: 'm-0 grid gap-0 border-y border-[var(--breeze-border)]',\n});\n\nconst descriptionListItem = tv({\n base: 'grid min-w-0 gap-1 border-b border-[var(--breeze-border)] py-3 last:border-b-0 sm:grid-cols-[minmax(8rem,1fr)_minmax(0,2fr)] sm:gap-6',\n});\n\nconst descriptionListTerm = tv({\n base: 'm-0 font-[family-name:var(--breeze-font-display)] font-bold text-[var(--breeze-ink)]',\n});\n\nconst descriptionListDescription = tv({\n base: 'm-0 min-w-0 text-[var(--breeze-ink)]',\n});\n\n/** Props for the native description-list container. */\nexport interface DescriptionListRootProps\n extends Omit<HTMLAttributes<HTMLDListElement>, 'style'> {\n /** Ref to the rendered description list. */\n ref?: Ref<HTMLDListElement>;\n}\n\n/** Props for one visually grouped term-description pair. */\nexport interface DescriptionListItemProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Ref to the rendered pair container. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for a native description-list term. */\nexport interface DescriptionListTermProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Ref to the rendered term element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Props for the description associated with a term. */\nexport interface DescriptionListDescriptionProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Ref to the rendered description element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Renders a native description list that becomes two columns when space permits. */\nexport function Root({\n className,\n ref,\n ...props\n}: Readonly<DescriptionListRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('dl', {\n ...props,\n className: descriptionListRoot({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Visually groups one or more native terms with their descriptions. */\nexport function Item({\n className,\n ref,\n ...props\n}: Readonly<DescriptionListItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('div', {\n ...props,\n className: descriptionListItem({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders a native description-list term. */\nexport function Term({\n className,\n ref,\n ...props\n}: Readonly<DescriptionListTermProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('dt', {\n ...props,\n className: descriptionListTerm({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the native description associated with a preceding term. */\nexport function Description({\n className,\n ref,\n ...props\n}: Readonly<DescriptionListDescriptionProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('dd', {\n ...props,\n className: descriptionListDescription({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/**\n * Semantic compound primitive for term-description metadata.\n *\n * @summary responsive native term-description metadata\n */\nexport const DescriptionList = {\n /** Description associated with a term. */\n Description,\n /** Visual grouping for a term-description pair. */\n Item,\n /** Native description-list container. */\n Root,\n /** Native description-list term. */\n Term,\n};\n","import type { ReactElement, ReactNode } from 'react';\nimport { createElement } from 'react';\nimport { DialogTrigger as AriaDialogTrigger } from 'react-aria-components/Dialog';\nimport {\n SharedModalContent,\n type SharedModalContentProps,\n SharedOverlayClose,\n type SharedOverlayCloseProps,\n SharedOverlayDescription,\n type SharedOverlayDescriptionProps,\n SharedOverlayTitle,\n type SharedOverlayTitleProps,\n SharedOverlayTrigger,\n type SharedOverlayTriggerProps,\n} from '../../internal/react-aria/OverlayParts';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\ninterface DialogRootSharedProps {\n /** Trigger and content parts. */ children: ReactNode;\n}\ninterface ControlledDialogRootProps {\n /** Current open state. */ open: boolean;\n /** Called with the next open state. */ onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\ninterface ReadOnlyDialogRootProps {\n /** Current immutable open state. */ open: boolean;\n /** Marks controlled state as intentionally immutable. */ readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\ninterface UncontrolledDialogRootProps {\n /** Initial open state. Defaults to `false`. */ defaultOpen?: boolean;\n /** Called with the next open state. */ onOpenChange?: (\n open: boolean,\n ) => void;\n open?: never;\n readOnly?: false;\n}\n/** Props for controlled, read-only, or uncontrolled dialog state. */\nexport type DialogRootProps = DialogRootSharedProps &\n (\n | ControlledDialogRootProps\n | ReadOnlyDialogRootProps\n | UncontrolledDialogRootProps\n );\n/** Props for the dialog trigger action. */ export type DialogTriggerProps =\n SharedOverlayTriggerProps;\n/** Props for modal dialog content. */ export interface DialogContentProps\n extends Omit<SharedModalContentProps, 'modalState'> {\n /** Allows pointer dismissal outside the dialog. Defaults to `true`. */ dismissible?: boolean;\n /** Prevents Escape dismissal. Defaults to `false`. */ keyboardDismissDisabled?: boolean;\n}\n/** Props for the required accessible dialog title. */ export type DialogTitleProps =\n SharedOverlayTitleProps;\n/** Props for the required accessible dialog description. */ export type DialogDescriptionProps =\n SharedOverlayDescriptionProps;\n/** Props for a semantic dialog close action. */ export type DialogCloseProps =\n SharedOverlayCloseProps;\n\n/** Coordinates dialog trigger, open state, focus, and restoration. */\nexport function Root({\n defaultOpen,\n onOpenChange,\n open,\n readOnly: _readOnly,\n ...props\n}: Readonly<DialogRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaDialogTrigger, {\n ...props,\n defaultOpen,\n isOpen: open,\n onOpenChange,\n });\n}\n\n/**\n * Accessible compound modal dialog primitive.\n *\n * @summary modal content with focus containment and restoration\n */\nexport const Dialog = {\n /** Semantic action that closes the dialog and restores trigger focus. */\n Close: SharedOverlayClose,\n /** Modal surface, focus scope, backdrop, and dismissal boundary. */\n Content: SharedModalContent,\n /** Required accessible dialog description. */\n Description: SharedOverlayDescription,\n /** Controlled, read-only, or uncontrolled open-state coordinator. */\n Root,\n /** Required accessible dialog title. */\n Title: SharedOverlayTitle,\n /** Semantic action that opens the dialog. */\n Trigger: SharedOverlayTrigger,\n};\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { Disclosure as AriaDisclosure } from 'react-aria-components/Disclosure';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n SharedDisclosurePanel,\n type SharedDisclosurePanelProps,\n SharedDisclosureTrigger,\n type SharedDisclosureTriggerProps,\n} from '../../internal/react-aria/DisclosureParts';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst disclosureRoot = tv({\n base: 'border border-[var(--breeze-border)] bg-[var(--breeze-surface)]',\n});\n\ntype DisclosureRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'onChange' | 'style'\n>;\n\ninterface DisclosureRootSharedProps extends DisclosureRootNativeProps {\n /** Trigger and panel parts. */\n children: ReactNode;\n /** Prevents the trigger from changing state. Defaults to `false`. */\n disabled?: boolean;\n /** Ref to the rendered disclosure root. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledDisclosureRootProps {\n /** Current expanded state. */\n open: boolean;\n /** Called with the next expanded state. */\n onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyDisclosureRootProps {\n /** Current immutable expanded state. */\n open: boolean;\n /** Marks controlled state as intentionally immutable. */\n readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\n\ninterface UncontrolledDisclosureRootProps {\n /** Initial expanded state. Defaults to `false`. */\n defaultOpen?: boolean;\n /** Called with the next expanded state. */\n onOpenChange?: (open: boolean) => void;\n open?: never;\n readOnly?: false;\n}\n\n/** Props for controlled, read-only, or uncontrolled disclosure state. */\nexport type DisclosureRootProps = DisclosureRootSharedProps &\n (\n | ControlledDisclosureRootProps\n | ReadOnlyDisclosureRootProps\n | UncontrolledDisclosureRootProps\n );\n\n/** Props for the disclosure heading button. */\nexport type DisclosureTriggerProps = SharedDisclosureTriggerProps;\n\n/** Props for the collapsible disclosure content. */\nexport type DisclosurePanelProps = SharedDisclosurePanelProps;\n\n/** Coordinates the trigger and collapsible panel state. */\nexport function Root({\n className,\n defaultOpen,\n disabled = false,\n onOpenChange,\n open,\n readOnly: _readOnly,\n ref,\n ...props\n}: Readonly<DisclosureRootProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaDisclosure, {\n ...props,\n className: disclosureRoot({ class: className }),\n defaultExpanded: defaultOpen,\n isDisabled: disabled,\n isExpanded: open,\n onExpandedChange: onOpenChange,\n ref: useForwardedRef(ref),\n });\n}\n\n/**\n * Reveals supporting content from a labelled trigger while preserving controlled,\n * read-only, and uncontrolled state ownership.\n *\n * @summary collapsible supporting content with accessible trigger semantics\n */\nexport const Disclosure = {\n /** Collapsible panel content. */\n Panel: SharedDisclosurePanel,\n /** State and semantic root. */\n Root,\n /** Heading button that toggles the panel. */\n Trigger: SharedDisclosureTrigger,\n};\n","import type {\n FieldsetHTMLAttributes,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport {\n createContext,\n createElement,\n useContext,\n useId,\n useMemo,\n} from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst fieldsetRoot = tv({\n base: 'm-0 flex min-w-0 flex-col gap-3 border-0 p-0 disabled:opacity-70',\n});\n\nconst fieldsetLegend = tv({\n base: 'mb-1 p-0 font-[family-name:var(--breeze-font-display)] text-base font-bold text-[var(--breeze-ink)]',\n});\n\nconst fieldsetDescription = tv({\n base: 'text-sm text-[var(--breeze-ink-soft)]',\n});\n\nconst fieldsetError = tv({\n base: 'text-sm font-medium text-[var(--breeze-danger)]',\n});\n\ninterface FieldsetContextValue {\n descriptionId: string;\n errorId: string;\n}\n\nconst FieldsetContext = createContext<FieldsetContextValue | null>(null);\n\nfunction useFieldsetContext(): FieldsetContextValue {\n const context = useContext(FieldsetContext);\n\n if (context === null) {\n throw new globalThis.Error(\n 'Fieldset parts must be rendered within Fieldset.Root.',\n );\n }\n\n return context;\n}\n\n/** Props for a native group of related form controls. */\nexport interface FieldsetRootProps\n extends Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'style'> {\n /** Legend, description, error, and related controls. */\n children: ReactNode;\n /** Exposes invalid group state to assistive technology and error association. Defaults to `false`. */\n invalid?: boolean;\n /** Ref to the rendered fieldset. */\n ref?: Ref<HTMLFieldSetElement>;\n}\n\n/** Props for the native fieldset legend. */\nexport interface FieldsetLegendProps\n extends Omit<HTMLAttributes<HTMLLegendElement>, 'style'> {\n /** Persistent group name. */\n children: ReactNode;\n /** Ref to the rendered legend. */\n ref?: Ref<HTMLLegendElement>;\n}\n\n/** Props for supporting text associated with the fieldset. */\nexport interface FieldsetDescriptionProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'id' | 'style'> {\n /** Supporting guidance for the control group. */\n children: ReactNode;\n /** Ref to the rendered description. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Props for an accessible fieldset validation message. */\nexport interface FieldsetErrorProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'id' | 'style'> {\n /** Validation message for the control group. */\n children: ReactNode;\n /** Ref to the rendered error message. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Renders a native form-control group with associated compound guidance. */\nexport function Root({\n 'aria-describedby': ariaDescribedBy,\n children,\n className,\n invalid = false,\n ref,\n ...props\n}: Readonly<FieldsetRootProps>): ReactElement {\n useBreezeContext();\n\n const generatedId = useId();\n const descriptionId = `${generatedId}-description`;\n const errorId = `${generatedId}-error`;\n const forwardedRef = useForwardedRef(ref);\n const contextValue = useMemo(\n () => ({ descriptionId, errorId }),\n [descriptionId, errorId],\n );\n const describedBy = [\n ariaDescribedBy,\n descriptionId,\n invalid ? errorId : undefined,\n ]\n .filter(Boolean)\n .join(' ');\n\n return createElement(\n FieldsetContext.Provider,\n { value: contextValue },\n createElement(\n 'fieldset',\n {\n ...props,\n 'aria-describedby': describedBy,\n 'aria-invalid': invalid || undefined,\n className: fieldsetRoot({ class: className }),\n ref: forwardedRef,\n },\n children,\n ),\n );\n}\n\n/** Renders the native accessible name for a Fieldset. */\nexport function Legend({\n className,\n ref,\n ...props\n}: Readonly<FieldsetLegendProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('legend', {\n ...props,\n className: fieldsetLegend({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders supporting guidance associated with a Fieldset. */\nexport function Description({\n className,\n ref,\n ...props\n}: Readonly<FieldsetDescriptionProps>): ReactElement {\n const { descriptionId } = useFieldsetContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('p', {\n ...props,\n className: fieldsetDescription({ class: className }),\n id: descriptionId,\n ref: forwardedRef,\n });\n}\n\n/** Renders a validation message associated with an invalid Fieldset. */\nfunction ErrorMessage({\n className,\n ref,\n ...props\n}: Readonly<FieldsetErrorProps>): ReactElement {\n const { errorId } = useFieldsetContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('p', {\n ...props,\n className: fieldsetError({ class: className }),\n id: errorId,\n ref: forwardedRef,\n });\n}\n\nexport { ErrorMessage as Error };\n\n/**\n * Groups related form controls with native fieldset and legend semantics plus\n * associated guidance and group-level validation feedback.\n *\n * @summary native form-control group with accessible compound guidance\n */\nexport const Fieldset = {\n /** Supporting guidance associated with the group. */\n Description,\n /** Validation message associated with an invalid group. */\n Error: ErrorMessage,\n /** Persistent native group name. */\n Legend,\n /** Native fieldset and accessibility root. */\n Root,\n};\n","import { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport {\n gapClasses,\n type LayoutElementProps,\n type ResponsiveSpace,\n} from '../../internal/styling/layout';\nimport {\n resolveResponsiveClasses,\n type ResponsiveValue,\n} from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\ntype GridColumns = 1 | 2 | 3 | 4 | 6 | 12;\n\nconst columnClasses = {\n base: {\n 1: 'grid-cols-1',\n 12: 'grid-cols-12',\n 2: 'grid-cols-2',\n 3: 'grid-cols-3',\n 4: 'grid-cols-4',\n 6: 'grid-cols-6',\n },\n lg: {\n 1: 'lg:grid-cols-1',\n 12: 'lg:grid-cols-12',\n 2: 'lg:grid-cols-2',\n 3: 'lg:grid-cols-3',\n 4: 'lg:grid-cols-4',\n 6: 'lg:grid-cols-6',\n },\n md: {\n 1: 'md:grid-cols-1',\n 12: 'md:grid-cols-12',\n 2: 'md:grid-cols-2',\n 3: 'md:grid-cols-3',\n 4: 'md:grid-cols-4',\n 6: 'md:grid-cols-6',\n },\n sm: {\n 1: 'sm:grid-cols-1',\n 12: 'sm:grid-cols-12',\n 2: 'sm:grid-cols-2',\n 3: 'sm:grid-cols-3',\n 4: 'sm:grid-cols-4',\n 6: 'sm:grid-cols-6',\n },\n} as const;\n\nconst grid = tv({\n base: 'grid',\n defaultVariants: {\n align: 'stretch',\n template: 'equal',\n },\n variants: {\n align: {\n center: 'items-center',\n end: 'items-end',\n start: 'items-start',\n stretch: 'items-stretch',\n },\n template: {\n equal: '',\n 'field-control-action':\n 'grid-cols-[minmax(0,1fr)_auto_auto] [&>:last-child]:size-11',\n },\n },\n});\n\n/** Canonical unequal-track arrangements for reusable form rows. */\nexport type GridTemplate = 'field-control-action';\n\n/** Props for a bounded responsive column layout. */\nexport interface GridProps extends LayoutElementProps {\n /** Alignment of children within their grid cells. Defaults to `stretch`. */\n align?: 'start' | 'center' | 'end' | 'stretch';\n /** Responsive column count. Defaults to one column. */\n columns?: ResponsiveValue<GridColumns>;\n /** Responsive row and column gap. Defaults to `lg`. */\n gap?: ResponsiveSpace;\n /** Canonical unequal tracks. Excludes equal `columns` while active. */\n template?: GridTemplate;\n}\n\n/**\n * Arranges related content in bounded responsive columns while preserving the\n * authored source order across every breakpoint.\n *\n * @summary bounded responsive columns with stable source order\n */\nexport function Grid({\n align,\n className,\n columns = 1,\n gap = 'lg',\n template,\n ...props\n}: Readonly<GridProps>) {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: grid({\n align,\n class: [\n template === undefined\n ? resolveResponsiveClasses(columns, columnClasses)\n : undefined,\n resolveResponsiveClasses(gap, gapClasses),\n className,\n ],\n template: template ?? 'equal',\n }),\n });\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n GridList as AriaGridList,\n GridListHeader as AriaGridListHeader,\n GridListItem as AriaGridListItem,\n GridListLoadMoreItem as AriaGridListLoadMoreItem,\n GridListSection as AriaGridListSection,\n} from 'react-aria-components/GridList';\nimport { tv } from 'tailwind-variants';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useLoadMoreHandler from '../../internal/collections/useLoadMoreHandler';\nimport VirtualizedCollection, {\n collectionViewportStyle,\n} from '../../internal/collections/VirtualizedCollection';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n CollectionSelection,\n CollectionVirtualization,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst gridListRoot = tv({\n base: 'grid min-w-0 gap-2 outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n defaultVariants: {\n layout: 'stack',\n virtualized: false,\n },\n variants: {\n layout: {\n grid: 'grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))]',\n stack: 'grid-cols-1',\n },\n virtualized: {\n false: '',\n true: 'overflow-auto',\n },\n },\n});\n\nconst gridListItem = tv({\n base: 'flex min-h-11 min-w-0 items-center border border-b-2 border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] px-4 py-3 text-[var(--breeze-ink)] outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[selected]:border-[var(--breeze-primary)] data-[selected]:bg-[var(--breeze-primary-soft)] forced-colors:data-[selected]:border-[Highlight]',\n});\n\nconst gridListSection = tv({ base: 'grid gap-2' });\n\nconst gridListHeader = tv({\n base: 'font-[family-name:var(--breeze-font-display)] text-base font-bold text-[var(--breeze-ink)]',\n});\n\nconst gridListLoadMore = tv({\n base: 'flex min-h-11 items-center justify-center px-4 py-3 text-sm text-[var(--breeze-ink-muted)]',\n});\n\ninterface GridListVirtualizationLayout {\n /** Maximum responsive grid column count. Defaults to the available width. */\n maximumColumns?: number;\n /** Minimum grid item width in pixels. Defaults to `224`. */\n minimumItemWidth?: number;\n}\n\n/** Breeze virtualization configuration with optional responsive grid sizing. */\nexport type GridListVirtualization = CollectionVirtualization &\n GridListVirtualizationLayout;\n\ntype GridListRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface GridListRootSharedProps extends GridListRootNativeProps {\n /** Keys whose items cannot receive focus, selection, or actions. */\n disabledKeys?: Iterable<CollectionKey>;\n /** Content displayed when the collection has no items. */\n emptyContent?: ReactNode;\n /** Arranges items as one stack or a responsive wrapping grid. Defaults to `stack`. */\n layout?: 'stack' | 'grid';\n /** Enables multiple selection. Defaults to `false`. */\n multiple?: boolean;\n /** Primary arrow-key navigation axis. Defaults to `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered grid element. */\n ref?: Ref<HTMLDivElement>;\n /** Optional fixed- or variable-height windowing configuration. */\n virtualization?: GridListVirtualization;\n}\n\ninterface ControlledGridListRootProps {\n /** Current selected keys. */\n selection: CollectionSelection;\n /** Called with the next selected keys. */\n onSelectionChange: (selection: CollectionSelection) => void;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Controlled mutable state cannot be marked read-only. */\n readOnly?: false;\n}\n\ninterface ReadOnlyGridListRootProps {\n /** Current immutable selected keys. */\n selection: CollectionSelection;\n /** Marks controlled selection as intentionally immutable. */\n readOnly: true;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n}\n\ninterface UncontrolledGridListRootProps {\n /** Initial selected keys. Defaults to an empty selection. */\n defaultSelection?: CollectionSelection;\n /** Called with the next selected keys. */\n onSelectionChange?: (selection: CollectionSelection) => void;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n /** Excluded when selection is uncontrolled. */\n selection?: never;\n}\n\n/** Props for a static or generic, controlled, read-only, or uncontrolled grid list. */\nexport type GridListRootProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = GridListRootSharedProps &\n CollectionContentProps<Item> &\n (\n | ControlledGridListRootProps\n | ReadOnlyGridListRootProps\n | UncontrolledGridListRootProps\n );\n\n/** Props for one interactive grid-list row. */\nexport interface GridListItemProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Visible row content, including any independently focusable controls. */\n children: ReactNode;\n /** Prevents focus, selection, and actions for this row. Defaults to `false`. */\n disabled?: boolean;\n /** Stable string or number row key. */\n id: CollectionKey;\n /** Called with this row key when its action is invoked. */\n onAction?: (key: CollectionKey) => void;\n /** Ref to the rendered row. */\n ref?: Ref<HTMLDivElement>;\n /** Plain-text representation used for typeahead and accessibility. */\n textValue: string;\n}\n\n/** Props for one static grid-list section. */\nexport interface GridListSectionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'style'> {\n /** Section header followed by keyed grid-list items. */\n children: ReactNode;\n /** Stable string or number section key. */\n id: CollectionKey;\n /** Ref to the rendered section. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for a visible grid-list section heading. */\nexport interface GridListHeaderProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Ref to the rendered section heading. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for a grid-list loading row and load-more sentinel. */\nexport interface GridListLoadMoreProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Visible loading-row content. */\n children: ReactNode;\n /** Shows the loading row and suppresses duplicate requests. Defaults to `false`. */\n loading?: boolean;\n /** Called once when more consumer-owned items should be requested. */\n onLoadMore: () => void | Promise<void>;\n /** Trigger distance as a proportion of the scroll viewport. Defaults to `1`. */\n offset?: number;\n /** Ref to the rendered loading row. */\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction normaliseSelection(\n selection: 'all' | Set<CollectionKey>,\n): CollectionSelection {\n return selection === 'all' ? 'all' : [...selection];\n}\n\n/** Coordinates grid semantics, focus, typeahead, row actions, and selection. */\nexport function Root<Item extends BreezeCollectionItem>({\n children,\n className,\n defaultSelection,\n disabledKeys,\n emptyContent,\n items,\n layout = 'stack',\n multiple = false,\n onSelectionChange,\n orientation = 'vertical',\n readOnly = false,\n ref,\n selection,\n virtualization,\n ...props\n}: Readonly<GridListRootProps<Item>>): ReactElement {\n const { direction } = useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n\n const gridList = createElement(AriaGridList, {\n ...props,\n 'aria-readonly': readOnly || undefined,\n children,\n className: gridListRoot({\n class: className,\n layout,\n virtualized: virtualization !== undefined,\n }),\n 'data-virtualized': virtualization === undefined ? undefined : 'true',\n defaultSelectedKeys: defaultSelection,\n disabledKeys,\n items,\n layout,\n onSelectionChange: (nextSelection: 'all' | Set<CollectionKey>) =>\n onSelectionChange?.(normaliseSelection(nextSelection)),\n orientation,\n ref: forwardedRef,\n renderEmptyState: () => resolvedEmptyContent,\n selectedKeys: selection,\n selectionMode: multiple ? 'multiple' : 'single',\n style: collectionViewportStyle(virtualization),\n } as unknown as ComponentProps<typeof AriaGridList>);\n\n return virtualization === undefined\n ? gridList\n : createElement(\n VirtualizedCollection,\n {\n configuration: virtualization,\n direction,\n kind: layout === 'grid' ? 'grid' : 'list',\n maximumColumns: virtualization.maximumColumns,\n minimumItemWidth: virtualization.minimumItemWidth,\n orientation,\n },\n gridList,\n );\n}\n\n/** Renders one keyed interactive row within a grid list. */\nexport function Item({\n className,\n disabled = false,\n id,\n onAction,\n ref,\n textValue,\n ...props\n}: Readonly<GridListItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaGridListItem, {\n ...props,\n className: gridListItem({ class: className }),\n id,\n isDisabled: disabled,\n onAction: onAction === undefined ? undefined : () => onAction(id),\n ref: forwardedRef,\n textValue,\n });\n}\n\n/** Groups related grid-list rows under a stable collection key. */\nexport function Section({\n className,\n ref,\n ...props\n}: Readonly<GridListSectionProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaGridListSection, {\n ...props,\n className: gridListSection({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the visible heading for a grid-list section. */\nexport function Header({\n className,\n ref,\n ...props\n}: Readonly<GridListHeaderProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaGridListHeader, {\n ...props,\n className: gridListHeader({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders a loading row and deduplicated intersection sentinel. */\nexport function LoadMore({\n className,\n loading = false,\n offset = 1,\n onLoadMore,\n ref,\n ...props\n}: Readonly<GridListLoadMoreProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const handleLoadMore = useLoadMoreHandler({ loading, onLoadMore });\n\n return createElement(AriaGridListLoadMoreItem, {\n ...props,\n className: gridListLoadMore({ class: className }),\n isLoading: loading,\n onLoadMore: handleLoadMore,\n ref: forwardedRef,\n scrollOffset: offset,\n });\n}\n\n/**\n * Presents selectable interactive rows that may contain embedded controls,\n * static sections, responsive grids, or application-configured virtualization.\n *\n * @summary accessible selectable rows with embedded controls\n */\nexport const GridList = {\n /** Visible section heading. */\n Header,\n /** One keyed interactive row. */\n Item,\n /** Loading row and deduplicated load-more sentinel. */\n LoadMore,\n /** Grid semantics, focus, actions, and selection root. */\n Root,\n /** Stable grouping for related rows. */\n Section,\n};\n","import { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport {\n gapClasses,\n type LayoutElementProps,\n type ResponsiveSpace,\n} from '../../internal/styling/layout';\nimport { resolveResponsiveClasses } from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst inline = tv({\n base: 'flex flex-row',\n defaultVariants: {\n align: 'center',\n justify: 'start',\n wrap: true,\n },\n variants: {\n align: {\n baseline: 'items-baseline',\n center: 'items-center',\n end: 'items-end',\n start: 'items-start',\n stretch: 'items-stretch',\n },\n justify: {\n around: 'justify-around',\n between: 'justify-between',\n center: 'justify-center',\n end: 'justify-end',\n evenly: 'justify-evenly',\n start: 'justify-start',\n },\n wrap: {\n false: 'flex-nowrap',\n true: 'flex-wrap',\n },\n },\n});\n\n/** Props for a horizontal layout of related content. */\nexport interface InlineProps extends LayoutElementProps {\n /** Cross-axis alignment. Defaults to `center`. */\n align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';\n /** Responsive space between children. Defaults to `md`. */\n gap?: ResponsiveSpace;\n /** Main-axis distribution. Defaults to `start`. */\n justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';\n /** Whether children may flow onto additional rows. Defaults to `true`. */\n wrap?: boolean;\n}\n\n/**\n * Arranges related content along the inline axis with bounded alignment,\n * distribution, responsive spacing, and wrapping controls.\n *\n * @summary horizontal layout with responsive spacing and wrapping\n */\nexport function Inline({\n align,\n className,\n gap = 'md',\n justify,\n wrap,\n ...props\n}: Readonly<InlineProps>) {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: inline({\n align,\n class: [resolveResponsiveClasses(gap, gapClasses), className],\n justify,\n wrap,\n }),\n });\n}\n","import type {\n ComponentProps,\n MouseEvent,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Link as AriaLink } from 'react-aria-components/Link';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport action from '../../internal/styling/actions';\nimport type {\n ControlSize,\n VisualAppearance,\n VisualVariant,\n} from '../../internal/styling/visual';\nimport type { NativeLinkProps } from '../../internal/types/native';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for navigation presented with button emphasis. */\nexport interface LinkButtonProps extends NativeLinkProps {\n /** Visual emphasis treatment. Defaults to `solid`. */\n appearance?: VisualAppearance;\n /** Link content. */\n children: ReactNode;\n /** Placement and composition classes. */\n className?: string;\n /** Prevents navigation. Defaults to `false`. */\n disabled?: boolean;\n /** Prompts download instead of navigation when provided. */\n download?: boolean | string;\n /** Native destination URL. */\n href: string;\n /** Ref to the rendered anchor. */\n ref?: Ref<HTMLAnchorElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n /** Semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\nfunction isLocalNavigation(\n href: string,\n target: string | undefined,\n download: LinkButtonProps['download'],\n): boolean {\n return (\n href.startsWith('/') &&\n !href.startsWith('//') &&\n download !== true &&\n typeof download !== 'string' &&\n (target === undefined || target === '_self')\n );\n}\n\n/**\n * Navigates like a link while using the visual hierarchy of an action button.\n *\n * @summary router-neutral navigation with canonical button emphasis\n */\nexport function LinkButton({\n appearance,\n children,\n className,\n disabled = false,\n download,\n href,\n ref,\n size,\n target,\n variant,\n ...props\n}: Readonly<LinkButtonProps>): ReactElement {\n const { router } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const useRouter =\n router !== undefined && isLocalNavigation(href, target, download);\n const routerClick = {\n onClick: (event: MouseEvent<Element>) => {\n if (\n useRouter &&\n event.button === 0 &&\n !event.altKey &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.shiftKey\n ) {\n event.preventDefault();\n router.navigate(href);\n }\n },\n };\n\n return createElement(\n AriaLink,\n {\n ...props,\n ...routerClick,\n className: action({\n appearance,\n class: className,\n size,\n variant,\n }),\n download,\n href,\n isDisabled: disabled,\n ref: forwardedRef,\n render: (renderProps) => {\n if (disabled || !('href' in renderProps)) {\n return createElement('span', {\n ...renderProps,\n href: undefined,\n } as unknown as ComponentProps<'span'>);\n }\n\n return createElement('a', {\n ...props,\n ...renderProps,\n });\n },\n target,\n } as ComponentProps<typeof AriaLink>,\n children,\n );\n}\n","import type { HTMLAttributes, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst listRoot = tv({\n base: 'm-0 grid gap-2 ps-6 text-[var(--breeze-ink)] marker:text-[var(--breeze-ink-muted)]',\n defaultVariants: {\n ordered: false,\n },\n variants: {\n ordered: {\n false: 'list-disc',\n true: 'list-decimal',\n },\n },\n});\n\nconst listItem = tv({ base: 'min-w-0 ps-1' });\n\n/** Props for a native ordered or unordered content list. */\nexport interface ListRootProps\n extends Omit<HTMLAttributes<HTMLOListElement | HTMLUListElement>, 'style'> {\n /** Renders an ordered list when true and an unordered list otherwise. Defaults to `false`. */\n ordered?: boolean;\n /** Ref to the rendered ordered or unordered list element. */\n ref?: Ref<HTMLOListElement | HTMLUListElement>;\n}\n\n/** Props for one semantic content-list item. */\nexport interface ListItemProps\n extends Omit<HTMLAttributes<HTMLLIElement>, 'style'> {\n /** Ref to the rendered list item. */\n ref?: Ref<HTMLLIElement>;\n}\n\n/** Renders a native ordered or unordered list without interactive collection behaviour. */\nexport function Root({\n className,\n ordered = false,\n ref,\n ...props\n}: Readonly<ListRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(ordered ? 'ol' : 'ul', {\n ...props,\n className: listRoot({ class: className, ordered }),\n ref: forwardedRef,\n });\n}\n\n/** Renders one native list item. */\nexport function Item({\n className,\n ref,\n ...props\n}: Readonly<ListItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('li', {\n ...props,\n className: listItem({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/**\n * Semantic ordered or unordered content list with no selection behaviour.\n *\n * @summary native ordered and unordered lists for structured content\n */\nexport const List = {\n /** One native list item. */\n Item,\n /** Ordered or unordered native list container. */\n Root,\n};\n","import type { HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst logo = tv({\n base: 'inline-flex items-center',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'text-2xl',\n md: 'text-xl',\n sm: 'text-base',\n },\n },\n});\n\n/** Props for the canonical Motech Development mark. */\nexport interface LogoProps\n extends Omit<\n HTMLAttributes<HTMLSpanElement>,\n | 'aria-hidden'\n | 'aria-label'\n | 'aria-labelledby'\n | 'children'\n | 'color'\n | 'style'\n > {\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical logo size. Defaults to `md`. */\n size?: 'sm' | 'md' | 'lg';\n}\n\n/**\n * Renders the canonical Motech Development mark without application-owned text.\n *\n * @summary canonical accessible Motech Development brand mark\n */\nexport function Logo({ className, ref, size, ...props }: Readonly<LogoProps>) {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'span',\n {\n ...props,\n 'aria-label': 'Motech Development',\n className: logo({\n class: className,\n size,\n }),\n ref: forwardedRef,\n role: 'img',\n },\n <svg\n aria-hidden=\"true\"\n className=\"h-[1.2em] w-[1.04em]\"\n viewBox=\"0 0 345.21 398.61\"\n >\n <polygon\n fill=\"var(--breeze-brand-mark)\"\n points=\"172.6 199.31 57.53 132.87 57.53 332.18 0 298.96 0 99.65 172.6 0 345.21 99.65 345.21 298.96 287.67 332.18 287.67 132.87 172.6 199.31\"\n />\n <polygon\n fill=\"var(--breeze-brand-mark)\"\n points=\"115.07 365.39 115.07 232.53 172.6 265.74 230.14 232.53 230.14 365.39 172.6 398.61 115.07 365.39\"\n />\n </svg>,\n );\n}\n","import type {\n ComponentPropsWithRef,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { useMeter } from 'react-aria/useMeter';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst meterRoot = tv({ base: 'grid min-w-0 gap-2 text-sm' });\nconst meterHeader = tv({\n base: 'flex min-w-0 items-baseline justify-between gap-4',\n});\nconst meterTrack = tv({\n base: 'h-3 w-full overflow-hidden border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] forced-colors:border-[CanvasText]',\n});\nconst meterFill = tv({\n base: 'h-full forced-colors:bg-[Highlight]',\n defaultVariants: {\n variant: 'primary',\n },\n variants: {\n variant: {\n danger: 'bg-[var(--breeze-danger)]',\n dark: 'bg-[var(--breeze-shell)]',\n info: 'bg-[var(--breeze-info)]',\n light: 'bg-[var(--breeze-surface)]',\n primary: 'bg-[var(--breeze-primary)]',\n secondary: 'bg-[var(--breeze-ink-soft)]',\n success: 'bg-[var(--breeze-success)]',\n warning: 'bg-[var(--breeze-warning)]',\n },\n },\n});\n\ntype MeterNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'role' | 'style'\n>;\n\n/** Props for a scalar measurement within a known range. */\nexport interface MeterProps extends MeterNativeProps {\n /** Visible application-owned translated measurement label. */\n label: ReactNode;\n /** Finite maximum range value, greater than or equal to `minimum`. Defaults to `100`. */\n maximum?: number;\n /** Finite minimum range value. Defaults to `0`. */\n minimum?: number;\n /** Ref to the rendered meter element. */\n ref?: Ref<HTMLDivElement>;\n /** Current measurement. Finite values are clamped to the configured range. */\n value: number;\n /** Optional translated value announced instead of the numeric value. */\n valueText?: ReactNode;\n /** Bootstrap-aligned semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\n/**\n * Displays a scalar measurement with explicit range semantics.\n *\n * @summary labelled scalar measurement within a known finite range\n */\nexport function Meter({\n className,\n label,\n maximum = 100,\n minimum = 0,\n ref,\n value,\n valueText,\n variant = 'primary',\n ...props\n}: Readonly<MeterProps>): ReactElement {\n useBreezeContext();\n\n if (\n !Number.isFinite(minimum) ||\n !Number.isFinite(maximum) ||\n maximum < minimum\n ) {\n throw new RangeError(\n 'Meter bounds must be finite and maximum must be greater than or equal to minimum.',\n );\n }\n\n const clampedValue = Number.isFinite(value)\n ? Math.min(maximum, Math.max(minimum, value))\n : value;\n const { labelProps, meterProps } = useMeter({\n label,\n maxValue: maximum,\n minValue: minimum,\n value: clampedValue,\n valueLabel: valueText,\n });\n const range = maximum - minimum;\n const percentage =\n range === 0\n ? 0\n : Math.min(100, Math.max(0, ((clampedValue - minimum) / range) * 100));\n const rootProps: ComponentPropsWithRef<'div'> & {\n 'data-variant': VisualVariant;\n } = {\n ...props,\n ...meterProps,\n className: meterRoot({ class: className }),\n 'data-variant': variant,\n ref: useForwardedRef(ref),\n role: 'meter',\n };\n\n return createElement(\n 'div',\n rootProps,\n createElement(\n 'div',\n {\n className: meterHeader(),\n },\n createElement('span', labelProps, label),\n createElement(\n 'span',\n { 'aria-hidden': 'true' },\n valueText ?? clampedValue,\n ),\n ),\n createElement(\n 'div',\n {\n 'aria-hidden': 'true',\n className: meterTrack(),\n },\n createElement('div', {\n className: meterFill({ variant }),\n style: {\n width: `${Number.isFinite(percentage) ? percentage : 0}%`,\n },\n }),\n ),\n );\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { CollectionKey } from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { Link } from '../Link/Link';\n\nconst navigationList = tv({\n base: 'flex gap-1',\n defaultVariants: { orientation: 'vertical' },\n variants: {\n orientation: {\n horizontal: 'flex-row flex-wrap items-center',\n vertical: 'flex-col items-stretch',\n },\n },\n});\nconst navigationItem = tv({\n base: 'block min-h-10 px-3 py-2 no-underline data-[current]:bg-[var(--breeze-primary-soft)] data-[current]:font-semibold',\n});\n\n/** Props for a semantic application navigation list. */\nexport interface NavigationListRootProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Navigation items. */\n children: ReactNode;\n /** Layout direction. Defaults to `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered navigation landmark. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Props for one navigation destination. */\nexport interface NavigationListItemProps\n extends Omit<\n HTMLAttributes<HTMLLIElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Visible destination label. */\n children: ReactNode;\n /** Marks this destination as the current page. Defaults to `false`. */\n current?: boolean;\n /** Prevents navigation and action. Defaults to `false`. */\n disabled?: boolean;\n /** Destination URL. */\n href: string;\n /** Stable string or number destination key. */\n id: CollectionKey;\n /** Called with this destination key after activation. */\n onAction?: (key: CollectionKey) => void;\n /** Ref to the rendered list item. */\n ref?: Ref<HTMLLIElement>;\n}\n\n/** Renders a navigation landmark with horizontal or vertical list layout. */\nexport function Root({\n children,\n className,\n orientation = 'vertical',\n ref,\n ...props\n}: Readonly<NavigationListRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'nav',\n {\n ...props,\n ref: forwardedRef,\n },\n <ul className={navigationList({ class: className, orientation })}>\n {children}\n </ul>,\n );\n}\n\n/** Renders one router-neutral navigation destination. */\nexport function Item({\n children,\n className,\n current = false,\n disabled = false,\n href,\n id,\n onAction,\n ref,\n ...props\n}: Readonly<NavigationListItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n 'li',\n {\n ...props,\n ref: forwardedRef,\n },\n <Link\n aria-current={current ? 'page' : undefined}\n className={navigationItem({ class: className })}\n data-current={current || undefined}\n disabled={disabled}\n href={href}\n onAction={disabled ? undefined : () => onAction?.(id)}\n >\n {children}\n </Link>,\n );\n}\n\n/**\n * Semantic compound navigation-list primitive.\n *\n * @summary labelled persistent navigation with current destination state\n */\nexport const NavigationList = {\n /** One keyed destination. */\n Item,\n /** Navigation landmark and list root. */\n Root,\n};\n","import type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n InputHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport { Group as AriaGroup } from 'react-aria-components/Group';\nimport { Input as AriaInput } from 'react-aria-components/Input';\nimport { NumberField as AriaNumberField } from 'react-aria-components/NumberField';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport formControlValue from '../../internal/styling/formControls';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst numberFieldRoot = tv({\n base: 'flex min-w-0 flex-col gap-1.5',\n});\n\nconst numberFieldGroup = tv({\n base: \"breeze-number-field-group group/number-field-control relative inline-flex min-w-0 items-stretch bg-[var(--breeze-surface)] outline-none after:pointer-events-none after:absolute after:inset-0 after:z-10 after:border after:border-[var(--breeze-border-strong)] after:transition-colors after:duration-[var(--breeze-duration-fast)] after:content-[''] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 data-[hovered]:after:border-[var(--breeze-primary)] data-[invalid]:after:!border-[var(--breeze-danger)]\",\n});\n\nconst numberFieldInput = tv({\n base: 'min-w-0 flex-1 border-0 bg-transparent text-left text-[var(--breeze-ink)] outline-none group-has-[button]/number-field-control:text-center disabled:cursor-not-allowed read-only:cursor-default',\n});\n\nconst stepButton = tv({\n base: 'inline-flex shrink-0 items-center justify-center border-0 bg-transparent font-bold text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[hovered]:text-[var(--breeze-primary)] disabled:cursor-not-allowed disabled:opacity-55 group-data-[disabled]/number-field-control:opacity-100',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-12 text-base',\n md: 'size-11 text-base',\n sm: 'size-8 text-xs',\n },\n },\n});\n\ntype NumberFieldRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface NumberFieldRootSharedProps extends NumberFieldRootNativeProps {\n /** Compound label, group, input, stepper, description, and error parts. */\n children: ReactNode;\n /** Prevents editing, stepping, and focus. Defaults to `false`. */\n disabled?: boolean;\n /** Locale-aware number formatting options. */\n formatOptions?: Intl.NumberFormatOptions;\n /** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Largest permitted value. */\n max?: number;\n /** Smallest permitted value. */\n min?: number;\n /** Marks the field as required for native validation and assistive technology. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered field container. */\n ref?: Ref<HTMLDivElement>;\n /** Amount applied by stepper buttons and arrow keys. Defaults to `1`. */\n step?: number;\n}\n\ninterface ControlledNumberFieldRootProps {\n /** Current number, or `null` for an empty input. */\n value: number | null;\n /** Called with the next number, or `null` when the input becomes empty. */\n onChange: (value: number | null) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyNumberFieldRootProps {\n /** Current immutable number, or `null` for an empty input. */\n value: number | null;\n /** Marks a controlled value as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledNumberFieldRootProps {\n /** Initial number, or `null` for an empty input. */\n defaultValue?: number | null;\n /** Called with the next number, or `null` when the input becomes empty. */\n onChange?: (value: number | null) => void;\n readOnly?: false;\n value?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled numeric field state. */\nexport type NumberFieldRootProps = NumberFieldRootSharedProps &\n (\n | ControlledNumberFieldRootProps\n | ReadOnlyNumberFieldRootProps\n | UncontrolledNumberFieldRootProps\n );\n\n/** Props for the visible numeric field label. */\nexport type NumberFieldLabelProps = TextFieldLabelProps;\n\n/** Props for the numeric input and stepper layout group. */\nexport interface NumberFieldGroupProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Numeric input and stepper buttons. */\n children: ReactNode;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for the native locale-aware numeric input part. */\nexport interface NumberFieldInputProps\n extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n | 'children'\n | 'className'\n | 'defaultValue'\n | 'disabled'\n | 'max'\n | 'min'\n | 'onChange'\n | 'readOnly'\n | 'required'\n | 'size'\n | 'step'\n | 'style'\n | 'type'\n | 'value'\n > {\n /** Placement and composition classes. */\n className?: string;\n /** Ref to the rendered input. */\n ref?: Ref<HTMLInputElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props shared by numeric increment and decrement actions. */\nexport interface NumberFieldStepButtonProps\n extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'onClick' | 'onClickCapture' | 'style' | 'type'\n > {\n /** Accessible action name describing the step direction. */\n 'aria-label': string;\n /** Visible stepper content. */\n children: ReactNode;\n /** Ref to the rendered stepper button. */\n ref?: Ref<HTMLButtonElement>;\n /** Canonical square control size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for supporting text associated with the numeric input. */\nexport type NumberFieldDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible numeric validation message. */\nexport type NumberFieldErrorProps = TextFieldErrorProps;\n\n/** Coordinates locale-aware numeric state, constraints, and compound anatomy. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n formatOptions,\n invalid = false,\n max,\n min,\n onChange,\n readOnly = false,\n ref,\n required = false,\n step,\n value,\n ...props\n}: Readonly<NumberFieldRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const normaliseValue = (nextValue: number) =>\n onChange?.(Number.isNaN(nextValue) ? null : nextValue);\n\n return createElement(\n AriaNumberField,\n {\n ...props,\n className: numberFieldRoot({ class: className }),\n defaultValue: defaultValue === null ? Number.NaN : defaultValue,\n formatOptions,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: max,\n minValue: min,\n onChange: normaliseValue,\n ref: forwardedRef,\n step,\n value: value === null ? Number.NaN : value,\n } as ComponentProps<typeof AriaNumberField>,\n children,\n );\n}\n\n/** Groups the NumberField input and stepper buttons as one interactive control. */\nexport function Group({\n className,\n ref,\n ...props\n}: Readonly<NumberFieldGroupProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaGroup, {\n ...props,\n className: numberFieldGroup({ class: className }),\n 'data-breeze-number-field-group': '',\n ref: forwardedRef,\n } as ComponentProps<typeof AriaGroup>);\n}\n\n/** Renders the editable locale-aware spinbutton for a NumberField. */\nexport function Input({\n className,\n ref,\n size,\n ...props\n}: Readonly<NumberFieldInputProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaInput, {\n ...props,\n className: formControlValue({\n class: numberFieldInput({ class: className }),\n size,\n }),\n ref: forwardedRef,\n });\n}\n\ninterface NumberFieldStepButtonInternalProps\n extends Omit<NumberFieldStepButtonProps, 'children'> {\n children?: ReactNode;\n slot: 'decrement' | 'increment';\n}\n\nfunction NumberFieldStepButton({\n className,\n ref,\n size,\n slot,\n ...props\n}: Readonly<NumberFieldStepButtonInternalProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaButton, {\n ...props,\n className: stepButton({ class: className, size }),\n ref: forwardedRef,\n slot,\n type: 'button',\n } as ComponentProps<typeof AriaButton>);\n}\n\n/** Decreases the NumberField value by its configured step. */\nexport function DecrementButton({\n 'aria-label': ariaLabel,\n children,\n ref,\n size,\n ...props\n}: Readonly<NumberFieldStepButtonProps>): ReactElement {\n return createElement(\n NumberFieldStepButton,\n {\n ...props,\n 'aria-label': ariaLabel,\n ref,\n size,\n slot: 'decrement',\n },\n children,\n );\n}\n\n/** Increases the NumberField value by its configured step. */\nexport function IncrementButton({\n 'aria-label': ariaLabel,\n children,\n ref,\n size,\n ...props\n}: Readonly<NumberFieldStepButtonProps>): ReactElement {\n return createElement(\n NumberFieldStepButton,\n {\n ...props,\n 'aria-label': ariaLabel,\n ref,\n size,\n slot: 'increment',\n },\n children,\n );\n}\n\n/**\n * Accessible compound locale-aware numeric-entry primitive.\n *\n * @summary locale-aware numeric entry with optional stepper controls\n */\nexport const NumberField = {\n /** Decrement action. */\n DecrementButton,\n /** Supporting guidance associated with the numeric input. */\n Description: TextField.Description,\n /** Validation message associated with an invalid numeric input. */\n Error: TextField.Error,\n /** Numeric input and stepper layout group. */\n Group,\n /** Increment action. */\n IncrementButton,\n /** Locale-aware native spinbutton. */\n Input,\n /** Persistent accessible label. */\n Label: TextField.Label,\n /** State, constraints, and accessibility root. */\n Root,\n};\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useId } from 'react';\nimport {\n Dialog as AriaDialog,\n DialogTrigger as AriaDialogTrigger,\n} from 'react-aria-components/Dialog';\nimport { Popover as AriaPopover } from 'react-aria-components/Popover';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n OverlayDescriptionContext,\n SharedOverlayClose,\n type SharedOverlayCloseProps,\n SharedOverlayDescription,\n type SharedOverlayDescriptionProps,\n SharedOverlayTitle,\n type SharedOverlayTitleProps,\n SharedOverlayTrigger,\n type SharedOverlayTriggerProps,\n} from '../../internal/react-aria/OverlayParts';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst popover = tv({\n base: 'z-50 max-h-[min(24rem,var(--available-height))] w-[min(22rem,calc(100vw-2rem))] overflow-y-auto border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] p-4 text-[var(--breeze-ink)] shadow-xl outline-none data-[entering]:animate-in data-[exiting]:animate-out motion-reduce:transition-none forced-colors:border-[CanvasText]',\n});\ninterface PopoverRootSharedProps {\n /** Trigger and content. */ children: ReactNode;\n}\ninterface ControlledPopoverRootProps {\n /** Current open state. */ open: boolean;\n /** Called with next open state. */ onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\ninterface ReadOnlyPopoverRootProps {\n /** Current immutable open state. */ open: boolean;\n /** Marks controlled state immutable. */ readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\ninterface UncontrolledPopoverRootProps {\n /** Initial open state. */ defaultOpen?: boolean;\n /** Called with next open state. */ onOpenChange?: (open: boolean) => void;\n open?: never;\n readOnly?: false;\n}\n/** Props for controlled, read-only, or uncontrolled popover state. */ export type PopoverRootProps =\n PopoverRootSharedProps &\n (\n | ControlledPopoverRootProps\n | ReadOnlyPopoverRootProps\n | UncontrolledPopoverRootProps\n );\n/** Props for the popover trigger. */ export type PopoverTriggerProps =\n SharedOverlayTriggerProps;\n/** Props for positioned popover content. */ export interface PopoverContentProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Popover anatomy. */ children: ReactNode;\n /** Allows outside pointer dismissal. Defaults to `true`. */ dismissible?: boolean;\n /** Prevents Escape dismissal. */ keyboardDismissDisabled?: boolean;\n /** Traps outside interaction when true. Defaults to `false`. */ modal?: boolean;\n /** Gap from trigger. Defaults to `8`. */ offset?: number;\n /** Logical placement. Defaults to `bottom start`. */ placement?:\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'top start'\n | 'top end'\n | 'bottom start'\n | 'bottom end';\n /** Ref to rendered dialog surface. */ ref?: Ref<HTMLElement>;\n}\n/** Props for required popover title. */ export type PopoverTitleProps =\n SharedOverlayTitleProps;\n/** Props for required popover description. */ export type PopoverDescriptionProps =\n SharedOverlayDescriptionProps;\n/** Props for semantic popover close action. */ export type PopoverCloseProps =\n SharedOverlayCloseProps;\n\n/** Coordinates non-modal contextual content anchored to a trigger. */\nexport function Root({\n defaultOpen,\n onOpenChange,\n open,\n readOnly: _readOnly,\n ...props\n}: Readonly<PopoverRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaDialogTrigger, {\n ...props,\n defaultOpen,\n isOpen: open,\n onOpenChange,\n });\n}\nexport function Content({\n children,\n className,\n dismissible = true,\n keyboardDismissDisabled = false,\n modal = false,\n offset = 8,\n placement = 'bottom start',\n ref,\n ...props\n}: Readonly<PopoverContentProps>): ReactElement {\n useBreezeContext();\n const descriptionId = useId();\n\n return createElement(\n AriaPopover,\n {\n className: popover({ class: className }),\n isDismissable: dismissible,\n isKeyboardDismissDisabled: keyboardDismissDisabled,\n isNonModal: !modal,\n offset,\n placement,\n } as ComponentProps<typeof AriaPopover>,\n createElement(\n AriaDialog,\n {\n ...props,\n 'aria-describedby': descriptionId,\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaDialog>,\n createElement(\n OverlayDescriptionContext,\n { value: descriptionId },\n children,\n ),\n ),\n );\n}\n/**\n * Accessible compound positioned popover primitive.\n *\n * @summary contextual modal or nonmodal dialog anchored to a trigger\n */\nexport const Popover = {\n /** Semantic action that closes the popover. */\n Close: SharedOverlayClose,\n /** Positioned modal or nonmodal dialog surface. */\n Content,\n /** Required accessible popover description. */\n Description: SharedOverlayDescription,\n /** Controlled, read-only, or uncontrolled open-state coordinator. */\n Root,\n /** Required accessible popover title. */\n Title: SharedOverlayTitle,\n /** Semantic action that opens the popover. */\n Trigger: SharedOverlayTrigger,\n};\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useId } from 'react';\nimport type { ProgressBarRenderProps } from 'react-aria-components/ProgressBar';\nimport { ProgressBar as AriaProgressBar } from 'react-aria-components/ProgressBar';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst progressRoot = tv({ base: 'grid min-w-0 gap-2 text-sm' });\nconst progressHeader = tv({\n base: 'flex min-w-0 items-baseline justify-between gap-4',\n});\nconst progressTrack = tv({\n base: 'h-3 w-full overflow-hidden border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] forced-colors:border-[CanvasText]',\n});\nconst progressFill = tv({\n base: 'h-full forced-colors:bg-[Highlight]',\n defaultVariants: {\n variant: 'primary',\n },\n variants: {\n variant: {\n danger: 'bg-[var(--breeze-danger)]',\n dark: 'bg-[var(--breeze-shell)]',\n info: 'bg-[var(--breeze-info)]',\n light: 'bg-[var(--breeze-surface)]',\n primary: 'bg-[var(--breeze-primary)]',\n secondary: 'bg-[var(--breeze-ink-soft)]',\n success: 'bg-[var(--breeze-success)]',\n warning: 'bg-[var(--breeze-warning)]',\n },\n },\n});\n\ntype ProgressBarNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'role' | 'style'\n>;\n\ninterface ProgressBarSharedProps extends ProgressBarNativeProps {\n /** Visible application-owned translated progress label. */\n label: ReactNode;\n /** Maximum range value. Defaults to `100`. */\n maximum?: number;\n /** Minimum range value. Defaults to `0`. */\n minimum?: number;\n /** Ref to the rendered progress element. */\n ref?: Ref<HTMLDivElement>;\n /** Bootstrap-aligned semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\ninterface DeterminateProgressBarProps {\n /** Excluded or false when progress has a measurable value. */\n indeterminate?: false;\n /** Current progress value within the configured range. */\n value: number;\n /** Optional translated value announced instead of the numeric value. */\n valueText?: string;\n}\n\ninterface IndeterminateProgressBarProps {\n /** Marks progress as ongoing without a measurable value. */\n indeterminate: true;\n /** Excluded because indeterminate progress has no current value. */\n value?: never;\n /** Excluded because indeterminate progress has no current value text. */\n valueText?: never;\n}\n\n/** Props for determinate or indeterminate operation progress. */\nexport type ProgressBarProps = ProgressBarSharedProps &\n (DeterminateProgressBarProps | IndeterminateProgressBarProps);\n\n/**\n * Shows measurable or indeterminate operation progress with range semantics.\n *\n * @summary labelled determinate or indeterminate operation progress\n */\nexport function ProgressBar({\n className,\n indeterminate = false,\n label,\n maximum = 100,\n minimum = 0,\n ref,\n value,\n valueText,\n variant = 'primary',\n ...props\n}: Readonly<ProgressBarProps>): ReactElement {\n useBreezeContext();\n\n const labelId = useId();\n const renderProgress = ({\n percentage,\n valueText: formattedValue,\n }: ProgressBarRenderProps): ReactElement =>\n createElement(\n 'div',\n {\n className: 'contents',\n },\n createElement(\n 'div',\n {\n className: progressHeader(),\n },\n createElement('span', { id: labelId }, label),\n indeterminate\n ? null\n : createElement('span', { 'aria-hidden': 'true' }, formattedValue),\n ),\n createElement(\n 'div',\n {\n 'aria-hidden': 'true',\n className: progressTrack(),\n },\n createElement('div', {\n className: progressFill({\n class: indeterminate\n ? 'w-2/5 animate-pulse motion-reduce:animate-none'\n : undefined,\n variant,\n }),\n style: indeterminate\n ? undefined\n : {\n width: `${percentage ?? 0}%`,\n },\n }),\n ),\n );\n const progressProps = {\n ...props,\n 'aria-labelledby': labelId,\n children: renderProgress,\n className: progressRoot({ class: className }),\n 'data-variant': variant,\n isIndeterminate: indeterminate,\n maxValue: maximum,\n minValue: minimum,\n ref: useForwardedRef(ref),\n value,\n valueLabel: valueText,\n } as unknown as ComponentProps<typeof AriaProgressBar>;\n\n return createElement(AriaProgressBar, progressProps);\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n LabelHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport { createElement, useRef } from 'react';\nimport {\n RadioButton as AriaRadioButton,\n RadioField as AriaRadioField,\n RadioGroup as AriaRadioGroup,\n} from 'react-aria-components/RadioGroup';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { formControlValueTypography } from '../../internal/styling/formControls';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst radioGroupRoot = tv({\n base: 'flex min-w-0 gap-2',\n defaultVariants: {\n orientation: 'vertical',\n },\n variants: {\n orientation: {\n horizontal:\n 'flex-row flex-wrap items-start gap-x-5 [&>[data-breeze-radio-group-description]]:basis-full [&>[data-breeze-radio-group-error]]:basis-full [&>[data-breeze-radio-group-label]]:basis-full',\n vertical: 'flex-col items-start',\n },\n },\n});\n\nconst radioItem = tv({\n base: 'flex min-w-0 flex-col gap-1',\n});\n\nconst radioControl = tv({\n base: `${formControlValueTypography} group inline-flex w-fit cursor-pointer items-center gap-2 rounded-sm text-base leading-[1.4] text-[var(--breeze-ink)] data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]`,\n});\n\nconst radioIndicator = tv({\n base: 'inline-flex shrink-0 items-center justify-center rounded-full border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] transition-colors duration-[var(--breeze-duration-fast)] after:rounded-full after:bg-[var(--breeze-primary)] after:opacity-0 group-data-[selected]:border-[var(--breeze-primary)] group-data-[selected]:after:opacity-100',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-6 after:size-3',\n md: 'size-5 after:size-2',\n sm: 'size-4 after:size-2',\n },\n },\n});\n\ntype RadioGroupRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface RadioGroupRootSharedProps extends RadioGroupRootNativeProps {\n /** Compound label, radio items, description, and error parts. */\n children: ReactNode;\n /** Prevents focus and selection changes for every option. Defaults to `false`. */\n disabled?: boolean;\n /** Exposes invalid group state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Native form field name shared by every radio option. */\n name?: string;\n /** Option layout and arrow-key navigation axis. Defaults to `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n /** Marks the radio group as requiring a selection. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered radio group. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledRadioGroupRootProps {\n /** Current selected option, or `null` when no option is selected. */\n selection: string | null;\n /** Called with the next selected option value. */\n onSelectionChange: (selection: string) => void;\n defaultSelection?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyRadioGroupRootProps {\n /** Current immutable option, or `null` when no option is selected. */\n selection: string | null;\n /** Marks a controlled selection as intentionally immutable. */\n readOnly: true;\n defaultSelection?: never;\n onSelectionChange?: never;\n}\n\ninterface UncontrolledRadioGroupRootProps {\n /** Initial selected option. Defaults to no selection. */\n defaultSelection?: string;\n /** Called with the next selected option value. */\n onSelectionChange?: (selection: string) => void;\n readOnly?: false;\n selection?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled radio-group selection. */\nexport type RadioGroupRootProps = RadioGroupRootSharedProps &\n (\n | ControlledRadioGroupRootProps\n | ReadOnlyRadioGroupRootProps\n | UncontrolledRadioGroupRootProps\n );\n\n/** Props for the visible radio-group label. */\nexport type RadioGroupLabelProps = TextFieldLabelProps;\n\n/** Props for supporting text associated with the radio group. */\nexport type RadioGroupDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible radio-group validation message. */\nexport type RadioGroupErrorProps = TextFieldErrorProps;\n\n/** Props for one radio option and its optional description. */\nexport interface RadioGroupItemProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Compound control and optional item description. */\n children: ReactNode;\n /** Prevents selection of this option. Defaults to `false`. */\n disabled?: boolean;\n /** Ref to the hidden native radio input. */\n inputRef?: RefObject<HTMLInputElement | null>;\n /** Ref to the rendered option field. */\n ref?: Ref<HTMLDivElement>;\n /** Stable native form value for this option. */\n value: string;\n}\n\n/** Props for the clickable radio option and native label. */\nexport interface RadioGroupControlProps\n extends Omit<\n LabelHTMLAttributes<HTMLLabelElement>,\n 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Indicator and persistent option label. */\n children: ReactNode;\n /** Ref to the rendered native label. */\n ref?: Ref<HTMLLabelElement>;\n}\n\n/** Props for the visual radio selection indicator. */\nexport interface RadioGroupIndicatorProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Ref to the rendered indicator. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical indicator size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for persistent visible radio-option label text. */\nexport interface RadioGroupItemLabelProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Text naming the radio option. */\n children: ReactNode;\n /** Ref to the rendered option label text. */\n ref?: Ref<HTMLSpanElement>;\n}\n\n/** Props for supporting text associated with one radio option. */\nexport type RadioGroupItemDescriptionProps = TextFieldDescriptionProps;\n\n/** Coordinates exclusive selection, validation, orientation, and native form naming. */\nexport function Root({\n children,\n className,\n defaultSelection,\n disabled = false,\n invalid = false,\n name,\n onSelectionChange,\n orientation = 'vertical',\n readOnly = false,\n ref,\n required = false,\n selection,\n ...props\n}: Readonly<RadioGroupRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaRadioGroup,\n {\n ...props,\n className: radioGroupRoot({ class: className, orientation }),\n defaultValue: defaultSelection,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n name,\n onChange: onSelectionChange,\n orientation,\n ref: forwardedRef,\n value: selection,\n } as ComponentProps<typeof AriaRadioGroup>,\n children,\n );\n}\n\n/** Renders one radio option field with native form value and optional guidance. */\nexport function Item({\n children,\n className,\n disabled = false,\n inputRef,\n ref,\n value,\n ...props\n}: Readonly<RadioGroupItemProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const fallbackInputRef = useRef<HTMLInputElement>(null);\n\n return createElement(\n AriaRadioField,\n {\n ...props,\n className: radioItem({ class: className }),\n inputRef: inputRef ?? fallbackInputRef,\n isDisabled: disabled,\n ref: forwardedRef,\n value,\n } as ComponentProps<typeof AriaRadioField>,\n children,\n );\n}\n\n/** Renders the persistent accessible label owned by the radio group. */\nexport function Label({\n className,\n ref,\n ...props\n}: Readonly<RadioGroupLabelProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(TextField.Label, {\n ...props,\n className: `leading-[1.4] ${className ?? ''}`,\n 'data-breeze-radio-group-label': true,\n ref: forwardedRef,\n } as RadioGroupLabelProps & {\n 'data-breeze-radio-group-label': true;\n });\n}\n\n/** Renders supporting guidance on its own radio-group row. */\nexport function Description(\n props: Readonly<RadioGroupDescriptionProps>,\n): ReactElement {\n return createElement(TextField.Description, {\n ...props,\n 'data-breeze-radio-group-description': true,\n } as RadioGroupDescriptionProps & {\n 'data-breeze-radio-group-description': true;\n });\n}\n\n/** Renders associated validation feedback on its own radio-group row. */\nfunction ErrorMessage(props: Readonly<RadioGroupErrorProps>): ReactElement {\n return createElement(TextField.Error, {\n ...props,\n 'data-breeze-radio-group-error': true,\n } as RadioGroupErrorProps & {\n 'data-breeze-radio-group-error': true;\n });\n}\n\nexport { ErrorMessage as Error };\n\n/** Renders the pointer, touch, and keyboard target for one radio option. */\nexport function Control({\n className,\n ref,\n ...props\n}: Readonly<RadioGroupControlProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaRadioButton, {\n ...props,\n className: radioControl({ class: className }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaRadioButton>);\n}\n\n/** Renders the visual selected state for one radio option. */\nexport function Indicator({\n className,\n ref,\n size,\n ...props\n}: Readonly<RadioGroupIndicatorProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n 'aria-hidden': true,\n className: radioIndicator({ class: className, size }),\n ref: forwardedRef,\n });\n}\n\n/** Renders persistent visible label text within RadioGroup.Control. */\nexport function ItemLabel({\n ref,\n ...props\n}: Readonly<RadioGroupItemLabelProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n ref: forwardedRef,\n });\n}\n\n/**\n * Accessible compound exclusive-selection primitive.\n *\n * @summary labelled exclusive selection with native radio semantics\n */\nexport const RadioGroup = {\n /** Pointer, touch, and keyboard selection target for one option. */\n Control,\n /** Supporting guidance associated with the group. */\n Description,\n /** Validation message associated with an invalid group. */\n Error: ErrorMessage,\n /** Visual selected-state indicator. */\n Indicator,\n /** One radio option field. */\n Item,\n /** Supporting guidance associated with one option. */\n ItemDescription: TextField.Description,\n /** Persistent visible option label text. */\n ItemLabel,\n /** Persistent accessible group label. */\n Label,\n /** Selection, validation, orientation, and native form root. */\n Root,\n};\n","import type { CalendarDate } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { RangeCalendar as AriaRangeCalendar } from 'react-aria-components/RangeCalendar';\nimport { tv } from 'tailwind-variants';\nimport {\n formatDateRangeValue,\n parseDateRangeValue,\n parseDateValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { DateRangeValue } from '../../internal/types/date';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n type CalendarButtonPartProps,\n CalendarGridPart,\n type CalendarGridPartProps,\n CalendarHeaderPart,\n type CalendarHeaderPartProps,\n CalendarHeadingPart,\n type CalendarHeadingPartProps,\n CalendarNextButtonPart,\n CalendarPreviousButtonPart,\n} from '../date/CalendarParts';\n\nconst rootStyle = tv({\n base: 'inline-flex w-full flex-col gap-3',\n});\ninterface SharedProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'defaultValue' | 'onChange' | 'style'\n > {\n /** Calendar navigation, heading, range grid, and guidance. */ children: ReactNode;\n /** Allows ranges containing unavailable dates. */ allowsNonContiguousRanges?: boolean;\n /** Prevents focus and selection. */ disabled?: boolean;\n /** Exposes invalid selection state. */ invalid?: boolean;\n /** Returns whether a stable date is unavailable. */ isDateUnavailable?: (\n date: string,\n anchorDate: string | null,\n ) => boolean;\n /** Latest selectable date. */ maxValue?: string;\n /** Earliest selectable date. */ minValue?: string;\n /** Ref to the rendered range-calendar root. */ ref?: Ref<HTMLDivElement>;\n /** Number of visible months. Defaults to `1`. */ visibleMonths?: number;\n}\ntype State =\n | {\n /** Current controlled range, or `null` when empty. */ value: DateRangeValue | null;\n /** Called with the next stable range or `null`. */ onChange: (\n value: DateRangeValue | null,\n ) => void;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Mutable controlled calendars cannot be read-only. */ readOnly?: false;\n }\n | {\n /** Current immutable range, or `null` when empty. */ value: DateRangeValue | null;\n /** Prevents range changes. */ readOnly: true;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Excluded because read-only calendars cannot change. */ onChange?: never;\n }\n | {\n /** Initial uncontrolled range, or `null` when empty. */ defaultValue?: DateRangeValue | null;\n /** Called with the next stable range or `null`. */ onChange?: (\n value: DateRangeValue | null,\n ) => void;\n /** Uncontrolled calendars cannot be read-only. */ readOnly?: false;\n /** Excluded when uncontrolled. */ value?: never;\n };\n/** Props for stable date-range calendar selection. */\nexport type RangeCalendarRootProps = SharedProps & State;\n/** Props for the navigation header. */\nexport type RangeCalendarHeaderProps = CalendarHeaderPartProps;\n/** Props for previous and next buttons. */\nexport type RangeCalendarButtonProps = CalendarButtonPartProps;\n/** Props for the locale-formatted heading. */\nexport type RangeCalendarHeadingProps = CalendarHeadingPartProps;\n/** Props for the range calendar grid. */\nexport type RangeCalendarGridProps = CalendarGridPartProps;\n\n/** Coordinates locale-aware selection of a start and end date. */\nexport function Root({\n allowsNonContiguousRanges = false,\n children,\n className,\n defaultValue,\n disabled = false,\n invalid = false,\n isDateUnavailable,\n maxValue,\n minValue,\n onChange,\n readOnly = false,\n ref,\n value,\n visibleMonths = 1,\n ...props\n}: Readonly<RangeCalendarRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaRangeCalendar, {\n ...props,\n allowsNonContiguousRanges,\n children,\n className: rootStyle({ class: className }),\n defaultValue: parseDateRangeValue(defaultValue ?? null) ?? undefined,\n isDateUnavailable: isDateUnavailable\n ? (date: CalendarDate, anchor: CalendarDate | null) =>\n isDateUnavailable(date.toString(), anchor?.toString() ?? null)\n : undefined,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n maxValue: parseDateValue(maxValue ?? null) ?? undefined,\n minValue: parseDateValue(minValue ?? null) ?? undefined,\n onChange: readOnly\n ? undefined\n : (range: { start: CalendarDate; end: CalendarDate }) =>\n onChange?.(formatDateRangeValue(range)),\n ref: useForwardedRef(ref),\n value: value === undefined ? undefined : parseDateRangeValue(value),\n visibleDuration: { months: visibleMonths },\n } as unknown as ComponentProps<typeof AriaRangeCalendar>);\n}\n/**\n * Accessible locale-aware date-range calendar.\n *\n * @summary inclusive ISO date-range selection from calendar grids\n */\nexport const RangeCalendar = {\n /** Locale-aware weekday and range grid. */ Grid: CalendarGridPart,\n /** Navigation header container. */ Header: CalendarHeaderPart,\n /** Visible month heading. */ Heading: CalendarHeadingPart,\n /** Next-page navigation. */ NextButton: CalendarNextButtonPart,\n /** Previous-page navigation. */ PreviousButton: CalendarPreviousButtonPart,\n /** Stable range state and constraints. */ Root,\n};\n","import type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createContext, createElement, useContext } from 'react';\nimport { Button as AriaButton } from 'react-aria-components/Button';\nimport { Group as AriaGroup } from 'react-aria-components/Group';\nimport {\n SearchField as AriaSearchField,\n type SearchFieldRenderProps,\n} from 'react-aria-components/SearchField';\nimport { tv } from 'tailwind-variants';\nimport { CloseIcon } from '../../icons';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldInputProps,\n type TextFieldLabelProps,\n type TextFieldRootProps,\n} from '../TextField/TextField';\n\nconst searchFieldRoot = tv({\n base: 'flex min-w-0 flex-col gap-1.5',\n});\n\nconst searchFieldGroup = tv({\n base: \"relative inline-flex w-full min-w-0 items-stretch bg-[var(--breeze-surface)] outline-none after:pointer-events-none after:absolute after:inset-0 after:z-10 after:border after:border-[var(--breeze-border-strong)] after:transition-colors after:duration-[var(--breeze-duration-fast)] after:content-[''] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-solid data-[focus-visible]:outline-[var(--breeze-focus)] data-[focus-within]:after:border-[var(--breeze-primary)] data-[hovered]:after:border-[var(--breeze-primary)] data-[invalid]:after:!border-[var(--breeze-danger)] data-[readonly]:bg-[var(--breeze-surface-subtle)] data-[readonly]:opacity-70\",\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-12',\n md: 'min-h-11',\n sm: 'min-h-8',\n },\n },\n});\n\nconst searchInput = tv({\n base: '[&::-webkit-search-cancel-button]:hidden',\n});\n\nconst groupedInput = tv({\n base: 'min-w-0 w-auto flex-1 border-0 bg-transparent disabled:!bg-transparent disabled:!opacity-100 read-only:!bg-transparent read-only:!opacity-100 data-[focus-visible]:!outline-none',\n});\n\nconst clearButton = tv({\n base: 'inline-flex shrink-0 items-center justify-center border-0 bg-transparent text-[var(--breeze-ink-soft)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[focus-visible]:outline-none data-[hovered]:text-[var(--breeze-primary)] disabled:cursor-not-allowed disabled:opacity-55',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-12 text-base',\n md: 'size-11 text-base',\n sm: 'size-8 text-xs',\n },\n },\n});\n\ninterface SearchFieldCompositionContextValue {\n size: ControlSize;\n}\n\ninterface SearchFieldStateContextValue {\n isDisabled: boolean;\n isEmpty: boolean;\n isReadOnly: boolean;\n}\n\nconst SearchFieldCompositionContext = createContext<\n SearchFieldCompositionContextValue | undefined\n>(undefined);\nconst SearchFieldStateContext = createContext<\n SearchFieldStateContextValue | undefined\n>(undefined);\n\nfunction renderSearchFieldChildren(\n children: ReactNode,\n { isDisabled, isEmpty, isReadOnly }: SearchFieldRenderProps,\n): ReactElement {\n return createElement(\n SearchFieldStateContext.Provider,\n {\n value: {\n isDisabled,\n isEmpty,\n isReadOnly,\n },\n },\n children,\n );\n}\n\ninterface SearchFieldRootCallbacks {\n /** Called after the query is cleared with the clear button or Escape key. */\n onClear?: () => void;\n /** Called with the current query when the user submits the search. */\n onSubmit?: (value: string) => void;\n}\n\n/** Props for controlled, read-only, or uncontrolled search field state. */\nexport type SearchFieldRootProps = TextFieldRootProps &\n SearchFieldRootCallbacks;\n\n/** Props for the visible search field label. */\nexport type SearchFieldLabelProps = TextFieldLabelProps;\n\n/** Props for the single-surface search input and clear-action group. */\nexport interface SearchFieldGroupProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Search input and optional clear action. */\n children: ReactNode;\n /** Ref to the rendered group. */\n ref?: Ref<HTMLDivElement>;\n /** Canonical size applied to every grouped control part. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for the native search input part. */\nexport type SearchFieldInputProps = Omit<TextFieldInputProps, 'type'>;\n\n/** Props for supporting text associated with the search input. */\nexport type SearchFieldDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible search validation message. */\nexport type SearchFieldErrorProps = TextFieldErrorProps;\n\n/** Props for the search clear action. */\nexport interface SearchFieldClearButtonProps\n extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'children' | 'onClick' | 'onClickCapture' | 'style' | 'type'\n > {\n /** Accessible action name. Defaults to the provider's `clear` message. */\n 'aria-label'?: string;\n /** Optional clear-action content. Defaults to the Breeze close icon. */\n children?: ReactNode;\n /** Ref to the rendered clear button. */\n ref?: Ref<HTMLButtonElement>;\n /** Standalone action size. A containing Group takes precedence. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Coordinates accessible query state, submission, clearing, and compound anatomy. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n invalid = false,\n onChange,\n onClear,\n onSubmit,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<SearchFieldRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaSearchField, {\n ...props,\n children: renderSearchFieldChildren.bind(null, children),\n className: searchFieldRoot({ class: className }),\n defaultValue,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n onChange,\n onClear,\n onSubmit,\n ref: forwardedRef,\n value,\n } as ComponentProps<typeof AriaSearchField>);\n}\n\n/** Groups the SearchField input and clear action as one visual control. */\nexport function Group({\n className,\n ref,\n role = 'presentation',\n size = 'md',\n ...props\n}: Readonly<SearchFieldGroupProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const rootState = useContext(SearchFieldStateContext);\n\n return createElement(\n SearchFieldCompositionContext.Provider,\n { value: { size } },\n createElement(AriaGroup, {\n ...props,\n className: searchFieldGroup({ class: className, size }),\n 'data-breeze-search-field-group': '',\n 'data-size': size,\n isReadOnly: rootState?.isReadOnly,\n ref: forwardedRef,\n role,\n } as ComponentProps<typeof AriaGroup>),\n );\n}\n\n/** Renders the native search input for a SearchField. */\nexport function Input({\n className,\n size,\n ...props\n}: Readonly<SearchFieldInputProps>): ReactElement {\n const composition = useContext(SearchFieldCompositionContext);\n\n return createElement(TextField.Input, {\n ...props,\n className: searchInput({\n class: composition ? groupedInput({ class: className }) : className,\n }),\n size: composition?.size ?? size,\n type: 'search',\n } as unknown as TextFieldInputProps);\n}\n\n/** Clears the current SearchField value with pointer or keyboard activation. */\nexport function ClearButton({\n 'aria-label': ariaLabel,\n children,\n className,\n ref,\n size,\n ...props\n}: Readonly<SearchFieldClearButtonProps>): ReactElement | null {\n const { messages } = useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const composition = useContext(SearchFieldCompositionContext);\n const rootState = useContext(SearchFieldStateContext);\n\n if (rootState?.isDisabled || rootState?.isEmpty || rootState?.isReadOnly) {\n return null;\n }\n\n return createElement(\n AriaButton,\n {\n ...props,\n 'aria-label': ariaLabel ?? messages.clear,\n className: clearButton({\n class: className,\n size: composition?.size ?? size,\n }),\n 'data-breeze-search-field-clear': '',\n ref: forwardedRef,\n type: 'button',\n } as ComponentProps<typeof AriaButton>,\n <span aria-hidden=\"true\">{children ?? <CloseIcon />}</span>,\n );\n}\n\n/**\n * Accessible compound search-query primitive.\n *\n * @summary labelled search entry with submission and clearing\n */\nexport const SearchField = {\n /** Query clear action. */\n ClearButton,\n /** Supporting guidance associated with the search input. */\n Description: TextField.Description,\n /** Validation message associated with an invalid search input. */\n Error: TextField.Error,\n /** Single-surface input and clear-action composition. */\n Group,\n /** Native search input. */\n Input,\n /** Persistent accessible label. */\n Label: TextField.Label,\n /** State, submission, and accessibility root. */\n Root,\n};\n","import type {\n ButtonHTMLAttributes,\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n Button as AriaButton,\n ListBox as AriaListBox,\n Popover as AriaPopover,\n Select as AriaSelect,\n SelectValue as AriaSelectValue,\n} from 'react-aria-components/Select';\nimport { tv } from 'tailwind-variants';\nimport { ChevronDownIcon } from '../../icons';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport formControlValue from '../../internal/styling/formControls';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n ListBox as BreezeListBox,\n type ListBoxItemProps,\n} from '../ListBox/ListBox';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst rootStyle = tv({ base: 'group/select flex min-w-0 flex-col gap-1.5' });\nconst triggerStyle = tv({\n base: 'inline-flex w-full items-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-left text-[var(--breeze-ink)] outline-none transition-colors duration-[var(--breeze-duration-fast)] data-[hovered]:border-[var(--breeze-primary)] data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-[-2px] data-[focus-visible]:outline-[var(--breeze-focus)] data-[disabled]:cursor-not-allowed data-[disabled]:bg-[var(--breeze-surface-subtle)] data-[disabled]:opacity-70 group-data-[invalid]/select:border-[var(--breeze-danger)]',\n});\nconst popoverStyle = tv({\n base: 'min-w-[var(--trigger-width)] border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] shadow-lg',\n});\nconst listStyle = tv({ base: 'max-h-72 overflow-y-auto p-1 outline-none' });\n\ntype NativeRoot = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\ninterface SharedRoot extends NativeRoot {\n /** Compound label, trigger, popover, listbox, description, and error parts. */ children: ReactNode;\n /** Prevents focus and selection. Defaults to `false`. */ disabled?: boolean;\n /** Associates the native form value with an external form. */ form?: string;\n /** Exposes invalid state. Defaults to `false`. */ invalid?: boolean;\n /** Native form field name. */ name?: string;\n /** Placeholder shown before selection. */ placeholder?: string;\n /** Marks the select as required. Defaults to `false`. */ required?: boolean;\n /** Ref to the rendered field root. */ ref?: Ref<HTMLDivElement>;\n}\ninterface Controlled {\n /** Current selected key, or `null` when no option is selected. */\n value: CollectionKey | null;\n /** Called when the selected key changes. */\n onChange: (value: CollectionKey | null) => void;\n /** Excluded when value is controlled. */\n defaultValue?: never;\n /** Controlled mutable state cannot be marked read-only. */\n readOnly?: false;\n}\ninterface ReadOnly {\n /** Current immutable selected key, or `null` when no option is selected. */\n value: CollectionKey | null;\n /** Prevents interaction with the controlled value. */\n readOnly: true;\n /** Excluded when value is controlled. */\n defaultValue?: never;\n /** Excluded because read-only values cannot change. */\n onChange?: never;\n}\ninterface Uncontrolled {\n /** Initial selected key. */\n defaultValue?: CollectionKey;\n /** Called when the selected key changes. */\n onChange?: (value: CollectionKey | null) => void;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n /** Excluded when value is uncontrolled. */\n value?: never;\n}\n/** Props for controlled, read-only, or uncontrolled single-value select state. */\nexport type SelectRootProps = SharedRoot &\n (Controlled | ReadOnly | Uncontrolled);\n/** Props for the visible select label. */ export type SelectLabelProps =\n TextFieldLabelProps;\n/** Props for select supporting text. */ export type SelectDescriptionProps =\n TextFieldDescriptionProps;\n/** Props for a select validation message. */ export type SelectErrorProps =\n TextFieldErrorProps;\n/** Props for the native select trigger button. */\nexport interface SelectTriggerProps\n extends Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Trigger content. */ children: ReactNode;\n /** Ref to the trigger. */ ref?: Ref<HTMLButtonElement>;\n /** Canonical control size. Defaults to `md`. */ size?: ControlSize;\n}\n/** Props for the displayed selected value. */\nexport interface SelectValueProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Optional custom value content. */ children?: ReactNode;\n /** Ref to the value element. */ ref?: Ref<HTMLSpanElement>;\n}\n/** Props for the select popover. */\nexport interface SelectPopoverProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Select listbox content. */ children: ReactNode;\n /** Ref to the popover. */ ref?: Ref<HTMLElement>;\n}\n/** Props for static or generic select options. */\nexport type SelectListBoxProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> &\n CollectionContentProps<Item> & {\n /** Empty-state content. */ emptyContent?: ReactNode;\n /** Ref to the listbox. */ ref?: Ref<HTMLDivElement>;\n };\n/** Props for one keyed select option. */ export type SelectItemProps =\n ListBoxItemProps;\n\n/** Coordinates select state, validation, and native form participation. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n invalid = false,\n name,\n onChange,\n placeholder,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<SelectRootProps>): ReactElement {\n useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n return createElement(AriaSelect, {\n ...props,\n allowsEmptyCollection: true,\n children,\n className: rootStyle({ class: className }),\n defaultSelectedKey: defaultValue,\n form,\n isDisabled: disabled || readOnly,\n isInvalid: invalid,\n isRequired: required,\n name,\n onSelectionChange: onChange,\n placeholder,\n ref: forwardedRef,\n selectedKey: value,\n } as unknown as ComponentProps<typeof AriaSelect>);\n}\n/** Renders the select trigger button. */\nexport function Trigger({\n children,\n className,\n ref,\n size,\n ...props\n}: Readonly<SelectTriggerProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaButton,\n {\n ...props,\n className: formControlValue({\n class: triggerStyle({ class: className }),\n size,\n }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaButton>,\n <>\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n <ChevronDownIcon\n className=\"ms-3 size-4 text-[var(--breeze-ink-muted)]\"\n data-breeze-select-indicator\n />\n </>,\n );\n}\n/** Renders selected option text or the placeholder. */\nexport function Value({\n className,\n ref,\n ...props\n}: Readonly<SelectValueProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n return createElement(AriaSelectValue, {\n ...props,\n className,\n ref: forwardedRef,\n });\n}\n/** Positions the select listbox relative to its trigger. */\nexport function Popover({\n className,\n ref,\n ...props\n}: Readonly<SelectPopoverProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n return createElement(AriaPopover, {\n ...props,\n className: popoverStyle({ class: className }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaPopover>);\n}\n/** Renders static or typed generic select options. */\nexport function ListBox<Item extends BreezeCollectionItem>({\n children,\n className,\n emptyContent,\n items,\n ref,\n ...props\n}: Readonly<SelectListBoxProps<Item>>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n\n return createElement(AriaListBox, {\n ...props,\n children,\n className: listStyle({ class: className }),\n items,\n ref: forwardedRef,\n renderEmptyState: () => resolvedEmptyContent,\n } as unknown as ComponentProps<typeof AriaListBox>);\n}\n\n/**\n * Accessible compound native-form select primitive.\n *\n * @summary compact single selection from a keyed option collection\n */\nexport const Select = {\n /** Supporting guidance associated with the select. */\n Description: TextField.Description,\n /** Validation feedback associated with the select. */\n Error: TextField.Error,\n /** One keyed option within `Select.ListBox`. */\n Item: BreezeListBox.Item,\n /** Visible label associated with the select trigger. */\n Label: TextField.Label,\n /** Static or typed generic option collection. */\n ListBox,\n /** Popup positioned relative to the trigger. */\n Popover,\n /** State, validation, and native-form coordination root. */\n Root,\n /** Button that opens and closes the option popup. */\n Trigger,\n /** Selected option text or placeholder content. */\n Value,\n};\n","import type { ElementType, HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst separator = tv({\n base: 'm-0 shrink-0 border-0 bg-current',\n defaultVariants: {\n orientation: 'horizontal',\n tone: 'default',\n },\n variants: {\n orientation: {\n horizontal: 'h-px w-full',\n vertical: 'h-full min-h-4 w-px self-stretch',\n },\n tone: {\n default: 'text-[var(--breeze-border)]',\n strong: 'text-[var(--breeze-border-strong)]',\n },\n },\n});\n\ntype SeparatorNativeProps = Omit<\n HTMLAttributes<HTMLElement>,\n 'aria-orientation' | 'children' | 'role' | 'style'\n>;\n\n/** Props for a visual or semantic divider between related regions. */\nexport interface SeparatorProps extends SeparatorNativeProps {\n /** Hides the divider from assistive technology. Defaults to `false`. */\n decorative?: boolean;\n /** Divider axis. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered HTML element. */\n ref?: Ref<HTMLElement>;\n /** Visual border emphasis. Defaults to `default`. */\n tone?: 'default' | 'strong';\n}\n\n/**\n * Separates related regions and exposes separator semantics unless marked as\n * decorative.\n *\n * @summary semantic or decorative horizontal and vertical divider\n */\nexport function Separator({\n className,\n decorative = false,\n orientation = 'horizontal',\n ref,\n tone,\n ...props\n}: Readonly<SeparatorProps>) {\n useBreezeContext();\n\n const Element: ElementType = orientation === 'horizontal' ? 'hr' : 'div';\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(Element, {\n ...props,\n 'aria-hidden': decorative || undefined,\n 'aria-orientation':\n !decorative && orientation === 'vertical' ? 'vertical' : undefined,\n className: separator({\n class: className,\n orientation,\n tone,\n }),\n ref: forwardedRef,\n role: decorative ? 'presentation' : 'separator',\n });\n}\n","import type { ComponentPropsWithoutRef, ReactElement, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst skeleton = tv({\n base: 'animate-pulse motion-reduce:animate-none forced-colors:border forced-colors:border-[CanvasText]',\n defaultVariants: {\n shape: 'text',\n tone: 'default',\n },\n variants: {\n shape: {\n circle: 'size-12 rounded-full',\n rectangle: 'min-h-16',\n text: 'h-3.5 w-full',\n },\n tone: {\n danger: 'bg-[var(--breeze-skeleton-danger)]',\n default: 'bg-[var(--breeze-skeleton)]',\n inverse: 'bg-[var(--breeze-skeleton-inverse)]',\n },\n },\n});\n\n/** Visual shapes supported by a loading skeleton. */\nexport type SkeletonShape = 'circle' | 'rectangle' | 'text';\n/** Semantic surface tones supported by loading placeholders. */\nexport type SkeletonTone = 'default' | 'inverse' | 'danger';\n/** Elements supported by a loading skeleton. */\nexport type SkeletonElement = 'div' | 'span';\n\ntype SkeletonElementNode<Element extends SkeletonElement> =\n Element extends 'span' ? HTMLSpanElement : HTMLDivElement;\n\n/** Props for a non-announcing visual loading placeholder. */\nexport type SkeletonProps<Element extends SkeletonElement = 'div'> = Omit<\n ComponentPropsWithoutRef<Element>,\n 'children' | 'role' | 'style'\n> & {\n /** Render as a `span` when the placeholder must sit inside text content. */\n as?: Element;\n /** Ref to the rendered placeholder element. */\n ref?: Ref<SkeletonElementNode<Element>>;\n /** Placeholder geometry. Defaults to `text`. */\n shape?: SkeletonShape;\n /** Surface-aware placeholder colour. Defaults to `default`. */\n tone?: SkeletonTone;\n};\n\n/**\n * Reserves loading layout without adding content to the accessibility tree.\n *\n * @summary non-announcing loading placeholder with canonical shapes\n */\nexport function Skeleton<Element extends SkeletonElement = 'div'>({\n as,\n className,\n ref,\n shape = 'text',\n tone = 'default',\n ...props\n}: Readonly<SkeletonProps<Element>>): ReactElement {\n useBreezeContext();\n\n const skeletonProps = {\n ...props,\n 'aria-hidden': 'true',\n className: skeleton({ class: className, shape, tone }),\n 'data-shape': shape,\n 'data-tone': tone,\n ref: useForwardedRef(ref),\n };\n\n return createElement(as ?? 'div', skeletonProps);\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n OutputHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport {\n createContext,\n createElement,\n useContext,\n useId,\n useMemo,\n useRef,\n} from 'react';\nimport {\n Slider as AriaSlider,\n SliderFill as AriaSliderFill,\n SliderOutput as AriaSliderOutput,\n SliderThumb as AriaSliderThumb,\n SliderTrack as AriaSliderTrack,\n} from 'react-aria-components/Slider';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { TextField, type TextFieldLabelProps } from '../TextField/TextField';\n\nconst sliderRoot = tv({\n base: 'flex min-w-0 gap-2 data-[disabled]:opacity-65',\n defaultVariants: {\n orientation: 'horizontal',\n },\n variants: {\n orientation: {\n horizontal: 'w-full flex-col',\n vertical:\n 'grid w-fit grid-cols-[minmax(0,1fr)_auto] items-start [&>[data-breeze-slider-description]]:col-span-2 [&>[data-breeze-slider-error]]:col-span-2 [&>[data-breeze-slider-label]]:col-start-1 [&>[data-breeze-slider-output]]:col-start-2 [&>[data-breeze-slider-track]]:col-span-2 [&>[data-breeze-slider-track]]:justify-self-center',\n },\n },\n});\n\nconst sliderOutput = tv({\n base: 'font-[family-name:var(--breeze-font-display)] text-sm font-bold tabular-nums text-[var(--breeze-ink)]',\n});\n\nconst sliderTrack = tv({\n base: 'relative rounded-full bg-[var(--breeze-border)] data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full data-[orientation=vertical]:my-3 data-[orientation=vertical]:h-64 data-[orientation=vertical]:w-2',\n});\n\nconst sliderFill = tv({\n base: 'absolute rounded-full bg-[var(--breeze-primary)] data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full',\n});\n\nconst sliderThumb = tv({\n base: 'left-1/2 top-1/2 rounded-full border-2 border-[var(--breeze-primary)] bg-[var(--breeze-surface)] shadow-sm transition-transform duration-[var(--breeze-duration-fast)] data-[dragging]:scale-110 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[orientation=horizontal]:top-1/2 data-[orientation=horizontal]:-translate-y-1/2 data-[orientation=vertical]:-translate-x-1/2',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-7',\n md: 'size-6',\n sm: 'size-5',\n },\n },\n});\n\nconst sliderDescription = tv({\n base: 'text-sm text-[var(--breeze-ink-soft)]',\n});\n\nconst sliderError = tv({\n base: 'text-sm font-medium text-[var(--breeze-danger)]',\n});\n\ninterface SliderContextValue {\n descriptionId: string;\n errorId: string;\n invalid: boolean;\n readOnly: boolean;\n required: boolean;\n}\n\nconst SliderContext = createContext<SliderContextValue | null>(null);\n\nfunction useSliderContext(): SliderContextValue {\n const context = useContext(SliderContext);\n\n if (context === null) {\n throw new globalThis.Error(\n 'Slider parts must be rendered within Slider.Root.',\n );\n }\n\n return context;\n}\n\ntype SliderRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface SliderRootSharedProps extends SliderRootNativeProps {\n /** Compound label, output, track, fill, thumb, description, and error parts. */\n children: ReactNode;\n /** Prevents focus, dragging, and value changes. Defaults to `false`. */\n disabled?: boolean;\n /** Locale-aware number formatting options. */\n formatOptions?: Intl.NumberFormatOptions;\n /** Exposes invalid state to the thumb input and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Largest permitted value. Defaults to `100`. */\n max?: number;\n /** Smallest permitted value. Defaults to `0`. */\n min?: number;\n /** Track and keyboard direction. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Called with the final value after a drag or keyboard sequence ends. */\n onChangeEnd?: (value: number) => void;\n /** Marks the native range input as required. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered slider group. */\n ref?: Ref<HTMLDivElement>;\n /** Keyboard and drag increment. Defaults to `1`. */\n step?: number;\n}\n\ninterface ControlledSliderRootProps {\n /** Current slider value. */\n value: number;\n /** Called with the next slider value. */\n onChange: (value: number) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlySliderRootProps {\n /** Current immutable slider value. */\n value: number;\n /** Marks a controlled value as intentionally immutable and non-interactive. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledSliderRootProps {\n /** Initial slider value. Defaults to the minimum value. */\n defaultValue?: number;\n /** Called with the next slider value. */\n onChange?: (value: number) => void;\n readOnly?: false;\n value?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled single-value slider state. */\nexport type SliderRootProps = SliderRootSharedProps &\n (\n | ControlledSliderRootProps\n | ReadOnlySliderRootProps\n | UncontrolledSliderRootProps\n );\n\n/** Props for the visible slider label. */\nexport type SliderLabelProps = TextFieldLabelProps;\n\n/** Props for the locale-formatted slider output. */\nexport interface SliderOutputProps\n extends Omit<OutputHTMLAttributes<HTMLOutputElement>, 'style'> {\n /** Optional custom output content. Defaults to the formatted current value. */\n children?: ReactNode;\n /** Ref to the rendered output. */\n ref?: Ref<HTMLOutputElement>;\n}\n\n/** Props for the interactive slider track. */\nexport interface SliderTrackProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Fill and thumb parts. */\n children: ReactNode;\n /** Ref to the rendered track. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for the selected-value track fill. */\nexport interface SliderFillProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Ref to the rendered fill. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for the draggable slider thumb and hidden native range input. */\nexport interface SliderThumbProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Accessible thumb name when the root label is insufficient. */\n 'aria-label'?: string;\n /** Associates the hidden range input with additional guidance. */\n 'aria-describedby'?: string;\n /** Associates the hidden native range input with an external form. */\n form?: string;\n /** Ref to the hidden native range input used for focus and form integration. */\n inputRef?: RefObject<HTMLInputElement | null>;\n /** Native form field name. */\n name?: string;\n /** Ref to the rendered draggable thumb. */\n ref?: Ref<HTMLDivElement>;\n /** Canonical thumb size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for supporting text associated with the slider thumb. */\nexport interface SliderDescriptionProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'style'> {\n /** Supporting guidance for the slider. */\n children: ReactNode;\n /** Ref to the rendered description. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Props for an accessible slider validation message. */\nexport interface SliderErrorProps\n extends Omit<HTMLAttributes<HTMLParagraphElement>, 'style'> {\n /** Validation message for the slider. */\n children: ReactNode;\n /** Ref to the rendered error message. */\n ref?: Ref<HTMLParagraphElement>;\n}\n\n/** Coordinates a locale-aware, single-value slider and its compound anatomy. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n formatOptions,\n invalid = false,\n max,\n min,\n onChange,\n onChangeEnd,\n orientation = 'horizontal',\n readOnly = false,\n ref,\n required = false,\n step,\n value,\n ...props\n}: Readonly<SliderRootProps>): ReactElement {\n useBreezeContext();\n\n const generatedId = useId();\n const descriptionId = `${generatedId}-description`;\n const errorId = `${generatedId}-error`;\n const forwardedRef = useForwardedRef(ref);\n const contextValue = useMemo(\n () => ({ descriptionId, errorId, invalid, readOnly, required }),\n [descriptionId, errorId, invalid, readOnly, required],\n );\n\n return createElement(\n SliderContext.Provider,\n { value: contextValue },\n createElement(\n AriaSlider,\n {\n ...props,\n className: sliderRoot({ class: className, orientation }),\n defaultValue,\n formatOptions,\n isDisabled: disabled,\n maxValue: max,\n minValue: min,\n onChange,\n onChangeEnd,\n orientation,\n ref: forwardedRef,\n step,\n value,\n } as ComponentProps<typeof AriaSlider>,\n children,\n ),\n );\n}\n\n/** Renders the locale-formatted current Slider value. */\nexport function Output({\n className,\n ref,\n ...props\n}: Readonly<SliderOutputProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaSliderOutput, {\n ...props,\n className: sliderOutput({ class: className }),\n 'data-breeze-slider-output': true,\n ref: forwardedRef,\n } as SliderOutputProps & { 'data-breeze-slider-output': true });\n}\n\n/** Renders the pointer and touch interaction surface for a Slider. */\nexport function Track({\n className,\n ref,\n ...props\n}: Readonly<SliderTrackProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaSliderTrack, {\n ...props,\n className: sliderTrack({ class: className }),\n 'data-breeze-slider-track': true,\n ref: forwardedRef,\n } as SliderTrackProps & { 'data-breeze-slider-track': true });\n}\n\n/** Renders the persistent accessible label owned by the Slider. */\nexport function Label(props: Readonly<SliderLabelProps>): ReactElement {\n return createElement(TextField.Label, {\n ...props,\n 'data-breeze-slider-label': true,\n } as SliderLabelProps & { 'data-breeze-slider-label': true });\n}\n\n/** Renders the selected portion of a Slider track. */\nexport function Fill({\n className,\n ref,\n ...props\n}: Readonly<SliderFillProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaSliderFill, {\n ...props,\n className: sliderFill({ class: className }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the draggable Slider thumb and hidden native range input. */\nexport function Thumb({\n 'aria-describedby': ariaDescribedBy,\n className,\n inputRef,\n ref,\n size,\n ...props\n}: Readonly<SliderThumbProps>): ReactElement {\n const { descriptionId, errorId, invalid, readOnly, required } =\n useSliderContext();\n const forwardedRef = useForwardedRef(ref);\n const fallbackInputRef = useRef<HTMLInputElement>(null);\n const describedBy = [\n ariaDescribedBy,\n descriptionId,\n invalid ? errorId : undefined,\n ]\n .filter(Boolean)\n .join(' ');\n\n return createElement(AriaSliderThumb, {\n ...props,\n 'aria-describedby': describedBy,\n className: sliderThumb({ class: className, size }),\n inputRef: inputRef ?? fallbackInputRef,\n isDisabled: readOnly,\n isInvalid: invalid,\n isRequired: required,\n ref: forwardedRef,\n } as ComponentProps<typeof AriaSliderThumb>);\n}\n\n/** Renders supporting guidance associated with a Slider thumb. */\nexport function Description({\n className,\n id,\n ref,\n ...props\n}: Readonly<SliderDescriptionProps>): ReactElement {\n const { descriptionId } = useSliderContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('p', {\n ...props,\n className: sliderDescription({ class: className }),\n 'data-breeze-slider-description': true,\n id: id ?? descriptionId,\n ref: forwardedRef,\n });\n}\n\n/** Renders a validation message associated with an invalid Slider thumb. */\nfunction ErrorMessage({\n className,\n id,\n ref,\n ...props\n}: Readonly<SliderErrorProps>): ReactElement {\n const { errorId } = useSliderContext();\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('p', {\n ...props,\n className: sliderError({ class: className }),\n 'data-breeze-slider-error': true,\n id: id ?? errorId,\n ref: forwardedRef,\n });\n}\n\nexport { ErrorMessage as Error };\n\n/**\n * Coordinates a labelled, locale-aware single-value range with explicit\n * track, fill, thumb, output, description, and validation parts.\n *\n * @summary accessible compound single-value range input\n */\nexport const Slider = {\n /** Supporting guidance associated with the thumb. */\n Description,\n /** Validation message associated with an invalid thumb. */\n Error: ErrorMessage,\n /** Selected portion of the track. */\n Fill,\n /** Persistent accessible label. */\n Label,\n /** Locale-formatted current value. */\n Output,\n /** State, constraints, orientation, and accessibility root. */\n Root,\n /** Draggable thumb and hidden native range input. */\n Thumb,\n /** Pointer and touch interaction surface. */\n Track,\n};\n","import type { HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\n/** Props for content exposed to assistive technology but hidden visually. */\nexport interface VisuallyHiddenProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Ref to the rendered span. */\n ref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * Preserves accessible content while removing it from visual layout.\n *\n * @summary visually concealed span that remains available to assistive technology\n */\nexport function VisuallyHidden({\n className,\n ref,\n ...props\n}: Readonly<VisuallyHiddenProps>) {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n className: [\n 'absolute size-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]',\n className,\n ]\n .filter(Boolean)\n .join(' '),\n ref: forwardedRef,\n });\n}\n","import type {\n ComponentPropsWithRef,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useId } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize, VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden';\n\nconst spinner = tv({\n base: 'inline-block shrink-0 animate-spin rounded-full border-2 border-current border-e-transparent motion-reduce:animate-none forced-colors:border-[CanvasText] forced-colors:border-e-transparent',\n defaultVariants: {\n size: 'md',\n variant: 'primary',\n },\n variants: {\n size: {\n lg: 'size-8',\n md: 'size-6',\n sm: 'size-4',\n },\n variant: {\n danger: 'text-[var(--breeze-danger)]',\n dark: 'text-[var(--breeze-shell)]',\n info: 'text-[var(--breeze-info)]',\n light: 'text-[var(--breeze-surface)]',\n primary: 'text-[var(--breeze-primary)]',\n secondary: 'text-[var(--breeze-ink-soft)]',\n success: 'text-[var(--breeze-success)]',\n warning: 'text-[var(--breeze-warning)]',\n },\n },\n});\n\ntype SpinnerNativeProps = Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children' | 'role' | 'style'\n>;\n\n/** Props for a labelled or decorative activity spinner. */\nexport interface SpinnerProps extends SpinnerNativeProps {\n /** Application-owned translated status label. Omit for a decorative spinner. */\n label?: ReactNode;\n /** Ref to the rendered spinner element. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical spinner size. Defaults to `md`. */\n size?: ControlSize;\n /** Bootstrap-aligned semantic colour. Defaults to `primary`. */\n variant?: VisualVariant;\n}\n\n/**\n * Indicates ongoing activity, announcing only an explicit translated label\n * and otherwise remaining decorative beside an existing status message.\n *\n * @summary labelled or decorative indeterminate activity indicator\n */\nexport function Spinner({\n className,\n label,\n ref,\n size = 'md',\n variant = 'primary',\n ...props\n}: Readonly<SpinnerProps>): ReactElement {\n useBreezeContext();\n\n const labelId = useId();\n const spinnerProps: ComponentPropsWithRef<'span'> & {\n 'data-variant': VisualVariant;\n } = {\n ...props,\n 'aria-hidden': label === undefined ? 'true' : undefined,\n 'aria-labelledby': label === undefined ? undefined : labelId,\n className: spinner({ class: className, size, variant }),\n 'data-variant': variant,\n ref: useForwardedRef(ref),\n role: label === undefined ? undefined : 'status',\n };\n\n return createElement(\n 'span',\n spinnerProps,\n label === undefined\n ? null\n : createElement(VisuallyHidden, { id: labelId }, label),\n );\n}\n","import { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport {\n gapClasses,\n type LayoutElementProps,\n type ResponsiveSpace,\n} from '../../internal/styling/layout';\nimport { resolveResponsiveClasses } from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst stack = tv({\n base: 'flex flex-col',\n defaultVariants: {\n align: 'stretch',\n justify: 'start',\n },\n variants: {\n align: {\n center: 'items-center',\n end: 'items-end',\n start: 'items-start',\n stretch: 'items-stretch',\n },\n justify: {\n between: 'justify-between',\n center: 'justify-center',\n end: 'justify-end',\n start: 'justify-start',\n },\n },\n});\n\n/** Props for a vertical layout of related content. */\nexport interface StackProps extends LayoutElementProps {\n /** Cross-axis alignment. Defaults to `stretch`. */\n align?: 'start' | 'center' | 'end' | 'stretch';\n /** Responsive space between children. Defaults to `md`. */\n gap?: ResponsiveSpace;\n /** Main-axis distribution. Defaults to `start`. */\n justify?: 'start' | 'center' | 'end' | 'between';\n}\n\n/**\n * Arranges children vertically with bounded alignment, distribution, and\n * responsive spacing while preserving authored reading order.\n *\n * @summary vertical layout with responsive bounded spacing\n */\nexport function Stack({\n align,\n className,\n gap = 'md',\n justify,\n ...props\n}: Readonly<StackProps>) {\n useBreezeContext();\n\n return createElement('div', {\n ...props,\n className: stack({\n align,\n class: [resolveResponsiveClasses(gap, gapClasses), className],\n justify,\n }),\n });\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst stepperRoot = tv({\n base: 'm-0 flex list-none gap-4 p-0',\n defaultVariants: { orientation: 'horizontal' },\n variants: {\n orientation: {\n horizontal: 'flex-row flex-wrap',\n vertical: 'flex-col',\n },\n },\n});\n\nconst stepperItem = tv({\n base: 'group flex min-w-0 flex-1 items-start gap-3 text-[var(--breeze-ink-soft)]',\n variants: {\n status: {\n complete: 'text-[var(--breeze-success)]',\n current: 'text-[var(--breeze-primary)]',\n upcoming: '',\n },\n },\n});\n\nconst stepperIndicator = tv({\n base: 'grid size-8 shrink-0 place-items-center rounded-full border-2 border-current font-[family-name:var(--breeze-font-display)] text-sm font-bold',\n variants: {\n status: {\n complete: 'bg-[var(--breeze-success)] text-white',\n current: 'bg-[var(--breeze-primary)] text-white',\n upcoming: 'bg-[var(--breeze-surface)]',\n },\n },\n});\n\n/** Semantic state of one progression step. */\nexport type StepperStatus = 'complete' | 'current' | 'upcoming';\n\n/** Props for an accessible ordered progression list. */\nexport interface StepperRootProps\n extends Omit<HTMLAttributes<HTMLOListElement>, 'style'> {\n /** Ordered Stepper.Item children. */\n children: ReactNode;\n /** Visual layout direction. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered ordered list. */\n ref?: Ref<HTMLOListElement>;\n}\n\n/** Props for one step in a progression. */\nexport interface StepperItemProps\n extends Omit<HTMLAttributes<HTMLLIElement>, 'style' | 'title'> {\n /** Optional supporting step description. */\n description?: ReactNode;\n /** Position or compact marker rendered in the indicator. */\n indicator: ReactNode;\n /** Ref to the rendered list item. */\n ref?: Ref<HTMLLIElement>;\n /** Completion state. */\n status: StepperStatus;\n /** Persistent visible step title. */\n title: ReactNode;\n}\n\n/** Renders a semantic ordered list describing multi-stage progress. */\nexport function Root({\n className,\n orientation = 'horizontal',\n ref,\n ...props\n}: Readonly<StepperRootProps>): ReactElement {\n useBreezeContext();\n\n return createElement('ol', {\n ...props,\n className: stepperRoot({ class: className, orientation }),\n ref: useForwardedRef(ref),\n role: 'list',\n });\n}\n\n/** Renders one completed, current, or upcoming progression step. */\nexport function Item({\n className,\n description,\n indicator,\n ref,\n status,\n title,\n ...props\n}: Readonly<StepperItemProps>): ReactElement {\n return createElement(\n 'li',\n {\n ...props,\n 'aria-current': status === 'current' ? 'step' : undefined,\n className: stepperItem({ class: className, status }),\n ref: useForwardedRef(ref),\n },\n <>\n <span aria-hidden=\"true\" className={stepperIndicator({ status })}>\n {indicator}\n </span>\n <span className=\"grid min-w-0 gap-1 pt-1\">\n <strong className=\"font-[family-name:var(--breeze-font-display)] text-base text-current\">\n {title}\n </strong>\n {description === undefined ? null : (\n <span className=\"text-base text-[var(--breeze-ink-soft)]\">\n {description}\n </span>\n )}\n </span>\n </>,\n );\n}\n\n/**\n * Describes application-owned multi-stage progress as an accessible ordered\n * list without owning navigation, validation, or persistence.\n *\n * @summary ordered progression with current-step semantics\n */\nexport const Stepper = {\n /** One completed, current, or upcoming stage. */\n Item,\n /** Ordered progression-list root. */\n Root,\n};\n","import type { ElementType, HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport {\n paddingClasses,\n type ResponsiveSpace,\n} from '../../internal/styling/layout';\nimport { resolveResponsiveClasses } from '../../internal/styling/responsive';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst surface = tv({\n defaultVariants: {\n border: 'default',\n tone: 'default',\n },\n variants: {\n border: {\n default: 'border border-b-2 border-[var(--breeze-border)]',\n none: 'border-0',\n strong: 'border border-b-2 border-[var(--breeze-border-strong)]',\n },\n tone: {\n canvas: 'bg-[var(--breeze-canvas)] text-[var(--breeze-ink)]',\n default: 'bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n inverse: 'bg-[var(--breeze-shell)] text-[var(--breeze-ink-inverse)]',\n subtle: 'bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink)]',\n },\n },\n});\n\ntype SurfaceElement = 'article' | 'div' | 'section';\n\n/** Props for a canonical Breeze background and inset container. */\nexport interface SurfaceProps\n extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** Constrained semantic element. Defaults to `div`. */\n as?: SurfaceElement;\n /** Border emphasis. Defaults to `default`. */\n border?: 'none' | 'default' | 'strong';\n /** Responsive inset spacing. Defaults to `lg`. */\n padding?: ResponsiveSpace;\n /** Ref to the rendered HTML element. */\n ref?: Ref<HTMLElement>;\n /** Semantic surface colour treatment. Defaults to `default`. */\n tone?: 'default' | 'subtle' | 'canvas' | 'inverse';\n}\n\n/**\n * Renders a canonical background, border, and responsive inset treatment with\n * a constrained neutral or semantic section element.\n *\n * @summary canonical inset surface with bounded semantic elements\n */\nexport function Surface({\n as = 'div',\n border,\n className,\n padding = 'lg',\n ref,\n tone,\n ...props\n}: Readonly<SurfaceProps>) {\n useBreezeContext();\n\n const Element: ElementType = as;\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(Element, {\n ...props,\n className: surface({\n border,\n class: [resolveResponsiveClasses(padding, paddingClasses), className],\n tone,\n }),\n ref: forwardedRef,\n });\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n LabelHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefObject,\n} from 'react';\nimport { createElement, useRef } from 'react';\nimport {\n SwitchButton as AriaSwitchButton,\n SwitchField as AriaSwitchField,\n} from 'react-aria-components/Switch';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n} from '../TextField/TextField';\n\nconst switchRoot = tv({\n base: 'flex min-w-0 flex-col gap-1',\n});\n\nconst switchControl = tv({\n base: 'group inline-flex min-h-11 w-fit cursor-pointer items-center gap-2 font-[family-name:var(--breeze-font-display)] text-sm font-bold text-[var(--breeze-ink)] data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55',\n});\n\nconst switchTrack = tv({\n base: 'inline-flex shrink-0 items-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] p-0.5 transition-colors duration-[var(--breeze-duration-fast)] group-data-[selected]:border-[var(--breeze-primary)] group-data-[selected]:bg-[var(--breeze-primary)]',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'h-7 w-12',\n md: 'h-6 w-10',\n sm: 'h-5 w-8',\n },\n },\n});\n\nconst switchThumb = tv({\n base: 'block translate-x-0 bg-[var(--breeze-ink-muted)] transition-[transform,background-color] duration-[var(--breeze-duration-fast)] group-data-[selected]:bg-white',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'size-5 group-data-[selected]:translate-x-5',\n md: 'size-4 group-data-[selected]:translate-x-4',\n sm: 'size-3 group-data-[selected]:translate-x-3',\n },\n },\n});\n\ntype SwitchRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface SwitchRootSharedProps extends SwitchRootNativeProps {\n /** Compound control, description, and error parts. */\n children: ReactNode;\n /** Prevents focus and state changes. Defaults to `false`. */\n disabled?: boolean;\n /** Associates the hidden native checkbox with an external form. */\n form?: string;\n /** Ref to the hidden native checkbox used for focus and form integration. */\n inputRef?: RefObject<HTMLInputElement | null>;\n /** Exposes invalid state to assistive technology and error styling. Defaults to `false`. */\n invalid?: boolean;\n /** Native form field name. */\n name?: string;\n /** Marks the switch as required. Defaults to `false`. */\n required?: boolean;\n /** Ref to the rendered field container. */\n ref?: Ref<HTMLDivElement>;\n /** Native submitted value when selected. Defaults to `on`. */\n value?: string;\n}\n\ninterface ControlledSwitchRootProps {\n /** Current selected state. */\n selected: boolean;\n /** Called with the next selected state. */\n onChange: (selected: boolean) => void;\n defaultSelected?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlySwitchRootProps {\n /** Current immutable selected state. */\n selected: boolean;\n /** Marks a controlled state as intentionally immutable. */\n readOnly: true;\n defaultSelected?: never;\n onChange?: never;\n}\n\ninterface UncontrolledSwitchRootProps {\n /** Initial selected state. Defaults to `false`. */\n defaultSelected?: boolean;\n /** Called with the next selected state. */\n onChange?: (selected: boolean) => void;\n readOnly?: false;\n selected?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled switch state. */\nexport type SwitchRootProps = SwitchRootSharedProps &\n (\n | ControlledSwitchRootProps\n | ReadOnlySwitchRootProps\n | UncontrolledSwitchRootProps\n );\n\n/** Props for the clickable switch control and native label. */\nexport interface SwitchControlProps\n extends Omit<\n LabelHTMLAttributes<HTMLLabelElement>,\n 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Track, thumb, and persistent label content. */\n children: ReactNode;\n /** Ref to the rendered native label. */\n ref?: Ref<HTMLLabelElement>;\n}\n\n/** Props for the visual switch track. */\nexport interface SwitchTrackProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Switch thumb. */\n children: ReactNode;\n /** Ref to the rendered track. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical track size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for the visual switch thumb. */\nexport interface SwitchThumbProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Ref to the rendered thumb. */\n ref?: Ref<HTMLSpanElement>;\n /** Canonical thumb size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Props for persistent visible switch label text. */\nexport interface SwitchLabelProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'> {\n /** Text naming the switch. */\n children: ReactNode;\n /** Ref to the rendered label text. */\n ref?: Ref<HTMLSpanElement>;\n}\n\n/** Props for supporting text associated with the switch. */\nexport type SwitchDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible switch validation message. */\nexport type SwitchErrorProps = TextFieldErrorProps;\n\n/** Coordinates accessible switch state, validation, and native form participation. */\nexport function Root({\n children,\n className,\n defaultSelected,\n disabled = false,\n form,\n inputRef,\n invalid = false,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n selected,\n value,\n ...props\n}: Readonly<SwitchRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const fallbackInputRef = useRef<HTMLInputElement>(null);\n\n return createElement(\n AriaSwitchField,\n {\n ...props,\n className: switchRoot({ class: className }),\n defaultSelected,\n form,\n inputRef: inputRef ?? fallbackInputRef,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n isSelected: selected,\n name,\n onChange,\n ref: forwardedRef,\n value,\n } as ComponentProps<typeof AriaSwitchField>,\n children,\n );\n}\n\n/** Renders the pointer, touch, and keyboard switch target. */\nexport function Control({\n className,\n ref,\n ...props\n}: Readonly<SwitchControlProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaSwitchButton, {\n ...props,\n className: switchControl({ class: className }),\n ref: forwardedRef,\n } as ComponentProps<typeof AriaSwitchButton>);\n}\n\n/** Renders the visual switch track. */\nexport function Track({\n className,\n ref,\n size,\n ...props\n}: Readonly<SwitchTrackProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n 'aria-hidden': true,\n className: switchTrack({ class: className, size }),\n ref: forwardedRef,\n });\n}\n\n/** Renders the visual switch thumb within Switch.Track. */\nexport function Thumb({\n className,\n ref,\n size,\n ...props\n}: Readonly<SwitchThumbProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n 'aria-hidden': true,\n className: switchThumb({ class: className, size }),\n ref: forwardedRef,\n });\n}\n\n/** Renders persistent visible label text within Switch.Control. */\nexport function Label({\n ref,\n ...props\n}: Readonly<SwitchLabelProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement('span', {\n ...props,\n ref: forwardedRef,\n });\n}\n\n/**\n * Coordinates a visible label, native switch semantics, Boolean state,\n * validation guidance, and checkbox form participation.\n *\n * @summary accessible compound Boolean setting control\n */\nexport const Switch = {\n /** Pointer, touch, and keyboard state-change target. */\n Control,\n /** Supporting guidance associated with the switch. */\n Description: TextField.Description,\n /** Validation message associated with an invalid switch. */\n Error: TextField.Error,\n /** Persistent visible label text. */\n Label,\n /** State, validation, and native form root. */\n Root,\n /** Visual switch thumb. */\n Thumb,\n /** Visual switch track. */\n Track,\n};\n","import type {\n ComponentProps,\n CSSProperties,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n TdHTMLAttributes,\n} from 'react';\nimport {\n Children,\n cloneElement,\n createContext,\n createElement,\n Fragment,\n isValidElement,\n useCallback,\n useContext,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n Cell as AriaCell,\n Column as AriaColumn,\n Row as AriaRow,\n Table as AriaTable,\n TableBody as AriaTableBody,\n TableFooter as AriaTableFooter,\n TableHeader as AriaTableHeader,\n TableLoadMoreItem as AriaTableLoadMoreItem,\n} from 'react-aria-components/Table';\nimport { tv } from 'tailwind-variants';\nimport { ArrowRightIcon } from '../../icons';\nimport encodeCollectionKey, {\n encodeCollectionKeys,\n} from '../../internal/collections/collectionKey';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useLoadMoreHandler from '../../internal/collections/useLoadMoreHandler';\nimport VirtualizedCollection, {\n collectionViewportStyle,\n} from '../../internal/collections/VirtualizedCollection';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport isBreezeSmallViewport from '../../internal/styling/breakpoints';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n CollectionSelection,\n CollectionVirtualization,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst responsiveTableLayout =\n '[&>tbody>tr]:relative [&>tbody>tr]:flex [&>tbody>tr]:flex-col [&>tbody>tr]:items-start [&>tbody>tr]:gap-2 [&>tbody>tr]:px-4 [&>tbody>tr]:py-4 [&>tfoot>tr]:relative [&>tfoot>tr]:flex [&>tfoot>tr]:flex-col [&>tfoot>tr]:items-start [&>tfoot>tr]:gap-2 [&>tfoot>tr]:px-4 [&>tfoot>tr]:py-4 [&>tbody>tr>td]:block [&>tbody>tr>td]:max-w-full [&>tbody>tr>td]:border-0 [&>tbody>tr>td]:p-0 [&>tfoot>tr>td]:block [&>tfoot>tr>td]:max-w-full [&>tfoot>tr>td]:border-0 [&>tfoot>tr>td]:p-0 sm:[&>thead>tr>th]:px-6 sm:[&>thead>tr>th]:py-3 sm:[&>thead>tr>th]:align-middle sm:[&>tbody>tr]:table-row sm:[&>tbody>tr]:border-0 sm:[&>tbody>tr]:p-0 sm:[&>tfoot>tr]:table-row sm:[&>tfoot>tr]:border-0 sm:[&>tfoot>tr]:p-0 sm:[&>tbody>tr>td]:table-cell sm:[&>tbody>tr>td]:border-b sm:[&>tbody>tr>td]:border-[var(--breeze-border)] sm:[&>tbody>tr>td]:px-6 sm:[&>tbody>tr>td]:py-3 sm:[&>tbody>tr>td]:align-middle sm:[&>tfoot>tr>td]:table-cell sm:[&>tfoot>tr>td]:border-b sm:[&>tfoot>tr>td]:border-[var(--breeze-border)] sm:[&>tfoot>tr>td]:px-6 sm:[&>tfoot>tr>td]:py-3 sm:[&>tfoot>tr>td]:align-middle';\n\nconst desktopGridTableLayout =\n 'sm:!grid sm:grid-cols-[var(--breeze-table-columns)] sm:gap-x-4 sm:[&>thead]:col-span-full sm:[&>thead]:!grid sm:[&>thead]:grid-cols-subgrid sm:[&>tbody]:col-span-full sm:[&>tbody]:!grid sm:[&>tbody]:grid-cols-subgrid sm:[&>tfoot]:col-span-full sm:[&>tfoot]:!grid sm:[&>tfoot]:grid-cols-subgrid sm:[&>thead>tr]:col-span-full sm:[&>thead>tr]:!grid sm:[&>thead>tr]:grid-cols-subgrid sm:[&>thead>tr]:items-center sm:[&>thead>tr]:gap-x-4 sm:[&>thead>tr]:px-6 sm:[&>thead>tr]:py-3 sm:[&>tbody>tr]:col-span-full sm:[&>tbody>tr]:!grid sm:[&>tbody>tr]:grid-cols-subgrid sm:[&>tbody>tr]:items-center sm:[&>tbody>tr]:gap-x-4 sm:[&>tbody>tr]:border-b sm:[&>tbody>tr]:border-[var(--breeze-border)] sm:[&>tbody>tr]:px-6 sm:[&>tbody>tr]:py-3 sm:[&>tfoot>tr]:col-span-full sm:[&>tfoot>tr]:!grid sm:[&>tfoot>tr]:grid-cols-subgrid sm:[&>tfoot>tr]:items-center sm:[&>tfoot>tr]:gap-x-4 sm:[&>tfoot>tr]:px-6 sm:[&>tfoot>tr]:py-3 sm:[&>thead>tr>th]:!flex sm:[&>thead>tr>th]:!h-auto sm:[&>thead>tr>th]:!w-full sm:[&>thead>tr>th]:items-center sm:[&>thead>tr>th]:!border-0 sm:[&>thead>tr>th]:!p-0 sm:[&>tbody>tr>td]:!flex sm:[&>tbody>tr>td]:!h-auto sm:[&>tbody>tr>td]:items-center sm:[&>tbody>tr>td]:!border-0 sm:[&>tbody>tr>td]:!p-0 sm:[&>tfoot>tr>td]:!flex sm:[&>tfoot>tr>td]:!h-auto sm:[&>tfoot>tr>td]:items-center sm:[&>tfoot>tr>td]:!border-0 sm:[&>tfoot>tr>td]:!p-0';\n\nconst compactGridTableLayout =\n '!grid grid-cols-[var(--breeze-table-compact-columns)] gap-x-4 [&>thead]:col-span-full [&>thead]:grid-cols-subgrid [&>tbody]:col-span-full [&>tbody]:grid [&>tbody]:grid-cols-subgrid [&>tfoot]:col-span-full [&>tfoot]:grid [&>tfoot]:grid-cols-subgrid [&>tbody>tr]:col-span-full [&>tbody>tr]:grid [&>tbody>tr]:min-h-11 [&>tbody>tr]:grid-cols-subgrid [&>tbody>tr]:items-center [&>tbody>tr]:px-4 [&>tbody>tr]:py-4 [&>tfoot>tr]:col-span-full [&>tfoot>tr]:grid [&>tfoot>tr]:min-h-11 [&>tfoot>tr]:grid-cols-subgrid [&>tfoot>tr]:items-center [&>tfoot>tr]:px-4 [&>tfoot>tr]:py-4 [&>tbody>tr>td]:block [&>tbody>tr>td]:!p-0 [&>tfoot>tr>td]:block [&>tfoot>tr>td]:!p-0 [&>tbody>tr]:border-b [&>tbody>tr]:border-[var(--breeze-border)] [&>tbody>tr>td]:border-0 [&>tfoot>tr>td]:border-0';\n\nconst responsiveGridColumnDefaults: Record<\n TableDesktopColumns,\n readonly string[]\n> = {\n equal: [],\n mediaDetailsAction: [\n 'max-content',\n 'minmax(0, 1.3fr)',\n 'minmax(0, 0.8fr)',\n 'minmax(0, 1.2fr)',\n 'max-content',\n ],\n};\n\nconst tableRoot = tv({\n base: 'group/table block w-full border-separate border-spacing-0 text-start text-[var(--breeze-ink)] outline-none sm:table [&>tbody:last-of-type>tr:last-child]:border-b-0 sm:[&>tbody:last-of-type>tr:last-child>td]:border-b-0 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n defaultVariants: {\n boundary: 'none',\n desktopColumns: 'equal',\n layout: 'responsive',\n virtualized: false,\n },\n variants: {\n boundary: {\n none: '',\n strong:\n 'min-w-0 border-b-2 border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)]',\n },\n desktopColumns: {\n equal: '',\n mediaDetailsAction: '',\n },\n layout: {\n grid: `${compactGridTableLayout} ${desktopGridTableLayout}`,\n responsive: responsiveTableLayout,\n responsiveGrid: `${responsiveTableLayout} ${desktopGridTableLayout}`,\n },\n virtualized: {\n false: '',\n true: 'overflow-auto sm:block',\n },\n },\n});\n\nconst tableHeader = tv({\n base: 'hidden bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink-muted)] sm:table-header-group',\n});\n\nconst tableColumn = tv({\n base: 'border-b border-[var(--breeze-border)] px-4 py-3 text-start font-[family-name:var(--breeze-font-display)] text-base font-bold outline-none data-[focus-visible]:outline-2 data-[focus-visible]:-outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[allows-sorting]:cursor-pointer forced-colors:border-[CanvasText]',\n defaultVariants: {\n align: 'start',\n },\n variants: {\n align: {\n center: 'text-center sm:justify-center',\n end: 'text-end sm:justify-end',\n start: 'text-start sm:justify-start',\n },\n },\n});\n\nconst tableBody = tv({\n base: 'block sm:table-row-group',\n});\n\nconst tableFooter = tv({\n base: 'block bg-[var(--breeze-surface-subtle)] sm:table-footer-group',\n});\n\nconst tableLoadMore = tv({\n base: 'flex min-h-11 items-center justify-center px-4 py-3 text-sm text-[var(--breeze-ink-muted)]',\n});\n\nconst tableRow = tv({\n base: 'grid min-w-0 border-b border-[var(--breeze-border)] bg-[var(--breeze-surface)] py-2 outline-none sm:table-row sm:border-0 sm:py-0 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[selected]:bg-[var(--breeze-primary-soft)] forced-colors:data-[selected]:border-[Highlight]',\n compoundVariants: [\n {\n actionable: true,\n class: 'data-[hovered]:bg-[var(--breeze-table-row-hover)]',\n presentation: 'data',\n tone: 'default',\n },\n {\n actionable: true,\n class: 'data-[hovered]:bg-[var(--breeze-table-row-muted-hover)]',\n presentation: 'data',\n tone: 'muted',\n },\n ],\n defaultVariants: {\n presentation: 'data',\n tone: 'default',\n },\n variants: {\n actionable: {\n false: '',\n true: 'cursor-pointer',\n },\n presentation: {\n data: '',\n section:\n 'min-h-11 items-center bg-[var(--breeze-table-section)] px-4 py-2 sm:bg-[var(--breeze-table-section)] sm:px-6 [&>td]:!h-auto [&>td]:!border-0 [&>td]:!p-0 [&>td]:before:!hidden',\n },\n tone: {\n default: '',\n muted: 'bg-[var(--breeze-table-row-muted)] text-[var(--breeze-neutral)]',\n },\n },\n});\n\nconst tableCell = tv({\n base: 'grid min-w-0 grid-cols-[minmax(5rem,auto)_minmax(0,1fr)] gap-4 border-b border-[var(--breeze-border)] px-4 py-2 text-start [overflow-wrap:anywhere] last:border-b-0 before:me-1 before:hidden before:font-[family-name:var(--breeze-font-display)] before:text-base before:leading-[1.4] before:font-bold before:text-[var(--breeze-ink-muted)] data-[label]:before:inline-block data-[label]:before:content-[attr(data-label)] max-sm:data-[breeze-compact-hidden]:!hidden sm:table-cell sm:border-b sm:border-[var(--breeze-border)] sm:px-4 sm:py-3 sm:last:border-b sm:data-[label]:before:hidden [&>*]:min-w-0',\n defaultVariants: {\n align: 'start',\n },\n variants: {\n align: {\n center: 'sm:text-center sm:justify-center',\n end: 'sm:text-end sm:justify-end',\n start: 'sm:text-start sm:justify-start',\n },\n presentation: {\n data: '',\n disclosure:\n 'absolute end-4 top-6 h-4 w-4 text-[var(--breeze-ink-muted)] sm:static sm:h-auto sm:w-5 sm:self-stretch sm:text-end [&>*]:ms-auto [&>svg]:size-4',\n },\n spanning: {\n true: '[grid-column:var(--breeze-table-compact-column-span)] sm:[grid-column:var(--breeze-table-column-span)]',\n },\n },\n});\n\n/** Consumer-owned table sort descriptor. */\nexport interface TableSort {\n /** Stable key of the sorted column. */\n column: CollectionKey;\n /** Current sort direction. */\n direction: 'ascending' | 'descending';\n}\n\n/** Supported structural table presentation modes. */\nexport type TableLayout = 'responsive' | 'responsiveGrid' | 'grid';\n\n/** Optional visual treatment for the table's lower edge. */\nexport type TableBoundary = 'none' | 'strong';\n\n/** Supported desktop column arrangements for responsive grid tables. */\nexport type TableDesktopColumns = 'equal' | 'mediaDetailsAction';\n\n/** CSS width or grid-track size for one table column. Numeric values are pixels. */\nexport type TableColumnWidth = NonNullable<CSSProperties['width']>;\n\n/** Domain-neutral emphasis applied to one data row. */\nexport type TableRowTone = 'default' | 'muted';\n\n/** Structural presentation for records and grouped section rows. */\nexport type TableRowPresentation = 'data' | 'section';\n\ntype TableRootNativeProps = Omit<\n HTMLAttributes<HTMLTableElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ntype CompactHiddenColumns =\n | CollectionKey\n | readonly CollectionKey[]\n | ReadonlySet<CollectionKey>;\n\ninterface TableRootSharedProps extends TableRootNativeProps {\n /** Optional visual treatment for the table's lower edge. Defaults to `none`. */\n boundary?: TableBoundary;\n /** Ordered header, body, and optional footer sections. */\n children: ReactNode;\n /** One key or reusable key collection omitted below the Breeze small breakpoint. */\n compactHiddenColumns?: CompactHiddenColumns;\n /** Keys whose rows cannot receive focus, selection, or actions. */\n disabledKeys?: Iterable<CollectionKey>;\n /** Typed desktop column arrangement for `responsiveGrid` layout. Defaults to `equal`. */\n desktopColumns?: TableDesktopColumns;\n /** Responsive native table, responsive desktop grid, or persistent CSS grid rows. Defaults to `responsive`. */\n layout?: TableLayout;\n /** Enables multiple row selection. Defaults to `false`. */\n multiple?: boolean;\n /** Ref to the rendered table or virtualized grid element. */\n ref?: Ref<HTMLElement>;\n /** Optional fixed- or variable-height row windowing configuration. */\n virtualization?: CollectionVirtualization;\n}\n\ninterface ControlledTableSelectionProps {\n /** Current selected row keys. */\n selection: CollectionSelection;\n /** Called with the next selected row keys. */\n onSelectionChange: (selection: CollectionSelection) => void;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Controlled mutable state cannot be marked read-only. */\n readOnly?: false;\n}\n\ninterface ReadOnlyTableSelectionProps {\n /** Current immutable selected row keys. */\n selection: CollectionSelection;\n /** Marks controlled row selection and sorting as intentionally immutable. */\n readOnly: true;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n}\n\ninterface UncontrolledTableSelectionProps {\n /** Initial selected row keys. Defaults to an empty selection. */\n defaultSelection?: CollectionSelection;\n /** Called with the next selected row keys. */\n onSelectionChange?: (selection: CollectionSelection) => void;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n /** Excluded when selection is uncontrolled. */\n selection?: never;\n}\n\ninterface ControlledTableSortProps {\n /** Current consumer-owned sort descriptor. */\n sort: TableSort;\n /** Called when a sortable heading requests a new descriptor. */\n onSortChange: (sort: TableSort) => void;\n /** Excluded when sorting is controlled. */\n defaultSort?: never;\n}\n\ninterface UncontrolledTableSortProps {\n /** Initial sort descriptor. */\n defaultSort?: TableSort;\n /** Called when the internally retained descriptor changes. */\n onSortChange?: (sort: TableSort) => void;\n /** Excluded when sorting is uncontrolled. */\n sort?: never;\n}\n\n/** Props for a controlled, read-only, or uncontrolled interactive table. */\nexport type TableRootProps = TableRootSharedProps &\n (\n | ControlledTableSelectionProps\n | ReadOnlyTableSelectionProps\n | UncontrolledTableSelectionProps\n ) &\n (ControlledTableSortProps | UncontrolledTableSortProps);\n\n/** Props for static or generic table columns. */\nexport type TableHeaderProps<\n Column extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLTableSectionElement>, 'children' | 'style'> &\n CollectionContentProps<Column> & {\n /** Stable key for this measurable ordered header section. */\n id?: CollectionKey;\n /** Ref to the rendered table header. */\n ref?: Ref<HTMLTableSectionElement>;\n };\n\n/** Props for one accessible table column heading. */\nexport interface TableColumnProps\n extends Omit<HTMLAttributes<HTMLTableCellElement>, 'align' | 'id' | 'style'> {\n /** Heading alignment. Defaults to `start`. */\n align?: 'start' | 'center' | 'end';\n /** Visible accessible column heading. */\n children: ReactNode;\n /** Derives a compact record label from this heading. Defaults to `true`. */\n compactLabel?: boolean;\n /** Stable string or number column key. */\n id: CollectionKey;\n /** Marks this heading as the row label announced during cell navigation. Defaults to `false`. */\n rowHeader?: boolean;\n /** Allows this heading to request sort changes. Defaults to `false`. */\n sortable?: boolean;\n /** Ref to the rendered column heading. */\n ref?: Ref<HTMLTableCellElement>;\n /** Plain-text accessible and compact label used when the visible heading is not a string. */\n textValue?: string;\n /** CSS width or grid-track size. Numeric values are pixels; omitted columns share remaining responsive-grid space. */\n width?: TableColumnWidth;\n}\n\n/** Props for a static or generic ordered table body section. */\nexport type TableBodyProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLTableSectionElement>, 'children' | 'style'> &\n CollectionContentProps<Item> & {\n /** Content displayed when this body has no rows. */\n emptyContent?: ReactNode;\n /** Stable key for this measurable ordered body section. */\n id?: CollectionKey;\n /** Ref to the rendered table body. */\n ref?: Ref<HTMLTableSectionElement>;\n };\n\n/** Props for a static or generic ordered table footer section. */\nexport type TableFooterProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLTableSectionElement>, 'children' | 'style'> &\n CollectionContentProps<Item> & {\n /** Stable key for this measurable ordered footer section. */\n id?: CollectionKey;\n /** Ref to the rendered table footer. */\n ref?: Ref<HTMLTableSectionElement>;\n };\n\n/** Props for one keyed table row. */\nexport interface TableRowProps\n extends Omit<\n HTMLAttributes<HTMLTableRowElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Ordered cells matching every visible table heading exactly once and in the same order, including after conditional column changes. */\n children: ReactNode;\n /** Prevents focus, selection, and actions for this row. Defaults to `false`. */\n disabled?: boolean;\n /** Stable string or number row key. */\n id: CollectionKey;\n /** Called with this row key when its action is invoked. */\n onAction?: (key: CollectionKey) => void;\n /** Record or grouped section geometry. Defaults to `data`. */\n presentation?: TableRowPresentation;\n /** Ref to the rendered row. */\n ref?: Ref<HTMLTableRowElement>;\n /** Plain-text row representation used for typeahead and accessibility. */\n textValue: string;\n /** Domain-neutral visual emphasis. Defaults to `default`. */\n tone?: TableRowTone;\n}\n\n/** Props for one table data cell. */\nexport interface TableCellProps\n extends Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n 'align' | 'id' | 'style'\n > {\n /** Cell alignment at table widths. Defaults to `start`. */\n align?: 'start' | 'center' | 'end';\n /** Visible cell content. */\n children: ReactNode;\n /** Stable key of the corresponding column heading. */\n column: CollectionKey;\n /** Canonical content geometry. `disclosure` positions one bare arrow for an actionable row. Defaults to `data`. */\n presentation?: 'data' | 'disclosure';\n /** Ref to the rendered data cell. */\n ref?: Ref<HTMLTableCellElement>;\n /** Plain-text cell value used for accessibility when content is not text. */\n textValue?: string;\n}\n\n/** Props for the canonical action indicator of an actionable row. */\nexport interface TableDisclosureProps\n extends Omit<TableCellProps, 'children' | 'presentation' | 'textValue'> {\n /** Position over a standard compact row or remain in an explicit grid track. Defaults to `overlay`. */\n position?: 'flow' | 'overlay';\n}\n\n/** Props for a table loading row and load-more sentinel. */\nexport interface TableLoadMoreProps\n extends Omit<HTMLAttributes<HTMLTableRowElement>, 'style'> {\n /** Visible loading-row content. */\n children: ReactNode;\n /** Shows the loading row and suppresses duplicate requests. Defaults to `false`. */\n loading?: boolean;\n /** Called once when more consumer-owned rows should be requested. */\n onLoadMore: () => void | Promise<void>;\n /** Trigger distance as a proportion of the scroll viewport. Defaults to `1`. */\n offset?: number;\n /** Ref to the rendered native or virtualized loading row. */\n ref?: Ref<HTMLTableRowElement | HTMLDivElement>;\n}\n\nfunction normaliseSelection(\n selection: 'all' | Set<CollectionKey>,\n): CollectionSelection {\n return selection === 'all' ? 'all' : [...selection];\n}\n\n/** Mirrors the HTML table-cell span range for derived CSS Grid geometry. */\nfunction normaliseColumnSpan(colSpan: number | undefined): number | undefined {\n if (colSpan === undefined) {\n return undefined;\n }\n\n if (!Number.isInteger(colSpan)) {\n return 1;\n }\n\n return Math.min(Math.max(colSpan, 1), 1000);\n}\n\nfunction serializeColumnWidth(\n width: TableColumnWidth | undefined,\n): string | undefined {\n return typeof width === 'number' ? `${width}px` : width;\n}\n\nfunction renderTableColumn({\n align = 'start',\n children,\n className,\n compactLabel = true,\n id,\n ref,\n rowHeader = false,\n sortable = false,\n textValue,\n width,\n ...props\n}: TableColumnProps): ReactElement {\n const serializedWidth = serializeColumnWidth(width);\n const inferredCompactLabel =\n typeof children === 'string' ? children.trim() : undefined;\n const compactLabelText = compactLabel\n ? textValue ?? inferredCompactLabel\n : undefined;\n\n return createElement(AriaColumn, {\n ...props,\n allowsSorting: sortable,\n children,\n className: tableColumn({\n align,\n class: className,\n }),\n 'data-breeze-column': String(id),\n 'data-breeze-column-key': encodeCollectionKey(id),\n 'data-breeze-column-width': serializedWidth,\n 'data-breeze-compact-label': String(compactLabel),\n 'data-breeze-compact-label-text': compactLabelText,\n id,\n isRowHeader: rowHeader,\n ref,\n style: serializedWidth === undefined ? undefined : { width },\n textValue,\n } as unknown as ComponentProps<typeof AriaColumn>);\n}\n\n/** Renders one accessible heading that can optionally request sorting. */\nexport function Column(props: Readonly<TableColumnProps>): ReactElement {\n return renderTableColumn(props);\n}\n\nfunction normaliseColumnElement(element: ReactNode): ReactNode {\n if (isValidElement<TableColumnProps>(element) && element.type === Column) {\n return renderTableColumn(element.props);\n }\n\n return element;\n}\n\n/** Renders static or generic accessible column headings. */\nexport function Header<Column extends BreezeCollectionItem>({\n children,\n className,\n id,\n items,\n ref,\n ...props\n}: Readonly<TableHeaderProps<Column>>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const renderedChildren =\n typeof children === 'function'\n ? (column: Column) => normaliseColumnElement(children(column))\n : Children.map(children, normaliseColumnElement);\n\n return createElement(AriaTableHeader, {\n ...props,\n children: renderedChildren,\n className: tableHeader({ class: className }),\n columns: items,\n 'data-section-key': id,\n dependencies: [children],\n ref: forwardedRef,\n } as unknown as ComponentProps<typeof AriaTableHeader>);\n}\n\nfunction resolveSelectionMode(\n enabled: boolean,\n multiple: boolean,\n): 'multiple' | 'none' | 'single' {\n if (!enabled) {\n return 'none';\n }\n\n return multiple ? 'multiple' : 'single';\n}\n\ninterface ResponsiveColumnMetadata {\n compactHidden: boolean;\n label: string | undefined;\n track: string;\n}\n\ninterface TableCellSpanStyle extends CSSProperties {\n '--breeze-table-column-span': string;\n '--breeze-table-compact-column-span': string;\n}\n\nconst emptyCompactHiddenColumns: readonly CollectionKey[] = [];\nconst emptyCompactHiddenColumnKeys: ReadonlySet<string> = new Set();\nconst emptyTableColumnKeys: readonly string[] = [];\nconst materializedTableHeaderItems = new WeakMap<\n object,\n readonly BreezeCollectionItem[]\n>();\nconst compactHiddenColumnsContext = createContext<ReadonlySet<string>>(\n emptyCompactHiddenColumnKeys,\n);\nconst tableColumnKeysContext =\n createContext<readonly string[]>(emptyTableColumnKeys);\n\nfunction staticTableColumnKeys(children: ReactNode): string[] {\n const keys: string[] = [];\n\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n return;\n }\n\n if (child.type === Column) {\n keys.push(encodeCollectionKey((child.props as TableColumnProps).id));\n } else if (child.type === Fragment) {\n keys.push(\n ...staticTableColumnKeys(\n (child.props as { children?: ReactNode }).children,\n ),\n );\n }\n });\n\n return keys;\n}\n\nfunction materializeTableHeaderItems(\n items: Iterable<BreezeCollectionItem>,\n): readonly BreezeCollectionItem[] {\n if (Array.isArray(items)) {\n return items as readonly BreezeCollectionItem[];\n }\n\n const iterator = items[Symbol.iterator]();\n\n if (!Object.is(iterator, items[Symbol.iterator]())) {\n return Array.from(items);\n }\n\n const cacheKey = items as object;\n const cachedItems = materializedTableHeaderItems.get(cacheKey);\n\n if (cachedItems !== undefined) {\n return cachedItems;\n }\n\n const materializedItems = Array.from(items);\n\n materializedTableHeaderItems.set(cacheKey, materializedItems);\n\n return materializedItems;\n}\n\nfunction normaliseTableHeaderItems(children: ReactNode): ReactNode {\n let changed = false;\n const normalisedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n if (child.type === Header) {\n const header = child as ReactElement<TableHeaderProps>;\n const { items } = header.props;\n\n if (items === undefined) {\n return child;\n }\n\n const materializedItems = materializeTableHeaderItems(items);\n\n if (Object.is(materializedItems, items)) {\n return child;\n }\n\n changed = true;\n\n return cloneElement(header, { items: materializedItems });\n }\n\n if (child.type === Fragment) {\n const fragment = child as ReactElement<{ children?: ReactNode }>;\n const normalisedFragmentChildren = normaliseTableHeaderItems(\n fragment.props.children,\n );\n\n if (Object.is(normalisedFragmentChildren, fragment.props.children)) {\n return child;\n }\n\n changed = true;\n\n return cloneElement(fragment, {\n children: normalisedFragmentChildren,\n });\n }\n\n return child;\n });\n\n return changed ? normalisedChildren : children;\n}\n\nfunction tableHeaderColumnKeys(\n header: ReactElement<TableHeaderProps>,\n): string[] {\n const { children, items } = header.props;\n\n if (items === undefined) {\n return staticTableColumnKeys(children);\n }\n\n return Array.from(items, ({ id }) => encodeCollectionKey(id));\n}\n\nfunction authoredTableColumnKeys(children: ReactNode): string[] {\n let keys: string[] = [];\n\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) {\n return;\n }\n\n if (child.type === Header) {\n keys = tableHeaderColumnKeys(child as ReactElement<TableHeaderProps>);\n } else if (child.type === Fragment) {\n const nestedKeys = authoredTableColumnKeys(\n (child.props as { children?: ReactNode }).children,\n );\n\n if (nestedKeys.length > 0) {\n keys = nestedKeys;\n }\n }\n });\n\n return keys;\n}\n\nfunction readResponsiveColumnMetadata(\n root: HTMLElement | null,\n desktopColumns: TableDesktopColumns = 'equal',\n compactHiddenColumns: ReadonlySet<string> = emptyCompactHiddenColumnKeys,\n): Map<string, ResponsiveColumnMetadata> {\n if (root === null) {\n return new Map();\n }\n\n return new Map(\n [...root.querySelectorAll<HTMLElement>('[data-breeze-column]')]\n .filter((heading) =>\n heading.closest('[data-breeze-table]')?.isSameNode(root),\n )\n .flatMap((heading, index): [string, ResponsiveColumnMetadata][] => {\n const column = heading.dataset.breezeColumnKey;\n\n if (column === undefined) {\n return [];\n }\n\n const compactLabel =\n heading.dataset.breezeCompactLabel === 'false'\n ? undefined\n : heading.dataset.breezeCompactLabelText;\n\n return [\n [\n column,\n {\n compactHidden: compactHiddenColumns.has(column),\n label:\n compactLabel === undefined || compactLabel.length === 0\n ? undefined\n : `${compactLabel}:`,\n track:\n heading.dataset.breezeColumnWidth ??\n responsiveGridColumnDefaults[desktopColumns][index] ??\n 'minmax(0, 1fr)',\n },\n ],\n ];\n }),\n );\n}\n\ninterface CompactSpanMetadata {\n compactHidden: boolean | undefined;\n span: number;\n}\n\nfunction compactSpanMetadata(\n columnKey: string,\n colSpan: number,\n orderedColumns: readonly string[],\n isCompactHidden: (key: string) => boolean,\n): CompactSpanMetadata {\n const firstColumnIndex = orderedColumns.indexOf(columnKey);\n\n if (firstColumnIndex < 0) {\n return { compactHidden: undefined, span: colSpan };\n }\n\n const visibleColumns = orderedColumns\n .slice(firstColumnIndex, firstColumnIndex + colSpan)\n .filter((key) => !isCompactHidden(key)).length;\n\n return {\n compactHidden: visibleColumns === 0,\n span: Math.max(visibleColumns, 1),\n };\n}\n\nfunction syncResponsiveCells(\n root: HTMLElement | null,\n columns = readResponsiveColumnMetadata(root),\n): void {\n if (root === null) {\n return;\n }\n\n const orderedColumns = [...columns.keys()];\n const isCompactHidden = (key: string) =>\n columns.get(key)?.compactHidden ?? false;\n\n root\n .querySelectorAll<HTMLTableCellElement>('[data-breeze-cell-column]')\n .forEach((cell) => {\n if (!cell.closest('[data-breeze-table]')?.isSameNode(root)) {\n return;\n }\n\n const { dataset } = cell;\n const columnKey = dataset.breezeCellColumnKey ?? '';\n const column = columns.get(columnKey);\n const label = column?.label;\n const spanMetadata =\n cell.colSpan > 1\n ? compactSpanMetadata(\n columnKey,\n cell.colSpan,\n orderedColumns,\n isCompactHidden,\n )\n : null;\n const compactHidden =\n spanMetadata === null\n ? column?.compactHidden\n : spanMetadata.compactHidden;\n\n if (compactHidden === true) {\n dataset.breezeCompactHidden = '';\n } else if (compactHidden === false) {\n delete dataset.breezeCompactHidden;\n }\n\n if (label !== undefined && label.length > 0) {\n dataset.label = label;\n } else {\n delete dataset.label;\n }\n\n if (spanMetadata !== null) {\n cell.style.setProperty(\n '--breeze-table-compact-column-span',\n `span ${spanMetadata.span} / span ${spanMetadata.span}`,\n );\n }\n });\n}\n\nfunction serializeResponsiveGridTracks(\n columns: Map<string, ResponsiveColumnMetadata>,\n compact = false,\n): string | undefined {\n if (columns.size === 0) {\n return undefined;\n }\n\n return [...columns.values()]\n .filter(({ compactHidden }) => !compact || !compactHidden)\n .map(({ track }) => track)\n .join(' ');\n}\n\ninterface ResponsiveGridTracks {\n compact: string | undefined;\n full: string | undefined;\n}\n\nfunction syncResponsiveTableMetadata(\n root: HTMLElement | null,\n desktopColumns: TableDesktopColumns,\n compactHiddenColumns: ReadonlySet<string>,\n): ResponsiveGridTracks {\n const columns = readResponsiveColumnMetadata(\n root,\n desktopColumns,\n compactHiddenColumns,\n );\n\n syncResponsiveCells(root, columns);\n\n return {\n compact: serializeResponsiveGridTracks(columns, true),\n full: serializeResponsiveGridTracks(columns),\n };\n}\n\nconst compactHorizontalNavigationKeys = new Set([\n 'ArrowLeft',\n 'ArrowRight',\n 'End',\n 'Home',\n]);\n\ntype BrowserWindow = Window & typeof globalThis;\n\nfunction isOwnedTableElement(element: HTMLElement, root: HTMLElement): boolean {\n return element.closest('[data-breeze-table]')?.isSameNode(root) ?? false;\n}\n\nfunction closestTableCell(element: Element | null): HTMLElement | null {\n return element?.closest<HTMLElement>('[data-breeze-cell-column]') ?? null;\n}\n\nfunction navigationCell(\n event: KeyboardEvent,\n root: HTMLElement,\n view: BrowserWindow,\n): HTMLElement | null {\n const eventElement =\n event.target instanceof view.Element ? event.target : null;\n const activeElement =\n root.ownerDocument.activeElement instanceof view.Element\n ? root.ownerDocument.activeElement\n : null;\n const targetCell = closestTableCell(eventElement);\n const currentCell = targetCell ?? closestTableCell(activeElement);\n const origin = targetCell === null ? activeElement : eventElement;\n\n return currentCell !== null &&\n origin === currentCell &&\n isOwnedTableElement(currentCell, root)\n ? currentCell\n : null;\n}\n\nfunction rowTableCells(\n cell: HTMLElement,\n root: HTMLElement,\n view: BrowserWindow,\n): HTMLElement[] {\n const row = cell.closest<HTMLElement>('[role=\"row\"]');\n\n if (row === null) {\n return [];\n }\n\n return [\n ...row.querySelectorAll<HTMLElement>('[data-breeze-cell-column]'),\n ].filter(\n (candidate) =>\n candidate instanceof view.HTMLElement &&\n candidate.closest('[role=\"row\"]')?.isSameNode(row) === true &&\n isOwnedTableElement(candidate, root),\n );\n}\n\nfunction ownedTableCells(root: HTMLElement): HTMLElement[] {\n return [\n ...root.querySelectorAll<HTMLElement>('[data-breeze-cell-column]'),\n ].filter((cell) => isOwnedTableElement(cell, root));\n}\n\nfunction isCompactHiddenCell(cell: HTMLElement | undefined): boolean {\n return cell?.dataset.breezeCompactHidden !== undefined;\n}\n\ntype TableCellSelector = (\n cells: readonly HTMLElement[],\n) => HTMLElement | undefined;\n\nfunction firstTableCell(\n cells: readonly HTMLElement[],\n): HTMLElement | undefined {\n return cells[0];\n}\n\nfunction lastTableCell(cells: readonly HTMLElement[]): HTMLElement | undefined {\n return cells.at(-1);\n}\n\nfunction firstVisibleTableCell(\n cells: readonly HTMLElement[],\n): HTMLElement | undefined {\n return cells.find((cell) => !isCompactHiddenCell(cell));\n}\n\nfunction lastVisibleTableCell(\n cells: readonly HTMLElement[],\n): HTMLElement | undefined {\n return cells.findLast((cell) => !isCompactHiddenCell(cell));\n}\n\nconst tableCellSelectorsByBoundary = {\n End: {\n boundary: lastTableCell,\n visibleBoundary: lastVisibleTableCell,\n },\n Home: {\n boundary: firstTableCell,\n visibleBoundary: firstVisibleTableCell,\n },\n};\n\nfunction focusVirtualizedBoundary(\n root: HTMLElement,\n view: BrowserWindow,\n selectVisibleBoundary: TableCellSelector,\n): void {\n view.requestAnimationFrame(() => {\n selectVisibleBoundary(ownedTableCells(root))?.focus();\n });\n}\n\nfunction handleCompactBoundaryNavigation(\n event: KeyboardEvent,\n root: HTMLElement,\n view: BrowserWindow,\n rowCells: HTMLElement[],\n virtualized: boolean,\n selectors: Readonly<{\n boundary: TableCellSelector;\n visibleBoundary: TableCellSelector;\n }>,\n): void {\n const globally = event.ctrlKey || event.metaKey;\n\n if (globally && virtualized) {\n focusVirtualizedBoundary(root, view, selectors.visibleBoundary);\n return;\n }\n\n const candidateCells = globally ? ownedTableCells(root) : rowCells;\n\n if (!isCompactHiddenCell(selectors.boundary(candidateCells))) {\n return;\n }\n\n const nextCell = selectors.visibleBoundary(candidateCells);\n\n if (nextCell !== undefined) {\n event.preventDefault();\n view.queueMicrotask(() => nextCell.focus());\n }\n}\n\nfunction handleCompactArrowNavigation(\n event: KeyboardEvent,\n root: HTMLElement,\n view: BrowserWindow,\n currentCell: HTMLElement,\n cells: HTMLElement[],\n): void {\n const forwardsKey =\n view.getComputedStyle(root).direction === 'rtl'\n ? 'ArrowLeft'\n : 'ArrowRight';\n const increment = event.key === forwardsKey ? 1 : -1;\n const currentIndex = cells.indexOf(currentCell);\n\n if (!isCompactHiddenCell(cells[currentIndex + increment])) {\n return;\n }\n\n const followingCells =\n increment > 0\n ? cells.slice(currentIndex + 1)\n : cells.slice(0, currentIndex).reverse();\n const nextCell = followingCells.find((cell) => !isCompactHiddenCell(cell));\n\n event.preventDefault();\n view.queueMicrotask(() => nextCell?.focus());\n}\n\nfunction handleCompactHorizontalNavigation(\n event: KeyboardEvent,\n root: HTMLElement,\n virtualized: boolean,\n): void {\n if (!compactHorizontalNavigationKeys.has(event.key)) {\n return;\n }\n\n const view = root.ownerDocument.defaultView;\n\n if (view === null || !isBreezeSmallViewport(view)) {\n return;\n }\n\n const currentCell = navigationCell(event, root, view);\n\n if (currentCell === null) {\n return;\n }\n\n const cells = rowTableCells(currentCell, root, view);\n\n if (event.key === 'Home' || event.key === 'End') {\n handleCompactBoundaryNavigation(\n event,\n root,\n view,\n cells,\n virtualized,\n tableCellSelectorsByBoundary[event.key],\n );\n return;\n }\n\n handleCompactArrowNavigation(event, root, view, currentCell, cells);\n}\n\n/** Coordinates semantic table navigation, row state, sorting, and responsive labels. */\nexport function Root({\n boundary = 'none',\n children,\n className,\n compactHiddenColumns = emptyCompactHiddenColumns,\n defaultSelection,\n defaultSort,\n desktopColumns = 'equal',\n disabledKeys,\n layout = 'responsive',\n multiple = false,\n onSelectionChange,\n onSortChange,\n readOnly = false,\n ref,\n selection,\n sort,\n virtualization,\n ...props\n}: Readonly<TableRootProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n const rootRef = useRef<HTMLElement | null>(null);\n const [internalSort, setInternalSort] = useState(defaultSort);\n const [gridTemplateColumns, setGridTemplateColumns] =\n useState<ResponsiveGridTracks>({ compact: undefined, full: undefined });\n const compactHiddenColumnKeys = useMemo(\n () => encodeCollectionKeys(compactHiddenColumns),\n [compactHiddenColumns],\n );\n const tableChildren = useMemo(\n () => normaliseTableHeaderItems(children),\n [children],\n );\n const tableColumnKeys = useMemo(\n () => authoredTableColumnKeys(tableChildren),\n [tableChildren],\n );\n const selectionEnabled =\n defaultSelection !== undefined ||\n multiple ||\n onSelectionChange !== undefined ||\n selection !== undefined;\n const resolvedSort = sort ?? internalSort;\n const compactNavigationListener = useCallback(\n (event: KeyboardEvent) => {\n const root = rootRef.current;\n\n if (root !== null) {\n handleCompactHorizontalNavigation(\n event,\n root,\n virtualization !== undefined,\n );\n }\n },\n [virtualization],\n );\n const tableRef = useCallback(\n (element: HTMLElement | null) => {\n rootRef.current?.removeEventListener(\n 'keydown',\n compactNavigationListener,\n true,\n );\n rootRef.current = element;\n element?.addEventListener('keydown', compactNavigationListener, true);\n forwardedRef(element);\n },\n [compactNavigationListener, forwardedRef],\n );\n\n useLayoutEffect(() => {\n const root = rootRef.current;\n\n if (root === null) {\n return () => undefined;\n }\n\n const syncTable = () => {\n const nextGridTemplateColumns = syncResponsiveTableMetadata(\n root,\n desktopColumns,\n compactHiddenColumnKeys,\n );\n\n setGridTemplateColumns((currentGridTemplateColumns) =>\n currentGridTemplateColumns.compact ===\n nextGridTemplateColumns.compact &&\n currentGridTemplateColumns.full === nextGridTemplateColumns.full\n ? currentGridTemplateColumns\n : nextGridTemplateColumns,\n );\n };\n\n syncTable();\n\n const observer = new MutationObserver(syncTable);\n\n observer.observe(root, {\n attributeFilter: [\n 'colspan',\n 'data-breeze-cell-column-key',\n 'data-breeze-column-width',\n 'data-breeze-compact-label',\n 'data-breeze-compact-label-text',\n ],\n attributes: true,\n childList: true,\n subtree: true,\n });\n\n return () => observer.disconnect();\n }, [tableChildren, compactHiddenColumnKeys, desktopColumns]);\n\n const viewportStyle = collectionViewportStyle(virtualization);\n const tableStyle =\n gridTemplateColumns.full === undefined && viewportStyle === undefined\n ? undefined\n : ({\n ...viewportStyle,\n '--breeze-table-columns': gridTemplateColumns.full,\n '--breeze-table-compact-columns': gridTemplateColumns.compact,\n } as CSSProperties);\n\n const table = createElement(AriaTable, {\n ...props,\n 'aria-readonly': readOnly || undefined,\n children: tableChildren,\n className: tableRoot({\n boundary,\n class: className,\n desktopColumns,\n layout,\n virtualized: virtualization !== undefined,\n }),\n 'data-boundary': boundary,\n 'data-breeze-table': '',\n 'data-layout': layout,\n 'data-virtualized': virtualization === undefined ? undefined : 'true',\n defaultSelectedKeys: defaultSelection,\n disabledKeys,\n onSelectionChange: (nextSelection: 'all' | Set<CollectionKey>) =>\n onSelectionChange?.(normaliseSelection(nextSelection)),\n onSortChange: readOnly\n ? undefined\n : (nextSort: {\n column: CollectionKey;\n direction: TableSort['direction'];\n }) => {\n const semanticSort = {\n column: nextSort.column,\n direction: nextSort.direction,\n };\n\n if (sort === undefined) {\n setInternalSort(semanticSort);\n }\n\n onSortChange?.(semanticSort);\n },\n ref: tableRef,\n selectedKeys: selection,\n selectionMode: resolveSelectionMode(selectionEnabled, multiple),\n sortDescriptor:\n resolvedSort === undefined\n ? undefined\n : {\n column: resolvedSort.column,\n direction: resolvedSort.direction,\n },\n style: tableStyle,\n } as unknown as ComponentProps<typeof AriaTable>);\n\n const renderedTable =\n virtualization === undefined\n ? table\n : createElement(\n VirtualizedCollection,\n {\n compactHiddenColumns: compactHiddenColumnKeys,\n configuration: virtualization,\n kind: 'table',\n },\n table,\n );\n\n return createElement(\n compactHiddenColumnsContext.Provider,\n { value: compactHiddenColumnKeys },\n createElement(\n tableColumnKeysContext.Provider,\n { value: tableColumnKeys },\n renderedTable,\n ),\n );\n}\n\n/** Renders a stable ordered table body with static or generic rows. */\nexport function Body<Item extends BreezeCollectionItem>({\n children,\n className,\n emptyContent,\n id,\n items,\n ref,\n ...props\n}: Readonly<TableBodyProps<Item>>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n\n return createElement(AriaTableBody, {\n ...props,\n children,\n className: tableBody({ class: className }),\n 'data-section-key': id,\n dependencies: [children],\n items,\n ref: forwardedRef,\n renderEmptyState: () => resolvedEmptyContent,\n } as unknown as ComponentProps<typeof AriaTableBody>);\n}\n\n/** Renders a stable ordered table footer with static or generic rows. */\nexport function Footer<Item extends BreezeCollectionItem>({\n children,\n className,\n id,\n items,\n ref,\n ...props\n}: Readonly<TableFooterProps<Item>>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaTableFooter, {\n ...props,\n children,\n className: tableFooter({ class: className }),\n 'data-section-key': id,\n dependencies: [children],\n items,\n ref: forwardedRef,\n } as unknown as ComponentProps<typeof AriaTableFooter>);\n}\n\n/** Renders one keyed row whose cells follow heading order. */\nexport function Row({\n 'aria-describedby': describedBy,\n className,\n disabled = false,\n id,\n onAction,\n presentation = 'data',\n ref,\n textValue,\n tone = 'default',\n ...props\n}: Readonly<TableRowProps>): ReactElement {\n const suppliedRef = useForwardedRef(ref);\n const forwardedRef = useCallback(\n (element: HTMLTableRowElement | null) => {\n suppliedRef(element);\n if (!element) {\n return;\n }\n\n if (describedBy) {\n element.setAttribute('aria-describedby', describedBy);\n } else {\n element.removeAttribute('aria-describedby');\n }\n },\n [describedBy, suppliedRef],\n );\n\n return createElement(AriaRow, {\n ...props,\n className: tableRow({\n actionable: onAction !== undefined,\n class: className,\n presentation,\n tone,\n }),\n 'data-presentation': presentation,\n 'data-tone': tone,\n id,\n isDisabled: disabled,\n onAction: onAction === undefined ? undefined : () => onAction(id),\n ref: forwardedRef,\n textValue,\n } as unknown as ComponentProps<typeof AriaRow>);\n}\n\n/** Renders one data cell and derives its compact label from the matching heading. */\nexport function Cell({\n align = 'start',\n className,\n column,\n colSpan,\n presentation = 'data',\n ref,\n textValue,\n ...props\n}: Readonly<TableCellProps>): ReactElement {\n const compactHiddenColumns = useContext(compactHiddenColumnsContext);\n const tableColumnKeys = useContext(tableColumnKeysContext);\n const forwardedRef = useForwardedRef(ref);\n const normalisedColSpan = normaliseColumnSpan(colSpan);\n const spanningColumnCount =\n normalisedColSpan !== undefined && normalisedColSpan > 1\n ? normalisedColSpan\n : undefined;\n const compactHidden = compactHiddenColumns.has(encodeCollectionKey(column));\n const compactSpan =\n spanningColumnCount === undefined\n ? null\n : compactSpanMetadata(\n encodeCollectionKey(column),\n spanningColumnCount,\n tableColumnKeys,\n (key) => compactHiddenColumns.has(key),\n );\n const spanStyle: TableCellSpanStyle | undefined =\n spanningColumnCount === undefined\n ? undefined\n : (() => {\n const span = `span ${spanningColumnCount} / span ${spanningColumnCount}`;\n const compactSpanValue =\n compactSpan === null\n ? span\n : `span ${compactSpan.span} / span ${compactSpan.span}`;\n\n return {\n '--breeze-table-column-span': span,\n '--breeze-table-compact-column-span': compactSpanValue,\n };\n })();\n const cellRef = useCallback(\n (element: HTMLTableCellElement | null) => {\n forwardedRef(element);\n const root = element?.closest<HTMLElement>('[data-breeze-table]') ?? null;\n\n syncResponsiveCells(\n root,\n readResponsiveColumnMetadata(root, undefined, compactHiddenColumns),\n );\n },\n [compactHiddenColumns, forwardedRef],\n );\n const isCompactHidden =\n (compactSpan === null ? compactHidden : compactSpan.compactHidden) === true;\n\n return createElement(AriaCell, {\n ...props,\n className: tableCell({\n align,\n class: className,\n presentation,\n spanning: spanningColumnCount !== undefined,\n }),\n colSpan: normalisedColSpan,\n 'data-breeze-cell-column': String(column),\n 'data-breeze-cell-column-key': encodeCollectionKey(column),\n 'data-breeze-compact-hidden': isCompactHidden ? '' : undefined,\n ref: cellRef,\n style: spanStyle,\n textValue,\n } as unknown as ComponentProps<typeof AriaCell>);\n}\n\n/** Renders the canonical bare arrow for an actionable row. */\nexport function Disclosure({\n position = 'overlay',\n ...props\n}: Readonly<TableDisclosureProps>): ReactElement {\n const cellProps: TableCellProps = {\n ...props,\n children: <ArrowRightIcon className=\"!block\" size={16} />,\n presentation: position === 'overlay' ? 'disclosure' : 'data',\n };\n\n return createElement(Cell, cellProps);\n}\n\n/** Renders a loading row and deduplicated intersection sentinel. */\nexport function LoadMore({\n className,\n loading = false,\n offset = 1,\n onLoadMore,\n ref,\n ...props\n}: Readonly<TableLoadMoreProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const handleLoadMore = useLoadMoreHandler({ loading, onLoadMore });\n const loadingRowRef = useRef<HTMLTableRowElement | HTMLDivElement | null>(\n null,\n );\n const semanticRef = useCallback(\n (element: HTMLTableRowElement | HTMLDivElement | null) => {\n loadingRowRef.current = element;\n element?.removeAttribute('aria-level');\n forwardedRef(element);\n },\n [forwardedRef],\n );\n\n useLayoutEffect(() => {\n loadingRowRef.current?.removeAttribute('aria-level');\n });\n\n return createElement(AriaTableLoadMoreItem, {\n ...props,\n className: tableLoadMore({ class: className }),\n isLoading: loading,\n onLoadMore: handleLoadMore,\n ref: semanticRef,\n scrollOffset: offset,\n });\n}\n\n/**\n * Coordinates ordered static or generic table sections, responsive record\n * labels, row interaction, consumer-owned sorting, and optional virtualization.\n *\n * @summary responsive compound data table with optional virtualization\n */\nexport const Table = {\n /** Ordered static or generic row section. */\n Body,\n /** One cell associated with a stable heading key. */\n Cell,\n /** One sortable or static accessible column heading. */\n Column,\n /** Canonical bare action indicator for an actionable row. */\n Disclosure,\n /** Ordered static or generic footer section. */\n Footer,\n /** Ordered static or generic heading section. */\n Header,\n /** Loading row and deduplicated load-more sentinel. */\n LoadMore,\n /** Interactive semantic table root. */\n Root,\n /** One keyed selectable or actionable row. */\n Row,\n};\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n Tab as AriaTab,\n TabList as AriaTabList,\n TabPanel as AriaTabPanel,\n TabPanels as AriaTabPanels,\n Tabs as AriaTabs,\n} from 'react-aria-components/Tabs';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { CollectionKey } from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst tabsRoot = tv({\n base: 'flex gap-4',\n defaultVariants: { orientation: 'horizontal' },\n variants: {\n orientation: {\n horizontal: 'flex-col',\n vertical: 'flex-row items-start',\n },\n },\n});\nconst tabsList = tv({\n base: 'flex gap-1 border-[var(--breeze-border)]',\n defaultVariants: { orientation: 'horizontal' },\n variants: {\n orientation: {\n horizontal: 'flex-row border-b',\n vertical: 'flex-col border-e',\n },\n },\n});\nconst tab = tv({\n base: 'min-h-10 cursor-default px-3 py-2 font-semibold text-[var(--breeze-ink-muted)] outline-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)] data-[selected]:text-[var(--breeze-primary)]',\n});\nconst tabPanel = tv({\n base: 'min-w-0 outline-none data-[focus-visible]:outline-2 data-[focus-visible]:outline-offset-2 data-[focus-visible]:outline-[var(--breeze-focus)]',\n});\n\ntype TabsRootNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\n\ninterface TabsRootSharedProps extends TabsRootNativeProps {\n /** Tab list and panels. */\n children: ReactNode;\n /** Disables every tab. Defaults to `false`. */\n disabled?: boolean;\n /** Arrow-key and layout direction. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered tabs root. */\n ref?: Ref<HTMLDivElement>;\n}\n\ninterface ControlledTabsRootProps {\n /** Current selected tab key. */\n value: CollectionKey;\n /** Called with the next selected tab key. */\n onChange: (value: CollectionKey) => void;\n defaultValue?: never;\n readOnly?: false;\n}\n\ninterface ReadOnlyTabsRootProps {\n /** Current immutable selected tab key. */\n value: CollectionKey;\n /** Marks controlled selection as intentionally immutable. */\n readOnly: true;\n defaultValue?: never;\n onChange?: never;\n}\n\ninterface UncontrolledTabsRootProps {\n /** Initial selected tab key. */\n defaultValue?: CollectionKey;\n /** Called with the next selected tab key. */\n onChange?: (value: CollectionKey) => void;\n readOnly?: false;\n value?: never;\n}\n\n/** Props for controlled, read-only, or uncontrolled tab selection. */\nexport type TabsRootProps = TabsRootSharedProps &\n (ControlledTabsRootProps | ReadOnlyTabsRootProps | UncontrolledTabsRootProps);\n\n/** Props for the accessible list of tab labels. */\nexport interface TabsListProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Tab label parts. */\n children: ReactNode;\n /** Ref to the rendered tab list. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for one selectable tab label. */\nexport interface TabsTabProps\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'id' | 'onClick' | 'onClickCapture' | 'style'\n > {\n /** Visible tab label. */\n children: ReactNode;\n /** Prevents focus and selection. Defaults to `false`. */\n disabled?: boolean;\n /** Stable string or number key matching its panel. */\n id: CollectionKey;\n /** Ref to the rendered tab. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for the optional grouping of tab panels. */\nexport interface TabsPanelsProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Tab panels. */\n children: ReactNode;\n /** Ref to the rendered panel group. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Props for content associated with one tab. */\nexport interface TabsPanelProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'style'> {\n /** Panel content. */\n children: ReactNode;\n /** Stable key matching its tab. */\n id: CollectionKey;\n /** Keeps inactive content mounted and inert. Defaults to `false`. */\n forceMount?: boolean;\n /** Ref to the rendered panel. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/** Coordinates tab selection, keyboard navigation, and panel visibility. */\nexport function Root({\n className,\n defaultValue,\n disabled = false,\n onChange,\n orientation = 'horizontal',\n readOnly: _readOnly,\n ref,\n value,\n ...props\n}: Readonly<TabsRootProps>): ReactElement {\n useBreezeContext();\n\n return createElement(AriaTabs, {\n ...props,\n className: tabsRoot({ class: className, orientation }),\n defaultSelectedKey: defaultValue,\n isDisabled: disabled,\n onSelectionChange: onChange,\n orientation,\n ref: useForwardedRef(ref),\n selectedKey: value,\n });\n}\n\n/** Groups tab labels and inherits root orientation. */\nexport function List({\n className,\n ref,\n ...props\n}: Readonly<TabsListProps>): ReactElement {\n return createElement(AriaTabList, {\n ...props,\n className: ({ orientation }: { orientation: 'horizontal' | 'vertical' }) =>\n tabsList({ class: className, orientation }),\n ref: useForwardedRef(ref),\n });\n}\n\n/** Renders one keyed tab label. */\nexport function Tab({\n className,\n disabled = false,\n id,\n ref,\n ...props\n}: Readonly<TabsTabProps>): ReactElement {\n return createElement(AriaTab, {\n ...props,\n className: tab({ class: className }),\n id,\n isDisabled: disabled,\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaTab>);\n}\n\n/** Groups keyed panels for transition coordination. */\nexport function Panels({\n className,\n ref,\n ...props\n}: Readonly<TabsPanelsProps>): ReactElement {\n return createElement(AriaTabPanels, {\n ...props,\n className,\n ref: useForwardedRef(ref),\n });\n}\n\n/** Renders content associated with a keyed tab. */\nexport function Panel({\n className,\n forceMount = false,\n id,\n ref,\n ...props\n}: Readonly<TabsPanelProps>): ReactElement {\n return createElement(AriaTabPanel, {\n ...props,\n className: tabPanel({ class: className }),\n id,\n ref: useForwardedRef(ref),\n shouldForceMount: forceMount,\n });\n}\n\n/**\n * Coordinates keyed tab labels, orientation-aware keyboard navigation, and\n * visibility of their associated panels.\n *\n * @summary accessible compound tabbed content navigation\n */\nexport const Tabs = {\n /** List of selectable tab labels. */\n List,\n /** Content associated with one tab. */\n Panel,\n /** Optional panel collection wrapper. */\n Panels,\n /** Selection and orientation root. */\n Root,\n /** One keyed selectable label. */\n Tab,\n};\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { Tag as AriaTag } from 'react-aria-components/TagGroup';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { CollectionKey } from '../../internal/types/collection';\n\nconst style = tv({\n base: 'inline-flex min-h-8 items-center border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] px-3 text-sm outline-none data-[focused]:outline-2 data-[selected]:border-[var(--breeze-primary)] data-[selected]:bg-[var(--breeze-primary-soft)] data-[disabled]:opacity-45',\n});\n/** Props for one keyed tag. */ export interface TagProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'id' | 'onClick' | 'style'> {\n /** Visible tag content. */ children: ReactNode;\n /** Prevents focus, selection, actions, and removal. Defaults to `false`. */ disabled?: boolean;\n /** Stable tag key. */ id: CollectionKey;\n /** Called with this tag key when its semantic action is invoked. */ onAction?: (\n key: CollectionKey,\n ) => void;\n /** Ref to the rendered tag. */ ref?: Ref<HTMLDivElement>;\n /** Plain text for accessibility/typeahead. */ textValue: string;\n}\n/**\n * Renders one keyed, focusable tag for selection, semantic actions, or removal\n * by its containing TagGroup.\n *\n * @summary keyed interactive item for a tag collection\n */\nexport function Tag({\n className,\n disabled = false,\n id,\n onAction,\n ref,\n ...props\n}: Readonly<TagProps>): ReactElement {\n const r = useForwardedRef(ref);\n return createElement(AriaTag, {\n ...props,\n className: style({ class: className }),\n id,\n isDisabled: disabled,\n onAction: onAction ? () => onAction(id) : undefined,\n ref: r,\n textValue: props.textValue,\n } as ComponentProps<typeof AriaTag>);\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport {\n TagGroup as AriaTagGroup,\n TagList as AriaTagList,\n} from 'react-aria-components/TagGroup';\nimport { tv } from 'tailwind-variants';\nimport useCollectionEmptyContent from '../../internal/collections/useCollectionEmptyContent';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type {\n BreezeCollectionItem,\n CollectionContentProps,\n CollectionKey,\n CollectionSelection,\n} from '../../internal/types/collection';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst root = tv({ base: 'flex min-w-0 flex-col gap-2' });\nconst list = tv({ base: 'flex flex-wrap gap-2 outline-none' });\ninterface Shared\n extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'onChange' | 'style'\n > {\n /** Compound label, tag list, and supporting guidance parts. */ children: ReactNode;\n /** Keys whose tags cannot receive focus, selection, actions, or removal. */ disabledKeys?: Iterable<CollectionKey>;\n /** Called with the stable keys removed through keyboard interaction. */ onRemove?: (\n keys: CollectionKey[],\n ) => void;\n /** Ref to the rendered tag-group root. */ ref?: Ref<HTMLDivElement>;\n}\ntype State =\n | {\n /** Current selected tag keys, or every key for select-all state. */\n selection: CollectionSelection;\n /** Called with the next selected tag keys. */\n onSelectionChange: (selection: CollectionSelection) => void;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n /** Controlled mutable state cannot be marked read-only. */\n readOnly?: false;\n }\n | {\n /** Current immutable selected tag keys. */\n selection: CollectionSelection;\n /** Prevents selection changes and removal. */\n readOnly: true;\n /** Excluded because read-only selection cannot change. */\n onSelectionChange?: never;\n /** Excluded when selection is controlled. */\n defaultSelection?: never;\n }\n | {\n /** Initial selected tag keys. */\n defaultSelection?: CollectionSelection;\n /** Called with the next selected tag keys. */\n onSelectionChange?: (selection: CollectionSelection) => void;\n /** Excluded when selection is uncontrolled. */\n selection?: never;\n /** Uncontrolled state cannot be marked read-only. */\n readOnly?: false;\n };\n/** Tag-group selection and removal props. */ export type TagGroupRootProps =\n Shared & State;\n/** Props for the visible tag-group label. */ export type TagGroupLabelProps =\n TextFieldLabelProps;\n/** Props for supporting tag-group guidance. */ export type TagGroupDescriptionProps =\n TextFieldDescriptionProps;\n/** Static or generic tag list props. */ export type TagGroupListProps<\n Item extends BreezeCollectionItem = BreezeCollectionItem,\n> = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> &\n CollectionContentProps<Item> & {\n /** Content displayed when the tag collection has no items. */ emptyContent?: ReactNode;\n /** Ref to the rendered tag-list element. */ ref?: Ref<HTMLDivElement>;\n };\nconst normalise = (value: 'all' | Set<CollectionKey>): CollectionSelection =>\n value === 'all' ? 'all' : [...value];\n/** Coordinates tag selection, focus, and removal. */ export function Root({\n children,\n className,\n defaultSelection,\n disabledKeys,\n onRemove,\n onSelectionChange,\n readOnly = false,\n ref,\n selection,\n ...props\n}: Readonly<TagGroupRootProps>): ReactElement {\n useBreezeContext();\n const r = useForwardedRef(ref);\n return createElement(AriaTagGroup, {\n ...props,\n children,\n className: root({ class: className }),\n defaultSelectedKeys: defaultSelection,\n disabledKeys,\n onRemove:\n readOnly || !onRemove\n ? undefined\n : (keys: Set<CollectionKey>) => onRemove([...keys]),\n onSelectionChange: readOnly\n ? undefined\n : (keys: 'all' | Set<CollectionKey>) =>\n onSelectionChange?.(normalise(keys)),\n ref: r,\n selectedKeys: selection,\n selectionMode:\n selection !== undefined ||\n defaultSelection !== undefined ||\n onSelectionChange !== undefined\n ? 'multiple'\n : 'none',\n } as unknown as ComponentProps<typeof AriaTagGroup>);\n}\n/** Renders static or typed generic tags. */ export function List<\n Item extends BreezeCollectionItem,\n>({\n children,\n className,\n emptyContent,\n items,\n ref,\n ...props\n}: Readonly<TagGroupListProps<Item>>): ReactElement {\n const r = useForwardedRef(ref);\n const resolvedEmptyContent = useCollectionEmptyContent(emptyContent);\n\n return createElement(AriaTagList, {\n ...props,\n children,\n className: list({ class: className }),\n items,\n ref: r,\n renderEmptyState: () => resolvedEmptyContent,\n } as unknown as ComponentProps<typeof AriaTagList>);\n}\n/**\n * Coordinates a labelled static or generic tag collection with optional\n * multiple selection, disabled keys, and application-owned removal.\n *\n * @summary accessible selectable and removable tag collection\n */\nexport const TagGroup = {\n /** Supporting guidance associated with the tag group. */ Description:\n TextField.Description,\n /** Visible label associated with the tag list. */ Label: TextField.Label,\n /** Static or typed generic tag collection. */ List,\n /** Selection, focus, and removal coordination root. */ Root,\n};\n","import type { ReactElement, Ref, TextareaHTMLAttributes } from 'react';\nimport { createElement } from 'react';\nimport { TextArea as AriaTextArea } from 'react-aria-components/TextField';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { ControlSize } from '../../internal/styling/visual';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n type TextFieldRootProps,\n} from '../TextField/TextField';\n\nconst textAreaControl = tv({\n base: 'block w-full resize-y border border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)] transition-colors duration-[var(--breeze-duration-fast)] placeholder:text-[var(--breeze-ink-muted)] disabled:cursor-not-allowed disabled:bg-[var(--breeze-surface-subtle)] disabled:opacity-70 aria-invalid:border-[var(--breeze-danger)]',\n defaultVariants: {\n size: 'md',\n },\n variants: {\n size: {\n lg: 'min-h-32 px-4 py-3 text-base',\n md: 'min-h-24 px-3 py-2 text-sm',\n sm: 'min-h-20 px-2.5 py-1.5 text-xs',\n },\n },\n});\n\n/** Props for controlled, read-only, or uncontrolled multiline field state. */\nexport type TextAreaRootProps = TextFieldRootProps;\n\n/** Props for the visible multiline field label. */\nexport type TextAreaLabelProps = TextFieldLabelProps;\n\n/** Props for supporting text associated with the multiline control. */\nexport type TextAreaDescriptionProps = TextFieldDescriptionProps;\n\n/** Props for an accessible multiline validation message. */\nexport type TextAreaErrorProps = TextFieldErrorProps;\n\n/** Props for the native multiline control part. */\nexport interface TextAreaControlProps\n extends Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n | 'children'\n | 'className'\n | 'defaultValue'\n | 'disabled'\n | 'onChange'\n | 'readOnly'\n | 'required'\n | 'style'\n | 'value'\n > {\n /** Placement and composition classes. */\n className?: string;\n /** Ref to the rendered textarea. */\n ref?: Ref<HTMLTextAreaElement>;\n /** Canonical control size. Defaults to `md`. */\n size?: ControlSize;\n}\n\n/** Renders the editable native multiline control for a TextArea. */\nexport function Control({\n className,\n ref,\n size,\n ...props\n}: Readonly<TextAreaControlProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(AriaTextArea, {\n ...props,\n className: textAreaControl({ class: className, size }),\n ref: forwardedRef,\n });\n}\n\n/**\n * Accessible compound multiline text-entry primitive.\n *\n * @summary labelled multiline text entry with validation anatomy\n */\nexport const TextArea = {\n /** Editable native multiline control. */\n Control,\n /** Supporting guidance associated with the control. */\n Description: TextField.Description,\n /** Validation message associated with an invalid control. */\n Error: TextField.Error,\n /** Persistent accessible label. */\n Label: TextField.Label,\n /** State and accessibility root. */\n Root: TextField.Root,\n};\n","import type { Time } from '@internationalized/date';\nimport type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement } from 'react';\nimport { TimeField as AriaTimeField } from 'react-aria-components/TimeField';\nimport { tv } from 'tailwind-variants';\nimport {\n formatTimeValue,\n parseTimeValue,\n} from '../../internal/date/conversion';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { DateInputPart, type DateInputPartProps } from '../date/DateInput';\nimport {\n TextField,\n type TextFieldDescriptionProps,\n type TextFieldErrorProps,\n type TextFieldLabelProps,\n} from '../TextField/TextField';\n\nconst rootStyle = tv({ base: 'flex min-w-0 flex-col gap-1.5' });\ntype NativeRootProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'defaultValue' | 'onChange' | 'style'\n>;\ninterface SharedProps extends NativeRootProps {\n /** Compound label, segmented input, description, and error parts. */ children: ReactNode;\n /** Prevents focus and time editing. Defaults to `false`. */ disabled?: boolean;\n /** Associates the hidden native time input with an external form. */ form?: string;\n /** Hidden native time input ref used for form integration. */ inputRef?: Ref<HTMLInputElement>;\n /** Exposes invalid state. Defaults to `false`. */ invalid?: boolean;\n /** Latest selectable `HH:mm` or `HH:mm:ss` time. */ maxValue?: string;\n /** Earliest selectable `HH:mm` or `HH:mm:ss` time. */ minValue?: string;\n /** Native form field name for the stable time string. */ name?: string;\n /** Marks the time as required. Defaults to `false`. */ required?: boolean;\n /** Ref to the rendered time-field root. */ ref?: Ref<HTMLDivElement>;\n}\ntype State =\n | {\n /** Current controlled time, or `null` when empty. */ value:\n | string\n | null;\n /** Called with the next stable time string or `null`. */ onChange: (\n value: string | null,\n ) => void;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Mutable state cannot be read-only. */ readOnly?: false;\n }\n | {\n /** Current immutable time, or `null` when empty. */ value: string | null;\n /** Prevents changes to the controlled time. */ readOnly: true;\n /** Excluded when controlled. */ defaultValue?: never;\n /** Excluded because read-only times cannot change. */ onChange?: never;\n }\n | {\n /** Initial uncontrolled time, or `null` when empty. */ defaultValue?:\n | string\n | null;\n /** Called with the next stable time string or `null`. */ onChange?: (\n value: string | null,\n ) => void;\n /** Uncontrolled state cannot be read-only. */ readOnly?: false;\n /** Excluded when uncontrolled. */ value?: never;\n };\n/** Props for controlled, uncontrolled, or read-only stable time state. */\nexport type TimeFieldRootProps = SharedProps & State;\n/** Props for the visible time-field label. */\nexport type TimeFieldLabelProps = TextFieldLabelProps;\n/** Props for the segmented time input. */\nexport type TimeFieldInputProps = DateInputPartProps;\n/** Props for supporting time-field guidance. */\nexport type TimeFieldDescriptionProps = TextFieldDescriptionProps;\n/** Props for a time-field validation message. */\nexport type TimeFieldErrorProps = TextFieldErrorProps;\n\n/** Coordinates stable time strings with locale-aware editable segments. */\nexport function Root({\n children,\n className,\n defaultValue,\n disabled = false,\n form,\n inputRef,\n invalid = false,\n maxValue,\n minValue,\n name,\n onChange,\n readOnly = false,\n ref,\n required = false,\n value,\n ...props\n}: Readonly<TimeFieldRootProps>): ReactElement {\n useBreezeContext();\n const forwardedRef = useForwardedRef(ref);\n const forwardedInputRef = useForwardedRef(inputRef);\n const hasSeconds = [value, defaultValue, minValue, maxValue].some(\n (candidate) => candidate?.split(':').length === 3,\n );\n\n return createElement(AriaTimeField, {\n ...props,\n children,\n className: rootStyle({ class: className }),\n defaultValue: parseTimeValue(defaultValue ?? null) ?? undefined,\n form,\n granularity: hasSeconds ? 'second' : 'minute',\n inputRef: forwardedInputRef,\n isDisabled: disabled,\n isInvalid: invalid,\n isReadOnly: readOnly,\n isRequired: required,\n maxValue: parseTimeValue(maxValue ?? null) ?? undefined,\n minValue: parseTimeValue(minValue ?? null) ?? undefined,\n name,\n onChange: readOnly\n ? undefined\n : (time: Time | null) => onChange?.(formatTimeValue(time)),\n ref: forwardedRef,\n value: value === undefined ? undefined : parseTimeValue(value),\n } as unknown as ComponentProps<typeof AriaTimeField>);\n}\n/**\n * Accessible compound time field with stable string values.\n *\n * @summary locale-aware segmented entry for one stable time value\n */\nexport const TimeField = {\n /** Supporting guidance associated with the time field. */ Description:\n TextField.Description,\n /** Validation feedback associated with the time field. */ Error:\n TextField.Error,\n /** Locale-aware editable time segments. */ Input: DateInputPart,\n /** Visible label associated with the segmented input. */ Label:\n TextField.Label,\n /** Stable time state, constraints, validation, and form root. */ Root,\n};\n","import type {\n ComponentProps,\n ComponentPropsWithRef,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport {\n createContext,\n createElement,\n useContext,\n useEffect,\n useId,\n useMemo,\n} from 'react';\nimport type { QueuedToast } from 'react-aria-components/Toast';\nimport {\n Button as AriaButton,\n Text as AriaText,\n UNSTABLE_Toast as AriaToast,\n UNSTABLE_ToastContent as AriaToastContent,\n UNSTABLE_ToastQueue as AriaToastQueue,\n UNSTABLE_ToastRegion as AriaToastRegion,\n} from 'react-aria-components/Toast';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport type { VisualVariant } from '../../internal/styling/visual';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst DEFAULT_LIFETIME = 5000;\n\nconst toastSurface = tv({\n base: 'grid min-w-72 max-w-md grid-cols-[minmax(0,1fr)_auto] gap-x-3 gap-y-2 border border-s-4 px-4 py-3 text-sm shadow-lg outline-none forced-colors:border-[CanvasText] data-[focus-visible]:ring-2 data-[focus-visible]:ring-[var(--breeze-focus)]',\n defaultVariants: {\n variant: 'info',\n },\n variants: {\n variant: {\n danger:\n 'border-[var(--breeze-danger)] bg-[var(--breeze-danger-soft)] text-[var(--breeze-ink)]',\n dark: 'border-[var(--breeze-shell)] bg-[var(--breeze-shell)] text-white',\n info: 'border-[var(--breeze-info)] bg-[var(--breeze-info-soft)] text-[var(--breeze-ink)]',\n light:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface)] text-[var(--breeze-ink)]',\n primary:\n 'border-[var(--breeze-primary)] bg-[var(--breeze-primary-soft)] text-[var(--breeze-ink)]',\n secondary:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-surface-subtle)] text-[var(--breeze-ink)]',\n success:\n 'border-[var(--breeze-success)] bg-[var(--breeze-success-soft)] text-[var(--breeze-ink)]',\n warning:\n 'border-[var(--breeze-warning)] bg-[var(--breeze-warning-soft)] text-[var(--breeze-ink)]',\n },\n },\n});\nconst toastRegion = tv({\n base: 'fixed inset-block-start-4 inset-inline-end-4 z-50 grid max-h-[calc(100dvh-2rem)] gap-3 overflow-auto outline-none',\n});\nconst toastContent = tv({ base: 'contents' });\nconst toastCopy = tv({ base: 'grid min-w-0 gap-1' });\nconst toastTitle = tv({ base: 'font-semibold' });\nconst toastDescription = tv({ base: 'text-current/80' });\nconst toastAction = tv({\n base: 'inline-flex min-h-11 items-center justify-self-start font-semibold underline underline-offset-2 outline-none hover:no-underline focus-visible:ring-2 focus-visible:ring-current',\n});\nconst toastClose = tv({\n base: 'col-start-2 row-start-1 grid size-11 place-items-center self-start rounded-sm text-xl leading-none outline-none hover:bg-black/10 focus-visible:ring-2 focus-visible:ring-current forced-colors:border forced-colors:border-[ButtonText]',\n});\n\n/** Application action shown within a toast. */\nexport interface ToastAction {\n /** Application-owned translated action label. */\n label: ReactNode;\n /** Called once when the action is activated. */\n onAction: () => void;\n}\n\n/** Content and lifecycle options for a queued toast. */\nexport interface ToastOptions {\n /** Optional action that dismisses the toast after activation. */\n action?: ToastAction;\n /** Optional application-owned translated supporting content. */\n description?: ReactNode;\n /** Auto-dismiss delay in finite non-negative milliseconds; `0` dismisses immediately and `null` persists. Defaults to `5000`. */\n lifetime?: number | null;\n /** Called once when the toast is dismissed, except during provider teardown. */\n onDismiss?: () => void;\n /** Application-owned translated primary content. */\n title: ReactNode;\n /** Bootstrap-aligned semantic colour. Defaults to `info`. */\n variant?: VisualVariant;\n}\n\n/** Provider-scoped commands for showing and dismissing toasts. */\nexport interface ToastController {\n /** Dismisses the toast with the returned queue identifier. */\n dismiss: (id: string) => void;\n /** Adds a toast and returns its provider-scoped queue identifier. */\n show: (options: ToastOptions) => string;\n}\n\ninterface ToastContentData {\n action: ToastAction | undefined;\n description: ReactNode | undefined;\n title: ReactNode;\n variant: VisualVariant;\n}\n\ninterface ToastContextValue {\n closeLabel: string;\n controller: ToastController;\n queue: AriaToastQueue<ToastContentData>;\n regionLabel: string;\n}\n\nconst ToastContext = createContext<ToastContextValue | null>(null);\n\ntype ToastNativeProps = Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children' | 'role' | 'style' | 'title'\n>;\n\n/** Props for rendering an individually controlled toast. Prefer `useToast` for queued application notifications. */\nexport interface ToastProps extends ToastNativeProps {\n /** Optional application action. */\n action?: ToastAction;\n /** Accessible label for the dismiss button. Defaults to the provider close message. */\n closeLabel?: string;\n /** Optional application-owned translated supporting content. */\n description?: ReactNode;\n /** Called when the dismiss button or action closes the toast. */\n onDismiss: () => void;\n /** Ref to the rendered toast element. */\n ref?: Ref<HTMLDivElement>;\n /** Application-owned translated primary content. */\n title: ReactNode;\n /** Bootstrap-aligned semantic colour. Defaults to `info`. */\n variant?: VisualVariant;\n}\n\ninterface ToastViewProps {\n action: ToastAction | undefined;\n closeLabel: string;\n description: ReactNode | undefined;\n onAction: (() => void) | undefined;\n onDismiss: () => void;\n title: ReactNode;\n}\n\nfunction ToastView({\n action,\n closeLabel,\n description,\n onAction,\n onDismiss,\n title,\n}: Readonly<ToastViewProps>): ReactElement {\n return createElement(\n AriaToastContent,\n {\n className: toastContent(),\n },\n createElement(\n 'div',\n {\n className: toastCopy(),\n },\n createElement(\n AriaText,\n {\n className: toastTitle(),\n slot: 'title',\n },\n title,\n ),\n description === undefined\n ? null\n : createElement(\n AriaText,\n {\n className: toastDescription(),\n slot: 'description',\n },\n description,\n ),\n action === undefined\n ? null\n : createElement(\n AriaButton,\n {\n className: toastAction(),\n onPress: onAction,\n },\n action.label,\n ),\n ),\n createElement(\n AriaButton,\n {\n 'aria-label': closeLabel,\n className: toastClose(),\n onPress: onDismiss,\n slot: 'close',\n },\n '×',\n ),\n );\n}\n\n/**\n * Displays one explicitly controlled notification. Queued application\n * notifications should use `useToast`.\n *\n * @summary for explicitly controlled notifications outside the provider queue\n */\nexport function Toast({\n action,\n className,\n closeLabel,\n description,\n onDismiss,\n ref,\n title,\n variant = 'info',\n ...props\n}: Readonly<ToastProps>): ReactElement {\n const { messages } = useBreezeContext();\n const titleId = useId();\n const descriptionId = useId();\n const actionHandler =\n action === undefined\n ? undefined\n : () => {\n action.onAction();\n onDismiss();\n };\n const rootProps: ComponentPropsWithRef<'div'> & {\n 'data-variant': VisualVariant;\n } = {\n ...props,\n 'aria-atomic': 'true',\n 'aria-describedby': description === undefined ? undefined : descriptionId,\n 'aria-labelledby': titleId,\n 'aria-live': 'polite',\n 'aria-modal': 'false',\n className: toastSurface({ class: className, variant }),\n 'data-variant': variant,\n ref: useForwardedRef(ref),\n role: 'alertdialog',\n tabIndex: 0,\n };\n\n return createElement(\n 'div',\n rootProps,\n createElement(\n 'div',\n {\n className: toastContent(),\n },\n createElement(\n 'div',\n {\n className: toastCopy(),\n },\n createElement('div', { className: toastTitle(), id: titleId }, title),\n description === undefined\n ? null\n : createElement(\n 'div',\n {\n className: toastDescription(),\n id: descriptionId,\n },\n description,\n ),\n action === undefined\n ? null\n : createElement(\n AriaButton,\n {\n className: toastAction(),\n onPress: actionHandler,\n },\n action.label,\n ),\n ),\n createElement(\n AriaButton,\n {\n 'aria-label': closeLabel ?? messages.close,\n className: toastClose(),\n onPress: onDismiss,\n },\n '×',\n ),\n ),\n );\n}\n\n/** Props for the provider-scoped toast stack. BreezeProvider renders this automatically. */\nexport interface ToastRegionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'role' | 'style'> {\n /** Accessible translated label for the notification stack. Defaults to the provider message. */\n label?: string;\n /** Ref to the rendered region element. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * Renders the current provider's toast queue into its scoped portal host.\n * BreezeProvider already renders the primary region; add another only when an\n * advanced layout requires a separately labelled queue presentation.\n *\n * @summary for rendering an additional provider-scoped toast queue region\n */\nexport function ToastRegion({\n className,\n label,\n ref,\n ...props\n}: Readonly<ToastRegionProps>): ReactElement | null {\n const context = useContext(ToastContext);\n const forwardedRef = useForwardedRef(ref);\n\n if (context === null) {\n throw new Error('ToastRegion must be rendered within BreezeProvider.');\n }\n\n const renderToast = ({\n toast,\n }: {\n toast: QueuedToast<ToastContentData>;\n }): ReactElement => {\n const { action, description, title, variant } = toast.content;\n const actionHandler =\n action === undefined\n ? undefined\n : () => {\n action.onAction();\n context.controller.dismiss(toast.key);\n };\n const queuedToastProps = {\n children: createElement(ToastView, {\n action,\n closeLabel: context.closeLabel,\n description,\n onAction: actionHandler,\n onDismiss: () => {\n context.controller.dismiss(toast.key);\n },\n title,\n }),\n className: toastSurface({ variant }),\n 'data-variant': variant,\n toast,\n } as unknown as ComponentProps<typeof AriaToast<ToastContentData>>;\n\n return createElement(AriaToast<ToastContentData>, queuedToastProps);\n };\n const regionProps = {\n ...props,\n 'aria-label': label ?? context.regionLabel,\n children: renderToast,\n className: toastRegion({ class: className }),\n queue: context.queue,\n ref: forwardedRef,\n } as ComponentProps<typeof AriaToastRegion<ToastContentData>>;\n\n return createElement(AriaToastRegion<ToastContentData>, regionProps);\n}\n\ninterface ToastProviderBoundaryProps {\n children: ReactNode;\n closeLabel: string;\n limit: number;\n regionLabel: string;\n}\n\nfunction validateLifetime(lifetime: number | null): void {\n if (lifetime !== null && (!Number.isFinite(lifetime) || lifetime < 0)) {\n throw new RangeError(\n 'Toast lifetime must be null or a finite non-negative number of milliseconds.',\n );\n }\n}\n\n/** @internal Establishes the queue owned by one BreezeProvider instance. */\nexport function ToastProviderBoundary({\n children,\n closeLabel,\n limit,\n regionLabel,\n}: Readonly<ToastProviderBoundaryProps>): ReactElement {\n const queue = useMemo(\n () => new AriaToastQueue<ToastContentData>({ maxVisibleToasts: limit }),\n [limit],\n );\n const controller = useMemo<ToastController>(\n () => ({\n dismiss: (id) => {\n queue.close(id);\n },\n show: ({\n action,\n description,\n lifetime = DEFAULT_LIFETIME,\n onDismiss,\n title,\n variant = 'info',\n }) => {\n validateLifetime(lifetime);\n\n const id = queue.add(\n {\n action,\n description,\n title,\n variant,\n },\n {\n onClose: onDismiss,\n timeout: lifetime === null || lifetime === 0 ? undefined : lifetime,\n },\n );\n\n if (lifetime === 0) {\n queue.close(id);\n }\n\n return id;\n },\n }),\n [queue],\n );\n const context = useMemo<ToastContextValue>(\n () => ({\n closeLabel,\n controller,\n queue,\n regionLabel,\n }),\n [closeLabel, controller, queue, regionLabel],\n );\n\n useEffect(\n () => () => {\n queue.pauseAll();\n queue.clear();\n },\n [queue],\n );\n\n return createElement(\n ToastContext,\n {\n value: context,\n },\n children,\n createElement(ToastRegion),\n );\n}\n\n/**\n * Returns commands for showing and dismissing notifications in the nearest\n * BreezeProvider queue. Call this hook only below BreezeProvider.\n *\n * @summary for controlling the nearest BreezeProvider toast queue\n */\nexport function useToast(): ToastController {\n const context = useContext(ToastContext);\n\n if (context === null) {\n throw new Error('useToast must be called within BreezeProvider.');\n }\n\n return context.controller;\n}\n","import type { HTMLAttributes, ReactElement, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\nimport { Toolbar as AriaToolbar } from 'react-aria-components/Toolbar';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst toolbar = tv({\n base: 'flex gap-2',\n defaultVariants: {\n orientation: 'horizontal',\n },\n variants: {\n orientation: {\n horizontal: 'flex-row items-center',\n vertical: 'flex-col items-stretch',\n },\n },\n});\n\n/** Props for a keyboard-navigable collection of related controls. */\nexport interface ToolbarProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style'> {\n /** Related interactive controls. */\n children: ReactNode;\n /** Arrow-key navigation axis. Defaults to `horizontal`. */\n orientation?: 'horizontal' | 'vertical';\n /** Ref to the rendered toolbar. */\n ref?: Ref<HTMLDivElement>;\n}\n\n/**\n * Groups related controls under toolbar semantics and arrow-key navigation.\n *\n * @summary related controls with orientation-aware arrow navigation\n */\nexport function Toolbar({\n children,\n className,\n orientation,\n ref,\n ...props\n}: Readonly<ToolbarProps>): ReactElement {\n useBreezeContext();\n\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(\n AriaToolbar,\n {\n ...props,\n className: toolbar({\n class: className,\n orientation,\n }),\n orientation,\n ref: forwardedRef,\n },\n children,\n );\n}\n","import type {\n ComponentProps,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n} from 'react';\nimport { createElement, useId } from 'react';\nimport {\n Focusable,\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n} from 'react-aria-components/Tooltip';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\nimport { Button, type ButtonProps } from '../Button/Button';\nimport { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden';\n\nconst tooltip = tv({\n base: 'z-50 max-w-64 border border-[var(--breeze-border-strong)] bg-[var(--breeze-ink)] px-2.5 py-1.5 text-sm text-[var(--breeze-ink-inverse)] shadow-lg data-[entering]:animate-in data-[exiting]:animate-out motion-reduce:transition-none forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]',\n defaultVariants: {\n variant: 'secondary',\n },\n variants: {\n variant: {\n danger:\n 'border-[var(--breeze-danger)] bg-[var(--breeze-danger)] text-[var(--breeze-ink-inverse)]',\n primary:\n 'border-[var(--breeze-primary)] bg-[var(--breeze-primary)] text-[var(--breeze-ink-inverse)]',\n secondary:\n 'border-[var(--breeze-border-strong)] bg-[var(--breeze-ink)] text-[var(--breeze-ink-inverse)]',\n },\n },\n});\n\nconst tooltipIconTrigger = tv({\n base: 'inline-flex size-5 shrink-0 cursor-help items-center justify-center outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--breeze-focus)]',\n defaultVariants: {\n variant: 'secondary',\n },\n variants: {\n variant: {\n danger: 'text-[var(--breeze-danger)]',\n primary: 'text-[var(--breeze-primary)]',\n secondary: 'text-[var(--breeze-ink-muted)]',\n },\n },\n});\n\ninterface TooltipRootSharedProps {\n /** Trigger and tooltip content. */ children: ReactNode;\n /** Delay before opening in milliseconds. Defaults to `700`. */ delay?: number;\n /** Delay before closing in milliseconds. Defaults to `0`. */ closeDelay?: number;\n}\ninterface ControlledTooltipRootProps {\n /** Current open state. */ open: boolean;\n /** Called with next open state. */ onOpenChange: (open: boolean) => void;\n defaultOpen?: never;\n readOnly?: false;\n}\ninterface ReadOnlyTooltipRootProps {\n /** Current immutable open state. */ open: boolean;\n /** Marks controlled state immutable. */ readOnly: true;\n defaultOpen?: never;\n onOpenChange?: never;\n}\ninterface UncontrolledTooltipRootProps {\n /** Initial open state. */ defaultOpen?: boolean;\n /** Called with next open state. */ onOpenChange?: (open: boolean) => void;\n open?: never;\n readOnly?: false;\n}\n/** Props for controlled, read-only, or uncontrolled tooltip state. */ export type TooltipRootProps =\n TooltipRootSharedProps &\n (\n | ControlledTooltipRootProps\n | ReadOnlyTooltipRootProps\n | UncontrolledTooltipRootProps\n );\n/** Props for the tooltip trigger action. */ export type TooltipTriggerProps =\n ButtonProps;\n/** Props for a compact non-action tooltip trigger with a required accessible name. */ export interface TooltipIconTriggerProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'children' | 'style'> {\n /** Accessible name for the informational icon. */\n 'aria-label': string;\n /** Decorative icon. */\n children: ReactNode;\n /** Ref to the rendered focusable informational icon. */\n ref?: Ref<HTMLSpanElement>;\n /** Semantic icon colour. Defaults to `secondary`. */\n variant?: 'danger' | 'primary' | 'secondary';\n}\n/** Props for descriptive tooltip content. */ export interface TooltipContentProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'style'> {\n /** Concise descriptive text. */ children: ReactNode;\n /** Gap from trigger. Defaults to `6`. */ offset?: number;\n /** Placement. Defaults to `top`. */ placement?:\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'top start'\n | 'top end'\n | 'bottom start'\n | 'bottom end';\n /** Ref to rendered tooltip. */ ref?: Ref<HTMLDivElement>;\n /** Semantic tooltip colour. Defaults to `secondary`. */\n variant?: 'danger' | 'primary' | 'secondary';\n}\n\n/** Coordinates concise supplementary information for a trigger. */\nexport function Root({\n closeDelay = 0,\n defaultOpen,\n delay = 700,\n onOpenChange,\n open,\n readOnly: _readOnly,\n ...props\n}: Readonly<TooltipRootProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaTooltipTrigger, {\n ...props,\n closeDelay,\n defaultOpen,\n delay,\n isOpen: open,\n onOpenChange,\n });\n}\nconst TooltipTrigger = Button;\nexport function IconTrigger({\n 'aria-label': ariaLabel,\n children,\n className,\n ref,\n variant = 'secondary',\n ...props\n}: Readonly<TooltipIconTriggerProps>): ReactElement {\n const forwardedRef = useForwardedRef(ref);\n const labelId = useId();\n\n const trigger = createElement(\n 'span',\n {\n ...props,\n 'aria-labelledby': labelId,\n className: tooltipIconTrigger({ class: className, variant }),\n role: 'img',\n tabIndex: 0,\n },\n createElement(VisuallyHidden, { id: labelId }, ariaLabel),\n children,\n );\n\n return <Focusable ref={forwardedRef}>{trigger}</Focusable>;\n}\nexport function Content({\n className,\n offset = 6,\n placement = 'top',\n ref,\n variant = 'secondary',\n ...props\n}: Readonly<TooltipContentProps>): ReactElement {\n useBreezeContext();\n return createElement(AriaTooltip, {\n ...props,\n className: tooltip({ class: className, variant }),\n offset,\n placement,\n ref: useForwardedRef(ref),\n } as ComponentProps<typeof AriaTooltip>);\n}\n/**\n * Accessible compound descriptive tooltip primitive.\n *\n * @summary concise non-interactive help revealed from a trigger\n */\nexport const Tooltip = {\n /** Concise descriptive popup positioned against its trigger. */\n Content,\n /** Focusable informational icon described by the tooltip. */\n IconTrigger,\n /** Controlled, read-only, or uncontrolled hover and focus coordinator. */\n Root,\n /** Semantic action described by the tooltip. */\n Trigger: TooltipTrigger,\n};\n","import type { HTMLAttributes, Ref } from 'react';\nimport { createElement } from 'react';\nimport { tv } from 'tailwind-variants';\nimport useForwardedRef from '../../internal/hooks/useForwardedRef';\nimport { useBreezeContext } from '../../provider/BreezeContext';\n\nconst typography = tv({\n base: 'm-0 min-w-0',\n compoundVariants: [\n {\n class: 'mb-4',\n gutterBottom: true,\n level: ['body', 'label'],\n },\n {\n class: 'mb-6',\n gutterBottom: true,\n level: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'metric', 'summary'],\n },\n ],\n defaultVariants: {\n colour: 'default',\n level: 'body',\n weight: 'default',\n },\n variants: {\n align: {\n center: 'text-center',\n end: 'text-end',\n start: 'text-start',\n },\n colour: {\n danger: 'text-[var(--breeze-danger)]',\n default: 'text-[var(--breeze-ink)]',\n info: 'text-[var(--breeze-info)]',\n inverse: 'text-[var(--breeze-ink-inverse)]',\n 'inverse-muted': 'text-[var(--breeze-ink-inverse-muted)]',\n muted: 'text-[var(--breeze-ink-muted)]',\n primary: 'text-[var(--breeze-primary)]',\n success: 'text-[var(--breeze-success)]',\n warning: 'text-[var(--breeze-warning)]',\n },\n gutterBottom: {\n false: '',\n true: '',\n },\n level: {\n body: 'font-[family-name:var(--breeze-font-body)] text-base leading-[1.4]',\n h1: 'font-[family-name:var(--breeze-font-display)] text-[2.5rem] font-bold leading-[1.12]',\n h2: 'font-[family-name:var(--breeze-font-display)] text-[2rem] font-bold leading-[1.15]',\n h3: 'font-[family-name:var(--breeze-font-display)] text-2xl font-bold leading-[1.2]',\n h4: 'font-[family-name:var(--breeze-font-display)] text-xl font-bold leading-[1.2]',\n h5: 'font-[family-name:var(--breeze-font-display)] text-lg font-bold leading-[1.25]',\n h6: 'font-[family-name:var(--breeze-font-display)] text-base font-bold leading-[1.25]',\n label:\n 'font-[family-name:var(--breeze-font-display)] text-base font-bold leading-[1.25]',\n metric:\n 'font-[family-name:var(--breeze-font-display)] text-[2rem] font-bold leading-[1.2] tabular-nums',\n summary:\n 'font-[family-name:var(--breeze-font-display)] text-xl font-bold leading-[1.2] sm:text-2xl',\n },\n lineClamp: {\n 2: 'line-clamp-2',\n 3: 'line-clamp-3',\n 4: 'line-clamp-4',\n none: '',\n },\n tabularNumbers: {\n false: '',\n true: 'tabular-nums',\n },\n truncate: {\n false: '',\n true: 'truncate',\n },\n weight: {\n bold: 'font-bold',\n default: '',\n medium: 'font-medium',\n regular: 'font-normal',\n semibold: 'font-semibold',\n },\n },\n});\n\n/** Semantic elements supported by the non-interactive text primitive. */\nexport type TypographyElement =\n | 'span'\n | 'p'\n | 'div'\n | 'strong'\n | 'em'\n | 'small'\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'dt'\n | 'dd';\n\n/** Visual typography levels independent from rendered semantics. */\nexport type TypographyLevel =\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | 'metric'\n | 'summary'\n | 'label'\n | 'body';\n\n/** Semantic text colours backed by Breeze theme tokens. */\nexport type TypographyColour =\n | 'default'\n | 'muted'\n | 'primary'\n | 'inverse'\n | 'inverse-muted'\n | 'success'\n | 'danger'\n | 'warning'\n | 'info';\n\n/** Props for Breeze non-interactive text. */\nexport interface TypographyProps\n extends Omit<HTMLAttributes<HTMLElement>, 'align' | 'color' | 'style'> {\n /** Text alignment. Inherits from the containing layout by default. */\n align?: 'start' | 'center' | 'end';\n /** Constrained semantic element. Defaults to `p`. */\n as?: TypographyElement;\n /** Semantic text colour. Defaults to `default`. */\n colour?: TypographyColour;\n /** Adds canonical bottom rhythm to block elements. Defaults to `false`. */\n gutterBottom?: boolean;\n /** Visual level. Defaults from `as`, otherwise `body`. */\n level?: TypographyLevel;\n /** Bounds text to a supported number of lines. Defaults to no clamp. */\n lineClamp?: 2 | 3 | 4;\n /** Ref to the rendered element. */\n ref?: Ref<HTMLElement>;\n /** Uses tabular numeral glyphs. Defaults to `false`. */\n tabularNumbers?: boolean;\n /** Truncates one line with an ellipsis. Defaults to `false`. */\n truncate?: boolean;\n /** Font weight override. Defaults to the selected level. */\n weight?: 'regular' | 'medium' | 'semibold' | 'bold';\n}\n\nconst headingLevels: Partial<Record<TypographyElement, TypographyLevel>> = {\n dt: 'label',\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n strong: 'label',\n};\n\nconst inlineElements = new Set<TypographyElement>([\n 'em',\n 'small',\n 'span',\n 'strong',\n]);\n\n/**\n * Renders non-interactive text with independent semantic and visual choices.\n *\n * @summary semantic non-interactive text with a separate visual level\n */\nexport function Typography({\n align,\n as = 'p',\n className,\n colour,\n gutterBottom = false,\n level,\n lineClamp,\n ref,\n tabularNumbers = false,\n truncate = false,\n weight,\n ...props\n}: Readonly<TypographyProps>) {\n useBreezeContext();\n\n const resolvedLevel = level ?? headingLevels[as] ?? 'body';\n const forwardedRef = useForwardedRef(ref);\n\n return createElement(as, {\n ...props,\n className: typography({\n align,\n class: className,\n colour,\n gutterBottom: gutterBottom && !inlineElements.has(as),\n level: resolvedLevel,\n lineClamp: lineClamp ?? 'none',\n tabularNumbers,\n truncate,\n weight: weight ?? 'default',\n }),\n ref: forwardedRef,\n });\n}\n","/** Generic, domain-neutral text used by Breeze controls and announcements. */\nexport interface BreezeMessages {\n /** Accessible label for clearing a value or selection. */\n clear: string;\n /** Accessible label for closing layered content. */\n close: string;\n /** Rejection text when only one file may be selected. */\n fileCountRejection: string;\n /** Rejection text when a file exceeds the configured maximum size. */\n fileSizeRejection: string;\n /** Rejection text when a file does not match the accepted types. */\n fileTypeRejection: string;\n /** Status text announced while content is loading. */\n loading: string;\n /** Status text announced when a collection has no matching results. */\n noResults: string;\n /** Accessible label for the provider-owned notification stack. */\n notifications: string;\n /** Accessible label for moving to the next pagination page. */\n nextPage: string;\n /** Accessible label prefix for a numbered pagination destination. */\n page: string;\n /** Accessible label for moving to the previous pagination page. */\n previousPage: string;\n /** Visible guidance when no date-picker value is selected. */\n selectDate: string;\n /** Accessible label for a complete date-and-time selection surface. */\n selectDateTime: string;\n /** Accessible label for the visually hidden native file input. */\n selectFiles: string;\n /** Visible label for selecting a time within a date-time picker. */\n selectTime: string;\n /** Accessible label for concealing a password value. */\n hidePassword: string;\n /** Accessible label for revealing a password value. */\n showPassword: string;\n /** Generic unread-notification state. */\n unreadNotifications: string;\n}\n\n/** Application-provided replacements for built-in `en-GB` Breeze messages. */\nexport type BreezeMessageOverrides = Partial<BreezeMessages>;\n\nconst defaultMessages: BreezeMessages = {\n clear: 'Clear',\n close: 'Close',\n fileCountRejection: 'Only one file may be selected.',\n fileSizeRejection: 'File exceeds the maximum size.',\n fileTypeRejection: 'File type is not accepted.',\n hidePassword: 'Hide password',\n loading: 'Loading',\n nextPage: 'Next page',\n noResults: 'No results',\n notifications: 'Notifications',\n page: 'Page',\n previousPage: 'Previous page',\n selectDate: 'Select date',\n selectDateTime: 'Select date and time',\n selectFiles: 'Select files',\n selectTime: 'Select time',\n showPassword: 'Show password',\n unreadNotifications: 'Unread notifications',\n};\n\nexport function resolveMessages(\n overrides: BreezeMessageOverrides = {},\n): BreezeMessages {\n return {\n ...defaultMessages,\n ...overrides,\n };\n}\n","import type { ReactNode } from 'react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { UNSAFE_PortalProvider as AriaPortalProvider } from 'react-aria/PortalProvider';\nimport { I18nProvider } from 'react-aria-components/I18nProvider';\nimport { createPortal } from 'react-dom';\nimport { ToastProviderBoundary } from '../primitives/Toast/Toast';\nimport {\n BreezeContext,\n type BreezeContextValue,\n type BreezeDirection,\n type BreezeRouterAdapter,\n} from './BreezeContext';\nimport { type BreezeMessageOverrides, resolveMessages } from './messages';\n\nconst rtlLanguages = new Set([\n 'ar',\n 'ckb',\n 'dv',\n 'fa',\n 'he',\n 'ku',\n 'ps',\n 'sd',\n 'ug',\n 'ur',\n 'yi',\n]);\n\ntype BreezeDatasetKey = 'breezePortalRoot' | 'breezeRoot';\n\n/** Props for the required environment boundary shared by Breeze components. */\nexport interface BreezeProviderProps {\n /** Breeze components and application content rendered inside the boundary. */\n children: ReactNode;\n /** Reading direction override. Defaults to the direction inferred from `locale`. */\n direction?: BreezeDirection;\n /** BCP 47 locale used by Breeze formatting and accessible interactions. */\n locale: string;\n /** Partial replacements for the built-in `en-GB` generic messages. */\n messages?: BreezeMessageOverrides;\n /** Portal host for layered content. Defaults to a provider-owned host. */\n portalContainer?: HTMLElement | null;\n /** Optional router adapter used for internal client-side navigation. */\n router?: BreezeRouterAdapter;\n /** Optional IANA time-zone name used by date and time formatting components. */\n timeZone?: string;\n /** Maximum visible provider-scoped toasts before pending items queue. Defaults to `3`. */\n toastLimit?: number;\n}\n\nfunction inferDirection(locale: string): BreezeDirection {\n const { language } = new Intl.Locale(locale);\n\n return rtlLanguages.has(language) ? 'rtl' : 'ltr';\n}\n\nfunction restoreDatasetValue(\n element: HTMLElement,\n key: BreezeDatasetKey,\n value: string | undefined,\n): void {\n const { dataset } = element;\n\n if (value === undefined) {\n delete dataset[key];\n\n return;\n }\n\n dataset[key] = value;\n}\n\nfunction restoreAttribute(\n element: HTMLElement,\n name: string,\n value: string | null,\n): void {\n if (value === null) {\n element.removeAttribute(name);\n\n return;\n }\n\n element.setAttribute(name, value);\n}\n\n/**\n * Establishes the locale, direction, messages, routing, and portal environment\n * required by every Breeze component.\n *\n * @summary required environment boundary for every Breeze component\n */\nexport function BreezeProvider({\n children,\n direction,\n locale,\n messages: messageOverrides,\n portalContainer: suppliedPortalContainer,\n router,\n timeZone,\n toastLimit = 3,\n}: Readonly<BreezeProviderProps>) {\n if (!Number.isInteger(toastLimit) || toastLimit < 1) {\n throw new RangeError(\n 'BreezeProvider toastLimit must be a positive integer.',\n );\n }\n\n const [localPortalContainer, setLocalPortalContainer] =\n useState<HTMLDivElement | null>(null);\n const resolvedDirection = direction ?? inferDirection(locale);\n const messages = useMemo(\n () => resolveMessages(messageOverrides),\n [messageOverrides],\n );\n const portalContainer = suppliedPortalContainer ?? localPortalContainer;\n const portalContainerRef = useRef<HTMLElement | null>(portalContainer);\n\n portalContainerRef.current = portalContainer;\n\n const getPortalContainer = useCallback(() => portalContainerRef.current, []);\n const portalHost =\n suppliedPortalContainer === undefined && typeof document !== 'undefined'\n ? createPortal(\n <div\n data-breeze-portal-root=\"\"\n data-breeze-root=\"\"\n dir={resolvedDirection}\n lang={locale}\n ref={setLocalPortalContainer}\n />,\n document.body,\n )\n : null;\n\n useEffect(() => {\n if (\n suppliedPortalContainer === undefined ||\n suppliedPortalContainer === null\n ) {\n return undefined;\n }\n\n const { dataset: portalDataset } = suppliedPortalContainer;\n const previousPortalScope = portalDataset.breezePortalRoot;\n const previousRootScope = portalDataset.breezeRoot;\n const previousDirection = suppliedPortalContainer.getAttribute('dir');\n const previousLocale = suppliedPortalContainer.getAttribute('lang');\n\n portalDataset.breezePortalRoot = '';\n portalDataset.breezeRoot = '';\n suppliedPortalContainer.setAttribute('dir', resolvedDirection);\n suppliedPortalContainer.setAttribute('lang', locale);\n\n return () => {\n restoreDatasetValue(\n suppliedPortalContainer,\n 'breezePortalRoot',\n previousPortalScope,\n );\n restoreDatasetValue(\n suppliedPortalContainer,\n 'breezeRoot',\n previousRootScope,\n );\n restoreAttribute(suppliedPortalContainer, 'dir', previousDirection);\n restoreAttribute(suppliedPortalContainer, 'lang', previousLocale);\n };\n }, [locale, resolvedDirection, suppliedPortalContainer]);\n const context = useMemo<BreezeContextValue>(\n () => ({\n direction: resolvedDirection,\n locale,\n messages,\n portalContainer,\n router,\n timeZone,\n }),\n [locale, messages, portalContainer, resolvedDirection, router, timeZone],\n );\n\n return (\n <I18nProvider locale={locale}>\n <AriaPortalProvider getContainer={getPortalContainer}>\n <BreezeContext value={context}>\n <ToastProviderBoundary\n closeLabel={messages.close}\n limit={toastLimit}\n regionLabel={messages.notifications}\n >\n <div data-breeze-root=\"\" dir={resolvedDirection} lang={locale}>\n {children}\n </div>\n {portalHost}\n </ToastProviderBoundary>\n </BreezeContext>\n </AriaPortalProvider>\n </I18nProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAwB,EACtB,GACsB;CACtB,OAAO,GACJ,MAA4B;EAC3B,AAAI,OAAO,KAAQ,aACjB,EAAI,CAAO,IACF,KAAQ,QACjB,OAAO,OAAO,GAAK,EACjB,SAAS,EACX,CAAC;CAEL,GACA,CAAC,CAAG,CACN;AACF;;;ACGA,IAAa,KAAgB,EAAyC,IAAI;AAE1E,SAAgB,IAAuC;CACrD,IAAM,IAAU,EAAW,EAAa;CAExC,IAAI,MAAY,MACd,MAAU,MACR,2DACF;CAGF,OAAO;AACT;;;ACTA,SAAgB,GAAkB,EAChC,YACA,QACA,UACA,GAAG,KAC8C;CACjD,IAAM,EAAE,WAAQ,gBAAa,EAAiB,GACxC,IAAe,EAAgB,CAAG,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AAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY,CAAC,SAAS,SAAS;GAC/B,OAAO;EACT;EACA;GACE,YAAY;GACZ,OACE;EACJ;CACF;CACA,iBAAiB;EACf,YAAY;EACZ,MAAM;EACN,SAAS;CACX;CACA,UAAU;EACR,YAAY;GACV,OAAO;GACP,SAAS;GACT,OAAO;GACP,QAAQ;GACR,MAAM;EACR;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,SAAS;GACP,QAAQ;GACR,MAAM;GACN,MAAM;GACN,OAAO;GACP,SAAS;GACT,WACE;GACF,SAAS;GACT,SAAS;EACX;CACF;AACF,CAAC;;;AC/ED,SAAgB,GAAO,EACrB,eACA,aACA,cACA,cAAW,IACX,aAAU,IACV,aACA,QACA,SACA,UAAO,UACP,YACA,GAAG,KACmC;CACtC,EAAiB;CACjB,IAAM,IAAe,EAAgB,CAAG;CAExC,OAAO,EACL,GACA;EACE,GAAG;EACH,aAAa,KAAW,KAAA;EACxB,WAAW,EAAO;GAChB;GACA,OAAO;GAC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,OAAO;GAAc,SAAS;EAAU;EAC/D;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;EACA;GACE,YAAY;GACZ,OAAO;GACP,SAAS;EACX;CACF;CACA,iBAAiB;EACf,YAAY;EACZ,SAAS;CACX;CACA,UAAU;EACR,YAAY;GACV,OAAO;GACP,SAAS;GACT,OAAO;GACP,QAAQ;EACV;EACA,SAAS;GACP,QAAQ;GACR,MAAM;GACN,MAAM;GACN,OAAO;GACP,SAAS;GACT,WACE;GACF,SAAS;GACT,SAAS;EACX;CACF;AACF,CAAC;AAkBD,SAAgB,GAAM,EACpB,eACA,cACA,QACA,YACA,GAAG,KACoB;CACvB,EAAiB;CAEjB,IAAM,IAAe,EAAgB,CAAG;CAExC,OAAO,EAAc,QAAQ;EAC3B,GAAG;EACH,WAAW,GAAM;GACf;GACA,OAAO;GACP;EACF,CAAC;EACD,KAAK;CACP,CAAC;AACH;;;AChJA,IAAM,KAAkB,EAAG,EACzB,MAAM,4CACR,CAAC,GACK,KAA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