jcicl 0.0.128 → 0.0.132
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/DefaultPropsProvider.js +439 -439
- package/.chunks/Portal.js +42 -42
- package/.chunks/{Input.js → TextField.js} +708 -794
- package/.chunks/TransitionGroupContext.js +6 -7
- package/AppContainer/AppContainer.d.ts +10 -3
- package/AppContainer/AppContainer.js +487 -480
- package/AppHeader/AppHeader.d.ts +5 -2
- package/AppHeader/AppHeader.js +95 -75
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +177 -138
- package/EditableInfoCard/EditableInfoCard.js +1 -1
- package/Icon/Icon.d.ts +1 -0
- package/Icon/Icon.js +22 -18
- package/Input/Input.d.ts +0 -3
- package/Input/Input.js +41 -6
- package/Input/index.js +2 -2
- package/LabeledInput/LabeledInput.js +4 -4
- package/ListButton/ListButton.d.ts +1 -1
- package/README.md +106 -106
- package/Search/Search.d.ts +15 -0
- package/Search/Search.js +128 -0
- package/Search/index.d.ts +1 -0
- package/Search/index.js +4 -0
- package/animation/Pulse/Pulse.d.ts +11 -0
- package/animation/Pulse/Pulse.js +58 -0
- package/animation/Pulse/index.d.ts +1 -0
- package/animation/Pulse/index.js +4 -0
- package/index.d.ts +0 -1
- package/index.js +48 -50
- package/package.json +1 -1
- package/theme.d.ts +12 -4
- package/theme.js +9 -2
- package/Avatar/Avatar.d.ts +0 -8
- package/Avatar/Avatar.js +0 -38
- package/Avatar/index.d.ts +0 -1
- package/Avatar/index.js +0 -4
package/AppHeader/AppHeader.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconProps } from '../../../../../../../../../src/components/base/Icon';
|
|
2
2
|
import { TemplateThemeProps } from '../../../../../../../../../src/components/theme';
|
|
3
3
|
export interface CustomLogoProps {
|
|
4
4
|
logoSrc: string;
|
|
@@ -12,11 +12,14 @@ export interface AppHeaderProps {
|
|
|
12
12
|
onLogout?: () => void;
|
|
13
13
|
onUserMenuClick?: () => void;
|
|
14
14
|
onHamburgerMenuClick?: () => void;
|
|
15
|
+
onSearch?: () => void;
|
|
15
16
|
logoProps: CustomLogoProps;
|
|
16
17
|
iconColor: string;
|
|
17
18
|
isMobile?: boolean;
|
|
18
19
|
themeProps: Pick<TemplateThemeProps, 'shadowSecondary' | 'iconPrimary' | 'borderPrimary' | 'shadowTertiary'>;
|
|
19
|
-
|
|
20
|
+
iconColors?: IconProps;
|
|
21
|
+
userName?: string;
|
|
22
|
+
userSettingsEnabled?: boolean;
|
|
20
23
|
}
|
|
21
24
|
declare const AppHeader: React.FC<AppHeaderProps>;
|
|
22
25
|
export default AppHeader;
|
package/AppHeader/AppHeader.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import * as k from "react";
|
|
3
|
+
import G, { useState as $, useLayoutEffect as J } from "react";
|
|
4
4
|
import { n as h } from "../.chunks/emotion-styled.browser.esm.js";
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
import { Button as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { c as
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
}),
|
|
5
|
+
import { c as m } from "../.chunks/emotion-react.browser.esm.js";
|
|
6
|
+
import { Search as M } from "../Search/Search.js";
|
|
7
|
+
import { Button as E } from "../Button/Button.js";
|
|
8
|
+
import H from "../Icon/Icon.js";
|
|
9
|
+
import K from "../WithLabel/WithLabel.js";
|
|
10
|
+
import { c as j } from "../.chunks/createSvgIcon.js";
|
|
11
|
+
const N = G[typeof document < "u" && document.createElement !== void 0 ? "useLayoutEffect" : "useEffect"], Q = (e) => {
|
|
12
|
+
const n = k.useRef(e);
|
|
13
|
+
return k.useEffect(() => {
|
|
14
|
+
n.current = e;
|
|
15
|
+
}), n;
|
|
16
16
|
};
|
|
17
|
-
function
|
|
17
|
+
function X() {
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const c =
|
|
21
|
-
return
|
|
19
|
+
function Y(e, n, l = {}) {
|
|
20
|
+
const c = ee(l.polyfill), u = Q(n);
|
|
21
|
+
return N(() => {
|
|
22
22
|
let i = !1;
|
|
23
23
|
const d = e && "current" in e ? e.current : e;
|
|
24
|
-
if (!d) return
|
|
24
|
+
if (!d) return X;
|
|
25
25
|
function r(o, s) {
|
|
26
|
-
i ||
|
|
26
|
+
i || u.current(o, s);
|
|
27
27
|
}
|
|
28
28
|
return c.subscribe(d, r), () => {
|
|
29
29
|
i = !0, c.unsubscribe(d, r);
|
|
30
30
|
};
|
|
31
|
-
}, [e, c,
|
|
31
|
+
}, [e, c, u]), c.observer;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
let
|
|
35
|
-
const c = /* @__PURE__ */ new Map(),
|
|
33
|
+
function Z(e) {
|
|
34
|
+
let n = !1, l = [];
|
|
35
|
+
const c = /* @__PURE__ */ new Map(), u = new (e || window.ResizeObserver)((i, d) => {
|
|
36
36
|
l = l.concat(i);
|
|
37
37
|
function r() {
|
|
38
38
|
const o = /* @__PURE__ */ new Set();
|
|
39
39
|
for (let s = 0; s < l.length; s++) {
|
|
40
40
|
if (o.has(l[s].target)) continue;
|
|
41
41
|
o.add(l[s].target);
|
|
42
|
-
const
|
|
43
|
-
|
|
42
|
+
const a = c.get(l[s].target);
|
|
43
|
+
a == null || a.forEach((w) => w(l[s], d));
|
|
44
44
|
}
|
|
45
|
-
l = [],
|
|
45
|
+
l = [], n = !1;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
n || window.requestAnimationFrame(r), n = !0;
|
|
48
48
|
});
|
|
49
49
|
return {
|
|
50
|
-
observer:
|
|
50
|
+
observer: u,
|
|
51
51
|
subscribe(i, d) {
|
|
52
52
|
var r;
|
|
53
|
-
|
|
53
|
+
u.observe(i);
|
|
54
54
|
const o = (r = c.get(i)) !== null && r !== void 0 ? r : [];
|
|
55
55
|
o.push(d), c.set(i, o);
|
|
56
56
|
},
|
|
@@ -58,7 +58,7 @@ function N(e) {
|
|
|
58
58
|
var r;
|
|
59
59
|
const o = (r = c.get(i)) !== null && r !== void 0 ? r : [];
|
|
60
60
|
if (o.length === 1) {
|
|
61
|
-
|
|
61
|
+
u.unobserve(i), c.delete(i);
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
const s = o.indexOf(d);
|
|
@@ -66,12 +66,14 @@ function N(e) {
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
let
|
|
70
|
-
const
|
|
69
|
+
let y;
|
|
70
|
+
const ee = (e) => y || (y = Z(e)), te = j(/* @__PURE__ */ t("path", {
|
|
71
71
|
d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"
|
|
72
|
-
}), "Menu"),
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
}), "Menu"), I = j(/* @__PURE__ */ t("path", {
|
|
73
|
+
d: "M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"
|
|
74
|
+
}), "PersonOutlineOutlined"), L = h("div")(
|
|
75
|
+
({ mobile: e, shadowSecondary: n }) => ({
|
|
76
|
+
...m`
|
|
75
77
|
z-index: 1313;
|
|
76
78
|
display: flex;
|
|
77
79
|
flex-direction: row;
|
|
@@ -80,38 +82,38 @@ const Q = (e) => C || (C = N(e)), X = T(/* @__PURE__ */ n("path", {
|
|
|
80
82
|
align-items: center;
|
|
81
83
|
justify-content: space-between;
|
|
82
84
|
gap: ${e ? "8px" : "1.5rem"};
|
|
83
|
-
box-shadow: ${e &&
|
|
85
|
+
box-shadow: ${e && n};
|
|
84
86
|
`
|
|
85
87
|
})
|
|
86
|
-
),
|
|
88
|
+
), R = h("img")(({ width: e }) => ({
|
|
87
89
|
width: `${e}px`
|
|
88
|
-
})),
|
|
89
|
-
...
|
|
90
|
+
})), _ = h("div")(({ height: e }) => ({
|
|
91
|
+
...m`
|
|
90
92
|
display: flex;
|
|
91
93
|
gap: 1rem;
|
|
92
94
|
height: ${e}px;
|
|
93
95
|
`
|
|
94
|
-
})),
|
|
95
|
-
...
|
|
96
|
+
})), ne = h("div")(({ width: e, loggedIn: n }) => ({
|
|
97
|
+
...m`
|
|
96
98
|
width: ${e}px;
|
|
97
99
|
display: flex;
|
|
98
100
|
justify-content: center;
|
|
99
101
|
align-items: flex-end;
|
|
100
|
-
flex-direction: ${
|
|
102
|
+
flex-direction: ${n ? "column" : "column-reverse"};
|
|
101
103
|
flex-shrink: 0;
|
|
102
104
|
* {
|
|
103
105
|
white-space: nowrap;
|
|
104
106
|
}
|
|
105
107
|
`
|
|
106
|
-
})),
|
|
107
|
-
...
|
|
108
|
+
})), P = h("div")(({ visible: e }) => ({
|
|
109
|
+
...m`
|
|
108
110
|
z-index: ${e ? 1 : 0};
|
|
109
111
|
opacity: ${e ? 1 : 0};
|
|
110
112
|
pointer-events: ${e ? "auto" : "none"};
|
|
111
113
|
position: ${e ? "relative" : "absolute"};
|
|
112
114
|
`
|
|
113
|
-
})),
|
|
114
|
-
...
|
|
115
|
+
})), A = h("div")(() => ({
|
|
116
|
+
...m`
|
|
115
117
|
display: flex;
|
|
116
118
|
width: 1360px;
|
|
117
119
|
max-width: 100%;
|
|
@@ -119,48 +121,66 @@ const Q = (e) => C || (C = N(e)), X = T(/* @__PURE__ */ n("path", {
|
|
|
119
121
|
width: 100%;
|
|
120
122
|
}
|
|
121
123
|
`
|
|
122
|
-
})),
|
|
124
|
+
})), fe = ({
|
|
123
125
|
isMobile: e,
|
|
124
|
-
loggedIn:
|
|
126
|
+
loggedIn: n,
|
|
125
127
|
logoProps: l,
|
|
126
128
|
iconColor: c,
|
|
127
|
-
themeProps:
|
|
129
|
+
themeProps: u,
|
|
128
130
|
hamburgerMenu: i,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
iconColors: d,
|
|
132
|
+
userName: r = "User",
|
|
133
|
+
userSettingsEnabled: o,
|
|
134
|
+
onHamburgerMenuClick: s,
|
|
135
|
+
onUserMenuClick: a,
|
|
136
|
+
onLogin: w,
|
|
137
|
+
onSearch: z = () => {
|
|
138
|
+
}
|
|
133
139
|
}) => {
|
|
134
|
-
const [
|
|
135
|
-
|
|
136
|
-
f && f.clientWidth >
|
|
140
|
+
const [b, C] = $(0), [f, V] = $(null), [v, F] = $(null), { logoSrc: O, logoWidth: S, logoHeight: g } = l, { shadowSecondary: U, shadowTertiary: B, iconPrimary: q, borderPrimary: T } = u, W = { shadowTertiary: B, borderColor: T, borderFocusColor: q };
|
|
141
|
+
J(() => {
|
|
142
|
+
f && f.clientWidth > b && C(f.clientWidth), v && v.clientWidth > b && C(v.clientWidth);
|
|
137
143
|
}, [f, v]);
|
|
138
|
-
const
|
|
139
|
-
|
|
144
|
+
const D = (p) => {
|
|
145
|
+
p != null && p.clientWidth && p.clientWidth > b && C(p.clientWidth);
|
|
140
146
|
};
|
|
141
|
-
return
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
return Y(f, () => D(f)), e ? /* @__PURE__ */ x(L, { mobile: !0, shadowSecondary: U, children: [
|
|
148
|
+
/* @__PURE__ */ t(_, { height: g, children: /* @__PURE__ */ t(R, { src: O, height: `${g}px`, width: S }) }),
|
|
149
|
+
/* @__PURE__ */ t(A, { children: /* @__PURE__ */ t(M, { onSearch: z, ...W, placeholder: "Search..." }) }),
|
|
150
|
+
/* @__PURE__ */ t(
|
|
151
|
+
H,
|
|
152
|
+
{
|
|
153
|
+
icon: /* @__PURE__ */ t(I, {}),
|
|
154
|
+
...d,
|
|
155
|
+
onClick: o ? a : void 0
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
] }) : /* @__PURE__ */ x(L, { children: [
|
|
159
|
+
/* @__PURE__ */ x(_, { height: g, children: [
|
|
160
|
+
/* @__PURE__ */ t(R, { src: O, height: `${g}px`, width: S }),
|
|
161
|
+
i && /* @__PURE__ */ t(E, { variant: "icon", onClick: s, color: c, children: /* @__PURE__ */ t(te, {}) })
|
|
149
162
|
] }),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */ x(
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
|
|
163
|
+
/* @__PURE__ */ t(A, { children: /* @__PURE__ */ t(M, { onSearch: z, ...W, placeholder: "Search..." }) }),
|
|
164
|
+
/* @__PURE__ */ x(ne, { width: b, loggedIn: !!n, children: [
|
|
165
|
+
/* @__PURE__ */ t(P, { visible: !!n, ref: V, children: /* @__PURE__ */ t(
|
|
166
|
+
K,
|
|
154
167
|
{
|
|
155
168
|
id: "accountMenuContainer",
|
|
156
|
-
component: /* @__PURE__ */
|
|
157
|
-
|
|
169
|
+
component: /* @__PURE__ */ t(
|
|
170
|
+
H,
|
|
171
|
+
{
|
|
172
|
+
icon: /* @__PURE__ */ t(I, {}),
|
|
173
|
+
...d,
|
|
174
|
+
onClick: o ? a : void 0
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
label: `Hi, ${r}!`
|
|
158
178
|
}
|
|
159
179
|
) }),
|
|
160
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ t(P, { visible: !n, ref: F, children: /* @__PURE__ */ t(E, { id: "loginButtonContainer", onClick: w, children: "Log In" }) })
|
|
161
181
|
] })
|
|
162
182
|
] });
|
|
163
183
|
};
|
|
164
184
|
export {
|
|
165
|
-
|
|
185
|
+
fe as default
|
|
166
186
|
};
|
package/Button/Button.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonProps as MuiButtonProps } from '@mui/material/Button/Button';
|
|
2
2
|
export interface ButtonProps extends Omit<MuiButtonProps, 'variant' | 'size' | 'color'> {
|
|
3
|
-
variant?: 1 | 2 | 'unstyled' | 'icon';
|
|
3
|
+
variant?: 1 | 2 | 'unstyled' | 'icon' | 'bibi' | 'bibiOutlined' | 'bibiInverse';
|
|
4
4
|
size?: number;
|
|
5
5
|
color?: string;
|
|
6
6
|
highlightColor?: string;
|