@secondstaxorg/sscomp 1.9.62 → 1.9.63

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secondstaxorg/sscomp",
3
- "version": "1.9.62",
3
+ "version": "1.9.63",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { AmountInputProps } from "./type";
3
+ import "../../styles/typography.css";
4
+ /**
5
+ * Dropdown component for selecting from a list of options
6
+ */
7
+ declare const AmountInput: (props: AmountInputProps) => JSX.Element;
8
+ export default AmountInput;
@@ -0,0 +1,6 @@
1
+ export declare const currencies: {
2
+ currency: string;
3
+ currency_name: string;
4
+ country: string;
5
+ flag: string;
6
+ }[];
@@ -0,0 +1,5 @@
1
+ export declare const countryCodesArr: {
2
+ country: string;
3
+ dial_code: string;
4
+ code: string;
5
+ }[];
@@ -0,0 +1,7 @@
1
+ export declare const InputLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const FieldContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const DropdownField: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const DisabledContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const DropdownIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const OptionsList: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ export declare const DropdownOption: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,64 @@
1
+ export interface AmountInputProps {
2
+ /**
3
+ * Currency code to be displayed on page load
4
+ */
5
+ initialCurrencyCode?: string;
6
+ /**
7
+ * Amount to be displayed on page load
8
+ */
9
+ initialAmount?: number;
10
+ /**
11
+ * Placeholder text to be displayed in the field
12
+ */
13
+ placeholder?: string;
14
+ /**
15
+ * Function to receive the object of the selected currency
16
+ */
17
+ selectedCurrency?: (a: currencyCodesType) => void;
18
+ /**
19
+ * Boolean to specify whether the field is active or disabled
20
+ */
21
+ disabled?: boolean;
22
+ /**
23
+ * Label of the field
24
+ */
25
+ label?: string;
26
+ /**
27
+ * Specify the width of the component
28
+ */
29
+ width?: number | "fit-content";
30
+ /**
31
+ * Boolean to specify whether the field is required
32
+ */
33
+ required?: boolean;
34
+ /**
35
+ * Input name as is with html input tag
36
+ * */
37
+ inputName?: string;
38
+ /**
39
+ * Onchange function when user is making an input
40
+ * */
41
+ onChange: (value: {
42
+ currencyCode: string;
43
+ countryName: string;
44
+ amount: number;
45
+ }) => void;
46
+ /**
47
+ * Specify whether the component is a readonly field
48
+ */
49
+ readonly?: boolean;
50
+ /**
51
+ * Specify custom label for text displayed throughout component
52
+ */
53
+ labelOverrides?: {
54
+ selectCountryCodeMsg?: string;
55
+ requiredFieldMsg?: string;
56
+ searchCountryPlaceholder?: string;
57
+ };
58
+ }
59
+ export declare type currencyCodesType = {
60
+ "country": string;
61
+ "currency_name": string;
62
+ "currency": string;
63
+ "flag": string;
64
+ };
@@ -4,7 +4,7 @@ export interface PhoneInputProps {
4
4
  */
5
5
  initialCountryCode?: string;
6
6
  /**
7
- * Country code to be displayed on page load
7
+ * Phone number to be displayed on page load
8
8
  */
9
9
  initialPhoneNumber?: number;
10
10
  /**
@@ -82,3 +82,4 @@ export { default as ProgressBar } from './ProgressBar/ProgressBar';
82
82
  export { default as DoughnutChart } from './DoughnutChart/DoughnutChart';
83
83
  export { default as DetailField } from './DetailField/DetailField';
84
84
  export { default as MultipleFileUpload } from './MultipleFileUpload/MultipleFileUpload';
85
+ export { default as AmountInput } from './AmountInput/AmountInput';