jcicl 1.0.1 → 1.0.5
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.js +1 -1
- package/Memo/Memo.js +16 -15
- package/package.json +1 -1
- package/utils.d.ts +1 -0
- package/utils.js +27 -7
package/Button/Button.js
CHANGED
package/Memo/Memo.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { n as e } from "../.chunks/emotion-styled.browser.esm.js";
|
|
3
3
|
import { c as o } from "../.chunks/emotion-react.browser.esm.js";
|
|
4
|
-
import
|
|
5
|
-
import { DetailItemContainer as
|
|
6
|
-
|
|
4
|
+
import i from "../theme.js";
|
|
5
|
+
import { DetailItemContainer as a } from "../DetailPageComponents/DetailPageComponents.js";
|
|
6
|
+
import { formatTimestamp as p } from "../utils.js";
|
|
7
|
+
const c = e("div")(() => ({
|
|
7
8
|
...o`
|
|
8
9
|
display: flex;
|
|
9
10
|
justify-content: space-between;
|
|
10
11
|
align-items: center;
|
|
11
12
|
`
|
|
12
|
-
})),
|
|
13
|
+
})), l = e("h3")(() => ({
|
|
13
14
|
...o`
|
|
14
15
|
font-size: 21px;
|
|
15
16
|
font-weight: 600;
|
|
@@ -20,25 +21,25 @@ const l = e("div")(() => ({
|
|
|
20
21
|
margin-right: 9px;
|
|
21
22
|
}
|
|
22
23
|
`
|
|
23
|
-
})),
|
|
24
|
+
})), f = e("span")(() => ({
|
|
24
25
|
...o`
|
|
25
26
|
font-size: 15px;
|
|
26
|
-
color: ${
|
|
27
|
+
color: ${i.colors.gray};
|
|
27
28
|
margin: 0px;
|
|
28
29
|
`
|
|
29
|
-
})),
|
|
30
|
+
})), d = e("p")(() => ({
|
|
30
31
|
...o`
|
|
31
|
-
color: ${
|
|
32
|
+
color: ${i.colors.gray};
|
|
32
33
|
font-size: 18px;
|
|
33
34
|
margin: 0px;
|
|
34
35
|
`
|
|
35
|
-
})),
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */ t(
|
|
38
|
-
/* @__PURE__ */ t(
|
|
36
|
+
})), j = ({ username: n, createDateTime: m, note: s }) => /* @__PURE__ */ r(a, { children: [
|
|
37
|
+
/* @__PURE__ */ r(c, { children: [
|
|
38
|
+
/* @__PURE__ */ t(l, { children: n }),
|
|
39
|
+
/* @__PURE__ */ t(f, { children: p(m) })
|
|
39
40
|
] }),
|
|
40
|
-
/* @__PURE__ */ t(
|
|
41
|
+
/* @__PURE__ */ t(d, { children: s })
|
|
41
42
|
] });
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
+
j as default
|
|
44
45
|
};
|
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.5",
|
|
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/utils.d.ts
CHANGED
package/utils.js
CHANGED
|
@@ -1,13 +1,33 @@
|
|
|
1
|
-
const
|
|
1
|
+
const d = (t, e = "mmddyyyy") => e === "mmddyyyy" ? new Date(t).toLocaleDateString("en-US", {
|
|
2
2
|
month: "numeric",
|
|
3
3
|
day: "numeric",
|
|
4
4
|
year: "numeric"
|
|
5
|
-
}) : t,
|
|
6
|
-
const { line1:
|
|
7
|
-
let
|
|
8
|
-
return
|
|
5
|
+
}) : t, y = (t) => {
|
|
6
|
+
const { line1: e, line2: o, city: n, state: a, zip: s } = t;
|
|
7
|
+
let r = e;
|
|
8
|
+
return o && (r += `, ${o}`), n && (r += `, ${n}`), a && (r += `, ${a}`), s && (r += ` ${s}`), r;
|
|
9
|
+
}, m = (t) => {
|
|
10
|
+
if (t > 3 && t < 21) return "th";
|
|
11
|
+
switch (t % 10) {
|
|
12
|
+
case 1:
|
|
13
|
+
return "st";
|
|
14
|
+
case 2:
|
|
15
|
+
return "nd";
|
|
16
|
+
case 3:
|
|
17
|
+
return "rd";
|
|
18
|
+
default:
|
|
19
|
+
return "th";
|
|
20
|
+
}
|
|
21
|
+
}, f = (t) => {
|
|
22
|
+
try {
|
|
23
|
+
const e = new Date(t), o = e.toLocaleDateString("en-US", { month: "short" }) + ".", n = e.getDate(), a = m(n), s = e.getFullYear(), r = e.getHours(), c = e.getMinutes().toString().padStart(2, "0"), i = r % 12 || 12, u = r >= 12 ? "pm" : "am";
|
|
24
|
+
return `${o} ${n}${a}, ${s}, ${i}:${c}${u}`;
|
|
25
|
+
} catch {
|
|
26
|
+
return t;
|
|
27
|
+
}
|
|
9
28
|
};
|
|
10
29
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
30
|
+
y as formatAddress,
|
|
31
|
+
d as formatDate,
|
|
32
|
+
f as formatTimestamp
|
|
13
33
|
};
|