@cityofportland/components-react 1.0.0-alpha.5 → 1.0.0-alpha.7
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.lib.css +2 -0
- package/dist/alert/{alert.d.ts → alert.lib.d.ts} +29 -15
- package/dist/alert/alert.lib.es.js +64 -0
- package/dist/box/{box.css → box.lib.css} +1 -0
- package/dist/box/{box.d.ts → box.lib.d.ts} +17 -17
- package/dist/box/box.lib.es.js +4 -0
- package/dist/box-B8x1KDnE.js +45 -0
- package/dist/button/button.lib.css +2 -0
- package/dist/button/{button.d.ts → button.lib.d.ts} +15 -46
- package/dist/button/button.lib.es.js +4 -0
- package/dist/button-rc1SIqSI.js +16 -0
- package/dist/card/card.lib.css +2 -0
- package/dist/card/card.lib.d.ts +134 -0
- package/dist/card/card.lib.es.js +44 -0
- package/dist/city-seal/{city-seal.css → city-seal.lib.css} +1 -0
- package/dist/city-seal/city-seal.lib.es.js +4 -0
- package/dist/city-seal-7i9vWvJO.js +11 -0
- package/dist/collection/collection.lib.css +2 -0
- package/dist/collection/collection.lib.d.ts +81 -0
- package/dist/collection/collection.lib.es.js +25 -0
- package/dist/footer/footer.lib.css +2 -0
- package/dist/footer/{footer.d.ts → footer.lib.d.ts} +3 -3
- package/dist/footer/footer.lib.es.js +2615 -0
- package/dist/header/header.lib.css +2 -0
- package/dist/header/{header.d.ts → header.lib.d.ts} +23 -23
- package/dist/header/header.lib.es.js +44 -0
- package/dist/icon/icon.lib.css +2 -0
- package/dist/icon/icon.lib.es.js +4 -0
- package/dist/icon-Du3bCwWr.js +21 -0
- package/dist/input/input.lib.css +2 -0
- package/dist/input/input.lib.d.ts +142 -0
- package/dist/input/input.lib.es.js +46 -0
- package/dist/tag/tag.lib.css +2 -0
- package/dist/tag/tag.lib.es.js +17 -0
- package/dist/utilities/utilities.lib.css +2 -0
- package/dist/utils-D8EDUGI1.js +7 -0
- package/package.json +40 -38
- package/dist/alert/alert.css +0 -1
- package/dist/alert/alert.es.js +0 -88
- package/dist/box/box.es.js +0 -56
- package/dist/button/button.css +0 -1
- package/dist/button/button.es.js +0 -40
- package/dist/card/card.css +0 -1
- package/dist/card/card.d.ts +0 -66
- package/dist/card/card.es.js +0 -75
- package/dist/city-seal/city-seal.es.js +0 -17
- package/dist/footer/footer.css +0 -1
- package/dist/footer/footer.es.js +0 -10987
- package/dist/header/header.css +0 -1
- package/dist/header/header.es.js +0 -44
- package/dist/icon/icon.css +0 -1
- package/dist/icon/icon.es.js +0 -31
- package/dist/index-IqW719eK.js +0 -1484
- package/dist/tag/tag.css +0 -1
- package/dist/tag/tag.es.js +0 -17
- package/dist/utilities/utilities.css +0 -1
- package/dist/utils-DpTd6iI4.js +0 -7
- /package/dist/city-seal/{city-seal.d.ts → city-seal.lib.d.ts} +0 -0
- /package/dist/icon/{icon.d.ts → icon.lib.d.ts} +0 -0
- /package/dist/tag/{tag.d.ts → tag.lib.d.ts} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial}}}@layer components{.alert{border-left-style:var(--tw-border-style);border-left-width:var(--border-width-xl,.5rem);width:100%;padding:var(--spacing-md,1rem);align-items:flex-start;gap:var(--spacing-md,1rem);display:flex}.alert.alert--slim{gap:var(--spacing-xs,.5rem);padding-inline:var(--spacing-md,1rem);padding-block:var(--spacing-xs,.5rem)}.alert.alert--slim .alert__icon img,.alert.alert--slim .alert__icon svg{height:var(--height-600,1.5rem)}.alert .alert__icon{flex-shrink:0;display:inline-flex}.alert .alert__icon img,.alert .alert__icon svg{height:var(--height-1000,2.5rem)}.alert .alert__title{font-size:var(--text-heading-md,.976875rem);--tw-leading:var(--leading-heading-md,1.5rem);line-height:var(--leading-heading-md,1.5rem);--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700);--tw-tracking:0%;letter-spacing:0%;margin-block:var(--spacing-none,0)}.alert--slim :is(.alert .alert__title){display:none}.alert .alert__description{font-size:var(--text-body-md,.976875rem);--tw-leading:var(--leading-body-md,1.5rem);line-height:var(--leading-body-md,1.5rem);--tw-tracking:0%;letter-spacing:0%}.alert .alert__description p+p{margin-top:var(--spacing-sm,.75rem)}.alert .alert__close{cursor:pointer;margin-left:auto;display:inline-flex}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}
|
|
@@ -3,7 +3,12 @@ import { default as default_2 } from 'react';
|
|
|
3
3
|
export declare const Alert: default_2.FC<ReactAlertProps>;
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Available alert
|
|
6
|
+
* Available alert roles based on ARIA specifications
|
|
7
|
+
*/
|
|
8
|
+
declare const ALERT_ROLES: readonly ["status", "alert"];
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Available alert variants based on design system tokens
|
|
7
12
|
*/
|
|
8
13
|
declare const ALERT_SIZES: readonly ["default", "slim"];
|
|
9
14
|
|
|
@@ -16,7 +21,7 @@ export declare const AlertIcon: default_2.FC<default_2.PropsWithChildren<ReactBo
|
|
|
16
21
|
/**
|
|
17
22
|
* Core alert properties shared across all framework implementations
|
|
18
23
|
*/
|
|
19
|
-
declare interface AlertProps {
|
|
24
|
+
declare interface AlertProps extends BoxProps {
|
|
20
25
|
/**
|
|
21
26
|
* Visual style variant of the alert
|
|
22
27
|
* @default "default"
|
|
@@ -27,8 +32,15 @@ declare interface AlertProps {
|
|
|
27
32
|
* @default true
|
|
28
33
|
*/
|
|
29
34
|
dismissible?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* ARIA role for the alert
|
|
37
|
+
* @default "status"
|
|
38
|
+
*/
|
|
39
|
+
role?: AlertRole;
|
|
30
40
|
}
|
|
31
41
|
|
|
42
|
+
declare type AlertRole = (typeof ALERT_ROLES)[number];
|
|
43
|
+
|
|
32
44
|
declare type AlertSize = (typeof ALERT_SIZES)[number];
|
|
33
45
|
|
|
34
46
|
export declare const AlertTitle: default_2.FC<default_2.PropsWithChildren<ReactBoxProps>>;
|
|
@@ -50,12 +62,12 @@ declare type BoxColorVariation = (typeof BOX_VARIANTS)[number];
|
|
|
50
62
|
/**
|
|
51
63
|
* Core box properties shared across all framework implementations
|
|
52
64
|
*/
|
|
53
|
-
declare interface BoxProps {
|
|
65
|
+
declare interface BoxProps<As = string> {
|
|
54
66
|
/**
|
|
55
|
-
*
|
|
67
|
+
* Element type to render the Box as, supplied by each framework implementation.
|
|
56
68
|
* @default "div"
|
|
57
69
|
*/
|
|
58
|
-
as?:
|
|
70
|
+
as?: As;
|
|
59
71
|
/**
|
|
60
72
|
* Color scheme for background and content colors
|
|
61
73
|
*/
|
|
@@ -76,20 +88,22 @@ export declare type ReactAlertProps = default_2.PropsWithChildren<AlertProps & R
|
|
|
76
88
|
}>;
|
|
77
89
|
|
|
78
90
|
/**
|
|
79
|
-
* Props
|
|
91
|
+
* Props handled by Box regardless of the rendered element or component
|
|
80
92
|
*/
|
|
81
|
-
declare type ReactBoxOwnProps<E extends default_2.ElementType
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
* @default "div"
|
|
85
|
-
*/
|
|
86
|
-
as?: E;
|
|
87
|
-
};
|
|
93
|
+
declare type ReactBoxOwnProps<E extends default_2.ElementType, SharedProps> = default_2.PropsWithChildren<Omit<SharedProps, keyof BoxProps> & BoxProps<E> & {
|
|
94
|
+
className?: string;
|
|
95
|
+
}>;
|
|
88
96
|
|
|
89
97
|
/**
|
|
90
98
|
* Polymorphic Box props that merge own props with the element's native props
|
|
91
|
-
*
|
|
99
|
+
* Replaces shared Box fields with React's element-aware fields, then adds native
|
|
100
|
+
* props and refs. Component-specific shared props take priority over native props.
|
|
101
|
+
* NoInfer ensures that only `as` selects the element type.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* type ReactCardProps<E extends React.ElementType = "article"> =
|
|
105
|
+
* ReactBoxProps<E, CardProps>;
|
|
92
106
|
*/
|
|
93
|
-
declare type ReactBoxProps<E extends default_2.ElementType = DefaultElementType> = ReactBoxOwnProps<E> & Omit<default_2.
|
|
107
|
+
declare type ReactBoxProps<E extends default_2.ElementType = DefaultElementType, SharedProps = BoxProps> = ReactBoxOwnProps<E, SharedProps> & Omit<default_2.ComponentPropsWithRef<NoInfer<E>>, keyof ReactBoxOwnProps<E, SharedProps>>;
|
|
94
108
|
|
|
95
109
|
export { }
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { t as o } from "../box-B8x1KDnE.js";
|
|
2
|
+
import { t as L } from "../button-rc1SIqSI.js";
|
|
3
|
+
import { t as h } from "../icon-Du3bCwWr.js";
|
|
4
|
+
import { t as l } from "../utils-D8EDUGI1.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx as a, jsxs as _ } from "react/jsx-runtime";
|
|
7
|
+
var v = {
|
|
8
|
+
name: "xmark",
|
|
9
|
+
comments: ["! 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."],
|
|
10
|
+
width: 640,
|
|
11
|
+
height: 640,
|
|
12
|
+
paths: [{ 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" }]
|
|
13
|
+
}, g = ({ children: t, className: e, ...r }) => /* @__PURE__ */ a(o, {
|
|
14
|
+
className: l(e, "alert__content"),
|
|
15
|
+
...r,
|
|
16
|
+
children: t
|
|
17
|
+
}), k = ({ children: t, className: e, ...r }) => /* @__PURE__ */ a(o, {
|
|
18
|
+
className: l(e, "alert__description"),
|
|
19
|
+
...r,
|
|
20
|
+
children: t
|
|
21
|
+
}), B = ({ as: t = "span", children: e, className: r, ...s }) => /* @__PURE__ */ a(o, {
|
|
22
|
+
as: t,
|
|
23
|
+
className: l(r, "alert__icon"),
|
|
24
|
+
...s,
|
|
25
|
+
children: e
|
|
26
|
+
}), T = ({ as: t = "header", children: e, className: r, ...s }) => /* @__PURE__ */ a(o, {
|
|
27
|
+
as: t,
|
|
28
|
+
className: l(r, "alert__title"),
|
|
29
|
+
...s,
|
|
30
|
+
children: e
|
|
31
|
+
}), j = ({ as: t = "div", color: e, variant: r, size: s = "default", role: m = "status", children: c, dismissible: C = !0, className: f, "aria-label": p = `${e} alert`, onDismiss: i, ...d }) => /* @__PURE__ */ _(o, {
|
|
32
|
+
as: t,
|
|
33
|
+
className: l(f, "alert", `alert--${s}`),
|
|
34
|
+
color: e,
|
|
35
|
+
variant: r,
|
|
36
|
+
role: m,
|
|
37
|
+
"aria-label": p,
|
|
38
|
+
...d,
|
|
39
|
+
children: [c, C ? /* @__PURE__ */ a("span", {
|
|
40
|
+
className: "alert__close",
|
|
41
|
+
children: /* @__PURE__ */ a(L, {
|
|
42
|
+
"aria-label": "Dismiss alert",
|
|
43
|
+
onClick: (u) => {
|
|
44
|
+
const n = u.currentTarget.closest(".alert");
|
|
45
|
+
if (!n) {
|
|
46
|
+
console.warn("Could not find alert to dismiss");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
n.remove(), i && i(n);
|
|
50
|
+
},
|
|
51
|
+
children: /* @__PURE__ */ a(h, {
|
|
52
|
+
icon: v,
|
|
53
|
+
size: "sm"
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
}) : ""]
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
j as Alert,
|
|
60
|
+
g as AlertContent,
|
|
61
|
+
k as AlertDescription,
|
|
62
|
+
B as AlertIcon,
|
|
63
|
+
T as AlertTitle
|
|
64
|
+
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
1
2
|
@layer components{.box{background-color:var(--box-background-color);color:var(--box-text-color);border-color:var(--box-border-color);outline-color:var(--box-outline-color);--tw-ring-color:var(--box-ring-color);--tw-inset-ring-color:var(--box-ring-color)}.box.box--default.box--subtle{--box-background-color:var(--background-color-standard-default-subtle,#fff);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-standard-default-subtle,#dfe1e2);--box-outline-color:var(--outline-color-standard-default-subtle,#dfe1e2);--box-ring-color:var(--ring-color-standard-default-subtle,#dfe1e2)}.box.box--default.box--moderate{--box-background-color:var(--background-color-standard-default-moderate,#f7f9fa);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-standard-default-subtle,#dfe1e2);--box-outline-color:var(--outline-color-standard-default-subtle,#dfe1e2);--box-ring-color:var(--ring-color-standard-default-subtle,#dfe1e2)}.box.box--default.box--emphasis{--box-background-color:var(--background-color-standard-default-emphasis,#dfe1e2);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-standard-default-emphasis,#71767a);--box-outline-color:var(--outline-color-standard-default-emphasis,#71767a);--box-ring-color:var(--ring-color-standard-default-emphasis,#71767a)}.box.box--default.box--strong{--box-background-color:var(--background-color-standard-default-strong,#a9aeb1);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-standard-default-emphasis,#71767a);--box-outline-color:var(--outline-color-standard-default-emphasis,#71767a);--box-ring-color:var(--ring-color-standard-default-emphasis,#71767a)}.box.box--inverse.box--subtle{--box-background-color:var(--background-color-standard-inverse-subtle,#070708);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-standard-inverse-subtle,#71767a);--box-outline-color:var(--outline-color-standard-inverse-subtle,#71767a);--box-ring-color:var(--ring-color-standard-inverse-subtle,#71767a)}.box.box--inverse.box--moderate{--box-background-color:var(--background-color-standard-inverse-moderate,#1c1d1f);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-standard-inverse-subtle,#71767a);--box-outline-color:var(--outline-color-standard-inverse-subtle,#71767a);--box-ring-color:var(--ring-color-standard-inverse-subtle,#71767a)}.box.box--inverse.box--emphasis{--box-background-color:var(--background-color-standard-inverse-emphasis,#565c65);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-standard-inverse-emphasis,#1c1d1f);--box-outline-color:var(--outline-color-standard-inverse-emphasis,#1c1d1f);--box-ring-color:var(--ring-color-standard-inverse-emphasis,#1c1d1f)}.box.box--inverse.box--strong{--box-background-color:var(--background-color-standard-inverse-strong,#a9aeb1);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-standard-inverse-emphasis,#1c1d1f);--box-outline-color:var(--outline-color-standard-inverse-emphasis,#1c1d1f);--box-ring-color:var(--ring-color-standard-inverse-emphasis,#1c1d1f)}.box.box--primary.box--subtle{--box-background-color:var(--background-color-primary-subtle,#d9e8f6);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-primary-subtle,#aacdec);--box-outline-color:var(--outline-color-primary-subtle,#aacdec);--box-ring-color:var(--ring-color-primary-subtle,#aacdec)}.box.box--primary.box--moderate{--box-background-color:var(--background-color-primary-moderate,#005ea2);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-primary-subtle,#aacdec);--box-outline-color:var(--outline-color-primary-subtle,#aacdec);--box-ring-color:var(--ring-color-primary-subtle,#aacdec)}.box.box--primary.box--emphasis{--box-background-color:var(--background-color-primary-emphasis,#274863);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-primary-strong,#1f303e);--box-outline-color:var(--outline-color-primary-strong,#1f303e);--box-ring-color:var(--ring-color-primary-strong,#1f303e)}.box.box--primary.box--strong{--box-background-color:var(--background-color-primary-strong,#1f303e);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-primary-emphasis,#274863);--box-outline-color:var(--outline-color-primary-emphasis,#274863);--box-ring-color:var(--ring-color-primary-emphasis,#274863)}.box.box--secondary.box--subtle{--box-background-color:var(--background-color-secondary-subtle,#f7f9fa);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-secondary-subtle,#a9aeb1);--box-outline-color:var(--outline-color-secondary-subtle,#a9aeb1);--box-ring-color:var(--ring-color-secondary-subtle,#a9aeb1)}.box.box--secondary.box--moderate{--box-background-color:var(--background-color-secondary-moderate,#dfe1e2);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-secondary-subtle,#a9aeb1);--box-outline-color:var(--outline-color-secondary-subtle,#a9aeb1);--box-ring-color:var(--ring-color-secondary-subtle,#a9aeb1)}.box.box--secondary.box--emphasis{--box-background-color:var(--background-color-secondary-emphasis,#a9aeb1);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-secondary-emphasis,#3d4551);--box-outline-color:var(--outline-color-secondary-emphasis,#3d4551);--box-ring-color:var(--ring-color-secondary-emphasis,#3d4551)}.box.box--secondary.box--strong{--box-background-color:var(--background-color-secondary-strong,#71767a);--box-text-color:var(--text-color-standard-fixed-light,#fff);--box-border-color:var(--border-color-secondary-emphasis,#3d4551);--box-outline-color:var(--outline-color-secondary-emphasis,#3d4551);--box-ring-color:var(--ring-color-secondary-emphasis,#3d4551)}.box.box--success.box--subtle{--box-background-color:var(--background-color-success-subtle,#eaf4dd);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-success-subtle,#b8d293);--box-outline-color:var(--outline-color-success-subtle,#b8d293);--box-ring-color:var(--ring-color-success-subtle,#b8d293)}.box.box--success.box--moderate{--box-background-color:var(--background-color-success-moderate,#b8d293);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-success-moderate,#719f2a);--box-outline-color:var(--outline-color-success-moderate,#719f2a);--box-ring-color:var(--ring-color-success-moderate,#719f2a)}.box.box--success.box--emphasis{--box-background-color:var(--background-color-success-emphasis,#719f2a);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-success-emphasis,#466c04);--box-outline-color:var(--outline-color-success-emphasis,#466c04);--box-ring-color:var(--ring-color-success-emphasis,#466c04)}.box.box--success.box--strong{--box-background-color:var(--background-color-success-strong,#466c04);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-success-strong,#243413);--box-outline-color:var(--outline-color-success-strong,#243413);--box-ring-color:var(--ring-color-success-strong,#243413)}.box.box--danger.box--subtle{--box-background-color:var(--background-color-danger-subtle,#f3e1e4);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-danger-subtle,#fd8ba0);--box-outline-color:var(--outline-color-danger-subtle,#fd8ba0);--box-ring-color:var(--ring-color-danger-subtle,#fd8ba0)}.box.box--danger.box--moderate{--box-background-color:var(--background-color-danger-moderate,#fd8ba0);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-danger-moderate,#b41d39);--box-outline-color:var(--outline-color-danger-moderate,#b41d39);--box-ring-color:var(--ring-color-danger-moderate,#b41d39)}.box.box--danger.box--emphasis{--box-background-color:var(--background-color-danger-emphasis,#b41d39);--box-text-color:var(--text-color-standard-fixed-light,#fff);--box-border-color:var(--border-color-danger-emphasis,#832133);--box-outline-color:var(--outline-color-danger-emphasis,#832133);--box-ring-color:var(--ring-color-danger-emphasis,#832133)}.box.box--danger.box--strong{--box-background-color:var(--background-color-danger-strong,#4f1c24);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-danger-strong,#832133);--box-outline-color:var(--outline-color-danger-strong,#832133);--box-ring-color:var(--ring-color-danger-strong,#832133)}.box.box--warning.box--subtle{--box-background-color:var(--background-color-warning-subtle,#fef0c8);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-warning-moderate,#ffbe2e);--box-outline-color:var(--outline-color-warning-moderate,#ffbe2e);--box-ring-color:var(--ring-color-warning-moderate,#ffbe2e)}.box.box--warning.box--moderate{--box-background-color:var(--background-color-warning-moderate,#ffe396);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-warning-moderate,#ffbe2e);--box-outline-color:var(--outline-color-warning-moderate,#ffbe2e);--box-ring-color:var(--ring-color-warning-moderate,#ffbe2e)}.box.box--warning.box--emphasis{--box-background-color:var(--background-color-warning-emphasis,#ffbe2e);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-warning-emphasis,#c2850c);--box-outline-color:var(--outline-color-warning-emphasis,#c2850c);--box-ring-color:var(--ring-color-warning-emphasis,#c2850c)}.box.box--warning.box--strong{--box-background-color:var(--background-color-warning-strong,#3b2b15);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-warning-strong,#7a591a);--box-outline-color:var(--outline-color-warning-strong,#7a591a);--box-ring-color:var(--ring-color-warning-strong,#7a591a)}.box.box--info.box--subtle{--box-background-color:var(--background-color-info-subtle,#e7f6f8);--box-text-color:var(--text-color-standard-default-strong,#070708);--box-border-color:var(--border-color-info-subtle,#99deea);--box-outline-color:var(--outline-color-info-subtle,#99deea);--box-ring-color:var(--ring-color-info-subtle,#99deea)}.box.box--info.box--moderate{--box-background-color:var(--background-color-info-moderate,#99deea);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-info-emphasis,#449dac);--box-outline-color:var(--outline-color-info-emphasis,#449dac);--box-ring-color:var(--ring-color-info-emphasis,#449dac)}.box.box--info.box--emphasis{--box-background-color:var(--background-color-info-emphasis,#5dc0d1);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-info-emphasis,#449dac);--box-outline-color:var(--outline-color-info-emphasis,#449dac);--box-ring-color:var(--ring-color-info-emphasis,#449dac)}.box.box--info.box--strong{--box-background-color:var(--background-color-info-strong,#168092);--box-text-color:var(--text-color-standard-inverse-subtle,#fff);--box-border-color:var(--border-color-info-moderate,#5dc0d1);--box-outline-color:var(--outline-color-info-moderate,#5dc0d1);--box-ring-color:var(--ring-color-info-moderate,#5dc0d1)}.box.box--disabled.box--subtle{--box-background-color:var(--background-color-disabled-subtle,#f7f9fa);--box-text-color:var(--text-color-disabled-strong,#2d2e2f);--box-border-color:var(--border-color-disabled-subtle,#dfe1e2);--box-outline-color:var(--outline-color-disabled-subtle,#dfe1e2);--box-ring-color:var(--ring-color-disabled-subtle,#dfe1e2)}.box.box--disabled.box--moderate{--box-background-color:var(--background-color-disabled-moderate,#dfe1e2);--box-text-color:var(--text-color-disabled-strong,#2d2e2f);--box-border-color:var(--border-color-disabled-moderate,#a9aeb1);--box-outline-color:var(--outline-color-disabled-moderate,#a9aeb1);--box-ring-color:var(--ring-color-disabled-moderate,#a9aeb1)}.box.box--disabled.box--emphasis{--box-background-color:var(--background-color-disabled-emphasis,#a9aeb1);--box-text-color:var(--text-color-disabled-strong,#2d2e2f);--box-border-color:var(--border-color-disabled-emphasis,#8d9297);--box-outline-color:var(--outline-color-disabled-emphasis,#8d9297);--box-ring-color:var(--ring-color-disabled-emphasis,#8d9297)}.box.box--disabled.box--strong{--box-background-color:var(--background-color-disabled-strong,#565c65);--box-text-color:var(--text-color-disabled-subtle,#dfe1e2);--box-border-color:var(--border-color-disabled-emphasis,#8d9297);--box-outline-color:var(--outline-color-disabled-emphasis,#8d9297);--box-ring-color:var(--ring-color-disabled-emphasis,#8d9297)}.box.box--fixed.box--light{--box-background-color:var(--background-color-fixed-light,#fff);--box-text-color:var(--text-color-standard-fixed-dark,#070708);--box-border-color:var(--border-color-fixed-light,#fff);--box-outline-color:var(--outline-color-fixed-light,#fff);--box-ring-color:var(--ring-color-fixed-light,#fff)}.box.box--fixed.box--dark{--box-background-color:var(--background-color-fixed-dark,#070708);--box-text-color:var(--text-color-standard-fixed-light,#fff);--box-border-color:var(--border-color-fixed-dark,#070708);--box-outline-color:var(--outline-color-fixed-dark,#070708);--box-ring-color:var(--ring-color-fixed-dark,#070708)}}
|
|
@@ -39,21 +39,19 @@ declare type BoxColorScheme = (typeof BOX_COLORS)[number];
|
|
|
39
39
|
declare type BoxColorVariation = (typeof BOX_VARIANTS)[number];
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* Generic Box component type
|
|
42
|
+
* Generic Box component type with element-specific props and refs
|
|
43
43
|
*/
|
|
44
|
-
export declare type BoxComponent = <E extends default_2.ElementType = DefaultElementType>(props: ReactBoxProps<E>
|
|
45
|
-
ref?: default_2.Ref<HTMLElement> | undefined;
|
|
46
|
-
}) => default_2.ReactNode;
|
|
44
|
+
export declare type BoxComponent = <E extends default_2.ElementType = DefaultElementType>(props: ReactBoxProps<E>) => default_2.ReactNode;
|
|
47
45
|
|
|
48
46
|
/**
|
|
49
47
|
* Core box properties shared across all framework implementations
|
|
50
48
|
*/
|
|
51
|
-
declare interface BoxProps {
|
|
49
|
+
declare interface BoxProps<As = string> {
|
|
52
50
|
/**
|
|
53
|
-
*
|
|
51
|
+
* Element type to render the Box as, supplied by each framework implementation.
|
|
54
52
|
* @default "div"
|
|
55
53
|
*/
|
|
56
|
-
as?:
|
|
54
|
+
as?: As;
|
|
57
55
|
/**
|
|
58
56
|
* Color scheme for background and content colors
|
|
59
57
|
*/
|
|
@@ -70,20 +68,22 @@ declare interface BoxProps {
|
|
|
70
68
|
declare type DefaultElementType = "div";
|
|
71
69
|
|
|
72
70
|
/**
|
|
73
|
-
* Props
|
|
71
|
+
* Props handled by Box regardless of the rendered element or component
|
|
74
72
|
*/
|
|
75
|
-
declare type ReactBoxOwnProps<E extends default_2.ElementType
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
* @default "div"
|
|
79
|
-
*/
|
|
80
|
-
as?: E;
|
|
81
|
-
};
|
|
73
|
+
declare type ReactBoxOwnProps<E extends default_2.ElementType, SharedProps> = default_2.PropsWithChildren<Omit<SharedProps, keyof BoxProps> & BoxProps<E> & {
|
|
74
|
+
className?: string;
|
|
75
|
+
}>;
|
|
82
76
|
|
|
83
77
|
/**
|
|
84
78
|
* Polymorphic Box props that merge own props with the element's native props
|
|
85
|
-
*
|
|
79
|
+
* Replaces shared Box fields with React's element-aware fields, then adds native
|
|
80
|
+
* props and refs. Component-specific shared props take priority over native props.
|
|
81
|
+
* NoInfer ensures that only `as` selects the element type.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* type ReactCardProps<E extends React.ElementType = "article"> =
|
|
85
|
+
* ReactBoxProps<E, CardProps>;
|
|
86
86
|
*/
|
|
87
|
-
export declare type ReactBoxProps<E extends default_2.ElementType = DefaultElementType> = ReactBoxOwnProps<E> & Omit<default_2.
|
|
87
|
+
export declare type ReactBoxProps<E extends default_2.ElementType = DefaultElementType, SharedProps = BoxProps> = ReactBoxOwnProps<E, SharedProps> & Omit<default_2.ComponentPropsWithRef<NoInfer<E>>, keyof ReactBoxOwnProps<E, SharedProps>>;
|
|
88
88
|
|
|
89
89
|
export { }
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { t as f } from "./utils-D8EDUGI1.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
4
|
+
var o = [
|
|
5
|
+
"subtle",
|
|
6
|
+
"moderate",
|
|
7
|
+
"emphasis",
|
|
8
|
+
"strong"
|
|
9
|
+
], d = /* @__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
|
+
]), v = (e, s) => {
|
|
21
|
+
const i = [e, s];
|
|
22
|
+
return !e || !s ? [void 0, void 0] : d.has(e) ? d.get(e)?.includes(s) ? i : (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]);
|
|
23
|
+
};
|
|
24
|
+
function x({ className: e = "", color: s, variant: i }) {
|
|
25
|
+
const t = ["box"];
|
|
26
|
+
return s && i && t.push(s ? `box--${s}` : "", i ? `box--${i}` : ""), f(...t, e);
|
|
27
|
+
}
|
|
28
|
+
var A = ({ as: e, ref: s, children: i, color: t, variant: r, className: a, ...m }) => {
|
|
29
|
+
const u = e ?? "div";
|
|
30
|
+
[t, r] = v(t, r);
|
|
31
|
+
const n = x({
|
|
32
|
+
className: a,
|
|
33
|
+
color: t,
|
|
34
|
+
variant: r
|
|
35
|
+
});
|
|
36
|
+
return /* @__PURE__ */ l(u, {
|
|
37
|
+
ref: s,
|
|
38
|
+
className: n.length ? n : void 0,
|
|
39
|
+
...m,
|
|
40
|
+
children: i
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
A as t
|
|
45
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid}}}@layer components{.button{--button-action-factor:.85}@media (prefers-color-scheme:dark){.button{--button-action-factor:1.15}}.button{--button-action-color:oklch(from var(--box-background-color) calc(l * var(--button-action-factor)) calc(c * var(--button-action-factor)) h);justify-content:center;align-items:center;gap:var(--spacing-xs,.5rem);overflow-wrap:anywhere;vertical-align:bottom;cursor:pointer;max-width:100%;transition-property:background-color,box-shadow,--tw-ring-offset-color,--tw-ring-offset-width;transition-timing-function:var(--tw-ease,ease);transition-duration:var(--tw-duration,0s);--tw-duration:.2s;--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);--tw-ring-offset-color:var(--box-background-color);transition-duration:.2s;display:inline-flex}.button:focus,.button:focus-visible{outline-style:var(--tw-outline-style);outline-width:var(--outline-width-lg,.25rem);outline-offset:var(--outline-offset-2xs,.25rem)}.button.button--disabled,.button:disabled{background-color:var(--background-color-disabled-moderate,#dfe1e2);color:var(--text-color-disabled-emphasis,#a9aeb1);cursor:not-allowed}.button:not(.button--disabled,:disabled):active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}@media (hover:hover){.button:not(.button--disabled,:disabled):hover{--tw-ring-offset-width:var(--ring-offset-width-3xs,.125rem);--tw-ring-offset-shadow:var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-offset-color:var(--button-action-color)}.button:not(.button--disabled,:disabled):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.button:not(.button--disabled,:disabled):not(.button--outline){--tw-ring-color:var(--button-action-color)}.button:not(.button--disabled,:disabled):not(.button--outline):active{background-color:var(--button-action-color)}@media (hover:hover){.button:not(.button--disabled,:disabled):not(.button--outline):hover,.button:not(.button--disabled,:disabled):not(.button--outline):hover:active{background-color:var(--button-action-color)}}.button.button--outline{color:inherit;--tw-inset-ring-color:var(--box-background-color);--tw-ring-offset-color:var(--box-background-color);background-color:#0000}.button.button--outline:active{--tw-ring-offset-width:var(--ring-offset-width-3xs,.125rem);--tw-ring-offset-shadow:var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-inset-ring-color:var(--button-action-color)}.button.button--outline.button--disabled,.button.button--outline:disabled{background-color:var(--background-color-disabled-moderate,#dfe1e2);color:var(--text-color-disabled-emphasis,#a9aeb1);cursor:not-allowed}.button.button--outline:not(.button--disabled,:disabled){--tw-inset-ring-shadow:inset 0 0 0 var(--ring-width-md,.125rem) var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}@media (hover:hover){.button.button--outline:not(.button--disabled,:disabled):hover{--tw-inset-ring-color:var(--button-action-color)}.button.button--outline:not(.button--disabled,:disabled):hover:active{--tw-ring-offset-width:var(--ring-offset-width-2xs,.25rem);--tw-ring-offset-shadow:var(--tw-ring-inset, ) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.button.button--3xs{padding-inline:var(--spacing-3xs,.125rem)}.button.button--2xs{padding-inline:var(--spacing-2xs,.25rem)}.button.button--xs{padding-inline:var(--spacing-xs,.5rem);padding-block:var(--spacing-3xs,.125rem)}.button.button--sm{padding-inline:var(--spacing-sm,.75rem);padding-block:var(--spacing-2xs,.25rem)}.button.button--md{padding-inline:var(--spacing-md,1rem);padding-block:var(--spacing-xs,.5rem)}.button.button--lg{padding-inline:var(--spacing-lg,1.25rem);padding-block:var(--spacing-sm,.75rem)}.button.button--xl{padding-inline:var(--spacing-xl,1.5rem);padding-block:var(--spacing-md,1rem)}.button.button--2xl{padding-inline:var(--spacing-2xl,2rem);padding-block:var(--spacing-lg,1.25rem)}.button.button--3xl{padding-inline:var(--spacing-3xl,2.5rem);padding-block:var(--spacing-xl,1.5rem)}.button.button--4xl{padding-inline:var(--spacing-4xl,3.5rem);padding-block:var(--spacing-2xl,2rem)}.button.button--5xl{padding-inline:var(--spacing-5xl,4rem);padding-block:var(--spacing-3xl,2.5rem)}}@property --tw-duration{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}
|
|
@@ -5,38 +5,24 @@ import { default as default_2 } from 'react';
|
|
|
5
5
|
*/
|
|
6
6
|
declare const BOX_COLORS: readonly ["default", "inverse", "primary", "secondary", "success", "danger", "warning", "info", "fixed", "disabled", "fixed"];
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Available color schemes based on design system color tokens
|
|
10
|
-
*/
|
|
11
|
-
declare const BOX_COLORS_2: readonly ["default", "inverse", "primary", "secondary", "success", "danger", "warning", "info", "fixed", "disabled", "fixed"];
|
|
12
|
-
|
|
13
8
|
/**
|
|
14
9
|
* Available color variations based on design system tokens
|
|
15
10
|
*/
|
|
16
11
|
declare const BOX_VARIANTS: readonly ["subtle", "moderate", "emphasis", "strong", "light", "dark"];
|
|
17
12
|
|
|
18
|
-
/**
|
|
19
|
-
* Available color variations based on design system tokens
|
|
20
|
-
*/
|
|
21
|
-
declare const BOX_VARIANTS_2: readonly ["subtle", "moderate", "emphasis", "strong", "light", "dark"];
|
|
22
|
-
|
|
23
13
|
declare type BoxColorScheme = (typeof BOX_COLORS)[number];
|
|
24
14
|
|
|
25
|
-
declare type BoxColorScheme_2 = (typeof BOX_COLORS_2)[number];
|
|
26
|
-
|
|
27
15
|
declare type BoxColorVariation = (typeof BOX_VARIANTS)[number];
|
|
28
16
|
|
|
29
|
-
declare type BoxColorVariation_2 = (typeof BOX_VARIANTS_2)[number];
|
|
30
|
-
|
|
31
17
|
/**
|
|
32
18
|
* Core box properties shared across all framework implementations
|
|
33
19
|
*/
|
|
34
|
-
declare interface BoxProps {
|
|
20
|
+
declare interface BoxProps<As = string> {
|
|
35
21
|
/**
|
|
36
|
-
*
|
|
22
|
+
* Element type to render the Box as, supplied by each framework implementation.
|
|
37
23
|
* @default "div"
|
|
38
24
|
*/
|
|
39
|
-
as?:
|
|
25
|
+
as?: As;
|
|
40
26
|
/**
|
|
41
27
|
* Color scheme for background and content colors
|
|
42
28
|
*/
|
|
@@ -47,25 +33,6 @@ declare interface BoxProps {
|
|
|
47
33
|
variant?: BoxColorVariation;
|
|
48
34
|
}
|
|
49
35
|
|
|
50
|
-
/**
|
|
51
|
-
* Core box properties shared across all framework implementations
|
|
52
|
-
*/
|
|
53
|
-
declare interface BoxProps_2 {
|
|
54
|
-
/**
|
|
55
|
-
* HTML element type to render the Box as. Defaults to 'div'.
|
|
56
|
-
* @default "div"
|
|
57
|
-
*/
|
|
58
|
-
as?: keyof HTMLElementTagNameMap;
|
|
59
|
-
/**
|
|
60
|
-
* Color scheme for background and content colors
|
|
61
|
-
*/
|
|
62
|
-
color?: BoxColorScheme_2;
|
|
63
|
-
/**
|
|
64
|
-
* Color variation within the chosen color scheme
|
|
65
|
-
*/
|
|
66
|
-
variant?: BoxColorVariation_2;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
36
|
export declare const Button: <T extends ButtonElementType = typeof DefaultElementType>({ as, children, size, outline, disabled, className, ...props }: ReactButtonProps<T>) => default_2.JSX.Element;
|
|
70
37
|
|
|
71
38
|
declare type ButtonElementType = "button" | "a";
|
|
@@ -103,21 +70,23 @@ declare const DefaultElementType: ButtonElementType;
|
|
|
103
70
|
declare type DefaultElementType_2 = "div";
|
|
104
71
|
|
|
105
72
|
/**
|
|
106
|
-
* Props
|
|
73
|
+
* Props handled by Box regardless of the rendered element or component
|
|
107
74
|
*/
|
|
108
|
-
declare type ReactBoxOwnProps<E extends default_2.ElementType
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
* @default "div"
|
|
112
|
-
*/
|
|
113
|
-
as?: E;
|
|
114
|
-
};
|
|
75
|
+
declare type ReactBoxOwnProps<E extends default_2.ElementType, SharedProps> = default_2.PropsWithChildren<Omit<SharedProps, keyof BoxProps> & BoxProps<E> & {
|
|
76
|
+
className?: string;
|
|
77
|
+
}>;
|
|
115
78
|
|
|
116
79
|
/**
|
|
117
80
|
* Polymorphic Box props that merge own props with the element's native props
|
|
118
|
-
*
|
|
81
|
+
* Replaces shared Box fields with React's element-aware fields, then adds native
|
|
82
|
+
* props and refs. Component-specific shared props take priority over native props.
|
|
83
|
+
* NoInfer ensures that only `as` selects the element type.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* type ReactCardProps<E extends React.ElementType = "article"> =
|
|
87
|
+
* ReactBoxProps<E, CardProps>;
|
|
119
88
|
*/
|
|
120
|
-
declare type ReactBoxProps<E extends default_2.ElementType = DefaultElementType_2> = ReactBoxOwnProps<E> & Omit<default_2.
|
|
89
|
+
declare type ReactBoxProps<E extends default_2.ElementType = DefaultElementType_2, SharedProps = BoxProps> = ReactBoxOwnProps<E, SharedProps> & Omit<default_2.ComponentPropsWithRef<NoInfer<E>>, keyof ReactBoxOwnProps<E, SharedProps>>;
|
|
121
90
|
|
|
122
91
|
export declare type ReactButtonProps<T extends ButtonElementType = typeof DefaultElementType> = default_2.PropsWithChildren<ButtonOwnProps & ReactBoxProps<T>>;
|
|
123
92
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { t as l } from "./utils-D8EDUGI1.js";
|
|
2
|
+
import { t as m } from "./box-B8x1KDnE.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
var f = "button", v = ({ as: r, children: a = null, size: o, outline: e = !1, disabled: t = !1, className: s, ...u }) => /* @__PURE__ */ n(m, {
|
|
6
|
+
as: r ?? f,
|
|
7
|
+
className: l("button", o && `button--${o}`, t && "button--disabled", e && "button--outline", s),
|
|
8
|
+
disabled: t,
|
|
9
|
+
"aria-disabled": t ? "true" : "false",
|
|
10
|
+
role: "button",
|
|
11
|
+
...u,
|
|
12
|
+
children: a
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
v as t
|
|
16
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial}}}@layer components{.card{border-radius:var(--radius-lg,.5rem);gap:var(--spacing-lg,1.25rem);flex-direction:column;display:flex}.card.card--bordered{--tw-inset-ring-shadow:inset 0 0 0 var(--ring-width-md,.125rem) var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);padding:var(--spacing-md,1rem)}.card:not(.card--bordered){--box-background-color:revert!important;--box-text-color:revert!important;--box-border-color:revert!important;--box-outline-color:revert!important;--box-ring-color:revert!important}.card .card__body{gap:var(--spacing-sm,.75rem);flex-direction:column;flex-grow:1;align-self:stretch;display:flex}.card .card__body .card__description{flex:auto}.card .card__body .card__footer{margin-top:auto}.card .card__body .card__title{font-size:var(--text-heading-md,.976875rem);--tw-leading:var(--leading-heading-md,1.5rem);line-height:var(--leading-heading-md,1.5rem);--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700);--tw-tracking:0%;letter-spacing:0%}.card .card__media{flex:none;display:flex}.card .card__media>img,.card .card__media video{border-radius:var(--radius-lg,.5rem);object-fit:cover;object-position:center;aspect-ratio:2;width:100%;max-width:100%;height:auto;max-height:100%}@container (width>=30rem){.card.card--horizontal{flex-direction:row;align-items:flex-start}.card.card--horizontal:not(.card--bordered) .card__body{padding-top:var(--spacing-xs,.5rem)}.card.card--horizontal:not(.card--bordered):has(.card__media--left) .card__body{padding-left:var(--spacing-none,0)}.card.card--horizontal:not(.card--bordered):has(.card__media--right) .card__body{padding-right:var(--spacing-none,0)}.card.card--horizontal .card__media{max-width:33.3333%}.card.card--horizontal .card__media>img,.card.card--horizontal .card__media>video{aspect-ratio:4/3}.card.card--horizontal .card__media.card__media--left{order:-9999}.card.card--horizontal .card__media.card__media--right{order:9999}}.card.card--vertical{flex-direction:column}.card.card--vertical .card__media>img,.card.card--vertical .card__media video{aspect-ratio:2}}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Available color schemes based on design system color tokens
|
|
5
|
+
*/
|
|
6
|
+
declare const BOX_COLORS: readonly ["default", "inverse", "primary", "secondary", "success", "danger", "warning", "info", "fixed", "disabled", "fixed"];
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Available color variations based on design system tokens
|
|
10
|
+
*/
|
|
11
|
+
declare const BOX_VARIANTS: readonly ["subtle", "moderate", "emphasis", "strong", "light", "dark"];
|
|
12
|
+
|
|
13
|
+
declare type BoxColorScheme = (typeof BOX_COLORS)[number];
|
|
14
|
+
|
|
15
|
+
declare type BoxColorVariation = (typeof BOX_VARIANTS)[number];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Core box properties shared across all framework implementations
|
|
19
|
+
*/
|
|
20
|
+
declare interface BoxProps<As = string> {
|
|
21
|
+
/**
|
|
22
|
+
* Element type to render the Box as, supplied by each framework implementation.
|
|
23
|
+
* @default "div"
|
|
24
|
+
*/
|
|
25
|
+
as?: As;
|
|
26
|
+
/**
|
|
27
|
+
* Color scheme for background and content colors
|
|
28
|
+
*/
|
|
29
|
+
color?: BoxColorScheme;
|
|
30
|
+
/**
|
|
31
|
+
* Color variation within the chosen color scheme
|
|
32
|
+
*/
|
|
33
|
+
variant?: BoxColorVariation;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare function Card({ as, layout, border, children, className, ...props }: ReactCardProps<default_2.ElementType>): default_2.JSX.Element;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Available card layouts based on design system layout options
|
|
40
|
+
*/
|
|
41
|
+
declare const CARD_LAYOUTS: readonly ["horizontal", "vertical"];
|
|
42
|
+
|
|
43
|
+
export declare const CardBody: default_2.FC<ReactCardBodyProps>;
|
|
44
|
+
|
|
45
|
+
export declare const CardDescription: default_2.FC<ReactCardDescriptionProps>;
|
|
46
|
+
|
|
47
|
+
export declare const CardFooter: default_2.FC<ReactCardFooterProps>;
|
|
48
|
+
|
|
49
|
+
declare type CardLayout = (typeof CARD_LAYOUTS)[number];
|
|
50
|
+
|
|
51
|
+
export declare const CardMedia: default_2.FC<ReactCardMediaProps>;
|
|
52
|
+
|
|
53
|
+
declare interface CardMediaProps extends BoxProps {
|
|
54
|
+
/**
|
|
55
|
+
* Position of the media within the card
|
|
56
|
+
* @default "left"
|
|
57
|
+
*/
|
|
58
|
+
position?: MediaPosition;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Core card properties shared across all framework implementations
|
|
63
|
+
*/
|
|
64
|
+
declare interface CardProps extends BoxProps {
|
|
65
|
+
/**
|
|
66
|
+
* Whether the card has a border or not
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
border?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Layout of the card
|
|
72
|
+
* @default "vertical"
|
|
73
|
+
*/
|
|
74
|
+
layout?: CardLayout;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export declare const CardTitle: default_2.FC<ReactCardTitleProps>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Default HTML element type for the Box component
|
|
81
|
+
*/
|
|
82
|
+
declare type DefaultElementType = "div";
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Available media positions for horizontal cards based on design system layout options
|
|
86
|
+
*/
|
|
87
|
+
declare const MEDIA_POSITIONS: readonly ["left", "right"];
|
|
88
|
+
|
|
89
|
+
declare type MediaPosition = (typeof MEDIA_POSITIONS)[number];
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Props handled by Box regardless of the rendered element or component
|
|
93
|
+
*/
|
|
94
|
+
declare type ReactBoxOwnProps<E extends default_2.ElementType, SharedProps> = default_2.PropsWithChildren<Omit<SharedProps, keyof BoxProps> & BoxProps<E> & {
|
|
95
|
+
className?: string;
|
|
96
|
+
}>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Polymorphic Box props that merge own props with the element's native props
|
|
100
|
+
* Replaces shared Box fields with React's element-aware fields, then adds native
|
|
101
|
+
* props and refs. Component-specific shared props take priority over native props.
|
|
102
|
+
* NoInfer ensures that only `as` selects the element type.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* type ReactCardProps<E extends React.ElementType = "article"> =
|
|
106
|
+
* ReactBoxProps<E, CardProps>;
|
|
107
|
+
*/
|
|
108
|
+
declare type ReactBoxProps<E extends default_2.ElementType = DefaultElementType, SharedProps = BoxProps> = ReactBoxOwnProps<E, SharedProps> & Omit<default_2.ComponentPropsWithRef<NoInfer<E>>, keyof ReactBoxOwnProps<E, SharedProps>>;
|
|
109
|
+
|
|
110
|
+
export declare type ReactCardBodyProps = default_2.PropsWithChildren<ReactBoxProps & {
|
|
111
|
+
className?: string;
|
|
112
|
+
}>;
|
|
113
|
+
|
|
114
|
+
export declare type ReactCardDescriptionProps = default_2.PropsWithChildren<ReactBoxProps & {
|
|
115
|
+
className?: string;
|
|
116
|
+
}>;
|
|
117
|
+
|
|
118
|
+
export declare type ReactCardFooterProps = default_2.PropsWithChildren<ReactBoxProps & {
|
|
119
|
+
className?: string;
|
|
120
|
+
}>;
|
|
121
|
+
|
|
122
|
+
export declare type ReactCardMediaProps = default_2.PropsWithChildren<CardMediaProps & {
|
|
123
|
+
className?: string;
|
|
124
|
+
}>;
|
|
125
|
+
|
|
126
|
+
export declare type ReactCardProps<E extends default_2.ElementType = "article"> = ReactBoxProps<E, CardProps> & {
|
|
127
|
+
children: default_2.ReactNode;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export declare type ReactCardTitleProps = default_2.PropsWithChildren<ReactBoxProps & {
|
|
131
|
+
className?: string;
|
|
132
|
+
}>;
|
|
133
|
+
|
|
134
|
+
export { }
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { t as d } from "../box-B8x1KDnE.js";
|
|
2
|
+
import { t as s } from "../utils-D8EDUGI1.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
6
|
+
function v({ as: a = "article", layout: r = "vertical", border: e = !0, children: c = null, className: t, ...i }) {
|
|
7
|
+
const m = s("card", `card--${r}`, e && "card--bordered", t);
|
|
8
|
+
return /* @__PURE__ */ o(d, {
|
|
9
|
+
as: a,
|
|
10
|
+
className: m,
|
|
11
|
+
...i,
|
|
12
|
+
children: c
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
var N = ({ children: a, className: r, position: e, ...c }) => /* @__PURE__ */ o(d, {
|
|
16
|
+
...c,
|
|
17
|
+
as: "figure",
|
|
18
|
+
className: s("card__media", `card__media--${e}`, r),
|
|
19
|
+
children: a
|
|
20
|
+
}), u = ({ children: a, className: r, ...e }) => /* @__PURE__ */ o(d, {
|
|
21
|
+
className: s("card__body", r),
|
|
22
|
+
...e,
|
|
23
|
+
children: a
|
|
24
|
+
}), g = ({ children: a, className: r, ...e }) => /* @__PURE__ */ o(d, {
|
|
25
|
+
className: s("card__title", "heading-md", r),
|
|
26
|
+
...e,
|
|
27
|
+
children: a
|
|
28
|
+
}), x = ({ children: a, className: r, ...e }) => /* @__PURE__ */ o(d, {
|
|
29
|
+
className: s("card__description", r),
|
|
30
|
+
...e,
|
|
31
|
+
children: a
|
|
32
|
+
}), B = ({ children: a, className: r, ...e }) => /* @__PURE__ */ o(d, {
|
|
33
|
+
className: ["card__footer", r].filter(Boolean).join(" "),
|
|
34
|
+
...e,
|
|
35
|
+
children: a
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
v as Card,
|
|
39
|
+
u as CardBody,
|
|
40
|
+
x as CardDescription,
|
|
41
|
+
B as CardFooter,
|
|
42
|
+
N as CardMedia,
|
|
43
|
+
g as CardTitle
|
|
44
|
+
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
1
2
|
@layer components{.city-seal{width:auto;display:inline-flex}.city-seal.city-seal--xl,.city-seal.city-seal--xl>svg{height:var(--height-3000,7.5rem)}.city-seal.city-seal--lg,.city-seal.city-seal--lg>svg{height:var(--height-2000,5rem)}.city-seal.city-seal--sm,.city-seal.city-seal--sm>svg{height:var(--height-1400,3.5rem)}}
|