jcicl 1.0.13 → 1.0.16
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DropdownOption } from '../../../../../../../../../src/components/composite/LabeledDropdown';
|
|
2
|
+
import { AllInputProps } from '../../../../../../../../../src/components/supercomposite/FormInput/FormInput';
|
|
2
3
|
export type FormField = {
|
|
3
4
|
key: string;
|
|
4
5
|
label?: string;
|
|
@@ -18,6 +19,6 @@ export type FormFieldsProps = {
|
|
|
18
19
|
checkboxContainer?: boolean;
|
|
19
20
|
formDefaults: Record<string, any>;
|
|
20
21
|
onChange: (key: string, e: React.ChangeEvent<HTMLInputElement>, type?: string) => void;
|
|
21
|
-
}
|
|
22
|
+
} & Partial<AllInputProps>;
|
|
22
23
|
declare const FormFields: React.FC<FormFieldsProps>;
|
|
23
24
|
export default FormFields;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { n as
|
|
1
|
+
import { jsxs as v, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { n as ae } from "../.chunks/emotion-styled.browser.esm.js";
|
|
3
3
|
import { c as M } from "../.chunks/emotion-react.browser.esm.js";
|
|
4
|
-
import { useThemeColors as
|
|
5
|
-
import * as
|
|
6
|
-
import { g as
|
|
7
|
-
import { u as
|
|
8
|
-
import { B as
|
|
9
|
-
import { u as
|
|
10
|
-
import { r as
|
|
11
|
-
import { c as
|
|
12
|
-
import { m as
|
|
13
|
-
import { c as
|
|
14
|
-
function
|
|
15
|
-
return
|
|
4
|
+
import { useThemeColors as ne } from "../ThemeContext.js";
|
|
5
|
+
import * as w from "react";
|
|
6
|
+
import { g as U, a as H, s as P, r as D, b as _, P as e, c as b, d as A, e as E, u as se } from "../.chunks/DefaultPropsProvider.js";
|
|
7
|
+
import { u as re } from "../.chunks/useFormControl.js";
|
|
8
|
+
import { B as ce } from "../.chunks/ButtonBase.js";
|
|
9
|
+
import { u as ie } from "../.chunks/useControlled.js";
|
|
10
|
+
import { r as W } from "../.chunks/TransitionGroupContext.js";
|
|
11
|
+
import { c as F } from "../.chunks/createSvgIcon.js";
|
|
12
|
+
import { m as le } from "../.chunks/memoTheme.js";
|
|
13
|
+
import { c as q } from "../.chunks/createSimplePaletteValueFilter.js";
|
|
14
|
+
function de(o) {
|
|
15
|
+
return U("PrivateSwitchBase", o);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
const
|
|
17
|
+
H("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
18
|
+
const pe = (o) => {
|
|
19
19
|
const {
|
|
20
20
|
classes: t,
|
|
21
21
|
checked: a,
|
|
22
|
-
disabled:
|
|
23
|
-
edge:
|
|
24
|
-
} = o,
|
|
25
|
-
root: ["root", a && "checked",
|
|
22
|
+
disabled: n,
|
|
23
|
+
edge: s
|
|
24
|
+
} = o, c = {
|
|
25
|
+
root: ["root", a && "checked", n && "disabled", s && `edge${b(s)}`],
|
|
26
26
|
input: ["input"]
|
|
27
27
|
};
|
|
28
|
-
return
|
|
29
|
-
},
|
|
28
|
+
return A(c, de, t);
|
|
29
|
+
}, ue = P(ce)({
|
|
30
30
|
padding: 9,
|
|
31
31
|
borderRadius: "50%",
|
|
32
32
|
variants: [{
|
|
@@ -62,8 +62,8 @@ const de = (o) => {
|
|
|
62
62
|
marginRight: -12
|
|
63
63
|
}
|
|
64
64
|
}]
|
|
65
|
-
}),
|
|
66
|
-
shouldForwardProp:
|
|
65
|
+
}), fe = P("input", {
|
|
66
|
+
shouldForwardProp: D
|
|
67
67
|
})({
|
|
68
68
|
cursor: "inherit",
|
|
69
69
|
position: "absolute",
|
|
@@ -75,90 +75,90 @@ const de = (o) => {
|
|
|
75
75
|
margin: 0,
|
|
76
76
|
padding: 0,
|
|
77
77
|
zIndex: 1
|
|
78
|
-
}),
|
|
78
|
+
}), G = /* @__PURE__ */ w.forwardRef(function(t, a) {
|
|
79
79
|
const {
|
|
80
|
-
autoFocus:
|
|
81
|
-
checked:
|
|
82
|
-
checkedIcon:
|
|
83
|
-
className:
|
|
84
|
-
defaultChecked:
|
|
80
|
+
autoFocus: n,
|
|
81
|
+
checked: s,
|
|
82
|
+
checkedIcon: c,
|
|
83
|
+
className: l,
|
|
84
|
+
defaultChecked: p,
|
|
85
85
|
disabled: k,
|
|
86
86
|
disableFocusRipple: g = !1,
|
|
87
87
|
edge: u = !1,
|
|
88
|
-
icon:
|
|
89
|
-
id:
|
|
90
|
-
inputProps:
|
|
88
|
+
icon: B,
|
|
89
|
+
id: I,
|
|
90
|
+
inputProps: R,
|
|
91
91
|
inputRef: C,
|
|
92
92
|
name: y,
|
|
93
93
|
onBlur: f,
|
|
94
94
|
onChange: h,
|
|
95
|
-
onFocus:
|
|
96
|
-
readOnly:
|
|
97
|
-
required:
|
|
98
|
-
tabIndex:
|
|
95
|
+
onFocus: j,
|
|
96
|
+
readOnly: J,
|
|
97
|
+
required: K = !1,
|
|
98
|
+
tabIndex: Q,
|
|
99
99
|
type: x,
|
|
100
|
-
value:
|
|
101
|
-
...
|
|
102
|
-
} = t, [
|
|
103
|
-
controlled:
|
|
104
|
-
default: !!
|
|
100
|
+
value: N,
|
|
101
|
+
...X
|
|
102
|
+
} = t, [$, Y] = ie({
|
|
103
|
+
controlled: s,
|
|
104
|
+
default: !!p,
|
|
105
105
|
name: "SwitchBase",
|
|
106
106
|
state: "checked"
|
|
107
|
-
}),
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
f && f(
|
|
111
|
-
},
|
|
112
|
-
if (
|
|
107
|
+
}), d = re(), Z = (i) => {
|
|
108
|
+
j && j(i), d && d.onFocus && d.onFocus(i);
|
|
109
|
+
}, ee = (i) => {
|
|
110
|
+
f && f(i), d && d.onBlur && d.onBlur(i);
|
|
111
|
+
}, oe = (i) => {
|
|
112
|
+
if (i.nativeEvent.defaultPrevented)
|
|
113
113
|
return;
|
|
114
|
-
const
|
|
115
|
-
|
|
114
|
+
const L = i.target.checked;
|
|
115
|
+
Y(L), h && h(i, L);
|
|
116
116
|
};
|
|
117
117
|
let m = k;
|
|
118
|
-
|
|
119
|
-
const
|
|
118
|
+
d && typeof m > "u" && (m = d.disabled);
|
|
119
|
+
const te = x === "checkbox" || x === "radio", S = {
|
|
120
120
|
...t,
|
|
121
|
-
checked:
|
|
121
|
+
checked: $,
|
|
122
122
|
disabled: m,
|
|
123
123
|
disableFocusRipple: g,
|
|
124
124
|
edge: u
|
|
125
|
-
},
|
|
126
|
-
return /* @__PURE__ */
|
|
125
|
+
}, T = pe(S);
|
|
126
|
+
return /* @__PURE__ */ v(ue, {
|
|
127
127
|
component: "span",
|
|
128
|
-
className:
|
|
128
|
+
className: _(T.root, l),
|
|
129
129
|
centerRipple: !0,
|
|
130
130
|
focusRipple: !g,
|
|
131
131
|
disabled: m,
|
|
132
132
|
tabIndex: null,
|
|
133
133
|
role: void 0,
|
|
134
|
-
onFocus:
|
|
135
|
-
onBlur:
|
|
136
|
-
ownerState:
|
|
134
|
+
onFocus: Z,
|
|
135
|
+
onBlur: ee,
|
|
136
|
+
ownerState: S,
|
|
137
137
|
ref: a,
|
|
138
|
-
...
|
|
139
|
-
children: [/* @__PURE__ */
|
|
140
|
-
autoFocus:
|
|
141
|
-
checked:
|
|
142
|
-
defaultChecked:
|
|
143
|
-
className:
|
|
138
|
+
...X,
|
|
139
|
+
children: [/* @__PURE__ */ r(fe, {
|
|
140
|
+
autoFocus: n,
|
|
141
|
+
checked: s,
|
|
142
|
+
defaultChecked: p,
|
|
143
|
+
className: T.input,
|
|
144
144
|
disabled: m,
|
|
145
|
-
id:
|
|
145
|
+
id: te ? I : void 0,
|
|
146
146
|
name: y,
|
|
147
|
-
onChange:
|
|
148
|
-
readOnly:
|
|
147
|
+
onChange: oe,
|
|
148
|
+
readOnly: J,
|
|
149
149
|
ref: C,
|
|
150
|
-
required:
|
|
151
|
-
ownerState:
|
|
152
|
-
tabIndex:
|
|
150
|
+
required: K,
|
|
151
|
+
ownerState: S,
|
|
152
|
+
tabIndex: Q,
|
|
153
153
|
type: x,
|
|
154
|
-
...x === "checkbox" &&
|
|
155
|
-
value:
|
|
154
|
+
...x === "checkbox" && N === void 0 ? {} : {
|
|
155
|
+
value: N
|
|
156
156
|
},
|
|
157
|
-
...
|
|
158
|
-
}),
|
|
157
|
+
...R
|
|
158
|
+
}), $ ? c : B]
|
|
159
159
|
});
|
|
160
160
|
});
|
|
161
|
-
process.env.NODE_ENV !== "production" && (
|
|
161
|
+
process.env.NODE_ENV !== "production" && (G.propTypes = {
|
|
162
162
|
/**
|
|
163
163
|
* If `true`, the `input` element is focused during the first mount.
|
|
164
164
|
*/
|
|
@@ -215,7 +215,7 @@ process.env.NODE_ENV !== "production" && (A.propTypes = {
|
|
|
215
215
|
/**
|
|
216
216
|
* Pass a ref to the `input` element.
|
|
217
217
|
*/
|
|
218
|
-
inputRef:
|
|
218
|
+
inputRef: W,
|
|
219
219
|
/*
|
|
220
220
|
* @ignore
|
|
221
221
|
*/
|
|
@@ -261,32 +261,32 @@ process.env.NODE_ENV !== "production" && (A.propTypes = {
|
|
|
261
261
|
*/
|
|
262
262
|
value: e.any
|
|
263
263
|
});
|
|
264
|
-
const
|
|
264
|
+
const he = F(/* @__PURE__ */ r("path", {
|
|
265
265
|
d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
|
266
|
-
}), "CheckBoxOutlineBlank"),
|
|
266
|
+
}), "CheckBoxOutlineBlank"), me = F(/* @__PURE__ */ r("path", {
|
|
267
267
|
d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
268
|
-
}), "CheckBox"),
|
|
268
|
+
}), "CheckBox"), be = F(/* @__PURE__ */ r("path", {
|
|
269
269
|
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
|
|
270
270
|
}), "IndeterminateCheckBox");
|
|
271
|
-
function
|
|
272
|
-
return
|
|
271
|
+
function ke(o) {
|
|
272
|
+
return U("MuiCheckbox", o);
|
|
273
273
|
}
|
|
274
|
-
const
|
|
274
|
+
const z = H("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]), ge = (o) => {
|
|
275
275
|
const {
|
|
276
276
|
classes: t,
|
|
277
277
|
indeterminate: a,
|
|
278
|
-
color:
|
|
279
|
-
size:
|
|
280
|
-
} = o,
|
|
281
|
-
root: ["root", a && "indeterminate", `color${b(
|
|
282
|
-
},
|
|
278
|
+
color: n,
|
|
279
|
+
size: s
|
|
280
|
+
} = o, c = {
|
|
281
|
+
root: ["root", a && "indeterminate", `color${b(n)}`, `size${b(s)}`]
|
|
282
|
+
}, l = A(c, ke, t);
|
|
283
283
|
return {
|
|
284
284
|
...t,
|
|
285
285
|
// forward the disabled and checked classes to the SwitchBase
|
|
286
|
-
...
|
|
286
|
+
...l
|
|
287
287
|
};
|
|
288
|
-
},
|
|
289
|
-
shouldForwardProp: (o) =>
|
|
288
|
+
}, Ce = P(G, {
|
|
289
|
+
shouldForwardProp: (o) => D(o) || o === "classes",
|
|
290
290
|
name: "MuiCheckbox",
|
|
291
291
|
slot: "Root",
|
|
292
292
|
overridesResolver: (o, t) => {
|
|
@@ -295,7 +295,7 @@ const S = V("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "col
|
|
|
295
295
|
} = o;
|
|
296
296
|
return [t.root, a.indeterminate && t.indeterminate, t[`size${b(a.size)}`], a.color !== "default" && t[`color${b(a.color)}`]];
|
|
297
297
|
}
|
|
298
|
-
})(
|
|
298
|
+
})(le(({
|
|
299
299
|
theme: o
|
|
300
300
|
}) => ({
|
|
301
301
|
color: (o.vars || o).palette.text.secondary,
|
|
@@ -306,28 +306,28 @@ const S = V("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "col
|
|
|
306
306
|
},
|
|
307
307
|
style: {
|
|
308
308
|
"&:hover": {
|
|
309
|
-
backgroundColor: o.vars ? `rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
309
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})` : E(o.palette.action.active, o.palette.action.hoverOpacity)
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
}, ...Object.entries(o.palette).filter(
|
|
312
|
+
}, ...Object.entries(o.palette).filter(q()).map(([t]) => ({
|
|
313
313
|
props: {
|
|
314
314
|
color: t,
|
|
315
315
|
disableRipple: !1
|
|
316
316
|
},
|
|
317
317
|
style: {
|
|
318
318
|
"&:hover": {
|
|
319
|
-
backgroundColor: o.vars ? `rgba(${o.vars.palette[t].mainChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
319
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette[t].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : E(o.palette[t].main, o.palette.action.hoverOpacity)
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
})), ...Object.entries(o.palette).filter(
|
|
322
|
+
})), ...Object.entries(o.palette).filter(q()).map(([t]) => ({
|
|
323
323
|
props: {
|
|
324
324
|
color: t
|
|
325
325
|
},
|
|
326
326
|
style: {
|
|
327
|
-
[`&.${
|
|
327
|
+
[`&.${z.checked}, &.${z.indeterminate}`]: {
|
|
328
328
|
color: (o.vars || o).palette[t].main
|
|
329
329
|
},
|
|
330
|
-
[`&.${
|
|
330
|
+
[`&.${z.disabled}`]: {
|
|
331
331
|
color: (o.vars || o).palette.action.disabled
|
|
332
332
|
}
|
|
333
333
|
}
|
|
@@ -345,48 +345,48 @@ const S = V("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "col
|
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
}]
|
|
348
|
-
}))),
|
|
349
|
-
const
|
|
348
|
+
}))), ye = /* @__PURE__ */ r(me, {}), xe = /* @__PURE__ */ r(he, {}), ve = /* @__PURE__ */ r(be, {}), O = /* @__PURE__ */ w.forwardRef(function(t, a) {
|
|
349
|
+
const n = se({
|
|
350
350
|
props: t,
|
|
351
351
|
name: "MuiCheckbox"
|
|
352
352
|
}), {
|
|
353
|
-
checkedIcon:
|
|
354
|
-
color:
|
|
355
|
-
icon:
|
|
356
|
-
indeterminate:
|
|
357
|
-
indeterminateIcon: k =
|
|
353
|
+
checkedIcon: s = ye,
|
|
354
|
+
color: c = "primary",
|
|
355
|
+
icon: l = xe,
|
|
356
|
+
indeterminate: p = !1,
|
|
357
|
+
indeterminateIcon: k = ve,
|
|
358
358
|
inputProps: g,
|
|
359
359
|
size: u = "medium",
|
|
360
|
-
disableRipple:
|
|
361
|
-
className:
|
|
362
|
-
...
|
|
363
|
-
} =
|
|
364
|
-
...
|
|
365
|
-
disableRipple:
|
|
366
|
-
color:
|
|
367
|
-
indeterminate:
|
|
360
|
+
disableRipple: B = !1,
|
|
361
|
+
className: I,
|
|
362
|
+
...R
|
|
363
|
+
} = n, C = p ? k : l, y = p ? k : s, f = {
|
|
364
|
+
...n,
|
|
365
|
+
disableRipple: B,
|
|
366
|
+
color: c,
|
|
367
|
+
indeterminate: p,
|
|
368
368
|
size: u
|
|
369
|
-
}, h =
|
|
370
|
-
return /* @__PURE__ */
|
|
369
|
+
}, h = ge(f);
|
|
370
|
+
return /* @__PURE__ */ r(Ce, {
|
|
371
371
|
type: "checkbox",
|
|
372
372
|
inputProps: {
|
|
373
|
-
"data-indeterminate":
|
|
373
|
+
"data-indeterminate": p,
|
|
374
374
|
...g
|
|
375
375
|
},
|
|
376
|
-
icon: /* @__PURE__ */
|
|
376
|
+
icon: /* @__PURE__ */ w.cloneElement(C, {
|
|
377
377
|
fontSize: C.props.fontSize ?? u
|
|
378
378
|
}),
|
|
379
|
-
checkedIcon: /* @__PURE__ */
|
|
379
|
+
checkedIcon: /* @__PURE__ */ w.cloneElement(y, {
|
|
380
380
|
fontSize: y.props.fontSize ?? u
|
|
381
381
|
}),
|
|
382
382
|
ownerState: f,
|
|
383
383
|
ref: a,
|
|
384
|
-
className:
|
|
385
|
-
...
|
|
384
|
+
className: _(h.root, I),
|
|
385
|
+
...R,
|
|
386
386
|
classes: h
|
|
387
387
|
});
|
|
388
388
|
});
|
|
389
|
-
process.env.NODE_ENV !== "production" && (
|
|
389
|
+
process.env.NODE_ENV !== "production" && (O.propTypes = {
|
|
390
390
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
391
391
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
392
392
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -458,7 +458,7 @@ process.env.NODE_ENV !== "production" && (W.propTypes = {
|
|
|
458
458
|
/**
|
|
459
459
|
* Pass a ref to the `input` element.
|
|
460
460
|
*/
|
|
461
|
-
inputRef:
|
|
461
|
+
inputRef: W,
|
|
462
462
|
/**
|
|
463
463
|
* Callback fired when the state is changed.
|
|
464
464
|
*
|
|
@@ -487,7 +487,7 @@ process.env.NODE_ENV !== "production" && (W.propTypes = {
|
|
|
487
487
|
*/
|
|
488
488
|
value: e.any
|
|
489
489
|
});
|
|
490
|
-
const
|
|
490
|
+
const V = ae("div", { shouldForwardProp: (o) => !["customTheme"].includes(o) })(({ displayMode: o, customTheme: t }) => ({
|
|
491
491
|
...M`
|
|
492
492
|
display: flex;
|
|
493
493
|
flex-wrap: nowrap;
|
|
@@ -525,16 +525,20 @@ const ve = te("div", { shouldForwardProp: (o) => !["customTheme"].includes(o) })
|
|
|
525
525
|
label: o,
|
|
526
526
|
colon: t = !0,
|
|
527
527
|
displayMode: a = !1,
|
|
528
|
-
noLabel:
|
|
529
|
-
|
|
528
|
+
noLabel: n = !1,
|
|
529
|
+
boxFirst: s = !1,
|
|
530
|
+
...c
|
|
530
531
|
}) => {
|
|
531
|
-
const
|
|
532
|
-
return /* @__PURE__ */
|
|
533
|
-
|
|
532
|
+
const l = ne();
|
|
533
|
+
return s ? /* @__PURE__ */ v(V, { displayMode: a, className: "jcLabeledCheckbox", customTheme: l, children: [
|
|
534
|
+
/* @__PURE__ */ r(O, { ...c }),
|
|
535
|
+
!n && /* @__PURE__ */ r("span", { className: "jcCheckboxLabel", children: o })
|
|
536
|
+
] }) : /* @__PURE__ */ v(V, { displayMode: a, className: "jcLabeledCheckbox", customTheme: l, children: [
|
|
537
|
+
!n && /* @__PURE__ */ v("span", { className: "jcCheckboxLabel", children: [
|
|
534
538
|
o,
|
|
535
539
|
t && ":"
|
|
536
540
|
] }),
|
|
537
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ r(O, { ...c })
|
|
538
542
|
] });
|
|
539
543
|
};
|
|
540
544
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jcicl",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.16",
|
|
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",
|