jcicl 0.0.132 → 0.0.135
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/AppContainer/AppContainer.d.ts +1 -1
- package/AppContainer/AppContainer.js +46 -47
- package/AppHeader/AppHeader.d.ts +2 -0
- package/AppHeader/AppHeader.js +73 -65
- package/Button/Button.d.ts +2 -1
- package/Button/Button.js +111 -93
- package/Flex/Flex.js +12 -11
- package/README.md +106 -106
- package/Search/Search.d.ts +3 -3
- package/Search/Search.js +127 -63
- package/Search/index.d.ts +1 -1
- package/package.json +1 -1
package/Button/Button.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { jsxs as H, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as g from "react";
|
|
3
|
-
import { g as _, a as A, s as
|
|
3
|
+
import { g as _, a as A, s as c, r as q, c as d, f as J, u as K, b as O, P as t, d as Q, e as v } 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
|
|
9
|
-
import
|
|
8
|
+
import { c as x } from "../.chunks/emotion-react.browser.esm.js";
|
|
9
|
+
import r from "../theme.js";
|
|
10
10
|
function oo(o) {
|
|
11
11
|
return _("MuiButton", o);
|
|
12
12
|
}
|
|
13
13
|
const u = 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__ */ g.createContext({});
|
|
14
14
|
process.env.NODE_ENV !== "production" && (R.displayName = "ButtonGroupContext");
|
|
15
|
-
const
|
|
16
|
-
process.env.NODE_ENV !== "production" && (
|
|
15
|
+
const N = /* @__PURE__ */ g.createContext(void 0);
|
|
16
|
+
process.env.NODE_ENV !== "production" && (N.displayName = "ButtonGroupButtonContext");
|
|
17
17
|
const to = (o) => {
|
|
18
18
|
const {
|
|
19
|
-
color:
|
|
20
|
-
disableElevation:
|
|
19
|
+
color: n,
|
|
20
|
+
disableElevation: a,
|
|
21
21
|
fullWidth: e,
|
|
22
22
|
size: i,
|
|
23
|
-
variant:
|
|
24
|
-
classes:
|
|
25
|
-
} = o,
|
|
26
|
-
root: ["root",
|
|
23
|
+
variant: p,
|
|
24
|
+
classes: s
|
|
25
|
+
} = o, f = {
|
|
26
|
+
root: ["root", p, `${p}${d(n)}`, `size${d(i)}`, `${p}Size${d(i)}`, `color${d(n)}`, a && "disableElevation", e && "fullWidth"],
|
|
27
27
|
label: ["label"],
|
|
28
|
-
startIcon: ["icon", "startIcon", `iconSize${
|
|
29
|
-
endIcon: ["icon", "endIcon", `iconSize${
|
|
30
|
-
},
|
|
28
|
+
startIcon: ["icon", "startIcon", `iconSize${d(i)}`],
|
|
29
|
+
endIcon: ["icon", "endIcon", `iconSize${d(i)}`]
|
|
30
|
+
}, $ = Q(f, oo, s);
|
|
31
31
|
return {
|
|
32
|
-
...
|
|
32
|
+
...s,
|
|
33
33
|
// forward the focused, disabled, etc. classes to the ButtonBase
|
|
34
|
-
|
|
34
|
+
...$
|
|
35
35
|
};
|
|
36
|
-
},
|
|
36
|
+
}, E = [{
|
|
37
37
|
props: {
|
|
38
38
|
size: "small"
|
|
39
39
|
},
|
|
@@ -60,20 +60,20 @@ const to = (o) => {
|
|
|
60
60
|
fontSize: 22
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
}], ro =
|
|
63
|
+
}], ro = c(S, {
|
|
64
64
|
shouldForwardProp: (o) => q(o) || o === "classes",
|
|
65
65
|
name: "MuiButton",
|
|
66
66
|
slot: "Root",
|
|
67
|
-
overridesResolver: (o,
|
|
67
|
+
overridesResolver: (o, n) => {
|
|
68
68
|
const {
|
|
69
|
-
ownerState:
|
|
69
|
+
ownerState: a
|
|
70
70
|
} = o;
|
|
71
|
-
return [
|
|
71
|
+
return [n.root, n[a.variant], n[`${a.variant}${d(a.color)}`], n[`size${d(a.size)}`], n[`${a.variant}Size${d(a.size)}`], a.color === "inherit" && n.colorInherit, a.disableElevation && n.disableElevation, a.fullWidth && n.fullWidth];
|
|
72
72
|
}
|
|
73
73
|
})(X(({
|
|
74
74
|
theme: o
|
|
75
75
|
}) => {
|
|
76
|
-
const
|
|
76
|
+
const n = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], a = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
|
|
77
77
|
return {
|
|
78
78
|
...o.typography.button,
|
|
79
79
|
minWidth: 64,
|
|
@@ -165,10 +165,10 @@ 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 : n,
|
|
169
169
|
"@media (hover: hover)": {
|
|
170
170
|
"&:hover": {
|
|
171
|
-
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg :
|
|
171
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg : a,
|
|
172
172
|
"--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : v(o.palette.text.primary, o.palette.action.hoverOpacity),
|
|
173
173
|
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : v(o.palette.text.primary, o.palette.action.hoverOpacity)
|
|
174
174
|
}
|
|
@@ -256,14 +256,14 @@ const to = (o) => {
|
|
|
256
256
|
}
|
|
257
257
|
}]
|
|
258
258
|
};
|
|
259
|
-
})), ao =
|
|
259
|
+
})), ao = c("span", {
|
|
260
260
|
name: "MuiButton",
|
|
261
261
|
slot: "StartIcon",
|
|
262
|
-
overridesResolver: (o,
|
|
262
|
+
overridesResolver: (o, n) => {
|
|
263
263
|
const {
|
|
264
|
-
ownerState:
|
|
264
|
+
ownerState: a
|
|
265
265
|
} = o;
|
|
266
|
-
return [
|
|
266
|
+
return [n.startIcon, n[`iconSize${d(a.size)}`]];
|
|
267
267
|
}
|
|
268
268
|
})({
|
|
269
269
|
display: "inherit",
|
|
@@ -276,15 +276,15 @@ const to = (o) => {
|
|
|
276
276
|
style: {
|
|
277
277
|
marginLeft: -2
|
|
278
278
|
}
|
|
279
|
-
}, ...
|
|
280
|
-
}), no =
|
|
279
|
+
}, ...E]
|
|
280
|
+
}), no = c("span", {
|
|
281
281
|
name: "MuiButton",
|
|
282
282
|
slot: "EndIcon",
|
|
283
|
-
overridesResolver: (o,
|
|
283
|
+
overridesResolver: (o, n) => {
|
|
284
284
|
const {
|
|
285
|
-
ownerState:
|
|
285
|
+
ownerState: a
|
|
286
286
|
} = o;
|
|
287
|
-
return [
|
|
287
|
+
return [n.endIcon, n[`iconSize${d(a.size)}`]];
|
|
288
288
|
}
|
|
289
289
|
})({
|
|
290
290
|
display: "inherit",
|
|
@@ -297,14 +297,14 @@ const to = (o) => {
|
|
|
297
297
|
style: {
|
|
298
298
|
marginRight: -2
|
|
299
299
|
}
|
|
300
|
-
}, ...
|
|
301
|
-
}), T = /* @__PURE__ */ g.forwardRef(function(
|
|
302
|
-
const e = g.useContext(R), i = g.useContext(
|
|
303
|
-
props:
|
|
300
|
+
}, ...E]
|
|
301
|
+
}), T = /* @__PURE__ */ g.forwardRef(function(n, a) {
|
|
302
|
+
const e = g.useContext(R), i = g.useContext(N), p = J(e, n), s = K({
|
|
303
|
+
props: p,
|
|
304
304
|
name: "MuiButton"
|
|
305
305
|
}), {
|
|
306
|
-
children:
|
|
307
|
-
color:
|
|
306
|
+
children: f,
|
|
307
|
+
color: $ = "primary",
|
|
308
308
|
component: w = "button",
|
|
309
309
|
className: P,
|
|
310
310
|
disabled: m = !1,
|
|
@@ -316,11 +316,11 @@ const to = (o) => {
|
|
|
316
316
|
size: j = "medium",
|
|
317
317
|
startIcon: I,
|
|
318
318
|
type: k,
|
|
319
|
-
variant:
|
|
320
|
-
...
|
|
321
|
-
} =
|
|
322
|
-
...
|
|
323
|
-
color:
|
|
319
|
+
variant: F = "text",
|
|
320
|
+
...G
|
|
321
|
+
} = s, y = {
|
|
322
|
+
...s,
|
|
323
|
+
color: $,
|
|
324
324
|
component: w,
|
|
325
325
|
disabled: m,
|
|
326
326
|
disableElevation: W,
|
|
@@ -328,28 +328,28 @@ const to = (o) => {
|
|
|
328
328
|
fullWidth: M,
|
|
329
329
|
size: j,
|
|
330
330
|
type: k,
|
|
331
|
-
variant:
|
|
332
|
-
}, b = to(
|
|
331
|
+
variant: F
|
|
332
|
+
}, b = to(y), L = I && /* @__PURE__ */ l(ao, {
|
|
333
333
|
className: b.startIcon,
|
|
334
|
-
ownerState:
|
|
334
|
+
ownerState: y,
|
|
335
335
|
children: I
|
|
336
336
|
}), D = h && /* @__PURE__ */ l(no, {
|
|
337
337
|
className: b.endIcon,
|
|
338
|
-
ownerState:
|
|
338
|
+
ownerState: y,
|
|
339
339
|
children: h
|
|
340
340
|
}), U = i || "";
|
|
341
341
|
return /* @__PURE__ */ H(ro, {
|
|
342
|
-
ownerState:
|
|
342
|
+
ownerState: y,
|
|
343
343
|
className: O(e.className, b.root, P, U),
|
|
344
344
|
component: w,
|
|
345
345
|
disabled: m,
|
|
346
346
|
focusRipple: !C,
|
|
347
347
|
focusVisibleClassName: O(b.focusVisible, V),
|
|
348
|
-
ref:
|
|
348
|
+
ref: a,
|
|
349
349
|
type: k,
|
|
350
|
-
...
|
|
350
|
+
...G,
|
|
351
351
|
classes: b,
|
|
352
|
-
children: [
|
|
352
|
+
children: [L, f, D]
|
|
353
353
|
});
|
|
354
354
|
});
|
|
355
355
|
process.env.NODE_ENV !== "production" && (T.propTypes = {
|
|
@@ -446,84 +446,84 @@ 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 B = c(T)`
|
|
450
450
|
text-transform: none;
|
|
451
451
|
&:disabled {
|
|
452
452
|
opacity: 0.5;
|
|
453
|
-
color: ${
|
|
453
|
+
color: ${r.colors.black};
|
|
454
454
|
display: flex;
|
|
455
455
|
justify-content: center;
|
|
456
456
|
align-items: center;
|
|
457
457
|
}
|
|
458
|
-
`, eo =
|
|
459
|
-
background-color: ${
|
|
458
|
+
`, eo = c(B)`
|
|
459
|
+
background-color: ${r.colors.green};
|
|
460
460
|
border-radius: 0;
|
|
461
461
|
height: 2.5rem;
|
|
462
462
|
border: 2px solid transparent;
|
|
463
|
-
color: ${
|
|
463
|
+
color: ${r.colors.white};
|
|
464
464
|
transition: 313ms all ease-in;
|
|
465
465
|
border-radius: 32px;
|
|
466
466
|
font-weight: 400;
|
|
467
467
|
padding: 0.75rem 2rem;
|
|
468
468
|
font-size: 1rem;
|
|
469
|
-
box-shadow: ${
|
|
469
|
+
box-shadow: ${r.boxShadows.gray63};
|
|
470
470
|
&:hover,
|
|
471
471
|
:focus-visible {
|
|
472
|
-
background-color: ${
|
|
473
|
-
box-shadow: ${
|
|
472
|
+
background-color: ${r.colors.darkGreen};
|
|
473
|
+
box-shadow: ${r.boxShadows.black63};
|
|
474
474
|
}
|
|
475
475
|
&:disabled {
|
|
476
|
-
background-color: ${
|
|
476
|
+
background-color: ${r.colors.darkGreen};
|
|
477
477
|
}
|
|
478
|
-
`, io =
|
|
479
|
-
color: ${
|
|
480
|
-
border: 3px solid ${
|
|
478
|
+
`, io = c(B)`
|
|
479
|
+
color: ${r.colors.black};
|
|
480
|
+
border: 3px solid ${r.colors.blue};
|
|
481
481
|
padding: 0.5rem 2rem;
|
|
482
|
-
`, z =
|
|
483
|
-
...
|
|
482
|
+
`, z = c(B)(({ width: o = "114px" }) => ({
|
|
483
|
+
...x`
|
|
484
484
|
box-sizing: border-box;
|
|
485
|
-
background-color: ${
|
|
485
|
+
background-color: ${r.colors.bibiBlue};
|
|
486
486
|
border-radius: 0;
|
|
487
487
|
height: 47px;
|
|
488
488
|
width: ${o};
|
|
489
489
|
border: 2px solid transparent;
|
|
490
|
-
color: ${
|
|
490
|
+
color: ${r.colors.white};
|
|
491
491
|
transition: 108ms all ease-in;
|
|
492
492
|
font-weight: 500;
|
|
493
493
|
padding: 0;
|
|
494
494
|
font-size: 19px;
|
|
495
495
|
&:hover,
|
|
496
496
|
:focus-visible {
|
|
497
|
-
background-color: ${
|
|
497
|
+
background-color: ${r.colors.bibiBlueHover};
|
|
498
498
|
}
|
|
499
499
|
`
|
|
500
|
-
})), so =
|
|
501
|
-
...
|
|
502
|
-
background-color: ${o &&
|
|
503
|
-
color: ${o &&
|
|
500
|
+
})), so = c(z)(({ active: o }) => ({
|
|
501
|
+
...x`
|
|
502
|
+
background-color: ${o && r.colors.white};
|
|
503
|
+
color: ${o && r.colors.bibiBlue};
|
|
504
504
|
&:hover,
|
|
505
505
|
:focus-visible {
|
|
506
|
-
background-color: ${
|
|
507
|
-
color: ${
|
|
506
|
+
background-color: ${r.colors.white};
|
|
507
|
+
color: ${r.colors.bibiBlue};
|
|
508
508
|
}
|
|
509
509
|
`
|
|
510
|
-
})), lo =
|
|
511
|
-
...
|
|
512
|
-
background-color: ${
|
|
513
|
-
color: ${
|
|
510
|
+
})), lo = c(z)(() => ({
|
|
511
|
+
...x`
|
|
512
|
+
background-color: ${r.colors.white};
|
|
513
|
+
color: ${r.colors.bibiBlue};
|
|
514
514
|
&:hover,
|
|
515
515
|
:focus-visible {
|
|
516
|
-
background-color: ${
|
|
517
|
-
border: 2px solid ${
|
|
518
|
-
color: ${
|
|
516
|
+
background-color: ${r.colors.bibiBlue};
|
|
517
|
+
border: 2px solid ${r.colors.white};
|
|
518
|
+
color: ${r.colors.white};
|
|
519
519
|
}
|
|
520
520
|
`
|
|
521
|
-
})), co =
|
|
521
|
+
})), co = c(S)`
|
|
522
522
|
border-radius: 8px;
|
|
523
|
-
`, po =
|
|
523
|
+
`, po = c(S, {
|
|
524
524
|
shouldForwardProp: (o) => typeof o == "string" && Z(o)
|
|
525
|
-
})(({ size: o, color:
|
|
526
|
-
...
|
|
525
|
+
})(({ size: o, color: n, highlightColor: a }) => ({
|
|
526
|
+
...x`
|
|
527
527
|
display: flex;
|
|
528
528
|
align-items: center;
|
|
529
529
|
justify-content: center;
|
|
@@ -533,26 +533,44 @@ const $ = d(T)`
|
|
|
533
533
|
&:hover,
|
|
534
534
|
:focus-visible {
|
|
535
535
|
svg {
|
|
536
|
-
filter: drop-shadow(0 0 6px ${
|
|
537
|
-
drop-shadow(0 0 6px ${
|
|
536
|
+
filter: drop-shadow(0 0 6px ${a}) drop-shadow(0 0 6px ${a})
|
|
537
|
+
drop-shadow(0 0 6px ${a}) drop-shadow(0 0 6px ${a});
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
svg {
|
|
542
542
|
transition: 313ms all ease-in-out;
|
|
543
|
-
fill: ${
|
|
543
|
+
fill: ${n};
|
|
544
544
|
width: ${o}px;
|
|
545
545
|
height: ${o}px;
|
|
546
546
|
}
|
|
547
547
|
`
|
|
548
|
+
})), uo = c(B)(({ active: o }) => ({
|
|
549
|
+
...x`
|
|
550
|
+
box-sizing: border-box;
|
|
551
|
+
background-color: ${o ? r.colors.black : r.colors.white};
|
|
552
|
+
height: 28px;
|
|
553
|
+
border-radius: 18px;
|
|
554
|
+
padding: 0 29px;
|
|
555
|
+
border: 2px solid ${o ? "transparent" : r.colors.black};
|
|
556
|
+
color: ${o ? r.colors.white : r.colors.black};
|
|
557
|
+
transition: 108ms all ease-in;
|
|
558
|
+
font-weight: 500;
|
|
559
|
+
|
|
560
|
+
&:hover,
|
|
561
|
+
:focus-visible {
|
|
562
|
+
background-color: ${o ? r.colors.charcoal : r.colors.gray2};
|
|
563
|
+
}
|
|
564
|
+
`
|
|
548
565
|
})), So = ({
|
|
549
566
|
variant: o = 1,
|
|
550
|
-
size:
|
|
551
|
-
color:
|
|
552
|
-
highlightColor: e =
|
|
567
|
+
size: n = 50,
|
|
568
|
+
color: a = r.colors.darkGreen,
|
|
569
|
+
highlightColor: e = r.colors.dandelion,
|
|
553
570
|
children: i,
|
|
571
|
+
active: p,
|
|
554
572
|
...s
|
|
555
|
-
}) => 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: "
|
|
573
|
+
}) => 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: n, color: a, highlightColor: e }, ...s, children: i }) : o === "filter" ? /* @__PURE__ */ l(uo, { className: "jcFilterButton", active: p, ...s, children: i }) : /* @__PURE__ */ l(eo, { ...s, children: /* @__PURE__ */ l("span", { children: i }) });
|
|
556
574
|
export {
|
|
557
575
|
So as Button,
|
|
558
576
|
So as default
|
package/Flex/Flex.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { n as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { n as d, i as m } from "../.chunks/emotion-styled.browser.esm.js";
|
|
3
|
+
const p = d("div", {
|
|
4
4
|
shouldForwardProp: (o) => m(o) && typeof o == "string" && o !== "wrap"
|
|
5
5
|
})(
|
|
6
|
-
({ column: o, alignItems: r, justifyContent: a, wrap:
|
|
6
|
+
({ column: o, alignItems: r, justifyContent: a, wrap: e, width: i, height: s, styles: n, padding: t, gap: l, placeContent: f }) => ({
|
|
7
|
+
boxSizing: "border-box",
|
|
7
8
|
display: "flex",
|
|
8
9
|
flexDirection: o ? "column" : "row",
|
|
9
|
-
flexWrap:
|
|
10
|
+
flexWrap: e ? "wrap" : "nowrap",
|
|
10
11
|
alignItems: r,
|
|
11
12
|
justifyContent: a,
|
|
12
13
|
placeContent: f,
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
14
|
+
width: i,
|
|
15
|
+
height: s,
|
|
15
16
|
gap: l,
|
|
16
|
-
padding:
|
|
17
|
+
padding: t,
|
|
17
18
|
fontFamily: "Roboto, sans-serif",
|
|
18
19
|
...n
|
|
19
20
|
})
|
|
20
|
-
),
|
|
21
|
+
), b = ({ children: o, ...r }) => /* @__PURE__ */ x(p, { className: "jcFlex", ...r, children: o });
|
|
21
22
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
b as Flex,
|
|
24
|
+
b as default
|
|
24
25
|
};
|
package/README.md
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
# Welcome to the Johnson County Component Library!
|
|
2
|
-
|
|
3
|
-
## Quick Start
|
|
4
|
-
|
|
5
|
-
### Runtime Enviromnent
|
|
6
|
-
|
|
7
|
-
1. Please download and install [NVM for Windows](https://github.com/coreybutler/nvm-windows?tab=readme-ov-file)
|
|
8
|
-
2. `nvm install 22.11.0`
|
|
9
|
-
3. `nvm use 22`
|
|
10
|
-
|
|
11
|
-
### Usage
|
|
12
|
-
|
|
13
|
-
`npm install jcicl@latest`
|
|
14
|
-
|
|
15
|
-
```js
|
|
16
|
-
import Button, { ButtonProps } from 'jcicl/Button';
|
|
17
|
-
import Nav, { NavProps } from 'jcicl/Nav';
|
|
18
|
-
|
|
19
|
-
const Component: React.FC<ButtonProps> = ({ ...buttonProps }) => <Button {...buttonProps}>Johnson County Button</Button>;
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### Adding the fonts and scrollbar styles
|
|
23
|
-
|
|
24
|
-
In your project entry point (most likely `main.tsx`), add:
|
|
25
|
-
|
|
26
|
-
```js
|
|
27
|
-
import '@fontsource/roboto/300.css';
|
|
28
|
-
import '@fontsource/roboto/400.css';
|
|
29
|
-
import '@fontsource/roboto/500.css';
|
|
30
|
-
import '@fontsource/roboto/700.css';
|
|
31
|
-
import '@fontsource/material-icons';
|
|
32
|
-
import 'overlayscrollbars/overlayscrollbars.css';
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
Alternatively, add to project root `index.html` `<head />`:
|
|
36
|
-
|
|
37
|
-
```html
|
|
38
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
39
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
40
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" />
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
#### Viewing Storybook Documentation
|
|
44
|
-
|
|
45
|
-
We are using [Storybook](https://storybook.js.org/docs/get-started/frameworks/react-vite?renderer=react) to document our component library
|
|
46
|
-
|
|
47
|
-
Please use `npm run storybook` or `npm start` from the root directory to start the storybook application. You can see helpful documentation links under the `Configure your project` section of the Storybook application.
|
|
48
|
-
|
|
49
|
-
## Development
|
|
50
|
-
|
|
51
|
-
### Getting started
|
|
52
|
-
|
|
53
|
-
[Please ensure your react development environment is set up](https://devops.jc.net/JCIT/Business%20Solutions%20Delivery/_wiki/wikis/Business-Solutions-Delivery.wiki?wikiVersion=GBwikiMaster&pagePath=%2FSetting%20Up%20React&pageId=219).
|
|
54
|
-
|
|
55
|
-
From the root project directory, please run `npm install`
|
|
56
|
-
|
|
57
|
-
### Dependencies
|
|
58
|
-
|
|
59
|
-
For this component library, we are extending [Material UI](https://mui.com/material-ui/getting-started/) and customizing with [Emotion/Styled](https://emotion.sh/docs/styled)
|
|
60
|
-
|
|
61
|
-
### Components Directory Structure
|
|
62
|
-
|
|
63
|
-
In each components folder, you should see a `[Component].stories.tsx` file. You can copy the established pattern to create stories for new components, or customize as you please according to the above documentation
|
|
64
|
-
|
|
65
|
-
#### Base
|
|
66
|
-
|
|
67
|
-
Base components are intended to be the foundational building blocks of our web pages here at Johnson County
|
|
68
|
-
|
|
69
|
-
#### Composite
|
|
70
|
-
|
|
71
|
-
Composite components are intended to be reusable chunks of HTML built from base components and complimentary TSX (TypeScript XML)
|
|
72
|
-
|
|
73
|
-
#### Superomposite
|
|
74
|
-
|
|
75
|
-
Composite with a higher level of complexity
|
|
76
|
-
|
|
77
|
-
#### Templates
|
|
78
|
-
|
|
79
|
-
Templates are intended to render the HTML for predefined page layouts comprised of composite components, base components, and complimentary TSX
|
|
80
|
-
|
|
81
|
-
#### **All of the above component types are inteded to be importable and reusable throughout the suite of Johnson County web applications** 😊
|
|
82
|
-
|
|
83
|
-
### Process
|
|
84
|
-
|
|
85
|
-
1. Add or update any components you wish. For new components, please create the associated `[NewComponent].stories.tsx` file to allow for documentation. In `.storybook/main.ts`, we are using the default string matching pattern to automatically index `*.stories.*` files 😊
|
|
86
|
-
2. Export any newly created components in the relevant index files: `(base/(super)composite/templates)/[NewComponent]/index.ts` and `components/index.ts`.
|
|
87
|
-
3. Export any newly created types for the component from `(base/(super)composite/templates)/[NewComponent]/index.ts`
|
|
88
|
-
4. Publish the library and update relevant project dependencies
|
|
89
|
-
|
|
90
|
-
### Publishing the library
|
|
91
|
-
|
|
92
|
-
The library will automatically publish a new minor version on merges to master. If you need to manually publish a new version:
|
|
93
|
-
|
|
94
|
-
`npm run bp`
|
|
95
|
-
|
|
96
|
-
- Creates a new minor version (`0.0.x`), builds, and publishes the library to the npm registry
|
|
97
|
-
|
|
98
|
-
`npm run bpMinor` for minor versions (`0.x.0`), and `npm run bpMajor` for major versions (`x.0.0`)
|
|
99
|
-
|
|
100
|
-
For more details on scripting commands, please see the [npm CLI documentation](https://docs.npmjs.com/cli/v9/commands)
|
|
101
|
-
|
|
102
|
-
### Deploying storybook
|
|
103
|
-
|
|
104
|
-
TODO: Automate
|
|
105
|
-
|
|
106
|
-
Build the library with `npm run storybook`, then copy all of the files in `storybook-static` into `windu\E:\ComponentLibrary`
|
|
1
|
+
# Welcome to the Johnson County Component Library!
|
|
2
|
+
|
|
3
|
+
## Quick Start
|
|
4
|
+
|
|
5
|
+
### Runtime Enviromnent
|
|
6
|
+
|
|
7
|
+
1. Please download and install [NVM for Windows](https://github.com/coreybutler/nvm-windows?tab=readme-ov-file)
|
|
8
|
+
2. `nvm install 22.11.0`
|
|
9
|
+
3. `nvm use 22`
|
|
10
|
+
|
|
11
|
+
### Usage
|
|
12
|
+
|
|
13
|
+
`npm install jcicl@latest`
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import Button, { ButtonProps } from 'jcicl/Button';
|
|
17
|
+
import Nav, { NavProps } from 'jcicl/Nav';
|
|
18
|
+
|
|
19
|
+
const Component: React.FC<ButtonProps> = ({ ...buttonProps }) => <Button {...buttonProps}>Johnson County Button</Button>;
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Adding the fonts and scrollbar styles
|
|
23
|
+
|
|
24
|
+
In your project entry point (most likely `main.tsx`), add:
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import '@fontsource/roboto/300.css';
|
|
28
|
+
import '@fontsource/roboto/400.css';
|
|
29
|
+
import '@fontsource/roboto/500.css';
|
|
30
|
+
import '@fontsource/roboto/700.css';
|
|
31
|
+
import '@fontsource/material-icons';
|
|
32
|
+
import 'overlayscrollbars/overlayscrollbars.css';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Alternatively, add to project root `index.html` `<head />`:
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
39
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
40
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" />
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
#### Viewing Storybook Documentation
|
|
44
|
+
|
|
45
|
+
We are using [Storybook](https://storybook.js.org/docs/get-started/frameworks/react-vite?renderer=react) to document our component library
|
|
46
|
+
|
|
47
|
+
Please use `npm run storybook` or `npm start` from the root directory to start the storybook application. You can see helpful documentation links under the `Configure your project` section of the Storybook application.
|
|
48
|
+
|
|
49
|
+
## Development
|
|
50
|
+
|
|
51
|
+
### Getting started
|
|
52
|
+
|
|
53
|
+
[Please ensure your react development environment is set up](https://devops.jc.net/JCIT/Business%20Solutions%20Delivery/_wiki/wikis/Business-Solutions-Delivery.wiki?wikiVersion=GBwikiMaster&pagePath=%2FSetting%20Up%20React&pageId=219).
|
|
54
|
+
|
|
55
|
+
From the root project directory, please run `npm install`
|
|
56
|
+
|
|
57
|
+
### Dependencies
|
|
58
|
+
|
|
59
|
+
For this component library, we are extending [Material UI](https://mui.com/material-ui/getting-started/) and customizing with [Emotion/Styled](https://emotion.sh/docs/styled)
|
|
60
|
+
|
|
61
|
+
### Components Directory Structure
|
|
62
|
+
|
|
63
|
+
In each components folder, you should see a `[Component].stories.tsx` file. You can copy the established pattern to create stories for new components, or customize as you please according to the above documentation
|
|
64
|
+
|
|
65
|
+
#### Base
|
|
66
|
+
|
|
67
|
+
Base components are intended to be the foundational building blocks of our web pages here at Johnson County
|
|
68
|
+
|
|
69
|
+
#### Composite
|
|
70
|
+
|
|
71
|
+
Composite components are intended to be reusable chunks of HTML built from base components and complimentary TSX (TypeScript XML)
|
|
72
|
+
|
|
73
|
+
#### Superomposite
|
|
74
|
+
|
|
75
|
+
Composite with a higher level of complexity
|
|
76
|
+
|
|
77
|
+
#### Templates
|
|
78
|
+
|
|
79
|
+
Templates are intended to render the HTML for predefined page layouts comprised of composite components, base components, and complimentary TSX
|
|
80
|
+
|
|
81
|
+
#### **All of the above component types are inteded to be importable and reusable throughout the suite of Johnson County web applications** 😊
|
|
82
|
+
|
|
83
|
+
### Process
|
|
84
|
+
|
|
85
|
+
1. Add or update any components you wish. For new components, please create the associated `[NewComponent].stories.tsx` file to allow for documentation. In `.storybook/main.ts`, we are using the default string matching pattern to automatically index `*.stories.*` files 😊
|
|
86
|
+
2. Export any newly created components in the relevant index files: `(base/(super)composite/templates)/[NewComponent]/index.ts` and `components/index.ts`.
|
|
87
|
+
3. Export any newly created types for the component from `(base/(super)composite/templates)/[NewComponent]/index.ts`
|
|
88
|
+
4. Publish the library and update relevant project dependencies
|
|
89
|
+
|
|
90
|
+
### Publishing the library
|
|
91
|
+
|
|
92
|
+
The library will automatically publish a new minor version on merges to master. If you need to manually publish a new version:
|
|
93
|
+
|
|
94
|
+
`npm run bp`
|
|
95
|
+
|
|
96
|
+
- Creates a new minor version (`0.0.x`), builds, and publishes the library to the npm registry
|
|
97
|
+
|
|
98
|
+
`npm run bpMinor` for minor versions (`0.x.0`), and `npm run bpMajor` for major versions (`x.0.0`)
|
|
99
|
+
|
|
100
|
+
For more details on scripting commands, please see the [npm CLI documentation](https://docs.npmjs.com/cli/v9/commands)
|
|
101
|
+
|
|
102
|
+
### Deploying storybook
|
|
103
|
+
|
|
104
|
+
TODO: Automate
|
|
105
|
+
|
|
106
|
+
Build the library with `npm run storybook`, then copy all of the files in `storybook-static` into `windu\E:\ComponentLibrary`
|
package/Search/Search.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TextFieldProps as MuiTextFieldProps } from '@mui/material/TextField';
|
|
2
|
-
export type
|
|
2
|
+
export type SearchFilterProps = {
|
|
3
3
|
name: string;
|
|
4
|
-
onClick:
|
|
4
|
+
onClick: () => void;
|
|
5
5
|
active?: boolean;
|
|
6
6
|
};
|
|
7
7
|
export type SearchProps = Omit<MuiTextFieldProps, 'variant'> & {
|
|
@@ -9,7 +9,7 @@ export type SearchProps = Omit<MuiTextFieldProps, 'variant'> & {
|
|
|
9
9
|
borderColor?: string;
|
|
10
10
|
borderFocusColor?: string;
|
|
11
11
|
onSearch: () => void;
|
|
12
|
-
filters?:
|
|
12
|
+
filters?: SearchFilterProps[];
|
|
13
13
|
};
|
|
14
14
|
export declare const Search: React.FC<SearchProps>;
|
|
15
15
|
export default Search;
|