@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.
- package/client/components/icons/AchievementBadges.tsx +33 -0
- package/client/components/icons/ConceptIcons.tsx +169 -22
- package/client/components/icons/NavLogo.tsx +4 -4
- package/client/components/icons/ProviderBadges.tsx +28 -28
- package/client/components/icons/ProviderSeals.tsx +35 -35
- package/client/components/icons/StandardLogo.tsx +47 -0
- package/client/components/icons/UtilityChevronDown.tsx +1 -1
- package/client/components/icons/UtilityClearRegular.tsx +43 -0
- package/client/components/icons/UtilityCompare.tsx +71 -0
- package/client/components/icons/UtilityHome.tsx +26 -0
- package/client/components/icons/UtilityReset.tsx +7 -7
- package/client/components/icons/UtilitySave.tsx +35 -0
- package/client/components/icons/UtilityScopeLarge.tsx +86 -0
- package/client/components/icons/UtilityShow.tsx +41 -0
- package/client/components/icons/UtilityTarget.tsx +21 -0
- package/client/components/icons/UtilityTargetActive.tsx +34 -0
- package/client/components/icons/UtilityText.tsx +8 -8
- package/client/components/ui/breadcrumb.tsx +26 -4
- package/client/components/ui/button.tsx +30 -18
- package/client/components/ui/card.tsx +2 -2
- package/client/components/ui/code-badge.tsx +25 -0
- package/client/components/ui/dialog.tsx +4 -4
- package/client/components/ui/input.tsx +53 -9
- package/client/components/ui/label.tsx +2 -2
- package/client/components/ui/{Navigation.tsx → navigation.tsx} +291 -250
- package/client/components/ui/select.tsx +20 -20
- package/client/components/ui/tabs.tsx +27 -178
- package/client/components/ui/{Tag.tsx → tag.tsx} +11 -10
- package/client/components/ui/textarea.tsx +1 -1
- package/client/components/ui/toggle-group.tsx +19 -2
- package/client/components/ui/toggle.tsx +2 -2
- package/client/components/ui/tooltip.tsx +148 -8
- package/client/global.css +18 -11
- package/client/ui/AspectRatio.stories.tsx +1 -1
- package/client/ui/Button.stories.tsx +5 -5
- package/client/ui/Card.stories.tsx +223 -2
- package/client/ui/CodeBadge.stories.tsx +76 -0
- package/client/ui/Dialog.stories.tsx +52 -5
- package/client/ui/Icons.stories.tsx +31 -31
- package/client/ui/Input.stories.tsx +125 -0
- package/client/ui/Label.stories.tsx +8 -11
- package/client/ui/Navigation.stories.tsx +1 -1
- package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
- package/client/ui/SearchField.stories.tsx +1 -1
- package/client/ui/{Select/Select.stories.tsx → Select.stories.tsx} +2 -2
- package/client/ui/{Switch/Switch.stories.tsx → Switch.stories.tsx} +3 -3
- package/client/ui/Tabs.stories.tsx +174 -10
- package/client/ui/Tag.stories.tsx +48 -1
- package/client/ui/{Textarea/Textarea.stories.tsx → Textarea.stories.tsx} +9 -10
- package/client/ui/Toggle.stories.tsx +3 -3
- package/client/ui/Tooltip.stories.tsx +28 -4
- package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +1 -1
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.d.ts +4 -5
- package/dist/ui/index.es.js +460 -518
- package/package.json +2 -2
- package/client/components/ui/StrategyTable.tsx +0 -303
- package/client/ui/Input/Input.stories.tsx +0 -69
- package/client/ui/StrategyTable.stories.tsx +0 -138
- /package/client/components/ui/{SearchField.tsx → search.tsx} +0 -0
- /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
|
-
|
|
15
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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(
|
|
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(
|
|
86
|
+
className={cn(
|
|
87
|
+
"size-4 flex items-center justify-center shrink-0",
|
|
88
|
+
className
|
|
89
|
+
)}
|
|
84
90
|
{...props}
|
|
85
91
|
>
|
|
86
|
-
{children ??
|
|
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-
|
|
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:
|
|
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: "
|
|
62
|
+
variant: "default",
|
|
59
63
|
size: "large",
|
|
60
64
|
},
|
|
61
|
-
}
|
|
65
|
+
}
|
|
62
66
|
);
|
|
63
67
|
|
|
64
68
|
export interface ButtonProps
|
|
65
|
-
extends
|
|
66
|
-
|
|
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
|
-
|
|
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(
|
|
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",
|
|
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
|
|
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-
|
|
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
|
-
|
|
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
|
-
<
|
|
9
|
-
type={type}
|
|
15
|
+
<div
|
|
10
16
|
className={cn(
|
|
11
|
-
|
|
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
|
-
|
|
15
|
-
{
|
|
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
|
-
"
|
|
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;
|