// // Copyright 2026 DXOS.org // import '../../theme/index.css'; import { type Meta, type StoryObj } from '@storybook/react-vite'; import React from 'react'; import { expect, userEvent, within } from 'storybook/test'; import { invariant } from '@dxos/invariant'; import { translations } from '#translations'; import * as UiInput from '../../namespaces/Input.ts'; import { SIZES } from '../../sizes.ts'; import { GEOMETRY, byTestId, controlSize, expectEndCell, expectScoped, expectTooltip, sizeRow, } from '../../testing/geometry.ts'; import { withLayout, withTheme } from '../../testing/index.ts'; import { SIZE_ARG_TYPES, type SizeArgs, withSizes } from '../../testing/stories.tsx'; import { Button } from '../Button/Button.tsx'; import { Checkbox } from '../Checkbox/Checkbox.tsx'; import { Container } from '../Container/Container.tsx'; import { Input } from '../Input/Input.tsx'; import { NumberInput } from '../NumberInput/NumberInput.tsx'; import { PasswordInput } from '../PasswordInput/PasswordInput.tsx'; import { PinInput } from '../PinInput/PinInput.tsx'; import { Switch } from '../Switch/Switch.tsx'; import { Textarea } from '../Textarea/Textarea.tsx'; import * as Typography from '../Typography/Typography.tsx'; import * as Field from './Field.tsx'; const VALENCES: Field.Valence[] = ['success', 'info', 'warning', 'error']; /** * Every current `Field` part as a Next field (DESIGN.md follow-up 54): text, textarea, the segmented date, time and * date-time with the calendar trigger, PIN, number, password, and a checkbox and switch in block cells (the current * `Field.Block`). A `required` field (its label marked automatically, then with the mark placed by hand), a `readOnly` * one and an `asChild` root close it. */ const EveryField = ({ size }: SizeArgs) => ( <> Name Bio