react-gldn-kit 0.1.84 → 0.1.85

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.
@@ -49,6 +49,7 @@ var HOCRequestLoader_1 = require("components/HOCs/HOCRequestLoader");
49
49
  var CircularLoader_1 = require("components/ui/Loaders/CircularLoader");
50
50
  var PromoCode_1 = require("components/SignUp/PromoCode");
51
51
  var CurrencySelector_1 = require("components/SignUp/CurrencySelector");
52
+ var DocsCheckBox_1 = require("components/SignUp/DocsCheckBox");
52
53
  var constant_1 = require("components/ui/Inputs/BaseInput/constant");
53
54
  var constants_1 = require("./constants");
54
55
  var store_1 = require("zustandStore/languages/store");
@@ -59,8 +60,8 @@ var store_3 = require("zustandStore/connection/store");
59
60
  var selectors_3 = require("zustandStore/connection/selectors");
60
61
  var shared_1 = require("utils/shared");
61
62
  var utils_1 = require("zustandStore/forms/signUp/utils");
63
+ var validation_1 = require("service/validation");
62
64
  var styles = __importStar(require("../../../SignUp.module.css"));
63
- var DocsCheckBox_1 = require("components/SignUp/DocsCheckBox");
64
65
  var PhoneSignUp = function (props) {
65
66
  var availableCurrencies = props.availableCurrencies, isSelected = props.isSelected, _a = props.withoutCode, withoutCode = _a === void 0 ? false : _a, countryInfo = props.countryInfo, handleRegistration = props.handleRegistration, _b = props.requestCode, requestCode = _b === void 0 ? console.info : _b, buttonText = props.buttonText;
66
67
  var setRegisteredLogin = (0, store_2.useZustandRegistrationKitStore)(selectors_2.zustandRegistrationKitSelector.setRegisteredLoginAction);
@@ -113,7 +114,16 @@ var PhoneSignUp = function (props) {
113
114
  setCode({ value: value, errorText: '' });
114
115
  }
115
116
  if (t === 'password') {
116
- setPassword({ value: value, errorText: '' });
117
+ var errorText = (0, validation_1.composeValidations)([
118
+ (0, validation_1.isPassword)({
119
+ value: value,
120
+ errorText: ['errors.passwordMin', 'errors.passwordMax'],
121
+ }),
122
+ ]);
123
+ setPassword({
124
+ value: value,
125
+ errorText: errorText,
126
+ });
117
127
  }
118
128
  }; };
119
129
  var handleSubmitForm = function () {
@@ -150,6 +160,6 @@ var PhoneSignUp = function (props) {
150
160
  var PHONE_PROPS = withoutCode
151
161
  ? constants_1.PHONE_PROPS_WITHOUT_CONFIRMATION
152
162
  : constants_1.PHONE_PROPS_WITH_CONFIRMATION;
153
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(PhoneInput_1.PhoneInput, __assign({}, PHONE_PROPS, { label: "registrations.inputs.phone", size: "full", defaultValue: "+", onChange: setPhone, countryInfo: countryInfo, requestCallback: handleIsRequested, classesWrapper: styles.marginB, disabled: isRequestedCode, classes: styles.marginB, requestCode: !withoutCode ? requestCode : undefined, buttonClasses: styles.authButton })), !withoutCode && isRequestedCode && ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "registrations.inputs.code", size: "full", disabled: !isRequestedCode, onChange: handleChange('code'), classes: styles.marginB })), (0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "registrations.inputs.password", size: "full", isHidePlaceholder: true, onChange: handleChange('password'), classes: styles.marginB }), (0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, { availableCurrencies: availableCurrencies, countryInfo: countryInfo, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(PromoCode_1.RegistrationPromoCode, { setPromoCode: setPromoCode, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.DocsCheckBox, { terms: terms, handleOpenDoc: handleOpenDoc, handleToggleState: handleToggleState }), (0, jsx_runtime_1.jsx)(HOCRequestLoader_1.HOCRequestLoader, __assign({ command: "08x", requestId: types_1.ERequestIds.Registration, customLoader: (0, jsx_runtime_1.jsx)(CircularLoader_1.CircularLoader, {}) }, { children: (0, jsx_runtime_1.jsx)(BaseButton_1.BaseButton, { text: buttonText || 'registrations.submitBtn', disabled: isDisabledSubmitButton, color: "primary", handleClick: handleSubmitForm, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: (0, classnames_1.default)(styles.marginB, styles.authButton) }) }))] }));
163
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(PhoneInput_1.PhoneInput, __assign({}, PHONE_PROPS, { label: "registrations.inputs.phone", size: "full", defaultValue: "+", onChange: setPhone, countryInfo: countryInfo, requestCallback: handleIsRequested, classesWrapper: styles.marginB, disabled: isRequestedCode, classes: styles.marginB, requestCode: !withoutCode ? requestCode : undefined, buttonClasses: styles.authButton })), !withoutCode && isRequestedCode && ((0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "registrations.inputs.code", size: "full", disabled: !isRequestedCode, onChange: handleChange('code'), classes: styles.marginB })), (0, jsx_runtime_1.jsx)(BaseInput_1.BaseInput, { label: "registrations.inputs.password", size: "full", isHidePlaceholder: true, onChange: handleChange('password'), classes: styles.marginB, errorText: password.errorText }), (0, jsx_runtime_1.jsx)(CurrencySelector_1.CurrencySelector, { availableCurrencies: availableCurrencies, countryInfo: countryInfo, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(PromoCode_1.RegistrationPromoCode, { setPromoCode: setPromoCode, classes: styles.marginB }), (0, jsx_runtime_1.jsx)(DocsCheckBox_1.DocsCheckBox, { terms: terms, handleOpenDoc: handleOpenDoc, handleToggleState: handleToggleState }), (0, jsx_runtime_1.jsx)(HOCRequestLoader_1.HOCRequestLoader, __assign({ command: "08x", requestId: types_1.ERequestIds.Registration, customLoader: (0, jsx_runtime_1.jsx)(CircularLoader_1.CircularLoader, {}) }, { children: (0, jsx_runtime_1.jsx)(BaseButton_1.BaseButton, { text: buttonText || 'registrations.submitBtn', disabled: isDisabledSubmitButton, color: "primary", handleClick: handleSubmitForm, size: "--button-full", centreText: true, buttonHeight: "--button-height-full", classes: (0, classnames_1.default)(styles.marginB, styles.authButton) }) }))] }));
154
164
  };
155
165
  exports.PhoneSignUp = PhoneSignUp;
package/dist/main.css CHANGED
@@ -1290,6 +1290,7 @@
1290
1290
  align-items: center;
1291
1291
  width: 100%;
1292
1292
  padding: var(--indent-xs);
1293
+ --selector-overflow-color: var(--base-0);
1293
1294
  }
1294
1295
 
1295
1296
  .KIT__SignUp-module__yellow___E9DiY {
@@ -4114,6 +4115,7 @@
4114
4115
 
4115
4116
  .KIT__Alert-module__yellowSignUp___YdXau {
4116
4117
  background: var(--base-1000);
4118
+ --button-color-black: var(--base-1000);
4117
4119
  }
4118
4120
 
4119
4121
  @media (min-width: 768px) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-gldn-kit",
3
- "version": "0.1.84",
3
+ "version": "0.1.85",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "keywords": [],