jcicl 0.0.77 → 0.0.78

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jcicl",
3
3
  "private": false,
4
- "version": "0.0.77",
4
+ "version": "0.0.78",
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",
@@ -22,6 +22,7 @@ interface EditableInfoCardStyleProps {
22
22
  /** If true, the card renders a loading spinner as content */
23
23
  loading?: boolean;
24
24
  loadingStyles?: CSSObject;
25
+ titleSpacing?: string;
25
26
  }
26
27
  export interface EditableInfoCardProps extends EditableInfoCardStyleProps {
27
28
  title?: string;
@@ -1,21 +1,21 @@
1
1
  import { jsx as o, jsxs as n, Fragment as y } from "react/jsx-runtime";
2
- import { useState as z, useEffect as H } from "react";
2
+ import { useState as z, useEffect as J } from "react";
3
3
  import { n as i } from "../../.chunks/emotion-styled.browser.esm.js";
4
4
  import { c as m } from "../../.chunks/emotion-react.browser.esm.js";
5
5
  import { c as C } from "../../.chunks/createSvgIcon.js";
6
6
  import d from "../../theme.js";
7
- import { LabeledValue as J } from "../../base/LabeledValue/LabeledValue.js";
8
- import { LabeledInput as K } from "../../composite/LabeledInput/LabeledInput.js";
7
+ import { LabeledValue as K } from "../../base/LabeledValue/LabeledValue.js";
8
+ import { LabeledInput as N } from "../../composite/LabeledInput/LabeledInput.js";
9
9
  import k from "../../base/Loading/Loading.js";
10
10
  import f from "../../base/Flex/Flex.js";
11
11
  import { Tooltip as x } from "../../composite/Tooltip/Tooltip.js";
12
- import { T as N } from "../../.chunks/Input.js";
13
- import { B as O } from "../../.chunks/ButtonBase.js";
14
- const Q = C(/* @__PURE__ */ o("path", {
12
+ import { T as O } from "../../.chunks/Input.js";
13
+ import { B as Q } from "../../.chunks/ButtonBase.js";
14
+ const X = C(/* @__PURE__ */ o("path", {
15
15
  d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"
16
- }), "Edit"), X = C(/* @__PURE__ */ o("path", {
16
+ }), "Edit"), Z = C(/* @__PURE__ */ o("path", {
17
17
  d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
18
- }), "Close"), Z = C(/* @__PURE__ */ o("path", {
18
+ }), "Close"), _ = C(/* @__PURE__ */ o("path", {
19
19
  d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
20
20
  }), "Check"), L = i("div")(
21
21
  ({ width: t, padding: l, shadow: r, styles: u, isEditing: c }) => ({
@@ -43,7 +43,7 @@ const Q = C(/* @__PURE__ */ o("path", {
43
43
  opacity: ${c ? "0" : "1"};
44
44
  `
45
45
  })
46
- ), _ = i(N)({
46
+ ), oo = i(O)({
47
47
  backgroundColor: d.colors.white,
48
48
  borderRadius: "0",
49
49
  input: {
@@ -71,7 +71,7 @@ const Q = C(/* @__PURE__ */ o("path", {
71
71
  border: "none"
72
72
  }
73
73
  }
74
- }), oo = i(L)(({ isEditing: t }) => ({
74
+ }), eo = i(L)(({ isEditing: t }) => ({
75
75
  ...m`
76
76
  position: absolute;
77
77
  top: 0;
@@ -91,54 +91,55 @@ const Q = C(/* @__PURE__ */ o("path", {
91
91
  grid-template-rows: repeat(${r}, 1fr);
92
92
  `
93
93
  })
94
- ), $ = i(O)(() => ({
94
+ ), $ = i(Q)(() => ({
95
95
  ...m`
96
96
  width: 40px;
97
97
  height: 40px;
98
98
  border-radius: 50%;
99
99
  `
100
- })), eo = i("div")`
100
+ })), to = i("div")`
101
101
  position: relative;
102
102
  width: 100%;
103
103
  `, B = i("div")`
104
104
  height: 19px;
105
- `, bo = ({
105
+ `, go = ({
106
106
  decorativeElement: t,
107
107
  title: l,
108
108
  items: r = [],
109
109
  padding: u = "1rem 2rem",
110
110
  shadow: c = d.boxShadow.darkGreen,
111
111
  spacing: P = "2rem",
112
+ titleSpacing: R = "1rem",
112
113
  columns: w = 3,
113
- styles: R,
114
- width: T = "100%",
114
+ styles: T,
115
+ width: j = "100%",
115
116
  loading: v = !1,
116
- onSave: j = () => {
117
+ onSave: E = () => {
117
118
  },
118
- onCancel: E = () => {
119
+ onCancel: V = () => {
119
120
  },
120
- onEdit: V = () => {
121
+ onEdit: Y = () => {
121
122
  }
122
123
  }) => {
123
- const b = r.reduce((e, a) => ({ ...e, [a.label]: a.value }), { titleValue: l }), [Y, g] = z(!1), [p, h] = z(b);
124
- H(() => {
124
+ const b = r.reduce((e, a) => ({ ...e, [a.label]: a.value }), { titleValue: l }), [F, g] = z(!1), [p, h] = z(b);
125
+ J(() => {
125
126
  h(b);
126
127
  }, [r]);
127
- const F = () => {
128
- V(), g(!0);
129
- }, G = () => {
130
- j(p), g(!1);
128
+ const G = () => {
129
+ Y(), g(!0);
131
130
  }, U = () => {
132
- E(), h(b), g(!1);
133
- }, W = (e, a) => {
134
- h((D) => ({ ...D, [e]: a }));
135
- }, q = (e) => {
131
+ E(p), g(!1);
132
+ }, W = () => {
133
+ V(), h(b), g(!1);
134
+ }, q = (e, a) => {
135
+ h((H) => ({ ...H, [e]: a }));
136
+ }, A = (e) => {
136
137
  h((a) => ({ ...a, titleValue: e }));
137
- }, A = Math.ceil(r.length / w), s = 50, I = { width: T, padding: u, shadow: c, styles: R, isEditing: Y }, S = { spacing: P, columns: w, numRows: A };
138
- return /* @__PURE__ */ n(eo, { children: [
138
+ }, D = Math.ceil(r.length / w), s = 50, I = { width: j, padding: u, shadow: c, styles: T, isEditing: F }, S = { spacing: P, columns: w, numRows: D };
139
+ return /* @__PURE__ */ n(to, { children: [
139
140
  /* @__PURE__ */ n(L, { ...I, children: [
140
141
  /* @__PURE__ */ n(f, { width: "100%", gap: "1rem", justifyContent: "space-between", children: [
141
- /* @__PURE__ */ n(f, { width: "100%", gap: "1rem", alignItems: "center", children: [
142
+ /* @__PURE__ */ n(f, { width: "100%", gap: R, alignItems: "center", children: [
142
143
  t && t,
143
144
  /* @__PURE__ */ o("h3", { children: l })
144
145
  ] }),
@@ -159,7 +160,7 @@ const Q = C(/* @__PURE__ */ o("path", {
159
160
  ]
160
161
  }
161
162
  },
162
- children: /* @__PURE__ */ o($, { onClick: F, children: /* @__PURE__ */ o(Q, {}) })
163
+ children: /* @__PURE__ */ o($, { onClick: G, children: /* @__PURE__ */ o(X, {}) })
163
164
  }
164
165
  )
165
166
  ] }),
@@ -176,16 +177,16 @@ const Q = C(/* @__PURE__ */ o("path", {
176
177
  }
177
178
  }
178
179
  )
179
- ] }) : r == null ? void 0 : r.map((e) => /* @__PURE__ */ o(J, { ...e }, e.label)) })
180
+ ] }) : r == null ? void 0 : r.map((e) => /* @__PURE__ */ o(K, { ...e }, e.label)) })
180
181
  ] }),
181
- /* @__PURE__ */ n(oo, { ...I, children: [
182
+ /* @__PURE__ */ n(eo, { ...I, children: [
182
183
  /* @__PURE__ */ n(f, { width: "100%", justifyContent: "space-between", children: [
183
184
  /* @__PURE__ */ n(f, { width: "100%", gap: "1rem", alignItems: "center", children: [
184
185
  t && t,
185
186
  /* @__PURE__ */ o("h3", { children: /* @__PURE__ */ o(
186
- _,
187
+ oo,
187
188
  {
188
- onChange: (e) => q(e.target.value),
189
+ onChange: (e) => A(e.target.value),
189
190
  value: (p == null ? void 0 : p.titleValue) ?? l
190
191
  }
191
192
  ) })
@@ -207,7 +208,7 @@ const Q = C(/* @__PURE__ */ o("path", {
207
208
  ]
208
209
  }
209
210
  },
210
- children: /* @__PURE__ */ o($, { onClick: U, children: /* @__PURE__ */ o(X, {}) })
211
+ children: /* @__PURE__ */ o($, { onClick: W, children: /* @__PURE__ */ o(Z, {}) })
211
212
  }
212
213
  ),
213
214
  /* @__PURE__ */ o(
@@ -227,7 +228,7 @@ const Q = C(/* @__PURE__ */ o("path", {
227
228
  ]
228
229
  }
229
230
  },
230
- children: /* @__PURE__ */ o($, { onClick: G, children: /* @__PURE__ */ o(Z, {}) })
231
+ children: /* @__PURE__ */ o($, { onClick: U, children: /* @__PURE__ */ o(_, {}) })
231
232
  }
232
233
  )
233
234
  ] }),
@@ -245,11 +246,11 @@ const Q = C(/* @__PURE__ */ o("path", {
245
246
  }
246
247
  )
247
248
  ] }) : r == null ? void 0 : r.map((e) => /* @__PURE__ */ o(
248
- K,
249
+ N,
249
250
  {
250
251
  label: e.label,
251
252
  value: p[e.label],
252
- onChange: (a) => W(e.label, a.target.value)
253
+ onChange: (a) => q(e.label, a.target.value)
253
254
  },
254
255
  e.label
255
256
  )) })
@@ -257,6 +258,6 @@ const Q = C(/* @__PURE__ */ o("path", {
257
258
  ] });
258
259
  };
259
260
  export {
260
- bo as EditableInfoCard,
261
- bo as default
261
+ go as EditableInfoCard,
262
+ go as default
262
263
  };