@epilot/zenith-react 0.1.0 → 0.2.0-next.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.
@@ -1,30 +1,66 @@
1
- import { jsx as s } from "react/jsx-runtime";
1
+ import { jsx as c } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
- import { mergeClasses as f, SLOT_ATTR as c, shorthands as r } from "@epilot/zenith-runtime/v1";
3
+ import { mergeClasses as f, SLOT_ATTR as r, shorthands as d } from "@epilot/zenith-runtime/v1";
4
4
  import { makeZenithStyles as W } from "../../styles/make-styles.js";
5
- import { fontWeightNormal as b, leadingSm as v, textSm as C, grayA11 as H, grayA8 as G, grayA12 as x, fieldInputHeight as P, leadingXs as D, textXs as F, errorOnSoft as N, errorA4 as V, errorSoft as L, grayA3 as I, accentA4 as X, accentA3 as $, grayA4 as j, focusRing as M, fieldPaddingX as k, fieldPaddingY as A, spacingElement2 as S, spacingElement1 as z, fieldSetGap as Y, radiusLg as q } from "../../tokens/index.js";
6
- const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createContext(null), E = () => {
7
- const l = a.useContext(R);
8
- if (!l)
5
+ import { fontWeightNormal as b, leadingSm as v, textSm as R, grayA11 as z, grayA8 as N, grayA12 as S, fieldPaddingY as L, fieldInputHeight as P, leadingXs as D, textXs as x, errorOnSoft as O, errorA4 as V, errorSoft as G, grayA3 as H, accentA4 as j, accentA3 as M, grayA4 as X, focusRing as Y, spacingElement1 as F, fieldPaddingX as I, spacingElement2 as C, fieldSetGap as q, radiusLg as U } from "../../tokens/index.js";
6
+ const Z = "div", J = "label", K = "input", Q = "p", ee = "div", E = a.createContext(null), T = () => {
7
+ const n = a.useContext(E);
8
+ if (!n)
9
9
  throw new Error("FieldInput must be used within a Field component");
10
- return l;
11
- }, ne = () => a.useContext(R), p = W({
10
+ return n;
11
+ }, ce = () => a.useContext(E), A = ["field-input", "field-textarea", "select-trigger"], te = ["field-label", "label"], oe = { cursor: "not-allowed", opacity: 0.5 }, ne = () => Object.fromEntries(
12
+ [
13
+ "&[data-disabled]",
14
+ ...A.map(
15
+ (n) => `&:has([${r}="${n}"]:disabled)`
16
+ )
17
+ ].flatMap(
18
+ (n) => te.map((l) => [
19
+ `${n} [${r}="${l}"]`,
20
+ oe
21
+ ])
22
+ )
23
+ ), $ = {
24
+ alignSelf: "center",
25
+ marginTop: `calc(-1 * ${L})`,
26
+ marginBottom: `calc(-1 * ${L})`
27
+ }, ie = [...A, "field-input-group"], le = () => Object.fromEntries([
28
+ ["& > *", { gridColumnStart: 1, gridColumnEnd: -1 }],
29
+ ...ie.flatMap((n) => [
30
+ [
31
+ `& > [${r}="${n}"]`,
32
+ { gridColumnStart: 1, gridColumnEnd: 2 }
33
+ ],
34
+ [
35
+ `& > [${r}="${n}"] + :not([${r}])`,
36
+ {
37
+ gridColumnStart: 2,
38
+ gridColumnEnd: 3,
39
+ marginLeft: F,
40
+ ...$
41
+ }
42
+ ]
43
+ ])
44
+ ]), p = W({
12
45
  root: {
13
46
  position: "relative",
14
- display: "flex",
15
- flexDirection: "column",
47
+ // A grid, not a column, so an injected button can sit beside the control (see BESIDE_CONTROL).
48
+ // The second column is empty and zero-wide unless something is injected.
49
+ display: "grid",
50
+ gridTemplateColumns: "minmax(0, 1fr) auto",
16
51
  width: "100%",
17
52
  // Density-bound (DENSITY-SPEC.md §2.3, WP9B1-ACCEPTANCE-WP9B2A): normal resolves to the same
18
53
  // spacingElement2/spacingElement3 values this used before binding — `spacingGroup1` (0.5rem)
19
54
  // is a half-step short of the 0.75rem v1 actually uses, which three components got wrong by
20
55
  // reaching for it directly; that pitfall is why fieldPaddingX's normal tier aliases
21
56
  // spacingElement3, not spacingGroup1 (packages/tokens/spec/density.yaml).
22
- paddingTop: A,
23
- paddingBottom: A,
24
- paddingLeft: k,
25
- paddingRight: k,
26
- ...r.gap(z),
27
- ...r.borderRadius(q),
57
+ paddingTop: L,
58
+ paddingBottom: L,
59
+ paddingLeft: I,
60
+ paddingRight: I,
61
+ // Row gap only: a column gap would narrow the control even while the second column is empty.
62
+ rowGap: F,
63
+ ...d.borderRadius(U),
28
64
  transitionProperty: "all",
29
65
  transitionDuration: "75ms",
30
66
  outlineOffset: "2px",
@@ -35,46 +71,38 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
35
71
  },
36
72
  "&[data-focused='true'], &[data-focus-visible]": {
37
73
  outlineStyle: "solid",
38
- outlineColor: M
74
+ outlineColor: Y
39
75
  },
40
76
  "&[data-invalid]": {
41
- backgroundColor: L
77
+ backgroundColor: G
42
78
  },
43
79
  // Label's disabled styling, declared here because Field owns the elements these selectors are
44
80
  // rooted at. On Label they were written as "[data-disabled] &", ":disabled ~ &" and
45
81
  // "[data-disabled] ~ &"; Griffel does not substitute `&` in that position and emits
46
82
  // `.hash<selector> .hash`, which never matches, so a label in a disabled field never dimmed.
47
- // See src/ancestor-selector.test.ts.
48
- [`&[data-disabled] [${c}="label"]`]: {
49
- pointerEvents: "none",
50
- opacity: 0.5
51
- },
52
- [`& :disabled ~ [${c}="label"]`]: {
53
- cursor: "not-allowed",
54
- opacity: 0.5
55
- },
56
- [`& [data-disabled] ~ [${c}="label"]`]: {
57
- cursor: "not-allowed",
58
- opacity: 0.5
59
- }
83
+ // See src/ancestor-selector.test.ts. The port of those rules still missed: they named the
84
+ // `label` slot while FieldLabel emits `field-label`, and the `~` forms needed the label AFTER
85
+ // the control, but it comes first. `:has()` reaches the control wherever it sits.
86
+ ...ne(),
87
+ ...le()
60
88
  },
61
89
  rootDefault: {
62
- backgroundColor: I,
90
+ backgroundColor: H,
63
91
  ":hover": {
64
- backgroundColor: j
92
+ backgroundColor: X
65
93
  }
66
94
  },
67
95
  rootHighlight: {
68
- backgroundColor: $,
96
+ backgroundColor: M,
69
97
  ":hover": {
70
- backgroundColor: X
98
+ backgroundColor: j
71
99
  }
72
100
  },
73
101
  rootReadonly: {
74
- backgroundColor: I
102
+ backgroundColor: H
75
103
  },
76
104
  rootDestructive: {
77
- backgroundColor: L,
105
+ backgroundColor: G,
78
106
  ":hover": {
79
107
  backgroundColor: V
80
108
  }
@@ -84,15 +112,15 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
84
112
  flexDirection: "column",
85
113
  // Density-bound (DENSITY-SPEC.md §2.3): normal resolves to the same spacingLayout2 (32px)
86
114
  // this used before binding.
87
- ...r.gap(Y),
88
- ...r.border("0"),
89
- ...r.padding(0),
90
- ...r.margin(0)
115
+ ...d.gap(q),
116
+ ...d.border("0"),
117
+ ...d.padding(0),
118
+ ...d.margin(0)
91
119
  },
92
120
  fieldGroup: {
93
121
  display: "flex",
94
122
  width: "100%",
95
- ...r.gap(S)
123
+ ...d.gap(C)
96
124
  },
97
125
  fieldGroupColumn: {
98
126
  flexDirection: "column"
@@ -106,18 +134,19 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
106
134
  flexShrink: 1,
107
135
  flexBasis: "0%",
108
136
  flexDirection: "column",
109
- ...r.gap(S),
137
+ ...d.gap(C),
110
138
  lineHeight: "1.375"
111
139
  },
112
140
  label: {
113
141
  minHeight: "1rem",
114
- fontSize: F,
142
+ fontSize: x,
115
143
  lineHeight: D,
144
+ // No width: the label stretches across the field's column, so the whole label row is a hit
145
+ // area for the control rather than only the text. Field reads as one box and is aimed at as one.
116
146
  display: "flex",
117
- width: "fit-content",
118
- ...r.gap(S),
147
+ ...d.gap(C),
119
148
  cursor: "default",
120
- color: x,
149
+ color: S,
121
150
  "&[data-disabled]": {
122
151
  opacity: 0.5
123
152
  }
@@ -125,7 +154,7 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
125
154
  labelContent: {
126
155
  display: "inline-flex",
127
156
  alignItems: "center",
128
- ...r.gap(z),
157
+ ...d.gap(F),
129
158
  transitionProperty: "opacity",
130
159
  transitionDuration: "150ms",
131
160
  "@media (prefers-reduced-motion: reduce)": {
@@ -141,37 +170,37 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
141
170
  pointerEvents: "none"
142
171
  },
143
172
  description: {
144
- fontSize: F,
173
+ fontSize: x,
145
174
  lineHeight: "1.5",
146
175
  fontWeight: b,
147
- ...r.margin(0),
176
+ ...d.margin(0),
148
177
  "& a": {
149
178
  textDecorationLine: "underline",
150
179
  textUnderlineOffset: "4px"
151
180
  }
152
181
  },
153
182
  descriptionDefault: {
154
- color: x
183
+ color: S
155
184
  },
156
185
  descriptionHelper: {
157
- color: H
186
+ color: z
158
187
  },
159
188
  error: {
160
- color: N,
161
- fontSize: F,
189
+ color: O,
190
+ fontSize: x,
162
191
  lineHeight: D,
163
192
  fontWeight: b
164
193
  },
165
194
  errorList: {
166
195
  display: "flex",
167
196
  flexDirection: "column",
168
- ...r.margin(0),
197
+ ...d.margin(0),
169
198
  paddingLeft: "1.25rem",
170
199
  listStyleType: "disc"
171
200
  },
172
201
  errorListItem: {
173
- color: N,
174
- fontSize: F,
202
+ color: O,
203
+ fontSize: x,
175
204
  lineHeight: D,
176
205
  fontWeight: b,
177
206
  marginTop: "0.25rem",
@@ -185,14 +214,14 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
185
214
  // reach it; review corrected an earlier claim that it did.
186
215
  height: P,
187
216
  outlineStyle: "none",
188
- fontSize: C,
217
+ fontSize: R,
189
218
  lineHeight: v,
190
- color: x,
219
+ color: S,
191
220
  backgroundColor: "transparent",
192
- ...r.border("0"),
193
- ...r.padding(0),
221
+ ...d.border("0"),
222
+ ...d.padding(0),
194
223
  "::placeholder": {
195
- color: G
224
+ color: N
196
225
  },
197
226
  ":disabled": {
198
227
  cursor: "not-allowed"
@@ -201,20 +230,22 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
201
230
  inputGroup: {
202
231
  display: "flex",
203
232
  alignItems: "center",
204
- ...r.gap(z),
205
- width: "100%"
233
+ ...d.gap(F),
234
+ width: "100%",
235
+ // Already a row, so an injected button lands beside the input; it must not stretch the row.
236
+ [`& > [${r}="field-input"] + :not([${r}])`]: $
206
237
  },
207
238
  textarea: {
208
239
  width: "100%",
209
240
  outlineStyle: "none",
210
- fontSize: C,
241
+ fontSize: R,
211
242
  lineHeight: v,
212
- color: x,
243
+ color: S,
213
244
  backgroundColor: "transparent",
214
- ...r.border("0"),
215
- ...r.padding(0),
245
+ ...d.border("0"),
246
+ ...d.padding(0),
216
247
  "::placeholder": {
217
- color: G
248
+ color: N
218
249
  },
219
250
  ":disabled": {
220
251
  cursor: "not-allowed"
@@ -230,15 +261,15 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
230
261
  resize: "horizontal"
231
262
  },
232
263
  addon: {
233
- color: H,
264
+ color: z,
234
265
  display: "flex",
235
266
  height: "auto",
236
267
  cursor: "text",
237
268
  whiteSpace: "nowrap",
238
269
  alignItems: "center",
239
270
  justifyContent: "center",
240
- ...r.gap(S),
241
- fontSize: C,
271
+ ...d.gap(C),
272
+ fontSize: R,
242
273
  lineHeight: v,
243
274
  fontWeight: b,
244
275
  userSelect: "none"
@@ -249,131 +280,131 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
249
280
  addonEnd: {
250
281
  order: 1
251
282
  }
252
- }), ie = ({
253
- variant: l = "default"
254
- } = {}) => l, le = a.forwardRef(
283
+ }), ue = ({
284
+ variant: n = "default"
285
+ } = {}) => n, fe = a.forwardRef(
255
286
  function({
256
- className: i,
287
+ className: l,
257
288
  variant: e = "default",
258
289
  children: t,
259
290
  onFocusCapture: o,
260
- onBlurCapture: n,
261
- ...d
291
+ onBlurCapture: i,
292
+ ...s
262
293
  }, m) {
263
- const u = p(), h = a.useRef(null), [g, y] = a.useState(!1), T = (w) => {
294
+ const u = p(), h = a.useRef(null), [g, y] = a.useState(!1), k = (w) => {
264
295
  y(!0), o == null || o(w);
265
- }, O = (w) => {
266
- y(!1), n == null || n(w);
267
- }, B = e === "highlight" ? u.rootHighlight : e === "readonly" ? u.rootReadonly : e === "destructive" ? u.rootDestructive : u.rootDefault;
268
- return /* @__PURE__ */ s(R.Provider, { value: { inputRef: h }, children: /* @__PURE__ */ s(
269
- U,
296
+ }, B = (w) => {
297
+ y(!1), i == null || i(w);
298
+ }, _ = e === "highlight" ? u.rootHighlight : e === "readonly" ? u.rootReadonly : e === "destructive" ? u.rootDestructive : u.rootDefault;
299
+ return /* @__PURE__ */ c(E.Provider, { value: { inputRef: h }, children: /* @__PURE__ */ c(
300
+ Z,
270
301
  {
271
302
  ref: m,
272
303
  role: "group",
273
304
  "data-slot": "field",
274
- [c]: "field",
305
+ [r]: "field",
275
306
  "data-focused": g ? "true" : "false",
276
- className: f(u.root, B, i),
277
- onFocusCapture: T,
278
- onBlurCapture: O,
279
- ...d,
307
+ className: f(u.root, _, l),
308
+ onFocusCapture: k,
309
+ onBlurCapture: B,
310
+ ...s,
280
311
  children: t
281
312
  }
282
313
  ) });
283
314
  }
284
- ), re = a.forwardRef(
285
- function({ className: i, ...e }, t) {
315
+ ), pe = a.forwardRef(
316
+ function({ className: l, ...e }, t) {
286
317
  const o = p();
287
- return /* @__PURE__ */ s(
318
+ return /* @__PURE__ */ c(
288
319
  "fieldset",
289
320
  {
290
321
  ref: t,
291
322
  "data-slot": "field-set",
292
- [c]: "field-set",
293
- className: f(o.fieldSet, i),
323
+ [r]: "field-set",
324
+ className: f(o.fieldSet, l),
294
325
  ...e
295
326
  }
296
327
  );
297
328
  }
298
- ), ae = a.forwardRef(
299
- function({ className: i, direction: e = "column", ...t }, o) {
300
- const n = p();
301
- return /* @__PURE__ */ s(
329
+ ), ge = a.forwardRef(
330
+ function({ className: l, direction: e = "column", ...t }, o) {
331
+ const i = p();
332
+ return /* @__PURE__ */ c(
302
333
  "div",
303
334
  {
304
335
  ref: o,
305
336
  "data-slot": "field-group",
306
- [c]: "field-group",
337
+ [r]: "field-group",
307
338
  className: f(
308
- n.fieldGroup,
309
- e === "row" ? n.fieldGroupRow : n.fieldGroupColumn,
310
- i
339
+ i.fieldGroup,
340
+ e === "row" ? i.fieldGroupRow : i.fieldGroupColumn,
341
+ l
311
342
  ),
312
343
  ...t
313
344
  }
314
345
  );
315
346
  }
316
- ), de = a.forwardRef(
317
- function({ className: i, ...e }, t) {
347
+ ), me = a.forwardRef(
348
+ function({ className: l, ...e }, t) {
318
349
  const o = p();
319
- return /* @__PURE__ */ s(
350
+ return /* @__PURE__ */ c(
320
351
  "div",
321
352
  {
322
353
  ref: t,
323
354
  "data-slot": "field-content",
324
- [c]: "field-content",
325
- className: f(o.fieldContent, i),
355
+ [r]: "field-content",
356
+ className: f(o.fieldContent, l),
326
357
  ...e
327
358
  }
328
359
  );
329
360
  }
330
- ), se = a.forwardRef(
331
- function({ className: i, ...e }, t) {
361
+ ), he = a.forwardRef(
362
+ function({ className: l, ...e }, t) {
332
363
  const o = p();
333
- return /* @__PURE__ */ s(
334
- Z,
364
+ return /* @__PURE__ */ c(
365
+ J,
335
366
  {
336
367
  ref: t,
337
368
  "data-slot": "field-label",
338
- [c]: "field-label",
339
- className: f(o.label, i),
369
+ [r]: "field-label",
370
+ className: f(o.label, l),
340
371
  ...e
341
372
  }
342
373
  );
343
374
  }
344
- ), ce = a.forwardRef(function({ className: i, showOnHover: e = !0, ...t }, o) {
345
- const n = p();
346
- return /* @__PURE__ */ s(
375
+ ), ye = a.forwardRef(function({ className: l, showOnHover: e = !0, ...t }, o) {
376
+ const i = p();
377
+ return /* @__PURE__ */ c(
347
378
  "div",
348
379
  {
349
380
  ref: o,
350
381
  "data-slot": "field-label-content",
351
- [c]: "field-label-content",
382
+ [r]: "field-label-content",
352
383
  className: f(
353
- n.labelContent,
354
- e && n.labelContentHover,
355
- i
384
+ i.labelContent,
385
+ e && i.labelContentHover,
386
+ l
356
387
  ),
357
388
  ...t
358
389
  }
359
390
  );
360
- }), ue = ({
361
- variant: l = "default"
362
- } = {}) => l, fe = a.forwardRef(function({ className: i, variant: e = "default", ...t }, o) {
363
- const n = p(), d = e === "helper" ? n.descriptionHelper : n.descriptionDefault;
364
- return /* @__PURE__ */ s(
365
- J,
391
+ }), be = ({
392
+ variant: n = "default"
393
+ } = {}) => n, Se = a.forwardRef(function({ className: l, variant: e = "default", ...t }, o) {
394
+ const i = p(), s = e === "helper" ? i.descriptionHelper : i.descriptionDefault;
395
+ return /* @__PURE__ */ c(
396
+ Q,
366
397
  {
367
398
  ref: o,
368
399
  "data-slot": "field-description",
369
- [c]: "field-description",
370
- className: f(n.description, d, i),
400
+ [r]: "field-description",
401
+ className: f(i.description, s, l),
371
402
  ...t
372
403
  }
373
404
  );
374
- }), pe = a.forwardRef(
375
- function({ className: i, children: e, errors: t, ...o }, n) {
376
- const d = p(), m = a.useMemo(() => {
405
+ }), xe = a.forwardRef(
406
+ function({ className: l, children: e, errors: t, ...o }, i) {
407
+ const s = p(), m = a.useMemo(() => {
377
408
  var h;
378
409
  if (e)
379
410
  return e;
@@ -382,106 +413,106 @@ const U = "div", Z = "label", _ = "input", J = "p", K = "div", R = a.createConte
382
413
  const u = [
383
414
  ...new Map(t.map((g) => [g == null ? void 0 : g.message, g])).values()
384
415
  ];
385
- return u.length === 1 ? (h = u[0]) == null ? void 0 : h.message : /* @__PURE__ */ s("ul", { className: d.errorList, children: u.map(
386
- (g, y) => (g == null ? void 0 : g.message) && /* @__PURE__ */ s("li", { className: d.errorListItem, children: g.message }, y)
416
+ return u.length === 1 ? (h = u[0]) == null ? void 0 : h.message : /* @__PURE__ */ c("ul", { className: s.errorList, children: u.map(
417
+ (g, y) => (g == null ? void 0 : g.message) && /* @__PURE__ */ c("li", { className: s.errorListItem, children: g.message }, y)
387
418
  ) });
388
- }, [e, t, d.errorList, d.errorListItem]);
389
- return m ? /* @__PURE__ */ s(
390
- K,
419
+ }, [e, t, s.errorList, s.errorListItem]);
420
+ return m ? /* @__PURE__ */ c(
421
+ ee,
391
422
  {
392
- ref: n,
423
+ ref: i,
393
424
  role: "alert",
394
425
  "data-slot": "field-error",
395
- [c]: "field-error",
396
- className: f(d.error, i),
426
+ [r]: "field-error",
427
+ className: f(s.error, l),
397
428
  ...o,
398
429
  children: m
399
430
  }
400
431
  ) : null;
401
432
  }
402
- ), ge = a.forwardRef(
403
- function({ className: i, ...e }, t) {
404
- const o = p(), { inputRef: n } = E();
405
- return /* @__PURE__ */ s(
406
- _,
433
+ ), Ce = a.forwardRef(
434
+ function({ className: l, ...e }, t) {
435
+ const o = p(), { inputRef: i } = T();
436
+ return /* @__PURE__ */ c(
437
+ K,
407
438
  {
408
- ref: (d) => {
409
- n.current = d, typeof t == "function" ? t(d) : t && (t.current = d);
439
+ ref: (s) => {
440
+ i.current = s, typeof t == "function" ? t(s) : t && (t.current = s);
410
441
  },
411
442
  "data-readonly": e.readOnly,
412
443
  "data-slot": "field-input",
413
- [c]: "field-input",
414
- className: f(o.input, i),
444
+ [r]: "field-input",
445
+ className: f(o.input, l),
415
446
  ...e
416
447
  }
417
448
  );
418
449
  }
419
- ), me = a.forwardRef(function({ className: i, ...e }, t) {
450
+ ), Fe = a.forwardRef(function({ className: l, ...e }, t) {
420
451
  const o = p();
421
- return /* @__PURE__ */ s(
452
+ return /* @__PURE__ */ c(
422
453
  "div",
423
454
  {
424
455
  ref: t,
425
456
  "data-slot": "field-input-group",
426
- [c]: "field-input-group",
427
- className: f(o.inputGroup, i),
457
+ [r]: "field-input-group",
458
+ className: f(o.inputGroup, l),
428
459
  ...e
429
460
  }
430
461
  );
431
- }), he = a.forwardRef(function({ className: i, resize: e = "none", ...t }, o) {
432
- const n = p(), { inputRef: d } = E(), m = e === "vertical" ? n.resizeVertical : e === "horizontal" ? n.resizeHorizontal : n.resizeNone;
433
- return /* @__PURE__ */ s(
462
+ }), Le = a.forwardRef(function({ className: l, resize: e = "none", ...t }, o) {
463
+ const i = p(), { inputRef: s } = T(), m = e === "vertical" ? i.resizeVertical : e === "horizontal" ? i.resizeHorizontal : i.resizeNone;
464
+ return /* @__PURE__ */ c(
434
465
  "textarea",
435
466
  {
436
467
  ...t,
437
468
  ref: (u) => {
438
- d.current = u, typeof o == "function" ? o(u) : o && (o.current = u);
469
+ s.current = u, typeof o == "function" ? o(u) : o && (o.current = u);
439
470
  },
440
471
  "data-readonly": t.readOnly,
441
472
  "data-slot": "field-textarea",
442
- [c]: "field-textarea",
473
+ [r]: "field-textarea",
443
474
  "data-resize": e,
444
- className: f(n.textarea, m, i)
475
+ className: f(i.textarea, m, l)
445
476
  }
446
477
  );
447
- }), ye = ({
448
- align: l = "start"
449
- } = {}) => l, be = a.forwardRef(function({ className: i, align: e = "start", ...t }, o) {
450
- const n = p();
451
- return /* @__PURE__ */ s(
478
+ }), we = ({
479
+ align: n = "start"
480
+ } = {}) => n, ve = a.forwardRef(function({ className: l, align: e = "start", ...t }, o) {
481
+ const i = p();
482
+ return /* @__PURE__ */ c(
452
483
  "div",
453
484
  {
454
485
  ref: o,
455
486
  role: "group",
456
487
  "data-slot": "input-group-addon",
457
- [c]: "input-group-addon",
488
+ [r]: "input-group-addon",
458
489
  "data-align": e,
459
490
  className: f(
460
- n.addon,
461
- e === "end" ? n.addonEnd : n.addonStart,
462
- i
491
+ i.addon,
492
+ e === "end" ? i.addonEnd : i.addonStart,
493
+ l
463
494
  ),
464
495
  ...t
465
496
  }
466
497
  );
467
498
  });
468
499
  export {
469
- le as Field,
470
- de as FieldContent,
471
- fe as FieldDescription,
472
- pe as FieldError,
473
- ae as FieldGroup,
474
- be as FieldGroupAddon,
475
- ge as FieldInput,
476
- me as FieldInputGroup,
477
- se as FieldLabel,
478
- ce as FieldLabelContent,
479
- re as FieldSet,
480
- he as FieldTextarea,
481
- ue as fieldDescriptionVariants,
482
- ie as fieldVariants,
483
- ye as inputGroupAddonVariants,
484
- E as useFieldContext,
485
- ne as useOptionalFieldContext
500
+ fe as Field,
501
+ me as FieldContent,
502
+ Se as FieldDescription,
503
+ xe as FieldError,
504
+ ge as FieldGroup,
505
+ ve as FieldGroupAddon,
506
+ Ce as FieldInput,
507
+ Fe as FieldInputGroup,
508
+ he as FieldLabel,
509
+ ye as FieldLabelContent,
510
+ pe as FieldSet,
511
+ Le as FieldTextarea,
512
+ be as fieldDescriptionVariants,
513
+ ue as fieldVariants,
514
+ we as inputGroupAddonVariants,
515
+ T as useFieldContext,
516
+ ce as useOptionalFieldContext
486
517
  };
487
518
  //# sourceMappingURL=field.js.map