MCPcopy Create free account
hub / github.com/adobe/react-spectrum / fieldInput

Function fieldInput

packages/@react-spectrum/s2/src/style-utils.ts:108–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106 }) as const;
107
108export const fieldInput = () =>
109 ({
110 gridArea: 'input',
111 minWidth: controlSize(),
112 contain: {
113 // Only apply size containment if contain-intrinsic-width is supported.
114 // In older browsers, this will fall back to the default browser intrinsic width.
115 '@supports (contain-intrinsic-width: 1px)': 'inline-size',
116 isQuiet: 'none'
117 },
118 '--defaultWidth': {
119 type: 'width',
120 value: {
121 default: 208,
122 size: {
123 S: 192,
124 L: 224,
125 XL: 240
126 }
127 }
128 },
129 // contain-intrinsic-width only includes the width of children, not the padding or borders.
130 containIntrinsicWidth:
131 'calc(var(--defaultWidth) - self(paddingStart, 0px) - self(paddingEnd, 0px) - self(borderStartWidth, 0px) - self(borderEndWidth, 0px))'
132 }) as const;
133
134/**
135 * Returns style properties that set the CSS `color-scheme` for a component. Defaults to the page's

Callers 12

NumberField.tsxFile · 0.90
SliderBaseFunction · 0.90
DateField.tsxFile · 0.90
TabsPicker.tsxFile · 0.90
DatePicker.tsxFile · 0.90
ComboBox.tsxFile · 0.90
TimeField.tsxFile · 0.90
trackFunction · 0.90
Field.tsxFile · 0.90
Picker.tsxFile · 0.90
LabeledValue.tsxFile · 0.90

Calls 1

controlSizeFunction · 0.85

Tested by

no test coverage detected