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 CHANGED
@@ -572,7 +572,7 @@ const j = [
572
572
  }
573
573
  `
574
574
  })), uo = s(m)`
575
- border-radius: 8px;
575
+ display: block;
576
576
  `, bo = s(m, {
577
577
  shouldForwardProp: (o) => typeof o == "string" && oo(o)
578
578
  })(
package/Memo/Memo.js CHANGED
@@ -1,15 +1,16 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
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 n from "../theme.js";
5
- import { DetailItemContainer as c } from "../DetailPageComponents/DetailPageComponents.js";
6
- const l = e("div")(() => ({
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
- })), a = e("h3")(() => ({
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
- })), p = e("span")(() => ({
24
+ })), f = e("span")(() => ({
24
25
  ...o`
25
26
  font-size: 15px;
26
- color: ${n.colors.gray};
27
+ color: ${i.colors.gray};
27
28
  margin: 0px;
28
29
  `
29
- })), f = e("p")(() => ({
30
+ })), d = e("p")(() => ({
30
31
  ...o`
31
- color: ${n.colors.gray};
32
+ color: ${i.colors.gray};
32
33
  font-size: 18px;
33
34
  margin: 0px;
34
35
  `
35
- })), M = ({ username: r, createDateTime: s, note: m }) => /* @__PURE__ */ i(c, { children: [
36
- /* @__PURE__ */ i(l, { children: [
37
- /* @__PURE__ */ t(a, { children: r }),
38
- /* @__PURE__ */ t(p, { children: s })
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(f, { children: m })
41
+ /* @__PURE__ */ t(d, { children: s })
41
42
  ] });
42
43
  export {
43
- M as default
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.1",
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
@@ -6,3 +6,4 @@ export declare const formatAddress: (address: {
6
6
  state?: string | null;
7
7
  zip?: string | null;
8
8
  }) => string;
9
+ export declare const formatTimestamp: (timestamp: string) => string;
package/utils.js CHANGED
@@ -1,13 +1,33 @@
1
- const a = (t, r = "mmddyyyy") => r === "mmddyyyy" ? new Date(t).toLocaleDateString("en-US", {
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, o = (t) => {
6
- const { line1: r, line2: n, city: i, state: y, zip: m } = t;
7
- let e = r;
8
- return n && (e += `, ${n}`), i && (e += `, ${i}`), y && (e += `, ${y}`), m && (e += ` ${m}`), e;
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
- o as formatAddress,
12
- a as formatDate
30
+ y as formatAddress,
31
+ d as formatDate,
32
+ f as formatTimestamp
13
33
  };