jcicl 1.0.7 → 1.0.11

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 (40) hide show
  1. package/.chunks/DefaultPropsProvider.js +5 -5
  2. package/.chunks/Paper.js +1 -1
  3. package/.chunks/Popper.js +1 -1
  4. package/.chunks/Portal.js +205 -187
  5. package/.chunks/TextField.js +13 -15
  6. package/.chunks/check.js +11 -0
  7. package/.chunks/index.js +83 -6
  8. package/.chunks/useMediaQuery.js +1 -1
  9. package/.chunks/useSlot.js +1 -1
  10. package/.chunks/x.js +14 -0
  11. package/AppContainer/AppContainer.js +46 -47
  12. package/Button/Button.d.ts +2 -1
  13. package/Button/Button.js +251 -196
  14. package/CircularIconButton/CircularIconButton.js +5 -5
  15. package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.d.ts +2 -0
  16. package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.js +62 -66
  17. package/FormFields/FormFields.d.ts +1 -1
  18. package/FormFields/FormFields.js +52 -37
  19. package/LabeledDropdown/LabeledDropdown.js +4 -5
  20. package/Pill/Pill.d.ts +1 -0
  21. package/Pill/Pill.js +19 -12
  22. package/ScrollContainer/ScrollContainer.js +180 -179
  23. package/Stepper/Stepper.js +1 -1
  24. package/Table/Table.js +299 -268
  25. package/Toast/Toast.d.ts +8 -0
  26. package/Toast/Toast.js +155 -0
  27. package/Toast/ToastHelpers.d.ts +6 -0
  28. package/Toast/ToastHelpers.js +25 -0
  29. package/Toast/Toaster.d.ts +9 -0
  30. package/Toast/Toaster.js +25 -0
  31. package/Toast/index.d.ts +3 -0
  32. package/Toast/index.js +11 -0
  33. package/Tooltip/Tooltip.js +18 -20
  34. package/package.json +1 -1
  35. package/theme.d.ts +2 -0
  36. package/theme.js +11 -9
  37. package/utils.d.ts +1 -0
  38. package/utils.js +34 -15
  39. package/.chunks/resolveComponentProps.js +0 -80
  40. package/.chunks/useTheme.js +0 -23
@@ -26,18 +26,18 @@ const u = i("div")(({ backgroundColor: t, size: r, color: o }) => ({
26
26
  color: t = l.colors.white,
27
27
  backgroundColor: r,
28
28
  size: o = 20,
29
- onClick: s,
30
- icon: n
29
+ onClick: n,
30
+ icon: s
31
31
  }) => {
32
32
  const c = m();
33
33
  return /* @__PURE__ */ e(
34
34
  u,
35
35
  {
36
36
  color: t,
37
- backgroundColor: r || c.themeColor,
37
+ backgroundColor: r || c.themeIconBackgroundA,
38
38
  size: o * 1.2,
39
- onClick: s,
40
- children: /* @__PURE__ */ e(n, { size: o * 0.8 })
39
+ onClick: n,
40
+ children: /* @__PURE__ */ e(s, { size: o * 0.8 })
41
41
  }
42
42
  );
43
43
  };
@@ -11,6 +11,8 @@ export interface EditableDetailItemWithIconProps {
11
11
  onSave?: () => void;
12
12
  onCancel?: () => void;
13
13
  passedTheme?: any;
14
+ formattedValue?: string;
15
+ copyOnClick?: boolean;
14
16
  }
15
17
  declare const EditableDetailItemWithIcon: React.FC<EditableDetailItemWithIconProps>;
16
18
  export default EditableDetailItemWithIcon;
@@ -1,29 +1,25 @@
1
- import { jsx as o, jsxs as c } from "react/jsx-runtime";
2
- import { useState as y } from "react";
1
+ import { jsx as o, jsxs as n } from "react/jsx-runtime";
2
+ import { useState as B } from "react";
3
3
  import { n as k } from "../.chunks/emotion-styled.browser.esm.js";
4
- import { c as g } from "../.chunks/emotion-react.browser.esm.js";
5
- import r from "../theme.js";
6
- import { Flex as n } from "../Flex/Flex.js";
7
- import { Input as w } from "../Input/Input.js";
8
- import { DetailItemContainer as x } from "../DetailPageComponents/DetailPageComponents.js";
9
- import B from "../SquareIcon/SquareIcon.js";
10
- import m from "../SquareIconButton/SquareIconButton.js";
11
- import { useThemeColors as _ } from "../ThemeContext.js";
12
- import { c as s } from "../.chunks/createLucideIcon.js";
4
+ import { c as I } from "../.chunks/emotion-react.browser.esm.js";
5
+ import e from "../theme.js";
6
+ import { Flex as c } from "../Flex/Flex.js";
7
+ import { Input as y } from "../Input/Input.js";
8
+ import { DetailItemContainer as D } from "../DetailPageComponents/DetailPageComponents.js";
9
+ import z from "../SquareIcon/SquareIcon.js";
10
+ import s from "../SquareIconButton/SquareIconButton.js";
11
+ import { Button as j } from "../Button/Button.js";
12
+ import { useThemeColors as G } from "../ThemeContext.js";
13
+ import { c as L } from "../.chunks/createLucideIcon.js";
14
+ import { X as S } from "../.chunks/x.js";
15
+ import { C as W } from "../.chunks/check.js";
13
16
  /**
14
17
  * @license lucide-react v0.525.0 - ISC
15
18
  *
16
19
  * This source code is licensed under the ISC license.
17
20
  * See the LICENSE file in the root directory of this source tree.
18
21
  */
19
- const D = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], z = s("check", D);
20
- /**
21
- * @license lucide-react v0.525.0 - ISC
22
- *
23
- * This source code is licensed under the ISC license.
24
- * See the LICENSE file in the root directory of this source tree.
25
- */
26
- const j = [
22
+ const q = [
27
23
  [
28
24
  "path",
29
25
  {
@@ -32,88 +28,88 @@ const j = [
32
28
  }
33
29
  ],
34
30
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
35
- ], G = s("pencil", j);
36
- /**
37
- * @license lucide-react v0.525.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */
42
- const L = [
43
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
44
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
45
- ], N = s("x", L), S = k("p")(() => ({
46
- ...g`
31
+ ], E = L("pencil", q), T = k("p")(() => ({
32
+ ...I`
47
33
  font-size: 0.875rem;
48
34
  font-weight: 500;
49
- color: ${r.colors.charcoal} !important;
35
+ color: ${e.colors.charcoal} !important;
50
36
  margin: 0;
51
37
  margin-bottom: 0.25rem;
52
38
  `
53
- })), W = k("p")(() => ({
54
- ...g`
39
+ })), g = k("p")(() => ({
40
+ ...I`
55
41
  font-size: 1rem;
56
42
  word-wrap: break-word;
57
43
  margin: 0;
58
44
  `
59
- })), O = (i) => /* @__PURE__ */ o($, { ...i }), $ = ({
45
+ })), Z = (i) => /* @__PURE__ */ o(_, { ...i }), _ = ({
60
46
  icon: i,
61
- iconSize: I = 20,
47
+ iconSize: C = 20,
62
48
  onValueChange: p,
63
49
  onSave: d,
64
- onCancel: h,
65
- customEditForm: l,
66
- editButtonMarginTop: f,
50
+ onCancel: f,
51
+ customEditForm: a,
52
+ editButtonMarginTop: h,
67
53
  label: b,
68
- value: u
54
+ value: l,
55
+ formattedValue: w,
56
+ copyOnClick: u = !1
69
57
  }) => {
70
- const [e, a] = y(!1), t = _();
71
- return /* @__PURE__ */ o(x, { children: /* @__PURE__ */ c(n, { gap: "19px", children: [
58
+ const [r, m] = B(!1), t = G();
59
+ return /* @__PURE__ */ o(D, { children: /* @__PURE__ */ n(c, { gap: "19px", children: [
72
60
  /* @__PURE__ */ o(
73
- B,
61
+ z,
74
62
  {
75
63
  icon: i,
76
- iconSize: I,
64
+ iconSize: C,
77
65
  color: t.themeIconColorB,
78
66
  backgroundColor: t.themeIconBackgroundB
79
67
  }
80
68
  ),
81
- /* @__PURE__ */ c(n, { justifyContent: "space-between", width: "100%", gap: "12px", children: [
82
- /* @__PURE__ */ c(n, { column: !0, styles: { flexGrow: 1 }, children: [
83
- /* @__PURE__ */ o(S, { children: b }),
84
- !e && /* @__PURE__ */ o(W, { children: u }),
85
- e && !l && /* @__PURE__ */ o(w, { defaultValue: u, onChange: (C) => p && p(C.target.value) }),
86
- e && l && l
69
+ /* @__PURE__ */ n(c, { justifyContent: "space-between", width: "100%", gap: "12px", children: [
70
+ /* @__PURE__ */ n(c, { column: !0, styles: { flexGrow: 1 }, children: [
71
+ /* @__PURE__ */ o(T, { children: b }),
72
+ !r && !u && /* @__PURE__ */ o(g, { children: l }),
73
+ !r && u && /* @__PURE__ */ o(g, { children: /* @__PURE__ */ o(j, { variant: "copy", children: l }) }),
74
+ r && !a && /* @__PURE__ */ o(
75
+ y,
76
+ {
77
+ defaultValue: l,
78
+ value: w,
79
+ onChange: (x) => p && p(x.target.value)
80
+ }
81
+ ),
82
+ r && a && a
87
83
  ] }),
88
- !e && /* @__PURE__ */ o(
89
- m,
84
+ !r && /* @__PURE__ */ o(
85
+ s,
90
86
  {
91
87
  backgroundColor: t.themeIconBackgroundB,
92
88
  color: t.themeIconColorB,
93
- icon: G,
94
- onClick: () => a(!0)
89
+ icon: E,
90
+ onClick: () => m(!0)
95
91
  }
96
92
  ),
97
- e && /* @__PURE__ */ c(n, { gap: "9px", styles: { marginTop: f || "0" }, children: [
93
+ r && /* @__PURE__ */ n(c, { gap: "9px", styles: { marginTop: h || "0" }, children: [
98
94
  /* @__PURE__ */ o(
99
- m,
95
+ s,
100
96
  {
101
- backgroundColor: r.colors.cherryBlossom,
102
- color: r.colors.maroon,
103
- icon: N,
97
+ backgroundColor: e.colors.cherryBlossom,
98
+ color: e.colors.maroon,
99
+ icon: S,
104
100
  onClick: () => {
105
- a(!1), h && h();
101
+ m(!1), f && f();
106
102
  }
107
103
  }
108
104
  ),
109
105
  /* @__PURE__ */ o(
110
- m,
106
+ s,
111
107
  {
112
- icon: z,
113
- backgroundColor: r.colors.whiteGreenA,
114
- color: r.colors.darkGreen,
108
+ icon: W,
109
+ backgroundColor: e.colors.whiteGreenA,
110
+ color: e.colors.darkGreen,
115
111
  onClick: () => {
116
- a(!1), d && d();
112
+ m(!1), d && d();
117
113
  }
118
114
  }
119
115
  )
@@ -122,5 +118,5 @@ const L = [
122
118
  ] }) });
123
119
  };
124
120
  export {
125
- O as default
121
+ Z as default
126
122
  };
@@ -6,7 +6,7 @@ export type FormField = {
6
6
  type: 'checkbox' | 'currency' | 'date' | 'dropdown' | 'email' | 'multiDropdown' | 'number' | 'phone' | 'radio' | 'text' | 'textarea' | 'url';
7
7
  options?: DropdownOption[];
8
8
  limit?: number;
9
- defaultValue?: string | number | boolean;
9
+ defaultValue?: string | number;
10
10
  };
11
11
  export type FormFieldsProps = {
12
12
  title?: string;
@@ -1,43 +1,58 @@
1
- import { jsxs as j, Fragment as C, jsx as r } from "react/jsx-runtime";
2
- import { FormInput as D } from "../FormInput/FormInput.js";
3
- import { FormSectionTitle as S, FormFieldGrid as b, FormFieldCheckboxContainer as z } from "../FormComponents/FormComponents.js";
4
- import G from "../theme.js";
5
- import { u as I } from "../.chunks/useMediaQuery.js";
6
- const q = ({
7
- title: i,
8
- fields: d,
9
- columns: s = I(`(max-width: ${G.screenSizes.tablet})`) ? 2 : 3,
10
- columnsOverride: u,
11
- gap: a = 21,
12
- noLabel: F = !1,
13
- checkboxContainer: m = !1,
14
- formDefaults: t,
15
- onChange: p
16
- }) => {
17
- const n = () => d.map(({ key: o, label: c, type: e, limit: f, options: h, defaultValue: l, ...x }) => {
18
- const w = t[o] ? t[o] : l || (e === "multiDropdown" ? [] : "");
19
- return /* @__PURE__ */ r(
20
- D,
1
+ import { jsxs as g, Fragment as j, jsx as i } from "react/jsx-runtime";
2
+ import { FormInput as w } from "../FormInput/FormInput.js";
3
+ import { FormSectionTitle as C, FormFieldGrid as S, FormFieldCheckboxContainer as b } from "../FormComponents/FormComponents.js";
4
+ import v from "../theme.js";
5
+ import { formatPhoneNumber as z } from "../utils.js";
6
+ import { u as G } from "../.chunks/useMediaQuery.js";
7
+ const V = ({
8
+ title: p,
9
+ fields: s,
10
+ columns: f = G(`(max-width: ${v.screenSizes.tablet})`) ? 2 : 3,
11
+ columnsOverride: x,
12
+ gap: D = 21,
13
+ noLabel: h = !1,
14
+ checkboxContainer: F = !1,
15
+ formDefaults: n,
16
+ onChange: c
17
+ }) => /* @__PURE__ */ g(j, { children: [
18
+ p && /* @__PURE__ */ i(C, { children: p }),
19
+ !F && /* @__PURE__ */ i(S, { columns: f, columnsOverride: x, gap: D, children: s.map(({ key: o, label: l, type: r, limit: u, options: e, defaultValue: m, ...d }) => {
20
+ const t = n[o] ? n[o] : m || (r === "multiDropdown" ? [] : "");
21
+ return /* @__PURE__ */ i(
22
+ w,
21
23
  {
22
- onChange: (g) => p(o, g, e),
23
- label: c,
24
- type: e,
25
- limit: f,
26
- defaultValue: w,
27
- noLabel: F,
28
- options: h,
29
- multiple: e === "multiDropdown",
30
- ...x
24
+ onChange: (a) => c(o, a, r),
25
+ label: l,
26
+ type: r,
27
+ limit: u,
28
+ value: r === "phone" ? z(t)[0] : t,
29
+ noLabel: h,
30
+ options: e,
31
+ multiple: r === "multiDropdown",
32
+ ...d
31
33
  },
32
34
  o
33
35
  );
34
- });
35
- return /* @__PURE__ */ j(C, { children: [
36
- i && /* @__PURE__ */ r(S, { children: i }),
37
- !m && /* @__PURE__ */ r(b, { columns: s, columnsOverride: u, gap: a, children: /* @__PURE__ */ r(n, {}) }),
38
- m && /* @__PURE__ */ r(z, { children: /* @__PURE__ */ r(n, {}) })
39
- ] });
40
- };
36
+ }) }),
37
+ F && /* @__PURE__ */ i(b, { children: s.map(({ key: o, label: l, type: r, limit: u, options: e, defaultValue: m, ...d }) => {
38
+ const t = n[o] ? n[o] : m || (r === "multiDropdown" ? [] : "");
39
+ return /* @__PURE__ */ i(
40
+ w,
41
+ {
42
+ onChange: (a) => c(o, a, r),
43
+ label: l,
44
+ type: r,
45
+ limit: u,
46
+ defaultValue: t,
47
+ noLabel: h,
48
+ options: e,
49
+ multiple: r === "multiDropdown",
50
+ ...d
51
+ },
52
+ o
53
+ );
54
+ }) })
55
+ ] });
41
56
  export {
42
- q as default
57
+ V as default
43
58
  };
@@ -14,7 +14,7 @@ import { B as So } from "../.chunks/ButtonBase.js";
14
14
  import { c as wo } from "../.chunks/chainPropTypes.js";
15
15
  import { P as Wo } from "../.chunks/Popper.js";
16
16
  import { P as Ko } from "../.chunks/Paper.js";
17
- import { u as Zo } from "../.chunks/Portal.js";
17
+ import { b as Zo } from "../.chunks/Portal.js";
18
18
  import { u as Po } from "../.chunks/useControlled.js";
19
19
  import { c as io, s as et, a as ot } from "../.chunks/TransitionGroupContext.js";
20
20
  import { i as tt } from "../.chunks/integerPropType.js";
@@ -2592,7 +2592,6 @@ const Et = ["colon", "borderFocusColor", "minWidth", "noLabel"], zt = Yo("div",
2592
2592
  }
2593
2593
 
2594
2594
  .MuiInputBase-root {
2595
- height: 18px;
2596
2595
  padding: 0 !important;
2597
2596
 
2598
2597
  ${a && No`
@@ -2621,9 +2620,9 @@ const Et = ["colon", "borderFocusColor", "minWidth", "noLabel"], zt = Yo("div",
2621
2620
  }
2622
2621
 
2623
2622
  .MuiButtonBase-root {
2624
- max-height: calc(100% - 0px);
2625
- padding: 0 2px;
2626
- margin: 0;
2623
+ max-height: 20px;
2624
+ padding: 1px 2px;
2625
+ margin: 1px 2px 2px 2px;
2627
2626
  }
2628
2627
 
2629
2628
  .MuiChip-label {
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,23 +1,30 @@
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
- import o from "../theme.js";
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`
9
- font-family: ${o.fonts.roboto};
1
+ import { jsx as s } from "react/jsx-runtime";
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};
10
10
  font-size: 13px;
11
11
  font-weight: 500;
12
- color: ${e};
12
+ color: ${o};
13
13
  background-color: ${r};
14
14
  padding: 3px 13px;
15
15
  border-radius: 21px;
16
16
  `
17
17
  })
18
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 });
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 });
21
28
  };
22
29
  export {
23
30
  x as Pill,