jcicl 1.0.3 → 1.0.7

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 (36) hide show
  1. package/CircularIconButton/CircularIconButton.js +22 -18
  2. package/DefaultTemplate/DefaultTemplate.js +3 -3
  3. package/DetailItemWithIcon/DetailItemWithIcon.js +31 -19
  4. package/DetailPageComponents/DetailPageComponents.d.ts +12 -4
  5. package/DetailPageComponents/DetailPageComponents.js +44 -28
  6. package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.d.ts +1 -0
  7. package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.js +63 -62
  8. package/EditableInfoCard/EditableInfoCard.js +107 -103
  9. package/FormComponents/FormComponents.d.ts +17 -10
  10. package/FormComponents/FormComponents.js +52 -46
  11. package/Icon/Icon.js +23 -22
  12. package/InfoCard/InfoCard.js +37 -33
  13. package/Input/Input.js +19 -15
  14. package/LabeledCheckbox/LabeledCheckbox.js +58 -55
  15. package/LabeledDropdown/LabeledDropdown.js +370 -366
  16. package/LabeledInput/LabeledInput.js +13 -13
  17. package/LabeledTextArea/LabeledTextArea.js +20 -13
  18. package/List/List.js +19 -18
  19. package/ListButton/ListButton.d.ts +2 -4
  20. package/ListButton/ListButton.js +21 -12
  21. package/Loading/Loading.js +14 -9
  22. package/Memo/Memo.js +16 -15
  23. package/Pill/Pill.js +13 -12
  24. package/Search/Search.js +64 -62
  25. package/SquareIcon/SquareIcon.js +28 -25
  26. package/SquareIconButton/SquareIconButton.js +24 -11
  27. package/Stepper/Stepper.js +166 -146
  28. package/Table/Table.js +233 -221
  29. package/WithLoading/WithLoading.js +16 -11
  30. package/package.json +1 -1
  31. package/theme.d.ts +17 -9
  32. package/theme.js +4 -0
  33. package/themeUtils.d.ts +5 -0
  34. package/themeUtils.js +81 -69
  35. package/utils.d.ts +1 -0
  36. package/utils.js +27 -7
@@ -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/Memo/Memo.js CHANGED
@@ -1,15 +1,16 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
2
  import { n as e } from "../.chunks/emotion-styled.browser.esm.js";
3
3
  import { c as o } from "../.chunks/emotion-react.browser.esm.js";
4
- import n from "../theme.js";
5
- import { DetailItemContainer as c } from "../DetailPageComponents/DetailPageComponents.js";
6
- const l = e("div")(() => ({
4
+ import i from "../theme.js";
5
+ import { DetailItemContainer as a } from "../DetailPageComponents/DetailPageComponents.js";
6
+ import { formatTimestamp as p } from "../utils.js";
7
+ const c = e("div")(() => ({
7
8
  ...o`
8
9
  display: flex;
9
10
  justify-content: space-between;
10
11
  align-items: center;
11
12
  `
12
- })), a = e("h3")(() => ({
13
+ })), l = e("h3")(() => ({
13
14
  ...o`
14
15
  font-size: 21px;
15
16
  font-weight: 600;
@@ -20,25 +21,25 @@ const l = e("div")(() => ({
20
21
  margin-right: 9px;
21
22
  }
22
23
  `
23
- })), p = e("span")(() => ({
24
+ })), f = e("span")(() => ({
24
25
  ...o`
25
26
  font-size: 15px;
26
- color: ${n.colors.gray};
27
+ color: ${i.colors.gray};
27
28
  margin: 0px;
28
29
  `
29
- })), f = e("p")(() => ({
30
+ })), d = e("p")(() => ({
30
31
  ...o`
31
- color: ${n.colors.gray};
32
+ color: ${i.colors.gray};
32
33
  font-size: 18px;
33
34
  margin: 0px;
34
35
  `
35
- })), M = ({ username: r, createDateTime: s, note: m }) => /* @__PURE__ */ i(c, { children: [
36
- /* @__PURE__ */ i(l, { children: [
37
- /* @__PURE__ */ t(a, { children: r }),
38
- /* @__PURE__ */ t(p, { children: s })
36
+ })), j = ({ username: n, createDateTime: m, note: s }) => /* @__PURE__ */ r(a, { children: [
37
+ /* @__PURE__ */ r(c, { children: [
38
+ /* @__PURE__ */ t(l, { children: n }),
39
+ /* @__PURE__ */ t(f, { children: p(m) })
39
40
  ] }),
40
- /* @__PURE__ */ t(f, { children: m })
41
+ /* @__PURE__ */ t(d, { children: s })
41
42
  ] });
42
43
  export {
43
- M as default
44
+ j as default
44
45
  };
package/Pill/Pill.js CHANGED
@@ -1,24 +1,25 @@
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";
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { n as c } from "../.chunks/emotion-styled.browser.esm.js";
3
+ import { c as m } from "../.chunks/emotion-react.browser.esm.js";
4
4
  import o from "../theme.js";
5
- const i = l("span")(
6
- ({ backgroundColor: r = o.colors.whiteGreen, textColor: t = o.colors.darkGreen }) => ({
7
- ...c`
5
+ import { useThemeColors as i } from "../ThemeContext.js";
6
+ const p = c("span")(
7
+ ({ backgroundColor: r = o.colors.whiteGreen, textColor: e = o.colors.darkGreen }) => ({
8
+ ...m`
8
9
  font-family: ${o.fonts.roboto};
9
10
  font-size: 13px;
10
11
  font-weight: 500;
11
- color: ${t};
12
+ color: ${e};
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 e = i(), { backgroundColor: t, textColor: s = o.colors.white, children: n } = r;
20
+ return /* @__PURE__ */ l(p, { backgroundColor: t || e.themeColor, textColor: s, children: n });
20
21
  };
21
22
  export {
22
- m as Pill,
23
- m as default
23
+ x as Pill,
24
+ x as default
24
25
  };
package/Search/Search.js CHANGED
@@ -1,31 +1,32 @@
1
- import { jsx as o, jsxs as v } from "react/jsx-runtime";
2
- import { useState as S } from "react";
3
- import { n as s } from "../.chunks/emotion-styled.browser.esm.js";
4
- import { c as l } from "../.chunks/emotion-react.browser.esm.js";
5
- import e from "../theme.js";
6
- import y from "../Icon/Icon.js";
1
+ import { jsx as r, jsxs as v } from "react/jsx-runtime";
2
+ import { useState as C } from "react";
3
+ import { n as a } from "../.chunks/emotion-styled.browser.esm.js";
4
+ import { c } from "../.chunks/emotion-react.browser.esm.js";
5
+ import o from "../theme.js";
6
+ import S from "../Icon/Icon.js";
7
7
  import { Button as p } from "../Button/Button.js";
8
- import { c as m } from "../.chunks/createSvgIcon.js";
8
+ import { c as h } from "../.chunks/createSvgIcon.js";
9
+ import { useThemeColors as y } from "../ThemeContext.js";
9
10
  import { T as z } from "../.chunks/TextField.js";
10
- const F = m(/* @__PURE__ */ o("path", {
11
+ const F = h(/* @__PURE__ */ r("path", {
11
12
  d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"
12
- }), "Search"), C = m(/* @__PURE__ */ o("path", {
13
+ }), "Search"), j = h(/* @__PURE__ */ r("path", {
13
14
  d: "M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"
14
- }), "FilterList"), j = ["borderColor", "borderFocusColor", "shadowTertiary"], k = s("div")(() => ({
15
- ...l`
15
+ }), "FilterList"), k = ["borderColor", "borderFocusColor", "shadowTertiary"], I = a("div")(() => ({
16
+ ...c`
16
17
  position: relative;
17
18
  width: 100%;
18
19
  display: flex;
19
20
  flex-direction: column;
20
21
  align-items: center;
21
22
  `
22
- })), I = s(z, {
23
- shouldForwardProp: (r) => !j.includes(r)
24
- })(({ borderColor: r, borderFocusColor: i, shadowTertiary: a }) => ({
25
- backgroundColor: e.colors.white,
23
+ })), M = a(z, {
24
+ shouldForwardProp: (e) => !k.includes(e)
25
+ })(({ borderColor: e, borderFocusColor: t, shadowTertiary: d }) => ({
26
+ backgroundColor: o.colors.white,
26
27
  borderRadius: "1rem",
27
28
  height: "2rem",
28
- border: `1px solid ${r}`,
29
+ border: `1px solid ${e}`,
29
30
  transition: "313ms all ease-out",
30
31
  zIndex: 1327,
31
32
  ".MuiInputBase-root": {
@@ -44,7 +45,7 @@ const F = m(/* @__PURE__ */ o("path", {
44
45
  },
45
46
  "&:hover": {
46
47
  svg: {
47
- boxShadow: `0 0 2px ${e.colors.midnight}`
48
+ boxShadow: `0 0 2px ${o.colors.midnight}`
48
49
  }
49
50
  }
50
51
  },
@@ -52,8 +53,8 @@ const F = m(/* @__PURE__ */ o("path", {
52
53
  borderRadius: "50%",
53
54
  "&:hover": {
54
55
  svg: {
55
- backgroundColor: i,
56
- fill: e.colors.white
56
+ backgroundColor: t,
57
+ fill: o.colors.white
57
58
  },
58
59
  ".MuiTouchRipple-root": {
59
60
  backgroundColor: "transparent"
@@ -72,11 +73,11 @@ const F = m(/* @__PURE__ */ o("path", {
72
73
  padding: "0 6px"
73
74
  },
74
75
  "&:hover, :focus-visible, :focus-within": {
75
- borderColor: i,
76
- boxShadow: a
76
+ borderColor: t,
77
+ boxShadow: d
77
78
  },
78
79
  "&:focus-visible": {
79
- borderColor: r,
80
+ borderColor: e,
80
81
  borderWidth: "2px"
81
82
  },
82
83
  fieldset: {
@@ -93,8 +94,8 @@ const F = m(/* @__PURE__ */ o("path", {
93
94
  padding: "2px"
94
95
  }
95
96
  }
96
- })), M = s("div")(({ open: r }) => ({
97
- ...l`
97
+ })), R = a("div")(({ open: e }) => ({
98
+ ...c`
98
99
  box-sizing: border-box;
99
100
  position: absolute;
100
101
  width: calc(50%);
@@ -103,23 +104,23 @@ const F = m(/* @__PURE__ */ o("path", {
103
104
  z-index: 1313;
104
105
  display: flex;
105
106
  gap: 1rem;
106
- background-color: ${e.colors.white};
107
- box-shadow: ${e.boxShadows.midnight};
108
- padding: ${r ? "2rem 1rem 1rem 1rem" : 0};
107
+ background-color: ${o.colors.white};
108
+ box-shadow: ${o.boxShadows.midnight};
109
+ padding: ${e ? "2rem 1rem 1rem 1rem" : 0};
109
110
  transition: 313ms all ease-in-out;
110
111
  display: grid;
111
- grid-template-rows: ${r ? "1fr" : "0fr"};
112
+ grid-template-rows: ${e ? "1fr" : "0fr"};
112
113
 
113
114
  .jcFiltersWrapper {
114
115
  overflow: hidden;
115
116
  }
116
117
 
117
- @media screen and (max-width: ${e.screenSizes.tablet}) {
118
+ @media screen and (max-width: ${o.screenSizes.tablet}) {
118
119
  width: calc(100% - 6px);
119
120
  }
120
121
  `
121
- })), R = s("div")(() => ({
122
- ...l`
122
+ })), $ = a("div")(() => ({
123
+ ...c`
123
124
  display: grid;
124
125
  grid-template-columns: repeat(3, 1fr);
125
126
  grid-row-gap: 1.3rem;
@@ -128,7 +129,7 @@ const F = m(/* @__PURE__ */ o("path", {
128
129
  box-sizing: border-box;
129
130
  width: 100%;
130
131
 
131
- @media screen and (max-width: ${e.screenSizes.tablet}) {
132
+ @media screen and (max-width: ${o.screenSizes.tablet}) {
132
133
  display: grid;
133
134
  grid-template-columns: repeat(2, 1fr);
134
135
  }
@@ -142,44 +143,42 @@ const F = m(/* @__PURE__ */ o("path", {
142
143
  justify-self: center;
143
144
  }
144
145
  `
145
- })), D = ({
146
- borderColor: r = e.colors.green,
147
- // border primary
148
- borderFocusColor: i = e.colors.darkGreen,
149
- // icon primary
150
- shadowTertiary: a = e.boxShadows.darkGreenThick,
151
- filters: t,
152
- onSearch: d,
153
- ...h
146
+ })), K = ({
147
+ borderColor: e,
148
+ borderFocusColor: t,
149
+ shadowTertiary: d,
150
+ filters: i,
151
+ onSearch: l,
152
+ ...u
154
153
  }) => {
155
- const [c, g] = S(!1), u = (n) => {
156
- n.preventDefault(), n.key === "Enter" && d && d();
157
- }, x = { borderColor: r, borderFocusColor: i, shadowTertiary: a, ...h }, b = t && t.length > 0;
158
- return /* @__PURE__ */ v(k, { className: "jcInputContainer", children: [
159
- /* @__PURE__ */ o(
160
- I,
154
+ const n = y(), [m, g] = C(!1), b = (s) => {
155
+ s.preventDefault(), s.key === "Enter" && l && l();
156
+ }, x = i && i.length > 0;
157
+ return /* @__PURE__ */ v(I, { className: "jcInputContainer", children: [
158
+ /* @__PURE__ */ r(
159
+ M,
161
160
  {
162
161
  slotProps: {
163
162
  input: {
164
- startAdornment: /* @__PURE__ */ o(
163
+ startAdornment: /* @__PURE__ */ r(
165
164
  p,
166
165
  {
167
166
  variant: "icon",
168
167
  size: 28,
169
- onClick: d,
170
- color: i,
168
+ onClick: l,
169
+ color: t || n.themeDark,
171
170
  highlightColor: "transparent",
172
171
  className: "searchIcon",
173
- children: /* @__PURE__ */ o(F, {})
172
+ children: /* @__PURE__ */ r(F, {})
174
173
  }
175
174
  ),
176
- endAdornment: b && /* @__PURE__ */ o(
177
- y,
175
+ endAdornment: x && /* @__PURE__ */ r(
176
+ S,
178
177
  {
179
- onClick: () => g(!c),
180
- icon: /* @__PURE__ */ o(C, {}),
181
- backgroundColor: r,
182
- iconColor: e.colors.white,
178
+ onClick: () => g(!m),
179
+ icon: /* @__PURE__ */ r(j, {}),
180
+ backgroundColor: e || n.themeColor,
181
+ iconColor: o.colors.white,
183
182
  size: 28,
184
183
  padding: 3
185
184
  }
@@ -187,14 +186,17 @@ const F = m(/* @__PURE__ */ o("path", {
187
186
  }
188
187
  },
189
188
  type: "search",
190
- ...x,
191
- onKeyUp: u
189
+ borderColor: e || n.themeColor,
190
+ borderFocusColor: t || n.themeDark,
191
+ shadowTertiary: d || n.themeShadowC,
192
+ ...u,
193
+ onKeyUp: b
192
194
  }
193
195
  ),
194
- /* @__PURE__ */ o(M, { open: c, className: "jcFiltersContainer", children: /* @__PURE__ */ o(R, { className: "jcFiltersWrapper", children: t == null ? void 0 : t.map(({ name: n, onClick: f, active: w }) => /* @__PURE__ */ o(p, { className: "jcFiltersButton", variant: "filter", onClick: f, active: w, children: n }, n)) }) })
196
+ /* @__PURE__ */ r(R, { open: m, className: "jcFiltersContainer", children: /* @__PURE__ */ r($, { className: "jcFiltersWrapper", children: i == null ? void 0 : i.map(({ name: s, onClick: f, active: w }) => /* @__PURE__ */ r(p, { className: "jcFiltersButton", variant: "filter", onClick: f, active: w, children: s }, s)) }) })
195
197
  ] });
196
198
  };
197
199
  export {
198
- D as Search,
199
- D as default
200
+ K as Search,
201
+ K as default
200
202
  };
@@ -1,27 +1,30 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { n as i } from "../.chunks/emotion-styled.browser.esm.js";
3
- import { c as n } from "../.chunks/emotion-react.browser.esm.js";
4
- import s from "../theme.js";
5
- const l = i("div")(
6
- ({ size: r, backgroundColor: o, color: e }) => ({
7
- ...n`
8
- flex-shrink: 0;
9
- width: ${r}px;
10
- height: ${r}px;
11
- background-color: ${o};
12
- border-radius: 17%;
13
- display: flex;
14
- align-items: center;
15
- justify-content: center;
16
- color: ${e};
17
- `
18
- })
19
- ), f = ({
20
- icon: r,
21
- iconSize: o = 20,
22
- color: e = s.colors.white,
23
- backgroundColor: c = s.colors.green
24
- }) => /* @__PURE__ */ t(l, { size: o * 2, backgroundColor: c, color: e, children: /* @__PURE__ */ t(r, { size: o }) });
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { n } from "../.chunks/emotion-styled.browser.esm.js";
3
+ import { c as i } from "../.chunks/emotion-react.browser.esm.js";
4
+ import m from "../theme.js";
5
+ import { useThemeColors as l } from "../ThemeContext.js";
6
+ const d = n("div", { shouldForwardProp: (o) => !["customTheme"].includes(o) })(({ size: o, backgroundColor: r, color: t, customTheme: e }) => ({
7
+ ...i`
8
+ flex-shrink: 0;
9
+ width: ${o}px;
10
+ height: ${o}px;
11
+ background-color: ${r || e.themeIconBackgroundA};
12
+ border-radius: 17%;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ color: ${t || e.themeIconColorA};
17
+ `
18
+ })), x = ({
19
+ icon: o,
20
+ iconSize: r = 20,
21
+ color: t = m.colors.white,
22
+ backgroundColor: e
23
+ //green
24
+ }) => {
25
+ const c = l();
26
+ return /* @__PURE__ */ s(d, { size: r * 2, backgroundColor: e, color: t, customTheme: c, children: /* @__PURE__ */ s(o, { size: r }) });
27
+ };
25
28
  export {
26
- f as default
29
+ x as default
27
30
  };