dawn-ui-react 1.0.0-alpha.2 → 1.0.0-alpha.21
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/dist/CompositeItem-CH9gluPn.js +45 -0
- package/dist/CompositeListContext-DMNULDos.js +15 -0
- package/dist/FieldItemContext-D1iEutzE.js +9 -0
- package/dist/FormContext-DmYxHG1e.js +26 -0
- package/dist/{Input-DXDwtOqf.js → Input-DXQc6T_w.js} +16 -10
- package/dist/LabelableContext-mL6rBiul.js +85 -0
- package/dist/RadioGroupContext-zHzEliyD.js +9 -0
- package/dist/clamp-63kvPeUJ.js +801 -0
- package/dist/{cn-CXogf8HW.js → cn-BSNuKelt.js} +349 -307
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/badge.types.d.ts +1 -0
- package/dist/components/chart/chart-container.d.ts +5 -0
- package/dist/components/chart/chart-legend-content.d.ts +8 -0
- package/dist/components/chart/chart-legend-icon.d.ts +2 -0
- package/dist/components/chart/chart-legend-indicator.d.ts +2 -0
- package/dist/components/chart/chart-legend-label.d.ts +2 -0
- package/dist/components/chart/chart-legend.d.ts +2 -0
- package/dist/components/chart/chart-linear-gradient.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-content.d.ts +3 -0
- package/dist/components/chart/chart-tooltip-icon.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-indicator.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-label.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-name.d.ts +2 -0
- package/dist/components/chart/chart-tooltip-payload.d.ts +4 -0
- package/dist/components/chart/chart-tooltip-value.d.ts +2 -0
- package/dist/components/chart/chart-tooltip.d.ts +2 -0
- package/dist/components/chart/chart.types.d.ts +50 -0
- package/dist/components/chart/chart.utils.d.ts +11 -0
- package/dist/components/chart/index.d.ts +19 -0
- package/dist/components/code-block/code-block-actions.d.ts +2 -0
- package/dist/components/code-block/code-block-copy.d.ts +2 -0
- package/dist/components/code-block/code-block-download.d.ts +2 -0
- package/dist/components/code-block/code-block-header.d.ts +3 -0
- package/dist/components/code-block/code-block-name.d.ts +2 -0
- package/dist/components/code-block/code-block-select.d.ts +2 -0
- package/dist/components/code-block/code-block-tabs.d.ts +2 -0
- package/dist/components/code-block/code-block-window.d.ts +2 -0
- package/dist/components/code-block/code-block.d.ts +3 -0
- package/dist/components/code-block/code-block.types.d.ts +26 -0
- package/dist/components/code-block/index.d.ts +10 -0
- package/dist/components/combobox/combobox-virtualized-list.d.ts +2 -0
- package/dist/components/combobox/combobox.types.d.ts +9 -0
- package/dist/components/combobox/index.d.ts +2 -1
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/drawer/drawer-close.d.ts +2 -0
- package/dist/components/drawer/drawer-content.d.ts +2 -0
- package/dist/components/drawer/drawer-description.d.ts +2 -0
- package/dist/components/drawer/drawer-header.d.ts +2 -0
- package/dist/components/drawer/drawer-popup.d.ts +2 -0
- package/dist/components/drawer/drawer-provider.d.ts +2 -0
- package/dist/components/drawer/drawer-title.d.ts +2 -0
- package/dist/components/drawer/drawer-trigger.d.ts +2 -0
- package/dist/components/drawer/drawer.d.ts +2 -0
- package/dist/components/drawer/drawer.types.d.ts +10 -0
- package/dist/components/drawer/index.d.ts +10 -0
- package/dist/components/field/field-radio.d.ts +2 -0
- package/dist/components/field/field-set.d.ts +2 -0
- package/dist/components/field/field.types.d.ts +3 -1
- package/dist/components/field/index.d.ts +5 -1
- package/dist/components/form/form-context.d.ts +56 -14
- package/dist/components/index.d.ts +3 -0
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/input.types.d.ts +3 -1
- package/dist/components/input-otp/index.d.ts +2 -1
- package/dist/components/input-otp/input-otp-separator.d.ts +2 -0
- package/dist/components/input-otp/input-otp-slot.d.ts +1 -1
- package/dist/components/input-otp/input-otp.types.d.ts +4 -3
- package/dist/components/layer-tree/index.d.ts +5 -1
- package/dist/components/layer-tree/layer-tree-body.d.ts +1 -1
- package/dist/components/layer-tree/layer-tree-footer.d.ts +2 -0
- package/dist/components/layer-tree/layer-tree-node-toggle.d.ts +1 -1
- package/dist/components/layer-tree/layer-tree-node.d.ts +1 -1
- package/dist/components/layer-tree/layer-tree-row.d.ts +1 -1
- package/dist/components/layer-tree/layer-tree-search.d.ts +1 -1
- package/dist/components/layer-tree/layer-tree-sort.d.ts +2 -0
- package/dist/components/layer-tree/layer-tree-utils.d.ts +83 -0
- package/dist/components/layer-tree/layer-tree.d.ts +5 -3
- package/dist/components/layer-tree/layer-tree.types.d.ts +26 -13
- package/dist/components/number-field/number-field.d.ts +1 -1
- package/dist/components/popover/index.d.ts +2 -1
- package/dist/components/popover/popover-button.d.ts +2 -0
- package/dist/components/popover/popover.types.d.ts +2 -0
- package/dist/components/profile/index.d.ts +5 -1
- package/dist/components/profile/profile-action.d.ts +2 -0
- package/dist/components/profile/profile-content.d.ts +2 -0
- package/dist/components/profile/profile-name.d.ts +2 -0
- package/dist/components/profile/profile-subname.d.ts +2 -0
- package/dist/components/profile/profile.d.ts +1 -1
- package/dist/components/profile/profile.types.d.ts +6 -14
- package/dist/components/scroll-area/scroll-area.d.ts +1 -1
- package/dist/components/scroll-area/scroll-area.types.d.ts +6 -2
- package/dist/components/select/select.types.d.ts +5 -0
- package/dist/components/separator/separator.d.ts +1 -1
- package/dist/components/separator/separator.types.d.ts +3 -1
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/slider/slider.types.d.ts +7 -1
- package/dist/components/table/index.d.ts +18 -3
- package/dist/components/table/table-body-grid.d.ts +2 -0
- package/dist/components/table/table-body-list.d.ts +2 -0
- package/dist/components/table/table-change-view.d.ts +1 -3
- package/dist/components/table/table-column-toggle.d.ts +2 -0
- package/dist/components/table/table-container.d.ts +2 -0
- package/dist/components/table/table-data-set-select.d.ts +2 -0
- package/dist/components/table/table-data-set-tabs.d.ts +2 -0
- package/dist/components/table/table-filter-form.d.ts +3 -0
- package/dist/components/table/table-filter.d.ts +1 -1
- package/dist/components/table/table-filters.d.ts +2 -0
- package/dist/components/table/table-header.d.ts +1 -1
- package/dist/components/table/table-pagination.d.ts +1 -1
- package/dist/components/table/table-paging.d.ts +2 -0
- package/dist/components/table/table-row-grid.d.ts +1 -1
- package/dist/components/table/table-row-list.d.ts +1 -1
- package/dist/components/table/table-sort.d.ts +1 -1
- package/dist/components/table/table-toolbar.d.ts +2 -0
- package/dist/components/table/table.constants.d.ts +64 -0
- package/dist/components/table/table.d.ts +14 -5
- package/dist/components/table/table.types.d.ts +73 -15
- package/dist/components/table/table.utils.d.ts +4 -0
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.types.d.ts +4 -1
- package/dist/components/toggle-group/toggle-group.d.ts +1 -1
- package/dist/components/toggle-group/toggle-group.types.d.ts +1 -0
- package/dist/composite-8Z1YCmUf.js +161 -0
- package/dist/composite-DTxBFZq_.js +328 -0
- package/dist/createBaseUIEventDetails-BHkB1IRT.js +36 -0
- package/dist/dawn-ui-react.js +38102 -11554
- package/dist/dawn-ui-react.umd.cjs +176 -27
- package/dist/{form-context-DqrRdk0d.js → form-context-CpevRrMx.js} +541 -515
- package/dist/input.types-DDZuq7AK.js +21 -0
- package/dist/label-C57cQsPN.js +50 -0
- package/dist/owner-CZ-bExcn.js +6 -0
- package/dist/serializeValue-DadF0djs.js +12 -0
- package/dist/shadowDom-nxuQhD_O.js +25 -0
- package/dist/styles.css +149 -118
- package/dist/useBaseUiId-DJ56dhex.js +25 -0
- package/dist/useCompositeListItem-CuKiOJnK.js +53 -0
- package/dist/useControlled-kefeIBTp.js +48 -0
- package/dist/useLabelableId-Cb5S9nao.js +39 -0
- package/dist/useOpenChangeComplete-D1bYAEWf.js +178 -0
- package/dist/useRegisterFieldControl-I4gdfodR.js +27 -0
- package/dist/visuallyHidden-C0MRt467.js +21 -0
- package/package.json +42 -37
- package/dist/clamp-CYKyjuJR.js +0 -3033
- package/dist/components/table/table-body.d.ts +0 -2
- package/dist/field-description-BDRJXMS8.js +0 -12
- package/dist/field-errors-DVQtEKG3.js +0 -19
- package/dist/field-input-Doplzz0V.js +0 -58
- package/dist/field-input-group-CzX_hAjq.js +0 -18
- package/dist/field-input-group-input-micw-J2Y.js +0 -20
- package/dist/field-label-C2atREm0.js +0 -16
- package/dist/field-select--mY7GbNz.js +0 -2149
- package/dist/field-slider-D54-Z8Ds.js +0 -2167
- package/dist/input-group-DgFUfXr7.js +0 -12
- package/dist/input-group-input-DNZQ6g-3.js +0 -11
- package/dist/input.types-D8b-1Bcm.js +0 -21
- package/dist/rolldown-runtime-CAFD8bLK.js +0 -11
- package/dist/useLabelableId-BaWKrZ8_.js +0 -271
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./cn-CXogf8HW.js";
|
|
2
|
-
import { t } from "./input.types-D8b-1Bcm.js";
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/input-group/input-group.tsx
|
|
5
|
-
var r = ({ variant: r, className: i, children: a, ref: o, ...s }) => /* @__PURE__ */ n("div", {
|
|
6
|
-
className: e(t({ variant: r }), "py-xs", i),
|
|
7
|
-
ref: o,
|
|
8
|
-
...s,
|
|
9
|
-
children: a
|
|
10
|
-
});
|
|
11
|
-
//#endregion
|
|
12
|
-
export { r as t };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./cn-CXogf8HW.js";
|
|
2
|
-
import { t } from "./Input-DXDwtOqf.js";
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/input-group/input-group-input.tsx
|
|
5
|
-
var r = ({ className: r, ref: i, ...a }) => /* @__PURE__ */ n(t, {
|
|
6
|
-
className: e("w-full grow text-ellipsis outline-none placeholder:opacity-60 disabled:cursor-not-allowed", r),
|
|
7
|
-
ref: i,
|
|
8
|
-
...a
|
|
9
|
-
});
|
|
10
|
-
//#endregion
|
|
11
|
-
export { r as t };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { _ as e } from "./form-context-DqrRdk0d.js";
|
|
2
|
-
//#region src/components/input/input.types.tsx
|
|
3
|
-
var t = e("group flex w-full items-center rounded-full text-ellipsis caret-brand-border-strong outline outline-transparent transition-all placeholder:opacity-60 focus-within:outline-brand-border-strong not-focus-within:hover:outline-border-strong disabled:cursor-not-allowed aria-invalid:bg-error-container aria-invalid:text-error-on-container aria-invalid:caret-error-border-strong aria-invalid:outline-error-border aria-invalid:focus-within:outline-error-border-strong aria-invalid:not-focus-within:hover:outline-error-border data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50", {
|
|
4
|
-
variants: {
|
|
5
|
-
variant: {
|
|
6
|
-
primary: "bg-surface shadow-2xs",
|
|
7
|
-
secondary: "bg-surface-low"
|
|
8
|
-
},
|
|
9
|
-
size: {
|
|
10
|
-
small: "h-lg gap-3xs px-xs style-text-prose--1",
|
|
11
|
-
medium: "h-xl gap-2xs px-sm style-text-prose-0",
|
|
12
|
-
large: "h-2xl gap-xs px-md style-text-prose-1"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
defaultVariants: {
|
|
16
|
-
variant: "primary",
|
|
17
|
-
size: "medium"
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
//#endregion
|
|
21
|
-
export { t };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var e = Object.defineProperty, t = (t, n) => {
|
|
3
|
-
let r = {};
|
|
4
|
-
for (var i in t) e(r, i, {
|
|
5
|
-
get: t[i],
|
|
6
|
-
enumerable: !0
|
|
7
|
-
});
|
|
8
|
-
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { t };
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import { $ as e, B as t, G as n, I as r, J as i, Q as a, W as o, X as s, Z as c, j as ee } from "./form-context-DqrRdk0d.js";
|
|
2
|
-
import * as l from "react";
|
|
3
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/utils/esm/useControlled.js
|
|
4
|
-
function u({ controlled: t, default: n, name: r, state: i = "value" }) {
|
|
5
|
-
let { current: a } = l.useRef(t !== void 0), [o, s] = l.useState(n), c = a ? t : o;
|
|
6
|
-
if (process.env.NODE_ENV !== "production") {
|
|
7
|
-
l.useEffect(() => {
|
|
8
|
-
a !== (t !== void 0) && e([
|
|
9
|
-
`A component is changing the ${a ? "" : "un"}controlled ${i} state of ${r} to be ${a ? "un" : ""}controlled.`,
|
|
10
|
-
"Elements should not switch from uncontrolled to controlled (or vice versa).",
|
|
11
|
-
`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,
|
|
12
|
-
"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",
|
|
13
|
-
"More info: https://fb.me/react-controlled-components"
|
|
14
|
-
].join("\n"));
|
|
15
|
-
}, [
|
|
16
|
-
i,
|
|
17
|
-
r,
|
|
18
|
-
t
|
|
19
|
-
]);
|
|
20
|
-
let { current: o } = l.useRef(n);
|
|
21
|
-
l.useEffect(() => {
|
|
22
|
-
!a && d(o) !== d(n) && e([`A component is changing the default ${i} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join("\n"));
|
|
23
|
-
}, [n]);
|
|
24
|
-
}
|
|
25
|
-
return [c, l.useCallback((e) => {
|
|
26
|
-
a || s(e);
|
|
27
|
-
}, [])];
|
|
28
|
-
}
|
|
29
|
-
function d(e) {
|
|
30
|
-
let t = 0, n = /* @__PURE__ */ new WeakMap();
|
|
31
|
-
try {
|
|
32
|
-
return JSON.stringify(e, function(e, r) {
|
|
33
|
-
if (!(e === "_owner" && this != null && typeof this == "object" && "$$typeof" in this)) {
|
|
34
|
-
if (typeof r == "bigint") return `__bigint__:${r}`;
|
|
35
|
-
if (typeof r == "object" && r) {
|
|
36
|
-
let e = n.get(r);
|
|
37
|
-
if (e !== void 0) return `__object__:${e}`;
|
|
38
|
-
n.set(r, t), t += 1;
|
|
39
|
-
}
|
|
40
|
-
return r;
|
|
41
|
-
}
|
|
42
|
-
}) ?? `__top__:${typeof e}`;
|
|
43
|
-
} catch {
|
|
44
|
-
return "__unserializable__";
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-fns+tz@1.4.1_@types+react@19.2.14_date-fns@4.1.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/react/esm/internals/reason-parts.js
|
|
49
|
-
var f = "none", p = "trigger-press", m = "trigger-hover", h = "trigger-focus", g = "outside-press", _ = "item-press", v = "close-press", y = "clear-press", b = "chip-remove-press", te = "track-press", ne = "increment-press", re = "decrement-press", ie = "input-change", ae = "input-clear", oe = "input-blur", x = "input-paste", S = "input-press", C = "focus-out", w = "escape-key", T = "list-navigation", E = "keyboard", D = "pointer", O = "drag", k = "scrub", A = "cancel-open", j = "sibling-open", M = "disabled", N = "imperative-action", P = "window-resize";
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-fns+tz@1.4.1_@types+react@19.2.14_date-fns@4.1.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/react/esm/internals/createBaseUIEventDetails.js
|
|
52
|
-
function F(e, t, n, r) {
|
|
53
|
-
let i = !1, a = !1, s = r ?? o;
|
|
54
|
-
return {
|
|
55
|
-
reason: e,
|
|
56
|
-
event: t ?? new Event("base-ui"),
|
|
57
|
-
cancel() {
|
|
58
|
-
i = !0;
|
|
59
|
-
},
|
|
60
|
-
allowPropagation() {
|
|
61
|
-
a = !0;
|
|
62
|
-
},
|
|
63
|
-
get isCanceled() {
|
|
64
|
-
return i;
|
|
65
|
-
},
|
|
66
|
-
get isPropagationAllowed() {
|
|
67
|
-
return a;
|
|
68
|
-
},
|
|
69
|
-
trigger: n,
|
|
70
|
-
...s
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function I(e, t, n) {
|
|
74
|
-
let r = n ?? o;
|
|
75
|
-
return {
|
|
76
|
-
reason: e,
|
|
77
|
-
event: t ?? new Event("base-ui"),
|
|
78
|
-
...r
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
//#endregion
|
|
82
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/utils/esm/useId.js
|
|
83
|
-
var L = 0;
|
|
84
|
-
function R(e, t = "mui") {
|
|
85
|
-
let [n, r] = l.useState(e), i = e || n;
|
|
86
|
-
return l.useEffect(() => {
|
|
87
|
-
n ?? (L += 1, r(`${t}-${L}`));
|
|
88
|
-
}, [n, t]), i;
|
|
89
|
-
}
|
|
90
|
-
var z = t.useId;
|
|
91
|
-
function B(e, t) {
|
|
92
|
-
if (z !== void 0) {
|
|
93
|
-
let n = z();
|
|
94
|
-
return e ?? (t ? `${t}-${n}` : n);
|
|
95
|
-
}
|
|
96
|
-
return R(e, t);
|
|
97
|
-
}
|
|
98
|
-
//#endregion
|
|
99
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-fns+tz@1.4.1_@types+react@19.2.14_date-fns@4.1.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/react/esm/internals/useBaseUiId.js
|
|
100
|
-
function V(e) {
|
|
101
|
-
return B(e, "base-ui");
|
|
102
|
-
}
|
|
103
|
-
//#endregion
|
|
104
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-fns+tz@1.4.1_@types+react@19.2.14_date-fns@4.1.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/react/esm/internals/shadowDom.js
|
|
105
|
-
function H(e) {
|
|
106
|
-
let t = e.activeElement;
|
|
107
|
-
for (; t?.shadowRoot?.activeElement != null;) t = t.shadowRoot.activeElement;
|
|
108
|
-
return t;
|
|
109
|
-
}
|
|
110
|
-
function U(e, t) {
|
|
111
|
-
if (!e || !t) return !1;
|
|
112
|
-
let n = t.getRootNode?.();
|
|
113
|
-
if (e.contains(t)) return !0;
|
|
114
|
-
if (n && r(n)) {
|
|
115
|
-
let n = t;
|
|
116
|
-
for (; n;) {
|
|
117
|
-
if (e === n) return !0;
|
|
118
|
-
n = n.parentNode || n.host;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return !1;
|
|
122
|
-
}
|
|
123
|
-
function W(e) {
|
|
124
|
-
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
125
|
-
}
|
|
126
|
-
//#endregion
|
|
127
|
-
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types+react@19.2.14_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/utils/esm/owner.js
|
|
128
|
-
function G(e) {
|
|
129
|
-
return e?.ownerDocument || document;
|
|
130
|
-
}
|
|
131
|
-
//#endregion
|
|
132
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-fns+tz@1.4.1_@types+react@19.2.14_date-fns@4.1.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/react/esm/field/control/FieldControlDataAttributes.js
|
|
133
|
-
var K = /* @__PURE__ */ function(e) {
|
|
134
|
-
return e.disabled = "data-disabled", e.valid = "data-valid", e.invalid = "data-invalid", e.touched = "data-touched", e.dirty = "data-dirty", e.filled = "data-filled", e.focused = "data-focused", e;
|
|
135
|
-
}({}), q = {
|
|
136
|
-
badInput: !1,
|
|
137
|
-
customError: !1,
|
|
138
|
-
patternMismatch: !1,
|
|
139
|
-
rangeOverflow: !1,
|
|
140
|
-
rangeUnderflow: !1,
|
|
141
|
-
stepMismatch: !1,
|
|
142
|
-
tooLong: !1,
|
|
143
|
-
tooShort: !1,
|
|
144
|
-
typeMismatch: !1,
|
|
145
|
-
valid: null,
|
|
146
|
-
valueMissing: !1
|
|
147
|
-
}, J = {
|
|
148
|
-
valid: null,
|
|
149
|
-
touched: !1,
|
|
150
|
-
dirty: !1,
|
|
151
|
-
filled: !1,
|
|
152
|
-
focused: !1
|
|
153
|
-
}, se = {
|
|
154
|
-
disabled: !1,
|
|
155
|
-
...J
|
|
156
|
-
}, ce = { valid(e) {
|
|
157
|
-
return e === null ? null : e ? { [K.valid]: "" } : { [K.invalid]: "" };
|
|
158
|
-
} }, Y = /* @__PURE__ */ l.createContext({
|
|
159
|
-
invalid: void 0,
|
|
160
|
-
name: void 0,
|
|
161
|
-
validityData: {
|
|
162
|
-
state: q,
|
|
163
|
-
errors: [],
|
|
164
|
-
error: "",
|
|
165
|
-
value: "",
|
|
166
|
-
initialValue: null
|
|
167
|
-
},
|
|
168
|
-
setValidityData: n,
|
|
169
|
-
disabled: void 0,
|
|
170
|
-
touched: J.touched,
|
|
171
|
-
setTouched: n,
|
|
172
|
-
dirty: J.dirty,
|
|
173
|
-
setDirty: n,
|
|
174
|
-
filled: J.filled,
|
|
175
|
-
setFilled: n,
|
|
176
|
-
focused: J.focused,
|
|
177
|
-
setFocused: n,
|
|
178
|
-
validate: () => null,
|
|
179
|
-
validationMode: "onSubmit",
|
|
180
|
-
validationDebounceTime: 0,
|
|
181
|
-
shouldValidateOnChange: () => !1,
|
|
182
|
-
state: se,
|
|
183
|
-
markedDirtyRef: { current: !1 },
|
|
184
|
-
registerFieldControl: n,
|
|
185
|
-
validation: {
|
|
186
|
-
getValidationProps: (e = o) => e,
|
|
187
|
-
getInputValidationProps: (e = o) => e,
|
|
188
|
-
inputRef: { current: null },
|
|
189
|
-
commit: async () => {}
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
process.env.NODE_ENV !== "production" && (Y.displayName = "FieldRootContext");
|
|
193
|
-
function X(e = !0) {
|
|
194
|
-
let t = l.useContext(Y);
|
|
195
|
-
if (t.setValidityData === n && !e) throw Error(process.env.NODE_ENV === "production" ? i(28) : "Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.");
|
|
196
|
-
return t;
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-fns+tz@1.4.1_@types+react@19.2.14_date-fns@4.1.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/react/esm/internals/field-register-control/useRegisterFieldControl.js
|
|
200
|
-
function Z(e, t) {
|
|
201
|
-
let { enabled: n = !0, getValue: r, id: i, value: a } = t, { registerFieldControl: o } = X(), c = l.useRef(null);
|
|
202
|
-
c.current ||= Symbol(), s(() => {
|
|
203
|
-
let t = c.current;
|
|
204
|
-
if (!(!t || !n)) return o(t, {
|
|
205
|
-
controlRef: e,
|
|
206
|
-
getValue: r,
|
|
207
|
-
id: i,
|
|
208
|
-
value: a
|
|
209
|
-
}), () => {
|
|
210
|
-
o(t, void 0);
|
|
211
|
-
};
|
|
212
|
-
}, [
|
|
213
|
-
e,
|
|
214
|
-
n,
|
|
215
|
-
r,
|
|
216
|
-
i,
|
|
217
|
-
o,
|
|
218
|
-
a
|
|
219
|
-
]);
|
|
220
|
-
}
|
|
221
|
-
//#endregion
|
|
222
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-fns+tz@1.4.1_@types+react@19.2.14_date-fns@4.1.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/react/esm/internals/labelable-provider/LabelableContext.js
|
|
223
|
-
var Q = /* @__PURE__ */ l.createContext({
|
|
224
|
-
controlId: void 0,
|
|
225
|
-
registerControlId: n,
|
|
226
|
-
labelId: void 0,
|
|
227
|
-
setLabelId: n,
|
|
228
|
-
messageIds: [],
|
|
229
|
-
setMessageIds: n,
|
|
230
|
-
getDescriptionProps: (e) => e
|
|
231
|
-
});
|
|
232
|
-
process.env.NODE_ENV !== "production" && (Q.displayName = "LabelableContext");
|
|
233
|
-
function $() {
|
|
234
|
-
return l.useContext(Q);
|
|
235
|
-
}
|
|
236
|
-
//#endregion
|
|
237
|
-
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-fns+tz@1.4.1_@types+react@19.2.14_date-fns@4.1.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/@base-ui/react/esm/internals/labelable-provider/useLabelableId.js
|
|
238
|
-
function le(e = {}) {
|
|
239
|
-
let { id: t, implicit: r = !1, controlRef: i } = e, { controlId: o, registerControlId: u } = $(), d = V(t), f = r ? o : void 0, p = a(() => Symbol("labelable-control")), m = l.useRef(!1), h = l.useRef(t != null), g = c(() => {
|
|
240
|
-
!m.current || u === n || (m.current = !1, u(p.current, void 0));
|
|
241
|
-
});
|
|
242
|
-
return s(() => {
|
|
243
|
-
if (u === n) return;
|
|
244
|
-
let e;
|
|
245
|
-
if (r) {
|
|
246
|
-
let n = i?.current;
|
|
247
|
-
e = ee(n) && n.closest("label") != null ? t ?? null : f ?? d;
|
|
248
|
-
} else if (t != null) h.current = !0, e = t;
|
|
249
|
-
else if (h.current) e = d;
|
|
250
|
-
else {
|
|
251
|
-
g();
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
if (e === void 0) {
|
|
255
|
-
g();
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
m.current = !0, u(p.current, e);
|
|
259
|
-
}, [
|
|
260
|
-
t,
|
|
261
|
-
i,
|
|
262
|
-
f,
|
|
263
|
-
u,
|
|
264
|
-
r,
|
|
265
|
-
d,
|
|
266
|
-
p,
|
|
267
|
-
g
|
|
268
|
-
]), l.useEffect(() => g, [g]), o ?? d;
|
|
269
|
-
}
|
|
270
|
-
//#endregion
|
|
271
|
-
export { S as A, h as B, C, ie as D, oe as E, g as F, p as H, D as I, k as L, E as M, T as N, ae as O, f as P, j as R, w as S, ne as T, P as U, m as V, u as W, y as _, J as a, M as b, H as c, V as d, B as f, b as g, A as h, X as i, _ as j, x as k, U as l, I as m, $ as n, ce as o, F as p, Z as r, G as s, le as t, W as u, v, N as w, O as x, re as y, te as z };
|