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 x, Fragment as F } from "react/jsx-runtime";
2
- import { useState as f, useMemo as $ } from "react";
3
- import { n as S } from "../.chunks/emotion-styled.browser.esm.js";
4
- import { c as y } from "../.chunks/emotion-react.browser.esm.js";
5
- import t, { defaultTheme as T } from "../theme.js";
6
- import { getHueFromHex as c, updateTheme as g } 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 b } from "../.chunks/useMediaQuery.js";
13
- const W = ["loading", "hasPagination", "loadingColor", "hasFade", "isTablet"], B = S("div", { shouldForwardProp: (o) => !W.includes(o) })(({ loading: o, hasPagination: i, hasFade: m, loadingColor: l = t.colors.green }) => ({
14
- ...y`
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: ${m ? i ? "114px" : "72px" : "19px"};
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
- })), H = S("div")(() => ({
36
- ...y`
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 G(o, i) {
50
- return o == "green" ? T : g(i);
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: m = !1,
56
+ hasPagination: h = !1,
56
57
  fade: l = !0,
57
- userProfileMenuItems: C,
58
+ siteBannerText: p,
59
+ userProfileMenuItems: w,
58
60
  ...n
59
61
  }) => {
60
- const w = localStorage.getItem("theme") || "green", u = localStorage.getItem("hue") || c(t.themeOptions.green).toString(), p = b(`(max-width: ${t.screenSizes.mobile})`), I = b(`(max-width: ${t.screenSizes.tablet})`), [e, s] = f(
61
- () => G(w, parseFloat(u))
62
- ), [M, d] = f({ h: Math.max(parseFloat(u), 0) * 360, s: 0, v: 68, a: 1 }), P = [
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", c(t.themeOptions.green).toString()), d((h) => ({ ...h, h: c(t.themeOptions.green) * 360 })), s(T);
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((h) => ({ ...h, h: 0 }));
73
- const a = g(-1);
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: M.h,
81
+ hue: P.h,
80
82
  onChange: (a) => {
81
- localStorage.setItem("theme", "custom"), localStorage.setItem("hue", (a.h / 360).toString()), d((v) => ({ ...v, h: a.h }));
82
- const h = g(a.h / 360);
83
- s(h);
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
- ...C || []
87
- ], k = $(
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(D, {}),
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__ */ r(z.Provider, { value: e, children: /* @__PURE__ */ r(
112
- O,
113
- {
114
- ...n,
115
- userProfileMenuItems: P,
116
- themeColors: k ?? (n == null ? void 0 : n.themeColors),
117
- children: /* @__PURE__ */ r(
118
- B,
119
- {
120
- className: "jcPageWrapper",
121
- loading: i,
122
- loadingColor: e.themeColor,
123
- hasPagination: m,
124
- hasFade: l,
125
- isTablet: I,
126
- children: /* @__PURE__ */ x(A, { loading: i, size: p ? 114 : 201, children: [
127
- l && /* @__PURE__ */ x(F, { children: [
128
- /* @__PURE__ */ r(L, { color: e.themeLight }),
129
- /* @__PURE__ */ r(j, { hasPagination: m, isMobile: p, color: e.themeLight })
130
- ] }),
131
- /* @__PURE__ */ r(H, { children: o })
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
- H as MainContentContainer,
140
- B as PageWrapper,
141
- _ as default
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.26",
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",