@tecsinapse/cortex-core 0.0.1

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 (33) hide show
  1. package/dist/cjs/components/badge/badge.js +26 -0
  2. package/dist/cjs/components/button/button.js +95 -0
  3. package/dist/cjs/components/card/card.js +9 -0
  4. package/dist/cjs/components/checkbox/checkbox.js +9 -0
  5. package/dist/cjs/components/drawer/drawer.js +22 -0
  6. package/dist/cjs/components/hint/hint.js +18 -0
  7. package/dist/cjs/components/input/index.js +81 -0
  8. package/dist/cjs/components/radio-button/radio-button.js +13 -0
  9. package/dist/cjs/components/select/select.js +25 -0
  10. package/dist/cjs/components/table/table.js +33 -0
  11. package/dist/cjs/components/tag/tag.js +30 -0
  12. package/dist/cjs/components/toggle/toggle.js +30 -0
  13. package/dist/cjs/components/tooltip/tooltip.js +34 -0
  14. package/dist/cjs/index.js +59 -0
  15. package/dist/cjs/preset/index.js +19 -0
  16. package/dist/cjs/tokens/definitions.js +170 -0
  17. package/dist/esm/components/badge/badge.js +23 -0
  18. package/dist/esm/components/button/button.js +93 -0
  19. package/dist/esm/components/card/card.js +7 -0
  20. package/dist/esm/components/checkbox/checkbox.js +7 -0
  21. package/dist/esm/components/drawer/drawer.js +19 -0
  22. package/dist/esm/components/hint/hint.js +16 -0
  23. package/dist/esm/components/input/index.js +75 -0
  24. package/dist/esm/components/radio-button/radio-button.js +10 -0
  25. package/dist/esm/components/select/select.js +21 -0
  26. package/dist/esm/components/table/table.js +25 -0
  27. package/dist/esm/components/tag/tag.js +28 -0
  28. package/dist/esm/components/toggle/toggle.js +26 -0
  29. package/dist/esm/components/tooltip/tooltip.js +31 -0
  30. package/dist/esm/index.js +14 -0
  31. package/dist/esm/preset/index.js +17 -0
  32. package/dist/esm/tokens/definitions.js +160 -0
  33. package/package.json +24 -0
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const badge = tailwindVariants.tv({
6
+ base: "text-sub text-white font-bold rounded-pill absolute items-center flex justify-center w-[1rem] h-[1rem] -top-1 -right-1 px-[5px] py-[2px]",
7
+ variants: {
8
+ intent: {
9
+ primary: "bg-primary-medium",
10
+ secondary: "bg-secondary-medium",
11
+ error: "bg-error-medium",
12
+ success: "bg-success-medium",
13
+ warning: "bg-warning-medium",
14
+ info: "bg-info-medium"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ intent: "primary"
19
+ }
20
+ });
21
+ const containerBadge = tailwindVariants.tv({
22
+ base: "relative items-center justify-center self-center"
23
+ });
24
+
25
+ exports.badge = badge;
26
+ exports.containerBadge = containerBadge;
@@ -0,0 +1,95 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const button = tailwindVariants.tv({
6
+ base: "p-deca rounded-mili text-base h-fit font-bold disabled:text-white enabled:active:scale-95 transform transition hover:text-white text-white cursor-pointer items-center flex justify-center",
7
+ variants: {
8
+ intent: {
9
+ primary: "bg-primary-medium disabled:bg-primary-light active:bg-primary-dark enabled:hover:border-primary-dark hover:bg-primary-dark",
10
+ secondary: "bg-secondary-medium disabled:bg-secondary-light active:bg-secondary-dark hover:bg-secondary-dark hover:border-secondary-dark ",
11
+ success: "bg-success-medium disabled:bg-success-light hover:bg-success-dark hover:border-success-dark",
12
+ info: " bg-info-medium disabled:bg-info-light hover:bg-info-dark hover:border-info-dark ",
13
+ warning: " bg-warning-medium disabled:bg-warning-light hover:bg-warning-dark hover:border-warning-dark",
14
+ error: "bg-error-medium disabled:bg-error-light hover:bg-error-dark hover:border-error-dark"
15
+ },
16
+ variant: {
17
+ outline: "bg-transparent disabled:bg-transparent",
18
+ text: "bg-transparent border-0 disabled:bg-transparent"
19
+ },
20
+ size: {
21
+ default: "px-kilo py-mili min-h-[44px]",
22
+ small: "px-deca py-mili min-h-[34px]",
23
+ square: "p-[14px] min-h-fit aspect-square",
24
+ circle: "p-[14px] rounded-full min-h-fit aspect-square"
25
+ }
26
+ },
27
+ compoundVariants: [
28
+ {
29
+ intent: "primary",
30
+ variant: "outline",
31
+ className: "text-primary-medium disabled:text-primary-light border border-primary-medium disabled:border-primary-light"
32
+ },
33
+ {
34
+ intent: "secondary",
35
+ variant: "outline",
36
+ className: "text-secondary-medium disabled:text-secondary-light border border-secondary-medium disabled:border-secondary-light"
37
+ },
38
+ {
39
+ intent: "success",
40
+ variant: "outline",
41
+ className: "text-success-medium disabled:text-success-light border border-success-medium disabled:border-success-light hover:bg-success-medium hover:border-success-medium"
42
+ },
43
+ {
44
+ intent: "info",
45
+ variant: "outline",
46
+ className: "text-info-medium disabled:text-info-light border border-info-medium disabled:border-info-light hover:bg-info-medium hover:border-info-medium"
47
+ },
48
+ {
49
+ intent: "warning",
50
+ variant: "outline",
51
+ className: "text-warning-medium disabled:text-warning-light border border-warning-medium disabled:border-warning-light hover:bg-warning-medium hover:border-warning-medium"
52
+ },
53
+ {
54
+ intent: "error",
55
+ variant: "outline",
56
+ className: "text-error-medium disabled:text-error-light border border-error-medium hover:border-error-medium hover:bg-error-medium disabled:border-error-light"
57
+ },
58
+ {
59
+ intent: "primary",
60
+ variant: "text",
61
+ className: "text-primary-medium disabled:text-primary-light"
62
+ },
63
+ {
64
+ intent: "secondary",
65
+ variant: "text",
66
+ className: "text-secondary-medium disabled:text-secondary-light"
67
+ },
68
+ {
69
+ intent: "success",
70
+ variant: "text",
71
+ className: "text-success-medium disabled:text-success-light hover:bg-success-medium hover:border-success-medium"
72
+ },
73
+ {
74
+ intent: "info",
75
+ variant: "text",
76
+ className: "text-info-medium disabled:text-info-light hover:bg-info-medium hover:border-info-medium"
77
+ },
78
+ {
79
+ intent: "warning",
80
+ variant: "text",
81
+ className: "text-warning-medium disabled:text-warning-light hover:bg-warning-medium hover:border-warning-medium"
82
+ },
83
+ {
84
+ intent: "error",
85
+ variant: "text",
86
+ className: "text-error-medium disabled:text-error-light hover:border-error-medium hover:bg-error-medium"
87
+ }
88
+ ],
89
+ defaultVariants: {
90
+ intent: "primary",
91
+ size: "default"
92
+ }
93
+ });
94
+
95
+ exports.button = button;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const card = tailwindVariants.tv({
6
+ base: "rounded-mili shadow-default bg-white p-deca"
7
+ });
8
+
9
+ exports.card = card;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const checkbox = tailwindVariants.tv({
6
+ base: "accent-primary-medium h-5 w-5 cursor-pointer"
7
+ });
8
+
9
+ exports.checkbox = checkbox;
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const drawer = tailwindVariants.tv({
6
+ base: "bg-white fixed top-0 h-full p-deca shadow-lg transition-all duration-500 transform peer-checked:translate-x-0",
7
+ variants: {
8
+ position: {
9
+ left: "left-0 -translate-x-full rounded-r-mili",
10
+ right: "right-1 translate-x-full rounded-l-mili"
11
+ }
12
+ },
13
+ defaultVariants: {
14
+ position: "left"
15
+ }
16
+ });
17
+ const overlay = tailwindVariants.tv({
18
+ base: "fixed h-full w-full left-0 top-0 transition peer-checked:bg-black peer-checked:bg-opacity-50 z-[-1] peer-checked:z-[0] peer-checked:cursor-pointer"
19
+ });
20
+
21
+ exports.drawer = drawer;
22
+ exports.overlay = overlay;
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const hint = tailwindVariants.tv({
6
+ base: "text-label font-bold flex items-center",
7
+ variants: {
8
+ intent: {
9
+ default: "text-secondary-medium",
10
+ success: "text-success-medium",
11
+ warning: "text-warning-medium",
12
+ error: "text-error-medium"
13
+ }
14
+ },
15
+ defaultVariants: { intent: "default" }
16
+ });
17
+
18
+ exports.hint = hint;
@@ -0,0 +1,81 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+ var clsx = require('clsx');
5
+
6
+ const inputBase = tailwindVariants.tv({
7
+ base: "relative min-h-[44px] h-auto flex px-centi py-1.5 focus-within:outline focus-within:outline-1 text-base font-bold items-center bg-transparent border rounded-mili",
8
+ variants: {
9
+ intent: {
10
+ default: [
11
+ "input-secondary",
12
+ "border-secondary-light",
13
+ "focus-within:border-secondary-dark",
14
+ "focus-within:outline-secondary-dark"
15
+ ],
16
+ success: [
17
+ "input-success",
18
+ "border-success-medium",
19
+ "focus-within:border-success-dark",
20
+ "focus-within:outline-success-dark"
21
+ ],
22
+ warning: [
23
+ "input-warning",
24
+ "border-warning-medium",
25
+ "focus-within:border-warning-dark",
26
+ "focus-within:outline-warning-dark"
27
+ ],
28
+ error: [
29
+ "input-error",
30
+ "border-error-medium",
31
+ "focus-within:border-error-dark",
32
+ "focus-within:outline-error-dark"
33
+ ]
34
+ }
35
+ },
36
+ defaultVariants: {
37
+ intent: "default"
38
+ }
39
+ });
40
+ const labelBase = tailwindVariants.tv({
41
+ base: "absolute duration-300 -translate-y-2 scale-[0.72] top-2.5 z-10 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-0 peer-focus:scale-[0.72] peer-focus:-translate-y-2 peer-focus:top-2.5 font-bold text-base peer-disabled:text-secondary-light select-none",
42
+ variants: {
43
+ intent: {
44
+ default: [
45
+ "text-secondary-medium",
46
+ "peer-focus:text-secondary-medium",
47
+ "peer-placeholder-shown:text-secondary-xdark"
48
+ ],
49
+ success: ["text-success-medium"],
50
+ warning: ["text-warning-medium"],
51
+ error: ["text-error-medium"]
52
+ }
53
+ },
54
+ defaultVariants: {
55
+ intent: "default"
56
+ }
57
+ });
58
+ const labelStyle = ({ intent, placeholder, className }) => labelBase({
59
+ intent,
60
+ className: clsx.clsx(className, {
61
+ "peer-placeholder-shown:hidden": !!placeholder
62
+ })
63
+ });
64
+ const input = ({ className, ...variants }) => inputBase({
65
+ ...variants,
66
+ className
67
+ });
68
+ const inputBox = (placeholder, label, className) => clsx.clsx(
69
+ className,
70
+ "peer relative outline-none placeholder:text-base placeholder:text-secondary-xdark placeholder-shown:top-0 disabled:bg-opacity-0 disabled:placeholder:text-secondary-light bg-transparent",
71
+ {
72
+ "focus:top-1.5": !placeholder && !!label,
73
+ "top-1.5": !!label
74
+ }
75
+ );
76
+
77
+ exports.input = input;
78
+ exports.inputBase = inputBase;
79
+ exports.inputBox = inputBox;
80
+ exports.labelBase = labelBase;
81
+ exports.labelStyle = labelStyle;
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const radioButton = tailwindVariants.tv({
6
+ base: "accent-primary-medium h-5 w-5 cursor-pointer"
7
+ });
8
+ const labelRadioButton = tailwindVariants.tv({
9
+ base: "cursor-pointer"
10
+ });
11
+
12
+ exports.labelRadioButton = labelRadioButton;
13
+ exports.radioButton = radioButton;
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+ var index = require('../input/index.js');
5
+
6
+ const buttonSelect = tailwindVariants.tv({
7
+ extend: index.inputBase,
8
+ base: "w-full justify-between bg-white gap-[200px]"
9
+ });
10
+ const option = tailwindVariants.tv({
11
+ base: "text-base py-mili px-deca font-bold hover:bg-primary-xlight hover:text-primary-medium cursor-pointer active:text-primary-medium"
12
+ });
13
+ const dropDown = tailwindVariants.tv({
14
+ base: "text-base max-h-[200px] w-full bg-white mt-mili rounded-mili overflow-y-scroll py-mili transition-all duration-300 origin-top-left",
15
+ variants: {
16
+ open: {
17
+ true: "-scale-y-1 opacity-1",
18
+ false: "scale-y-0 opacity-0"
19
+ }
20
+ }
21
+ });
22
+
23
+ exports.buttonSelect = buttonSelect;
24
+ exports.dropDown = dropDown;
25
+ exports.option = option;
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const tHead = tailwindVariants.tv({
6
+ base: "[&>tr]:rounded-none [&>tr]:shadow-none"
7
+ });
8
+ const tRow = tailwindVariants.tv({
9
+ base: "rounded-mili shadow-default"
10
+ });
11
+ const tHeadCell = tailwindVariants.tv({
12
+ base: "truncate px-deca py-centi text-start text-sub font-bold text-medium"
13
+ });
14
+ const tCell = tailwindVariants.tv({
15
+ base: "p-deca text-base font-bold text-dark"
16
+ });
17
+ const tFoot = tailwindVariants.tv({
18
+ base: "[&>tr]:rounded-none [&>tr]:shadow-none"
19
+ });
20
+ const tRoot = tailwindVariants.tv({
21
+ base: "border-separate border-spacing-x-[22px] border-spacing-y-mili rounded-mili bg-white px-0 py-centi shadow-default"
22
+ });
23
+ const hr = tailwindVariants.tv({
24
+ base: "-mx-[24px] -mb-[4px] -mt-[50px] h-[42px] border-0 bg-secondary-xlight"
25
+ });
26
+
27
+ exports.hr = hr;
28
+ exports.tCell = tCell;
29
+ exports.tFoot = tFoot;
30
+ exports.tHead = tHead;
31
+ exports.tHeadCell = tHeadCell;
32
+ exports.tRoot = tRoot;
33
+ exports.tRow = tRow;
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+ var cortexCore = require('@tecsinapse/cortex-core');
5
+
6
+ const myTV = tailwindVariants.createTV({
7
+ twMergeConfig: {
8
+ //passar tema?
9
+ classGroups: {
10
+ "font-size": [{ text: Object.keys(cortexCore.fontSize) }]
11
+ }
12
+ }
13
+ });
14
+ const tag = myTV({
15
+ base: "rounded-micro px-micro py-nano w-fit font-bold text-label items-center flex",
16
+ variants: {
17
+ intent: {
18
+ success: "bg-success-medium text-white",
19
+ primary: "bg-primary-medium text-white",
20
+ secondary: "bg-secondary-medium text-white",
21
+ info: "bg-info-medium text-white",
22
+ white: "bg-white text-secondary-medium"
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ intent: "secondary"
27
+ }
28
+ });
29
+
30
+ exports.tag = tag;
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const toggle = tailwindVariants.tv({
6
+ base: "peer h-[22px] w-[40px] rounded-full bg-secondary-light after:absolute after:left-micro after:top-[3px] after:h-deca after:w-deca after:rounded-full after:border after:border-white after:bg-white after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white peer-focus:outline-none",
7
+ variants: {
8
+ intent: {
9
+ primary: "peer-focus:primary-medium peer-checked:bg-primary-medium",
10
+ secondary: "peer-focus:secondary-medium peer-checked:bg-secondary-medium",
11
+ info: "peer-focus:info-medium peer-checked:bg-info-medium",
12
+ success: "peer-focus:success-medium peer-checked:bg-success-medium",
13
+ warning: "peer-focus:warning-medium peer-checked:bg-warning-medium",
14
+ error: "peer-focus:error-medium peer-checked:bg-error-medium"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ intent: "primary"
19
+ }
20
+ });
21
+ const styleLabelElement = tailwindVariants.tv({
22
+ base: "relative inline-flex cursor-pointer items-center"
23
+ });
24
+ const styleInputElement = tailwindVariants.tv({
25
+ base: "peer sr-only"
26
+ });
27
+
28
+ exports.styleInputElement = styleInputElement;
29
+ exports.styleLabelElement = styleLabelElement;
30
+ exports.toggle = toggle;
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const tooltipContainer = tailwindVariants.tv({
6
+ base: "group relative inline-block"
7
+ });
8
+ const arrowTooltip = tailwindVariants.tv({
9
+ base: 'after:content-[""] after:absolute after:border-secondary-dark',
10
+ variants: {
11
+ position: {
12
+ top: "after:left-[50%] after:-ml-[5px] after:top-[100%] after:border-x-8 after:border-x-transparent after:border-t-[8px]",
13
+ bottom: "after:left-[50%] after:-ml-[5px] after:bottom-[100%] after:border-x-8 after:border-x-transparent after:border-b-[8px]"
14
+ }
15
+ }
16
+ });
17
+ const tooltip = tailwindVariants.tv({
18
+ base: "h-8 mt-deca w-max h-fit invisible group-hover:visible opacity-0 group-hover:opacity-100 bg-secondary-dark text-white px-centi py-micro rounded-mili absolute",
19
+ variants: {
20
+ position: {
21
+ bottom: [
22
+ arrowTooltip({ position: "bottom" }),
23
+ "-ml-[200px] left-[50%] top-[100%] mt-centi -translate-y-[10%]"
24
+ ],
25
+ top: [
26
+ arrowTooltip({ position: "top" }),
27
+ "-ml-[200px] left-[50%] bottom-[100%] mb-centi translate-y-[10%]"
28
+ ]
29
+ }
30
+ }
31
+ });
32
+
33
+ exports.tooltip = tooltip;
34
+ exports.tooltipContainer = tooltipContainer;
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ var definitions = require('./tokens/definitions.js');
4
+ var button = require('./components/button/button.js');
5
+ var tag = require('./components/tag/tag.js');
6
+ var index = require('./components/input/index.js');
7
+ var hint = require('./components/hint/hint.js');
8
+ var toggle = require('./components/toggle/toggle.js');
9
+ var drawer = require('./components/drawer/drawer.js');
10
+ var select = require('./components/select/select.js');
11
+ var checkbox = require('./components/checkbox/checkbox.js');
12
+ var badge = require('./components/badge/badge.js');
13
+ var radioButton = require('./components/radio-button/radio-button.js');
14
+ var table = require('./components/table/table.js');
15
+ var tooltip = require('./components/tooltip/tooltip.js');
16
+ var card = require('./components/card/card.js');
17
+
18
+
19
+
20
+ exports.borderColor = definitions.borderColor;
21
+ exports.borderRadius = definitions.borderRadius;
22
+ exports.borderWidth = definitions.borderWidth;
23
+ exports.boxShadow = definitions.boxShadow;
24
+ exports.colors = definitions.colors;
25
+ exports.fontFamily = definitions.fontFamily;
26
+ exports.fontSize = definitions.fontSize;
27
+ exports.spacing = definitions.spacing;
28
+ exports.textColor = definitions.textColor;
29
+ exports.button = button.button;
30
+ exports.tag = tag.tag;
31
+ exports.input = index.input;
32
+ exports.inputBase = index.inputBase;
33
+ exports.inputBox = index.inputBox;
34
+ exports.labelBase = index.labelBase;
35
+ exports.labelStyle = index.labelStyle;
36
+ exports.hint = hint.hint;
37
+ exports.styleInputElement = toggle.styleInputElement;
38
+ exports.styleLabelElement = toggle.styleLabelElement;
39
+ exports.toggle = toggle.toggle;
40
+ exports.drawer = drawer.drawer;
41
+ exports.overlay = drawer.overlay;
42
+ exports.buttonSelect = select.buttonSelect;
43
+ exports.dropDown = select.dropDown;
44
+ exports.option = select.option;
45
+ exports.checkbox = checkbox.checkbox;
46
+ exports.badge = badge.badge;
47
+ exports.containerBadge = badge.containerBadge;
48
+ exports.labelRadioButton = radioButton.labelRadioButton;
49
+ exports.radioButton = radioButton.radioButton;
50
+ exports.hr = table.hr;
51
+ exports.tCell = table.tCell;
52
+ exports.tFoot = table.tFoot;
53
+ exports.tHead = table.tHead;
54
+ exports.tHeadCell = table.tHeadCell;
55
+ exports.tRoot = table.tRoot;
56
+ exports.tRow = table.tRow;
57
+ exports.tooltip = tooltip.tooltip;
58
+ exports.tooltipContainer = tooltip.tooltipContainer;
59
+ exports.card = card.card;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var definitions = require('../tokens/definitions.js');
4
+
5
+ module.exports = {
6
+ theme: {
7
+ fontFamily: definitions.fontFamily,
8
+ extend: {
9
+ colors: definitions.colors,
10
+ textColor: definitions.textColor,
11
+ spacing: definitions.spacing,
12
+ borderRadius: definitions.borderRadius,
13
+ borderWidth: definitions.borderWidth,
14
+ fontSize: definitions.fontSize,
15
+ boxShadow: definitions.boxShadow,
16
+ borderColor: definitions.borderColor
17
+ }
18
+ }
19
+ };
@@ -0,0 +1,170 @@
1
+ 'use strict';
2
+
3
+ const colors = {
4
+ primary: {
5
+ xlight: "#fef9f0",
6
+ light: "#fccb83",
7
+ medium: "#f89907",
8
+ dark: "#ae6b05",
9
+ xdark: "#633d03"
10
+ },
11
+ secondary: {
12
+ xlight: "#f8f7f7",
13
+ light: "#c2bfbc",
14
+ medium: "#85807a",
15
+ dark: "#5d5955",
16
+ xdark: "#353231"
17
+ },
18
+ info: {
19
+ xlight: "#f0f8fe",
20
+ light: "#85c7fa",
21
+ medium: "#239bf6",
22
+ dark: "#0873c4",
23
+ xdark: "#043962"
24
+ },
25
+ success: {
26
+ xlight: "#f3fcf8",
27
+ light: "#99e6c9",
28
+ medium: "#2db783",
29
+ dark: "#238f67",
30
+ xdark: "#14523b"
31
+ },
32
+ warning: {
33
+ xlight: "#fffcf0",
34
+ light: "#ffe380",
35
+ medium: "#ffc700",
36
+ dark: "#cc9f00",
37
+ xdark: "#665000"
38
+ },
39
+ error: {
40
+ xlight: "#fdf3f2",
41
+ light: "#ee9891",
42
+ medium: "#e04638",
43
+ dark: "#9b2318",
44
+ xdark: "#58240e"
45
+ },
46
+ miscellaneous: {
47
+ body: "#f8f7f7"
48
+ }
49
+ };
50
+ const spacing = {
51
+ nano: "0.125rem",
52
+ micro: "0.25rem",
53
+ mili: "0.5rem",
54
+ centi: "0.75rem",
55
+ deca: "1rem",
56
+ kilo: "1.5rem",
57
+ mega: "2rem",
58
+ giga: "2.5rem",
59
+ tera: "3rem",
60
+ peta: "3.5rem",
61
+ hexa: "4rem"
62
+ };
63
+ const borderRadius = {
64
+ nano: "0.125rem",
65
+ micro: "0.25rem",
66
+ mili: "0.5rem",
67
+ centi: "1rem",
68
+ deca: "1.5rem",
69
+ pill: "999999px"
70
+ };
71
+ const borderWidth = {
72
+ pico: "0.063rem",
73
+ nano: "0.125rem"
74
+ };
75
+ const fontSize = {
76
+ /** Font sizes */
77
+ h5: [
78
+ "1rem",
79
+ // "16px"
80
+ "1.5rem"
81
+ // "24px"
82
+ ],
83
+ h4: [
84
+ "1.125rem",
85
+ // "18px"
86
+ "1.688rem"
87
+ // "27px"
88
+ ],
89
+ h3: [
90
+ "1.25rem",
91
+ // "20px"
92
+ "2rem"
93
+ // "32px"
94
+ ],
95
+ h2: [
96
+ "1.625rem",
97
+ // "26px"
98
+ "2.375rem"
99
+ // "38px"
100
+ ],
101
+ h1: [
102
+ "2rem",
103
+ // "32px"
104
+ "2.625rem"
105
+ // "42px"
106
+ ],
107
+ base: [
108
+ "0.875rem",
109
+ // "14px"
110
+ "1.313rem"
111
+ // "21px"
112
+ ],
113
+ sub: [
114
+ "0.75rem",
115
+ // "12px"
116
+ "1.125rem"
117
+ // "18px"
118
+ ],
119
+ label: ["0.625rem", "0.75rem"],
120
+ // '10px', '12px'
121
+ /** Icon sizes */
122
+ micro: "0.75rem",
123
+ // "12px"
124
+ mili: "0.875rem",
125
+ // "14px"
126
+ centi: "1rem",
127
+ // "16px"
128
+ deca: "1.125rem",
129
+ // "18px"
130
+ kilo: "1.5rem",
131
+ // "24px"
132
+ mega: "2rem"
133
+ // "32px"
134
+ };
135
+ const boxShadow = {
136
+ default: "0 2px 8px rgba(0, 0, 0, 0.05)"
137
+ };
138
+ const borderColor = {
139
+ "success-light": "#99E6C9"
140
+ };
141
+ const fontFamily = {
142
+ sans: [
143
+ "Lato",
144
+ "system-ui",
145
+ "-apple-system",
146
+ "BlinkMacSystemFont",
147
+ "sans-serif",
148
+ "Apple Color Emoji",
149
+ "Segoe UI Emoji",
150
+ "Segoe UI Symbol",
151
+ "Noto Color Emoji"
152
+ ],
153
+ mono: "Consolas, monaco, monospace"
154
+ };
155
+ const textColor = {
156
+ light: "#fff",
157
+ medium: "#85807a",
158
+ dark: "#353231",
159
+ orange: "#f89907"
160
+ };
161
+
162
+ exports.borderColor = borderColor;
163
+ exports.borderRadius = borderRadius;
164
+ exports.borderWidth = borderWidth;
165
+ exports.boxShadow = boxShadow;
166
+ exports.colors = colors;
167
+ exports.fontFamily = fontFamily;
168
+ exports.fontSize = fontSize;
169
+ exports.spacing = spacing;
170
+ exports.textColor = textColor;
@@ -0,0 +1,23 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const badge = tv({
4
+ base: "text-sub text-white font-bold rounded-pill absolute items-center flex justify-center w-[1rem] h-[1rem] -top-1 -right-1 px-[5px] py-[2px]",
5
+ variants: {
6
+ intent: {
7
+ primary: "bg-primary-medium",
8
+ secondary: "bg-secondary-medium",
9
+ error: "bg-error-medium",
10
+ success: "bg-success-medium",
11
+ warning: "bg-warning-medium",
12
+ info: "bg-info-medium"
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ intent: "primary"
17
+ }
18
+ });
19
+ const containerBadge = tv({
20
+ base: "relative items-center justify-center self-center"
21
+ });
22
+
23
+ export { badge, containerBadge };
@@ -0,0 +1,93 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const button = tv({
4
+ base: "p-deca rounded-mili text-base h-fit font-bold disabled:text-white enabled:active:scale-95 transform transition hover:text-white text-white cursor-pointer items-center flex justify-center",
5
+ variants: {
6
+ intent: {
7
+ primary: "bg-primary-medium disabled:bg-primary-light active:bg-primary-dark enabled:hover:border-primary-dark hover:bg-primary-dark",
8
+ secondary: "bg-secondary-medium disabled:bg-secondary-light active:bg-secondary-dark hover:bg-secondary-dark hover:border-secondary-dark ",
9
+ success: "bg-success-medium disabled:bg-success-light hover:bg-success-dark hover:border-success-dark",
10
+ info: " bg-info-medium disabled:bg-info-light hover:bg-info-dark hover:border-info-dark ",
11
+ warning: " bg-warning-medium disabled:bg-warning-light hover:bg-warning-dark hover:border-warning-dark",
12
+ error: "bg-error-medium disabled:bg-error-light hover:bg-error-dark hover:border-error-dark"
13
+ },
14
+ variant: {
15
+ outline: "bg-transparent disabled:bg-transparent",
16
+ text: "bg-transparent border-0 disabled:bg-transparent"
17
+ },
18
+ size: {
19
+ default: "px-kilo py-mili min-h-[44px]",
20
+ small: "px-deca py-mili min-h-[34px]",
21
+ square: "p-[14px] min-h-fit aspect-square",
22
+ circle: "p-[14px] rounded-full min-h-fit aspect-square"
23
+ }
24
+ },
25
+ compoundVariants: [
26
+ {
27
+ intent: "primary",
28
+ variant: "outline",
29
+ className: "text-primary-medium disabled:text-primary-light border border-primary-medium disabled:border-primary-light"
30
+ },
31
+ {
32
+ intent: "secondary",
33
+ variant: "outline",
34
+ className: "text-secondary-medium disabled:text-secondary-light border border-secondary-medium disabled:border-secondary-light"
35
+ },
36
+ {
37
+ intent: "success",
38
+ variant: "outline",
39
+ className: "text-success-medium disabled:text-success-light border border-success-medium disabled:border-success-light hover:bg-success-medium hover:border-success-medium"
40
+ },
41
+ {
42
+ intent: "info",
43
+ variant: "outline",
44
+ className: "text-info-medium disabled:text-info-light border border-info-medium disabled:border-info-light hover:bg-info-medium hover:border-info-medium"
45
+ },
46
+ {
47
+ intent: "warning",
48
+ variant: "outline",
49
+ className: "text-warning-medium disabled:text-warning-light border border-warning-medium disabled:border-warning-light hover:bg-warning-medium hover:border-warning-medium"
50
+ },
51
+ {
52
+ intent: "error",
53
+ variant: "outline",
54
+ className: "text-error-medium disabled:text-error-light border border-error-medium hover:border-error-medium hover:bg-error-medium disabled:border-error-light"
55
+ },
56
+ {
57
+ intent: "primary",
58
+ variant: "text",
59
+ className: "text-primary-medium disabled:text-primary-light"
60
+ },
61
+ {
62
+ intent: "secondary",
63
+ variant: "text",
64
+ className: "text-secondary-medium disabled:text-secondary-light"
65
+ },
66
+ {
67
+ intent: "success",
68
+ variant: "text",
69
+ className: "text-success-medium disabled:text-success-light hover:bg-success-medium hover:border-success-medium"
70
+ },
71
+ {
72
+ intent: "info",
73
+ variant: "text",
74
+ className: "text-info-medium disabled:text-info-light hover:bg-info-medium hover:border-info-medium"
75
+ },
76
+ {
77
+ intent: "warning",
78
+ variant: "text",
79
+ className: "text-warning-medium disabled:text-warning-light hover:bg-warning-medium hover:border-warning-medium"
80
+ },
81
+ {
82
+ intent: "error",
83
+ variant: "text",
84
+ className: "text-error-medium disabled:text-error-light hover:border-error-medium hover:bg-error-medium"
85
+ }
86
+ ],
87
+ defaultVariants: {
88
+ intent: "primary",
89
+ size: "default"
90
+ }
91
+ });
92
+
93
+ export { button };
@@ -0,0 +1,7 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const card = tv({
4
+ base: "rounded-mili shadow-default bg-white p-deca"
5
+ });
6
+
7
+ export { card };
@@ -0,0 +1,7 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const checkbox = tv({
4
+ base: "accent-primary-medium h-5 w-5 cursor-pointer"
5
+ });
6
+
7
+ export { checkbox };
@@ -0,0 +1,19 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const drawer = tv({
4
+ base: "bg-white fixed top-0 h-full p-deca shadow-lg transition-all duration-500 transform peer-checked:translate-x-0",
5
+ variants: {
6
+ position: {
7
+ left: "left-0 -translate-x-full rounded-r-mili",
8
+ right: "right-1 translate-x-full rounded-l-mili"
9
+ }
10
+ },
11
+ defaultVariants: {
12
+ position: "left"
13
+ }
14
+ });
15
+ const overlay = tv({
16
+ base: "fixed h-full w-full left-0 top-0 transition peer-checked:bg-black peer-checked:bg-opacity-50 z-[-1] peer-checked:z-[0] peer-checked:cursor-pointer"
17
+ });
18
+
19
+ export { drawer, overlay };
@@ -0,0 +1,16 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const hint = tv({
4
+ base: "text-label font-bold flex items-center",
5
+ variants: {
6
+ intent: {
7
+ default: "text-secondary-medium",
8
+ success: "text-success-medium",
9
+ warning: "text-warning-medium",
10
+ error: "text-error-medium"
11
+ }
12
+ },
13
+ defaultVariants: { intent: "default" }
14
+ });
15
+
16
+ export { hint };
@@ -0,0 +1,75 @@
1
+ import { tv } from 'tailwind-variants';
2
+ import { clsx } from 'clsx';
3
+
4
+ const inputBase = tv({
5
+ base: "relative min-h-[44px] h-auto flex px-centi py-1.5 focus-within:outline focus-within:outline-1 text-base font-bold items-center bg-transparent border rounded-mili",
6
+ variants: {
7
+ intent: {
8
+ default: [
9
+ "input-secondary",
10
+ "border-secondary-light",
11
+ "focus-within:border-secondary-dark",
12
+ "focus-within:outline-secondary-dark"
13
+ ],
14
+ success: [
15
+ "input-success",
16
+ "border-success-medium",
17
+ "focus-within:border-success-dark",
18
+ "focus-within:outline-success-dark"
19
+ ],
20
+ warning: [
21
+ "input-warning",
22
+ "border-warning-medium",
23
+ "focus-within:border-warning-dark",
24
+ "focus-within:outline-warning-dark"
25
+ ],
26
+ error: [
27
+ "input-error",
28
+ "border-error-medium",
29
+ "focus-within:border-error-dark",
30
+ "focus-within:outline-error-dark"
31
+ ]
32
+ }
33
+ },
34
+ defaultVariants: {
35
+ intent: "default"
36
+ }
37
+ });
38
+ const labelBase = tv({
39
+ base: "absolute duration-300 -translate-y-2 scale-[0.72] top-2.5 z-10 origin-[0] peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-0 peer-focus:scale-[0.72] peer-focus:-translate-y-2 peer-focus:top-2.5 font-bold text-base peer-disabled:text-secondary-light select-none",
40
+ variants: {
41
+ intent: {
42
+ default: [
43
+ "text-secondary-medium",
44
+ "peer-focus:text-secondary-medium",
45
+ "peer-placeholder-shown:text-secondary-xdark"
46
+ ],
47
+ success: ["text-success-medium"],
48
+ warning: ["text-warning-medium"],
49
+ error: ["text-error-medium"]
50
+ }
51
+ },
52
+ defaultVariants: {
53
+ intent: "default"
54
+ }
55
+ });
56
+ const labelStyle = ({ intent, placeholder, className }) => labelBase({
57
+ intent,
58
+ className: clsx(className, {
59
+ "peer-placeholder-shown:hidden": !!placeholder
60
+ })
61
+ });
62
+ const input = ({ className, ...variants }) => inputBase({
63
+ ...variants,
64
+ className
65
+ });
66
+ const inputBox = (placeholder, label, className) => clsx(
67
+ className,
68
+ "peer relative outline-none placeholder:text-base placeholder:text-secondary-xdark placeholder-shown:top-0 disabled:bg-opacity-0 disabled:placeholder:text-secondary-light bg-transparent",
69
+ {
70
+ "focus:top-1.5": !placeholder && !!label,
71
+ "top-1.5": !!label
72
+ }
73
+ );
74
+
75
+ export { input, inputBase, inputBox, labelBase, labelStyle };
@@ -0,0 +1,10 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const radioButton = tv({
4
+ base: "accent-primary-medium h-5 w-5 cursor-pointer"
5
+ });
6
+ const labelRadioButton = tv({
7
+ base: "cursor-pointer"
8
+ });
9
+
10
+ export { labelRadioButton, radioButton };
@@ -0,0 +1,21 @@
1
+ import { tv } from 'tailwind-variants';
2
+ import { inputBase } from '../input/index.js';
3
+
4
+ const buttonSelect = tv({
5
+ extend: inputBase,
6
+ base: "w-full justify-between bg-white gap-[200px]"
7
+ });
8
+ const option = tv({
9
+ base: "text-base py-mili px-deca font-bold hover:bg-primary-xlight hover:text-primary-medium cursor-pointer active:text-primary-medium"
10
+ });
11
+ const dropDown = tv({
12
+ base: "text-base max-h-[200px] w-full bg-white mt-mili rounded-mili overflow-y-scroll py-mili transition-all duration-300 origin-top-left",
13
+ variants: {
14
+ open: {
15
+ true: "-scale-y-1 opacity-1",
16
+ false: "scale-y-0 opacity-0"
17
+ }
18
+ }
19
+ });
20
+
21
+ export { buttonSelect, dropDown, option };
@@ -0,0 +1,25 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const tHead = tv({
4
+ base: "[&>tr]:rounded-none [&>tr]:shadow-none"
5
+ });
6
+ const tRow = tv({
7
+ base: "rounded-mili shadow-default"
8
+ });
9
+ const tHeadCell = tv({
10
+ base: "truncate px-deca py-centi text-start text-sub font-bold text-medium"
11
+ });
12
+ const tCell = tv({
13
+ base: "p-deca text-base font-bold text-dark"
14
+ });
15
+ const tFoot = tv({
16
+ base: "[&>tr]:rounded-none [&>tr]:shadow-none"
17
+ });
18
+ const tRoot = tv({
19
+ base: "border-separate border-spacing-x-[22px] border-spacing-y-mili rounded-mili bg-white px-0 py-centi shadow-default"
20
+ });
21
+ const hr = tv({
22
+ base: "-mx-[24px] -mb-[4px] -mt-[50px] h-[42px] border-0 bg-secondary-xlight"
23
+ });
24
+
25
+ export { hr, tCell, tFoot, tHead, tHeadCell, tRoot, tRow };
@@ -0,0 +1,28 @@
1
+ import { createTV } from 'tailwind-variants';
2
+ import { fontSize } from '@tecsinapse/cortex-core';
3
+
4
+ const myTV = createTV({
5
+ twMergeConfig: {
6
+ //passar tema?
7
+ classGroups: {
8
+ "font-size": [{ text: Object.keys(fontSize) }]
9
+ }
10
+ }
11
+ });
12
+ const tag = myTV({
13
+ base: "rounded-micro px-micro py-nano w-fit font-bold text-label items-center flex",
14
+ variants: {
15
+ intent: {
16
+ success: "bg-success-medium text-white",
17
+ primary: "bg-primary-medium text-white",
18
+ secondary: "bg-secondary-medium text-white",
19
+ info: "bg-info-medium text-white",
20
+ white: "bg-white text-secondary-medium"
21
+ }
22
+ },
23
+ defaultVariants: {
24
+ intent: "secondary"
25
+ }
26
+ });
27
+
28
+ export { tag };
@@ -0,0 +1,26 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const toggle = tv({
4
+ base: "peer h-[22px] w-[40px] rounded-full bg-secondary-light after:absolute after:left-micro after:top-[3px] after:h-deca after:w-deca after:rounded-full after:border after:border-white after:bg-white after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white peer-focus:outline-none",
5
+ variants: {
6
+ intent: {
7
+ primary: "peer-focus:primary-medium peer-checked:bg-primary-medium",
8
+ secondary: "peer-focus:secondary-medium peer-checked:bg-secondary-medium",
9
+ info: "peer-focus:info-medium peer-checked:bg-info-medium",
10
+ success: "peer-focus:success-medium peer-checked:bg-success-medium",
11
+ warning: "peer-focus:warning-medium peer-checked:bg-warning-medium",
12
+ error: "peer-focus:error-medium peer-checked:bg-error-medium"
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ intent: "primary"
17
+ }
18
+ });
19
+ const styleLabelElement = tv({
20
+ base: "relative inline-flex cursor-pointer items-center"
21
+ });
22
+ const styleInputElement = tv({
23
+ base: "peer sr-only"
24
+ });
25
+
26
+ export { styleInputElement, styleLabelElement, toggle };
@@ -0,0 +1,31 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const tooltipContainer = tv({
4
+ base: "group relative inline-block"
5
+ });
6
+ const arrowTooltip = tv({
7
+ base: 'after:content-[""] after:absolute after:border-secondary-dark',
8
+ variants: {
9
+ position: {
10
+ top: "after:left-[50%] after:-ml-[5px] after:top-[100%] after:border-x-8 after:border-x-transparent after:border-t-[8px]",
11
+ bottom: "after:left-[50%] after:-ml-[5px] after:bottom-[100%] after:border-x-8 after:border-x-transparent after:border-b-[8px]"
12
+ }
13
+ }
14
+ });
15
+ const tooltip = tv({
16
+ base: "h-8 mt-deca w-max h-fit invisible group-hover:visible opacity-0 group-hover:opacity-100 bg-secondary-dark text-white px-centi py-micro rounded-mili absolute",
17
+ variants: {
18
+ position: {
19
+ bottom: [
20
+ arrowTooltip({ position: "bottom" }),
21
+ "-ml-[200px] left-[50%] top-[100%] mt-centi -translate-y-[10%]"
22
+ ],
23
+ top: [
24
+ arrowTooltip({ position: "top" }),
25
+ "-ml-[200px] left-[50%] bottom-[100%] mb-centi translate-y-[10%]"
26
+ ]
27
+ }
28
+ }
29
+ });
30
+
31
+ export { tooltip, tooltipContainer };
@@ -0,0 +1,14 @@
1
+ export { borderColor, borderRadius, borderWidth, boxShadow, colors, fontFamily, fontSize, spacing, textColor } from './tokens/definitions.js';
2
+ export { button } from './components/button/button.js';
3
+ export { tag } from './components/tag/tag.js';
4
+ export { input, inputBase, inputBox, labelBase, labelStyle } from './components/input/index.js';
5
+ export { hint } from './components/hint/hint.js';
6
+ export { styleInputElement, styleLabelElement, toggle } from './components/toggle/toggle.js';
7
+ export { drawer, overlay } from './components/drawer/drawer.js';
8
+ export { buttonSelect, dropDown, option } from './components/select/select.js';
9
+ export { checkbox } from './components/checkbox/checkbox.js';
10
+ export { badge, containerBadge } from './components/badge/badge.js';
11
+ export { labelRadioButton, radioButton } from './components/radio-button/radio-button.js';
12
+ export { hr, tCell, tFoot, tHead, tHeadCell, tRoot, tRow } from './components/table/table.js';
13
+ export { tooltip, tooltipContainer } from './components/tooltip/tooltip.js';
14
+ export { card } from './components/card/card.js';
@@ -0,0 +1,17 @@
1
+ import { fontFamily, colors, textColor, spacing, borderRadius, borderWidth, fontSize, boxShadow, borderColor } from '../tokens/definitions.js';
2
+
3
+ module.exports = {
4
+ theme: {
5
+ fontFamily,
6
+ extend: {
7
+ colors,
8
+ textColor,
9
+ spacing,
10
+ borderRadius,
11
+ borderWidth,
12
+ fontSize,
13
+ boxShadow,
14
+ borderColor
15
+ }
16
+ }
17
+ };
@@ -0,0 +1,160 @@
1
+ const colors = {
2
+ primary: {
3
+ xlight: "#fef9f0",
4
+ light: "#fccb83",
5
+ medium: "#f89907",
6
+ dark: "#ae6b05",
7
+ xdark: "#633d03"
8
+ },
9
+ secondary: {
10
+ xlight: "#f8f7f7",
11
+ light: "#c2bfbc",
12
+ medium: "#85807a",
13
+ dark: "#5d5955",
14
+ xdark: "#353231"
15
+ },
16
+ info: {
17
+ xlight: "#f0f8fe",
18
+ light: "#85c7fa",
19
+ medium: "#239bf6",
20
+ dark: "#0873c4",
21
+ xdark: "#043962"
22
+ },
23
+ success: {
24
+ xlight: "#f3fcf8",
25
+ light: "#99e6c9",
26
+ medium: "#2db783",
27
+ dark: "#238f67",
28
+ xdark: "#14523b"
29
+ },
30
+ warning: {
31
+ xlight: "#fffcf0",
32
+ light: "#ffe380",
33
+ medium: "#ffc700",
34
+ dark: "#cc9f00",
35
+ xdark: "#665000"
36
+ },
37
+ error: {
38
+ xlight: "#fdf3f2",
39
+ light: "#ee9891",
40
+ medium: "#e04638",
41
+ dark: "#9b2318",
42
+ xdark: "#58240e"
43
+ },
44
+ miscellaneous: {
45
+ body: "#f8f7f7"
46
+ }
47
+ };
48
+ const spacing = {
49
+ nano: "0.125rem",
50
+ micro: "0.25rem",
51
+ mili: "0.5rem",
52
+ centi: "0.75rem",
53
+ deca: "1rem",
54
+ kilo: "1.5rem",
55
+ mega: "2rem",
56
+ giga: "2.5rem",
57
+ tera: "3rem",
58
+ peta: "3.5rem",
59
+ hexa: "4rem"
60
+ };
61
+ const borderRadius = {
62
+ nano: "0.125rem",
63
+ micro: "0.25rem",
64
+ mili: "0.5rem",
65
+ centi: "1rem",
66
+ deca: "1.5rem",
67
+ pill: "999999px"
68
+ };
69
+ const borderWidth = {
70
+ pico: "0.063rem",
71
+ nano: "0.125rem"
72
+ };
73
+ const fontSize = {
74
+ /** Font sizes */
75
+ h5: [
76
+ "1rem",
77
+ // "16px"
78
+ "1.5rem"
79
+ // "24px"
80
+ ],
81
+ h4: [
82
+ "1.125rem",
83
+ // "18px"
84
+ "1.688rem"
85
+ // "27px"
86
+ ],
87
+ h3: [
88
+ "1.25rem",
89
+ // "20px"
90
+ "2rem"
91
+ // "32px"
92
+ ],
93
+ h2: [
94
+ "1.625rem",
95
+ // "26px"
96
+ "2.375rem"
97
+ // "38px"
98
+ ],
99
+ h1: [
100
+ "2rem",
101
+ // "32px"
102
+ "2.625rem"
103
+ // "42px"
104
+ ],
105
+ base: [
106
+ "0.875rem",
107
+ // "14px"
108
+ "1.313rem"
109
+ // "21px"
110
+ ],
111
+ sub: [
112
+ "0.75rem",
113
+ // "12px"
114
+ "1.125rem"
115
+ // "18px"
116
+ ],
117
+ label: ["0.625rem", "0.75rem"],
118
+ // '10px', '12px'
119
+ /** Icon sizes */
120
+ micro: "0.75rem",
121
+ // "12px"
122
+ mili: "0.875rem",
123
+ // "14px"
124
+ centi: "1rem",
125
+ // "16px"
126
+ deca: "1.125rem",
127
+ // "18px"
128
+ kilo: "1.5rem",
129
+ // "24px"
130
+ mega: "2rem"
131
+ // "32px"
132
+ };
133
+ const boxShadow = {
134
+ default: "0 2px 8px rgba(0, 0, 0, 0.05)"
135
+ };
136
+ const borderColor = {
137
+ "success-light": "#99E6C9"
138
+ };
139
+ const fontFamily = {
140
+ sans: [
141
+ "Lato",
142
+ "system-ui",
143
+ "-apple-system",
144
+ "BlinkMacSystemFont",
145
+ "sans-serif",
146
+ "Apple Color Emoji",
147
+ "Segoe UI Emoji",
148
+ "Segoe UI Symbol",
149
+ "Noto Color Emoji"
150
+ ],
151
+ mono: "Consolas, monaco, monospace"
152
+ };
153
+ const textColor = {
154
+ light: "#fff",
155
+ medium: "#85807a",
156
+ dark: "#353231",
157
+ orange: "#f89907"
158
+ };
159
+
160
+ export { borderColor, borderRadius, borderWidth, boxShadow, colors, fontFamily, fontSize, spacing, textColor };
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@tecsinapse/cortex-core",
3
+ "version": "0.0.1",
4
+ "description": "",
5
+ "main": "dist/cjs/index.js",
6
+ "module": "dist/esm/index.js",
7
+ "types": "dist/types/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "test": "echo \"Error: no test specified\" && exit 1",
13
+ "dev": "yarn build:es --watch",
14
+ "build:es": "rollup --config",
15
+ "build:declaration": "tsc --project tsconfig.build.json"
16
+ },
17
+ "author": "ryancarloscorrea",
18
+ "license": "ISC",
19
+ "dependencies": {
20
+ "class-variance-authority": "^0.7.0",
21
+ "tailwind-variants": "^0.1.18",
22
+ "tailwind-merge": "^2.0.0"
23
+ }
24
+ }