@epilot/volt-ui-experimental-griffel 0.2.3 → 0.3.1
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.
- package/ADOPTING.md +416 -0
- package/README.md +32 -31
- package/dist/components/alert-dialog/alert-dialog.js +61 -59
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/components/avatar/avatar.js +6 -6
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/badge/badge.js +47 -39
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/button/button.js +71 -68
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +23 -20
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/command/command.js +50 -35
- package/dist/components/command/command.js.map +1 -1
- package/dist/components/data-table/data-table.js +89 -88
- package/dist/components/data-table/data-table.js.map +1 -1
- package/dist/components/density-provider/density-provider.js +28 -0
- package/dist/components/density-provider/density-provider.js.map +1 -0
- package/dist/components/dialog/dialog.js +122 -100
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/drawer/drawer.js +61 -59
- package/dist/components/drawer/drawer.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.js +88 -85
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/field/field-combobox.js +121 -106
- package/dist/components/field/field-combobox.js.map +1 -1
- package/dist/components/field/field.js +105 -104
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/list/list.js +282 -308
- package/dist/components/list/list.js.map +1 -1
- package/dist/components/pill/pill.js +58 -56
- package/dist/components/pill/pill.js.map +1 -1
- package/dist/components/popover/popover.js +47 -38
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/radio/radio.js +21 -18
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/select/select.js +185 -156
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/skeleton/skeleton.js +2 -2
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/switch/switch.js +34 -29
- package/dist/components/switch/switch.js.map +1 -1
- package/dist/components/table/table-pagination.js +92 -90
- package/dist/components/table/table-pagination.js.map +1 -1
- package/dist/components/table/table.js +109 -121
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/toggle/toggle.js +29 -29
- package/dist/components/toggle/toggle.js.map +1 -1
- package/dist/components/tooltip/tooltip.js +36 -34
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/index.d.ts +600 -427
- package/dist/index.js +215 -212
- package/dist/index.js.map +1 -1
- package/dist/packages/volt-runtime/dist/sheet.js +27 -10
- package/dist/packages/volt-runtime/dist/sheet.js.map +1 -1
- package/dist/packages/volt-runtime/dist/styles/recipe.js +76 -0
- package/dist/packages/volt-runtime/dist/styles/recipe.js.map +1 -0
- package/dist/styles/document-context.js +12 -0
- package/dist/styles/document-context.js.map +1 -0
- package/dist/styles/make-styles.js +18 -10
- package/dist/styles/make-styles.js.map +1 -1
- package/dist/tokens/core.generated.js +1238 -1166
- package/dist/tokens/core.generated.js.map +1 -1
- package/dist/tokens/index.d.ts +442 -415
- package/dist/tokens/index.js +1105 -1078
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/install.js +9 -5
- package/dist/tokens/install.js.map +1 -1
- package/dist/tokens/use-palette-tokens.js +20 -0
- package/dist/tokens/use-palette-tokens.js.map +1 -0
- package/dist/tokens.json +83 -2
- package/package.json +13 -5
- package/scripts/migration-diagnostics-core.mjs +859 -0
- package/scripts/migration-diagnostics.mjs +353 -0
- package/scripts/migration-sweep.mjs +179 -0
- package/AGENTS.md +0 -153
- package/AUTHORING.md +0 -292
- package/dist/packages/volt-runtime/dist/styles/make-styles.js +0 -22
- package/dist/packages/volt-runtime/dist/styles/make-styles.js.map +0 -1
|
@@ -3,40 +3,44 @@ import * as a from "react";
|
|
|
3
3
|
import { shorthands as r } from "../../packages/volt-runtime/dist/vendor/@griffel/core/src/index.js";
|
|
4
4
|
import { SLOT_ATTR as c } from "../../packages/volt-runtime/dist/renderer/contract.js";
|
|
5
5
|
import { mergeClasses as f } from "../../packages/volt-runtime/dist/vendor/@griffel/core/src/mergeClasses.js";
|
|
6
|
-
import { makeVoltStyles as
|
|
7
|
-
import { spacingElement2 as
|
|
8
|
-
const Q = "div", U = "label",
|
|
9
|
-
const l = a.useContext(
|
|
6
|
+
import { makeVoltStyles as V } from "../../styles/make-styles.js";
|
|
7
|
+
import { spacingElement2 as b, spacingElement1 as v, fieldSetGap as W, radiusLg as P, fontWeightNormal as x, leadingSm as C, textSm as D, grayA11 as H, grayA8 as G, grayA12 as F, fieldInputHeight as X, leadingXs as z, textXs as S, semErrorOnSoft as N, errorA4 as $, semErrorSoft as L, grayA3 as E, accentA4 as j, accentA3 as M, grayA4 as Y, semFocusRing as q, fieldPaddingX as I, fieldPaddingY as k } from "../../tokens/index.js";
|
|
8
|
+
const Q = "div", U = "label", _ = "input", J = "p", K = "div", R = a.createContext(null), A = () => {
|
|
9
|
+
const l = a.useContext(R);
|
|
10
10
|
if (!l)
|
|
11
11
|
throw new Error("FieldInput must be used within a Field component");
|
|
12
12
|
return l;
|
|
13
|
-
},
|
|
13
|
+
}, le = () => a.useContext(R), p = V({
|
|
14
14
|
root: {
|
|
15
15
|
position: "relative",
|
|
16
16
|
display: "flex",
|
|
17
17
|
flexDirection: "column",
|
|
18
18
|
width: "100%",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
|
|
19
|
+
// Density-bound (DENSITY-SPEC.md §2.3, WP9B1-ACCEPTANCE-WP9B2A): normal resolves to the same
|
|
20
|
+
// spacingElement2/spacingElement3 values this used before binding — `spacingGroup1` (0.5rem)
|
|
21
|
+
// is a half-step short of the 0.75rem v1 actually uses, which three components got wrong by
|
|
22
|
+
// reaching for it directly; that pitfall is why fieldPaddingX's normal tier aliases
|
|
23
|
+
// spacingElement3, not spacingGroup1 (packages/tokens/spec/density.yaml).
|
|
24
|
+
paddingTop: k,
|
|
25
|
+
paddingBottom: k,
|
|
25
26
|
paddingLeft: I,
|
|
26
27
|
paddingRight: I,
|
|
27
|
-
...r.gap(
|
|
28
|
-
...r.borderRadius(
|
|
28
|
+
...r.gap(v),
|
|
29
|
+
...r.borderRadius(P),
|
|
29
30
|
transitionProperty: "all",
|
|
30
31
|
transitionDuration: "75ms",
|
|
31
32
|
outlineOffset: "2px",
|
|
32
33
|
outlineWidth: "2px",
|
|
33
34
|
outlineStyle: "none",
|
|
35
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
36
|
+
transitionDuration: "0.01ms"
|
|
37
|
+
},
|
|
34
38
|
"&[data-focused='true'], &[data-focus-visible]": {
|
|
35
|
-
outlineStyle: "solid"
|
|
39
|
+
outlineStyle: "solid",
|
|
40
|
+
outlineColor: q
|
|
36
41
|
},
|
|
37
42
|
"&[data-invalid]": {
|
|
38
|
-
backgroundColor:
|
|
39
|
-
outlineColor: A
|
|
43
|
+
backgroundColor: L
|
|
40
44
|
},
|
|
41
45
|
// Label's disabled styling, declared here because Field owns the elements these selectors are
|
|
42
46
|
// rooted at. On Label they were written as "[data-disabled] &", ":disabled ~ &" and
|
|
@@ -57,42 +61,32 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
57
61
|
}
|
|
58
62
|
},
|
|
59
63
|
rootDefault: {
|
|
60
|
-
backgroundColor:
|
|
64
|
+
backgroundColor: E,
|
|
61
65
|
":hover": {
|
|
62
|
-
backgroundColor:
|
|
63
|
-
},
|
|
64
|
-
"&[data-focused='true'], &[data-focus-visible]": {
|
|
65
|
-
outlineColor: R
|
|
66
|
+
backgroundColor: Y
|
|
66
67
|
}
|
|
67
68
|
},
|
|
68
69
|
rootHighlight: {
|
|
69
70
|
backgroundColor: M,
|
|
70
71
|
":hover": {
|
|
71
72
|
backgroundColor: j
|
|
72
|
-
},
|
|
73
|
-
"&[data-focused='true'], &[data-focus-visible]": {
|
|
74
|
-
outlineColor: R
|
|
75
73
|
}
|
|
76
74
|
},
|
|
77
75
|
rootReadonly: {
|
|
78
|
-
backgroundColor:
|
|
79
|
-
"&[data-focused='true'], &[data-focus-visible]": {
|
|
80
|
-
outlineColor: R
|
|
81
|
-
}
|
|
76
|
+
backgroundColor: E
|
|
82
77
|
},
|
|
83
78
|
rootDestructive: {
|
|
84
|
-
backgroundColor:
|
|
79
|
+
backgroundColor: L,
|
|
85
80
|
":hover": {
|
|
86
81
|
backgroundColor: $
|
|
87
|
-
},
|
|
88
|
-
"&[data-focused='true'], &[data-focus-visible]": {
|
|
89
|
-
outlineColor: A
|
|
90
82
|
}
|
|
91
83
|
},
|
|
92
84
|
fieldSet: {
|
|
93
85
|
display: "flex",
|
|
94
86
|
flexDirection: "column",
|
|
95
|
-
|
|
87
|
+
// Density-bound (DENSITY-SPEC.md §2.3): normal resolves to the same spacingLayout2 (32px)
|
|
88
|
+
// this used before binding.
|
|
89
|
+
...r.gap(W),
|
|
96
90
|
...r.border("0"),
|
|
97
91
|
...r.padding(0),
|
|
98
92
|
...r.margin(0)
|
|
@@ -100,7 +94,7 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
100
94
|
fieldGroup: {
|
|
101
95
|
display: "flex",
|
|
102
96
|
width: "100%",
|
|
103
|
-
...r.gap(
|
|
97
|
+
...r.gap(b)
|
|
104
98
|
},
|
|
105
99
|
fieldGroupColumn: {
|
|
106
100
|
flexDirection: "column"
|
|
@@ -114,16 +108,16 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
114
108
|
flexShrink: 1,
|
|
115
109
|
flexBasis: "0%",
|
|
116
110
|
flexDirection: "column",
|
|
117
|
-
...r.gap(
|
|
111
|
+
...r.gap(b),
|
|
118
112
|
lineHeight: "1.375"
|
|
119
113
|
},
|
|
120
114
|
label: {
|
|
121
115
|
minHeight: "1rem",
|
|
122
|
-
fontSize:
|
|
123
|
-
lineHeight:
|
|
116
|
+
fontSize: S,
|
|
117
|
+
lineHeight: z,
|
|
124
118
|
display: "flex",
|
|
125
119
|
width: "fit-content",
|
|
126
|
-
...r.gap(
|
|
120
|
+
...r.gap(b),
|
|
127
121
|
cursor: "default",
|
|
128
122
|
color: F,
|
|
129
123
|
"&[data-disabled]": {
|
|
@@ -133,9 +127,12 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
133
127
|
labelContent: {
|
|
134
128
|
display: "inline-flex",
|
|
135
129
|
alignItems: "center",
|
|
136
|
-
...r.gap(
|
|
130
|
+
...r.gap(v),
|
|
137
131
|
transitionProperty: "opacity",
|
|
138
|
-
transitionDuration: "150ms"
|
|
132
|
+
transitionDuration: "150ms",
|
|
133
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
134
|
+
transitionDuration: "0.01ms"
|
|
135
|
+
}
|
|
139
136
|
},
|
|
140
137
|
labelContentHover: {
|
|
141
138
|
width: 0,
|
|
@@ -146,7 +143,7 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
146
143
|
pointerEvents: "none"
|
|
147
144
|
},
|
|
148
145
|
description: {
|
|
149
|
-
fontSize:
|
|
146
|
+
fontSize: S,
|
|
150
147
|
lineHeight: "1.5",
|
|
151
148
|
fontWeight: x,
|
|
152
149
|
...r.margin(0),
|
|
@@ -159,12 +156,12 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
159
156
|
color: F
|
|
160
157
|
},
|
|
161
158
|
descriptionHelper: {
|
|
162
|
-
color:
|
|
159
|
+
color: H
|
|
163
160
|
},
|
|
164
161
|
error: {
|
|
165
|
-
color:
|
|
166
|
-
fontSize:
|
|
167
|
-
lineHeight:
|
|
162
|
+
color: N,
|
|
163
|
+
fontSize: S,
|
|
164
|
+
lineHeight: z,
|
|
168
165
|
fontWeight: x
|
|
169
166
|
},
|
|
170
167
|
errorList: {
|
|
@@ -175,25 +172,29 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
175
172
|
listStyleType: "disc"
|
|
176
173
|
},
|
|
177
174
|
errorListItem: {
|
|
178
|
-
color:
|
|
179
|
-
fontSize:
|
|
180
|
-
lineHeight:
|
|
175
|
+
color: N,
|
|
176
|
+
fontSize: S,
|
|
177
|
+
lineHeight: z,
|
|
181
178
|
fontWeight: x,
|
|
182
179
|
marginTop: "0.25rem",
|
|
183
180
|
marginBottom: "0.25rem"
|
|
184
181
|
},
|
|
185
182
|
input: {
|
|
186
183
|
width: "100%",
|
|
187
|
-
|
|
184
|
+
// Density-bound (DENSITY-SPEC.md §2.3): normal resolves to the same "1.5rem" this used before
|
|
185
|
+
// binding. FieldComboboxInput (field-combobox.tsx) has its OWN separate makeVoltStyles call
|
|
186
|
+
// and its own unrelated "input" key (width: "100%" only, no height) — this binding does not
|
|
187
|
+
// reach it; CALIPER-WP9B2A-REVIEW-1.md corrected an earlier claim that it did.
|
|
188
|
+
height: X,
|
|
188
189
|
outlineStyle: "none",
|
|
189
|
-
fontSize:
|
|
190
|
-
lineHeight:
|
|
190
|
+
fontSize: D,
|
|
191
|
+
lineHeight: C,
|
|
191
192
|
color: F,
|
|
192
193
|
backgroundColor: "transparent",
|
|
193
194
|
...r.border("0"),
|
|
194
195
|
...r.padding(0),
|
|
195
196
|
"::placeholder": {
|
|
196
|
-
color:
|
|
197
|
+
color: G
|
|
197
198
|
},
|
|
198
199
|
":disabled": {
|
|
199
200
|
cursor: "not-allowed"
|
|
@@ -202,20 +203,20 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
202
203
|
inputGroup: {
|
|
203
204
|
display: "flex",
|
|
204
205
|
alignItems: "center",
|
|
205
|
-
...r.gap(
|
|
206
|
+
...r.gap(v),
|
|
206
207
|
width: "100%"
|
|
207
208
|
},
|
|
208
209
|
textarea: {
|
|
209
210
|
width: "100%",
|
|
210
211
|
outlineStyle: "none",
|
|
211
|
-
fontSize:
|
|
212
|
-
lineHeight:
|
|
212
|
+
fontSize: D,
|
|
213
|
+
lineHeight: C,
|
|
213
214
|
color: F,
|
|
214
215
|
backgroundColor: "transparent",
|
|
215
216
|
...r.border("0"),
|
|
216
217
|
...r.padding(0),
|
|
217
218
|
"::placeholder": {
|
|
218
|
-
color:
|
|
219
|
+
color: G
|
|
219
220
|
},
|
|
220
221
|
":disabled": {
|
|
221
222
|
cursor: "not-allowed"
|
|
@@ -231,16 +232,16 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
231
232
|
resize: "horizontal"
|
|
232
233
|
},
|
|
233
234
|
addon: {
|
|
234
|
-
color:
|
|
235
|
+
color: H,
|
|
235
236
|
display: "flex",
|
|
236
237
|
height: "auto",
|
|
237
238
|
cursor: "text",
|
|
238
239
|
whiteSpace: "nowrap",
|
|
239
240
|
alignItems: "center",
|
|
240
241
|
justifyContent: "center",
|
|
241
|
-
...r.gap(
|
|
242
|
-
fontSize:
|
|
243
|
-
lineHeight:
|
|
242
|
+
...r.gap(b),
|
|
243
|
+
fontSize: D,
|
|
244
|
+
lineHeight: C,
|
|
244
245
|
fontWeight: x,
|
|
245
246
|
userSelect: "none"
|
|
246
247
|
},
|
|
@@ -250,9 +251,9 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
250
251
|
addonEnd: {
|
|
251
252
|
order: 1
|
|
252
253
|
}
|
|
253
|
-
}),
|
|
254
|
+
}), re = ({
|
|
254
255
|
variant: l = "default"
|
|
255
|
-
} = {}) => l,
|
|
256
|
+
} = {}) => l, ae = a.forwardRef(
|
|
256
257
|
function({
|
|
257
258
|
className: i,
|
|
258
259
|
variant: e = "default",
|
|
@@ -261,12 +262,12 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
261
262
|
onBlurCapture: n,
|
|
262
263
|
...s
|
|
263
264
|
}, m) {
|
|
264
|
-
const u = p(), h = a.useRef(null), [g,
|
|
265
|
-
|
|
266
|
-
}, O = (
|
|
267
|
-
|
|
268
|
-
},
|
|
269
|
-
return /* @__PURE__ */ d(
|
|
265
|
+
const u = p(), h = a.useRef(null), [g, y] = a.useState(!1), T = (w) => {
|
|
266
|
+
y(!0), o == null || o(w);
|
|
267
|
+
}, O = (w) => {
|
|
268
|
+
y(!1), n == null || n(w);
|
|
269
|
+
}, B = e === "highlight" ? u.rootHighlight : e === "readonly" ? u.rootReadonly : e === "destructive" ? u.rootDestructive : u.rootDefault;
|
|
270
|
+
return /* @__PURE__ */ d(R.Provider, { value: { inputRef: h }, children: /* @__PURE__ */ d(
|
|
270
271
|
Q,
|
|
271
272
|
{
|
|
272
273
|
ref: m,
|
|
@@ -274,15 +275,15 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
274
275
|
"data-slot": "field",
|
|
275
276
|
[c]: "field",
|
|
276
277
|
"data-focused": g ? "true" : "false",
|
|
277
|
-
className: f(u.root,
|
|
278
|
-
onFocusCapture:
|
|
278
|
+
className: f(u.root, B, i),
|
|
279
|
+
onFocusCapture: T,
|
|
279
280
|
onBlurCapture: O,
|
|
280
281
|
...s,
|
|
281
282
|
children: t
|
|
282
283
|
}
|
|
283
284
|
) });
|
|
284
285
|
}
|
|
285
|
-
),
|
|
286
|
+
), se = a.forwardRef(
|
|
286
287
|
function({ className: i, ...e }, t) {
|
|
287
288
|
const o = p();
|
|
288
289
|
return /* @__PURE__ */ d(
|
|
@@ -296,7 +297,7 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
296
297
|
}
|
|
297
298
|
);
|
|
298
299
|
}
|
|
299
|
-
),
|
|
300
|
+
), de = a.forwardRef(
|
|
300
301
|
function({ className: i, direction: e = "column", ...t }, o) {
|
|
301
302
|
const n = p();
|
|
302
303
|
return /* @__PURE__ */ d(
|
|
@@ -314,7 +315,7 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
314
315
|
}
|
|
315
316
|
);
|
|
316
317
|
}
|
|
317
|
-
),
|
|
318
|
+
), ce = a.forwardRef(
|
|
318
319
|
function({ className: i, ...e }, t) {
|
|
319
320
|
const o = p();
|
|
320
321
|
return /* @__PURE__ */ d(
|
|
@@ -328,7 +329,7 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
328
329
|
}
|
|
329
330
|
);
|
|
330
331
|
}
|
|
331
|
-
),
|
|
332
|
+
), ue = a.forwardRef(
|
|
332
333
|
function({ className: i, ...e }, t) {
|
|
333
334
|
const o = p();
|
|
334
335
|
return /* @__PURE__ */ d(
|
|
@@ -342,7 +343,7 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
342
343
|
}
|
|
343
344
|
);
|
|
344
345
|
}
|
|
345
|
-
),
|
|
346
|
+
), fe = a.forwardRef(function({ className: i, showOnHover: e = !0, ...t }, o) {
|
|
346
347
|
const n = p();
|
|
347
348
|
return /* @__PURE__ */ d(
|
|
348
349
|
"div",
|
|
@@ -358,12 +359,12 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
358
359
|
...t
|
|
359
360
|
}
|
|
360
361
|
);
|
|
361
|
-
}),
|
|
362
|
+
}), pe = ({
|
|
362
363
|
variant: l = "default"
|
|
363
|
-
} = {}) => l,
|
|
364
|
+
} = {}) => l, ge = a.forwardRef(function({ className: i, variant: e = "default", ...t }, o) {
|
|
364
365
|
const n = p(), s = e === "helper" ? n.descriptionHelper : n.descriptionDefault;
|
|
365
366
|
return /* @__PURE__ */ d(
|
|
366
|
-
|
|
367
|
+
J,
|
|
367
368
|
{
|
|
368
369
|
ref: o,
|
|
369
370
|
"data-slot": "field-description",
|
|
@@ -372,7 +373,7 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
372
373
|
...t
|
|
373
374
|
}
|
|
374
375
|
);
|
|
375
|
-
}),
|
|
376
|
+
}), me = a.forwardRef(
|
|
376
377
|
function({ className: i, children: e, errors: t, ...o }, n) {
|
|
377
378
|
const s = p(), m = a.useMemo(() => {
|
|
378
379
|
var h;
|
|
@@ -384,11 +385,11 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
384
385
|
...new Map(t.map((g) => [g == null ? void 0 : g.message, g])).values()
|
|
385
386
|
];
|
|
386
387
|
return u.length === 1 ? (h = u[0]) == null ? void 0 : h.message : /* @__PURE__ */ d("ul", { className: s.errorList, children: u.map(
|
|
387
|
-
(g,
|
|
388
|
+
(g, y) => (g == null ? void 0 : g.message) && /* @__PURE__ */ d("li", { className: s.errorListItem, children: g.message }, y)
|
|
388
389
|
) });
|
|
389
390
|
}, [e, t, s.errorList, s.errorListItem]);
|
|
390
391
|
return m ? /* @__PURE__ */ d(
|
|
391
|
-
|
|
392
|
+
K,
|
|
392
393
|
{
|
|
393
394
|
ref: n,
|
|
394
395
|
role: "alert",
|
|
@@ -400,11 +401,11 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
400
401
|
}
|
|
401
402
|
) : null;
|
|
402
403
|
}
|
|
403
|
-
),
|
|
404
|
+
), he = a.forwardRef(
|
|
404
405
|
function({ className: i, ...e }, t) {
|
|
405
|
-
const o = p(), { inputRef: n } =
|
|
406
|
+
const o = p(), { inputRef: n } = A();
|
|
406
407
|
return /* @__PURE__ */ d(
|
|
407
|
-
|
|
408
|
+
_,
|
|
408
409
|
{
|
|
409
410
|
ref: (s) => {
|
|
410
411
|
n.current = s, typeof t == "function" ? t(s) : t && (t.current = s);
|
|
@@ -429,8 +430,8 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
429
430
|
...e
|
|
430
431
|
}
|
|
431
432
|
);
|
|
432
|
-
}),
|
|
433
|
-
const n = p(), { inputRef: s } =
|
|
433
|
+
}), be = a.forwardRef(function({ className: i, resize: e = "none", ...t }, o) {
|
|
434
|
+
const n = p(), { inputRef: s } = A(), m = e === "vertical" ? n.resizeVertical : e === "horizontal" ? n.resizeHorizontal : n.resizeNone;
|
|
434
435
|
return /* @__PURE__ */ d(
|
|
435
436
|
"textarea",
|
|
436
437
|
{
|
|
@@ -445,9 +446,9 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
445
446
|
className: f(n.textarea, m, i)
|
|
446
447
|
}
|
|
447
448
|
);
|
|
448
|
-
}),
|
|
449
|
+
}), xe = ({
|
|
449
450
|
align: l = "start"
|
|
450
|
-
} = {}) => l,
|
|
451
|
+
} = {}) => l, Fe = a.forwardRef(function({ className: i, align: e = "start", ...t }, o) {
|
|
451
452
|
const n = p();
|
|
452
453
|
return /* @__PURE__ */ d(
|
|
453
454
|
"div",
|
|
@@ -467,22 +468,22 @@ const Q = "div", U = "label", Y = "input", _ = "p", J = "div", H = a.createConte
|
|
|
467
468
|
);
|
|
468
469
|
});
|
|
469
470
|
export {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
471
|
+
ae as Field,
|
|
472
|
+
ce as FieldContent,
|
|
473
|
+
ge as FieldDescription,
|
|
474
|
+
me as FieldError,
|
|
475
|
+
de as FieldGroup,
|
|
476
|
+
Fe as FieldGroupAddon,
|
|
477
|
+
he as FieldInput,
|
|
477
478
|
ye as FieldInputGroup,
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
479
|
+
ue as FieldLabel,
|
|
480
|
+
fe as FieldLabelContent,
|
|
481
|
+
se as FieldSet,
|
|
482
|
+
be as FieldTextarea,
|
|
483
|
+
pe as fieldDescriptionVariants,
|
|
484
|
+
re as fieldVariants,
|
|
485
|
+
xe as inputGroupAddonVariants,
|
|
486
|
+
A as useFieldContext,
|
|
487
|
+
le as useOptionalFieldContext
|
|
487
488
|
};
|
|
488
489
|
//# sourceMappingURL=field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sources":["../../../src/components/field/field.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/volt-ui-runtime\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * Plain elements, not a primitive.\n *\n * v1's Field uses no Radix primitive at all — it is a custom implementation with its own context,\n * and v2 already had the same context (`FieldContext`, carrying `inputRef`). Base UI's Field parts\n * were only supplying the elements, and these are the elements they rendered: Root a div, Label a\n * label, Control an input, Description a p, Error a div. Substituting them is element-identical, so\n * nothing moves visually.\n *\n * **What is genuinely lost:** Base UI's Field also wired label-to-control association and\n * `aria-describedby` automatically. v1 does not do that either — its context carries only `inputRef`\n * — so this matches production rather than regressing against it, but it is a real accessibility\n * affordance that Base UI gave for free and is worth revisiting on its own terms.\n */\nconst FieldRootBase = \"div\" as const\nconst FieldLabelBase = \"label\" as const\nconst FieldControlBase = \"input\" as const\nconst FieldDescriptionBase = \"p\" as const\nconst FieldErrorBase = \"div\" as const\n\nexport type FieldInputRef =\n | HTMLInputElement\n | HTMLTextAreaElement\n | HTMLSelectElement\n | HTMLButtonElement\n | null\n\nexport interface FieldContextValue {\n inputRef: React.RefObject<FieldInputRef>\n}\n\nconst FieldContext = React.createContext<FieldContextValue | null>(null)\n\nexport const useFieldContext = () => {\n const context = React.useContext(FieldContext)\n if (!context) {\n throw new Error(\"FieldInput must be used within a Field component\")\n }\n return context\n}\n\n/**\n * Field context when there is one, `null` otherwise — for parts that work both inside and outside a\n * Field.\n *\n * `useFieldContext` throws by design, which is right for FieldInput (it is meaningless on its own)\n * and wrong for SelectTrigger and the combobox trigger, which are legitimate standalone components\n * that merely pick up field wiring when nested. Those were calling the throwing hook inside a\n * try/catch, i.e. using an exception for control flow on every render of a perfectly valid tree.\n */\nexport const useOptionalFieldContext = (): FieldContextValue | null =>\n React.useContext(FieldContext)\n\nexport type FieldVariant = \"default\" | \"highlight\" | \"readonly\" | \"destructive\"\n\nconst useStyles = makeVoltStyles({\n root: {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n paddingTop: tokens.spacingElement2,\n paddingBottom: tokens.spacingElement2,\n // v1 uses Tailwind's `px-3` = 0.75rem here. The semantic spacing scale has NO 0.75rem\n // token -- it runs 0.25/0.5/0.5/1/1.5/2 -- so this is a literal by necessity.\n // `spacingGroup1` is 0.5rem and reaching for it by name (as three components did)\n // silently loses 4px per side. See STATUS: the scale gap is the root cause.\n paddingLeft: tokens.spacingElement3,\n paddingRight: tokens.spacingElement3,\n ...shorthands.gap(tokens.spacingElement1),\n ...shorthands.borderRadius(tokens.radiusLg),\n transitionProperty: \"all\",\n transitionDuration: \"75ms\",\n outlineOffset: \"2px\",\n outlineWidth: \"2px\",\n outlineStyle: \"none\",\n \"&[data-focused='true'], &[data-focus-visible]\": {\n outlineStyle: \"solid\",\n },\n \"&[data-invalid]\": {\n backgroundColor: tokens.semErrorSoft,\n outlineColor: tokens.errorA8,\n },\n\n // Label's disabled styling, declared here because Field owns the elements these selectors are\n // rooted at. On Label they were written as \"[data-disabled] &\", \":disabled ~ &\" and\n // \"[data-disabled] ~ &\"; Griffel does not substitute `&` in that position and emits\n // `.hash<selector> .hash`, which never matches, so a label in a disabled field never dimmed.\n // See src/ancestor-selector.test.ts.\n [`&[data-disabled] [${SLOT_ATTR}=\"label\"]`]: {\n pointerEvents: \"none\",\n opacity: 0.5,\n },\n [`& :disabled ~ [${SLOT_ATTR}=\"label\"]`]: {\n cursor: \"not-allowed\",\n opacity: 0.5,\n },\n [`& [data-disabled] ~ [${SLOT_ATTR}=\"label\"]`]: {\n cursor: \"not-allowed\",\n opacity: 0.5,\n },\n },\n rootDefault: {\n backgroundColor: tokens.grayA3,\n \":hover\": {\n backgroundColor: tokens.grayA4,\n },\n \"&[data-focused='true'], &[data-focus-visible]\": {\n outlineColor: tokens.accentA8,\n },\n },\n rootHighlight: {\n backgroundColor: tokens.accentA3,\n \":hover\": {\n backgroundColor: tokens.accentA4,\n },\n \"&[data-focused='true'], &[data-focus-visible]\": {\n outlineColor: tokens.accentA8,\n },\n },\n rootReadonly: {\n backgroundColor: tokens.grayA3,\n \"&[data-focused='true'], &[data-focus-visible]\": {\n outlineColor: tokens.accentA8,\n },\n },\n rootDestructive: {\n backgroundColor: tokens.semErrorSoft,\n \":hover\": {\n backgroundColor: tokens.errorA4,\n },\n \"&[data-focused='true'], &[data-focus-visible]\": {\n outlineColor: tokens.errorA8,\n },\n },\n fieldSet: {\n display: \"flex\",\n flexDirection: \"column\",\n ...shorthands.gap(tokens.spacingLayout2),\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n ...shorthands.margin(0),\n },\n fieldGroup: {\n display: \"flex\",\n width: \"100%\",\n ...shorthands.gap(tokens.spacingElement2),\n },\n fieldGroupColumn: {\n flexDirection: \"column\",\n },\n fieldGroupRow: {\n flexDirection: \"row\",\n },\n fieldContent: {\n display: \"flex\",\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"0%\",\n flexDirection: \"column\",\n ...shorthands.gap(tokens.spacingElement2),\n lineHeight: \"1.375\",\n },\n label: {\n minHeight: \"1rem\",\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n display: \"flex\",\n width: \"fit-content\",\n ...shorthands.gap(tokens.spacingElement2),\n cursor: \"default\",\n color: tokens.grayA12,\n \"&[data-disabled]\": {\n opacity: 0.5,\n },\n },\n labelContent: {\n display: \"inline-flex\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement1),\n transitionProperty: \"opacity\",\n transitionDuration: \"150ms\",\n },\n labelContentHover: {\n width: 0,\n height: 0,\n overflowX: \"visible\",\n overflowY: \"visible\",\n opacity: 0,\n pointerEvents: \"none\",\n },\n description: {\n fontSize: tokens.textXs,\n lineHeight: \"1.5\",\n fontWeight: tokens.fontWeightNormal,\n ...shorthands.margin(0),\n \"& a\": {\n textDecorationLine: \"underline\",\n textUnderlineOffset: \"4px\",\n },\n },\n descriptionDefault: {\n color: tokens.grayA12,\n },\n descriptionHelper: {\n color: tokens.grayA11,\n },\n error: {\n color: tokens.errorA11,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n fontWeight: tokens.fontWeightNormal,\n },\n errorList: {\n display: \"flex\",\n flexDirection: \"column\",\n ...shorthands.margin(0),\n paddingLeft: \"1.25rem\",\n listStyleType: \"disc\",\n },\n errorListItem: {\n color: tokens.errorA11,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n fontWeight: tokens.fontWeightNormal,\n marginTop: \"0.25rem\",\n marginBottom: \"0.25rem\",\n },\n input: {\n width: \"100%\",\n height: \"1.5rem\",\n outlineStyle: \"none\",\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n color: tokens.grayA12,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \"::placeholder\": {\n color: tokens.grayA8,\n },\n \":disabled\": {\n cursor: \"not-allowed\",\n },\n },\n inputGroup: {\n display: \"flex\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement1),\n width: \"100%\",\n },\n textarea: {\n width: \"100%\",\n outlineStyle: \"none\",\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n color: tokens.grayA12,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \"::placeholder\": {\n color: tokens.grayA8,\n },\n \":disabled\": {\n cursor: \"not-allowed\",\n },\n },\n resizeNone: {\n resize: \"none\",\n },\n resizeVertical: {\n resize: \"vertical\",\n },\n resizeHorizontal: {\n resize: \"horizontal\",\n },\n addon: {\n color: tokens.grayA11,\n display: \"flex\",\n height: \"auto\",\n cursor: \"text\",\n whiteSpace: \"nowrap\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...shorthands.gap(tokens.spacingElement2),\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n fontWeight: tokens.fontWeightNormal,\n userSelect: \"none\",\n },\n addonStart: {\n order: -1,\n },\n addonEnd: {\n order: 1,\n },\n})\n\n// fieldVariants helper for v1 API compatibility\nexport const fieldVariants = ({\n variant = \"default\",\n}: { variant?: FieldVariant } = {}) => {\n return variant\n}\n\nexport type FieldProps = Omit<React.ComponentProps<\"div\">, \"className\"> & {\n className?: string\n variant?: FieldVariant\n}\n\nexport const Field = React.forwardRef<HTMLDivElement, FieldProps>(\n function Field(\n {\n className,\n variant = \"default\",\n children,\n onFocusCapture,\n onBlurCapture,\n ...props\n },\n ref\n ) {\n const styles = useStyles()\n const inputRef = React.useRef<FieldInputRef>(null)\n const [isFocused, setIsFocused] = React.useState(false)\n\n const handleFocusCapture: React.ComponentProps<\"div\">[\"onFocusCapture\"] = (\n event\n ) => {\n setIsFocused(true)\n onFocusCapture?.(event)\n }\n\n const handleBlurCapture: React.ComponentProps<\"div\">[\"onBlurCapture\"] = (\n event\n ) => {\n setIsFocused(false)\n onBlurCapture?.(event)\n }\n\n const variantStyle =\n variant === \"highlight\"\n ? styles.rootHighlight\n : variant === \"readonly\"\n ? styles.rootReadonly\n : variant === \"destructive\"\n ? styles.rootDestructive\n : styles.rootDefault\n\n return (\n <FieldContext.Provider value={{ inputRef }}>\n <FieldRootBase\n ref={ref}\n role=\"group\"\n data-slot=\"field\"\n {...{ [SLOT_ATTR]: \"field\" }}\n data-focused={isFocused ? \"true\" : \"false\"}\n className={mergeClasses(styles.root, variantStyle, className)}\n onFocusCapture={handleFocusCapture}\n onBlurCapture={handleBlurCapture}\n {...props}\n >\n {children}\n </FieldRootBase>\n </FieldContext.Provider>\n )\n }\n)\n\nexport type FieldSetProps = React.ComponentProps<\"fieldset\">\n\nexport const FieldSet = React.forwardRef<HTMLFieldSetElement, FieldSetProps>(\n function FieldSet({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <fieldset\n ref={ref}\n data-slot=\"field-set\"\n {...{ [SLOT_ATTR]: \"field-set\" }}\n className={mergeClasses(styles.fieldSet, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldGroupProps = React.ComponentProps<\"div\"> & {\n direction?: \"column\" | \"row\"\n}\n\nexport const FieldGroup = React.forwardRef<HTMLDivElement, FieldGroupProps>(\n function FieldGroup({ className, direction = \"column\", ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-group\"\n {...{ [SLOT_ATTR]: \"field-group\" }}\n className={mergeClasses(\n styles.fieldGroup,\n direction === \"row\" ? styles.fieldGroupRow : styles.fieldGroupColumn,\n className\n )}\n {...props}\n />\n )\n }\n)\n\nexport type FieldContentProps = React.ComponentProps<\"div\">\n\nexport const FieldContent = React.forwardRef<HTMLDivElement, FieldContentProps>(\n function FieldContent({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-content\"\n {...{ [SLOT_ATTR]: \"field-content\" }}\n className={mergeClasses(styles.fieldContent, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldLabelProps = Omit<\n React.ComponentProps<\"label\">,\n \"className\"\n> & {\n className?: string\n}\n\nexport const FieldLabel = React.forwardRef<HTMLLabelElement, FieldLabelProps>(\n function FieldLabel({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <FieldLabelBase\n ref={ref}\n data-slot=\"field-label\"\n {...{ [SLOT_ATTR]: \"field-label\" }}\n className={mergeClasses(styles.label, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldLabelContentProps = React.ComponentProps<\"div\"> & {\n showOnHover?: boolean\n}\n\nexport const FieldLabelContent = React.forwardRef<\n HTMLDivElement,\n FieldLabelContentProps\n>(function FieldLabelContent({ className, showOnHover = true, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-label-content\"\n {...{ [SLOT_ATTR]: \"field-label-content\" }}\n className={mergeClasses(\n styles.labelContent,\n showOnHover && styles.labelContentHover,\n className\n )}\n {...props}\n />\n )\n})\n\nexport type FieldDescriptionVariant = \"default\" | \"helper\"\n\nexport const fieldDescriptionVariants = ({\n variant = \"default\",\n}: { variant?: FieldDescriptionVariant } = {}) => {\n return variant\n}\n\nexport type FieldDescriptionProps = Omit<\n React.ComponentProps<\"p\">,\n \"className\"\n> & {\n className?: string\n variant?: FieldDescriptionVariant\n}\n\nexport const FieldDescription = React.forwardRef<\n HTMLParagraphElement,\n FieldDescriptionProps\n>(function FieldDescription({ className, variant = \"default\", ...props }, ref) {\n const styles = useStyles()\n\n const variantStyle =\n variant === \"helper\" ? styles.descriptionHelper : styles.descriptionDefault\n\n return (\n <FieldDescriptionBase\n ref={ref}\n data-slot=\"field-description\"\n {...{ [SLOT_ATTR]: \"field-description\" }}\n className={mergeClasses(styles.description, variantStyle, className)}\n {...props}\n />\n )\n})\n\nexport type FieldErrorProps = Omit<React.ComponentProps<\"div\">, \"className\"> & {\n className?: string\n errors?: Array<{ message?: string } | undefined>\n}\n\nexport const FieldError = React.forwardRef<HTMLDivElement, FieldErrorProps>(\n function FieldError({ className, children, errors, ...props }, ref) {\n const styles = useStyles()\n\n const content = React.useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors.length === 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className={styles.errorList}>\n {uniqueErrors.map(\n (error, index) =>\n error?.message && (\n <li className={styles.errorListItem} key={index}>\n {error.message}\n </li>\n )\n )}\n </ul>\n )\n }, [children, errors, styles.errorList, styles.errorListItem])\n\n if (!content) {\n return null\n }\n\n return (\n <FieldErrorBase\n ref={ref}\n role=\"alert\"\n data-slot=\"field-error\"\n {...{ [SLOT_ATTR]: \"field-error\" }}\n className={mergeClasses(styles.error, className)}\n {...props}\n >\n {content}\n </FieldErrorBase>\n )\n }\n)\n\nexport type FieldInputProps = Omit<\n React.ComponentProps<\"input\">,\n \"className\"\n> & {\n className?: string\n}\n\nexport const FieldInput = React.forwardRef<HTMLInputElement, FieldInputProps>(\n function FieldInput({ className, ...props }, forwardedRef) {\n const styles = useStyles()\n const { inputRef } = useFieldContext()\n\n return (\n <FieldControlBase\n ref={(el: HTMLElement | null) => {\n inputRef.current = el as HTMLInputElement | null\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el as HTMLInputElement)\n } else if (forwardedRef) {\n forwardedRef.current = el as HTMLInputElement | null\n }\n }}\n data-readonly={props.readOnly}\n data-slot=\"field-input\"\n {...{ [SLOT_ATTR]: \"field-input\" }}\n className={mergeClasses(styles.input, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldInputGroupProps = React.ComponentProps<\"div\">\n\nexport const FieldInputGroup = React.forwardRef<\n HTMLDivElement,\n FieldInputGroupProps\n>(function FieldInputGroup({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-input-group\"\n {...{ [SLOT_ATTR]: \"field-input-group\" }}\n className={mergeClasses(styles.inputGroup, className)}\n {...props}\n />\n )\n})\n\nexport type FieldTextareaResize = \"none\" | \"vertical\" | \"horizontal\"\n\nexport type FieldTextareaProps = React.ComponentProps<\"textarea\"> & {\n resize?: FieldTextareaResize\n}\n\nexport const FieldTextarea = React.forwardRef<\n HTMLTextAreaElement,\n FieldTextareaProps\n>(function FieldTextarea(\n { className, resize = \"none\", ...props },\n forwardedRef\n) {\n const styles = useStyles()\n const { inputRef } = useFieldContext()\n\n const resizeStyle =\n resize === \"vertical\"\n ? styles.resizeVertical\n : resize === \"horizontal\"\n ? styles.resizeHorizontal\n : styles.resizeNone\n\n return (\n <textarea\n {...props}\n ref={(el: HTMLTextAreaElement | null) => {\n inputRef.current = el\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el)\n } else if (forwardedRef) {\n forwardedRef.current = el\n }\n }}\n data-readonly={props.readOnly}\n data-slot=\"field-textarea\"\n {...{ [SLOT_ATTR]: \"field-textarea\" }}\n data-resize={resize}\n className={mergeClasses(styles.textarea, resizeStyle, className)}\n />\n )\n})\n\nexport type FieldGroupAddonAlign = \"start\" | \"end\"\n\nexport const inputGroupAddonVariants = ({\n align = \"start\",\n}: { align?: FieldGroupAddonAlign } = {}) => {\n return align\n}\n\nexport type FieldGroupAddonProps = React.ComponentProps<\"div\"> & {\n align?: FieldGroupAddonAlign\n}\n\nexport const FieldGroupAddon = React.forwardRef<\n HTMLDivElement,\n FieldGroupAddonProps\n>(function FieldGroupAddon({ className, align = \"start\", ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n role=\"group\"\n data-slot=\"input-group-addon\"\n {...{ [SLOT_ATTR]: \"input-group-addon\" }}\n data-align={align}\n className={mergeClasses(\n styles.addon,\n align === \"end\" ? styles.addonEnd : styles.addonStart,\n className\n )}\n {...props}\n />\n )\n})\n"],"names":["FieldRootBase","FieldLabelBase","FieldControlBase","FieldDescriptionBase","FieldErrorBase","FieldContext","React","useFieldContext","context","useOptionalFieldContext","useStyles","makeVoltStyles","tokens.spacingElement2","tokens.spacingElement3","shorthands","tokens.spacingElement1","tokens.radiusLg","tokens.semErrorSoft","tokens.errorA8","SLOT_ATTR","tokens.grayA3","tokens.grayA4","tokens.accentA8","tokens.accentA3","tokens.accentA4","tokens.errorA4","tokens.spacingLayout2","tokens.textXs","tokens.leadingXs","tokens.grayA12","tokens.fontWeightNormal","tokens.grayA11","tokens.errorA11","tokens.textSm","tokens.leadingSm","tokens.grayA8","fieldVariants","variant","Field","className","children","onFocusCapture","onBlurCapture","props","ref","styles","inputRef","isFocused","setIsFocused","handleFocusCapture","event","handleBlurCapture","variantStyle","jsx","mergeClasses","FieldSet","FieldGroup","direction","FieldContent","FieldLabel","FieldLabelContent","showOnHover","fieldDescriptionVariants","FieldDescription","FieldError","errors","content","uniqueErrors","error","_a","index","FieldInput","forwardedRef","el","FieldInputGroup","FieldTextarea","resize","resize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cAAY4D;AAAA,MACZ,WAAWzB;AAAAA,QACTT,EAAO;AAAA,QACPkC,MAAU,QAAQlC,EAAO,WAAWA,EAAO;AAAA,QAC3CN;AAAA,MAAA;AAAA,MAED,GAAGI;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;"}
|
|
1
|
+
{"version":3,"file":"field.js","sources":["../../../src/components/field/field.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { mergeClasses, shorthands } from \"@epilot/volt-ui-runtime\"\n\nimport { SLOT_ATTR } from \"../../renderer/contract\"\nimport { makeVoltStyles } from \"../../styles/make-styles\"\nimport * as tokens from \"../../tokens\"\n\n/**\n * Plain elements, not a primitive.\n *\n * v1's Field uses no Radix primitive at all — it is a custom implementation with its own context,\n * and v2 already had the same context (`FieldContext`, carrying `inputRef`). Base UI's Field parts\n * were only supplying the elements, and these are the elements they rendered: Root a div, Label a\n * label, Control an input, Description a p, Error a div. Substituting them is element-identical, so\n * nothing moves visually.\n *\n * **What is genuinely lost:** Base UI's Field also wired label-to-control association and\n * `aria-describedby` automatically. v1 does not do that either — its context carries only `inputRef`\n * — so this matches production rather than regressing against it, but it is a real accessibility\n * affordance that Base UI gave for free and is worth revisiting on its own terms.\n */\nconst FieldRootBase = \"div\" as const\nconst FieldLabelBase = \"label\" as const\nconst FieldControlBase = \"input\" as const\nconst FieldDescriptionBase = \"p\" as const\nconst FieldErrorBase = \"div\" as const\n\nexport type FieldInputRef =\n | HTMLInputElement\n | HTMLTextAreaElement\n | HTMLSelectElement\n | HTMLButtonElement\n | null\n\nexport interface FieldContextValue {\n inputRef: React.RefObject<FieldInputRef>\n}\n\nconst FieldContext = React.createContext<FieldContextValue | null>(null)\n\nexport const useFieldContext = () => {\n const context = React.useContext(FieldContext)\n if (!context) {\n throw new Error(\"FieldInput must be used within a Field component\")\n }\n return context\n}\n\n/**\n * Field context when there is one, `null` otherwise — for parts that work both inside and outside a\n * Field.\n *\n * `useFieldContext` throws by design, which is right for FieldInput (it is meaningless on its own)\n * and wrong for SelectTrigger and the combobox trigger, which are legitimate standalone components\n * that merely pick up field wiring when nested. Those were calling the throwing hook inside a\n * try/catch, i.e. using an exception for control flow on every render of a perfectly valid tree.\n */\nexport const useOptionalFieldContext = (): FieldContextValue | null =>\n React.useContext(FieldContext)\n\nexport type FieldVariant = \"default\" | \"highlight\" | \"readonly\" | \"destructive\"\n\nconst useStyles = makeVoltStyles({\n root: {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n // Density-bound (DENSITY-SPEC.md §2.3, WP9B1-ACCEPTANCE-WP9B2A): normal resolves to the same\n // spacingElement2/spacingElement3 values this used before binding — `spacingGroup1` (0.5rem)\n // is a half-step short of the 0.75rem v1 actually uses, which three components got wrong by\n // reaching for it directly; that pitfall is why fieldPaddingX's normal tier aliases\n // spacingElement3, not spacingGroup1 (packages/tokens/spec/density.yaml).\n paddingTop: tokens.fieldPaddingY,\n paddingBottom: tokens.fieldPaddingY,\n paddingLeft: tokens.fieldPaddingX,\n paddingRight: tokens.fieldPaddingX,\n ...shorthands.gap(tokens.spacingElement1),\n ...shorthands.borderRadius(tokens.radiusLg),\n transitionProperty: \"all\",\n transitionDuration: \"75ms\",\n outlineOffset: \"2px\",\n outlineWidth: \"2px\",\n outlineStyle: \"none\",\n \"@media (prefers-reduced-motion: reduce)\": {\n transitionDuration: \"0.01ms\",\n },\n \"&[data-focused='true'], &[data-focus-visible]\": {\n outlineStyle: \"solid\",\n outlineColor: tokens.semFocusRing,\n },\n \"&[data-invalid]\": {\n backgroundColor: tokens.semErrorSoft,\n },\n\n // Label's disabled styling, declared here because Field owns the elements these selectors are\n // rooted at. On Label they were written as \"[data-disabled] &\", \":disabled ~ &\" and\n // \"[data-disabled] ~ &\"; Griffel does not substitute `&` in that position and emits\n // `.hash<selector> .hash`, which never matches, so a label in a disabled field never dimmed.\n // See src/ancestor-selector.test.ts.\n [`&[data-disabled] [${SLOT_ATTR}=\"label\"]`]: {\n pointerEvents: \"none\",\n opacity: 0.5,\n },\n [`& :disabled ~ [${SLOT_ATTR}=\"label\"]`]: {\n cursor: \"not-allowed\",\n opacity: 0.5,\n },\n [`& [data-disabled] ~ [${SLOT_ATTR}=\"label\"]`]: {\n cursor: \"not-allowed\",\n opacity: 0.5,\n },\n },\n rootDefault: {\n backgroundColor: tokens.grayA3,\n \":hover\": {\n backgroundColor: tokens.grayA4,\n },\n },\n rootHighlight: {\n backgroundColor: tokens.accentA3,\n \":hover\": {\n backgroundColor: tokens.accentA4,\n },\n },\n rootReadonly: {\n backgroundColor: tokens.grayA3,\n },\n rootDestructive: {\n backgroundColor: tokens.semErrorSoft,\n \":hover\": {\n backgroundColor: tokens.errorA4,\n },\n },\n fieldSet: {\n display: \"flex\",\n flexDirection: \"column\",\n // Density-bound (DENSITY-SPEC.md §2.3): normal resolves to the same spacingLayout2 (32px)\n // this used before binding.\n ...shorthands.gap(tokens.fieldSetGap),\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n ...shorthands.margin(0),\n },\n fieldGroup: {\n display: \"flex\",\n width: \"100%\",\n ...shorthands.gap(tokens.spacingElement2),\n },\n fieldGroupColumn: {\n flexDirection: \"column\",\n },\n fieldGroupRow: {\n flexDirection: \"row\",\n },\n fieldContent: {\n display: \"flex\",\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: \"0%\",\n flexDirection: \"column\",\n ...shorthands.gap(tokens.spacingElement2),\n lineHeight: \"1.375\",\n },\n label: {\n minHeight: \"1rem\",\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n display: \"flex\",\n width: \"fit-content\",\n ...shorthands.gap(tokens.spacingElement2),\n cursor: \"default\",\n color: tokens.grayA12,\n \"&[data-disabled]\": {\n opacity: 0.5,\n },\n },\n labelContent: {\n display: \"inline-flex\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement1),\n transitionProperty: \"opacity\",\n transitionDuration: \"150ms\",\n \"@media (prefers-reduced-motion: reduce)\": {\n transitionDuration: \"0.01ms\",\n },\n },\n labelContentHover: {\n width: 0,\n height: 0,\n overflowX: \"visible\",\n overflowY: \"visible\",\n opacity: 0,\n pointerEvents: \"none\",\n },\n description: {\n fontSize: tokens.textXs,\n lineHeight: \"1.5\",\n fontWeight: tokens.fontWeightNormal,\n ...shorthands.margin(0),\n \"& a\": {\n textDecorationLine: \"underline\",\n textUnderlineOffset: \"4px\",\n },\n },\n descriptionDefault: {\n color: tokens.grayA12,\n },\n descriptionHelper: {\n color: tokens.grayA11,\n },\n error: {\n color: tokens.semErrorOnSoft,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n fontWeight: tokens.fontWeightNormal,\n },\n errorList: {\n display: \"flex\",\n flexDirection: \"column\",\n ...shorthands.margin(0),\n paddingLeft: \"1.25rem\",\n listStyleType: \"disc\",\n },\n errorListItem: {\n color: tokens.semErrorOnSoft,\n fontSize: tokens.textXs,\n lineHeight: tokens.leadingXs,\n fontWeight: tokens.fontWeightNormal,\n marginTop: \"0.25rem\",\n marginBottom: \"0.25rem\",\n },\n input: {\n width: \"100%\",\n // Density-bound (DENSITY-SPEC.md §2.3): normal resolves to the same \"1.5rem\" this used before\n // binding. FieldComboboxInput (field-combobox.tsx) has its OWN separate makeVoltStyles call\n // and its own unrelated \"input\" key (width: \"100%\" only, no height) — this binding does not\n // reach it; CALIPER-WP9B2A-REVIEW-1.md corrected an earlier claim that it did.\n height: tokens.fieldInputHeight,\n outlineStyle: \"none\",\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n color: tokens.grayA12,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \"::placeholder\": {\n color: tokens.grayA8,\n },\n \":disabled\": {\n cursor: \"not-allowed\",\n },\n },\n inputGroup: {\n display: \"flex\",\n alignItems: \"center\",\n ...shorthands.gap(tokens.spacingElement1),\n width: \"100%\",\n },\n textarea: {\n width: \"100%\",\n outlineStyle: \"none\",\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n color: tokens.grayA12,\n backgroundColor: \"transparent\",\n ...shorthands.border(\"0\"),\n ...shorthands.padding(0),\n \"::placeholder\": {\n color: tokens.grayA8,\n },\n \":disabled\": {\n cursor: \"not-allowed\",\n },\n },\n resizeNone: {\n resize: \"none\",\n },\n resizeVertical: {\n resize: \"vertical\",\n },\n resizeHorizontal: {\n resize: \"horizontal\",\n },\n addon: {\n color: tokens.grayA11,\n display: \"flex\",\n height: \"auto\",\n cursor: \"text\",\n whiteSpace: \"nowrap\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...shorthands.gap(tokens.spacingElement2),\n fontSize: tokens.textSm,\n lineHeight: tokens.leadingSm,\n fontWeight: tokens.fontWeightNormal,\n userSelect: \"none\",\n },\n addonStart: {\n order: -1,\n },\n addonEnd: {\n order: 1,\n },\n})\n\n// fieldVariants helper for v1 API compatibility\nexport const fieldVariants = ({\n variant = \"default\",\n}: { variant?: FieldVariant } = {}) => {\n return variant\n}\n\nexport type FieldProps = Omit<React.ComponentProps<\"div\">, \"className\"> & {\n className?: string\n variant?: FieldVariant\n}\n\nexport const Field = React.forwardRef<HTMLDivElement, FieldProps>(\n function Field(\n {\n className,\n variant = \"default\",\n children,\n onFocusCapture,\n onBlurCapture,\n ...props\n },\n ref\n ) {\n const styles = useStyles()\n const inputRef = React.useRef<FieldInputRef>(null)\n const [isFocused, setIsFocused] = React.useState(false)\n\n const handleFocusCapture: React.ComponentProps<\"div\">[\"onFocusCapture\"] = (\n event\n ) => {\n setIsFocused(true)\n onFocusCapture?.(event)\n }\n\n const handleBlurCapture: React.ComponentProps<\"div\">[\"onBlurCapture\"] = (\n event\n ) => {\n setIsFocused(false)\n onBlurCapture?.(event)\n }\n\n const variantStyle =\n variant === \"highlight\"\n ? styles.rootHighlight\n : variant === \"readonly\"\n ? styles.rootReadonly\n : variant === \"destructive\"\n ? styles.rootDestructive\n : styles.rootDefault\n\n return (\n <FieldContext.Provider value={{ inputRef }}>\n <FieldRootBase\n ref={ref}\n role=\"group\"\n data-slot=\"field\"\n {...{ [SLOT_ATTR]: \"field\" }}\n data-focused={isFocused ? \"true\" : \"false\"}\n className={mergeClasses(styles.root, variantStyle, className)}\n onFocusCapture={handleFocusCapture}\n onBlurCapture={handleBlurCapture}\n {...props}\n >\n {children}\n </FieldRootBase>\n </FieldContext.Provider>\n )\n }\n)\n\nexport type FieldSetProps = React.ComponentProps<\"fieldset\">\n\nexport const FieldSet = React.forwardRef<HTMLFieldSetElement, FieldSetProps>(\n function FieldSet({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <fieldset\n ref={ref}\n data-slot=\"field-set\"\n {...{ [SLOT_ATTR]: \"field-set\" }}\n className={mergeClasses(styles.fieldSet, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldGroupProps = React.ComponentProps<\"div\"> & {\n direction?: \"column\" | \"row\"\n}\n\nexport const FieldGroup = React.forwardRef<HTMLDivElement, FieldGroupProps>(\n function FieldGroup({ className, direction = \"column\", ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-group\"\n {...{ [SLOT_ATTR]: \"field-group\" }}\n className={mergeClasses(\n styles.fieldGroup,\n direction === \"row\" ? styles.fieldGroupRow : styles.fieldGroupColumn,\n className\n )}\n {...props}\n />\n )\n }\n)\n\nexport type FieldContentProps = React.ComponentProps<\"div\">\n\nexport const FieldContent = React.forwardRef<HTMLDivElement, FieldContentProps>(\n function FieldContent({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-content\"\n {...{ [SLOT_ATTR]: \"field-content\" }}\n className={mergeClasses(styles.fieldContent, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldLabelProps = Omit<\n React.ComponentProps<\"label\">,\n \"className\"\n> & {\n className?: string\n}\n\nexport const FieldLabel = React.forwardRef<HTMLLabelElement, FieldLabelProps>(\n function FieldLabel({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <FieldLabelBase\n ref={ref}\n data-slot=\"field-label\"\n {...{ [SLOT_ATTR]: \"field-label\" }}\n className={mergeClasses(styles.label, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldLabelContentProps = React.ComponentProps<\"div\"> & {\n showOnHover?: boolean\n}\n\nexport const FieldLabelContent = React.forwardRef<\n HTMLDivElement,\n FieldLabelContentProps\n>(function FieldLabelContent({ className, showOnHover = true, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-label-content\"\n {...{ [SLOT_ATTR]: \"field-label-content\" }}\n className={mergeClasses(\n styles.labelContent,\n showOnHover && styles.labelContentHover,\n className\n )}\n {...props}\n />\n )\n})\n\nexport type FieldDescriptionVariant = \"default\" | \"helper\"\n\nexport const fieldDescriptionVariants = ({\n variant = \"default\",\n}: { variant?: FieldDescriptionVariant } = {}) => {\n return variant\n}\n\nexport type FieldDescriptionProps = Omit<\n React.ComponentProps<\"p\">,\n \"className\"\n> & {\n className?: string\n variant?: FieldDescriptionVariant\n}\n\nexport const FieldDescription = React.forwardRef<\n HTMLParagraphElement,\n FieldDescriptionProps\n>(function FieldDescription({ className, variant = \"default\", ...props }, ref) {\n const styles = useStyles()\n\n const variantStyle =\n variant === \"helper\" ? styles.descriptionHelper : styles.descriptionDefault\n\n return (\n <FieldDescriptionBase\n ref={ref}\n data-slot=\"field-description\"\n {...{ [SLOT_ATTR]: \"field-description\" }}\n className={mergeClasses(styles.description, variantStyle, className)}\n {...props}\n />\n )\n})\n\nexport type FieldErrorProps = Omit<React.ComponentProps<\"div\">, \"className\"> & {\n className?: string\n errors?: Array<{ message?: string } | undefined>\n}\n\nexport const FieldError = React.forwardRef<HTMLDivElement, FieldErrorProps>(\n function FieldError({ className, children, errors, ...props }, ref) {\n const styles = useStyles()\n\n const content = React.useMemo(() => {\n if (children) {\n return children\n }\n\n if (!errors?.length) {\n return null\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ]\n\n if (uniqueErrors.length === 1) {\n return uniqueErrors[0]?.message\n }\n\n return (\n <ul className={styles.errorList}>\n {uniqueErrors.map(\n (error, index) =>\n error?.message && (\n <li className={styles.errorListItem} key={index}>\n {error.message}\n </li>\n )\n )}\n </ul>\n )\n }, [children, errors, styles.errorList, styles.errorListItem])\n\n if (!content) {\n return null\n }\n\n return (\n <FieldErrorBase\n ref={ref}\n role=\"alert\"\n data-slot=\"field-error\"\n {...{ [SLOT_ATTR]: \"field-error\" }}\n className={mergeClasses(styles.error, className)}\n {...props}\n >\n {content}\n </FieldErrorBase>\n )\n }\n)\n\nexport type FieldInputProps = Omit<\n React.ComponentProps<\"input\">,\n \"className\"\n> & {\n className?: string\n}\n\nexport const FieldInput = React.forwardRef<HTMLInputElement, FieldInputProps>(\n function FieldInput({ className, ...props }, forwardedRef) {\n const styles = useStyles()\n const { inputRef } = useFieldContext()\n\n return (\n <FieldControlBase\n ref={(el: HTMLElement | null) => {\n inputRef.current = el as HTMLInputElement | null\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el as HTMLInputElement)\n } else if (forwardedRef) {\n forwardedRef.current = el as HTMLInputElement | null\n }\n }}\n data-readonly={props.readOnly}\n data-slot=\"field-input\"\n {...{ [SLOT_ATTR]: \"field-input\" }}\n className={mergeClasses(styles.input, className)}\n {...props}\n />\n )\n }\n)\n\nexport type FieldInputGroupProps = React.ComponentProps<\"div\">\n\nexport const FieldInputGroup = React.forwardRef<\n HTMLDivElement,\n FieldInputGroupProps\n>(function FieldInputGroup({ className, ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n data-slot=\"field-input-group\"\n {...{ [SLOT_ATTR]: \"field-input-group\" }}\n className={mergeClasses(styles.inputGroup, className)}\n {...props}\n />\n )\n})\n\nexport type FieldTextareaResize = \"none\" | \"vertical\" | \"horizontal\"\n\nexport type FieldTextareaProps = React.ComponentProps<\"textarea\"> & {\n resize?: FieldTextareaResize\n}\n\nexport const FieldTextarea = React.forwardRef<\n HTMLTextAreaElement,\n FieldTextareaProps\n>(function FieldTextarea(\n { className, resize = \"none\", ...props },\n forwardedRef\n) {\n const styles = useStyles()\n const { inputRef } = useFieldContext()\n\n const resizeStyle =\n resize === \"vertical\"\n ? styles.resizeVertical\n : resize === \"horizontal\"\n ? styles.resizeHorizontal\n : styles.resizeNone\n\n return (\n <textarea\n {...props}\n ref={(el: HTMLTextAreaElement | null) => {\n inputRef.current = el\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el)\n } else if (forwardedRef) {\n forwardedRef.current = el\n }\n }}\n data-readonly={props.readOnly}\n data-slot=\"field-textarea\"\n {...{ [SLOT_ATTR]: \"field-textarea\" }}\n data-resize={resize}\n className={mergeClasses(styles.textarea, resizeStyle, className)}\n />\n )\n})\n\nexport type FieldGroupAddonAlign = \"start\" | \"end\"\n\nexport const inputGroupAddonVariants = ({\n align = \"start\",\n}: { align?: FieldGroupAddonAlign } = {}) => {\n return align\n}\n\nexport type FieldGroupAddonProps = React.ComponentProps<\"div\"> & {\n align?: FieldGroupAddonAlign\n}\n\nexport const FieldGroupAddon = React.forwardRef<\n HTMLDivElement,\n FieldGroupAddonProps\n>(function FieldGroupAddon({ className, align = \"start\", ...props }, ref) {\n const styles = useStyles()\n\n return (\n <div\n ref={ref}\n role=\"group\"\n data-slot=\"input-group-addon\"\n {...{ [SLOT_ATTR]: \"input-group-addon\" }}\n data-align={align}\n className={mergeClasses(\n styles.addon,\n align === \"end\" ? styles.addonEnd : styles.addonStart,\n className\n )}\n {...props}\n />\n )\n})\n"],"names":["FieldRootBase","FieldLabelBase","FieldControlBase","FieldDescriptionBase","FieldErrorBase","FieldContext","React","useFieldContext","context","useOptionalFieldContext","useStyles","makeVoltStyles","tokens.fieldPaddingY","tokens.fieldPaddingX","shorthands","tokens.spacingElement1","tokens.radiusLg","tokens.semFocusRing","tokens.semErrorSoft","SLOT_ATTR","tokens.grayA3","tokens.grayA4","tokens.accentA3","tokens.accentA4","tokens.errorA4","tokens.fieldSetGap","tokens.spacingElement2","tokens.textXs","tokens.leadingXs","tokens.grayA12","tokens.fontWeightNormal","tokens.grayA11","tokens.semErrorOnSoft","tokens.fieldInputHeight","tokens.textSm","tokens.leadingSm","tokens.grayA8","fieldVariants","variant","Field","className","children","onFocusCapture","onBlurCapture","props","ref","styles","inputRef","isFocused","setIsFocused","handleFocusCapture","event","handleBlurCapture","variantStyle","jsx","mergeClasses","FieldSet","FieldGroup","direction","FieldContent","FieldLabel","FieldLabelContent","showOnHover","fieldDescriptionVariants","FieldDescription","FieldError","errors","content","uniqueErrors","error","_a","index","FieldInput","forwardedRef","el","FieldInputGroup","FieldTextarea","resize","resizeStyle","inputGroupAddonVariants","align","FieldGroupAddon"],"mappings":";;;;;;;AAsBA,MAAMA,IAAgB,OAChBC,IAAiB,SACjBC,IAAmB,SACnBC,IAAuB,KACvBC,IAAiB,OAajBC,IAAeC,EAAM,cAAwC,IAAI,GAE1DC,IAAkB,MAAM;AACnC,QAAMC,IAAUF,EAAM,WAAWD,CAAY;AAC7C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,kDAAkD;AAEpE,SAAOA;AACT,GAWaC,KAA0B,MACrCH,EAAM,WAAWD,CAAY,GAIzBK,IAAYC,EAAe;AAAA,EAC/B,MAAM;AAAA,IACJ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMP,YAAYC;AAAAA,IACZ,eAAeA;AAAAA,IACf,aAAaC;AAAAA,IACb,cAAcA;AAAAA,IACd,GAAGC,EAAW,IAAIC,CAAsB;AAAA,IACxC,GAAGD,EAAW,aAAaE,CAAe;AAAA,IAC1C,oBAAoB;AAAA,IACpB,oBAAoB;AAAA,IACpB,eAAe;AAAA,IACf,cAAc;AAAA,IACd,cAAc;AAAA,IACd,2CAA2C;AAAA,MACzC,oBAAoB;AAAA,IAAA;AAAA,IAEtB,iDAAiD;AAAA,MAC/C,cAAc;AAAA,MACd,cAAcC;A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