@transferwise/components 0.0.0-experimental-eaf43c2 → 0.0.0-experimental-6730b89
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/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/avatarView/AvatarView.js +8 -4
- package/build/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/AvatarView.mjs +8 -4
- package/build/avatarView/AvatarView.mjs.map +1 -1
- package/build/avatarView/{NotificationDot.js → Dot.js} +14 -12
- package/build/avatarView/Dot.js.map +1 -0
- package/build/avatarView/{NotificationDot.mjs → Dot.mjs} +14 -12
- package/build/avatarView/Dot.mjs.map +1 -0
- package/build/i18n/en.json +0 -2
- package/build/i18n/en.json.js +0 -2
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +0 -2
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/index.js +0 -2
- package/build/index.js.map +1 -1
- package/build/index.mjs +0 -1
- package/build/index.mjs.map +1 -1
- package/build/main.css +17 -69
- package/build/styles/avatarView/AvatarView.css +17 -11
- package/build/styles/avatarView/Dot.css +26 -0
- package/build/styles/main.css +17 -69
- package/build/types/avatarLayout/AvatarLayout.d.ts +1 -1
- package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
- package/build/types/avatarView/AvatarView.d.ts +4 -1
- package/build/types/avatarView/AvatarView.d.ts.map +1 -1
- package/build/types/avatarView/Dot.d.ts +8 -0
- package/build/types/avatarView/Dot.d.ts.map +1 -0
- package/build/types/index.d.ts +0 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +0 -4
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +2 -3
- package/src/avatarLayout/AvatarLayout.tsx +1 -1
- package/src/avatarView/AvatarView.css +17 -11
- package/src/avatarView/AvatarView.less +1 -1
- package/src/avatarView/AvatarView.story.tsx +37 -0
- package/src/avatarView/AvatarView.tsx +13 -6
- package/src/avatarView/Dot.css +26 -0
- package/src/avatarView/Dot.less +31 -0
- package/src/avatarView/Dot.tsx +42 -0
- package/src/i18n/en.json +0 -2
- package/src/index.ts +0 -2
- package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +69 -2
- package/src/main.css +17 -69
- package/src/main.less +0 -1
- package/src/ssr.spec.tsx +0 -1
- package/build/avatarView/NotificationDot.js.map +0 -1
- package/build/avatarView/NotificationDot.mjs.map +0 -1
- package/build/moneyInputField/AmountInput.js +0 -284
- package/build/moneyInputField/AmountInput.js.map +0 -1
- package/build/moneyInputField/AmountInput.mjs +0 -282
- package/build/moneyInputField/AmountInput.mjs.map +0 -1
- package/build/moneyInputField/AnimatedNumber.js +0 -50
- package/build/moneyInputField/AnimatedNumber.js.map +0 -1
- package/build/moneyInputField/AnimatedNumber.mjs +0 -48
- package/build/moneyInputField/AnimatedNumber.mjs.map +0 -1
- package/build/moneyInputField/Chevron.js +0 -33
- package/build/moneyInputField/Chevron.js.map +0 -1
- package/build/moneyInputField/Chevron.mjs +0 -31
- package/build/moneyInputField/Chevron.mjs.map +0 -1
- package/build/moneyInputField/CurrencySelector.js +0 -160
- package/build/moneyInputField/CurrencySelector.js.map +0 -1
- package/build/moneyInputField/CurrencySelector.mjs +0 -157
- package/build/moneyInputField/CurrencySelector.mjs.map +0 -1
- package/build/moneyInputField/MoneyInputField.js +0 -113
- package/build/moneyInputField/MoneyInputField.js.map +0 -1
- package/build/moneyInputField/MoneyInputField.messages.js +0 -17
- package/build/moneyInputField/MoneyInputField.messages.js.map +0 -1
- package/build/moneyInputField/MoneyInputField.messages.mjs +0 -13
- package/build/moneyInputField/MoneyInputField.messages.mjs.map +0 -1
- package/build/moneyInputField/MoneyInputField.mjs +0 -109
- package/build/moneyInputField/MoneyInputField.mjs.map +0 -1
- package/build/moneyInputField/useFocus.js +0 -37
- package/build/moneyInputField/useFocus.js.map +0 -1
- package/build/moneyInputField/useFocus.mjs +0 -35
- package/build/moneyInputField/useFocus.mjs.map +0 -1
- package/build/moneyInputField/useInputStyle.js +0 -71
- package/build/moneyInputField/useInputStyle.js.map +0 -1
- package/build/moneyInputField/useInputStyle.mjs +0 -69
- package/build/moneyInputField/useInputStyle.mjs.map +0 -1
- package/build/moneyInputField/utils.js +0 -87
- package/build/moneyInputField/utils.js.map +0 -1
- package/build/moneyInputField/utils.mjs +0 -78
- package/build/moneyInputField/utils.mjs.map +0 -1
- package/build/styles/avatarView/NotificationDot.css +0 -20
- package/build/styles/moneyInputField/AmountInput.css +0 -32
- package/build/styles/moneyInputField/Chevron.css +0 -12
- package/build/styles/moneyInputField/CurrencySelector.css +0 -6
- package/build/styles/moneyInputField/MoneyInputField.css +0 -58
- package/build/types/avatarView/NotificationDot.d.ts +0 -8
- package/build/types/avatarView/NotificationDot.d.ts.map +0 -1
- package/build/types/moneyInputField/AmountInput.d.ts +0 -13
- package/build/types/moneyInputField/AmountInput.d.ts.map +0 -1
- package/build/types/moneyInputField/AnimatedNumber.d.ts +0 -9
- package/build/types/moneyInputField/AnimatedNumber.d.ts.map +0 -1
- package/build/types/moneyInputField/Chevron.d.ts +0 -6
- package/build/types/moneyInputField/Chevron.d.ts.map +0 -1
- package/build/types/moneyInputField/CurrencySelector.d.ts +0 -30
- package/build/types/moneyInputField/CurrencySelector.d.ts.map +0 -1
- package/build/types/moneyInputField/MoneyInputField.d.ts +0 -30
- package/build/types/moneyInputField/MoneyInputField.d.ts.map +0 -1
- package/build/types/moneyInputField/MoneyInputField.messages.d.ts +0 -12
- package/build/types/moneyInputField/MoneyInputField.messages.d.ts.map +0 -1
- package/build/types/moneyInputField/index.d.ts +0 -3
- package/build/types/moneyInputField/index.d.ts.map +0 -1
- package/build/types/moneyInputField/useFocus.d.ts +0 -7
- package/build/types/moneyInputField/useFocus.d.ts.map +0 -1
- package/build/types/moneyInputField/useInputStyle.d.ts +0 -10
- package/build/types/moneyInputField/useInputStyle.d.ts.map +0 -1
- package/build/types/moneyInputField/useSelectionRange.d.ts +0 -10
- package/build/types/moneyInputField/useSelectionRange.d.ts.map +0 -1
- package/build/types/moneyInputField/utils.d.ts +0 -22
- package/build/types/moneyInputField/utils.d.ts.map +0 -1
- package/src/avatarView/NotificationDot.css +0 -20
- package/src/avatarView/NotificationDot.less +0 -24
- package/src/avatarView/NotificationDot.tsx +0 -35
- package/src/moneyInputField/AmountInput.css +0 -32
- package/src/moneyInputField/AmountInput.less +0 -43
- package/src/moneyInputField/AmountInput.tsx +0 -355
- package/src/moneyInputField/AnimatedNumber.tsx +0 -40
- package/src/moneyInputField/Chevron.css +0 -12
- package/src/moneyInputField/Chevron.less +0 -13
- package/src/moneyInputField/Chevron.tsx +0 -35
- package/src/moneyInputField/CurrencySelector.css +0 -6
- package/src/moneyInputField/CurrencySelector.less +0 -7
- package/src/moneyInputField/CurrencySelector.tsx +0 -219
- package/src/moneyInputField/MoneyInputField.css +0 -58
- package/src/moneyInputField/MoneyInputField.less +0 -13
- package/src/moneyInputField/MoneyInputField.messages.ts +0 -13
- package/src/moneyInputField/MoneyInputField.story.tsx +0 -188
- package/src/moneyInputField/MoneyInputField.tsx +0 -123
- package/src/moneyInputField/index.ts +0 -2
- package/src/moneyInputField/useFocus.ts +0 -35
- package/src/moneyInputField/useInputStyle.ts +0 -85
- package/src/moneyInputField/useSelectionRange.ts +0 -23
- package/src/moneyInputField/utils.spec.ts +0 -114
- package/src/moneyInputField/utils.ts +0 -116
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/AmountInput.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,IAAI,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAelE,KAAK,KAAK,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;AAE1C,eAAO,MAAM,WAAW,GAAI,uFASzB,KAAK,gCA6SP,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
interface Props {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const AnimatedNumber: ({ children, onClick, className }: Props) => import("react").JSX.Element;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=AnimatedNumber.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedNumber.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/AnimatedNumber.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,GAAI,kCAAkC,KAAK,gCA8BrE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chevron.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/Chevron.tsx"],"names":[],"mappings":"AAIA,UAAU,KAAK;IACb,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,OAAO,GAAI,gBAAuB,KAAK,gCA0BnD,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { AvatarLayoutProps } from '..';
|
|
2
|
-
import { CurrencyType, Props as MoneyInputFieldProps } from './MoneyInputField';
|
|
3
|
-
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
4
|
-
export interface CurrencyOption {
|
|
5
|
-
label?: string;
|
|
6
|
-
code: string;
|
|
7
|
-
keywords: string[] | undefined;
|
|
8
|
-
}
|
|
9
|
-
export interface CurrencySection {
|
|
10
|
-
title: string;
|
|
11
|
-
currencies: CurrencyOption[];
|
|
12
|
-
}
|
|
13
|
-
export type CurrencyOptions = CurrencySection[];
|
|
14
|
-
export type Props = {
|
|
15
|
-
id: string;
|
|
16
|
-
labelId: string;
|
|
17
|
-
options?: CurrencyOptions;
|
|
18
|
-
onChange?: (currency: CurrencyType) => void;
|
|
19
|
-
onOpen?: () => void;
|
|
20
|
-
addons?: AvatarLayoutProps['avatars'];
|
|
21
|
-
onSearchChange?: (payload: {
|
|
22
|
-
query: string;
|
|
23
|
-
resultCount: number;
|
|
24
|
-
}) => void;
|
|
25
|
-
} & Pick<MoneyInputFieldProps, 'currency'>;
|
|
26
|
-
export declare const CurrencySelector: ({ id, currency, options, labelId, onChange, addons, onOpen, onSearchChange, }: Props) => import("react").JSX.Element;
|
|
27
|
-
export declare const ButtonInput: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
28
|
-
children?: ReactNode | undefined;
|
|
29
|
-
} & import("react").RefAttributes<HTMLButtonElement | null>>;
|
|
30
|
-
//# sourceMappingURL=CurrencySelector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencySelector.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/CurrencySelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAKlB,MAAM,IAAI,CAAC;AACZ,OAAO,EAAE,YAAY,EAAE,KAAK,IAAI,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAGhF,OAAO,EACL,KAAK,oBAAoB,EAGzB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAKf,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED,MAAM,MAAM,eAAe,GAAG,eAAe,EAAE,CAAC;AAEhD,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACtC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC5E,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;AAE3C,eAAO,MAAM,gBAAgB,GAAI,+EAS9B,KAAK,gCA2FP,CAAC;AAEF,eAAO,MAAM,WAAW;;4DAgBtB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type Props as CurrencySelectorProps } from './CurrencySelector';
|
|
3
|
-
import { CommonProps } from '../common';
|
|
4
|
-
import { type InlinePromptProps } from '../prompt/InlinePrompt';
|
|
5
|
-
type AmountType = number | null;
|
|
6
|
-
export type CurrencyType = string;
|
|
7
|
-
type DefaultCurrencySelectorInstanceType = Pick<CurrencySelectorProps, 'addons' | 'options' | 'onChange' | 'onOpen' | 'onSearchChange'>;
|
|
8
|
-
type CustomCurrencySelectorInstanceType = (props: {
|
|
9
|
-
id: string;
|
|
10
|
-
labelId: string;
|
|
11
|
-
}) => ReactNode;
|
|
12
|
-
type CurrencySelectorType = DefaultCurrencySelectorInstanceType | CustomCurrencySelectorInstanceType;
|
|
13
|
-
export type Props = {
|
|
14
|
-
label?: ReactNode;
|
|
15
|
-
currencySelector?: CurrencySelectorType;
|
|
16
|
-
amount?: AmountType;
|
|
17
|
-
currency: CurrencyType;
|
|
18
|
-
inlinePrompt?: {
|
|
19
|
-
sentiment?: InlinePromptProps['sentiment'];
|
|
20
|
-
message: InlinePromptProps['children'];
|
|
21
|
-
};
|
|
22
|
-
showChevron?: boolean;
|
|
23
|
-
autoFocus?: boolean;
|
|
24
|
-
loading?: boolean;
|
|
25
|
-
onAmountChange: (amount: AmountType) => void;
|
|
26
|
-
onFocusChange?: (focused: boolean) => void;
|
|
27
|
-
} & CommonProps;
|
|
28
|
-
export default function MoneyInputField({ label, currency, currencySelector, amount, onAmountChange, className, inlinePrompt, showChevron, autoFocus, loading, onFocusChange, }: Props): import("react").JSX.Element;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=MoneyInputField.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyInputField.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/MoneyInputField.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,KAAK,KAAK,IAAI,qBAAqB,EAAoB,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGxC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE9E,KAAK,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;AAChC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,KAAK,mCAAmC,GAAG,IAAI,CAC7C,qBAAqB,EACrB,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,gBAAgB,CAChE,CAAC;AACF,KAAK,kCAAkC,GAAG,CAAC,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,KAAK,SAAS,CAAC;AAChG,KAAK,oBAAoB,GACrB,mCAAmC,GACnC,kCAAkC,CAAC;AAEvC,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,CAAC,EAAE;QACb,SAAS,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAC3C,OAAO,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;KACxC,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC7C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C,GAAG,WAAW,CAAC;AAEhB,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,KAAK,EACL,QAAQ,EACR,gBAAyE,EACzE,MAAM,EACN,cAAc,EACd,SAAS,EACT,YAAY,EACZ,WAAW,EACX,SAAS,EACT,OAAO,EACP,aAAa,GACd,EAAE,KAAK,+BAuEP"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
currencySelectorSearchPlaceholder: {
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
};
|
|
6
|
-
currencySelectorSelectCurrency: {
|
|
7
|
-
id: string;
|
|
8
|
-
defaultMessage: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
12
|
-
//# sourceMappingURL=MoneyInputField.messages.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyInputField.messages.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/MoneyInputField.messages.ts"],"names":[],"mappings":";;;;;;;;;;AAEA,wBAUG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,IAAI,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFocus.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/useFocus.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;sBAgBC,OAAO;;4BAUD,OAAO;CAIlC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type CSSProperties } from 'react';
|
|
2
|
-
import { Props as MoneyInputFieldProps } from './MoneyInputField';
|
|
3
|
-
type InputStyleObject = {
|
|
4
|
-
value: string;
|
|
5
|
-
focus: boolean;
|
|
6
|
-
inputElement: HTMLInputElement | null;
|
|
7
|
-
} & Pick<MoneyInputFieldProps, 'loading'>;
|
|
8
|
-
export declare const useInputStyle: ({ value, focus, inputElement, loading }: InputStyleObject) => CSSProperties;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=useInputStyle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useInputStyle.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/useInputStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAwC,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,KAAK,IAAI,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAElE,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACvC,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;AAE1C,eAAO,MAAM,aAAa,GAAI,yCAAyC,gBAAgB,kBAyBtF,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type SyntheticEvent } from 'react';
|
|
2
|
-
export declare const useSelectionRange: () => {
|
|
3
|
-
selection: {
|
|
4
|
-
selectionStart: number | null;
|
|
5
|
-
selectionEnd: number | null;
|
|
6
|
-
} | undefined;
|
|
7
|
-
handleSelect: (e: SyntheticEvent<HTMLInputElement>) => void;
|
|
8
|
-
handleSelectionBlur: () => void;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=useSelectionRange.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectionRange.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/useSelectionRange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAU,MAAM,OAAO,CAAC;AAEpD,eAAO,MAAM,iBAAiB;;wBAEV,MAAM,GAAG,IAAI;sBACf,MAAM,GAAG,IAAI;;sBAGJ,cAAc,CAAC,gBAAgB,CAAC;;CAc1D,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { KeyboardEvent } from 'react';
|
|
2
|
-
export declare const getDecimalSeparator: (currency: string, locale: string) => string | null;
|
|
3
|
-
export declare const getGroupSeparator: (currency: string, locale: string) => string | null;
|
|
4
|
-
export declare const getDecimalCount: (currency: string, locale: string) => number;
|
|
5
|
-
export declare const getEnteredDecimalsCount: (value: string, decimalSeparator: string) => number;
|
|
6
|
-
export declare const getUnformattedNumber: ({ value: formattedValue, currency, locale, }: {
|
|
7
|
-
value: string;
|
|
8
|
-
currency: string;
|
|
9
|
-
locale: string;
|
|
10
|
-
}) => number | null;
|
|
11
|
-
export declare const getFormattedString: ({ value: unformattedValue, currency, locale, alwaysShowDecimals, }: {
|
|
12
|
-
value: number;
|
|
13
|
-
currency: string;
|
|
14
|
-
locale: string;
|
|
15
|
-
alwaysShowDecimals?: boolean;
|
|
16
|
-
}) => string;
|
|
17
|
-
export declare const isInputPossiblyOverflowing: ({ ref, value, }: {
|
|
18
|
-
ref: React.RefObject<HTMLInputElement>;
|
|
19
|
-
value: string;
|
|
20
|
-
}) => boolean | undefined;
|
|
21
|
-
export declare const isAllowedInputKey: (e: KeyboardEvent<HTMLInputElement>) => boolean;
|
|
22
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/moneyInputField/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,mBAAmB,GAAI,UAAU,MAAM,EAAE,QAAQ,MAAM,KAAG,MAAM,GAAG,IAE/E,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,EAAE,QAAQ,MAAM,KAAG,MAAM,GAAG,IAE7E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,QAAQ,MAAM,KAAG,MAOlE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,OAAO,MAAM,EAAE,kBAAkB,MAAM,WAE9E,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,8CAIlC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,KAAG,MAAM,GAAG,IAmBZ,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,oEAKhC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,KAAG,MAiBH,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,iBAGxC;IACD,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf,wBASA,CAAC;AAaF,eAAO,MAAM,iBAAiB,GAAI,GAAG,aAAa,CAAC,gBAAgB,CAAC,YAKnE,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
.np-notification-dot {
|
|
2
|
-
--np-notification-dot-size: 14px;
|
|
3
|
-
position: relative;
|
|
4
|
-
display: inline-block;
|
|
5
|
-
}
|
|
6
|
-
.np-notification-dot-mask {
|
|
7
|
-
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
|
|
8
|
-
mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
|
|
9
|
-
-webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
|
|
10
|
-
mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
|
|
11
|
-
}
|
|
12
|
-
.np-notification-dot-badge {
|
|
13
|
-
position: absolute;
|
|
14
|
-
width: var(--np-notification-dot-size);
|
|
15
|
-
height: var(--np-notification-dot-size);
|
|
16
|
-
background-color: var(--color-sentiment-negative);
|
|
17
|
-
border-radius: 9999px;
|
|
18
|
-
border-radius: var(--radius-full);
|
|
19
|
-
right: 0;
|
|
20
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.np-notification-dot {
|
|
2
|
-
--np-notification-dot-size: 14px;
|
|
3
|
-
position: relative;
|
|
4
|
-
display: inline-block;
|
|
5
|
-
|
|
6
|
-
&-mask {
|
|
7
|
-
mask-image: radial-gradient(
|
|
8
|
-
circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2))
|
|
9
|
-
left calc(100% - calc(var(--np-notification-dot-size) / 2)),
|
|
10
|
-
transparent 0,
|
|
11
|
-
transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)),
|
|
12
|
-
black 0
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&-badge {
|
|
17
|
-
position: absolute;
|
|
18
|
-
width: var(--np-notification-dot-size);
|
|
19
|
-
height: var(--np-notification-dot-size);
|
|
20
|
-
background-color: var(--color-sentiment-negative);
|
|
21
|
-
border-radius: var(--radius-full);
|
|
22
|
-
right: 0;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { Props as AvatarViewProps } from './AvatarView';
|
|
3
|
-
|
|
4
|
-
type Props = Pick<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
5
|
-
avatarSize?: AvatarViewProps['size'];
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Depending on avatar size, notifcation dot size and offset are different
|
|
10
|
-
*/
|
|
11
|
-
const MAP_STYLE_CONFIG = {
|
|
12
|
-
16: { size: 6, offset: 1 },
|
|
13
|
-
24: { size: 8, offset: 2 },
|
|
14
|
-
32: { size: 10, offset: 2 },
|
|
15
|
-
40: { size: 10, offset: 2 },
|
|
16
|
-
48: { size: 14, offset: 2 },
|
|
17
|
-
56: { size: 16, offset: 3 },
|
|
18
|
-
72: { size: 20, offset: 3 },
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export default function NotificationDot({ children, avatarSize = 48 }: Props) {
|
|
22
|
-
return (
|
|
23
|
-
<div
|
|
24
|
-
className="np-notification-dot"
|
|
25
|
-
style={{
|
|
26
|
-
// @ts-expect-error CSS custom props allowed
|
|
27
|
-
'--np-notification-dot-size': `${MAP_STYLE_CONFIG[avatarSize].size}px`,
|
|
28
|
-
'--np-notification-dot-offset': `${MAP_STYLE_CONFIG[avatarSize].offset}px`,
|
|
29
|
-
}}
|
|
30
|
-
>
|
|
31
|
-
<div className="np-notification-dot-badge" />
|
|
32
|
-
<div className="np-notification-dot-mask">{children}</div>
|
|
33
|
-
</div>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
.wds-amount-input-container {
|
|
2
|
-
width: 100%;
|
|
3
|
-
}
|
|
4
|
-
.wds-amount-input-input-container {
|
|
5
|
-
display: flex;
|
|
6
|
-
justify-content: right;
|
|
7
|
-
width: 100%;
|
|
8
|
-
transition: font-size 0.4s cubic-bezier(0.3, 0, 0.1, 1), height 0.4s cubic-bezier(0.3, 0, 0.1, 1), margin-top 0.4s cubic-bezier(0.3, 0, 0.1, 1), color 0.4s ease;
|
|
9
|
-
color: var(--color-interactive-primary);
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
margin-bottom: 0 !important;
|
|
12
|
-
}
|
|
13
|
-
@media (prefers-reduced-motion: reduce) {
|
|
14
|
-
.wds-amount-input-input-container {
|
|
15
|
-
transition: none;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
.wds-amount-input-input {
|
|
19
|
-
border: none;
|
|
20
|
-
outline: none;
|
|
21
|
-
flex-grow: 1;
|
|
22
|
-
text-align: right;
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
}
|
|
25
|
-
.wds-amount-input-input:focus-visible {
|
|
26
|
-
outline: none;
|
|
27
|
-
}
|
|
28
|
-
.wds-amount-input-placeholder {
|
|
29
|
-
flex-grow: 0;
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: center;
|
|
32
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
.wds-amount-input {
|
|
2
|
-
&-container {
|
|
3
|
-
width: 100%;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
&-input-container {
|
|
7
|
-
display: flex;
|
|
8
|
-
justify-content: right;
|
|
9
|
-
width: 100%;
|
|
10
|
-
transition:
|
|
11
|
-
font-size 0.4s cubic-bezier(0.3, 0, 0.1, 1),
|
|
12
|
-
height 0.4s cubic-bezier(0.3, 0, 0.1, 1),
|
|
13
|
-
margin-top 0.4s cubic-bezier(0.3, 0, 0.1, 1),
|
|
14
|
-
color 0.4s ease;
|
|
15
|
-
color: var(--color-interactive-primary);
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
margin-bottom: 0 !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@media (prefers-reduced-motion: reduce) {
|
|
21
|
-
&-input-container {
|
|
22
|
-
transition: none;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&-input {
|
|
27
|
-
border: none;
|
|
28
|
-
outline: none;
|
|
29
|
-
flex-grow: 1;
|
|
30
|
-
text-align: right;
|
|
31
|
-
background-color: transparent;
|
|
32
|
-
|
|
33
|
-
&:focus-visible {
|
|
34
|
-
outline: none;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&-placeholder {
|
|
39
|
-
flex-grow: 0;
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
}
|
|
43
|
-
}
|