jcicl 0.0.265 → 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,23 +1,25 @@
1
1
  import { jsx as e, jsxs as m, Fragment as f } from "react/jsx-runtime";
2
- import { useState as p } from "react";
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"};
13
14
  padding: 19px;
15
+ padding-top: 36px;
14
16
  display: flex;
15
17
  flex-direction: column;
16
18
  justify-content: ${r ? "center" : "start"};
17
19
  align-items: center;
18
20
  width: 100%;
19
21
  min-height: 100%;
20
- height: ${i ? "100%" : "auto"};
22
+ height: ${a ? "100%" : "auto"};
21
23
  box-sizing: border-box;
22
24
  padding-bottom: ${s ? l ? "114px" : "72px" : "19px"};
23
25
  > * div {
@@ -82,15 +84,15 @@ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldFor
82
84
  blue: z,
83
85
  red: I,
84
86
  green: void 0
85
- }, N = ({
87
+ }, O = ({
86
88
  children: r,
87
89
  loading: l = !1,
88
90
  hasPagination: s = !1,
89
91
  fade: t = !0,
90
- userProfileMenuItems: i,
92
+ userProfileMenuItems: a,
91
93
  ...c
92
94
  }) => {
93
- const y = localStorage.getItem("theme") || "green", [a, n] = p(y), d = h(`(max-width: ${o.screenSizes.mobile})`), x = h(`(max-width: ${o.screenSizes.tablet})`), k = B[a], C = [
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 = [
94
96
  {
95
97
  label: "Green Theme",
96
98
  onClick: () => {
@@ -109,27 +111,27 @@ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldFor
109
111
  localStorage.setItem("theme", "red"), n("red");
110
112
  }
111
113
  },
112
- ...i || []
114
+ ...a || []
113
115
  ];
114
116
  return /* @__PURE__ */ e(
115
117
  w,
116
118
  {
117
119
  ...c,
118
- userProfileMenuItems: C,
120
+ userProfileMenuItems: p,
119
121
  themeColors: k ?? (c == null ? void 0 : c.themeColors),
120
122
  children: /* @__PURE__ */ e(
121
123
  R,
122
124
  {
123
125
  className: "jcPageWrapper",
124
126
  loading: l,
125
- loadingColor: v[a],
127
+ loadingColor: v[i],
126
128
  hasPagination: s,
127
129
  hasFade: t,
128
- isTablet: x,
130
+ isTablet: y,
129
131
  children: /* @__PURE__ */ m(T, { loading: l, size: d ? 114 : 201, children: [
130
132
  t && /* @__PURE__ */ m(f, { children: [
131
- /* @__PURE__ */ e(S, { color: g[a] }),
132
- /* @__PURE__ */ e(P, { hasPagination: s, isMobile: d, color: g[a] })
133
+ /* @__PURE__ */ e(S, { color: g[i] }),
134
+ /* @__PURE__ */ e(P, { hasPagination: s, isMobile: d, color: g[i] })
133
135
  ] }),
134
136
  /* @__PURE__ */ e(M, { children: r })
135
137
  ] })
@@ -141,5 +143,5 @@ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldFor
141
143
  export {
142
144
  M as MainContentContainer,
143
145
  R as PageWrapper,
144
- N as default
146
+ O as default
145
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.265",
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",