jcicl 1.0.5 → 1.0.9

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.
Files changed (47) hide show
  1. package/.chunks/DefaultPropsProvider.js +3 -3
  2. package/.chunks/TextField.js +1 -1
  3. package/.chunks/x.js +22 -0
  4. package/Button/Button.js +36 -32
  5. package/CircularIconButton/CircularIconButton.js +23 -19
  6. package/DefaultTemplate/DefaultTemplate.js +3 -3
  7. package/DetailItemWithIcon/DetailItemWithIcon.js +31 -19
  8. package/DetailPageComponents/DetailPageComponents.d.ts +12 -4
  9. package/DetailPageComponents/DetailPageComponents.js +44 -28
  10. package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.d.ts +1 -0
  11. package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.js +59 -74
  12. package/EditableInfoCard/EditableInfoCard.js +107 -103
  13. package/FormComponents/FormComponents.d.ts +17 -10
  14. package/FormComponents/FormComponents.js +52 -46
  15. package/Icon/Icon.js +23 -22
  16. package/InfoCard/InfoCard.js +37 -33
  17. package/Input/Input.js +19 -15
  18. package/LabeledCheckbox/LabeledCheckbox.js +58 -55
  19. package/LabeledDropdown/LabeledDropdown.js +370 -366
  20. package/LabeledInput/LabeledInput.js +13 -13
  21. package/LabeledTextArea/LabeledTextArea.js +20 -13
  22. package/List/List.js +19 -18
  23. package/ListButton/ListButton.d.ts +2 -4
  24. package/ListButton/ListButton.js +21 -12
  25. package/Loading/Loading.js +14 -9
  26. package/Pill/Pill.d.ts +1 -0
  27. package/Pill/Pill.js +21 -13
  28. package/ScrollContainer/ScrollContainer.js +180 -179
  29. package/Search/Search.js +64 -62
  30. package/SquareIcon/SquareIcon.js +28 -25
  31. package/SquareIconButton/SquareIconButton.js +24 -11
  32. package/Stepper/Stepper.js +166 -146
  33. package/Table/Table.js +233 -221
  34. package/Toast/Toast.d.ts +8 -0
  35. package/Toast/Toast.js +154 -0
  36. package/Toast/ToastHelpers.d.ts +4 -0
  37. package/Toast/ToastHelpers.js +10 -0
  38. package/Toast/Toaster.d.ts +9 -0
  39. package/Toast/Toaster.js +25 -0
  40. package/Toast/index.d.ts +3 -0
  41. package/Toast/index.js +9 -0
  42. package/WithLoading/WithLoading.js +16 -11
  43. package/package.json +1 -1
  44. package/theme.d.ts +19 -9
  45. package/theme.js +15 -9
  46. package/themeUtils.d.ts +5 -0
  47. package/themeUtils.js +81 -69
@@ -2,9 +2,9 @@ import { jsxs as r, jsx as s } from "react/jsx-runtime";
2
2
  import { n as l } from "../.chunks/emotion-styled.browser.esm.js";
3
3
  import { c as e } from "../.chunks/emotion-react.browser.esm.js";
4
4
  import { Input as d } from "../Input/Input.js";
5
- const c = ["noLabel"], u = l("div", {
6
- shouldForwardProp: (t) => !c.includes(t)
7
- })(({ grid: t, displayMode: o }) => ({
5
+ const c = ["noLabel", "displayMode", "grid"], u = l("div", {
6
+ shouldForwardProp: (o) => !c.includes(o)
7
+ })(({ grid: o, displayMode: t }) => ({
8
8
  ...e`
9
9
  display: flex;
10
10
  flex-wrap: nowrap;
@@ -21,10 +21,10 @@ const c = ["noLabel"], u = l("div", {
21
21
  }
22
22
 
23
23
  .MuiInputBase-root {
24
- width: ${t && "100%"};
24
+ width: ${o && "100%"};
25
25
  }
26
26
 
27
- ${o && e`
27
+ ${t && e`
28
28
  .Mui-disabled {
29
29
  color: inherit !important;
30
30
  -webkit-text-fill-color: inherit !important;
@@ -35,18 +35,18 @@ const c = ["noLabel"], u = l("div", {
35
35
  `}
36
36
  `
37
37
  })), b = ({
38
- label: t,
39
- grid: o = !0,
38
+ label: o,
39
+ grid: t = !0,
40
40
  displayMode: a = !1,
41
- noLabel: n = !1,
41
+ noLabel: i = !1,
42
42
  limit: p,
43
- ...i
44
- }) => /* @__PURE__ */ r(u, { grid: o, displayMode: a, className: "jcLabeledInput", children: [
45
- !n && /* @__PURE__ */ r("span", { children: [
46
- t,
43
+ ...n
44
+ }) => /* @__PURE__ */ r(u, { grid: t, displayMode: a, className: "jcLabeledInput", children: [
45
+ !i && /* @__PURE__ */ r("span", { children: [
46
+ o,
47
47
  ":"
48
48
  ] }),
49
- /* @__PURE__ */ s(d, { ...i, slotProps: { htmlInput: { limit: p } } })
49
+ /* @__PURE__ */ s(d, { ...n, slotProps: { htmlInput: { limit: p } } })
50
50
  ] });
51
51
  export {
52
52
  b as LabeledInput,
@@ -1,10 +1,13 @@
1
1
  import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
2
  import { n as a } from "../.chunks/emotion-styled.browser.esm.js";
3
- import { c as s } from "../.chunks/emotion-react.browser.esm.js";
4
- import o from "../theme.js";
5
- import { T as n } from "../.chunks/TextField.js";
6
- const d = a("div")(() => ({
7
- ...s`
3
+ import { c as n } from "../.chunks/emotion-react.browser.esm.js";
4
+ import t from "../theme.js";
5
+ import { useThemeColors as d } from "../ThemeContext.js";
6
+ import { T as l } from "../.chunks/TextField.js";
7
+ const m = a("div", { shouldForwardProp: (e) => !["customTheme"].includes(e) })(({ customTheme: e }) => {
8
+ var o;
9
+ return {
10
+ ...n`
8
11
  display: flex;
9
12
  flex-direction: column;
10
13
  font-family: 'Roboto', sans-serif;
@@ -20,11 +23,11 @@ const d = a("div")(() => ({
20
23
  textarea {
21
24
  &:hover,
22
25
  :focus {
23
- box-shadow: ${o.boxShadows.green} inset;
26
+ box-shadow: ${(o = t.boxShadows.green) == null ? void 0 : o.split("#")[0]} ${e.themeColor} inset;
24
27
  }
25
28
  width: 100%;
26
29
  padding: 13px;
27
- border: 1px solid ${o.colors.gray};
30
+ border: 1px solid ${t.colors.gray};
28
31
  border-radius: 9px;
29
32
  resize: vertical;
30
33
  min-height: 130px;
@@ -44,11 +47,15 @@ const d = a("div")(() => ({
44
47
  }
45
48
  }
46
49
  `
47
- })), c = ({ label: e, ...t }) => /* @__PURE__ */ i(d, { className: "jcLabeledTextArea", children: [
48
- e && /* @__PURE__ */ r("span", { children: e }),
49
- /* @__PURE__ */ r(n, { ...t, multiline: !0, fullWidth: !0, rows: 1 })
50
- ] });
50
+ };
51
+ }), b = ({ label: e, ...o }) => {
52
+ const s = d();
53
+ return /* @__PURE__ */ i(m, { className: "jcLabeledTextArea", customTheme: s, children: [
54
+ e && /* @__PURE__ */ r("span", { children: e }),
55
+ /* @__PURE__ */ r(l, { ...o, multiline: !0, fullWidth: !0, rows: 1 })
56
+ ] });
57
+ };
51
58
  export {
52
- c as LabeledTextArea,
53
- c as default
59
+ b as LabeledTextArea,
60
+ b as default
54
61
  };
package/List/List.js CHANGED
@@ -1,39 +1,40 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { n as m } from "../.chunks/emotion-styled.browser.esm.js";
3
- import i from "../theme.js";
4
- const d = m("div")(
5
- ({ width: o, borderColor: t, bordered: s, backgroundColor: r }) => ({
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { n } from "../.chunks/emotion-styled.browser.esm.js";
3
+ import d from "../theme.js";
4
+ import { useThemeColors as u } from "../ThemeContext.js";
5
+ const x = n("div")(
6
+ ({ width: o, borderColor: t, bordered: r, backgroundColor: e }) => ({
6
7
  display: "flex",
7
8
  flexDirection: "column",
8
9
  fontFamily: "Roboto, sans-serif",
9
- backgroundColor: r,
10
- ...s && { border: `1px solid ${t}` },
10
+ backgroundColor: e,
11
+ ...r && { border: `1px solid ${t}` },
11
12
  borderRadius: "4px",
12
13
  ...o && {
13
14
  width: o
14
15
  }
15
16
  })
16
- ), x = m("div")(
17
- ({ padding: o, borderColor: t, bordered: s }) => ({
17
+ ), b = n("div")(
18
+ ({ padding: o, borderColor: t, bordered: r }) => ({
18
19
  padding: o,
19
- ...s && {
20
+ ...r && {
20
21
  borderBottom: `1px solid ${t}`,
21
22
  "&:last-child": {
22
23
  borderBottom: "none"
23
24
  }
24
25
  }
25
26
  })
26
- ), v = ({
27
+ ), k = ({
27
28
  bordered: o = !1,
28
29
  width: t,
29
- padding: s = "0",
30
- borderColor: r = i.colors.darkGreen,
31
- backgroundColor: a = i.colors.white,
32
- children: e
30
+ padding: r = "0",
31
+ borderColor: e,
32
+ backgroundColor: a = d.colors.white,
33
+ children: s
33
34
  }) => {
34
- const l = { width: t, borderColor: r, bordered: o, backgroundColor: a }, p = { padding: s, borderColor: r, bordered: o };
35
- return /* @__PURE__ */ n(d, { ...l, children: e == null ? void 0 : e.map((c, f) => /* @__PURE__ */ n(x, { ...p, children: c }, f)) });
35
+ const m = u(), l = { width: t, bordered: o, backgroundColor: a }, p = { padding: r, bordered: o };
36
+ return /* @__PURE__ */ i(x, { borderColor: e || m.themeDark, ...l, children: s == null ? void 0 : s.map((c, f) => /* @__PURE__ */ i(b, { borderColor: e || m.themeDark, ...p, children: c }, f)) });
36
37
  };
37
38
  export {
38
- v as default
39
+ k as default
39
40
  };
@@ -1,11 +1,9 @@
1
- import { CSSProperties } from 'react';
1
+ import { CSSProperties, PropsWithChildren } from 'react';
2
2
  import { ButtonBaseProps } from '@mui/material/ButtonBase/ButtonBase';
3
3
  export interface ListButtonProps extends ButtonBaseProps {
4
4
  padding?: string;
5
5
  active?: boolean;
6
6
  activeStyles?: CSSProperties;
7
7
  }
8
- declare const ListButton: import('@emotion/styled').StyledComponent<import('@mui/material').ButtonBaseOwnProps & Omit<import('@mui/material').ButtonBaseOwnProps, "classes"> & import('@mui/material/OverridableComponent').CommonProps & Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style" | "className" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef"> & {
9
- theme?: import('@emotion/react').Theme;
10
- } & ListButtonProps, {}, {}>;
8
+ declare const ListButton: React.FC<ListButtonProps & PropsWithChildren>;
11
9
  export default ListButton;
@@ -1,24 +1,33 @@
1
- import { n as s, i } from "../.chunks/emotion-styled.browser.esm.js";
2
- import e from "../theme.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { n, i as x } from "../.chunks/emotion-styled.browser.esm.js";
3
3
  import { B as p } from "../.chunks/ButtonBase.js";
4
- const l = s(p, {
5
- shouldForwardProp: (o) => i(o) && typeof o == "string"
6
- })(({ padding: o = "1rem", active: t, activeStyles: r }) => ({
4
+ import { useThemeColors as a } from "../ThemeContext.js";
5
+ const l = n(p, {
6
+ shouldForwardProp: (t) => x(t) && typeof t == "string" && !["customTheme"].includes(t)
7
+ })(({ padding: t = "1rem", active: o, activeStyles: s, customTheme: e }) => ({
7
8
  display: "flex",
8
9
  width: "100%",
9
10
  height: "100%",
10
- padding: o,
11
+ padding: t,
11
12
  fontSize: "inherit",
12
13
  justifyContent: "flex-start",
13
14
  transition: "201ms all ease-in-out",
14
- ...t && {
15
- boxShadow: `inset 0px -11px 6px -10px ${e.colors.darkGreen}, inset 0px 11px 6px -10px ${e.colors.darkGreen}`,
16
- ...r
15
+ ...o && {
16
+ boxShadow: `inset 0px -11px 6px -10px ${e.themeDark}, inset 0px 11px 6px -10px ${e.themeDark}`,
17
+ ...s
17
18
  },
18
19
  "&:hover, :focus-visible": {
19
- boxShadow: `inset 0px -11px 6px -10px ${e.colors.green}, inset 0px 11px 6px -10px ${e.colors.green}`
20
+ boxShadow: `inset 0px -11px 6px -10px ${e.themeColor}, inset 0px 11px 6px -10px ${e.themeColor}`
20
21
  }
21
- }));
22
+ })), u = ({
23
+ padding: t,
24
+ active: o,
25
+ activeStyles: s,
26
+ children: e
27
+ }) => {
28
+ const i = a();
29
+ return /* @__PURE__ */ r(l, { padding: t, active: o, activeStyles: s, customTheme: i, children: e });
30
+ };
22
31
  export {
23
- l as default
32
+ u as default
24
33
  };
@@ -1,14 +1,19 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { n as s } from "../.chunks/emotion-styled.browser.esm.js";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { n as e } from "../.chunks/emotion-styled.browser.esm.js";
3
3
  import { c as t } from "../.chunks/emotion-react.browser.esm.js";
4
- import e from "../theme.js";
5
- import { C as m } from "../.chunks/CircularProgress.js";
6
- const i = s(m)(({ styles: r }) => ({
4
+ import { useThemeColors as m } from "../ThemeContext.js";
5
+ import { C as c } from "../.chunks/CircularProgress.js";
6
+ const i = e(c, {
7
+ shouldForwardProp: (o) => !["customTheme"].includes(o)
8
+ })(({ styles: o, customTheme: r }) => ({
7
9
  ...t`
8
- color: ${e.colors.green};
9
- ${r};
10
+ color: ${r.themeColor};
11
+ ${o};
10
12
  `
11
- })), p = ({ ...r }) => /* @__PURE__ */ o(i, { size: 47, ...r });
13
+ })), d = ({ ...o }) => {
14
+ const r = m();
15
+ return /* @__PURE__ */ s(i, { size: 47, customTheme: r, ...o });
16
+ };
12
17
  export {
13
- p as default
18
+ d as default
14
19
  };
package/Pill/Pill.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export interface PillProps {
2
2
  backgroundColor?: string;
3
3
  textColor?: string;
4
+ type?: 'primary' | 'secondary';
4
5
  }
5
6
  export declare const Pill: React.FC<PillProps & {
6
7
  children: React.ReactNode;
package/Pill/Pill.js CHANGED
@@ -1,24 +1,32 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { n as l } from "../.chunks/emotion-styled.browser.esm.js";
3
- import { c } from "../.chunks/emotion-react.browser.esm.js";
4
- import o from "../theme.js";
5
- const i = l("span")(
6
- ({ backgroundColor: r = o.colors.whiteGreen, textColor: t = o.colors.darkGreen }) => ({
7
- ...c`
8
- font-family: ${o.fonts.roboto};
2
+ import { n as a } from "../.chunks/emotion-styled.browser.esm.js";
3
+ import { c as i } from "../.chunks/emotion-react.browser.esm.js";
4
+ import e from "../theme.js";
5
+ import { useThemeColors as p } from "../ThemeContext.js";
6
+ const l = a("span")(
7
+ ({ backgroundColor: r = e.colors.whiteGreen, textColor: o = e.colors.white }) => ({
8
+ ...i`
9
+ font-family: ${e.fonts.roboto};
9
10
  font-size: 13px;
10
11
  font-weight: 500;
11
- color: ${t};
12
+ color: ${o};
12
13
  background-color: ${r};
13
14
  padding: 3px 13px;
14
15
  border-radius: 21px;
15
16
  `
16
17
  })
17
- ), m = (r) => {
18
- const { backgroundColor: t = o.colors.green, textColor: e = o.colors.white, children: n } = r;
19
- return /* @__PURE__ */ s(i, { backgroundColor: t, textColor: e, children: n });
18
+ ), x = (r) => {
19
+ const o = p(), { backgroundColor: t, textColor: n, type: m = "primary", children: c } = r;
20
+ return m == "secondary" ? /* @__PURE__ */ s(
21
+ l,
22
+ {
23
+ backgroundColor: t || o.themeIconBackgroundB,
24
+ textColor: n || o.themeIconColorB,
25
+ children: c
26
+ }
27
+ ) : /* @__PURE__ */ s(l, { backgroundColor: t || o.themeIconBackgroundA, textColor: n, children: c });
20
28
  };
21
29
  export {
22
- m as Pill,
23
- m as default
30
+ x as Pill,
31
+ x as default
24
32
  };