@syscore/ui-library 2.0.0-beta-publish-workflow-beta.5 → 2.0.0-beta-publish-workflow-beta.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.
@@ -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
- export const IWBILogo = ({ className }: { className?: string }) => {
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="277"
5
- height="180"
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
- const CardContent = React.forwardRef<
70
- HTMLDivElement,
71
- React.HTMLAttributes<HTMLDivElement>
72
- >(({ className, ...props }, ref) => (
73
- <div
74
- ref={ref}
75
- className={cn("card-content body-base", className)}
76
- {...props}
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 className="overflow-y-auto">
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("dialog-content", className)}
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 className={cn("dialog-content-inner", innerClassName)}>
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,57 @@
1
+ import * as React from "react";
2
+ import { CheckCircle2, Paperclip, Trash2 } from "lucide-react";
3
+ import { cn } from "@/lib/utils";
4
+
5
+ /**
6
+ * A single uploaded-file row: status (checkmark + "File Uploaded"), the
7
+ * filename as a download link, and an optional remove action. Replaces the
8
+ * previous pattern of a filename `Copy` next to plain "Download"/"Remove"
9
+ * `Button`s, which read as two disconnected controls rather than one
10
+ * attached-file entity.
11
+ */
12
+ export interface FileAttachmentProps {
13
+ filename: string;
14
+ onDownload?: () => void;
15
+ onRemove?: () => void;
16
+ downloading?: boolean;
17
+ removable?: boolean;
18
+ }
19
+
20
+ const FileAttachment = React.forwardRef<HTMLDivElement, FileAttachmentProps>(
21
+ ({ filename, onDownload, onRemove, downloading, removable = true }, ref) => {
22
+ return (
23
+ <div ref={ref} className="file-attachment">
24
+ <div className="file-attachment-status">
25
+ <CheckCircle2 className="file-attachment-status-icon" aria-hidden="true" />
26
+ <span className="file-attachment-status-text">File Uploaded</span>
27
+ </div>
28
+
29
+ <div className="file-attachment-file">
30
+ <button
31
+ type="button"
32
+ className="file-attachment-download"
33
+ disabled={downloading}
34
+ onClick={onDownload}
35
+ >
36
+ <Paperclip className="file-attachment-paperclip" aria-hidden="true" />
37
+ <span className="file-attachment-filename">{filename}</span>
38
+ </button>
39
+
40
+ {removable ? (
41
+ <button
42
+ type="button"
43
+ className="file-attachment-remove"
44
+ aria-label={`Remove ${filename}`}
45
+ onClick={onRemove}
46
+ >
47
+ <Trash2 aria-hidden="true" />
48
+ </button>
49
+ ) : null}
50
+ </div>
51
+ </div>
52
+ );
53
+ },
54
+ );
55
+ FileAttachment.displayName = "FileAttachment";
56
+
57
+ export { FileAttachment };
@@ -31,6 +31,18 @@ const BUTTON_VARIANT_CLASS: Record<string, string> = {
31
31
  "tertiary-light": "button--tertiary-light",
32
32
  };
33
33
 
34
+ // The published `Button` gets its actual height/padding/font-weight from a
35
+ // SIZE class (default "large"), separate from the colour/border variant
36
+ // class above — this component only ever applied the variant class, so
37
+ // every trigger rendered with no padding at all, collapsing to bare text
38
+ // that happened to be the variant's text colour. Matches `Button`'s own
39
+ // size names so the two read the same size side by side (as they do in
40
+ // `DocumentUploadGroup`, next to `Button`-rendered Download/Remove).
41
+ const BUTTON_SIZE_CLASS: Record<string, string> = {
42
+ large: "button--large",
43
+ utility: "button--utility",
44
+ };
45
+
34
46
  interface FileUploadTriggerProps
35
47
  extends Omit<React.ComponentProps<"button">, "onChange"> {
36
48
  /** Fires with the selected files. */
@@ -40,6 +52,8 @@ interface FileUploadTriggerProps
40
52
  multiple?: boolean;
41
53
  /** Matches the DS `Button`'s existing variant names — see BUTTON_VARIANT_CLASS. */
42
54
  variant?: keyof typeof BUTTON_VARIANT_CLASS;
55
+ /** Matches the DS `Button`'s existing size names — see BUTTON_SIZE_CLASS. */
56
+ size?: keyof typeof BUTTON_SIZE_CLASS;
43
57
  }
44
58
 
45
59
  const FileUploadTrigger = React.forwardRef<HTMLButtonElement, FileUploadTriggerProps>(
@@ -49,6 +63,7 @@ const FileUploadTrigger = React.forwardRef<HTMLButtonElement, FileUploadTriggerP
49
63
  accept,
50
64
  multiple = false,
51
65
  variant = "secondary-light",
66
+ size = "large",
52
67
  children,
53
68
  className,
54
69
  type = "button",
@@ -66,7 +81,7 @@ const FileUploadTrigger = React.forwardRef<HTMLButtonElement, FileUploadTriggerP
66
81
  ref={ref}
67
82
  type={type}
68
83
  disabled={disabled}
69
- className={cn("button", BUTTON_VARIANT_CLASS[variant], className)}
84
+ className={cn("button", BUTTON_VARIANT_CLASS[variant], BUTTON_SIZE_CLASS[size], className)}
70
85
  onClick={(event) => {
71
86
  onClick?.(event);
72
87
  if (!event.defaultPrevented) inputRef.current?.click();
@@ -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';
@@ -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
- {!isStrategy ? (
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 href={item.href} className="navigation-nav-link">
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 className="navigation-nav-link">{item.label}</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
  )}