jcicl 1.0.7 → 1.0.11
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/.chunks/DefaultPropsProvider.js +5 -5
- package/.chunks/Paper.js +1 -1
- package/.chunks/Popper.js +1 -1
- package/.chunks/Portal.js +205 -187
- package/.chunks/TextField.js +13 -15
- package/.chunks/check.js +11 -0
- package/.chunks/index.js +83 -6
- package/.chunks/useMediaQuery.js +1 -1
- package/.chunks/useSlot.js +1 -1
- package/.chunks/x.js +14 -0
- package/AppContainer/AppContainer.js +46 -47
- package/Button/Button.d.ts +2 -1
- package/Button/Button.js +251 -196
- package/CircularIconButton/CircularIconButton.js +5 -5
- package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.d.ts +2 -0
- package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.js +62 -66
- package/FormFields/FormFields.d.ts +1 -1
- package/FormFields/FormFields.js +52 -37
- package/LabeledDropdown/LabeledDropdown.js +4 -5
- package/Pill/Pill.d.ts +1 -0
- package/Pill/Pill.js +19 -12
- package/ScrollContainer/ScrollContainer.js +180 -179
- package/Stepper/Stepper.js +1 -1
- package/Table/Table.js +299 -268
- package/Toast/Toast.d.ts +8 -0
- package/Toast/Toast.js +155 -0
- package/Toast/ToastHelpers.d.ts +6 -0
- package/Toast/ToastHelpers.js +25 -0
- package/Toast/Toaster.d.ts +9 -0
- package/Toast/Toaster.js +25 -0
- package/Toast/index.d.ts +3 -0
- package/Toast/index.js +11 -0
- package/Tooltip/Tooltip.js +18 -20
- package/package.json +1 -1
- package/theme.d.ts +2 -0
- package/theme.js +11 -9
- package/utils.d.ts +1 -0
- package/utils.js +34 -15
- package/.chunks/resolveComponentProps.js +0 -80
- package/.chunks/useTheme.js +0 -23
package/Toast/Toast.d.ts
ADDED
package/Toast/Toast.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { jsx as n, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useEffect as u } from "react";
|
|
3
|
+
import { n as l } from "../.chunks/emotion-styled.browser.esm.js";
|
|
4
|
+
import { c as a } from "../.chunks/emotion-react.browser.esm.js";
|
|
5
|
+
import e from "../theme.js";
|
|
6
|
+
import { c as m } from "../.chunks/createLucideIcon.js";
|
|
7
|
+
import { C as w } from "../.chunks/check.js";
|
|
8
|
+
import { X as y } from "../.chunks/x.js";
|
|
9
|
+
/**
|
|
10
|
+
* @license lucide-react v0.525.0 - ISC
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the ISC license.
|
|
13
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
const x = [
|
|
16
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
17
|
+
["path", { d: "m4.9 4.9 14.2 14.2", key: "1m5liu" }]
|
|
18
|
+
], k = m("ban", x);
|
|
19
|
+
/**
|
|
20
|
+
* @license lucide-react v0.525.0 - ISC
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the ISC license.
|
|
23
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/
|
|
25
|
+
const b = [
|
|
26
|
+
[
|
|
27
|
+
"path",
|
|
28
|
+
{
|
|
29
|
+
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
30
|
+
key: "wmoenq"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
34
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
35
|
+
], $ = m("triangle-alert", b), T = l("div")(
|
|
36
|
+
({ backgroundColor: o, open: r }) => ({
|
|
37
|
+
...a`
|
|
38
|
+
background-color: ${o};
|
|
39
|
+
display: ${r ? "flex" : "none"} !important;
|
|
40
|
+
max-width: 400px;
|
|
41
|
+
font-family: ${e.fonts.roboto};
|
|
42
|
+
position: relative;
|
|
43
|
+
box-shadow: 3px 4px 4px 0 ${e.colors.gray3}80;
|
|
44
|
+
transition: opacity 0.3s ease;
|
|
45
|
+
align-content: center;
|
|
46
|
+
|
|
47
|
+
.close-button {
|
|
48
|
+
color: ${e.colors.charcoal};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.close-button:hover {
|
|
52
|
+
color: ${e.colors.gray3};
|
|
53
|
+
transition: stroke-width 0.3s ease;
|
|
54
|
+
stroke-width: 3;
|
|
55
|
+
}
|
|
56
|
+
`
|
|
57
|
+
})
|
|
58
|
+
), v = l("div")(({ backgroundColor: o }) => ({
|
|
59
|
+
...a`
|
|
60
|
+
display: flex;
|
|
61
|
+
background-color: ${o};
|
|
62
|
+
padding: 11px;
|
|
63
|
+
`
|
|
64
|
+
})), C = l("p")(() => ({
|
|
65
|
+
...a`
|
|
66
|
+
color: ${e.colors.charcoal};
|
|
67
|
+
font-size: 11pt;
|
|
68
|
+
padding: 12px 15px;
|
|
69
|
+
margin: 0;
|
|
70
|
+
line-height: 1.5;
|
|
71
|
+
min-width: 70px;
|
|
72
|
+
width: 100%;
|
|
73
|
+
`
|
|
74
|
+
})), S = l("div")(({ duration: o, color: r }) => ({
|
|
75
|
+
...a`
|
|
76
|
+
position: absolute;
|
|
77
|
+
bottom: 0;
|
|
78
|
+
left: 0;
|
|
79
|
+
width: 0;
|
|
80
|
+
height: 2px;
|
|
81
|
+
background: ${r};
|
|
82
|
+
animation: progress-animation ${o - 300}ms linear forwards;
|
|
83
|
+
|
|
84
|
+
@keyframes progress-animation {
|
|
85
|
+
0% {
|
|
86
|
+
width: 0;
|
|
87
|
+
}
|
|
88
|
+
100% {
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
`
|
|
93
|
+
})), d = ({
|
|
94
|
+
icon: o,
|
|
95
|
+
message: r,
|
|
96
|
+
backgroundColor: c = e.colors.whiteGreenA,
|
|
97
|
+
color: t = e.colors.green,
|
|
98
|
+
onDismiss: s,
|
|
99
|
+
duration: i = 3e3,
|
|
100
|
+
open: p
|
|
101
|
+
}) => /* @__PURE__ */ h(T, { backgroundColor: c, color: t, open: p, children: [
|
|
102
|
+
/* @__PURE__ */ n(v, { backgroundColor: t, children: /* @__PURE__ */ n(o, { size: 25, strokeWidth: 2, style: { color: e.colors.white, alignSelf: "center" } }) }),
|
|
103
|
+
/* @__PURE__ */ h("div", { style: { display: "flex", position: "relative", alignItems: "center", width: "100%" }, children: [
|
|
104
|
+
/* @__PURE__ */ n(C, { children: r }),
|
|
105
|
+
/* @__PURE__ */ n(y, { size: 20, className: "close-button", onClick: s, style: { margin: "8px", minWidth: "20px" } }),
|
|
106
|
+
i > 0 && /* @__PURE__ */ n(S, { duration: i, color: t })
|
|
107
|
+
] })
|
|
108
|
+
] }), B = ({ duration: o = 3e3, message: r, type: c = "success", onDismiss: t }) => {
|
|
109
|
+
const [s, i] = g(!0), p = () => {
|
|
110
|
+
i(!1);
|
|
111
|
+
};
|
|
112
|
+
return t == null && (t = p), u(() => {
|
|
113
|
+
i(!0);
|
|
114
|
+
const f = setTimeout(() => {
|
|
115
|
+
o > 0 && i(!1);
|
|
116
|
+
}, o);
|
|
117
|
+
return () => clearTimeout(f);
|
|
118
|
+
}, [o, c]), c == "error" ? /* @__PURE__ */ n(
|
|
119
|
+
d,
|
|
120
|
+
{
|
|
121
|
+
icon: k,
|
|
122
|
+
message: r,
|
|
123
|
+
backgroundColor: e.colors.lighterRed,
|
|
124
|
+
color: e.colors.burgundy,
|
|
125
|
+
onDismiss: t,
|
|
126
|
+
duration: o,
|
|
127
|
+
open: s
|
|
128
|
+
}
|
|
129
|
+
) : c == "warning" ? /* @__PURE__ */ n(
|
|
130
|
+
d,
|
|
131
|
+
{
|
|
132
|
+
icon: $,
|
|
133
|
+
message: r,
|
|
134
|
+
backgroundColor: e.colors.yellowLight,
|
|
135
|
+
color: e.colors.yellow,
|
|
136
|
+
onDismiss: t,
|
|
137
|
+
duration: o,
|
|
138
|
+
open: s
|
|
139
|
+
}
|
|
140
|
+
) : /* @__PURE__ */ n(
|
|
141
|
+
d,
|
|
142
|
+
{
|
|
143
|
+
icon: w,
|
|
144
|
+
message: r,
|
|
145
|
+
backgroundColor: e.colors.whiteGreenA,
|
|
146
|
+
color: e.colors.green,
|
|
147
|
+
onDismiss: t,
|
|
148
|
+
duration: o,
|
|
149
|
+
open: s
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
export {
|
|
154
|
+
B as default
|
|
155
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ToastItem } from '../../../../../../../../../src/components/composite/Toast/Toaster';
|
|
2
|
+
import { ToastProps } from '../../../../../../../../../src/components/composite/Toast/Toast';
|
|
3
|
+
export declare const handleDismissToast: (id: number, setToasts: React.Dispatch<React.SetStateAction<ToastItem[]>>) => void;
|
|
4
|
+
export declare const showToast: (toast: ToastProps, setToasts: React.Dispatch<React.SetStateAction<ToastItem[]>>) => void;
|
|
5
|
+
export declare const saveToastForRedirect: (toast: ToastProps) => void;
|
|
6
|
+
export declare const showSavedToast: (setToasts: React.Dispatch<React.SetStateAction<ToastItem[]>>) => void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const a = (t, s) => {
|
|
2
|
+
s((e) => e.filter((o) => o.id !== t));
|
|
3
|
+
}, n = (t, s) => {
|
|
4
|
+
const e = Date.now();
|
|
5
|
+
s((o) => [...o, { ...t, id: e }]);
|
|
6
|
+
}, r = (t) => {
|
|
7
|
+
const s = {
|
|
8
|
+
type: t.type ?? "warning",
|
|
9
|
+
message: t.message ?? "Action complete",
|
|
10
|
+
duration: String(t.duration ?? 3e3)
|
|
11
|
+
};
|
|
12
|
+
sessionStorage.setItem("savedToast", JSON.stringify(s));
|
|
13
|
+
}, i = (t) => {
|
|
14
|
+
const s = JSON.parse(sessionStorage.getItem("savedToast") || "{}");
|
|
15
|
+
if (s.type !== "success" && s.type !== "warning" && s.type !== "error")
|
|
16
|
+
return;
|
|
17
|
+
const e = Date.now();
|
|
18
|
+
t((o) => [...o, { ...s, id: e }]), sessionStorage.removeItem("savedToast");
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
a as handleDismissToast,
|
|
22
|
+
r as saveToastForRedirect,
|
|
23
|
+
i as showSavedToast,
|
|
24
|
+
n as showToast
|
|
25
|
+
};
|
package/Toast/Toaster.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import m from "./Toast.js";
|
|
3
|
+
const x = ({ toastQueue: s = [], onDismiss: t }) => {
|
|
4
|
+
const r = (o) => {
|
|
5
|
+
t && t(o);
|
|
6
|
+
};
|
|
7
|
+
return /* @__PURE__ */ i(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
style: {
|
|
11
|
+
position: "fixed",
|
|
12
|
+
bottom: 20,
|
|
13
|
+
right: 20,
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column",
|
|
16
|
+
gap: "8px",
|
|
17
|
+
zIndex: 9999
|
|
18
|
+
},
|
|
19
|
+
children: s.map(({ id: o, ...e }) => /* @__PURE__ */ i(m, { ...e, onDismiss: () => r(o) }, o))
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
x as Toaster
|
|
25
|
+
};
|
package/Toast/index.d.ts
ADDED
package/Toast/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as e } from "./Toast.js";
|
|
2
|
+
import { Toaster as a } from "./Toaster.js";
|
|
3
|
+
import { handleDismissToast as T, saveToastForRedirect as d, showSavedToast as f, showToast as m } from "./ToastHelpers.js";
|
|
4
|
+
export {
|
|
5
|
+
a as Toaster,
|
|
6
|
+
e as default,
|
|
7
|
+
T as handleDismissToast,
|
|
8
|
+
d as saveToastForRedirect,
|
|
9
|
+
f as showSavedToast,
|
|
10
|
+
m as showToast
|
|
11
|
+
};
|
package/Tooltip/Tooltip.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { jsxs as Pe, jsx as C } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
3
|
import { a as Qe, g as Ze, s as Y, c as Me, e as Ee, u as eo, b as I, P as o, d as oo } from "../.chunks/DefaultPropsProvider.js";
|
|
4
|
-
import { u as to } from "../.chunks/index.js";
|
|
5
|
-
import { a as ro } from "../.chunks/
|
|
4
|
+
import { u as to, a as j } from "../.chunks/index.js";
|
|
5
|
+
import { a as ro, b as po, g as no, G as Re, e as so } from "../.chunks/Portal.js";
|
|
6
6
|
import { m as G } from "../.chunks/memoTheme.js";
|
|
7
7
|
import { P as $e } from "../.chunks/Popper.js";
|
|
8
|
-
import { b as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as ao, g as io, G as Ce, e as lo } from "../.chunks/Portal.js";
|
|
11
|
-
import { a as A } from "../.chunks/resolveComponentProps.js";
|
|
8
|
+
import { b as A, c as Ce, a as ao, T as io } from "../.chunks/TransitionGroupContext.js";
|
|
9
|
+
import { u as lo } from "../.chunks/useControlled.js";
|
|
12
10
|
import { i as xe } from "../.chunks/isFocusVisible.js";
|
|
13
11
|
function co(r) {
|
|
14
12
|
return Ze("MuiTooltip", r);
|
|
@@ -278,7 +276,7 @@ const uo = (r) => {
|
|
|
278
276
|
}
|
|
279
277
|
})));
|
|
280
278
|
let S = !1;
|
|
281
|
-
const Oe = new
|
|
279
|
+
const Oe = new io();
|
|
282
280
|
let R = {
|
|
283
281
|
x: 0,
|
|
284
282
|
y: 0
|
|
@@ -320,12 +318,12 @@ const Ne = /* @__PURE__ */ s.forwardRef(function(e, n) {
|
|
|
320
318
|
slotProps: b = {},
|
|
321
319
|
slots: O = {},
|
|
322
320
|
title: f,
|
|
323
|
-
TransitionComponent: Fe =
|
|
321
|
+
TransitionComponent: Fe = Re,
|
|
324
322
|
TransitionProps: Ue,
|
|
325
323
|
...pe
|
|
326
324
|
} = c, m = /* @__PURE__ */ s.isValidElement(h) ? h : /* @__PURE__ */ C("span", {
|
|
327
325
|
children: h
|
|
328
|
-
}), ne = ro(), We = to(), [a, se] = s.useState(), [F, Be] = s.useState(null), M = s.useRef(!1), U = je || k, ae =
|
|
326
|
+
}), ne = ro(), We = to(), [a, se] = s.useState(), [F, Be] = s.useState(null), M = s.useRef(!1), U = je || k, ae = A(), W = A(), E = A(), ie = A(), [Ve, le] = lo({
|
|
329
327
|
controlled: oe,
|
|
330
328
|
default: !1,
|
|
331
329
|
name: "Tooltip",
|
|
@@ -341,13 +339,13 @@ const Ne = /* @__PURE__ */ s.forwardRef(function(e, n) {
|
|
|
341
339
|
`));
|
|
342
340
|
}, [f, a, t]);
|
|
343
341
|
}
|
|
344
|
-
const B =
|
|
342
|
+
const B = po(De), y = s.useRef(), $ = Ce(() => {
|
|
345
343
|
y.current !== void 0 && (document.body.style.WebkitUserSelect = y.current, y.current = void 0), ie.clear();
|
|
346
344
|
});
|
|
347
345
|
s.useEffect(() => $, [$]);
|
|
348
346
|
const ce = (t) => {
|
|
349
347
|
Oe.clear(), S = !0, le(!0), ee && !d && ee(t);
|
|
350
|
-
}, N =
|
|
348
|
+
}, N = Ce(
|
|
351
349
|
/**
|
|
352
350
|
* @param {React.SyntheticEvent | Event} event
|
|
353
351
|
*/
|
|
@@ -393,7 +391,7 @@ const Ne = /* @__PURE__ */ s.forwardRef(function(e, n) {
|
|
|
393
391
|
document.removeEventListener("keydown", t);
|
|
394
392
|
};
|
|
395
393
|
}, [N, d]);
|
|
396
|
-
const He =
|
|
394
|
+
const He = ao(no(m), se, n);
|
|
397
395
|
!f && f !== 0 && (d = !1);
|
|
398
396
|
const z = s.useRef(), Ye = (t) => {
|
|
399
397
|
const l = m.props;
|
|
@@ -443,17 +441,17 @@ const Ne = /* @__PURE__ */ s.forwardRef(function(e, n) {
|
|
|
443
441
|
placement: te,
|
|
444
442
|
PopperComponentProp: re,
|
|
445
443
|
touch: M.current
|
|
446
|
-
}, H = uo(P), he = O.popper ?? x.Popper ?? fo, ge = O.transition ?? x.Transition ?? Fe ??
|
|
444
|
+
}, H = uo(P), he = O.popper ?? x.Popper ?? fo, ge = O.transition ?? x.Transition ?? Fe ?? Re, be = O.tooltip ?? x.Tooltip ?? ho, Te = O.arrow ?? x.Arrow ?? go, qe = j(he, {
|
|
447
445
|
...u,
|
|
448
446
|
...b.popper ?? g.popper,
|
|
449
447
|
className: I(H.popper, u == null ? void 0 : u.className, (ye = b.popper ?? g.popper) == null ? void 0 : ye.className)
|
|
450
|
-
}, P), Ke =
|
|
448
|
+
}, P), Ke = j(ge, {
|
|
451
449
|
...Ue,
|
|
452
450
|
...b.transition ?? g.transition
|
|
453
|
-
}, P), Xe =
|
|
451
|
+
}, P), Xe = j(be, {
|
|
454
452
|
...b.tooltip ?? g.tooltip,
|
|
455
453
|
className: I(H.tooltip, (we = b.tooltip ?? g.tooltip) == null ? void 0 : we.className)
|
|
456
|
-
}, P), Je =
|
|
454
|
+
}, P), Je = j(Te, {
|
|
457
455
|
...b.arrow ?? g.arrow,
|
|
458
456
|
className: I(H.arrow, (ve = b.arrow ?? g.arrow) == null ? void 0 : ve.className)
|
|
459
457
|
}, P);
|
|
@@ -508,7 +506,7 @@ process.env.NODE_ENV !== "production" && (Ne.propTypes = {
|
|
|
508
506
|
/**
|
|
509
507
|
* Tooltip reference element.
|
|
510
508
|
*/
|
|
511
|
-
children:
|
|
509
|
+
children: so.isRequired,
|
|
512
510
|
/**
|
|
513
511
|
* Override or extend the styles applied to the component.
|
|
514
512
|
*/
|
|
@@ -686,7 +684,7 @@ process.env.NODE_ENV !== "production" && (Ne.propTypes = {
|
|
|
686
684
|
*/
|
|
687
685
|
TransitionProps: o.object
|
|
688
686
|
});
|
|
689
|
-
const
|
|
687
|
+
const Oo = ({
|
|
690
688
|
title: r,
|
|
691
689
|
children: e,
|
|
692
690
|
arrow: n = !0,
|
|
@@ -697,6 +695,6 @@ const Eo = ({
|
|
|
697
695
|
return /* @__PURE__ */ C(Ne, { ...h, children: e });
|
|
698
696
|
};
|
|
699
697
|
export {
|
|
700
|
-
|
|
701
|
-
|
|
698
|
+
Oo as Tooltip,
|
|
699
|
+
Oo as default
|
|
702
700
|
};
|
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.11",
|
|
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",
|
package/theme.d.ts
CHANGED
package/theme.js
CHANGED
|
@@ -60,7 +60,9 @@ const e = {
|
|
|
60
60
|
whiteGreenB: "#f0f8f0",
|
|
61
61
|
whiteGreenC: "#e8f5e8",
|
|
62
62
|
whiteGreenD: "#f8fff8",
|
|
63
|
-
whiteBlue: "#f8f9fa"
|
|
63
|
+
whiteBlue: "#f8f9fa",
|
|
64
|
+
yellow: "#e3b50e",
|
|
65
|
+
yellowLight: "#f4edcd"
|
|
64
66
|
},
|
|
65
67
|
constants: {
|
|
66
68
|
appHeaderHeight: 58,
|
|
@@ -83,21 +85,21 @@ const e = {
|
|
|
83
85
|
};
|
|
84
86
|
e.boxShadows = {
|
|
85
87
|
...Object.fromEntries(
|
|
86
|
-
Object.keys(e.colors).map((
|
|
87
|
-
|
|
88
|
-
`0 0 8px -2px ${e.colors[
|
|
88
|
+
Object.keys(e.colors).map((o) => [
|
|
89
|
+
o,
|
|
90
|
+
`0 0 8px -2px ${e.colors[o]}`
|
|
89
91
|
])
|
|
90
92
|
),
|
|
91
93
|
...Object.fromEntries(
|
|
92
|
-
Object.keys(e.colors).map((
|
|
93
|
-
`${
|
|
94
|
-
`0 0 2px 1px ${e.colors[
|
|
94
|
+
Object.keys(e.colors).map((o) => [
|
|
95
|
+
`${o}Thick`,
|
|
96
|
+
`0 0 2px 1px ${e.colors[o]}`
|
|
95
97
|
])
|
|
96
98
|
),
|
|
97
99
|
black63: "0px 0px 2px 1px rgba(0, 0, 0, 0.63)",
|
|
98
100
|
gray63: "0px 0px 2px 1px rgba(100, 100, 100, 0.63)"
|
|
99
101
|
};
|
|
100
|
-
const
|
|
102
|
+
const r = {
|
|
101
103
|
themeColor: e.colors.green,
|
|
102
104
|
themeDark: e.colors.darkGreen,
|
|
103
105
|
themeMediumA: e.colors.mint,
|
|
@@ -137,5 +139,5 @@ const o = {
|
|
|
137
139
|
};
|
|
138
140
|
export {
|
|
139
141
|
e as default,
|
|
140
|
-
|
|
142
|
+
r as defaultTheme
|
|
141
143
|
};
|
package/utils.d.ts
CHANGED
package/utils.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const
|
|
1
|
+
const h = (e, t = "mmddyyyy") => t === "mmddyyyy" ? new Date(e).toLocaleDateString("en-US", {
|
|
2
2
|
month: "numeric",
|
|
3
3
|
day: "numeric",
|
|
4
4
|
year: "numeric"
|
|
5
|
-
}) :
|
|
6
|
-
const { line1:
|
|
7
|
-
let r =
|
|
8
|
-
return o && (r += `, ${o}`),
|
|
9
|
-
},
|
|
10
|
-
if (
|
|
11
|
-
switch (
|
|
5
|
+
}) : e, g = (e) => {
|
|
6
|
+
const { line1: t, line2: o, city: i, state: n, zip: c } = e;
|
|
7
|
+
let r = t;
|
|
8
|
+
return o && (r += `, ${o}`), i && (r += `, ${i}`), n && (r += `, ${n}`), c && (r += ` ${c}`), r;
|
|
9
|
+
}, $ = (e) => {
|
|
10
|
+
if (e > 3 && e < 21) return "th";
|
|
11
|
+
switch (e % 10) {
|
|
12
12
|
case 1:
|
|
13
13
|
return "st";
|
|
14
14
|
case 2:
|
|
@@ -18,16 +18,35 @@ const d = (t, e = "mmddyyyy") => e === "mmddyyyy" ? new Date(t).toLocaleDateStri
|
|
|
18
18
|
default:
|
|
19
19
|
return "th";
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, p = (e) => {
|
|
22
22
|
try {
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const t = /* @__PURE__ */ new Date(e.replace(" ", "T") + "Z"), i = new Intl.DateTimeFormat("en-US", {
|
|
24
|
+
timeZone: "America/Chicago",
|
|
25
|
+
month: "short",
|
|
26
|
+
day: "numeric",
|
|
27
|
+
year: "numeric",
|
|
28
|
+
hour: "numeric",
|
|
29
|
+
minute: "2-digit",
|
|
30
|
+
hour12: !0
|
|
31
|
+
}).formatToParts(t), n = (l) => {
|
|
32
|
+
var a;
|
|
33
|
+
return ((a = i.find((y) => y.type === l)) == null ? void 0 : a.value) ?? "";
|
|
34
|
+
}, c = n("month") + ".", r = Number(n("day")), s = n("year"), m = n("hour"), u = n("minute"), d = n("dayPeriod").toLowerCase(), f = $(r);
|
|
35
|
+
return `${c} ${r}${f}, ${s}, ${m}:${u}${d}`;
|
|
25
36
|
} catch {
|
|
26
|
-
return
|
|
37
|
+
return e;
|
|
27
38
|
}
|
|
39
|
+
}, D = (e) => {
|
|
40
|
+
if (e == null) return ["", void 0];
|
|
41
|
+
let t = e.replace(/\D/g, "") || "";
|
|
42
|
+
t.at(0) == "1" && (t = t.slice(1));
|
|
43
|
+
const o = t.slice(0, 3), i = t.slice(3, 6), n = t.slice(6, 10), c = t.slice(10);
|
|
44
|
+
let r = t;
|
|
45
|
+
return t.length >= 4 && (r = `(${o}) ${t.slice(3)}`), t.length >= 7 && (r = `(${o}) ${i}-${t.slice(6)}`), t.length > 10 && (r = `(${o}) ${i}-${n} ext. ${c}`), [r, t];
|
|
28
46
|
};
|
|
29
47
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
48
|
+
g as formatAddress,
|
|
49
|
+
h as formatDate,
|
|
50
|
+
D as formatPhoneNumber,
|
|
51
|
+
p as formatTimestamp
|
|
33
52
|
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { b as l } from "./DefaultPropsProvider.js";
|
|
2
|
-
function O(s) {
|
|
3
|
-
return typeof s == "string";
|
|
4
|
-
}
|
|
5
|
-
function A(s, c, e) {
|
|
6
|
-
return s === void 0 || O(s) ? c : {
|
|
7
|
-
...c,
|
|
8
|
-
ownerState: {
|
|
9
|
-
...c.ownerState,
|
|
10
|
-
...e
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
function k(s, c = []) {
|
|
15
|
-
if (s === void 0)
|
|
16
|
-
return {};
|
|
17
|
-
const e = {};
|
|
18
|
-
return Object.keys(s).filter((n) => n.match(/^on[A-Z]/) && typeof s[n] == "function" && !c.includes(n)).forEach((n) => {
|
|
19
|
-
e[n] = s[n];
|
|
20
|
-
}), e;
|
|
21
|
-
}
|
|
22
|
-
function a(s) {
|
|
23
|
-
if (s === void 0)
|
|
24
|
-
return {};
|
|
25
|
-
const c = {};
|
|
26
|
-
return Object.keys(s).filter((e) => !(e.match(/^on[A-Z]/) && typeof s[e] == "function")).forEach((e) => {
|
|
27
|
-
c[e] = s[e];
|
|
28
|
-
}), c;
|
|
29
|
-
}
|
|
30
|
-
function R(s) {
|
|
31
|
-
const {
|
|
32
|
-
getSlotProps: c,
|
|
33
|
-
additionalProps: e,
|
|
34
|
-
externalSlotProps: n,
|
|
35
|
-
externalForwardedProps: t,
|
|
36
|
-
className: i
|
|
37
|
-
} = s;
|
|
38
|
-
if (!c) {
|
|
39
|
-
const g = l(e == null ? void 0 : e.className, i, t == null ? void 0 : t.className, n == null ? void 0 : n.className), h = {
|
|
40
|
-
...e == null ? void 0 : e.style,
|
|
41
|
-
...t == null ? void 0 : t.style,
|
|
42
|
-
...n == null ? void 0 : n.style
|
|
43
|
-
}, m = {
|
|
44
|
-
...e,
|
|
45
|
-
...t,
|
|
46
|
-
...n
|
|
47
|
-
};
|
|
48
|
-
return g.length > 0 && (m.className = g), Object.keys(h).length > 0 && (m.style = h), {
|
|
49
|
-
props: m,
|
|
50
|
-
internalRef: void 0
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
const v = k({
|
|
54
|
-
...t,
|
|
55
|
-
...n
|
|
56
|
-
}), E = a(n), H = a(t), f = c(v), y = l(f == null ? void 0 : f.className, e == null ? void 0 : e.className, i, t == null ? void 0 : t.className, n == null ? void 0 : n.className), N = {
|
|
57
|
-
...f == null ? void 0 : f.style,
|
|
58
|
-
...e == null ? void 0 : e.style,
|
|
59
|
-
...t == null ? void 0 : t.style,
|
|
60
|
-
...n == null ? void 0 : n.style
|
|
61
|
-
}, u = {
|
|
62
|
-
...f,
|
|
63
|
-
...e,
|
|
64
|
-
...H,
|
|
65
|
-
...E
|
|
66
|
-
};
|
|
67
|
-
return y.length > 0 && (u.className = y), Object.keys(N).length > 0 && (u.style = N), {
|
|
68
|
-
props: u,
|
|
69
|
-
internalRef: f.ref
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
function W(s, c, e) {
|
|
73
|
-
return typeof s == "function" ? s(c, e) : s;
|
|
74
|
-
}
|
|
75
|
-
export {
|
|
76
|
-
A as a,
|
|
77
|
-
k as e,
|
|
78
|
-
R as m,
|
|
79
|
-
W as r
|
|
80
|
-
};
|
package/.chunks/useTheme.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as n from "react";
|
|
2
|
-
import { h as s, T as o, i as u } from "./DefaultPropsProvider.js";
|
|
3
|
-
import { T as r } from "./emotion-styled.browser.esm.js";
|
|
4
|
-
function m(e) {
|
|
5
|
-
return Object.keys(e).length === 0;
|
|
6
|
-
}
|
|
7
|
-
function a(e = null) {
|
|
8
|
-
const t = n.useContext(r);
|
|
9
|
-
return !t || m(t) ? e : t;
|
|
10
|
-
}
|
|
11
|
-
const c = s();
|
|
12
|
-
function h(e = c) {
|
|
13
|
-
return a(e);
|
|
14
|
-
}
|
|
15
|
-
function f() {
|
|
16
|
-
const e = h(u);
|
|
17
|
-
return process.env.NODE_ENV !== "production" && n.useDebugValue(e), e[o] || e;
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
f as a,
|
|
21
|
-
h as b,
|
|
22
|
-
a as u
|
|
23
|
-
};
|