s-platform-landing-section 0.1.10-alpha.10 → 0.1.10-alpha.12
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 +107 -52
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +109 -55
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { useState, useRef, useEffect, createElement, forwardRef, useImperativeHandle, memo
|
|
1
|
+
import React__default, { useState, useRef, useEffect, createElement, forwardRef, useImperativeHandle, memo } from 'react';
|
|
2
2
|
import { IoCartOutline, IoChevronDownOutline, IoInformationCircleOutline, IoLogOutOutline, IoLocationOutline, IoChevronBackOutline, IoChevronForwardOutline, IoCallOutline } from 'react-icons/io5';
|
|
3
3
|
import { FaUserCircle, FaPhone, FaChevronLeft, FaChevronRight, FaAngleUp, FaAngleDown, FaCheckCircle, FaArrowLeft, FaArrowRight as FaArrowRight$1, FaFacebookSquare, FaFacebookMessenger, FaFacebookF } from 'react-icons/fa';
|
|
4
4
|
import { FiMenu } from 'react-icons/fi';
|
|
@@ -6,7 +6,7 @@ import { RxCross2 } from 'react-icons/rx';
|
|
|
6
6
|
import { PiHandbagSimpleLight } from 'react-icons/pi';
|
|
7
7
|
import { CiSearch } from 'react-icons/ci';
|
|
8
8
|
import { BsFilterLeft, BsCurrencyDollar } from 'react-icons/bs';
|
|
9
|
-
import { FaMinus, FaPlus, FaArrowsRotate, FaStar, FaRegStarHalfStroke, FaRegStar } from 'react-icons/fa6';
|
|
9
|
+
import { FaMinus, FaRegEyeSlash, FaPlus, FaArrowsRotate, FaStar, FaRegStarHalfStroke, FaRegStar } from 'react-icons/fa6';
|
|
10
10
|
import { LuSearch } from 'react-icons/lu';
|
|
11
11
|
import { IoMdCheckmark, IoIosHeartEmpty } from 'react-icons/io';
|
|
12
12
|
import DatePicker from 'react-datepicker';
|
|
@@ -7347,13 +7347,18 @@ var Input = forwardRef(function (props, ref) {
|
|
|
7347
7347
|
_props$min = props.min,
|
|
7348
7348
|
min = _props$min === void 0 ? 0 : _props$min,
|
|
7349
7349
|
_props$max = props.max,
|
|
7350
|
-
max = _props$max === void 0 ? null : _props$max
|
|
7350
|
+
max = _props$max === void 0 ? null : _props$max,
|
|
7351
|
+
_props$isHidden = props.isHidden,
|
|
7352
|
+
isHidden = _props$isHidden === void 0 ? false : _props$isHidden;
|
|
7351
7353
|
var _useState = useState(defaultValue),
|
|
7352
7354
|
value = _useState[0],
|
|
7353
7355
|
_setValue = _useState[1];
|
|
7354
7356
|
var _useState2 = useState(""),
|
|
7355
7357
|
error = _useState2[0],
|
|
7356
7358
|
_setError = _useState2[1];
|
|
7359
|
+
var _useState3 = useState(type),
|
|
7360
|
+
typeInput = _useState3[0],
|
|
7361
|
+
setTypeInput = _useState3[1];
|
|
7357
7362
|
var refInput = useRef();
|
|
7358
7363
|
useImperativeHandle(ref, function () {
|
|
7359
7364
|
return {
|
|
@@ -7384,6 +7389,10 @@ var Input = forwardRef(function (props, ref) {
|
|
|
7384
7389
|
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
7385
7390
|
count++;
|
|
7386
7391
|
break;
|
|
7392
|
+
} else if ((e === null || e === void 0 ? void 0 : e.type) === "validate" && !(e !== null && e !== void 0 && e.validate)) {
|
|
7393
|
+
_setError(e === null || e === void 0 ? void 0 : e.message);
|
|
7394
|
+
count++;
|
|
7395
|
+
break;
|
|
7387
7396
|
}
|
|
7388
7397
|
}
|
|
7389
7398
|
if (count) {
|
|
@@ -7408,8 +7417,13 @@ var Input = forwardRef(function (props, ref) {
|
|
|
7408
7417
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
7409
7418
|
}
|
|
7410
7419
|
};
|
|
7420
|
+
var changeHidden = function changeHidden() {
|
|
7421
|
+
if (typeInput === "text") setTypeInput("password");else {
|
|
7422
|
+
setTypeInput("text");
|
|
7423
|
+
}
|
|
7424
|
+
};
|
|
7411
7425
|
var _className = "h-10 py-1 px-2 border border-stroke rounded " + className;
|
|
7412
|
-
var _inputClassName = (isQuantity ? "text-center w-12" : "") + "
|
|
7426
|
+
var _inputClassName = (isQuantity ? "text-center w-12" : "") + " focus:outline-none focus:ring-0 " + inputClassName;
|
|
7413
7427
|
var required = !!(rules !== null && rules !== void 0 && rules.find(function (e) {
|
|
7414
7428
|
return (e === null || e === void 0 ? void 0 : e.type) === "required";
|
|
7415
7429
|
}));
|
|
@@ -7427,7 +7441,7 @@ var Input = forwardRef(function (props, ref) {
|
|
|
7427
7441
|
return changeQuantity(-1);
|
|
7428
7442
|
}
|
|
7429
7443
|
}, /*#__PURE__*/React__default.createElement(FaMinus, null)) : null, /*#__PURE__*/React__default.createElement("input", {
|
|
7430
|
-
type:
|
|
7444
|
+
type: typeInput,
|
|
7431
7445
|
name: name,
|
|
7432
7446
|
value: value,
|
|
7433
7447
|
placeholder: placeholder,
|
|
@@ -7435,7 +7449,13 @@ var Input = forwardRef(function (props, ref) {
|
|
|
7435
7449
|
required: required,
|
|
7436
7450
|
className: _inputClassName,
|
|
7437
7451
|
ref: refInput
|
|
7438
|
-
}),
|
|
7452
|
+
}), isHidden ? /*#__PURE__*/React__default.createElement("button", {
|
|
7453
|
+
onClick: function onClick() {
|
|
7454
|
+
changeHidden();
|
|
7455
|
+
}
|
|
7456
|
+
}, /*#__PURE__*/React__default.createElement(FaRegEyeSlash, {
|
|
7457
|
+
className: "font-semibold"
|
|
7458
|
+
})) : null, isQuantity ? /*#__PURE__*/React__default.createElement("button", {
|
|
7439
7459
|
onClick: function onClick() {
|
|
7440
7460
|
return changeQuantity(1);
|
|
7441
7461
|
}
|
|
@@ -7453,14 +7473,18 @@ var Select = forwardRef(function (props, ref) {
|
|
|
7453
7473
|
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
7454
7474
|
_props$className = props.className,
|
|
7455
7475
|
className = _props$className === void 0 ? "" : _props$className,
|
|
7476
|
+
_props$optionClassNam = props.optionClassName,
|
|
7477
|
+
optionClassName = _props$optionClassNam === void 0 ? "" : _props$optionClassNam,
|
|
7478
|
+
_props$wrapClassName = props.wrapClassName,
|
|
7479
|
+
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
7480
|
+
_props$selectClassNam = props.selectClassName,
|
|
7481
|
+
selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
|
|
7456
7482
|
_props$rules = props.rules,
|
|
7457
7483
|
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
7458
7484
|
options = props.options,
|
|
7459
7485
|
_props$defaultValue = props.defaultValue,
|
|
7460
7486
|
defaultValue = _props$defaultValue === void 0 ? {} : _props$defaultValue,
|
|
7461
7487
|
handleSearchOption = props.handleSearchOption,
|
|
7462
|
-
_props$wrapClassName = props.wrapClassName,
|
|
7463
|
-
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
7464
7488
|
_props$isMulti = props.isMulti,
|
|
7465
7489
|
isMulti = _props$isMulti === void 0 ? false : _props$isMulti,
|
|
7466
7490
|
_props$onClick = props.onClick,
|
|
@@ -7470,7 +7494,8 @@ var Select = forwardRef(function (props, ref) {
|
|
|
7470
7494
|
_props$funcDelete = props.funcDelete,
|
|
7471
7495
|
funcDelete = _props$funcDelete === void 0 ? function () {} : _props$funcDelete,
|
|
7472
7496
|
_props$isSearch = props.isSearch,
|
|
7473
|
-
isSearch = _props$isSearch === void 0 ? true : _props$isSearch
|
|
7497
|
+
isSearch = _props$isSearch === void 0 ? true : _props$isSearch,
|
|
7498
|
+
renderItem = props.renderItem;
|
|
7474
7499
|
var _useState = useState(false),
|
|
7475
7500
|
isOpen = _useState[0],
|
|
7476
7501
|
setIsOpen = _useState[1];
|
|
@@ -7492,21 +7517,12 @@ var Select = forwardRef(function (props, ref) {
|
|
|
7492
7517
|
dropdownPosition = _useState6[0],
|
|
7493
7518
|
setDropdownPosition = _useState6[1];
|
|
7494
7519
|
var inputRef = useRef(null);
|
|
7495
|
-
useEffect(function () {
|
|
7496
|
-
if (isMulti) return;else {
|
|
7497
|
-
setIsOpen(false);
|
|
7498
|
-
setInputSearch("");
|
|
7499
|
-
setListOptions(options);
|
|
7500
|
-
}
|
|
7501
|
-
}, [value]);
|
|
7502
7520
|
useEffect(function () {
|
|
7503
7521
|
if (isMulti) setValue(defaultValue);
|
|
7504
7522
|
}, [defaultValue]);
|
|
7505
7523
|
useEffect(function () {
|
|
7506
7524
|
setListOptions(options);
|
|
7507
|
-
if (!isMulti)
|
|
7508
|
-
setValue({});
|
|
7509
|
-
}
|
|
7525
|
+
if (!isMulti) setValue(defaultValue);
|
|
7510
7526
|
}, [options]);
|
|
7511
7527
|
useEffect(function () {
|
|
7512
7528
|
var _inputRef$current;
|
|
@@ -7612,7 +7628,10 @@ var Select = forwardRef(function (props, ref) {
|
|
|
7612
7628
|
return (value === null || value === void 0 ? void 0 : value.value) == valueId;
|
|
7613
7629
|
};
|
|
7614
7630
|
var handleSelection = function handleSelection(item) {
|
|
7615
|
-
if (isMulti
|
|
7631
|
+
if (!isMulti) {
|
|
7632
|
+
setValue(item);
|
|
7633
|
+
setIsOpen(false);
|
|
7634
|
+
}
|
|
7616
7635
|
onClick === null || onClick === void 0 ? void 0 : onClick(item);
|
|
7617
7636
|
};
|
|
7618
7637
|
var handleDeleteSelection = function handleDeleteSelection(e, item) {
|
|
@@ -7628,21 +7647,24 @@ var Select = forwardRef(function (props, ref) {
|
|
|
7628
7647
|
}, " *") : null;
|
|
7629
7648
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7630
7649
|
ref: selectRef,
|
|
7631
|
-
className:
|
|
7650
|
+
className: "relative " + wrapClassName
|
|
7632
7651
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
7633
|
-
className:
|
|
7652
|
+
className: "mb-1 " + labelClassName
|
|
7634
7653
|
}, label, " ", labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
7635
|
-
className:
|
|
7654
|
+
className: "flex flex-col gap-2 rounded-lg w-full border " + className
|
|
7636
7655
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
7637
|
-
className: "w-full h-10 bg-transparent flex justify-between items-center px-3 py-2",
|
|
7656
|
+
className: "w-full h-10 bg-transparent flex justify-between items-center px-3 py-2 " + selectClassName,
|
|
7638
7657
|
onClick: handleToggleSelect
|
|
7639
7658
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7640
7659
|
className: "flex justify-between items-center w-full"
|
|
7641
7660
|
}, isEmpty(value) || isMulti ? /*#__PURE__*/React__default.createElement("div", {
|
|
7642
7661
|
className: "text-gray3 line-clamp-1"
|
|
7643
7662
|
}, placeholder) : /*#__PURE__*/React__default.createElement("div", {
|
|
7644
|
-
className: "
|
|
7645
|
-
|
|
7663
|
+
className: "w-full text-start pointer-events-none",
|
|
7664
|
+
dangerouslySetInnerHTML: {
|
|
7665
|
+
__html: value === null || value === void 0 ? void 0 : value.label
|
|
7666
|
+
}
|
|
7667
|
+
}), isButtonDelete && !isEmpty(value) ? /*#__PURE__*/React__default.createElement("div", {
|
|
7646
7668
|
onClick: function onClick(e) {
|
|
7647
7669
|
handleDeleteSelection(e, value);
|
|
7648
7670
|
}
|
|
@@ -7657,7 +7679,7 @@ var Select = forwardRef(function (props, ref) {
|
|
|
7657
7679
|
style: {
|
|
7658
7680
|
background: "#FFFFFF"
|
|
7659
7681
|
},
|
|
7660
|
-
className:
|
|
7682
|
+
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
|
|
7661
7683
|
}, /*#__PURE__*/React__default.createElement("div", null, isSearch ? /*#__PURE__*/React__default.createElement("div", {
|
|
7662
7684
|
className: "px-3 flex items-center border-b-[1px]"
|
|
7663
7685
|
}, /*#__PURE__*/React__default.createElement(LuSearch, {
|
|
@@ -7680,7 +7702,7 @@ var Select = forwardRef(function (props, ref) {
|
|
|
7680
7702
|
}
|
|
7681
7703
|
}, /*#__PURE__*/React__default.createElement(IoMdCheckmark, {
|
|
7682
7704
|
className: (checkSelection(item === null || item === void 0 ? void 0 : item.value) ? "" : 'invisible') + " inline me-2 w-4"
|
|
7683
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7705
|
+
}), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
|
|
7684
7706
|
className: " whitespace-nowrap line-clamp-1"
|
|
7685
7707
|
}, item === null || item === void 0 ? void 0 : item.label));
|
|
7686
7708
|
}) : /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -7696,6 +7718,8 @@ var DateTimePicker = forwardRef(function (props, ref) {
|
|
|
7696
7718
|
label = _props$label === void 0 ? "" : _props$label,
|
|
7697
7719
|
_props$className = props.className,
|
|
7698
7720
|
className = _props$className === void 0 ? "" : _props$className,
|
|
7721
|
+
_props$labelClassName = props.labelClassName,
|
|
7722
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
7699
7723
|
_props$defaultValue = props.defaultValue,
|
|
7700
7724
|
defaultValue = _props$defaultValue === void 0 ? new Date() : _props$defaultValue,
|
|
7701
7725
|
rules = props.rules;
|
|
@@ -7762,7 +7786,7 @@ var DateTimePicker = forwardRef(function (props, ref) {
|
|
|
7762
7786
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7763
7787
|
className: "w-full"
|
|
7764
7788
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
7765
|
-
className: "mb-1"
|
|
7789
|
+
className: "mb-1 " + labelClassName
|
|
7766
7790
|
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
7767
7791
|
selected: value,
|
|
7768
7792
|
onChange: function onChange(date) {
|
|
@@ -7795,12 +7819,22 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
7795
7819
|
rules = _props$rules === void 0 ? [] : _props$rules,
|
|
7796
7820
|
_props$wrapClassName = props.wrapClassName,
|
|
7797
7821
|
wrapClassName = _props$wrapClassName === void 0 ? "" : _props$wrapClassName,
|
|
7798
|
-
inputClassName = props.inputClassName
|
|
7799
|
-
|
|
7822
|
+
_props$inputClassName = props.inputClassName,
|
|
7823
|
+
inputClassName = _props$inputClassName === void 0 ? "" : _props$inputClassName,
|
|
7824
|
+
_props$labelClassName = props.labelClassName,
|
|
7825
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
7826
|
+
_props$options = props.options,
|
|
7827
|
+
options = _props$options === void 0 ? [{
|
|
7828
|
+
label: "<svg width=\"20\" height=\"20\" viewBox=\"0 0 36 36\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" class=\"iconify iconify--twemoji\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#DA251D\" d=\"M32 5H4a4 4 0 0 0-4 4v18a4 4 0 0 0 4 4h28a4 4 0 0 0 4-4V9a4 4 0 0 0-4-4z\"></path><path fill=\"#FF0\" d=\"M19.753 16.037L18 10.642l-1.753 5.395h-5.672l4.589 3.333l-1.753 5.395L18 21.431l4.589 3.334l-1.753-5.395l4.589-3.333z\"></path></svg>",
|
|
7829
|
+
country: "Việt Nam",
|
|
7830
|
+
value: "+84"
|
|
7831
|
+
}] : _props$options;
|
|
7832
|
+
var _useState = useState(""),
|
|
7800
7833
|
value = _useState[0],
|
|
7801
7834
|
_setValue = _useState[1];
|
|
7802
7835
|
var _useState2 = useState({
|
|
7803
|
-
label: "
|
|
7836
|
+
label: "<svg width=\"20\" height=\"20\" viewBox=\"0 0 36 36\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" role=\"img\" class=\"iconify iconify--twemoji\" preserveAspectRatio=\"xMidYMid meet\"><path fill=\"#DA251D\" d=\"M32 5H4a4 4 0 0 0-4 4v18a4 4 0 0 0 4 4h28a4 4 0 0 0 4-4V9a4 4 0 0 0-4-4z\"></path><path fill=\"#FF0\" d=\"M19.753 16.037L18 10.642l-1.753 5.395h-5.672l4.589 3.333l-1.753 5.395L18 21.431l4.589 3.334l-1.753-5.395l4.589-3.333z\"></path></svg>",
|
|
7837
|
+
country: "Việt Nam",
|
|
7804
7838
|
value: "+84"
|
|
7805
7839
|
}),
|
|
7806
7840
|
countryCode = _useState2[0],
|
|
@@ -7808,6 +7842,11 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
7808
7842
|
var _useState3 = useState(""),
|
|
7809
7843
|
error = _useState3[0],
|
|
7810
7844
|
_setError = _useState3[1];
|
|
7845
|
+
useEffect(function () {
|
|
7846
|
+
if (defaultValue) {
|
|
7847
|
+
_setValue("+" + defaultValue);
|
|
7848
|
+
}
|
|
7849
|
+
}, []);
|
|
7811
7850
|
var handleOnChange = function handleOnChange(event) {
|
|
7812
7851
|
var value = event.target.value;
|
|
7813
7852
|
_setValue(value);
|
|
@@ -7822,8 +7861,10 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
7822
7861
|
return _setValue(text);
|
|
7823
7862
|
},
|
|
7824
7863
|
getValue: function getValue() {
|
|
7825
|
-
|
|
7826
|
-
|
|
7864
|
+
if (!(value !== null && value !== void 0 && value.startsWith(countryCode === null || countryCode === void 0 ? void 0 : countryCode.value))) {
|
|
7865
|
+
return (countryCode === null || countryCode === void 0 ? void 0 : countryCode.value) + (value === null || value === void 0 ? void 0 : value.replace(/^0/, ''));
|
|
7866
|
+
}
|
|
7867
|
+
return value;
|
|
7827
7868
|
},
|
|
7828
7869
|
setError: function setError(err) {
|
|
7829
7870
|
return _setError(err);
|
|
@@ -7858,25 +7899,37 @@ var InputPhoneNumber = forwardRef(function (props, ref) {
|
|
|
7858
7899
|
var labelRequired = required ? /*#__PURE__*/React__default.createElement("span", {
|
|
7859
7900
|
className: "text-danger"
|
|
7860
7901
|
}, " *") : null;
|
|
7861
|
-
var _inputClassName = "h-
|
|
7862
|
-
var data = useCallback([{
|
|
7863
|
-
label: "+84",
|
|
7864
|
-
value: "+84"
|
|
7865
|
-
}], []);
|
|
7902
|
+
var _inputClassName = "h-full w-full px-2 focus:outline-none focus:ring-0 " + inputClassName;
|
|
7866
7903
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7867
|
-
className:
|
|
7904
|
+
className: "flex flex-col " + wrapClassName
|
|
7868
7905
|
}, label ? /*#__PURE__*/React__default.createElement("label", {
|
|
7869
|
-
className: "mb-1"
|
|
7906
|
+
className: "mb-1 " + labelClassName
|
|
7870
7907
|
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement("div", {
|
|
7871
|
-
className: "flex items-center h-10 rounded-lg
|
|
7908
|
+
className: "flex items-center h-10 rounded-lg border pr-2 py-1 " + className
|
|
7872
7909
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
7873
|
-
className: "
|
|
7910
|
+
className: "border-r-2"
|
|
7874
7911
|
}, /*#__PURE__*/React__default.createElement(Select$1, {
|
|
7875
|
-
className: 'w-max',
|
|
7912
|
+
className: 'w-max border-0',
|
|
7876
7913
|
defaultValue: countryCode,
|
|
7877
|
-
options:
|
|
7914
|
+
options: options,
|
|
7915
|
+
optionClassName: "w-max",
|
|
7878
7916
|
placeholder: "+84",
|
|
7879
|
-
onClick: setCountryCode
|
|
7917
|
+
onClick: setCountryCode,
|
|
7918
|
+
selectClassName: "ps-2 pr-1",
|
|
7919
|
+
renderItem: function renderItem(item) {
|
|
7920
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
7921
|
+
className: "flex gap-3 items-center w-full"
|
|
7922
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7923
|
+
dangerouslySetInnerHTML: {
|
|
7924
|
+
__html: item === null || item === void 0 ? void 0 : item.label
|
|
7925
|
+
}
|
|
7926
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
7927
|
+
className: "text-start flex-1 text-sm"
|
|
7928
|
+
}, item === null || item === void 0 ? void 0 : item.country), /*#__PURE__*/React__default.createElement("div", {
|
|
7929
|
+
className: "text-gray3"
|
|
7930
|
+
}, item === null || item === void 0 ? void 0 : item.value));
|
|
7931
|
+
},
|
|
7932
|
+
wrapClassName: "w-full"
|
|
7880
7933
|
})), /*#__PURE__*/React__default.createElement("input", {
|
|
7881
7934
|
type: type,
|
|
7882
7935
|
name: name,
|
|
@@ -7899,7 +7952,7 @@ var formatCurrency = function formatCurrency(amount) {
|
|
|
7899
7952
|
return formattedAmount + " \u20AB";
|
|
7900
7953
|
};
|
|
7901
7954
|
var pattern = {
|
|
7902
|
-
phoneNumberPattern: /^0
|
|
7955
|
+
phoneNumberPattern: /^(?:\+84|0)\d{9}$/
|
|
7903
7956
|
};
|
|
7904
7957
|
var numberPattern = /^\d+$/;
|
|
7905
7958
|
|
|
@@ -8123,8 +8176,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
8123
8176
|
pattern: pattern === null || pattern === void 0 ? void 0 : pattern.phoneNumberPattern,
|
|
8124
8177
|
message: "Số điện thoại không hợp lệ!"
|
|
8125
8178
|
}],
|
|
8126
|
-
className: "
|
|
8127
|
-
inputClassName: "w-full"
|
|
8179
|
+
className: "bg-bgSecondary"
|
|
8128
8180
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8129
8181
|
className: "grid grid-cols-1 gap-4"
|
|
8130
8182
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8135,7 +8187,7 @@ var BookingForm = function BookingForm(props) {
|
|
|
8135
8187
|
defaultValue: listProductSelected,
|
|
8136
8188
|
onClick: handleSelectedProduct,
|
|
8137
8189
|
handleSearchOption: handleSearchProducts,
|
|
8138
|
-
className: "bg-bgSecondary
|
|
8190
|
+
className: "bg-bgSecondary",
|
|
8139
8191
|
rules: [{
|
|
8140
8192
|
type: "required",
|
|
8141
8193
|
message: "Bắt buộc chọn dịch vụ"
|
|
@@ -9355,9 +9407,9 @@ var ProductDetail10 = function ProductDetail10(props) {
|
|
|
9355
9407
|
}
|
|
9356
9408
|
}, [product]);
|
|
9357
9409
|
var initVariant = function initVariant() {
|
|
9358
|
-
var _product$variants;
|
|
9410
|
+
var _product$variants, _variant$index;
|
|
9359
9411
|
var variant = product === null || product === void 0 ? void 0 : (_product$variants = product.variants) === null || _product$variants === void 0 ? void 0 : _product$variants[0];
|
|
9360
|
-
var indexOptions = variant.index.split(",");
|
|
9412
|
+
var indexOptions = variant === null || variant === void 0 ? void 0 : (_variant$index = variant.index) === null || _variant$index === void 0 ? void 0 : _variant$index.split(",");
|
|
9361
9413
|
setVariant(variant);
|
|
9362
9414
|
var options = (product === null || product === void 0 ? void 0 : product.optionValues) || [];
|
|
9363
9415
|
options = options.map(function (e, i) {
|
|
@@ -10266,6 +10318,8 @@ var TextArea = forwardRef(function (props, ref) {
|
|
|
10266
10318
|
className = _props$className === void 0 ? "" : _props$className,
|
|
10267
10319
|
_props$defaultValue = props.defaultValue,
|
|
10268
10320
|
defaultValue = _props$defaultValue === void 0 ? "" : _props$defaultValue,
|
|
10321
|
+
_props$labelClassName = props.labelClassName,
|
|
10322
|
+
labelClassName = _props$labelClassName === void 0 ? "" : _props$labelClassName,
|
|
10269
10323
|
_props$onChange = props.onChange,
|
|
10270
10324
|
onChange = _props$onChange === void 0 ? function () {} : _props$onChange;
|
|
10271
10325
|
var _useState = useState(defaultValue),
|
|
@@ -10326,11 +10380,11 @@ var TextArea = forwardRef(function (props, ref) {
|
|
|
10326
10380
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
10327
10381
|
className: "" + className
|
|
10328
10382
|
}, label ? /*#__PURE__*/React__default.createElement("div", {
|
|
10329
|
-
className: "mb-1"
|
|
10383
|
+
className: "mb-1 " + labelClassName
|
|
10330
10384
|
}, label, labelRequired) : null, /*#__PURE__*/React__default.createElement("textarea", {
|
|
10331
10385
|
name: "",
|
|
10332
10386
|
id: "",
|
|
10333
|
-
className:
|
|
10387
|
+
className: "focus:outline-none focus:ring-0 " + textareaClassName,
|
|
10334
10388
|
placeholder: placeholder,
|
|
10335
10389
|
value: value,
|
|
10336
10390
|
onChange: function onChange(e) {
|
|
@@ -10966,5 +11020,5 @@ var CartItem = function CartItem(props) {
|
|
|
10966
11020
|
}, /*#__PURE__*/React__default.createElement(RiDeleteBin7Line, null), /*#__PURE__*/React__default.createElement("span", null, "X\xF3a"))));
|
|
10967
11021
|
};
|
|
10968
11022
|
|
|
10969
|
-
export { About5, Address1, Banner1, Booking1, Breadcrumb1, Button, Carts1, Contact1, CustomerRating10, Employees1, Features1, Features2, Features3, Footer1, Footer7, Gallery1, Hero10, Hero11, Hero11$1 as Hero12, Hero13, Input, InputPhoneNumber, Links1, ModalNotification, NavBar7, PageTitle1, Partner1, ProductDetail10, ProductHot3, ProductSale2, Products1, Products10, Products2, Products3, ProductsTop1, SectionTitle1, Select$1 as Select, ServiceDetail1, TextArea, Treatments1, Treatments1$1 as Treatments2 };
|
|
11023
|
+
export { About5, Address1, Banner1, Booking1, Breadcrumb1, Button, Carts1, Contact1, CustomerRating10, DateTimePicker, Employees1, Features1, Features2, Features3, Footer1, Footer7, Gallery1, Hero10, Hero11, Hero11$1 as Hero12, Hero13, Input, InputPhoneNumber, Links1, ModalNotification, NavBar7, PageTitle1, Partner1, ProductDetail10, ProductHot3, ProductSale2, Products1, Products10, Products2, Products3, ProductsTop1, SectionTitle1, Select$1 as Select, ServiceDetail1, TextArea, Treatments1, Treatments1$1 as Treatments2 };
|
|
10970
11024
|
//# sourceMappingURL=index.modern.js.map
|