jcicl 1.0.26 → 1.0.27
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.
|
@@ -18,6 +18,7 @@ export type DefaultTemplateProps = AppContainerProps & {
|
|
|
18
18
|
loading?: boolean;
|
|
19
19
|
hasPagination?: boolean;
|
|
20
20
|
fade?: boolean;
|
|
21
|
+
siteBannerText?: string;
|
|
21
22
|
};
|
|
22
23
|
declare const DefaultTemplate: React.FC<PropsWithChildren<DefaultTemplateProps>>;
|
|
23
24
|
export default DefaultTemplate;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { n as
|
|
4
|
-
import { c as
|
|
5
|
-
import t, { defaultTheme as
|
|
6
|
-
import { getHueFromHex as
|
|
7
|
-
import { ThemeContext as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { TopFade as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as r, jsxs as c, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useMemo as z } 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 O } from "../ThemeContext.js";
|
|
8
|
+
import A from "../AppContainer/AppContainer.js";
|
|
9
|
+
import L from "../WithLoading/WithLoading.js";
|
|
10
|
+
import { TopFade as j, BottomFade as D } from "../Overlays/Overlays.js";
|
|
11
|
+
import { SiteBanner as W } from "../SiteBanner/SiteBanner.js";
|
|
12
|
+
import { P as B } from "../.chunks/AppHeader.js";
|
|
13
|
+
import { u as S } from "../.chunks/useMediaQuery.js";
|
|
14
|
+
const H = ["loading", "hasPagination", "loadingColor", "hasFade", "isTablet"], G = y("div", { shouldForwardProp: (o) => !H.includes(o) })(({ loading: o, hasPagination: i, hasFade: h, loadingColor: l = t.colors.green }) => ({
|
|
15
|
+
...T`
|
|
15
16
|
color: ${t.colors.midnight};
|
|
16
17
|
height: ${o ? "100%" : "auto"};
|
|
17
18
|
padding: 19px;
|
|
@@ -23,7 +24,7 @@ const W = ["loading", "hasPagination", "loadingColor", "hasFade", "isTablet"], B
|
|
|
23
24
|
width: 100%;
|
|
24
25
|
min-height: 100%;
|
|
25
26
|
box-sizing: border-box;
|
|
26
|
-
padding-bottom: ${
|
|
27
|
+
padding-bottom: ${h ? i ? "114px" : "72px" : "19px"};
|
|
27
28
|
> * div {
|
|
28
29
|
box-sizing: border-box;
|
|
29
30
|
}
|
|
@@ -32,8 +33,8 @@ const W = ["loading", "hasPagination", "loadingColor", "hasFade", "isTablet"], B
|
|
|
32
33
|
color: ${l};
|
|
33
34
|
}
|
|
34
35
|
`
|
|
35
|
-
})),
|
|
36
|
-
...
|
|
36
|
+
})), Q = y("div")(() => ({
|
|
37
|
+
...T`
|
|
37
38
|
border-radius: 8px;
|
|
38
39
|
padding: 0;
|
|
39
40
|
display: flex;
|
|
@@ -46,45 +47,46 @@ const W = ["loading", "hasPagination", "loadingColor", "hasFade", "isTablet"], B
|
|
|
46
47
|
box-sizing: border-box;
|
|
47
48
|
`
|
|
48
49
|
}));
|
|
49
|
-
function
|
|
50
|
-
return o == "green" ?
|
|
50
|
+
function N(o, i) {
|
|
51
|
+
return o == "green" ? C : u(i);
|
|
51
52
|
}
|
|
52
|
-
const
|
|
53
|
+
const oe = ({
|
|
53
54
|
children: o,
|
|
54
55
|
loading: i = !1,
|
|
55
|
-
hasPagination:
|
|
56
|
+
hasPagination: h = !1,
|
|
56
57
|
fade: l = !0,
|
|
57
|
-
|
|
58
|
+
siteBannerText: p,
|
|
59
|
+
userProfileMenuItems: w,
|
|
58
60
|
...n
|
|
59
61
|
}) => {
|
|
60
|
-
const
|
|
61
|
-
() =>
|
|
62
|
-
), [
|
|
62
|
+
const I = localStorage.getItem("theme") || "green", x = localStorage.getItem("hue") || g(t.themeOptions.green).toString(), f = S(`(max-width: ${t.screenSizes.mobile})`), M = S(`(max-width: ${t.screenSizes.tablet})`), [e, s] = b(
|
|
63
|
+
() => N(I, parseFloat(x))
|
|
64
|
+
), [P, d] = b({ h: Math.max(parseFloat(x), 0) * 360, s: 0, v: 68, a: 1 }), k = [
|
|
63
65
|
{
|
|
64
66
|
label: "Default Theme",
|
|
65
67
|
onClick: () => {
|
|
66
|
-
localStorage.setItem("theme", "green"), localStorage.setItem("hue",
|
|
68
|
+
localStorage.setItem("theme", "green"), localStorage.setItem("hue", g(t.themeOptions.green).toString()), d((m) => ({ ...m, h: g(t.themeOptions.green) * 360 })), s(C);
|
|
67
69
|
}
|
|
68
70
|
},
|
|
69
71
|
{
|
|
70
72
|
label: "Grayscale",
|
|
71
73
|
onClick: () => {
|
|
72
|
-
localStorage.setItem("theme", "grayscale"), localStorage.setItem("hue", "-1"), d((
|
|
73
|
-
const a =
|
|
74
|
+
localStorage.setItem("theme", "grayscale"), localStorage.setItem("hue", "-1"), d((m) => ({ ...m, h: 0 }));
|
|
75
|
+
const a = u(-1);
|
|
74
76
|
s(a);
|
|
75
77
|
}
|
|
76
78
|
},
|
|
77
79
|
{
|
|
78
80
|
label: "Hue",
|
|
79
|
-
hue:
|
|
81
|
+
hue: P.h,
|
|
80
82
|
onChange: (a) => {
|
|
81
|
-
localStorage.setItem("theme", "custom"), localStorage.setItem("hue", (a.h / 360).toString()), d((
|
|
82
|
-
const
|
|
83
|
-
s(
|
|
83
|
+
localStorage.setItem("theme", "custom"), localStorage.setItem("hue", (a.h / 360).toString()), d((F) => ({ ...F, h: a.h }));
|
|
84
|
+
const m = u(a.h / 360);
|
|
85
|
+
s(m);
|
|
84
86
|
}
|
|
85
87
|
},
|
|
86
|
-
...
|
|
87
|
-
],
|
|
88
|
+
...w || []
|
|
89
|
+
], v = z(
|
|
88
90
|
() => ({
|
|
89
91
|
backgroundPrimary: e.themeLight,
|
|
90
92
|
backgroundSecondary: e.themeLightA,
|
|
@@ -98,7 +100,7 @@ const _ = ({
|
|
|
98
100
|
scrollColor: e.themeShadowA,
|
|
99
101
|
loadingColor: e.themeColor,
|
|
100
102
|
iconColors: {
|
|
101
|
-
icon: /* @__PURE__ */ r(
|
|
103
|
+
icon: /* @__PURE__ */ r(B, {}),
|
|
102
104
|
iconColor: e.themeDark ?? t.colors.darkGreen,
|
|
103
105
|
backgroundColor: e.themeMediumA ?? t.colors.mint
|
|
104
106
|
},
|
|
@@ -108,35 +110,38 @@ const _ = ({
|
|
|
108
110
|
}),
|
|
109
111
|
[e]
|
|
110
112
|
);
|
|
111
|
-
return /* @__PURE__ */
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
113
|
+
return /* @__PURE__ */ c(O.Provider, { value: e, children: [
|
|
114
|
+
p && /* @__PURE__ */ r(W, { text: p }),
|
|
115
|
+
/* @__PURE__ */ r(
|
|
116
|
+
A,
|
|
117
|
+
{
|
|
118
|
+
...n,
|
|
119
|
+
userProfileMenuItems: k,
|
|
120
|
+
themeColors: v ?? (n == null ? void 0 : n.themeColors),
|
|
121
|
+
children: /* @__PURE__ */ r(
|
|
122
|
+
G,
|
|
123
|
+
{
|
|
124
|
+
className: "jcPageWrapper",
|
|
125
|
+
loading: i,
|
|
126
|
+
loadingColor: e.themeColor,
|
|
127
|
+
hasPagination: h,
|
|
128
|
+
hasFade: l,
|
|
129
|
+
isTablet: M,
|
|
130
|
+
children: /* @__PURE__ */ c(L, { loading: i, size: f ? 114 : 201, children: [
|
|
131
|
+
l && /* @__PURE__ */ c($, { children: [
|
|
132
|
+
/* @__PURE__ */ r(j, { color: e.themeLight }),
|
|
133
|
+
/* @__PURE__ */ r(D, { hasPagination: h, isMobile: f, color: e.themeLight })
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ r(Q, { children: o })
|
|
136
|
+
] })
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
] });
|
|
137
142
|
};
|
|
138
143
|
export {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
Q as MainContentContainer,
|
|
145
|
+
G as PageWrapper,
|
|
146
|
+
oe as default
|
|
142
147
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jcicl",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.27",
|
|
5
5
|
"description": "Component library for the websites of Johnson County Iowa",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://devops.jc.net/JCIT/Business%20Solutions%20Delivery/_git/JCComponentLibrary?path=%2FREADME.md&version=GBmaster",
|