import { BUTTON_EMPHASIS, BUTTON_SIZE, Button } from '../../../button/src'; import { FormField, FormFieldError, FormFieldHelper, FormFieldLabel } from '../../../form-field/src'; import { Input } from '../../src'; export default { component: Input, title: 'Tests rendering', }; export const ClearableDefaultValue = () => ( ); export const ClearableEmpty = () => ( ); export const ClearableValue = () => ( ); export const CustomStyle = () => ( ); // The geometry stories below back the pixel-parity assertions in input.e2e.ts. There is no // visual regression suite in this repo, so they are the only guard against the in-field // spacing drifting when the padding moves between the container and the parts. export const GeometryBare = () => ( ); export const GeometryClearable = () => ( ); export const GeometryLoading = () => ( ); // `className` is the only prop that reaches the container, so it is the only way to constrain // the field the way real consumers do (PaginationPageSelector sets `width: 45px` this way). // A `style` prop would land on the instead and the container would simply grow. export const GeometryConstrained = () => ( <> ); export const Render = () => ( ); export const SlotsAriaDescribedBy = () => ( <> Weight Help text {/* The referenced element has to exist, or the fixture models an invalid aria reference. */}

Consumer description

); export const SlotsInForm = () => (
); export const SlotsInFormField = () => ( Weight Help text Error message ); export const SlotsText = () => ( ); export const SlotsWithButton = () => ( C ) } locale="en" /> ); // An end adornment holding a control lines up with the built-in action buttons (4px from the // border) rather than with the text inset (8px). A text adornment keeps the text inset. export const GeometrySlotButton = () => ( C ) } /> ); export const GeometrySlotText = () => ( ); export const GeometrySlotTextClearable = () => ( ); // Mirrors GeometrySlotButton / GeometrySlotText on the leading side. export const GeometrySlotStartButton = () => ( S ) } /> ); export const GeometrySlotStartText = () => ( ); // Each side is decided on its own: a control at the start pulls that edge in, while a text // adornment at the end keeps the text inset. Without a fixture the two sides could silently // share a single decision. export const GeometrySlotMixed = () => ( S ) } /> ); // Same mix, but with the clear button in play: the end inset is then owned by the actions. export const GeometrySlotMixedClearable = () => ( S ) } /> ); export const DefaultWidth = () => ( <>
);