@momo-webplatform/mobase 0.0.25 → 0.0.27

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 (67) hide show
  1. package/package.json +4 -2
  2. package/publish/cjs/components/Card/Card.js +47 -0
  3. package/publish/cjs/components/Card/index.js +10 -0
  4. package/publish/cjs/components/Dialog/Dialog.js +64 -0
  5. package/publish/cjs/components/Dialog/index.js +15 -0
  6. package/publish/cjs/components/Footer/Footer.js +15 -0
  7. package/publish/cjs/components/Footer/FooterContent.js +27 -0
  8. package/publish/cjs/components/Footer/index.js +5 -0
  9. package/publish/cjs/components/Header/Header.js +19 -0
  10. package/publish/cjs/components/Header/ListItem.js +12 -0
  11. package/publish/cjs/components/Header/ListItemMobile.js +15 -0
  12. package/publish/cjs/components/Header/MobileMenu.js +61 -0
  13. package/publish/cjs/components/Header/NavItems.js +26 -0
  14. package/publish/cjs/components/Header/NavItemsMobile.js +35 -0
  15. package/publish/cjs/components/Header/index.js +5 -0
  16. package/publish/cjs/components/NavigationMenu/NavigationMenu.js +1 -1
  17. package/publish/cjs/components/Select/Select.js +7 -22
  18. package/publish/cjs/components/Toast/toaster.js +1 -1
  19. package/publish/cjs/helpers/animations.js +18 -0
  20. package/publish/cjs/helpers/constants.js +204 -0
  21. package/publish/cjs/helpers/utils.js +15 -1
  22. package/publish/cjs/index.js +4 -0
  23. package/publish/cjs/mobase-tw-plugin/plugin.js +54 -1
  24. package/publish/cjs/tsconfig.lib.tsbuildinfo +1 -1
  25. package/publish/esm/components/Badge/Badge.d.ts +1 -0
  26. package/publish/esm/components/Breadcrumb/Breadcrumb.d.ts +1 -0
  27. package/publish/esm/components/Card/Card.d.ts +9 -0
  28. package/publish/esm/components/Card/Card.js +16 -0
  29. package/publish/esm/components/Card/index.d.ts +1 -0
  30. package/publish/esm/components/Card/index.js +1 -0
  31. package/publish/esm/components/Dialog/Dialog.d.ts +47 -0
  32. package/publish/esm/components/Dialog/Dialog.js +28 -0
  33. package/publish/esm/components/Dialog/index.d.ts +1 -0
  34. package/publish/esm/components/Dialog/index.js +1 -0
  35. package/publish/esm/components/Footer/Footer.d.ts +22 -0
  36. package/publish/esm/components/Footer/Footer.js +9 -0
  37. package/publish/esm/components/Footer/FooterContent.d.ts +4 -0
  38. package/publish/esm/components/Footer/FooterContent.js +27 -0
  39. package/publish/esm/components/Footer/index.d.ts +1 -0
  40. package/publish/esm/components/Footer/index.js +1 -0
  41. package/publish/esm/components/Header/Header.d.ts +44 -0
  42. package/publish/esm/components/Header/Header.js +13 -0
  43. package/publish/esm/components/Header/ListItem.d.ts +9 -0
  44. package/publish/esm/components/Header/ListItem.js +10 -0
  45. package/publish/esm/components/Header/ListItemMobile.d.ts +9 -0
  46. package/publish/esm/components/Header/ListItemMobile.js +10 -0
  47. package/publish/esm/components/Header/MobileMenu.d.ts +6 -0
  48. package/publish/esm/components/Header/MobileMenu.js +56 -0
  49. package/publish/esm/components/Header/NavItems.d.ts +2 -0
  50. package/publish/esm/components/Header/NavItems.js +21 -0
  51. package/publish/esm/components/Header/NavItemsMobile.d.ts +2 -0
  52. package/publish/esm/components/Header/NavItemsMobile.js +30 -0
  53. package/publish/esm/components/Header/index.d.ts +1 -0
  54. package/publish/esm/components/Header/index.js +1 -0
  55. package/publish/esm/components/NavigationMenu/NavigationMenu.js +1 -1
  56. package/publish/esm/components/Select/Select.js +7 -22
  57. package/publish/esm/components/Toast/toaster.js +1 -1
  58. package/publish/esm/helpers/animations.d.ts +26 -0
  59. package/publish/esm/helpers/animations.js +14 -0
  60. package/publish/esm/helpers/constants.d.ts +69 -0
  61. package/publish/esm/helpers/constants.js +201 -0
  62. package/publish/esm/helpers/utils.d.ts +6 -0
  63. package/publish/esm/helpers/utils.js +13 -0
  64. package/publish/esm/index.d.ts +4 -0
  65. package/publish/esm/index.js +4 -0
  66. package/publish/esm/mobase-tw-plugin/plugin.js +54 -1
  67. package/publish/esm/tsconfig.lib.tsbuildinfo +1 -1
@@ -0,0 +1,204 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FROM_TYPE_FOOTER_MENU = exports.MOMO_TEXT = exports.SERVICES_PAGE = exports.SERVICES_DEFAULT = exports.APP_DOWNLOAD = exports.SOCIAL_ITEMS = exports.LIST_LINK = exports.SUPPORT = exports.NEXT_PUBLIC_REACT_APP_FRONT_END = exports.MoMoText = exports.FooterItemsDefault = void 0;
4
+ exports.FooterItemsDefault = {
5
+ heading: "Về chúng tôi",
6
+ lists: [
7
+ {
8
+ title: "Giới thiệu",
9
+ url: "/sieu-ung-dung-momo",
10
+ newTab: false,
11
+ },
12
+ {
13
+ title: "An toàn - Bảo mật",
14
+ url: "/an-toan-bao-mat",
15
+ newTab: false,
16
+ },
17
+ {
18
+ title: "Điều khoản điều lệ",
19
+ url: "/dieu-khoan-dieu-le",
20
+ newTab: false,
21
+ },
22
+ {
23
+ title: "Chính sách quyền riêng tư",
24
+ url: "/chinh-sach-quyen-rieng-tu",
25
+ newTab: false,
26
+ },
27
+ {
28
+ title: "Điều khoản liên kết Google trên ứng dụng MoMo",
29
+ url: "/google-cloud-policy",
30
+ newTab: false,
31
+ },
32
+ {
33
+ title: "Blog",
34
+ url: "/blog",
35
+ newTab: false,
36
+ },
37
+ {
38
+ title: "Liên hệ",
39
+ url: "/lienhe",
40
+ newTab: false,
41
+ },
42
+ {
43
+ title: "Hỏi đáp",
44
+ url: "/hoi-dap",
45
+ newTab: false,
46
+ }
47
+ ]
48
+ };
49
+ exports.MoMoText = {
50
+ Business: {
51
+ Phome: "1900636652",
52
+ Phome_Format: "1900 636 652 (Phí 1.000đ/phút)",
53
+ Email: "merchant.care@momo.vn",
54
+ },
55
+ Support: {
56
+ Hotline: "1900545441",
57
+ Hotline_Format: "1900 5454 41",
58
+ Phone_Ext_1: "02873065555",
59
+ Phone_Ext_1_Format: "028.7306.5555",
60
+ Phone_Ext_2: "02899995555",
61
+ Phone_Ext_2_Format: "028.9999.5555",
62
+ Email: "hotro@momo.vn",
63
+ },
64
+ };
65
+ exports.NEXT_PUBLIC_REACT_APP_FRONT_END = "https://momo.vn/";
66
+ exports.SUPPORT = {
67
+ Address: "Lầu 6, Toà nhà Phú Mỹ Hưng, số 8 Hoàng Văn Thái, khu phố 1, Phường Tân Phú, Quận 7, Thành phố Hồ Chí Minh",
68
+ };
69
+ exports.LIST_LINK = [
70
+ { Name: "Giới thiệu", Href: "/sieu-ung-dung-momo" },
71
+ { Name: "An toàn - Bảo mật", Href: "/an-toan-bao-mat" },
72
+ { Name: "Điều khoản điều lệ", Href: "/dieu-khoan-dieu-le" },
73
+ {
74
+ Name: "Chính sách quyền riêng tư",
75
+ Href: "/chinh-sach-quyen-rieng-tu",
76
+ },
77
+ {
78
+ Name: "Điều khoản liên kết Google trên ứng dụng MoMo",
79
+ Href: "/google-cloud-policy",
80
+ },
81
+ { Name: "Blog", Href: "/blog" },
82
+ { Name: "Liên hệ", Href: "/lienhe" },
83
+ { Name: "Hỏi đáp", Href: "/hoi-dap" },
84
+ ];
85
+ exports.SOCIAL_ITEMS = [
86
+ {
87
+ Name: "Facebook",
88
+ Image: "https://homepage.momocdn.net/styles/desktop/images/social/facebook.svg",
89
+ Link: "https://www.facebook.com/vimomo",
90
+ },
91
+ {
92
+ Name: "Linkedin",
93
+ Image: "https://homepage.momocdn.net/styles/desktop/images/social/linkedin.svg",
94
+ Link: "https://www.linkedin.com/company/momo-mservice/",
95
+ },
96
+ {
97
+ Name: "Youtube",
98
+ Image: "https://homepage.momocdn.net/styles/desktop/images/social/youtube.svg",
99
+ Link: "https://www.youtube.com/channel/UCKHHW-qL2JoZqcSNm1jPlqw",
100
+ },
101
+ ];
102
+ exports.APP_DOWNLOAD = [
103
+ {
104
+ Name: "App Store",
105
+ Image: "https://homepage.momocdn.net/img/momo-upload-api-210724113855-637627235353131497.jpg",
106
+ Link: "https://itunes.apple.com/vn/app/id918751511?utm_source=website-momo&utm_medium=download&utm_campaign=momo-1dong",
107
+ },
108
+ {
109
+ Name: "Google Play",
110
+ Image: "https://homepage.momocdn.net/img/momo-upload-api-210724113959-637627235994410679.jpg",
111
+ Link: "https://play.google.com/store/apps/details?id=com.mservice.momotransfer&utm_source=website-momo&utm_medium=download&utm_campaign=momo-1dong",
112
+ },
113
+ ];
114
+ exports.SERVICES_DEFAULT = [
115
+ {
116
+ Name: "Vé xem phim",
117
+ Href: "/cinema",
118
+ Image: "https://homepage.momocdn.net/fileuploads/svg/momo-file-230629144722.svg",
119
+ },
120
+ {
121
+ Name: "Bảo hiểm Ô tô",
122
+ Href: "/bao-hiem-o-to/vat-chat",
123
+ Image: "https://homepage.momocdn.net/fileuploads/svg/momo-file-230629144844.svg",
124
+ },
125
+ {
126
+ Name: "Vé máy bay",
127
+ Href: "/ve-may-bay",
128
+ Image: "https://homepage.momocdn.net/fileuploads/svg/momo-file-201210145350.svg",
129
+ },
130
+ {
131
+ Name: "Khách sạn",
132
+ Href: "/khach-san-theo-gio",
133
+ Image: "https://homepage.momocdn.net/fileuploads/svg/momo-file-210315154805.svg",
134
+ },
135
+ {
136
+ Name: "Ví nhân ái",
137
+ Href: "/vi-nhan-ai",
138
+ Image: "https://homepage.momocdn.net/img/momo-upload-api-231214222240-638381893608141712.png",
139
+ },
140
+ {
141
+ Name: "Túi thần tài",
142
+ Href: "/tui-than-tai",
143
+ Image: "https://homepage.momocdn.net/fileuploads/svg/momo-file-210716153611.svg",
144
+ },
145
+ {
146
+ Name: "Ví trả sau",
147
+ Href: "/vi-tra-sau",
148
+ Image: "https://homepage.momocdn.net/img/momo-upload-api-230629144414-638236466540028217.png",
149
+ },
150
+ {
151
+ Name: "Vay nhanh",
152
+ Href: "/vay-nhanh",
153
+ Image: "https://homepage.momocdn.net/img/momo-upload-api-230418101312-638174095928506551.png",
154
+ },
155
+ ];
156
+ exports.SERVICES_PAGE = [
157
+ {
158
+ Name: "Vé xem phim",
159
+ Href: "/cinema",
160
+ Image: "https://homepage.momocdn.net/fileuploads/svg/momo-file-230629144722.svg",
161
+ },
162
+ {
163
+ Name: "Bảo hiểm Ô tô",
164
+ Href: "/bao-hiem-o-to/vat-chat",
165
+ Image: "https://homepage.momocdn.net/fileuploads/svg/momo-file-230629144844.svg",
166
+ },
167
+ {
168
+ Name: "Vé máy bay",
169
+ Href: "/ve-may-bay",
170
+ Image: "https://homepage.momocdn.net/fileuploads/svg/momo-file-201210145350.svg",
171
+ },
172
+ {
173
+ Name: "Khách sạn",
174
+ Href: "/khach-san-theo-gio",
175
+ Image: "https://homepage.momocdn.net/fileuploads/svg/momo-file-210315154805.svg",
176
+ },
177
+ {
178
+ Name: "Ví nhân ái",
179
+ Href: "/vi-nhan-ai",
180
+ Image: "https://homepage.momocdn.net/img/momo-upload-api-231214222240-638381893608141712.png",
181
+ },
182
+ {
183
+ Name: "Vay nhanh",
184
+ Href: "/vay-nhanh",
185
+ Image: "https://homepage.momocdn.net/img/momo-upload-api-230418101312-638174095928506551.png",
186
+ },
187
+ ];
188
+ exports.MOMO_TEXT = {
189
+ Business: {
190
+ Phome: "1900636652",
191
+ Phome_Format: "1900 636 652 (Phí 1.000đ/phút)",
192
+ Email: "merchant.care@momo.vn",
193
+ },
194
+ Support: {
195
+ Hotline: "1900545441",
196
+ Hotline_Format: "1900 5454 41",
197
+ Phone_Ext_1: "02873065555",
198
+ Phone_Ext_1_Format: "028.7306.5555",
199
+ Phone_Ext_2: "02899995555",
200
+ Phone_Ext_2_Format: "028.9999.5555",
201
+ Email: "hotro@momo.vn",
202
+ },
203
+ };
204
+ exports.FROM_TYPE_FOOTER_MENU = "nav_footer";
@@ -1,9 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cn = void 0;
3
+ exports.addQueryToLink = exports.cn = void 0;
4
4
  const clsx_1 = require("clsx");
5
5
  const tailwind_merge_1 = require("tailwind-merge");
6
+ const constants_1 = require("../helpers/constants");
6
7
  function cn(...inputs) {
7
8
  return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs));
8
9
  }
9
10
  exports.cn = cn;
11
+ const addQueryToLink = ({ link, query = {} }) => {
12
+ if (!link)
13
+ return "";
14
+ const url = new URL(link, constants_1.NEXT_PUBLIC_REACT_APP_FRONT_END || "");
15
+ const searchParams = new URLSearchParams(url.search);
16
+ Object.entries(query).forEach(([key, value]) => {
17
+ if (value)
18
+ searchParams.append(key, value);
19
+ });
20
+ url.search = searchParams.toString();
21
+ return url.toString();
22
+ };
23
+ exports.addQueryToLink = addQueryToLink;
@@ -18,6 +18,7 @@ __exportStar(require("./components/Accordion"), exports);
18
18
  __exportStar(require("./components/Breadcrumb"), exports);
19
19
  __exportStar(require("./components/Button"), exports);
20
20
  __exportStar(require("./components/Checkbox"), exports);
21
+ __exportStar(require("./components/Dialog"), exports);
21
22
  __exportStar(require("./components/AlertDialog"), exports);
22
23
  __exportStar(require("./components/IconButton"), exports);
23
24
  __exportStar(require("./components/Pagination"), exports);
@@ -30,4 +31,7 @@ __exportStar(require("./components/Select"), exports);
30
31
  __exportStar(require("./components/NavigationMenu"), exports);
31
32
  __exportStar(require("./components/Switch"), exports);
32
33
  __exportStar(require("./components/RadioGroup"), exports);
34
+ __exportStar(require("./components/Header"), exports);
35
+ __exportStar(require("./components/Footer"), exports);
36
+ __exportStar(require("./components/Card"), exports);
33
37
  __exportStar(require("./mobase-tw-plugin"), exports);
@@ -82,7 +82,20 @@ const resolveConfig = (prefix) => {
82
82
  const mobaseTW = () => {
83
83
  const prefix = "mobase";
84
84
  const resolved = resolveConfig(prefix);
85
- return (0, plugin_js_1.default)(({ addBase, addUtilities }) => {
85
+ return (0, plugin_js_1.default)(({ addBase, addUtilities, addComponents }) => {
86
+ addComponents({
87
+ ".wrapper": {
88
+ maxWidth: "72rem",
89
+ paddingLeft: "1.25rem",
90
+ paddingRight: "1.25rem",
91
+ marginLeft: "auto",
92
+ marginRight: "auto",
93
+ "@media (min-width: 768px)": {
94
+ paddingLeft: "2rem",
95
+ paddingRight: "2rem",
96
+ },
97
+ },
98
+ });
86
99
  addBase({
87
100
  ":root": {
88
101
  "font-smooth--webkit": "antialiased",
@@ -97,6 +110,37 @@ const mobaseTW = () => {
97
110
  // Extend the Tailwind config
98
111
  {
99
112
  theme: {
113
+ container: {
114
+ center: true,
115
+ },
116
+ screens: {
117
+ sm: "640px",
118
+ md: "768px",
119
+ lg: "1024px",
120
+ xl: "1280px",
121
+ "2xl": "1536px",
122
+ },
123
+ aspectRatio: {
124
+ auto: "auto",
125
+ square: "1 / 1",
126
+ video: "16 / 9",
127
+ 1: "1",
128
+ 2: "2",
129
+ 3: "3",
130
+ 4: "4",
131
+ 5: "5",
132
+ 6: "6",
133
+ 7: "7",
134
+ 8: "8",
135
+ 9: "9",
136
+ 10: "10",
137
+ 11: "11",
138
+ 12: "12",
139
+ 13: "13",
140
+ 14: "14",
141
+ 15: "15",
142
+ 16: "16",
143
+ },
100
144
  extend: {
101
145
  fontFamily: {
102
146
  sans: [
@@ -141,6 +185,15 @@ const mobaseTW = () => {
141
185
  ...(0, theme_1.createSpacingUnits)(prefix),
142
186
  },
143
187
  ...animations_1.animations,
188
+ keyframes: {
189
+ 'fade-in': {
190
+ '0%': { opacity: "0" },
191
+ '100%': { opacity: "1" },
192
+ },
193
+ },
194
+ animation: {
195
+ 'fade-in': 'fade-in 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both',
196
+ },
144
197
  },
145
198
  },
146
199
  });