@scripso-homepad/ui 0.4.18 → 0.4.20
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/{chunk-U7OSCJKA.js → chunk-F7NV3HPU.js} +60 -20
- package/dist/chunk-F7NV3HPU.js.map +1 -0
- package/dist/index.cjs +126 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +70 -47
- package/dist/index.js.map +1 -1
- package/dist/web/index.cjs +59 -19
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.css +1 -6
- package/dist/web/index.css.map +1 -1
- package/dist/web/index.js +2 -2
- package/dist/web/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button.tsx +1 -1
- package/src/components/Input.tsx +43 -2
- package/src/components/PhoneInput.tsx +11 -0
- package/src/components/Select.tsx +28 -16
- package/src/theme/input.ts +23 -13
- package/src/web/components/TableActionsMenu.tsx +1 -1
- package/src/web/components/drawer-scroll.css +1 -7
- package/dist/chunk-U7OSCJKA.js.map +0 -1
package/package.json
CHANGED
|
@@ -213,6 +213,7 @@ const styles = StyleSheet.create({
|
|
|
213
213
|
},
|
|
214
214
|
withIcon: {
|
|
215
215
|
justifyContent: "space-between",
|
|
216
|
+
gap: 24,
|
|
216
217
|
},
|
|
217
218
|
disabled: {
|
|
218
219
|
opacity: 0.6,
|
|
@@ -227,7 +228,6 @@ const styles = StyleSheet.create({
|
|
|
227
228
|
labelWithIcon: {
|
|
228
229
|
flex: 1,
|
|
229
230
|
flexShrink: 1,
|
|
230
|
-
marginRight: 8,
|
|
231
231
|
},
|
|
232
232
|
iconContainer: {
|
|
233
233
|
alignItems: "center",
|
package/src/components/Input.tsx
CHANGED
|
@@ -77,6 +77,38 @@ export interface InputProps extends TextInputProps {
|
|
|
77
77
|
showPasswordToggle?: boolean;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
const INTEGER_KEYBOARD_TYPES = new Set([
|
|
81
|
+
"numeric",
|
|
82
|
+
"number-pad",
|
|
83
|
+
"phone-pad",
|
|
84
|
+
]);
|
|
85
|
+
|
|
86
|
+
/** Strip non-digits for integer pads; keep one decimal separator for decimal-pad. */
|
|
87
|
+
function sanitizeNumericInput(
|
|
88
|
+
value: string,
|
|
89
|
+
keyboardType: TextInputProps["keyboardType"],
|
|
90
|
+
): string {
|
|
91
|
+
if (keyboardType === "decimal-pad") {
|
|
92
|
+
const normalized = value.replace(/,/g, ".").replace(/[^\d.]/g, "");
|
|
93
|
+
const separatorIndex = normalized.indexOf(".");
|
|
94
|
+
|
|
95
|
+
if (separatorIndex === -1) {
|
|
96
|
+
return normalized;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
normalized.slice(0, separatorIndex + 1) +
|
|
101
|
+
normalized.slice(separatorIndex + 1).replace(/\./g, "")
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (keyboardType && INTEGER_KEYBOARD_TYPES.has(keyboardType)) {
|
|
106
|
+
return value.replace(/\D/g, "");
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return value;
|
|
110
|
+
}
|
|
111
|
+
|
|
80
112
|
export function Input({
|
|
81
113
|
label,
|
|
82
114
|
leftIcon,
|
|
@@ -99,7 +131,10 @@ export function Input({
|
|
|
99
131
|
showPasswordToggle,
|
|
100
132
|
onFocus,
|
|
101
133
|
onBlur,
|
|
134
|
+
onChangeText,
|
|
135
|
+
keyboardType,
|
|
102
136
|
multiline,
|
|
137
|
+
textAlign = "left",
|
|
103
138
|
textAlignVertical,
|
|
104
139
|
...props
|
|
105
140
|
}: InputProps) {
|
|
@@ -143,6 +178,10 @@ export function Input({
|
|
|
143
178
|
onBlur?.(event);
|
|
144
179
|
}
|
|
145
180
|
|
|
181
|
+
function handleChangeText(value: string) {
|
|
182
|
+
onChangeText?.(sanitizeNumericInput(value, keyboardType));
|
|
183
|
+
}
|
|
184
|
+
|
|
146
185
|
const helperMessage = error ?? hint;
|
|
147
186
|
|
|
148
187
|
function togglePasswordVisibility() {
|
|
@@ -192,20 +231,22 @@ export function Input({
|
|
|
192
231
|
ref={inputRef}
|
|
193
232
|
style={[
|
|
194
233
|
inputFieldMetrics.input,
|
|
195
|
-
|
|
234
|
+
multiline ? inputFieldMetrics.inputMultiline : inputFieldMetrics.inputSingleLine,
|
|
196
235
|
fieldStyles.text,
|
|
197
236
|
style,
|
|
198
237
|
]}
|
|
199
238
|
placeholderTextColor={fieldStyles.placeholder}
|
|
200
239
|
editable={editable}
|
|
240
|
+
keyboardType={keyboardType}
|
|
201
241
|
multiline={multiline}
|
|
202
242
|
secureTextEntry={effectiveSecureTextEntry}
|
|
203
|
-
textAlign=
|
|
243
|
+
textAlign={textAlign}
|
|
204
244
|
textAlignVertical={resolvedTextAlignVertical}
|
|
205
245
|
onFocus={handleFocus}
|
|
206
246
|
onBlur={handleBlur}
|
|
207
247
|
accessibilityState={{ disabled: isDisabled }}
|
|
208
248
|
{...props}
|
|
249
|
+
onChangeText={handleChangeText}
|
|
209
250
|
/>
|
|
210
251
|
{trailingIcon ? (
|
|
211
252
|
<View style={styles.iconSlot}>{trailingIcon}</View>
|
|
@@ -39,6 +39,11 @@ export interface PhoneInputProps extends Omit<TextInputProps, "style"> {
|
|
|
39
39
|
hintClassName?: string;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/** National phone field: digits only (blocks pasted letters/symbols). */
|
|
43
|
+
function sanitizePhoneDigits(value: string): string {
|
|
44
|
+
return value.replace(/\D/g, "");
|
|
45
|
+
}
|
|
46
|
+
|
|
42
47
|
export function PhoneInput({
|
|
43
48
|
label,
|
|
44
49
|
countryCode,
|
|
@@ -56,6 +61,7 @@ export function PhoneInput({
|
|
|
56
61
|
editable = true,
|
|
57
62
|
onFocus,
|
|
58
63
|
onBlur,
|
|
64
|
+
onChangeText,
|
|
59
65
|
...props
|
|
60
66
|
}: PhoneInputProps) {
|
|
61
67
|
const wrapperRef = useRef<ComponentRef<typeof View>>(null);
|
|
@@ -85,6 +91,10 @@ export function PhoneInput({
|
|
|
85
91
|
onBlur?.(event);
|
|
86
92
|
}
|
|
87
93
|
|
|
94
|
+
function handleChangeText(value: string) {
|
|
95
|
+
onChangeText?.(sanitizePhoneDigits(value));
|
|
96
|
+
}
|
|
97
|
+
|
|
88
98
|
const helperMessage = error ?? hint;
|
|
89
99
|
|
|
90
100
|
return (
|
|
@@ -129,6 +139,7 @@ export function PhoneInput({
|
|
|
129
139
|
onBlur={handleBlur}
|
|
130
140
|
accessibilityState={{ disabled: isDisabled }}
|
|
131
141
|
{...props}
|
|
142
|
+
onChangeText={handleChangeText}
|
|
132
143
|
/>
|
|
133
144
|
</View>
|
|
134
145
|
</View>
|
|
@@ -309,14 +309,6 @@ export function Select({
|
|
|
309
309
|
outputRange: ["0deg", "180deg"],
|
|
310
310
|
});
|
|
311
311
|
|
|
312
|
-
const hasError = Boolean(error) || Boolean(invalid);
|
|
313
|
-
const visualState = resolveInputVisualState({
|
|
314
|
-
focused: open,
|
|
315
|
-
error: hasError,
|
|
316
|
-
disabled,
|
|
317
|
-
});
|
|
318
|
-
const fieldStyles = getSelectFieldStyles(visualState);
|
|
319
|
-
|
|
320
312
|
const selectedValues = useMemo(
|
|
321
313
|
() => normalizeSelectedValues(multiple, value),
|
|
322
314
|
[multiple, value],
|
|
@@ -330,6 +322,15 @@ export function Select({
|
|
|
330
322
|
() => options.filter((option) => !option.disabled),
|
|
331
323
|
[options],
|
|
332
324
|
);
|
|
325
|
+
// Empty option lists cannot open — treat as disabled so the field does not look interactive.
|
|
326
|
+
const isEffectivelyDisabled = disabled || selectableOptions.length === 0;
|
|
327
|
+
const hasError = Boolean(error) || Boolean(invalid);
|
|
328
|
+
const visualState = resolveInputVisualState({
|
|
329
|
+
focused: open,
|
|
330
|
+
error: hasError,
|
|
331
|
+
disabled: isEffectivelyDisabled,
|
|
332
|
+
});
|
|
333
|
+
const fieldStyles = getSelectFieldStyles(visualState);
|
|
333
334
|
const selectableIndexByValue = useMemo(
|
|
334
335
|
() =>
|
|
335
336
|
new Map(
|
|
@@ -364,7 +365,7 @@ export function Select({
|
|
|
364
365
|
}
|
|
365
366
|
|
|
366
367
|
function openMenu() {
|
|
367
|
-
if (
|
|
368
|
+
if (isEffectivelyDisabled) {
|
|
368
369
|
return;
|
|
369
370
|
}
|
|
370
371
|
|
|
@@ -388,8 +389,9 @@ export function Select({
|
|
|
388
389
|
return;
|
|
389
390
|
}
|
|
390
391
|
|
|
392
|
+
// Keep the current value when the selected option is clicked again.
|
|
393
|
+
// Clearing to "" breaks required selects (e.g. language) and shows the placeholder.
|
|
391
394
|
if (selectedValues.includes(nextValue)) {
|
|
392
|
-
(onValueChange as SingleSelectProps["onValueChange"] | undefined)?.("");
|
|
393
395
|
closeMenu();
|
|
394
396
|
return;
|
|
395
397
|
}
|
|
@@ -425,7 +427,7 @@ export function Select({
|
|
|
425
427
|
return (
|
|
426
428
|
<View ref={wrapperRef} style={[styles.wrapper, containerStyle]}>
|
|
427
429
|
{label ? (
|
|
428
|
-
<Label disabled={
|
|
430
|
+
<Label disabled={isEffectivelyDisabled} style={styles.label} className={labelClassName}>
|
|
429
431
|
{label}
|
|
430
432
|
</Label>
|
|
431
433
|
) : null}
|
|
@@ -434,8 +436,8 @@ export function Select({
|
|
|
434
436
|
<Pressable
|
|
435
437
|
ref={triggerRef}
|
|
436
438
|
accessibilityRole="button"
|
|
437
|
-
accessibilityState={{ disabled, expanded: open }}
|
|
438
|
-
disabled={
|
|
439
|
+
accessibilityState={{ disabled: isEffectivelyDisabled, expanded: open }}
|
|
440
|
+
disabled={isEffectivelyDisabled}
|
|
439
441
|
onPress={open ? closeMenu : openMenu}
|
|
440
442
|
style={[selectFieldMetrics.container, fieldStyles.container, fieldStyle]}
|
|
441
443
|
>
|
|
@@ -466,7 +468,7 @@ export function Select({
|
|
|
466
468
|
>
|
|
467
469
|
<ChevronDownIcon
|
|
468
470
|
size={SELECT_CHEVRON_SIZE}
|
|
469
|
-
color={
|
|
471
|
+
color={isEffectivelyDisabled ? colors.stormGray200 : SELECT_CHEVRON_COLOR}
|
|
470
472
|
/>
|
|
471
473
|
</Animated.View>
|
|
472
474
|
</Pressable>
|
|
@@ -479,7 +481,13 @@ export function Select({
|
|
|
479
481
|
) : null}
|
|
480
482
|
|
|
481
483
|
<Modal visible={open} transparent animationType="fade" onRequestClose={closeMenu}>
|
|
482
|
-
<
|
|
484
|
+
<View style={styles.overlay}>
|
|
485
|
+
<Pressable
|
|
486
|
+
style={styles.backdrop}
|
|
487
|
+
onPress={closeMenu}
|
|
488
|
+
accessibilityRole="button"
|
|
489
|
+
accessibilityLabel="Close"
|
|
490
|
+
/>
|
|
483
491
|
{anchor ? (
|
|
484
492
|
<View
|
|
485
493
|
ref={menuRef}
|
|
@@ -511,7 +519,7 @@ export function Select({
|
|
|
511
519
|
)}
|
|
512
520
|
</View>
|
|
513
521
|
) : null}
|
|
514
|
-
</
|
|
522
|
+
</View>
|
|
515
523
|
</Modal>
|
|
516
524
|
</View>
|
|
517
525
|
);
|
|
@@ -539,10 +547,14 @@ const styles = StyleSheet.create({
|
|
|
539
547
|
},
|
|
540
548
|
overlay: {
|
|
541
549
|
flex: 1,
|
|
550
|
+
},
|
|
551
|
+
backdrop: {
|
|
552
|
+
...StyleSheet.absoluteFillObject,
|
|
542
553
|
backgroundColor: colors.transparent,
|
|
543
554
|
},
|
|
544
555
|
dropdown: {
|
|
545
556
|
position: "absolute",
|
|
557
|
+
zIndex: 1,
|
|
546
558
|
},
|
|
547
559
|
dropdownScroll: {
|
|
548
560
|
flex: 1,
|
package/src/theme/input.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Platform, StyleSheet, type TextStyle, type ViewStyle } from "react-native";
|
|
2
2
|
import { colors, fonts, fontSize, fontWeight, radii } from "./tokens";
|
|
3
3
|
|
|
4
|
-
export const INPUT_HEIGHT =
|
|
4
|
+
export const INPUT_HEIGHT = 56;
|
|
5
5
|
export const INPUT_ICON_SIZE = 20;
|
|
6
6
|
export const INPUT_ICON_GAP = 10;
|
|
7
7
|
export const INPUT_OUTLINE_WIDTH = 2;
|
|
8
|
-
|
|
8
|
+
/** Natural text metrics; avoid a tighter lineHeight that clips Armenian glyphs. */
|
|
9
|
+
export const INPUT_TEXT_LINE_HEIGHT = 20;
|
|
9
10
|
export const INPUT_WEB_VERTICAL_PADDING = 14;
|
|
11
|
+
export const INPUT_VERTICAL_PADDING = 14;
|
|
12
|
+
export const INPUT_HORIZONTAL_PADDING = 16;
|
|
10
13
|
|
|
11
14
|
export type InputVisualState =
|
|
12
15
|
| "default"
|
|
@@ -48,7 +51,6 @@ function createOutlineStyle(ringColor: string): ViewStyle {
|
|
|
48
51
|
backgroundColor: colors.transparent,
|
|
49
52
|
width: "100%",
|
|
50
53
|
alignSelf: "stretch",
|
|
51
|
-
...(Platform.OS !== "web" ? { overflow: "hidden" as const } : null),
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
|
|
@@ -60,13 +62,11 @@ const defaultOutline: ViewStyle = {
|
|
|
60
62
|
backgroundColor: colors.transparent,
|
|
61
63
|
width: "100%",
|
|
62
64
|
alignSelf: "stretch",
|
|
63
|
-
...(Platform.OS !== "web" ? { overflow: "hidden" as const } : null),
|
|
64
65
|
};
|
|
65
66
|
|
|
66
67
|
export function getInputFieldStyles(state: InputVisualState): FieldStyleSet {
|
|
67
68
|
const containerBase: ViewStyle = {
|
|
68
69
|
borderRadius: radii.lg,
|
|
69
|
-
...(Platform.OS !== "web" ? { overflow: "hidden" as const } : null),
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
switch (state) {
|
|
@@ -131,13 +131,16 @@ export const inputFieldMetrics = StyleSheet.create({
|
|
|
131
131
|
alignItems: "center",
|
|
132
132
|
height: INPUT_HEIGHT,
|
|
133
133
|
borderRadius: radii.lg,
|
|
134
|
-
|
|
134
|
+
paddingHorizontal: INPUT_HORIZONTAL_PADDING,
|
|
135
|
+
paddingVertical: INPUT_VERTICAL_PADDING,
|
|
135
136
|
gap: INPUT_ICON_GAP,
|
|
137
|
+
// Do not clip glyph ascenders (Armenian / tall fonts).
|
|
138
|
+
overflow: "visible",
|
|
136
139
|
...(Platform.OS === "web"
|
|
137
140
|
? ({
|
|
138
141
|
boxSizing: "border-box",
|
|
139
142
|
paddingVertical: INPUT_WEB_VERTICAL_PADDING,
|
|
140
|
-
paddingHorizontal:
|
|
143
|
+
paddingHorizontal: INPUT_HORIZONTAL_PADDING,
|
|
141
144
|
} as ViewStyle)
|
|
142
145
|
: null),
|
|
143
146
|
},
|
|
@@ -153,12 +156,7 @@ export const inputFieldMetrics = StyleSheet.create({
|
|
|
153
156
|
margin: 0,
|
|
154
157
|
borderWidth: 0,
|
|
155
158
|
backgroundColor: colors.transparent,
|
|
156
|
-
|
|
157
|
-
? { includeFontPadding: false }
|
|
158
|
-
: null),
|
|
159
|
-
...(Platform.OS === "ios"
|
|
160
|
-
? { lineHeight: INPUT_TEXT_LINE_HEIGHT, paddingVertical: 2 }
|
|
161
|
-
: null),
|
|
159
|
+
// Leave lineHeight unset so platform font metrics keep placeholder tops visible.
|
|
162
160
|
...(Platform.OS === "web"
|
|
163
161
|
? ({
|
|
164
162
|
alignSelf: "center",
|
|
@@ -175,4 +173,16 @@ export const inputFieldMetrics = StyleSheet.create({
|
|
|
175
173
|
? ({ textAlignVertical: "center" } as TextStyle)
|
|
176
174
|
: null),
|
|
177
175
|
},
|
|
176
|
+
/**
|
|
177
|
+
* Multiline fields should not flex-fill the container — on iOS a tall TextInput
|
|
178
|
+
* vertically centers the placeholder.
|
|
179
|
+
*/
|
|
180
|
+
inputMultiline: {
|
|
181
|
+
flexGrow: 0,
|
|
182
|
+
flexShrink: 1,
|
|
183
|
+
flexBasis: "auto",
|
|
184
|
+
width: "100%",
|
|
185
|
+
alignSelf: "stretch",
|
|
186
|
+
textAlignVertical: "top",
|
|
187
|
+
},
|
|
178
188
|
});
|
|
@@ -215,7 +215,7 @@ export function TableActionsMenu({
|
|
|
215
215
|
<TableActionButton
|
|
216
216
|
ref={triggerRef}
|
|
217
217
|
variant="menu"
|
|
218
|
-
icon={<TableMoreIcon className="size-
|
|
218
|
+
icon={<TableMoreIcon className="size-5" />}
|
|
219
219
|
ariaLabel={triggerAriaLabel}
|
|
220
220
|
onClick={() => setOpen((current) => !current)}
|
|
221
221
|
aria-expanded={open}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.drawer-scroll-area::-webkit-scrollbar {
|
|
7
|
-
width:
|
|
7
|
+
width: 4px;
|
|
8
8
|
-webkit-appearance: none;
|
|
9
9
|
appearance: none;
|
|
10
10
|
}
|
|
@@ -33,9 +33,3 @@
|
|
|
33
33
|
background-color: var(--color-storm-gray-200, #d5d9dd);
|
|
34
34
|
border-radius: 9999px;
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
@media (max-width: 767px) {
|
|
38
|
-
.drawer-scroll-area::-webkit-scrollbar {
|
|
39
|
-
width: 4px;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/theme/tokens.ts","../src/icons/arrowUpRightPath.ts","../src/icons/ArrowUpRightIcon.tsx","../src/utils/useApplyWebClassName.ts","../src/components/Button.tsx","../src/components/Label.tsx","../src/icons/eyeIconPaths.ts","../src/icons/EyeIcon.tsx","../src/icons/EyeOffIcon.tsx","../src/theme/input.ts","../src/components/Input.tsx"],"names":["Platform","jsx","useRef","jsxs","Text","styles","StyleSheet","Svg","Path","View"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,IAAM,SAAA,GAAY;AAAA,EACvB,GAAA,EAAK,SAAA;AAAA,EACL,KAAA,EAAO,SAAA;AAAA,EACP,GAAA,EAAK,SAAA;AAAA,EACL,KAAA,EAAO,SAAA;AAAA,EACP,GAAA,EAAK,SAAA;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,yBACH,CAAA,GACE;AAAA,GAAA,EACN,CAAA;AAEJ;AAEA,IAAMA,OAAAA,GAASC,WAAW,MAAA,CAAO;AAAA,EAC/B,OAAA,EAAS;AAAA,IACP,KAAA,EAAO,MAAA;AAAA,IACP,QAAA,EAAU,CAAA;AAAA,IACV,KAAK,OAAA,CAAQ;AAAA,GACf;AAAA,EACA,QAAA,EAAU;AAAA,IACR,KAAA,EAAO,eAAA;AAAA,IACP,MAAA,EAAQ,eAAA;AAAA,IACR,UAAA,EAAY,QAAA;AAAA,IACZ,cAAA,EAAgB,QAAA;AAAA,IAChB,UAAA,EAAY;AAAA,GACd;AAAA,EACA,aAAA,EAAe;AAAA,IACb,KAAA,EAAO,eAAA;AAAA,IACP,MAAA,EAAQ,eAAA;AAAA,IACR,UAAA,EAAY,QAAA;AAAA,IACZ,cAAA,EAAgB;AAAA,GAClB;AAAA,EACA,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,EAAA;AAAA,IACV,UAAA,EAAY,EAAA;AAAA,IACZ,OAAO,MAAA,CAAO;AAAA,GAChB;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,QAAA,EAAU,EAAA;AAAA,IACV,UAAA,EAAY,EAAA;AAAA,IACZ,OAAO,MAAA,CAAO;AAAA;AAElB,CAAC,CAAA","file":"chunk-U7OSCJKA.js","sourcesContent":["/**\n * HomePad design tokens — aligned with the Figma design system\n * (navy / storm gray / slate-blue palette from HomePad brand).\n */\n\n/** Storm Gray scale — Figma steps 0 → 8.5 */\nexport const stormGray = {\n \"0\": \"#fbfcfc\",\n \"0.5\": \"#eceef0\",\n \"1\": \"#dadde0\",\n \"1.5\": \"#c7cdd1\",\n \"2\": \"#b5bcc1\",\n \"3\": \"#8f9aa3\",\n \"4\": \"#6a7984\",\n \"5\": \"#455765\",\n \"6\": \"#374651\",\n \"7\": \"#29343d\",\n \"8\": \"#1c2328\",\n \"8.5\": \"#151a1e\",\n} as const;\n\nexport type StormGrayStep = keyof typeof stormGray;\n\n/** Navy scale — Figma steps 0 → 8.5 */\nexport const navy = {\n \"0\": \"#f6fafe\",\n \"0.5\": \"#dee5eb\",\n \"1\": \"#c6d0d8\",\n \"1.5\": \"#afbac5\",\n \"2\": \"#97a5b2\",\n \"3\": \"#677b8c\",\n \"4\": \"#385066\",\n \"5\": \"#082640\",\n \"6\": \"#061e33\",\n \"7\": \"#051726\",\n \"8\": \"#030f1a\",\n \"8.5\": \"#020b13\",\n} as const;\n\nexport type NavyStep = keyof typeof navy;\n\n/** Ruby Red scale — Figma steps 0 → 8.5 */\nexport const rubyRed = {\n \"0\": \"#fff5f6\",\n \"0.5\": \"#f7dddf\",\n \"1\": \"#efc4c8\",\n \"1.5\": \"#e7acb1\",\n \"2\": \"#df939a\",\n \"3\": \"#ce626d\",\n \"4\": \"#be313f\",\n \"5\": \"#ae0011\",\n \"6\": \"#8b000e\",\n \"7\": \"#68000a\",\n \"8\": \"#460007\",\n \"8.5\": \"#340005\",\n} as const;\n\nexport type RubyRedStep = keyof typeof rubyRed;\n\n/** Emerald Green scale — Figma steps 0 → 8.5 */\nexport const emeraldGreen = {\n \"0\": \"#f0fbf5\",\n \"0.5\": \"#dcf2e5\",\n \"1\": \"#c8e8d5\",\n \"1.5\": \"#b4dfc5\",\n \"2\": \"#a0d5b5\",\n \"3\": \"#77c394\",\n \"4\": \"#4fb074\",\n \"5\": \"#279d54\",\n \"6\": \"#1f7e43\",\n \"7\": \"#175e32\",\n \"8\": \"#103f22\",\n \"8.5\": \"#0c2f19\",\n} as const;\n\nexport type EmeraldGreenStep = keyof typeof emeraldGreen;\n\n/** Figma brand palette — primary swatch per color family */\nexport const brand = {\n slateBlue: \"#182e3c\",\n stormGray: stormGray[\"5\"],\n navy: navy[\"5\"],\n rubyRed: rubyRed[\"5\"],\n emeraldGreen: emeraldGreen[\"5\"],\n} as const;\n\nexport const colors = {\n // Brand colors\n slateBlue: brand.slateBlue,\n\n // Emerald Green — Figma scale + brand swatch\n emeraldGreen0: emeraldGreen[\"0\"],\n emeraldGreen50: emeraldGreen[\"0.5\"],\n emeraldGreen100: emeraldGreen[\"1\"],\n emeraldGreen150: emeraldGreen[\"1.5\"],\n emeraldGreen200: emeraldGreen[\"2\"],\n emeraldGreen300: emeraldGreen[\"3\"],\n emeraldGreen400: emeraldGreen[\"4\"],\n emeraldGreen500: emeraldGreen[\"5\"],\n emeraldGreen600: emeraldGreen[\"6\"],\n emeraldGreen700: emeraldGreen[\"7\"],\n emeraldGreen800: emeraldGreen[\"8\"],\n emeraldGreen850: emeraldGreen[\"8.5\"],\n\n /** Primary brand emerald green — Figma Emerald Green 5 */\n emeraldGreen: brand.emeraldGreen,\n\n // Ruby Red — Figma scale + brand swatch\n rubyRed0: rubyRed[\"0\"],\n rubyRed50: rubyRed[\"0.5\"],\n rubyRed100: rubyRed[\"1\"],\n rubyRed150: rubyRed[\"1.5\"],\n rubyRed200: rubyRed[\"2\"],\n rubyRed300: rubyRed[\"3\"],\n rubyRed400: rubyRed[\"4\"],\n rubyRed500: rubyRed[\"5\"],\n rubyRed600: rubyRed[\"6\"],\n rubyRed700: rubyRed[\"7\"],\n rubyRed800: rubyRed[\"8\"],\n rubyRed850: rubyRed[\"8.5\"],\n\n /** Primary brand ruby red — Figma Ruby Red 5 */\n rubyRed: brand.rubyRed,\n\n // Navy — Figma scale + brand swatch\n navy0: navy[\"0\"],\n navy50: navy[\"0.5\"],\n navy100: navy[\"1\"],\n navy150: navy[\"1.5\"],\n navy200: navy[\"2\"],\n navy300: navy[\"3\"],\n navy400: navy[\"4\"],\n navy500: navy[\"5\"],\n navy600: navy[\"6\"],\n navy700: navy[\"7\"],\n navy800: navy[\"8\"],\n navy850: navy[\"8.5\"],\n\n /** Primary brand navy — Figma Navy 5 */\n navy: brand.navy,\n\n // Storm Gray — Figma scale + brand swatch\n stormGray0: stormGray[\"0\"],\n stormGray50: stormGray[\"0.5\"],\n stormGray100: stormGray[\"1\"],\n stormGray150: stormGray[\"1.5\"],\n stormGray200: stormGray[\"2\"],\n stormGray300: stormGray[\"3\"],\n stormGray400: stormGray[\"4\"],\n stormGray500: stormGray[\"5\"],\n /** Figma brand swatch \"Storm Gray\" — same as `stormGray500` */\n stormGrayBrand: brand.stormGray,\n stormGray600: stormGray[\"6\"],\n stormGray700: stormGray[\"7\"],\n stormGray800: stormGray[\"8\"],\n stormGray850: stormGray[\"8.5\"],\n\n /** @deprecated Use `stormGray0` */\n storm0: stormGray[\"0\"],\n /** @deprecated Use `stormGray50` */\n storm50: stormGray[\"0.5\"],\n /** @deprecated Use `stormGray200` */\n storm200: stormGray[\"2\"],\n /** @deprecated Use `stormGray300` */\n storm300: stormGray[\"3\"],\n /** @deprecated Use `stormGray500` */\n storm500: stormGray[\"5\"],\n /** @deprecated Use `stormGray700` */\n storm700: stormGray[\"7\"],\n /** @deprecated Use `stormGray850` */\n storm900: stormGray[\"8.5\"],\n\n countrySelectorSelectedBg: `${stormGray[\"0.5\"]}99`,\n\n white: \"#ffffff\",\n error: \"#dc2626\",\n errorDark: \"#b3261e\",\n errorLight: \"#fee2e2\",\n /** @deprecated Use `rubyRed` */\n inputError: brand.rubyRed,\n inputOutlineFocus: navy[\"0.5\"],\n inputOutlineError: rubyRed[\"0.5\"],\n warning: \"#92400e\",\n warningBg: \"#fef3c7\",\n success: \"#28a745\",\n successMuted: \"#9fd4a8\",\n /** @deprecated Use `emeraldGreen` */\n green: brand.emeraldGreen,\n transparent: \"transparent\",\n} as const;\n\nexport const radii = {\n sm: 8,\n md: 12,\n lg: 16,\n xl: 20,\n full: 9999,\n} as const;\n\nexport const spacing = {\n xs: 4,\n sm: 8,\n md: 12,\n lg: 16,\n xl: 24,\n xxl: 32,\n} as const;\n\nexport const fontSize = {\n xs: 11,\n sm: 12,\n md: 14,\n base: 16,\n lg: 18,\n xl: 24,\n xxl: 32,\n} as const;\n\n/**\n * Canonical Homepad type scale (matches `.typography-*` in `src/web/styles/typography.css`).\n * font-size / line-height pairs:\n * 12/16 · 14/19 · 18/24 · 20/27 · 24/25 · 32/34\n */\nexport const typographyScale = {\n 12: { fontSize: 12, lineHeight: 16 },\n 14: { fontSize: 14, lineHeight: 19 },\n 18: { fontSize: 18, lineHeight: 24 },\n 20: { fontSize: 20, lineHeight: 27 },\n 24: { fontSize: 24, lineHeight: 25 },\n 32: { fontSize: 32, lineHeight: 34 },\n} as const;\n\nexport const fontWeight = {\n regular: \"400\" as const,\n medium: \"500\" as const,\n semibold: \"600\" as const,\n bold: \"700\" as const,\n};\n\nexport const fonts = {\n sans: \"Noto Sans Armenian\",\n} as const;\n\n/** Input label typography — Medium, typography-12 scale. */\nexport const labelTypography = {\n fontFamily: fonts.sans,\n fontSize: typographyScale[12].fontSize,\n fontWeight: fontWeight.medium,\n lineHeight: typographyScale[12].lineHeight,\n letterSpacing: 0,\n} as const;\n\n/** Button label typography — SemiBold. */\nexport const buttonTypography = {\n lg: {\n fontFamily: fonts.sans,\n fontSize: typographyScale[14].fontSize,\n fontWeight: fontWeight.semibold,\n lineHeight: typographyScale[14].lineHeight,\n letterSpacing: 0,\n },\n sm: {\n fontFamily: fonts.sans,\n fontSize: typographyScale[12].fontSize,\n fontWeight: fontWeight.semibold,\n lineHeight: typographyScale[12].lineHeight,\n letterSpacing: 0,\n },\n} as const;\n\nexport const shadows = {\n card: {\n shadowColor: colors.navy,\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.05,\n shadowRadius: 20,\n elevation: 2,\n },\n cardLg: {\n shadowColor: colors.navy,\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.1,\n shadowRadius: 20,\n elevation: 4,\n },\n} as const;\n","export const ARROW_UP_RIGHT_PATH =\n \"M14.1667 14.1668V5.8335H5.83333M14.1667 5.8335L5.83333 14.1668\";\n","import Svg, { Path } from \"react-native-svg\";\nimport { ARROW_UP_RIGHT_PATH } from \"./arrowUpRightPath\";\n\nexport { ARROW_UP_RIGHT_PATH } from \"./arrowUpRightPath\";\n\ninterface ArrowUpRightIconProps {\n size?: number;\n color?: string;\n strokeWidth?: number;\n}\n\n/** Native — react-native-svg (peer dependency). */\nexport function ArrowUpRightIcon({\n size = 20,\n color = \"#082640\",\n strokeWidth = 2,\n}: ArrowUpRightIconProps) {\n return (\n <Svg width={size} height={size} viewBox=\"0 0 20 20\" fill=\"none\">\n <Path\n d={ARROW_UP_RIGHT_PATH}\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </Svg>\n );\n}\n","import { useLayoutEffect } from \"react\";\nimport { Platform } from \"react-native\";\n\ninterface ClassListElement {\n classList: {\n add: (...classes: string[]) => void;\n remove: (...classes: string[]) => void;\n };\n}\n\nfunction hasClassList(node: unknown): node is ClassListElement {\n return (\n typeof node === \"object\" &&\n node !== null &&\n \"classList\" in node &&\n typeof (node as ClassListElement).classList?.add === \"function\"\n );\n}\n\nfunction resolveWebElement(ref: React.RefObject<unknown>): ClassListElement | null {\n const node = ref.current;\n if (!node) return null;\n\n if (hasClassList(node)) return node;\n\n const host = node as {\n _touchableNode?: unknown;\n getScrollableNode?: () => unknown;\n };\n\n if (hasClassList(host._touchableNode)) return host._touchableNode;\n\n if (typeof host.getScrollableNode === \"function\") {\n const scrollNode = host.getScrollableNode();\n if (hasClassList(scrollNode)) return scrollNode;\n }\n\n return null;\n}\n\n/**\n * Applies CSS class names to the underlying DOM node on web.\n * Keeps TouchableOpacity/Text as the render path so default RN styles stay intact.\n *\n * Retries via rAF when the host node is not ready yet — otherwise classes like\n * `h-13` / `w-full` would only land after a later re-render (e.g. typing in a form),\n * which visibly changes button size.\n */\nexport function useApplyWebClassName(\n ref: React.RefObject<unknown>,\n className?: string,\n enabled = true,\n): void {\n useLayoutEffect(() => {\n if (!enabled || Platform.OS !== \"web\" || !className?.trim()) return;\n\n let cancelled = false;\n let rafId = 0;\n let appliedElement: ClassListElement | null = null;\n const classes = className.trim().split(/\\s+/);\n\n const apply = () => {\n if (cancelled) return;\n\n const element = resolveWebElement(ref);\n if (!element) {\n rafId = requestAnimationFrame(apply);\n return;\n }\n\n appliedElement = element;\n element.classList.add(...classes);\n };\n\n apply();\n\n return () => {\n cancelled = true;\n if (rafId) cancelAnimationFrame(rafId);\n appliedElement?.classList.remove(...classes);\n };\n }, [ref, className, enabled]);\n}\n","import { useRef, type ComponentRef, type ReactNode } from \"react\";\nimport {\n Platform,\n StyleSheet,\n Text,\n TouchableOpacity,\n View,\n type GestureResponderEvent,\n type StyleProp,\n type TextStyle,\n type ViewStyle,\n} from \"react-native\";\nimport { ArrowUpRightIcon } from \"../icons/ArrowUpRightIcon\";\nimport { colors, buttonTypography } from \"../theme/tokens\";\nimport { useApplyWebClassName } from \"../utils/useApplyWebClassName\";\n\nexport type ButtonVariant = \"white\" | \"primary\" | \"green\" | \"gray\";\nexport type ButtonSize = \"lg\" | \"sm\";\n\nexport interface ButtonProps {\n title?: string;\n children?: ReactNode;\n onPress: (event: GestureResponderEvent) => void;\n disabled?: boolean;\n variant?: ButtonVariant;\n size?: ButtonSize;\n showIcon?: boolean;\n /** Custom icon inside the badge. Defaults to `ArrowUpRightIcon` when `showIcon` is true. */\n icon?: ReactNode;\n style?: StyleProp<ViewStyle>;\n textStyle?: StyleProp<TextStyle>;\n className?: string;\n textClassName?: string;\n}\n\ntype VariantStyleSet = {\n backgroundColor: string;\n textColor: string;\n iconBadgeBackgroundColor: string;\n iconColor: string;\n};\n\nconst variantConfig: Record<ButtonVariant, VariantStyleSet> = {\n white: {\n backgroundColor: colors.white,\n textColor: colors.slateBlue,\n iconBadgeBackgroundColor: colors.stormGray150,\n iconColor: colors.navy,\n },\n primary: {\n backgroundColor: colors.navy,\n textColor: colors.stormGray0,\n iconBadgeBackgroundColor: colors.white,\n iconColor: colors.navy,\n },\n green: {\n backgroundColor: colors.green,\n textColor: colors.stormGray0,\n iconBadgeBackgroundColor: colors.white,\n iconColor: colors.green,\n },\n gray: {\n backgroundColor: colors.stormGray50,\n textColor: colors.slateBlue,\n iconBadgeBackgroundColor: colors.stormGray150,\n iconColor: colors.navy,\n },\n};\n\nconst sizeConfig = {\n lg: {\n /** Matches Tailwind `h-13` so size stays stable before web classNames attach. */\n minHeight: 52,\n borderRadius: 16,\n paddingTop: 8,\n paddingRight: 8,\n paddingBottom: 8,\n paddingLeft: 24,\n paddingHorizontalCentered: 24,\n text: buttonTypography.lg,\n iconContainerSize: 36,\n iconContainerRadius: 12,\n iconContainerPadding: 8,\n iconSize: 20,\n },\n sm: {\n minHeight: 40,\n borderRadius: 12,\n paddingTop: 8,\n paddingRight: 8,\n paddingBottom: 8,\n paddingLeft: 16,\n paddingHorizontalCentered: 16,\n text: buttonTypography.sm,\n iconContainerSize: 32,\n iconContainerRadius: 8,\n iconContainerPadding: 8,\n iconSize: 16,\n },\n} as const;\n\nexport function Button({\n title,\n children,\n onPress,\n disabled = false,\n variant = \"primary\",\n size = \"lg\",\n showIcon = false,\n icon,\n style,\n textStyle,\n className,\n textClassName,\n}: ButtonProps) {\n const containerRef = useRef<ComponentRef<typeof TouchableOpacity>>(null);\n const textRef = useRef<ComponentRef<typeof Text>>(null);\n const preset = variantConfig[variant];\n const metrics = sizeConfig[size];\n\n const label = typeof children !== \"undefined\" ? children : title;\n const hasCustomChildren = typeof children !== \"undefined\";\n const customIcon =\n icon != null && typeof icon !== \"boolean\" ? icon : undefined;\n const hasIcon = showIcon || icon === true || customIcon != null;\n const resolvedContainerClassName = [\n Platform.OS === \"web\" ? \"max-md:px-4!\" : \"\",\n className,\n ]\n .filter(Boolean)\n .join(\" \");\n\n useApplyWebClassName(containerRef, resolvedContainerClassName || undefined);\n useApplyWebClassName(textRef, textClassName);\n\n const iconNode =\n customIcon ?? (\n <ArrowUpRightIcon size={metrics.iconSize} color={preset.iconColor} />\n );\n\n const containerStyle = [\n styles.base,\n {\n minHeight: metrics.minHeight,\n borderRadius: metrics.borderRadius,\n backgroundColor: preset.backgroundColor,\n paddingTop: metrics.paddingTop,\n paddingBottom: metrics.paddingBottom,\n paddingLeft: hasIcon ? metrics.paddingLeft : metrics.paddingHorizontalCentered,\n paddingRight: hasIcon ? metrics.paddingRight : metrics.paddingHorizontalCentered,\n },\n hasIcon ? styles.withIcon : styles.centered,\n disabled && styles.disabled,\n style,\n ];\n\n const labelStyle = [\n styles.label,\n metrics.text,\n { color: preset.textColor },\n Platform.OS === \"android\" ? styles.labelAndroid : null,\n !hasIcon && styles.labelCentered,\n hasIcon && styles.labelWithIcon,\n textStyle,\n ];\n\n return (\n <TouchableOpacity\n ref={containerRef}\n style={containerStyle}\n onPress={onPress}\n disabled={disabled}\n activeOpacity={0.7}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled }}\n >\n {hasCustomChildren ? (\n children\n ) : (\n <Text ref={textRef} style={labelStyle}>\n {label}\n </Text>\n )}\n\n {hasIcon ? (\n <View\n style={[\n styles.iconContainer,\n {\n width: metrics.iconContainerSize,\n height: metrics.iconContainerSize,\n borderRadius: metrics.iconContainerRadius,\n padding: metrics.iconContainerPadding,\n backgroundColor: preset.iconBadgeBackgroundColor,\n },\n ]}\n >\n {iconNode}\n </View>\n ) : null}\n </TouchableOpacity>\n );\n}\n\nconst styles = StyleSheet.create({\n base: {\n flexDirection: \"row\",\n alignItems: \"center\",\n borderWidth: 0,\n },\n centered: {\n justifyContent: \"center\",\n },\n withIcon: {\n justifyContent: \"space-between\",\n },\n disabled: {\n opacity: 0.6,\n },\n label: {},\n labelAndroid: {\n includeFontPadding: false,\n },\n labelCentered: {\n textAlign: \"center\",\n },\n labelWithIcon: {\n flex: 1,\n flexShrink: 1,\n marginRight: 8,\n },\n iconContainer: {\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n },\n});\n","import { useRef, type ComponentRef, type ReactNode } from \"react\";\nimport {\n StyleSheet,\n Text,\n type StyleProp,\n type TextProps,\n type TextStyle,\n} from \"react-native\";\nimport { colors, labelTypography } from \"../theme/tokens\";\nimport { useApplyWebClassName } from \"../utils/useApplyWebClassName\";\n\nexport interface LabelProps extends TextProps {\n children: ReactNode;\n /** Render as a required field indicator. */\n required?: boolean;\n disabled?: boolean;\n style?: StyleProp<TextStyle>;\n className?: string;\n}\n\nexport function Label({\n children,\n required = false,\n disabled = false,\n style,\n className,\n ...props\n}: LabelProps) {\n const ref = useRef<ComponentRef<typeof Text>>(null);\n useApplyWebClassName(ref, className);\n\n return (\n <Text\n ref={ref}\n style={[styles.label, disabled && styles.labelDisabled, style]}\n accessibilityRole=\"text\"\n {...props}\n >\n {children}\n {required ? <Text style={styles.required}> *</Text> : null}\n </Text>\n );\n}\n\nconst styles = StyleSheet.create({\n label: {\n ...labelTypography,\n color: colors.slateBlue,\n },\n labelDisabled: {\n color: colors.stormGray400,\n },\n required: {\n color: colors.inputError,\n },\n});\n","export const EYE_OPEN_OUTLINE_PATH =\n \"M1.71835 10.2898C1.6489 10.1027 1.6489 9.89691 1.71835 9.70981C2.39476 8.06969 3.54294 6.66735 5.01732 5.68056C6.4917 4.69378 8.22588 4.16699 10 4.16699C11.7741 4.16699 13.5083 4.69378 14.9827 5.68056C16.4571 6.66735 17.6053 8.06969 18.2817 9.70981C18.3511 9.89691 18.3511 10.1027 18.2817 10.2898C17.6053 11.9299 16.4571 13.3323 14.9827 14.3191C13.5083 15.3058 11.7741 15.8326 10 15.8326C8.22588 15.8326 6.4917 15.3058 5.01732 14.3191C3.54294 13.3323 2.39476 11.9299 1.71835 10.2898Z\";\n\nexport const EYE_OPEN_PUPIL_PATH =\n \"M10 12.4998C11.3807 12.4998 12.5 11.3805 12.5 9.99981C12.5 8.6191 11.3807 7.49981 10 7.49981C8.6193 7.49981 7.50001 8.6191 7.50001 9.99981C7.50001 11.3805 8.6193 12.4998 10 12.4998Z\";\n\nexport const EYE_OFF_PATH =\n \"M10.733 5.076C13.0624 4.7984 15.4186 5.29082 17.4419 6.47805C19.4651 7.66528 21.0442 9.48208 21.938 11.651C22.0213 11.8755 22.0213 12.1225 21.938 12.347C21.5705 13.238 21.0848 14.0755 20.494 14.837M14.084 14.158C13.5182 14.7045 12.7604 15.0069 11.9738 15C11.1872 14.9932 10.4348 14.6777 9.87854 14.1215C9.32232 13.5652 9.00681 12.8128 8.99998 12.0262C8.99314 11.2396 9.29553 10.4818 9.842 9.916M17.479 17.499C16.1525 18.2848 14.6725 18.776 13.1394 18.9394C11.6063 19.1028 10.056 18.9345 8.59363 18.4459C7.13131 17.9573 5.79119 17.1599 4.66421 16.1077C3.53723 15.0556 2.64975 13.7734 2.062 12.348C1.97866 12.1235 1.97866 11.8765 2.062 11.652C2.94863 9.50186 4.50867 7.69725 6.508 6.509M2 2L22 22\";\n","import Svg, { Path } from \"react-native-svg\";\nimport { EYE_OPEN_OUTLINE_PATH, EYE_OPEN_PUPIL_PATH } from \"./eyeIconPaths\";\n\nexport { EYE_OPEN_OUTLINE_PATH, EYE_OPEN_PUPIL_PATH } from \"./eyeIconPaths\";\n\ninterface EyeIconProps {\n size?: number;\n color?: string;\n strokeWidth?: number;\n}\n\n/** Native — open eye (password hidden). */\nexport function EyeIcon({\n size = 20,\n color = \"#c7cdd1\",\n strokeWidth = 2,\n}: EyeIconProps) {\n return (\n <Svg width={size} height={size} viewBox=\"0 0 20 20\" fill=\"none\">\n <Path\n d={EYE_OPEN_OUTLINE_PATH}\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <Path\n d={EYE_OPEN_PUPIL_PATH}\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </Svg>\n );\n}\n","import Svg, { Path } from \"react-native-svg\";\nimport { EYE_OFF_PATH } from \"./eyeIconPaths\";\n\nexport { EYE_OFF_PATH } from \"./eyeIconPaths\";\n\ninterface EyeOffIconProps {\n size?: number;\n color?: string;\n strokeWidth?: number;\n}\n\n/** Native — slashed eye (password visible). */\nexport function EyeOffIcon({\n size = 20,\n color = \"#c7cdd1\",\n strokeWidth = 2,\n}: EyeOffIconProps) {\n return (\n <Svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <Path\n d={EYE_OFF_PATH}\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </Svg>\n );\n}\n","import { Platform, StyleSheet, type TextStyle, type ViewStyle } from \"react-native\";\nimport { colors, fonts, fontSize, fontWeight, radii } from \"./tokens\";\n\nexport const INPUT_HEIGHT = 52;\nexport const INPUT_ICON_SIZE = 20;\nexport const INPUT_ICON_GAP = 10;\nexport const INPUT_OUTLINE_WIDTH = 2;\nexport const INPUT_TEXT_LINE_HEIGHT = 19;\nexport const INPUT_WEB_VERTICAL_PADDING = 14;\n\nexport type InputVisualState =\n | \"default\"\n | \"focused\"\n | \"error\"\n | \"disabled\";\n\nexport interface InputStateFlags {\n focused?: boolean;\n error?: boolean;\n disabled?: boolean;\n}\n\nexport function resolveInputVisualState({\n focused = false,\n error = false,\n disabled = false,\n}: InputStateFlags): InputVisualState {\n if (disabled) return \"disabled\";\n if (error) return \"error\";\n if (focused) return \"focused\";\n return \"default\";\n}\n\ninterface FieldStyleSet {\n container: ViewStyle;\n outline: ViewStyle;\n text: TextStyle;\n placeholder: string;\n icon: string;\n}\n\nfunction createOutlineStyle(ringColor: string): ViewStyle {\n return {\n borderRadius: radii.lg + INPUT_OUTLINE_WIDTH,\n borderWidth: INPUT_OUTLINE_WIDTH,\n borderColor: ringColor,\n padding: 0,\n backgroundColor: colors.transparent,\n width: \"100%\",\n alignSelf: \"stretch\",\n ...(Platform.OS !== \"web\" ? { overflow: \"hidden\" as const } : null),\n };\n}\n\nconst defaultOutline: ViewStyle = {\n borderRadius: radii.lg + INPUT_OUTLINE_WIDTH,\n borderWidth: INPUT_OUTLINE_WIDTH,\n borderColor: colors.transparent,\n padding: 0,\n backgroundColor: colors.transparent,\n width: \"100%\",\n alignSelf: \"stretch\",\n ...(Platform.OS !== \"web\" ? { overflow: \"hidden\" as const } : null),\n};\n\nexport function getInputFieldStyles(state: InputVisualState): FieldStyleSet {\n const containerBase: ViewStyle = {\n borderRadius: radii.lg,\n ...(Platform.OS !== \"web\" ? { overflow: \"hidden\" as const } : null),\n };\n\n switch (state) {\n case \"disabled\":\n return {\n outline: defaultOutline,\n container: {\n ...containerBase,\n borderWidth: 1,\n borderColor: colors.stormGray50,\n backgroundColor: colors.stormGray50,\n },\n text: { color: colors.stormGray300 },\n placeholder: colors.stormGray300,\n icon: colors.stormGray150,\n };\n case \"error\":\n return {\n outline: createOutlineStyle(colors.inputOutlineError),\n container: {\n ...containerBase,\n borderWidth: 1,\n borderColor: colors.inputError,\n backgroundColor: colors.white,\n },\n text: { color: colors.inputError },\n placeholder: colors.stormGray200,\n icon: colors.inputError,\n };\n case \"focused\":\n return {\n outline: createOutlineStyle(colors.inputOutlineFocus),\n container: {\n ...containerBase,\n borderWidth: 1,\n borderColor: colors.navy,\n backgroundColor: colors.white,\n },\n text: { color: colors.slateBlue },\n placeholder: colors.stormGray200,\n icon: colors.navy,\n };\n default:\n return {\n outline: defaultOutline,\n container: {\n ...containerBase,\n borderWidth: 1,\n borderColor: colors.stormGray50,\n backgroundColor: colors.white,\n },\n text: { color: colors.slateBlue },\n placeholder: colors.stormGray200,\n icon: colors.stormGray150,\n };\n }\n}\n\nexport const inputFieldMetrics = StyleSheet.create({\n container: {\n flexDirection: \"row\",\n alignItems: \"center\",\n height: INPUT_HEIGHT,\n borderRadius: radii.lg,\n padding: 16,\n gap: INPUT_ICON_GAP,\n ...(Platform.OS === \"web\"\n ? ({\n boxSizing: \"border-box\",\n paddingVertical: INPUT_WEB_VERTICAL_PADDING,\n paddingHorizontal: 16,\n } as ViewStyle)\n : null),\n },\n input: {\n flex: 1,\n minWidth: 0,\n width: \"100%\",\n fontFamily: fonts.sans,\n fontSize: fontSize.md,\n fontWeight: fontWeight.medium,\n paddingVertical: 0,\n paddingHorizontal: 0,\n margin: 0,\n borderWidth: 0,\n backgroundColor: colors.transparent,\n ...(Platform.OS === \"android\"\n ? { includeFontPadding: false }\n : null),\n ...(Platform.OS === \"ios\"\n ? { lineHeight: INPUT_TEXT_LINE_HEIGHT, paddingVertical: 2 }\n : null),\n ...(Platform.OS === \"web\"\n ? ({\n alignSelf: \"center\",\n outlineStyle: \"none\",\n lineHeight: INPUT_TEXT_LINE_HEIGHT,\n } as TextStyle)\n : {\n alignSelf: \"stretch\",\n }),\n },\n /** Single-line: avoid Android lineHeight jump between placeholder and typed text. */\n inputSingleLine: {\n ...(Platform.OS === \"android\"\n ? ({ textAlignVertical: \"center\" } as TextStyle)\n : null),\n },\n});\n","import {\n cloneElement,\n isValidElement,\n useRef,\n useState,\n type ComponentRef,\n type ReactNode,\n} from \"react\";\nimport {\n Pressable,\n StyleSheet,\n Text,\n TextInput,\n View,\n type NativeSyntheticEvent,\n type StyleProp,\n type TextInputFocusEventData,\n type TextInputProps,\n type TextStyle,\n type ViewStyle,\n} from \"react-native\";\nimport { EyeIcon } from \"../icons/EyeIcon\";\nimport { EyeOffIcon } from \"../icons/EyeOffIcon\";\nimport {\n getInputFieldStyles,\n inputFieldMetrics,\n INPUT_ICON_SIZE,\n resolveInputVisualState,\n} from \"../theme/input\";\nimport { colors, spacing } from \"../theme/tokens\";\nimport { useApplyWebClassName } from \"../utils/useApplyWebClassName\";\nimport { Label } from \"./Label\";\n\ntype InputIconProps = {\n size?: number;\n color?: string;\n};\n\nfunction renderInputIcon(icon: ReactNode, color: string) {\n if (!icon) return null;\n\n if (isValidElement<InputIconProps>(icon)) {\n return cloneElement(icon, {\n size: icon.props.size ?? INPUT_ICON_SIZE,\n color: icon.props.color ?? color,\n });\n }\n\n return icon;\n}\n\nexport interface InputProps extends TextInputProps {\n /** Optional field label rendered above the input. */\n label?: string;\n leftIcon?: ReactNode;\n rightIcon?: ReactNode;\n /** Validation or helper error message. Shown instead of `hint` when set. */\n error?: string;\n /** Applies error field styling without showing a message (use with a form-level error). */\n invalid?: boolean;\n /** Helper text shown below the input when there is no error. */\n hint?: string;\n containerStyle?: StyleProp<ViewStyle>;\n style?: StyleProp<TextStyle>;\n className?: string;\n /** CSS classes for the bordered field container (web). */\n fieldClassName?: string;\n /** Styles merged into the bordered field container. */\n fieldStyle?: StyleProp<ViewStyle>;\n labelClassName?: string;\n /** Styles merged into the field label. */\n labelStyles?: StyleProp<TextStyle>;\n inputClassName?: string;\n errorClassName?: string;\n hintClassName?: string;\n /** When `secureTextEntry` is set, show a toggleable eye icon. Pass `false` to disable. */\n showPasswordToggle?: boolean;\n}\n\nexport function Input({\n label,\n leftIcon,\n rightIcon,\n error,\n invalid,\n hint,\n containerStyle,\n style,\n className,\n fieldClassName,\n fieldStyle,\n labelClassName,\n labelStyles,\n inputClassName,\n errorClassName,\n hintClassName,\n editable = true,\n secureTextEntry,\n showPasswordToggle,\n onFocus,\n onBlur,\n multiline,\n textAlignVertical,\n ...props\n}: InputProps) {\n const wrapperRef = useRef<ComponentRef<typeof View>>(null);\n const fieldRef = useRef<ComponentRef<typeof View>>(null);\n const inputRef = useRef<ComponentRef<typeof TextInput>>(null);\n const helperRef = useRef<ComponentRef<typeof Text>>(null);\n const [focused, setFocused] = useState(false);\n const [passwordVisible, setPasswordVisible] = useState(false);\n\n useApplyWebClassName(wrapperRef, className);\n useApplyWebClassName(fieldRef, fieldClassName);\n useApplyWebClassName(inputRef, inputClassName);\n useApplyWebClassName(helperRef, error ? errorClassName : hintClassName);\n\n const isDisabled = editable === false;\n const hasError = Boolean(error) || Boolean(invalid);\n const passwordToggleEnabled =\n secureTextEntry === true && showPasswordToggle !== false && rightIcon == null;\n const effectiveSecureTextEntry = passwordToggleEnabled\n ? !passwordVisible\n : secureTextEntry;\n // Keep placeholder and typed text on the same vertical line (esp. Android).\n const resolvedTextAlignVertical =\n textAlignVertical ?? (multiline ? \"top\" : \"center\");\n const visualState = resolveInputVisualState({\n focused,\n error: hasError,\n disabled: isDisabled,\n });\n const fieldStyles = getInputFieldStyles(visualState);\n const iconColor = fieldStyles.icon;\n\n function handleFocus(event: NativeSyntheticEvent<TextInputFocusEventData>) {\n setFocused(true);\n onFocus?.(event);\n }\n\n function handleBlur(event: NativeSyntheticEvent<TextInputFocusEventData>) {\n setFocused(false);\n onBlur?.(event);\n }\n\n const helperMessage = error ?? hint;\n\n function togglePasswordVisibility() {\n if (!isDisabled) {\n setPasswordVisible((visible) => !visible);\n }\n }\n\n const trailingIcon = passwordToggleEnabled ? (\n <Pressable\n onPress={togglePasswordVisibility}\n disabled={isDisabled}\n accessibilityRole=\"button\"\n accessibilityLabel={passwordVisible ? \"Hide password\" : \"Show password\"}\n hitSlop={8}\n style={styles.iconPressable}\n >\n {renderInputIcon(\n passwordVisible ? <EyeOffIcon /> : <EyeIcon />,\n iconColor,\n )}\n </Pressable>\n ) : rightIcon ? (\n renderInputIcon(rightIcon, iconColor)\n ) : null;\n\n return (\n <View ref={wrapperRef} style={[styles.wrapper, containerStyle]}>\n {label ? (\n <Label\n disabled={isDisabled}\n className={labelClassName}\n style={labelStyles}\n >\n {label}\n </Label>\n ) : null}\n <View style={fieldStyles.outline}>\n <View\n ref={fieldRef}\n style={[inputFieldMetrics.container, fieldStyles.container, fieldStyle]}\n >\n {leftIcon ? (\n <View style={styles.iconSlot}>{renderInputIcon(leftIcon, iconColor)}</View>\n ) : null}\n <TextInput\n ref={inputRef}\n style={[\n inputFieldMetrics.input,\n !multiline ? inputFieldMetrics.inputSingleLine : null,\n fieldStyles.text,\n style,\n ]}\n placeholderTextColor={fieldStyles.placeholder}\n editable={editable}\n multiline={multiline}\n secureTextEntry={effectiveSecureTextEntry}\n textAlign=\"left\"\n textAlignVertical={resolvedTextAlignVertical}\n onFocus={handleFocus}\n onBlur={handleBlur}\n accessibilityState={{ disabled: isDisabled }}\n {...props}\n />\n {trailingIcon ? (\n <View style={styles.iconSlot}>{trailingIcon}</View>\n ) : null}\n </View>\n </View>\n {helperMessage ? (\n <Text ref={helperRef} style={error ? styles.error : styles.hint}>\n {helperMessage}\n </Text>\n ) : null}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n wrapper: {\n width: \"100%\",\n minWidth: 0,\n gap: spacing.sm,\n },\n iconSlot: {\n width: INPUT_ICON_SIZE,\n height: INPUT_ICON_SIZE,\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n },\n iconPressable: {\n width: INPUT_ICON_SIZE,\n height: INPUT_ICON_SIZE,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n error: {\n fontSize: 12,\n lineHeight: 16,\n color: colors.inputError,\n },\n hint: {\n fontSize: 12,\n lineHeight: 16,\n color: colors.stormGray300,\n },\n});\n"]}
|