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.
@@ -1,57 +1,57 @@
1
- import { jsxs as g, Fragment as j, jsx as m } from "react/jsx-runtime";
2
- import { FormInput as w } from "../FormInput/FormInput.js";
3
- import { FormSectionTitle as C, FormFieldGrid as S, FormFieldCheckboxContainer as v } from "../FormComponents/FormComponents.js";
4
- import z from "../theme.js";
5
- import { u as G } from "../.chunks/useMediaQuery.js";
6
- const $ = ({
7
- title: p,
8
- fields: s,
9
- columns: x = G(`(max-width: ${z.screenSizes.tablet})`) ? 2 : 3,
10
- columnsOverride: D,
11
- gap: f = 21,
12
- noLabel: F = !1,
13
- checkboxContainer: c = !1,
14
- formDefaults: n,
15
- onChange: h
16
- }) => /* @__PURE__ */ g(j, { children: [
17
- p && /* @__PURE__ */ m(C, { children: p }),
18
- !c && /* @__PURE__ */ m(S, { columns: x, columnsOverride: D, gap: f, children: s.map(({ key: r, label: t, type: o, limit: l, options: u, defaultValue: i, ...e }) => {
19
- const d = n[r] ? n[r] : i || (o === "multiDropdown" ? [] : "");
20
- return /* @__PURE__ */ m(
21
- w,
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: (a) => h(r, a, o),
24
- label: t,
23
+ onChange: (t) => x(r, t, o),
24
+ label: e,
25
25
  type: o,
26
- limit: l,
27
- value: d,
28
- noLabel: F,
29
- options: u,
26
+ limit: d,
27
+ ...o === "checkbox" ? { checked: !!m } : { value: m },
28
+ noLabel: s,
29
+ options: l,
30
30
  multiple: o === "multiDropdown",
31
- ...e
31
+ ...u
32
32
  },
33
33
  r
34
34
  );
35
35
  }) }),
36
- c && /* @__PURE__ */ m(v, { children: s.map(({ key: r, label: t, type: o, limit: l, options: u, defaultValue: i, ...e }) => {
37
- const d = n[r] ? n[r] : i || (o === "multiDropdown" ? [] : "");
38
- return /* @__PURE__ */ m(
39
- w,
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: (a) => h(r, a, o),
42
- label: t,
41
+ onChange: (t) => x(r, t, o),
42
+ label: e,
43
43
  type: o,
44
- limit: l,
45
- defaultValue: d,
46
- noLabel: F,
47
- options: u,
44
+ limit: d,
45
+ ...o === "checkbox" ? { checked: !!m } : { defaultValue: m },
46
+ noLabel: s,
47
+ options: l,
48
48
  multiple: o === "multiDropdown",
49
- ...e
49
+ ...u
50
50
  },
51
51
  r
52
52
  );
53
53
  }) })
54
54
  ] });
55
55
  export {
56
- $ as default
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: `${w == null ? void 0 : w.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.28",
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",