// // Copyright 2026 DXOS.org // import { Checkbox as CheckboxPrimitive } from '@ark-ui/react/checkbox'; import React, { type ReactNode, forwardRef } from 'react'; import { mx } from '@dxos/ui-theme'; import { type ThemedClassName } from '@dxos/ui-types'; import { recipes } from '../../recipes.ts'; import * as Fieldset from '../Fieldset/Fieldset.tsx'; import * as Icon from '../Icon/Icon.tsx'; export type CheckboxProps = ThemedClassName> & { /** Visible label beside the box; without one pass `aria-label`. */ 'label'?: ReactNode; 'aria-label'?: string; }; /** Ark checkbox with its box at control size; the root is a block-tall row so it lines up with other controls. */ export const Checkbox = forwardRef( ({ classNames, label, 'aria-label': ariaLabel, disabled, ...props }, forwardedRef) => ( {label && {label}} ), ); Checkbox.displayName = 'Checkbox';