@scripso-homepad/ui 0.3.8 → 0.4.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.
Files changed (37) hide show
  1. package/dist/chunk-C7GHBVMM.js +614 -0
  2. package/dist/chunk-C7GHBVMM.js.map +1 -0
  3. package/dist/index.cjs +33 -22
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +5 -1
  6. package/dist/index.d.ts +5 -1
  7. package/dist/index.js +29 -624
  8. package/dist/index.js.map +1 -1
  9. package/dist/web/index.cjs +1211 -0
  10. package/dist/web/index.cjs.map +1 -0
  11. package/dist/web/index.d.cts +156 -0
  12. package/dist/web/index.d.ts +156 -0
  13. package/dist/web/index.js +761 -0
  14. package/dist/web/index.js.map +1 -0
  15. package/package.json +26 -2
  16. package/src/components/Input.tsx +12 -1
  17. package/src/web/hooks/useMediaQuery.ts +23 -0
  18. package/src/web/hooks/useOnClickOutside.ts +30 -0
  19. package/src/web/icons/BellIcon.tsx +27 -0
  20. package/src/web/icons/BuildingIcon.tsx +55 -0
  21. package/src/web/index.ts +37 -0
  22. package/src/web/layout/AppHeader.stories.tsx +85 -0
  23. package/src/web/layout/AppHeader.tsx +115 -0
  24. package/src/web/layout/BuildingSelect.stories.tsx +60 -0
  25. package/src/web/layout/BuildingSelect.tsx +208 -0
  26. package/src/web/layout/DashboardLayout.stories.tsx +87 -0
  27. package/src/web/layout/DashboardLayout.tsx +37 -0
  28. package/src/web/layout/Sidebar.stories.tsx +80 -0
  29. package/src/web/layout/Sidebar.tsx +244 -0
  30. package/src/web/layout/SidebarMobileHeader.stories.tsx +47 -0
  31. package/src/web/layout/SidebarMobileHeader.tsx +48 -0
  32. package/src/web/layout/SidebarNavItem.tsx +60 -0
  33. package/src/web/layout/SidebarUserCard.tsx +79 -0
  34. package/src/web/layout/story-fixtures.tsx +93 -0
  35. package/src/web/layout/story-helpers.tsx +5 -0
  36. package/src/web/layout/types.ts +48 -0
  37. package/src/web/utils/cn.ts +6 -0
@@ -0,0 +1,614 @@
1
+ import { useLayoutEffect, useRef, useState, isValidElement, cloneElement } from 'react';
2
+ import { StyleSheet, Platform, Text, Pressable, View, TextInput } from 'react-native';
3
+ import { jsxs, jsx } from 'react/jsx-runtime';
4
+ import Svg, { Path } from 'react-native-svg';
5
+
6
+ // src/theme/tokens.ts
7
+ var stormGray = {
8
+ "0": "#fbfcfc",
9
+ "0.5": "#eceef0",
10
+ "1": "#dadde0",
11
+ "1.5": "#c7cdd1",
12
+ "2": "#b5bcc1",
13
+ "3": "#8f9aa3",
14
+ "4": "#6a7984",
15
+ "5": "#455765",
16
+ "6": "#374651",
17
+ "7": "#29343d",
18
+ "8": "#1c2328",
19
+ "8.5": "#151a1e"
20
+ };
21
+ var navy = {
22
+ "0": "#f8f9fb",
23
+ "0.5": "#e5e9ef",
24
+ "1": "#cdd3df",
25
+ "1.5": "#b4bece",
26
+ "2": "#9ca8be",
27
+ "3": "#6a7d9e",
28
+ "4": "#39527d",
29
+ "5": "#08275d",
30
+ "6": "#061f4a",
31
+ "7": "#051738",
32
+ "8": "#031025",
33
+ "8.5": "#020c1c"
34
+ };
35
+ var rubyRed = {
36
+ "0": "#fff5f6",
37
+ "0.5": "#f7dddf",
38
+ "1": "#efc4c8",
39
+ "1.5": "#e7acb1",
40
+ "2": "#df939a",
41
+ "3": "#ce626d",
42
+ "4": "#be313f",
43
+ "5": "#ae0011",
44
+ "6": "#8b000e",
45
+ "7": "#68000a",
46
+ "8": "#460007",
47
+ "8.5": "#340005"
48
+ };
49
+ var emeraldGreen = {
50
+ "0": "#f0fbf5",
51
+ "0.5": "#dcf2e5",
52
+ "1": "#c8e8d5",
53
+ "1.5": "#b4dfc5",
54
+ "2": "#a0d5b5",
55
+ "3": "#77c394",
56
+ "4": "#4fb074",
57
+ "5": "#279d54",
58
+ "6": "#1f7e43",
59
+ "7": "#175e32",
60
+ "8": "#103f22",
61
+ "8.5": "#0c2f19"
62
+ };
63
+ var brand = {
64
+ slateBlue: "#182e3c",
65
+ stormGray: stormGray["5"],
66
+ navy: navy["5"],
67
+ rubyRed: rubyRed["5"],
68
+ emeraldGreen: emeraldGreen["5"]
69
+ };
70
+ var colors = {
71
+ // Brand colors
72
+ slateBlue: brand.slateBlue,
73
+ // Emerald Green — Figma scale + brand swatch
74
+ emeraldGreen0: emeraldGreen["0"],
75
+ emeraldGreen50: emeraldGreen["0.5"],
76
+ emeraldGreen100: emeraldGreen["1"],
77
+ emeraldGreen150: emeraldGreen["1.5"],
78
+ emeraldGreen200: emeraldGreen["2"],
79
+ emeraldGreen300: emeraldGreen["3"],
80
+ emeraldGreen400: emeraldGreen["4"],
81
+ emeraldGreen500: emeraldGreen["5"],
82
+ emeraldGreen600: emeraldGreen["6"],
83
+ emeraldGreen700: emeraldGreen["7"],
84
+ emeraldGreen800: emeraldGreen["8"],
85
+ emeraldGreen850: emeraldGreen["8.5"],
86
+ /** Primary brand emerald green — Figma Emerald Green 5 */
87
+ emeraldGreen: brand.emeraldGreen,
88
+ // Ruby Red — Figma scale + brand swatch
89
+ rubyRed0: rubyRed["0"],
90
+ rubyRed50: rubyRed["0.5"],
91
+ rubyRed100: rubyRed["1"],
92
+ rubyRed150: rubyRed["1.5"],
93
+ rubyRed200: rubyRed["2"],
94
+ rubyRed300: rubyRed["3"],
95
+ rubyRed400: rubyRed["4"],
96
+ rubyRed500: rubyRed["5"],
97
+ rubyRed600: rubyRed["6"],
98
+ rubyRed700: rubyRed["7"],
99
+ rubyRed800: rubyRed["8"],
100
+ rubyRed850: rubyRed["8.5"],
101
+ /** Primary brand ruby red — Figma Ruby Red 5 */
102
+ rubyRed: brand.rubyRed,
103
+ // Navy — Figma scale + brand swatch
104
+ navy0: navy["0"],
105
+ navy50: navy["0.5"],
106
+ navy100: navy["1"],
107
+ navy150: navy["1.5"],
108
+ navy200: navy["2"],
109
+ navy300: navy["3"],
110
+ navy400: navy["4"],
111
+ navy500: navy["5"],
112
+ navy600: navy["6"],
113
+ navy700: navy["7"],
114
+ navy800: navy["8"],
115
+ navy850: navy["8.5"],
116
+ /** Primary brand navy — Figma Navy 5 */
117
+ navy: brand.navy,
118
+ // Storm Gray — Figma scale + brand swatch
119
+ stormGray0: stormGray["0"],
120
+ stormGray50: stormGray["0.5"],
121
+ stormGray100: stormGray["1"],
122
+ stormGray150: stormGray["1.5"],
123
+ stormGray200: stormGray["2"],
124
+ stormGray300: stormGray["3"],
125
+ stormGray400: stormGray["4"],
126
+ stormGray500: stormGray["5"],
127
+ /** Figma brand swatch "Storm Gray" — same as `stormGray500` */
128
+ stormGrayBrand: brand.stormGray,
129
+ stormGray600: stormGray["6"],
130
+ stormGray700: stormGray["7"],
131
+ stormGray800: stormGray["8"],
132
+ stormGray850: stormGray["8.5"],
133
+ /** @deprecated Use `stormGray0` */
134
+ storm0: stormGray["0"],
135
+ /** @deprecated Use `stormGray50` */
136
+ storm50: stormGray["0.5"],
137
+ /** @deprecated Use `stormGray200` */
138
+ storm200: stormGray["2"],
139
+ /** @deprecated Use `stormGray300` */
140
+ storm300: stormGray["3"],
141
+ /** @deprecated Use `stormGray500` */
142
+ storm500: stormGray["5"],
143
+ /** @deprecated Use `stormGray700` */
144
+ storm700: stormGray["7"],
145
+ /** @deprecated Use `stormGray850` */
146
+ storm900: stormGray["8.5"],
147
+ countrySelectorSelectedBg: `${stormGray["0.5"]}99`,
148
+ white: "#ffffff",
149
+ error: "#dc2626",
150
+ errorDark: "#b3261e",
151
+ errorLight: "#fee2e2",
152
+ /** @deprecated Use `rubyRed` */
153
+ inputError: brand.rubyRed,
154
+ inputOutlineFocus: navy["0.5"],
155
+ inputOutlineError: rubyRed["0.5"],
156
+ warning: "#92400e",
157
+ warningBg: "#fef3c7",
158
+ success: "#28a745",
159
+ successMuted: "#9fd4a8",
160
+ /** @deprecated Use `emeraldGreen` */
161
+ green: brand.emeraldGreen,
162
+ transparent: "transparent"
163
+ };
164
+ var radii = {
165
+ sm: 8,
166
+ md: 12,
167
+ lg: 16,
168
+ xl: 20,
169
+ full: 9999
170
+ };
171
+ var spacing = {
172
+ xs: 4,
173
+ sm: 8,
174
+ md: 12,
175
+ lg: 16,
176
+ xl: 24,
177
+ xxl: 32
178
+ };
179
+ var fontSize = {
180
+ xs: 11,
181
+ sm: 12,
182
+ md: 14,
183
+ base: 16,
184
+ lg: 18,
185
+ xl: 24,
186
+ xxl: 32
187
+ };
188
+ var fontWeight = {
189
+ regular: "400",
190
+ medium: "500",
191
+ semibold: "600",
192
+ bold: "700"
193
+ };
194
+ var fonts = {
195
+ sans: "Noto Sans Armenian"
196
+ };
197
+ var labelTypography = {
198
+ fontFamily: fonts.sans,
199
+ fontSize: fontSize.sm,
200
+ fontWeight: fontWeight.medium,
201
+ lineHeight: fontSize.sm,
202
+ letterSpacing: 0
203
+ };
204
+ var buttonTypography = {
205
+ lg: {
206
+ fontFamily: fonts.sans,
207
+ fontSize: 14,
208
+ fontWeight: fontWeight.semibold,
209
+ lineHeight: 18,
210
+ letterSpacing: 0
211
+ },
212
+ sm: {
213
+ fontFamily: fonts.sans,
214
+ fontSize: 12,
215
+ fontWeight: fontWeight.semibold,
216
+ lineHeight: 16,
217
+ letterSpacing: 0
218
+ }
219
+ };
220
+ var shadows = {
221
+ card: {
222
+ shadowColor: colors.navy,
223
+ shadowOffset: { width: 0, height: 4 },
224
+ shadowOpacity: 0.05,
225
+ shadowRadius: 20,
226
+ elevation: 2
227
+ },
228
+ cardLg: {
229
+ shadowColor: colors.navy,
230
+ shadowOffset: { width: 0, height: 4 },
231
+ shadowOpacity: 0.1,
232
+ shadowRadius: 20,
233
+ elevation: 4
234
+ }
235
+ };
236
+ function hasClassList(node) {
237
+ return typeof node === "object" && node !== null && "classList" in node && typeof node.classList?.add === "function";
238
+ }
239
+ function resolveWebElement(ref) {
240
+ const node = ref.current;
241
+ if (!node) return null;
242
+ if (hasClassList(node)) return node;
243
+ const host = node;
244
+ if (hasClassList(host._touchableNode)) return host._touchableNode;
245
+ if (typeof host.getScrollableNode === "function") {
246
+ const scrollNode = host.getScrollableNode();
247
+ if (hasClassList(scrollNode)) return scrollNode;
248
+ }
249
+ return null;
250
+ }
251
+ function useApplyWebClassName(ref, className, enabled = true) {
252
+ useLayoutEffect(() => {
253
+ if (!enabled || Platform.OS !== "web" || !className?.trim()) return;
254
+ const element = resolveWebElement(ref);
255
+ if (!element) return;
256
+ const classes = className.trim().split(/\s+/);
257
+ element.classList.add(...classes);
258
+ return () => {
259
+ element.classList.remove(...classes);
260
+ };
261
+ }, [ref, className, enabled]);
262
+ }
263
+ function Label({
264
+ children,
265
+ required = false,
266
+ disabled = false,
267
+ style,
268
+ className,
269
+ ...props
270
+ }) {
271
+ const ref = useRef(null);
272
+ useApplyWebClassName(ref, className);
273
+ return /* @__PURE__ */ jsxs(
274
+ Text,
275
+ {
276
+ ref,
277
+ style: [styles.label, disabled && styles.labelDisabled, style],
278
+ accessibilityRole: "text",
279
+ ...props,
280
+ children: [
281
+ children,
282
+ required ? /* @__PURE__ */ jsx(Text, { style: styles.required, children: " *" }) : null
283
+ ]
284
+ }
285
+ );
286
+ }
287
+ var styles = StyleSheet.create({
288
+ label: {
289
+ ...labelTypography,
290
+ color: colors.slateBlue
291
+ },
292
+ labelDisabled: {
293
+ color: colors.stormGray400
294
+ },
295
+ required: {
296
+ color: colors.inputError
297
+ }
298
+ });
299
+
300
+ // src/icons/eyeIconPaths.ts
301
+ var EYE_OPEN_OUTLINE_PATH = "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";
302
+ var EYE_OPEN_PUPIL_PATH = "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";
303
+ var EYE_OFF_PATH = "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";
304
+ function EyeIcon({
305
+ size = 20,
306
+ color = "#c7cdd1",
307
+ strokeWidth = 2
308
+ }) {
309
+ return /* @__PURE__ */ jsxs(Svg, { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: [
310
+ /* @__PURE__ */ jsx(
311
+ Path,
312
+ {
313
+ d: EYE_OPEN_OUTLINE_PATH,
314
+ stroke: color,
315
+ strokeWidth,
316
+ strokeLinecap: "round",
317
+ strokeLinejoin: "round"
318
+ }
319
+ ),
320
+ /* @__PURE__ */ jsx(
321
+ Path,
322
+ {
323
+ d: EYE_OPEN_PUPIL_PATH,
324
+ stroke: color,
325
+ strokeWidth,
326
+ strokeLinecap: "round",
327
+ strokeLinejoin: "round"
328
+ }
329
+ )
330
+ ] });
331
+ }
332
+ function EyeOffIcon({
333
+ size = 20,
334
+ color = "#c7cdd1",
335
+ strokeWidth = 2
336
+ }) {
337
+ return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
338
+ Path,
339
+ {
340
+ d: EYE_OFF_PATH,
341
+ stroke: color,
342
+ strokeWidth,
343
+ strokeLinecap: "round",
344
+ strokeLinejoin: "round"
345
+ }
346
+ ) });
347
+ }
348
+ var INPUT_HEIGHT = 52;
349
+ var INPUT_ICON_SIZE = 20;
350
+ var INPUT_ICON_GAP = 10;
351
+ var INPUT_OUTLINE_WIDTH = 2;
352
+ function resolveInputVisualState({
353
+ focused = false,
354
+ error = false,
355
+ disabled = false
356
+ }) {
357
+ if (disabled) return "disabled";
358
+ if (error) return "error";
359
+ if (focused) return "focused";
360
+ return "default";
361
+ }
362
+ function createOutlineStyle(ringColor) {
363
+ return {
364
+ borderRadius: radii.lg + INPUT_OUTLINE_WIDTH,
365
+ borderWidth: INPUT_OUTLINE_WIDTH,
366
+ borderColor: ringColor,
367
+ padding: 0,
368
+ backgroundColor: colors.transparent,
369
+ width: "100%",
370
+ alignSelf: "stretch",
371
+ ...Platform.OS !== "web" ? { overflow: "hidden" } : null
372
+ };
373
+ }
374
+ var defaultOutline = createOutlineStyle(colors.transparent);
375
+ function getInputFieldStyles(state) {
376
+ const containerBase = {
377
+ borderRadius: radii.lg,
378
+ ...Platform.OS !== "web" ? { overflow: "hidden" } : null
379
+ };
380
+ switch (state) {
381
+ case "disabled":
382
+ return {
383
+ outline: defaultOutline,
384
+ container: {
385
+ ...containerBase,
386
+ borderWidth: 1,
387
+ borderColor: colors.stormGray50,
388
+ backgroundColor: colors.stormGray50
389
+ },
390
+ text: { color: colors.stormGray300 },
391
+ placeholder: colors.stormGray300,
392
+ icon: colors.stormGray150
393
+ };
394
+ case "error":
395
+ return {
396
+ outline: createOutlineStyle(colors.inputOutlineError),
397
+ container: {
398
+ ...containerBase,
399
+ borderWidth: 1,
400
+ borderColor: colors.inputError,
401
+ backgroundColor: colors.white
402
+ },
403
+ text: { color: colors.inputError },
404
+ placeholder: colors.stormGray200,
405
+ icon: colors.inputError
406
+ };
407
+ case "focused":
408
+ return {
409
+ outline: createOutlineStyle(colors.inputOutlineFocus),
410
+ container: {
411
+ ...containerBase,
412
+ borderWidth: 1,
413
+ borderColor: colors.navy,
414
+ backgroundColor: colors.white
415
+ },
416
+ text: { color: colors.slateBlue },
417
+ placeholder: colors.stormGray200,
418
+ icon: colors.navy
419
+ };
420
+ default:
421
+ return {
422
+ outline: defaultOutline,
423
+ container: {
424
+ ...containerBase,
425
+ borderWidth: 1,
426
+ borderColor: colors.stormGray50,
427
+ backgroundColor: colors.white
428
+ },
429
+ text: { color: colors.slateBlue },
430
+ placeholder: colors.stormGray200,
431
+ icon: colors.stormGray150
432
+ };
433
+ }
434
+ }
435
+ var inputFieldMetrics = StyleSheet.create({
436
+ container: {
437
+ flexDirection: "row",
438
+ alignItems: "center",
439
+ height: INPUT_HEIGHT,
440
+ minHeight: INPUT_HEIGHT,
441
+ maxHeight: INPUT_HEIGHT,
442
+ borderRadius: radii.lg,
443
+ padding: 16,
444
+ gap: INPUT_ICON_GAP,
445
+ ...Platform.OS === "web" ? { boxSizing: "border-box" } : null
446
+ },
447
+ input: {
448
+ flex: 1,
449
+ alignSelf: "stretch",
450
+ fontFamily: fonts.sans,
451
+ fontSize: fontSize.md,
452
+ fontWeight: fontWeight.medium,
453
+ lineHeight: Platform.OS === "web" ? fontSize.md : 20,
454
+ paddingVertical: 0,
455
+ paddingHorizontal: 0,
456
+ margin: 0,
457
+ borderWidth: 0,
458
+ backgroundColor: colors.transparent,
459
+ ...Platform.OS === "android" ? { includeFontPadding: false } : null,
460
+ ...Platform.OS === "web" ? {
461
+ height: "100%",
462
+ minHeight: 0,
463
+ outlineStyle: "none"
464
+ } : null
465
+ }
466
+ });
467
+ function renderInputIcon(icon, color) {
468
+ if (!icon) return null;
469
+ if (isValidElement(icon)) {
470
+ return cloneElement(icon, {
471
+ size: icon.props.size ?? INPUT_ICON_SIZE,
472
+ color: icon.props.color ?? color
473
+ });
474
+ }
475
+ return icon;
476
+ }
477
+ function Input({
478
+ label,
479
+ leftIcon,
480
+ rightIcon,
481
+ error,
482
+ hint,
483
+ containerStyle,
484
+ style,
485
+ className,
486
+ fieldClassName,
487
+ fieldStyle,
488
+ labelClassName,
489
+ inputClassName,
490
+ errorClassName,
491
+ hintClassName,
492
+ editable = true,
493
+ secureTextEntry,
494
+ showPasswordToggle,
495
+ onFocus,
496
+ onBlur,
497
+ ...props
498
+ }) {
499
+ const wrapperRef = useRef(null);
500
+ const fieldRef = useRef(null);
501
+ const inputRef = useRef(null);
502
+ const helperRef = useRef(null);
503
+ const [focused, setFocused] = useState(false);
504
+ const [passwordVisible, setPasswordVisible] = useState(false);
505
+ useApplyWebClassName(wrapperRef, className);
506
+ useApplyWebClassName(fieldRef, fieldClassName);
507
+ useApplyWebClassName(inputRef, inputClassName);
508
+ useApplyWebClassName(helperRef, error ? errorClassName : hintClassName);
509
+ const isDisabled = editable === false;
510
+ const passwordToggleEnabled = secureTextEntry === true && showPasswordToggle !== false && rightIcon == null;
511
+ const effectiveSecureTextEntry = passwordToggleEnabled ? !passwordVisible : secureTextEntry;
512
+ const visualState = resolveInputVisualState({
513
+ focused,
514
+ error: Boolean(error),
515
+ disabled: isDisabled
516
+ });
517
+ const fieldStyles = getInputFieldStyles(visualState);
518
+ const iconColor = fieldStyles.icon;
519
+ function handleFocus(event) {
520
+ setFocused(true);
521
+ onFocus?.(event);
522
+ }
523
+ function handleBlur(event) {
524
+ setFocused(false);
525
+ onBlur?.(event);
526
+ }
527
+ const helperMessage = error ?? hint;
528
+ function togglePasswordVisibility() {
529
+ if (!isDisabled) {
530
+ setPasswordVisible((visible) => !visible);
531
+ }
532
+ }
533
+ const trailingIcon = passwordToggleEnabled ? /* @__PURE__ */ jsx(
534
+ Pressable,
535
+ {
536
+ onPress: togglePasswordVisibility,
537
+ disabled: isDisabled,
538
+ accessibilityRole: "button",
539
+ accessibilityLabel: passwordVisible ? "Hide password" : "Show password",
540
+ hitSlop: 8,
541
+ style: styles2.iconPressable,
542
+ children: renderInputIcon(
543
+ passwordVisible ? /* @__PURE__ */ jsx(EyeOffIcon, {}) : /* @__PURE__ */ jsx(EyeIcon, {}),
544
+ iconColor
545
+ )
546
+ }
547
+ ) : rightIcon ? renderInputIcon(rightIcon, iconColor) : null;
548
+ return /* @__PURE__ */ jsxs(View, { ref: wrapperRef, style: [styles2.wrapper, containerStyle], children: [
549
+ label ? /* @__PURE__ */ jsx(Label, { disabled: isDisabled, className: labelClassName, children: label }) : null,
550
+ /* @__PURE__ */ jsx(View, { style: fieldStyles.outline, children: /* @__PURE__ */ jsxs(
551
+ View,
552
+ {
553
+ ref: fieldRef,
554
+ style: [inputFieldMetrics.container, fieldStyles.container, fieldStyle],
555
+ children: [
556
+ leftIcon ? /* @__PURE__ */ jsx(View, { style: styles2.iconSlot, children: renderInputIcon(leftIcon, iconColor) }) : null,
557
+ /* @__PURE__ */ jsx(
558
+ TextInput,
559
+ {
560
+ ref: inputRef,
561
+ style: [
562
+ inputFieldMetrics.input,
563
+ fieldStyles.text,
564
+ style
565
+ ],
566
+ placeholderTextColor: fieldStyles.placeholder,
567
+ editable,
568
+ secureTextEntry: effectiveSecureTextEntry,
569
+ onFocus: handleFocus,
570
+ onBlur: handleBlur,
571
+ accessibilityState: { disabled: isDisabled },
572
+ ...props
573
+ }
574
+ ),
575
+ trailingIcon ? /* @__PURE__ */ jsx(View, { style: styles2.iconSlot, children: trailingIcon }) : null
576
+ ]
577
+ }
578
+ ) }),
579
+ helperMessage ? /* @__PURE__ */ jsx(Text, { ref: helperRef, style: error ? styles2.error : styles2.hint, children: helperMessage }) : null
580
+ ] });
581
+ }
582
+ var styles2 = StyleSheet.create({
583
+ wrapper: {
584
+ width: "100%",
585
+ gap: spacing.sm
586
+ },
587
+ iconSlot: {
588
+ width: INPUT_ICON_SIZE,
589
+ height: INPUT_ICON_SIZE,
590
+ alignItems: "center",
591
+ justifyContent: "center",
592
+ flexShrink: 0
593
+ },
594
+ iconPressable: {
595
+ width: INPUT_ICON_SIZE,
596
+ height: INPUT_ICON_SIZE,
597
+ alignItems: "center",
598
+ justifyContent: "center"
599
+ },
600
+ error: {
601
+ fontSize: 12,
602
+ lineHeight: 16,
603
+ color: colors.inputError
604
+ },
605
+ hint: {
606
+ fontSize: 12,
607
+ lineHeight: 16,
608
+ color: colors.stormGray300
609
+ }
610
+ });
611
+
612
+ export { INPUT_ICON_GAP, Input, Label, brand, buttonTypography, colors, emeraldGreen, fontSize, fontWeight, fonts, getInputFieldStyles, inputFieldMetrics, labelTypography, navy, radii, resolveInputVisualState, rubyRed, shadows, spacing, stormGray, useApplyWebClassName };
613
+ //# sourceMappingURL=chunk-C7GHBVMM.js.map
614
+ //# sourceMappingURL=chunk-C7GHBVMM.js.map