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