@s-ui/react-molecule-phone-input
Advanced tools
Comparing version 1.7.0 to 1.8.0
# CHANGELOG | ||
# 1.8.0 (2023-09-26) | ||
### Features | ||
* **components/molecule/phoneInput:** fix styles for input with help text ([29edd48](https://github.com/SUI-Components/sui-components/commit/29edd48724f4efed3173ae29ec3cf7b965504497)) | ||
* **components/molecule/phoneInput:** Replace atom input by molecule input ([4a17fdb](https://github.com/SUI-Components/sui-components/commit/4a17fdba855a44b3ad564d337458973ff4d6a189)) | ||
# 1.7.0 (2023-08-30) | ||
@@ -4,0 +14,0 @@ |
@@ -5,7 +5,6 @@ import { useEffect, useRef, useState } from 'react'; | ||
import flagIcons from 'rendered-country-flags'; | ||
import AtomIcon, { ATOM_ICON_COLORS, ATOM_ICON_SIZES } from '@s-ui/react-atom-icon'; | ||
import AtomInput from '@s-ui/react-atom-input'; | ||
import { TYPES } from '@s-ui/react-atom-input/lib/config.js'; | ||
import MoleculeDropdownList, { moleculeDropdownListDesigns } from '@s-ui/react-molecule-dropdown-list'; | ||
import MoleculeDropdownOption from '@s-ui/react-molecule-dropdown-option'; | ||
import MoleculeInputField from '@s-ui/react-molecule-input-field'; | ||
import { phoneValidationType } from './settings.js'; | ||
@@ -15,18 +14,25 @@ import { jsx as _jsx } from "react/jsx-runtime"; | ||
var BASE_CLASS = 'sui-MoleculePhoneInput'; | ||
export { PREFIXES } from './settings.js'; | ||
export default function MoleculePhoneInput(_ref) { | ||
var _cx; | ||
var dropdownCloseIcon = _ref.dropdownCloseIcon, | ||
var alertText = _ref.alertText, | ||
_ref$autoHideHelpText = _ref.autoHideHelpText, | ||
autoHideHelpText = _ref$autoHideHelpText === void 0 ? false : _ref$autoHideHelpText, | ||
dropdownCloseIcon = _ref.dropdownCloseIcon, | ||
dropdownIcon = _ref.dropdownIcon, | ||
_ref$value = _ref.value, | ||
value = _ref$value === void 0 ? '' : _ref$value, | ||
setFormattedValue = _ref.setFormattedValue, | ||
errorText = _ref.errorText, | ||
hasError = _ref.hasError, | ||
helpText = _ref.helpText, | ||
onChange = _ref.onChange, | ||
placeholder = _ref.placeholder, | ||
_ref$prefixes = _ref.prefixes, | ||
prefixes = _ref$prefixes === void 0 ? [] : _ref$prefixes, | ||
onChange = _ref.onChange, | ||
placeholder = _ref.placeholder, | ||
hasError = _ref.hasError, | ||
_ref$initialSelectedP = _ref.initialSelectedPrefix, | ||
initialSelectedPrefix = _ref$initialSelectedP === void 0 ? prefixes[0] : _ref$initialSelectedP, | ||
setFormattedValue = _ref.setFormattedValue, | ||
successText = _ref.successText, | ||
_ref$type = _ref.type, | ||
type = _ref$type === void 0 ? phoneValidationType.DEFAULT : _ref$type, | ||
_ref$value = _ref.value, | ||
value = _ref$value === void 0 ? '' : _ref$value, | ||
_ref$visiblePrefixes = _ref.visiblePrefixes, | ||
@@ -92,7 +98,3 @@ visiblePrefixes = _ref$visiblePrefixes === void 0 ? true : _ref$visiblePrefixes; | ||
src: flagIcons[selectedPrefix == null ? void 0 : selectedPrefix.value] | ||
}), visiblePrefixes && /*#__PURE__*/_jsx(AtomIcon, { | ||
size: ATOM_ICON_SIZES.medium, | ||
color: ATOM_ICON_COLORS.currentColor, | ||
children: showDropdown ? dropdownCloseIcon : dropdownIcon | ||
})] | ||
}), visiblePrefixes && (showDropdown ? dropdownCloseIcon : dropdownIcon)] | ||
}), /*#__PURE__*/_jsxs("div", { | ||
@@ -103,9 +105,14 @@ className: baseClass + "-input-phoneContainer", | ||
children: selectedPrefix.countryCode | ||
}), /*#__PURE__*/_jsx(AtomInput, { | ||
value: value.toString(), | ||
}), /*#__PURE__*/_jsx(MoleculeInputField, { | ||
alertText: alertText, | ||
autoHideHelpText: autoHideHelpText, | ||
errorText: errorText, | ||
helpText: helpText, | ||
placeholder: placeholder, | ||
successText: successText, | ||
mask: inputMask, | ||
placeholder: placeholder, | ||
noBorder: true, | ||
onChange: handlePhoneChange, | ||
type: TYPES.MASK, | ||
onChange: handlePhoneChange, | ||
noBorder: true | ||
value: value.toString() | ||
})] | ||
@@ -112,0 +119,0 @@ })] |
{ | ||
"name": "@s-ui/react-molecule-phone-input", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "", | ||
@@ -12,8 +12,7 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@s-ui/react-atom-input": "5", | ||
"@s-ui/component-dependencies": "latest", | ||
"@s-ui/react-atom-button": "1", | ||
"@s-ui/react-molecule-dropdown-list": "2", | ||
"@s-ui/react-molecule-dropdown-option": "2", | ||
"@s-ui/react-molecule-dropdown-list": "2", | ||
"@s-ui/react-atom-icon": "1", | ||
"@s-ui/react-atom-button": "1", | ||
"@s-ui/component-dependencies": "latest", | ||
"@s-ui/react-molecule-input-field": "4", | ||
"rendered-country-flags": "1" | ||
@@ -20,0 +19,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15230
7
189
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@s-ui/compiler-config@1.1.0(transitive)
+ Added@s-ui/js-compiler@1.29.0(transitive)
+ Added@s-ui/react-atom-help-text@1.9.0(transitive)
+ Added@s-ui/react-atom-label@1.25.0(transitive)
+ Added@s-ui/react-atom-validation-text@1.9.0(transitive)
+ Added@s-ui/react-molecule-field@1.39.0(transitive)
+ Added@s-ui/react-molecule-input-field@4.7.0(transitive)
+ Added@swc/core@1.3.14(transitive)
+ Added@swc/core-darwin-arm64@1.3.14(transitive)
+ Added@swc/core-darwin-x64@1.3.14(transitive)
+ Added@swc/core-linux-arm-gnueabihf@1.3.14(transitive)
+ Added@swc/core-linux-arm64-gnu@1.3.14(transitive)
+ Added@swc/core-linux-arm64-musl@1.3.14(transitive)
+ Added@swc/core-linux-x64-gnu@1.3.14(transitive)
+ Added@swc/core-linux-x64-musl@1.3.14(transitive)
+ Added@swc/core-win32-ia32-msvc@1.3.14(transitive)
+ Added@swc/core-win32-x64-msvc@1.3.14(transitive)
+ Added@swc/helpers@0.4.12(transitive)
+ Added@tsconfig/esm@1.0.4(transitive)
+ Added@tsconfig/vite-react@2.0.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedcommander@8.3.0(transitive)
+ Addedfast-glob@3.2.12(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfs-extra@10.1.0(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedjsonfile@6.1.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedtypescript@5.0.4(transitive)
+ Addeduniversalify@2.0.1(transitive)
- Removed@s-ui/react-atom-icon@1
- Removed@s-ui/react-atom-input@5
- Removed@s-ui/react-atom-icon@1.18.0(transitive)