@kanso-labs/kanso-ui 0.40.9 → 0.41.0

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.
Files changed (39) hide show
  1. package/dist/color-scheme.d.ts +6 -0
  2. package/dist/color-scheme.js +9 -2
  3. package/dist/color-scheme.js.map +1 -1
  4. package/dist/components/app-bar/index.d.ts +11 -2
  5. package/dist/components/app-bar/index.js +53 -46
  6. package/dist/components/app-bar/index.js.map +1 -1
  7. package/dist/components/card/index.d.ts +12 -1
  8. package/dist/components/card/index.js +136 -66
  9. package/dist/components/card/index.js.map +1 -1
  10. package/dist/components/dialog/index.js +3 -2
  11. package/dist/components/dialog/index.js.map +1 -1
  12. package/dist/components/popover/index.js +3 -2
  13. package/dist/components/popover/index.js.map +1 -1
  14. package/dist/components/segmented-button/index.d.ts +3 -0
  15. package/dist/components/segmented-button/index.js +131 -65
  16. package/dist/components/segmented-button/index.js.map +1 -1
  17. package/dist/components/separator/index.js +2 -2
  18. package/dist/components/separator/index.js.map +1 -1
  19. package/dist/components/sheet/index.js +17 -16
  20. package/dist/components/sheet/index.js.map +1 -1
  21. package/dist/components/snackbar/index.d.ts +10 -3
  22. package/dist/components/snackbar/index.js +32 -12
  23. package/dist/components/snackbar/index.js.map +1 -1
  24. package/dist/components/switch/index.js +12 -3
  25. package/dist/components/switch/index.js.map +1 -1
  26. package/dist/components/toolbar/index.d.ts +3 -2
  27. package/dist/components/toolbar/index.js +3 -2
  28. package/dist/components/toolbar/index.js.map +1 -1
  29. package/dist/field/index.js +75 -48
  30. package/dist/field/index.js.map +1 -1
  31. package/dist/overlay/index.js +24 -0
  32. package/dist/overlay/index.js.map +1 -0
  33. package/dist/styles/scheme.js +19 -0
  34. package/dist/styles/scheme.js.map +1 -0
  35. package/dist/styles.css +86 -26
  36. package/dist/theme-scope.d.ts +5 -2
  37. package/dist/theme-scope.js +2 -1
  38. package/dist/theme-scope.js.map +1 -1
  39. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["FocusEvent","HTMLAttributes","InputEventHandler","ReactNode","Ref","RefAttributes","ButtonProps","GroupProps","GroupRenderProps","InputProps","InputRenderProps","LabelProps","TextAreaProps","stylex","createContext","useContext","FieldError","FieldErrorContext","Group","Input","InputContext","Label","Button","RACButton","SelectStateContext","Text","TextArea","TextAreaContext","TextContext","useLocale","useSlottedContext","VisuallyHidden","useMessages","mergeStatefulStyles","mergeStyles","spacing","focusesControl","useInsideForm","fieldChromeStyles","groupStyles","BoxControl","label","BoxLabel","underLabel","FieldBoxProps","Omit","children","endInset","floatingLabel","isFocused","isPopulated","isRequired","leading","multiline","ref","HTMLDivElement","trailing","trigger","variant","FieldVariant","FieldInputProps","numeric","prefix","suffix","FieldLabelProps","state","Partial","FieldLabelState","FieldLabelVariant","Pick","FieldMessageProps","characterCount","characterLimitLabel","description","error","errorId","inset","maxLength","reserve","FieldTextAreaProps","autosize","FieldTriggerProps","FieldValueProps","HTMLElement","isPlaceholder","OUTSIDE_BOX","BOX_CONTROLS","filled","fixed","floating","outlined","Record","BoxContext","boxContent","BoxContent","t0","$","_c","read","useFieldPopulated","populated","focused","isFocusWithin","floated","t1","t2","props","outline","undefined","outlineLeading","outlineTrailing","outlineFocused","outlineEndInset","lg","xs","outlineNotch","outlineNotchOpen","REQUIRED_MARK","t3","isDisabled","icon","iconMultiline","iconOutlined","iconDisabled","t4","column","columnFloating","columnDisabledFloating","columnDisabled","t5","withFocus","t6","boxLabel","boxLabelFloated","boxLabelOutlined","boxLabelOutlinedFloated","boxLabelEndInset","t7","t8","t9","isInvalid","iconError","t10","boxStyles","box","boxFloating","boxFixed","boxMultiline","boxLeading","boxTrailing","boxOutlined","boxOutlinedFloating","boxOutlinedMultiline","boxOutlinedError","boxError","isHovered","boxOutlinedErrorHovered","boxOutlinedHovered","focusedStyle","boxOutlinedDisabled","boxDisabled","commitWhileInvalid","onInput","E","event","currentTarget","dispatchEvent","Event","bubbles","FieldBox","T0","t11","t12","t13","t14","t15","onPointerDown","FieldInput","placeholder","validation","input","inputUnderLabel","inputUnderFloatingLabel","inputDisabled","control","Symbol","for","affixLine","affix","FieldSegments","segments","returnToStart","FieldTextArea","context","value","textArea","textAreaAutosize","autosizeCell","replica","FieldTrigger","FieldValue","hidden","valuePlaceholder","valuePlaceholderHidden","invalid","boxOutlinedErrorFocused","boxOutlinedFocused","boxErrorFocused","boxFocused","contains","relatedTarget","scrollLeft","select","selectionManager","selectedKeys","size","String","length","NO_STATE","FieldLabel","labelDisabled","labelError","labelFocused","FieldMessage","locale","messages","insideForm","text","characterLimit","limit","collapsed","hint","message","described","errorSlot","slots","errorMessage","messageError","messageStyles","written","messageLine","messageInset","messageLineCollapsed","messageRegion","counter","countIn","RequiredMark","counterFormatters","Map","Intl","NumberFormat","formatter","get","set","format","_c","stylex.props","props","RACButton"],"sources":["../../src/field/index.tsx"],"sourcesContent":["import type { FocusEvent, HTMLAttributes, InputEventHandler, ReactNode, Ref, RefAttributes } from 'react';\nimport type { ButtonProps, GroupProps, GroupRenderProps, InputProps, InputRenderProps, LabelProps, TextAreaProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useContext } from 'react';\nimport { FieldError, FieldErrorContext, Group, Input, InputContext, Label, Button as RACButton, SelectStateContext, Text, TextArea, TextAreaContext, TextContext, useLocale, useSlottedContext, VisuallyHidden } from 'react-aria-components';\nimport { useMessages } from '../i18n';\nimport { mergeStatefulStyles, mergeStyles } from '../styles/merge';\nimport { spacing } from '../tokens/design.tokens.stylex';\nimport { focusesControl } from './press';\nimport { useInsideForm } from './root';\nimport { fieldChromeStyles, groupStyles } from './styles';\n\n// The chrome every field shares: the filled box with its label at the top, the\n// control inside it, and the line of supporting text under it. TextField drew\n// all of it on its own until the coverage plan brought a dozen more fields,\n// each of which would otherwise have written the same box a second time.\n//\n// Not a component of the library's own and not exported. Each field is still\n// React Aria's field component — TextField, NumberField, DateField — and these\n// are the parts it renders inside, which is what keeps the label association,\n// the description and error wiring, and validation on React Aria's side.\n//\n// Neither the notch nor the label can select on the state that drives them.\n// Both are children of the box and the state is the box's, and the filled\n// label reads it in CSS only because it changes type alone, which the box\n// hands down inherited — where the notch changes what it holds and the\n// label changes where it sits, and neither of those inherits. So the box's\n// content computes that state in React instead: focus from the box's own\n// render state, and a value from the control's context, which is where the\n// character counter reads it too. The border's colour is the box's,\n// inherited, which is what carries the hover, focus, error and disabled\n// roles to it.\n\n// What a control needs to know about the box around it: how the label is\n// drawn, and whether the control clears it with a margin — it does under\n// the filled box's label, and not under the outlined box's, whose label\n// sits on the outline rather than over the value.\ninterface BoxControl {\n label: BoxLabel;\n underLabel: boolean;\n}\n\n// How the box draws its label, for the control inside it — see the context\n// below.\ntype BoxLabel = 'fixed' | 'floating' | 'none';\ntype FieldBoxProps = Omit<GroupProps, 'children'> & {\n children?: ReactNode;\n /**\n * How much of the inline end of the column the control's own parts take,\n * beside the control, as a CSS length: a number field's steppers. The\n * label, and the outlined box's notch with it, stop that far short of the\n * column's end, so a long label is cut short beside them rather than\n * drawn under them. A part in `trailing` needs none of this, since it sits\n * outside the column.\n * @default '0px'\n */\n endInset?: string;\n /**\n * Whether the label sits in the empty box and floats to the top once the\n * field is focused or holds a value, as the text fields page draws it.\n * `false` keeps it small at the top in every state.\n * @default true\n */\n floatingLabel?: boolean;\n /**\n * Whether the field holds focus somewhere the box cannot see, so the box\n * draws its focused state — the floated label, the focused indicator and\n * the label's colour — without focus inside it. A select's open list is\n * the case: opening it moves focus into the list, on an overlay outside\n * the box, and left to `:focus-within` the label fell back onto the\n * placeholder the select still showed.\n * @default false\n */\n isFocused?: boolean;\n /**\n * Whether the control is holding anything, for a field whose control the\n * chrome cannot ask. It reads an input, a text area and a select's own\n * state; a control that is none of those — a token field's editable area,\n * say — says so here, and the floating label floats on it.\n */\n isPopulated?: boolean;\n /**\n * Whether the field must be filled, which marks its label with an\n * asterisk. The field passes its own `isRequired` on, since the group the\n * box is reports none.\n * @default false\n */\n isRequired?: boolean;\n /** What the field is for. */\n label: string;\n /** An icon at the start of the box, before the label and the control. */\n leading?: ReactNode;\n /**\n * Whether the box takes its height from the control inside it rather\n * than the page's 56dp, for a text area.\n * @default false\n */\n multiline?: boolean;\n /**\n * The box's own element. A field whose box is what something else is\n * anchored to needs it — a select's list is positioned against the box and\n * takes its width from it, which is what makes the two the same width.\n */\n ref?: Ref<HTMLDivElement>;\n /** An icon at the end of the box, after the control. */\n trailing?: ReactNode;\n /**\n * A press target covering the whole box, for a field whose box opens\n * something rather than taking a keystroke — {@link FieldTrigger}. Drawn\n * in the box itself rather than in the column the label and the control\n * share, so the padding and the icons open it too.\n */\n trigger?: ReactNode;\n /**\n * The filled box, or the outlined one: no fill, an outline that thickens\n * and takes the primary role while focused, and the label cutting it once\n * it floats.\n * @default 'filled'\n */\n variant?: FieldVariant;\n};\n\n// `prefix` is also an HTML attribute — the RDFa one, which nothing here\n// wants — and React's element types carry it as a string, so it is left out\n// of the props taken from React Aria to make room for the affix.\ntype FieldInputProps = Omit<InputProps, 'prefix'> & {\n /**\n * Renders the value in the mono face with tabular figures, for amounts and\n * other numbers meant to be compared down a column.\n * @default false\n */\n numeric?: boolean;\n /**\n * Text before the value on its line, shown while the field is focused or\n * holds a value.\n */\n prefix?: ReactNode;\n /**\n * Text after the value on its line, shown while the field is focused or\n * holds a value.\n */\n suffix?: ReactNode;\n};\ntype FieldLabelProps = LabelProps & {\n /**\n * Whether the field must be filled, which ends the label in an asterisk in\n * the label's own colour.\n * @default false\n */\n isRequired?: boolean;\n /**\n * The states the colour follows. Disabled wins over error, and error over\n * focus, so a focused invalid field keeps its error colour.\n */\n state?: Partial<FieldLabelState>;\n /**\n * Where the label sits. `field` is inside a box, positioned and typed by\n * whatever renders it. `group` is above a group of controls, which has no\n * box to float a label in, so this one carries its type itself.\n * @default 'field'\n */\n variant?: FieldLabelVariant;\n};\ntype FieldLabelState = Pick<GroupRenderProps, 'isDisabled' | 'isFocusWithin' | 'isInvalid'>;\ntype FieldLabelVariant = 'field' | 'group';\ninterface FieldMessageProps {\n /**\n * Whether to count the characters the control holds at the end of the\n * line, against `maxLength` where there is one. The count is read off the\n * field's own input or text area context, and written in the locale's\n * digits and grouping.\n * @default false\n */\n characterCount?: boolean;\n /**\n * How the limit is said to a screen reader, where there is a `maxLength`.\n * It is read with the field on focus rather than as the value changes, so\n * it names the limit and not what is left of it. Left out, it is the\n * sentence for it in the I18nProvider's locale — \"Up to 20 characters\" in\n * English, singular for a limit of one.\n */\n characterLimitLabel?: string | undefined;\n /**\n * A hint shown under the field. Replaced by `error` when there is one, so\n * the two never stack.\n */\n description?: string | undefined;\n /** The problem with the current value, in words. */\n error?: string | undefined;\n /**\n * The id the error takes, for a field that points `aria-describedby` at it\n * itself because its React Aria component generates no error id of its\n * own. Used only where the message is written out rather than slotted.\n */\n errorId?: string | undefined;\n /**\n * Whether the line is indented to a box's inline padding, so it starts\n * where a value above it does. Off for a field with no box to line up with.\n * @default true\n */\n inset?: boolean;\n /** The limit the count is shown against. */\n maxLength?: number | undefined;\n /**\n * Whether an empty line is kept inside a `Form`, where a message can\n * arrive after the fact. Off for a field no message can reach — a\n * checkbox in a group, whose group owns the one line — which would\n * otherwise keep a line nothing will ever fill.\n * @default true\n */\n reserve?: boolean;\n}\ntype FieldTextAreaProps = TextAreaProps & {\n /**\n * Whether the control grows with the text it holds, from the rows it asks\n * for. Off, it keeps its rows and scrolls.\n * @default false\n */\n autosize?: boolean;\n};\ntype FieldTriggerProps = ButtonProps;\ntype FieldValueProps = HTMLAttributes<HTMLElement> & {\n /**\n * Whether the field has focus. A hidden placeholder appears while it does,\n * the way an input's does.\n * @default false\n */\n isFocused?: boolean;\n /**\n * Whether nothing has been chosen yet, so what is drawn is the placeholder\n * rather than a value.\n * @default false\n */\n isPlaceholder?: boolean;\n};\ntype FieldVariant = 'filled' | 'outlined';\n\n// A control under a floating label carries a placeholder so the box can\n// tell when it is populated, shown only while focused. The default is what\n// a control rendered outside any box gets — a search bar's, which has no\n// label over it and shows its placeholder in every state. The four a box\n// provides are hoisted so each is one stable object.\nconst OUTSIDE_BOX: BoxControl = {\n label: 'none',\n underLabel: false\n};\nconst BOX_CONTROLS = {\n filled: {\n fixed: {\n label: 'fixed',\n underLabel: true\n },\n floating: {\n label: 'floating',\n underLabel: true\n }\n },\n outlined: {\n fixed: {\n label: 'fixed',\n underLabel: false\n },\n floating: {\n label: 'floating',\n underLabel: false\n }\n }\n} satisfies Record<FieldVariant, Record<'fixed' | 'floating', BoxControl>>;\nconst BoxContext = createContext<BoxControl>(OUTSIDE_BOX);\n\n// Written as calls rather than function literals at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// each result on its inputs.\nfunction boxContent(label: string, children: ReactNode, endInset: string, floatingLabel: boolean, isFocused: boolean, isPopulated: boolean | undefined, isRequired: boolean, leading: ReactNode, multiline: boolean, trailing: ReactNode, trigger: ReactNode, variant: FieldVariant) {\n return (state: GroupRenderProps) => <BoxContent endInset={endInset} floatingLabel={floatingLabel} isFocused={isFocused} isPopulated={isPopulated} isRequired={isRequired} label={label} leading={leading} multiline={multiline} state={state} trailing={trailing} trigger={trigger} variant={variant}>\n {children}\n </BoxContent>;\n}\n\n/**\n * What a box holds: its icons, its label and the control between them, plus\n * the outline when it has one. A component rather than the render function\n * itself, so it can read whether the control holds a value — which is what\n * the outlined box's notch and label follow, and what CSS cannot express\n * for them. See the outlined variant's note above.\n */\nfunction BoxContent({\n children,\n endInset,\n floatingLabel,\n isFocused,\n isPopulated,\n isRequired,\n label,\n leading,\n multiline,\n state,\n trailing,\n trigger,\n variant\n}: {\n children: ReactNode;\n endInset: string;\n floatingLabel: boolean;\n isFocused: boolean;\n isPopulated: boolean | undefined;\n isRequired: boolean;\n label: string;\n leading: ReactNode;\n multiline: boolean;\n state: GroupRenderProps;\n trailing: ReactNode;\n trigger: ReactNode;\n variant: FieldVariant;\n}) {\n const read = useFieldPopulated();\n const populated = isPopulated ?? read;\n const outlined = variant === 'outlined';\n const focused = state.isFocusWithin || isFocused;\n const floated = !floatingLabel || focused || populated;\n return <BoxContext value={BOX_CONTROLS[variant][floatingLabel ? 'floating' : 'fixed']}>\n {outlined ? <fieldset aria-hidden=\"true\" {...stylex.props(fieldChromeStyles.outline, leading !== undefined && fieldChromeStyles.outlineLeading, trailing !== undefined && fieldChromeStyles.outlineTrailing, focused && fieldChromeStyles.outlineFocused, endInset !== '0px' && fieldChromeStyles.outlineEndInset(`calc(${spacing.lg} - ${spacing.xs} + ${endInset})`))}>\n <legend {...stylex.props(fieldChromeStyles.outlineNotch, floated && fieldChromeStyles.outlineNotchOpen)}>\n {floated ? <>\n {label}\n {isRequired ? REQUIRED_MARK : null}\n </> : null}\n </legend>\n </fieldset> : null}\n {trigger}\n {leading === undefined ? null : <span {...stylex.props(fieldChromeStyles.icon, multiline && fieldChromeStyles.iconMultiline, outlined && fieldChromeStyles.iconOutlined, state.isDisabled && fieldChromeStyles.iconDisabled)}>\n {leading}\n </span>}\n <div {...stylex.props(fieldChromeStyles.column, floatingLabel && fieldChromeStyles.columnFloating, state.isDisabled && (floatingLabel ? fieldChromeStyles.columnDisabledFloating : fieldChromeStyles.columnDisabled))}>\n <FieldLabel isRequired={isRequired} state={withFocus(state, focused)} {...stylex.props(fieldChromeStyles.boxLabel, floatingLabel && floated && fieldChromeStyles.boxLabelFloated, outlined && fieldChromeStyles.boxLabelOutlined, outlined && floated && fieldChromeStyles.boxLabelOutlinedFloated, endInset !== '0px' && fieldChromeStyles.boxLabelEndInset(outlined ? `calc(100% + 2 * ${spacing.xs} - ${endInset})` : `calc(100% - ${endInset})`))}>\n {label}\n </FieldLabel>\n {children}\n </div>\n {trailing === undefined ? null : <span {...stylex.props(fieldChromeStyles.icon, multiline && fieldChromeStyles.iconMultiline, outlined && fieldChromeStyles.iconOutlined, state.isInvalid && fieldChromeStyles.iconError, state.isDisabled && fieldChromeStyles.iconDisabled)}>\n {trailing}\n </span>}\n </BoxContext>;\n}\nfunction boxStyles(floatingLabel: boolean, isFocused: boolean, multiline: boolean, leading: boolean, trailing: boolean, variant: FieldVariant) {\n const outlined = variant === 'outlined';\n return (state: GroupRenderProps) => stylex.props(fieldChromeStyles.box, floatingLabel ? fieldChromeStyles.boxFloating : fieldChromeStyles.boxFixed, multiline && fieldChromeStyles.boxMultiline, leading && fieldChromeStyles.boxLeading, trailing && fieldChromeStyles.boxTrailing, outlined && fieldChromeStyles.boxOutlined, outlined && floatingLabel && fieldChromeStyles.boxOutlinedFloating, outlined && multiline && fieldChromeStyles.boxOutlinedMultiline, state.isInvalid && (outlined ? fieldChromeStyles.boxOutlinedError : fieldChromeStyles.boxError), outlined && state.isHovered && (state.isInvalid ? fieldChromeStyles.boxOutlinedErrorHovered : fieldChromeStyles.boxOutlinedHovered), isFocused && focusedStyle(outlined, state.isInvalid), state.isDisabled && (outlined ? fieldChromeStyles.boxOutlinedDisabled : fieldChromeStyles.boxDisabled));\n}\n\n/**\n * The control's `onInput`, which also commits the field's validation while it\n * shows an error, so an edit that fixes the value clears the error as it is\n * typed rather than once focus leaves.\n *\n * React Aria commits a field's validation — the moment a server's error is\n * cleared, or the browser's own is checked again — on the control's native\n * `change` event, and a text control fires that only on blur. So a reader\n * typing the fix saw the error, red and `aria-invalid`, until they tabbed\n * away from a value that was already right. Re-dispatching `change` on input\n * is what commits early, through React Aria's own listener.\n *\n * Only while the field is invalid. A valid field still commits on blur, so\n * nothing new is flagged in the middle of typing a value: an error is shown\n * late and taken back early. React's `onChange` does not run a second time\n * for it, since the value it tracks has not moved since the input.\n */\nfunction commitWhileInvalid<E extends HTMLElement>(isInvalid: boolean, onInput: InputEventHandler<E> | undefined): InputEventHandler<E> {\n return event => {\n onInput?.(event);\n if (isInvalid) {\n event.currentTarget.dispatchEvent(new Event('change', {\n bubbles: true\n }));\n }\n };\n}\n\n/**\n * The box a control sits in, filled or outlined, with its label. React\n * Aria's `Group`, so\n * the field around it hands down `isDisabled` and `isInvalid` through context\n * and the box reports focus within it as render state, which is what the\n * label's colour follows. A field that provides no group context — one built\n * on a button rather than an input — passes the two states itself.\n */\nfunction FieldBox({\n children,\n endInset = '0px',\n floatingLabel = true,\n isFocused = false,\n isPopulated,\n isRequired = false,\n label,\n leading,\n multiline = false,\n trailing,\n trigger,\n variant = 'filled',\n ...props\n}: FieldBoxProps) {\n return <Group {...props}\n // A box with a press target of its own has it covering the box, so it\n // is only a box without one that answers a press itself.\n onPointerDown={trigger === undefined ? focusesControl(props.onPointerDown) : props.onPointerDown} {...mergeStatefulStyles(boxStyles(floatingLabel, isFocused, multiline, leading !== undefined, trailing !== undefined, variant), props)}>\n {boxContent(label, children, endInset, floatingLabel, isFocused, isPopulated, isRequired, leading, multiline, trailing, trigger, variant)}\n </Group>;\n}\n\n/**\n * A field's text control, in a {@link FieldBox} or on its own. React Aria's\n * `Input`, which takes its label association, value and validation from the\n * field around it and reports its disabled state as render state.\n *\n * In a box it clears the label at the top, and under a floating label it\n * always carries a placeholder, since that is what the box reads to tell a\n * populated control from an empty one: its own where it was given one, a\n * blank otherwise. Outside a box it has no label over it and shows the\n * placeholder it was given in every state.\n */\nfunction FieldInput({\n numeric = false,\n placeholder,\n prefix,\n suffix,\n ...props\n}: FieldInputProps & RefAttributes<HTMLInputElement>) {\n const box = useContext(BoxContext);\n const validation = useContext(FieldErrorContext);\n const control = <Input placeholder={placeholder ?? (box.label === 'floating' ? ' ' : undefined)} {...props} onInput={commitWhileInvalid(validation?.isInvalid ?? false, props.onInput)} {...mergeStatefulStyles((state: InputRenderProps) => stylex.props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, box.label === 'floating' && fieldChromeStyles.inputUnderFloatingLabel, numeric && fieldChromeStyles.numeric, state.isDisabled && fieldChromeStyles.inputDisabled), props)} />;\n if (prefix === undefined && suffix === undefined) {\n return control;\n }\n return <span {...stylex.props(fieldChromeStyles.affixLine)}>\n {prefix === undefined ? null : <span {...stylex.props(fieldChromeStyles.affix, box.underLabel && fieldChromeStyles.inputUnderLabel)}>\n {prefix}\n </span>}\n {control}\n {suffix === undefined ? null : <span {...stylex.props(fieldChromeStyles.affix, box.underLabel && fieldChromeStyles.inputUnderLabel)}>\n {suffix}\n </span>}\n </span>;\n}\n\n/**\n * A date or a time's segments, in a {@link FieldBox}: React Aria's\n * `DateInput`, or the group holding a range's two. This is what carries the\n * control's type and its place on the line, clearing the label at the top,\n * as {@link FieldValue} does for a value that was chosen.\n *\n * A typed value longer than its box behaves as an input's text does. It is\n * clipped rather than cut short, since every segment on the line is still a\n * place to type. The browser scrolls whichever segment has focus into view,\n * as it scrolls to an input's caret. And when focus leaves the segments the\n * line goes back to its start, as an input's text does on blur, so a value\n * at rest reads from its beginning rather than from wherever it was left.\n */\nfunction FieldSegments({\n children\n}: {\n children: ReactNode;\n}) {\n const box = useContext(BoxContext);\n return <span onBlur={returnToStart} {...stylex.props(fieldChromeStyles.input, fieldChromeStyles.segments, box.underLabel && fieldChromeStyles.inputUnderLabel)}>\n {children}\n </span>;\n}\n\n/**\n * A field's multi-line text control, in a {@link FieldBox} drawn `multiline`.\n * React Aria's `TextArea`, with the same label association, value and\n * validation {@link FieldInput} takes from the field around it, and the same\n * placeholder under a floating label.\n *\n * Given `autosize` it grows with its text from the rows it asks for. The\n * value it grows to fit is read off the field's context rather than\n * measured: the box holds a hidden replica of it in the control's own type,\n * in the same grid cell as the control, and the cell is as tall as whichever\n * of the two is taller.\n */\nfunction FieldTextArea({\n autosize = false,\n placeholder,\n ...props\n}: FieldTextAreaProps & RefAttributes<HTMLTextAreaElement>) {\n const box = useContext(BoxContext);\n const context = useSlottedContext(TextAreaContext);\n const validation = useContext(FieldErrorContext);\n const value = typeof context?.value === 'string' ? context.value : '';\n const control = <TextArea placeholder={placeholder ?? (box.label === 'floating' ? ' ' : undefined)} {...props} onInput={commitWhileInvalid(validation?.isInvalid ?? false, props.onInput)} {...mergeStatefulStyles((state: InputRenderProps) => stylex.props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, box.label === 'floating' && fieldChromeStyles.inputUnderFloatingLabel, fieldChromeStyles.textArea, autosize && fieldChromeStyles.textAreaAutosize, autosize && fieldChromeStyles.autosizeCell, state.isDisabled && fieldChromeStyles.inputDisabled), props)} />;\n if (!autosize) {\n return control;\n }\n\n // A trailing space keeps a final line break of the value as a line of the\n // replica, which is how the control renders it.\n return <div {...stylex.props(fieldChromeStyles.autosize)}>\n {control}\n <div aria-hidden=\"true\" {...stylex.props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, fieldChromeStyles.replica, fieldChromeStyles.autosizeCell)}>\n {value}{' '}\n </div>\n </div>;\n}\n\n/**\n * The press target over a {@link FieldBox} whose whole surface opens\n * something — a select's list, a picker's calendar. React Aria's `Button`,\n * which takes the trigger's props from the field around it through context.\n *\n * It covers the box rather than sitting on its value's line, so the box's\n * own padding opens the field too. It draws nothing: the box already carries\n * the fill, the underline and the focus indicator, and it lights up while\n * this has focus because the indicator follows focus within.\n */\nfunction FieldTrigger(props: FieldTriggerProps) {\n return <RACButton {...props} {...mergeStatefulStyles(stylex.props(fieldChromeStyles.trigger), props)} />;\n}\n\n/**\n * A field's value where it was chosen rather than typed, in a\n * {@link FieldBox}. Put React Aria's own element inside it — a select's\n * `SelectValue` — and this is what carries the input's type and its place on\n * the line, clearing the label at the top and truncating rather than\n * wrapping. A date or a time is typed, segment by segment, and takes\n * {@link FieldSegments} instead.\n *\n * The wrapper is the styled one rather than React Aria's element, because\n * this is the box's flex item: styling the element inside instead left it\n * sizing itself against a parent that had already shrink-wrapped to it.\n *\n * `isPlaceholder` says nothing has been chosen, which takes the muted role;\n * under a floating label it is hidden until the field is focused, exactly as\n * an input's placeholder is.\n */\nfunction FieldValue({\n isFocused = false,\n isPlaceholder = false,\n ...props\n}: FieldValueProps) {\n const box = useContext(BoxContext);\n const hidden = isPlaceholder && box.label === 'floating' && !isFocused;\n return <span {...props} {...mergeStyles(stylex.props(fieldChromeStyles.input, fieldChromeStyles.value, box.underLabel && fieldChromeStyles.inputUnderLabel, isPlaceholder && fieldChromeStyles.valuePlaceholder, hidden && fieldChromeStyles.valuePlaceholderHidden), props)} />;\n}\n\n// What `:focus-within` draws on the box, for a box told it is focused — see\n// `isFocused`. The error's own colour wins over primary, as it does there.\nfunction focusedStyle(outlined: boolean, invalid: boolean) {\n if (outlined) {\n return invalid ? fieldChromeStyles.boxOutlinedErrorFocused : fieldChromeStyles.boxOutlinedFocused;\n }\n return invalid ? fieldChromeStyles.boxErrorFocused : fieldChromeStyles.boxFocused;\n}\n\n// Back to the start of the line once focus has left every segment on it —\n// not while it moves from one segment to the next. The start is 0 in either\n// writing direction: a right-to-left line scrolls towards negative values.\nfunction returnToStart(event: FocusEvent<HTMLElement>) {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n event.currentTarget.scrollLeft = 0;\n }\n}\nfunction useFieldPopulated() {\n const input = useSlottedContext(InputContext);\n const textArea = useSlottedContext(TextAreaContext);\n // A field whose value is chosen rather than typed holds no input at all,\n // so being populated is a question for its own state — without this a\n // select's floating label never floats, however much is chosen.\n const select = useContext(SelectStateContext);\n if (select !== null) {\n return select.selectionManager.selectedKeys.size > 0;\n }\n const value = input?.value ?? textArea?.value ?? '';\n return String(value).length > 0;\n}\n\n// The box's render state with focus as the box draws it, for its label,\n// whose colour follows focus. Built by a call rather than written at the\n// prop, which is what react-perf's no-new-object-as-prop is after.\nfunction withFocus(state: GroupRenderProps, focused: boolean) {\n return focused === state.isFocusWithin ? state : {\n ...state,\n isFocusWithin: focused\n };\n}\n\n/**\n * Whether the control in this box is holding anything, read off React\n * Aria's context for whichever control the field renders. The filled box\n * reads the same thing in CSS through `:placeholder-shown`; this is for\n * what CSS cannot express — see the outlined variant's note above.\n */\n/**\n * A field's label: the colour alone, positioned and given its type by whatever\n * renders it. React Aria's `Label`, which the field around it associates with\n * its control through context.\n */\n// Hoisted rather than written as the parameter's default, which would be a\n// new object on every render.\nconst NO_STATE: Partial<FieldLabelState> = {};\n\n// The asterisk after a required field's label, which is how the text fields\n// page marks one, and Material Design's own web text field draws it unless\n// told not to. Hidden from assistive technology: the control already says it\n// is required, and read out as well the label would end in \"star\". It is in\n// the label rather than beside it, so it floats and takes the label's colour\n// with it — the error role once the field is invalid.\nconst REQUIRED_MARK = <span aria-hidden=\"true\">*</span>;\nfunction FieldLabel({\n children,\n isRequired = false,\n state = NO_STATE,\n variant = 'field',\n ...props\n}: FieldLabelProps) {\n const {\n isDisabled = false,\n isFocusWithin = false,\n isInvalid = false\n } = state;\n return <Label {...props} {...mergeStyles(stylex.props(fieldChromeStyles.label, variant === 'group' && groupStyles.label, isDisabled && fieldChromeStyles.labelDisabled, isInvalid && fieldChromeStyles.labelError, !isDisabled && !isInvalid && isFocusWithin && fieldChromeStyles.labelFocused), props)}>\n {children}\n {isRequired ? REQUIRED_MARK : null}\n </Label>;\n}\n\n/**\n * The line under a field: the error while there is one, the description\n * otherwise. The error goes through React Aria's `FieldError`, which renders\n * only while the field is invalid and falls back to whatever validation\n * errors the field carries when no message is given — which is how a `Form`\n * with server-side errors, or the browser's own, reaches it without any\n * field changing. The description steps aside for those too, which is what\n * the field's validation state is read for.\n */\nfunction FieldMessage({\n characterCount = false,\n characterLimitLabel,\n description,\n error,\n errorId,\n inset = true,\n maxLength,\n reserve = true\n}: FieldMessageProps) {\n const validation = useContext(FieldErrorContext);\n const invalid = error !== undefined || (validation?.isInvalid ?? false);\n const {\n locale\n } = useLocale();\n const messages = useMessages();\n const input = useSlottedContext(InputContext);\n const textArea = useSlottedContext(TextAreaContext);\n const insideForm = useInsideForm();\n // Read directly rather than through `useSlottedContext`, which throws for\n // a missing slot exactly as `Text` does — the throw is the thing being\n // avoided. What it is for is below, at `written`.\n const text = useContext(TextContext);\n\n // The limit, in words, for the description React Aria reads out with the\n // field. `maxLength` alone reaches the control as the native attribute,\n // which is not reliably announced, and the count beside the message is\n // hidden — so without this a reader is never told there is a limit.\n const limit = maxLength === undefined ? undefined : characterLimitLabel ?? messages.characterLimit(maxLength);\n const hidden = limit === undefined ? null : <VisuallyHidden elementType=\"span\">\n <Text slot=\"description\">{limit}</Text>\n </VisuallyHidden>;\n\n // Nothing to say: the field ends at its control. Inside a form the line is\n // drawn anyway, empty, since a form is where a message appears after the\n // fact — a server's answer, or the browser's own on submit — and every\n // field below this one would otherwise move by the line's height when it\n // does.\n //\n // Outside one the line is still there, collapsed out of the flow so the\n // field is no taller for it, because it holds the live region below: a\n // region has to be in the document before the error it announces arrives,\n // and one mounted with its text already in it is not read out. A limit to\n // announce rides in it the same way, rather than drawing the line for\n // something nobody can see.\n const collapsed = !invalid && description === undefined && !characterCount && !(insideForm && reserve);\n const value = input?.value ?? textArea?.value ?? '';\n const length = String(value).length;\n const hint = invalid ? undefined : description;\n\n // One slotted description, never two. React Aria hands every element in\n // its description slot the same generated id, so a second one puts a\n // duplicate id in the document and axe fails the story. The limit rides\n // inside the hint where there is one, and carries the whole slot where\n // there is not — hidden either way, since the count already draws it.\n //\n // Hidden by clipping rather than by leaving it out of the row, and the\n // difference is a gap: the row is a flex line with 16dp between its parts,\n // and an element with no width is still a part. Clipping takes it out of\n // flow, so a field with a limit and no hint has the line it had before.\n const described = hint === undefined ? hidden : <Text slot=\"description\" {...stylex.props(fieldChromeStyles.message)}>\n {hint}\n {limit === undefined ? null :\n // The space is load-bearing: a description is read as the text\n // content of one element, and two spans run together without it.\n <VisuallyHidden elementType=\"span\">{` ${limit}`}</VisuallyHidden>}\n </Text>;\n\n // Outside a field that validates there is nothing to hand React Aria's\n // `FieldError`, and it draws nothing without it — a group of chips is a\n // group rather than a form control, so the error it was given is written\n // out instead.\n //\n // Through the group's error slot where there is one, which is what makes\n // the message reach a screen reader at all: React Aria generates the id\n // its `aria-describedby` points at up front, then keeps it only while\n // something in the document carries it, so an element outside the slot is\n // drawn and never announced. The description beside it has always gone\n // through its own slot, which is why that half worked.\n //\n // Not every group has one. `TagGroup` wires up a description and an error;\n // `TokenField` wires up a description alone and generates no error id at\n // all, so the field names the message itself with `errorId` and points its\n // editable area at it — see TokenField.\n const errorSlot = text !== null && typeof text === 'object' && 'slots' in text && text.slots?.errorMessage !== undefined;\n const messageStyles = stylex.props(fieldChromeStyles.message, fieldChromeStyles.messageError);\n const written = errorSlot ? <Text slot=\"errorMessage\" {...messageStyles}>\n {error}\n </Text> : <span id={errorId} {...messageStyles}>\n {error}\n </span>;\n return <div {...stylex.props(fieldChromeStyles.message, fieldChromeStyles.messageLine, inset && fieldChromeStyles.messageInset, collapsed && fieldChromeStyles.messageLineCollapsed)}>\n {/*\n * The error, read out politely as it appears, since the move into\n * `aria-describedby` that associates it is not: a screen reader does\n * not re-read a description that changes under a control it is on,\n * and after a submit, focus is on the submit button rather than the\n * field. Typing-time, blur-time and a server's errors all arrive this\n * way.\n *\n * The error alone rather than the whole line, so the description\n * coming back once the error clears is not read out, and neither is\n * the limit beside it. Atomic, so a changed message is read whole.\n */}\n <span aria-atomic=\"true\" aria-live=\"polite\" {...stylex.props(fieldChromeStyles.messageRegion)}>\n {validation === null && error !== undefined ? written : <FieldError {...stylex.props(fieldChromeStyles.message, fieldChromeStyles.messageError)}>\n {error}\n </FieldError>}\n </span>\n {described}\n {characterCount ?\n // Hidden from the tree, and the limit above is why. A count is the\n // one piece of supporting text that changes on every keystroke, and\n // a screen reader reading it back at that rate is worse than not\n // hearing it — the limit said once on focus is what a reader needs,\n // and this is the same fact drawn for whoever is looking.\n <span aria-hidden=\"true\" {...stylex.props(fieldChromeStyles.message, fieldChromeStyles.counter, invalid && fieldChromeStyles.messageError)}>\n {countIn(locale, length, maxLength)}\n </span> : null}\n </div>;\n}\n\n/**\n * The same asterisk for a label that is not a field's own — a checkbox's, a\n * switch's — so every required control is marked by one element.\n */\nfunction RequiredMark() {\n return REQUIRED_MARK;\n}\n\n// The count in the reader's digits and grouping, as React Aria writes a\n// number field's value and a meter's percentage beside it — Arabic-Indic\n// under ar-EG, `1 200` under fr-FR, and `1,200` in English. One formatter per\n// locale, for the reason Currency keeps its own: building one is about ten\n// times dearer than reusing it, and the count changes on every keystroke.\nconst counterFormatters = new Map<string, Intl.NumberFormat>();\nfunction countIn(locale: string, length: number, maxLength: number | undefined) {\n let formatter = counterFormatters.get(locale);\n if (formatter === undefined) {\n formatter = new Intl.NumberFormat(locale);\n counterFormatters.set(locale, formatter);\n }\n return maxLength === undefined ? formatter.format(length) : `${formatter.format(length)}/${formatter.format(maxLength)}`;\n}\nexport type { FieldBoxProps, FieldInputProps, FieldLabelProps, FieldLabelState, FieldLabelVariant, FieldMessageProps, FieldTextAreaProps, FieldVariant };\nexport { FieldBox, FieldInput, FieldLabel, FieldMessage, FieldSegments, FieldTextArea, FieldTrigger, FieldValue, RequiredMark };"],"mappings":";;;;;;;;;;;;AAkPA,MAAMqF,cAA0B;CAC9B5C,OAAO;CACPE,YAAY;AACd;AACA,MAAM2C,eAAe;CACnBC,QAAQ;EACNC,OAAO;GACL/C,OAAO;GACPE,YAAY;EACd;EACA8C,UAAU;GACRhD,OAAO;GACPE,YAAY;EACd;CACF;CACA+C,UAAU;EACRF,OAAO;GACL/C,OAAO;GACPE,YAAY;EACd;EACA8C,UAAU;GACRhD,OAAO;GACPE,YAAY;EACd;CACF;AACF;AACA,MAAMiD,aAAa9E,cAA0BuE,WAAW;AAKxD,SAASQ,WAAWpD,OAAeK,UAAqBC,UAAkBC,eAAwBC,WAAoBC,aAAkCC,YAAqBC,SAAoBC,WAAoBG,UAAqBC,SAAoBC,SAAuB;CACnR,QAAQO,UAA4B,oBAAC,YAAD;EAAsBlB;EAAyBC;EAA0BC;EAAwBC;EAAyBC;EAAmBV;EAAgBW;EAAoBC;EAAkBY;EAAiBT;EAAmBC;EAAkBC;EACxRZ;CACS,CAAA;AAChB;;;;;;;;AASA,SAAAgD,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAoB,MAAA,EAAAnD,UAAAC,UAAAC,eAAAC,WAAAC,aAAAC,YAAAV,OAAAW,SAAAC,WAAAY,OAAAT,UAAAC,SAAAC,YAA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,IAAIC,IAA+B;AAC7D,SAASH,QAAQrB,QAAgBP,QAAgB5I,WAA+B;CAC9E,IAAI8K,YAAYJ,kBAAkBK,IAAI5B,MAAM;CAC5C,IAAI2B,cAAc/I,KAAAA,GAAW;EAC3B+I,YAAY,IAAIF,KAAKC,aAAa1B,MAAM;EACxCuB,kBAAkBM,IAAI7B,QAAQ2B,SAAS;CACzC;CACA,OAAO9K,cAAc+B,KAAAA,IAAY+I,UAAUG,OAAOrC,MAAM,IAAI,GAAGkC,UAAUG,OAAOrC,MAAM,EAAC,GAAIkC,UAAUG,OAAOjL,SAAS;AACvH"}
1
+ {"version":3,"file":"index.js","names":["FocusEvent","HTMLAttributes","InputEventHandler","ReactNode","Ref","RefAttributes","ButtonProps","GroupProps","GroupRenderProps","InputProps","InputRenderProps","LabelProps","TextAreaProps","stylex","createContext","useContext","useId","FieldError","FieldErrorContext","Group","Input","InputContext","Label","Button","RACButton","SelectStateContext","Text","TextArea","TextAreaContext","TextContext","useLocale","useSlottedContext","VisuallyHidden","useMessages","mergeStatefulStyles","mergeStyles","spacing","focusesControl","useInsideForm","fieldChromeStyles","groupStyles","BoxControl","label","BoxLabel","underLabel","FieldBoxProps","Omit","children","endInset","floatingLabel","isFocused","isPopulated","isRequired","leading","multiline","ref","HTMLDivElement","trailing","trigger","variant","FieldVariant","FieldInputProps","numeric","prefix","suffix","FieldLabelProps","state","Partial","FieldLabelState","FieldLabelVariant","Pick","FieldMessageProps","characterCount","characterLimitLabel","description","error","errorId","inset","maxLength","reserve","FieldTextAreaProps","autosize","FieldTriggerProps","FieldValueProps","HTMLElement","isPlaceholder","OUTSIDE_BOX","BOX_CONTROLS","filled","fixed","floating","outlined","Record","BoxContext","boxContent","BoxContent","t0","$","_c","read","useFieldPopulated","populated","focused","isFocusWithin","floated","t1","t2","props","outline","undefined","outlineLeading","outlineTrailing","outlineFocused","outlineEndInset","lg","xs","outlineNotch","outlineNotchOpen","REQUIRED_MARK","t3","isDisabled","icon","iconMultiline","iconOutlined","iconDisabled","t4","column","columnFloating","columnDisabledFloating","columnDisabled","t5","withFocus","t6","boxLabel","boxLabelFloated","boxLabelOutlined","boxLabelOutlinedFloated","boxLabelEndInset","t7","t8","t9","isInvalid","iconError","t10","boxStyles","box","boxFloating","boxFixed","boxMultiline","boxLeading","boxTrailing","boxOutlined","boxOutlinedFloating","boxOutlinedMultiline","boxOutlinedError","boxError","isHovered","boxOutlinedErrorHovered","boxOutlinedHovered","focusedStyle","boxOutlinedDisabled","boxDisabled","commitWhileInvalid","onInput","E","event","currentTarget","dispatchEvent","Event","bubbles","FieldBox","T0","t11","t12","t13","t14","t15","onPointerDown","FieldInput","placeholder","validation","prefixId","suffixId","field","describedBy","idsOf","input","inputUnderLabel","inputUnderFloatingLabel","inputDisabled","control","Symbol","for","affixLine","affix","FieldSegments","segments","returnToStart","FieldTextArea","context","value","textArea","textAreaAutosize","autosizeCell","replica","FieldTrigger","FieldValue","hidden","valuePlaceholder","valuePlaceholderHidden","invalid","boxOutlinedErrorFocused","boxOutlinedFocused","boxErrorFocused","boxFocused","lists","ids","Set","flatMap","list","split","delete","size","join","contains","relatedTarget","scrollLeft","select","selectionManager","selectedKeys","String","length","NO_STATE","FieldLabel","labelDisabled","labelError","labelFocused","FieldMessage","locale","messages","insideForm","text","characterLimit","limit","collapsed","hint","message","described","errorSlot","slots","errorMessage","messageError","messageStyles","written","messageLine","messageInset","messageLineCollapsed","messageRegion","counter","countIn","RequiredMark","counterFormatters","Map","Intl","NumberFormat","formatter","get","set","format","_c","stylex.props","props","RACButton"],"sources":["../../src/field/index.tsx"],"sourcesContent":["import type { FocusEvent, HTMLAttributes, InputEventHandler, ReactNode, Ref, RefAttributes } from 'react';\nimport type { ButtonProps, GroupProps, GroupRenderProps, InputProps, InputRenderProps, LabelProps, TextAreaProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useContext, useId } from 'react';\nimport { FieldError, FieldErrorContext, Group, Input, InputContext, Label, Button as RACButton, SelectStateContext, Text, TextArea, TextAreaContext, TextContext, useLocale, useSlottedContext, VisuallyHidden } from 'react-aria-components';\nimport { useMessages } from '../i18n';\nimport { mergeStatefulStyles, mergeStyles } from '../styles/merge';\nimport { spacing } from '../tokens/design.tokens.stylex';\nimport { focusesControl } from './press';\nimport { useInsideForm } from './root';\nimport { fieldChromeStyles, groupStyles } from './styles';\n\n// The chrome every field shares: the filled box with its label at the top, the\n// control inside it, and the line of supporting text under it. TextField drew\n// all of it on its own until the coverage plan brought a dozen more fields,\n// each of which would otherwise have written the same box a second time.\n//\n// Not a component of the library's own and not exported. Each field is still\n// React Aria's field component — TextField, NumberField, DateField — and these\n// are the parts it renders inside, which is what keeps the label association,\n// the description and error wiring, and validation on React Aria's side.\n//\n// Neither the notch nor the label can select on the state that drives them.\n// Both are children of the box and the state is the box's, and the filled\n// label reads it in CSS only because it changes type alone, which the box\n// hands down inherited — where the notch changes what it holds and the\n// label changes where it sits, and neither of those inherits. So the box's\n// content computes that state in React instead: focus from the box's own\n// render state, and a value from the control's context, which is where the\n// character counter reads it too. The border's colour is the box's,\n// inherited, which is what carries the hover, focus, error and disabled\n// roles to it.\n\n// What a control needs to know about the box around it: how the label is\n// drawn, and whether the control clears it with a margin — it does under\n// the filled box's label, and not under the outlined box's, whose label\n// sits on the outline rather than over the value.\ninterface BoxControl {\n label: BoxLabel;\n underLabel: boolean;\n}\n\n// How the box draws its label, for the control inside it — see the context\n// below.\ntype BoxLabel = 'fixed' | 'floating' | 'none';\ntype FieldBoxProps = Omit<GroupProps, 'children'> & {\n children?: ReactNode;\n /**\n * How much of the inline end of the column the control's own parts take,\n * beside the control, as a CSS length: a number field's steppers. The\n * label, and the outlined box's notch with it, stop that far short of the\n * column's end, so a long label is cut short beside them rather than\n * drawn under them. A part in `trailing` needs none of this, since it sits\n * outside the column.\n * @default '0px'\n */\n endInset?: string;\n /**\n * Whether the label sits in the empty box and floats to the top once the\n * field is focused or holds a value, as the text fields page draws it.\n * `false` keeps it small at the top in every state.\n * @default true\n */\n floatingLabel?: boolean;\n /**\n * Whether the field holds focus somewhere the box cannot see, so the box\n * draws its focused state — the floated label, the focused indicator and\n * the label's colour — without focus inside it. A select's open list is\n * the case: opening it moves focus into the list, on an overlay outside\n * the box, and left to `:focus-within` the label fell back onto the\n * placeholder the select still showed.\n * @default false\n */\n isFocused?: boolean;\n /**\n * Whether the control is holding anything, for a field whose control the\n * chrome cannot ask. It reads an input, a text area and a select's own\n * state; a control that is none of those — a token field's editable area,\n * say — says so here, and the floating label floats on it.\n */\n isPopulated?: boolean;\n /**\n * Whether the field must be filled, which marks its label with an\n * asterisk. The field passes its own `isRequired` on, since the group the\n * box is reports none.\n * @default false\n */\n isRequired?: boolean;\n /** What the field is for. */\n label: string;\n /** An icon at the start of the box, before the label and the control. */\n leading?: ReactNode;\n /**\n * Whether the box takes its height from the control inside it rather\n * than the page's 56dp, for a text area.\n * @default false\n */\n multiline?: boolean;\n /**\n * The box's own element. A field whose box is what something else is\n * anchored to needs it — a select's list is positioned against the box and\n * takes its width from it, which is what makes the two the same width.\n */\n ref?: Ref<HTMLDivElement>;\n /** An icon at the end of the box, after the control. */\n trailing?: ReactNode;\n /**\n * A press target covering the whole box, for a field whose box opens\n * something rather than taking a keystroke — {@link FieldTrigger}. Drawn\n * in the box itself rather than in the column the label and the control\n * share, so the padding and the icons open it too.\n */\n trigger?: ReactNode;\n /**\n * The filled box, or the outlined one: no fill, an outline that thickens\n * and takes the primary role while focused, and the label cutting it once\n * it floats.\n * @default 'filled'\n */\n variant?: FieldVariant;\n};\n\n// `prefix` is also an HTML attribute — the RDFa one, which nothing here\n// wants — and React's element types carry it as a string, so it is left out\n// of the props taken from React Aria to make room for the affix.\ntype FieldInputProps = Omit<InputProps, 'prefix'> & {\n /**\n * Renders the value in the mono face with tabular figures, for amounts and\n * other numbers meant to be compared down a column.\n * @default false\n */\n numeric?: boolean;\n /**\n * Text before the value on its line, shown while the field is focused or\n * holds a value.\n */\n prefix?: ReactNode;\n /**\n * Text after the value on its line, shown while the field is focused or\n * holds a value.\n */\n suffix?: ReactNode;\n};\ntype FieldLabelProps = LabelProps & {\n /**\n * Whether the field must be filled, which ends the label in an asterisk in\n * the label's own colour.\n * @default false\n */\n isRequired?: boolean;\n /**\n * The states the colour follows. Disabled wins over error, and error over\n * focus, so a focused invalid field keeps its error colour.\n */\n state?: Partial<FieldLabelState>;\n /**\n * Where the label sits. `field` is inside a box, positioned and typed by\n * whatever renders it. `group` is above a group of controls, which has no\n * box to float a label in, so this one carries its type itself.\n * @default 'field'\n */\n variant?: FieldLabelVariant;\n};\ntype FieldLabelState = Pick<GroupRenderProps, 'isDisabled' | 'isFocusWithin' | 'isInvalid'>;\ntype FieldLabelVariant = 'field' | 'group';\ninterface FieldMessageProps {\n /**\n * Whether to count the characters the control holds at the end of the\n * line, against `maxLength` where there is one. The count is read off the\n * field's own input or text area context, and written in the locale's\n * digits and grouping.\n * @default false\n */\n characterCount?: boolean;\n /**\n * How the limit is said to a screen reader, where there is a `maxLength`.\n * It is read with the field on focus rather than as the value changes, so\n * it names the limit and not what is left of it. Left out, it is the\n * sentence for it in the I18nProvider's locale — \"Up to 20 characters\" in\n * English, singular for a limit of one.\n */\n characterLimitLabel?: string | undefined;\n /**\n * A hint shown under the field. Replaced by `error` when there is one, so\n * the two never stack.\n */\n description?: string | undefined;\n /** The problem with the current value, in words. */\n error?: string | undefined;\n /**\n * The id the error takes, for a field that points `aria-describedby` at it\n * itself because its React Aria component generates no error id of its\n * own. Used only where the message is written out rather than slotted.\n */\n errorId?: string | undefined;\n /**\n * Whether the line is indented to a box's inline padding, so it starts\n * where a value above it does. Off for a field with no box to line up with.\n * @default true\n */\n inset?: boolean;\n /** The limit the count is shown against. */\n maxLength?: number | undefined;\n /**\n * Whether an empty line is kept inside a `Form`, where a message can\n * arrive after the fact. Off for a field no message can reach — a\n * checkbox in a group, whose group owns the one line — which would\n * otherwise keep a line nothing will ever fill.\n * @default true\n */\n reserve?: boolean;\n}\ntype FieldTextAreaProps = TextAreaProps & {\n /**\n * Whether the control grows with the text it holds, from the rows it asks\n * for. Off, it keeps its rows and scrolls.\n * @default false\n */\n autosize?: boolean;\n};\ntype FieldTriggerProps = ButtonProps;\ntype FieldValueProps = HTMLAttributes<HTMLElement> & {\n /**\n * Whether the field has focus. A hidden placeholder appears while it does,\n * the way an input's does.\n * @default false\n */\n isFocused?: boolean;\n /**\n * Whether nothing has been chosen yet, so what is drawn is the placeholder\n * rather than a value.\n * @default false\n */\n isPlaceholder?: boolean;\n};\ntype FieldVariant = 'filled' | 'outlined';\n\n// A control under a floating label carries a placeholder so the box can\n// tell when it is populated, shown only while focused. The default is what\n// a control rendered outside any box gets — a search bar's, which has no\n// label over it and shows its placeholder in every state. The four a box\n// provides are hoisted so each is one stable object.\nconst OUTSIDE_BOX: BoxControl = {\n label: 'none',\n underLabel: false\n};\nconst BOX_CONTROLS = {\n filled: {\n fixed: {\n label: 'fixed',\n underLabel: true\n },\n floating: {\n label: 'floating',\n underLabel: true\n }\n },\n outlined: {\n fixed: {\n label: 'fixed',\n underLabel: false\n },\n floating: {\n label: 'floating',\n underLabel: false\n }\n }\n} satisfies Record<FieldVariant, Record<'fixed' | 'floating', BoxControl>>;\nconst BoxContext = createContext<BoxControl>(OUTSIDE_BOX);\n\n// Written as calls rather than function literals at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// each result on its inputs.\nfunction boxContent(label: string, children: ReactNode, endInset: string, floatingLabel: boolean, isFocused: boolean, isPopulated: boolean | undefined, isRequired: boolean, leading: ReactNode, multiline: boolean, trailing: ReactNode, trigger: ReactNode, variant: FieldVariant) {\n return (state: GroupRenderProps) => <BoxContent endInset={endInset} floatingLabel={floatingLabel} isFocused={isFocused} isPopulated={isPopulated} isRequired={isRequired} label={label} leading={leading} multiline={multiline} state={state} trailing={trailing} trigger={trigger} variant={variant}>\n {children}\n </BoxContent>;\n}\n\n/**\n * What a box holds: its icons, its label and the control between them, plus\n * the outline when it has one. A component rather than the render function\n * itself, so it can read whether the control holds a value — which is what\n * the outlined box's notch and label follow, and what CSS cannot express\n * for them. See the outlined variant's note above.\n */\nfunction BoxContent({\n children,\n endInset,\n floatingLabel,\n isFocused,\n isPopulated,\n isRequired,\n label,\n leading,\n multiline,\n state,\n trailing,\n trigger,\n variant\n}: {\n children: ReactNode;\n endInset: string;\n floatingLabel: boolean;\n isFocused: boolean;\n isPopulated: boolean | undefined;\n isRequired: boolean;\n label: string;\n leading: ReactNode;\n multiline: boolean;\n state: GroupRenderProps;\n trailing: ReactNode;\n trigger: ReactNode;\n variant: FieldVariant;\n}) {\n const read = useFieldPopulated();\n const populated = isPopulated ?? read;\n const outlined = variant === 'outlined';\n const focused = state.isFocusWithin || isFocused;\n const floated = !floatingLabel || focused || populated;\n return <BoxContext value={BOX_CONTROLS[variant][floatingLabel ? 'floating' : 'fixed']}>\n {outlined ? <fieldset aria-hidden=\"true\" {...stylex.props(fieldChromeStyles.outline, leading !== undefined && fieldChromeStyles.outlineLeading, trailing !== undefined && fieldChromeStyles.outlineTrailing, focused && fieldChromeStyles.outlineFocused, endInset !== '0px' && fieldChromeStyles.outlineEndInset(`calc(${spacing.lg} - ${spacing.xs} + ${endInset})`))}>\n <legend {...stylex.props(fieldChromeStyles.outlineNotch, floated && fieldChromeStyles.outlineNotchOpen)}>\n {floated ? <>\n {label}\n {isRequired ? REQUIRED_MARK : null}\n </> : null}\n </legend>\n </fieldset> : null}\n {trigger}\n {leading === undefined ? null : <span {...stylex.props(fieldChromeStyles.icon, multiline && fieldChromeStyles.iconMultiline, outlined && fieldChromeStyles.iconOutlined, state.isDisabled && fieldChromeStyles.iconDisabled)}>\n {leading}\n </span>}\n <div {...stylex.props(fieldChromeStyles.column, floatingLabel && fieldChromeStyles.columnFloating, state.isDisabled && (floatingLabel ? fieldChromeStyles.columnDisabledFloating : fieldChromeStyles.columnDisabled))}>\n <FieldLabel isRequired={isRequired} state={withFocus(state, focused)} {...stylex.props(fieldChromeStyles.boxLabel, floatingLabel && floated && fieldChromeStyles.boxLabelFloated, outlined && fieldChromeStyles.boxLabelOutlined, outlined && floated && fieldChromeStyles.boxLabelOutlinedFloated, endInset !== '0px' && fieldChromeStyles.boxLabelEndInset(outlined ? `calc(100% + 2 * ${spacing.xs} - ${endInset})` : `calc(100% - ${endInset})`))}>\n {label}\n </FieldLabel>\n {children}\n </div>\n {trailing === undefined ? null : <span {...stylex.props(fieldChromeStyles.icon, multiline && fieldChromeStyles.iconMultiline, outlined && fieldChromeStyles.iconOutlined, state.isInvalid && fieldChromeStyles.iconError, state.isDisabled && fieldChromeStyles.iconDisabled)}>\n {trailing}\n </span>}\n </BoxContext>;\n}\nfunction boxStyles(floatingLabel: boolean, isFocused: boolean, multiline: boolean, leading: boolean, trailing: boolean, variant: FieldVariant) {\n const outlined = variant === 'outlined';\n return (state: GroupRenderProps) => stylex.props(fieldChromeStyles.box, floatingLabel ? fieldChromeStyles.boxFloating : fieldChromeStyles.boxFixed, multiline && fieldChromeStyles.boxMultiline, leading && fieldChromeStyles.boxLeading, trailing && fieldChromeStyles.boxTrailing, outlined && fieldChromeStyles.boxOutlined, outlined && floatingLabel && fieldChromeStyles.boxOutlinedFloating, outlined && multiline && fieldChromeStyles.boxOutlinedMultiline, state.isInvalid && (outlined ? fieldChromeStyles.boxOutlinedError : fieldChromeStyles.boxError), outlined && state.isHovered && (state.isInvalid ? fieldChromeStyles.boxOutlinedErrorHovered : fieldChromeStyles.boxOutlinedHovered), isFocused && focusedStyle(outlined, state.isInvalid), state.isDisabled && (outlined ? fieldChromeStyles.boxOutlinedDisabled : fieldChromeStyles.boxDisabled));\n}\n\n/**\n * The control's `onInput`, which also commits the field's validation while it\n * shows an error, so an edit that fixes the value clears the error as it is\n * typed rather than once focus leaves.\n *\n * React Aria commits a field's validation — the moment a server's error is\n * cleared, or the browser's own is checked again — on the control's native\n * `change` event, and a text control fires that only on blur. So a reader\n * typing the fix saw the error, red and `aria-invalid`, until they tabbed\n * away from a value that was already right. Re-dispatching `change` on input\n * is what commits early, through React Aria's own listener.\n *\n * Only while the field is invalid. A valid field still commits on blur, so\n * nothing new is flagged in the middle of typing a value: an error is shown\n * late and taken back early. React's `onChange` does not run a second time\n * for it, since the value it tracks has not moved since the input.\n */\nfunction commitWhileInvalid<E extends HTMLElement>(isInvalid: boolean, onInput: InputEventHandler<E> | undefined): InputEventHandler<E> {\n return event => {\n onInput?.(event);\n if (isInvalid) {\n event.currentTarget.dispatchEvent(new Event('change', {\n bubbles: true\n }));\n }\n };\n}\n\n/**\n * The box a control sits in, filled or outlined, with its label. React\n * Aria's `Group`, so\n * the field around it hands down `isDisabled` and `isInvalid` through context\n * and the box reports focus within it as render state, which is what the\n * label's colour follows. A field that provides no group context — one built\n * on a button rather than an input — passes the two states itself.\n */\nfunction FieldBox({\n children,\n endInset = '0px',\n floatingLabel = true,\n isFocused = false,\n isPopulated,\n isRequired = false,\n label,\n leading,\n multiline = false,\n trailing,\n trigger,\n variant = 'filled',\n ...props\n}: FieldBoxProps) {\n return <Group {...props}\n // A box with a press target of its own has it covering the box, so it\n // is only a box without one that answers a press itself.\n onPointerDown={trigger === undefined ? focusesControl(props.onPointerDown) : props.onPointerDown} {...mergeStatefulStyles(boxStyles(floatingLabel, isFocused, multiline, leading !== undefined, trailing !== undefined, variant), props)}>\n {boxContent(label, children, endInset, floatingLabel, isFocused, isPopulated, isRequired, leading, multiline, trailing, trigger, variant)}\n </Group>;\n}\n\n/**\n * A field's text control, in a {@link FieldBox} or on its own. React Aria's\n * `Input`, which takes its label association, value and validation from the\n * field around it and reports its disabled state as render state.\n *\n * In a box it clears the label at the top, and under a floating label it\n * always carries a placeholder, since that is what the box reads to tell a\n * populated control from an empty one: its own where it was given one, a\n * blank otherwise. Outside a box it has no label over it and shows the\n * placeholder it was given in every state.\n *\n * A prefix or a suffix describes the control, ahead of its description and\n * error, so a reader hears the unit or currency the value is read against —\n * as a sighted one sees it beside the value. As bare text beside the input\n * it was in no name and no description, and a reader heard the label alone.\n */\nfunction FieldInput({\n numeric = false,\n placeholder,\n prefix,\n suffix,\n ...props\n}: FieldInputProps & RefAttributes<HTMLInputElement>) {\n const box = useContext(BoxContext);\n const validation = useContext(FieldErrorContext);\n const prefixId = useId();\n const suffixId = useId();\n // React Aria hands the input its description and error ids through this\n // context, and a prop written on the input replaces them rather than\n // joining them, so they are read here and written back after the affixes.\n const field = useSlottedContext(InputContext);\n const describedBy = idsOf(prefix === undefined ? undefined : prefixId, suffix === undefined ? undefined : suffixId, field?.['aria-describedby'], props['aria-describedby']);\n const control = <Input placeholder={placeholder ?? (box.label === 'floating' ? ' ' : undefined)} {...props} aria-describedby={describedBy} onInput={commitWhileInvalid(validation?.isInvalid ?? false, props.onInput)} {...mergeStatefulStyles((state: InputRenderProps) => stylex.props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, box.label === 'floating' && fieldChromeStyles.inputUnderFloatingLabel, numeric && fieldChromeStyles.numeric, state.isDisabled && fieldChromeStyles.inputDisabled), props)} />;\n if (prefix === undefined && suffix === undefined) {\n return control;\n }\n return <span {...stylex.props(fieldChromeStyles.affixLine)}>\n {prefix === undefined ? null : <span id={prefixId} {...stylex.props(fieldChromeStyles.affix, box.underLabel && fieldChromeStyles.inputUnderLabel)}>\n {prefix}\n </span>}\n {control}\n {suffix === undefined ? null : <span id={suffixId} {...stylex.props(fieldChromeStyles.affix, box.underLabel && fieldChromeStyles.inputUnderLabel)}>\n {suffix}\n </span>}\n </span>;\n}\n\n/**\n * A date or a time's segments, in a {@link FieldBox}: React Aria's\n * `DateInput`, or the group holding a range's two. This is what carries the\n * control's type and its place on the line, clearing the label at the top,\n * as {@link FieldValue} does for a value that was chosen.\n *\n * A typed value longer than its box behaves as an input's text does. It is\n * clipped rather than cut short, since every segment on the line is still a\n * place to type. The browser scrolls whichever segment has focus into view,\n * as it scrolls to an input's caret. And when focus leaves the segments the\n * line goes back to its start, as an input's text does on blur, so a value\n * at rest reads from its beginning rather than from wherever it was left.\n */\nfunction FieldSegments({\n children\n}: {\n children: ReactNode;\n}) {\n const box = useContext(BoxContext);\n return <span onBlur={returnToStart} {...stylex.props(fieldChromeStyles.input, fieldChromeStyles.segments, box.underLabel && fieldChromeStyles.inputUnderLabel)}>\n {children}\n </span>;\n}\n\n/**\n * A field's multi-line text control, in a {@link FieldBox} drawn `multiline`.\n * React Aria's `TextArea`, with the same label association, value and\n * validation {@link FieldInput} takes from the field around it, and the same\n * placeholder under a floating label.\n *\n * Given `autosize` it grows with its text from the rows it asks for. The\n * value it grows to fit is read off the field's context rather than\n * measured: the box holds a hidden replica of it in the control's own type,\n * in the same grid cell as the control, and the cell is as tall as whichever\n * of the two is taller.\n */\nfunction FieldTextArea({\n autosize = false,\n placeholder,\n ...props\n}: FieldTextAreaProps & RefAttributes<HTMLTextAreaElement>) {\n const box = useContext(BoxContext);\n const context = useSlottedContext(TextAreaContext);\n const validation = useContext(FieldErrorContext);\n const value = typeof context?.value === 'string' ? context.value : '';\n const control = <TextArea placeholder={placeholder ?? (box.label === 'floating' ? ' ' : undefined)} {...props} onInput={commitWhileInvalid(validation?.isInvalid ?? false, props.onInput)} {...mergeStatefulStyles((state: InputRenderProps) => stylex.props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, box.label === 'floating' && fieldChromeStyles.inputUnderFloatingLabel, fieldChromeStyles.textArea, autosize && fieldChromeStyles.textAreaAutosize, autosize && fieldChromeStyles.autosizeCell, state.isDisabled && fieldChromeStyles.inputDisabled), props)} />;\n if (!autosize) {\n return control;\n }\n\n // A trailing space keeps a final line break of the value as a line of the\n // replica, which is how the control renders it.\n return <div {...stylex.props(fieldChromeStyles.autosize)}>\n {control}\n <div aria-hidden=\"true\" {...stylex.props(fieldChromeStyles.input, box.underLabel && fieldChromeStyles.inputUnderLabel, fieldChromeStyles.replica, fieldChromeStyles.autosizeCell)}>\n {value}{' '}\n </div>\n </div>;\n}\n\n/**\n * The press target over a {@link FieldBox} whose whole surface opens\n * something — a select's list, a picker's calendar. React Aria's `Button`,\n * which takes the trigger's props from the field around it through context.\n *\n * It covers the box rather than sitting on its value's line, so the box's\n * own padding opens the field too. It draws nothing: the box already carries\n * the fill, the underline and the focus indicator, and it lights up while\n * this has focus because the indicator follows focus within.\n */\nfunction FieldTrigger(props: FieldTriggerProps) {\n return <RACButton {...props} {...mergeStatefulStyles(stylex.props(fieldChromeStyles.trigger), props)} />;\n}\n\n/**\n * A field's value where it was chosen rather than typed, in a\n * {@link FieldBox}. Put React Aria's own element inside it — a select's\n * `SelectValue` — and this is what carries the input's type and its place on\n * the line, clearing the label at the top and truncating rather than\n * wrapping. A date or a time is typed, segment by segment, and takes\n * {@link FieldSegments} instead.\n *\n * The wrapper is the styled one rather than React Aria's element, because\n * this is the box's flex item: styling the element inside instead left it\n * sizing itself against a parent that had already shrink-wrapped to it.\n *\n * `isPlaceholder` says nothing has been chosen, which takes the muted role;\n * under a floating label it is hidden until the field is focused, exactly as\n * an input's placeholder is.\n */\nfunction FieldValue({\n isFocused = false,\n isPlaceholder = false,\n ...props\n}: FieldValueProps) {\n const box = useContext(BoxContext);\n const hidden = isPlaceholder && box.label === 'floating' && !isFocused;\n return <span {...props} {...mergeStyles(stylex.props(fieldChromeStyles.input, fieldChromeStyles.value, box.underLabel && fieldChromeStyles.inputUnderLabel, isPlaceholder && fieldChromeStyles.valuePlaceholder, hidden && fieldChromeStyles.valuePlaceholderHidden), props)} />;\n}\n\n// What `:focus-within` draws on the box, for a box told it is focused — see\n// `isFocused`. The error's own colour wins over primary, as it does there.\nfunction focusedStyle(outlined: boolean, invalid: boolean) {\n if (outlined) {\n return invalid ? fieldChromeStyles.boxOutlinedErrorFocused : fieldChromeStyles.boxOutlinedFocused;\n }\n return invalid ? fieldChromeStyles.boxErrorFocused : fieldChromeStyles.boxFocused;\n}\n\n/**\n * Element ids as one `aria-describedby`, in the order given, leaving out any\n * that are missing or already named — a list of several ids is split, since\n * the same one can arrive from the field and from the call site both — and\n * undefined when none are left, so the attribute is dropped rather than\n * written empty.\n */\nfunction idsOf(...lists: (string | undefined)[]) {\n const ids = new Set(lists.flatMap(list => list?.split(' ') ?? []));\n ids.delete('');\n return ids.size === 0 ? undefined : [...ids].join(' ');\n}\n\n// Back to the start of the line once focus has left every segment on it —\n// not while it moves from one segment to the next. The start is 0 in either\n// writing direction: a right-to-left line scrolls towards negative values.\nfunction returnToStart(event: FocusEvent<HTMLElement>) {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n event.currentTarget.scrollLeft = 0;\n }\n}\nfunction useFieldPopulated() {\n const input = useSlottedContext(InputContext);\n const textArea = useSlottedContext(TextAreaContext);\n // A field whose value is chosen rather than typed holds no input at all,\n // so being populated is a question for its own state — without this a\n // select's floating label never floats, however much is chosen.\n const select = useContext(SelectStateContext);\n if (select !== null) {\n return select.selectionManager.selectedKeys.size > 0;\n }\n const value = input?.value ?? textArea?.value ?? '';\n return String(value).length > 0;\n}\n\n// The box's render state with focus as the box draws it, for its label,\n// whose colour follows focus. Built by a call rather than written at the\n// prop, which is what react-perf's no-new-object-as-prop is after.\nfunction withFocus(state: GroupRenderProps, focused: boolean) {\n return focused === state.isFocusWithin ? state : {\n ...state,\n isFocusWithin: focused\n };\n}\n\n/**\n * Whether the control in this box is holding anything, read off React\n * Aria's context for whichever control the field renders. The filled box\n * reads the same thing in CSS through `:placeholder-shown`; this is for\n * what CSS cannot express — see the outlined variant's note above.\n */\n/**\n * A field's label: the colour alone, positioned and given its type by whatever\n * renders it. React Aria's `Label`, which the field around it associates with\n * its control through context.\n */\n// Hoisted rather than written as the parameter's default, which would be a\n// new object on every render.\nconst NO_STATE: Partial<FieldLabelState> = {};\n\n// The asterisk after a required field's label, which is how the text fields\n// page marks one, and Material Design's own web text field draws it unless\n// told not to. Hidden from assistive technology: the control already says it\n// is required, and read out as well the label would end in \"star\". It is in\n// the label rather than beside it, so it floats and takes the label's colour\n// with it — the error role once the field is invalid.\nconst REQUIRED_MARK = <span aria-hidden=\"true\">*</span>;\nfunction FieldLabel({\n children,\n isRequired = false,\n state = NO_STATE,\n variant = 'field',\n ...props\n}: FieldLabelProps) {\n const {\n isDisabled = false,\n isFocusWithin = false,\n isInvalid = false\n } = state;\n return <Label {...props} {...mergeStyles(stylex.props(fieldChromeStyles.label, variant === 'group' && groupStyles.label, isDisabled && fieldChromeStyles.labelDisabled, isInvalid && fieldChromeStyles.labelError, !isDisabled && !isInvalid && isFocusWithin && fieldChromeStyles.labelFocused), props)}>\n {children}\n {isRequired ? REQUIRED_MARK : null}\n </Label>;\n}\n\n/**\n * The line under a field: the error while there is one, the description\n * otherwise. The error goes through React Aria's `FieldError`, which renders\n * only while the field is invalid and falls back to whatever validation\n * errors the field carries when no message is given — which is how a `Form`\n * with server-side errors, or the browser's own, reaches it without any\n * field changing. The description steps aside for those too, which is what\n * the field's validation state is read for.\n */\nfunction FieldMessage({\n characterCount = false,\n characterLimitLabel,\n description,\n error,\n errorId,\n inset = true,\n maxLength,\n reserve = true\n}: FieldMessageProps) {\n const validation = useContext(FieldErrorContext);\n const invalid = error !== undefined || (validation?.isInvalid ?? false);\n const {\n locale\n } = useLocale();\n const messages = useMessages();\n const input = useSlottedContext(InputContext);\n const textArea = useSlottedContext(TextAreaContext);\n const insideForm = useInsideForm();\n // Read directly rather than through `useSlottedContext`, which throws for\n // a missing slot exactly as `Text` does — the throw is the thing being\n // avoided. What it is for is below, at `written`.\n const text = useContext(TextContext);\n\n // The limit, in words, for the description React Aria reads out with the\n // field. `maxLength` alone reaches the control as the native attribute,\n // which is not reliably announced, and the count beside the message is\n // hidden — so without this a reader is never told there is a limit.\n const limit = maxLength === undefined ? undefined : characterLimitLabel ?? messages.characterLimit(maxLength);\n const hidden = limit === undefined ? null : <VisuallyHidden elementType=\"span\">\n <Text slot=\"description\">{limit}</Text>\n </VisuallyHidden>;\n\n // Nothing to say: the field ends at its control. Inside a form the line is\n // drawn anyway, empty, since a form is where a message appears after the\n // fact — a server's answer, or the browser's own on submit — and every\n // field below this one would otherwise move by the line's height when it\n // does.\n //\n // Outside one the line is still there, collapsed out of the flow so the\n // field is no taller for it, because it holds the live region below: a\n // region has to be in the document before the error it announces arrives,\n // and one mounted with its text already in it is not read out. A limit to\n // announce rides in it the same way, rather than drawing the line for\n // something nobody can see.\n const collapsed = !invalid && description === undefined && !characterCount && !(insideForm && reserve);\n const value = input?.value ?? textArea?.value ?? '';\n const length = String(value).length;\n const hint = invalid ? undefined : description;\n\n // One slotted description, never two. React Aria hands every element in\n // its description slot the same generated id, so a second one puts a\n // duplicate id in the document and axe fails the story. The limit rides\n // inside the hint where there is one, and carries the whole slot where\n // there is not — hidden either way, since the count already draws it.\n //\n // Hidden by clipping rather than by leaving it out of the row, and the\n // difference is a gap: the row is a flex line with 16dp between its parts,\n // and an element with no width is still a part. Clipping takes it out of\n // flow, so a field with a limit and no hint has the line it had before.\n const described = hint === undefined ? hidden : <Text slot=\"description\" {...stylex.props(fieldChromeStyles.message)}>\n {hint}\n {limit === undefined ? null :\n // The space is load-bearing: a description is read as the text\n // content of one element, and two spans run together without it.\n <VisuallyHidden elementType=\"span\">{` ${limit}`}</VisuallyHidden>}\n </Text>;\n\n // Outside a field that validates there is nothing to hand React Aria's\n // `FieldError`, and it draws nothing without it — a group of chips is a\n // group rather than a form control, so the error it was given is written\n // out instead.\n //\n // Through the group's error slot where there is one, which is what makes\n // the message reach a screen reader at all: React Aria generates the id\n // its `aria-describedby` points at up front, then keeps it only while\n // something in the document carries it, so an element outside the slot is\n // drawn and never announced. The description beside it has always gone\n // through its own slot, which is why that half worked.\n //\n // Not every group has one. `TagGroup` wires up a description and an error;\n // `TokenField` wires up a description alone and generates no error id at\n // all, so the field names the message itself with `errorId` and points its\n // editable area at it — see TokenField.\n const errorSlot = text !== null && typeof text === 'object' && 'slots' in text && text.slots?.errorMessage !== undefined;\n const messageStyles = stylex.props(fieldChromeStyles.message, fieldChromeStyles.messageError);\n const written = errorSlot ? <Text slot=\"errorMessage\" {...messageStyles}>\n {error}\n </Text> : <span id={errorId} {...messageStyles}>\n {error}\n </span>;\n return <div {...stylex.props(fieldChromeStyles.message, fieldChromeStyles.messageLine, inset && fieldChromeStyles.messageInset, collapsed && fieldChromeStyles.messageLineCollapsed)}>\n {/*\n * The error, read out politely as it appears, since the move into\n * `aria-describedby` that associates it is not: a screen reader does\n * not re-read a description that changes under a control it is on,\n * and after a submit, focus is on the submit button rather than the\n * field. Typing-time, blur-time and a server's errors all arrive this\n * way.\n *\n * The error alone rather than the whole line, so the description\n * coming back once the error clears is not read out, and neither is\n * the limit beside it. Atomic, so a changed message is read whole.\n */}\n <span aria-atomic=\"true\" aria-live=\"polite\" {...stylex.props(fieldChromeStyles.messageRegion)}>\n {validation === null && error !== undefined ? written : <FieldError {...stylex.props(fieldChromeStyles.message, fieldChromeStyles.messageError)}>\n {error}\n </FieldError>}\n </span>\n {described}\n {characterCount ?\n // Hidden from the tree, and the limit above is why. A count is the\n // one piece of supporting text that changes on every keystroke, and\n // a screen reader reading it back at that rate is worse than not\n // hearing it — the limit said once on focus is what a reader needs,\n // and this is the same fact drawn for whoever is looking.\n <span aria-hidden=\"true\" {...stylex.props(fieldChromeStyles.message, fieldChromeStyles.counter, invalid && fieldChromeStyles.messageError)}>\n {countIn(locale, length, maxLength)}\n </span> : null}\n </div>;\n}\n\n/**\n * The same asterisk for a label that is not a field's own — a checkbox's, a\n * switch's — so every required control is marked by one element.\n */\nfunction RequiredMark() {\n return REQUIRED_MARK;\n}\n\n// The count in the reader's digits and grouping, as React Aria writes a\n// number field's value and a meter's percentage beside it — Arabic-Indic\n// under ar-EG, `1 200` under fr-FR, and `1,200` in English. One formatter per\n// locale, for the reason Currency keeps its own: building one is about ten\n// times dearer than reusing it, and the count changes on every keystroke.\nconst counterFormatters = new Map<string, Intl.NumberFormat>();\nfunction countIn(locale: string, length: number, maxLength: number | undefined) {\n let formatter = counterFormatters.get(locale);\n if (formatter === undefined) {\n formatter = new Intl.NumberFormat(locale);\n counterFormatters.set(locale, formatter);\n }\n return maxLength === undefined ? formatter.format(length) : `${formatter.format(length)}/${formatter.format(maxLength)}`;\n}\nexport type { FieldBoxProps, FieldInputProps, FieldLabelProps, FieldLabelState, FieldLabelVariant, FieldMessageProps, FieldTextAreaProps, FieldVariant };\nexport { FieldBox, FieldInput, FieldLabel, FieldMessage, FieldSegments, FieldTextArea, FieldTrigger, FieldValue, RequiredMark };"],"mappings":";;;;;;;;;;;;AAkPA,MAAMsF,cAA0B;CAC9B5C,OAAO;CACPE,YAAY;AACd;AACA,MAAM2C,eAAe;CACnBC,QAAQ;EACNC,OAAO;GACL/C,OAAO;GACPE,YAAY;EACd;EACA8C,UAAU;GACRhD,OAAO;GACPE,YAAY;EACd;CACF;CACA+C,UAAU;EACRF,OAAO;GACL/C,OAAO;GACPE,YAAY;EACd;EACA8C,UAAU;GACRhD,OAAO;GACPE,YAAY;EACd;CACF;AACF;AACA,MAAMiD,aAAa/E,cAA0BwE,WAAW;AAKxD,SAASQ,WAAWpD,OAAeK,UAAqBC,UAAkBC,eAAwBC,WAAoBC,aAAkCC,YAAqBC,SAAoBC,WAAoBG,UAAqBC,SAAoBC,SAAuB;CACnR,QAAQO,UAA4B,oBAAC,YAAD;EAAsBlB;EAAyBC;EAA0BC;EAAwBC;EAAyBC;EAAmBV;EAAgBW;EAAoBC;EAAkBY;EAAiBT;EAAmBC;EAAkBC;EACxRZ;CACS,CAAA;AAChB;;;;;;;;AASA,SAAAgD,WAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAoB,MAAA,EAAAnD,UAAAC,UAAAC,eAAAC,WAAAC,aAAAC,YAAAV,OAAAW,SAAAC,WAAAY,OAAAT,UAAAC,SAAAC,YAAAqC;CA6BlB,MAAAG,OAAaC,kBAAkB;CAC/B,MAAAC,YAAkBlD,eAAAgD;CAClB,MAAAR,WAAiBhC,YAAY;CAC7B,MAAA2C,UAAgBpC,MAAKqC,iBAALrD;CAChB,MAAAsD,UAAgB,CAACvD,iBAADqD,WAAAD;CACU,MAAAI,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AAzB;EAAAyB,EAAA,MAAAiH;EAAAjH,EAAA,MAAAsI;EAAAtI,EAAA,MAAA6I;EAAA7I,EAAA,MAAAnB;EAAAmB,EAAA,MAAA4E;CAAA,OAAAA,MAAA5E,EAAA;CAAA,IAAA6E;CAAA,IAAA7E,EAAA,QAAAsJ,aAAAtJ,EAAA,QAAA2E,OAAA3E,EAAA,QAAA4E,OAAA5E,EAAA,QAAA2C,IAAA;EA3BbkC,MAAA,qBAAA,OAAA;GA4BC,GA5BQlC;GAAT,UAAA;IAaHgC;IAKC2E;IACA1E;GASG;;EAAA5E,EAAA,MAAAsJ;EAAAtJ,EAAA,MAAA2E;EAAA3E,EAAA,MAAA4E;EAAA5E,EAAA,MAAA2C;EAAA3C,EAAA,MAAA6E;CAAA,OAAAA,MAAA7E,EAAA;CAAA,OA5BD6E;AA4BC;;;;;AAOV,SAASsF,eAAe;CACtB,OAAO9I;AACT;AAOA,MAAM+I,oCAAoB,IAAIC,IAA+B;AAC7D,SAASH,QAAQrB,QAAgBP,QAAgBzJ,WAA+B;CAC9E,IAAI2L,YAAYJ,kBAAkBK,IAAI5B,MAAM;CAC5C,IAAI2B,cAAc5J,KAAAA,GAAW;EAC3B4J,YAAY,IAAIF,KAAKC,aAAa1B,MAAM;EACxCuB,kBAAkBM,IAAI7B,QAAQ2B,SAAS;CACzC;CACA,OAAO3L,cAAc+B,KAAAA,IAAY4J,UAAUG,OAAOrC,MAAM,IAAI,GAAGkC,UAAUG,OAAOrC,MAAM,EAAC,GAAIkC,UAAUG,OAAO9L,SAAS;AACvH"}
@@ -0,0 +1,24 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { SeparatorContext } from "react-aria-components";
4
+ //#region src/overlay/index.tsx
5
+ const NO_SEPARATOR = {};
6
+ /** Clears, for an overlay's content, the contexts that reach it from outside. */
7
+ function OverlayScope(t0) {
8
+ const $ = c(2);
9
+ const { children } = t0;
10
+ let t1;
11
+ if ($[0] !== children) {
12
+ t1 = /* @__PURE__ */ jsx(SeparatorContext, {
13
+ value: NO_SEPARATOR,
14
+ children
15
+ });
16
+ $[0] = children;
17
+ $[1] = t1;
18
+ } else t1 = $[1];
19
+ return t1;
20
+ }
21
+ //#endregion
22
+ export { OverlayScope };
23
+
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["ReactNode","SeparatorContext","NO_SEPARATOR","OverlayScope","t0","$","_c","children","t1","_c"],"sources":["../../src/overlay/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport { SeparatorContext } from 'react-aria-components'\n\n// React context crosses the portal an overlay renders through, so what a\n// component around the trigger sets for its own children reaches into the\n// overlay as well. `Toolbar` sets the one that matters: it turns a\n// `Separator` across the bar, and a horizontal rule in a popover opened from\n// the bar took that orientation and drew as a vertical rule 0px long, told\n// to assistive technology as vertical too. An overlay is a surface of its\n// own, so its content starts from none of it, and a `Separator` there falls\n// back to its own horizontal default — as one inside React Aria's `Menu`\n// already did, since `Menu` provides a separator context of its own.\n//\n// Empty rather than null, so the separator reads no props from it rather\n// than finding no context and looking further out; a module constant, so the\n// value is the same object on every render.\nconst NO_SEPARATOR = {}\n\n/** Clears, for an overlay's content, the contexts that reach it from outside. */\nfunction OverlayScope({ children }: { children: ReactNode }) {\n return <SeparatorContext value={NO_SEPARATOR}>{children}</SeparatorContext>\n}\n\nexport { OverlayScope }\n"],"mappings":";;;;AAiBA,MAAME,eAAe,CAAC;;AAGtB,SAAAC,aAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAsB,MAAA,EAAAC,aAAAH;CAAqC,IAAAI;CAAA,IAAAH,EAAA,OAAAE,UAAA;EAClDC,KAAA,oBAAC,kBAAD;GAAyBN,OAAAA;GAAeK;EAAvB,CAAA;EAAmDF,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAApEG;AAAoE"}
@@ -0,0 +1,19 @@
1
+ //#region src/styles/scheme.ts
2
+ const pinnedScheme = {
3
+ dark: {
4
+ kWkggS: "x14s9m32",
5
+ kMwMTN: "x139gbkf",
6
+ kQNsl9: "xntwwlm",
7
+ $$css: true
8
+ },
9
+ light: {
10
+ kWkggS: "x14s9m32",
11
+ kMwMTN: "x139gbkf",
12
+ kQNsl9: "x19aimcq",
13
+ $$css: true
14
+ }
15
+ };
16
+ //#endregion
17
+ export { pinnedScheme };
18
+
19
+ //# sourceMappingURL=scheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheme.js","names":["stylex","colors","pinnedScheme","dark","kWkggS","kMwMTN","kQNsl9","$$css","light"],"sources":["../../src/styles/scheme.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors } from '../tokens/design.tokens.stylex';\n\n// What pinning a scheme does beside the colour theme that pins the tokens:\n// the element paints its own surface and text in that scheme, and tells the\n// browser the scheme, which is what native controls, scrollbars, autofill\n// and spellcheck follow — they read `color-scheme` rather than any token.\n//\n// A theme pins the tokens alone. A pinned dark scope on a light page left\n// its own background transparent and its text the page's, so a `Text`\n// inside drew the dark scheme's on surface over the light page, 1.23:1, and\n// an `<input>` inside stayed white with black text.\n//\n// Surface and on surface rather than background and on background: the two\n// pairs hold the same colours in both of the library's schemes, and surface\n// is the pair Material Design draws content on. Shared by `ThemeScope` and\n// the `colorScheme` classes in src/color-scheme.ts, which are the same\n// classes in two forms; an unpinned scope applies neither, so it paints\n// nothing and inherits the scheme around it.\nconst pinnedScheme = {\n dark: {\n kWkggS: \"x14s9m32\",\n kMwMTN: \"x139gbkf\",\n kQNsl9: \"xntwwlm\",\n $$css: true\n },\n light: {\n kWkggS: \"x14s9m32\",\n kMwMTN: \"x139gbkf\",\n kQNsl9: \"x19aimcq\",\n $$css: true\n }\n};\nexport { pinnedScheme };"],"mappings":";AAoBA,MAAME,eAAe;CACnBC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,OAAO;EACLJ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;AACF"}
package/dist/styles.css CHANGED
@@ -55,6 +55,10 @@
55
55
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
56
56
  }
57
57
 
58
+ .x1y3ic1l {
59
+ border-color: color-mix(in srgb,var(--x1ridy1o) calc(var(--x1cq03z9) * 100%),transparent);
60
+ }
61
+
58
62
  .xrh88j3 {
59
63
  border-color: color-mix(in srgb,var(--xn0syi6) calc(var(--x1cq03z9) * 100%),transparent);
60
64
  }
@@ -753,6 +757,10 @@
753
757
  background-color: color-mix(in srgb,var(--x13o0mym) calc(var(--x1cq03z9) * 100%),transparent);
754
758
  }
755
759
 
760
+ .x6mg230 {
761
+ background-color: color-mix(in srgb,var(--x13o0mym) calc(var(--xu361ij) * 100%),transparent);
762
+ }
763
+
756
764
  .xn4e5mw {
757
765
  background-color: color-mix(in srgb,var(--x1balm44) calc(var(--x124j18r) * 100%),var(--x1614qkl));
758
766
  }
@@ -869,6 +877,10 @@
869
877
  background-color: color-mix(in srgb,var(--x28n2pw) calc(var(--xhaltwz) * 100%),var(--x3cqee7));
870
878
  }
871
879
 
880
+ .x1jfv5e4 {
881
+ background-color: color-mix(in srgb,var(--xi1exwt) calc(var(--xu361ij) * 100%),transparent);
882
+ }
883
+
872
884
  .x16tkg7c {
873
885
  background-color: color-mix(in srgb,var(--xkltk4j) calc(var(--x124j18r) * 100%),var(--x189y34t));
874
886
  }
@@ -1421,6 +1433,18 @@
1421
1433
  color: var(--xwloagh);
1422
1434
  }
1423
1435
 
1436
+ .xntwwlm {
1437
+ --lightningcss-light: ;
1438
+ --lightningcss-dark: initial;
1439
+ color-scheme: dark;
1440
+ }
1441
+
1442
+ .x19aimcq {
1443
+ --lightningcss-light: initial;
1444
+ --lightningcss-dark: ;
1445
+ color-scheme: light;
1446
+ }
1447
+
1424
1448
  .xpamuu5 {
1425
1449
  column-gap: var(--x3km7fe);
1426
1450
  }
@@ -1525,6 +1549,10 @@
1525
1549
  flex-basis: 0;
1526
1550
  }
1527
1551
 
1552
+ .x4pfjvb {
1553
+ flex-basis: 50%;
1554
+ }
1555
+
1528
1556
  .xdl72j9 {
1529
1557
  flex-basis: auto;
1530
1558
  }
@@ -1941,10 +1969,6 @@
1941
1969
  inset-inline-start: var(--x-insetInlineStart);
1942
1970
  }
1943
1971
 
1944
- .x2xyl1b {
1945
- inset-inline-start: var(--x6borv4);
1946
- }
1947
-
1948
1972
  .xc8icb0 {
1949
1973
  isolation: isolate;
1950
1974
  }
@@ -2117,10 +2141,6 @@
2117
2141
  list-style-type: none;
2118
2142
  }
2119
2143
 
2120
- .x14z9mp {
2121
- margin-inline-end: 0;
2122
- }
2123
-
2124
2144
  .xk4mfur {
2125
2145
  margin-inline-end: calc(-1 * var(--x3km7fe));
2126
2146
  }
@@ -2129,10 +2149,6 @@
2129
2149
  margin-inline-end: calc(-1 * var(--xod9tvo));
2130
2150
  }
2131
2151
 
2132
- .x184gv5z {
2133
- margin-inline-end: calc((18px + var(--xod9tvo)) / 2);
2134
- }
2135
-
2136
2152
  .x1tn5xpv {
2137
2153
  margin-inline-end: calc(var(--x6borv4) - var(--x3km7fe));
2138
2154
  }
@@ -2145,6 +2161,10 @@
2145
2161
  margin-inline-end: var(--xbmbo34);
2146
2162
  }
2147
2163
 
2164
+ .x1nsf9p3 {
2165
+ margin-inline-end: var(--xod9tvo);
2166
+ }
2167
+
2148
2168
  .x18xomjl {
2149
2169
  margin-inline-start: -12px;
2150
2170
  }
@@ -2157,14 +2177,6 @@
2157
2177
  margin-inline-start: calc(-1 * var(--xod9tvo));
2158
2178
  }
2159
2179
 
2160
- .x1mjqfaz {
2161
- margin-inline-start: calc((18px + var(--xod9tvo)) / 2);
2162
- }
2163
-
2164
- .x1c5lys2 {
2165
- margin-inline-start: calc(18px + var(--xod9tvo));
2166
- }
2167
-
2168
2180
  .x1m7rnnc {
2169
2181
  margin-inline-start: var(--x3km7fe);
2170
2182
  }
@@ -2222,6 +2234,10 @@
2222
2234
  outline-offset: -2px;
2223
2235
  }
2224
2236
 
2237
+ .xr2mjdv {
2238
+ outline-offset: -4px;
2239
+ }
2240
+
2225
2241
  .x1y3gkto {
2226
2242
  outline-offset: 1px;
2227
2243
  }
@@ -2498,10 +2514,6 @@
2498
2514
  transform: scaleX(-1);
2499
2515
  }
2500
2516
 
2501
- .xmzmy3r {
2502
- transform: translate3d(0, -50%, 0);
2503
- }
2504
-
2505
2517
  .xuuh30 {
2506
2518
  transform: translateX(-50%);
2507
2519
  }
@@ -2650,6 +2662,14 @@
2650
2662
  transition-property: inline-size, block-size;
2651
2663
  }
2652
2664
 
2665
+ .x1gcwfje {
2666
+ transition-property: inline-size, margin-inline-end;
2667
+ }
2668
+
2669
+ .x1pha8k4 {
2670
+ transition-property: inline-size, min-inline-size;
2671
+ }
2672
+
2653
2673
  .x7x1mir {
2654
2674
  transition-property: inline-size, opacity;
2655
2675
  }
@@ -2662,8 +2682,8 @@
2662
2682
  transition-property: inset-inline-start;
2663
2683
  }
2664
2684
 
2665
- .x1ve1rmq {
2666
- transition-property: margin-inline-start, margin-inline-end;
2685
+ .xrtqwew {
2686
+ transition-property: max-inline-size;
2667
2687
  }
2668
2688
 
2669
2689
  .x13b0p5u {
@@ -2764,6 +2784,10 @@
2764
2784
  z-index: 1;
2765
2785
  }
2766
2786
 
2787
+ .xfj7q76 {
2788
+ z-index: 10;
2789
+ }
2790
+
2767
2791
  .x1bk8fjm {
2768
2792
  z-index: 1000;
2769
2793
  }
@@ -3624,6 +3648,10 @@
3624
3648
  max-width: 720px;
3625
3649
  }
3626
3650
 
3651
+ .x1tpxo8 {
3652
+ max-width: calc(100% - calc(18px + var(--xod9tvo)));
3653
+ }
3654
+
3627
3655
  .x35j8wb {
3628
3656
  max-width: calc(100% + 2 * var(--xbmbo34));
3629
3657
  }
@@ -3756,6 +3784,10 @@
3756
3784
  min-width: 16px;
3757
3785
  }
3758
3786
 
3787
+ .x16xo4sp {
3788
+ min-width: 18px;
3789
+ }
3790
+
3759
3791
  .x12rczxh {
3760
3792
  min-width: 220px;
3761
3793
  }
@@ -3780,6 +3812,10 @@
3780
3812
  min-width: 72px;
3781
3813
  }
3782
3814
 
3815
+ .x36sgg7 {
3816
+ min-width: calc(18px + var(--xod9tvo));
3817
+ }
3818
+
3783
3819
  .xjrddbv {
3784
3820
  min-width: min(360px, 100%);
3785
3821
  }
@@ -4042,10 +4078,34 @@
4042
4078
  width: calc(100% - 2 * var(--x1ug6acx));
4043
4079
  }
4044
4080
 
4081
+ .x1n0idw {
4082
+ width: calc(100% - var(--x3km7fe) - var(--x3km7fe));
4083
+ }
4084
+
4085
+ .x1u7osep {
4086
+ width: calc(100% - var(--x3km7fe));
4087
+ }
4088
+
4045
4089
  .x1url4ad {
4046
4090
  width: 336px;
4047
4091
  }
4048
4092
 
4093
+ .x1iuy3mw {
4094
+ width: calc(calc(var(--x6borv4) - var(--xod9tvo)) + 18px);
4095
+ }
4096
+
4097
+ .x154zo0h {
4098
+ width: calc(calc(var(--x6borv4) - var(--xod9tvo)) + calc((18px + var(--xod9tvo)) / 2));
4099
+ }
4100
+
4101
+ .x1n85vuq {
4102
+ width: calc(calc(var(--x6borv4) - var(--xod9tvo)) + calc(18px + var(--xod9tvo)));
4103
+ }
4104
+
4105
+ .xbraz1g {
4106
+ width: calc(var(--x6borv4) - var(--xod9tvo));
4107
+ }
4108
+
4049
4109
  .xd4ksm1 {
4050
4110
  width: clamp(360px,var(--trigger-width),720px);
4051
4111
  }
@@ -3,8 +3,11 @@ import { RenderComponentProps } from "./render/useRender.js";
3
3
  type ThemeScopeProps = RenderComponentProps<'div'> & {
4
4
  /**
5
5
  * Pins the scope to the library's light or dark scheme, whatever the
6
- * reader's OS asks for. Left unset, the scope keeps the scheme around it:
7
- * the one an enclosing scope or the `<html>` element pins, or the OS's.
6
+ * reader's OS asks for. A pinned scope paints its own surface and text in
7
+ * that scheme and sets `color-scheme` for the native controls inside, so
8
+ * it reads on any page. Left unset, the scope paints nothing and keeps the
9
+ * scheme around it: the one an enclosing scope or the `<html>` element
10
+ * pins, or the OS's.
8
11
  */
9
12
  scheme?: 'dark' | 'light' | undefined;
10
13
  };