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