@syscore/ui-library 2.0.0-beta-publish-workflow-beta.23 → 2.0.0-beta-publish-workflow-beta.24
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/client/components/ui/card.tsx +16 -4
- package/client/components/ui/resource-thumbnail.tsx +20 -1
- package/client/global.css +64 -0
- package/dist/client/components/ui/card.js +16 -3
- package/dist/client/components/ui/resource-thumbnail.js +16 -1
- package/dist/index.cjs +1 -1
- package/package.json +1 -1
|
@@ -81,11 +81,18 @@ CardHeader.displayName = "CardHeader";
|
|
|
81
81
|
|
|
82
82
|
const CardTitle = React.forwardRef<
|
|
83
83
|
HTMLParagraphElement,
|
|
84
|
-
React.HTMLAttributes<HTMLHeadingElement>
|
|
85
|
-
|
|
84
|
+
React.HTMLAttributes<HTMLHeadingElement> & {
|
|
85
|
+
/** `compact` — a smaller title for dense card grids (e.g. a catalog card), below heading-xxsmall. */
|
|
86
|
+
size?: "default" | "compact";
|
|
87
|
+
}
|
|
88
|
+
>(({ className, size = "default", ...props }, ref) => (
|
|
86
89
|
<h3
|
|
87
90
|
ref={ref}
|
|
88
|
-
className={cn(
|
|
91
|
+
className={cn(
|
|
92
|
+
"card-title",
|
|
93
|
+
size === "compact" ? "card-title--compact" : "heading-xxsmall",
|
|
94
|
+
className,
|
|
95
|
+
)}
|
|
89
96
|
{...props}
|
|
90
97
|
/>
|
|
91
98
|
));
|
|
@@ -140,7 +147,12 @@ const CardMedia = React.forwardRef<
|
|
|
140
147
|
HTMLDivElement,
|
|
141
148
|
React.HTMLAttributes<HTMLDivElement> & { src?: string; alt?: string; height?: number }
|
|
142
149
|
>(({ className, src, alt = "", height = 200, children, ...props }, ref) => (
|
|
143
|
-
<div
|
|
150
|
+
<div
|
|
151
|
+
ref={ref}
|
|
152
|
+
className={cn("card-media", !src && "card-media--placeholder", className)}
|
|
153
|
+
style={{ height }}
|
|
154
|
+
{...props}
|
|
155
|
+
>
|
|
144
156
|
{src ? (
|
|
145
157
|
<img src={src} alt={alt} className="card-media__img" />
|
|
146
158
|
) : (
|
|
@@ -2,20 +2,39 @@ import * as React from "react";
|
|
|
2
2
|
import { cn } from "@/lib/utils";
|
|
3
3
|
|
|
4
4
|
export interface ResourceThumbnailProps {
|
|
5
|
-
|
|
5
|
+
/** Omit to render the placeholder tile instead (pass `children`, e.g. an icon). */
|
|
6
|
+
src?: string;
|
|
6
7
|
alt?: string;
|
|
7
8
|
/**
|
|
8
9
|
* `default` fills its container at 16:9. `preview` keeps the image's own proportions, at most 160px
|
|
9
10
|
* tall (a live preview of a pasted URL). `thumb` is a 56 × 40 table thumbnail.
|
|
10
11
|
*/
|
|
11
12
|
size?: "default" | "preview" | "thumb";
|
|
13
|
+
/** Placeholder content (e.g. an icon) shown when `src` is omitted. */
|
|
14
|
+
children?: React.ReactNode;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
export function ResourceThumbnail({
|
|
15
18
|
src,
|
|
16
19
|
alt = "",
|
|
17
20
|
size = "default",
|
|
21
|
+
children,
|
|
18
22
|
}: ResourceThumbnailProps) {
|
|
23
|
+
if (!src) {
|
|
24
|
+
return (
|
|
25
|
+
<div
|
|
26
|
+
className={cn(
|
|
27
|
+
"resource-thumbnail",
|
|
28
|
+
"resource-thumbnail--placeholder",
|
|
29
|
+
size === "preview" && "resource-thumbnail--preview",
|
|
30
|
+
size === "thumb" && "resource-thumbnail--thumb",
|
|
31
|
+
)}
|
|
32
|
+
>
|
|
33
|
+
{children}
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
19
38
|
return (
|
|
20
39
|
<img
|
|
21
40
|
className={cn(
|
package/client/global.css
CHANGED
|
@@ -2414,6 +2414,14 @@ body {
|
|
|
2414
2414
|
color: var(--color-gray-800, #282a31);
|
|
2415
2415
|
}
|
|
2416
2416
|
|
|
2417
|
+
.card-title--compact {
|
|
2418
|
+
font-family: var(--font-ftmade);
|
|
2419
|
+
font-size: 18px;
|
|
2420
|
+
line-height: 22px;
|
|
2421
|
+
letter-spacing: -0.18px;
|
|
2422
|
+
font-weight: 500;
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2417
2425
|
.card-description {
|
|
2418
2426
|
color: var(--color-gray-600, #52545d);
|
|
2419
2427
|
}
|
|
@@ -2473,6 +2481,19 @@ body {
|
|
|
2473
2481
|
display: block;
|
|
2474
2482
|
}
|
|
2475
2483
|
|
|
2484
|
+
.card-media--placeholder {
|
|
2485
|
+
display: flex;
|
|
2486
|
+
align-items: center;
|
|
2487
|
+
justify-content: center;
|
|
2488
|
+
background: linear-gradient(135deg, var(--color-cyan-50, #fafeff), var(--color-gray-50, #f9f9fa));
|
|
2489
|
+
color: var(--color-gray-400, #9fa2ab);
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
.card-media--placeholder svg {
|
|
2493
|
+
width: 2rem;
|
|
2494
|
+
height: 2rem;
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2476
2497
|
/* Card Badge */
|
|
2477
2498
|
.card-badge {
|
|
2478
2499
|
position: absolute;
|
|
@@ -16285,6 +16306,36 @@ body {
|
|
|
16285
16306
|
font-weight: 600;
|
|
16286
16307
|
}
|
|
16287
16308
|
|
|
16309
|
+
.copy p {
|
|
16310
|
+
margin: 0 0 1em;
|
|
16311
|
+
}
|
|
16312
|
+
|
|
16313
|
+
.copy p:last-child {
|
|
16314
|
+
margin-bottom: 0;
|
|
16315
|
+
}
|
|
16316
|
+
|
|
16317
|
+
.copy strong {
|
|
16318
|
+
font-weight: 600;
|
|
16319
|
+
}
|
|
16320
|
+
|
|
16321
|
+
.copy ul,
|
|
16322
|
+
.copy ol {
|
|
16323
|
+
margin: 0 0 1em;
|
|
16324
|
+
padding-left: 1.25rem;
|
|
16325
|
+
}
|
|
16326
|
+
|
|
16327
|
+
.copy ul {
|
|
16328
|
+
list-style: disc;
|
|
16329
|
+
}
|
|
16330
|
+
|
|
16331
|
+
.copy ol {
|
|
16332
|
+
list-style: decimal;
|
|
16333
|
+
}
|
|
16334
|
+
|
|
16335
|
+
.copy li {
|
|
16336
|
+
margin-bottom: 0.25rem;
|
|
16337
|
+
}
|
|
16338
|
+
|
|
16288
16339
|
.copy--italic {
|
|
16289
16340
|
font-style: italic;
|
|
16290
16341
|
}
|
|
@@ -16874,6 +16925,19 @@ body {
|
|
|
16874
16925
|
background: var(--color-neutral-100, #f1f1f1);
|
|
16875
16926
|
}
|
|
16876
16927
|
|
|
16928
|
+
.resource-thumbnail--placeholder {
|
|
16929
|
+
display: flex;
|
|
16930
|
+
align-items: center;
|
|
16931
|
+
justify-content: center;
|
|
16932
|
+
background: linear-gradient(135deg, var(--color-cyan-50, #fafeff), var(--color-gray-50, #f9f9fa));
|
|
16933
|
+
color: var(--color-gray-400, #9fa2ab);
|
|
16934
|
+
}
|
|
16935
|
+
|
|
16936
|
+
.resource-thumbnail--placeholder svg {
|
|
16937
|
+
width: 3rem;
|
|
16938
|
+
height: 3rem;
|
|
16939
|
+
}
|
|
16940
|
+
|
|
16877
16941
|
/* ---------------------------------------------------------------------------
|
|
16878
16942
|
FileAttachment — status + filename + remove, as one attached-file row
|
|
16879
16943
|
--------------------------------------------------------------------------- */
|
|
@@ -61,11 +61,15 @@ const CardHeader = React.forwardRef(({ className, tinted = false, ...props }, re
|
|
|
61
61
|
}
|
|
62
62
|
));
|
|
63
63
|
CardHeader.displayName = "CardHeader";
|
|
64
|
-
const CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
64
|
+
const CardTitle = React.forwardRef(({ className, size = "default", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
65
65
|
"h3",
|
|
66
66
|
{
|
|
67
67
|
ref,
|
|
68
|
-
className: cn(
|
|
68
|
+
className: cn(
|
|
69
|
+
"card-title",
|
|
70
|
+
size === "compact" ? "card-title--compact" : "heading-xxsmall",
|
|
71
|
+
className
|
|
72
|
+
),
|
|
69
73
|
...props
|
|
70
74
|
}
|
|
71
75
|
));
|
|
@@ -104,7 +108,16 @@ const CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
104
108
|
}
|
|
105
109
|
));
|
|
106
110
|
CardFooter.displayName = "CardFooter";
|
|
107
|
-
const CardMedia = React.forwardRef(({ className, src, alt = "", height = 200, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
111
|
+
const CardMedia = React.forwardRef(({ className, src, alt = "", height = 200, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
ref,
|
|
115
|
+
className: cn("card-media", !src && "card-media--placeholder", className),
|
|
116
|
+
style: { height },
|
|
117
|
+
...props,
|
|
118
|
+
children: src ? /* @__PURE__ */ jsx("img", { src, alt, className: "card-media__img" }) : children
|
|
119
|
+
}
|
|
120
|
+
));
|
|
108
121
|
CardMedia.displayName = "CardMedia";
|
|
109
122
|
const CardBadge = React.forwardRef(
|
|
110
123
|
({ className, color = "default", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
@@ -3,8 +3,23 @@ import { cn } from "../../lib/utils.js";
|
|
|
3
3
|
function ResourceThumbnail({
|
|
4
4
|
src,
|
|
5
5
|
alt = "",
|
|
6
|
-
size = "default"
|
|
6
|
+
size = "default",
|
|
7
|
+
children
|
|
7
8
|
}) {
|
|
9
|
+
if (!src) {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
className: cn(
|
|
14
|
+
"resource-thumbnail",
|
|
15
|
+
"resource-thumbnail--placeholder",
|
|
16
|
+
size === "preview" && "resource-thumbnail--preview",
|
|
17
|
+
size === "thumb" && "resource-thumbnail--thumb"
|
|
18
|
+
),
|
|
19
|
+
children
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
8
23
|
return /* @__PURE__ */ jsx(
|
|
9
24
|
"img",
|
|
10
25
|
{
|