@pega/cosmos-react-core 3.0.0-dev.10.0 → 3.0.0-dev.12.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/lib/components/Currency/CurrencyDisplay.d.ts.map +1 -1
- package/lib/components/Currency/CurrencyDisplay.js +2 -2
- package/lib/components/Currency/CurrencyDisplay.js.map +1 -1
- package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
- package/lib/components/Currency/CurrencyInput.js +64 -28
- package/lib/components/Currency/CurrencyInput.js.map +1 -1
- package/lib/components/Currency/utils.d.ts +6 -16
- package/lib/components/Currency/utils.d.ts.map +1 -1
- package/lib/components/Currency/utils.js +47 -49
- package/lib/components/Currency/utils.js.map +1 -1
- package/lib/components/Icon/iconNames.d.ts +1 -1
- package/lib/components/Icon/iconNames.d.ts.map +1 -1
- package/lib/components/Icon/iconNames.js +0 -1
- package/lib/components/Icon/iconNames.js.map +1 -1
- package/lib/components/Icon/icons/script.icon.d.ts +1 -1
- package/lib/components/Icon/icons/script.icon.d.ts.map +1 -1
- package/lib/components/Icon/icons/script.icon.js +3 -3
- package/lib/components/Icon/icons/script.icon.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.js +11 -10
- package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.d.ts +3 -1
- package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
- package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
- package/lib/components/Menu/Menu.d.ts.map +1 -1
- package/lib/components/Menu/Menu.js +2 -1
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Number/NumberInput.d.ts.map +1 -1
- package/lib/components/Number/NumberInput.js +19 -15
- package/lib/components/Number/NumberInput.js.map +1 -1
- package/lib/components/Number/NumberInput.styles.d.ts +2 -3
- package/lib/components/Number/NumberInput.styles.d.ts.map +1 -1
- package/lib/components/Number/NumberInput.styles.js +1 -2
- package/lib/components/Number/NumberInput.styles.js.map +1 -1
- package/lib/components/Number/NumberInput.types.d.ts +1 -4
- package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
- package/lib/components/Number/NumberInput.types.js.map +1 -1
- package/lib/components/Number/utils.d.ts +6 -4
- package/lib/components/Number/utils.d.ts.map +1 -1
- package/lib/components/Number/utils.js +39 -18
- package/lib/components/Number/utils.js.map +1 -1
- package/lib/components/Popover/Popover.d.ts.map +1 -1
- package/lib/components/Popover/Popover.js +0 -6
- package/lib/components/Popover/Popover.js.map +1 -1
- package/lib/components/Popover/Popover.styles.d.ts.map +1 -1
- package/lib/components/Popover/Popover.styles.js +12 -57
- package/lib/components/Popover/Popover.styles.js.map +1 -1
- package/lib/hooks/useAutoResize.d.ts.map +1 -1
- package/lib/hooks/useAutoResize.js +4 -3
- package/lib/hooks/useAutoResize.js.map +1 -1
- package/lib/hooks/useI18n.d.ts +6 -2
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/i18n/default.d.ts +6 -2
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +8 -3
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +12 -4
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/package.json +2 -2
- package/lib/components/Currency/currencyCodes.d.ts +0 -3
- package/lib/components/Currency/currencyCodes.d.ts.map +0 -1
- package/lib/components/Currency/currencyCodes.js +0 -182
- package/lib/components/Currency/currencyCodes.js.map +0 -1
- package/lib/components/Icon/icons/script-solid.icon.d.ts +0 -4
- package/lib/components/Icon/icons/script-solid.icon.d.ts.map +0 -1
- package/lib/components/Icon/icons/script-solid.icon.js +0 -6
- package/lib/components/Icon/icons/script-solid.icon.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyDisplay.tsx"],"names":[],"mapp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AAE;QAClB,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;QACtC;;;WAGG;QACH,QAAQ,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC;QACxC;;;WAGG;QACH,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;QAClC;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB;;WAEG;QACH,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;IACF,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,GAAG,YAAY,CAsD3E,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { useConfiguration } from '../../hooks';
|
|
4
4
|
import VisuallyHiddenText from '../VisuallyHiddenText';
|
|
5
|
-
import { formatCurrency,
|
|
5
|
+
import { formatCurrency, isValidCurrency } from './utils';
|
|
6
6
|
const CurrencyDisplay = forwardRef(({ value, currencyISOCode, formattingOptions: { currency = 'symbol', negative = 'minus-sign', notation = 'standard', groupSeparators = true, fractionDigits } = {}, ...restProps }, ref) => {
|
|
7
7
|
const { locale } = useConfiguration();
|
|
8
|
-
const options =
|
|
8
|
+
const options = currencyISOCode && isValidCurrency(currencyISOCode)
|
|
9
9
|
? {
|
|
10
10
|
style: 'currency',
|
|
11
11
|
currency: currencyISOCode,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyDisplay.js","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyDisplay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAG5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa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G,KAAM,SAAS,YAC1B,KAAK,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CACtB,8BACE,8BAAkB,MAAM,YAAE,cAAc,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAQ,EAC5E,KAAC,kBAAkB,cAChB,cAAc,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,GACnC,IACpB,CACJ,CAAC,CAAC,CAAC,CACF,8BAAkB,MAAM,6BAAsB,CAC/C,GACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\n\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport { useConfiguration } from '../../hooks';\nimport VisuallyHiddenText from '../VisuallyHiddenText';\n\nimport { formatCurrency, isValidCurrency } from './utils';\n\nexport interface CurrencyDisplayProps extends BaseProps, NoChildrenProp {\n /** Number value. */\n value?: number | bigint;\n /** Three letter currency shorthand ISO code. If not provided or invalid, component renders only the number. */\n currencyISOCode?: string;\n /** Options to define formatting. */\n formattingOptions?: {\n currency?: 'symbol' | 'code' | 'name';\n /**\n * Determines negative value notation: using minus sign or parentheses.\n * @default 'minus-sign'\n */\n negative?: 'minus-sign' | 'parentheses';\n /**\n * Value display notation.\n * @default 'standard'\n */\n notation?: 'standard' | 'compact';\n /**\n * Fixed number of fraction digits. Maximum is 20, default is currency dependant.\n * @default variable\n */\n fractionDigits?: number;\n /** Determines whether group separators should be shown.\n * @default true\n */\n groupSeparators?: boolean;\n };\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLAnchorElement>;\n}\n\nconst CurrencyDisplay: FunctionComponent<CurrencyDisplayProps & ForwardProps> = forwardRef(\n (\n {\n value,\n currencyISOCode,\n formattingOptions: {\n currency = 'symbol',\n negative = 'minus-sign',\n notation = 'standard',\n groupSeparators = true,\n fractionDigits\n } = {},\n ...restProps\n }: PropsWithoutRef<CurrencyDisplayProps>,\n ref: CurrencyDisplayProps['ref']\n ) => {\n const { locale } = useConfiguration();\n\n const options =\n currencyISOCode && isValidCurrency(currencyISOCode)\n ? ({\n style: 'currency',\n currency: currencyISOCode,\n currencyDisplay: currency,\n useGrouping: groupSeparators,\n notation,\n currencySign: negative === 'parentheses' ? 'accounting' : 'standard',\n minimumFractionDigits: fractionDigits,\n maximumFractionDigits: fractionDigits\n } as Intl.NumberFormatOptions)\n : undefined;\n\n const srOptions = {\n ...options,\n useGrouping: false,\n currencySign: 'standard',\n currencyDisplay: 'name'\n };\n\n return (\n <span ref={ref} {...restProps}>\n {value || value === 0 ? (\n <>\n <span aria-hidden='true'>{formatCurrency(value, { locale, options })}</span>\n <VisuallyHiddenText>\n {formatCurrency(value, { locale, options: srOptions })}\n </VisuallyHiddenText>\n </>\n ) : (\n <span aria-hidden='true'>––</span>\n )}\n </span>\n );\n }\n);\n\nexport default CurrencyDisplay;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyInput.d.ts","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CurrencyInput.d.ts","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAOlB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAgB3C,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAGvD,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,GAAG,YAAY,CA8HvE,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,39 +1,75 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useCallback, useMemo } from 'react';
|
|
3
3
|
import FormField from '../FormField';
|
|
4
|
-
import { useConfiguration, useUID } from '../../hooks';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
4
|
+
import { useConfiguration, useConsolidatedRef, useI18n, useInputFormatter, useUID } from '../../hooks';
|
|
5
|
+
import { getCleanedValue, getDecimalSign, getDecrementedValue, getIncrementedValue } from '../Number/utils';
|
|
6
|
+
import Input from '../Input';
|
|
7
|
+
import { getCurrencyMaximumFractionDigits, getFormattedValue, isValidCurrency } from './utils';
|
|
7
8
|
const CurrencyInput = forwardRef((props, ref) => {
|
|
8
9
|
const uid = useUID();
|
|
9
|
-
const { id = uid, status, label, labelHidden, info, required, disabled, readOnly, value = '', onBlur, onFocus, showDecimal = true,
|
|
10
|
+
const { id = uid, status, label, labelHidden, info, required, disabled, readOnly, value = '', onChange, onBlur, onFocus, currencyISOCode, showDecimal = true, showGroupSeparators = true, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER, step = 1, alwaysShowISOCode = false, ...restProps } = props;
|
|
10
11
|
const { locale } = useConfiguration();
|
|
11
|
-
const
|
|
12
|
-
const
|
|
12
|
+
const t = useI18n();
|
|
13
|
+
const inputRef = useConsolidatedRef(ref);
|
|
14
|
+
const validCurrencyISOCode = useMemo(() => (currencyISOCode && isValidCurrency(currencyISOCode) ? currencyISOCode : undefined), [currencyISOCode]);
|
|
13
15
|
const maximumFractionDigits = useMemo(() => getCurrencyMaximumFractionDigits(locale, validCurrencyISOCode), [locale, validCurrencyISOCode]);
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
+
const numberOfDecimals = showDecimal ? maximumFractionDigits : 0;
|
|
17
|
+
const decimalSign = useMemo(() => getDecimalSign(locale), [locale]);
|
|
18
|
+
const formatValue = useCallback(number => {
|
|
19
|
+
return getFormattedValue(number, locale, validCurrencyISOCode, {
|
|
20
|
+
showGroupSeparators,
|
|
21
|
+
showAs: alwaysShowISOCode ? 'code' : 'symbol',
|
|
22
|
+
numberOfDecimals
|
|
23
|
+
});
|
|
24
|
+
}, [showDecimal, numberOfDecimals, showGroupSeparators, locale, validCurrencyISOCode]);
|
|
25
|
+
const onInputChange = (e) => {
|
|
26
|
+
const inputValue = e.target.value;
|
|
27
|
+
const cleanedInputValue = getCleanedValue(inputValue, decimalSign, numberOfDecimals);
|
|
28
|
+
if (cleanedInputValue === value)
|
|
16
29
|
return;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
onChange(cleanedInputValue);
|
|
31
|
+
};
|
|
32
|
+
const onKeyDown = (e) => {
|
|
33
|
+
if (readOnly)
|
|
34
|
+
return;
|
|
35
|
+
const input = e.currentTarget;
|
|
36
|
+
switch (e.key) {
|
|
37
|
+
case 'ArrowUp':
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
onChange(getIncrementedValue(value, min, max, step));
|
|
40
|
+
break;
|
|
41
|
+
case 'ArrowDown':
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
onChange(getDecrementedValue(value, min, max, step));
|
|
44
|
+
break;
|
|
45
|
+
case decimalSign:
|
|
46
|
+
if (input.value.includes(decimalSign)) {
|
|
47
|
+
if (input.selectionStart && input.value.charAt(input.selectionStart) === decimalSign) {
|
|
48
|
+
input.setSelectionRange(input.selectionStart + 1, input.selectionStart + 1);
|
|
49
|
+
}
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
}
|
|
52
|
+
break;
|
|
53
|
+
case '-':
|
|
54
|
+
if (value.startsWith('-'))
|
|
55
|
+
e.preventDefault();
|
|
56
|
+
break;
|
|
57
|
+
default:
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const onInputFocusEvent = (e) => {
|
|
61
|
+
let parsableValue = value;
|
|
62
|
+
if (validCurrencyISOCode && !Number.isNaN(parseFloat(value))) {
|
|
63
|
+
const [integer, fraction = ''] = value.split('.');
|
|
64
|
+
parsableValue = `${integer}.${fraction.padEnd(maximumFractionDigits, '0')}`;
|
|
65
|
+
}
|
|
66
|
+
if (e.type === 'focus')
|
|
67
|
+
onFocus?.(parsableValue);
|
|
68
|
+
else
|
|
69
|
+
onBlur?.(parsableValue);
|
|
70
|
+
};
|
|
71
|
+
const formattedValue = useInputFormatter(inputRef, value, formatValue, `\\p{N}${decimalSign}-`);
|
|
72
|
+
const Comp = (_jsx(Input, { ...{ onChange: onInputChange, id, readOnly, required, disabled, status, ...restProps }, inputMode: 'numeric', ref: inputRef, value: formattedValue, onKeyDown: onKeyDown, onFocus: onInputFocusEvent, onBlur: onInputFocusEvent, "aria-label": `${label}. ${validCurrencyISOCode ? t('measured_in', [validCurrencyISOCode]) : ''}`, maxLength: 16 }));
|
|
37
73
|
return label ? (_jsx(FormField, { ...{ label, labelHidden, id, info, status, required, disabled }, children: Comp })) : (Comp);
|
|
38
74
|
});
|
|
39
75
|
export default CurrencyInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencyInput.js","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CurrencyInput.js","sourceRoot":"","sources":["../../../src/components/Currency/CurrencyInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAGV,WAAW,EACX,OAAO,EAIR,MAAM,OAAO,CAAC;AAEf,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,EACP,iBAAiB,EACjB,MAAM,EACP,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,MAAM,U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E,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,EACvF,SAAS,EAAC,SAAS,EACnB,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,cAAc,EACrB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,iBAAiB,gBACb,GAAG,KAAK,KAClB,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,EACpE,EAAE,EACF,SAAS,EAAE,EAAE,GACb,CACH,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,SAAS,OAAK,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,YACxE,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n PropsWithoutRef,\n useCallback,\n useMemo,\n KeyboardEvent,\n ChangeEvent,\n FocusEvent\n} from 'react';\n\nimport FormField from '../FormField';\nimport { ForwardProps } from '../../types';\nimport {\n useConfiguration,\n useConsolidatedRef,\n useI18n,\n useInputFormatter,\n useUID\n} from '../../hooks';\nimport {\n getCleanedValue,\n getDecimalSign,\n getDecrementedValue,\n getIncrementedValue\n} from '../Number/utils';\nimport Input from '../Input';\n\nimport CurrencyInputProps from './CurrencyInput.types';\nimport { getCurrencyMaximumFractionDigits, getFormattedValue, isValidCurrency } from './utils';\n\nconst CurrencyInput: FunctionComponent<CurrencyInputProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<CurrencyInputProps>, ref: CurrencyInputProps['ref']) => {\n const uid = useUID();\n const {\n id = uid,\n status,\n label,\n labelHidden,\n info,\n required,\n disabled,\n readOnly,\n value = '',\n onChange,\n onBlur,\n onFocus,\n currencyISOCode,\n showDecimal = true,\n showGroupSeparators = true,\n min = Number.MIN_SAFE_INTEGER,\n max = Number.MAX_SAFE_INTEGER,\n step = 1,\n alwaysShowISOCode = false,\n ...restProps\n } = props;\n\n const { locale } = useConfiguration();\n const t = useI18n();\n const inputRef = useConsolidatedRef(ref);\n\n const validCurrencyISOCode = useMemo(\n () => (currencyISOCode && isValidCurrency(currencyISOCode) ? currencyISOCode : undefined),\n [currencyISOCode]\n );\n\n const maximumFractionDigits = useMemo(\n () => getCurrencyMaximumFractionDigits(locale, validCurrencyISOCode),\n [locale, validCurrencyISOCode]\n );\n\n const numberOfDecimals = showDecimal ? maximumFractionDigits : 0;\n\n const decimalSign = useMemo(() => getDecimalSign(locale), [locale]);\n\n const formatValue = useCallback(\n number => {\n return getFormattedValue(number, locale, validCurrencyISOCode, {\n showGroupSeparators,\n showAs: alwaysShowISOCode ? 'code' : 'symbol',\n numberOfDecimals\n });\n },\n [showDecimal, numberOfDecimals, showGroupSeparators, locale, validCurrencyISOCode]\n );\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n const inputValue = e.target.value;\n const cleanedInputValue = getCleanedValue(inputValue, decimalSign, numberOfDecimals);\n if (cleanedInputValue === value) return;\n onChange(cleanedInputValue);\n };\n\n const onKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n if (readOnly) return;\n const input = e.currentTarget;\n switch (e.key) {\n case 'ArrowUp':\n e.preventDefault();\n onChange(getIncrementedValue(value, min, max, step));\n break;\n case 'ArrowDown':\n e.preventDefault();\n onChange(getDecrementedValue(value, min, max, step));\n break;\n case decimalSign:\n if (input.value.includes(decimalSign)) {\n if (input.selectionStart && input.value.charAt(input.selectionStart) === decimalSign) {\n input.setSelectionRange(input.selectionStart + 1, input.selectionStart + 1);\n }\n e.preventDefault();\n }\n break;\n case '-':\n if (value.startsWith('-')) e.preventDefault();\n break;\n default:\n }\n };\n\n const onInputFocusEvent = (e: FocusEvent<HTMLInputElement>) => {\n let parsableValue = value;\n if (validCurrencyISOCode && !Number.isNaN(parseFloat(value))) {\n const [integer, fraction = ''] = value.split('.');\n parsableValue = `${integer}.${fraction.padEnd(maximumFractionDigits, '0')}`;\n }\n\n if (e.type === 'focus') onFocus?.(parsableValue);\n else onBlur?.(parsableValue);\n };\n\n const formattedValue = useInputFormatter(inputRef, value, formatValue, `\\\\p{N}${decimalSign}-`);\n\n const Comp = (\n <Input\n {...{ onChange: onInputChange, id, readOnly, required, disabled, status, ...restProps }}\n inputMode='numeric'\n ref={inputRef}\n value={formattedValue}\n onKeyDown={onKeyDown}\n onFocus={onInputFocusEvent}\n onBlur={onInputFocusEvent}\n aria-label={`${label}. ${\n validCurrencyISOCode ? t('measured_in', [validCurrencyISOCode]) : ''\n }`}\n maxLength={16}\n />\n );\n\n return label ? (\n <FormField {...{ label, labelHidden, id, info, status, required, disabled }}>\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n }\n);\n\nexport default CurrencyInput;\n"]}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export declare const isValidCurrency: (currency: string) => boolean;
|
|
2
|
+
export declare const getFormattedValue: (value: string, locale: string, currency?: string | undefined, { showGroupSeparators, showAs, numberOfDecimals }?: {
|
|
3
|
+
showGroupSeparators?: boolean | undefined;
|
|
4
|
+
showAs?: "symbol" | "code" | undefined;
|
|
5
|
+
numberOfDecimals?: number | undefined;
|
|
6
|
+
}) => string;
|
|
6
7
|
export declare function getCurrencyMaximumFractionDigits(locale: string, currencyISOCode?: string): number;
|
|
7
|
-
export declare function isCurrencyISOCodeValid(currencyISOCode?: string): boolean;
|
|
8
|
-
export declare function addTrailingZeros(valueToFormat: string, maximumFractionDigits: number, currencyISOCode?: string): string;
|
|
9
|
-
declare type DisplayValueParams = {
|
|
10
|
-
value: string;
|
|
11
|
-
locale: string;
|
|
12
|
-
alwaysShowISOCode: boolean;
|
|
13
|
-
showDecimal: boolean;
|
|
14
|
-
showGroupSeparators: boolean;
|
|
15
|
-
currencyISOCode?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare function getDisplayValue({ value, locale, alwaysShowISOCode, showDecimal, showGroupSeparators, currencyISOCode }: DisplayValueParams): string;
|
|
18
8
|
interface CurrencyFormatOptions {
|
|
19
9
|
locale: string;
|
|
20
10
|
options?: Intl.NumberFormatOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Currency/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Currency/utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,aAAc,MAAM,YAQ/C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UACrB,MAAM,UACL,MAAM;;;;YAiDf,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAOjG;AAED,UAAU,qBAAqB;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;CACpC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,qBAAqB,UAIhG"}
|
|
@@ -1,24 +1,52 @@
|
|
|
1
1
|
import { NUMBER_MAX_DECIMAL_PLACES } from '../Number/NumberInput.types';
|
|
2
|
-
import { getFormattedValue } from '../Number/utils';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
import { getFormattedValue as getNumberFormattedValue } from '../Number/utils';
|
|
3
|
+
export const isValidCurrency = (currency) => {
|
|
4
|
+
try {
|
|
5
|
+
// eslint-disable-next-line no-new
|
|
6
|
+
new Intl.NumberFormat(undefined, { style: 'currency', currency });
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export const getFormattedValue = (value, locale, currency, { showGroupSeparators = true, showAs = 'code', numberOfDecimals } = {}) => {
|
|
14
|
+
if (!currency)
|
|
15
|
+
return getNumberFormattedValue(value, locale, undefined, {
|
|
16
|
+
showGroupSeparators,
|
|
17
|
+
numberOfDecimals
|
|
18
|
+
});
|
|
19
|
+
const isCurrency = isValidCurrency(currency);
|
|
20
|
+
const [integer, fractionPart] = value.split('.', 2);
|
|
21
|
+
const formatter = new Intl.NumberFormat(locale, {
|
|
22
|
+
useGrouping: showGroupSeparators,
|
|
23
|
+
maximumFractionDigits: numberOfDecimals,
|
|
24
|
+
minimumFractionDigits: numberOfDecimals,
|
|
25
|
+
...(isCurrency
|
|
26
|
+
? {
|
|
27
|
+
style: 'currency',
|
|
28
|
+
currency,
|
|
29
|
+
currencyDisplay: showAs
|
|
17
30
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
31
|
+
: {})
|
|
32
|
+
});
|
|
33
|
+
let formatted = value;
|
|
34
|
+
if (value && !Number.isNaN(parseFloat(integer))) {
|
|
35
|
+
const endsWithDot = fractionPart === '';
|
|
36
|
+
const valueNumber = Number(endsWithDot ? `${value}1` : value);
|
|
37
|
+
formatted = formatter.formatToParts(valueNumber).reduce((result, { type, value: part }) => {
|
|
38
|
+
if (type === 'fraction' && endsWithDot)
|
|
39
|
+
return result;
|
|
40
|
+
return result + part;
|
|
41
|
+
}, '');
|
|
42
|
+
}
|
|
43
|
+
else if (currency) {
|
|
44
|
+
formatted = formatter
|
|
45
|
+
.formatToParts(value.startsWith('-') ? -1 : 1)
|
|
46
|
+
.reduce((result, { type, value: part }) => ['currency', 'minusSign'].includes(type) ? result + part : result, '');
|
|
47
|
+
}
|
|
48
|
+
return formatted;
|
|
49
|
+
};
|
|
22
50
|
export function getCurrencyMaximumFractionDigits(locale, currencyISOCode) {
|
|
23
51
|
return currencyISOCode
|
|
24
52
|
? new Intl.NumberFormat(locale, {
|
|
@@ -27,36 +55,6 @@ export function getCurrencyMaximumFractionDigits(locale, currencyISOCode) {
|
|
|
27
55
|
}).resolvedOptions().maximumFractionDigits
|
|
28
56
|
: NUMBER_MAX_DECIMAL_PLACES;
|
|
29
57
|
}
|
|
30
|
-
export function isCurrencyISOCodeValid(currencyISOCode) {
|
|
31
|
-
return currencyISOCode ? currencyCodeList.has(currencyISOCode) : false;
|
|
32
|
-
}
|
|
33
|
-
export function addTrailingZeros(valueToFormat, maximumFractionDigits, currencyISOCode) {
|
|
34
|
-
let formattedValue = valueToFormat;
|
|
35
|
-
if (currencyISOCode && !Number.isNaN(parseFloat(valueToFormat))) {
|
|
36
|
-
const [integer, fraction = ''] = valueToFormat.split('.');
|
|
37
|
-
formattedValue = `${integer}.${fraction.padEnd(maximumFractionDigits, '0')}`;
|
|
38
|
-
}
|
|
39
|
-
return formattedValue;
|
|
40
|
-
}
|
|
41
|
-
export function getDisplayValue({ value, locale, alwaysShowISOCode, showDecimal, showGroupSeparators, currencyISOCode }) {
|
|
42
|
-
const validCurrencyISOCode = isCurrencyISOCodeValid(currencyISOCode)
|
|
43
|
-
? currencyISOCode
|
|
44
|
-
: undefined;
|
|
45
|
-
const { symbol, symbolPlacement } = getCurrencySymbol(locale, alwaysShowISOCode, validCurrencyISOCode);
|
|
46
|
-
const maximumFractionDigits = getCurrencyMaximumFractionDigits(locale, validCurrencyISOCode);
|
|
47
|
-
let sign = '';
|
|
48
|
-
let formattedValue = getFormattedValue(!showDecimal
|
|
49
|
-
? value.split('.')[0]
|
|
50
|
-
: addTrailingZeros(value, maximumFractionDigits, validCurrencyISOCode), locale, showGroupSeparators, maximumFractionDigits);
|
|
51
|
-
if (formattedValue.startsWith('-')) {
|
|
52
|
-
sign = '-';
|
|
53
|
-
formattedValue = formattedValue.substring(1);
|
|
54
|
-
}
|
|
55
|
-
let symbolBefore = symbolPlacement === 'before' ? symbol : '';
|
|
56
|
-
symbolBefore += symbolBefore === currencyISOCode ? ' ' : '';
|
|
57
|
-
const symbolAfter = symbolPlacement === 'after' && symbol ? ` ${symbol}` : '';
|
|
58
|
-
return `${sign}${symbolBefore}${formattedValue}${symbolAfter}`;
|
|
59
|
-
}
|
|
60
58
|
export function formatCurrency(value, { locale, options }) {
|
|
61
59
|
const formatter = new Intl.NumberFormat(locale, options);
|
|
62
60
|
return formatter.format(value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/Currency/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/Currency/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAgB,EAAE,EAAE;IAClD,IAAI;QACF,kCAAkC;QAClC,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC;KACb;IAAC,MAAM;QACN,OAAO,KAAK,CAAC;KACd;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,KAAa,EACb,MAAc,EACd,QAAiB,EACjB,EACE,mBAAmB,G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E,EAAE,CAAC,CAAC;KACR;SAAM,IAAI,QAAQ,EAAE;QACnB,SAAS,GAAG,SAAS;aAClB,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAC7C,MAAM,CACL,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAChC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,EACnE,EAAE,CACH,CAAC;KACL;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,UAAU,gCAAgC,CAAC,MAAc,EAAE,eAAwB;IACvF,OAAO,eAAe;QACpB,CAAC,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YAC5B,KAAK,EAAE,UAAU;YACjB,QAAQ,EAAE,eAAe;SAC1B,CAAC,CAAC,eAAe,EAAE,CAAC,qBAAqB;QAC5C,CAAC,CAAC,yBAAyB,CAAC;AAChC,CAAC;AAOD,MAAM,UAAU,cAAc,CAAC,KAAsB,EAAE,EAAE,MAAM,EAAE,OAAO,EAAyB;IAC/F,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzD,OAAO,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC","sourcesContent":["import { NUMBER_MAX_DECIMAL_PLACES } from '../Number/NumberInput.types';\nimport { getFormattedValue as getNumberFormattedValue } from '../Number/utils';\n\nexport const isValidCurrency = (currency: string) => {\n try {\n // eslint-disable-next-line no-new\n new Intl.NumberFormat(undefined, { style: 'currency', currency });\n return true;\n } catch {\n return false;\n }\n};\n\nexport const getFormattedValue = (\n value: string,\n locale: string,\n currency?: string,\n {\n showGroupSeparators = true,\n showAs = 'code',\n numberOfDecimals\n }: { showGroupSeparators?: boolean; showAs?: 'code' | 'symbol'; numberOfDecimals?: number } = {}\n) => {\n if (!currency)\n return getNumberFormattedValue(value, locale, undefined, {\n showGroupSeparators,\n numberOfDecimals\n });\n\n const isCurrency = isValidCurrency(currency);\n const [integer, fractionPart] = value.split('.', 2) as [string, string?];\n\n const formatter = new Intl.NumberFormat(locale, {\n useGrouping: showGroupSeparators,\n maximumFractionDigits: numberOfDecimals,\n minimumFractionDigits: numberOfDecimals,\n ...(isCurrency\n ? {\n style: 'currency',\n currency,\n currencyDisplay: showAs\n }\n : {})\n });\n\n let formatted = value;\n\n if (value && !Number.isNaN(parseFloat(integer))) {\n const endsWithDot = fractionPart === '';\n const valueNumber = Number(endsWithDot ? `${value}1` : value);\n formatted = formatter.formatToParts(valueNumber).reduce((result, { type, value: part }) => {\n if (type === 'fraction' && endsWithDot) return result;\n return result + part;\n }, '');\n } else if (currency) {\n formatted = formatter\n .formatToParts(value.startsWith('-') ? -1 : 1)\n .reduce(\n (result, { type, value: part }) =>\n ['currency', 'minusSign'].includes(type) ? result + part : result,\n ''\n );\n }\n return formatted;\n};\n\nexport function getCurrencyMaximumFractionDigits(locale: string, currencyISOCode?: string): number {\n return currencyISOCode\n ? new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: currencyISOCode\n }).resolvedOptions().maximumFractionDigits\n : NUMBER_MAX_DECIMAL_PLACES;\n}\n\ninterface CurrencyFormatOptions {\n locale: string;\n options?: Intl.NumberFormatOptions;\n}\n\nexport function formatCurrency(value: number | bigint, { locale, options }: CurrencyFormatOptions) {\n const formatter = new Intl.NumberFormat(locale, options);\n\n return formatter.format(value);\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const iconNames: readonly ["1-1-solid", "1-1", "a11y", "ai-assist", "align-center", "align-item-center-solid", "align-item-center", "align-item-down-solid", "align-item-down", "align-item-left-solid", "align-item-left", "align-item-right-solid", "align-item-right", "align-item-up-solid", "align-item-up", "align-item-vert-center-solid", "align-item-vert-center", "align-left", "align-right", "amazon", "ambulance-solid", "ambulance", "analytics-bad-solid", "analytics-bad", "analytics-good-solid", "analytics-good", "analytics-neutral-solid", "analytics-neutral", "antenna", "app-solid", "app", "archery", "archive-solid", "archive", "arrow-above-or", "arrow-above-row-left", "arrow-above-row-right", "arrow-below-or", "arrow-below-row-left", "arrow-below-row-right", "arrow-bend-left", "arrow-bend-right", "arrow-between-column-down", "arrow-down-between-left-column", "arrow-down-between-right-column", "arrow-down-row", "arrow-down", "arrow-in", "arrow-left-column", "arrow-left-right", "arrow-left", "arrow-micro-down", "arrow-micro-left", "arrow-micro-right", "arrow-micro-up-down", "arrow-micro-up", "arrow-out", "arrow-right-between-rows", "arrow-right-column", "arrow-right", "arrow-up-down", "arrow-up-row", "arrow-up", "atom", "backspace-solid", "backspace", "badge-solid", "badge", "bank-solid", "bank", "bars", "battery-charge-solid", "battery-charge", "battery-solid", "battery", "bell-off-solid", "bell-off", "bell-solid", "bell", "blocks-solid", "blocks", "bluetooth", "bolt-solid", "bolt", "book-open-solid", "book-open", "book-solid", "book", "bookmark-solid", "bookmark", "bounding-box-solid", "bounding-box", "box-3-solid", "box-3", "box-4-solid", "box-4", "box-crosshair", "box-dashed-labeled-solid", "box-dashed-labeled", "box-grid", "box-lines-2-solid", "box-lines-2", "box", "browser-solid", "browser", "bug-solid", "bug", "building-2-solid", "building-2", "building-3-solid", "building-3", "building-solid", "building", "bulb-solid", "bulb", "calculator-solid", "calculator", "calendar-empty-solid", "calendar-empty", "calendar-plus-solid", "calendar-plus", "calendar-range", "calendar-solid", "calendar", "camera-solid", "camera", "cancel", "car-solid", "car", "card-stack-solid", "card-stack", "caret-2-left", "caret-2-right", "caret-down", "caret-left", "caret-right", "caret-up", "cart-close-solid", "cart-close", "cart-solid", "cart", "case-medical-solid", "case-medical", "case-solid", "case", "chain-solid", "chain-up", "chain", "chat-help-solid", "chat-help", "chat-sentiment-solid", "chat-sentiment", "chat-solid", "chat-typing-solid", "chat-typing", "chat", "chats-solid", "chats", "check", "checkbook", "chevron-solid", "chevron", "church-solid", "church", "circle-mixed-down", "circle-mixed-left", "circle-mixed-up", "circle-solid", "circle-stacked-mixed", "circle-stacked-solid", "circle-stacked", "circle", "city-solid", "city", "clipboard-check-solid", "clipboard-check", "clipboard-data-solid", "clipboard-data", "clipboard-medical-solid", "clipboard-medical", "clipboard-plus-solid", "clipboard-plus", "clipboard-solid", "clipboard", "clock-solid", "clock", "cloud-down", "cloud-issue-solid", "cloud-issue", "cloud-solid", "cloud-up", "cloud", "cloudy-solid", "cloudy", "code", "column-delete", "column-insert", "column-no-left", "column-no-right", "column-top-fill", "columns-solid", "columns", "command", "compass-solid", "compass", "controller-solid", "controller", "copy-solid", "copy", "credit-solid", "credit", "crop", "crosshairs", "cuppa-solid", "cuppa", "dataviz-area-multi", "dataviz-area-stacked", "dataviz-area", "dataviz-bar-clustered", "dataviz-bar-stacked", "dataviz-bar", "dataviz-bubble", "dataviz-column-clustered", "dataviz-column-stacked", "dataviz-column", "dataviz-combo", "dataviz-datetime-field", "dataviz-donut", "dataviz-flip-counter", "dataviz-forecast", "dataviz-funnel-solid", "dataviz-funnel", "dataviz-gauge", "dataviz-geo-choropleth", "dataviz-line-multi", "dataviz-line", "dataviz-numeric-field", "dataviz-pareto", "dataviz-pie", "dataviz-pivot-table", "dataviz-radar", "dataviz-scatter", "dataviz-spark", "dataviz-string-field", "dataviz-table-with-bars", "dataviz-table-with-cross", "dataviz-waterfall", "desktop-solid", "desktop", "diamond-solid", "diamond", "disc-stack-solid", "disc-stack", "distribute-item-center-solid", "distribute-item-center", "distribute-item-vert-center-solid", "distribute-item-vert-center", "dna", "dock", "document-check-solid", "document-check", "document-compress-solid", "document-compress", "document-data-solid", "document-doc", "document-download-solid", "document-download", "document-minus-solid", "document-minus", "document-pdf", "document-plus-solid", "document-plus", "document-solid", "document-upload-solid", "document-upload", "document-xls", "document", "documents-check-solid", "documents-check", "documents-data-solid", "documents-data", "documents-solid", "documents", "docusign", "dollar-sign-solid", "dollar-sign", "dot-9-solid", "dot-9", "download", "drag", "drink-solid", "drink", "earth-solid", "earth", "edit-shape-solid", "edit-shape", "erase-solid", "erase", "eye-off-solid", "eye-off", "eye-solid", "eye", "face-blank-solid", "face-blank", "face-happy-solid", "face-happy", "face-sad-solid", "face-sad", "facebook", "farm-solid", "farm", "fast-forward-solid", "fast-forward", "filetype-text", "filter-on", "filter", "fire-solid", "fire", "flag-finish", "flag-solid", "flag-wave-solid", "flag-wave", "flag", "flashlight-solid", "flashlight", "folder-close-solid", "folder-close", "folder-closed-solid", "folder-closed", "folder-dollar-solid", "folder-dollar", "folder-hierarchy-solid", "folder-hierarchy", "folder-nested-solid", "folder-nested", "folder-plus-solid", "folder-plus", "folder-solid", "folder", "folders-solid", "folders", "forward-all-solid", "forward-all", "forward-solid", "forward", "freeze-column", "function", "galaxy", "gauge-solid", "gauge", "gear-solid", "gear", "glasses-solid", "glasses", "globe-solid", "globe", "google", "government-solid", "government", "grad-solid", "grad", "grid-solid", "grid", "hand-solid", "hand", "handshake-solid", "handshake", "hanger", "header", "headline-solid", "headline", "headphone-solid", "headphone", "headset", "heart-mixed", "heart-pulse-solid", "heart-pulse", "heart-solid", "heart", "help-solid", "help", "history-solid", "history", "home-alt-solid", "home-alt", "home-solid", "home", "inbox-data-solid", "inbox-data", "inbox-empty", "inbox-solid", "indent", "infinity", "information-solid", "information", "ink-solid", "ink", "inspect", "interact", "ios-face-id", "ios-finger-id", "key", "keyboard-solid", "keyboard", "knight-solid", "knight", "knobs-alt-solid", "knobs-alt", "knobs-solid", "knobs", "laptop-solid", "laptop", "layers-solid", "layers", "layout-solid", "layout", "leaf-solid", "leaf", "legal", "letter-solid", "letter", "life-ring-solid", "life-ring", "linkedin", "list-number", "list", "location-check-solid", "location-check", "location-solid", "location", "locations-solid", "locations", "lock-closed-solid", "lock-closed", "lock-open-solid", "lock-open", "magnet-solid", "magnet", "mail-check-solid", "mail-check", "mail-plus-solid", "mail-plus", "mail-solid", "mail", "mailbox-solid", "mailbox", "map-sigma-solid", "map-sigma", "map-solid", "map", "material-finger", "medal", "megaphone-solid", "megaphone", "mic-off-solid", "mic-off", "mic-solid", "mic", "minus", "mobile-phone-solid", "mobile-phone", "money-send-solid", "money-send", "money-solid", "money", "monkey-solid", "monkey", "moon-solid", "moon", "more-alt", "more", "move-left-solid", "move-right-solid", "move-up-solid", "moving", "multi-device-solid", "multi-device", "music-solid", "music", "navigation-solid", "navigation", "node-solid", "node", "nodes-down-solid", "nodes-down", "nodes-left-solid", "nodes-left", "nodes-right-solid", "nodes-right", "nodes-up-solid", "nodes-up", "notepad-empty-solid", "notepad-empty", "notepad-solid", "notepad", "notes-solid", "notes", "open", "opportunity-solid", "opportunity", "or-delete", "os-android", "os-apple", "os-windows", "paper-clip", "passbook-solid", "passbook", "pause-solid", "pause", "paypal", "peekpanel-arrow-left-solid", "peekpanel-arrow-left", "peekpanel-arrow-right-solid", "peekpanel-arrow-right", "pega", "pegasus", "pen-solid", "pen", "pencil-solid", "pencil", "person-solid", "person", "phone-call-solid", "phone-call", "phone-disabled-solid", "phone-disabled", "phone-hangup-solid", "phone-hangup", "phone-in-solid", "phone-in", "phone-list-solid", "phone-list", "phone-out-solid", "phone-out", "phone-pause-solid", "phone-pause", "phone-solid", "phone-split-solid", "phone-split", "phone", "picture-solid", "picture", "piggybank-solid", "piggybank", "pin-solid", "pin", "pipeline-solid", "pipeline", "plane-solid", "plane", "plant-solid", "plant", "play-solid", "play", "playbook-solid", "playbook", "plug-solid", "plug", "plus-between-left-column", "plus-between-right-column", "plus-line-above-below", "plus-line-above", "plus-line-below", "plus-line-left", "plus-line-right", "plus", "podium-solid", "podium", "polaris-solid", "polaris", "pong-solid", "pong", "potion-solid", "potion", "power", "print-solid", "print", "processor-solid", "processor", "progress-solid", "progress", "puzzle-solid", "puzzle", "qr", "quill", "rabbit", "radio-solid", "radio", "rain-solid", "rain", "receipt-solid", "receipt", "rectangle-solid", "rectangle", "reply-all-solid", "reply-all", "reply-solid", "reply", "reset", "retweet", "rewind-solid", "rewind", "robot-happy-solid", "robot-happy", "robot-sad-solid", "robot-sad", "robot-solid", "robot", "rocket-solid", "rocket", "roller-solid", "roller", "route-solid", "route", "row-delete", "row-insert", "row-left-fill", "row-right-fill", "row", "scale-down", "scale-up-solid", "scale-up", "school-solid", "school", "scissors", "script-solid", "script", "search-analytics-solid", "search-analytics", "search-case", "search-check", "search-close", "search-minus", "search-org", "search-plus", "search-solid", "search-table", "search", "send-solid", "send", "server-cloud-solid", "server-cloud", "server-solid", "server", "sextant", "share-point-up-solid", "share-point-up", "share-solid", "share", "shield-solid", "shield", "shoe-solid", "shoe", "shuffle", "sigma", "signpost-solid", "signpost", "slideshow-solid", "slideshow", "snail", "snow", "social-solid", "social", "speaker-mute-solid", "speaker-mute", "speaker-on-solid", "speaker-on", "speaker-solid", "speaker", "spellcheck", "square-solid", "square", "star-mixed", "star-solid", "star", "steps-solid", "steps", "stethoscope-solid", "stethoscope", "stoplight-solid", "stoplight", "stopwatch-solid", "stopwatch", "store-solid", "store", "sun-solid", "sun", "swipe-left-solid", "swipe-left", "swipe-right-solid", "swipe-right", "table", "tablet-solid", "tablet", "tag-check-solid", "tag-check", "tag-close-solid", "tag-close", "tag-solid", "tag", "target-solid", "target", "temp-solid", "temp", "thumbs-down-solid", "thumbs-down", "thumbs-up-solid", "thumbs-up", "times", "todo-solid", "todo", "tow-truck-solid", "tow-truck", "tracer-solid", "tracer", "transform", "trash-solid", "trash", "triangle-mixed-left", "triangle-mixed-right", "triangle-solid", "triangle", "tribox-solid", "tribox", "trophy-solid", "trophy", "truck-solid", "truck", "tv-solid", "tv", "twitter", "umbrella-solid", "umbrella", "undo", "undock", "unindent", "upload", "user-check-solid", "user-check", "user-close-solid", "user-close", "user-female-solid", "user-female", "user-list-solid", "user-list", "user-plus-solid", "user-plus", "user-search-solid", "user-search", "user-solid", "user-star-solid", "user-star", "user", "users-solid", "users", "video-solid", "video", "voicemail", "vr-solid", "vr", "walkie-solid", "walkie", "wallet-solid", "wallet", "wand", "warn-solid", "warn", "watch-solid", "watch", "waypoint-solid", "waypoint", "webcam-solid", "webcam", "whatsapp", "wifi-none", "wifi-off", "wifi", "wizard-solid", "wizard", "wrench-solid", "wrench", "youtube"];
|
|
1
|
+
declare const iconNames: readonly ["1-1-solid", "1-1", "a11y", "ai-assist", "align-center", "align-item-center-solid", "align-item-center", "align-item-down-solid", "align-item-down", "align-item-left-solid", "align-item-left", "align-item-right-solid", "align-item-right", "align-item-up-solid", "align-item-up", "align-item-vert-center-solid", "align-item-vert-center", "align-left", "align-right", "amazon", "ambulance-solid", "ambulance", "analytics-bad-solid", "analytics-bad", "analytics-good-solid", "analytics-good", "analytics-neutral-solid", "analytics-neutral", "antenna", "app-solid", "app", "archery", "archive-solid", "archive", "arrow-above-or", "arrow-above-row-left", "arrow-above-row-right", "arrow-below-or", "arrow-below-row-left", "arrow-below-row-right", "arrow-bend-left", "arrow-bend-right", "arrow-between-column-down", "arrow-down-between-left-column", "arrow-down-between-right-column", "arrow-down-row", "arrow-down", "arrow-in", "arrow-left-column", "arrow-left-right", "arrow-left", "arrow-micro-down", "arrow-micro-left", "arrow-micro-right", "arrow-micro-up-down", "arrow-micro-up", "arrow-out", "arrow-right-between-rows", "arrow-right-column", "arrow-right", "arrow-up-down", "arrow-up-row", "arrow-up", "atom", "backspace-solid", "backspace", "badge-solid", "badge", "bank-solid", "bank", "bars", "battery-charge-solid", "battery-charge", "battery-solid", "battery", "bell-off-solid", "bell-off", "bell-solid", "bell", "blocks-solid", "blocks", "bluetooth", "bolt-solid", "bolt", "book-open-solid", "book-open", "book-solid", "book", "bookmark-solid", "bookmark", "bounding-box-solid", "bounding-box", "box-3-solid", "box-3", "box-4-solid", "box-4", "box-crosshair", "box-dashed-labeled-solid", "box-dashed-labeled", "box-grid", "box-lines-2-solid", "box-lines-2", "box", "browser-solid", "browser", "bug-solid", "bug", "building-2-solid", "building-2", "building-3-solid", "building-3", "building-solid", "building", "bulb-solid", "bulb", "calculator-solid", "calculator", "calendar-empty-solid", "calendar-empty", "calendar-plus-solid", "calendar-plus", "calendar-range", "calendar-solid", "calendar", "camera-solid", "camera", "cancel", "car-solid", "car", "card-stack-solid", "card-stack", "caret-2-left", "caret-2-right", "caret-down", "caret-left", "caret-right", "caret-up", "cart-close-solid", "cart-close", "cart-solid", "cart", "case-medical-solid", "case-medical", "case-solid", "case", "chain-solid", "chain-up", "chain", "chat-help-solid", "chat-help", "chat-sentiment-solid", "chat-sentiment", "chat-solid", "chat-typing-solid", "chat-typing", "chat", "chats-solid", "chats", "check", "checkbook", "chevron-solid", "chevron", "church-solid", "church", "circle-mixed-down", "circle-mixed-left", "circle-mixed-up", "circle-solid", "circle-stacked-mixed", "circle-stacked-solid", "circle-stacked", "circle", "city-solid", "city", "clipboard-check-solid", "clipboard-check", "clipboard-data-solid", "clipboard-data", "clipboard-medical-solid", "clipboard-medical", "clipboard-plus-solid", "clipboard-plus", "clipboard-solid", "clipboard", "clock-solid", "clock", "cloud-down", "cloud-issue-solid", "cloud-issue", "cloud-solid", "cloud-up", "cloud", "cloudy-solid", "cloudy", "code", "column-delete", "column-insert", "column-no-left", "column-no-right", "column-top-fill", "columns-solid", "columns", "command", "compass-solid", "compass", "controller-solid", "controller", "copy-solid", "copy", "credit-solid", "credit", "crop", "crosshairs", "cuppa-solid", "cuppa", "dataviz-area-multi", "dataviz-area-stacked", "dataviz-area", "dataviz-bar-clustered", "dataviz-bar-stacked", "dataviz-bar", "dataviz-bubble", "dataviz-column-clustered", "dataviz-column-stacked", "dataviz-column", "dataviz-combo", "dataviz-datetime-field", "dataviz-donut", "dataviz-flip-counter", "dataviz-forecast", "dataviz-funnel-solid", "dataviz-funnel", "dataviz-gauge", "dataviz-geo-choropleth", "dataviz-line-multi", "dataviz-line", "dataviz-numeric-field", "dataviz-pareto", "dataviz-pie", "dataviz-pivot-table", "dataviz-radar", "dataviz-scatter", "dataviz-spark", "dataviz-string-field", "dataviz-table-with-bars", "dataviz-table-with-cross", "dataviz-waterfall", "desktop-solid", "desktop", "diamond-solid", "diamond", "disc-stack-solid", "disc-stack", "distribute-item-center-solid", "distribute-item-center", "distribute-item-vert-center-solid", "distribute-item-vert-center", "dna", "dock", "document-check-solid", "document-check", "document-compress-solid", "document-compress", "document-data-solid", "document-doc", "document-download-solid", "document-download", "document-minus-solid", "document-minus", "document-pdf", "document-plus-solid", "document-plus", "document-solid", "document-upload-solid", "document-upload", "document-xls", "document", "documents-check-solid", "documents-check", "documents-data-solid", "documents-data", "documents-solid", "documents", "docusign", "dollar-sign-solid", "dollar-sign", "dot-9-solid", "dot-9", "download", "drag", "drink-solid", "drink", "earth-solid", "earth", "edit-shape-solid", "edit-shape", "erase-solid", "erase", "eye-off-solid", "eye-off", "eye-solid", "eye", "face-blank-solid", "face-blank", "face-happy-solid", "face-happy", "face-sad-solid", "face-sad", "facebook", "farm-solid", "farm", "fast-forward-solid", "fast-forward", "filetype-text", "filter-on", "filter", "fire-solid", "fire", "flag-finish", "flag-solid", "flag-wave-solid", "flag-wave", "flag", "flashlight-solid", "flashlight", "folder-close-solid", "folder-close", "folder-closed-solid", "folder-closed", "folder-dollar-solid", "folder-dollar", "folder-hierarchy-solid", "folder-hierarchy", "folder-nested-solid", "folder-nested", "folder-plus-solid", "folder-plus", "folder-solid", "folder", "folders-solid", "folders", "forward-all-solid", "forward-all", "forward-solid", "forward", "freeze-column", "function", "galaxy", "gauge-solid", "gauge", "gear-solid", "gear", "glasses-solid", "glasses", "globe-solid", "globe", "google", "government-solid", "government", "grad-solid", "grad", "grid-solid", "grid", "hand-solid", "hand", "handshake-solid", "handshake", "hanger", "header", "headline-solid", "headline", "headphone-solid", "headphone", "headset", "heart-mixed", "heart-pulse-solid", "heart-pulse", "heart-solid", "heart", "help-solid", "help", "history-solid", "history", "home-alt-solid", "home-alt", "home-solid", "home", "inbox-data-solid", "inbox-data", "inbox-empty", "inbox-solid", "indent", "infinity", "information-solid", "information", "ink-solid", "ink", "inspect", "interact", "ios-face-id", "ios-finger-id", "key", "keyboard-solid", "keyboard", "knight-solid", "knight", "knobs-alt-solid", "knobs-alt", "knobs-solid", "knobs", "laptop-solid", "laptop", "layers-solid", "layers", "layout-solid", "layout", "leaf-solid", "leaf", "legal", "letter-solid", "letter", "life-ring-solid", "life-ring", "linkedin", "list-number", "list", "location-check-solid", "location-check", "location-solid", "location", "locations-solid", "locations", "lock-closed-solid", "lock-closed", "lock-open-solid", "lock-open", "magnet-solid", "magnet", "mail-check-solid", "mail-check", "mail-plus-solid", "mail-plus", "mail-solid", "mail", "mailbox-solid", "mailbox", "map-sigma-solid", "map-sigma", "map-solid", "map", "material-finger", "medal", "megaphone-solid", "megaphone", "mic-off-solid", "mic-off", "mic-solid", "mic", "minus", "mobile-phone-solid", "mobile-phone", "money-send-solid", "money-send", "money-solid", "money", "monkey-solid", "monkey", "moon-solid", "moon", "more-alt", "more", "move-left-solid", "move-right-solid", "move-up-solid", "moving", "multi-device-solid", "multi-device", "music-solid", "music", "navigation-solid", "navigation", "node-solid", "node", "nodes-down-solid", "nodes-down", "nodes-left-solid", "nodes-left", "nodes-right-solid", "nodes-right", "nodes-up-solid", "nodes-up", "notepad-empty-solid", "notepad-empty", "notepad-solid", "notepad", "notes-solid", "notes", "open", "opportunity-solid", "opportunity", "or-delete", "os-android", "os-apple", "os-windows", "paper-clip", "passbook-solid", "passbook", "pause-solid", "pause", "paypal", "peekpanel-arrow-left-solid", "peekpanel-arrow-left", "peekpanel-arrow-right-solid", "peekpanel-arrow-right", "pega", "pegasus", "pen-solid", "pen", "pencil-solid", "pencil", "person-solid", "person", "phone-call-solid", "phone-call", "phone-disabled-solid", "phone-disabled", "phone-hangup-solid", "phone-hangup", "phone-in-solid", "phone-in", "phone-list-solid", "phone-list", "phone-out-solid", "phone-out", "phone-pause-solid", "phone-pause", "phone-solid", "phone-split-solid", "phone-split", "phone", "picture-solid", "picture", "piggybank-solid", "piggybank", "pin-solid", "pin", "pipeline-solid", "pipeline", "plane-solid", "plane", "plant-solid", "plant", "play-solid", "play", "playbook-solid", "playbook", "plug-solid", "plug", "plus-between-left-column", "plus-between-right-column", "plus-line-above-below", "plus-line-above", "plus-line-below", "plus-line-left", "plus-line-right", "plus", "podium-solid", "podium", "polaris-solid", "polaris", "pong-solid", "pong", "potion-solid", "potion", "power", "print-solid", "print", "processor-solid", "processor", "progress-solid", "progress", "puzzle-solid", "puzzle", "qr", "quill", "rabbit", "radio-solid", "radio", "rain-solid", "rain", "receipt-solid", "receipt", "rectangle-solid", "rectangle", "reply-all-solid", "reply-all", "reply-solid", "reply", "reset", "retweet", "rewind-solid", "rewind", "robot-happy-solid", "robot-happy", "robot-sad-solid", "robot-sad", "robot-solid", "robot", "rocket-solid", "rocket", "roller-solid", "roller", "route-solid", "route", "row-delete", "row-insert", "row-left-fill", "row-right-fill", "row", "scale-down", "scale-up-solid", "scale-up", "school-solid", "school", "scissors", "script", "search-analytics-solid", "search-analytics", "search-case", "search-check", "search-close", "search-minus", "search-org", "search-plus", "search-solid", "search-table", "search", "send-solid", "send", "server-cloud-solid", "server-cloud", "server-solid", "server", "sextant", "share-point-up-solid", "share-point-up", "share-solid", "share", "shield-solid", "shield", "shoe-solid", "shoe", "shuffle", "sigma", "signpost-solid", "signpost", "slideshow-solid", "slideshow", "snail", "snow", "social-solid", "social", "speaker-mute-solid", "speaker-mute", "speaker-on-solid", "speaker-on", "speaker-solid", "speaker", "spellcheck", "square-solid", "square", "star-mixed", "star-solid", "star", "steps-solid", "steps", "stethoscope-solid", "stethoscope", "stoplight-solid", "stoplight", "stopwatch-solid", "stopwatch", "store-solid", "store", "sun-solid", "sun", "swipe-left-solid", "swipe-left", "swipe-right-solid", "swipe-right", "table", "tablet-solid", "tablet", "tag-check-solid", "tag-check", "tag-close-solid", "tag-close", "tag-solid", "tag", "target-solid", "target", "temp-solid", "temp", "thumbs-down-solid", "thumbs-down", "thumbs-up-solid", "thumbs-up", "times", "todo-solid", "todo", "tow-truck-solid", "tow-truck", "tracer-solid", "tracer", "transform", "trash-solid", "trash", "triangle-mixed-left", "triangle-mixed-right", "triangle-solid", "triangle", "tribox-solid", "tribox", "trophy-solid", "trophy", "truck-solid", "truck", "tv-solid", "tv", "twitter", "umbrella-solid", "umbrella", "undo", "undock", "unindent", "upload", "user-check-solid", "user-check", "user-close-solid", "user-close", "user-female-solid", "user-female", "user-list-solid", "user-list", "user-plus-solid", "user-plus", "user-search-solid", "user-search", "user-solid", "user-star-solid", "user-star", "user", "users-solid", "users", "video-solid", "video", "voicemail", "vr-solid", "vr", "walkie-solid", "walkie", "wallet-solid", "wallet", "wand", "warn-solid", "warn", "watch-solid", "watch", "waypoint-solid", "waypoint", "webcam-solid", "webcam", "whatsapp", "wifi-none", "wifi-off", "wifi", "wizard-solid", "wizard", "wrench-solid", "wrench", "youtube"];
|
|
2
2
|
export default iconNames;
|
|
3
3
|
export declare type IconNames = typeof iconNames[number];
|
|
4
4
|
//# sourceMappingURL=iconNames.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconNames.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/iconNames.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"iconNames.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/iconNames.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,SAAS,qrXA8wBL,CAAC;AAEX,eAAe,SAAS,CAAC;AAEzB,oBAAY,SAAS,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC"}
|