jcicl 1.0.9 → 1.0.13

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.
@@ -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,23 +1,25 @@
1
1
  import { jsx as o, jsxs as n } from "react/jsx-runtime";
2
- import { useState as b } from "react";
3
- import { n as u } from "../.chunks/emotion-styled.browser.esm.js";
4
- import { c as g } from "../.chunks/emotion-react.browser.esm.js";
2
+ import { useState as B } from "react";
3
+ import { n as k } from "../.chunks/emotion-styled.browser.esm.js";
4
+ import { c as I } from "../.chunks/emotion-react.browser.esm.js";
5
5
  import e from "../theme.js";
6
6
  import { Flex as c } from "../Flex/Flex.js";
7
- import { Input as w } from "../Input/Input.js";
8
- import { DetailItemContainer as x } from "../DetailPageComponents/DetailPageComponents.js";
9
- import y from "../SquareIcon/SquareIcon.js";
10
- import m from "../SquareIconButton/SquareIconButton.js";
11
- import { useThemeColors as B } from "../ThemeContext.js";
12
- import { c as D } from "../.chunks/createLucideIcon.js";
13
- import { X as z, C as j } from "../.chunks/x.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";
14
16
  /**
15
17
  * @license lucide-react v0.525.0 - ISC
16
18
  *
17
19
  * This source code is licensed under the ISC license.
18
20
  * See the LICENSE file in the root directory of this source tree.
19
21
  */
20
- const G = [
22
+ const q = [
21
23
  [
22
24
  "path",
23
25
  {
@@ -26,78 +28,88 @@ const G = [
26
28
  }
27
29
  ],
28
30
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
29
- ], L = D("pencil", G), S = u("p")(() => ({
30
- ...g`
31
+ ], E = L("pencil", q), T = k("p")(() => ({
32
+ ...I`
31
33
  font-size: 0.875rem;
32
34
  font-weight: 500;
33
35
  color: ${e.colors.charcoal} !important;
34
36
  margin: 0;
35
37
  margin-bottom: 0.25rem;
36
38
  `
37
- })), W = u("p")(() => ({
38
- ...g`
39
+ })), g = k("p")(() => ({
40
+ ...I`
39
41
  font-size: 1rem;
40
42
  word-wrap: break-word;
41
43
  margin: 0;
42
44
  `
43
- })), O = (i) => /* @__PURE__ */ o(q, { ...i }), q = ({
45
+ })), Z = (i) => /* @__PURE__ */ o(_, { ...i }), _ = ({
44
46
  icon: i,
45
- iconSize: k = 20,
46
- onValueChange: s,
47
- onSave: p,
48
- onCancel: d,
49
- customEditForm: l,
47
+ iconSize: C = 20,
48
+ onValueChange: p,
49
+ onSave: d,
50
+ onCancel: f,
51
+ customEditForm: a,
50
52
  editButtonMarginTop: h,
51
- label: I,
52
- value: f
53
+ label: b,
54
+ value: l,
55
+ formattedValue: w,
56
+ copyOnClick: u = !1
53
57
  }) => {
54
- const [r, a] = b(!1), t = B();
55
- return /* @__PURE__ */ o(x, { children: /* @__PURE__ */ n(c, { gap: "19px", children: [
58
+ const [r, m] = B(!1), t = G();
59
+ return /* @__PURE__ */ o(D, { children: /* @__PURE__ */ n(c, { gap: "19px", children: [
56
60
  /* @__PURE__ */ o(
57
- y,
61
+ z,
58
62
  {
59
63
  icon: i,
60
- iconSize: k,
64
+ iconSize: C,
61
65
  color: t.themeIconColorB,
62
66
  backgroundColor: t.themeIconBackgroundB
63
67
  }
64
68
  ),
65
69
  /* @__PURE__ */ n(c, { justifyContent: "space-between", width: "100%", gap: "12px", children: [
66
70
  /* @__PURE__ */ n(c, { column: !0, styles: { flexGrow: 1 }, children: [
67
- /* @__PURE__ */ o(S, { children: I }),
68
- !r && /* @__PURE__ */ o(W, { children: f }),
69
- r && !l && /* @__PURE__ */ o(w, { defaultValue: f, onChange: (C) => s && s(C.target.value) }),
70
- r && l && l
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
71
83
  ] }),
72
84
  !r && /* @__PURE__ */ o(
73
- m,
85
+ s,
74
86
  {
75
87
  backgroundColor: t.themeIconBackgroundB,
76
88
  color: t.themeIconColorB,
77
- icon: L,
78
- onClick: () => a(!0)
89
+ icon: E,
90
+ onClick: () => m(!0)
79
91
  }
80
92
  ),
81
93
  r && /* @__PURE__ */ n(c, { gap: "9px", styles: { marginTop: h || "0" }, children: [
82
94
  /* @__PURE__ */ o(
83
- m,
95
+ s,
84
96
  {
85
97
  backgroundColor: e.colors.cherryBlossom,
86
98
  color: e.colors.maroon,
87
- icon: z,
99
+ icon: S,
88
100
  onClick: () => {
89
- a(!1), d && d();
101
+ m(!1), f && f();
90
102
  }
91
103
  }
92
104
  ),
93
105
  /* @__PURE__ */ o(
94
- m,
106
+ s,
95
107
  {
96
- icon: j,
108
+ icon: W,
97
109
  backgroundColor: e.colors.whiteGreenA,
98
110
  color: e.colors.darkGreen,
99
111
  onClick: () => {
100
- a(!1), p && p();
112
+ m(!1), d && d();
101
113
  }
102
114
  }
103
115
  )
@@ -106,5 +118,5 @@ const G = [
106
118
  ] }) });
107
119
  };
108
120
  export {
109
- O as default
121
+ Z as default
110
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.js CHANGED
@@ -13,6 +13,7 @@ const l = a("span")(
13
13
  background-color: ${r};
14
14
  padding: 3px 13px;
15
15
  border-radius: 21px;
16
+ cursor: default;
16
17
  `
17
18
  })
18
19
  ), x = (r) => {
@@ -7,7 +7,7 @@ import { k as A, c as P } from "../.chunks/emotion-react.browser.esm.js";
7
7
  import { Button as q } from "../Button/Button.js";
8
8
  import { SlideOut as J, SlideIn as Q, SlideInReverse as z, SlideOutReverse as W } from "../animation/Slide/Slide.js";
9
9
  import { useThemeColors as Z } from "../ThemeContext.js";
10
- import { g as V, a as _, s as g, c as f, u as F, b as O, P as o, d as K, l as rr, k as er, m as tr } from "../.chunks/DefaultPropsProvider.js";
10
+ import { g as V, a as _, s as g, c as f, u as F, b as O, P as o, d as K, l as rr, i as er, j as tr } from "../.chunks/DefaultPropsProvider.js";
11
11
  import { m as w } from "../.chunks/memoTheme.js";
12
12
  import { P as or } from "../.chunks/Paper.js";
13
13
  import { u as ar } from "../.chunks/index.js";