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
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
  };
@@ -1,9 +1,10 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { n as c } from "../.chunks/emotion-styled.browser.esm.js";
3
- import { c as l } from "../.chunks/emotion-react.browser.esm.js";
4
- import n from "../theme.js";
5
- const a = c("button")(({ backgroundColor: r, color: e, size: o }) => ({
6
- ...l`
3
+ import { c as a } from "../.chunks/emotion-react.browser.esm.js";
4
+ import l from "../theme.js";
5
+ import { useThemeColors as u } from "../ThemeContext.js";
6
+ const m = c("button")(({ backgroundColor: r, color: e, size: o }) => ({
7
+ ...a`
7
8
  width: ${o}px;
8
9
  height: ${o}px;
9
10
  background-color: ${r};
@@ -31,13 +32,25 @@ const a = c("button")(({ backgroundColor: r, color: e, size: o }) => ({
31
32
  }
32
33
  }
33
34
  `
34
- })), d = ({
35
- color: r = n.colors.white,
36
- backgroundColor: e = n.colors.green,
35
+ })), g = ({
36
+ color: r = l.colors.white,
37
+ backgroundColor: e,
37
38
  size: o = 20,
38
- onClick: s,
39
- icon: i
40
- }) => /* @__PURE__ */ t(a, { backgroundColor: e, color: r, size: o * 2, onClick: s, children: /* @__PURE__ */ t(i, { size: o }) });
39
+ onClick: n,
40
+ icon: s
41
+ }) => {
42
+ const i = u();
43
+ return /* @__PURE__ */ t(
44
+ m,
45
+ {
46
+ backgroundColor: e || i.themeIconBackgroundA,
47
+ color: r,
48
+ size: o * 2,
49
+ onClick: n,
50
+ children: /* @__PURE__ */ t(s, { size: o })
51
+ }
52
+ );
53
+ };
41
54
  export {
42
- d as default
55
+ g as default
43
56
  };