Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@s-ui/react-molecule-phone-input

Package Overview
Dependencies
Maintainers
64
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@s-ui/react-molecule-phone-input - npm Package Compare versions

Comparing version 1.7.0 to 1.8.0

10

CHANGELOG.md
# 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 @@

45

lib/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc