@dev-blinq/ui-systems 1.0.3 → 1.0.5
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/dist/index.css +418 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +46 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +5 -1
- package/build +0 -22
- package/index.html +0 -14
- package/public/colors.css +0 -141
- package/src/components/CustomButton/CustomButton.tsx +0 -42
- package/src/components/CustomButton/CustomButtonProps.ts +0 -12
- package/src/components/CustomButton/CustomButtonTypes.ts +0 -28
- package/src/components/CustomButton/css/color/default.css +0 -84
- package/src/components/CustomButton/css/color/disabled.css +0 -58
- package/src/components/CustomButton/css/color/focused.css +0 -39
- package/src/components/CustomButton/css/color/hover.css +0 -39
- package/src/components/CustomButton/css/customButton.css +0 -73
- package/src/components/CustomButton/css/index.css +0 -6
- package/src/components/CustomButton/css/size.css +0 -23
- package/src/components/CustomCheckbox.tsx +0 -24
- package/src/components/CustomInput/ChooseInput.tsx +0 -36
- package/src/components/CustomInput/CustomInput.tsx +0 -43
- package/src/components/CustomInput/CustomInputProps.ts +0 -40
- package/src/components/CustomInput/css/index.css +0 -7
- package/src/components/CustomInput/css/input.css +0 -76
- package/src/components/CustomInput/css/size.css +0 -3
- package/src/components/CustomInput/css/state/default.css +0 -0
- package/src/components/CustomInput/css/state/disabled.css +0 -5
- package/src/components/CustomInput/css/state/error.css +0 -3
- package/src/components/CustomInput/css/state/filled.css +0 -0
- package/src/components/CustomInput/css/state/focused.css +0 -6
- package/src/components/CustomInput/css/state/hover.css +0 -5
- package/src/components/CustomInput/types/Action.tsx +0 -34
- package/src/components/CustomInput/types/CreditCard.tsx +0 -25
- package/src/components/CustomInput/types/Currency.tsx +0 -68
- package/src/components/CustomInput/types/Date.tsx +0 -20
- package/src/components/CustomInput/types/Link.tsx +0 -32
- package/src/components/CustomInput/types/Number.tsx +0 -23
- package/src/components/CustomInput/types/Password.tsx +0 -30
- package/src/components/CustomInput/types/Telephone.tsx +0 -0
- package/src/components/CustomInput/types/Text.tsx +0 -27
- package/src/components/Typography/Typography.tsx +0 -28
- package/src/components/Typography/css/bold.css +0 -20
- package/src/components/Typography/css/category/display.css +0 -20
- package/src/components/Typography/css/category/heading.css +0 -41
- package/src/components/Typography/css/category/text.css +0 -48
- package/src/components/Typography/css/index.css +0 -4
- package/src/icons/details.tsx +0 -10
- package/src/icons/index.tsx +0 -2
- package/src/icons/lock.tsx +0 -29
- package/src/icons/mail.svg +0 -4
- package/src/icons/mail.tsx +0 -23
- package/src/icons/password-eye.tsx +0 -10
- package/src/index.ts +0 -3
- package/src/playground/App.tsx +0 -105
- package/src/playground/main.tsx +0 -9
- package/src/svg.d.ts +0 -5
- package/tsconfig.json +0 -17
- package/tsup.config.ts +0 -10
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { InputContext } from "../CustomInputProps";
|
|
2
|
-
import { LockIcon } from "../../../icons/lock";
|
|
3
|
-
import { PasswordEyeIcon } from "../../../icons/password-eye";
|
|
4
|
-
|
|
5
|
-
export const PasswordInput = (context: InputContext) => {
|
|
6
|
-
return (
|
|
7
|
-
<div className="custom-input" data-type={context.type} data-error={context.errExists}>
|
|
8
|
-
<div className="left-icon">
|
|
9
|
-
<LockIcon />
|
|
10
|
-
</div>
|
|
11
|
-
<input
|
|
12
|
-
type="password"
|
|
13
|
-
placeholder="*****************"
|
|
14
|
-
disabled={context.disabled}
|
|
15
|
-
{...context.props}
|
|
16
|
-
style={{
|
|
17
|
-
fontFamily: "var(--font-family)",
|
|
18
|
-
color: "var(--text-primary, #080808)",
|
|
19
|
-
fontWeight: 600,
|
|
20
|
-
fontSize: "14px",
|
|
21
|
-
fontStyle: "normal",
|
|
22
|
-
}}
|
|
23
|
-
/>
|
|
24
|
-
<div className="right-icon">
|
|
25
|
-
{/* {context.rightIcon ? context.rightIcon : <PasswordEyeIcon />} */}
|
|
26
|
-
{context.rightIcon ? <img src={context.rightIcon} alt="icon" /> : <PasswordEyeIcon />}
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
File without changes
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { InputContext } from "../CustomInputProps";
|
|
2
|
-
import { DetailsIcon } from "../../../icons/details";
|
|
3
|
-
export const DefaultInput = (context: InputContext) => {
|
|
4
|
-
return (
|
|
5
|
-
<div className="custom-input" data-type={context.type} data-error={context.errExists}>
|
|
6
|
-
{/* {context.leftIcon && <div className="left-icon">{context.leftIcon}</div>} */}
|
|
7
|
-
{context.leftIcon && <img src={context.leftIcon} alt="icon" />}
|
|
8
|
-
<input
|
|
9
|
-
type="text"
|
|
10
|
-
placeholder={context.placeholder}
|
|
11
|
-
disabled={context.disabled}
|
|
12
|
-
{...context.props}
|
|
13
|
-
style={{
|
|
14
|
-
fontFamily: "var(--font-family)",
|
|
15
|
-
color: "var(--text-primary, #080808)",
|
|
16
|
-
fontWeight: 600,
|
|
17
|
-
fontSize: "14px",
|
|
18
|
-
fontStyle: "normal",
|
|
19
|
-
}}
|
|
20
|
-
/>
|
|
21
|
-
<div className="right-icon">
|
|
22
|
-
{/* {context.rightIcon ? context.rightIcon : <DetailsIcon />} */}
|
|
23
|
-
{context.rightIcon ? <img src={context.rightIcon} alt="icon" /> : <DetailsIcon />}
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Typography, TypographyProps } from "@mui/material";
|
|
2
|
-
import "./css/index.css";
|
|
3
|
-
type category = "display" | "heading" | "text";
|
|
4
|
-
type size = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
5
|
-
type bold = "semibold" | "bold" | "extrabold" | "medium";
|
|
6
|
-
|
|
7
|
-
interface TypegraphyCustomType extends TypographyProps {
|
|
8
|
-
Size?: size;
|
|
9
|
-
category?: category;
|
|
10
|
-
bold?: bold;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const TypographyCustom: React.FC<TypegraphyCustomType> = ({ children, Size, category, bold, sx, ...props }) => {
|
|
14
|
-
return (
|
|
15
|
-
<Typography
|
|
16
|
-
className="TypographyCustom"
|
|
17
|
-
data-size={Size}
|
|
18
|
-
data-category={category}
|
|
19
|
-
data-bold={bold}
|
|
20
|
-
sx={{ fontFamily: "var(--font-family), sans-serif", ...sx }}
|
|
21
|
-
{...props}
|
|
22
|
-
>
|
|
23
|
-
{children}
|
|
24
|
-
</Typography>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export default TypographyCustom;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
.TypographyCustom {
|
|
2
|
-
color: var(--Gray-110, var(--colors-greyscale-110, #2d2b32));
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/* text bold css*/
|
|
6
|
-
.TypographyCustom[data-bold="extrabold"] {
|
|
7
|
-
font-weight: 800;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.TypographyCustom[data-bold="bold"] {
|
|
11
|
-
font-weight: 700;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.TypographyCustom[data-bold="semibold"] {
|
|
15
|
-
font-weight: 600;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.TypographyCustom[data-bold="medium"] {
|
|
19
|
-
font-weight: 500;
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
.TypographyCustom[data-category="display"][data-size="lg"] {
|
|
2
|
-
font-size: 180px;
|
|
3
|
-
font-style: normal;
|
|
4
|
-
line-height: 188px; /* 104.444% */
|
|
5
|
-
letter-spacing: -9px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.TypographyCustom[data-category="display"][data-size="md"] {
|
|
9
|
-
font-size: 128px;
|
|
10
|
-
font-style: normal;
|
|
11
|
-
line-height: 136px; /* 106.25% */
|
|
12
|
-
letter-spacing: -5.12px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.TypographyCustom[data-category="display"][data-size="sm"] {
|
|
16
|
-
font-size: 96px;
|
|
17
|
-
font-style: normal;
|
|
18
|
-
line-height: 104px; /* 108.333% */
|
|
19
|
-
letter-spacing: -2.88px;
|
|
20
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
.TypographyCustom[data-category="heading"][data-size="xxl"] {
|
|
2
|
-
font-size: 72px;
|
|
3
|
-
font-style: normal;
|
|
4
|
-
line-height: 80px; /* 111.111% */
|
|
5
|
-
letter-spacing: -1.44px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.TypographyCustom[data-category="heading"][data-size="xl"] {
|
|
9
|
-
font-size: 60px;
|
|
10
|
-
font-style: normal;
|
|
11
|
-
line-height: 68px; /* 113.333% */
|
|
12
|
-
letter-spacing: -1.08px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.TypographyCustom[data-category="heading"][data-size="lg"] {
|
|
16
|
-
font-size: 48px;
|
|
17
|
-
font-style: normal;
|
|
18
|
-
line-height: 56px; /* 116.667% */
|
|
19
|
-
letter-spacing: -0.768px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.TypographyCustom[data-category="heading"][data-size="md"] {
|
|
23
|
-
font-size: 36px;
|
|
24
|
-
font-style: normal;
|
|
25
|
-
line-height: 44px; /* 122.222% */
|
|
26
|
-
letter-spacing: -0.504px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.TypographyCustom[data-category="heading"][data-size="sm"] {
|
|
30
|
-
font-size: 30px;
|
|
31
|
-
font-style: normal;
|
|
32
|
-
line-height: 38px; /* 126.667% */
|
|
33
|
-
letter-spacing: -0.39px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.TypographyCustom[data-category="heading"][data-size="xs"] {
|
|
37
|
-
font-size: 24px;
|
|
38
|
-
font-style: normal;
|
|
39
|
-
line-height: 32px; /* 133.333% */
|
|
40
|
-
letter-spacing: -0.288px;
|
|
41
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
.TypographyCustom[data-category="text"][data-size="xxl"] {
|
|
2
|
-
font-size: 24px;
|
|
3
|
-
font-style: normal;
|
|
4
|
-
line-height: 32px; /* 133.333% */
|
|
5
|
-
letter-spacing: -0.288px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.TypographyCustom[data-category="text"][data-size="xl"] {
|
|
9
|
-
font-size: 20px;
|
|
10
|
-
font-style: normal;
|
|
11
|
-
line-height: 28px; /* 140% */
|
|
12
|
-
letter-spacing: -0.2px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.TypographyCustom[data-category="text"][data-size="lg"] {
|
|
16
|
-
font-size: 18px;
|
|
17
|
-
font-style: normal;
|
|
18
|
-
line-height: 24px; /* 133.333% */
|
|
19
|
-
letter-spacing: -0.144px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.TypographyCustom[data-category="text"][data-size="md"] {
|
|
23
|
-
font-size: 16px;
|
|
24
|
-
font-style: normal;
|
|
25
|
-
line-height: 22px; /* 137.5% */
|
|
26
|
-
letter-spacing: -0.112px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.TypographyCustom[data-category="text"][data-size="sm"] {
|
|
30
|
-
font-size: 14px;
|
|
31
|
-
font-style: normal;
|
|
32
|
-
line-height: 20px; /* 142.857% */
|
|
33
|
-
letter-spacing: -0.084px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.TypographyCustom[data-category="text"][data-size="xs"] {
|
|
37
|
-
font-size: 12px;
|
|
38
|
-
font-style: normal;
|
|
39
|
-
line-height: 16px; /* 133.333% */
|
|
40
|
-
letter-spacing: -0.06px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.TypographyCustom[data-category="text"][data-size="xxs"] {
|
|
44
|
-
font-size: 10px;
|
|
45
|
-
font-style: normal;
|
|
46
|
-
line-height: 14px; /* 140% */
|
|
47
|
-
letter-spacing: -0.04px;
|
|
48
|
-
}
|
package/src/icons/details.tsx
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const DetailsIcon = () => {
|
|
2
|
-
return (
|
|
3
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
-
<path
|
|
5
|
-
d="M11.25 14.0625C11.25 14.3097 11.1767 14.5514 11.0393 14.757C10.902 14.9625 10.7068 15.1227 10.4784 15.2173C10.2499 15.312 9.99862 15.3367 9.75614 15.2885C9.51366 15.2402 9.29094 15.1212 9.11612 14.9464C8.9413 14.7716 8.82225 14.5488 8.77402 14.3064C8.72579 14.0639 8.75054 13.8126 8.84515 13.5841C8.93976 13.3557 9.09998 13.1605 9.30554 13.0232C9.5111 12.8858 9.75278 12.8125 10 12.8125C10.3315 12.8125 10.6495 12.9442 10.8839 13.1786C11.1183 13.413 11.25 13.731 11.25 14.0625ZM18.4375 10C18.4375 11.6688 17.9427 13.3001 17.0155 14.6876C16.0884 16.0752 14.7706 17.1566 13.2289 17.7952C11.6871 18.4338 9.99064 18.6009 8.35393 18.2754C6.71721 17.9498 5.2138 17.1462 4.03379 15.9662C2.85378 14.7862 2.05019 13.2828 1.72463 11.6461C1.39907 10.0094 1.56616 8.31286 2.20477 6.77111C2.84338 5.22936 3.92484 3.9116 5.31238 2.98448C6.69992 2.05735 8.33122 1.5625 10 1.5625C12.237 1.56498 14.3817 2.45473 15.9635 4.03653C17.5453 5.61833 18.435 7.763 18.4375 10ZM16.5625 10C16.5625 8.70206 16.1776 7.43327 15.4565 6.35407C14.7354 5.27487 13.7105 4.43374 12.5114 3.93704C11.3122 3.44034 9.99272 3.31038 8.71972 3.5636C7.44672 3.81681 6.2774 4.44183 5.35962 5.35961C4.44183 6.27739 3.81682 7.44672 3.5636 8.71972C3.31038 9.99272 3.44034 11.3122 3.93704 12.5114C4.43374 13.7105 5.27488 14.7354 6.35407 15.4565C7.43327 16.1776 8.70206 16.5625 10 16.5625C11.7399 16.5606 13.408 15.8686 14.6383 14.6383C15.8686 13.408 16.5606 11.7399 16.5625 10ZM10 5C8.10469 5 6.5625 6.40156 6.5625 8.125V8.4375C6.5625 8.68614 6.66127 8.9246 6.83709 9.10041C7.01291 9.27623 7.25136 9.375 7.5 9.375C7.74864 9.375 7.9871 9.27623 8.16292 9.10041C8.33873 8.9246 8.4375 8.68614 8.4375 8.4375V8.125C8.4375 7.43594 9.14063 6.875 10 6.875C10.8594 6.875 11.5625 7.43594 11.5625 8.125C11.5625 8.81406 10.8594 9.375 10 9.375C9.75136 9.375 9.51291 9.47377 9.33709 9.64959C9.16127 9.8254 9.0625 10.0639 9.0625 10.3125V10.9375C9.06194 11.1691 9.14715 11.3927 9.30169 11.5653C9.45623 11.7378 9.66916 11.847 9.89945 11.8719C10.1297 11.8967 10.3611 11.8354 10.5488 11.6998C10.7366 11.5642 10.8676 11.3639 10.9164 11.1375C12.368 10.7719 13.4375 9.56016 13.4375 8.125C13.4375 6.40156 11.8953 5 10 5Z"
|
|
6
|
-
fill="#080808"
|
|
7
|
-
/>
|
|
8
|
-
</svg>
|
|
9
|
-
);
|
|
10
|
-
};
|
package/src/icons/index.tsx
DELETED
package/src/icons/lock.tsx
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export const LockIcon = () => {
|
|
2
|
-
return (
|
|
3
|
-
<svg width="16" height="18" viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
-
<path
|
|
5
|
-
d="M11.6868 6.87324V5.08408C11.6868 2.98991 9.98844 1.29154 7.89427 1.29154C5.8001 1.28241 4.0951 2.97241 4.08594 5.06741V5.08408V6.87324"
|
|
6
|
-
stroke="#939197"
|
|
7
|
-
stroke-width="2"
|
|
8
|
-
stroke-linecap="round"
|
|
9
|
-
stroke-linejoin="round"
|
|
10
|
-
/>
|
|
11
|
-
<path
|
|
12
|
-
fill-rule="evenodd"
|
|
13
|
-
clip-rule="evenodd"
|
|
14
|
-
d="M11.0695 16.7081H4.70199C2.95699 16.7081 1.54199 15.294 1.54199 13.5481V9.97396C1.54199 8.22813 2.95699 6.81396 4.70199 6.81396H11.0695C12.8145 6.81396 14.2295 8.22813 14.2295 9.97396V13.5481C14.2295 15.294 12.8145 16.7081 11.0695 16.7081Z"
|
|
15
|
-
stroke="#939197"
|
|
16
|
-
stroke-width="2"
|
|
17
|
-
stroke-linecap="round"
|
|
18
|
-
stroke-linejoin="round"
|
|
19
|
-
/>
|
|
20
|
-
<path
|
|
21
|
-
d="M7.88574 10.8357V12.6865"
|
|
22
|
-
stroke="#939197"
|
|
23
|
-
stroke-width="2"
|
|
24
|
-
stroke-linecap="round"
|
|
25
|
-
stroke-linejoin="round"
|
|
26
|
-
/>
|
|
27
|
-
</svg>
|
|
28
|
-
);
|
|
29
|
-
};
|
package/src/icons/mail.svg
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
2
|
-
<path d="M17.5 12.5786C17.5 14.8829 15.9627 16.7559 13.6819 16.7503H6.31811C4.0373 16.7559 2.5 14.8829 2.5 12.5786V7.42754C2.5 5.12565 4.0373 3.25024 6.31811 3.25024H13.6819C15.9627 3.25024 17.5 5.12565 17.5 7.42754V12.5786Z" stroke="#939197" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
-
<path d="M14.4267 7.63843L11.0943 10.3482C10.4667 10.8468 9.57726 10.8468 8.94968 10.3482L5.58887 7.63843" stroke="#939197" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
</svg>
|
package/src/icons/mail.tsx
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
interface MailIconProps {
|
|
2
|
-
style?: React.CSSProperties;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export const MailIcon = ({ style }: MailIconProps) => (
|
|
6
|
-
// edited the svg to style it with the props
|
|
7
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" style={style}>
|
|
8
|
-
<path
|
|
9
|
-
d="M17.5 12.5786C17.5 14.8829 15.9627 16.7559 13.6819 16.7503H6.31811C4.0373 16.7559 2.5 14.8829 2.5 12.5786V7.42754C2.5 5.12565 4.0373 3.25024 6.31811 3.25024H13.6819C15.9627 3.25024 17.5 5.12565 17.5 7.42754V12.5786Z"
|
|
10
|
-
stroke="#939197"
|
|
11
|
-
strokeWidth="2"
|
|
12
|
-
strokeLinecap="round"
|
|
13
|
-
strokeLinejoin="round"
|
|
14
|
-
/>
|
|
15
|
-
<path
|
|
16
|
-
d="M14.4267 7.63843L11.0943 10.3482C10.4667 10.8468 9.57726 10.8468 8.94968 10.3482L5.58887 7.63843"
|
|
17
|
-
stroke="#939197"
|
|
18
|
-
strokeWidth="2"
|
|
19
|
-
strokeLinecap="round"
|
|
20
|
-
strokeLinejoin="round"
|
|
21
|
-
/>
|
|
22
|
-
</svg>
|
|
23
|
-
);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const PasswordEyeIcon = () => {
|
|
2
|
-
return (
|
|
3
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
-
<path
|
|
5
|
-
d="M4.44393 2.49455C4.36161 2.40174 4.26167 2.3262 4.14993 2.2723C4.0382 2.2184 3.91687 2.18722 3.79299 2.18055C3.66911 2.17389 3.54514 2.19188 3.42826 2.23348C3.31138 2.27508 3.20392 2.33946 3.11211 2.4229C3.0203 2.50634 2.94596 2.60716 2.89341 2.71954C2.84085 2.83192 2.81112 2.95361 2.80594 3.07756C2.80076 3.20152 2.82024 3.32526 2.86324 3.44163C2.90624 3.558 2.9719 3.66468 3.05643 3.75549L4.30643 5.13439C1.61503 6.92658 0.44706 9.49846 0.39081 9.61955C0.337882 9.73955 0.310547 9.86926 0.310547 10.0004C0.310547 10.1316 0.337882 10.2613 0.39081 10.3813C0.419716 10.4453 1.10409 11.9641 2.61659 13.4758C4.63847 15.4953 7.18769 16.5625 10.0002 16.5625C11.3671 16.5701 12.7217 16.3045 13.9846 15.7813L15.5541 17.5078C15.7222 17.6884 15.9547 17.7954 16.2011 17.8057C16.4476 17.816 16.6882 17.7288 16.8708 17.5628C17.0534 17.3969 17.1632 17.1657 17.1764 16.9194C17.1897 16.6731 17.1053 16.4314 16.9416 16.2469L4.44393 2.49455ZM10.0002 14.6875C7.68847 14.6875 5.66659 13.8492 3.99159 12.1969C3.33273 11.5445 2.7658 10.8054 2.30643 10C2.71815 9.27267 3.7744 7.66408 5.58768 6.53986L12.626 14.2828C11.7772 14.5539 10.8912 14.6904 10.0002 14.6875ZM19.6096 10.3813C19.5814 10.4445 18.9064 11.9438 17.4221 13.4406C17.3371 13.535 17.2338 13.6111 17.1185 13.6643C17.0032 13.7175 16.8783 13.7468 16.7513 13.7503C16.6244 13.7538 16.4981 13.7315 16.38 13.6847C16.2619 13.6378 16.1546 13.5675 16.0646 13.478C15.9745 13.3885 15.9036 13.2816 15.8561 13.1638C15.8086 13.046 15.7855 12.9198 15.7882 12.7929C15.791 12.6659 15.8195 12.5408 15.8721 12.4252C15.9246 12.3096 16.0001 12.2059 16.0939 12.1203C16.7175 11.4864 17.2554 10.7735 17.6939 10C17.2348 9.19443 16.6679 8.45531 16.0088 7.80314C14.333 6.1508 12.3119 5.31252 10.0002 5.31252C9.73847 5.31252 9.47675 5.32346 9.21894 5.34533C9.0947 5.35864 8.96905 5.34698 8.84938 5.31104C8.72971 5.27509 8.61844 5.21559 8.52209 5.13602C8.42575 5.05646 8.34628 4.95844 8.28837 4.84772C8.23045 4.737 8.19525 4.61583 8.18483 4.49131C8.17442 4.3668 8.189 4.24145 8.22772 4.12265C8.26644 4.00385 8.32851 3.89399 8.4103 3.79953C8.49208 3.70506 8.59193 3.6279 8.70396 3.57257C8.816 3.51725 8.93796 3.48488 9.06269 3.47736C9.36972 3.4508 9.68769 3.43752 10.0002 3.43752C12.8127 3.43752 15.3619 4.50549 17.3822 6.52502C18.8939 8.03674 19.5783 9.55627 19.6072 9.61955C19.6605 9.73938 19.6882 9.86901 19.6887 10.0002C19.6891 10.1313 19.6621 10.2611 19.6096 10.3813Z"
|
|
6
|
-
fill="#080808"
|
|
7
|
-
/>
|
|
8
|
-
</svg>
|
|
9
|
-
);
|
|
10
|
-
};
|
package/src/index.ts
DELETED
package/src/playground/App.tsx
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { Button, CustomInput, CustomCheckbox } from "../";
|
|
3
|
-
import TypographyCustom from "../components/Typography/Typography";
|
|
4
|
-
import {
|
|
5
|
-
ButtonSize,
|
|
6
|
-
ButtonColorHierarchyType,
|
|
7
|
-
buttonColorHierarchyArray,
|
|
8
|
-
} from "../components/CustomButton/CustomButtonTypes";
|
|
9
|
-
import { MailIcon } from "../icons/index";
|
|
10
|
-
|
|
11
|
-
function extractPossibleChoices(type: ButtonColorHierarchyType): string[] {
|
|
12
|
-
console.log(type);
|
|
13
|
-
return [...new Set(type.split("|").map((t) => t.trim()))];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const App: React.FC = () => {
|
|
17
|
-
const [size, setSize] = useState<ButtonSize>("md");
|
|
18
|
-
const [colorHierarchy, setColorHierarchy] = useState<ButtonColorHierarchyType>("brand/primary");
|
|
19
|
-
|
|
20
|
-
const [disabled, setDisabled] = useState<boolean>(false);
|
|
21
|
-
const [text, setText] = useState<string>("Test Button");
|
|
22
|
-
|
|
23
|
-
const [inputValue, setInputValue] = useState("");
|
|
24
|
-
const [checkboxChecked, setCheckboxChecked] = useState(false);
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<div className="playground-container">
|
|
28
|
-
<div className="controls">
|
|
29
|
-
<h2 className="controls-title">Controls</h2>
|
|
30
|
-
<div className="control-item">
|
|
31
|
-
<label htmlFor="size">Size</label>
|
|
32
|
-
<select id="size" value={size} onChange={(e) => setSize(e.target.value as "sm" | "md" | "lg")}>
|
|
33
|
-
<option value="sm">Small</option>
|
|
34
|
-
<option value="md">Medium</option>
|
|
35
|
-
<option value="lg">Large</option>
|
|
36
|
-
<option value="xl">Extra Large</option>
|
|
37
|
-
</select>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<div className="control-item">
|
|
41
|
-
<label htmlFor="colorHierarchy">Color Hierarchy</label>
|
|
42
|
-
<select
|
|
43
|
-
id="colorHierarchy"
|
|
44
|
-
value={colorHierarchy}
|
|
45
|
-
onChange={(e) => setColorHierarchy(e.target.value as ButtonColorHierarchyType)}
|
|
46
|
-
>
|
|
47
|
-
{buttonColorHierarchyArray.map((colorHierarchy, index) => (
|
|
48
|
-
<option key={index} value={colorHierarchy}>
|
|
49
|
-
{colorHierarchy}
|
|
50
|
-
</option>
|
|
51
|
-
))}
|
|
52
|
-
</select>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
<div className="control-item">
|
|
56
|
-
<label htmlFor="disabled">Disabled</label>
|
|
57
|
-
<input type="checkbox" id="disabled" checked={disabled} onChange={(e) => setDisabled(e.target.checked)} />
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<div className="control-item">
|
|
61
|
-
<label htmlFor="text">Text</label>
|
|
62
|
-
<input type="text" id="text" value={text} onChange={(e) => setText(e.target.value)} />
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<div className="preview">
|
|
67
|
-
<h2 className="preview-title">Preview</h2>
|
|
68
|
-
<Button
|
|
69
|
-
size={size}
|
|
70
|
-
colorHierarchy={colorHierarchy}
|
|
71
|
-
disabled={disabled}
|
|
72
|
-
text={text}
|
|
73
|
-
leftIcon={MailIcon}
|
|
74
|
-
onClick={() => alert("Button clicked!")}
|
|
75
|
-
/>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<div className="mb-4">
|
|
79
|
-
<h2 className="text-xl mb-2">Typography</h2>
|
|
80
|
-
<TypographyCustom category="text" Size="md" bold="semibold">
|
|
81
|
-
This is a custom typography component
|
|
82
|
-
</TypographyCustom>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
<div className="mb-4" style={{ paddingLeft: "3em" }}>
|
|
86
|
-
<h2 className="text-xl mb-2">Custom Input</h2>
|
|
87
|
-
<CustomInput
|
|
88
|
-
value={inputValue}
|
|
89
|
-
leftIcon={MailIcon}
|
|
90
|
-
actionLabel="Send"
|
|
91
|
-
errExists={true}
|
|
92
|
-
onChange={(e: any) => setInputValue(e.target.value)}
|
|
93
|
-
label="Label"
|
|
94
|
-
placeholder="Type here..."
|
|
95
|
-
/>
|
|
96
|
-
</div>
|
|
97
|
-
<div className="mb-4">
|
|
98
|
-
{/* <h2 className="text-xl mb-2">Custom Checkbox</h2> */}
|
|
99
|
-
{/* <CustomCheckbox checked={checkboxChecked} onChange={setCheckboxChecked} label="Check me" /> */}
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export default App;
|
package/src/playground/main.tsx
DELETED
package/src/svg.d.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es6",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"jsx": "react-jsx",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"moduleResolution": "node",
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"forceConsistentCasingInFileNames": true,
|
|
11
|
-
"declaration": true,
|
|
12
|
-
"outDir": "dist"
|
|
13
|
-
},
|
|
14
|
-
"include": ["src"],
|
|
15
|
-
"exclude": ["node_modules", "dist"]
|
|
16
|
-
}
|
|
17
|
-
|
package/tsup.config.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "tsup";
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
entry: ["src/index.ts"],
|
|
5
|
-
format: ["cjs", "esm"], // Build for commonJS and ESmodules
|
|
6
|
-
dts: true, // Generate declaration file (.d.ts)
|
|
7
|
-
splitting: false,
|
|
8
|
-
sourcemap: true,
|
|
9
|
-
clean: true,
|
|
10
|
-
});
|