jcicl 0.0.273 → 0.0.277
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/Button/Button.d.ts +1 -0
- package/Button/Button.js +97 -93
- package/FormFields/FormFields.d.ts +1 -0
- package/FormFields/FormFields.js +34 -29
- package/package.json +1 -1
package/Button/Button.d.ts
CHANGED
package/Button/Button.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsxs as H, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { g as _, a as A, s as c, r as q, c as d, m as J, u as K, b as O, P as t, d as Q, e as
|
|
2
|
+
import * as x from "react";
|
|
3
|
+
import { g as _, a as A, s as c, r as q, c as d, m as J, u as K, b as O, P as t, d as Q, e as g } from "../.chunks/DefaultPropsProvider.js";
|
|
4
4
|
import { m as X } from "../.chunks/memoTheme.js";
|
|
5
5
|
import { c as Y } from "../.chunks/createSimplePaletteValueFilter.js";
|
|
6
6
|
import { B as S } from "../.chunks/ButtonBase.js";
|
|
7
7
|
import { i as Z } from "../.chunks/emotion-styled.browser.esm.js";
|
|
8
|
-
import { c as
|
|
8
|
+
import { c as f } from "../.chunks/emotion-react.browser.esm.js";
|
|
9
9
|
import r from "../theme.js";
|
|
10
10
|
function oo(o) {
|
|
11
11
|
return _("MuiButton", o);
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const b = A("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), R = /* @__PURE__ */ x.createContext({});
|
|
14
14
|
process.env.NODE_ENV !== "production" && (R.displayName = "ButtonGroupContext");
|
|
15
|
-
const N = /* @__PURE__ */
|
|
15
|
+
const N = /* @__PURE__ */ x.createContext(void 0);
|
|
16
16
|
process.env.NODE_ENV !== "production" && (N.displayName = "ButtonGroupButtonContext");
|
|
17
17
|
const to = (o) => {
|
|
18
18
|
const {
|
|
19
|
-
color:
|
|
20
|
-
disableElevation:
|
|
19
|
+
color: a,
|
|
20
|
+
disableElevation: n,
|
|
21
21
|
fullWidth: e,
|
|
22
|
-
size:
|
|
23
|
-
variant:
|
|
24
|
-
classes:
|
|
25
|
-
} = o,
|
|
26
|
-
root: ["root",
|
|
22
|
+
size: p,
|
|
23
|
+
variant: i,
|
|
24
|
+
classes: u
|
|
25
|
+
} = o, s = {
|
|
26
|
+
root: ["root", i, `${i}${d(a)}`, `size${d(p)}`, `${i}Size${d(p)}`, `color${d(a)}`, n && "disableElevation", e && "fullWidth"],
|
|
27
27
|
label: ["label"],
|
|
28
|
-
startIcon: ["icon", "startIcon", `iconSize${d(
|
|
29
|
-
endIcon: ["icon", "endIcon", `iconSize${d(
|
|
30
|
-
},
|
|
28
|
+
startIcon: ["icon", "startIcon", `iconSize${d(p)}`],
|
|
29
|
+
endIcon: ["icon", "endIcon", `iconSize${d(p)}`]
|
|
30
|
+
}, y = Q(s, oo, u);
|
|
31
31
|
return {
|
|
32
|
-
...
|
|
32
|
+
...u,
|
|
33
33
|
// forward the focused, disabled, etc. classes to the ButtonBase
|
|
34
|
-
|
|
34
|
+
...y
|
|
35
35
|
};
|
|
36
36
|
}, E = [{
|
|
37
37
|
props: {
|
|
@@ -64,16 +64,16 @@ const to = (o) => {
|
|
|
64
64
|
shouldForwardProp: (o) => q(o) || o === "classes",
|
|
65
65
|
name: "MuiButton",
|
|
66
66
|
slot: "Root",
|
|
67
|
-
overridesResolver: (o,
|
|
67
|
+
overridesResolver: (o, a) => {
|
|
68
68
|
const {
|
|
69
|
-
ownerState:
|
|
69
|
+
ownerState: n
|
|
70
70
|
} = o;
|
|
71
|
-
return [
|
|
71
|
+
return [a.root, a[n.variant], a[`${n.variant}${d(n.color)}`], a[`size${d(n.size)}`], a[`${n.variant}Size${d(n.size)}`], n.color === "inherit" && a.colorInherit, n.disableElevation && a.disableElevation, n.fullWidth && a.fullWidth];
|
|
72
72
|
}
|
|
73
73
|
})(X(({
|
|
74
74
|
theme: o
|
|
75
75
|
}) => {
|
|
76
|
-
const
|
|
76
|
+
const a = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], n = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
|
|
77
77
|
return {
|
|
78
78
|
...o.typography.button,
|
|
79
79
|
minWidth: 64,
|
|
@@ -86,7 +86,7 @@ const to = (o) => {
|
|
|
86
86
|
"&:hover": {
|
|
87
87
|
textDecoration: "none"
|
|
88
88
|
},
|
|
89
|
-
[`&.${
|
|
89
|
+
[`&.${b.disabled}`]: {
|
|
90
90
|
color: (o.vars || o).palette.action.disabled
|
|
91
91
|
},
|
|
92
92
|
variants: [{
|
|
@@ -107,10 +107,10 @@ const to = (o) => {
|
|
|
107
107
|
"&:active": {
|
|
108
108
|
boxShadow: (o.vars || o).shadows[8]
|
|
109
109
|
},
|
|
110
|
-
[`&.${
|
|
110
|
+
[`&.${b.focusVisible}`]: {
|
|
111
111
|
boxShadow: (o.vars || o).shadows[6]
|
|
112
112
|
},
|
|
113
|
-
[`&.${
|
|
113
|
+
[`&.${b.disabled}`]: {
|
|
114
114
|
color: (o.vars || o).palette.action.disabled,
|
|
115
115
|
boxShadow: (o.vars || o).shadows[0],
|
|
116
116
|
backgroundColor: (o.vars || o).palette.action.disabledBackground
|
|
@@ -126,7 +126,7 @@ const to = (o) => {
|
|
|
126
126
|
borderColor: "var(--variant-outlinedBorder, currentColor)",
|
|
127
127
|
backgroundColor: "var(--variant-outlinedBg)",
|
|
128
128
|
color: "var(--variant-outlinedColor)",
|
|
129
|
-
[`&.${
|
|
129
|
+
[`&.${b.disabled}`]: {
|
|
130
130
|
border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
|
|
131
131
|
}
|
|
132
132
|
}
|
|
@@ -146,15 +146,15 @@ const to = (o) => {
|
|
|
146
146
|
style: {
|
|
147
147
|
"--variant-textColor": (o.vars || o).palette[e].main,
|
|
148
148
|
"--variant-outlinedColor": (o.vars || o).palette[e].main,
|
|
149
|
-
"--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / 0.5)` :
|
|
149
|
+
"--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / 0.5)` : g(o.palette[e].main, 0.5),
|
|
150
150
|
"--variant-containedColor": (o.vars || o).palette[e].contrastText,
|
|
151
151
|
"--variant-containedBg": (o.vars || o).palette[e].main,
|
|
152
152
|
"@media (hover: hover)": {
|
|
153
153
|
"&:hover": {
|
|
154
154
|
"--variant-containedBg": (o.vars || o).palette[e].dark,
|
|
155
|
-
"--variant-textBg": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
155
|
+
"--variant-textBg": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : g(o.palette[e].main, o.palette.action.hoverOpacity),
|
|
156
156
|
"--variant-outlinedBorder": (o.vars || o).palette[e].main,
|
|
157
|
-
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
157
|
+
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : g(o.palette[e].main, o.palette.action.hoverOpacity)
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -165,12 +165,12 @@ const to = (o) => {
|
|
|
165
165
|
style: {
|
|
166
166
|
color: "inherit",
|
|
167
167
|
borderColor: "currentColor",
|
|
168
|
-
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg :
|
|
168
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg : a,
|
|
169
169
|
"@media (hover: hover)": {
|
|
170
170
|
"&:hover": {
|
|
171
|
-
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg :
|
|
172
|
-
"--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
173
|
-
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
171
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg : n,
|
|
172
|
+
"--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : g(o.palette.text.primary, o.palette.action.hoverOpacity),
|
|
173
|
+
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : g(o.palette.text.primary, o.palette.action.hoverOpacity)
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -237,13 +237,13 @@ const to = (o) => {
|
|
|
237
237
|
"&:hover": {
|
|
238
238
|
boxShadow: "none"
|
|
239
239
|
},
|
|
240
|
-
[`&.${
|
|
240
|
+
[`&.${b.focusVisible}`]: {
|
|
241
241
|
boxShadow: "none"
|
|
242
242
|
},
|
|
243
243
|
"&:active": {
|
|
244
244
|
boxShadow: "none"
|
|
245
245
|
},
|
|
246
|
-
[`&.${
|
|
246
|
+
[`&.${b.disabled}`]: {
|
|
247
247
|
boxShadow: "none"
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -259,11 +259,11 @@ const to = (o) => {
|
|
|
259
259
|
})), ao = c("span", {
|
|
260
260
|
name: "MuiButton",
|
|
261
261
|
slot: "StartIcon",
|
|
262
|
-
overridesResolver: (o,
|
|
262
|
+
overridesResolver: (o, a) => {
|
|
263
263
|
const {
|
|
264
|
-
ownerState:
|
|
264
|
+
ownerState: n
|
|
265
265
|
} = o;
|
|
266
|
-
return [
|
|
266
|
+
return [a.startIcon, a[`iconSize${d(n.size)}`]];
|
|
267
267
|
}
|
|
268
268
|
})({
|
|
269
269
|
display: "inherit",
|
|
@@ -280,11 +280,11 @@ const to = (o) => {
|
|
|
280
280
|
}), no = c("span", {
|
|
281
281
|
name: "MuiButton",
|
|
282
282
|
slot: "EndIcon",
|
|
283
|
-
overridesResolver: (o,
|
|
283
|
+
overridesResolver: (o, a) => {
|
|
284
284
|
const {
|
|
285
|
-
ownerState:
|
|
285
|
+
ownerState: n
|
|
286
286
|
} = o;
|
|
287
|
-
return [
|
|
287
|
+
return [a.endIcon, a[`iconSize${d(n.size)}`]];
|
|
288
288
|
}
|
|
289
289
|
})({
|
|
290
290
|
display: "inherit",
|
|
@@ -298,13 +298,13 @@ const to = (o) => {
|
|
|
298
298
|
marginRight: -2
|
|
299
299
|
}
|
|
300
300
|
}, ...E]
|
|
301
|
-
}), T = /* @__PURE__ */
|
|
302
|
-
const e =
|
|
303
|
-
props:
|
|
301
|
+
}), T = /* @__PURE__ */ x.forwardRef(function(a, n) {
|
|
302
|
+
const e = x.useContext(R), p = x.useContext(N), i = J(e, a), u = K({
|
|
303
|
+
props: i,
|
|
304
304
|
name: "MuiButton"
|
|
305
305
|
}), {
|
|
306
|
-
children:
|
|
307
|
-
color:
|
|
306
|
+
children: s,
|
|
307
|
+
color: y = "primary",
|
|
308
308
|
component: w = "button",
|
|
309
309
|
className: P,
|
|
310
310
|
disabled: m = !1,
|
|
@@ -318,9 +318,9 @@ const to = (o) => {
|
|
|
318
318
|
type: k,
|
|
319
319
|
variant: F = "text",
|
|
320
320
|
...G
|
|
321
|
-
} =
|
|
322
|
-
...
|
|
323
|
-
color:
|
|
321
|
+
} = u, B = {
|
|
322
|
+
...u,
|
|
323
|
+
color: y,
|
|
324
324
|
component: w,
|
|
325
325
|
disabled: m,
|
|
326
326
|
disableElevation: W,
|
|
@@ -329,27 +329,27 @@ const to = (o) => {
|
|
|
329
329
|
size: M,
|
|
330
330
|
type: k,
|
|
331
331
|
variant: F
|
|
332
|
-
},
|
|
333
|
-
className:
|
|
334
|
-
ownerState:
|
|
332
|
+
}, v = to(B), L = I && /* @__PURE__ */ l(ao, {
|
|
333
|
+
className: v.startIcon,
|
|
334
|
+
ownerState: B,
|
|
335
335
|
children: I
|
|
336
336
|
}), D = h && /* @__PURE__ */ l(no, {
|
|
337
|
-
className:
|
|
338
|
-
ownerState:
|
|
337
|
+
className: v.endIcon,
|
|
338
|
+
ownerState: B,
|
|
339
339
|
children: h
|
|
340
|
-
}), U =
|
|
340
|
+
}), U = p || "";
|
|
341
341
|
return /* @__PURE__ */ H(ro, {
|
|
342
|
-
ownerState:
|
|
343
|
-
className: O(e.className,
|
|
342
|
+
ownerState: B,
|
|
343
|
+
className: O(e.className, v.root, P, U),
|
|
344
344
|
component: w,
|
|
345
345
|
disabled: m,
|
|
346
346
|
focusRipple: !C,
|
|
347
|
-
focusVisibleClassName: O(
|
|
348
|
-
ref:
|
|
347
|
+
focusVisibleClassName: O(v.focusVisible, V),
|
|
348
|
+
ref: n,
|
|
349
349
|
type: k,
|
|
350
350
|
...G,
|
|
351
|
-
classes:
|
|
352
|
-
children: [L,
|
|
351
|
+
classes: v,
|
|
352
|
+
children: [L, s, D]
|
|
353
353
|
});
|
|
354
354
|
});
|
|
355
355
|
process.env.NODE_ENV !== "production" && (T.propTypes = {
|
|
@@ -446,7 +446,7 @@ process.env.NODE_ENV !== "production" && (T.propTypes = {
|
|
|
446
446
|
*/
|
|
447
447
|
variant: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
|
|
448
448
|
});
|
|
449
|
-
const
|
|
449
|
+
const $ = c(T)`
|
|
450
450
|
text-transform: none;
|
|
451
451
|
&:disabled {
|
|
452
452
|
opacity: 0.5;
|
|
@@ -455,7 +455,7 @@ const B = c(T)`
|
|
|
455
455
|
justify-content: center;
|
|
456
456
|
align-items: center;
|
|
457
457
|
}
|
|
458
|
-
`, eo = c(
|
|
458
|
+
`, eo = c($)`
|
|
459
459
|
background-color: ${r.colors.green};
|
|
460
460
|
border-radius: 0;
|
|
461
461
|
height: 2.5rem;
|
|
@@ -475,12 +475,12 @@ const B = c(T)`
|
|
|
475
475
|
&:disabled {
|
|
476
476
|
background-color: ${r.colors.darkGreen};
|
|
477
477
|
}
|
|
478
|
-
`, io = c(
|
|
478
|
+
`, io = c($)`
|
|
479
479
|
color: ${r.colors.black};
|
|
480
480
|
border: 3px solid ${r.colors.blue};
|
|
481
481
|
padding: 0.5rem 2rem;
|
|
482
|
-
`, z = c(
|
|
483
|
-
...
|
|
482
|
+
`, z = c($)(({ width: o = "114px" }) => ({
|
|
483
|
+
...f`
|
|
484
484
|
box-sizing: border-box;
|
|
485
485
|
background-color: ${r.colors.bibiBlue};
|
|
486
486
|
border-radius: 0;
|
|
@@ -498,7 +498,7 @@ const B = c(T)`
|
|
|
498
498
|
}
|
|
499
499
|
`
|
|
500
500
|
})), so = c(z)(({ active: o }) => ({
|
|
501
|
-
...
|
|
501
|
+
...f`
|
|
502
502
|
background-color: ${o && r.colors.white};
|
|
503
503
|
color: ${o && r.colors.bibiBlue};
|
|
504
504
|
&:hover,
|
|
@@ -508,7 +508,7 @@ const B = c(T)`
|
|
|
508
508
|
}
|
|
509
509
|
`
|
|
510
510
|
})), lo = c(z)(() => ({
|
|
511
|
-
...
|
|
511
|
+
...f`
|
|
512
512
|
background-color: ${r.colors.white};
|
|
513
513
|
color: ${r.colors.bibiBlue};
|
|
514
514
|
&:hover,
|
|
@@ -522,31 +522,34 @@ const B = c(T)`
|
|
|
522
522
|
border-radius: 8px;
|
|
523
523
|
`, po = c(S, {
|
|
524
524
|
shouldForwardProp: (o) => typeof o == "string" && Z(o)
|
|
525
|
-
})(
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
525
|
+
})(
|
|
526
|
+
({ size: o, color: a, highlightColor: n, hoverColor: e }) => ({
|
|
527
|
+
...f`
|
|
528
|
+
display: flex;
|
|
529
|
+
align-items: center;
|
|
530
|
+
justify-content: center;
|
|
531
|
+
background-color: transparent;
|
|
532
|
+
transition: 313ms all ease-in-out;
|
|
532
533
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
534
|
+
&:hover,
|
|
535
|
+
:focus-visible {
|
|
536
|
+
svg {
|
|
537
|
+
filter: drop-shadow(0 0 6px ${n}) drop-shadow(0 0 6px ${n})
|
|
538
|
+
drop-shadow(0 0 6px ${n}) drop-shadow(0 0 6px ${n});
|
|
539
|
+
fill: ${e || a};
|
|
540
|
+
}
|
|
538
541
|
}
|
|
539
|
-
}
|
|
540
542
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
})
|
|
549
|
-
|
|
543
|
+
svg {
|
|
544
|
+
transition: 313ms all ease-in-out;
|
|
545
|
+
fill: ${a};
|
|
546
|
+
width: ${o}px;
|
|
547
|
+
height: ${o}px;
|
|
548
|
+
}
|
|
549
|
+
`
|
|
550
|
+
})
|
|
551
|
+
), uo = c($)(({ active: o }) => ({
|
|
552
|
+
...f`
|
|
550
553
|
box-sizing: border-box;
|
|
551
554
|
background-color: ${o ? r.colors.black : r.colors.white};
|
|
552
555
|
height: 28px;
|
|
@@ -566,13 +569,14 @@ const B = c(T)`
|
|
|
566
569
|
`
|
|
567
570
|
})), So = ({
|
|
568
571
|
variant: o = 1,
|
|
569
|
-
size:
|
|
570
|
-
color:
|
|
572
|
+
size: a = 50,
|
|
573
|
+
color: n = r.colors.darkGreen,
|
|
571
574
|
highlightColor: e = r.colors.dandelion,
|
|
575
|
+
hoverColor: p = r.colors.green,
|
|
572
576
|
children: i,
|
|
573
|
-
active:
|
|
577
|
+
active: u,
|
|
574
578
|
...s
|
|
575
|
-
}) => o === "bibi" ? /* @__PURE__ */ l(z, { ...s, children: i }) : o === "bibiOutlined" ? /* @__PURE__ */ l(so, { ...s, children: i }) : o === "bibiInverse" ? /* @__PURE__ */ l(lo, { ...s, children: i }) : o === "unstyled" ? /* @__PURE__ */ l(co, { ...s, children: i }) : o === 2 ? /* @__PURE__ */ l(io, { ...s, children: /* @__PURE__ */ l("span", { children: i }) }) : o === "icon" ? /* @__PURE__ */ l(po, { className: "jcIconButton", ...{ size:
|
|
579
|
+
}) => o === "bibi" ? /* @__PURE__ */ l(z, { ...s, children: i }) : o === "bibiOutlined" ? /* @__PURE__ */ l(so, { ...s, children: i }) : o === "bibiInverse" ? /* @__PURE__ */ l(lo, { ...s, children: i }) : o === "unstyled" ? /* @__PURE__ */ l(co, { ...s, children: i }) : o === 2 ? /* @__PURE__ */ l(io, { ...s, children: /* @__PURE__ */ l("span", { children: i }) }) : o === "icon" ? /* @__PURE__ */ l(po, { className: "jcIconButton", ...{ size: a, color: n, highlightColor: e }, ...s, children: i }) : o === "filter" ? /* @__PURE__ */ l(uo, { className: "jcFilterButton", active: u, ...s, children: i }) : /* @__PURE__ */ l(eo, { ...s, children: /* @__PURE__ */ l("span", { children: i }) });
|
|
576
580
|
export {
|
|
577
581
|
So as Button,
|
|
578
582
|
So as default
|
|
@@ -15,6 +15,7 @@ export type FormFieldsProps = {
|
|
|
15
15
|
columnsOverride?: string;
|
|
16
16
|
gap?: number;
|
|
17
17
|
noLabel?: boolean;
|
|
18
|
+
checkboxContainer?: boolean;
|
|
18
19
|
formDefaults: Record<string, any>;
|
|
19
20
|
onChange: (key: string, e: React.ChangeEvent<HTMLInputElement>, type?: string) => void;
|
|
20
21
|
};
|
package/FormFields/FormFields.js
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { FormInput as
|
|
3
|
-
import { FormSectionTitle as
|
|
4
|
-
import
|
|
5
|
-
import { u as
|
|
6
|
-
const
|
|
1
|
+
import { jsxs as g, Fragment as j, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { FormInput as C } from "../FormInput/FormInput.js";
|
|
3
|
+
import { FormSectionTitle as D, FormFieldGrid as S, FormFieldCheckboxContainer as b } from "../FormComponents/FormComponents.js";
|
|
4
|
+
import z from "../theme.js";
|
|
5
|
+
import { u as G } from "../.chunks/useMediaQuery.js";
|
|
6
|
+
const $ = ({
|
|
7
7
|
title: i,
|
|
8
|
-
fields:
|
|
9
|
-
columns:
|
|
8
|
+
fields: d,
|
|
9
|
+
columns: s = G(`(max-width: ${z.screenSizes.tablet})`) ? 2 : 3,
|
|
10
10
|
columnsOverride: u,
|
|
11
11
|
gap: a = 21,
|
|
12
|
-
noLabel:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
12
|
+
noLabel: F = !1,
|
|
13
|
+
checkboxContainer: m = !1,
|
|
14
|
+
formDefaults: t,
|
|
15
|
+
onChange: p
|
|
16
|
+
}) => {
|
|
17
|
+
const n = () => d.map(({ key: o, label: c, type: e, limit: f, options: h, defaultValue: l }) => {
|
|
18
|
+
const x = t[o] ? t[o] : l || (e === "multiDropdown" ? [] : "");
|
|
19
|
+
return /* @__PURE__ */ r(
|
|
20
|
+
C,
|
|
21
21
|
{
|
|
22
|
-
onChange: (
|
|
23
|
-
label:
|
|
24
|
-
type:
|
|
25
|
-
limit:
|
|
26
|
-
defaultValue:
|
|
27
|
-
noLabel:
|
|
28
|
-
options:
|
|
29
|
-
multiple:
|
|
22
|
+
onChange: (w) => p(o, w, e),
|
|
23
|
+
label: c,
|
|
24
|
+
type: e,
|
|
25
|
+
limit: f,
|
|
26
|
+
defaultValue: x,
|
|
27
|
+
noLabel: F,
|
|
28
|
+
options: h,
|
|
29
|
+
multiple: e === "multiDropdown"
|
|
30
30
|
},
|
|
31
|
-
|
|
31
|
+
o
|
|
32
32
|
);
|
|
33
|
-
})
|
|
34
|
-
|
|
33
|
+
});
|
|
34
|
+
return /* @__PURE__ */ g(j, { children: [
|
|
35
|
+
i && /* @__PURE__ */ r(D, { children: i }),
|
|
36
|
+
!m && /* @__PURE__ */ r(S, { columns: s, columnsOverride: u, gap: a, children: /* @__PURE__ */ r(n, {}) }),
|
|
37
|
+
m && /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(n, {}) })
|
|
38
|
+
] });
|
|
39
|
+
};
|
|
35
40
|
export {
|
|
36
|
-
|
|
41
|
+
$ as default
|
|
37
42
|
};
|
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.277",
|
|
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",
|