jcicl 0.0.151 → 0.0.155

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.
@@ -1,49 +1,90 @@
1
- import * as r from "react";
2
- import c from "react";
3
- const s = typeof window < "u" ? r.useLayoutEffect : r.useEffect;
4
- function f(t, e) {
1
+ var a = Object.defineProperty;
2
+ var l = (t, e, r) => e in t ? a(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var u = (t, e, r) => l(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { P as c } from "./DefaultPropsProvider.js";
5
+ import * as n from "react";
6
+ import p from "react";
7
+ const _ = c.oneOfType([c.func, c.object]), d = typeof window < "u" ? n.useLayoutEffect : n.useEffect;
8
+ function y(t, e) {
5
9
  typeof t == "function" ? t(e) : t && (t.current = e);
6
10
  }
7
- function a(t) {
8
- const e = r.useRef(t);
9
- return s(() => {
11
+ function b(t) {
12
+ const e = n.useRef(t);
13
+ return d(() => {
10
14
  e.current = t;
11
- }), r.useRef((...o) => (
15
+ }), n.useRef((...r) => (
12
16
  // @ts-expect-error hide `this`
13
- (0, e.current)(...o)
17
+ (0, e.current)(...r)
14
18
  )).current;
15
19
  }
16
- function p(...t) {
17
- return r.useMemo(() => t.every((e) => e == null) ? null : (e) => {
18
- t.forEach((o) => {
19
- f(o, e);
20
+ function P(...t) {
21
+ return n.useMemo(() => t.every((e) => e == null) ? null : (e) => {
22
+ t.forEach((r) => {
23
+ y(r, e);
20
24
  });
21
25
  }, t);
22
26
  }
23
- function l(t, e) {
27
+ const i = {};
28
+ function h(t, e) {
29
+ const r = n.useRef(i);
30
+ return r.current === i && (r.current = t(e)), r;
31
+ }
32
+ const m = [];
33
+ function E(t) {
34
+ n.useEffect(t, m);
35
+ }
36
+ class f {
37
+ constructor() {
38
+ u(this, "currentId", null);
39
+ u(this, "clear", () => {
40
+ this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
41
+ });
42
+ u(this, "disposeEffect", () => this.clear);
43
+ }
44
+ static create() {
45
+ return new f();
46
+ }
47
+ /**
48
+ * Executes `fn` after `delay`, clearing any previously scheduled call.
49
+ */
50
+ start(e, r) {
51
+ this.clear(), this.currentId = setTimeout(() => {
52
+ this.currentId = null, r();
53
+ }, e);
54
+ }
55
+ }
56
+ function R() {
57
+ const t = h(f.create).current;
58
+ return E(t.disposeEffect), t;
59
+ }
60
+ function j(t, e) {
24
61
  if (t == null) return {};
25
- var o = {};
26
- for (var n in t) if ({}.hasOwnProperty.call(t, n)) {
27
- if (e.includes(n)) continue;
28
- o[n] = t[n];
62
+ var r = {};
63
+ for (var o in t) if ({}.hasOwnProperty.call(t, o)) {
64
+ if (e.includes(o)) continue;
65
+ r[o] = t[o];
29
66
  }
30
- return o;
67
+ return r;
31
68
  }
32
- function u(t, e) {
33
- return u = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, n) {
34
- return o.__proto__ = n, o;
35
- }, u(t, e);
69
+ function s(t, e) {
70
+ return s = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
71
+ return r.__proto__ = o, r;
72
+ }, s(t, e);
36
73
  }
37
- function y(t, e) {
38
- t.prototype = Object.create(e.prototype), t.prototype.constructor = t, u(t, e);
74
+ function L(t, e) {
75
+ t.prototype = Object.create(e.prototype), t.prototype.constructor = t, s(t, e);
39
76
  }
40
- const _ = c.createContext(null);
77
+ const w = p.createContext(null);
41
78
  export {
42
- _ as T,
43
- y as _,
44
- s as a,
45
- l as b,
46
- a as c,
47
- f as s,
48
- p as u
79
+ w as T,
80
+ L as _,
81
+ d as a,
82
+ h as b,
83
+ j as c,
84
+ R as d,
85
+ b as e,
86
+ f,
87
+ _ as r,
88
+ y as s,
89
+ P as u
49
90
  };
package/.chunks/index.js CHANGED
@@ -1,37 +1,114 @@
1
- import * as e from "react";
2
- import { P as l } from "./DefaultPropsProvider.js";
1
+ import * as o from "react";
2
+ import { b as v, P as N } from "./DefaultPropsProvider.js";
3
3
  import "react/jsx-runtime";
4
- function v({
5
- controlled: o,
6
- default: s,
7
- name: n,
8
- state: r = "value"
4
+ function H({
5
+ controlled: n,
6
+ default: c,
7
+ name: e,
8
+ state: t = "value"
9
9
  }) {
10
10
  const {
11
- current: t
12
- } = e.useRef(o !== void 0), [c, u] = e.useState(s), f = t ? o : c;
11
+ current: s
12
+ } = o.useRef(n !== void 0), [f, i] = o.useState(c), l = s ? n : f;
13
13
  if (process.env.NODE_ENV !== "production") {
14
- e.useEffect(() => {
15
- t !== (o !== void 0) && console.error([`MUI: A component is changing the ${t ? "" : "un"}controlled ${r} state of ${n} to be ${t ? "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
+ 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
16
  `));
17
- }, [r, n, o]);
17
+ }, [t, e, n]);
18
18
  const {
19
- current: i
20
- } = e.useRef(s);
21
- e.useEffect(() => {
22
- !t && !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(`
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
23
  `));
24
- }, [JSON.stringify(s)]);
24
+ }, [JSON.stringify(c)]);
25
25
  }
26
- const a = e.useCallback((i) => {
27
- t || u(i);
26
+ const r = o.useCallback((u) => {
27
+ s || i(u);
28
28
  }, []);
29
- return [f, a];
29
+ return [l, r];
30
30
  }
31
- const d = /* @__PURE__ */ e.createContext();
32
- process.env.NODE_ENV !== "production" && (l.node, l.bool);
33
- const m = () => e.useContext(d) ?? !1;
31
+ function C(n) {
32
+ return typeof n == "string";
33
+ }
34
+ function k(n, c, e) {
35
+ return n === void 0 || C(n) ? c : {
36
+ ...c,
37
+ ownerState: {
38
+ ...c.ownerState,
39
+ ...e
40
+ }
41
+ };
42
+ }
43
+ function O(n, c = []) {
44
+ if (n === void 0)
45
+ return {};
46
+ const e = {};
47
+ return Object.keys(n).filter((t) => t.match(/^on[A-Z]/) && typeof n[t] == "function" && !c.includes(t)).forEach((t) => {
48
+ e[t] = n[t];
49
+ }), e;
50
+ }
51
+ function E(n) {
52
+ if (n === void 0)
53
+ return {};
54
+ const c = {};
55
+ return Object.keys(n).filter((e) => !(e.match(/^on[A-Z]/) && typeof n[e] == "function")).forEach((e) => {
56
+ c[e] = n[e];
57
+ }), c;
58
+ }
59
+ function V(n) {
60
+ const {
61
+ getSlotProps: c,
62
+ additionalProps: e,
63
+ externalSlotProps: t,
64
+ externalForwardedProps: s,
65
+ className: f
66
+ } = n;
67
+ 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 = {
69
+ ...e == null ? void 0 : e.style,
70
+ ...s == null ? void 0 : s.style,
71
+ ...t == null ? void 0 : t.style
72
+ }, m = {
73
+ ...e,
74
+ ...s,
75
+ ...t
76
+ };
77
+ return y.length > 0 && (m.className = y), Object.keys(g).length > 0 && (m.style = g), {
78
+ props: m,
79
+ internalRef: void 0
80
+ };
81
+ }
82
+ const i = O({
83
+ ...s,
84
+ ...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 = {
86
+ ...u == null ? void 0 : u.style,
87
+ ...e == null ? void 0 : e.style,
88
+ ...s == null ? void 0 : s.style,
89
+ ...t == null ? void 0 : t.style
90
+ }, a = {
91
+ ...u,
92
+ ...e,
93
+ ...r,
94
+ ...l
95
+ };
96
+ return h.length > 0 && (a.className = h), Object.keys(d).length > 0 && (a.style = d), {
97
+ props: a,
98
+ internalRef: u.ref
99
+ };
100
+ }
101
+ function A(n, c, e) {
102
+ return typeof n == "function" ? n(c, e) : n;
103
+ }
104
+ const $ = /* @__PURE__ */ o.createContext();
105
+ process.env.NODE_ENV !== "production" && (N.node, N.bool);
106
+ const I = () => o.useContext($) ?? !1;
34
107
  export {
35
- v as a,
36
- m as u
108
+ k as a,
109
+ H as b,
110
+ O as e,
111
+ V as m,
112
+ A as r,
113
+ I as u
37
114
  };
@@ -1,4 +1,4 @@
1
- import { r as R, m as V, a as h } from "./resolveComponentProps.js";
1
+ import { r as R, m as V, a as h } from "./index.js";
2
2
  import { u as I } from "./TransitionGroupContext.js";
3
3
  function $(e) {
4
4
  const t = typeof e;
@@ -13,16 +13,15 @@ import { l as je } from "../.chunks/jocologo.js";
13
13
  import { X as Ue } from "../.chunks/Close.js";
14
14
  import { P as t, g as Fe, a as Ve, s as ce, r as We, c as Z, u as Qe, b as _, d as Xe } from "../.chunks/DefaultPropsProvider.js";
15
15
  import { u as Ge } from "../.chunks/index.js";
16
- import { c as Ye, e as _e, H as Je, u as ke, g as Ke, T as Ze, r as qe, a as me } from "../.chunks/Portal.js";
16
+ import { u as Ye, e as _e, H as Je, a as ke, g as Ke, T as Ze, r as qe, b as me } from "../.chunks/Portal.js";
17
17
  import { m as Ce } from "../.chunks/memoTheme.js";
18
- import { o as Te, M as eo, P as oo } from "../.chunks/Paper.js";
19
- import { i as ro } from "../.chunks/useSlot.js";
20
- import { c as to } from "../.chunks/chainPropTypes.js";
21
- import { a as no, u as io } from "../.chunks/TransitionGroupContext.js";
22
- import { g as ao, d as so } from "../.chunks/TextField.js";
18
+ import { g as eo, o as Te, d as oo, M as ro, P as to } from "../.chunks/TextField.js";
19
+ import { i as no } from "../.chunks/useSlot.js";
20
+ import { c as io } from "../.chunks/chainPropTypes.js";
21
+ import { a as ao, u as so } from "../.chunks/TransitionGroupContext.js";
23
22
  function co(e, o, r, n, c) {
24
23
  const [l, u] = x.useState(() => c && r ? r(e).matches : n ? n(e).matches : o);
25
- return no(() => {
24
+ return ao(() => {
26
25
  if (!r)
27
26
  return;
28
27
  const f = r(e), p = () => {
@@ -64,7 +63,7 @@ function ge(e, o = {}) {
64
63
  matchMedia: l = n ? window.matchMedia : null,
65
64
  ssrMatchMedia: u = null,
66
65
  noSsr: f = !1
67
- } = ao({
66
+ } = eo({
68
67
  name: "MuiUseMediaQuery",
69
68
  props: o,
70
69
  theme: r
@@ -128,7 +127,7 @@ const Ee = /* @__PURE__ */ x.forwardRef(function(o, r) {
128
127
  // eslint-disable-next-line react/prop-types
129
128
  TransitionComponent: O = Ze,
130
129
  ...B
131
- } = o, d = x.useRef(null), w = io(Ke(p), d, r), k = (s) => (g) => {
130
+ } = o, d = x.useRef(null), w = so(Ke(p), d, r), k = (s) => (g) => {
132
131
  s && (g === void 0 ? s(d.current) : s(d.current, g));
133
132
  }, y = k((s, g) => {
134
133
  J(h, s, b), qe(s), A && A(s, g);
@@ -164,7 +163,7 @@ const Ee = /* @__PURE__ */ x.forwardRef(function(o, r) {
164
163
  return x.useEffect(() => {
165
164
  if (P || h === "down" || h === "right")
166
165
  return;
167
- const s = so(() => {
166
+ const s = oo(() => {
168
167
  d.current && J(h, d.current, b);
169
168
  }), g = Te(d.current);
170
169
  return g.addEventListener("resize", s), () => {
@@ -221,7 +220,7 @@ process.env.NODE_ENV !== "production" && (Ee.propTypes = {
221
220
  * An HTML element, or a function that returns one.
222
221
  * It's used to set the container the Slide is transitioning from.
223
222
  */
224
- container: to(t.oneOfType([Je, t.func]), (e) => {
223
+ container: io(t.oneOfType([Je, t.func]), (e) => {
225
224
  if (e.open) {
226
225
  const o = Pe(e.container);
227
226
  if (o && o.nodeType === 1) {
@@ -319,7 +318,7 @@ const Me = (e, o) => {
319
318
  paper: ["paper", `paperAnchor${Z(r)}`, n !== "temporary" && `paperAnchorDocked${Z(r)}`]
320
319
  };
321
320
  return Xe(c, uo, o);
322
- }, mo = ce(eo, {
321
+ }, mo = ce(ro, {
323
322
  name: "MuiDrawer",
324
323
  slot: "Root",
325
324
  overridesResolver: Me
@@ -335,7 +334,7 @@ const Me = (e, o) => {
335
334
  overridesResolver: Me
336
335
  })({
337
336
  flex: "0 0 auto"
338
- }), go = ce(oo, {
337
+ }), go = ce(to, {
339
338
  name: "MuiDrawer",
340
339
  slot: "Paper",
341
340
  overridesResolver: (e, o) => {
@@ -559,7 +558,7 @@ process.env.NODE_ENV !== "production" && (V.propTypes = {
559
558
  * The elevation of the drawer.
560
559
  * @default 16
561
560
  */
562
- elevation: ro,
561
+ elevation: no,
563
562
  /**
564
563
  * If `true`, the backdrop is not rendered.
565
564
  * @default false
@@ -855,7 +854,7 @@ const xe = q(/* @__PURE__ */ a("path", {
855
854
  background-color: transparent;
856
855
  }
857
856
  `
858
- })), or = ({
857
+ })), er = ({
859
858
  navProps: e,
860
859
  appHeaderProps: o = {},
861
860
  userInfo: r,
@@ -1131,5 +1130,5 @@ const xe = q(/* @__PURE__ */ a("path", {
1131
1130
  ] });
1132
1131
  };
1133
1132
  export {
1134
- or as default
1133
+ er as default
1135
1134
  };
package/Modal/Modal.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { DialogProps } from '@mui/material/Dialog';
2
- import { default as React } from 'react';
3
- export interface ModalProps extends DialogProps {
1
+ export interface ModalProps {
2
+ open?: boolean;
3
+ onAreaClick?: () => void;
4
4
  }
5
- declare const Modal: React.FC<ModalProps>;
5
+ declare const Modal: React.FC<React.PropsWithChildren<ModalProps>>;
6
6
  export default Modal;