@syscore/ui-library 1.1.12 → 1.1.13

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.
Files changed (61) hide show
  1. package/client/components/icons/AchievementBadges.tsx +33 -0
  2. package/client/components/icons/ConceptIcons.tsx +169 -22
  3. package/client/components/icons/NavLogo.tsx +4 -4
  4. package/client/components/icons/ProviderBadges.tsx +28 -28
  5. package/client/components/icons/ProviderSeals.tsx +35 -35
  6. package/client/components/icons/StandardLogo.tsx +47 -0
  7. package/client/components/icons/UtilityChevronDown.tsx +1 -1
  8. package/client/components/icons/UtilityClearRegular.tsx +43 -0
  9. package/client/components/icons/UtilityCompare.tsx +71 -0
  10. package/client/components/icons/UtilityHome.tsx +26 -0
  11. package/client/components/icons/UtilityReset.tsx +7 -7
  12. package/client/components/icons/UtilitySave.tsx +35 -0
  13. package/client/components/icons/UtilityScopeLarge.tsx +86 -0
  14. package/client/components/icons/UtilityShow.tsx +41 -0
  15. package/client/components/icons/UtilityTarget.tsx +21 -0
  16. package/client/components/icons/UtilityTargetActive.tsx +34 -0
  17. package/client/components/icons/UtilityText.tsx +8 -8
  18. package/client/components/ui/breadcrumb.tsx +26 -4
  19. package/client/components/ui/button.tsx +30 -18
  20. package/client/components/ui/card.tsx +2 -2
  21. package/client/components/ui/code-badge.tsx +25 -0
  22. package/client/components/ui/dialog.tsx +4 -4
  23. package/client/components/ui/input.tsx +53 -9
  24. package/client/components/ui/label.tsx +2 -2
  25. package/client/components/ui/{Navigation.tsx → navigation.tsx} +291 -250
  26. package/client/components/ui/select.tsx +20 -20
  27. package/client/components/ui/tabs.tsx +27 -178
  28. package/client/components/ui/{Tag.tsx → tag.tsx} +11 -10
  29. package/client/components/ui/textarea.tsx +1 -1
  30. package/client/components/ui/toggle-group.tsx +19 -2
  31. package/client/components/ui/toggle.tsx +2 -2
  32. package/client/components/ui/tooltip.tsx +148 -8
  33. package/client/global.css +18 -11
  34. package/client/ui/AspectRatio.stories.tsx +1 -1
  35. package/client/ui/Button.stories.tsx +5 -5
  36. package/client/ui/Card.stories.tsx +223 -2
  37. package/client/ui/CodeBadge.stories.tsx +76 -0
  38. package/client/ui/Dialog.stories.tsx +52 -5
  39. package/client/ui/Icons.stories.tsx +31 -31
  40. package/client/ui/Input.stories.tsx +125 -0
  41. package/client/ui/Label.stories.tsx +8 -11
  42. package/client/ui/Navigation.stories.tsx +1 -1
  43. package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
  44. package/client/ui/SearchField.stories.tsx +1 -1
  45. package/client/ui/{Select/Select.stories.tsx → Select.stories.tsx} +2 -2
  46. package/client/ui/{Switch/Switch.stories.tsx → Switch.stories.tsx} +3 -3
  47. package/client/ui/Tabs.stories.tsx +174 -10
  48. package/client/ui/Tag.stories.tsx +48 -1
  49. package/client/ui/{Textarea/Textarea.stories.tsx → Textarea.stories.tsx} +9 -10
  50. package/client/ui/Toggle.stories.tsx +3 -3
  51. package/client/ui/Tooltip.stories.tsx +28 -4
  52. package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +1 -1
  53. package/dist/ui/index.cjs.js +1 -1
  54. package/dist/ui/index.d.ts +4 -5
  55. package/dist/ui/index.es.js +460 -518
  56. package/package.json +2 -2
  57. package/client/components/ui/StrategyTable.tsx +0 -303
  58. package/client/ui/Input/Input.stories.tsx +0 -69
  59. package/client/ui/StrategyTable.stories.tsx +0 -138
  60. /package/client/components/ui/{SearchField.tsx → search.tsx} +0 -0
  61. /package/client/hooks/{UseTabs.tsx → use-tabs.tsx} +0 -0
@@ -11,23 +11,23 @@ export function UtilityText({ className }: { className?: string }) {
11
11
  <path
12
12
  d="M8.75 12.75H0.75"
13
13
  stroke="currentColor"
14
- stroke-width="1.5"
15
- stroke-linecap="round"
14
+ strokeWidth="1.5"
15
+ strokeLinecap="round"
16
16
  stroke-linejoin="round"
17
17
  />
18
18
  <path
19
19
  d="M10.75 0.75H0.75"
20
20
  stroke="currentColor"
21
- stroke-width="1.5"
22
- stroke-linecap="round"
23
- stroke-linejoin="round"
21
+ strokeWidth="1.5"
22
+ strokeLinecap="round"
23
+ strokeLinejoin="round"
24
24
  />
25
25
  <path
26
26
  d="M14.75 6.75H0.75"
27
27
  stroke="currentColor"
28
- stroke-width="1.5"
29
- stroke-linecap="round"
30
- stroke-linejoin="round"
28
+ strokeWidth="1.5"
29
+ strokeLinecap="round"
30
+ strokeLinejoin="round"
31
31
  />
32
32
  </svg>
33
33
  );
@@ -20,7 +20,7 @@ const BreadcrumbList = React.forwardRef<
20
20
  ref={ref}
21
21
  className={cn(
22
22
  "flex flex-wrap items-center gap-1.5 wrap-break-word text-sm text-muted-foreground sm:gap-2.5",
23
- className,
23
+ className
24
24
  )}
25
25
  {...props}
26
26
  />
@@ -66,7 +66,10 @@ const BreadcrumbPage = React.forwardRef<
66
66
  role="link"
67
67
  aria-disabled="true"
68
68
  aria-current="page"
69
- className={cn("font-normal text-foreground", className)}
69
+ className={cn(
70
+ "body-small font-medium text-gray-600 text-center whitespace-nowrap",
71
+ className
72
+ )}
70
73
  {...props}
71
74
  />
72
75
  ));
@@ -80,10 +83,29 @@ const BreadcrumbSeparator = ({
80
83
  <li
81
84
  role="presentation"
82
85
  aria-hidden="true"
83
- className={cn("[&>svg]:size-3.5", className)}
86
+ className={cn(
87
+ "size-4 flex items-center justify-center shrink-0",
88
+ className
89
+ )}
84
90
  {...props}
85
91
  >
86
- {children ?? <ChevronRight />}
92
+ {children ?? (
93
+ <svg
94
+ xmlns="http://www.w3.org/2000/svg"
95
+ width="5"
96
+ height="8"
97
+ viewBox="0 0 5 8"
98
+ fill="none"
99
+ >
100
+ <path
101
+ d="M0.75 6.75L3.75 3.75L0.75 0.75"
102
+ stroke="#CBCDD2"
103
+ strokeWidth="1.5"
104
+ strokeLinecap="round"
105
+ strokeLinejoin="round"
106
+ />
107
+ </svg>
108
+ )}
87
109
  </li>
88
110
  );
89
111
  BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
@@ -3,6 +3,7 @@
3
3
  import * as React from "react";
4
4
  import { cva, type VariantProps } from "class-variance-authority";
5
5
  import { cn } from "@/lib/utils";
6
+ import { motion } from "motion/react";
6
7
 
7
8
  const buttonVariants = cva(
8
9
  "group inline-flex items-center justify-center rounded-full transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer",
@@ -10,6 +11,8 @@ const buttonVariants = cva(
10
11
  variants: {
11
12
  variant: {
12
13
  // CTA variants
14
+ clear: "bg-none border-none",
15
+ default: "bg-white border border-gray-gray-100",
13
16
  "primary-gradient": "text-white hover:opacity-90 btn-primary-gradient",
14
17
  "primary-dark":
15
18
  "bg-cyan-800 text-white hover:bg-cyan-900 focus-visible:ring-cyan-800",
@@ -33,7 +36,7 @@ const buttonVariants = cva(
33
36
  xlarge: "h-16 px-10",
34
37
  large: "h-12 px-8",
35
38
  utility: "h-8 px-4",
36
- icon: "size-[32px]",
39
+ icon: "size-8",
37
40
  },
38
41
  },
39
42
  compoundVariants: [
@@ -51,37 +54,44 @@ const buttonVariants = cva(
51
54
  },
52
55
  {
53
56
  size: "icon",
54
- className: "p-0 bg-white border border-gray-100 ",
57
+ className:
58
+ "p-0 bg-white border border-gray-100 hover:border-gray-200 hover:scale-[1.02] transition-all duration-200",
55
59
  },
56
60
  ],
57
61
  defaultVariants: {
58
- variant: "primary-dark",
62
+ variant: "default",
59
63
  size: "large",
60
64
  },
61
- },
65
+ }
62
66
  );
63
67
 
64
68
  export interface ButtonProps
65
- extends React.ButtonHTMLAttributes<HTMLButtonElement>,
66
- VariantProps<typeof buttonVariants> {
69
+ extends Omit<
70
+ React.ButtonHTMLAttributes<HTMLButtonElement>,
71
+ "onDrag" | "onDragStart" | "onDragEnd" | "onAnimationStart"
72
+ >,
73
+ VariantProps<typeof buttonVariants> {
67
74
  asChild?: boolean;
68
75
  }
69
76
 
77
+ const sizeTextClasses: Record<string, string> = {
78
+ xlarge: "body-large",
79
+ large: "body-base",
80
+ utility: "body-small",
81
+ icon: "",
82
+ };
83
+
70
84
  const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
71
85
  ({ className, variant, size, children, style, ...props }, ref) => {
72
- // Determine body class based on size for text labels
73
- const bodyClass =
74
- size === "xlarge"
75
- ? "body-large"
76
- : size === "large"
77
- ? "body-base"
78
- : size === "utility"
79
- ? "body-small"
80
- : "";
86
+ const textClass = sizeTextClasses[size || "large"];
81
87
 
82
88
  return (
83
89
  <button
84
- className={cn(buttonVariants({ variant, size }), className)}
90
+ className={cn(
91
+ buttonVariants({ variant, size }),
92
+ "cursor-pointer",
93
+ className
94
+ )}
85
95
  style={style}
86
96
  ref={ref}
87
97
  {...props}
@@ -89,11 +99,13 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
89
99
  {size === "icon" ? (
90
100
  children
91
101
  ) : (
92
- <span className={cn("relative z-10", bodyClass)}>{children}</span>
102
+ <span className={cn("relative z-10 font-semibold ", textClass)}>
103
+ {children}
104
+ </span>
93
105
  )}
94
106
  </button>
95
107
  );
96
- },
108
+ }
97
109
  );
98
110
 
99
111
  Button.displayName = "Button";
@@ -9,8 +9,8 @@ const Card = React.forwardRef<
9
9
  <div
10
10
  ref={ref}
11
11
  className={cn(
12
- "rounded-lg border border-gray-100 bg-cyan-50 shadow-xs p-6 space-y-6",
13
- className,
12
+ "rounded-lg border border-gray-100 bg-cyan-50 p-6 space-y-6",
13
+ className
14
14
  )}
15
15
  {...props}
16
16
  />
@@ -0,0 +1,25 @@
1
+ import { cn } from "@/lib/utils";
2
+
3
+ interface CodeBadgeProps {
4
+ code: string;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ }
8
+
9
+ export const CodeBadge = ({ code, className, style }: CodeBadgeProps) => {
10
+ return (
11
+ <div
12
+ className={cn(
13
+ "flex items-center justify-center h-8 w-12 rounded-sm shrink-0 border-[1.5px] px-px",
14
+ className
15
+ )}
16
+ style={{
17
+ ...style,
18
+ }}
19
+ >
20
+ <span className="number-small font-semibold" style={{ color: "inherit" }}>
21
+ {code}
22
+ </span>
23
+ </div>
24
+ );
25
+ };
@@ -37,7 +37,7 @@ function DialogOverlay({
37
37
  data-slot="dialog-overlay"
38
38
  className={cn(
39
39
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
40
- className,
40
+ className
41
41
  )}
42
42
  {...props}
43
43
  />
@@ -58,8 +58,8 @@ function DialogContent({
58
58
  <DialogPrimitive.Content
59
59
  data-slot="dialog-content"
60
60
  className={cn(
61
- "DialogContent overflow-hidden rounded-[40px] gap-4 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[30%] left-[50%] z-50 grid max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] border-12 border-[rgba(255,255,255,0.20)] duration-200 sm:max-w-lg",
62
- className,
61
+ "DialogContent overflow-hidden rounded-[40px] gap-4 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-1/2 left-1/2 z-50 grid -translate-x-1/2 -translate-y-1/2 border-12 border-[rgba(255,255,255,0.20)] duration-200 ",
62
+ className
63
63
  )}
64
64
  {...props}
65
65
  >
@@ -94,7 +94,7 @@ function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
94
94
  data-slot="dialog-footer"
95
95
  className={cn(
96
96
  "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
97
- className,
97
+ className
98
98
  )}
99
99
  {...props}
100
100
  />
@@ -1,19 +1,63 @@
1
+ import { cn } from "@/lib/utils";
1
2
  import * as React from "react";
2
3
 
3
- import { cn } from "@/lib/utils";
4
+ export interface InputProps extends React.ComponentProps<"input"> {
5
+ startIcon?: React.ReactNode;
6
+ endIcon?: React.ReactNode;
7
+ }
8
+
9
+ const Input = React.forwardRef<HTMLInputElement, InputProps>(
10
+ ({ className, type, startIcon, endIcon, ...props }, ref) => {
11
+ const isReadOnly = props.readOnly;
12
+ const isDisabled = props.disabled;
4
13
 
5
- const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
6
- ({ className, type, ...props }, ref) => {
7
14
  return (
8
- <input
9
- type={type}
15
+ <div
10
16
  className={cn(
11
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
17
+ // Base wrapper styles (visual input)
18
+ "flex h-12 w-full items-center rounded-[6px] border border-gray-200 bg-white px-4 transition-shadow",
19
+ // Typography inheritance
20
+ "body-base font-medium font-mazzard text-gray-800",
21
+ // Focus states (focus-within matches input focus)
22
+ "focus-within:border-cyan-300",
23
+ // Disabled states
24
+ isDisabled && "opacity-50 cursor-not-allowed",
25
+ // Read-only states
26
+ isReadOnly &&
27
+ "bg-gray-50 border-blue-200 text-gray-600 focus-within:border-blue-200 cursor-default",
12
28
  className,
13
29
  )}
14
- ref={ref}
15
- {...props}
16
- />
30
+ >
31
+ {startIcon ? (
32
+ <div className="mr-3 flex items-center text-muted-foreground">
33
+ {startIcon}
34
+ </div>
35
+ ) : null}
36
+
37
+ <input
38
+ type={type}
39
+ className={cn(
40
+ // Reset styles to be transparent inside wrapper
41
+ "flex-1 w-full bg-transparent outline-none placeholder:text-gray-500",
42
+ // File input specific overrides
43
+ type === "file" &&
44
+ "p-0 italic text-muted-foreground/70 file:me-3 file:h-full file:border-0 file:border-r file:border-solid file:border-gray-200 file:bg-transparent file:px-3 file:text-base file:font-medium file:not-italic file:text-gray-800",
45
+ // Search input specific overrides
46
+ type === "search" &&
47
+ "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none",
48
+ )}
49
+ ref={ref}
50
+ disabled={isDisabled}
51
+ readOnly={isReadOnly}
52
+ {...props}
53
+ />
54
+
55
+ {endIcon ? (
56
+ <div className="ml-3 flex items-center text-muted-foreground">
57
+ {endIcon}
58
+ </div>
59
+ ) : null}
60
+ </div>
17
61
  );
18
62
  },
19
63
  );
@@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority";
5
5
  import { cn } from "@/lib/utils";
6
6
 
7
7
  const labelVariants = cva(
8
- "overline-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
8
+ "peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-gray-600 px-2",
9
9
  );
10
10
 
11
11
  const Label = React.forwardRef<
@@ -18,7 +18,7 @@ const Label = React.forwardRef<
18
18
  className={cn(labelVariants(), className)}
19
19
  {...props}
20
20
  >
21
- {children}
21
+ <span className="overline-medium">{children}</span>
22
22
  </LabelPrimitive.Root>
23
23
  ));
24
24
  Label.displayName = LabelPrimitive.Root.displayName;