@syscore/ui-library 2.0.0-beta-publish-workflow-beta.6 → 2.0.0-beta-publish-workflow-beta.8
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/icons/StandardLogo.tsx +16 -0
- package/client/components/icons/seals/IWBILogo.tsx +16 -3
- package/client/components/ui/card.tsx +26 -12
- package/client/components/ui/copy.tsx +3 -2
- package/client/components/ui/dialog.tsx +23 -3
- package/client/components/ui/hero-split-image.tsx +15 -0
- package/client/components/ui/layout.tsx +5 -0
- package/client/components/ui/price-tag.tsx +21 -0
- package/client/components/ui/section-badge.tsx +3 -0
- package/client/components/ui/standard-navigation.tsx +16 -3
- package/client/components/ui/stepper.tsx +14 -0
- package/client/global.css +247 -13
- package/client/ui/Dialog.stories.tsx +26 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +160 -46
- package/package.json +1 -1
|
@@ -3,10 +3,26 @@ import { cn } from "@/lib/utils";
|
|
|
3
3
|
export const StandardLogo = ({
|
|
4
4
|
className = "",
|
|
5
5
|
dark = false,
|
|
6
|
+
variant = "standard",
|
|
6
7
|
}: {
|
|
7
8
|
className?: string;
|
|
8
9
|
dark?: boolean;
|
|
10
|
+
variant?: "standard" | "well";
|
|
9
11
|
}) => {
|
|
12
|
+
if (variant === "well") {
|
|
13
|
+
return (
|
|
14
|
+
<span
|
|
15
|
+
className={cn(
|
|
16
|
+
"standard-logo-wordmark",
|
|
17
|
+
dark ? "text-gray-700" : "text-white",
|
|
18
|
+
className,
|
|
19
|
+
)}
|
|
20
|
+
>
|
|
21
|
+
WELL
|
|
22
|
+
</span>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
10
26
|
return (
|
|
11
27
|
<svg
|
|
12
28
|
width="93"
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
const SIZES = {
|
|
2
|
+
default: { width: 277, height: 180 },
|
|
3
|
+
medium: { width: 100, height: 65 },
|
|
4
|
+
small: { width: 64, height: 42 },
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const IWBILogo = ({
|
|
8
|
+
className,
|
|
9
|
+
size = "default",
|
|
10
|
+
}: {
|
|
11
|
+
className?: string;
|
|
12
|
+
size?: "default" | "medium" | "small";
|
|
13
|
+
}) => {
|
|
14
|
+
const { width, height } = SIZES[size];
|
|
2
15
|
return (
|
|
3
16
|
<svg
|
|
4
|
-
width=
|
|
5
|
-
height=
|
|
17
|
+
width={width}
|
|
18
|
+
height={height}
|
|
6
19
|
viewBox="0 0 277 180"
|
|
7
20
|
fill="none"
|
|
8
21
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -13,9 +13,14 @@ const cardVariants = cva("card", {
|
|
|
13
13
|
filled: "card--filled",
|
|
14
14
|
interactive: "card--interactive",
|
|
15
15
|
},
|
|
16
|
+
padding: {
|
|
17
|
+
default: "",
|
|
18
|
+
spacious: "card--padding-spacious",
|
|
19
|
+
},
|
|
16
20
|
},
|
|
17
21
|
defaultVariants: {
|
|
18
22
|
variant: "default",
|
|
23
|
+
padding: "default",
|
|
19
24
|
},
|
|
20
25
|
});
|
|
21
26
|
|
|
@@ -24,10 +29,10 @@ interface CardProps
|
|
|
24
29
|
VariantProps<typeof cardVariants> {}
|
|
25
30
|
|
|
26
31
|
const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
27
|
-
({ className, variant, ...props }, ref) => (
|
|
32
|
+
({ className, variant, padding, ...props }, ref) => (
|
|
28
33
|
<div
|
|
29
34
|
ref={ref}
|
|
30
|
-
className={cn(cardVariants({ variant }), className)}
|
|
35
|
+
className={cn(cardVariants({ variant, padding }), className)}
|
|
31
36
|
{...props}
|
|
32
37
|
/>
|
|
33
38
|
),
|
|
@@ -66,16 +71,25 @@ const CardDescription = React.forwardRef<
|
|
|
66
71
|
));
|
|
67
72
|
CardDescription.displayName = "CardDescription";
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
interface CardContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
75
|
+
tinted?: boolean;
|
|
76
|
+
pinBottom?: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const CardContent = React.forwardRef<HTMLDivElement, CardContentProps>(
|
|
80
|
+
({ className, tinted = false, pinBottom = false, ...props }, ref) => (
|
|
81
|
+
<div
|
|
82
|
+
ref={ref}
|
|
83
|
+
className={cn(
|
|
84
|
+
"card-content body-base",
|
|
85
|
+
tinted && "card-content--tinted",
|
|
86
|
+
pinBottom && "card-content--pin-bottom",
|
|
87
|
+
className,
|
|
88
|
+
)}
|
|
89
|
+
{...props}
|
|
90
|
+
/>
|
|
91
|
+
),
|
|
92
|
+
);
|
|
79
93
|
CardContent.displayName = "CardContent";
|
|
80
94
|
|
|
81
95
|
const CardFooter = React.forwardRef<
|
|
@@ -14,8 +14,8 @@ import { cn } from "@/lib/utils";
|
|
|
14
14
|
* (`.body-base.copy`) so it wins on specificity without `!important`.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
type CopyTone = "default" | "muted" | "subtle" | "link" | "error" | "inverse";
|
|
18
|
-
type CopySize = "base" | "small";
|
|
17
|
+
type CopyTone = "default" | "muted" | "subtle" | "link" | "error" | "success" | "inverse";
|
|
18
|
+
type CopySize = "large" | "base" | "small";
|
|
19
19
|
type CopyWeight = "regular" | "medium" | "semibold";
|
|
20
20
|
type CopyAlign = "start" | "center" | "end";
|
|
21
21
|
|
|
@@ -29,6 +29,7 @@ interface CopyProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
const sizeClass: Record<CopySize, string> = {
|
|
32
|
+
large: "body-large",
|
|
32
33
|
base: "body-base",
|
|
33
34
|
small: "body-small",
|
|
34
35
|
};
|
|
@@ -50,22 +50,42 @@ function DialogContent({
|
|
|
50
50
|
closeClassName,
|
|
51
51
|
children,
|
|
52
52
|
showCloseButton = true,
|
|
53
|
+
size = "default",
|
|
53
54
|
...props
|
|
54
55
|
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
55
56
|
showCloseButton?: boolean;
|
|
56
57
|
innerClassName?: string;
|
|
57
58
|
closeClassName?: string;
|
|
59
|
+
/** `"fullscreen"` — PRD-009 course-access iframe: near-full-viewport chrome
|
|
60
|
+
* (`height: calc(100vh - 90px)`), no fixed max-width. Default is the
|
|
61
|
+
* existing centered modal. */
|
|
62
|
+
size?: "default" | "fullscreen";
|
|
58
63
|
}) {
|
|
59
64
|
return (
|
|
60
65
|
<DialogPortal data-slot="dialog-portal">
|
|
61
|
-
<DialogOverlay
|
|
66
|
+
<DialogOverlay
|
|
67
|
+
className={cn(
|
|
68
|
+
"overflow-y-auto",
|
|
69
|
+
size === "fullscreen" && "dialog-overlay--fullscreen",
|
|
70
|
+
)}
|
|
71
|
+
>
|
|
62
72
|
<DialogPrimitive.Content
|
|
63
73
|
data-slot="dialog-content"
|
|
64
|
-
className={cn(
|
|
74
|
+
className={cn(
|
|
75
|
+
"dialog-content",
|
|
76
|
+
size === "fullscreen" && "dialog-content--fullscreen",
|
|
77
|
+
className,
|
|
78
|
+
)}
|
|
65
79
|
{...props}
|
|
66
80
|
>
|
|
67
81
|
<div className="dialog-content-wrapper">
|
|
68
|
-
<div
|
|
82
|
+
<div
|
|
83
|
+
className={cn(
|
|
84
|
+
"dialog-content-inner",
|
|
85
|
+
size === "fullscreen" && "dialog-content-inner--fullscreen",
|
|
86
|
+
innerClassName,
|
|
87
|
+
)}
|
|
88
|
+
>
|
|
69
89
|
{children}
|
|
70
90
|
</div>
|
|
71
91
|
{showCloseButton && (
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface HeroSplitImageProps {
|
|
4
|
+
src: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const HeroSplitImage = React.forwardRef<HTMLImageElement, HeroSplitImageProps>(
|
|
9
|
+
({ src, alt = '' }, ref) => (
|
|
10
|
+
<span className="hero-split-image-frame">
|
|
11
|
+
<img ref={ref} src={src} alt={alt} className="hero-split-image" />
|
|
12
|
+
</span>
|
|
13
|
+
),
|
|
14
|
+
);
|
|
15
|
+
HeroSplitImage.displayName = 'HeroSplitImage';
|
|
@@ -103,6 +103,8 @@ interface StackProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
103
103
|
vAlign?: StackJustify | StackAlign;
|
|
104
104
|
wrap?: StackWrap;
|
|
105
105
|
padding?: SpaceInput;
|
|
106
|
+
/** Block-axis margin only (top + bottom) — horizontal stays 0. */
|
|
107
|
+
marginY?: SpaceInput;
|
|
106
108
|
width?: SizeValue;
|
|
107
109
|
height?: SizeValue;
|
|
108
110
|
maxWidth?: SizeValue;
|
|
@@ -122,6 +124,7 @@ const Stack = React.forwardRef<HTMLElement, StackProps>(
|
|
|
122
124
|
vAlign,
|
|
123
125
|
wrap = false,
|
|
124
126
|
padding,
|
|
127
|
+
marginY,
|
|
125
128
|
width,
|
|
126
129
|
height,
|
|
127
130
|
maxWidth,
|
|
@@ -160,6 +163,8 @@ const Stack = React.forwardRef<HTMLElement, StackProps>(
|
|
|
160
163
|
style={{
|
|
161
164
|
gap: gapCss(gap),
|
|
162
165
|
padding: gapCss(padding),
|
|
166
|
+
marginTop: gapCss(marginY),
|
|
167
|
+
marginBottom: gapCss(marginY),
|
|
163
168
|
width: toCssSize(width),
|
|
164
169
|
height: toCssSize(height),
|
|
165
170
|
maxWidth: toCssSize(maxWidth),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
|
|
4
|
+
export interface PriceTagProps {
|
|
5
|
+
amount: string | number;
|
|
6
|
+
currency?: string;
|
|
7
|
+
tone?: 'brand' | 'neutral';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const PriceTag = React.forwardRef<HTMLSpanElement, PriceTagProps>(
|
|
11
|
+
({ amount, currency = '$', tone = 'brand' }, ref) => (
|
|
12
|
+
<span
|
|
13
|
+
ref={ref}
|
|
14
|
+
className={cn('price-tag', tone === 'neutral' && 'price-tag--neutral')}
|
|
15
|
+
>
|
|
16
|
+
{currency}
|
|
17
|
+
{amount}
|
|
18
|
+
</span>
|
|
19
|
+
),
|
|
20
|
+
);
|
|
21
|
+
PriceTag.displayName = 'PriceTag';
|
|
@@ -2,15 +2,18 @@ import { cn } from "@/lib/utils";
|
|
|
2
2
|
|
|
3
3
|
function SectionBadge({
|
|
4
4
|
children,
|
|
5
|
+
size = "default",
|
|
5
6
|
className,
|
|
6
7
|
}: {
|
|
7
8
|
children: React.ReactNode;
|
|
9
|
+
size?: "default" | "compact";
|
|
8
10
|
className?: string;
|
|
9
11
|
}) {
|
|
10
12
|
return (
|
|
11
13
|
<span
|
|
12
14
|
className={cn(
|
|
13
15
|
"section-badge overline-large",
|
|
16
|
+
size === "compact" && "section-badge--compact",
|
|
14
17
|
className,
|
|
15
18
|
)}
|
|
16
19
|
>
|
|
@@ -438,7 +438,7 @@ export const StandardNavigation: React.FC<NavigationProps> = ({
|
|
|
438
438
|
</NavLink>
|
|
439
439
|
</div>
|
|
440
440
|
|
|
441
|
-
{
|
|
441
|
+
{navLinks.length > 0 ? (
|
|
442
442
|
<div className="navigation-nav-container">
|
|
443
443
|
<ul className="navigation-nav-list">
|
|
444
444
|
{navLinks.map((item, index) => (
|
|
@@ -448,11 +448,24 @@ export const StandardNavigation: React.FC<NavigationProps> = ({
|
|
|
448
448
|
onMouseEnter={() => handleNavItemMouseEnter(index)}
|
|
449
449
|
>
|
|
450
450
|
{item.href ? (
|
|
451
|
-
<NavLink
|
|
451
|
+
<NavLink
|
|
452
|
+
href={item.href}
|
|
453
|
+
className={cn(
|
|
454
|
+
"navigation-nav-link",
|
|
455
|
+
isStrategy && "navigation-nav-link--strategy",
|
|
456
|
+
)}
|
|
457
|
+
>
|
|
452
458
|
{item.label}
|
|
453
459
|
</NavLink>
|
|
454
460
|
) : (
|
|
455
|
-
<span
|
|
461
|
+
<span
|
|
462
|
+
className={cn(
|
|
463
|
+
"navigation-nav-link",
|
|
464
|
+
isStrategy && "navigation-nav-link--strategy",
|
|
465
|
+
)}
|
|
466
|
+
>
|
|
467
|
+
{item.label}
|
|
468
|
+
</span>
|
|
456
469
|
)}
|
|
457
470
|
|
|
458
471
|
{/* Underline */}
|
|
@@ -45,6 +45,18 @@ const CheckIcon = () => (
|
|
|
45
45
|
</svg>
|
|
46
46
|
);
|
|
47
47
|
|
|
48
|
+
const PlusIcon = () => (
|
|
49
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">
|
|
50
|
+
<path
|
|
51
|
+
d="M7 2.5V11.5M2.5 7H11.5"
|
|
52
|
+
stroke="currentColor"
|
|
53
|
+
strokeWidth="2"
|
|
54
|
+
strokeLinecap="round"
|
|
55
|
+
strokeLinejoin="round"
|
|
56
|
+
/>
|
|
57
|
+
</svg>
|
|
58
|
+
);
|
|
59
|
+
|
|
48
60
|
// ---------------------------------------------------------------------------
|
|
49
61
|
// Stepper
|
|
50
62
|
// ---------------------------------------------------------------------------
|
|
@@ -106,6 +118,8 @@ const Stepper = React.forwardRef<HTMLDivElement, StepperProps>(
|
|
|
106
118
|
>
|
|
107
119
|
{status === "complete" ? (
|
|
108
120
|
<CheckIcon />
|
|
121
|
+
) : status === "current" ? (
|
|
122
|
+
<PlusIcon />
|
|
109
123
|
) : (
|
|
110
124
|
<span className="stepper-indicator-number">{index + 1}</span>
|
|
111
125
|
)}
|