globalfy-design-system 0.3.0 → 0.5.0
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/package.json +13 -1
- package/.babelrc +0 -7
- package/.eslintrc.cjs +0 -20
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -4
- package/.lintstagedrc +0 -4
- package/.nvmrc +0 -1
- package/.prettierrc +0 -3
- package/.storybook/main.ts +0 -20
- package/.storybook/preview-head.html +0 -6
- package/.storybook/preview.ts +0 -17
- package/CODEOWNERS +0 -1
- package/bitbucket-pipelines.yml +0 -44
- package/commitlint.config.cjs +0 -1
- package/components.json +0 -16
- package/index.html +0 -13
- package/jest.config.js +0 -9
- package/postcss.config.js +0 -6
- package/public/vite.svg +0 -1
- package/src/assets/fonts/satoshi/Satoshi-Black.ttf +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Black.woff +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Black.woff2 +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Bold.ttf +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Bold.woff +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Bold.woff2 +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Medium.ttf +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Medium.woff +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Medium.woff2 +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Regular.ttf +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Regular.woff +0 -0
- package/src/assets/fonts/satoshi/Satoshi-Regular.woff2 +0 -0
- package/src/assets/fonts/satoshi/satoshi.css +0 -43
- package/src/components/atoms/Avatar/Avatar.stories.tsx +0 -26
- package/src/components/atoms/Avatar/Avatar.test.tsx +0 -19
- package/src/components/atoms/Avatar/Avatar.tsx +0 -46
- package/src/components/atoms/Avatar/Avatar.types.ts +0 -7
- package/src/components/atoms/Avatar/index.ts +0 -2
- package/src/components/atoms/Checkbox/Checkbox.stories.tsx +0 -19
- package/src/components/atoms/Checkbox/Checkbox.test.tsx +0 -12
- package/src/components/atoms/Checkbox/Checkbox.tsx +0 -20
- package/src/components/atoms/Checkbox/index.ts +0 -1
- package/src/components/atoms/FieldMessage/FieldMessage.stories.tsx +0 -20
- package/src/components/atoms/FieldMessage/FieldMessage.test.tsx +0 -14
- package/src/components/atoms/FieldMessage/FieldMessage.tsx +0 -6
- package/src/components/atoms/FieldMessage/FieldMessage.type.ts +0 -3
- package/src/components/atoms/FieldMessage/index.ts +0 -2
- package/src/components/atoms/Flag/Flag.stories.tsx +0 -34
- package/src/components/atoms/Flag/Flag.tsx +0 -35
- package/src/components/atoms/Flag/Flag.types.ts +0 -6
- package/src/components/atoms/Flag/images/bra.svg +0 -8
- package/src/components/atoms/Flag/images/esp.svg +0 -6
- package/src/components/atoms/Flag/images/usa.svg +0 -9
- package/src/components/atoms/Flag/index.ts +0 -2
- package/src/components/atoms/Icon/Icon.stories.tsx +0 -32
- package/src/components/atoms/Icon/Icon.tsx +0 -6
- package/src/components/atoms/Icon/assets/fonts/icomoon.eot +0 -0
- package/src/components/atoms/Icon/assets/fonts/icomoon.svg +0 -21
- package/src/components/atoms/Icon/assets/fonts/icomoon.ttf +0 -0
- package/src/components/atoms/Icon/assets/fonts/icomoon.woff +0 -0
- package/src/components/atoms/Icon/assets/selection.json +0 -285
- package/src/components/atoms/Icon/assets/style.css +0 -60
- package/src/components/atoms/Icon/icon.types.ts +0 -17
- package/src/components/atoms/Icon/index.ts +0 -2
- package/src/components/atoms/Logo/Logo.stories.tsx +0 -20
- package/src/components/atoms/Logo/Logo.test.tsx +0 -11
- package/src/components/atoms/Logo/Logo.tsx +0 -12
- package/src/components/atoms/Logo/Logo.types.ts +0 -3
- package/src/components/atoms/Logo/images/globalfy_desktop.svg +0 -9
- package/src/components/atoms/Logo/images/globalfy_mobile.svg +0 -3
- package/src/components/atoms/Logo/index.ts +0 -2
- package/src/components/atoms/RadioGroup/RadioGroup.stories.tsx +0 -21
- package/src/components/atoms/RadioGroup/RadioGroup.test.tsx +0 -47
- package/src/components/atoms/RadioGroup/RadioGroup.tsx +0 -26
- package/src/components/atoms/RadioGroup/RadioGroup.types.ts +0 -12
- package/src/components/atoms/RadioGroup/index.ts +0 -1
- package/src/components/atoms/Switch/Switch.stories.tsx +0 -18
- package/src/components/atoms/Switch/Switch.test.tsx +0 -12
- package/src/components/atoms/Switch/Switch.tsx +0 -32
- package/src/components/atoms/Switch/Switch.types.ts +0 -3
- package/src/components/atoms/Switch/index.ts +0 -2
- package/src/components/atoms/Typography/Typography.stories.tsx +0 -18
- package/src/components/atoms/Typography/Typography.test.tsx +0 -10
- package/src/components/atoms/Typography/Typography.tsx +0 -37
- package/src/components/atoms/Typography/Typography.types.ts +0 -7
- package/src/components/atoms/Typography/index.ts +0 -2
- package/src/components/atoms/index.ts +0 -9
- package/src/components/index.ts +0 -1
- package/src/global.css +0 -76
- package/src/main.ts +0 -1
- package/src/shadcn/components/ui/avatar.tsx +0 -48
- package/src/shadcn/components/ui/button.tsx +0 -55
- package/src/shadcn/components/ui/checkbox.tsx +0 -28
- package/src/shadcn/components/ui/form.tsx +0 -177
- package/src/shadcn/components/ui/label.tsx +0 -23
- package/src/shadcn/components/ui/radio-group.tsx +0 -44
- package/src/shadcn/components/ui/switch.tsx +0 -27
- package/src/shadcn/utils.ts +0 -6
- package/src/utils/reactHookForm/FormWrapper.tsx +0 -12
- package/src/utils/tailwind/classNames.ts +0 -4
- package/src/vite-env.d.ts +0 -1
- package/tailwind.config.js +0 -98
- package/testSetup.ts +0 -1
- package/tsconfig.json +0 -32
- package/tsconfig.node.json +0 -10
- package/vite.config.ts +0 -24
- package/yarn.lock +0 -11017
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
3
|
-
import { Circle } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/shadcn/utils";
|
|
6
|
-
|
|
7
|
-
const RadioGroup = React.forwardRef<
|
|
8
|
-
React.ElementRef<typeof RadioGroupPrimitive.Root>,
|
|
9
|
-
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
|
|
10
|
-
>(({ className, ...props }, ref) => {
|
|
11
|
-
return (
|
|
12
|
-
<RadioGroupPrimitive.Root
|
|
13
|
-
className={cn("grid gap-2", className)}
|
|
14
|
-
{...props}
|
|
15
|
-
ref={ref}
|
|
16
|
-
/>
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
20
|
-
|
|
21
|
-
const RadioGroupItem = React.forwardRef<
|
|
22
|
-
React.ElementRef<typeof RadioGroupPrimitive.Item>,
|
|
23
|
-
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
|
|
24
|
-
>(({ className, ...props }, ref) => {
|
|
25
|
-
return (
|
|
26
|
-
<RadioGroupPrimitive.Item
|
|
27
|
-
ref={ref}
|
|
28
|
-
className={cn(
|
|
29
|
-
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
30
|
-
className
|
|
31
|
-
)}
|
|
32
|
-
{...props}
|
|
33
|
-
>
|
|
34
|
-
<RadioGroupPrimitive.Indicator className="flex items-center justify-center">
|
|
35
|
-
<Circle className="h-2.5 w-2.5 fill-current text-current" />
|
|
36
|
-
</RadioGroupPrimitive.Indicator>
|
|
37
|
-
</RadioGroupPrimitive.Item>
|
|
38
|
-
);
|
|
39
|
-
});
|
|
40
|
-
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
41
|
-
|
|
42
|
-
export { RadioGroup, RadioGroupItem };
|
|
43
|
-
|
|
44
|
-
// radio group receives children
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/shadcn/utils";
|
|
5
|
-
|
|
6
|
-
const Switch = React.forwardRef<
|
|
7
|
-
React.ElementRef<typeof SwitchPrimitives.Root>,
|
|
8
|
-
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
|
|
9
|
-
>(({ className, ...props }, ref) => (
|
|
10
|
-
<SwitchPrimitives.Root
|
|
11
|
-
className={cn(
|
|
12
|
-
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
15
|
-
{...props}
|
|
16
|
-
ref={ref}
|
|
17
|
-
>
|
|
18
|
-
<SwitchPrimitives.Thumb
|
|
19
|
-
className={cn(
|
|
20
|
-
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
21
|
-
)}
|
|
22
|
-
/>
|
|
23
|
-
</SwitchPrimitives.Root>
|
|
24
|
-
));
|
|
25
|
-
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
26
|
-
|
|
27
|
-
export { Switch };
|
package/src/shadcn/utils.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Form } from "@/shadcn/components/ui/form";
|
|
2
|
-
import { useForm } from "react-hook-form";
|
|
3
|
-
|
|
4
|
-
type FormWrapperProps = {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const FormWrapper = ({ children }: FormWrapperProps) => {
|
|
9
|
-
const form = useForm();
|
|
10
|
-
|
|
11
|
-
return <Form {...form}>{children}</Form>;
|
|
12
|
-
};
|
package/src/vite-env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
package/tailwind.config.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/** @type {import('tailwindcss').Config} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
darkMode: ["class"],
|
|
4
|
-
content: [
|
|
5
|
-
"./pages/**/*.{ts,tsx}",
|
|
6
|
-
"./components/**/*.{ts,tsx}",
|
|
7
|
-
"./app/**/*.{ts,tsx}",
|
|
8
|
-
"./src/**/*.{ts,tsx}"
|
|
9
|
-
],
|
|
10
|
-
theme: {
|
|
11
|
-
container: {
|
|
12
|
-
center: true,
|
|
13
|
-
padding: "2rem",
|
|
14
|
-
screens: {
|
|
15
|
-
"2xl": "1400px"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
extend: {
|
|
19
|
-
fontFamily: {
|
|
20
|
-
sans: ["Satoshi", "sans-serif"],
|
|
21
|
-
satoshi: ["Satoshi", "sans-serif"],
|
|
22
|
-
livvic: ["Livvic", "sans-serif"]
|
|
23
|
-
},
|
|
24
|
-
colors: {
|
|
25
|
-
globalfy: {
|
|
26
|
-
primaryGreen: "#0B9F59",
|
|
27
|
-
secondaryGreen: "#223F3A",
|
|
28
|
-
tertiaryGreen: "#39CD80",
|
|
29
|
-
white: "#FFFFFF",
|
|
30
|
-
primaryGrey: "#F5F7F9",
|
|
31
|
-
grey500: "#E6E6E6",
|
|
32
|
-
grey600: "#D1D1D1",
|
|
33
|
-
grey900: "#616161",
|
|
34
|
-
black: "#000000",
|
|
35
|
-
violet500: "#6C3F99",
|
|
36
|
-
violet50: "#F0ECF5",
|
|
37
|
-
blue500: "#04AFAE",
|
|
38
|
-
blue50: "#E6F7F7",
|
|
39
|
-
red500: "#CF372E",
|
|
40
|
-
red50: "#FFF3F2"
|
|
41
|
-
},
|
|
42
|
-
border: "hsl(var(--border))",
|
|
43
|
-
input: "hsl(var(--input))",
|
|
44
|
-
ring: "hsl(var(--ring))",
|
|
45
|
-
background: "hsl(var(--background))",
|
|
46
|
-
foreground: "hsl(var(--foreground))",
|
|
47
|
-
primary: {
|
|
48
|
-
DEFAULT: "hsl(var(--primary))",
|
|
49
|
-
foreground: "hsl(var(--primary-foreground))"
|
|
50
|
-
},
|
|
51
|
-
secondary: {
|
|
52
|
-
DEFAULT: "hsl(var(--secondary))",
|
|
53
|
-
foreground: "hsl(var(--secondary-foreground))"
|
|
54
|
-
},
|
|
55
|
-
destructive: {
|
|
56
|
-
DEFAULT: "hsl(var(--destructive))",
|
|
57
|
-
foreground: "hsl(var(--destructive-foreground))"
|
|
58
|
-
},
|
|
59
|
-
muted: {
|
|
60
|
-
DEFAULT: "hsl(var(--muted))",
|
|
61
|
-
foreground: "hsl(var(--muted-foreground))"
|
|
62
|
-
},
|
|
63
|
-
accent: {
|
|
64
|
-
DEFAULT: "hsl(var(--accent))",
|
|
65
|
-
foreground: "hsl(var(--accent-foreground))"
|
|
66
|
-
},
|
|
67
|
-
popover: {
|
|
68
|
-
DEFAULT: "hsl(var(--popover))",
|
|
69
|
-
foreground: "hsl(var(--popover-foreground))"
|
|
70
|
-
},
|
|
71
|
-
card: {
|
|
72
|
-
DEFAULT: "hsl(var(--card))",
|
|
73
|
-
foreground: "hsl(var(--card-foreground))"
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
borderRadius: {
|
|
77
|
-
lg: "var(--radius)",
|
|
78
|
-
md: "calc(var(--radius) - 2px)",
|
|
79
|
-
sm: "calc(var(--radius) - 4px)"
|
|
80
|
-
},
|
|
81
|
-
keyframes: {
|
|
82
|
-
"accordion-down": {
|
|
83
|
-
from: { height: 0 },
|
|
84
|
-
to: { height: "var(--radix-accordion-content-height)" }
|
|
85
|
-
},
|
|
86
|
-
"accordion-up": {
|
|
87
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
88
|
-
to: { height: 0 }
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
animation: {
|
|
92
|
-
"accordion-down": "accordion-down 0.2s ease-out",
|
|
93
|
-
"accordion-up": "accordion-up 0.2s ease-out"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
plugins: [require("tailwindcss-animate")]
|
|
98
|
-
};
|
package/testSetup.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "@testing-library/jest-dom";
|
package/tsconfig.json
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"types": ["node", "jest", "@testing-library/jest-dom"],
|
|
4
|
-
"baseUrl": ".",
|
|
5
|
-
"paths": {
|
|
6
|
-
"@/*": ["./src/*"],
|
|
7
|
-
"@components/": ["src/components/"],
|
|
8
|
-
"@assets/": ["src/assets/"]
|
|
9
|
-
},
|
|
10
|
-
"target": "ES2020",
|
|
11
|
-
"useDefineForClassFields": true,
|
|
12
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
13
|
-
"module": "ESNext",
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"moduleResolution": "bundler",
|
|
16
|
-
"allowImportingTsExtensions": true,
|
|
17
|
-
"resolveJsonModule": true,
|
|
18
|
-
"isolatedModules": true,
|
|
19
|
-
"noEmit": true,
|
|
20
|
-
"jsx": "react-jsx",
|
|
21
|
-
"strict": true,
|
|
22
|
-
"noUnusedLocals": true,
|
|
23
|
-
"noUnusedParameters": true,
|
|
24
|
-
"noFallthroughCasesInSwitch": true
|
|
25
|
-
},
|
|
26
|
-
"include": ["src"],
|
|
27
|
-
"references": [
|
|
28
|
-
{
|
|
29
|
-
"path": "./tsconfig.node.json"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
package/tsconfig.node.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
3
|
-
import react from "@vitejs/plugin-react";
|
|
4
|
-
import svgr from "vite-plugin-svgr";
|
|
5
|
-
import dts from "vite-plugin-dts";
|
|
6
|
-
|
|
7
|
-
// https://vitejs.dev/config/
|
|
8
|
-
export default defineConfig({
|
|
9
|
-
plugins: [react(), svgr(), dts()],
|
|
10
|
-
resolve: {
|
|
11
|
-
alias: {
|
|
12
|
-
"@": path.resolve(__dirname, "./src"),
|
|
13
|
-
"@assets": path.resolve(__dirname, "./src/assets"),
|
|
14
|
-
"@components": path.resolve(__dirname, "./src/components")
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
build: {
|
|
18
|
-
lib: {
|
|
19
|
-
entry: "./src/main.ts",
|
|
20
|
-
name: "Globalfy Design System",
|
|
21
|
-
fileName: "globalfy-design-system"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
});
|