@commercetools-uikit/localized-money-input 19.8.0 → 19.10.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.
@@ -272,7 +272,7 @@ LocalizedMoneyInput.getEmptyCurrencies = values => {
272
272
  var LocalizedMoneyInput$1 = LocalizedMoneyInput;
273
273
 
274
274
  // NOTE: This string will be replaced on build time with the package version.
275
- var version = "19.8.0";
275
+ var version = "19.10.0";
276
276
 
277
277
  exports["default"] = LocalizedMoneyInput$1;
278
278
  exports.version = version;
@@ -226,7 +226,7 @@ LocalizedMoneyInput.getEmptyCurrencies = values => {
226
226
  var LocalizedMoneyInput$1 = LocalizedMoneyInput;
227
227
 
228
228
  // NOTE: This string will be replaced on build time with the package version.
229
- var version = "19.8.0";
229
+ var version = "19.10.0";
230
230
 
231
231
  exports["default"] = LocalizedMoneyInput$1;
232
232
  exports.version = version;
@@ -249,6 +249,6 @@ LocalizedMoneyInput.getEmptyCurrencies = values => {
249
249
  var LocalizedMoneyInput$1 = LocalizedMoneyInput;
250
250
 
251
251
  // NOTE: This string will be replaced on build time with the package version.
252
- var version = "19.8.0";
252
+ var version = "19.10.0";
253
253
 
254
254
  export { LocalizedMoneyInput$1 as default, version };
@@ -9,24 +9,87 @@ type TCustomEvent = {
9
9
  persist?: () => void;
10
10
  };
11
11
  export type TLocalizedMoneyInputProps = {
12
+ /**
13
+ * Used as HTML id property.
14
+ */
12
15
  id?: string;
16
+ /**
17
+ * The prefix used to create a HTML `name` property for the amount input field (`${name}.amount`).
18
+ */
13
19
  name?: string;
20
+ /**
21
+ * value of possible currency
22
+ * <br/>
23
+ * the input doesn't accept a "currencies" prop, instead all possible
24
+ * currencies have to exist (with empty or filled strings) on the value:
25
+ * { EUR: {amount: '12.00', currencyCode: 'EUR'}, USD: {amount: '', currencyCode: 'USD'}}
26
+ */
14
27
  value: Record<string, TValue>;
28
+ /**
29
+ * Called with the event of the input.
30
+ */
15
31
  onChange?: (event: TCustomEvent) => void;
32
+ /**
33
+ * the currently selected currency
34
+ */
16
35
  selectedCurrency: string;
36
+ /**
37
+ * Called when input is blurred
38
+ */
17
39
  onBlur?: (event: TCustomEvent) => void;
40
+ /**
41
+ * Called when input is focused
42
+ */
18
43
  onFocus?: (event: TCustomEvent) => void;
44
+ /**
45
+ * Will hide the currency expansion controls when set to `true`. All currencies will be shown when set to `true`.
46
+ */
19
47
  hideCurrencyExpansionControls?: boolean;
48
+ /**
49
+ * Controls whether one or all currencirs are visible by default
50
+ */
20
51
  defaultExpandCurrencies?: boolean;
52
+ /**
53
+ * Use this property to reduce the paddings of the component for a ui compact variant
54
+ */
21
55
  isCondensed?: boolean;
56
+ /**
57
+ * Indicates that the input cannot be modified (e.g not authorized, or changes currently saving).
58
+ */
22
59
  isDisabled?: boolean;
60
+ /**
61
+ * Indicates that the field is displaying read-only content
62
+ */
23
63
  isReadOnly?: boolean;
64
+ /**
65
+ * Placeholder text for the input
66
+ */
24
67
  placeholder?: Record<string, string>;
68
+ /**
69
+ * Horizontal size limit of the input fields.
70
+ */
25
71
  horizontalConstraint?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
72
+ /**
73
+ * Indicates that input has errors
74
+ */
26
75
  hasError?: boolean;
76
+ /**
77
+ * Control to indicate on the input if there are values that are potentially invalid
78
+ */
27
79
  hasWarning?: boolean;
80
+ /**
81
+ * A map of errors. Error messages for known errors are rendered automatically.
82
+ * <br>
83
+ * Unknown errors will be forwarded to `renderError`
84
+ */
28
85
  errors?: Record<string, ReactNode>;
86
+ /**
87
+ * A map of warnings.
88
+ */
29
89
  warnings?: Record<string, ReactNode>;
90
+ /**
91
+ * Shows high precision badge in case current value uses high precision.
92
+ */
30
93
  hasHighPrecisionBadge?: boolean;
31
94
  };
32
95
  export declare const sortCurrencies: (selectedCurrency: string, allCurrencies: string[]) => string[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/localized-money-input",
3
3
  "description": "A controlled input component for localized money values with validation states.",
4
- "version": "19.8.0",
4
+ "version": "19.10.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,19 +21,19 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/constraints": "19.8.0",
25
- "@commercetools-uikit/design-system": "19.8.0",
26
- "@commercetools-uikit/flat-button": "19.8.0",
27
- "@commercetools-uikit/hooks": "19.8.0",
28
- "@commercetools-uikit/icons": "19.8.0",
29
- "@commercetools-uikit/input-utils": "19.8.0",
30
- "@commercetools-uikit/localized-utils": "19.8.0",
31
- "@commercetools-uikit/messages": "19.8.0",
32
- "@commercetools-uikit/money-input": "19.8.0",
33
- "@commercetools-uikit/select-utils": "19.8.0",
34
- "@commercetools-uikit/spacings-stack": "19.8.0",
35
- "@commercetools-uikit/tooltip": "19.8.0",
36
- "@commercetools-uikit/utils": "19.8.0",
24
+ "@commercetools-uikit/constraints": "19.10.0",
25
+ "@commercetools-uikit/design-system": "19.10.0",
26
+ "@commercetools-uikit/flat-button": "19.10.0",
27
+ "@commercetools-uikit/hooks": "19.10.0",
28
+ "@commercetools-uikit/icons": "19.10.0",
29
+ "@commercetools-uikit/input-utils": "19.10.0",
30
+ "@commercetools-uikit/localized-utils": "19.10.0",
31
+ "@commercetools-uikit/messages": "19.10.0",
32
+ "@commercetools-uikit/money-input": "19.10.0",
33
+ "@commercetools-uikit/select-utils": "19.10.0",
34
+ "@commercetools-uikit/spacings-stack": "19.10.0",
35
+ "@commercetools-uikit/tooltip": "19.10.0",
36
+ "@commercetools-uikit/utils": "19.10.0",
37
37
  "@emotion/react": "^11.10.5",
38
38
  "@emotion/styled": "^11.10.5",
39
39
  "prop-types": "15.8.1",