@syscore/ui-library 1.5.1 → 1.5.3
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,7 +3,6 @@
|
|
|
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";
|
|
7
6
|
|
|
8
7
|
const buttonVariants = cva(
|
|
9
8
|
"button",
|
|
@@ -21,8 +20,10 @@ const buttonVariants = cva(
|
|
|
21
20
|
"general-primary": "button--general-primary",
|
|
22
21
|
"general-secondary": "button--general-secondary",
|
|
23
22
|
"general-tertiary": "button--general-tertiary",
|
|
23
|
+
"transparent-tertiary": "button--transparent-tertiary",
|
|
24
24
|
"tooltip-primary": "button--tooltip-primary",
|
|
25
25
|
"tooltip-secondary": "button--tooltip-secondary",
|
|
26
|
+
|
|
26
27
|
},
|
|
27
28
|
size: {
|
|
28
29
|
xlarge: "button--xlarge",
|
|
@@ -45,6 +46,8 @@ export interface ButtonProps
|
|
|
45
46
|
>,
|
|
46
47
|
VariantProps<typeof buttonVariants> {
|
|
47
48
|
asChild?: boolean;
|
|
49
|
+
ftMadeFont?: boolean;
|
|
50
|
+
mazzardSoftFont?: boolean;
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
const sizeTextClasses: Record<string, string> = {
|
|
@@ -55,14 +58,16 @@ const sizeTextClasses: Record<string, string> = {
|
|
|
55
58
|
};
|
|
56
59
|
|
|
57
60
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
58
|
-
({ className, variant, size, children, style, ...props }, ref) => {
|
|
61
|
+
({ className, variant, size, ftMadeFont, mazzardSoftFont, children, style, ...props }, ref) => {
|
|
59
62
|
const textClass = sizeTextClasses[size || "large"];
|
|
60
63
|
|
|
61
64
|
return (
|
|
62
65
|
<button
|
|
63
66
|
className={cn(
|
|
64
67
|
buttonVariants({ variant, size }),
|
|
65
|
-
|
|
68
|
+
ftMadeFont && "font-ftMade",
|
|
69
|
+
mazzardSoftFont && "font-mazzardSoft",
|
|
70
|
+
className,
|
|
66
71
|
)}
|
|
67
72
|
style={style}
|
|
68
73
|
ref={ref}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { AnimatePresence, motion } from "motion/react";
|
|
3
3
|
import { cn } from "@/lib/utils";
|
|
4
|
-
import {
|
|
4
|
+
import { UtilityClearRegular } from "../icons/UtilityClearRegular";
|
|
5
5
|
import { NavBullet } from "../icons/NavBullet";
|
|
6
6
|
import { Button } from "@/components/ui/button";
|
|
7
7
|
import { StandardLogo } from "../icons/StandardLogo";
|
|
@@ -406,7 +406,8 @@ export const StandardNavigation: React.FC<NavigationProps> = ({
|
|
|
406
406
|
}
|
|
407
407
|
}}
|
|
408
408
|
>
|
|
409
|
-
|
|
409
|
+
<UtilityClearRegular className="navigation-close-icon" />
|
|
410
|
+
|
|
410
411
|
</Button>
|
|
411
412
|
) : null}
|
|
412
413
|
|
package/client/global.css
CHANGED
|
@@ -141,6 +141,14 @@ layer(base);
|
|
|
141
141
|
font-display: swap;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
.font-ftMade {
|
|
145
|
+
font-family: var(--font-ftmade);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.font-mazzardSoft {
|
|
149
|
+
font-family: var(--font-mazzard);
|
|
150
|
+
}
|
|
151
|
+
|
|
144
152
|
/* Container Utility Class */
|
|
145
153
|
.container {
|
|
146
154
|
margin-inline: auto;
|
|
@@ -949,10 +957,16 @@ body {
|
|
|
949
957
|
background-color: var(--color-white, #fff);
|
|
950
958
|
border: 1px solid var(--color-gray-200, #dedfe3);
|
|
951
959
|
color: var(--color-cyan-800, #0f748a);
|
|
960
|
+
|
|
952
961
|
}
|
|
953
962
|
|
|
954
963
|
.button--secondary-light:hover {
|
|
955
964
|
background-color: var(--color-gray-50, #f9f9fa);
|
|
965
|
+
transform: scale(1.02);
|
|
966
|
+
transition-timing-function: ease-in-out;
|
|
967
|
+
transition-duration: 200ms;
|
|
968
|
+
will-change: transform;
|
|
969
|
+
border: none;
|
|
956
970
|
}
|
|
957
971
|
|
|
958
972
|
.button--secondary-light:focus-visible {
|
|
@@ -1007,6 +1021,44 @@ body {
|
|
|
1007
1021
|
0 0 0 2px var(--color-blue-200, #cbe0f1),
|
|
1008
1022
|
0 0 0 4px var(--color-white, #fff);
|
|
1009
1023
|
}
|
|
1024
|
+
.button--transparent-tertiary {
|
|
1025
|
+
display: inline-flex;
|
|
1026
|
+
align-items: center;
|
|
1027
|
+
justify-content: center;
|
|
1028
|
+
border-radius: 9999px;
|
|
1029
|
+
transition-property: all;
|
|
1030
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
1031
|
+
transition-duration: 200ms;
|
|
1032
|
+
font-weight: 600;
|
|
1033
|
+
will-change: transform;
|
|
1034
|
+
border: none;
|
|
1035
|
+
height: 4rem;
|
|
1036
|
+
cursor: pointer;
|
|
1037
|
+
box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
1038
|
+
background: none;
|
|
1039
|
+
background-color: #282A3133;
|
|
1040
|
+
padding-left: 3.75rem;
|
|
1041
|
+
padding-right: 3.75rem;
|
|
1042
|
+
color: white;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
.button--transparent-tertiary:hover {
|
|
1046
|
+
transform: scale(1.02);
|
|
1047
|
+
background-color: #282a3166;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.button--transparent-tertiary:focus-visible {
|
|
1051
|
+
outline: none;
|
|
1052
|
+
box-shadow:
|
|
1053
|
+
0 0 0 2px var(--tw-ring-color, rgb(59 130 246)),
|
|
1054
|
+
0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
1055
|
+
--tw-ring-offset-width: 2px;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.button--transparent-tertiary:disabled {
|
|
1059
|
+
pointer-events: none;
|
|
1060
|
+
opacity: 0.5;
|
|
1061
|
+
}
|
|
1010
1062
|
|
|
1011
1063
|
.button--general-tertiary {
|
|
1012
1064
|
background-color: var(--color-white, #fff);
|
|
@@ -1062,6 +1114,7 @@ body {
|
|
|
1062
1114
|
font-weight: 600;
|
|
1063
1115
|
}
|
|
1064
1116
|
|
|
1117
|
+
|
|
1065
1118
|
.button--large {
|
|
1066
1119
|
height: 3rem;
|
|
1067
1120
|
padding-left: 2rem;
|
|
@@ -1094,7 +1147,7 @@ body {
|
|
|
1094
1147
|
.button-text {
|
|
1095
1148
|
position: relative;
|
|
1096
1149
|
z-index: 10;
|
|
1097
|
-
font-weight: 600;
|
|
1150
|
+
font-weight: 600 !important;
|
|
1098
1151
|
}
|
|
1099
1152
|
|
|
1100
1153
|
/* Accordion Styles */
|
|
@@ -6092,7 +6145,7 @@ body {
|
|
|
6092
6145
|
|
|
6093
6146
|
.navigation-logo-link {
|
|
6094
6147
|
display: flex;
|
|
6095
|
-
align-items:
|
|
6148
|
+
align-items: baseline;
|
|
6096
6149
|
transition: transform 300ms ease-in-out;
|
|
6097
6150
|
will-change: transform;
|
|
6098
6151
|
gap: 6px;
|
|
@@ -20,6 +20,14 @@ const meta = {
|
|
|
20
20
|
control: { type: "select" },
|
|
21
21
|
options: ["xlarge", "large", "utility", "icon"],
|
|
22
22
|
},
|
|
23
|
+
ftMadeFont: {
|
|
24
|
+
control: { type: "boolean" },
|
|
25
|
+
defaultValue: false,
|
|
26
|
+
},
|
|
27
|
+
mazzardSoftFont: {
|
|
28
|
+
control: { type: "boolean" },
|
|
29
|
+
defaultValue: false,
|
|
30
|
+
},
|
|
23
31
|
},
|
|
24
32
|
} satisfies Meta<typeof Button>;
|
|
25
33
|
|
|
@@ -29,17 +37,17 @@ type Story = StoryObj<typeof meta>;
|
|
|
29
37
|
|
|
30
38
|
// CTA Buttons Stories
|
|
31
39
|
export const CTAPrimaryGradient: Story = {
|
|
32
|
-
render: () => (
|
|
40
|
+
render: (args) => (
|
|
33
41
|
<div className="space-y-6">
|
|
34
42
|
<div>
|
|
35
43
|
<p className="text-sm text-gray-600 mb-2">Xlarge, primary, gradient</p>
|
|
36
|
-
<Button variant="primary-gradient" size="xlarge">
|
|
44
|
+
<Button variant="primary-gradient" size="xlarge" ftMadeFont={args.ftMadeFont}>
|
|
37
45
|
Call to action
|
|
38
46
|
</Button>
|
|
39
47
|
</div>
|
|
40
48
|
<div>
|
|
41
49
|
<p className="text-sm text-gray-600 mb-2">Large, primary, gradient</p>
|
|
42
|
-
<Button variant="primary-gradient" size="large">
|
|
50
|
+
<Button variant="primary-gradient" size="large" ftMadeFont={args.ftMadeFont}>
|
|
43
51
|
Call to action
|
|
44
52
|
</Button>
|
|
45
53
|
</div>
|
|
@@ -138,6 +146,19 @@ export const UtilityGeneralTertiary: Story = {
|
|
|
138
146
|
),
|
|
139
147
|
};
|
|
140
148
|
|
|
149
|
+
export const UtilityTransparentTertiary: Story = {
|
|
150
|
+
render: () => (
|
|
151
|
+
<div className="space-y-6">
|
|
152
|
+
<div>
|
|
153
|
+
<p className="text-sm text-gray-600 mb-2">Transparent, tertiary</p>
|
|
154
|
+
<Button variant="transparent-tertiary" size="utility">
|
|
155
|
+
Transparent tertiary
|
|
156
|
+
</Button>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
),
|
|
160
|
+
};
|
|
161
|
+
|
|
141
162
|
export const UtilityTooltipPrimary: Story = {
|
|
142
163
|
render: () => (
|
|
143
164
|
<div className="space-y-6">
|