{"version":3,"file":"chunk-Input.mjs","names":["Checkbox","CheckboxPrimitive","Fieldset.useFieldsetDisabled","Icon.Icon","DatePickerPrimitive","DateInput","DateInputPrimitive","DatePickerPrimitive","SystemButton.Clipboard","Fieldset.useFieldsetDisabled","FieldPrimitive","NumberInput","NumberInputPrimitive","PasswordInputPrimitive","PasswordInput","PinInput","PinInputPrimitive","Slider","SliderPrimitive","Switch","Fieldset.useFieldsetDisabled","SwitchPrimitive","Fieldset.useFieldsetDisabled","FieldPrimitive"],"sources":["../../src/components/Checkbox/Checkbox.tsx","../../src/components/ControlFrame/ControlFrame.tsx","../../src/components/DateInput/date-value.ts","../../src/components/DateInput/DateCalendar.tsx","../../src/components/DateInput/DateInput.tsx","../../src/components/Input/Input.tsx","../../src/components/NumberInput/NumberInput.tsx","../../src/components/PasswordInput/PasswordInput.tsx","../../src/components/PinInput/PinInput.tsx","../../src/components/Slider/Slider.tsx","../../src/components/Switch/Switch.tsx","../../src/components/Textarea/Textarea.tsx","../../src/namespaces/Input.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Checkbox as CheckboxPrimitive } from '@ark-ui/react/checkbox';\nimport React, { type ReactNode, forwardRef } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type ThemedClassName } from '@dxos/ui-types';\n\nimport { recipes } from '../../recipes.ts';\nimport * as Fieldset from '../Fieldset/Fieldset.tsx';\nimport * as Icon from '../Icon/Icon.tsx';\n\nexport type CheckboxProps = ThemedClassName<Omit<CheckboxPrimitive.RootProps, 'children'>> & {\n  /** Visible label beside the box; without one pass `aria-label`. */\n  'label'?: ReactNode;\n  'aria-label'?: string;\n};\n\n/** Ark checkbox with its box at control size; the root is a block-tall row so it lines up with other controls. */\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>(\n  ({ classNames, label, 'aria-label': ariaLabel, disabled, ...props }, forwardedRef) => (\n    <CheckboxPrimitive.Root\n      {...props}\n      disabled={Fieldset.useFieldsetDisabled(disabled)}\n      className={mx(recipes.checkbox(), classNames)}\n      ref={forwardedRef}\n    >\n      <CheckboxPrimitive.Control className={recipes.checkboxControl()}>\n        <CheckboxPrimitive.Indicator>\n          <Icon.Icon icon='ph--check--bold' />\n        </CheckboxPrimitive.Indicator>\n        <CheckboxPrimitive.Indicator indeterminate>\n          <Icon.Icon icon='ph--minus--bold' />\n        </CheckboxPrimitive.Indicator>\n      </CheckboxPrimitive.Control>\n      {label && <CheckboxPrimitive.Label>{label}</CheckboxPrimitive.Label>}\n      <CheckboxPrimitive.HiddenInput aria-label={ariaLabel} />\n    </CheckboxPrimitive.Root>\n  ),\n);\n\nCheckbox.displayName = 'Checkbox';\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { type CSSProperties, type ReactNode } from 'react';\n\nimport { recipes } from '../../recipes.ts';\nimport { composable, composableProps } from '../../util/slots.ts';\nimport { type CSSVariables } from '../Container/Container.tsx';\n\nexport type ControlFrameVariant = 'default' | 'subdued' | 'mono';\n\nexport type ControlFrameProps = {\n  'data-testid'?: string;\n  /** Leading content inside the frame (an Icon, or short text such as a currency). */\n  'start'?: ReactNode;\n  /** Trailing content inside the frame (an Icon, a unit, or icon-only Buttons). */\n  'end'?: ReactNode;\n  /** `subdued` drops the well; `mono` sets the frame's text in the monospace font. */\n  'variant'?: ControlFrameVariant;\n  /** Dims the frame, for content (an editor) that has no `disabled` state of its own. */\n  'disabled'?: boolean;\n  /** The `data-scope` a control built on the frame reports for it (decision 10); `control-frame` otherwise. */\n  'scope'?: string;\n  /**\n   * A multi-line frame (a markdown editor) at least this many lines tall, growing with its content like an\n   * auto-resizing Textarea, its first line where a single-line control's text sits and its adornments at the top.\n   */\n  'rows'?: number;\n};\n\n/**\n * The control-tall well of an Input with optional adornments either side of its content: an Input's `start`/`end`\n * render one around a bare input, and editors or custom controls use it directly around their own element. The focus\n * ring follows whatever inside it, other than an adornment, has focus.\n */\nexport const ControlFrame = composable<HTMLDivElement, ControlFrameProps>(\n  ({ children, start, end, variant = 'default', disabled, scope = 'control-frame', rows, ...props }, forwardedRef) => {\n    const { className, style, ...rest } = composableProps<HTMLDivElement>(props, {\n      classNames: recipes.controlFrame(),\n    });\n    const rowsStyle: CSSProperties & CSSVariables = rows ? { '--dx-rows': String(rows) } : {};\n    return (\n      <div\n        {...rest}\n        style={{ ...rowsStyle, ...style }}\n        data-scope={scope}\n        data-part='root'\n        data-variant={variant}\n        data-rows={rows ? '' : undefined}\n        data-disabled={disabled ? '' : undefined}\n        className={className}\n        ref={forwardedRef}\n      >\n        {start != null && (\n          <span data-scope={scope} data-part='start' className={recipes.inputAdornment()}>\n            {start}\n          </span>\n        )}\n        {children}\n        {end != null && (\n          <span data-scope={scope} data-part='end' className={recipes.inputAdornment()}>\n            {end}\n          </span>\n        )}\n      </div>\n    );\n  },\n);\n\nControlFrame.displayName = 'ControlFrame';\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport {\n  type CalendarDate,\n  type CalendarDateTime,\n  DateFormatter,\n  type DateValue,\n  parseDate,\n  parseDateTime,\n  parseTime,\n  toCalendarDate,\n  toCalendarDateTime,\n  today,\n} from '@internationalized/date';\n\n/** The native input types, whose value strings (`YYYY-MM-DD`, `HH:mm`, `YYYY-MM-DDTHH:mm`) DateInput keeps. */\nexport type DateInputType = 'date' | 'time' | 'datetime-local';\n\n/** The smallest time unit a time-bearing DateInput edits; `second` adds `:ss` to the value string. */\nexport type DateInputGranularity = 'hour' | 'minute' | 'second';\n\n/** zag values are floating (no zone), so every conversion uses UTC and never shifts a wall-clock time. */\nexport const TIME_ZONE = 'UTC';\n\nconst pad = (value: number, length = 2) => String(value).padStart(length, '0');\n\nconst formatDate = (value: DateValue) => `${pad(value.year, 4)}-${pad(value.month)}-${pad(value.day)}`;\n\nconst formatTime = (value: CalendarDateTime, granularity: DateInputGranularity) =>\n  `${pad(value.hour)}:${pad(value.minute)}${granularity === 'second' ? `:${pad(value.second)}` : ''}`;\n\n/** The date a time-only value is placed on; zag edits whole dates, so a time needs one. */\nexport const baseDate = (): CalendarDate => today(TIME_ZONE);\n\n/** Parses a value string of the given type; invalid or empty strings give `undefined`. */\nexport const parseValue = (\n  type: DateInputType,\n  value: string | undefined,\n  base: CalendarDate,\n): DateValue | undefined => {\n  if (!value) {\n    return undefined;\n  }\n  try {\n    switch (type) {\n      case 'date':\n        return parseDate(value);\n      case 'time':\n        return toCalendarDateTime(base, parseTime(value));\n      case 'datetime-local':\n        return parseDateTime(value);\n    }\n  } catch {\n    return undefined;\n  }\n};\n\n/** Formats a zag value as the type's value string. */\nexport const formatValue = (type: DateInputType, value: DateValue, granularity: DateInputGranularity): string => {\n  const time = toCalendarDateTime(value);\n  switch (type) {\n    case 'date':\n      return formatDate(value);\n    case 'time':\n      return formatTime(time, granularity);\n    case 'datetime-local':\n      return `${formatDate(value)}T${formatTime(time, granularity)}`;\n  }\n};\n\n/** Keeps the time of `current` when the calendar picks a new day for a date-time value. */\nexport const withDay = (type: DateInputType, current: DateValue | undefined, day: DateValue): DateValue => {\n  if (type === 'date') {\n    return toCalendarDate(day);\n  }\n  const time = current ? toCalendarDateTime(current) : toCalendarDateTime(toCalendarDate(day));\n  return time.set({ year: day.year, month: day.month, day: day.day });\n};\n\n/**\n * A time-only field formats just hours and minutes (zag's own formatter always includes the date), so it passes its\n * own formatter and the editable segments that formatter yields.\n */\nexport const timeFormat = (locale: string, granularity: DateInputGranularity, hourCycle: 12 | 24) => {\n  const formatter = new DateFormatter(locale, {\n    timeZone: TIME_ZONE,\n    hour: '2-digit',\n    ...(granularity !== 'hour' && { minute: '2-digit' }),\n    ...(granularity === 'second' && { second: '2-digit' }),\n    hourCycle: hourCycle === 12 ? 'h12' : 'h23',\n  });\n  const allSegments = Object.fromEntries(\n    formatter\n      .formatToParts(new Date())\n      .filter((part) => ['hour', 'minute', 'second', 'dayPeriod'].includes(part.type))\n      .map((part) => [part.type, true]),\n  );\n  return { formatter, allSegments };\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { DatePicker as DatePickerPrimitive, useDatePickerContext } from '@ark-ui/react/date-picker';\nimport { Portal } from '@ark-ui/react/portal';\nimport React, { type RefObject } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { mx } from '@dxos/ui-theme';\n\nimport { translationKey } from '#translations';\n\nimport { recipes } from '../../recipes.ts';\nimport { type Size } from '../../sizes.ts';\nimport { Button } from '../Button/Button.tsx';\nimport { usePopupSize } from '../ScrollArea/PopupScroll.tsx';\n\n/** Months and years are laid out four to a row, as the current Calendar's pickers. */\nconst GRID_COLUMNS = 4;\n\ntype CalendarView = 'day' | 'month' | 'year';\n\n/** What the previous and next triggers step by in each view: months, years or decades. */\nconst NAV_LABELS: Record<CalendarView, { previous: string; next: string }> = {\n  day: { previous: 'calendar.nav.previous.label', next: 'calendar.nav.next.label' },\n  month: { previous: 'calendar.nav.previous-year.label', next: 'calendar.nav.next-year.label' },\n  year: { previous: 'calendar.nav.previous-decade.label', next: 'calendar.nav.next-decade.label' },\n};\n\n/** Previous, view (month/year/decade caption) and next, over each view's table. */\nconst ViewControl = ({ view }: { view: CalendarView }) => {\n  const { t } = useTranslation(translationKey);\n  return (\n    <DatePickerPrimitive.ViewControl className={recipes.dateCalendarHeader()}>\n      <DatePickerPrimitive.PrevTrigger asChild>\n        <Button\n          icon='ph--caret-left--regular'\n          label={t(NAV_LABELS[view].previous)}\n          iconOnly\n          variant='ghost'\n          showTooltip={false}\n        />\n      </DatePickerPrimitive.PrevTrigger>\n      <DatePickerPrimitive.ViewTrigger asChild>\n        <Button variant='ghost' classNames={recipes.dateCalendarTitle()}>\n          <DatePickerPrimitive.RangeText />\n        </Button>\n      </DatePickerPrimitive.ViewTrigger>\n      <DatePickerPrimitive.NextTrigger asChild>\n        <Button\n          icon='ph--caret-right--regular'\n          label={t(NAV_LABELS[view].next)}\n          iconOnly\n          variant='ghost'\n          showTooltip={false}\n        />\n      </DatePickerPrimitive.NextTrigger>\n    </DatePickerPrimitive.ViewControl>\n  );\n};\n\nconst DayView = () => {\n  const picker = useDatePickerContext();\n  return (\n    <DatePickerPrimitive.View view='day' className={recipes.dateCalendarView()}>\n      <ViewControl view='day' />\n      <DatePickerPrimitive.Table className={recipes.dateCalendarTable()}>\n        <DatePickerPrimitive.TableHead>\n          <DatePickerPrimitive.TableRow>\n            {picker.weekDays.map((weekDay, index) => (\n              <DatePickerPrimitive.TableHeader key={index} abbr={weekDay.long}>\n                {weekDay.narrow}\n              </DatePickerPrimitive.TableHeader>\n            ))}\n          </DatePickerPrimitive.TableRow>\n        </DatePickerPrimitive.TableHead>\n        <DatePickerPrimitive.TableBody>\n          {picker.weeks.map((week, index) => (\n            <DatePickerPrimitive.TableRow key={index}>\n              {week.map((day) => (\n                <DatePickerPrimitive.TableCell key={day.toString()} value={day}>\n                  <DatePickerPrimitive.TableCellTrigger className={recipes.dateCalendarCell()}>\n                    {day.day}\n                  </DatePickerPrimitive.TableCellTrigger>\n                </DatePickerPrimitive.TableCell>\n              ))}\n            </DatePickerPrimitive.TableRow>\n          ))}\n        </DatePickerPrimitive.TableBody>\n      </DatePickerPrimitive.Table>\n    </DatePickerPrimitive.View>\n  );\n};\n\nconst MonthView = () => {\n  const picker = useDatePickerContext();\n  return (\n    <DatePickerPrimitive.View view='month' className={recipes.dateCalendarView()}>\n      <ViewControl view='month' />\n      <DatePickerPrimitive.Table columns={GRID_COLUMNS} className={recipes.dateCalendarTable()}>\n        <DatePickerPrimitive.TableBody>\n          {picker.getMonthsGrid({ columns: GRID_COLUMNS, format: 'short' }).map((months, index) => (\n            <DatePickerPrimitive.TableRow key={index}>\n              {months.map((month) => (\n                <DatePickerPrimitive.TableCell key={month.value} value={month.value}>\n                  <DatePickerPrimitive.TableCellTrigger className={recipes.dateCalendarCell()}>\n                    {month.label}\n                  </DatePickerPrimitive.TableCellTrigger>\n                </DatePickerPrimitive.TableCell>\n              ))}\n            </DatePickerPrimitive.TableRow>\n          ))}\n        </DatePickerPrimitive.TableBody>\n      </DatePickerPrimitive.Table>\n    </DatePickerPrimitive.View>\n  );\n};\n\nconst YearView = () => {\n  const picker = useDatePickerContext();\n  return (\n    <DatePickerPrimitive.View view='year' className={recipes.dateCalendarView()}>\n      <ViewControl view='year' />\n      <DatePickerPrimitive.Table columns={GRID_COLUMNS} className={recipes.dateCalendarTable()}>\n        <DatePickerPrimitive.TableBody>\n          {picker.getYearsGrid({ columns: GRID_COLUMNS }).map((years, index) => (\n            <DatePickerPrimitive.TableRow key={index}>\n              {years.map((year) => (\n                <DatePickerPrimitive.TableCell key={year.value} value={year.value} disabled={year.disabled}>\n                  <DatePickerPrimitive.TableCellTrigger className={recipes.dateCalendarCell()}>\n                    {year.label}\n                  </DatePickerPrimitive.TableCellTrigger>\n                </DatePickerPrimitive.TableCell>\n              ))}\n            </DatePickerPrimitive.TableRow>\n          ))}\n        </DatePickerPrimitive.TableBody>\n      </DatePickerPrimitive.Table>\n    </DatePickerPrimitive.View>\n  );\n};\n\nexport type DateCalendarProps = {\n  size?: Size;\n  container?: RefObject<HTMLElement | null>;\n  testId?: string;\n};\n\n/** The portalled calendar at `level='popup'`: zag's day, month and year views, switched by the caption. */\nexport const DateCalendar = ({ size, container, testId }: DateCalendarProps) => {\n  const datePicker = useDatePickerContext();\n  // The row (the picker's Control) is the anchor, so the calendar inherits the field's size.\n  const popupSize = usePopupSize(size, datePicker.open, [datePicker.getControlProps().id]);\n  return (\n    <Portal container={container}>\n      <DatePickerPrimitive.Positioner>\n        <DatePickerPrimitive.Content\n          data-surface='popup'\n          data-size={popupSize}\n          data-testid={testId}\n          className={mx(recipes.popup(), recipes.dateCalendar())}\n        >\n          <DayView />\n          <MonthView />\n          <YearView />\n        </DatePickerPrimitive.Content>\n      </DatePickerPrimitive.Positioner>\n    </Portal>\n  );\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { DateInput as DateInputPrimitive, useDateInput } from '@ark-ui/react/date-input';\nimport { DatePicker as DatePickerPrimitive, useDatePicker } from '@ark-ui/react/date-picker';\nimport { useFieldContext } from '@ark-ui/react/field';\nimport { useLocaleContext } from '@ark-ui/react/locale';\nimport { type DateValue, toCalendarDate } from '@internationalized/date';\nimport React, { type ReactNode, type RefObject, forwardRef, useMemo, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { useControllableState } from '@dxos/react-hooks';\nimport { mx } from '@dxos/ui-theme';\nimport { type ThemedClassName } from '@dxos/ui-types';\n\nimport { translationKey } from '#translations';\n\nimport { recipes } from '../../recipes.ts';\nimport { type Size } from '../../sizes.ts';\nimport { Button } from '../Button/Button.tsx';\nimport * as Field from '../Field/Field.tsx';\nimport {\n  type DateInputGranularity,\n  type DateInputType,\n  TIME_ZONE,\n  baseDate,\n  formatValue,\n  parseValue,\n  timeFormat,\n  withDay,\n} from './date-value.ts';\nimport { DateCalendar } from './DateCalendar.tsx';\n\nexport type DateInputProps = ThemedClassName<{\n  'type'?: DateInputType;\n  /** `YYYY-MM-DD`, `HH:mm` or `YYYY-MM-DDTHH:mm` (with `:ss` at `second` granularity); empty when unset. */\n  'value'?: string;\n  'defaultValue'?: string;\n  'onValueChange'?: (value: string) => void;\n  /** Earliest value, in the type's format; earlier segments clamp and earlier calendar days are disabled. */\n  'min'?: string;\n  'max'?: string;\n  /** Smallest time unit of a `time` or `datetime-local` field (`minute` by default). */\n  'granularity'?: DateInputGranularity;\n  /** `24` (default) shows HH:mm; `12` adds an AM/PM segment. */\n  'hourCycle'?: 12 | 24;\n  /** BCP 47 locale that orders the segments; defaults to Ark's `LocaleProvider` (en-US). */\n  'locale'?: string;\n  /** A calendar behind a trailing trigger (`date` and `datetime-local` only; on by default). */\n  'picker'?: boolean;\n  /** Overrides the calendar's size, otherwise inherited from the row's nearest sized ancestor (Phase 4 decision 2). */\n  'size'?: Size;\n  /** Portals the calendar into this element instead of the body. */\n  'container'?: RefObject<HTMLElement | null>;\n  'disabled'?: boolean;\n  'readOnly'?: boolean;\n  'required'?: boolean;\n  'invalid'?: boolean;\n  /** Submitted by a hidden input, in the value format. */\n  'name'?: string;\n  'form'?: string;\n  /** Names the segments when there is no enclosing `Field.Label`. */\n  'aria-label'?: string;\n  'data-testid'?: string;\n  /** Extra trailing content in the control row, after the calendar trigger. */\n  'end'?: ReactNode;\n}>;\n\n/**\n * Segmented date, time or date-time entry (zag `date-input`): each part is a spinbutton, ordered by the locale, typed\n * digit by digit or stepped with the arrow keys. `date` and `datetime-local` add a calendar (zag `date-picker`) behind\n * a trailing trigger, sharing the value. Inside a `Field.Root` the segments take the field's label, description and\n * invalid/disabled/read-only state. `data-testid` and the ref go to the control row.\n */\nexport const DateInput = forwardRef<HTMLDivElement, DateInputProps>(\n  (\n    {\n      classNames,\n      type = 'date',\n      value: valueProp,\n      defaultValue,\n      onValueChange,\n      min: minProp,\n      max: maxProp,\n      granularity: granularityProp,\n      hourCycle = 24,\n      locale: localeProp,\n      picker: pickerProp = true,\n      size,\n      container,\n      disabled,\n      readOnly,\n      required,\n      invalid,\n      name,\n      form,\n      'aria-label': ariaLabel,\n      'data-testid': testId,\n      end,\n    },\n    forwardedRef,\n  ) => {\n    const { t } = useTranslation(translationKey);\n    const field = useFieldContext();\n    const { locale: contextLocale } = useLocaleContext();\n    const locale = localeProp ?? contextLocale;\n    const picker = pickerProp && type !== 'time';\n    const granularity = type === 'date' ? 'day' : (granularityProp ?? 'minute');\n    const [base] = useState(baseDate);\n\n    const [stringValue, setStringValue] = useControllableState<string>({\n      prop: valueProp,\n      defaultProp: defaultValue ?? '',\n      onChange: onValueChange,\n    });\n\n    const current = parseValue(type, stringValue, base);\n    const min = parseValue(type, minProp, base);\n    const max = parseValue(type, maxProp, base);\n    const commit = (next: DateValue | undefined) =>\n      setStringValue(next ? formatValue(type, next, granularity === 'day' ? 'minute' : granularity) : '');\n\n    const time = useMemo(\n      () =>\n        type === 'time' ? timeFormat(locale, granularity === 'day' ? 'minute' : granularity, hourCycle) : undefined,\n      [type, locale, granularity, hourCycle],\n    );\n\n    const dateInput = useDateInput({\n      locale,\n      timeZone: TIME_ZONE,\n      granularity,\n      hourCycle,\n      shouldForceLeadingZeros: true,\n      value: current ? [current] : [],\n      onValueChange: ({ value: [next] }) => commit(next),\n      min,\n      max,\n      defaultPlaceholderValue: type === 'time' ? (current ?? parseValue('time', '00:00', base)) : undefined,\n      ...(time && { formatter: time.formatter, allSegments: time.allSegments }),\n      format: (date) => formatValue(type, date, granularity === 'day' ? 'minute' : granularity),\n      ids: {\n        ...(field && { label: () => field.ids.label, hiddenInput: () => field.ids.control }),\n      },\n      disabled: disabled ?? field?.disabled,\n      readOnly: readOnly ?? field?.readOnly,\n      required: required ?? field?.required,\n      invalid: invalid ?? field?.invalid,\n      name,\n      form,\n    });\n\n    const datePicker = useDatePicker({\n      locale,\n      timeZone: TIME_ZONE,\n      selectionMode: 'single',\n      value: current ? [toCalendarDate(current)] : [],\n      onValueChange: ({ value: [day] }) => day && commit(withDay(type, current, day)),\n      min: min && toCalendarDate(min),\n      max: max && toCalendarDate(max),\n      disabled: dateInput.disabled,\n      readOnly: readOnly ?? field?.readOnly,\n      // The calendar ends under its trigger at its own width; Ark's 8px gutter reads as detached.\n      positioning: { placement: 'bottom-end', gutter: 2 },\n    });\n\n    const segmentList = dateInput.getSegments();\n    const firstEditable = segmentList.findIndex((segment) => segment.isEditable);\n    const segments = (\n      <DateInputPrimitive.Control className={recipes.dateInputSegments()}>\n        <DateInputPrimitive.SegmentGroup\n          aria-label={ariaLabel}\n          aria-describedby={field?.ariaDescribedby}\n          className={recipes.dateInputSegmentGroup()}\n        >\n          {segmentList.map((segment, index) => (\n            <DateInputPrimitive.Segment\n              key={index}\n              segment={segment}\n              {...(index === firstEditable && { [Field.LABEL_TARGET_ATTRIBUTE]: '' })}\n              className={recipes.dateInputSegment()}\n            />\n          ))}\n        </DateInputPrimitive.SegmentGroup>\n      </DateInputPrimitive.Control>\n    );\n\n    const trigger = picker && (\n      <DatePickerPrimitive.Trigger asChild>\n        <Button\n          icon={type === 'date' ? 'ph--calendar-blank--regular' : 'ph--calendar-dots--regular'}\n          label={t('date-picker.placeholder.single.label')}\n          iconOnly\n          variant='ghost'\n          showTooltip={false}\n        />\n      </DatePickerPrimitive.Trigger>\n    );\n\n    const adornment = (trigger || end != null) && (\n      <span data-scope='date-input' data-part='end' className={recipes.inputAdornment()}>\n        {trigger}\n        {end}\n      </span>\n    );\n\n    const rowClassName = mx(recipes.dateInput(), classNames);\n    const input = (\n      <DateInputPrimitive.RootProvider value={dateInput} className={recipes.dateField()}>\n        {picker ? (\n          <DatePickerPrimitive.Control data-testid={testId} className={rowClassName} ref={forwardedRef}>\n            {segments}\n            {adornment}\n          </DatePickerPrimitive.Control>\n        ) : (\n          <div data-scope='date-input' data-part='row' data-testid={testId} className={rowClassName} ref={forwardedRef}>\n            {segments}\n            {adornment}\n          </div>\n        )}\n        <DateInputPrimitive.HiddenInput />\n      </DateInputPrimitive.RootProvider>\n    );\n\n    if (!picker) {\n      return input;\n    }\n\n    return (\n      <DatePickerPrimitive.RootProvider value={datePicker} lazyMount unmountOnExit className={recipes.dateField()}>\n        {input}\n        <DateCalendar size={size} container={container} testId={testId && `${testId}-calendar`} />\n      </DatePickerPrimitive.RootProvider>\n    );\n  },\n);\n\nDateInput.displayName = 'DateInput';\n\nexport type { DateInputGranularity, DateInputType };\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { Field as FieldPrimitive } from '@ark-ui/react/field';\nimport React, { type InputHTMLAttributes, type ReactNode, useRef } from 'react';\n\nimport { useComposedRefs } from '@dxos/react-hooks';\n\nimport { recipes } from '../../recipes.ts';\nimport { composable, composableProps } from '../../util/slots.ts';\nimport { ControlFrame, type ControlFrameVariant } from '../ControlFrame/ControlFrame.tsx';\nimport * as Fieldset from '../Fieldset/Fieldset.tsx';\nimport * as SystemButton from '../SystemButton/SystemButton.tsx';\nimport { useToolbarItem } from '../Toolbar/toolbar-context.ts';\n\nexport type InputProps = InputHTMLAttributes<HTMLInputElement> & {\n  'data-testid'?: string;\n  /** `subdued` drops the well, for an input on a surface that already reads as editable; `mono` is for keys and ids. */\n  'variant'?: ControlFrameVariant;\n  /** Ask password managers not to offer autofill (`data-1p-ignore`), e.g. for a search box. */\n  'noAutoFill'?: boolean;\n  /** Leading content inside the control row (an Icon, or short text such as a currency). */\n  'start'?: ReactNode;\n  /** Trailing content inside the control row (an Icon, a unit, or an icon-only Button). */\n  'end'?: ReactNode;\n  /** Trails the input with a copy button for its current value (e.g. a read-only id); replaces `end`. */\n  'copyable'?: boolean;\n};\n\n/**\n * Text input at control size; inside a `Field.Root` it takes the field's id, label and description wiring. With\n * `start` or `end` it renders a `ControlFrame` holding the adornments and a bare input; `data-testid` and classes then\n * go to the frame, the ref to the input.\n */\nexport const Input = composable<HTMLInputElement, InputProps>(\n  (\n    {\n      type = 'text',\n      variant = 'default',\n      noAutoFill,\n      start,\n      end: endProp,\n      copyable,\n      disabled,\n      onFocus,\n      'data-testid': testId,\n      ...props\n    },\n    forwardedRef,\n  ) => {\n    const inputRef = useRef<HTMLInputElement>(null);\n    const ref = useComposedRefs(forwardedRef, inputRef);\n    // Reads the element rather than `value`, so an uncontrolled input copies what it shows.\n    const end = copyable ? (\n      <SystemButton.Clipboard iconOnly variant='ghost' onCopy={() => inputRef.current?.value ?? ''} />\n    ) : (\n      endProp\n    );\n    const fieldsetDisabled = Fieldset.useFieldsetDisabled(disabled);\n    const toolbarItem = useToolbarItem(fieldsetDisabled);\n    const adorned = start != null || end != null;\n    const { className, style, ...rest } = composableProps<HTMLInputElement>(props, {\n      classNames: adorned ? undefined : recipes.input(),\n    });\n    const input = (\n      <FieldPrimitive.Input\n        {...rest}\n        style={adorned ? undefined : style}\n        disabled={fieldsetDisabled}\n        data-testid={adorned ? undefined : testId}\n        {...toolbarItem}\n        onFocus={(event) => {\n          onFocus?.(event);\n          toolbarItem?.onFocus();\n        }}\n        type={type}\n        data-1p-ignore={noAutoFill ? '' : undefined}\n        data-scope='input'\n        data-part={adorned ? 'input' : 'root'}\n        data-variant={adorned ? undefined : variant}\n        className={adorned ? recipes.inputField() : className}\n        ref={ref}\n      />\n    );\n    if (!adorned) {\n      return input;\n    }\n\n    return (\n      <ControlFrame\n        scope='input'\n        start={start}\n        end={end}\n        variant={variant}\n        data-testid={testId}\n        classNames={className}\n        style={style}\n      >\n        {input}\n      </ControlFrame>\n    );\n  },\n);\n\nInput.displayName = 'Input';\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { NumberInput as NumberInputPrimitive } from '@ark-ui/react/number-input';\nimport React, { forwardRef } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type ThemedClassName } from '@dxos/ui-types';\n\nimport { translationKey } from '#translations';\n\nimport { recipes } from '../../recipes.ts';\nimport { Button } from '../Button/Button.tsx';\n\nexport type NumberInputProps = ThemedClassName<\n  Pick<\n    NumberInputPrimitive.RootProps,\n    | 'min'\n    | 'max'\n    | 'step'\n    | 'formatOptions'\n    | 'locale'\n    | 'allowMouseWheel'\n    | 'clampValueOnBlur'\n    | 'inputMode'\n    | 'disabled'\n    | 'readOnly'\n    | 'required'\n    | 'invalid'\n    | 'name'\n    | 'form'\n  >\n> & {\n  /** The formatted text; `valueAsNumber` in `onValueChange` is the number (NaN when empty). */\n  'value'?: string;\n  'defaultValue'?: string;\n  'onValueChange'?: (value: string, valueAsNumber: number) => void;\n  'placeholder'?: string;\n  'autoFocus'?: boolean;\n  /** Hide the trailing decrement and increment buttons (the arrow keys still step). */\n  'stepper'?: boolean;\n  /** Overrides the translated `number-input.increment.label`. */\n  'incrementLabel'?: string;\n  /** Overrides the translated `number-input.decrement.label`. */\n  'decrementLabel'?: string;\n  'aria-label'?: string;\n  'data-testid'?: string;\n};\n\n/**\n * Ark number input in a control row: a text input that parses and formats by locale, steps by `step` with ArrowUp/Down\n * (and PageUp/Down), clamps to `min`/`max` on blur, with trailing decrement and increment buttons (`compact`, so the\n * pair abuts). Inside a `Field.Root` the input takes the field's id, label, description and state. `data-testid` goes\n * to the row, the ref to the input.\n */\nexport const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(\n  (\n    {\n      classNames,\n      value,\n      defaultValue,\n      onValueChange,\n      placeholder,\n      autoFocus,\n      stepper = true,\n      incrementLabel,\n      decrementLabel,\n      'aria-label': ariaLabel,\n      'data-testid': testId,\n      ...props\n    },\n    forwardedRef,\n  ) => {\n    const { t } = useTranslation(translationKey);\n    return (\n      <NumberInputPrimitive.Root\n        {...props}\n        value={value}\n        defaultValue={defaultValue}\n        onValueChange={onValueChange && (({ value, valueAsNumber }) => onValueChange(value, valueAsNumber))}\n        className={recipes.controlRoot()}\n      >\n        <NumberInputPrimitive.Control data-testid={testId} className={mx(recipes.numberInput(), classNames)}>\n          <NumberInputPrimitive.Input\n            placeholder={placeholder}\n            autoFocus={autoFocus}\n            aria-label={ariaLabel}\n            className={recipes.inputField()}\n            ref={forwardedRef}\n          />\n          {stepper && (\n            <span data-scope='number-input' data-part='end' className={recipes.inputAdornment()}>\n              <NumberInputPrimitive.DecrementTrigger asChild>\n                <Button\n                  icon='ph--minus--regular'\n                  label={decrementLabel ?? t('number-input.decrement.label')}\n                  iconOnly\n                  compact\n                  variant='ghost'\n                  showTooltip={false}\n                />\n              </NumberInputPrimitive.DecrementTrigger>\n              <NumberInputPrimitive.IncrementTrigger asChild>\n                <Button\n                  icon='ph--plus--regular'\n                  label={incrementLabel ?? t('number-input.increment.label')}\n                  iconOnly\n                  compact\n                  variant='ghost'\n                  showTooltip={false}\n                />\n              </NumberInputPrimitive.IncrementTrigger>\n            </span>\n          )}\n        </NumberInputPrimitive.Control>\n      </NumberInputPrimitive.Root>\n    );\n  },\n);\n\nNumberInput.displayName = 'NumberInput';\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { PasswordInput as PasswordInputPrimitive, usePasswordInputContext } from '@ark-ui/react/password-input';\nimport React, { type FocusEventHandler, forwardRef } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type ThemedClassName } from '@dxos/ui-types';\n\nimport { translationKey } from '#translations';\n\nimport { recipes } from '../../recipes.ts';\nimport { Button } from '../Button/Button.tsx';\n\nexport type PasswordInputProps = ThemedClassName<\n  Pick<\n    PasswordInputPrimitive.RootProps,\n    | 'visible'\n    | 'defaultVisible'\n    | 'autoComplete'\n    | 'ignorePasswordManagers'\n    | 'disabled'\n    | 'readOnly'\n    | 'required'\n    | 'invalid'\n    | 'name'\n  >\n> & {\n  'value'?: string;\n  'defaultValue'?: string;\n  'onValueChange'?: (value: string) => void;\n  'onVisibleChange'?: (visible: boolean) => void;\n  /** Focus leaving the input, e.g. to commit a draft. */\n  'onBlur'?: FocusEventHandler<HTMLInputElement>;\n  'placeholder'?: string;\n  'autoFocus'?: boolean;\n  /** Overrides the translated `password-input.show.label`. */\n  'showLabel'?: string;\n  /** Overrides the translated `password-input.hide.label`. */\n  'hideLabel'?: string;\n  'aria-label'?: string;\n  'data-testid'?: string;\n};\n\ntype VisibilityTriggerProps = Pick<PasswordInputProps, 'showLabel' | 'hideLabel'>;\n\n/** The eye toggle names the action it performs, which follows the machine's visibility. */\nconst VisibilityTrigger = ({ showLabel, hideLabel }: VisibilityTriggerProps) => {\n  const { t } = useTranslation(translationKey);\n  const { visible } = usePasswordInputContext();\n  return (\n    <PasswordInputPrimitive.VisibilityTrigger asChild>\n      <Button\n        icon={visible ? 'ph--eye-slash--regular' : 'ph--eye--regular'}\n        label={visible ? (hideLabel ?? t('password-input.hide.label')) : (showLabel ?? t('password-input.show.label'))}\n        iconOnly\n        variant='ghost'\n        showTooltip={false}\n      />\n    </PasswordInputPrimitive.VisibilityTrigger>\n  );\n};\n\n/**\n * Ark password input in a control row with a trailing visibility toggle (zag keeps the input focused and the toggle\n * out of the tab order). `ignorePasswordManagers` sets the managers' opt-out attributes, as Input's `noAutoFill`.\n * Inside a `Field.Root` the input takes the field's id, label, description and state. `data-testid` goes to the row,\n * the ref to the input.\n */\nexport const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(\n  (\n    {\n      classNames,\n      value,\n      defaultValue,\n      onValueChange,\n      onVisibleChange,\n      onBlur,\n      placeholder,\n      autoFocus,\n      showLabel,\n      hideLabel,\n      'aria-label': ariaLabel,\n      'data-testid': testId,\n      ...props\n    },\n    forwardedRef,\n  ) => (\n    <PasswordInputPrimitive.Root\n      {...props}\n      onVisibilityChange={onVisibleChange && (({ visible }) => onVisibleChange(visible))}\n      className={recipes.controlRoot()}\n    >\n      <PasswordInputPrimitive.Control data-testid={testId} className={mx(recipes.passwordInput(), classNames)}>\n        <PasswordInputPrimitive.Input\n          value={value}\n          defaultValue={defaultValue}\n          onChange={onValueChange && ((event) => onValueChange(event.target.value))}\n          onBlur={onBlur}\n          placeholder={placeholder}\n          autoFocus={autoFocus}\n          aria-label={ariaLabel}\n          className={recipes.inputField()}\n          ref={forwardedRef}\n        />\n        <span data-scope='password-input' data-part='end' className={recipes.inputAdornment()}>\n          <VisibilityTrigger showLabel={showLabel} hideLabel={hideLabel} />\n        </span>\n      </PasswordInputPrimitive.Control>\n    </PasswordInputPrimitive.Root>\n  ),\n);\n\nPasswordInput.displayName = 'PasswordInput';\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { useFieldContext } from '@ark-ui/react/field';\nimport { PinInput as PinInputPrimitive } from '@ark-ui/react/pin-input';\nimport React, { forwardRef } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type ThemedClassName } from '@dxos/ui-types';\n\nimport { recipes } from '../../recipes.ts';\nimport { type Size } from '../../sizes.ts';\nimport * as Field from '../Field/Field.tsx';\n\nexport type PinInputProps = ThemedClassName<\n  Pick<\n    PinInputPrimitive.RootProps,\n    | 'mask'\n    | 'otp'\n    | 'type'\n    | 'pattern'\n    | 'placeholder'\n    | 'blurOnComplete'\n    | 'selectOnFocus'\n    | 'autoFocus'\n    | 'disabled'\n    | 'readOnly'\n    | 'required'\n    | 'invalid'\n    | 'name'\n    | 'form'\n  >\n> & {\n  /** Number of cells (6 by default, as the current PinInput). */\n  'length'?: number;\n  /** The code as one string; unfilled cells are absent from its end. */\n  'value'?: string;\n  'defaultValue'?: string;\n  'onValueChange'?: (value: string) => void;\n  /** Called once every cell is filled. */\n  'onValueComplete'?: (value: string) => void;\n  /** The cells' size, as any control's (a code entered on its own reads larger than a form's fields). */\n  'size'?: Size;\n  /** Names the cells' group when there is no enclosing `Field.Label`. */\n  'aria-label'?: string;\n  'data-testid'?: string;\n};\n\nconst toCells = (value: string | undefined, length: number) =>\n  value === undefined ? undefined : Array.from({ length }, (_, index) => value[index] ?? '');\n\n/**\n * Ark pin input: one control-sized square per character, moving focus as each fills, with paste, Backspace and arrow\n * keys from zag. `otp` asks for the one-time-code autofill and `mask` hides the characters. Inside a `Field.Root` the\n * field's label names the cells' group and its description, invalid and disabled state reach every cell. `data-testid`\n * and the ref go to that group.\n */\nexport const PinInput = forwardRef<HTMLDivElement, PinInputProps>(\n  (\n    {\n      classNames,\n      length = 6,\n      value,\n      defaultValue,\n      onValueChange,\n      onValueComplete,\n      placeholder = '',\n      size,\n      'aria-label': ariaLabel,\n      'data-testid': testId,\n      ...props\n    },\n    forwardedRef,\n  ) => {\n    const field = useFieldContext();\n    return (\n      <PinInputPrimitive.Root\n        {...props}\n        count={length}\n        value={toCells(value, length)}\n        defaultValue={toCells(defaultValue, length)}\n        onValueChange={onValueChange && (({ valueAsString }) => onValueChange(valueAsString))}\n        onValueComplete={onValueComplete && (({ valueAsString }) => onValueComplete(valueAsString))}\n        placeholder={placeholder}\n        className={recipes.pinInput()}\n      >\n        <PinInputPrimitive.Control\n          // The cells are one entry, so the group carries the field's name and description.\n          role='group'\n          aria-label={ariaLabel}\n          aria-labelledby={ariaLabel ? undefined : field?.ids.label}\n          aria-describedby={field?.ariaDescribedby}\n          data-testid={testId}\n          data-size={size}\n          className={mx(recipes.pinInputControl(), classNames)}\n          ref={forwardedRef}\n        >\n          {Array.from({ length }, (_, index) => (\n            <PinInputPrimitive.Input\n              key={index}\n              index={index}\n              {...(index === 0 && { [Field.LABEL_TARGET_ATTRIBUTE]: '' })}\n              className={recipes.pinInputCell()}\n            />\n          ))}\n        </PinInputPrimitive.Control>\n        <PinInputPrimitive.HiddenInput />\n      </PinInputPrimitive.Root>\n    );\n  },\n);\n\nPinInput.displayName = 'PinInput';\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { Slider as SliderPrimitive } from '@ark-ui/react/slider';\nimport React, { type ReactNode, forwardRef, useId, useLayoutEffect, useRef, useState } from 'react';\n\nimport { invariant } from '@dxos/invariant';\nimport { mx } from '@dxos/ui-theme';\nimport { type ThemedClassName } from '@dxos/ui-types';\n\nimport { recipes } from '../../recipes.ts';\n\nexport type SliderProps = ThemedClassName<\n  Omit<\n    SliderPrimitive.RootProps,\n    | 'children'\n    | 'value'\n    | 'defaultValue'\n    | 'onValueChange'\n    | 'onValueChangeEnd'\n    | 'aria-label'\n    | 'aria-labelledby'\n    | 'thumbAlignment'\n    | 'thumbSize'\n  >\n> & {\n  /** One entry per thumb. */\n  'value'?: number[];\n  'defaultValue'?: number[];\n  'onValueChange'?: (value: number[]) => void;\n  /** Fires once when a drag or key repeat ends. */\n  'onValueCommit'?: (value: number[]) => void;\n  /** Visible label above the track; names a single thumb. */\n  'label'?: ReactNode;\n  /** Names a single thumb without a visible label. */\n  'aria-label'?: string;\n  /**\n   * Accessible name per thumb, by index: `role=\"slider\"` has no text a label's `htmlFor` can reach. Required whenever\n   * there is more than one thumb; with a visible `label` too, each thumb reads as \"<thumb label> <label>\".\n   */\n  'thumbLabels'?: string[];\n};\n\n/**\n * Ark's slider as a leaf control: an optional label above a block-tall row holding the track, its range and one thumb\n * per value. Every thumb must be named, so a missing name throws rather than rendering an unlabelled control.\n */\n/** Thumb size assumed until it is measured (the default-density icon size); also where layout is unavailable. */\nconst DEFAULT_THUMB_SIZE = { width: 16, height: 16 };\n\nexport const Slider = forwardRef<HTMLDivElement, SliderProps>(\n  (\n    {\n      classNames,\n      value,\n      defaultValue,\n      onValueChange,\n      onValueCommit,\n      label,\n      'aria-label': ariaLabel,\n      thumbLabels,\n      orientation = 'horizontal',\n      id: idProp,\n      ...props\n    },\n    forwardedRef,\n  ) => {\n    const generatedId = useId();\n    const id = idProp ?? generatedId;\n    const thumbCount = value?.length ?? defaultValue?.length ?? 1;\n    invariant(\n      thumbLabels ? thumbLabels.length === thumbCount : thumbCount === 1 && (!!label || ariaLabel !== undefined),\n      thumbLabels\n        ? `Slider: thumbLabels has ${thumbLabels.length} entries but ${thumbCount} thumb(s) are rendered.`\n        : `Slider: pass thumbLabels (${thumbCount} entries) or, for a single thumb, label or aria-label.`,\n    );\n\n    // The machine points every thumb at the label; with per-thumb names too, each thumb names itself first so two\n    // thumbs under one label stay distinguishable.\n    const ids = { label: `${id}-label`, thumb: (index: number) => `${id}-thumb-${index}` };\n    const labelledBy =\n      label && thumbLabels ? thumbLabels.map((_label, index) => `${ids.thumb(index)} ${ids.label}`) : undefined;\n\n    // Contained thumbs need their size. Left to the machine, it hides every thumb until a non-zero measurement\n    // arrives, which never happens without layout (jsdom), so the thumbs vanish; measuring here and passing the\n    // size keeps them visible, starting from the default size.\n    const [thumbSize, setThumbSize] = useState(DEFAULT_THUMB_SIZE);\n    const thumbRef = useRef<HTMLDivElement>(null);\n    useLayoutEffect(() => {\n      const thumb = thumbRef.current;\n      if (!thumb) {\n        return;\n      }\n      const measure = () => {\n        const { offsetWidth: width, offsetHeight: height } = thumb;\n        if (width > 0 && height > 0) {\n          setThumbSize((current) =>\n            current.width === width && current.height === height ? current : { width, height },\n          );\n        }\n      };\n      measure();\n      if (typeof ResizeObserver === 'undefined') {\n        return;\n      }\n      const observer = new ResizeObserver(measure);\n      observer.observe(thumb);\n      return () => observer.disconnect();\n    }, []);\n\n    return (\n      <SliderPrimitive.Root\n        {...props}\n        id={id}\n        ids={ids}\n        value={value}\n        defaultValue={defaultValue}\n        onValueChange={onValueChange && (({ value }) => onValueChange(value))}\n        onValueChangeEnd={onValueCommit && (({ value }) => onValueCommit(value))}\n        orientation={orientation}\n        aria-label={thumbLabels ?? (ariaLabel !== undefined ? [ariaLabel] : undefined)}\n        aria-labelledby={labelledBy}\n        // Thumbs stay within the track, so the track spans the full width and lines up with the label.\n        thumbAlignment='contain'\n        thumbSize={thumbSize}\n        className={mx(recipes.slider(), classNames)}\n        ref={forwardedRef}\n      >\n        {label && <SliderPrimitive.Label className={recipes.sliderLabel()}>{label}</SliderPrimitive.Label>}\n        <SliderPrimitive.Control className={recipes.sliderControl()}>\n          <SliderPrimitive.Track className={recipes.sliderTrack()}>\n            <SliderPrimitive.Range className={recipes.sliderRange()} />\n          </SliderPrimitive.Track>\n          {Array.from({ length: thumbCount }, (_unused, index) => (\n            <SliderPrimitive.Thumb\n              key={index}\n              index={index}\n              className={recipes.sliderThumb()}\n              ref={index === 0 ? thumbRef : undefined}\n            >\n              <SliderPrimitive.HiddenInput />\n            </SliderPrimitive.Thumb>\n          ))}\n        </SliderPrimitive.Control>\n      </SliderPrimitive.Root>\n    );\n  },\n);\n\nSlider.displayName = 'Slider';\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { Switch as SwitchPrimitive } from '@ark-ui/react/switch';\nimport React, { type ReactNode, forwardRef } from 'react';\n\nimport { mx } from '@dxos/ui-theme';\nimport { type ThemedClassName } from '@dxos/ui-types';\n\nimport { recipes } from '../../recipes.ts';\nimport * as Fieldset from '../Fieldset/Fieldset.tsx';\nimport { useToolbarItem } from '../Toolbar/toolbar-context.ts';\n\nexport type SwitchProps = ThemedClassName<Omit<SwitchPrimitive.RootProps, 'children'>> & {\n  /** Visible label beside the track; without one pass `aria-label`. */\n  'label'?: ReactNode;\n  'aria-label'?: string;\n  /** Neither on nor off (e.g. several edited objects disagree): the track is dimmed until it is set. */\n  'indeterminate'?: boolean;\n};\n\n/**\n * Ark switch with an icon-tall track; the root is a block-tall row so it lines up with other controls. In a Toolbar its\n * input joins the roving focus.\n */\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>(\n  ({ classNames, label, 'aria-label': ariaLabel, indeterminate, disabled: disabledProp, ...props }, forwardedRef) => {\n    const disabled = Fieldset.useFieldsetDisabled(disabledProp);\n    const toolbarItem = useToolbarItem(disabled);\n    return (\n      <SwitchPrimitive.Root\n        {...props}\n        disabled={disabled || toolbarItem?.disabled}\n        data-indeterminate={indeterminate ? '' : undefined}\n        className={mx(recipes.switch(), classNames)}\n        ref={forwardedRef}\n      >\n        <SwitchPrimitive.Control className={recipes.switchControl()}>\n          <SwitchPrimitive.Thumb className={recipes.switchThumb()} />\n        </SwitchPrimitive.Control>\n        {label && <SwitchPrimitive.Label>{label}</SwitchPrimitive.Label>}\n        {/* The zag machine implements the switch keyboard contract (Space toggles), so the role is earned (follow-up 21). */}\n        <SwitchPrimitive.HiddenInput {...toolbarItem} role='switch' aria-label={ariaLabel} />\n      </SwitchPrimitive.Root>\n    );\n  },\n);\n\nSwitch.displayName = 'Switch';\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { Field as FieldPrimitive } from '@ark-ui/react/field';\nimport React, { type TextareaHTMLAttributes } from 'react';\n\nimport { recipes } from '../../recipes.ts';\nimport { composable, composableProps } from '../../util/slots.ts';\nimport * as Fieldset from '../Fieldset/Fieldset.tsx';\n\n/** Fewest lines a textarea shows, so it never reads as a single-line Input. */\nconst MIN_ROWS = 3;\n\nexport type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {\n  /** Grow with the content from `rows` lines (at least 3) instead of scrolling. */\n  autoResize?: boolean;\n  /** `subdued` drops the well, as Input's. */\n  variant?: 'default' | 'subdued';\n};\n\n/** Multi-line text at control width; inside a `Field.Root` it takes the field's id, label and description wiring. */\nexport const Textarea = composable<HTMLTextAreaElement, TextareaProps>(\n  ({ rows = MIN_ROWS, autoResize = false, variant = 'default', disabled, ...props }, forwardedRef) => {\n    const fieldsetDisabled = Fieldset.useFieldsetDisabled(disabled);\n    const { className, ...rest } = composableProps(props, { classNames: recipes.textarea() });\n    return (\n      <FieldPrimitive.Textarea\n        {...rest}\n        disabled={fieldsetDisabled}\n        // Auto-resize measures from `height: auto`, where `rows` sets the intrinsic height, so rows stay the minimum.\n        rows={Math.max(rows, MIN_ROWS)}\n        autoresize={autoResize}\n        data-scope='textarea'\n        data-part='root'\n        data-variant={variant}\n        className={className}\n        ref={forwardedRef}\n      />\n    );\n  },\n);\n\nTextarea.displayName = 'Textarea';\n","//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nexport { Checkbox, type CheckboxProps } from '../components/Checkbox/Checkbox.tsx';\nexport {\n  ControlFrame as Frame,\n  type ControlFrameProps as FrameProps,\n  type ControlFrameVariant as FrameVariant,\n} from '../components/ControlFrame/ControlFrame.tsx';\nexport {\n  DateInput as Date,\n  type DateInputGranularity as DateGranularity,\n  type DateInputProps as DateProps,\n  type DateInputType as DateType,\n} from '../components/DateInput/DateInput.tsx';\nexport { Input as Root, type InputProps as RootProps } from '../components/Input/Input.tsx';\nexport { NumberInput as Number, type NumberInputProps as NumberProps } from '../components/NumberInput/NumberInput.tsx';\nexport {\n  PasswordInput as Password,\n  type PasswordInputProps as PasswordProps,\n} from '../components/PasswordInput/PasswordInput.tsx';\nexport { PinInput as Pin, type PinInputProps as PinProps } from '../components/PinInput/PinInput.tsx';\nexport { Slider, type SliderProps } from '../components/Slider/Slider.tsx';\nexport { Switch, type SwitchProps } from '../components/Switch/Switch.tsx';\nexport { Textarea, type TextareaProps } from '../components/Textarea/Textarea.tsx';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAaA,aAAW,YACrB,EAAE,YAAY,OAAO,cAAc,WAAW,UAAU,GAAG,SAAS,iBACnE,qBAACC,SAAkB,MAAnB;CACE,GAAI;CACJ,UAAUC,oBAA6B,QAAQ;CAC/C,WAAW,GAAG,QAAQ,SAAS,GAAG,UAAU;CAC5C,KAAK;CAJP,UAAA;EAME,qBAACD,SAAkB,SAAnB;GAA2B,WAAW,QAAQ,gBAAgB;GAA9D,UAAA,CACE,oBAACA,SAAkB,WAAnB,EAAA,UACE,oBAACE,MAAD,EA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