jcicl 1.0.28 → 1.0.29
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/FormFields/FormFields.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { FormInput as
|
|
3
|
-
import { FormSectionTitle as
|
|
4
|
-
import
|
|
5
|
-
import { u as
|
|
6
|
-
const
|
|
7
|
-
title:
|
|
8
|
-
fields:
|
|
9
|
-
columns:
|
|
10
|
-
columnsOverride:
|
|
11
|
-
gap:
|
|
12
|
-
noLabel:
|
|
13
|
-
checkboxContainer:
|
|
14
|
-
formDefaults:
|
|
15
|
-
onChange:
|
|
16
|
-
}) => /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
!
|
|
19
|
-
const
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
1
|
+
import { jsxs as f, Fragment as D, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { FormInput as p } from "../FormInput/FormInput.js";
|
|
3
|
+
import { FormSectionTitle as g, FormFieldGrid as j, FormFieldCheckboxContainer as C } from "../FormComponents/FormComponents.js";
|
|
4
|
+
import S from "../theme.js";
|
|
5
|
+
import { u as z } from "../.chunks/useMediaQuery.js";
|
|
6
|
+
const V = ({
|
|
7
|
+
title: a,
|
|
8
|
+
fields: h,
|
|
9
|
+
columns: v = z(`(max-width: ${S.screenSizes.tablet})`) ? 2 : 3,
|
|
10
|
+
columnsOverride: w,
|
|
11
|
+
gap: b = 21,
|
|
12
|
+
noLabel: s = !1,
|
|
13
|
+
checkboxContainer: F = !1,
|
|
14
|
+
formDefaults: c,
|
|
15
|
+
onChange: x
|
|
16
|
+
}) => /* @__PURE__ */ f(D, { children: [
|
|
17
|
+
a && /* @__PURE__ */ n(g, { children: a }),
|
|
18
|
+
!F && /* @__PURE__ */ n(j, { columns: v, columnsOverride: w, gap: b, children: h.map(({ key: r, label: e, type: o, limit: d, options: l, defaultValue: i, ...u }) => {
|
|
19
|
+
const m = c[r] !== void 0 ? c[r] : i !== void 0 ? i : o === "multiDropdown" ? [] : o === "checkbox" ? !1 : "";
|
|
20
|
+
return /* @__PURE__ */ n(
|
|
21
|
+
p,
|
|
22
22
|
{
|
|
23
|
-
onChange: (
|
|
24
|
-
label:
|
|
23
|
+
onChange: (t) => x(r, t, o),
|
|
24
|
+
label: e,
|
|
25
25
|
type: o,
|
|
26
|
-
limit:
|
|
27
|
-
value:
|
|
28
|
-
noLabel:
|
|
29
|
-
options:
|
|
26
|
+
limit: d,
|
|
27
|
+
...o === "checkbox" ? { checked: !!m } : { value: m },
|
|
28
|
+
noLabel: s,
|
|
29
|
+
options: l,
|
|
30
30
|
multiple: o === "multiDropdown",
|
|
31
|
-
...
|
|
31
|
+
...u
|
|
32
32
|
},
|
|
33
33
|
r
|
|
34
34
|
);
|
|
35
35
|
}) }),
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
|
|
36
|
+
F && /* @__PURE__ */ n(C, { children: h.map(({ key: r, label: e, type: o, limit: d, options: l, defaultValue: i, ...u }) => {
|
|
37
|
+
const m = c[r] !== void 0 ? c[r] : i !== void 0 ? i : o === "multiDropdown" ? [] : o === "checkbox" ? !1 : "";
|
|
38
|
+
return /* @__PURE__ */ n(
|
|
39
|
+
p,
|
|
40
40
|
{
|
|
41
|
-
onChange: (
|
|
42
|
-
label:
|
|
41
|
+
onChange: (t) => x(r, t, o),
|
|
42
|
+
label: e,
|
|
43
43
|
type: o,
|
|
44
|
-
limit:
|
|
45
|
-
defaultValue:
|
|
46
|
-
noLabel:
|
|
47
|
-
options:
|
|
44
|
+
limit: d,
|
|
45
|
+
...o === "checkbox" ? { checked: !!m } : { defaultValue: m },
|
|
46
|
+
noLabel: s,
|
|
47
|
+
options: l,
|
|
48
48
|
multiple: o === "multiDropdown",
|
|
49
|
-
...
|
|
49
|
+
...u
|
|
50
50
|
},
|
|
51
51
|
r
|
|
52
52
|
);
|
|
53
53
|
}) })
|
|
54
54
|
] });
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
V as default
|
|
57
57
|
};
|
|
@@ -2694,8 +2694,8 @@ const Et = ["colon", "borderFocusColor", "minWidth", "noLabel"], zt = Yo("div",
|
|
|
2694
2694
|
{
|
|
2695
2695
|
options: a,
|
|
2696
2696
|
onChange: (m, w) => (
|
|
2697
|
-
// @ts-ignore
|
|
2698
|
-
h && h({ ...m, target: { ...m.target, value:
|
|
2697
|
+
// @ts-ignore - Fix: Use nullish coalescing to avoid "undefined" string
|
|
2698
|
+
h && h({ ...m, target: { ...m.target, value: (w == null ? void 0 : w.value) ?? "" } })
|
|
2699
2699
|
),
|
|
2700
2700
|
...P,
|
|
2701
2701
|
renderInput: (m) => /* @__PURE__ */ T(zo, { ...m })
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jcicl",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.29",
|
|
5
5
|
"description": "Component library for the websites of Johnson County Iowa",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://devops.jc.net/JCIT/Business%20Solutions%20Delivery/_git/JCComponentLibrary?path=%2FREADME.md&version=GBmaster",
|