@ledgerhq/lumen-ui-rnative 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/lib/Components/AddressInput/AddressInput.js +21 -10
- package/dist/module/lib/Components/AddressInput/AddressInput.js.map +1 -1
- package/dist/module/lib/Components/AddressInput/AddressInput.mdx +18 -2
- package/dist/module/lib/Components/AddressInput/AddressInput.stories.js +1 -23
- package/dist/module/lib/Components/AddressInput/AddressInput.stories.js.map +1 -1
- package/dist/module/lib/Components/AmountInput/AmountInput.js +7 -6
- package/dist/module/lib/Components/AmountInput/AmountInput.js.map +1 -1
- package/dist/module/lib/Components/AmountInput/AmountInput.mdx +5 -1
- package/dist/module/lib/Components/AmountInput/AmountInput.stories.js +1 -36
- package/dist/module/lib/Components/AmountInput/AmountInput.stories.js.map +1 -1
- package/dist/module/lib/Components/BaseInput/BaseInput.js +54 -48
- package/dist/module/lib/Components/BaseInput/BaseInput.js.map +1 -1
- package/dist/module/lib/Components/MediaImage/MediaImage.js +102 -0
- package/dist/module/lib/Components/MediaImage/MediaImage.js.map +1 -0
- package/dist/module/lib/Components/MediaImage/MediaImage.mdx +103 -0
- package/dist/module/lib/Components/MediaImage/MediaImage.stories.js +91 -0
- package/dist/module/lib/Components/MediaImage/MediaImage.stories.js.map +1 -0
- package/dist/module/lib/Components/MediaImage/MediaImage.test.js +204 -0
- package/dist/module/lib/Components/MediaImage/MediaImage.test.js.map +1 -0
- package/dist/module/lib/Components/MediaImage/index.js +5 -0
- package/dist/module/lib/Components/MediaImage/index.js.map +1 -0
- package/dist/module/lib/Components/MediaImage/types.js +4 -0
- package/dist/module/lib/Components/MediaImage/types.js.map +1 -0
- package/dist/module/lib/Components/SearchInput/SearchInput.js +11 -2
- package/dist/module/lib/Components/SearchInput/SearchInput.js.map +1 -1
- package/dist/module/lib/Components/SearchInput/SearchInput.mdx +14 -2
- package/dist/module/lib/Components/SearchInput/SearchInput.stories.js +1 -19
- package/dist/module/lib/Components/SearchInput/SearchInput.stories.js.map +1 -1
- package/dist/module/lib/Components/TextInput/TextInput.mdx +14 -2
- package/dist/module/lib/Components/TextInput/TextInput.stories.js +1 -28
- package/dist/module/lib/Components/TextInput/TextInput.stories.js.map +1 -1
- package/dist/module/lib/Components/index.js +1 -0
- package/dist/module/lib/Components/index.js.map +1 -1
- package/dist/typescript/src/lib/Components/AddressInput/AddressInput.d.ts +1 -1
- package/dist/typescript/src/lib/Components/AddressInput/AddressInput.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/AmountInput/AmountInput.d.ts +1 -1
- package/dist/typescript/src/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/AmountInput/types.d.ts +7 -0
- package/dist/typescript/src/lib/Components/AmountInput/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BaseInput/BaseInput.d.ts +1 -1
- package/dist/typescript/src/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/BaseInput/types.d.ts +7 -0
- package/dist/typescript/src/lib/Components/BaseInput/types.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/MediaImage/MediaImage.d.ts +18 -0
- package/dist/typescript/src/lib/Components/MediaImage/MediaImage.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/MediaImage/index.d.ts +3 -0
- package/dist/typescript/src/lib/Components/MediaImage/index.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/MediaImage/types.d.ts +25 -0
- package/dist/typescript/src/lib/Components/MediaImage/types.d.ts.map +1 -0
- package/dist/typescript/src/lib/Components/SearchInput/SearchInput.d.ts +1 -1
- package/dist/typescript/src/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/typescript/src/lib/Components/index.d.ts +1 -0
- package/dist/typescript/src/lib/Components/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/lib/Components/AddressInput/AddressInput.mdx +18 -2
- package/src/lib/Components/AddressInput/AddressInput.stories.tsx +1 -23
- package/src/lib/Components/AddressInput/AddressInput.tsx +15 -7
- package/src/lib/Components/AmountInput/AmountInput.mdx +5 -1
- package/src/lib/Components/AmountInput/AmountInput.stories.tsx +1 -36
- package/src/lib/Components/AmountInput/AmountInput.tsx +4 -3
- package/src/lib/Components/AmountInput/types.ts +7 -0
- package/src/lib/Components/BaseInput/BaseInput.tsx +66 -60
- package/src/lib/Components/BaseInput/types.ts +7 -0
- package/src/lib/Components/MediaImage/MediaImage.mdx +103 -0
- package/src/lib/Components/MediaImage/MediaImage.stories.tsx +55 -0
- package/src/lib/Components/MediaImage/MediaImage.test.tsx +179 -0
- package/src/lib/Components/MediaImage/MediaImage.tsx +117 -0
- package/src/lib/Components/MediaImage/index.ts +2 -0
- package/src/lib/Components/MediaImage/types.ts +27 -0
- package/src/lib/Components/SearchInput/SearchInput.mdx +14 -2
- package/src/lib/Components/SearchInput/SearchInput.stories.tsx +1 -19
- package/src/lib/Components/SearchInput/SearchInput.tsx +8 -1
- package/src/lib/Components/TextInput/TextInput.mdx +14 -2
- package/src/lib/Components/TextInput/TextInput.stories.tsx +1 -28
- package/src/lib/Components/index.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","View","SearchInput","jsx","_jsx","meta","component","title","args","appearance","parameters","docs","source","language","format","type","
|
|
1
|
+
{"version":3,"names":["useState","View","SearchInput","jsx","_jsx","meta","component","title","args","appearance","parameters","docs","source","language","format","type","SearchInputStory","query","setQuery","initialValue","style","flex","minHeight","alignItems","justifyContent","padding","children","width","maxWidth","value","onChangeText","onClear","Base","render","placeholder","editable","hideClearButton","WithContent","WithError","errorMessage","DisabledSearchInput","disabled","WithHiddenClearButton","WithClearCallback","alert"],"sourceRoot":"../../../../../src","sources":["lib/Components/SearchInput/SearchInput.stories.tsx"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,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AE,CACzC,CACF;EACDpC,IAAI,EAAE;IACJ0B,WAAW,EAAE,iBAAiB;IAC9BC,QAAQ,EAAE,IAAI;IACdC,eAAe,EAAE;EACnB;AACF,CAAC","ignoreList":[]}
|
|
@@ -67,10 +67,14 @@ The error message will be automatically:
|
|
|
67
67
|
|
|
68
68
|
### Disabled State
|
|
69
69
|
|
|
70
|
-
The input can be disabled using the `
|
|
70
|
+
The input can be fully disabled using the `disabled` prop, which prevents interaction and applies a muted visual style.
|
|
71
71
|
|
|
72
72
|
<Canvas of={TextInputStories.DisabledTextInput} />
|
|
73
73
|
|
|
74
|
+
### Read-Only State
|
|
75
|
+
|
|
76
|
+
Alternatively, use `editable={false}` to prevent editing without applying the muted visual style. This is useful for displaying non-editable values that should still look like regular inputs.
|
|
77
|
+
|
|
74
78
|
### Keyboard Types
|
|
75
79
|
|
|
76
80
|
The component supports various React Native TextInput keyboard types:
|
|
@@ -270,7 +274,15 @@ Use the `keyboardType` prop to show the appropriate keyboard:
|
|
|
270
274
|
|
|
271
275
|
### Disabled State
|
|
272
276
|
|
|
273
|
-
Use the `
|
|
277
|
+
Use the `disabled` prop to disable the input with a muted visual style:
|
|
278
|
+
|
|
279
|
+
```tsx
|
|
280
|
+
<TextInput label='Username' value='johndoe' disabled />
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Read-Only State
|
|
284
|
+
|
|
285
|
+
Use the `editable` prop to make the input non-editable without the muted visual style:
|
|
274
286
|
|
|
275
287
|
```tsx
|
|
276
288
|
<TextInput label='Username' value='johndoe' editable={false} />
|
|
@@ -15,33 +15,6 @@ const meta = {
|
|
|
15
15
|
type: 'code'
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
},
|
|
19
|
-
argTypes: {
|
|
20
|
-
label: {
|
|
21
|
-
control: 'text',
|
|
22
|
-
description: 'Floating label text'
|
|
23
|
-
},
|
|
24
|
-
placeholder: {
|
|
25
|
-
control: 'text',
|
|
26
|
-
description: 'Placeholder text when input is empty'
|
|
27
|
-
},
|
|
28
|
-
errorMessage: {
|
|
29
|
-
control: 'text',
|
|
30
|
-
description: 'Error message to display below input'
|
|
31
|
-
},
|
|
32
|
-
editable: {
|
|
33
|
-
control: 'boolean',
|
|
34
|
-
description: 'Whether the input is editable'
|
|
35
|
-
},
|
|
36
|
-
hideClearButton: {
|
|
37
|
-
control: 'boolean',
|
|
38
|
-
description: 'Hide the clear button'
|
|
39
|
-
},
|
|
40
|
-
keyboardType: {
|
|
41
|
-
control: 'select',
|
|
42
|
-
options: ['default', 'email-address', 'numeric', 'phone-pad', 'url'],
|
|
43
|
-
description: 'Keyboard type for input'
|
|
44
|
-
}
|
|
45
18
|
}
|
|
46
19
|
};
|
|
47
20
|
export default meta;
|
|
@@ -112,7 +85,7 @@ export const DisabledTextInput = {
|
|
|
112
85
|
}),
|
|
113
86
|
args: {
|
|
114
87
|
label: 'Username',
|
|
115
|
-
|
|
88
|
+
disabled: true,
|
|
116
89
|
hideClearButton: false,
|
|
117
90
|
keyboardType: 'default'
|
|
118
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","View","TextInput","jsx","_jsx","meta","component","title","parameters","docs","source","language","format","type","
|
|
1
|
+
{"version":3,"names":["useState","View","TextInput","jsx","_jsx","meta","component","title","parameters","docs","source","language","format","type","TextInputStory","args","value","setValue","initialValue","style","flex","minHeight","alignItems","justifyContent","padding","children","width","maxWidth","onChangeText","onClear","Base","render","label","editable","hideClearButton","keyboardType","WithContent","WithError","errorMessage","DisabledTextInput","disabled","WithHiddenClearButton","WithClearCallback","alert","EmailKeyboard","PhoneKeyboard"],"sourceRoot":"../../../../../src","sources":["lib/Components/TextInput/TextInput.stories.tsx"],"mappings":";;AACA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,SAAS,QAAQ,gBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGxC,MAAMC,IAA4B,GAAG;EACnCC,S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AO;IACdC,QAAQ,EAAE,IAAI;IACdC,eAAe,EAAE,KAAK;IACtBC,YAAY,EAAE;EAChB;AACF,CAAC;AAED,OAAO,MAAMS,aAAoB,GAAG;EAClCb,MAAM,EAAGhB,IAAI,iBAAKX,IAAA,CAACU,cAAc;IAAA,GAAKC;EAAI,CAAG,CAAC;EAC9CA,IAAI,EAAE;IACJiB,KAAK,EAAE,OAAO;IACdC,QAAQ,EAAE,IAAI;IACdC,eAAe,EAAE,KAAK;IACtBC,YAAY,EAAE;EAChB;AACF,CAAC;AAED,OAAO,MAAMU,aAAoB,GAAG;EAClCd,MAAM,EAAGhB,IAAI,iBAAKX,IAAA,CAACU,cAAc;IAAA,GAAKC;EAAI,CAAG,CAAC;EAC9CA,IAAI,EAAE;IACJiB,KAAK,EAAE,cAAc;IACrBC,QAAQ,EAAE,IAAI;IACdC,eAAe,EAAE,KAAK;IACtBC,YAAY,EAAE;EAChB;AACF,CAAC","ignoreList":[]}
|
|
@@ -20,6 +20,7 @@ export * from "./Link/index.js";
|
|
|
20
20
|
export * from "./ListItem/index.js";
|
|
21
21
|
export * from "./MediaBanner/index.js";
|
|
22
22
|
export * from "./MediaCard/index.js";
|
|
23
|
+
export * from "./MediaImage/index.js";
|
|
23
24
|
export * from "./NavBar/index.js";
|
|
24
25
|
export * from "./PageIndicator/index.js";
|
|
25
26
|
export * from "./SearchInput/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["lib/Components/index.ts"],"mappings":";;AAAA,cAAc,yBAAgB;AAC9B,cAAc,0BAAiB;AAC/B,cAAc,wBAAe;AAC7B,cAAc,mBAAU;AACxB,cAAc,mBAAU;AACxB,cAAc,wBAAe;AAC7B,cAAc,mBAAU;AACxB,cAAc,0BAAiB;AAC/B,cAAc,iBAAQ;AACtB,cAAc,uBAAc;AAC5B,cAAc,0BAAiB;AAC/B,cAAc,qBAAY;AAC1B,cAAc,oBAAW;AACzB,cAAc,iB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c,mBAAU;AACxB,cAAc,mBAAU;AACxB,cAAc,gBAAO;AACrB,cAAc,oBAAW;AACzB,cAAc,sBAAa;AAC3B,cAAc,0BAAiB;AAC/B,cAAc,iBAAQ;AACtB,cAAc,uBAAc;AAC5B,cAAc,oBAAW","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AddressInputProps } from './types';
|
|
2
2
|
export declare const AddressInput: {
|
|
3
|
-
({ prefix, suffix, onQrCodeClick, ref, ...props }: AddressInputProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ prefix, suffix, onQrCodeClick, disabled: disabledProp, ref, ...props }: AddressInputProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=AddressInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressInput.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/AddressInput/AddressInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressInput.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/AddressInput/AddressInput.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,YAAY;+EAOtB,iBAAiB;;CAmCnB,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { type AmountInputProps } from './types';
|
|
|
5
5
|
* The currency text can be positioned either on the left or right side of the input.
|
|
6
6
|
*/
|
|
7
7
|
export declare const AmountInput: {
|
|
8
|
-
({ lx, style, currencyText, currencyPosition, editable:
|
|
8
|
+
({ lx, style, currencyText, currencyPosition, editable, disabled: disabledProp, maxIntegerLength, maxDecimalLength, allowDecimals, thousandsSeparator, value, onChangeText, isInvalid, ref, ...props }: AmountInputProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=AmountInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,WAAW;4MAgBrB,gBAAgB;;CA8IlB,CAAC"}
|
|
@@ -35,6 +35,13 @@ export type AmountInputProps = Omit<TextInputProps, 'value' | 'onChangeText'> &
|
|
|
35
35
|
* @default true
|
|
36
36
|
*/
|
|
37
37
|
allowDecimals?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the input is disabled.
|
|
40
|
+
* When true, the input is not editable and displays a muted visual style.
|
|
41
|
+
* This differs from `editable={false}` which only prevents interaction.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
disabled?: boolean;
|
|
38
45
|
/**
|
|
39
46
|
* Additional style
|
|
40
47
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/AmountInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,EACd,OAAO,GAAG,cAAc,CACzB,GAAG;IACF;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/AmountInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,cAAc,EACd,OAAO,GAAG,cAAc,CACzB,GAAG;IACF;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,QAAQ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BaseInputProps } from './types';
|
|
2
2
|
export declare const BaseInput: {
|
|
3
|
-
({ lx, style, containerStyle, inputStyle, labelStyle, label, errorMessage, hideClearButton, onChangeText: onChangeTextProp, editable:
|
|
3
|
+
({ lx, style, containerStyle, inputStyle, labelStyle, label, errorMessage, hideClearButton, onChangeText: onChangeTextProp, editable, disabled: disabledProp, prefix, suffix, ref, ...props }: BaseInputProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=BaseInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BaseInput/BaseInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseInput.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BaseInput/BaseInput.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,SAAS;mMAgBnB,cAAc;;CA4HhB,CAAC"}
|
|
@@ -5,6 +5,13 @@ export type BaseInputProps = {
|
|
|
5
5
|
* The label text that floats above the input when focused or filled.
|
|
6
6
|
*/
|
|
7
7
|
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the input is disabled.
|
|
10
|
+
* When true, the input is not editable and displays a muted visual style.
|
|
11
|
+
* This differs from `editable={false}` which only prevents interaction.
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
8
15
|
/**
|
|
9
16
|
* Additional styles to apply to the outer wrapper element.
|
|
10
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BaseInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,GAC/B,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/BaseInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,GAC/B,QAAQ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MediaImageProps, MediaImageSize } from './types';
|
|
2
|
+
export declare const mediaImageDotSizeMap: Record<MediaImageSize, number>;
|
|
3
|
+
/**
|
|
4
|
+
* A generic media image component that displays an image with optional shape variants.
|
|
5
|
+
* Supports square and circular appearances with consistent sizing.
|
|
6
|
+
*
|
|
7
|
+
* When the image fails to load or no src is provided, displays a background placeholder.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* import { MediaImage } from '@ledgerhq/lumen-ui-rnative';
|
|
11
|
+
*
|
|
12
|
+
* <MediaImage src="https://example.com/icon.png" alt="Bitcoin" size={32} />
|
|
13
|
+
*/
|
|
14
|
+
export declare const MediaImage: {
|
|
15
|
+
({ src, alt, size, shape, lx, style, ref, ...props }: MediaImageProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=MediaImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaImage.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/MediaImage/MediaImage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAmB,MAAM,SAAS,CAAC;AAe3E,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAStD,CAAC;AAqCX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU;0DASpB,eAAe;;CA6BjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/MediaImage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAChE,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StyledViewProps } from '../../../styles';
|
|
2
|
+
export type MediaImageSize = 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56;
|
|
3
|
+
export type MediaImageShape = 'square' | 'circle';
|
|
4
|
+
export type MediaImageProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Image source URL. When undefined or on load error, displays a fallback.
|
|
7
|
+
* @optional
|
|
8
|
+
*/
|
|
9
|
+
src?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The shape of the media image.
|
|
12
|
+
* @default 'square'
|
|
13
|
+
*/
|
|
14
|
+
shape?: MediaImageShape;
|
|
15
|
+
/**
|
|
16
|
+
* The size of the media image in pixels.
|
|
17
|
+
* @default 48
|
|
18
|
+
*/
|
|
19
|
+
size?: MediaImageSize;
|
|
20
|
+
/**
|
|
21
|
+
* Alternative text for the image, used for accessibility.
|
|
22
|
+
*/
|
|
23
|
+
alt?: string;
|
|
24
|
+
} & Omit<StyledViewProps, 'children'>;
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/MediaImage/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEnE,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SearchInputProps } from './types';
|
|
2
2
|
export declare const SearchInput: {
|
|
3
|
-
({ appearance, style, containerStyle, inputStyle, ref, ...props }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ appearance, style, containerStyle, inputStyle, disabled: disabledProp, ref, ...props }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/SearchInput/SearchInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/SearchInput/SearchInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,WAAW;+FAQrB,gBAAgB;;CAkBlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -68,10 +68,14 @@ The error message will be automatically:
|
|
|
68
68
|
|
|
69
69
|
### Disabled State
|
|
70
70
|
|
|
71
|
-
The input can be disabled using the `
|
|
71
|
+
The input can be fully disabled using the `disabled` prop, which prevents interaction and applies a muted visual style.
|
|
72
72
|
|
|
73
73
|
<Canvas of={AddressInputStories.DisabledAddressInput} />
|
|
74
74
|
|
|
75
|
+
### Read-Only State
|
|
76
|
+
|
|
77
|
+
Alternatively, use `editable={false}` to prevent editing without applying the muted visual style. This is useful for displaying confirmed addresses that should still look like regular inputs.
|
|
78
|
+
|
|
75
79
|
## Controlled vs Uncontrolled
|
|
76
80
|
|
|
77
81
|
The AddressInput component supports both controlled and uncontrolled usage.
|
|
@@ -333,7 +337,19 @@ Use the `keyboardType` prop to show the appropriate keyboard:
|
|
|
333
337
|
|
|
334
338
|
### Disabled State
|
|
335
339
|
|
|
336
|
-
Use the `
|
|
340
|
+
Use the `disabled` prop to disable the input with a muted visual style:
|
|
341
|
+
|
|
342
|
+
```tsx
|
|
343
|
+
<AddressInput
|
|
344
|
+
placeholder='Enter address or ENS'
|
|
345
|
+
value='0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb27'
|
|
346
|
+
disabled
|
|
347
|
+
/>
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Read-Only State
|
|
351
|
+
|
|
352
|
+
Use the `editable` prop to make the input non-editable without the muted visual style:
|
|
337
353
|
|
|
338
354
|
```tsx
|
|
339
355
|
<AddressInput
|
|
@@ -16,28 +16,6 @@ const meta: Meta<typeof AddressInput> = {
|
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
|
-
argTypes: {
|
|
20
|
-
placeholder: {
|
|
21
|
-
control: 'text',
|
|
22
|
-
description: 'Placeholder text when input is empty',
|
|
23
|
-
},
|
|
24
|
-
prefix: {
|
|
25
|
-
control: 'text',
|
|
26
|
-
description: 'Custom prefix text (default: "To:")',
|
|
27
|
-
},
|
|
28
|
-
errorMessage: {
|
|
29
|
-
control: 'text',
|
|
30
|
-
description: 'Error message to display below input',
|
|
31
|
-
},
|
|
32
|
-
editable: {
|
|
33
|
-
control: 'boolean',
|
|
34
|
-
description: 'Whether the input is editable',
|
|
35
|
-
},
|
|
36
|
-
hideClearButton: {
|
|
37
|
-
control: 'boolean',
|
|
38
|
-
description: 'Hide the clear button',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
19
|
};
|
|
42
20
|
|
|
43
21
|
export default meta;
|
|
@@ -154,7 +132,7 @@ export const DisabledAddressInput: Story = {
|
|
|
154
132
|
placeholder: 'Enter address or ENS',
|
|
155
133
|
value: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb27',
|
|
156
134
|
prefix: 'To:',
|
|
157
|
-
|
|
135
|
+
disabled: true,
|
|
158
136
|
hideClearButton: false,
|
|
159
137
|
},
|
|
160
138
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useDisabledContext } from '@ledgerhq/lumen-utils-shared';
|
|
1
2
|
import { Text } from 'react-native';
|
|
2
3
|
import { useCommonTranslation } from '../../../i18n';
|
|
3
4
|
import { useStyleSheet } from '../../../styles';
|
|
@@ -10,11 +11,16 @@ export const AddressInput = ({
|
|
|
10
11
|
prefix = 'To:',
|
|
11
12
|
suffix,
|
|
12
13
|
onQrCodeClick,
|
|
14
|
+
disabled: disabledProp,
|
|
13
15
|
ref,
|
|
14
16
|
...props
|
|
15
17
|
}: AddressInputProps) => {
|
|
18
|
+
const disabled = useDisabledContext({
|
|
19
|
+
consumerName: 'AddressInput',
|
|
20
|
+
mergeWith: { disabled: disabledProp },
|
|
21
|
+
});
|
|
16
22
|
const { t } = useCommonTranslation();
|
|
17
|
-
const styles = useStyles();
|
|
23
|
+
const styles = useStyles({ disabled });
|
|
18
24
|
|
|
19
25
|
const actualPrefix = (
|
|
20
26
|
<Text accessible={false} style={styles.prefix}>
|
|
@@ -39,20 +45,22 @@ export const AddressInput = ({
|
|
|
39
45
|
ref={ref}
|
|
40
46
|
prefix={actualPrefix}
|
|
41
47
|
suffix={actualSuffix}
|
|
48
|
+
disabled={disabledProp}
|
|
42
49
|
{...props}
|
|
43
50
|
/>
|
|
44
51
|
);
|
|
45
52
|
};
|
|
46
53
|
|
|
47
|
-
const useStyles = () => {
|
|
48
|
-
return useStyleSheet(
|
|
49
|
-
|
|
54
|
+
const useStyles = ({ disabled }: { disabled: boolean }) => {
|
|
55
|
+
return useStyleSheet(
|
|
56
|
+
(t) => ({
|
|
50
57
|
prefix: {
|
|
51
58
|
...t.typographies.body1,
|
|
52
|
-
color: t.colors.text.base,
|
|
59
|
+
color: disabled ? t.colors.text.disabled : t.colors.text.base,
|
|
53
60
|
},
|
|
54
|
-
}
|
|
55
|
-
|
|
61
|
+
}),
|
|
62
|
+
[disabled],
|
|
63
|
+
);
|
|
56
64
|
};
|
|
57
65
|
|
|
58
66
|
AddressInput.displayName = 'AddressInput';
|
|
@@ -76,10 +76,14 @@ The input supports error handling through `isInvalid` prop which controls the er
|
|
|
76
76
|
|
|
77
77
|
### Disabled State
|
|
78
78
|
|
|
79
|
-
The
|
|
79
|
+
The input can be fully disabled using the `disabled` prop, which prevents interaction and applies a muted visual style.
|
|
80
80
|
|
|
81
81
|
<Canvas of={AmountInputStories.DisabledAmountInput} />
|
|
82
82
|
|
|
83
|
+
### Read-Only State
|
|
84
|
+
|
|
85
|
+
Alternatively, use `editable={false}` to prevent editing without applying the muted visual style. This is useful for displaying non-editable values that should still look like regular inputs.
|
|
86
|
+
|
|
83
87
|
## Animations
|
|
84
88
|
|
|
85
89
|
The AmountInput features several sophisticated animations:
|
|
@@ -16,41 +16,6 @@ const meta: Meta<typeof AmountInput> = {
|
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
|
-
argTypes: {
|
|
20
|
-
currencyText: {
|
|
21
|
-
control: 'text',
|
|
22
|
-
description: 'Currency text to display (e.g. USD, EUR, $)',
|
|
23
|
-
},
|
|
24
|
-
currencyPosition: {
|
|
25
|
-
control: 'radio',
|
|
26
|
-
options: ['left', 'right'],
|
|
27
|
-
description: 'Position of the currency text',
|
|
28
|
-
},
|
|
29
|
-
allowDecimals: {
|
|
30
|
-
control: 'boolean',
|
|
31
|
-
description: 'Whether to allow decimal values',
|
|
32
|
-
},
|
|
33
|
-
thousandsSeparator: {
|
|
34
|
-
control: 'boolean',
|
|
35
|
-
description: 'Whether to display thousands separator',
|
|
36
|
-
},
|
|
37
|
-
maxIntegerLength: {
|
|
38
|
-
control: 'number',
|
|
39
|
-
description: 'Maximum digits for integer part',
|
|
40
|
-
},
|
|
41
|
-
maxDecimalLength: {
|
|
42
|
-
control: 'number',
|
|
43
|
-
description: 'Maximum digits for decimal part',
|
|
44
|
-
},
|
|
45
|
-
isInvalid: {
|
|
46
|
-
control: 'boolean',
|
|
47
|
-
description: 'Whether the input is in error state',
|
|
48
|
-
},
|
|
49
|
-
editable: {
|
|
50
|
-
control: 'boolean',
|
|
51
|
-
description: 'Whether the input is editable',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
19
|
};
|
|
55
20
|
|
|
56
21
|
export default meta;
|
|
@@ -190,7 +155,7 @@ export const DisabledAmountInput: Story = {
|
|
|
190
155
|
allowDecimals: true,
|
|
191
156
|
thousandsSeparator: true,
|
|
192
157
|
isInvalid: false,
|
|
193
|
-
|
|
158
|
+
disabled: true,
|
|
194
159
|
},
|
|
195
160
|
};
|
|
196
161
|
|
|
@@ -27,7 +27,8 @@ export const AmountInput = ({
|
|
|
27
27
|
style,
|
|
28
28
|
currencyText,
|
|
29
29
|
currencyPosition = 'left',
|
|
30
|
-
editable
|
|
30
|
+
editable,
|
|
31
|
+
disabled: disabledProp = false,
|
|
31
32
|
maxIntegerLength = 9,
|
|
32
33
|
maxDecimalLength = 9,
|
|
33
34
|
allowDecimals = true,
|
|
@@ -43,7 +44,7 @@ export const AmountInput = ({
|
|
|
43
44
|
const [isFocused, setIsFocused] = useState(false);
|
|
44
45
|
const disabled = useDisabledContext({
|
|
45
46
|
consumerName: 'AmountInput',
|
|
46
|
-
mergeWith: { disabled:
|
|
47
|
+
mergeWith: { disabled: disabledProp },
|
|
47
48
|
});
|
|
48
49
|
|
|
49
50
|
const translateX = useSharedValue(0);
|
|
@@ -146,7 +147,7 @@ export const AmountInput = ({
|
|
|
146
147
|
<TextInput
|
|
147
148
|
ref={inputRef}
|
|
148
149
|
keyboardType='decimal-pad'
|
|
149
|
-
editable={!disabled}
|
|
150
|
+
editable={editable !== false && !disabled}
|
|
150
151
|
value={inputValue}
|
|
151
152
|
onChangeText={handleChangeText}
|
|
152
153
|
onFocus={(e) => {
|
|
@@ -39,6 +39,13 @@ export type AmountInputProps = Omit<
|
|
|
39
39
|
* @default true
|
|
40
40
|
*/
|
|
41
41
|
allowDecimals?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the input is disabled.
|
|
44
|
+
* When true, the input is not editable and displays a muted visual style.
|
|
45
|
+
* This differs from `editable={false}` which only prevents interaction.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
disabled?: boolean;
|
|
42
49
|
/**
|
|
43
50
|
* Additional style
|
|
44
51
|
*/
|