@momo-webplatform/mobase 0.0.15 → 0.0.17

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 (79) hide show
  1. package/package.json +8 -2
  2. package/publish/cjs/components/TextArea/TextArea.js +6 -6
  3. package/publish/cjs/components/TextInput/TextInput.js +6 -6
  4. package/publish/cjs/components/Tooltip/Tooltip.js +3 -1
  5. package/publish/cjs/index.js +1 -0
  6. package/publish/cjs/mobase-tw-plugin/foundation/animations/index.js +20 -0
  7. package/publish/cjs/mobase-tw-plugin/foundation/colors/blue.js +16 -0
  8. package/publish/cjs/mobase-tw-plugin/foundation/colors/common.js +23 -0
  9. package/publish/cjs/mobase-tw-plugin/foundation/colors/gray.js +16 -0
  10. package/publish/cjs/mobase-tw-plugin/foundation/colors/green.js +16 -0
  11. package/publish/cjs/mobase-tw-plugin/foundation/colors/index.js +9 -0
  12. package/publish/cjs/mobase-tw-plugin/foundation/colors/orange.js +16 -0
  13. package/publish/cjs/mobase-tw-plugin/foundation/colors/pink.js +16 -0
  14. package/publish/cjs/mobase-tw-plugin/foundation/colors/purple.js +16 -0
  15. package/publish/cjs/mobase-tw-plugin/foundation/colors/red.js +16 -0
  16. package/publish/cjs/mobase-tw-plugin/foundation/colors/yellow.js +16 -0
  17. package/publish/cjs/mobase-tw-plugin/foundation/font-sizes/index.js +94 -0
  18. package/publish/cjs/mobase-tw-plugin/foundation/index.js +20 -0
  19. package/publish/cjs/mobase-tw-plugin/foundation/shadows/index.js +12 -0
  20. package/publish/cjs/mobase-tw-plugin/index.js +5 -0
  21. package/publish/cjs/mobase-tw-plugin/plugin.js +84 -0
  22. package/publish/cjs/mobase-tw-plugin/utilities/custom.js +22 -0
  23. package/publish/cjs/mobase-tw-plugin/utilities/index.js +14 -0
  24. package/publish/cjs/mobase-tw-plugin/utilities/scrollbar-hide.js +30 -0
  25. package/publish/cjs/mobase-tw-plugin/utilities/transition.js +88 -0
  26. package/publish/cjs/mobase-tw-plugin/utils/index.js +17 -0
  27. package/publish/cjs/mobase-tw-plugin/utils/object.js +34 -0
  28. package/publish/cjs/tsconfig.lib.tsbuildinfo +1 -1
  29. package/publish/esm/components/TextArea/TextArea.js +6 -6
  30. package/publish/esm/components/TextInput/TextInput.js +6 -6
  31. package/publish/esm/components/Tooltip/Tooltip.d.ts +1 -1
  32. package/publish/esm/components/Tooltip/Tooltip.js +4 -2
  33. package/publish/esm/index.d.ts +1 -0
  34. package/publish/esm/index.js +1 -0
  35. package/publish/esm/mobase-tw-plugin/foundation/animations/index.d.ts +25 -0
  36. package/publish/esm/mobase-tw-plugin/foundation/animations/index.js +17 -0
  37. package/publish/esm/mobase-tw-plugin/foundation/colors/blue.d.ts +13 -0
  38. package/publish/esm/mobase-tw-plugin/foundation/colors/blue.js +13 -0
  39. package/publish/esm/mobase-tw-plugin/foundation/colors/common.d.ts +109 -0
  40. package/publish/esm/mobase-tw-plugin/foundation/colors/common.js +20 -0
  41. package/publish/esm/mobase-tw-plugin/foundation/colors/gray.d.ts +13 -0
  42. package/publish/esm/mobase-tw-plugin/foundation/colors/gray.js +13 -0
  43. package/publish/esm/mobase-tw-plugin/foundation/colors/green.d.ts +13 -0
  44. package/publish/esm/mobase-tw-plugin/foundation/colors/green.js +13 -0
  45. package/publish/esm/mobase-tw-plugin/foundation/colors/index.d.ts +110 -0
  46. package/publish/esm/mobase-tw-plugin/foundation/colors/index.js +5 -0
  47. package/publish/esm/mobase-tw-plugin/foundation/colors/orange.d.ts +13 -0
  48. package/publish/esm/mobase-tw-plugin/foundation/colors/orange.js +13 -0
  49. package/publish/esm/mobase-tw-plugin/foundation/colors/pink.d.ts +13 -0
  50. package/publish/esm/mobase-tw-plugin/foundation/colors/pink.js +13 -0
  51. package/publish/esm/mobase-tw-plugin/foundation/colors/purple.d.ts +13 -0
  52. package/publish/esm/mobase-tw-plugin/foundation/colors/purple.js +13 -0
  53. package/publish/esm/mobase-tw-plugin/foundation/colors/red.d.ts +13 -0
  54. package/publish/esm/mobase-tw-plugin/foundation/colors/red.js +13 -0
  55. package/publish/esm/mobase-tw-plugin/foundation/colors/yellow.d.ts +13 -0
  56. package/publish/esm/mobase-tw-plugin/foundation/colors/yellow.js +13 -0
  57. package/publish/esm/mobase-tw-plugin/foundation/font-sizes/index.d.ts +59 -0
  58. package/publish/esm/mobase-tw-plugin/foundation/font-sizes/index.js +91 -0
  59. package/publish/esm/mobase-tw-plugin/foundation/index.d.ts +4 -0
  60. package/publish/esm/mobase-tw-plugin/foundation/index.js +4 -0
  61. package/publish/esm/mobase-tw-plugin/foundation/shadows/index.d.ts +10 -0
  62. package/publish/esm/mobase-tw-plugin/foundation/shadows/index.js +9 -0
  63. package/publish/esm/mobase-tw-plugin/index.d.ts +1 -0
  64. package/publish/esm/mobase-tw-plugin/index.js +1 -0
  65. package/publish/esm/mobase-tw-plugin/plugin.d.ts +10 -0
  66. package/publish/esm/mobase-tw-plugin/plugin.js +77 -0
  67. package/publish/esm/mobase-tw-plugin/utilities/custom.d.ts +21 -0
  68. package/publish/esm/mobase-tw-plugin/utilities/custom.js +20 -0
  69. package/publish/esm/mobase-tw-plugin/utilities/index.d.ts +111 -0
  70. package/publish/esm/mobase-tw-plugin/utilities/index.js +8 -0
  71. package/publish/esm/mobase-tw-plugin/utilities/scrollbar-hide.d.ts +23 -0
  72. package/publish/esm/mobase-tw-plugin/utilities/scrollbar-hide.js +28 -0
  73. package/publish/esm/mobase-tw-plugin/utilities/transition.d.ts +86 -0
  74. package/publish/esm/mobase-tw-plugin/utilities/transition.js +86 -0
  75. package/publish/esm/mobase-tw-plugin/utils/index.d.ts +1 -0
  76. package/publish/esm/mobase-tw-plugin/utils/index.js +1 -0
  77. package/publish/esm/mobase-tw-plugin/utils/object.d.ts +25 -0
  78. package/publish/esm/mobase-tw-plugin/utils/object.js +29 -0
  79. 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.15",
3
+ "version": "0.0.17",
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,22 @@
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": "^3.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.foreach": "^4.5.0",
80
+ "lodash.omit": "^4.5.0",
75
81
  "lucide-react": "^0.307.0",
76
82
  "next": "^13.0.0",
77
83
  "nextra": "^2.13.2",
@@ -84,7 +90,7 @@
84
90
  "react-icons": "^4.11.0",
85
91
  "react-indiana-drag-scroll": "^2.2.0",
86
92
  "tailwind-merge": "^2.2.0",
87
- "tailwindcss": "^3.4.0",
93
+ "tailwindcss": "^3.4.3",
88
94
  "tailwindcss-animate": "^1.0.7",
89
95
  "vaul": "^0.8.0"
90
96
  },
@@ -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-500) inset;
12
+ box-shadow: 0px 0px 0px 1px rgb(var(--gray-400) / 1) inset;
13
13
  }
14
14
 
15
15
  .mobase-text-area-box:focus {
16
- box-shadow: 0px 0px 0px 1px rgb(235, 47, 150) inset;
16
+ box-shadow: 0px 0px 0px 1px rgb(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: #f74e57;
25
+ color: rgb(var(--red-500) / 1);
26
26
  }
27
27
 
28
28
  .mobase-text-area-box {
29
- box-shadow: 0px 0px 0px 1px #f74e57 inset;
30
- border-color: #f74e57;
29
+ box-shadow: 0px 0px 0px 1px hsl(var(--red-500) / 1) inset;
30
+ border-color: rgb(var(--red-500) / 1);
31
31
  }
32
32
 
33
33
  .mobase-text-area-message span {
34
- color: #f74e57;
34
+ color: rgb(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-500) inset;
44
+ box-shadow: 0px 0px 0px 1px rgb(var(--gray-400) / 1) inset;
45
45
  }
46
46
 
47
47
  .mobase-text-input-box:focus {
48
- box-shadow: 0px 0px 0px 1px rgb(235, 47, 150) inset;
48
+ box-shadow: 0px 0px 0px 1px rgb(var(--pink-500) / 1) inset;
49
49
  }
50
50
 
51
51
  .mobase-text-input-error {
52
52
  .mobase-text-input-label {
53
- color: #f74e57;
53
+ color: rgb(var(--red-500) / 1);
54
54
  }
55
55
 
56
56
  .mobase-text-input-box {
57
- box-shadow: 0px 0px 0px 1px #f74e57 inset;
58
- border-color: #f74e57;
57
+ box-shadow: 0px 0px 0px 1px rgb(var(--red-500) / 1) inset;
58
+ border-color: rgb(var(--red-500) / 1);
59
59
  }
60
60
 
61
61
  .mobase-text-input-message span {
62
- color: #f74e57;
62
+ color: rgb(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-base", type === "light" ? "bg-white text-gray-900 fill-white" : "bg-gray-800 fill-gray-800 text-white", className), ...props })));
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;
@@ -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,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./colors"), exports);
18
+ __exportStar(require("./font-sizes"), exports);
19
+ __exportStar(require("./shadows"), exports);
20
+ __exportStar(require("./animations"), exports);
@@ -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,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mobaseTW = void 0;
4
+ var plugin_1 = require("./plugin");
5
+ Object.defineProperty(exports, "mobaseTW", { enumerable: true, get: function () { return plugin_1.mobaseTW; } });
@@ -0,0 +1,84 @@
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 foundation_1 = require("./foundation");
21
+ const lodash_foreach_1 = __importDefault(require("lodash.foreach"));
22
+ const parsedColorsCache = {};
23
+ const resolveConfig = () => {
24
+ const resolved = {
25
+ utilities: {},
26
+ colors: {},
27
+ };
28
+ const flatColors = (0, utils_1.flattenThemeObject)(foundation_1.colors);
29
+ const cssSelector = ":root";
30
+ resolved.utilities[cssSelector] = {};
31
+ (0, lodash_foreach_1.default)(flatColors, (colorValue, colorName) => {
32
+ if (!colorValue)
33
+ return;
34
+ try {
35
+ const parsedColor = parsedColorsCache[colorValue] ||
36
+ (0, color_1.default)(colorValue).rgb().round().array();
37
+ parsedColorsCache[colorValue] = parsedColor;
38
+ const [r, g, b] = parsedColor;
39
+ const colorVar = `--${colorName}`;
40
+ // Set the css variable in "@layer utilities"
41
+ resolved.utilities[cssSelector][colorVar] = `${r} ${g} ${b}`;
42
+ resolved.colors[colorName] = `rgb(var(${colorVar}) / <alpha-value>)`;
43
+ }
44
+ catch (error) {
45
+ // eslint-disable-next-line no-console
46
+ console.log("error", error?.message);
47
+ }
48
+ });
49
+ return resolved;
50
+ };
51
+ const mobaseTW = () => {
52
+ const resolved = resolveConfig();
53
+ return (0, plugin_js_1.default)(({ addBase, addUtilities }) => {
54
+ addBase({
55
+ ":root": {
56
+ "font-smooth--webkit": "antialiased",
57
+ },
58
+ ...resolved?.utilities, // Xem lai cho nay, addBase
59
+ });
60
+ addUtilities({
61
+ // ...resolved?.utilities, //Xem lai cho nay, addBase
62
+ ...utilities_1.utilities,
63
+ });
64
+ },
65
+ // Extend the Tailwind config
66
+ {
67
+ theme: {
68
+ extend: {
69
+ colors: {
70
+ ...foundation_1.colors,
71
+ ...resolved?.colors,
72
+ },
73
+ boxShadow: {
74
+ ...foundation_1.boxShadows,
75
+ },
76
+ fontSize: {
77
+ ...foundation_1.fontSizes,
78
+ },
79
+ ...foundation_1.animations,
80
+ },
81
+ },
82
+ });
83
+ };
84
+ exports.mobaseTW = mobaseTW;
@@ -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
+ };