@veeqo/ui 13.0.0 → 13.2.0
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/components/PhoneInput/PhoneInput.cjs +50 -0
- package/dist/components/PhoneInput/PhoneInput.cjs.map +1 -0
- package/dist/components/PhoneInput/PhoneInput.d.ts +3 -0
- package/dist/components/PhoneInput/PhoneInput.js +44 -0
- package/dist/components/PhoneInput/PhoneInput.js.map +1 -0
- package/dist/components/PhoneInput/PhoneInput.module.scss.cjs +9 -0
- package/dist/components/PhoneInput/PhoneInput.module.scss.cjs.map +1 -0
- package/dist/components/PhoneInput/PhoneInput.module.scss.js +7 -0
- package/dist/components/PhoneInput/PhoneInput.module.scss.js.map +1 -0
- package/dist/components/PhoneInput/components/SelectedCountry.cjs +18 -0
- package/dist/components/PhoneInput/components/SelectedCountry.cjs.map +1 -0
- package/dist/components/PhoneInput/components/SelectedCountry.d.ts +5 -0
- package/dist/components/PhoneInput/components/SelectedCountry.js +12 -0
- package/dist/components/PhoneInput/components/SelectedCountry.js.map +1 -0
- package/dist/components/PhoneInput/constants.cjs +1243 -0
- package/dist/components/PhoneInput/constants.cjs.map +1 -0
- package/dist/components/PhoneInput/constants.d.ts +4 -0
- package/dist/components/PhoneInput/constants.js +1239 -0
- package/dist/components/PhoneInput/constants.js.map +1 -0
- package/dist/components/PhoneInput/hooks/useApplyCountryCode.cjs +48 -0
- package/dist/components/PhoneInput/hooks/useApplyCountryCode.cjs.map +1 -0
- package/dist/components/PhoneInput/hooks/useApplyCountryCode.d.ts +11 -0
- package/dist/components/PhoneInput/hooks/useApplyCountryCode.js +46 -0
- package/dist/components/PhoneInput/hooks/useApplyCountryCode.js.map +1 -0
- package/dist/components/PhoneInput/index.cjs +11 -0
- package/dist/components/PhoneInput/index.cjs.map +1 -0
- package/dist/components/PhoneInput/index.d.ts +308 -0
- package/dist/components/PhoneInput/index.js +9 -0
- package/dist/components/PhoneInput/index.js.map +1 -0
- package/dist/components/PhoneInput/types.d.ts +25 -0
- package/dist/components/PhoneInput/utils/utils.cjs +69 -0
- package/dist/components/PhoneInput/utils/utils.cjs.map +1 -0
- package/dist/components/PhoneInput/utils/utils.d.ts +14 -0
- package/dist/components/PhoneInput/utils/utils.js +60 -0
- package/dist/components/PhoneInput/utils/utils.js.map +1 -0
- package/dist/components/SelectDropdown/SelectDropdown.cjs +2 -3
- package/dist/components/SelectDropdown/SelectDropdown.cjs.map +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.d.ts +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.js +2 -3
- package/dist/components/SelectDropdown/SelectDropdown.js.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.cjs +2 -2
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.d.ts +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.js +2 -2
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.js.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/SelectionType.cjs +5 -3
- package/dist/components/SelectDropdown/components/ItemContent/SelectionType.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/SelectionType.d.ts +2 -1
- package/dist/components/SelectDropdown/components/ItemContent/SelectionType.js +5 -3
- package/dist/components/SelectDropdown/components/ItemContent/SelectionType.js.map +1 -1
- package/dist/components/SelectDropdown/components/ListItem/ListItem.cjs +2 -2
- package/dist/components/SelectDropdown/components/ListItem/ListItem.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ListItem/ListItem.d.ts +1 -1
- package/dist/components/SelectDropdown/components/ListItem/ListItem.js +2 -2
- package/dist/components/SelectDropdown/components/ListItem/ListItem.js.map +1 -1
- package/dist/components/SelectDropdown/components/types.d.ts +1 -0
- package/dist/components/SelectDropdown/types.d.ts +2 -1
- package/dist/components/Tag/Tag.cjs +12 -8
- package/dist/components/Tag/Tag.cjs.map +1 -1
- package/dist/components/Tag/Tag.d.ts +11 -4
- package/dist/components/Tag/Tag.js +11 -7
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Tag/Tag.module.scss.cjs +9 -0
- package/dist/components/Tag/Tag.module.scss.cjs.map +1 -0
- package/dist/components/Tag/Tag.module.scss.js +7 -0
- package/dist/components/Tag/Tag.module.scss.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var index = require('../SelectDropdown/index.cjs');
|
|
5
|
+
var index$1 = require('../TextField/index.cjs');
|
|
6
|
+
var PhoneInput_module = require('./PhoneInput.module.scss.cjs');
|
|
7
|
+
var utils = require('./utils/utils.cjs');
|
|
8
|
+
var constants = require('./constants.cjs');
|
|
9
|
+
var SelectedCountry = require('./components/SelectedCountry.cjs');
|
|
10
|
+
var FlexRow = require('../Flex/FlexRow/FlexRow.cjs');
|
|
11
|
+
var useApplyCountryCode = require('./hooks/useApplyCountryCode.cjs');
|
|
12
|
+
var buildClassnames = require('../../utils/buildClassnames.cjs');
|
|
13
|
+
require('uid/secure');
|
|
14
|
+
|
|
15
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
16
|
+
|
|
17
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
|
+
|
|
19
|
+
const PhoneInput = ({ value, onChange, hasError = false, disabled = false, error, className, ...otherProps }) => {
|
|
20
|
+
const [searchValue, setSearchValue] = React.useState('');
|
|
21
|
+
const [debouncedSearchValue, setDebouncedSearchValue] = React.useState('');
|
|
22
|
+
const phoneOptions = React.useMemo(() => {
|
|
23
|
+
return utils.buildPhoneOptions();
|
|
24
|
+
}, []);
|
|
25
|
+
const { selectedCountryCode, phoneNumber, handlePhoneNumberChange, handleCountryChange } = useApplyCountryCode.useApplyCountryCode({
|
|
26
|
+
value,
|
|
27
|
+
onChange,
|
|
28
|
+
});
|
|
29
|
+
// search functionality with debouncing
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
const timer = setTimeout(() => setDebouncedSearchValue(searchValue), constants.DEBOUNCE_TIME);
|
|
32
|
+
return () => clearTimeout(timer);
|
|
33
|
+
}, [searchValue]);
|
|
34
|
+
const filteredOptions = React.useMemo(() => {
|
|
35
|
+
return utils.filterPhoneOptions(phoneOptions, debouncedSearchValue);
|
|
36
|
+
}, [debouncedSearchValue, phoneOptions]);
|
|
37
|
+
const selectedCountry = constants.InternationalCodesMap[selectedCountryCode.startsWith('+') ? selectedCountryCode : `+${selectedCountryCode}`];
|
|
38
|
+
const handleCountryChangeWrapper = (selectedOption) => {
|
|
39
|
+
if (!selectedOption)
|
|
40
|
+
return;
|
|
41
|
+
handleCountryChange(selectedOption.id);
|
|
42
|
+
setSearchValue('');
|
|
43
|
+
};
|
|
44
|
+
return (React__default.default.createElement(FlexRow.FlexRow, { flexWrap: "nowrap", className: buildClassnames.buildClassnames([PhoneInput_module.inputGroup, className]) },
|
|
45
|
+
React__default.default.createElement(index.SelectDropdown, { selectedSlot: selectedCountry && React__default.default.createElement(SelectedCountry.SelectedCountry, { selectedCountry: selectedCountry }), className: PhoneInput_module.phoneSelectDropdown, disabled: disabled, onChange: (SelectedOption) => handleCountryChangeWrapper(SelectedOption), onSearchChange: setSearchValue, searchValue: searchValue, options: filteredOptions, value: selectedCountryCode }),
|
|
46
|
+
React__default.default.createElement(index$1.TextField, { type: "tel", error: error, hasError: hasError, disabled: disabled, value: phoneNumber, onChange: handlePhoneNumberChange, ...otherProps })));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.PhoneInput = PhoneInput;
|
|
50
|
+
//# sourceMappingURL=PhoneInput.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneInput.cjs","sources":["../../../src/components/PhoneInput/PhoneInput.tsx"],"sourcesContent":["import React, { useState, useMemo, useEffect } from 'react';\nimport { SelectDropdown } from '../SelectDropdown';\nimport { TextField } from '../TextField';\nimport styles from './PhoneInput.module.scss';\nimport { buildPhoneOptions, filterPhoneOptions } from './utils/utils';\nimport { InternationalCodesMap, DEBOUNCE_TIME } from './constants';\nimport { SelectedCountry } from './components/SelectedCountry';\nimport { PhoneInputProps, PhoneOption } from './types';\nimport { FlexRow } from '../Flex/FlexRow';\nimport { useApplyCountryCode } from './hooks/useApplyCountryCode';\nimport { buildClassnames } from '../../utils';\n\nexport const PhoneInput = ({\n value,\n onChange,\n hasError = false,\n disabled = false,\n error,\n className,\n ...otherProps\n}: PhoneInputProps) => {\n const [searchValue, setSearchValue] = useState('');\n const [debouncedSearchValue, setDebouncedSearchValue] = useState('');\n\n const phoneOptions = useMemo(() => {\n return buildPhoneOptions();\n }, []);\n\n const { selectedCountryCode, phoneNumber, handlePhoneNumberChange, handleCountryChange } =\n useApplyCountryCode({\n value,\n onChange,\n });\n\n // search functionality with debouncing\n useEffect(() => {\n const timer = setTimeout(() => setDebouncedSearchValue(searchValue), DEBOUNCE_TIME);\n return () => clearTimeout(timer);\n }, [searchValue]);\n\n const filteredOptions = useMemo(() => {\n return filterPhoneOptions(phoneOptions, debouncedSearchValue);\n }, [debouncedSearchValue, phoneOptions]);\n\n const selectedCountry =\n InternationalCodesMap[\n selectedCountryCode.startsWith('+') ? selectedCountryCode : `+${selectedCountryCode}`\n ];\n\n const handleCountryChangeWrapper = (selectedOption: PhoneOption) => {\n if (!selectedOption) return;\n handleCountryChange(selectedOption.id);\n setSearchValue('');\n };\n\n return (\n <FlexRow flexWrap=\"nowrap\" className={buildClassnames([styles.inputGroup, className])}>\n <SelectDropdown\n selectedSlot={selectedCountry && <SelectedCountry selectedCountry={selectedCountry} />}\n className={styles.phoneSelectDropdown}\n disabled={disabled}\n onChange={(SelectedOption) => handleCountryChangeWrapper(SelectedOption as PhoneOption)}\n onSearchChange={setSearchValue}\n searchValue={searchValue}\n options={filteredOptions}\n value={selectedCountryCode}\n />\n <TextField\n type=\"tel\"\n error={error}\n hasError={hasError}\n disabled={disabled}\n value={phoneNumber}\n onChange={handlePhoneNumberChange}\n {...otherProps}\n />\n </FlexRow>\n );\n};\n"],"names":["useState","useMemo","buildPhoneOptions","useApplyCountryCode","useEffect","DEBOUNCE_TIME","filterPhoneOptions","InternationalCodesMap","React","FlexRow","buildClassnames","styles","SelectDropdown","SelectedCountry","TextField"],"mappings":";;;;;;;;;;;;;;;;;;AAYa,MAAA,UAAU,GAAG,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,SAAS,EACT,GAAG,UAAU,EACG,KAAI;IACpB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAGA,cAAQ,CAAC,EAAE,CAAC;IAClD,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAGA,cAAQ,CAAC,EAAE,CAAC;AAEpE,IAAA,MAAM,YAAY,GAAGC,aAAO,CAAC,MAAK;QAChC,OAAOC,uBAAiB,EAAE;KAC3B,EAAE,EAAE,CAAC;IAEN,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,GACtFC,uCAAmB,CAAC;QAClB,KAAK;QACL,QAAQ;AACT,KAAA,CAAC;;IAGJC,eAAS,CAAC,MAAK;AACb,QAAA,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,uBAAuB,CAAC,WAAW,CAAC,EAAEC,uBAAa,CAAC;AACnF,QAAA,OAAO,MAAM,YAAY,CAAC,KAAK,CAAC;AAClC,KAAC,EAAE,CAAC,WAAW,CAAC,CAAC;AAEjB,IAAA,MAAM,eAAe,GAAGJ,aAAO,CAAC,MAAK;AACnC,QAAA,OAAOK,wBAAkB,CAAC,YAA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
|
|
|
1
|
+
import React__default, { useState, useMemo, useEffect } from 'react';
|
|
2
|
+
import { SelectDropdown } from '../SelectDropdown/index.js';
|
|
3
|
+
import { TextField } from '../TextField/index.js';
|
|
4
|
+
import styles from './PhoneInput.module.scss.js';
|
|
5
|
+
import { buildPhoneOptions, filterPhoneOptions } from './utils/utils.js';
|
|
6
|
+
import { DEBOUNCE_TIME, InternationalCodesMap } from './constants.js';
|
|
7
|
+
import { SelectedCountry } from './components/SelectedCountry.js';
|
|
8
|
+
import { FlexRow } from '../Flex/FlexRow/FlexRow.js';
|
|
9
|
+
import { useApplyCountryCode } from './hooks/useApplyCountryCode.js';
|
|
10
|
+
import { buildClassnames } from '../../utils/buildClassnames.js';
|
|
11
|
+
import 'uid/secure';
|
|
12
|
+
|
|
13
|
+
const PhoneInput = ({ value, onChange, hasError = false, disabled = false, error, className, ...otherProps }) => {
|
|
14
|
+
const [searchValue, setSearchValue] = useState('');
|
|
15
|
+
const [debouncedSearchValue, setDebouncedSearchValue] = useState('');
|
|
16
|
+
const phoneOptions = useMemo(() => {
|
|
17
|
+
return buildPhoneOptions();
|
|
18
|
+
}, []);
|
|
19
|
+
const { selectedCountryCode, phoneNumber, handlePhoneNumberChange, handleCountryChange } = useApplyCountryCode({
|
|
20
|
+
value,
|
|
21
|
+
onChange,
|
|
22
|
+
});
|
|
23
|
+
// search functionality with debouncing
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
const timer = setTimeout(() => setDebouncedSearchValue(searchValue), DEBOUNCE_TIME);
|
|
26
|
+
return () => clearTimeout(timer);
|
|
27
|
+
}, [searchValue]);
|
|
28
|
+
const filteredOptions = useMemo(() => {
|
|
29
|
+
return filterPhoneOptions(phoneOptions, debouncedSearchValue);
|
|
30
|
+
}, [debouncedSearchValue, phoneOptions]);
|
|
31
|
+
const selectedCountry = InternationalCodesMap[selectedCountryCode.startsWith('+') ? selectedCountryCode : `+${selectedCountryCode}`];
|
|
32
|
+
const handleCountryChangeWrapper = (selectedOption) => {
|
|
33
|
+
if (!selectedOption)
|
|
34
|
+
return;
|
|
35
|
+
handleCountryChange(selectedOption.id);
|
|
36
|
+
setSearchValue('');
|
|
37
|
+
};
|
|
38
|
+
return (React__default.createElement(FlexRow, { flexWrap: "nowrap", className: buildClassnames([styles.inputGroup, className]) },
|
|
39
|
+
React__default.createElement(SelectDropdown, { selectedSlot: selectedCountry && React__default.createElement(SelectedCountry, { selectedCountry: selectedCountry }), className: styles.phoneSelectDropdown, disabled: disabled, onChange: (SelectedOption) => handleCountryChangeWrapper(SelectedOption), onSearchChange: setSearchValue, searchValue: searchValue, options: filteredOptions, value: selectedCountryCode }),
|
|
40
|
+
React__default.createElement(TextField, { type: "tel", error: error, hasError: hasError, disabled: disabled, value: phoneNumber, onChange: handlePhoneNumberChange, ...otherProps })));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { PhoneInput };
|
|
44
|
+
//# sourceMappingURL=PhoneInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneInput.js","sources":["../../../src/components/PhoneInput/PhoneInput.tsx"],"sourcesContent":["import React, { useState, useMemo, useEffect } from 'react';\nimport { SelectDropdown } from '../SelectDropdown';\nimport { TextField } from '../TextField';\nimport styles from './PhoneInput.module.scss';\nimport { buildPhoneOptions, filterPhoneOptions } from './utils/utils';\nimport { InternationalCodesMap, DEBOUNCE_TIME } from './constants';\nimport { SelectedCountry } from './components/SelectedCountry';\nimport { PhoneInputProps, PhoneOption } from './types';\nimport { FlexRow } from '../Flex/FlexRow';\nimport { useApplyCountryCode } from './hooks/useApplyCountryCode';\nimport { buildClassnames } from '../../utils';\n\nexport const PhoneInput = ({\n value,\n onChange,\n hasError = false,\n disabled = false,\n error,\n className,\n ...otherProps\n}: PhoneInputProps) => {\n const [searchValue, setSearchValue] = useState('');\n const [debouncedSearchValue, setDebouncedSearchValue] = useState('');\n\n const phoneOptions = useMemo(() => {\n return buildPhoneOptions();\n }, []);\n\n const { selectedCountryCode, phoneNumber, handlePhoneNumberChange, handleCountryChange } =\n useApplyCountryCode({\n value,\n onChange,\n });\n\n // search functionality with debouncing\n useEffect(() => {\n const timer = setTimeout(() => setDebouncedSearchValue(searchValue), DEBOUNCE_TIME);\n return () => clearTimeout(timer);\n }, [searchValue]);\n\n const filteredOptions = useMemo(() => {\n return filterPhoneOptions(phoneOptions, debouncedSearchValue);\n }, [debouncedSearchValue, phoneOptions]);\n\n const selectedCountry =\n InternationalCodesMap[\n selectedCountryCode.startsWith('+') ? selectedCountryCode : `+${selectedCountryCode}`\n ];\n\n const handleCountryChangeWrapper = (selectedOption: PhoneOption) => {\n if (!selectedOption) return;\n handleCountryChange(selectedOption.id);\n setSearchValue('');\n };\n\n return (\n <FlexRow flexWrap=\"nowrap\" className={buildClassnames([styles.inputGroup, className])}>\n <SelectDropdown\n selectedSlot={selectedCountry && <SelectedCountry selectedCountry={selectedCountry} />}\n className={styles.phoneSelectDropdown}\n disabled={disabled}\n onChange={(SelectedOption) => handleCountryChangeWrapper(SelectedOption as PhoneOption)}\n onSearchChange={setSearchValue}\n searchValue={searchValue}\n options={filteredOptions}\n value={selectedCountryCode}\n />\n <TextField\n type=\"tel\"\n error={error}\n hasError={hasError}\n disabled={disabled}\n value={phoneNumber}\n onChange={handlePhoneNumberChange}\n {...otherProps}\n />\n </FlexRow>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;AAYa,MAAA,UAAU,GAAG,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,SAAS,EACT,GAAG,UAAU,EACG,KAAI;IACpB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC;IAClD,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC;AAEpE,IAAA,MAAM,YAAY,GAAG,OAAO,CAAC,MAAK;QAChC,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QAAQ,EAClB,QAAQ,EAAE,CAAC,cAAc,KAAK,0BAA0B,CAAC,cAA6B,CAAC,EACvF,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,mBAAmB,EAC1B,CAAA;AACF,QAAAA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,IAAI,EAAC,KAAK,EACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,uBAAuB,EAC7B,GAAA,UAAU,EACd,CAAA,CACM;AAEd;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ___$insertStyle = require('../../_virtual/____insertStyle.cjs');
|
|
4
|
+
|
|
5
|
+
___$insertStyle("._countryFlagSVG_13vun_1 {\n display: flex;\n}\n\n._phoneSelectDropdown_13vun_5 {\n min-width: max-content;\n}\n\n._inputGroup_13vun_9 > button {\n width: var(--sizes-20);\n}");
|
|
6
|
+
var styles = {"countryFlagSVG":"_countryFlagSVG_13vun_1","phoneSelectDropdown":"_phoneSelectDropdown_13vun_5","inputGroup":"_inputGroup_13vun_9"};
|
|
7
|
+
|
|
8
|
+
module.exports = styles;
|
|
9
|
+
//# sourceMappingURL=PhoneInput.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneInput.module.scss.cjs","sources":["../../../src/components/PhoneInput/PhoneInput.module.scss"],"sourcesContent":["\n.countryFlagSVG {\n display: flex;\n}\n\n.phoneSelectDropdown {\n min-width: max-content;\n}\n\n.inputGroup {\n & > button {\n width: var(--sizes-20);\n }\n}\n\n"],"names":[],"mappings":";;;;AAEE,eAAA,CAAA,mLAAA;;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._countryFlagSVG_13vun_1 {\n display: flex;\n}\n\n._phoneSelectDropdown_13vun_5 {\n min-width: max-content;\n}\n\n._inputGroup_13vun_9 > button {\n width: var(--sizes-20);\n}");
|
|
4
|
+
var styles = {"countryFlagSVG":"_countryFlagSVG_13vun_1","phoneSelectDropdown":"_phoneSelectDropdown_13vun_5","inputGroup":"_inputGroup_13vun_9"};
|
|
5
|
+
|
|
6
|
+
export { styles as default };
|
|
7
|
+
//# sourceMappingURL=PhoneInput.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneInput.module.scss.js","sources":["../../../src/components/PhoneInput/PhoneInput.module.scss"],"sourcesContent":["\n.countryFlagSVG {\n display: flex;\n}\n\n.phoneSelectDropdown {\n min-width: max-content;\n}\n\n.inputGroup {\n & > button {\n width: var(--sizes-20);\n }\n}\n\n"],"names":["___$insertStyle"],"mappings":";;AAEEA,WAAA,CAAA,mLAAA;;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var Image = require('../../Image/Image.cjs');
|
|
5
|
+
var Text = require('../../Text/Text.cjs');
|
|
6
|
+
var PhoneInput_module = require('../PhoneInput.module.scss.cjs');
|
|
7
|
+
var constants = require('../constants.cjs');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
|
+
|
|
13
|
+
const SelectedCountry = ({ selectedCountry }) => {
|
|
14
|
+
return (selectedCountry === null || selectedCountry === undefined ? undefined : selectedCountry.countryFlag) ? (React__default.default.createElement(Image.Image, { className: PhoneInput_module.countryFlagSVG, src: `${constants.SVG_BASE_URL}${selectedCountry.countryFlag}.svg`, alt: `${selectedCountry.country} country code selected` })) : (React__default.default.createElement(Text.Text, null, selectedCountry === null || selectedCountry === undefined ? undefined : selectedCountry.countryCode));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.SelectedCountry = SelectedCountry;
|
|
18
|
+
//# sourceMappingURL=SelectedCountry.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectedCountry.cjs","sources":["../../../../src/components/PhoneInput/components/SelectedCountry.tsx"],"sourcesContent":["import React from 'react';\nimport { Image } from '../../Image';\nimport { Text } from '../../Text';\nimport { InternationalCode } from '../types';\nimport styles from '../PhoneInput.module.scss';\nimport { SVG_BASE_URL } from '../constants';\n\nexport const SelectedCountry = ({ selectedCountry }: { selectedCountry: InternationalCode }) => {\n return selectedCountry?.countryFlag ? (\n <Image\n className={styles.countryFlagSVG}\n src={`${SVG_BASE_URL}${selectedCountry.countryFlag}.svg`}\n alt={`${selectedCountry.country} country code selected`}\n />\n ) : (\n <Text>{selectedCountry?.countryCode}</Text>\n );\n};\n"],"names":["React","Image","styles","SVG_BASE_URL","Text"],"mappings":";;;;;;;;;;;;MAOa,eAAe,GAAG,CAAC,EAAE,eAAe,EAA0C,KAAI;IAC7F,OAAO,CAAA,eAAe,KAAA,IAAA,IAAf,eAAe,KAAA,SAAA,GAAA,SAAA,GAAf,eAAe,CAAE,WAAW,KACjCA,sBAAA,CAAA,aAAA,CAACC,WAAK,EACJ,EAAA,SAAS,EAAEC,iBAAM,CAAC,cAAc,EAChC,GAAG,EAAE,CAAA,EAAGC,sBAAY,CAAA,EAAG,eAAe,CAAC,WAAW,CAAM,IAAA,CAAA,EACxD,GAAG,EAAE,CAAG,EAAA,eAAe,CAAC,OAAO,CAAwB,sBAAA,CAAA,EAAA,CACvD,KAEFH,sBAAC,CAAA,aAAA,CAAAI,SAAI,EAAE,IAAA,EAAA,eAAe,KAAf,IAAA,IAAA,eAAe,KAAf,SAAA,GAAA,SAAA,GAAA,eAAe,CAAE,WAAW,CAAQ,CAC5C;AACH;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { Image } from '../../Image/Image.js';
|
|
3
|
+
import { Text } from '../../Text/Text.js';
|
|
4
|
+
import styles from '../PhoneInput.module.scss.js';
|
|
5
|
+
import { SVG_BASE_URL } from '../constants.js';
|
|
6
|
+
|
|
7
|
+
const SelectedCountry = ({ selectedCountry }) => {
|
|
8
|
+
return (selectedCountry === null || selectedCountry === undefined ? undefined : selectedCountry.countryFlag) ? (React__default.createElement(Image, { className: styles.countryFlagSVG, src: `${SVG_BASE_URL}${selectedCountry.countryFlag}.svg`, alt: `${selectedCountry.country} country code selected` })) : (React__default.createElement(Text, null, selectedCountry === null || selectedCountry === undefined ? undefined : selectedCountry.countryCode));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { SelectedCountry };
|
|
12
|
+
//# sourceMappingURL=SelectedCountry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectedCountry.js","sources":["../../../../src/components/PhoneInput/components/SelectedCountry.tsx"],"sourcesContent":["import React from 'react';\nimport { Image } from '../../Image';\nimport { Text } from '../../Text';\nimport { InternationalCode } from '../types';\nimport styles from '../PhoneInput.module.scss';\nimport { SVG_BASE_URL } from '../constants';\n\nexport const SelectedCountry = ({ selectedCountry }: { selectedCountry: InternationalCode }) => {\n return selectedCountry?.countryFlag ? (\n <Image\n className={styles.countryFlagSVG}\n src={`${SVG_BASE_URL}${selectedCountry.countryFlag}.svg`}\n alt={`${selectedCountry.country} country code selected`}\n />\n ) : (\n <Text>{selectedCountry?.countryCode}</Text>\n );\n};\n"],"names":["React"],"mappings":";;;;;;MAOa,eAAe,GAAG,CAAC,EAAE,eAAe,EAA0C,KAAI;IAC7F,OAAO,CAAA,eAAe,KAAA,IAAA,IAAf,eAAe,KAAA,SAAA,GAAA,SAAA,GAAf,eAAe,CAAE,WAAW,KACjCA,cAAA,CAAA,aAAA,CAAC,KAAK,EACJ,EAAA,SAAS,EAAE,MAAM,CAAC,cAAc,EAChC,GAAG,EAAE,CAAA,EAAG,YAAY,CAAA,EAAG,eAAe,CAAC,WAAW,CAAM,IAAA,CAAA,EACxD,GAAG,EAAE,CAAG,EAAA,eAAe,CAAC,OAAO,CAAwB,sBAAA,CAAA,EAAA,CACvD,KAEFA,cAAC,CAAA,aAAA,CAAA,IAAI,EAAE,IAAA,EAAA,eAAe,KAAf,IAAA,IAAA,eAAe,KAAf,SAAA,GAAA,SAAA,GAAA,eAAe,CAAE,WAAW,CAAQ,CAC5C;AACH;;;;"}
|