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.
Files changed (106) hide show
  1. package/package.json +13 -1
  2. package/.babelrc +0 -7
  3. package/.eslintrc.cjs +0 -20
  4. package/.husky/commit-msg +0 -4
  5. package/.husky/pre-commit +0 -4
  6. package/.lintstagedrc +0 -4
  7. package/.nvmrc +0 -1
  8. package/.prettierrc +0 -3
  9. package/.storybook/main.ts +0 -20
  10. package/.storybook/preview-head.html +0 -6
  11. package/.storybook/preview.ts +0 -17
  12. package/CODEOWNERS +0 -1
  13. package/bitbucket-pipelines.yml +0 -44
  14. package/commitlint.config.cjs +0 -1
  15. package/components.json +0 -16
  16. package/index.html +0 -13
  17. package/jest.config.js +0 -9
  18. package/postcss.config.js +0 -6
  19. package/public/vite.svg +0 -1
  20. package/src/assets/fonts/satoshi/Satoshi-Black.ttf +0 -0
  21. package/src/assets/fonts/satoshi/Satoshi-Black.woff +0 -0
  22. package/src/assets/fonts/satoshi/Satoshi-Black.woff2 +0 -0
  23. package/src/assets/fonts/satoshi/Satoshi-Bold.ttf +0 -0
  24. package/src/assets/fonts/satoshi/Satoshi-Bold.woff +0 -0
  25. package/src/assets/fonts/satoshi/Satoshi-Bold.woff2 +0 -0
  26. package/src/assets/fonts/satoshi/Satoshi-Medium.ttf +0 -0
  27. package/src/assets/fonts/satoshi/Satoshi-Medium.woff +0 -0
  28. package/src/assets/fonts/satoshi/Satoshi-Medium.woff2 +0 -0
  29. package/src/assets/fonts/satoshi/Satoshi-Regular.ttf +0 -0
  30. package/src/assets/fonts/satoshi/Satoshi-Regular.woff +0 -0
  31. package/src/assets/fonts/satoshi/Satoshi-Regular.woff2 +0 -0
  32. package/src/assets/fonts/satoshi/satoshi.css +0 -43
  33. package/src/components/atoms/Avatar/Avatar.stories.tsx +0 -26
  34. package/src/components/atoms/Avatar/Avatar.test.tsx +0 -19
  35. package/src/components/atoms/Avatar/Avatar.tsx +0 -46
  36. package/src/components/atoms/Avatar/Avatar.types.ts +0 -7
  37. package/src/components/atoms/Avatar/index.ts +0 -2
  38. package/src/components/atoms/Checkbox/Checkbox.stories.tsx +0 -19
  39. package/src/components/atoms/Checkbox/Checkbox.test.tsx +0 -12
  40. package/src/components/atoms/Checkbox/Checkbox.tsx +0 -20
  41. package/src/components/atoms/Checkbox/index.ts +0 -1
  42. package/src/components/atoms/FieldMessage/FieldMessage.stories.tsx +0 -20
  43. package/src/components/atoms/FieldMessage/FieldMessage.test.tsx +0 -14
  44. package/src/components/atoms/FieldMessage/FieldMessage.tsx +0 -6
  45. package/src/components/atoms/FieldMessage/FieldMessage.type.ts +0 -3
  46. package/src/components/atoms/FieldMessage/index.ts +0 -2
  47. package/src/components/atoms/Flag/Flag.stories.tsx +0 -34
  48. package/src/components/atoms/Flag/Flag.tsx +0 -35
  49. package/src/components/atoms/Flag/Flag.types.ts +0 -6
  50. package/src/components/atoms/Flag/images/bra.svg +0 -8
  51. package/src/components/atoms/Flag/images/esp.svg +0 -6
  52. package/src/components/atoms/Flag/images/usa.svg +0 -9
  53. package/src/components/atoms/Flag/index.ts +0 -2
  54. package/src/components/atoms/Icon/Icon.stories.tsx +0 -32
  55. package/src/components/atoms/Icon/Icon.tsx +0 -6
  56. package/src/components/atoms/Icon/assets/fonts/icomoon.eot +0 -0
  57. package/src/components/atoms/Icon/assets/fonts/icomoon.svg +0 -21
  58. package/src/components/atoms/Icon/assets/fonts/icomoon.ttf +0 -0
  59. package/src/components/atoms/Icon/assets/fonts/icomoon.woff +0 -0
  60. package/src/components/atoms/Icon/assets/selection.json +0 -285
  61. package/src/components/atoms/Icon/assets/style.css +0 -60
  62. package/src/components/atoms/Icon/icon.types.ts +0 -17
  63. package/src/components/atoms/Icon/index.ts +0 -2
  64. package/src/components/atoms/Logo/Logo.stories.tsx +0 -20
  65. package/src/components/atoms/Logo/Logo.test.tsx +0 -11
  66. package/src/components/atoms/Logo/Logo.tsx +0 -12
  67. package/src/components/atoms/Logo/Logo.types.ts +0 -3
  68. package/src/components/atoms/Logo/images/globalfy_desktop.svg +0 -9
  69. package/src/components/atoms/Logo/images/globalfy_mobile.svg +0 -3
  70. package/src/components/atoms/Logo/index.ts +0 -2
  71. package/src/components/atoms/RadioGroup/RadioGroup.stories.tsx +0 -21
  72. package/src/components/atoms/RadioGroup/RadioGroup.test.tsx +0 -47
  73. package/src/components/atoms/RadioGroup/RadioGroup.tsx +0 -26
  74. package/src/components/atoms/RadioGroup/RadioGroup.types.ts +0 -12
  75. package/src/components/atoms/RadioGroup/index.ts +0 -1
  76. package/src/components/atoms/Switch/Switch.stories.tsx +0 -18
  77. package/src/components/atoms/Switch/Switch.test.tsx +0 -12
  78. package/src/components/atoms/Switch/Switch.tsx +0 -32
  79. package/src/components/atoms/Switch/Switch.types.ts +0 -3
  80. package/src/components/atoms/Switch/index.ts +0 -2
  81. package/src/components/atoms/Typography/Typography.stories.tsx +0 -18
  82. package/src/components/atoms/Typography/Typography.test.tsx +0 -10
  83. package/src/components/atoms/Typography/Typography.tsx +0 -37
  84. package/src/components/atoms/Typography/Typography.types.ts +0 -7
  85. package/src/components/atoms/Typography/index.ts +0 -2
  86. package/src/components/atoms/index.ts +0 -9
  87. package/src/components/index.ts +0 -1
  88. package/src/global.css +0 -76
  89. package/src/main.ts +0 -1
  90. package/src/shadcn/components/ui/avatar.tsx +0 -48
  91. package/src/shadcn/components/ui/button.tsx +0 -55
  92. package/src/shadcn/components/ui/checkbox.tsx +0 -28
  93. package/src/shadcn/components/ui/form.tsx +0 -177
  94. package/src/shadcn/components/ui/label.tsx +0 -23
  95. package/src/shadcn/components/ui/radio-group.tsx +0 -44
  96. package/src/shadcn/components/ui/switch.tsx +0 -27
  97. package/src/shadcn/utils.ts +0 -6
  98. package/src/utils/reactHookForm/FormWrapper.tsx +0 -12
  99. package/src/utils/tailwind/classNames.ts +0 -4
  100. package/src/vite-env.d.ts +0 -1
  101. package/tailwind.config.js +0 -98
  102. package/testSetup.ts +0 -1
  103. package/tsconfig.json +0 -32
  104. package/tsconfig.node.json +0 -10
  105. package/vite.config.ts +0 -24
  106. 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 };
@@ -1,6 +0,0 @@
1
- import { type ClassValue, clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs));
6
- }
@@ -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
- };
@@ -1,4 +0,0 @@
1
- import { clsx, type ClassValue } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
-
4
- export const classNames = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
package/src/vite-env.d.ts DELETED
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
@@ -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
- }
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "allowSyntheticDefaultImports": true
8
- },
9
- "include": ["vite.config.ts"]
10
- }
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
- });