jcicl 0.0.345 → 1.0.1
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/AppHeader.js +222 -0
- package/.chunks/ButtonBase.js +1 -1
- package/.chunks/Portal.js +1 -1
- package/.chunks/TransitionGroupContext.js +2 -2
- package/AppContainer/AppContainer.js +161 -154
- package/AppHeader/AppHeader.js +11 -219
- package/AppHeader/index.js +2 -2
- package/Button/Button.js +76 -67
- package/DefaultTemplate/DefaultTemplate.js +93 -98
- package/LabeledDropdown/LabeledDropdown.js +67 -67
- package/LabeledInput/LabeledInput.js +15 -13
- package/LabeledTextArea/LabeledTextArea.js +5 -5
- package/Nav/Nav.d.ts +5 -0
- package/Nav/Nav.js +390 -89
- package/README.md +106 -106
- package/Search/Search.js +29 -27
- package/Table/Table.js +311 -250
- package/ThemeContext.d.ts +3 -0
- package/ThemeContext.js +10 -0
- package/index.js +5 -5
- package/package.json +2 -1
- package/theme.d.ts +79 -1
- package/theme.js +52 -10
- package/themeUtils.d.ts +35 -0
- package/themeUtils.js +88 -0
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { n as
|
|
4
|
-
import { c as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as r, jsxs as f, Fragment as F } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useMemo as $ } from "react";
|
|
3
|
+
import { n as y } from "../.chunks/emotion-styled.browser.esm.js";
|
|
4
|
+
import { c as T } from "../.chunks/emotion-react.browser.esm.js";
|
|
5
|
+
import t, { defaultTheme as C } from "../theme.js";
|
|
6
|
+
import { getHueFromHex as g, updateTheme as u } from "../themeUtils.js";
|
|
7
|
+
import { ThemeContext as z } from "../ThemeContext.js";
|
|
8
|
+
import O from "../AppContainer/AppContainer.js";
|
|
9
|
+
import A from "../WithLoading/WithLoading.js";
|
|
10
|
+
import { TopFade as L, BottomFade as j } from "../Overlays/Overlays.js";
|
|
11
|
+
import { P as D } from "../.chunks/AppHeader.js";
|
|
12
|
+
import { u as S } from "../.chunks/useMediaQuery.js";
|
|
13
|
+
const W = ["loading", "hasPagination", "loadingColor", "hasFade", "isTablet"], B = y("div", { shouldForwardProp: (o) => !W.includes(o) })(({ loading: o, hasPagination: i, hasFade: m, loadingColor: l = t.colors.green, isTablet: s }) => ({
|
|
14
|
+
...T`
|
|
15
|
+
color: ${t.colors.midnight};
|
|
16
|
+
height: ${o ? "100%" : "auto"};
|
|
14
17
|
padding: 19px;
|
|
15
18
|
padding-top: 36px;
|
|
16
19
|
display: flex;
|
|
17
20
|
flex-direction: column;
|
|
18
|
-
justify-content: ${
|
|
21
|
+
justify-content: ${o ? "center" : "start"};
|
|
19
22
|
align-items: center;
|
|
20
23
|
width: 100%;
|
|
21
24
|
min-height: 100%;
|
|
22
|
-
height: ${
|
|
25
|
+
height: ${s ? "100%" : "auto"};
|
|
23
26
|
box-sizing: border-box;
|
|
24
|
-
padding-bottom: ${
|
|
27
|
+
padding-bottom: ${m ? i ? "114px" : "72px" : "19px"};
|
|
25
28
|
> * div {
|
|
26
29
|
box-sizing: border-box;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
.MuiCircularProgress-svg {
|
|
30
|
-
color: ${
|
|
33
|
+
color: ${l};
|
|
31
34
|
}
|
|
32
35
|
`
|
|
33
|
-
})),
|
|
34
|
-
...
|
|
36
|
+
})), H = y("div")(() => ({
|
|
37
|
+
...T`
|
|
35
38
|
border-radius: 8px;
|
|
36
39
|
padding: 0;
|
|
37
40
|
display: flex;
|
|
@@ -43,98 +46,90 @@ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldFor
|
|
|
43
46
|
min-height: 100%;
|
|
44
47
|
box-sizing: border-box;
|
|
45
48
|
`
|
|
46
|
-
}))
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
backgroundTertiary: o.colors.cornflower,
|
|
58
|
-
backgroundQuaternary: o.colors.sky,
|
|
59
|
-
borderPrimary: o.colors.darkBlue,
|
|
60
|
-
shadowPrimary: o.colors.indigo,
|
|
61
|
-
shadowSecondary: o.boxShadows.cobalt,
|
|
62
|
-
shadowTertiary: o.boxShadows.indigoThick,
|
|
63
|
-
iconPrimary: o.colors.cobalt,
|
|
64
|
-
scrollColor: `${o.colors.cobalt}99`,
|
|
65
|
-
iconColors: {
|
|
66
|
-
iconColor: o.colors.cobalt,
|
|
67
|
-
backgroundColor: o.colors.sky
|
|
68
|
-
}
|
|
69
|
-
}, I = {
|
|
70
|
-
backgroundPrimary: o.colors.lighterRed,
|
|
71
|
-
backgroundSecondary: o.colors.lightRed,
|
|
72
|
-
backgroundTertiary: o.colors.cherryBlossom,
|
|
73
|
-
backgroundQuaternary: o.colors.lighterRed,
|
|
74
|
-
borderPrimary: o.colors.darkRed,
|
|
75
|
-
shadowPrimary: o.colors.maroon,
|
|
76
|
-
shadowSecondary: o.boxShadows.burgundy,
|
|
77
|
-
shadowTertiary: o.boxShadows.maroonThick,
|
|
78
|
-
iconPrimary: o.colors.maroon,
|
|
79
|
-
scrollColor: `${o.colors.maroon}99`,
|
|
80
|
-
iconColors: {
|
|
81
|
-
iconColor: o.colors.maroon,
|
|
82
|
-
backgroundColor: o.colors.lighterRed
|
|
83
|
-
}
|
|
84
|
-
}, B = {
|
|
85
|
-
blue: z,
|
|
86
|
-
red: I,
|
|
87
|
-
green: void 0
|
|
88
|
-
}, O = ({
|
|
89
|
-
children: r,
|
|
90
|
-
loading: l = !1,
|
|
91
|
-
hasPagination: s = !1,
|
|
92
|
-
fade: t = !0,
|
|
93
|
-
userProfileMenuItems: a,
|
|
94
|
-
...c
|
|
49
|
+
}));
|
|
50
|
+
function G(o, i) {
|
|
51
|
+
return o == "green" ? C : u(i);
|
|
52
|
+
}
|
|
53
|
+
const _ = ({
|
|
54
|
+
children: o,
|
|
55
|
+
loading: i = !1,
|
|
56
|
+
hasPagination: m = !1,
|
|
57
|
+
fade: l = !0,
|
|
58
|
+
userProfileMenuItems: s,
|
|
59
|
+
...n
|
|
95
60
|
}) => {
|
|
96
|
-
const
|
|
61
|
+
const w = localStorage.getItem("theme") || "green", p = localStorage.getItem("hue") || g(t.themeOptions.green).toString(), x = S(`(max-width: ${t.screenSizes.mobile})`), I = S(`(max-width: ${t.screenSizes.tablet})`), [e, d] = b(
|
|
62
|
+
() => G(w, parseFloat(p))
|
|
63
|
+
), [M, c] = b({ h: Math.max(parseFloat(p), 0) * 360, s: 0, v: 68, a: 1 }), P = [
|
|
97
64
|
{
|
|
98
|
-
label: "
|
|
65
|
+
label: "Default Theme",
|
|
99
66
|
onClick: () => {
|
|
100
|
-
localStorage.setItem("theme", "green"),
|
|
67
|
+
localStorage.setItem("theme", "green"), localStorage.setItem("hue", g(t.themeOptions.green).toString()), c((h) => ({ ...h, h: g(t.themeOptions.green) * 360 })), d(C);
|
|
101
68
|
}
|
|
102
69
|
},
|
|
103
70
|
{
|
|
104
|
-
label: "
|
|
71
|
+
label: "Grayscale",
|
|
105
72
|
onClick: () => {
|
|
106
|
-
localStorage.setItem("theme", "
|
|
73
|
+
localStorage.setItem("theme", "grayscale"), localStorage.setItem("hue", "-1"), c((h) => ({ ...h, h: 0 }));
|
|
74
|
+
const a = u(-1);
|
|
75
|
+
d(a);
|
|
107
76
|
}
|
|
108
77
|
},
|
|
109
78
|
{
|
|
110
|
-
label: "
|
|
111
|
-
|
|
112
|
-
|
|
79
|
+
label: "Hue",
|
|
80
|
+
hue: M.h,
|
|
81
|
+
onChange: (a) => {
|
|
82
|
+
localStorage.setItem("theme", "custom"), localStorage.setItem("hue", (a.h / 360).toString()), c((v) => ({ ...v, h: a.h }));
|
|
83
|
+
const h = u(a.h / 360);
|
|
84
|
+
d(h);
|
|
113
85
|
}
|
|
114
86
|
},
|
|
115
|
-
...
|
|
116
|
-
]
|
|
117
|
-
|
|
118
|
-
|
|
87
|
+
...s || []
|
|
88
|
+
], k = $(
|
|
89
|
+
() => ({
|
|
90
|
+
backgroundPrimary: e.themeLight,
|
|
91
|
+
backgroundSecondary: e.themeLightA,
|
|
92
|
+
backgroundTertiary: e.themeMediumC,
|
|
93
|
+
backgroundQuaternary: e.themeMediumB,
|
|
94
|
+
borderPrimary: e.themeColor,
|
|
95
|
+
shadowPrimary: e.themeShadowA,
|
|
96
|
+
shadowSecondary: e.themeShadowB,
|
|
97
|
+
shadowTertiary: e.themeShadowC,
|
|
98
|
+
iconPrimary: e.themeDark,
|
|
99
|
+
scrollColor: e.themeShadowA,
|
|
100
|
+
loadingColor: e.themeColor,
|
|
101
|
+
iconColors: {
|
|
102
|
+
icon: /* @__PURE__ */ r(D, {}),
|
|
103
|
+
iconColor: e.themeDark ?? t.colors.darkGreen,
|
|
104
|
+
backgroundColor: e.themeMediumA ?? t.colors.mint
|
|
105
|
+
},
|
|
106
|
+
highlightPrimary: e.highlightPrimary,
|
|
107
|
+
highlightSecondary: e.highlightSecondary,
|
|
108
|
+
highlightTertiary: e.highlightTertiary
|
|
109
|
+
}),
|
|
110
|
+
[e]
|
|
111
|
+
);
|
|
112
|
+
return /* @__PURE__ */ r(
|
|
113
|
+
O,
|
|
119
114
|
{
|
|
120
|
-
...
|
|
121
|
-
userProfileMenuItems:
|
|
122
|
-
themeColors: k ?? (
|
|
123
|
-
children: /* @__PURE__ */
|
|
124
|
-
|
|
115
|
+
...n,
|
|
116
|
+
userProfileMenuItems: P,
|
|
117
|
+
themeColors: k ?? (n == null ? void 0 : n.themeColors),
|
|
118
|
+
children: /* @__PURE__ */ r(
|
|
119
|
+
B,
|
|
125
120
|
{
|
|
126
121
|
className: "jcPageWrapper",
|
|
127
|
-
loading:
|
|
128
|
-
loadingColor:
|
|
129
|
-
hasPagination:
|
|
130
|
-
hasFade:
|
|
131
|
-
isTablet:
|
|
132
|
-
children: /* @__PURE__ */
|
|
133
|
-
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
122
|
+
loading: i,
|
|
123
|
+
loadingColor: e.themeColor,
|
|
124
|
+
hasPagination: m,
|
|
125
|
+
hasFade: l,
|
|
126
|
+
isTablet: I,
|
|
127
|
+
children: /* @__PURE__ */ f(A, { loading: i, size: x ? 114 : 201, children: [
|
|
128
|
+
l && /* @__PURE__ */ f(F, { children: [
|
|
129
|
+
/* @__PURE__ */ r(L, { color: e.themeLight }),
|
|
130
|
+
/* @__PURE__ */ r(j, { hasPagination: m, isMobile: x, color: e.themeLight })
|
|
136
131
|
] }),
|
|
137
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ r(z.Provider, { value: e, children: /* @__PURE__ */ r(H, { children: o }) })
|
|
138
133
|
] })
|
|
139
134
|
}
|
|
140
135
|
)
|
|
@@ -142,7 +137,7 @@ const $ = ["loading", "hasPagination", "loadingColor"], R = u("div", { shouldFor
|
|
|
142
137
|
);
|
|
143
138
|
};
|
|
144
139
|
export {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
140
|
+
H as MainContentContainer,
|
|
141
|
+
B as PageWrapper,
|
|
142
|
+
_ as default
|
|
148
143
|
};
|