jcicl 0.0.75 → 0.0.77
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.77",
|
|
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
|
|
2
|
-
import { useState as
|
|
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";
|
|
3
3
|
import { n as i } from "../../.chunks/emotion-styled.browser.esm.js";
|
|
4
|
-
import { c as
|
|
5
|
-
import { c as
|
|
6
|
-
import
|
|
7
|
-
import { LabeledValue as
|
|
8
|
-
import { LabeledInput as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
4
|
+
import { c as m } from "../../.chunks/emotion-react.browser.esm.js";
|
|
5
|
+
import { c as C } from "../../.chunks/createSvgIcon.js";
|
|
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";
|
|
9
|
+
import k from "../../base/Loading/Loading.js";
|
|
10
|
+
import f from "../../base/Flex/Flex.js";
|
|
11
11
|
import { Tooltip as x } from "../../composite/Tooltip/Tooltip.js";
|
|
12
|
-
import { T as
|
|
13
|
-
import { B as
|
|
14
|
-
const
|
|
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", {
|
|
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"), X = 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"),
|
|
18
|
+
}), "Close"), Z = 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
|
-
}), "Check"),
|
|
21
|
-
({ width: t, padding: l, shadow: r, styles:
|
|
22
|
-
...
|
|
20
|
+
}), "Check"), L = i("div")(
|
|
21
|
+
({ width: t, padding: l, shadow: r, styles: u, isEditing: c }) => ({
|
|
22
|
+
...m`
|
|
23
23
|
width: ${t};
|
|
24
24
|
max-width: 100%;
|
|
25
25
|
box-sizing: border-box;
|
|
@@ -34,17 +34,17 @@ const O = w(/* @__PURE__ */ o("path", {
|
|
|
34
34
|
flex-direction: column;
|
|
35
35
|
box-shadow: ${r};
|
|
36
36
|
border-radius: 5px;
|
|
37
|
-
background-color: ${
|
|
38
|
-
${
|
|
39
|
-
z-index: ${
|
|
37
|
+
background-color: ${d.colors.white};
|
|
38
|
+
${u};
|
|
39
|
+
z-index: ${c ? 0 : 1};
|
|
40
40
|
position: relative;
|
|
41
|
-
transform: ${
|
|
41
|
+
transform: ${c ? "rotateY(-180deg)" : "rotateY(0deg)"};
|
|
42
42
|
transition: 920ms all ease-in-out;
|
|
43
|
-
opacity: ${
|
|
43
|
+
opacity: ${c ? "0" : "1"};
|
|
44
44
|
`
|
|
45
45
|
})
|
|
46
|
-
),
|
|
47
|
-
backgroundColor:
|
|
46
|
+
), _ = i(N)({
|
|
47
|
+
backgroundColor: d.colors.white,
|
|
48
48
|
borderRadius: "0",
|
|
49
49
|
input: {
|
|
50
50
|
fontSize: "28px",
|
|
@@ -52,14 +52,14 @@ const O = w(/* @__PURE__ */ o("path", {
|
|
|
52
52
|
transition: "313ms all ease-out",
|
|
53
53
|
padding: "0",
|
|
54
54
|
borderRadius: "0",
|
|
55
|
-
borderBottom: `1px solid ${
|
|
55
|
+
borderBottom: `1px solid ${d.colors.gray}`,
|
|
56
56
|
"&:focus, :focus-visible": {
|
|
57
|
-
boxShadow: `0 3px 2px -2px ${
|
|
57
|
+
boxShadow: `0 3px 2px -2px ${d.colors.darkGreen}`
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"&:hover, :focus, :focus-visible": {
|
|
61
61
|
input: {
|
|
62
|
-
boxShadow: `0 3px 2px -2px ${
|
|
62
|
+
boxShadow: `0 3px 2px -2px ${d.colors.darkGreen}`
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
fieldset: {
|
|
@@ -71,8 +71,8 @@ const O = w(/* @__PURE__ */ o("path", {
|
|
|
71
71
|
border: "none"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
}),
|
|
75
|
-
...
|
|
74
|
+
}), oo = i(L)(({ isEditing: t }) => ({
|
|
75
|
+
...m`
|
|
76
76
|
position: absolute;
|
|
77
77
|
top: 0;
|
|
78
78
|
z-index: ${t ? 1 : 0};
|
|
@@ -80,9 +80,9 @@ const O = w(/* @__PURE__ */ o("path", {
|
|
|
80
80
|
opacity: ${t ? "1" : "0"};
|
|
81
81
|
transition: 920ms all ease-in-out;
|
|
82
82
|
`
|
|
83
|
-
})),
|
|
83
|
+
})), M = i("div")(
|
|
84
84
|
({ spacing: t, columns: l, numRows: r }) => ({
|
|
85
|
-
...
|
|
85
|
+
...m`
|
|
86
86
|
margin-top: calc(${t} * 0.75);
|
|
87
87
|
grid-row-gap: ${t};
|
|
88
88
|
grid-column-gap: calc(${t} * 1.5);
|
|
@@ -91,54 +91,54 @@ const O = w(/* @__PURE__ */ o("path", {
|
|
|
91
91
|
grid-template-rows: repeat(${r}, 1fr);
|
|
92
92
|
`
|
|
93
93
|
})
|
|
94
|
-
),
|
|
95
|
-
...
|
|
94
|
+
), $ = i(O)(() => ({
|
|
95
|
+
...m`
|
|
96
96
|
width: 40px;
|
|
97
97
|
height: 40px;
|
|
98
98
|
border-radius: 50%;
|
|
99
99
|
`
|
|
100
|
-
})),
|
|
100
|
+
})), eo = i("div")`
|
|
101
101
|
position: relative;
|
|
102
102
|
width: 100%;
|
|
103
|
-
`,
|
|
103
|
+
`, B = i("div")`
|
|
104
104
|
height: 19px;
|
|
105
105
|
`, bo = ({
|
|
106
106
|
decorativeElement: t,
|
|
107
107
|
title: l,
|
|
108
108
|
items: r = [],
|
|
109
|
-
padding:
|
|
110
|
-
shadow:
|
|
111
|
-
spacing:
|
|
112
|
-
columns:
|
|
113
|
-
styles:
|
|
114
|
-
width:
|
|
115
|
-
loading:
|
|
116
|
-
onSave:
|
|
109
|
+
padding: u = "1rem 2rem",
|
|
110
|
+
shadow: c = d.boxShadow.darkGreen,
|
|
111
|
+
spacing: P = "2rem",
|
|
112
|
+
columns: w = 3,
|
|
113
|
+
styles: R,
|
|
114
|
+
width: T = "100%",
|
|
115
|
+
loading: v = !1,
|
|
116
|
+
onSave: j = () => {
|
|
117
117
|
},
|
|
118
|
-
onCancel:
|
|
118
|
+
onCancel: E = () => {
|
|
119
119
|
},
|
|
120
|
-
onEdit:
|
|
120
|
+
onEdit: V = () => {
|
|
121
121
|
}
|
|
122
122
|
}) => {
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
const b = r.reduce((e, a) => ({ ...e, [a.label]: a.value }), { titleValue: l }), [Y, g] = z(!1), [p, h] = z(b);
|
|
124
|
+
H(() => {
|
|
125
|
+
h(b);
|
|
126
126
|
}, [r]);
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
return /* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
127
|
+
const F = () => {
|
|
128
|
+
V(), g(!0);
|
|
129
|
+
}, G = () => {
|
|
130
|
+
j(p), g(!1);
|
|
131
|
+
}, U = () => {
|
|
132
|
+
E(), h(b), g(!1);
|
|
133
|
+
}, W = (e, a) => {
|
|
134
|
+
h((D) => ({ ...D, [e]: a }));
|
|
135
|
+
}, q = (e) => {
|
|
136
|
+
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: [
|
|
139
|
+
/* @__PURE__ */ n(L, { ...I, children: [
|
|
140
|
+
/* @__PURE__ */ n(f, { width: "100%", gap: "1rem", justifyContent: "space-between", children: [
|
|
141
|
+
/* @__PURE__ */ n(f, { width: "100%", gap: "1rem", alignItems: "center", children: [
|
|
142
142
|
t && t,
|
|
143
143
|
/* @__PURE__ */ o("h3", { children: l })
|
|
144
144
|
] }),
|
|
@@ -159,34 +159,34 @@ const O = w(/* @__PURE__ */ o("path", {
|
|
|
159
159
|
]
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
children: /* @__PURE__ */ o(
|
|
162
|
+
children: /* @__PURE__ */ o($, { onClick: F, children: /* @__PURE__ */ o(Q, {}) })
|
|
163
163
|
}
|
|
164
164
|
)
|
|
165
165
|
] }),
|
|
166
|
-
/* @__PURE__ */ o(
|
|
167
|
-
/* @__PURE__ */ o(
|
|
166
|
+
/* @__PURE__ */ o(M, { ...S, children: v ? /* @__PURE__ */ n(y, { children: [
|
|
167
|
+
/* @__PURE__ */ o(B, {}),
|
|
168
168
|
/* @__PURE__ */ o(
|
|
169
|
-
|
|
169
|
+
k,
|
|
170
170
|
{
|
|
171
|
-
size:
|
|
171
|
+
size: s,
|
|
172
172
|
styles: {
|
|
173
173
|
position: "absolute",
|
|
174
|
-
top: `calc(50% - ${
|
|
175
|
-
right: `calc(50% - ${
|
|
174
|
+
top: `calc(50% - ${s / 2}px)`,
|
|
175
|
+
right: `calc(50% - ${s / 2}px)`
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
)
|
|
179
|
-
] }) : r == null ? void 0 : r.map((e) => /* @__PURE__ */ o(
|
|
179
|
+
] }) : r == null ? void 0 : r.map((e) => /* @__PURE__ */ o(J, { ...e }, e.label)) })
|
|
180
180
|
] }),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ n(oo, { ...I, children: [
|
|
182
|
+
/* @__PURE__ */ n(f, { width: "100%", justifyContent: "space-between", children: [
|
|
183
|
+
/* @__PURE__ */ n(f, { width: "100%", gap: "1rem", alignItems: "center", children: [
|
|
184
184
|
t && t,
|
|
185
185
|
/* @__PURE__ */ o("h3", { children: /* @__PURE__ */ o(
|
|
186
|
-
|
|
186
|
+
_,
|
|
187
187
|
{
|
|
188
|
-
onChange: (e) =>
|
|
189
|
-
value: (
|
|
188
|
+
onChange: (e) => q(e.target.value),
|
|
189
|
+
value: (p == null ? void 0 : p.titleValue) ?? l
|
|
190
190
|
}
|
|
191
191
|
) })
|
|
192
192
|
] }),
|
|
@@ -207,7 +207,7 @@ const O = w(/* @__PURE__ */ o("path", {
|
|
|
207
207
|
]
|
|
208
208
|
}
|
|
209
209
|
},
|
|
210
|
-
children: /* @__PURE__ */ o(
|
|
210
|
+
children: /* @__PURE__ */ o($, { onClick: U, children: /* @__PURE__ */ o(X, {}) })
|
|
211
211
|
}
|
|
212
212
|
),
|
|
213
213
|
/* @__PURE__ */ o(
|
|
@@ -227,16 +227,29 @@ const O = w(/* @__PURE__ */ o("path", {
|
|
|
227
227
|
]
|
|
228
228
|
}
|
|
229
229
|
},
|
|
230
|
-
children: /* @__PURE__ */ o(
|
|
230
|
+
children: /* @__PURE__ */ o($, { onClick: G, children: /* @__PURE__ */ o(Z, {}) })
|
|
231
231
|
}
|
|
232
232
|
)
|
|
233
233
|
] }),
|
|
234
|
-
/* @__PURE__ */ o(
|
|
235
|
-
|
|
234
|
+
/* @__PURE__ */ o(M, { ...S, children: v ? /* @__PURE__ */ n(y, { children: [
|
|
235
|
+
/* @__PURE__ */ o(B, {}),
|
|
236
|
+
/* @__PURE__ */ o(
|
|
237
|
+
k,
|
|
238
|
+
{
|
|
239
|
+
size: s,
|
|
240
|
+
styles: {
|
|
241
|
+
position: "absolute",
|
|
242
|
+
top: `calc(50% - ${s / 2}px)`,
|
|
243
|
+
right: `calc(50% - ${s / 2}px)`
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
] }) : r == null ? void 0 : r.map((e) => /* @__PURE__ */ o(
|
|
248
|
+
K,
|
|
236
249
|
{
|
|
237
250
|
label: e.label,
|
|
238
|
-
value:
|
|
239
|
-
onChange: (
|
|
251
|
+
value: p[e.label],
|
|
252
|
+
onChange: (a) => W(e.label, a.target.value)
|
|
240
253
|
},
|
|
241
254
|
e.label
|
|
242
255
|
)) })
|