@momo-webplatform/mobase 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -2
- package/publish/cjs/components/TextArea/TextArea.js +6 -6
- package/publish/cjs/components/TextInput/TextInput.js +6 -6
- package/publish/cjs/components/Tooltip/Tooltip.js +3 -1
- package/publish/cjs/index.js +1 -0
- package/publish/cjs/mobase-tw-plugin/animations/index.js +20 -0
- package/publish/cjs/mobase-tw-plugin/colors/blue.js +16 -0
- package/publish/cjs/mobase-tw-plugin/colors/common.js +23 -0
- package/publish/cjs/mobase-tw-plugin/colors/gray.js +16 -0
- package/publish/cjs/mobase-tw-plugin/colors/green.js +16 -0
- package/publish/cjs/mobase-tw-plugin/colors/index.js +9 -0
- package/publish/cjs/mobase-tw-plugin/colors/orange.js +16 -0
- package/publish/cjs/mobase-tw-plugin/colors/pink.js +16 -0
- package/publish/cjs/mobase-tw-plugin/colors/purple.js +16 -0
- package/publish/cjs/mobase-tw-plugin/colors/red.js +16 -0
- package/publish/cjs/mobase-tw-plugin/colors/yellow.js +16 -0
- package/publish/cjs/mobase-tw-plugin/font-sizes/index.js +94 -0
- package/publish/cjs/mobase-tw-plugin/index.js +5 -0
- package/publish/cjs/mobase-tw-plugin/plugin.js +125 -0
- package/publish/cjs/mobase-tw-plugin/shadows/index.js +12 -0
- package/publish/cjs/mobase-tw-plugin/utilities/custom.js +22 -0
- package/publish/cjs/mobase-tw-plugin/utilities/index.js +14 -0
- package/publish/cjs/mobase-tw-plugin/utilities/scrollbar-hide.js +30 -0
- package/publish/cjs/mobase-tw-plugin/utilities/transition.js +88 -0
- package/publish/cjs/mobase-tw-plugin/utils/index.js +17 -0
- package/publish/cjs/mobase-tw-plugin/utils/object.js +34 -0
- package/publish/cjs/tsconfig.lib.tsbuildinfo +1 -1
- package/publish/esm/components/TextArea/TextArea.js +6 -6
- package/publish/esm/components/TextInput/TextInput.js +6 -6
- package/publish/esm/components/Tooltip/Tooltip.d.ts +1 -1
- package/publish/esm/components/Tooltip/Tooltip.js +4 -2
- package/publish/esm/index.d.ts +1 -0
- package/publish/esm/index.js +1 -0
- package/publish/esm/mobase-tw-plugin/animations/index.d.ts +25 -0
- package/publish/esm/mobase-tw-plugin/animations/index.js +17 -0
- package/publish/esm/mobase-tw-plugin/colors/blue.d.ts +13 -0
- package/publish/esm/mobase-tw-plugin/colors/blue.js +13 -0
- package/publish/esm/mobase-tw-plugin/colors/common.d.ts +109 -0
- package/publish/esm/mobase-tw-plugin/colors/common.js +20 -0
- package/publish/esm/mobase-tw-plugin/colors/gray.d.ts +13 -0
- package/publish/esm/mobase-tw-plugin/colors/gray.js +13 -0
- package/publish/esm/mobase-tw-plugin/colors/green.d.ts +13 -0
- package/publish/esm/mobase-tw-plugin/colors/green.js +13 -0
- package/publish/esm/mobase-tw-plugin/colors/index.d.ts +110 -0
- package/publish/esm/mobase-tw-plugin/colors/index.js +5 -0
- package/publish/esm/mobase-tw-plugin/colors/orange.d.ts +13 -0
- package/publish/esm/mobase-tw-plugin/colors/orange.js +13 -0
- package/publish/esm/mobase-tw-plugin/colors/pink.d.ts +13 -0
- package/publish/esm/mobase-tw-plugin/colors/pink.js +13 -0
- package/publish/esm/mobase-tw-plugin/colors/purple.d.ts +13 -0
- package/publish/esm/mobase-tw-plugin/colors/purple.js +13 -0
- package/publish/esm/mobase-tw-plugin/colors/red.d.ts +13 -0
- package/publish/esm/mobase-tw-plugin/colors/red.js +13 -0
- package/publish/esm/mobase-tw-plugin/colors/yellow.d.ts +13 -0
- package/publish/esm/mobase-tw-plugin/colors/yellow.js +13 -0
- package/publish/esm/mobase-tw-plugin/font-sizes/index.d.ts +59 -0
- package/publish/esm/mobase-tw-plugin/font-sizes/index.js +91 -0
- package/publish/esm/mobase-tw-plugin/index.d.ts +1 -0
- package/publish/esm/mobase-tw-plugin/index.js +1 -0
- package/publish/esm/mobase-tw-plugin/plugin.d.ts +10 -0
- package/publish/esm/mobase-tw-plugin/plugin.js +118 -0
- package/publish/esm/mobase-tw-plugin/shadows/index.d.ts +10 -0
- package/publish/esm/mobase-tw-plugin/shadows/index.js +9 -0
- package/publish/esm/mobase-tw-plugin/utilities/custom.d.ts +21 -0
- package/publish/esm/mobase-tw-plugin/utilities/custom.js +20 -0
- package/publish/esm/mobase-tw-plugin/utilities/index.d.ts +111 -0
- package/publish/esm/mobase-tw-plugin/utilities/index.js +8 -0
- package/publish/esm/mobase-tw-plugin/utilities/scrollbar-hide.d.ts +23 -0
- package/publish/esm/mobase-tw-plugin/utilities/scrollbar-hide.js +28 -0
- package/publish/esm/mobase-tw-plugin/utilities/transition.d.ts +86 -0
- package/publish/esm/mobase-tw-plugin/utilities/transition.js +86 -0
- package/publish/esm/mobase-tw-plugin/utils/index.d.ts +1 -0
- package/publish/esm/mobase-tw-plugin/utils/index.js +1 -0
- package/publish/esm/mobase-tw-plugin/utils/object.d.ts +25 -0
- package/publish/esm/mobase-tw-plugin/utils/object.js +29 -0
- package/publish/esm/tsconfig.lib.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-webplatform/mobase",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Mobase is the UI framework upon we build product experiences at MoMo.vn, base on Radix primitives, and Tailwind CSS.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "next dev",
|
|
@@ -62,16 +62,21 @@
|
|
|
62
62
|
"@radix-ui/react-use-previous": "^1.0.1",
|
|
63
63
|
"@radix-ui/react-use-size": "^1.0.1",
|
|
64
64
|
"@storybook/addon-styling": "^1.3.7",
|
|
65
|
+
"@types/color": "^3.0.6",
|
|
65
66
|
"autoprefixer": "^10.4.16",
|
|
66
67
|
"axios": "^1.6.7",
|
|
67
68
|
"class-variance-authority": "^0.7.0",
|
|
68
69
|
"clsx": "^2.1.0",
|
|
69
70
|
"cmdk": "^0.2.0",
|
|
70
71
|
"date-fns": "^3.2.0",
|
|
72
|
+
"deepmerge": "^4.3.1",
|
|
71
73
|
"dlv": "^1.1.3",
|
|
74
|
+
"flat": "^6.0.1",
|
|
72
75
|
"flowbite-react": "^0.7.2",
|
|
73
76
|
"framer-motion": "^11.0.3",
|
|
74
77
|
"fs": "0.0.1-security",
|
|
78
|
+
"lodash": "^4.17.21",
|
|
79
|
+
"lodash.omit": "^4.5.0",
|
|
75
80
|
"lucide-react": "^0.307.0",
|
|
76
81
|
"next": "^13.0.0",
|
|
77
82
|
"nextra": "^2.13.2",
|
|
@@ -84,7 +89,7 @@
|
|
|
84
89
|
"react-icons": "^4.11.0",
|
|
85
90
|
"react-indiana-drag-scroll": "^2.2.0",
|
|
86
91
|
"tailwind-merge": "^2.2.0",
|
|
87
|
-
"tailwindcss": "^3.4.
|
|
92
|
+
"tailwindcss": "^3.4.3",
|
|
88
93
|
"tailwindcss-animate": "^1.0.7",
|
|
89
94
|
"vaul": "^0.8.0"
|
|
90
95
|
},
|
|
@@ -9,11 +9,11 @@ const utils_1 = require("../../helpers/utils");
|
|
|
9
9
|
exports.TextArea = (0, react_1.forwardRef)(({ disabled, isError, message, label, className, inputClassName, rows = 3, ...restProps }, ref) => {
|
|
10
10
|
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("relative", className, isError && "mobase-text-area-error"), children: [label && ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)("mobase-text-area-label absolute bg-white -top-2.5 px-1.5 left-2 text-sm", disabled ? "text-gray-400" : "text-gray-500"), children: label })), (0, jsx_runtime_1.jsx)("textarea", { disabled: disabled, ref: ref, className: (0, utils_1.cn)("mobase-text-area-box bg-white w-full transition-all rounded border border-gray-400 placeholder:text-base placeholder:text-gray-500 p-3 text-gray-900 focus:border-pink-500 disabled:bg-gray-50 disabled:border-gray-300 outline-none block", inputClassName), rows: rows, ...restProps }), message && ((0, jsx_runtime_1.jsxs)("div", { className: "mobase-text-area-message flex space-x-1 items-center mt-0.5", children: [isError ? ((0, jsx_runtime_1.jsx)(solid_1.XCircleIcon, { width: 16, height: 16, className: "text-red-500" })) : ((0, jsx_runtime_1.jsx)(outline_1.QuestionMarkCircleIcon, { width: 16, height: 16, className: "text-gray-500" })), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-500 text-sm", children: message })] })), (0, jsx_runtime_1.jsx)("style", { children: `
|
|
11
11
|
.mobase-text-area-box:hover {
|
|
12
|
-
box-shadow: 0px 0px 0px 1px var(--gray-
|
|
12
|
+
box-shadow: 0px 0px 0px 1px hsl(var(--gray-400) / 1) inset;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.mobase-text-area-box:focus {
|
|
16
|
-
box-shadow: 0px 0px 0px 1px
|
|
16
|
+
box-shadow: 0px 0px 0px 1px hsl(var(--pink-500) / 1) inset;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.mobase-text-area-box:disabled {
|
|
@@ -22,16 +22,16 @@ exports.TextArea = (0, react_1.forwardRef)(({ disabled, isError, message, label,
|
|
|
22
22
|
|
|
23
23
|
.mobase-text-area-error {
|
|
24
24
|
.mobase-text-area-label {
|
|
25
|
-
color:
|
|
25
|
+
color: hsl(var(--red-500) / 1);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.mobase-text-area-box {
|
|
29
|
-
box-shadow: 0px 0px 0px 1px
|
|
30
|
-
border-color:
|
|
29
|
+
box-shadow: 0px 0px 0px 1px hsl(var(--red-500) / 1) inset;
|
|
30
|
+
border-color: hsl(var(--red-500) / 1);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.mobase-text-area-message span {
|
|
34
|
-
color:
|
|
34
|
+
color: hsl(var(--red-500) / 1);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
` })] }));
|
|
@@ -41,25 +41,25 @@ exports.TextInput = (0, react_1.forwardRef)(({ disabled, isError, message, label
|
|
|
41
41
|
}, [value, defaultValue]);
|
|
42
42
|
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)(className, isError && "mobase-text-input-error"), ref: rootRef, children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [label && ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)("mobase-text-input-label absolute bg-white -top-2.5 px-1.5 left-2 text-sm", disabled ? "text-gray-400" : "text-gray-500"), children: label })), (0, jsx_runtime_1.jsx)("input", { disabled: disabled, type: type, ref: ref, className: (0, utils_1.cn)("mobase-text-input-box bg-white w-full transition-all rounded border border-gray-400 placeholder:text-base placeholder:text-gray-500 p-3 text-gray-900 h-12 focus:border-pink-500 disabled:bg-gray-50 disabled:border-gray-300 disabled:pointer-events-none block", inputClassName), onChange: onChangeFactory, onFocus: onFocusFactory, value: value, defaultValue: defaultValue, ...restProps }), withClearButton && clearable && ((0, jsx_runtime_1.jsx)("button", { "aria-label": "button", type: "button", className: "absolute right-3 top-1/2 -translate-y-1/2 shrink-0 cursor-pointer text-gray-500 duration-200 hover:opacity-70 disabled:pointer-events-none", disabled: disabled, onClick: handleClear, children: (0, jsx_runtime_1.jsx)(outline_1.XCircleIcon, { strokeWidth: 2, width: 20, height: 20 }) }))] }), message && ((0, jsx_runtime_1.jsxs)("div", { className: "mobase-text-input-message flex space-x-1 items-center mt-0.5", children: [isError ? ((0, jsx_runtime_1.jsx)(solid_1.XCircleIcon, { width: 16, height: 16, className: "text-red-500" })) : ((0, jsx_runtime_1.jsx)(outline_1.QuestionMarkCircleIcon, { width: 16, height: 16, className: "text-gray-500" })), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-500 text-sm", children: message })] })), (0, jsx_runtime_1.jsx)("style", { children: `
|
|
43
43
|
.mobase-text-input-box:hover {
|
|
44
|
-
box-shadow: 0px 0px 0px 1px var(--gray-
|
|
44
|
+
box-shadow: 0px 0px 0px 1px hsl(var(--gray-400) / 1) inset;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.mobase-text-input-box:focus {
|
|
48
|
-
box-shadow: 0px 0px 0px 1px
|
|
48
|
+
box-shadow: 0px 0px 0px 1px hsl(var(--pink-500) / 1) inset;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.mobase-text-input-error {
|
|
52
52
|
.mobase-text-input-label {
|
|
53
|
-
color:
|
|
53
|
+
color: hsl(var(--red-500) / 1);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.mobase-text-input-box {
|
|
57
|
-
box-shadow: 0px 0px 0px 1px
|
|
58
|
-
border-color:
|
|
57
|
+
box-shadow: 0px 0px 0px 1px hsl(var(--red-500) / 1) inset;
|
|
58
|
+
border-color: hsl(var(--red-500) / 1);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.mobase-text-input-message span {
|
|
62
|
-
color:
|
|
62
|
+
color: hsl(var(--red-500) / 1);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
` })] }));
|
|
@@ -37,6 +37,8 @@ exports.TooltipTrigger = TooltipTrigger;
|
|
|
37
37
|
const TooltipArrow = React.forwardRef((props, ref) => ((0, jsx_runtime_1.jsx)(TooltipPrimitive.Arrow, { ref: ref, className: (0, utils_1.cn)("drop-shadow-md", props.className), ...props })));
|
|
38
38
|
exports.TooltipArrow = TooltipArrow;
|
|
39
39
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
|
40
|
-
const TooltipContent = React.forwardRef(({ className, type = "dark", sideOffset = 4, ...props }, ref) => ((0, jsx_runtime_1.jsx)(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: (0, utils_1.cn)("z-50 overflow-hidden rounded-md text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 p-1.5 shadow-
|
|
40
|
+
const TooltipContent = React.forwardRef(({ className, type = "dark", sideOffset = 4, ...props }, ref) => ((0, jsx_runtime_1.jsx)(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: (0, utils_1.cn)("z-50 overflow-hidden rounded-md text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 p-1.5 shadow-md", type === "light"
|
|
41
|
+
? "bg-white text-gray-900 fill-white"
|
|
42
|
+
: "bg-gray-800 fill-gray-800 text-white", className), ...props })));
|
|
41
43
|
exports.TooltipContent = TooltipContent;
|
|
42
44
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
package/publish/cjs/index.js
CHANGED
|
@@ -25,3 +25,4 @@ __exportStar(require("./components/Tabs"), exports);
|
|
|
25
25
|
__exportStar(require("./components/TextArea"), exports);
|
|
26
26
|
__exportStar(require("./components/Tooltip"), exports);
|
|
27
27
|
__exportStar(require("./components/TextInput"), exports);
|
|
28
|
+
__exportStar(require("./mobase-tw-plugin"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.animations = void 0;
|
|
4
|
+
exports.animations = {
|
|
5
|
+
animation: {
|
|
6
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
7
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
8
|
+
"spin-loading": "spin 1s steps(12, end) infinite",
|
|
9
|
+
},
|
|
10
|
+
keyframes: {
|
|
11
|
+
"accordion-down": {
|
|
12
|
+
from: { height: "0" },
|
|
13
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
14
|
+
},
|
|
15
|
+
"accordion-up": {
|
|
16
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
17
|
+
to: { height: "0" },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blue = void 0;
|
|
4
|
+
exports.blue = {
|
|
5
|
+
50: "#F2F8FF",
|
|
6
|
+
100: "#E5F1FF",
|
|
7
|
+
200: "#CCE4FF",
|
|
8
|
+
300: "#99caff",
|
|
9
|
+
400: "#3395ff",
|
|
10
|
+
500: "#1987FF",
|
|
11
|
+
600: "#007aff",
|
|
12
|
+
700: "#006ee6",
|
|
13
|
+
800: "#0062cc",
|
|
14
|
+
900: "#004794",
|
|
15
|
+
DEFAULT: "#1987FF",
|
|
16
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commonColors = void 0;
|
|
4
|
+
const blue_1 = require("./blue");
|
|
5
|
+
const green_1 = require("./green");
|
|
6
|
+
const pink_1 = require("./pink");
|
|
7
|
+
const purple_1 = require("./purple");
|
|
8
|
+
const red_1 = require("./red");
|
|
9
|
+
const yellow_1 = require("./yellow");
|
|
10
|
+
const orange_1 = require("./orange");
|
|
11
|
+
const gray_1 = require("./gray");
|
|
12
|
+
exports.commonColors = {
|
|
13
|
+
white: "#ffffff",
|
|
14
|
+
black: "#000000",
|
|
15
|
+
blue: blue_1.blue,
|
|
16
|
+
green: green_1.green,
|
|
17
|
+
pink: pink_1.pink,
|
|
18
|
+
purple: purple_1.purple,
|
|
19
|
+
red: red_1.red,
|
|
20
|
+
yellow: yellow_1.yellow,
|
|
21
|
+
gray: gray_1.gray,
|
|
22
|
+
orange: orange_1.orange,
|
|
23
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gray = void 0;
|
|
4
|
+
exports.gray = {
|
|
5
|
+
50: "#FAFAFA",
|
|
6
|
+
100: "#F5F5F5",
|
|
7
|
+
200: "#E5E5E5",
|
|
8
|
+
300: "#D4D4D4",
|
|
9
|
+
400: "#A3A3A3",
|
|
10
|
+
500: "#737373",
|
|
11
|
+
600: "#525252",
|
|
12
|
+
700: "#404040",
|
|
13
|
+
800: "#262626",
|
|
14
|
+
900: "#171717",
|
|
15
|
+
DEFAULT: "#737373",
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.green = void 0;
|
|
4
|
+
exports.green = {
|
|
5
|
+
50: "#eaf9ee",
|
|
6
|
+
100: "#d6f4de",
|
|
7
|
+
200: "#aee9bd",
|
|
8
|
+
300: "#85DD9B",
|
|
9
|
+
400: "#5dd27a",
|
|
10
|
+
500: "#48cc69",
|
|
11
|
+
600: "#34c759",
|
|
12
|
+
700: "#2fb350",
|
|
13
|
+
800: "#2a9f47",
|
|
14
|
+
900: "#117A2B",
|
|
15
|
+
DEFAULT: "#48cc69",
|
|
16
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.commonColors = exports.colors = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
Object.defineProperty(exports, "commonColors", { enumerable: true, get: function () { return common_1.commonColors; } });
|
|
6
|
+
const colors = {
|
|
7
|
+
...common_1.commonColors,
|
|
8
|
+
};
|
|
9
|
+
exports.colors = colors;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.orange = void 0;
|
|
4
|
+
exports.orange = {
|
|
5
|
+
50: "#fff6f3",
|
|
6
|
+
100: "#feede8",
|
|
7
|
+
200: "#feddd2",
|
|
8
|
+
300: "#fdbba4",
|
|
9
|
+
400: "#fc9877",
|
|
10
|
+
500: "#fb7649",
|
|
11
|
+
600: "#fa6532",
|
|
12
|
+
700: "#fa541c",
|
|
13
|
+
800: "#e14c19",
|
|
14
|
+
900: "#c84316",
|
|
15
|
+
DEFAULT: "#fb7649",
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pink = void 0;
|
|
4
|
+
exports.pink = {
|
|
5
|
+
50: "#FEF8FC",
|
|
6
|
+
100: "#FDEAF4",
|
|
7
|
+
200: "#FBD5EA",
|
|
8
|
+
300: "#F382C0",
|
|
9
|
+
400: "#EF59AB",
|
|
10
|
+
500: "#EB2F96",
|
|
11
|
+
600: "#D42A87",
|
|
12
|
+
700: "#BC2678",
|
|
13
|
+
800: "#A50064",
|
|
14
|
+
900: "#780650",
|
|
15
|
+
DEFAULT: "#EB2F96",
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.purple = void 0;
|
|
4
|
+
exports.purple = {
|
|
5
|
+
50: "#faf4fe",
|
|
6
|
+
100: "#f4e9fd",
|
|
7
|
+
200: "#ead4fc",
|
|
8
|
+
300: "#d5aaf9",
|
|
9
|
+
400: "#c07ff6",
|
|
10
|
+
500: "#ab55f3",
|
|
11
|
+
600: "#a03ff1",
|
|
12
|
+
700: "#962af0",
|
|
13
|
+
800: "#8726d8",
|
|
14
|
+
900: "#6A15B2",
|
|
15
|
+
DEFAULT: "#ab55f3",
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.red = void 0;
|
|
4
|
+
exports.red = {
|
|
5
|
+
50: "#fef4f4",
|
|
6
|
+
100: "#fee8ea",
|
|
7
|
+
200: "#fdd3d5",
|
|
8
|
+
300: "#fba7ab",
|
|
9
|
+
400: "#f97a81",
|
|
10
|
+
500: "#f74e57",
|
|
11
|
+
600: "#f63842",
|
|
12
|
+
700: "#f5222d",
|
|
13
|
+
800: "#dd1f29",
|
|
14
|
+
900: "#c41b24",
|
|
15
|
+
DEFAULT: "#f74e57",
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.yellow = void 0;
|
|
4
|
+
exports.yellow = {
|
|
5
|
+
50: "#fff9e5",
|
|
6
|
+
100: "#fff5cc",
|
|
7
|
+
200: "#ffeb99",
|
|
8
|
+
300: "#ffe066",
|
|
9
|
+
400: "#ffd633",
|
|
10
|
+
500: "#ffd119",
|
|
11
|
+
600: "#ffcc00",
|
|
12
|
+
700: "#e6b800",
|
|
13
|
+
800: "#cca300",
|
|
14
|
+
900: "#A88600",
|
|
15
|
+
DEFAULT: "#ffd119",
|
|
16
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fontSizes = void 0;
|
|
4
|
+
exports.fontSizes = {
|
|
5
|
+
xxs: [
|
|
6
|
+
"0.625rem",
|
|
7
|
+
{
|
|
8
|
+
lineHeight: "1rem",
|
|
9
|
+
},
|
|
10
|
+
],
|
|
11
|
+
xs: [
|
|
12
|
+
"0.75rem",
|
|
13
|
+
{
|
|
14
|
+
lineHeight: "1rem",
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
sm: [
|
|
18
|
+
"0.875rem",
|
|
19
|
+
{
|
|
20
|
+
lineHeight: "1.25rem",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
base: [
|
|
24
|
+
"1rem",
|
|
25
|
+
{
|
|
26
|
+
lineHeight: "1.5rem",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
lg: [
|
|
30
|
+
"1.125rem",
|
|
31
|
+
{
|
|
32
|
+
lineHeight: "1.75rem",
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
xl: [
|
|
36
|
+
"1.25rem",
|
|
37
|
+
{
|
|
38
|
+
lineHeight: "1.75rem",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
"2xl": [
|
|
42
|
+
"1.5rem",
|
|
43
|
+
{
|
|
44
|
+
lineHeight: "2rem",
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
"3xl": [
|
|
48
|
+
"1.875rem",
|
|
49
|
+
{
|
|
50
|
+
lineHeight: "2.25rem",
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
"4xl": [
|
|
54
|
+
"2.25rem",
|
|
55
|
+
{
|
|
56
|
+
lineHeight: "2.5rem",
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
"5xl": [
|
|
60
|
+
"3rem",
|
|
61
|
+
{
|
|
62
|
+
lineHeight: "3.5rem",
|
|
63
|
+
letterSpacing: "-0.075rem",
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
"6xl": [
|
|
67
|
+
"3.75rem",
|
|
68
|
+
{
|
|
69
|
+
lineHeight: "4.5rem",
|
|
70
|
+
letterSpacing: "-0.09375rem",
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
"7xl": [
|
|
74
|
+
"4.5rem",
|
|
75
|
+
{
|
|
76
|
+
lineHeight: "5rem",
|
|
77
|
+
letterSpacing: "-0.1125rem",
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
"8xl": [
|
|
81
|
+
"6rem",
|
|
82
|
+
{
|
|
83
|
+
lineHeight: "6.5rem",
|
|
84
|
+
letterSpacing: "-0.15rem",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
"9xl": [
|
|
88
|
+
"8rem",
|
|
89
|
+
{
|
|
90
|
+
lineHeight: "8rem",
|
|
91
|
+
letterSpacing: "-0.2rem",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
5
|
+
/**
|
|
6
|
+
* This Tailwind plugin is based and inspired on "tw-colors" and "NextUI".
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/L-Blondy/tw-colors
|
|
9
|
+
* @see https://github.com/nextui-org/nextui
|
|
10
|
+
*/
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.mobaseTW = void 0;
|
|
16
|
+
const color_1 = __importDefault(require("color"));
|
|
17
|
+
const plugin_js_1 = __importDefault(require("tailwindcss/plugin.js"));
|
|
18
|
+
const utilities_1 = require("./utilities");
|
|
19
|
+
const utils_1 = require("./utils");
|
|
20
|
+
const colors_1 = require("./colors");
|
|
21
|
+
const animations_1 = require("./animations");
|
|
22
|
+
const shadows_1 = require("./shadows");
|
|
23
|
+
const font_sizes_1 = require("./font-sizes");
|
|
24
|
+
const parsedColorsCache = {};
|
|
25
|
+
const resolveConfig = () => {
|
|
26
|
+
const resolved = {
|
|
27
|
+
utilities: {},
|
|
28
|
+
colors: {},
|
|
29
|
+
};
|
|
30
|
+
const flatColors = (0, utils_1.flattenThemeObject)(colors_1.colors);
|
|
31
|
+
const cssSelector = `:root`;
|
|
32
|
+
resolved.utilities[cssSelector] = {};
|
|
33
|
+
for (const [colorName, colorValue] of Object.entries(flatColors)) {
|
|
34
|
+
if (!colorValue)
|
|
35
|
+
return;
|
|
36
|
+
try {
|
|
37
|
+
const parsedColor = parsedColorsCache[colorValue] ||
|
|
38
|
+
(0, color_1.default)(colorValue).hsl().round().array();
|
|
39
|
+
parsedColorsCache[colorValue] = parsedColor;
|
|
40
|
+
const [h, s, l, defaultAlphaValue] = parsedColor;
|
|
41
|
+
const colorVar = `--${colorName}`;
|
|
42
|
+
const opacityVar = `--${colorName}-opacity`;
|
|
43
|
+
// Set the css variable in "@layer utilities"
|
|
44
|
+
resolved.utilities[cssSelector][colorVar] = `${h} ${s}% ${l}%`;
|
|
45
|
+
// If an alpha value was provided in the color definition, store it in a css variable
|
|
46
|
+
if (typeof defaultAlphaValue === "number") {
|
|
47
|
+
resolved.utilities[cssSelector][opacityVar] =
|
|
48
|
+
defaultAlphaValue.toFixed(2);
|
|
49
|
+
}
|
|
50
|
+
// set the dynamic color in tailwind config theme.colors
|
|
51
|
+
// opacityVariable va opacityValue ở đâu ra, đm nó
|
|
52
|
+
resolved.colors[colorName] = ({ opacityVariable, opacityValue }) => {
|
|
53
|
+
// if the opacity is set with a slash (e.g. bg-primary/90), use the provided value
|
|
54
|
+
if (!isNaN(+opacityValue)) {
|
|
55
|
+
return `hsl(var(${colorVar}) / ${opacityValue})`;
|
|
56
|
+
}
|
|
57
|
+
// if no opacityValue was provided (=it is not parsable to a number)
|
|
58
|
+
// the nextuiOpacityVariable (opacity defined in the color definition rgb(0, 0, 0, 0.5)) should have the priority
|
|
59
|
+
// over the tw class based opacity(e.g. "bg-opacity-90")
|
|
60
|
+
// This is how tailwind behaves as for v3.2.4
|
|
61
|
+
if (opacityVariable) {
|
|
62
|
+
return `hsl(var(${colorVar}) / var(${opacityVar}, var(${opacityVariable})))`;
|
|
63
|
+
}
|
|
64
|
+
return `hsl(var(${colorVar}) / var(${opacityVar}, 1))`;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
// eslint-disable-next-line no-console
|
|
69
|
+
console.log("error", error?.message);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return resolved;
|
|
73
|
+
};
|
|
74
|
+
const mobaseTW = () => {
|
|
75
|
+
const resolved = resolveConfig();
|
|
76
|
+
return (0, plugin_js_1.default)(({ addBase, addUtilities }) => {
|
|
77
|
+
addBase({
|
|
78
|
+
":root": {
|
|
79
|
+
"font-smooth--webkit": "antialiased",
|
|
80
|
+
},
|
|
81
|
+
...resolved?.utilities, //Xem lai cho nay, addBase
|
|
82
|
+
});
|
|
83
|
+
addUtilities({
|
|
84
|
+
// ...resolved?.utilities, //Xem lai cho nay, addBase
|
|
85
|
+
...utilities_1.utilities,
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
// Extend the Tailwind config
|
|
89
|
+
{
|
|
90
|
+
theme: {
|
|
91
|
+
extend: {
|
|
92
|
+
colors: {
|
|
93
|
+
...colors_1.colors,
|
|
94
|
+
...resolved?.colors,
|
|
95
|
+
},
|
|
96
|
+
screens: {
|
|
97
|
+
xs: "480px",
|
|
98
|
+
},
|
|
99
|
+
padding: {
|
|
100
|
+
"2px": "calc(2px - var(--wg-border-width, 0px))",
|
|
101
|
+
"4px": "calc(4px - var(--wg-border-width, 0px))",
|
|
102
|
+
"6px": "calc(6px - var(--wg-border-width, 0px))",
|
|
103
|
+
"8px": "calc(8px - var(--wg-border-width, 0px))",
|
|
104
|
+
"12px": "calc(12px - var(--wg-border-width, 0px))",
|
|
105
|
+
"14px": "14px",
|
|
106
|
+
"16px": "calc(16px - var(--wg-border-width, 0px))",
|
|
107
|
+
},
|
|
108
|
+
outlineOffset: {
|
|
109
|
+
3: "3px",
|
|
110
|
+
},
|
|
111
|
+
textUnderlineOffset: {
|
|
112
|
+
3: "3px",
|
|
113
|
+
},
|
|
114
|
+
boxShadow: {
|
|
115
|
+
...shadows_1.boxShadows,
|
|
116
|
+
},
|
|
117
|
+
fontSize: {
|
|
118
|
+
...font_sizes_1.fontSizes,
|
|
119
|
+
},
|
|
120
|
+
...animations_1.animations
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
exports.mobaseTW = mobaseTW;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.boxShadows = void 0;
|
|
4
|
+
exports.boxShadows = {
|
|
5
|
+
xs: "0 1px 2px 0 rgba(18, 18, 23, 0.05)",
|
|
6
|
+
sm: "0 1px 3px 0 rgba(18, 18, 23, 0.1), 0 1px 2px 0 rgba(18, 18, 23, 0.06)",
|
|
7
|
+
md: "0px 2px 4px -1px rgba(18, 18, 23, 0.06), 0px 4px 6px -1px rgba(18, 18, 23, 0.08)",
|
|
8
|
+
lg: "0px 4px 6px -2px rgba(18, 18, 23, 0.05), 0px 10px 15px -3px rgba(18, 18, 23, 0.08)",
|
|
9
|
+
xl: "0px 10px 10px -5px rgba(18, 18, 23, 0.04), 0px 20px 25px -5px rgba(18, 18, 23, 0.10)",
|
|
10
|
+
"2xl": "0px 25px 50px -20px rgba(18, 18, 23, 0.25)",
|
|
11
|
+
overlay: "0px 2px 4px 0px rgba(18, 18, 23, 0.04), 0px 5px 8px 0px rgba(18, 18, 23, 0.04), 0px 10px 18px 0px rgba(18, 18, 23, 0.03), 0px 24px 48px 0px rgba(18, 18, 23, 0.03), 0px 0px 0px 1px rgba(18, 18, 23, 0.10)",
|
|
12
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
/**
|
|
5
|
+
* Custom utilities
|
|
6
|
+
*/
|
|
7
|
+
".leading-inherit": {
|
|
8
|
+
"line-height": "inherit",
|
|
9
|
+
},
|
|
10
|
+
".bg-img-inherit": {
|
|
11
|
+
"background-image": "inherit",
|
|
12
|
+
},
|
|
13
|
+
".bg-clip-inherit": {
|
|
14
|
+
"background-clip": "inherit",
|
|
15
|
+
},
|
|
16
|
+
".text-fill-inherit": {
|
|
17
|
+
"-webkit-text-fill-color": "inherit",
|
|
18
|
+
},
|
|
19
|
+
".tap-highlight-transparent": {
|
|
20
|
+
"-webkit-tap-highlight-color": "transparent",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.utilities = void 0;
|
|
7
|
+
const transition_1 = __importDefault(require("./transition"));
|
|
8
|
+
const custom_1 = __importDefault(require("./custom"));
|
|
9
|
+
const scrollbar_hide_1 = __importDefault(require("./scrollbar-hide"));
|
|
10
|
+
exports.utilities = {
|
|
11
|
+
...custom_1.default,
|
|
12
|
+
...transition_1.default,
|
|
13
|
+
...scrollbar_hide_1.default,
|
|
14
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Credits to: https://github.com/reslear/tailwind-scrollbar-hide/tree/main
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = {
|
|
7
|
+
/**
|
|
8
|
+
* Scroll Hide
|
|
9
|
+
*/
|
|
10
|
+
".scrollbar-hide": {
|
|
11
|
+
/* IE and Edge */
|
|
12
|
+
"-ms-overflow-style": "none",
|
|
13
|
+
/* Firefox */
|
|
14
|
+
"scrollbar-width": "none",
|
|
15
|
+
/* Safari and Chrome */
|
|
16
|
+
"&::-webkit-scrollbar": {
|
|
17
|
+
display: "none",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
".scrollbar-default": {
|
|
21
|
+
/* IE and Edge */
|
|
22
|
+
"-ms-overflow-style": "auto",
|
|
23
|
+
/* Firefox */
|
|
24
|
+
"scrollbar-width": "auto",
|
|
25
|
+
/* Safari and Chrome */
|
|
26
|
+
"&::-webkit-scrollbar": {
|
|
27
|
+
display: "block",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|