@epam/ai-dial-ui-kit 0.16.0-dev.25 → 0.16.0-dev.32
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/CHANGELOG.md +9 -0
- package/dist/{DateCellRenderer-BmgQYPuv.cjs → DateCellRenderer-ZFBZsJdH.cjs} +24 -24
- package/dist/{IconButton-B1Hx0Y3y.cjs → IconButton-CsePS6PY.cjs} +1 -1
- package/dist/{JsonEditor-Bxui5wJH.cjs → JsonEditor-DQhHSm93.cjs} +1 -1
- package/dist/{MarkdownEditor-BKtFs714.cjs → MarkdownEditor-CvIPIbPq.cjs} +1 -1
- package/dist/{MarkdownEditor-Bapd1ycU.cjs → MarkdownEditor-TR6X_gdl.cjs} +1 -1
- package/dist/{MarkdownEditorContainer-DLPODjar.cjs → MarkdownEditorContainer-JIn_VNUX.cjs} +1 -1
- package/dist/{Switch-DAaAOaIu.cjs → Switch-HEL_aq23.cjs} +1 -1
- package/dist/components/New/CaptionText/CaptionText.js +3 -4
- package/dist/components/New/Dropdown/Dropdown.js +208 -197
- package/dist/components/New/Input/Input.js +121 -107
- package/dist/components/New/SchemaRenderer/components/SchemaField.js +45 -44
- package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +41 -38
- package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +45 -39
- package/dist/components/New/Select/Select.js +201 -198
- package/dist/components/New/Textarea/Textarea.js +37 -33
- package/dist/components-manifest.json +10 -4
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/editors.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/lazy-kq-xfXXv.cjs +1 -0
- package/dist/{merge-classes-BEJXjzkx.cjs → merge-classes-B0SnCG4i.cjs} +1 -1
- package/dist/migration-guides/0.16.0/caption-text-no-alert-role.md +90 -0
- package/dist/migration-guides/README.md +1 -0
- package/dist/src/components/New/CaptionText/CaptionText.d.ts +8 -1
- package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +1 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +2 -0
- package/dist/src/components/New/SchemaRenderer/types.d.ts +3 -1
- package/dist/src/components/New/Select/Select.d.ts +2 -0
- package/dist/utils/merge-classes.js +36 -7
- package/package.json +1 -1
- package/dist/lazy-_W6FYhKg.cjs +0 -1
|
@@ -1,169 +1,183 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as _, useEffect as A } from "react";
|
|
3
|
-
import { useMergeRefs as
|
|
4
|
-
import { DialIcon as
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
import { ElementSize as
|
|
7
|
-
import { mergeClasses as
|
|
8
|
-
import { ErrorText as
|
|
1
|
+
import { jsxs as S, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useId as V, useRef as _, useEffect as A } from "react";
|
|
3
|
+
import { useMergeRefs as B } from "@floating-ui/react";
|
|
4
|
+
import { DialIcon as y } from "../../Icon/Icon.js";
|
|
5
|
+
import { Tooltip as M } from "../Tooltip/Tooltip.js";
|
|
6
|
+
import { ElementSize as p } from "../../../types/size.js";
|
|
7
|
+
import { mergeClasses as w } from "../../../utils/merge-classes.js";
|
|
8
|
+
import { ErrorText as W, CaptionText as Z } from "../CaptionText/CaptionText.js";
|
|
9
9
|
import { Label as q } from "../Label/Label.js";
|
|
10
|
-
import { InputButton as
|
|
11
|
-
import { handleKeyDown as
|
|
12
|
-
const
|
|
13
|
-
[
|
|
10
|
+
import { InputButton as H } from "./Button/InputButton.js";
|
|
11
|
+
import { handleKeyDown as J } from "./utils.js";
|
|
12
|
+
const L = {
|
|
13
|
+
[p.Small]: {
|
|
14
14
|
field: "dial-kit-input-small gap-x-1",
|
|
15
15
|
paddingStart: "pl-2",
|
|
16
16
|
paddingEnd: "pr-2",
|
|
17
17
|
stackGap: "gap-1",
|
|
18
18
|
postfixText: "dial-tiny-text"
|
|
19
19
|
},
|
|
20
|
-
[
|
|
20
|
+
[p.Standard]: {
|
|
21
21
|
field: "gap-x-2 py-2",
|
|
22
22
|
paddingStart: "pl-3",
|
|
23
23
|
paddingEnd: "pr-3",
|
|
24
24
|
stackGap: "gap-2",
|
|
25
25
|
postfixText: "dial-small-text"
|
|
26
26
|
},
|
|
27
|
-
[
|
|
27
|
+
[p.Large]: {
|
|
28
28
|
field: "gap-x-2 py-3",
|
|
29
29
|
paddingStart: "pl-4",
|
|
30
30
|
paddingEnd: "pr-4",
|
|
31
31
|
stackGap: "gap-2",
|
|
32
32
|
postfixText: "dial-body-text"
|
|
33
33
|
}
|
|
34
|
-
},
|
|
35
|
-
labelProps:
|
|
36
|
-
error:
|
|
34
|
+
}, ne = ({
|
|
35
|
+
labelProps: f,
|
|
36
|
+
error: e,
|
|
37
37
|
caption: n,
|
|
38
|
-
id:
|
|
39
|
-
containerClassName:
|
|
40
|
-
size:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
38
|
+
id: h,
|
|
39
|
+
containerClassName: u,
|
|
40
|
+
size: m = p.Standard,
|
|
41
|
+
"aria-describedby": N,
|
|
42
|
+
"aria-invalid": E,
|
|
43
|
+
...g
|
|
44
|
+
}) => {
|
|
45
|
+
const a = V(), o = h ?? a, l = e ? `${o}-error` : void 0, v = !e && n ? `${o}-caption` : void 0;
|
|
46
|
+
return /* @__PURE__ */ S(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
className: w(
|
|
50
|
+
"flex flex-col",
|
|
51
|
+
L[m].stackGap,
|
|
52
|
+
u
|
|
53
|
+
),
|
|
54
|
+
children: [
|
|
55
|
+
f && /* @__PURE__ */ t(q, { ...f, htmlFor: o }),
|
|
56
|
+
/* @__PURE__ */ S("div", { className: "flex flex-col gap-1", children: [
|
|
57
|
+
/* @__PURE__ */ t(
|
|
58
|
+
j,
|
|
59
|
+
{
|
|
60
|
+
id: o,
|
|
61
|
+
size: m,
|
|
62
|
+
"aria-describedby": [N, l, v].filter(Boolean).join(" ") || void 0,
|
|
63
|
+
"aria-invalid": E ?? (e || g.invalid ? !0 : void 0),
|
|
64
|
+
...g
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ t(W, { id: l, text: e }),
|
|
68
|
+
!e && /* @__PURE__ */ t(Z, { id: v, text: n })
|
|
69
|
+
] })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}, j = ({
|
|
74
|
+
invalid: f,
|
|
75
|
+
disabled: e,
|
|
62
76
|
prefix: n,
|
|
63
|
-
className:
|
|
64
|
-
postfix:
|
|
65
|
-
children:
|
|
66
|
-
iconBefore:
|
|
67
|
-
iconAfter:
|
|
68
|
-
wrapperClassName:
|
|
69
|
-
type:
|
|
70
|
-
inputRef:
|
|
71
|
-
value:
|
|
72
|
-
tooltipText:
|
|
73
|
-
min:
|
|
74
|
-
onChange:
|
|
75
|
-
max:
|
|
76
|
-
inputButtonProps:
|
|
77
|
-
wrapperRef:
|
|
78
|
-
size:
|
|
77
|
+
className: h,
|
|
78
|
+
postfix: u,
|
|
79
|
+
children: m,
|
|
80
|
+
iconBefore: N,
|
|
81
|
+
iconAfter: E,
|
|
82
|
+
wrapperClassName: g,
|
|
83
|
+
type: a,
|
|
84
|
+
inputRef: o,
|
|
85
|
+
value: l,
|
|
86
|
+
tooltipText: v,
|
|
87
|
+
min: s,
|
|
88
|
+
onChange: D,
|
|
89
|
+
max: c,
|
|
90
|
+
inputButtonProps: I,
|
|
91
|
+
wrapperRef: G,
|
|
92
|
+
size: b = p.Standard,
|
|
79
93
|
...R
|
|
80
94
|
}) => {
|
|
81
|
-
const
|
|
95
|
+
const x = L[b], C = _(null), $ = B([o, C]), k = a === "number" || s !== void 0 || c !== void 0;
|
|
82
96
|
A(() => {
|
|
83
|
-
const
|
|
84
|
-
if (!
|
|
85
|
-
const r = (
|
|
86
|
-
|
|
97
|
+
const i = C.current;
|
|
98
|
+
if (!i || !k || e) return;
|
|
99
|
+
const r = (d) => {
|
|
100
|
+
d.preventDefault();
|
|
87
101
|
};
|
|
88
|
-
return
|
|
89
|
-
|
|
102
|
+
return i.addEventListener("wheel", r, { passive: !1 }), () => {
|
|
103
|
+
i.removeEventListener("wheel", r);
|
|
90
104
|
};
|
|
91
|
-
}, [
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
const r =
|
|
96
|
-
if (
|
|
97
|
-
const
|
|
98
|
-
if (isNaN(
|
|
105
|
+
}, [e, k, a]);
|
|
106
|
+
const F = (i) => {
|
|
107
|
+
J(i, a, s, c);
|
|
108
|
+
}, K = (i) => {
|
|
109
|
+
const r = i.currentTarget.value;
|
|
110
|
+
if (k && r !== "") {
|
|
111
|
+
const d = parseFloat(r);
|
|
112
|
+
if (isNaN(d) && r !== "-" && r !== "." || !isNaN(d) && (s !== void 0 && d < +s || c !== void 0 && d > +c))
|
|
99
113
|
return;
|
|
100
114
|
}
|
|
101
|
-
|
|
102
|
-
},
|
|
115
|
+
D?.(r || void 0);
|
|
116
|
+
}, T = () => /* @__PURE__ */ S(
|
|
103
117
|
"div",
|
|
104
118
|
{
|
|
105
|
-
ref:
|
|
106
|
-
className:
|
|
119
|
+
ref: G,
|
|
120
|
+
className: w(
|
|
107
121
|
"dial-kit-input flex flex-row items-center justify-between",
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
!n &&
|
|
112
|
-
!
|
|
113
|
-
|
|
122
|
+
x.field,
|
|
123
|
+
f && "dial-kit-input-error",
|
|
124
|
+
e && "dial-kit-input-disable",
|
|
125
|
+
!n && x.paddingStart,
|
|
126
|
+
!I && x.paddingEnd,
|
|
127
|
+
g
|
|
114
128
|
),
|
|
115
129
|
"aria-label": "input-container",
|
|
116
130
|
children: [
|
|
117
|
-
n && /* @__PURE__ */
|
|
118
|
-
|
|
131
|
+
n && /* @__PURE__ */ t("div", { className: "border-r border-secondary", children: /* @__PURE__ */ t(
|
|
132
|
+
j,
|
|
119
133
|
{
|
|
120
134
|
wrapperClassName: "!rounded-r-none",
|
|
121
135
|
className: "truncate",
|
|
122
136
|
value: n,
|
|
123
137
|
disabled: !0,
|
|
124
|
-
size:
|
|
138
|
+
size: b,
|
|
125
139
|
id: `${n}_textBefore`
|
|
126
140
|
}
|
|
127
141
|
) }),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
|
|
130
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ t(y, { icon: N }),
|
|
143
|
+
m,
|
|
144
|
+
/* @__PURE__ */ t(
|
|
131
145
|
"input",
|
|
132
146
|
{
|
|
133
|
-
ref:
|
|
134
|
-
type:
|
|
135
|
-
autoComplete:
|
|
136
|
-
value:
|
|
137
|
-
className:
|
|
147
|
+
ref: $,
|
|
148
|
+
type: a,
|
|
149
|
+
autoComplete: a === "password" ? "new-password" : "off",
|
|
150
|
+
value: l ?? "",
|
|
151
|
+
className: w(
|
|
138
152
|
"border-0 bg-transparent w-full truncate",
|
|
139
|
-
|
|
140
|
-
|
|
153
|
+
e && "cursor-not-allowed",
|
|
154
|
+
h
|
|
141
155
|
),
|
|
142
|
-
onChange:
|
|
143
|
-
onKeyDown:
|
|
144
|
-
min:
|
|
145
|
-
disabled:
|
|
146
|
-
max:
|
|
156
|
+
onChange: K,
|
|
157
|
+
onKeyDown: F,
|
|
158
|
+
min: s,
|
|
159
|
+
disabled: e,
|
|
160
|
+
max: c,
|
|
147
161
|
...R
|
|
148
162
|
}
|
|
149
163
|
),
|
|
150
|
-
|
|
164
|
+
u && /* @__PURE__ */ S(
|
|
151
165
|
"p",
|
|
152
166
|
{
|
|
153
|
-
className:
|
|
167
|
+
className: w("text-secondary", x.postfixText),
|
|
154
168
|
children: [
|
|
155
169
|
" ",
|
|
156
|
-
|
|
170
|
+
u
|
|
157
171
|
]
|
|
158
172
|
}
|
|
159
173
|
),
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
|
|
174
|
+
/* @__PURE__ */ t(y, { icon: E }),
|
|
175
|
+
I && /* @__PURE__ */ t(H, { size: b, ...I, disabled: e })
|
|
162
176
|
]
|
|
163
177
|
}
|
|
164
178
|
);
|
|
165
|
-
return
|
|
179
|
+
return e && a !== "password" ? /* @__PURE__ */ t(M, { tooltip: v || l, children: T() }) : T();
|
|
166
180
|
};
|
|
167
181
|
export {
|
|
168
|
-
|
|
182
|
+
ne as Input
|
|
169
183
|
};
|
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import { useId as F } from "react";
|
|
3
3
|
import { ErrorText as R } from "../../CaptionText/CaptionText.js";
|
|
4
4
|
import { Label as T } from "../../Label/Label.js";
|
|
5
|
-
import { JsonSchemaType as
|
|
6
|
-
import { resolveRef as
|
|
7
|
-
import { useSchemaContext as
|
|
8
|
-
import { SchemaFieldContent as
|
|
9
|
-
import { SchemaSection as
|
|
10
|
-
const
|
|
11
|
-
schema:
|
|
12
|
-
value:
|
|
13
|
-
onChange:
|
|
5
|
+
import { JsonSchemaType as b } from "../../../../types/json-schema.js";
|
|
6
|
+
import { resolveRef as E, isObjectType as I, validateRequired as L, buildSummary as v, isMissingRequiredValue as C, toRequiredMessage as M } from "../../../../utils/json-schema.js";
|
|
7
|
+
import { useSchemaContext as N, isPathTouched as x } from "../context.js";
|
|
8
|
+
import { SchemaFieldContent as S } from "./SchemaFieldContent.js";
|
|
9
|
+
import { SchemaSection as P } from "./SchemaSection.js";
|
|
10
|
+
const q = ({
|
|
11
|
+
schema: y,
|
|
12
|
+
value: e,
|
|
13
|
+
onChange: a,
|
|
14
14
|
path: o,
|
|
15
|
-
level:
|
|
15
|
+
level: m = 0,
|
|
16
16
|
required: i,
|
|
17
17
|
label: s
|
|
18
18
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
rootSchema:
|
|
21
|
-
defaultExpanded:
|
|
19
|
+
const c = F(), {
|
|
20
|
+
rootSchema: n,
|
|
21
|
+
defaultExpanded: g = !0,
|
|
22
22
|
touchedPaths: p,
|
|
23
23
|
skipUntouched: l
|
|
24
|
-
} =
|
|
25
|
-
if (
|
|
26
|
-
const j =
|
|
24
|
+
} = N(), r = E(y, n), d = o.join(".");
|
|
25
|
+
if (I(r) || r.type === b.Array) {
|
|
26
|
+
const j = L(e, r, n, d), h = s ?? r.title ?? o[o.length - 1] ?? "Section";
|
|
27
27
|
return /* @__PURE__ */ t(
|
|
28
|
-
|
|
28
|
+
P,
|
|
29
29
|
{
|
|
30
|
-
title:
|
|
31
|
-
description:
|
|
32
|
-
level:
|
|
33
|
-
summary:
|
|
34
|
-
errorCount:
|
|
35
|
-
defaultExpanded:
|
|
30
|
+
title: h,
|
|
31
|
+
description: r.description,
|
|
32
|
+
level: m,
|
|
33
|
+
summary: v(e, r, n),
|
|
34
|
+
errorCount: x(d, p, l, !0) ? j.length : 0,
|
|
35
|
+
defaultExpanded: g,
|
|
36
36
|
children: /* @__PURE__ */ t(
|
|
37
|
-
|
|
37
|
+
S,
|
|
38
38
|
{
|
|
39
|
-
schema:
|
|
40
|
-
value:
|
|
41
|
-
onChange:
|
|
39
|
+
schema: r,
|
|
40
|
+
value: e,
|
|
41
|
+
onChange: a,
|
|
42
42
|
path: o,
|
|
43
|
-
level:
|
|
43
|
+
level: m + 1,
|
|
44
44
|
required: i,
|
|
45
|
-
ariaLabel:
|
|
45
|
+
ariaLabel: h
|
|
46
46
|
}
|
|
47
47
|
)
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */
|
|
51
|
+
const f = x(d, p, l) && i && C(e) ? M(s ?? "Field") : void 0;
|
|
52
|
+
return /* @__PURE__ */ u("div", { className: "flex flex-col gap-2", children: [
|
|
53
53
|
/* @__PURE__ */ t(
|
|
54
54
|
T,
|
|
55
55
|
{
|
|
56
|
-
htmlFor:
|
|
56
|
+
htmlFor: c,
|
|
57
57
|
label: s,
|
|
58
58
|
required: i,
|
|
59
|
-
caption:
|
|
59
|
+
caption: r.description
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ u("div", { className: "flex flex-col gap-1", children: [
|
|
63
63
|
/* @__PURE__ */ t(
|
|
64
|
-
|
|
64
|
+
S,
|
|
65
65
|
{
|
|
66
|
-
schema:
|
|
67
|
-
value:
|
|
68
|
-
onChange:
|
|
66
|
+
schema: r,
|
|
67
|
+
value: e,
|
|
68
|
+
onChange: a,
|
|
69
69
|
path: o,
|
|
70
|
-
level:
|
|
70
|
+
level: m,
|
|
71
71
|
required: i,
|
|
72
72
|
suppressInlineError: !0,
|
|
73
|
-
fieldId:
|
|
74
|
-
ariaLabel: s
|
|
73
|
+
fieldId: c,
|
|
74
|
+
ariaLabel: s,
|
|
75
|
+
ariaDescribedBy: f ? `${c}-error` : void 0
|
|
75
76
|
}
|
|
76
77
|
),
|
|
77
|
-
/* @__PURE__ */ t(R, { text:
|
|
78
|
+
/* @__PURE__ */ t(R, { id: `${c}-error`, text: f })
|
|
78
79
|
] })
|
|
79
80
|
] });
|
|
80
81
|
};
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
+
q as SchemaField
|
|
83
84
|
};
|
|
@@ -1,57 +1,59 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { jsx as r, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { useId as F } from "react";
|
|
3
|
+
import { ErrorText as T } from "../../CaptionText/CaptionText.js";
|
|
4
|
+
import { JsonSchemaType as h } from "../../../../types/json-schema.js";
|
|
5
|
+
import { resolveRef as A, isObjectType as k, isMissingRequiredValue as M, toRequiredMessage as R } from "../../../../utils/json-schema.js";
|
|
6
|
+
import { useSchemaContext as q, isPathTouched as B } from "../context.js";
|
|
7
|
+
import { SchemaAnyOfEditor as I } from "./SchemaAnyOfEditor.js";
|
|
8
|
+
import { SchemaArrayEditor as J } from "./SchemaArrayEditor.js";
|
|
9
|
+
import { SchemaJsonEditor as N } from "./SchemaJsonEditor.js";
|
|
10
|
+
import { SchemaKeyValueEditor as V } from "./SchemaKeyValueEditor.js";
|
|
11
|
+
import { SchemaObjectEditor as b } from "./SchemaObjectEditor.js";
|
|
12
|
+
import { SchemaOneOfEditor as D } from "./SchemaOneOfEditor.js";
|
|
12
13
|
import { SchemaPrimitiveField as K } from "./SchemaPrimitiveField.js";
|
|
13
|
-
const
|
|
14
|
-
schema:
|
|
14
|
+
const ee = ({
|
|
15
|
+
schema: S,
|
|
15
16
|
value: m,
|
|
16
|
-
onChange:
|
|
17
|
+
onChange: y,
|
|
17
18
|
path: d,
|
|
18
|
-
level:
|
|
19
|
-
required:
|
|
20
|
-
suppressInlineError:
|
|
19
|
+
level: u,
|
|
20
|
+
required: E,
|
|
21
|
+
suppressInlineError: P = !1,
|
|
21
22
|
fieldId: a,
|
|
22
|
-
ariaLabel:
|
|
23
|
+
ariaLabel: t,
|
|
24
|
+
ariaDescribedBy: g
|
|
23
25
|
}) => {
|
|
24
|
-
const { rootSchema:
|
|
25
|
-
|
|
26
|
+
const l = F(), { rootSchema: x, renderField: p, markTouched: O, touchedPaths: j, skipUntouched: v } = q(), e = A(S, x), f = d.join("."), c = (i) => {
|
|
27
|
+
O?.(f), y(i);
|
|
26
28
|
}, s = {
|
|
27
29
|
schema: e,
|
|
28
30
|
value: m,
|
|
29
31
|
onChange: c,
|
|
30
32
|
path: d,
|
|
31
|
-
level:
|
|
33
|
+
level: u
|
|
32
34
|
};
|
|
33
35
|
let o;
|
|
34
36
|
if (e.oneOf)
|
|
35
|
-
o = /* @__PURE__ */
|
|
36
|
-
else if (e.anyOf && e.type !==
|
|
37
|
-
o = /* @__PURE__ */
|
|
38
|
-
else if (
|
|
37
|
+
o = /* @__PURE__ */ r(D, { ...s, ariaLabel: t });
|
|
38
|
+
else if (e.anyOf && e.type !== h.Object)
|
|
39
|
+
o = /* @__PURE__ */ r(I, { ...s, ariaLabel: t });
|
|
40
|
+
else if (k(e)) {
|
|
39
41
|
const i = e.additionalProperties != null && e.additionalProperties !== !1, n = !e.properties || Object.keys(e.properties).length === 0;
|
|
40
|
-
i && n ? o = /* @__PURE__ */
|
|
41
|
-
|
|
42
|
+
i && n ? o = /* @__PURE__ */ r(V, { ...s }) : n && e.additionalProperties !== !1 ? o = /* @__PURE__ */ r(
|
|
43
|
+
N,
|
|
42
44
|
{
|
|
43
45
|
value: m,
|
|
44
46
|
onChange: c,
|
|
45
47
|
id: a,
|
|
46
|
-
ariaLabel:
|
|
48
|
+
ariaLabel: t
|
|
47
49
|
}
|
|
48
|
-
) : o = /* @__PURE__ */
|
|
49
|
-
} else if (e.type ===
|
|
50
|
-
o = /* @__PURE__ */
|
|
50
|
+
) : o = /* @__PURE__ */ r(b, { ...s });
|
|
51
|
+
} else if (e.type === h.Array)
|
|
52
|
+
o = /* @__PURE__ */ r(J, { ...s });
|
|
51
53
|
else {
|
|
52
|
-
const i =
|
|
53
|
-
o = /* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
const i = B(f, j, v) && !!E && M(m), n = !P && i ? R(e.title ?? t ?? "Field") : void 0;
|
|
55
|
+
o = /* @__PURE__ */ C("div", { className: "flex flex-col gap-1", children: [
|
|
56
|
+
/* @__PURE__ */ r(
|
|
55
57
|
K,
|
|
56
58
|
{
|
|
57
59
|
schema: e,
|
|
@@ -59,14 +61,15 @@ const Z = ({
|
|
|
59
61
|
onChange: c,
|
|
60
62
|
invalid: i,
|
|
61
63
|
id: a,
|
|
62
|
-
ariaLabel:
|
|
64
|
+
ariaLabel: t,
|
|
65
|
+
ariaDescribedBy: n ? l : g
|
|
63
66
|
}
|
|
64
67
|
),
|
|
65
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ r(T, { id: l, text: n })
|
|
66
69
|
] });
|
|
67
70
|
}
|
|
68
|
-
return
|
|
71
|
+
return p ? p(d, e, o) : o;
|
|
69
72
|
};
|
|
70
73
|
export {
|
|
71
|
-
|
|
74
|
+
ee as SchemaFieldContent
|
|
72
75
|
};
|