@cityofportland/components-react 1.0.0-alpha.5 → 1.0.0-alpha.6
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/dist/alert/alert.es.js +39 -38
- package/dist/box/box.es.js +2 -54
- package/dist/box-1tl08xTv.js +57 -0
- package/dist/button/button.es.js +2 -38
- package/dist/button-CF_WgNBC.js +38 -0
- package/dist/card/card.es.js +24 -23
- package/dist/city-seal/city-seal.es.js +2 -15
- package/dist/city-seal-D1o5dRUd.js +18 -0
- package/dist/footer/footer.es.js +745 -744
- package/dist/header/header.es.js +26 -25
- package/dist/icon/icon.es.js +2 -29
- package/dist/icon-CzVwiUJU.js +32 -0
- package/dist/tag/tag.es.js +6 -5
- package/package.json +5 -5
- package/dist/index-IqW719eK.js +0 -1484
package/dist/alert/alert.es.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { B as o } from "../box-1tl08xTv.js";
|
|
4
|
+
import { B as L } from "../button-CF_WgNBC.js";
|
|
5
|
+
import { I as _ } from "../icon-CzVwiUJU.js";
|
|
5
6
|
import { m as n } from "../utils-DpTd6iI4.js";
|
|
6
|
-
const
|
|
7
|
+
const I = {
|
|
7
8
|
name: "xmark",
|
|
8
9
|
comments: [
|
|
9
10
|
"! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc."
|
|
@@ -15,74 +16,74 @@ const L = {
|
|
|
15
16
|
d: "M183.1 137.4C170.6 124.9 150.3 124.9 137.8 137.4C125.3 149.9 125.3 170.2 137.8 182.7L275.2 320L137.9 457.4C125.4 469.9 125.4 490.2 137.9 502.7C150.4 515.2 170.7 515.2 183.2 502.7L320.5 365.3L457.9 502.6C470.4 515.1 490.7 515.1 503.2 502.6C515.7 490.1 515.7 469.8 503.2 457.3L365.8 320L503.1 182.6C515.6 170.1 515.6 149.8 503.1 137.3C490.6 124.8 470.3 124.8 457.8 137.3L320.5 274.7L183.1 137.4z"
|
|
16
17
|
}
|
|
17
18
|
]
|
|
18
|
-
},
|
|
19
|
+
}, F = ({
|
|
19
20
|
children: t,
|
|
20
21
|
className: e,
|
|
21
|
-
...
|
|
22
|
-
}) => /* @__PURE__ */
|
|
22
|
+
...r
|
|
23
|
+
}) => /* @__PURE__ */ s(o, { className: n(e, "alert__content"), ...r, children: t }), b = ({ children: t, className: e, ...r }) => /* @__PURE__ */ s(o, { className: n(e, "alert__text"), ...r, children: t }), T = ({
|
|
23
24
|
as: t = "span",
|
|
24
25
|
children: e,
|
|
25
|
-
className:
|
|
26
|
-
...
|
|
27
|
-
}) => /* @__PURE__ */
|
|
26
|
+
className: r,
|
|
27
|
+
...a
|
|
28
|
+
}) => /* @__PURE__ */ s(o, { as: t, className: n(r, "alert__icon"), ...a, children: e }), j = ({
|
|
28
29
|
as: t = "header",
|
|
29
30
|
children: e,
|
|
30
|
-
className:
|
|
31
|
-
...
|
|
32
|
-
}) => /* @__PURE__ */
|
|
33
|
-
|
|
31
|
+
className: r,
|
|
32
|
+
...a
|
|
33
|
+
}) => /* @__PURE__ */ s(
|
|
34
|
+
o,
|
|
34
35
|
{
|
|
35
36
|
as: t,
|
|
36
|
-
className: n(
|
|
37
|
-
...
|
|
37
|
+
className: n(r, "alert__heading"),
|
|
38
|
+
...a,
|
|
38
39
|
children: e
|
|
39
40
|
}
|
|
40
|
-
),
|
|
41
|
+
), k = ({
|
|
41
42
|
as: t = "div",
|
|
42
43
|
color: e,
|
|
43
|
-
variant:
|
|
44
|
-
size:
|
|
44
|
+
variant: r,
|
|
45
|
+
size: a = "default",
|
|
45
46
|
role: i = "status",
|
|
46
47
|
children: m,
|
|
47
48
|
dismissible: C = !0,
|
|
48
49
|
className: p,
|
|
49
|
-
"aria-label":
|
|
50
|
+
"aria-label": d = `${e} alert`,
|
|
50
51
|
onDismiss: c,
|
|
51
|
-
...
|
|
52
|
-
}) => /* @__PURE__ */
|
|
53
|
-
|
|
52
|
+
...f
|
|
53
|
+
}) => /* @__PURE__ */ u(
|
|
54
|
+
o,
|
|
54
55
|
{
|
|
55
56
|
as: t,
|
|
56
|
-
className: n(p, "alert", `alert--${
|
|
57
|
+
className: n(p, "alert", `alert--${a}`),
|
|
57
58
|
color: e,
|
|
58
|
-
variant:
|
|
59
|
+
variant: r,
|
|
59
60
|
role: i,
|
|
60
|
-
"aria-label":
|
|
61
|
-
...
|
|
61
|
+
"aria-label": d,
|
|
62
|
+
...f,
|
|
62
63
|
children: [
|
|
63
64
|
m,
|
|
64
|
-
C ? /* @__PURE__ */
|
|
65
|
-
|
|
65
|
+
C ? /* @__PURE__ */ s("span", { className: "alert__close", children: /* @__PURE__ */ s(
|
|
66
|
+
L,
|
|
66
67
|
{
|
|
67
68
|
"aria-label": "Dismiss alert",
|
|
68
|
-
onClick: (
|
|
69
|
-
const l =
|
|
69
|
+
onClick: (h) => {
|
|
70
|
+
const l = h.currentTarget.closest(".alert");
|
|
70
71
|
if (!l) {
|
|
71
72
|
console.warn("Could not find alert to dismiss");
|
|
72
73
|
return;
|
|
73
74
|
}
|
|
74
75
|
l.remove(), c && c(l);
|
|
75
76
|
},
|
|
76
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ s(_, { icon: I, size: "sm" })
|
|
77
78
|
}
|
|
78
79
|
) }) : ""
|
|
79
80
|
]
|
|
80
81
|
}
|
|
81
82
|
);
|
|
82
83
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
k as Alert,
|
|
85
|
+
F as AlertContent,
|
|
86
|
+
b as AlertDescription,
|
|
87
|
+
T as AlertIcon,
|
|
88
|
+
j as AlertTitle
|
|
88
89
|
};
|
package/dist/box/box.es.js
CHANGED
|
@@ -1,56 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as x } from "../utils-DpTd6iI4.js";
|
|
3
|
-
const t = [
|
|
4
|
-
"subtle",
|
|
5
|
-
"moderate",
|
|
6
|
-
"emphasis",
|
|
7
|
-
"strong"
|
|
8
|
-
], o = /* @__PURE__ */ new Map([
|
|
9
|
-
["default", t],
|
|
10
|
-
["inverse", t],
|
|
11
|
-
["primary", t],
|
|
12
|
-
["secondary", t],
|
|
13
|
-
["success", t],
|
|
14
|
-
["danger", t],
|
|
15
|
-
["warning", t],
|
|
16
|
-
["info", t],
|
|
17
|
-
["disabled", t],
|
|
18
|
-
["fixed", ["dark", "light"]]
|
|
19
|
-
]), l = (e, s) => {
|
|
20
|
-
const n = [e, s];
|
|
21
|
-
return !e || !s ? [void 0, void 0] : o.has(e) ? o.get(e)?.includes(s) ? n : (console.error(`[Box component] '${s}' is not a valid variant for color '${e}'.`), [void 0, void 0]) : (console.error(`[Box component] '${e}' is not a valid box color.`), [void 0, void 0]);
|
|
22
|
-
};
|
|
23
|
-
function p({
|
|
24
|
-
className: e = "",
|
|
25
|
-
color: s,
|
|
26
|
-
variant: n
|
|
27
|
-
}) {
|
|
28
|
-
const d = ["box"];
|
|
29
|
-
return s && n && d.push(
|
|
30
|
-
s ? `box--${s}` : "",
|
|
31
|
-
n ? `box--${n}` : ""
|
|
32
|
-
), x(...d, e);
|
|
33
|
-
}
|
|
34
|
-
const R = c.forwardRef(
|
|
35
|
-
({ as: e, children: s, color: n, variant: d, className: r, ...u }, f) => {
|
|
36
|
-
const a = e || "div";
|
|
37
|
-
[n, d] = l(n, d);
|
|
38
|
-
const i = p({
|
|
39
|
-
className: r,
|
|
40
|
-
color: n,
|
|
41
|
-
variant: d
|
|
42
|
-
});
|
|
43
|
-
return /* @__PURE__ */ m.jsx(
|
|
44
|
-
a,
|
|
45
|
-
{
|
|
46
|
-
ref: f,
|
|
47
|
-
className: i.length ? i : void 0,
|
|
48
|
-
...u,
|
|
49
|
-
children: s
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
);
|
|
1
|
+
import { B as x } from "../box-1tl08xTv.js";
|
|
54
2
|
export {
|
|
55
|
-
|
|
3
|
+
x as Box
|
|
56
4
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { m as l } from "./utils-DpTd6iI4.js";
|
|
4
|
+
const o = [
|
|
5
|
+
"subtle",
|
|
6
|
+
"moderate",
|
|
7
|
+
"emphasis",
|
|
8
|
+
"strong"
|
|
9
|
+
], i = /* @__PURE__ */ new Map([
|
|
10
|
+
["default", o],
|
|
11
|
+
["inverse", o],
|
|
12
|
+
["primary", o],
|
|
13
|
+
["secondary", o],
|
|
14
|
+
["success", o],
|
|
15
|
+
["danger", o],
|
|
16
|
+
["warning", o],
|
|
17
|
+
["info", o],
|
|
18
|
+
["disabled", o],
|
|
19
|
+
["fixed", ["dark", "light"]]
|
|
20
|
+
]), x = (e, n) => {
|
|
21
|
+
const s = [e, n];
|
|
22
|
+
return !e || !n ? [void 0, void 0] : i.has(e) ? i.get(e)?.includes(n) ? s : (console.error(`[Box component] '${n}' is not a valid variant for color '${e}'.`), [void 0, void 0]) : (console.error(`[Box component] '${e}' is not a valid box color.`), [void 0, void 0]);
|
|
23
|
+
};
|
|
24
|
+
function p({
|
|
25
|
+
className: e = "",
|
|
26
|
+
color: n,
|
|
27
|
+
variant: s
|
|
28
|
+
}) {
|
|
29
|
+
const t = ["box"];
|
|
30
|
+
return n && s && t.push(
|
|
31
|
+
n ? `box--${n}` : "",
|
|
32
|
+
s ? `box--${s}` : ""
|
|
33
|
+
), l(...t, e);
|
|
34
|
+
}
|
|
35
|
+
const A = c.forwardRef(
|
|
36
|
+
({ as: e, children: n, color: s, variant: t, className: r, ...f }, u) => {
|
|
37
|
+
const a = e || "div";
|
|
38
|
+
[s, t] = x(s, t);
|
|
39
|
+
const d = p({
|
|
40
|
+
className: r,
|
|
41
|
+
color: s,
|
|
42
|
+
variant: t
|
|
43
|
+
});
|
|
44
|
+
return /* @__PURE__ */ m(
|
|
45
|
+
a,
|
|
46
|
+
{
|
|
47
|
+
ref: u,
|
|
48
|
+
className: d.length ? d : void 0,
|
|
49
|
+
...f,
|
|
50
|
+
children: n
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
export {
|
|
56
|
+
A as B
|
|
57
|
+
};
|
package/dist/button/button.es.js
CHANGED
|
@@ -1,40 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m } from "../utils-DpTd6iI4.js";
|
|
3
|
-
import { Box as f } from "../box/box.es.js";
|
|
4
|
-
const b = "button", c = ({
|
|
5
|
-
as: e,
|
|
6
|
-
children: n = null,
|
|
7
|
-
size: o,
|
|
8
|
-
outline: s = !1,
|
|
9
|
-
disabled: t = !1,
|
|
10
|
-
className: r,
|
|
11
|
-
...u
|
|
12
|
-
}) => {
|
|
13
|
-
const a = e ?? b;
|
|
14
|
-
return (
|
|
15
|
-
//@ts-expect-error Impossible to dynamically determine the set of valid properties.
|
|
16
|
-
// Would need to know what the "as" property is at type checking time.
|
|
17
|
-
// Users of this component will get valid type-checking
|
|
18
|
-
/* @__PURE__ */ l.jsx(
|
|
19
|
-
f,
|
|
20
|
-
{
|
|
21
|
-
as: a,
|
|
22
|
-
className: m(
|
|
23
|
-
"button",
|
|
24
|
-
o && `button--${o}`,
|
|
25
|
-
t && "button--disabled",
|
|
26
|
-
s && "button--outline",
|
|
27
|
-
r
|
|
28
|
-
),
|
|
29
|
-
disabled: t,
|
|
30
|
-
"aria-disabled": t ? "true" : "false",
|
|
31
|
-
role: "button",
|
|
32
|
-
...u,
|
|
33
|
-
children: n
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
);
|
|
37
|
-
};
|
|
1
|
+
import { B as r } from "../button-CF_WgNBC.js";
|
|
38
2
|
export {
|
|
39
|
-
|
|
3
|
+
r as Button
|
|
40
4
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { m } from "./utils-DpTd6iI4.js";
|
|
4
|
+
import { B as u } from "./box-1tl08xTv.js";
|
|
5
|
+
const f = "button", x = ({
|
|
6
|
+
as: o,
|
|
7
|
+
children: n = null,
|
|
8
|
+
size: e,
|
|
9
|
+
outline: s = !1,
|
|
10
|
+
disabled: t = !1,
|
|
11
|
+
className: r,
|
|
12
|
+
...a
|
|
13
|
+
}) => (
|
|
14
|
+
//@ts-expect-error Impossible to dynamically determine the set of valid properties.
|
|
15
|
+
// Would need to know what the "as" property is at type checking time.
|
|
16
|
+
// Users of this component will get valid type-checking
|
|
17
|
+
/* @__PURE__ */ l(
|
|
18
|
+
u,
|
|
19
|
+
{
|
|
20
|
+
as: o ?? f,
|
|
21
|
+
className: m(
|
|
22
|
+
"button",
|
|
23
|
+
e && `button--${e}`,
|
|
24
|
+
t && "button--disabled",
|
|
25
|
+
s && "button--outline",
|
|
26
|
+
r
|
|
27
|
+
),
|
|
28
|
+
disabled: t,
|
|
29
|
+
"aria-disabled": t ? "true" : "false",
|
|
30
|
+
role: "button",
|
|
31
|
+
...a,
|
|
32
|
+
children: n
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
);
|
|
36
|
+
export {
|
|
37
|
+
x as B
|
|
38
|
+
};
|
package/dist/card/card.es.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { B as o } from "../box-1tl08xTv.js";
|
|
3
4
|
import { m as c } from "../utils-DpTd6iI4.js";
|
|
4
5
|
/* empty css */
|
|
5
|
-
const
|
|
6
|
+
const f = ({
|
|
6
7
|
as: a = "article",
|
|
7
8
|
layout: r = "vertical",
|
|
8
9
|
border: s = !0,
|
|
9
|
-
children:
|
|
10
|
-
className:
|
|
10
|
+
children: d = null,
|
|
11
|
+
className: t,
|
|
11
12
|
...i
|
|
12
13
|
}) => {
|
|
13
14
|
const m = c(
|
|
14
15
|
"card",
|
|
15
16
|
`card--${r}`,
|
|
16
17
|
s && "card--bordered",
|
|
17
|
-
|
|
18
|
+
t
|
|
18
19
|
);
|
|
19
|
-
return /* @__PURE__ */ e
|
|
20
|
-
},
|
|
20
|
+
return /* @__PURE__ */ e(o, { as: a, className: m, ...i, children: d });
|
|
21
|
+
}, N = ({
|
|
21
22
|
children: a,
|
|
22
23
|
className: r,
|
|
23
24
|
position: s,
|
|
24
|
-
...
|
|
25
|
-
}) => /* @__PURE__ */ e
|
|
25
|
+
...d
|
|
26
|
+
}) => /* @__PURE__ */ e(
|
|
26
27
|
o,
|
|
27
28
|
{
|
|
28
|
-
...
|
|
29
|
+
...d,
|
|
29
30
|
as: "figure",
|
|
30
31
|
className: c(
|
|
31
32
|
"card__media",
|
|
@@ -34,30 +35,30 @@ const j = ({
|
|
|
34
35
|
),
|
|
35
36
|
children: a
|
|
36
37
|
}
|
|
37
|
-
),
|
|
38
|
+
), u = ({
|
|
38
39
|
children: a,
|
|
39
40
|
className: r,
|
|
40
41
|
...s
|
|
41
|
-
}) => /* @__PURE__ */ e
|
|
42
|
+
}) => /* @__PURE__ */ e(o, { className: c("card__body", r), ...s, children: a }), B = ({
|
|
42
43
|
children: a,
|
|
43
44
|
className: r,
|
|
44
45
|
...s
|
|
45
|
-
}) => /* @__PURE__ */ e
|
|
46
|
+
}) => /* @__PURE__ */ e(
|
|
46
47
|
o,
|
|
47
48
|
{
|
|
48
49
|
className: c("card__title", "heading-md", r),
|
|
49
50
|
...s,
|
|
50
51
|
children: a
|
|
51
52
|
}
|
|
52
|
-
),
|
|
53
|
+
), g = ({
|
|
53
54
|
children: a,
|
|
54
55
|
className: r,
|
|
55
56
|
...s
|
|
56
|
-
}) => /* @__PURE__ */ e
|
|
57
|
+
}) => /* @__PURE__ */ e(o, { className: c("card__description", r), ...s, children: a }), x = ({
|
|
57
58
|
children: a,
|
|
58
59
|
className: r,
|
|
59
60
|
...s
|
|
60
|
-
}) => /* @__PURE__ */ e
|
|
61
|
+
}) => /* @__PURE__ */ e(
|
|
61
62
|
o,
|
|
62
63
|
{
|
|
63
64
|
className: ["card__footer", r].filter(Boolean).join(" "),
|
|
@@ -66,10 +67,10 @@ const j = ({
|
|
|
66
67
|
}
|
|
67
68
|
);
|
|
68
69
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
f as Card,
|
|
71
|
+
u as CardBody,
|
|
72
|
+
g as CardDescription,
|
|
73
|
+
x as CardFooter,
|
|
74
|
+
N as CardMedia,
|
|
75
|
+
B as CardTitle
|
|
75
76
|
};
|