jcicl 0.0.71 → 0.0.75
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.
|
|
4
|
+
"version": "0.0.75",
|
|
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",
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as o, jsxs as a, Fragment as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as o, jsxs as a, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S, useEffect as A } from "react";
|
|
3
3
|
import { n as i } from "../../.chunks/emotion-styled.browser.esm.js";
|
|
4
|
-
import { c as
|
|
5
|
-
import { c as
|
|
4
|
+
import { c as f } from "../../.chunks/emotion-react.browser.esm.js";
|
|
5
|
+
import { c as w } from "../../.chunks/createSvgIcon.js";
|
|
6
6
|
import s from "../../theme.js";
|
|
7
|
-
import { LabeledValue as
|
|
8
|
-
import { LabeledInput as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { Tooltip as
|
|
12
|
-
import { T as
|
|
13
|
-
import { B as
|
|
14
|
-
const
|
|
7
|
+
import { LabeledValue as D } from "../../base/LabeledValue/LabeledValue.js";
|
|
8
|
+
import { LabeledInput as H } from "../../composite/LabeledInput/LabeledInput.js";
|
|
9
|
+
import J from "../../base/Loading/Loading.js";
|
|
10
|
+
import h from "../../base/Flex/Flex.js";
|
|
11
|
+
import { Tooltip as x } from "../../composite/Tooltip/Tooltip.js";
|
|
12
|
+
import { T as K } from "../../.chunks/Input.js";
|
|
13
|
+
import { B as N } from "../../.chunks/ButtonBase.js";
|
|
14
|
+
const O = w(/* @__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"),
|
|
16
|
+
}), "Edit"), Q = w(/* @__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"),
|
|
18
|
+
}), "Close"), X = w(/* @__PURE__ */ o("path", {
|
|
19
19
|
d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
20
|
-
}), "Check"),
|
|
21
|
-
({ width: t, padding: l, shadow: r, styles:
|
|
22
|
-
...
|
|
20
|
+
}), "Check"), z = i("div")(
|
|
21
|
+
({ width: t, padding: l, shadow: r, styles: m, isEditing: d }) => ({
|
|
22
|
+
...f`
|
|
23
23
|
width: ${t};
|
|
24
24
|
max-width: 100%;
|
|
25
25
|
box-sizing: border-box;
|
|
@@ -35,7 +35,7 @@ const K = x(/* @__PURE__ */ o("path", {
|
|
|
35
35
|
box-shadow: ${r};
|
|
36
36
|
border-radius: 5px;
|
|
37
37
|
background-color: ${s.colors.white};
|
|
38
|
-
${
|
|
38
|
+
${m};
|
|
39
39
|
z-index: ${d ? 0 : 1};
|
|
40
40
|
position: relative;
|
|
41
41
|
transform: ${d ? "rotateY(-180deg)" : "rotateY(0deg)"};
|
|
@@ -43,7 +43,7 @@ const K = x(/* @__PURE__ */ o("path", {
|
|
|
43
43
|
opacity: ${d ? "0" : "1"};
|
|
44
44
|
`
|
|
45
45
|
})
|
|
46
|
-
),
|
|
46
|
+
), Z = i(K)({
|
|
47
47
|
backgroundColor: s.colors.white,
|
|
48
48
|
borderRadius: "0",
|
|
49
49
|
input: {
|
|
@@ -71,8 +71,8 @@ const K = x(/* @__PURE__ */ o("path", {
|
|
|
71
71
|
border: "none"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
}),
|
|
75
|
-
...
|
|
74
|
+
}), _ = i(z)(({ isEditing: t }) => ({
|
|
75
|
+
...f`
|
|
76
76
|
position: absolute;
|
|
77
77
|
top: 0;
|
|
78
78
|
z-index: ${t ? 1 : 0};
|
|
@@ -82,7 +82,7 @@ const K = x(/* @__PURE__ */ o("path", {
|
|
|
82
82
|
`
|
|
83
83
|
})), y = i("div")(
|
|
84
84
|
({ spacing: t, columns: l, numRows: r }) => ({
|
|
85
|
-
...
|
|
85
|
+
...f`
|
|
86
86
|
margin-top: calc(${t} * 0.75);
|
|
87
87
|
grid-row-gap: ${t};
|
|
88
88
|
grid-column-gap: calc(${t} * 1.5);
|
|
@@ -91,55 +91,59 @@ const K = x(/* @__PURE__ */ o("path", {
|
|
|
91
91
|
grid-template-rows: repeat(${r}, 1fr);
|
|
92
92
|
`
|
|
93
93
|
})
|
|
94
|
-
),
|
|
95
|
-
...
|
|
94
|
+
), C = i(N)(() => ({
|
|
95
|
+
...f`
|
|
96
96
|
width: 40px;
|
|
97
97
|
height: 40px;
|
|
98
98
|
border-radius: 50%;
|
|
99
99
|
`
|
|
100
|
-
})),
|
|
100
|
+
})), oo = i("div")`
|
|
101
101
|
position: relative;
|
|
102
102
|
width: 100%;
|
|
103
|
-
`,
|
|
103
|
+
`, eo = i("div")`
|
|
104
104
|
height: 19px;
|
|
105
|
-
`,
|
|
105
|
+
`, bo = ({
|
|
106
106
|
decorativeElement: t,
|
|
107
107
|
title: l,
|
|
108
108
|
items: r = [],
|
|
109
|
-
padding:
|
|
109
|
+
padding: m = "1rem 2rem",
|
|
110
110
|
shadow: d = s.boxShadow.darkGreen,
|
|
111
111
|
spacing: k = "2rem",
|
|
112
|
-
columns:
|
|
113
|
-
styles:
|
|
114
|
-
width:
|
|
115
|
-
loading:
|
|
116
|
-
onSave:
|
|
112
|
+
columns: $ = 3,
|
|
113
|
+
styles: M,
|
|
114
|
+
width: B = "100%",
|
|
115
|
+
loading: L = !1,
|
|
116
|
+
onSave: P = () => {
|
|
117
117
|
},
|
|
118
|
-
onCancel:
|
|
118
|
+
onCancel: R = () => {
|
|
119
119
|
},
|
|
120
|
-
onEdit:
|
|
120
|
+
onEdit: T = () => {
|
|
121
121
|
}
|
|
122
122
|
}) => {
|
|
123
|
-
const
|
|
124
|
-
|
|
123
|
+
const u = r.reduce((e, n) => ({ ...e, [n.label]: n.value }), { titleValue: l }), [j, b] = S(!1), [c, p] = S(u);
|
|
124
|
+
A(() => {
|
|
125
|
+
p(u);
|
|
126
|
+
}, [r]);
|
|
127
|
+
const E = () => {
|
|
128
|
+
T(), b(!0);
|
|
125
129
|
}, V = () => {
|
|
126
|
-
|
|
130
|
+
P(c), b(!1);
|
|
127
131
|
}, Y = () => {
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
},
|
|
134
|
-
return /* @__PURE__ */ a(
|
|
135
|
-
/* @__PURE__ */ a(
|
|
136
|
-
/* @__PURE__ */ a(
|
|
137
|
-
/* @__PURE__ */ a(
|
|
132
|
+
R(), p(u), b(!1);
|
|
133
|
+
}, F = (e, n) => {
|
|
134
|
+
p((W) => ({ ...W, [e]: n }));
|
|
135
|
+
}, G = (e) => {
|
|
136
|
+
p((n) => ({ ...n, titleValue: e }));
|
|
137
|
+
}, U = Math.ceil(r.length / $), g = 48, v = { width: B, padding: m, shadow: d, styles: M, isEditing: j }, I = { spacing: k, columns: $, numRows: U };
|
|
138
|
+
return /* @__PURE__ */ a(oo, { children: [
|
|
139
|
+
/* @__PURE__ */ a(z, { ...v, children: [
|
|
140
|
+
/* @__PURE__ */ a(h, { width: "100%", gap: "1rem", justifyContent: "space-between", children: [
|
|
141
|
+
/* @__PURE__ */ a(h, { width: "100%", gap: "1rem", alignItems: "center", children: [
|
|
138
142
|
t && t,
|
|
139
143
|
/* @__PURE__ */ o("h3", { children: l })
|
|
140
144
|
] }),
|
|
141
145
|
/* @__PURE__ */ o(
|
|
142
|
-
|
|
146
|
+
x,
|
|
143
147
|
{
|
|
144
148
|
title: "Edit",
|
|
145
149
|
placement: "top",
|
|
@@ -155,35 +159,39 @@ const K = x(/* @__PURE__ */ o("path", {
|
|
|
155
159
|
]
|
|
156
160
|
}
|
|
157
161
|
},
|
|
158
|
-
children: /* @__PURE__ */ o(
|
|
162
|
+
children: /* @__PURE__ */ o(C, { onClick: E, children: /* @__PURE__ */ o(O, {}) })
|
|
159
163
|
}
|
|
160
164
|
)
|
|
161
165
|
] }),
|
|
162
|
-
/* @__PURE__ */ o(y, { ...
|
|
163
|
-
/* @__PURE__ */ o(
|
|
166
|
+
/* @__PURE__ */ o(y, { ...I, children: L ? /* @__PURE__ */ a(q, { children: [
|
|
167
|
+
/* @__PURE__ */ o(eo, {}),
|
|
164
168
|
/* @__PURE__ */ o(
|
|
165
|
-
|
|
169
|
+
J,
|
|
166
170
|
{
|
|
167
|
-
size:
|
|
168
|
-
styles: {
|
|
171
|
+
size: g,
|
|
172
|
+
styles: {
|
|
173
|
+
position: "absolute",
|
|
174
|
+
top: `calc(50% - ${g / 2}px)`,
|
|
175
|
+
right: `calc(50% - ${g / 2}px)`
|
|
176
|
+
}
|
|
169
177
|
}
|
|
170
178
|
)
|
|
171
|
-
] }) : r == null ? void 0 : r.map((e) => /* @__PURE__ */ o(
|
|
179
|
+
] }) : r == null ? void 0 : r.map((e) => /* @__PURE__ */ o(D, { ...e }, e.label)) })
|
|
172
180
|
] }),
|
|
173
|
-
/* @__PURE__ */ a(
|
|
174
|
-
/* @__PURE__ */ a(
|
|
175
|
-
/* @__PURE__ */ a(
|
|
181
|
+
/* @__PURE__ */ a(_, { ...v, children: [
|
|
182
|
+
/* @__PURE__ */ a(h, { width: "100%", justifyContent: "space-between", children: [
|
|
183
|
+
/* @__PURE__ */ a(h, { width: "100%", gap: "1rem", alignItems: "center", children: [
|
|
176
184
|
t && t,
|
|
177
185
|
/* @__PURE__ */ o("h3", { children: /* @__PURE__ */ o(
|
|
178
|
-
|
|
186
|
+
Z,
|
|
179
187
|
{
|
|
180
|
-
onChange: (e) =>
|
|
188
|
+
onChange: (e) => G(e.target.value),
|
|
181
189
|
value: (c == null ? void 0 : c.titleValue) ?? l
|
|
182
190
|
}
|
|
183
191
|
) })
|
|
184
192
|
] }),
|
|
185
193
|
/* @__PURE__ */ o(
|
|
186
|
-
|
|
194
|
+
x,
|
|
187
195
|
{
|
|
188
196
|
title: "Cancel",
|
|
189
197
|
placement: "top",
|
|
@@ -199,11 +207,11 @@ const K = x(/* @__PURE__ */ o("path", {
|
|
|
199
207
|
]
|
|
200
208
|
}
|
|
201
209
|
},
|
|
202
|
-
children: /* @__PURE__ */ o(
|
|
210
|
+
children: /* @__PURE__ */ o(C, { onClick: Y, children: /* @__PURE__ */ o(Q, {}) })
|
|
203
211
|
}
|
|
204
212
|
),
|
|
205
213
|
/* @__PURE__ */ o(
|
|
206
|
-
|
|
214
|
+
x,
|
|
207
215
|
{
|
|
208
216
|
title: "Save",
|
|
209
217
|
placement: "top",
|
|
@@ -219,16 +227,16 @@ const K = x(/* @__PURE__ */ o("path", {
|
|
|
219
227
|
]
|
|
220
228
|
}
|
|
221
229
|
},
|
|
222
|
-
children: /* @__PURE__ */ o(
|
|
230
|
+
children: /* @__PURE__ */ o(C, { onClick: V, children: /* @__PURE__ */ o(X, {}) })
|
|
223
231
|
}
|
|
224
232
|
)
|
|
225
233
|
] }),
|
|
226
|
-
/* @__PURE__ */ o(y, { ...
|
|
227
|
-
|
|
234
|
+
/* @__PURE__ */ o(y, { ...I, children: r == null ? void 0 : r.map((e) => /* @__PURE__ */ o(
|
|
235
|
+
H,
|
|
228
236
|
{
|
|
229
237
|
label: e.label,
|
|
230
238
|
value: c[e.label],
|
|
231
|
-
onChange: (n) =>
|
|
239
|
+
onChange: (n) => F(e.label, n.target.value)
|
|
232
240
|
},
|
|
233
241
|
e.label
|
|
234
242
|
)) })
|
|
@@ -236,6 +244,6 @@ const K = x(/* @__PURE__ */ o("path", {
|
|
|
236
244
|
] });
|
|
237
245
|
};
|
|
238
246
|
export {
|
|
239
|
-
|
|
240
|
-
|
|
247
|
+
bo as EditableInfoCard,
|
|
248
|
+
bo as default
|
|
241
249
|
};
|