globalfy-design-system 0.1.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 (107) hide show
  1. package/.babelrc +7 -0
  2. package/.eslintrc.cjs +20 -0
  3. package/.husky/commit-msg +4 -0
  4. package/.husky/pre-commit +4 -0
  5. package/.lintstagedrc +4 -0
  6. package/.nvmrc +1 -0
  7. package/.prettierrc +3 -0
  8. package/.storybook/main.ts +20 -0
  9. package/.storybook/preview-head.html +6 -0
  10. package/.storybook/preview.ts +17 -0
  11. package/CODEOWNERS +1 -0
  12. package/README.md +40 -0
  13. package/bitbucket-pipelines.yml +37 -0
  14. package/commitlint.config.cjs +1 -0
  15. package/components.json +16 -0
  16. package/index.html +13 -0
  17. package/jest.config.js +9 -0
  18. package/package.json +84 -0
  19. package/postcss.config.js +6 -0
  20. package/public/vite.svg +1 -0
  21. package/src/assets/fonts/satoshi/Satoshi-Black.ttf +0 -0
  22. package/src/assets/fonts/satoshi/Satoshi-Black.woff +0 -0
  23. package/src/assets/fonts/satoshi/Satoshi-Black.woff2 +0 -0
  24. package/src/assets/fonts/satoshi/Satoshi-Bold.ttf +0 -0
  25. package/src/assets/fonts/satoshi/Satoshi-Bold.woff +0 -0
  26. package/src/assets/fonts/satoshi/Satoshi-Bold.woff2 +0 -0
  27. package/src/assets/fonts/satoshi/Satoshi-Medium.ttf +0 -0
  28. package/src/assets/fonts/satoshi/Satoshi-Medium.woff +0 -0
  29. package/src/assets/fonts/satoshi/Satoshi-Medium.woff2 +0 -0
  30. package/src/assets/fonts/satoshi/Satoshi-Regular.ttf +0 -0
  31. package/src/assets/fonts/satoshi/Satoshi-Regular.woff +0 -0
  32. package/src/assets/fonts/satoshi/Satoshi-Regular.woff2 +0 -0
  33. package/src/assets/fonts/satoshi/satoshi.css +43 -0
  34. package/src/components/atoms/Avatar/Avatar.stories.tsx +26 -0
  35. package/src/components/atoms/Avatar/Avatar.test.tsx +19 -0
  36. package/src/components/atoms/Avatar/Avatar.tsx +46 -0
  37. package/src/components/atoms/Avatar/Avatar.types.ts +7 -0
  38. package/src/components/atoms/Avatar/index.ts +2 -0
  39. package/src/components/atoms/Checkbox/Checkbox.stories.tsx +19 -0
  40. package/src/components/atoms/Checkbox/Checkbox.test.tsx +12 -0
  41. package/src/components/atoms/Checkbox/Checkbox.tsx +20 -0
  42. package/src/components/atoms/Checkbox/index.ts +1 -0
  43. package/src/components/atoms/FieldMessage/FieldMessage.stories.tsx +20 -0
  44. package/src/components/atoms/FieldMessage/FieldMessage.test.tsx +14 -0
  45. package/src/components/atoms/FieldMessage/FieldMessage.tsx +6 -0
  46. package/src/components/atoms/FieldMessage/FieldMessage.type.ts +3 -0
  47. package/src/components/atoms/FieldMessage/index.ts +2 -0
  48. package/src/components/atoms/Flag/Flag.stories.tsx +34 -0
  49. package/src/components/atoms/Flag/Flag.tsx +35 -0
  50. package/src/components/atoms/Flag/Flag.types.ts +6 -0
  51. package/src/components/atoms/Flag/images/bra.svg +8 -0
  52. package/src/components/atoms/Flag/images/esp.svg +6 -0
  53. package/src/components/atoms/Flag/images/usa.svg +9 -0
  54. package/src/components/atoms/Flag/index.ts +2 -0
  55. package/src/components/atoms/Icon/Icon.stories.tsx +32 -0
  56. package/src/components/atoms/Icon/Icon.tsx +6 -0
  57. package/src/components/atoms/Icon/assets/fonts/icomoon.eot +0 -0
  58. package/src/components/atoms/Icon/assets/fonts/icomoon.svg +21 -0
  59. package/src/components/atoms/Icon/assets/fonts/icomoon.ttf +0 -0
  60. package/src/components/atoms/Icon/assets/fonts/icomoon.woff +0 -0
  61. package/src/components/atoms/Icon/assets/selection.json +285 -0
  62. package/src/components/atoms/Icon/assets/style.css +60 -0
  63. package/src/components/atoms/Icon/icon.types.ts +17 -0
  64. package/src/components/atoms/Icon/index.ts +2 -0
  65. package/src/components/atoms/Logo/Logo.stories.tsx +20 -0
  66. package/src/components/atoms/Logo/Logo.test.tsx +11 -0
  67. package/src/components/atoms/Logo/Logo.tsx +12 -0
  68. package/src/components/atoms/Logo/Logo.types.ts +3 -0
  69. package/src/components/atoms/Logo/images/globalfy_desktop.svg +9 -0
  70. package/src/components/atoms/Logo/images/globalfy_mobile.svg +3 -0
  71. package/src/components/atoms/Logo/index.ts +2 -0
  72. package/src/components/atoms/RadioGroup/RadioGroup.stories.tsx +21 -0
  73. package/src/components/atoms/RadioGroup/RadioGroup.test.tsx +47 -0
  74. package/src/components/atoms/RadioGroup/RadioGroup.tsx +26 -0
  75. package/src/components/atoms/RadioGroup/RadioGroup.types.ts +12 -0
  76. package/src/components/atoms/RadioGroup/index.ts +1 -0
  77. package/src/components/atoms/Switch/Switch.stories.tsx +18 -0
  78. package/src/components/atoms/Switch/Switch.test.tsx +12 -0
  79. package/src/components/atoms/Switch/Switch.tsx +32 -0
  80. package/src/components/atoms/Switch/Switch.types.ts +3 -0
  81. package/src/components/atoms/Switch/index.ts +2 -0
  82. package/src/components/atoms/Typography/Typography.stories.tsx +18 -0
  83. package/src/components/atoms/Typography/Typography.test.tsx +10 -0
  84. package/src/components/atoms/Typography/Typography.tsx +37 -0
  85. package/src/components/atoms/Typography/Typography.types.ts +7 -0
  86. package/src/components/atoms/Typography/index.ts +2 -0
  87. package/src/components/atoms/index.ts +9 -0
  88. package/src/components/index.ts +1 -0
  89. package/src/global.css +76 -0
  90. package/src/main.ts +1 -0
  91. package/src/shadcn/components/ui/avatar.tsx +48 -0
  92. package/src/shadcn/components/ui/button.tsx +55 -0
  93. package/src/shadcn/components/ui/checkbox.tsx +28 -0
  94. package/src/shadcn/components/ui/form.tsx +177 -0
  95. package/src/shadcn/components/ui/label.tsx +23 -0
  96. package/src/shadcn/components/ui/radio-group.tsx +44 -0
  97. package/src/shadcn/components/ui/switch.tsx +27 -0
  98. package/src/shadcn/utils.ts +6 -0
  99. package/src/utils/reactHookForm/FormWrapper.tsx +12 -0
  100. package/src/utils/tailwind/classNames.ts +4 -0
  101. package/src/vite-env.d.ts +1 -0
  102. package/tailwind.config.js +98 -0
  103. package/testSetup.ts +1 -0
  104. package/tsconfig.json +32 -0
  105. package/tsconfig.node.json +10 -0
  106. package/vite.config.ts +23 -0
  107. package/yarn.lock +10721 -0
@@ -0,0 +1,177 @@
1
+ import * as React from "react";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import {
5
+ Controller,
6
+ ControllerProps,
7
+ FieldPath,
8
+ FieldValues,
9
+ FormProvider,
10
+ useFormContext
11
+ } from "react-hook-form";
12
+
13
+ import { Label } from "@/shadcn/components/ui/label";
14
+ import { cn } from "@/shadcn/utils";
15
+
16
+ const Form = FormProvider;
17
+
18
+ type FormFieldContextValue<
19
+ TFieldValues extends FieldValues = FieldValues,
20
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
21
+ > = {
22
+ name: TName;
23
+ };
24
+
25
+ const FormFieldContext = React.createContext<FormFieldContextValue>(
26
+ {} as FormFieldContextValue
27
+ );
28
+
29
+ const FormField = <
30
+ TFieldValues extends FieldValues = FieldValues,
31
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
32
+ >({
33
+ ...props
34
+ }: ControllerProps<TFieldValues, TName>) => {
35
+ return (
36
+ <FormFieldContext.Provider value={{ name: props.name }}>
37
+ <Controller {...props} />
38
+ </FormFieldContext.Provider>
39
+ );
40
+ };
41
+
42
+ const useFormField = () => {
43
+ const fieldContext = React.useContext(FormFieldContext);
44
+ const itemContext = React.useContext(FormItemContext);
45
+ const { getFieldState, formState } = useFormContext();
46
+
47
+ const fieldState = getFieldState(fieldContext.name, formState);
48
+
49
+ if (!fieldContext) {
50
+ throw new Error("useFormField should be used within <FormField>");
51
+ }
52
+
53
+ const { id } = itemContext;
54
+
55
+ return {
56
+ id,
57
+ name: fieldContext.name,
58
+ formItemId: `${id}-form-item`,
59
+ formDescriptionId: `${id}-form-item-description`,
60
+ formMessageId: `${id}-form-item-message`,
61
+ ...fieldState
62
+ };
63
+ };
64
+
65
+ type FormItemContextValue = {
66
+ id: string;
67
+ };
68
+
69
+ const FormItemContext = React.createContext<FormItemContextValue>(
70
+ {} as FormItemContextValue
71
+ );
72
+
73
+ const FormItem = React.forwardRef<
74
+ HTMLDivElement,
75
+ React.HTMLAttributes<HTMLDivElement>
76
+ >(({ className, ...props }, ref) => {
77
+ const id = React.useId();
78
+
79
+ return (
80
+ <FormItemContext.Provider value={{ id }}>
81
+ <div ref={ref} className={cn("space-y-2", className)} {...props} />
82
+ </FormItemContext.Provider>
83
+ );
84
+ });
85
+ FormItem.displayName = "FormItem";
86
+
87
+ const FormLabel = React.forwardRef<
88
+ React.ElementRef<typeof LabelPrimitive.Root>,
89
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
90
+ >(({ className, ...props }, ref) => {
91
+ const { error, formItemId } = useFormField();
92
+
93
+ return (
94
+ <Label
95
+ ref={ref}
96
+ className={cn(error && "text-destructive", className)}
97
+ htmlFor={formItemId}
98
+ {...props}
99
+ />
100
+ );
101
+ });
102
+ FormLabel.displayName = "FormLabel";
103
+
104
+ const FormControl = React.forwardRef<
105
+ React.ElementRef<typeof Slot>,
106
+ React.ComponentPropsWithoutRef<typeof Slot>
107
+ >(({ ...props }, ref) => {
108
+ const { error, formItemId, formDescriptionId, formMessageId } =
109
+ useFormField();
110
+
111
+ return (
112
+ <Slot
113
+ ref={ref}
114
+ id={formItemId}
115
+ aria-describedby={
116
+ !error
117
+ ? `${formDescriptionId}`
118
+ : `${formDescriptionId} ${formMessageId}`
119
+ }
120
+ aria-invalid={!!error}
121
+ {...props}
122
+ />
123
+ );
124
+ });
125
+ FormControl.displayName = "FormControl";
126
+
127
+ const FormDescription = React.forwardRef<
128
+ HTMLParagraphElement,
129
+ React.HTMLAttributes<HTMLParagraphElement>
130
+ >(({ className, ...props }, ref) => {
131
+ const { formDescriptionId } = useFormField();
132
+
133
+ return (
134
+ <p
135
+ ref={ref}
136
+ id={formDescriptionId}
137
+ className={cn("text-sm text-muted-foreground", className)}
138
+ {...props}
139
+ />
140
+ );
141
+ });
142
+ FormDescription.displayName = "FormDescription";
143
+
144
+ const FormMessage = React.forwardRef<
145
+ HTMLParagraphElement,
146
+ React.HTMLAttributes<HTMLParagraphElement>
147
+ >(({ className, children, ...props }, ref) => {
148
+ const { error, formMessageId } = useFormField();
149
+ const body = error ? String(error?.message) : children;
150
+
151
+ if (!body) {
152
+ return null;
153
+ }
154
+
155
+ return (
156
+ <p
157
+ ref={ref}
158
+ id={formMessageId}
159
+ className={cn("text-sm font-medium text-destructive", className)}
160
+ {...props}
161
+ >
162
+ {body}
163
+ </p>
164
+ );
165
+ });
166
+ FormMessage.displayName = "FormMessage";
167
+
168
+ export {
169
+ useFormField,
170
+ Form,
171
+ FormItem,
172
+ FormLabel,
173
+ FormControl,
174
+ FormDescription,
175
+ FormMessage,
176
+ FormField
177
+ };
@@ -0,0 +1,23 @@
1
+ import * as React from "react";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ import { cva, type VariantProps } from "class-variance-authority";
4
+ import { cn } from "@/shadcn/utils";
5
+
6
+ const labelVariants = cva(
7
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
8
+ );
9
+
10
+ const Label = React.forwardRef<
11
+ React.ElementRef<typeof LabelPrimitive.Root>,
12
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
13
+ VariantProps<typeof labelVariants>
14
+ >(({ className, ...props }, ref) => (
15
+ <LabelPrimitive.Root
16
+ ref={ref}
17
+ className={cn(labelVariants(), className)}
18
+ {...props}
19
+ />
20
+ ));
21
+ Label.displayName = LabelPrimitive.Root.displayName;
22
+
23
+ export { Label };
@@ -0,0 +1,44 @@
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
@@ -0,0 +1,27 @@
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 };
@@ -0,0 +1,6 @@
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
+ }
@@ -0,0 +1,12 @@
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
+ };
@@ -0,0 +1,4 @@
1
+ import { clsx, type ClassValue } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
+ export const classNames = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,98 @@
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 ADDED
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom";
package/tsconfig.json ADDED
@@ -0,0 +1,32 @@
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
+ }
@@ -0,0 +1,10 @@
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 ADDED
@@ -0,0 +1,23 @@
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
+
6
+ // https://vitejs.dev/config/
7
+ export default defineConfig({
8
+ plugins: [react(), svgr()],
9
+ resolve: {
10
+ alias: {
11
+ "@": path.resolve(__dirname, "./src"),
12
+ "@assets": path.resolve(__dirname, "./src/assets"),
13
+ "@components": path.resolve(__dirname, "./src/components")
14
+ }
15
+ },
16
+ build: {
17
+ lib: {
18
+ entry: "./src/main.ts",
19
+ name: "Globalfy Design System",
20
+ fileName: "globalfy-design-system"
21
+ }
22
+ }
23
+ });