s-platform-landing-section 0.1.24 → 0.1.26

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/dist/index.js CHANGED
@@ -1097,17 +1097,17 @@ var Hero2 = function Hero2(props) {
1097
1097
  }, /*#__PURE__*/React__default.createElement("img", {
1098
1098
  src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
1099
1099
  alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
1100
- className: "w-full object-cover min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
1100
+ className: "w-full object-cover min-h-[22vh] md:min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
1101
1101
  }), /*#__PURE__*/React__default.createElement("div", {
1102
- className: "absolute flex flex-col gap-1 md:gap-4 absolute w-1/2 lg:w-[40%] top-2 sm:top-[20%] xl:top-1/4 right-[2%] lg:right-[15%]"
1102
+ className: "absolute flex flex-col gap-1 md:gap-4 absolute w-1/2 lg:w-[40%] top-6 sm:top-[20%] xl:top-1/4 right-[2%] lg:right-[15%]"
1103
1103
  }, /*#__PURE__*/React__default.createElement("img", {
1104
1104
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
1105
1105
  alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName,
1106
- className: "h-6 w-6 md:h-16 md:w-16 lg:h-20 lg:w-20"
1106
+ className: "h-5 w-5 sm:h-8 sm:w-8 md:h-16 md:w-16 lg:h-20 lg:w-20"
1107
1107
  }), /*#__PURE__*/React__default.createElement("div", {
1108
- className: "text-lg md:text-3xl lg:text-4xl font-medium"
1108
+ className: "text-base md:text-3xl lg:text-4xl font-medium"
1109
1109
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.title), /*#__PURE__*/React__default.createElement("div", {
1110
- className: "text-sm md:text-xl lg:text-2xl "
1110
+ className: "text-xs md:text-xl lg:text-2xl "
1111
1111
  }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.description)));
1112
1112
  };
1113
1113
 
@@ -1141,13 +1141,13 @@ var Hero6 = function Hero6(props) {
1141
1141
  }, /*#__PURE__*/React__default.createElement("img", {
1142
1142
  src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
1143
1143
  alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
1144
- className: "object-cover w-full h-auto min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
1144
+ className: "object-cover w-full h-auto min-h-[25vh] md:min-h-[30vh] md:min-h-[50vh] max-h-[100vh]"
1145
1145
  }), /*#__PURE__*/React__default.createElement("div", {
1146
- className: "absolute top-0 md:top-14 lg:top-20 w-full p-3 md:p-6 lg:p-12 z-10 flex flex-col gap-2 md:gap-4 lg:gap-6 items-center justify-center"
1146
+ className: "absolute top-0 sm:top-8 md:top-14 lg:top-20 w-full p-3 md:p-6 lg:p-12 z-10 flex flex-col gap-2 md:gap-4 lg:gap-6 items-center justify-center"
1147
1147
  }, /*#__PURE__*/React__default.createElement("div", {
1148
- className: "text-primary text-xl md:text-3xl lg:text-5xl leading-[1.6] md:leading-[1.6] text-center font-headingFont"
1148
+ className: "text-primary line-clamp-1 text-xl md:text-3xl lg:text-5xl leading-[1.6] md:leading-[1.6] text-center font-headingFont"
1149
1149
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.title), /*#__PURE__*/React__default.createElement("div", {
1150
- className: "md:text-xl"
1150
+ className: "md:text-xl text-center line-clamp-2"
1151
1151
  }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.description), sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$buttons = _sectionData$.buttons) === null || _sectionData$$buttons === void 0 ? void 0 : _sectionData$$buttons.map(function (button) {
1152
1152
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
1153
1153
  Link: Link,
@@ -8508,7 +8508,7 @@ var Select = React.forwardRef(function (props, ref) {
8508
8508
  style: {
8509
8509
  background: "#FFFFFF"
8510
8510
  },
8511
- className: "overflow-y-auto max-h-72 absolute p-1 my-2 rounded-2xl w-full z-50 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
8511
+ className: "overflow-y-auto max-h-72 absolute p-1 my-2 rounded-2xl w-full z-40 border " + (dropdownPosition === 'top' ? 'bottom-full mb-2' : 'top-full mt-2') + " " + optionClassName
8512
8512
  }, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
8513
8513
  className: "px-3 flex items-center border-b-[1px]"
8514
8514
  }, /*#__PURE__*/React__default.createElement(lu.LuSearch, {
@@ -8702,10 +8702,11 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
8702
8702
  return _setValue(text);
8703
8703
  },
8704
8704
  getValue: function getValue() {
8705
+ var cleanedValue = value === null || value === void 0 ? void 0 : value.replace(/\s+/g, '');
8705
8706
  if (!(value !== null && value !== void 0 && value.startsWith(countryCode === null || countryCode === void 0 ? void 0 : countryCode.value))) {
8706
- return (countryCode === null || countryCode === void 0 ? void 0 : countryCode.value) + (value === null || value === void 0 ? void 0 : value.replace(/^0/, ''));
8707
+ return (countryCode === null || countryCode === void 0 ? void 0 : countryCode.value) + (cleanedValue === null || cleanedValue === void 0 ? void 0 : cleanedValue.replace(/^0/, ''));
8707
8708
  }
8708
- return value;
8709
+ return cleanedValue;
8709
8710
  },
8710
8711
  setError: function setError(err) {
8711
8712
  return _setError(err);
@@ -8721,7 +8722,7 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
8721
8722
  _setError(e === null || e === void 0 ? void 0 : e.message);
8722
8723
  count++;
8723
8724
  break;
8724
- } else if (value && (e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value))) {
8725
+ } else if (value && (e === null || e === void 0 ? void 0 : e.type) === 'pattern' && !(e !== null && e !== void 0 && (_e$pattern = e.pattern) !== null && _e$pattern !== void 0 && _e$pattern.test(value === null || value === void 0 ? void 0 : value.replace(/\s+/g, '')))) {
8725
8726
  _setError(e === null || e === void 0 ? void 0 : e.message);
8726
8727
  count++;
8727
8728
  break;
@@ -8757,7 +8758,7 @@ var InputPhoneNumber = React.forwardRef(function (props, ref) {
8757
8758
  optionClassName: "w-max",
8758
8759
  placeholder: "+84",
8759
8760
  onClick: setCountryCode,
8760
- selectClassName: "h-full !rounded-none py-[7px] ps-2 pr-1",
8761
+ selectClassName: "h-full !rounded-none py-[6px] ps-2 pr-1",
8761
8762
  renderItem: function renderItem(item) {
8762
8763
  return /*#__PURE__*/React__default.createElement("div", {
8763
8764
  className: "flex gap-3 items-center w-full"
@@ -14192,6 +14193,32 @@ var News1 = function News1(props) {
14192
14193
  return /*#__PURE__*/React__default.createElement("div", {
14193
14194
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
14194
14195
  }, /*#__PURE__*/React__default.createElement("div", {
14196
+ className: "block md:hidden"
14197
+ }, /*#__PURE__*/React__default.createElement("div", {
14198
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center ",
14199
+ onClick: function onClick() {
14200
+ setParams({
14201
+ page: 0,
14202
+ sort: "timeUpdate,DESC",
14203
+ size: 10
14204
+ });
14205
+ }
14206
+ }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
14207
+ className: "rounded-b-lg bg-bgSecondary"
14208
+ }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
14209
+ return /*#__PURE__*/React__default.createElement("div", {
14210
+ className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
14211
+ key: "sdjfdh-" + index,
14212
+ onClick: function onClick() {
14213
+ setCategorySelected(item);
14214
+ setParams(function (prev) {
14215
+ return _extends({}, prev, {
14216
+ catId: item === null || item === void 0 ? void 0 : item.catId
14217
+ });
14218
+ });
14219
+ }
14220
+ }, item === null || item === void 0 ? void 0 : item.catName);
14221
+ }))), /*#__PURE__*/React__default.createElement("div", {
14195
14222
  className: "md:col-span-2 flex flex-col gap-8"
14196
14223
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
14197
14224
  className: "px-6 py-3 text-textButton text-lg rounded-t-lg bg-primary w-max"
@@ -14231,7 +14258,7 @@ var News1 = function News1(props) {
14231
14258
  onClick: handleSeeMoreNews,
14232
14259
  className: "w-max mx-auto"
14233
14260
  }) : null)), /*#__PURE__*/React__default.createElement("div", {
14234
- className: "sticky top-20 self-start"
14261
+ className: "sticky top-20 self-start md:block hidden"
14235
14262
  }, /*#__PURE__*/React__default.createElement("div", {
14236
14263
  className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center ",
14237
14264
  onClick: function onClick() {
@@ -14343,6 +14370,20 @@ var NewsDetail1 = function NewsDetail1(props) {
14343
14370
  __html: article === null || article === void 0 ? void 0 : article.content
14344
14371
  }
14345
14372
  }), /*#__PURE__*/React__default.createElement("div", {
14373
+ className: "top-6 block md:hidden"
14374
+ }, /*#__PURE__*/React__default.createElement("div", {
14375
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
14376
+ }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
14377
+ className: "rounded-b-lg bg-bgSecondary"
14378
+ }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
14379
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
14380
+ href: getLinkNewsByCategory(item),
14381
+ Link: Link
14382
+ }, /*#__PURE__*/React__default.createElement("div", {
14383
+ className: "px-6 py-3 hover:bg-gray-100 hover:text-primary cursor-pointer",
14384
+ key: "sdjfdh-" + index
14385
+ }, item === null || item === void 0 ? void 0 : item.catName));
14386
+ }))), /*#__PURE__*/React__default.createElement("div", {
14346
14387
  className: "mt-6"
14347
14388
  }, /*#__PURE__*/React__default.createElement("div", {
14348
14389
  className: "font-medium text-2xl mb-4"
@@ -14365,7 +14406,7 @@ var NewsDetail1 = function NewsDetail1(props) {
14365
14406
  onClick: handleSeeMore,
14366
14407
  shopConfigStyle: shopConfigStyle
14367
14408
  })) : null)), /*#__PURE__*/React__default.createElement("div", {
14368
- className: "sticky top-20 self-start"
14409
+ className: "sticky top-20 self-start hidden md:block"
14369
14410
  }, /*#__PURE__*/React__default.createElement("div", {
14370
14411
  className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
14371
14412
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {