jcicl 0.0.165 → 0.0.167
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/AppHeader/AppHeader.js +90 -104
- package/package.json +1 -1
package/AppHeader/AppHeader.js
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import * as W from "react";
|
|
3
|
+
import N, { useState as $, useLayoutEffect as Q } from "react";
|
|
4
4
|
import { n as h } from "../.chunks/emotion-styled.browser.esm.js";
|
|
5
|
-
import { c as
|
|
6
|
-
import { Search as
|
|
7
|
-
import { Button as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { c as
|
|
11
|
-
const
|
|
12
|
-
const n =
|
|
13
|
-
return
|
|
5
|
+
import { c as m } from "../.chunks/emotion-react.browser.esm.js";
|
|
6
|
+
import { Search as k } from "../Search/Search.js";
|
|
7
|
+
import { Button as M } from "../Button/Button.js";
|
|
8
|
+
import E from "../Icon/Icon.js";
|
|
9
|
+
import X from "../WithLabel/WithLabel.js";
|
|
10
|
+
import { c as j } from "../.chunks/createSvgIcon.js";
|
|
11
|
+
const Y = N[typeof document < "u" && document.createElement !== void 0 ? "useLayoutEffect" : "useEffect"], Z = (e) => {
|
|
12
|
+
const n = W.useRef(e);
|
|
13
|
+
return W.useEffect(() => {
|
|
14
14
|
n.current = e;
|
|
15
15
|
}), n;
|
|
16
16
|
};
|
|
17
|
-
function
|
|
17
|
+
function ee() {
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const c =
|
|
21
|
-
return
|
|
19
|
+
function te(e, n, l = {}) {
|
|
20
|
+
const c = ie(l.polyfill), a = Z(n);
|
|
21
|
+
return Y(() => {
|
|
22
22
|
let i = !1;
|
|
23
23
|
const d = e && "current" in e ? e.current : e;
|
|
24
|
-
if (!d) return
|
|
25
|
-
function o
|
|
26
|
-
i || a.current(
|
|
24
|
+
if (!d) return ee;
|
|
25
|
+
function r(o, s) {
|
|
26
|
+
i || a.current(o, s);
|
|
27
27
|
}
|
|
28
|
-
return c.subscribe(d,
|
|
29
|
-
i = !0, c.unsubscribe(d,
|
|
28
|
+
return c.subscribe(d, r), () => {
|
|
29
|
+
i = !0, c.unsubscribe(d, r);
|
|
30
30
|
};
|
|
31
31
|
}, [e, c, a]), c.observer;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ne(e) {
|
|
34
34
|
let n = !1, l = [];
|
|
35
35
|
const c = /* @__PURE__ */ new Map(), a = new (e || window.ResizeObserver)((i, d) => {
|
|
36
36
|
l = l.concat(i);
|
|
37
|
-
function
|
|
38
|
-
const
|
|
37
|
+
function r() {
|
|
38
|
+
const o = /* @__PURE__ */ new Set();
|
|
39
39
|
for (let s = 0; s < l.length; s++) {
|
|
40
|
-
if (
|
|
41
|
-
|
|
40
|
+
if (o.has(l[s].target)) continue;
|
|
41
|
+
o.add(l[s].target);
|
|
42
42
|
const f = c.get(l[s].target);
|
|
43
|
-
f == null || f.forEach((
|
|
43
|
+
f == null || f.forEach((b) => b(l[s], d));
|
|
44
44
|
}
|
|
45
45
|
l = [], n = !1;
|
|
46
46
|
}
|
|
47
|
-
n || window.requestAnimationFrame(
|
|
47
|
+
n || window.requestAnimationFrame(r), n = !0;
|
|
48
48
|
});
|
|
49
49
|
return {
|
|
50
50
|
observer: a,
|
|
51
51
|
subscribe(i, d) {
|
|
52
|
-
var
|
|
52
|
+
var r;
|
|
53
53
|
a.observe(i);
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
const o = (r = c.get(i)) !== null && r !== void 0 ? r : [];
|
|
55
|
+
o.push(d), c.set(i, o);
|
|
56
56
|
},
|
|
57
57
|
unsubscribe(i, d) {
|
|
58
|
-
var
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
58
|
+
var r;
|
|
59
|
+
const o = (r = c.get(i)) !== null && r !== void 0 ? r : [];
|
|
60
|
+
if (o.length === 1) {
|
|
61
61
|
a.unobserve(i), c.delete(i);
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
|
-
const s =
|
|
65
|
-
s !== -1 &&
|
|
64
|
+
const s = o.indexOf(d);
|
|
65
|
+
s !== -1 && o.splice(s, 1), c.set(i, o);
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
let
|
|
70
|
-
const
|
|
69
|
+
let y;
|
|
70
|
+
const ie = (e) => y || (y = ne(e)), oe = j(/* @__PURE__ */ t("path", {
|
|
71
71
|
d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"
|
|
72
|
-
}), "Menu"),
|
|
72
|
+
}), "Menu"), H = j(/* @__PURE__ */ t("path", {
|
|
73
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"),
|
|
74
|
+
}), "PersonOutlineOutlined"), I = h("div")(
|
|
75
75
|
({ mobile: e, shadowSecondary: n }) => ({
|
|
76
|
-
...
|
|
76
|
+
...m`
|
|
77
77
|
z-index: 1313;
|
|
78
78
|
display: flex;
|
|
79
79
|
flex-direction: row;
|
|
@@ -85,16 +85,16 @@ const se = (e) => z || (z = ce(e)), le = V(/* @__PURE__ */ t("path", {
|
|
|
85
85
|
box-shadow: ${e && n};
|
|
86
86
|
`
|
|
87
87
|
})
|
|
88
|
-
),
|
|
88
|
+
), L = h("img")(({ width: e }) => ({
|
|
89
89
|
width: `${e}px`
|
|
90
|
-
})),
|
|
91
|
-
...
|
|
90
|
+
})), R = h("div")(({ height: e }) => ({
|
|
91
|
+
...m`
|
|
92
92
|
display: flex;
|
|
93
93
|
gap: 1rem;
|
|
94
94
|
height: ${e}px;
|
|
95
95
|
`
|
|
96
|
-
})),
|
|
97
|
-
...
|
|
96
|
+
})), re = h("div")(({ width: e, loggedIn: n }) => ({
|
|
97
|
+
...m`
|
|
98
98
|
width: ${e}px;
|
|
99
99
|
display: flex;
|
|
100
100
|
justify-content: center;
|
|
@@ -105,15 +105,15 @@ const se = (e) => z || (z = ce(e)), le = V(/* @__PURE__ */ t("path", {
|
|
|
105
105
|
white-space: nowrap;
|
|
106
106
|
}
|
|
107
107
|
`
|
|
108
|
-
})),
|
|
109
|
-
...
|
|
108
|
+
})), _ = h("div")(({ visible: e }) => ({
|
|
109
|
+
...m`
|
|
110
110
|
z-index: ${e ? 1 : 0};
|
|
111
111
|
opacity: ${e ? 1 : 0};
|
|
112
112
|
pointer-events: ${e ? "auto" : "none"};
|
|
113
113
|
position: ${e ? "relative" : "absolute"};
|
|
114
114
|
`
|
|
115
|
-
})),
|
|
116
|
-
...
|
|
115
|
+
})), P = h("div")(() => ({
|
|
116
|
+
...m`
|
|
117
117
|
display: flex;
|
|
118
118
|
width: 1360px;
|
|
119
119
|
max-width: 100%;
|
|
@@ -129,7 +129,7 @@ const se = (e) => z || (z = ce(e)), le = V(/* @__PURE__ */ t("path", {
|
|
|
129
129
|
margin: 0;
|
|
130
130
|
}
|
|
131
131
|
`
|
|
132
|
-
})),
|
|
132
|
+
})), me = ({
|
|
133
133
|
isMobile: e,
|
|
134
134
|
loggedIn: n,
|
|
135
135
|
logoProps: l,
|
|
@@ -137,83 +137,69 @@ const se = (e) => z || (z = ce(e)), le = V(/* @__PURE__ */ t("path", {
|
|
|
137
137
|
themeProps: a,
|
|
138
138
|
hamburgerMenu: i,
|
|
139
139
|
iconColors: d,
|
|
140
|
-
userName:
|
|
141
|
-
userSettingsEnabled:
|
|
140
|
+
userName: r = "User",
|
|
141
|
+
userSettingsEnabled: o,
|
|
142
142
|
searchFilters: s,
|
|
143
143
|
onHamburgerMenuClick: f,
|
|
144
|
-
onUserMenuClick:
|
|
145
|
-
onLogin:
|
|
146
|
-
onSearch:
|
|
144
|
+
onUserMenuClick: b,
|
|
145
|
+
onLogin: A,
|
|
146
|
+
onSearch: V = () => {
|
|
147
147
|
},
|
|
148
|
-
searchPlaceholder:
|
|
149
|
-
onInputChange:
|
|
150
|
-
headerType: C = "search",
|
|
151
|
-
appTitle: O
|
|
148
|
+
searchPlaceholder: F = "Search",
|
|
149
|
+
onInputChange: U
|
|
152
150
|
}) => {
|
|
153
|
-
const [
|
|
154
|
-
shadowTertiary:
|
|
155
|
-
borderColor:
|
|
156
|
-
borderFocusColor:
|
|
151
|
+
const [v, C] = $(0), [u, B] = $(null), [g, q] = $(null), { logoSrc: z, logoWidth: O, logoHeight: x } = l, { shadowSecondary: T, shadowTertiary: D, iconPrimary: G, borderPrimary: J } = a, S = {
|
|
152
|
+
shadowTertiary: D,
|
|
153
|
+
borderColor: J,
|
|
154
|
+
borderFocusColor: G,
|
|
157
155
|
filters: s,
|
|
158
|
-
onSearch:
|
|
159
|
-
placeholder:
|
|
160
|
-
onChange:
|
|
156
|
+
onSearch: V,
|
|
157
|
+
placeholder: F,
|
|
158
|
+
onChange: U
|
|
161
159
|
};
|
|
162
|
-
|
|
163
|
-
u && u.clientWidth >
|
|
164
|
-
}, [u,
|
|
165
|
-
const
|
|
166
|
-
|
|
160
|
+
Q(() => {
|
|
161
|
+
u && u.clientWidth > v && C(u.clientWidth), g && g.clientWidth > v && C(g.clientWidth);
|
|
162
|
+
}, [u, g]);
|
|
163
|
+
const K = (p) => {
|
|
164
|
+
p != null && p.clientWidth && p.clientWidth > v && C(p.clientWidth);
|
|
167
165
|
};
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return /* @__PURE__ */ t(A, { ...k });
|
|
172
|
-
if (C === "title")
|
|
173
|
-
return /* @__PURE__ */ t("h1", { children: O });
|
|
174
|
-
if (C === "searchAndTitle")
|
|
175
|
-
return /* @__PURE__ */ p(Y, { children: [
|
|
176
|
-
/* @__PURE__ */ t("h1", { children: O }),
|
|
177
|
-
/* @__PURE__ */ t(A, { ...k })
|
|
178
|
-
] });
|
|
179
|
-
};
|
|
180
|
-
return e ? /* @__PURE__ */ p(R, { mobile: !0, shadowSecondary: K, children: [
|
|
181
|
-
/* @__PURE__ */ t(P, { height: w, children: /* @__PURE__ */ t(_, { src: y, height: `${w}px`, width: W }) }),
|
|
182
|
-
/* @__PURE__ */ t(F, { children: /* @__PURE__ */ t(M, {}) }),
|
|
166
|
+
return te(u, () => K(u)), e ? /* @__PURE__ */ w(I, { mobile: !0, shadowSecondary: T, children: [
|
|
167
|
+
/* @__PURE__ */ t(R, { height: x, children: /* @__PURE__ */ t(L, { src: z, height: `${x}px`, width: O }) }),
|
|
168
|
+
/* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(k, { ...S }) }),
|
|
183
169
|
/* @__PURE__ */ t(
|
|
184
|
-
|
|
170
|
+
E,
|
|
185
171
|
{
|
|
186
|
-
icon: /* @__PURE__ */ t(
|
|
172
|
+
icon: /* @__PURE__ */ t(H, {}),
|
|
187
173
|
...d,
|
|
188
|
-
onClick:
|
|
174
|
+
onClick: o ? b : void 0
|
|
189
175
|
}
|
|
190
176
|
)
|
|
191
|
-
] }) : /* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */ t(
|
|
194
|
-
i && /* @__PURE__ */ t(
|
|
177
|
+
] }) : /* @__PURE__ */ w(I, { children: [
|
|
178
|
+
/* @__PURE__ */ w(R, { height: x, children: [
|
|
179
|
+
/* @__PURE__ */ t(L, { src: z, height: `${x}px`, width: O }),
|
|
180
|
+
i && /* @__PURE__ */ t(M, { variant: "icon", onClick: f, color: c, children: /* @__PURE__ */ t(oe, {}) })
|
|
195
181
|
] }),
|
|
196
|
-
/* @__PURE__ */ t(
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */ t(
|
|
199
|
-
|
|
182
|
+
/* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(k, { ...S }) }),
|
|
183
|
+
/* @__PURE__ */ w(re, { width: v, loggedIn: !!n, children: [
|
|
184
|
+
/* @__PURE__ */ t(_, { visible: !!n, ref: B, children: /* @__PURE__ */ t(
|
|
185
|
+
X,
|
|
200
186
|
{
|
|
201
187
|
id: "accountMenuContainer",
|
|
202
188
|
component: /* @__PURE__ */ t(
|
|
203
|
-
|
|
189
|
+
E,
|
|
204
190
|
{
|
|
205
|
-
icon: /* @__PURE__ */ t(
|
|
191
|
+
icon: /* @__PURE__ */ t(H, {}),
|
|
206
192
|
...d,
|
|
207
|
-
onClick:
|
|
193
|
+
onClick: o ? b : void 0
|
|
208
194
|
}
|
|
209
195
|
),
|
|
210
|
-
label: `Hi, ${
|
|
196
|
+
label: `Hi, ${r}!`
|
|
211
197
|
}
|
|
212
198
|
) }),
|
|
213
|
-
/* @__PURE__ */ t(
|
|
199
|
+
/* @__PURE__ */ t(_, { visible: !n, ref: q, children: /* @__PURE__ */ t(M, { id: "loginButtonContainer", onClick: A, children: "Log In" }) })
|
|
214
200
|
] })
|
|
215
201
|
] });
|
|
216
202
|
};
|
|
217
203
|
export {
|
|
218
|
-
|
|
204
|
+
me as default
|
|
219
205
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jcicl",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.167",
|
|
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",
|