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/Portal.js +4 -4
- package/.chunks/TextField.js +138 -141
- package/.chunks/index.js +29 -57
- package/.chunks/useControlled.js +31 -0
- package/.chunks/useFormControl.js +10 -0
- package/FormInput/FormInput.d.ts +7 -0
- package/FormInput/FormInput.js +10 -0
- package/Input/Input.js +12 -11
- package/LabeledCheckbox/LabeledCheckbox.d.ts +6 -0
- package/LabeledCheckbox/LabeledCheckbox.js +522 -0
- package/LabeledCheckbox/index.d.ts +1 -0
- package/LabeledCheckbox/index.js +4 -0
- package/LabeledInput/LabeledInput.js +8 -8
- package/Pagination/Pagination.js +4 -3
- package/Table/Table.d.ts +1 -0
- package/Table/Table.js +1 -0
- package/Tooltip/Tooltip.js +16 -15
- package/package.json +1 -1
package/.chunks/index.js
CHANGED
|
@@ -1,38 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
|
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
|
|
35
|
-
return n === void 0 ||
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
38
|
+
className: m
|
|
66
39
|
} = n;
|
|
67
40
|
if (!c) {
|
|
68
|
-
const
|
|
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
|
-
},
|
|
45
|
+
}, i = {
|
|
73
46
|
...e,
|
|
74
47
|
...s,
|
|
75
48
|
...t
|
|
76
49
|
};
|
|
77
|
-
return
|
|
78
|
-
props:
|
|
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
|
|
55
|
+
const C = R({
|
|
83
56
|
...s,
|
|
84
57
|
...t
|
|
85
|
-
}),
|
|
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
|
-
},
|
|
63
|
+
}, f = {
|
|
91
64
|
...u,
|
|
92
65
|
...e,
|
|
93
|
-
...
|
|
94
|
-
...
|
|
66
|
+
...H,
|
|
67
|
+
...o
|
|
95
68
|
};
|
|
96
|
-
return
|
|
97
|
-
props:
|
|
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
|
|
74
|
+
function D(n, c, e) {
|
|
102
75
|
return typeof n == "function" ? n(c, e) : n;
|
|
103
76
|
}
|
|
104
|
-
const
|
|
105
|
-
process.env.NODE_ENV !== "production" && (
|
|
106
|
-
const
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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,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
|
|
4
|
-
import { T as
|
|
5
|
-
const
|
|
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:
|
|
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 ${
|
|
16
|
+
borderBottom: `1px solid ${e.colors.gray}`,
|
|
17
|
+
width: "100%",
|
|
17
18
|
"&:focus-visible": {
|
|
18
|
-
boxShadow: `0
|
|
19
|
+
boxShadow: `0 -5px 4px -4px ${o} inset`
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
22
|
"&:hover, :focus-visible": {
|
|
22
23
|
input: {
|
|
23
|
-
boxShadow: `0
|
|
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 =
|
|
37
|
-
//
|
|
38
|
-
...
|
|
39
|
-
}) => /* @__PURE__ */ i(
|
|
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
|