jcicl 0.0.267 → 0.0.269

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,4 +1,4 @@
1
- import { A as f } from "../.chunks/AppContainer.js";
1
+ import { default as o } from "./AppContainer.js";
2
2
  export {
3
- f as default
3
+ o as default
4
4
  };
@@ -1,12 +1,13 @@
1
- import { jsx as e, jsxs as m, Fragment as C } from "react/jsx-runtime";
2
- import { useState as f } from "react";
1
+ import { jsx as e, jsxs as m, Fragment as f } from "react/jsx-runtime";
2
+ import { useState as C } from "react";
3
3
  import { n as u } from "../.chunks/emotion-styled.browser.esm.js";
4
4
  import { c as b } from "../.chunks/emotion-react.browser.esm.js";
5
5
  import o from "../theme.js";
6
- import { u as h, A as w } from "../.chunks/AppContainer.js";
6
+ import w from "../AppContainer/AppContainer.js";
7
7
  import T from "../WithLoading/WithLoading.js";
8
8
  import { TopFade as S, BottomFade as P } from "../Overlays/Overlays.js";
9
- const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldForwardProp: (r) => !$.includes(r) })(({ loading: r, hasPagination: l, hasFade: s, loadingColor: t = o.colors.green, isTablet: i }) => ({
9
+ import { u as h } from "../.chunks/useMediaQuery.js";
10
+ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldForwardProp: (r) => !$.includes(r) })(({ loading: r, hasPagination: l, hasFade: s, loadingColor: t = o.colors.green, isTablet: a }) => ({
10
11
  ...b`
11
12
  color: ${o.colors.midnight};
12
13
  height: ${r ? "100%" : "auto"};
@@ -18,7 +19,7 @@ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldFor
18
19
  align-items: center;
19
20
  width: 100%;
20
21
  min-height: 100%;
21
- height: ${i ? "100%" : "auto"};
22
+ height: ${a ? "100%" : "auto"};
22
23
  box-sizing: border-box;
23
24
  padding-bottom: ${s ? l ? "114px" : "72px" : "19px"};
24
25
  > * div {
@@ -83,15 +84,15 @@ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldFor
83
84
  blue: z,
84
85
  red: I,
85
86
  green: void 0
86
- }, N = ({
87
+ }, O = ({
87
88
  children: r,
88
89
  loading: l = !1,
89
90
  hasPagination: s = !1,
90
91
  fade: t = !0,
91
- userProfileMenuItems: i,
92
+ userProfileMenuItems: a,
92
93
  ...c
93
94
  }) => {
94
- const x = localStorage.getItem("theme") || "green", [a, n] = f(x), d = h(`(max-width: ${o.screenSizes.mobile})`), y = h(`(max-width: ${o.screenSizes.tablet})`), k = B[a], p = [
95
+ const x = localStorage.getItem("theme") || "green", [i, n] = C(x), d = h(`(max-width: ${o.screenSizes.mobile})`), y = h(`(max-width: ${o.screenSizes.tablet})`), k = B[i], p = [
95
96
  {
96
97
  label: "Green Theme",
97
98
  onClick: () => {
@@ -110,7 +111,7 @@ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldFor
110
111
  localStorage.setItem("theme", "red"), n("red");
111
112
  }
112
113
  },
113
- ...i || []
114
+ ...a || []
114
115
  ];
115
116
  return /* @__PURE__ */ e(
116
117
  w,
@@ -123,14 +124,14 @@ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldFor
123
124
  {
124
125
  className: "jcPageWrapper",
125
126
  loading: l,
126
- loadingColor: v[a],
127
+ loadingColor: v[i],
127
128
  hasPagination: s,
128
129
  hasFade: t,
129
130
  isTablet: y,
130
131
  children: /* @__PURE__ */ m(T, { loading: l, size: d ? 114 : 201, children: [
131
- t && /* @__PURE__ */ m(C, { children: [
132
- /* @__PURE__ */ e(S, { color: g[a] }),
133
- /* @__PURE__ */ e(P, { hasPagination: s, isMobile: d, color: g[a] })
132
+ t && /* @__PURE__ */ m(f, { children: [
133
+ /* @__PURE__ */ e(S, { color: g[i] }),
134
+ /* @__PURE__ */ e(P, { hasPagination: s, isMobile: d, color: g[i] })
134
135
  ] }),
135
136
  /* @__PURE__ */ e(M, { children: r })
136
137
  ] })
@@ -142,5 +143,5 @@ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldFor
142
143
  export {
143
144
  M as MainContentContainer,
144
145
  R as PageWrapper,
145
- N as default
146
+ O as default
146
147
  };
@@ -0,0 +1,22 @@
1
+ import { DropdownOption } from '../../../../../../../../../src/components/composite/LabeledDropdown';
2
+ export type FormField = {
3
+ key: string;
4
+ label: string;
5
+ sublabel?: string;
6
+ type: 'checkbox' | 'currency' | 'date' | 'dropdown' | 'email' | 'multiDropdown' | 'number' | 'phone' | 'radio' | 'text' | 'textarea' | 'url';
7
+ options?: DropdownOption[];
8
+ limit?: number;
9
+ defaultValue?: string | number | boolean;
10
+ };
11
+ export type FormFieldsProps = {
12
+ title?: string;
13
+ fields: FormField[];
14
+ columns?: number;
15
+ columnsOverride?: string;
16
+ gap?: number;
17
+ noLabel?: boolean;
18
+ formDefaults: Record<string, any>;
19
+ onChange: (key: string, e: React.ChangeEvent<HTMLInputElement>, type?: string) => void;
20
+ };
21
+ declare const FormFields: React.FC<FormFieldsProps>;
22
+ export default FormFields;
@@ -0,0 +1,34 @@
1
+ import { jsxs as h, Fragment as x, jsx as m } from "react/jsx-runtime";
2
+ import { FormInput as w } from "../FormInput/FormInput.js";
3
+ import { FormSectionTitle as g, FormFieldGrid as j } from "../FormComponents/FormComponents.js";
4
+ import D from "../theme.js";
5
+ import { u as S } from "../.chunks/useMediaQuery.js";
6
+ const M = ({
7
+ title: e,
8
+ fields: i,
9
+ columns: t = S(`(max-width: ${D.screenSizes.tablet})`) ? 2 : 3,
10
+ columnsOverride: l,
11
+ gap: n = 21,
12
+ noLabel: a = !1,
13
+ formDefaults: d,
14
+ onChange: s
15
+ }) => /* @__PURE__ */ h(x, { children: [
16
+ e && /* @__PURE__ */ m(g, { children: e }),
17
+ /* @__PURE__ */ m(j, { columns: t, columnsOverride: l, gap: n, children: i.map(({ key: o, label: u, type: r, limit: f, options: p, defaultValue: F }) => /* @__PURE__ */ m(
18
+ w,
19
+ {
20
+ onChange: (c) => s(o, c, r),
21
+ label: u,
22
+ type: r,
23
+ limit: f,
24
+ defaultValue: d[o] || r === "multiDropdown" ? [] : F,
25
+ noLabel: a,
26
+ options: p,
27
+ multiple: r === "multiDropdown"
28
+ },
29
+ o
30
+ )) })
31
+ ] });
32
+ export {
33
+ M as default
34
+ };
@@ -0,0 +1 @@
1
+ export { default, type FormField, type FormFieldsProps } from './FormFields';
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./FormFields.js";
2
+ export {
3
+ o as default
4
+ };
@@ -2,7 +2,7 @@ import { LabeledInputProps } from '../../../../../../../../../src/components/com
2
2
  import { LabeledCurrencyInputProps } from '../../../../../../../../../src/components/composite/LabeledCurrencyInput';
3
3
  import { LabeledCheckboxProps } from '../../../../../../../../../src/components/composite/LabeledCheckbox';
4
4
  import { LabeledDropdownProps } from '../../../../../../../../../src/components/composite/LabeledDropdown';
5
- export type AllInputProps = LabeledInputProps | LabeledCheckboxProps | LabeledDropdownProps | LabeledCurrencyInputProps;
5
+ export type AllInputProps = LabeledInputProps & LabeledCheckboxProps & LabeledDropdownProps & LabeledCurrencyInputProps;
6
6
  export type FormInputProps = AllInputProps & {
7
7
  type?: 'text' | 'dropdown' | 'date' | 'number' | 'checkbox' | 'radio' | 'textarea' | 'currency';
8
8
  };
@@ -2,11 +2,11 @@ import { InputProps } from '../../../../../../../../../src/components/base/Input
2
2
  export interface StyleProps {
3
3
  grid?: boolean;
4
4
  }
5
- export interface LabeledCurrencyInputProps extends InputProps {
5
+ export type LabeledCurrencyInputProps = InputProps & {
6
6
  label: string;
7
7
  grid?: boolean;
8
8
  noLabel?: boolean;
9
9
  defaultValue?: string;
10
- }
10
+ };
11
11
  export declare const LabeledCurrencyInput: React.FC<LabeledCurrencyInputProps>;
12
12
  export default LabeledCurrencyInput;
@@ -15,7 +15,7 @@ import { P as Ko } from "../.chunks/Popper.js";
15
15
  import { P as Go } from "../.chunks/Paper.js";
16
16
  import { u as Qo } from "../.chunks/Portal.js";
17
17
  import { u as Po } from "../.chunks/useControlled.js";
18
- import { b as io, s as Zo, u as et } from "../.chunks/TransitionGroupContext.js";
18
+ import { c as io, s as Zo, a as et } from "../.chunks/TransitionGroupContext.js";
19
19
  import { i as ot } from "../.chunks/integerPropType.js";
20
20
  function tt(e, n, a, i, b) {
21
21
  if (process.env.NODE_ENV === "production")
@@ -2,10 +2,11 @@ import { InputProps } from '../../../../../../../../../src/components/base/Input
2
2
  export interface StyleProps {
3
3
  grid?: boolean;
4
4
  }
5
- export interface LabeledInputProps extends InputProps {
5
+ export type LabeledInputProps = InputProps & {
6
6
  label: string;
7
7
  grid?: boolean;
8
8
  noLabel?: boolean;
9
- }
9
+ limit?: number;
10
+ };
10
11
  export declare const LabeledInput: React.FC<LabeledInputProps>;
11
12
  export default LabeledInput;
@@ -1,9 +1,9 @@
1
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
- import { n as s } from "../.chunks/emotion-styled.browser.esm.js";
3
- import { c as n } from "../.chunks/emotion-react.browser.esm.js";
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
+ import { n } from "../.chunks/emotion-styled.browser.esm.js";
3
+ import { c as l } from "../.chunks/emotion-react.browser.esm.js";
4
4
  import { Input as i } from "../Input/Input.js";
5
- const l = s("div")(({ grid: e }) => ({
6
- ...n`
5
+ const f = n("div")(({ grid: t }) => ({
6
+ ...l`
7
7
  display: flex;
8
8
  flex-wrap: nowrap;
9
9
  gap: 9px;
@@ -19,22 +19,23 @@ const l = s("div")(({ grid: e }) => ({
19
19
  }
20
20
 
21
21
  .MuiInputBase-root {
22
- width: ${e && "100%"};
22
+ width: ${t && "100%"};
23
23
  }
24
24
  `
25
- })), u = ({
26
- label: e,
27
- grid: t = !0,
28
- noLabel: a = !1,
29
- ...p
30
- }) => /* @__PURE__ */ o(l, { grid: t, className: "jcLabeledInput", children: [
31
- !a && /* @__PURE__ */ o("span", { children: [
32
- e,
25
+ })), w = ({
26
+ label: t,
27
+ grid: o = !0,
28
+ noLabel: p = !1,
29
+ limit: s,
30
+ ...a
31
+ }) => /* @__PURE__ */ e(f, { grid: o, className: "jcLabeledInput", children: [
32
+ !p && /* @__PURE__ */ e("span", { children: [
33
+ t,
33
34
  ":"
34
35
  ] }),
35
- /* @__PURE__ */ r(i, { ...p })
36
+ /* @__PURE__ */ r(i, { ...a, slotProps: { htmlInput: { limit: s } } })
36
37
  ] });
37
38
  export {
38
- u as LabeledInput,
39
- u as default
39
+ w as LabeledInput,
40
+ w as default
40
41
  };
@@ -2,10 +2,10 @@ import { jsxs as Pe, jsx as C } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
3
  import { a as Qe, g as Ze, s as Y, c as Me, e as Ee, u as eo, b as I, P as o, d as oo } from "../.chunks/DefaultPropsProvider.js";
4
4
  import { u as to } from "../.chunks/index.js";
5
- import { u as ro } from "../.chunks/useTheme.js";
5
+ import { a as ro } from "../.chunks/useTheme.js";
6
6
  import { m as G } from "../.chunks/memoTheme.js";
7
7
  import { P as $e } from "../.chunks/Popper.js";
8
- import { a as j, b as Re, u as po, T as no } from "../.chunks/TransitionGroupContext.js";
8
+ import { b as j, c as Re, a as po, T as no } from "../.chunks/TransitionGroupContext.js";
9
9
  import { u as so } from "../.chunks/useControlled.js";
10
10
  import { u as ao, g as io, G as Ce, e as lo } from "../.chunks/Portal.js";
11
11
  import { a as A } from "../.chunks/resolveComponentProps.js";
package/index.js CHANGED
@@ -6,8 +6,8 @@ import { Grid as l } from "./Grid/Grid.js";
6
6
  import { default as i } from "./Icon/Icon.js";
7
7
  import { Input as s } from "./Input/Input.js";
8
8
  import { LabeledValue as I } from "./LabeledValue/LabeledValue.js";
9
- import { default as b } from "./ListButton/ListButton.js";
10
- import { default as g } from "./Loading/Loading.js";
9
+ import { default as c } from "./ListButton/ListButton.js";
10
+ import { default as A } from "./Loading/Loading.js";
11
11
  import { default as h } from "./ScrollContainer/ScrollContainer.js";
12
12
  import { Accordion as B } from "./Accordion/Accordion.js";
13
13
  import { default as E } from "./ErrorBoundary/ErrorBoundary.js";
@@ -21,7 +21,7 @@ import { default as z } from "./WithLoading/WithLoading.js";
21
21
  import { default as K } from "./AppHeader/AppHeader.js";
22
22
  import { EditableInfoCard as O } from "./EditableInfoCard/EditableInfoCard.js";
23
23
  import { Nav as Q } from "./Nav/Nav.js";
24
- import { A as U } from "./.chunks/AppContainer.js";
24
+ import { default as U } from "./AppContainer/AppContainer.js";
25
25
  export {
26
26
  B as Accordion,
27
27
  U as AppContainer,
@@ -39,8 +39,8 @@ export {
39
39
  G as LabeledInput,
40
40
  I as LabeledValue,
41
41
  N as List,
42
- b as ListButton,
43
- g as Loading,
42
+ c as ListButton,
43
+ A as Loading,
44
44
  T as LogoLoop,
45
45
  Q as Nav,
46
46
  h as ScrollContainer,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jcicl",
3
3
  "private": false,
4
- "version": "0.0.267",
4
+ "version": "0.0.269",
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",