jcicl 0.0.173 → 0.0.175

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.
package/.chunks/index.js CHANGED
@@ -1,38 +1,11 @@
1
- import * as o from "react";
2
- import { b as v, P as N } from "./DefaultPropsProvider.js";
1
+ import { b as v, P as h } from "./DefaultPropsProvider.js";
2
+ import * as E from "react";
3
3
  import "react/jsx-runtime";
4
- function H({
5
- controlled: n,
6
- default: c,
7
- name: e,
8
- state: t = "value"
9
- }) {
10
- const {
11
- current: s
12
- } = o.useRef(n !== void 0), [f, i] = o.useState(c), l = s ? n : f;
13
- if (process.env.NODE_ENV !== "production") {
14
- o.useEffect(() => {
15
- s !== (n !== void 0) && console.error([`MUI: A component is changing the ${s ? "" : "un"}controlled ${t} state of ${e} to be ${s ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${e} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
16
- `));
17
- }, [t, e, n]);
18
- const {
19
- current: u
20
- } = o.useRef(c);
21
- o.useEffect(() => {
22
- !s && !Object.is(u, c) && console.error([`MUI: A component is changing the default ${t} state of an uncontrolled ${e} after being initialized. To suppress this warning opt to use a controlled ${e}.`].join(`
23
- `));
24
- }, [JSON.stringify(c)]);
25
- }
26
- const r = o.useCallback((u) => {
27
- s || i(u);
28
- }, []);
29
- return [l, r];
30
- }
31
- function C(n) {
4
+ function O(n) {
32
5
  return typeof n == "string";
33
6
  }
34
- function k(n, c, e) {
35
- return n === void 0 || C(n) ? c : {
7
+ function Z(n, c, e) {
8
+ return n === void 0 || O(n) ? c : {
36
9
  ...c,
37
10
  ownerState: {
38
11
  ...c.ownerState,
@@ -40,7 +13,7 @@ function k(n, c, e) {
40
13
  }
41
14
  };
42
15
  }
43
- function O(n, c = []) {
16
+ function R(n, c = []) {
44
17
  if (n === void 0)
45
18
  return {};
46
19
  const e = {};
@@ -48,7 +21,7 @@ function O(n, c = []) {
48
21
  e[t] = n[t];
49
22
  }), e;
50
23
  }
51
- function E(n) {
24
+ function g(n) {
52
25
  if (n === void 0)
53
26
  return {};
54
27
  const c = {};
@@ -56,59 +29,58 @@ function E(n) {
56
29
  c[e] = n[e];
57
30
  }), c;
58
31
  }
59
- function V(n) {
32
+ function r(n) {
60
33
  const {
61
34
  getSlotProps: c,
62
35
  additionalProps: e,
63
36
  externalSlotProps: t,
64
37
  externalForwardedProps: s,
65
- className: f
38
+ className: m
66
39
  } = n;
67
40
  if (!c) {
68
- const y = v(e == null ? void 0 : e.className, f, s == null ? void 0 : s.className, t == null ? void 0 : t.className), g = {
41
+ const a = v(e == null ? void 0 : e.className, m, s == null ? void 0 : s.className, t == null ? void 0 : t.className), N = {
69
42
  ...e == null ? void 0 : e.style,
70
43
  ...s == null ? void 0 : s.style,
71
44
  ...t == null ? void 0 : t.style
72
- }, m = {
45
+ }, i = {
73
46
  ...e,
74
47
  ...s,
75
48
  ...t
76
49
  };
77
- return y.length > 0 && (m.className = y), Object.keys(g).length > 0 && (m.style = g), {
78
- props: m,
50
+ return a.length > 0 && (i.className = a), Object.keys(N).length > 0 && (i.style = N), {
51
+ props: i,
79
52
  internalRef: void 0
80
53
  };
81
54
  }
82
- const i = O({
55
+ const C = R({
83
56
  ...s,
84
57
  ...t
85
- }), l = E(t), r = E(s), u = c(i), h = v(u == null ? void 0 : u.className, e == null ? void 0 : e.className, f, s == null ? void 0 : s.className, t == null ? void 0 : t.className), d = {
58
+ }), o = g(t), H = g(s), u = c(C), y = v(u == null ? void 0 : u.className, e == null ? void 0 : e.className, m, s == null ? void 0 : s.className, t == null ? void 0 : t.className), l = {
86
59
  ...u == null ? void 0 : u.style,
87
60
  ...e == null ? void 0 : e.style,
88
61
  ...s == null ? void 0 : s.style,
89
62
  ...t == null ? void 0 : t.style
90
- }, a = {
63
+ }, f = {
91
64
  ...u,
92
65
  ...e,
93
- ...r,
94
- ...l
66
+ ...H,
67
+ ...o
95
68
  };
96
- return h.length > 0 && (a.className = h), Object.keys(d).length > 0 && (a.style = d), {
97
- props: a,
69
+ return y.length > 0 && (f.className = y), Object.keys(l).length > 0 && (f.style = l), {
70
+ props: f,
98
71
  internalRef: u.ref
99
72
  };
100
73
  }
101
- function A(n, c, e) {
74
+ function D(n, c, e) {
102
75
  return typeof n == "function" ? n(c, e) : n;
103
76
  }
104
- const $ = /* @__PURE__ */ o.createContext();
105
- process.env.NODE_ENV !== "production" && (N.node, N.bool);
106
- const I = () => o.useContext($) ?? !1;
77
+ const k = /* @__PURE__ */ E.createContext();
78
+ process.env.NODE_ENV !== "production" && (h.node, h.bool);
79
+ const V = () => E.useContext(k) ?? !1;
107
80
  export {
108
- k as a,
109
- H as b,
110
- O as e,
111
- V as m,
112
- A as r,
113
- I as u
81
+ Z as a,
82
+ R as e,
83
+ r as m,
84
+ D as r,
85
+ V as u
114
86
  };
@@ -0,0 +1,31 @@
1
+ import * as t from "react";
2
+ function d({
3
+ controlled: o,
4
+ default: s,
5
+ name: n,
6
+ state: r = "value"
7
+ }) {
8
+ const {
9
+ current: e
10
+ } = t.useRef(o !== void 0), [c, l] = t.useState(s), u = e ? o : c;
11
+ if (process.env.NODE_ENV !== "production") {
12
+ t.useEffect(() => {
13
+ e !== (o !== void 0) && console.error([`MUI: A component is changing the ${e ? "" : "un"}controlled ${r} state of ${n} to be ${e ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
14
+ `));
15
+ }, [r, n, o]);
16
+ const {
17
+ current: i
18
+ } = t.useRef(s);
19
+ t.useEffect(() => {
20
+ !e && !Object.is(i, s) && console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
21
+ `));
22
+ }, [JSON.stringify(s)]);
23
+ }
24
+ const f = t.useCallback((i) => {
25
+ e || l(i);
26
+ }, []);
27
+ return [u, f];
28
+ }
29
+ export {
30
+ d as u
31
+ };
@@ -0,0 +1,10 @@
1
+ import * as o from "react";
2
+ const t = /* @__PURE__ */ o.createContext(void 0);
3
+ process.env.NODE_ENV !== "production" && (t.displayName = "FormControlContext");
4
+ function e() {
5
+ return o.useContext(t);
6
+ }
7
+ export {
8
+ t as F,
9
+ e as u
10
+ };
@@ -0,0 +1,7 @@
1
+ import { LabeledInputProps } from '../../../../../../../../../src/components/composite/LabeledInput';
2
+ export type AllInputProps = LabeledInputProps;
3
+ export interface FormInputProps extends AllInputProps {
4
+ type?: 'text' | 'dropdown' | 'date' | 'number' | 'checkbox' | 'radio' | 'textarea';
5
+ }
6
+ export declare const FormInput: React.FC<LabeledInputProps>;
7
+ export default FormInput;
@@ -0,0 +1,10 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { LabeledInput as r } from "../LabeledInput/LabeledInput.js";
3
+ const p = (t) => {
4
+ const { type: e = "text" } = t;
5
+ return /* @__PURE__ */ o(r, { ...t, type: e });
6
+ };
7
+ export {
8
+ p as FormInput,
9
+ p as default
10
+ };
package/Input/Input.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { n as t } from "../.chunks/emotion-styled.browser.esm.js";
3
- import r from "../theme.js";
4
- import { T as d } from "../.chunks/TextField.js";
5
- const s = t(d, {
3
+ import e from "../theme.js";
4
+ import { T as s } from "../.chunks/TextField.js";
5
+ const d = t(s, {
6
6
  shouldForwardProp: (o) => o != "borderFocusColor"
7
7
  })(({ borderFocusColor: o }) => ({
8
- backgroundColor: r.colors.white,
8
+ backgroundColor: e.colors.white,
9
9
  borderRadius: "0",
10
10
  height: "18px",
11
11
  input: {
@@ -13,14 +13,15 @@ const s = t(d, {
13
13
  height: "15px",
14
14
  padding: "2px 0",
15
15
  borderRadius: "0",
16
- borderBottom: `1px solid ${r.colors.gray}`,
16
+ borderBottom: `1px solid ${e.colors.gray}`,
17
+ width: "100%",
17
18
  "&:focus-visible": {
18
- boxShadow: `0 3px 2px -2px ${o}`
19
+ boxShadow: `0 -5px 4px -4px ${o} inset`
19
20
  }
20
21
  },
21
22
  "&:hover, :focus-visible": {
22
23
  input: {
23
- boxShadow: `0 3px 2px -2px ${o}`
24
+ boxShadow: `0 -5px 4px -4px ${o} inset`
24
25
  }
25
26
  },
26
27
  fieldset: {
@@ -33,10 +34,10 @@ const s = t(d, {
33
34
  }
34
35
  }
35
36
  })), x = ({
36
- borderFocusColor: o = r.colors.darkGreen,
37
- // icon primary
38
- ...e
39
- }) => /* @__PURE__ */ i(s, { borderFocusColor: o, ...e });
37
+ borderFocusColor: o = e.colors.green,
38
+ // border primary
39
+ ...r
40
+ }) => /* @__PURE__ */ i(d, { borderFocusColor: o, ...r });
40
41
  export {
41
42
  x as Input,
42
43
  x as default
@@ -0,0 +1,6 @@
1
+ import { CheckboxProps } from '@mui/material/Checkbox';
2
+ export type LabeledCheckboxProps = {
3
+ label: string;
4
+ } & CheckboxProps;
5
+ export declare const LabeledCheckbox: React.FC<LabeledCheckboxProps>;
6
+ export default LabeledCheckbox;