jcicl 0.0.139 → 0.0.143

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.
@@ -14,6 +14,8 @@ export interface AppHeaderProps {
14
14
  onUserMenuClick?: () => void;
15
15
  onHamburgerMenuClick?: () => void;
16
16
  onSearch?: () => void;
17
+ searchPlaceholder?: string;
18
+ onInputChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
17
19
  logoProps: CustomLogoProps;
18
20
  iconColor: string;
19
21
  isMobile?: boolean;
@@ -1,27 +1,27 @@
1
1
  import { jsx as t, jsxs as w } from "react/jsx-runtime";
2
2
  import * as W from "react";
3
- import J, { useState as $, useLayoutEffect as K } from "react";
3
+ import N, { useState as $, useLayoutEffect as Q } from "react";
4
4
  import { n as f } from "../.chunks/emotion-styled.browser.esm.js";
5
5
  import { c as m } from "../.chunks/emotion-react.browser.esm.js";
6
6
  import { Search as k } from "../Search/Search.js";
7
7
  import { Button as M } from "../Button/Button.js";
8
8
  import E from "../Icon/Icon.js";
9
- import N from "../WithLabel/WithLabel.js";
9
+ import X from "../WithLabel/WithLabel.js";
10
10
  import { c as A } from "../.chunks/createSvgIcon.js";
11
- const Q = J[typeof document < "u" && document.createElement !== void 0 ? "useLayoutEffect" : "useEffect"], X = (e) => {
11
+ const Y = N[typeof document < "u" && document.createElement !== void 0 ? "useLayoutEffect" : "useEffect"], Z = (e) => {
12
12
  const n = W.useRef(e);
13
13
  return W.useEffect(() => {
14
14
  n.current = e;
15
15
  }), n;
16
16
  };
17
- function Y() {
17
+ function ee() {
18
18
  }
19
- function Z(e, n, l = {}) {
20
- const c = te(l.polyfill), a = X(n);
21
- return Q(() => {
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 Y;
24
+ if (!d) return ee;
25
25
  function r(o, s) {
26
26
  i || a.current(o, s);
27
27
  }
@@ -30,7 +30,7 @@ function Z(e, n, l = {}) {
30
30
  };
31
31
  }, [e, c, a]), c.observer;
32
32
  }
33
- function ee(e) {
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);
@@ -67,7 +67,7 @@ function ee(e) {
67
67
  };
68
68
  }
69
69
  let y;
70
- const te = (e) => y || (y = ee(e)), ne = A(/* @__PURE__ */ t("path", {
70
+ const ie = (e) => y || (y = ne(e)), oe = A(/* @__PURE__ */ t("path", {
71
71
  d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"
72
72
  }), "Menu"), H = A(/* @__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"
@@ -93,7 +93,7 @@ const te = (e) => y || (y = ee(e)), ne = A(/* @__PURE__ */ t("path", {
93
93
  gap: 1rem;
94
94
  height: ${e}px;
95
95
  `
96
- })), ie = f("div")(({ width: e, loggedIn: n }) => ({
96
+ })), re = f("div")(({ width: e, loggedIn: n }) => ({
97
97
  ...m`
98
98
  width: ${e}px;
99
99
  display: flex;
@@ -121,7 +121,7 @@ const te = (e) => y || (y = ee(e)), ne = A(/* @__PURE__ */ t("path", {
121
121
  width: 100%;
122
122
  }
123
123
  `
124
- })), he = ({
124
+ })), me = ({
125
125
  isMobile: e,
126
126
  loggedIn: n,
127
127
  logoProps: l,
@@ -136,23 +136,26 @@ const te = (e) => y || (y = ee(e)), ne = A(/* @__PURE__ */ t("path", {
136
136
  onUserMenuClick: b,
137
137
  onLogin: j,
138
138
  onSearch: V = () => {
139
- }
139
+ },
140
+ searchPlaceholder: F = "Search",
141
+ onInputChange: U
140
142
  }) => {
141
- const [v, C] = $(0), [u, F] = $(null), [g, U] = $(null), { logoSrc: z, logoWidth: O, logoHeight: x } = l, { shadowSecondary: B, shadowTertiary: q, iconPrimary: T, borderPrimary: D } = a, S = {
142
- shadowTertiary: q,
143
- borderColor: D,
144
- borderFocusColor: T,
143
+ 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 = {
144
+ shadowTertiary: D,
145
+ borderColor: J,
146
+ borderFocusColor: G,
145
147
  filters: s,
146
148
  onSearch: V,
147
- placeholder: "Search..."
149
+ placeholder: F,
150
+ onChange: U
148
151
  };
149
- K(() => {
152
+ Q(() => {
150
153
  u && u.clientWidth > v && C(u.clientWidth), g && g.clientWidth > v && C(g.clientWidth);
151
154
  }, [u, g]);
152
- const G = (p) => {
155
+ const K = (p) => {
153
156
  p != null && p.clientWidth && p.clientWidth > v && C(p.clientWidth);
154
157
  };
155
- return Z(u, () => G(u)), e ? /* @__PURE__ */ w(I, { mobile: !0, shadowSecondary: B, children: [
158
+ return te(u, () => K(u)), e ? /* @__PURE__ */ w(I, { mobile: !0, shadowSecondary: T, children: [
156
159
  /* @__PURE__ */ t(R, { height: x, children: /* @__PURE__ */ t(L, { src: z, height: `${x}px`, width: O }) }),
157
160
  /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(k, { ...S }) }),
158
161
  /* @__PURE__ */ t(
@@ -166,12 +169,12 @@ const te = (e) => y || (y = ee(e)), ne = A(/* @__PURE__ */ t("path", {
166
169
  ] }) : /* @__PURE__ */ w(I, { children: [
167
170
  /* @__PURE__ */ w(R, { height: x, children: [
168
171
  /* @__PURE__ */ t(L, { src: z, height: `${x}px`, width: O }),
169
- i && /* @__PURE__ */ t(M, { variant: "icon", onClick: h, color: c, children: /* @__PURE__ */ t(ne, {}) })
172
+ i && /* @__PURE__ */ t(M, { variant: "icon", onClick: h, color: c, children: /* @__PURE__ */ t(oe, {}) })
170
173
  ] }),
171
174
  /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(k, { ...S }) }),
172
- /* @__PURE__ */ w(ie, { width: v, loggedIn: !!n, children: [
173
- /* @__PURE__ */ t(_, { visible: !!n, ref: F, children: /* @__PURE__ */ t(
174
- N,
175
+ /* @__PURE__ */ w(re, { width: v, loggedIn: !!n, children: [
176
+ /* @__PURE__ */ t(_, { visible: !!n, ref: B, children: /* @__PURE__ */ t(
177
+ X,
175
178
  {
176
179
  id: "accountMenuContainer",
177
180
  component: /* @__PURE__ */ t(
@@ -185,10 +188,10 @@ const te = (e) => y || (y = ee(e)), ne = A(/* @__PURE__ */ t("path", {
185
188
  label: `Hi, ${r}!`
186
189
  }
187
190
  ) }),
188
- /* @__PURE__ */ t(_, { visible: !n, ref: U, children: /* @__PURE__ */ t(M, { id: "loginButtonContainer", onClick: j, children: "Log In" }) })
191
+ /* @__PURE__ */ t(_, { visible: !n, ref: q, children: /* @__PURE__ */ t(M, { id: "loginButtonContainer", onClick: j, children: "Log In" }) })
189
192
  ] })
190
193
  ] });
191
194
  };
192
195
  export {
193
- he as default
196
+ me as default
194
197
  };
package/Search/Search.js CHANGED
@@ -86,7 +86,7 @@ const k = m(/* @__PURE__ */ r("path", {
86
86
  border: "none"
87
87
  }
88
88
  },
89
- "&.searchIcon": {
89
+ ".searchIcon": {
90
90
  svg: {
91
91
  padding: "2px"
92
92
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jcicl",
3
3
  "private": false,
4
- "version": "0.0.139",
4
+ "version": "0.0.143",
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",