@arkyn/components 1.2.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 (151) hide show
  1. package/dist/bundle.js +1348 -0
  2. package/dist/bundle.umd.cjs +32 -0
  3. package/dist/components/Badge/index.d.ts +5 -0
  4. package/dist/components/Badge/index.d.ts.map +1 -0
  5. package/dist/components/Badge/index.js +8 -0
  6. package/dist/components/Breadcrumb/index.d.ts +6 -0
  7. package/dist/components/Breadcrumb/index.d.ts.map +1 -0
  8. package/dist/components/Breadcrumb/index.js +18 -0
  9. package/dist/components/Button/index.d.ts +5 -0
  10. package/dist/components/Button/index.d.ts.map +1 -0
  11. package/dist/components/Button/index.js +9 -0
  12. package/dist/components/Divider/index.d.ts +5 -0
  13. package/dist/components/Divider/index.d.ts.map +1 -0
  14. package/dist/components/Divider/index.js +8 -0
  15. package/dist/components/Form/FormController/index.d.ts +6 -0
  16. package/dist/components/Form/FormController/index.d.ts.map +1 -0
  17. package/dist/components/Form/FormController/index.js +17 -0
  18. package/dist/components/Form/FormError/index.d.ts +4 -0
  19. package/dist/components/Form/FormError/index.d.ts.map +1 -0
  20. package/dist/components/Form/FormError/index.js +10 -0
  21. package/dist/components/Form/FormLabel/index.d.ts +5 -0
  22. package/dist/components/Form/FormLabel/index.d.ts.map +1 -0
  23. package/dist/components/Form/FormLabel/index.js +9 -0
  24. package/dist/components/Form/index.d.ts +4 -0
  25. package/dist/components/Form/index.d.ts.map +1 -0
  26. package/dist/components/Form/index.js +3 -0
  27. package/dist/components/IconButton/index.d.ts +5 -0
  28. package/dist/components/IconButton/index.d.ts.map +1 -0
  29. package/dist/components/IconButton/index.js +15 -0
  30. package/dist/components/Input/CpfCpnjInput/getConfig.d.ts +308 -0
  31. package/dist/components/Input/CpfCpnjInput/getConfig.d.ts.map +1 -0
  32. package/dist/components/Input/CpfCpnjInput/getConfig.js +35 -0
  33. package/dist/components/Input/CpfCpnjInput/index.d.ts +4 -0
  34. package/dist/components/Input/CpfCpnjInput/index.d.ts.map +1 -0
  35. package/dist/components/Input/CpfCpnjInput/index.js +47 -0
  36. package/dist/components/Input/CpfCpnjInput/utils.d.ts +10 -0
  37. package/dist/components/Input/CpfCpnjInput/utils.d.ts.map +1 -0
  38. package/dist/components/Input/CpfCpnjInput/utils.js +24 -0
  39. package/dist/components/Input/CurrencyInput/getConfig.d.ts +309 -0
  40. package/dist/components/Input/CurrencyInput/getConfig.d.ts.map +1 -0
  41. package/dist/components/Input/CurrencyInput/getConfig.js +37 -0
  42. package/dist/components/Input/CurrencyInput/index.d.ts +4 -0
  43. package/dist/components/Input/CurrencyInput/index.d.ts.map +1 -0
  44. package/dist/components/Input/CurrencyInput/index.js +41 -0
  45. package/dist/components/Input/CurrencyInput/utils.d.ts +11 -0
  46. package/dist/components/Input/CurrencyInput/utils.d.ts.map +1 -0
  47. package/dist/components/Input/CurrencyInput/utils.js +39 -0
  48. package/dist/components/Input/MaskInput/getConfig.d.ts +312 -0
  49. package/dist/components/Input/MaskInput/getConfig.d.ts.map +1 -0
  50. package/dist/components/Input/MaskInput/getConfig.js +36 -0
  51. package/dist/components/Input/MaskInput/index.d.ts +4 -0
  52. package/dist/components/Input/MaskInput/index.d.ts.map +1 -0
  53. package/dist/components/Input/MaskInput/index.js +42 -0
  54. package/dist/components/Input/SimpleInput/getConfig.d.ts +308 -0
  55. package/dist/components/Input/SimpleInput/getConfig.d.ts.map +1 -0
  56. package/dist/components/Input/SimpleInput/getConfig.js +35 -0
  57. package/dist/components/Input/SimpleInput/index.d.ts +4 -0
  58. package/dist/components/Input/SimpleInput/index.d.ts.map +1 -0
  59. package/dist/components/Input/SimpleInput/index.js +34 -0
  60. package/dist/components/Input/index.d.ts +5 -0
  61. package/dist/components/Input/index.d.ts.map +1 -0
  62. package/dist/components/Input/index.js +16 -0
  63. package/dist/components/Input/utils/morpheme.d.ts +4 -0
  64. package/dist/components/Input/utils/morpheme.d.ts.map +1 -0
  65. package/dist/components/Input/utils/morpheme.js +10 -0
  66. package/dist/components/Modal/Container/index.d.ts +10 -0
  67. package/dist/components/Modal/Container/index.d.ts.map +1 -0
  68. package/dist/components/Modal/Container/index.js +12 -0
  69. package/dist/components/Modal/Footer/index.d.ts +5 -0
  70. package/dist/components/Modal/Footer/index.d.ts.map +1 -0
  71. package/dist/components/Modal/Footer/index.js +8 -0
  72. package/dist/components/Modal/Header/index.d.ts +5 -0
  73. package/dist/components/Modal/Header/index.d.ts.map +1 -0
  74. package/dist/components/Modal/Header/index.js +13 -0
  75. package/dist/components/Modal/index.d.ts +9 -0
  76. package/dist/components/Modal/index.d.ts.map +1 -0
  77. package/dist/components/Modal/index.js +4 -0
  78. package/dist/components/Tooltip/index.d.ts +5 -0
  79. package/dist/components/Tooltip/index.d.ts.map +1 -0
  80. package/dist/components/Tooltip/index.js +7 -0
  81. package/dist/config/buildBadgeConfig.d.ts +274 -0
  82. package/dist/config/buildBadgeConfig.d.ts.map +1 -0
  83. package/dist/config/buildBadgeConfig.js +15 -0
  84. package/dist/config/buildBreadcrumLinkConfig.d.ts +288 -0
  85. package/dist/config/buildBreadcrumLinkConfig.d.ts.map +1 -0
  86. package/dist/config/buildBreadcrumLinkConfig.js +14 -0
  87. package/dist/config/buildBreadcrumbConfig.d.ts +272 -0
  88. package/dist/config/buildBreadcrumbConfig.d.ts.map +1 -0
  89. package/dist/config/buildBreadcrumbConfig.js +6 -0
  90. package/dist/config/buildButtonConfig.d.ts +286 -0
  91. package/dist/config/buildButtonConfig.d.ts.map +1 -0
  92. package/dist/config/buildButtonConfig.js +18 -0
  93. package/dist/config/buildFormLabelConfig.d.ts +274 -0
  94. package/dist/config/buildFormLabelConfig.d.ts.map +1 -0
  95. package/dist/config/buildFormLabelConfig.js +10 -0
  96. package/dist/index.d.ts +10 -0
  97. package/dist/index.d.ts.map +1 -0
  98. package/dist/index.js +13 -0
  99. package/dist/style.css +1 -0
  100. package/dist/utils/generateIcon.d.ts +4 -0
  101. package/dist/utils/generateIcon.d.ts.map +1 -0
  102. package/dist/utils/generateIcon.js +7 -0
  103. package/package.json +30 -0
  104. package/src/components/Badge/index.tsx +18 -0
  105. package/src/components/Badge/styles.css +119 -0
  106. package/src/components/Breadcrumb/index.tsx +35 -0
  107. package/src/components/Breadcrumb/styles.css +39 -0
  108. package/src/components/Button/index.tsx +27 -0
  109. package/src/components/Button/styles.css +363 -0
  110. package/src/components/Divider/index.tsx +17 -0
  111. package/src/components/Divider/styles.css +17 -0
  112. package/src/components/Form/FormController/index.tsx +36 -0
  113. package/src/components/Form/FormController/styles.css +5 -0
  114. package/src/components/Form/FormError/index.tsx +11 -0
  115. package/src/components/Form/FormError/styles.css +6 -0
  116. package/src/components/Form/FormLabel/index.tsx +13 -0
  117. package/src/components/Form/FormLabel/styles.css +15 -0
  118. package/src/components/Form/index.ts +3 -0
  119. package/src/components/IconButton/index.tsx +44 -0
  120. package/src/components/IconButton/styles.css +318 -0
  121. package/src/components/Input/CpfCpnjInput/getConfig.tsx +60 -0
  122. package/src/components/Input/CpfCpnjInput/index.tsx +112 -0
  123. package/src/components/Input/CpfCpnjInput/utils.ts +30 -0
  124. package/src/components/Input/CurrencyInput/getConfig.tsx +64 -0
  125. package/src/components/Input/CurrencyInput/index.tsx +103 -0
  126. package/src/components/Input/CurrencyInput/utils.ts +56 -0
  127. package/src/components/Input/MaskInput/getConfig.tsx +62 -0
  128. package/src/components/Input/MaskInput/index.tsx +89 -0
  129. package/src/components/Input/SimpleInput/getConfig.tsx +60 -0
  130. package/src/components/Input/SimpleInput/index.tsx +87 -0
  131. package/src/components/Input/index.tsx +17 -0
  132. package/src/components/Input/styles.css +223 -0
  133. package/src/components/Input/utils/morpheme.tsx +19 -0
  134. package/src/components/Modal/Container/index.tsx +53 -0
  135. package/src/components/Modal/Container/styles.css +35 -0
  136. package/src/components/Modal/Footer/index.tsx +12 -0
  137. package/src/components/Modal/Footer/styles.css +27 -0
  138. package/src/components/Modal/Header/index.tsx +26 -0
  139. package/src/components/Modal/Header/styles.css +36 -0
  140. package/src/components/Modal/index.ts +5 -0
  141. package/src/components/Tooltip/index.tsx +26 -0
  142. package/src/components/Tooltip/styles.css +112 -0
  143. package/src/config/buildBadgeConfig.tsx +32 -0
  144. package/src/config/buildBreadcrumLinkConfig.tsx +27 -0
  145. package/src/config/buildBreadcrumbConfig.tsx +12 -0
  146. package/src/config/buildButtonConfig.tsx +38 -0
  147. package/src/config/buildFormLabelConfig.tsx +17 -0
  148. package/src/index.ts +16 -0
  149. package/src/utils/generateIcon.tsx +9 -0
  150. package/tsconfig.json +23 -0
  151. package/vite.config.js +25 -0
@@ -0,0 +1,12 @@
1
+ import type { ModalFooterProps } from "@arkyn/types";
2
+
3
+ import "./styles.css";
4
+
5
+ function Footer(args: ModalFooterProps) {
6
+ const { alignment = "right", className: baseClassName, ...rest } = args;
7
+ const className = `arkyn_modal_footer ${alignment} ${baseClassName}`;
8
+
9
+ return <footer className={className.trim()} {...rest} />;
10
+ }
11
+
12
+ export { Footer };
@@ -0,0 +1,27 @@
1
+ .arkyn_modal_footer {
2
+ display: flex;
3
+ align-items: center;
4
+ gap: 16px;
5
+ padding: 16px;
6
+ border-top: 1px solid var(--secondary-200);
7
+ }
8
+
9
+ .arkyn_modal_footer.left {
10
+ justify-content: flex-start;
11
+ }
12
+
13
+ .arkyn_modal_footer.right {
14
+ justify-content: flex-end;
15
+ }
16
+
17
+ .arkyn_modal_footer.center {
18
+ justify-content: center;
19
+ }
20
+
21
+ .arkyn_modal_footer.between {
22
+ justify-content: space-between;
23
+ }
24
+
25
+ .arkyn_modal_footer.around {
26
+ justify-content: space-around;
27
+ }
@@ -0,0 +1,26 @@
1
+ import type { ModalHeaderProps } from "@arkyn/types";
2
+
3
+ import { X } from "lucide-react";
4
+ import { useContext } from "react";
5
+
6
+ import { modalContext } from "../Container";
7
+ import "./styles.css";
8
+
9
+ function Header(args: ModalHeaderProps) {
10
+ const { showCloseButton, className: baseClassName, children, ...rest } = args;
11
+ const { makeInvisible } = useContext(modalContext);
12
+
13
+ const show = showCloseButton ? "show-close" : "";
14
+ const className = `arkyn_modal_header ${show} ${baseClassName}`;
15
+
16
+ return (
17
+ <header className={className.trim()} {...rest}>
18
+ {children}
19
+ <button type="button" onClick={makeInvisible}>
20
+ <X size={24} />
21
+ </button>
22
+ </header>
23
+ );
24
+ }
25
+
26
+ export { Header };
@@ -0,0 +1,36 @@
1
+ .arkyn_modal_header {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: space-between;
5
+
6
+ height: 56px;
7
+ padding: 16px;
8
+
9
+ font-size: 16px;
10
+ font-weight: 600;
11
+ line-height: 20px;
12
+
13
+ color: var(--secondary-900);
14
+
15
+ border-bottom: 1px solid var(--secondary-200);
16
+ }
17
+
18
+ .arkyn_modal_header > button {
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: center;
22
+
23
+ padding: 2px;
24
+ border-radius: 4px;
25
+
26
+ border: none;
27
+ background: none;
28
+
29
+ color: var(--secondary-400);
30
+ transition: all 0.15s ease-out;
31
+ }
32
+
33
+ .arkyn_modal_header > button:hover {
34
+ cursor: pointer;
35
+ background-color: var(--secondary-100);
36
+ }
@@ -0,0 +1,5 @@
1
+ import { Container } from "./Container";
2
+ import { Footer } from "./Footer";
3
+ import { Header } from "./Header";
4
+
5
+ export const Modal = { Container, Header, Footer };
@@ -0,0 +1,26 @@
1
+ import type { TooltipProps } from "@arkyn/types";
2
+
3
+ import "./styles.css";
4
+
5
+ function Tooltip(args: TooltipProps) {
6
+ const {
7
+ text,
8
+ size = "lg",
9
+ children,
10
+ orientation = "top",
11
+ className,
12
+ ...rest
13
+ } = args;
14
+
15
+ return (
16
+ <div
17
+ className={`arkyn_tooltip ${size} ${orientation} ${className}`}
18
+ {...rest}
19
+ >
20
+ {children}
21
+ <div className="arkyn_tooltip_text">{text}</div>
22
+ </div>
23
+ );
24
+ }
25
+
26
+ export { Tooltip };
@@ -0,0 +1,112 @@
1
+ .arkyn_tooltip {
2
+ position: relative;
3
+ display: block;
4
+ }
5
+
6
+ .arkyn_tooltip .arkyn_tooltip_text {
7
+ visibility: hidden;
8
+
9
+ opacity: 0;
10
+ position: absolute;
11
+ transform: translate(-50%, -50%);
12
+ white-space: nowrap;
13
+ transition: 0.15s all ease-out;
14
+
15
+ border-radius: 4px;
16
+
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+
21
+ font-weight: 400;
22
+ color: var(--secondary-100);
23
+ background-color: var(--secondary-900);
24
+
25
+ z-index: 9999;
26
+ }
27
+
28
+ .arkyn_tooltip.lg .arkyn_tooltip_text {
29
+ font-size: 14px;
30
+ line-height: 14px;
31
+ padding: 8px 12px;
32
+ }
33
+
34
+ .arkyn_tooltip.md .arkyn_tooltip_text {
35
+ font-size: 12px;
36
+ line-height: 12px;
37
+ padding: 8px 12px;
38
+ }
39
+
40
+ .arkyn_tooltip:hover .arkyn_tooltip_text {
41
+ opacity: 1;
42
+ visibility: visible;
43
+ }
44
+
45
+ .arkyn_tooltip.top .arkyn_tooltip_text {
46
+ bottom: calc(100% + 10px);
47
+ left: 50%;
48
+ transform: translateX(-50%);
49
+ }
50
+
51
+ .arkyn_tooltip.top .arkyn_tooltip_text::before {
52
+ content: "";
53
+ top: 100%;
54
+ border-style: solid;
55
+ border-color: var(--secondary-900) transparent;
56
+ border-width: 6px 6px 0 6px;
57
+ bottom: 20px;
58
+ position: absolute;
59
+ left: 50%;
60
+ transform: translateX(-50%);
61
+ }
62
+
63
+ .arkyn_tooltip.left .arkyn_tooltip_text {
64
+ top: 50%;
65
+ right: calc(100% + 10px);
66
+ transform: translateY(-50%);
67
+ }
68
+
69
+ .arkyn_tooltip.left .arkyn_tooltip_text::before {
70
+ content: "";
71
+ top: 50%;
72
+ border-style: solid;
73
+ border-color: transparent var(--secondary-900);
74
+ border-width: 6px 0 6px 6px;
75
+ left: 100%;
76
+ position: absolute;
77
+ transform: translateY(-50%);
78
+ }
79
+
80
+ .arkyn_tooltip.right .arkyn_tooltip_text {
81
+ top: 50%;
82
+ left: calc(100% + 10px);
83
+ transform: translateY(-50%);
84
+ }
85
+
86
+ .arkyn_tooltip.right .arkyn_tooltip_text::before {
87
+ content: "";
88
+ border-style: solid;
89
+ border-color: transparent var(--secondary-900);
90
+ border-width: 6px 6px 6px 0;
91
+ top: 50%;
92
+ left: 0;
93
+ transform: translate(-100%, -50%);
94
+ position: absolute;
95
+ }
96
+
97
+ .arkyn_tooltip.bottom .arkyn_tooltip_text {
98
+ top: calc(100% + 10px);
99
+ left: 50%;
100
+ transform: translateX(-50%);
101
+ }
102
+
103
+ .arkyn_tooltip.bottom .arkyn_tooltip_text::before {
104
+ content: "";
105
+ border-style: solid;
106
+ border-color: var(--secondary-900) transparent;
107
+ border-width: 0 6px 6px 6px;
108
+ top: 0;
109
+ left: 50%;
110
+ transform: translate(-50%, -100%);
111
+ position: absolute;
112
+ }
@@ -0,0 +1,32 @@
1
+ import type { BadgeProps } from "@arkyn/types";
2
+ import { GenerateIcon } from "../utils/generateIcon";
3
+
4
+ type BuildBadgeConfigProps = BadgeProps;
5
+
6
+ function buildBadgeConfig(args: BuildBadgeConfigProps) {
7
+ const {
8
+ variant = "ghost",
9
+ scheme = "primary",
10
+ size = "md",
11
+ leftIcon,
12
+ rightIcon,
13
+ className: baseClassName = "",
14
+ children,
15
+ ...rest
16
+ } = args;
17
+
18
+ const iconSizes = { md: 12, lg: 14 };
19
+ const iconSize = iconSizes[size];
20
+
21
+ const className = `arkyn_badge ${variant} ${scheme} ${size} ${baseClassName}`;
22
+
23
+ return {
24
+ className: className.trim(),
25
+ children,
26
+ leftIcon: GenerateIcon(iconSize, leftIcon),
27
+ rightIcon: GenerateIcon(iconSize, rightIcon),
28
+ ...rest,
29
+ };
30
+ }
31
+
32
+ export { buildBadgeConfig };
@@ -0,0 +1,27 @@
1
+ import type { BreadcrumbLinkProps } from "@arkyn/types";
2
+ import { useLocation } from "@remix-run/react";
3
+
4
+ type BuildBreadcrumbLinkConfigProps = BreadcrumbLinkProps & {};
5
+
6
+ function buildBreadcrumbLinkConfig(args: BuildBreadcrumbLinkConfigProps) {
7
+ const { pathname } = useLocation();
8
+
9
+ const {
10
+ className: baseClassName = "",
11
+ disabled: baseDisabled = false,
12
+ to,
13
+ ...rest
14
+ } = args;
15
+
16
+ const active = pathname === to ? "active" : "inactive";
17
+ const className = `arkyn_breadcrumb_link ${active} ${baseClassName}`;
18
+
19
+ return {
20
+ to,
21
+ className: className.trim(),
22
+ disabled: baseDisabled || active === "active",
23
+ ...rest,
24
+ };
25
+ }
26
+
27
+ export { buildBreadcrumbLinkConfig };
@@ -0,0 +1,12 @@
1
+ import type { BreadcrumbProps } from "@arkyn/types";
2
+
3
+ type BuildBreadcrumbConfigProps = BreadcrumbProps;
4
+
5
+ function buildBreadcrumbConfig(args: BuildBreadcrumbConfigProps) {
6
+ const { className: baseClassName = "", ...rest } = args;
7
+ const className = `arkyn_breadcrumb ${baseClassName}`.trim();
8
+
9
+ return { className, ...rest };
10
+ }
11
+
12
+ export { buildBreadcrumbConfig };
@@ -0,0 +1,38 @@
1
+ import type { ButtonProps } from "@arkyn/types";
2
+ import { GenerateIcon } from "../utils/generateIcon";
3
+
4
+ type BuildButtonConfigProps = ButtonProps;
5
+
6
+ function buildButtonConfig(args: BuildButtonConfigProps) {
7
+ const {
8
+ isLoading = false,
9
+ scheme = "primary",
10
+ variant = "solid",
11
+ loadingText,
12
+ size = "md",
13
+ leftIcon,
14
+ rightIcon,
15
+ disabled,
16
+ className: baseClassName = "",
17
+ children,
18
+ ...rest
19
+ } = args;
20
+
21
+ const iconSizes = { xs: 12, sm: 16, md: 20, lg: 24 };
22
+ const iconSize = iconSizes[size];
23
+
24
+ const className = `arkyn_button loading_text_${!!loadingText} ${variant} ${scheme} ${size} loading_${isLoading} ${baseClassName}`;
25
+
26
+ return {
27
+ className: className.trim(),
28
+ loadingText,
29
+ children,
30
+ iconSize,
31
+ disabled: disabled || isLoading,
32
+ leftIcon: GenerateIcon(iconSize, leftIcon),
33
+ rightIcon: GenerateIcon(iconSize, rightIcon),
34
+ ...rest,
35
+ };
36
+ }
37
+
38
+ export { buildButtonConfig };
@@ -0,0 +1,17 @@
1
+ import type { FormLabelProps } from "@arkyn/types";
2
+
3
+ type BuildFormLabelConfigProps = FormLabelProps;
4
+
5
+ function buildFormLabelConfig(args: BuildFormLabelConfigProps) {
6
+ const { showAsterisk = false, className: baseClassName = "", ...rest } = args;
7
+
8
+ const show = showAsterisk ? "show-asterisk" : "";
9
+ const className = `arkyn_form_label ${show} ${baseClassName}`;
10
+
11
+ return {
12
+ className: className.trim(),
13
+ ...rest,
14
+ };
15
+ }
16
+
17
+ export { buildFormLabelConfig };
package/src/index.ts ADDED
@@ -0,0 +1,16 @@
1
+ // Data Display
2
+ export { Badge } from "./components/Badge";
3
+ export { Divider } from "./components/Divider";
4
+
5
+ // Form
6
+ export { Button } from "./components/Button";
7
+ export { FormController, FormError, FormLabel } from "./components/Form";
8
+ export { IconButton } from "./components/IconButton";
9
+ export { Input } from "./components/Input";
10
+
11
+ // Navigation
12
+ export { Breadcrumb, BreadcrumbLink } from "./components/Breadcrumb";
13
+
14
+ // Overlay
15
+ export { Modal } from "./components/Modal";
16
+ export { Tooltip } from "./components/Tooltip";
@@ -0,0 +1,9 @@
1
+ import type { LucideIcon } from "lucide-react";
2
+ import React from "react";
3
+
4
+ function GenerateIcon(iconSize: number, Icon?: LucideIcon) {
5
+ if (!Icon) return <></>;
6
+ return <Icon size={iconSize} strokeWidth={2.5} />;
7
+ }
8
+
9
+ export { GenerateIcon };
package/tsconfig.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "exclude": ["node_modules", "dist"],
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "composite": false,
6
+ "declaration": true,
7
+ "declarationDir": "./dist",
8
+ "declarationMap": true,
9
+ "esModuleInterop": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "inlineSources": false,
12
+ "isolatedModules": true,
13
+ "moduleResolution": "node",
14
+ "noUnusedLocals": false,
15
+ "noUnusedParameters": false,
16
+ "preserveWatchOutput": true,
17
+ "skipLibCheck": true,
18
+ "jsx": "react-jsx",
19
+ "lib": ["dom", "ESNext"],
20
+ "module": "ESNext",
21
+ "target": "ESNext"
22
+ }
23
+ }
package/vite.config.js ADDED
@@ -0,0 +1,25 @@
1
+ import { defineConfig } from "vite";
2
+ import { resolve } from "path";
3
+
4
+ export default defineConfig({
5
+ build: {
6
+ minify: true,
7
+ outDir: "./dist",
8
+ rollupOptions: {
9
+ external: [
10
+ "@react-input/mask",
11
+ "@remix-run/react",
12
+ "framer-motion",
13
+ "lucide-react",
14
+ "react",
15
+ "react-dom",
16
+ ],
17
+ output: { format: "esm" },
18
+ },
19
+ lib: {
20
+ entry: resolve(__dirname, "src/index.ts"),
21
+ name: "@arkyn/components",
22
+ fileName: "bundle",
23
+ },
24
+ },
25
+ });