@thewhileloop/whileui 0.1.2 → 0.2.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 (82) hide show
  1. package/README.md +283 -38
  2. package/dist/blocks/layout/action-bar.d.ts +8 -0
  3. package/dist/blocks/layout/action-bar.d.ts.map +1 -0
  4. package/dist/blocks/layout/action-bar.js +10 -0
  5. package/dist/blocks/layout/action-bar.js.map +1 -0
  6. package/dist/blocks/layout/confirm-action-sheet.d.ts +24 -0
  7. package/dist/blocks/layout/confirm-action-sheet.d.ts.map +1 -0
  8. package/dist/blocks/layout/confirm-action-sheet.js +41 -0
  9. package/dist/blocks/layout/confirm-action-sheet.js.map +1 -0
  10. package/dist/blocks/layout/index.d.ts +2 -0
  11. package/dist/blocks/layout/index.d.ts.map +1 -1
  12. package/dist/blocks/layout/index.js +2 -0
  13. package/dist/blocks/layout/index.js.map +1 -1
  14. package/dist/blocks/navigation/index.d.ts +1 -0
  15. package/dist/blocks/navigation/index.d.ts.map +1 -1
  16. package/dist/blocks/navigation/index.js +1 -0
  17. package/dist/blocks/navigation/index.js.map +1 -1
  18. package/dist/blocks/navigation/navigation-sidebar.d.ts +23 -0
  19. package/dist/blocks/navigation/navigation-sidebar.d.ts.map +1 -0
  20. package/dist/blocks/navigation/navigation-sidebar.js +11 -0
  21. package/dist/blocks/navigation/navigation-sidebar.js.map +1 -0
  22. package/dist/components/card/card.d.ts +81 -2
  23. package/dist/components/card/card.d.ts.map +1 -1
  24. package/dist/components/card/card.js +27 -6
  25. package/dist/components/card/card.js.map +1 -1
  26. package/dist/components/card/index.d.ts +1 -1
  27. package/dist/components/card/index.d.ts.map +1 -1
  28. package/dist/components/card/index.js +1 -1
  29. package/dist/components/card/index.js.map +1 -1
  30. package/dist/components/data-row/data-row.d.ts +69 -0
  31. package/dist/components/data-row/data-row.d.ts.map +1 -0
  32. package/dist/components/data-row/data-row.js +89 -0
  33. package/dist/components/data-row/data-row.js.map +1 -0
  34. package/dist/components/data-row/index.d.ts +2 -0
  35. package/dist/components/data-row/index.d.ts.map +1 -0
  36. package/dist/components/data-row/index.js +2 -0
  37. package/dist/components/data-row/index.js.map +1 -0
  38. package/dist/components/form-field/form-field.d.ts +124 -0
  39. package/dist/components/form-field/form-field.d.ts.map +1 -0
  40. package/dist/components/form-field/form-field.js +68 -0
  41. package/dist/components/form-field/form-field.js.map +1 -0
  42. package/dist/components/form-field/index.d.ts +2 -0
  43. package/dist/components/form-field/index.d.ts.map +1 -0
  44. package/dist/components/form-field/index.js +2 -0
  45. package/dist/components/form-field/index.js.map +1 -0
  46. package/dist/components/labeled-field/index.d.ts +2 -0
  47. package/dist/components/labeled-field/index.d.ts.map +1 -0
  48. package/dist/components/labeled-field/index.js +2 -0
  49. package/dist/components/labeled-field/index.js.map +1 -0
  50. package/dist/components/labeled-field/labeled-field.d.ts +19 -0
  51. package/dist/components/labeled-field/labeled-field.d.ts.map +1 -0
  52. package/dist/components/labeled-field/labeled-field.js +15 -0
  53. package/dist/components/labeled-field/labeled-field.js.map +1 -0
  54. package/dist/components/numeric-input/index.d.ts +2 -0
  55. package/dist/components/numeric-input/index.d.ts.map +1 -0
  56. package/dist/components/numeric-input/index.js +2 -0
  57. package/dist/components/numeric-input/index.js.map +1 -0
  58. package/dist/components/numeric-input/numeric-input.d.ts +119 -0
  59. package/dist/components/numeric-input/numeric-input.d.ts.map +1 -0
  60. package/dist/components/numeric-input/numeric-input.js +129 -0
  61. package/dist/components/numeric-input/numeric-input.js.map +1 -0
  62. package/dist/components/segmented-control/index.d.ts +2 -0
  63. package/dist/components/segmented-control/index.d.ts.map +1 -0
  64. package/dist/components/segmented-control/index.js +2 -0
  65. package/dist/components/segmented-control/index.js.map +1 -0
  66. package/dist/components/segmented-control/segmented-control.d.ts +281 -0
  67. package/dist/components/segmented-control/segmented-control.d.ts.map +1 -0
  68. package/dist/components/segmented-control/segmented-control.js +110 -0
  69. package/dist/components/segmented-control/segmented-control.js.map +1 -0
  70. package/dist/index.d.ts +7 -1
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +7 -1
  73. package/dist/index.js.map +1 -1
  74. package/dist/lib/index.d.ts +1 -0
  75. package/dist/lib/index.d.ts.map +1 -1
  76. package/dist/lib/index.js +1 -0
  77. package/dist/lib/index.js.map +1 -1
  78. package/dist/lib/theme-bridge.d.ts +29 -0
  79. package/dist/lib/theme-bridge.d.ts.map +1 -0
  80. package/dist/lib/theme-bridge.js +79 -0
  81. package/dist/lib/theme-bridge.js.map +1 -0
  82. package/package.json +1 -1
@@ -1,6 +1,85 @@
1
1
  import React from 'react';
2
2
  import { View, Text, type ViewProps, type TextProps } from 'react-native';
3
- export interface CardProps extends ViewProps {
3
+ import { type VariantProps } from '../../lib/tv';
4
+ declare const cardVariants: import("tailwind-variants").TVReturnType<{
5
+ padding: {
6
+ none: string;
7
+ sm: string;
8
+ default: string;
9
+ lg: string;
10
+ };
11
+ unstyled: {
12
+ true: string;
13
+ false: string;
14
+ };
15
+ }, undefined, "rounded-xl border border-border bg-card", import("tailwind-variants/dist/config.js").TVConfig<{
16
+ padding: {
17
+ none: string;
18
+ sm: string;
19
+ default: string;
20
+ lg: string;
21
+ };
22
+ unstyled: {
23
+ true: string;
24
+ false: string;
25
+ };
26
+ }, {
27
+ padding: {
28
+ none: string;
29
+ sm: string;
30
+ default: string;
31
+ lg: string;
32
+ };
33
+ unstyled: {
34
+ true: string;
35
+ false: string;
36
+ };
37
+ }>, {
38
+ padding: {
39
+ none: string;
40
+ sm: string;
41
+ default: string;
42
+ lg: string;
43
+ };
44
+ unstyled: {
45
+ true: string;
46
+ false: string;
47
+ };
48
+ }, undefined, import("tailwind-variants").TVReturnType<{
49
+ padding: {
50
+ none: string;
51
+ sm: string;
52
+ default: string;
53
+ lg: string;
54
+ };
55
+ unstyled: {
56
+ true: string;
57
+ false: string;
58
+ };
59
+ }, undefined, "rounded-xl border border-border bg-card", import("tailwind-variants/dist/config.js").TVConfig<{
60
+ padding: {
61
+ none: string;
62
+ sm: string;
63
+ default: string;
64
+ lg: string;
65
+ };
66
+ unstyled: {
67
+ true: string;
68
+ false: string;
69
+ };
70
+ }, {
71
+ padding: {
72
+ none: string;
73
+ sm: string;
74
+ default: string;
75
+ lg: string;
76
+ };
77
+ unstyled: {
78
+ true: string;
79
+ false: string;
80
+ };
81
+ }>, unknown, unknown, undefined>>;
82
+ export interface CardProps extends ViewProps, VariantProps<typeof cardVariants> {
4
83
  }
5
84
  declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<View>>;
6
85
  export interface CardHeaderProps extends ViewProps {
@@ -18,5 +97,5 @@ declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & Re
18
97
  export interface CardFooterProps extends ViewProps {
19
98
  }
20
99
  declare const CardFooter: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<View>>;
21
- export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter };
100
+ export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, cardVariants };
22
101
  //# sourceMappingURL=card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAK1E,MAAM,WAAW,SAAU,SAAQ,SAAS;CAAG;AAE/C,QAAA,MAAM,IAAI,wEAQR,CAAC;AAMH,MAAM,WAAW,eAAgB,SAAQ,SAAS;CAAG;AAErD,QAAA,MAAM,UAAU,8EAEd,CAAC;AAMH,MAAM,WAAW,cAAe,SAAQ,SAAS;CAAG;AAEpD,QAAA,MAAM,SAAS,6EAQb,CAAC;AAMH,MAAM,WAAW,oBAAqB,SAAQ,SAAS;CAAG;AAE1D,QAAA,MAAM,eAAe,mFAIpB,CAAC;AAMF,MAAM,WA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AAe,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC"}
@@ -2,12 +2,33 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { View, Text } from 'react-native';
4
4
  import { cn } from '../../lib/cn';
5
- const Card = React.forwardRef(({ className, ...props }, ref) => {
6
- return (_jsx(View, { ref: ref, className: cn('rounded-xl border border-border bg-card', className), ...props }));
5
+ import { tv } from '../../lib/tv';
6
+ // ─── Card ────────────────────────────────────────────────────
7
+ const cardVariants = tv({
8
+ base: 'rounded-xl border border-border bg-card',
9
+ variants: {
10
+ padding: {
11
+ none: 'p-0',
12
+ sm: 'p-4',
13
+ default: 'p-6',
14
+ lg: 'p-8',
15
+ },
16
+ unstyled: {
17
+ true: 'rounded-none border-0 bg-transparent shadow-none',
18
+ false: '',
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ padding: 'default',
23
+ unstyled: false,
24
+ },
25
+ });
26
+ const Card = React.forwardRef(({ className, padding, unstyled, ...props }, ref) => {
27
+ return (_jsx(View, { ref: ref, className: cn(cardVariants({ padding, unstyled }), className), ...props }));
7
28
  });
8
29
  Card.displayName = 'Card';
9
30
  const CardHeader = React.forwardRef(({ className, ...props }, ref) => {
10
- return _jsx(View, { ref: ref, className: cn('p-6 pb-2', className), ...props });
31
+ return _jsx(View, { ref: ref, className: cn('pb-2', className), ...props });
11
32
  });
12
33
  CardHeader.displayName = 'CardHeader';
13
34
  const CardTitle = React.forwardRef(({ className, ...props }, ref) => {
@@ -19,13 +40,13 @@ const CardDescription = React.forwardRef(({ className, ...props }, ref) => {
19
40
  });
20
41
  CardDescription.displayName = 'CardDescription';
21
42
  const CardContent = React.forwardRef(({ className, ...props }, ref) => {
22
- return _jsx(View, { ref: ref, className: cn('p-6 pt-0', className), ...props });
43
+ return _jsx(View, { ref: ref, className: cn('pt-0', className), ...props });
23
44
  });
24
45
  CardContent.displayName = 'CardContent';
25
46
  const CardFooter = React.forwardRef(({ className, ...props }, ref) => {
26
- return _jsx(View, { ref: ref, className: cn('flex-row items-center p-6 pt-0', className), ...props });
47
+ return _jsx(View, { ref: ref, className: cn('flex-row items-center pt-0', className), ...props });
27
48
  });
28
49
  CardFooter.displayName = 'CardFooter';
29
50
  // ─── Exports ─────────────────────────────────────────────────
30
- export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter };
51
+ export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, cardVariants };
31
52
  //# sourceMappingURL=card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAMlC,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC9E,OAAO,CACL,KAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,yCAAyC,EAAE,SAAS,CAAC,KAC/D,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAM1B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAwB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC1F,OAAO,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AAC7E,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAMtC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAuB,CAAC,EAA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,EAAE,EAAE;IAC1F,OAAO,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AAC/F,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,gEAAgE;AAEhE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, type CardProps, type CardHeaderProps, type CardTitleProps, type CardDescriptionProps, type CardContentProps, type CardFooterProps, } from './card';
1
+ export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, cardVariants, type CardProps, type CardHeaderProps, type CardTitleProps, type CardDescriptionProps, type CardContentProps, type CardFooterProps, } from './card';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,EACX,UAAU,EACV,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,EACX,UAAU,EACV,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,QAAQ,CAAC"}
@@ -1,2 +1,2 @@
1
- export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, } from './card';
1
+ export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, cardVariants, } from './card';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,EACX,UAAU,GAOX,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,EACX,UAAU,EACV,YAAY,GAOb,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,69 @@
1
+ import React from 'react';
2
+ import { Text, View, type TextProps, type ViewProps } from 'react-native';
3
+ declare const dataRowVariants: import("tailwind-variants").TVReturnType<{
4
+ size: {
5
+ default: string;
6
+ compact: string;
7
+ };
8
+ }, undefined, "w-full flex-row items-center gap-3", import("tailwind-variants/dist/config.js").TVConfig<{
9
+ size: {
10
+ default: string;
11
+ compact: string;
12
+ };
13
+ }, {
14
+ size: {
15
+ default: string;
16
+ compact: string;
17
+ };
18
+ }>, {
19
+ size: {
20
+ default: string;
21
+ compact: string;
22
+ };
23
+ }, undefined, import("tailwind-variants").TVReturnType<{
24
+ size: {
25
+ default: string;
26
+ compact: string;
27
+ };
28
+ }, undefined, "w-full flex-row items-center gap-3", import("tailwind-variants/dist/config.js").TVConfig<{
29
+ size: {
30
+ default: string;
31
+ compact: string;
32
+ };
33
+ }, {
34
+ size: {
35
+ default: string;
36
+ compact: string;
37
+ };
38
+ }>, unknown, unknown, undefined>>;
39
+ export interface DataRowProps extends ViewProps {
40
+ size?: 'default' | 'compact';
41
+ className?: string;
42
+ }
43
+ export interface DataRowLeftProps extends ViewProps {
44
+ className?: string;
45
+ }
46
+ export interface DataRowCenterProps extends ViewProps {
47
+ className?: string;
48
+ }
49
+ export interface DataRowRightProps extends ViewProps {
50
+ className?: string;
51
+ }
52
+ export interface DataRowLabelProps extends TextProps {
53
+ className?: string;
54
+ }
55
+ export interface DataRowDescriptionProps extends TextProps {
56
+ className?: string;
57
+ }
58
+ export interface DataRowValueProps extends TextProps {
59
+ className?: string;
60
+ }
61
+ declare const DataRow: React.ForwardRefExoticComponent<DataRowProps & React.RefAttributes<View>>;
62
+ declare const DataRowLeft: React.ForwardRefExoticComponent<DataRowLeftProps & React.RefAttributes<View>>;
63
+ declare const DataRowCenter: React.ForwardRefExoticComponent<DataRowCenterProps & React.RefAttributes<View>>;
64
+ declare const DataRowRight: React.ForwardRefExoticComponent<DataRowRightProps & React.RefAttributes<View>>;
65
+ declare const DataRowLabel: React.ForwardRefExoticComponent<DataRowLabelProps & React.RefAttributes<Text>>;
66
+ declare const DataRowDescription: React.ForwardRefExoticComponent<DataRowDescriptionProps & React.RefAttributes<Text>>;
67
+ declare const DataRowValue: React.ForwardRefExoticComponent<DataRowValueProps & React.RefAttributes<Text>>;
68
+ export { DataRow, DataRowLeft, DataRowCenter, DataRowRight, DataRowLabel, DataRowDescription, DataRowValue, dataRowVariants, };
69
+ //# sourceMappingURL=data-row.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-row.d.ts","sourceRoot":"","sources":["../../../src/components/data-row/data-row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI1E,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAWnB,CAAC;AAiDH,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,OAAO,2EAQZ,CAAC;AAIF,QAAA,MAAM,WAAW,+EAIf,CAAC;AAIH,QAAA,MAAM,aAAa,iFAEjB,CAAC;AAIH,QAAA,MAAM,YAAY,gFAQhB,CAAC;AAIH,QAAA,MAAM,YAAY,gFAWhB,CAAC;AAIH,QAAA,MAAM,kBAAkB,sFAavB,CAAC;AAIF,QAAA,MAAM,YAAY,gFAWhB,CAAC;AAIH,OAAO,EACL,OAAO,EACP,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,eAAe,GAChB,CAAC"}
@@ -0,0 +1,89 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import React, { createContext, useContext } from 'react';
3
+ import { Text, View } from 'react-native';
4
+ import { cn } from '../../lib/cn';
5
+ import { tv } from '../../lib/tv';
6
+ const dataRowVariants = tv({
7
+ base: 'w-full flex-row items-center gap-3',
8
+ variants: {
9
+ size: {
10
+ default: 'min-h-11 py-2',
11
+ compact: 'min-h-10 py-1.5',
12
+ },
13
+ },
14
+ defaultVariants: {
15
+ size: 'default',
16
+ },
17
+ });
18
+ const dataRowLabelVariants = tv({
19
+ base: 'font-medium text-foreground',
20
+ variants: {
21
+ size: {
22
+ default: 'text-sm',
23
+ compact: 'text-xs',
24
+ },
25
+ },
26
+ defaultVariants: {
27
+ size: 'default',
28
+ },
29
+ });
30
+ const dataRowDescriptionVariants = tv({
31
+ base: 'text-muted-foreground',
32
+ variants: {
33
+ size: {
34
+ default: 'text-xs',
35
+ compact: 'text-[11px]',
36
+ },
37
+ },
38
+ defaultVariants: {
39
+ size: 'default',
40
+ },
41
+ });
42
+ const dataRowValueVariants = tv({
43
+ base: 'font-medium text-foreground text-right',
44
+ variants: {
45
+ size: {
46
+ default: 'text-sm',
47
+ compact: 'text-xs',
48
+ },
49
+ },
50
+ defaultVariants: {
51
+ size: 'default',
52
+ },
53
+ });
54
+ const DataRowContext = createContext({
55
+ size: 'default',
56
+ });
57
+ const DataRow = React.forwardRef(({ className, size = 'default', ...props }, ref) => {
58
+ return (_jsx(DataRowContext.Provider, { value: { size }, children: _jsx(View, { ref: ref, className: cn(dataRowVariants({ size }), className), ...props }) }));
59
+ });
60
+ DataRow.displayName = 'DataRow';
61
+ const DataRowLeft = React.forwardRef(({ className, ...props }, ref) => {
62
+ return (_jsx(View, { ref: ref, className: cn('shrink-0 items-center justify-center', className), ...props }));
63
+ });
64
+ DataRowLeft.displayName = 'DataRowLeft';
65
+ const DataRowCenter = React.forwardRef(({ className, ...props }, ref) => {
66
+ return _jsx(View, { ref: ref, className: cn('min-w-0 flex-1 gap-0.5', className), ...props });
67
+ });
68
+ DataRowCenter.displayName = 'DataRowCenter';
69
+ const DataRowRight = React.forwardRef(({ className, ...props }, ref) => {
70
+ return (_jsx(View, { ref: ref, className: cn('ml-2 max-w-[45%] shrink-0 items-end justify-center', className), ...props }));
71
+ });
72
+ DataRowRight.displayName = 'DataRowRight';
73
+ const DataRowLabel = React.forwardRef(({ className, ...props }, ref) => {
74
+ const { size } = useContext(DataRowContext);
75
+ return (_jsx(Text, { ref: ref, className: cn(dataRowLabelVariants({ size }), className), numberOfLines: 1, ...props }));
76
+ });
77
+ DataRowLabel.displayName = 'DataRowLabel';
78
+ const DataRowDescription = React.forwardRef(({ className, ...props }, ref) => {
79
+ const { size } = useContext(DataRowContext);
80
+ return (_jsx(Text, { ref: ref, className: cn(dataRowDescriptionVariants({ size }), className), numberOfLines: 2, ...props }));
81
+ });
82
+ DataRowDescription.displayName = 'DataRowDescription';
83
+ const DataRowValue = React.forwardRef(({ className, ...props }, ref) => {
84
+ const { size } = useContext(DataRowContext);
85
+ return (_jsx(Text, { ref: ref, className: cn(dataRowValueVariants({ size }), className), numberOfLines: 1, ...props }));
86
+ });
87
+ DataRowValue.displayName = 'DataRowValue';
88
+ export { DataRow, DataRowLeft, DataRowCenter, DataRowRight, DataRowLabel, DataRowDescription, DataRowValue, dataRowVariants, };
89
+ //# sourceMappingURL=data-row.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-row.js","sourceRoot":"","sources":["../../../src/components/data-row/data-row.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,eAAe,GAAG,EAAE,CAAC;IACzB,IAAI,EAAE,oCAAoC;IAC1C,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,eAAe;YACxB,OAAO,EAAE,iBAAiB;SAC3B;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,SAAS;KAChB;CACF,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,EAAE,CAAC;IAC9B,IAAI,EAAE,6BAA6B;IACnC,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,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,kBAAkB,GAAG,KAAK,CAAC,UAAU,CACzC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE5C,OAAO,CACL,KAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,EAC9D,aAAa,EAAE,CAAC,KACZ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAEtD,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAA0B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC9F,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE5C,OAAO,CACL,KAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,oBAAoB,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,EACxD,aAAa,EAAE,CAAC,KACZ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,OAAO,EACL,OAAO,EACP,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,eAAe,GAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { DataRow, DataRowLeft, DataRowCenter, DataRowRight, DataRowLabel, DataRowDescription, DataRowValue, dataRowVariants, type DataRowProps, type DataRowLeftProps, type DataRowCenterProps, type DataRowRightProps, type DataRowLabelProps, type DataRowDescriptionProps, type DataRowValueProps, } from './data-row';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/data-row/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { DataRow, DataRowLeft, DataRowCenter, DataRowRight, DataRowLabel, DataRowDescription, DataRowValue, dataRowVariants, } from './data-row';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/data-row/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,eAAe,GAQhB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,124 @@
1
+ import React from 'react';
2
+ import { Text, View, type TextProps, type ViewProps } from 'react-native';
3
+ import { type VariantProps } from '../../lib/tv';
4
+ declare const formFieldVariants: import("tailwind-variants").TVReturnType<{
5
+ density: {
6
+ default: string;
7
+ compact: string;
8
+ };
9
+ }, undefined, "w-full", import("tailwind-variants/dist/config.js").TVConfig<{
10
+ density: {
11
+ default: string;
12
+ compact: string;
13
+ };
14
+ }, {
15
+ density: {
16
+ default: string;
17
+ compact: string;
18
+ };
19
+ }>, {
20
+ density: {
21
+ default: string;
22
+ compact: string;
23
+ };
24
+ }, undefined, import("tailwind-variants").TVReturnType<{
25
+ density: {
26
+ default: string;
27
+ compact: string;
28
+ };
29
+ }, undefined, "w-full", import("tailwind-variants/dist/config.js").TVConfig<{
30
+ density: {
31
+ default: string;
32
+ compact: string;
33
+ };
34
+ }, {
35
+ density: {
36
+ default: string;
37
+ compact: string;
38
+ };
39
+ }>, unknown, unknown, undefined>>;
40
+ declare const formControlVariants: import("tailwind-variants").TVReturnType<{
41
+ density: {
42
+ default: string;
43
+ compact: string;
44
+ };
45
+ invalid: {
46
+ true: string;
47
+ false: string;
48
+ };
49
+ }, undefined, "justify-center", import("tailwind-variants/dist/config.js").TVConfig<{
50
+ density: {
51
+ default: string;
52
+ compact: string;
53
+ };
54
+ invalid: {
55
+ true: string;
56
+ false: string;
57
+ };
58
+ }, {
59
+ density: {
60
+ default: string;
61
+ compact: string;
62
+ };
63
+ invalid: {
64
+ true: string;
65
+ false: string;
66
+ };
67
+ }>, {
68
+ density: {
69
+ default: string;
70
+ compact: string;
71
+ };
72
+ invalid: {
73
+ true: string;
74
+ false: string;
75
+ };
76
+ }, undefined, import("tailwind-variants").TVReturnType<{
77
+ density: {
78
+ default: string;
79
+ compact: string;
80
+ };
81
+ invalid: {
82
+ true: string;
83
+ false: string;
84
+ };
85
+ }, undefined, "justify-center", import("tailwind-variants/dist/config.js").TVConfig<{
86
+ density: {
87
+ default: string;
88
+ compact: string;
89
+ };
90
+ invalid: {
91
+ true: string;
92
+ false: string;
93
+ };
94
+ }, {
95
+ density: {
96
+ default: string;
97
+ compact: string;
98
+ };
99
+ invalid: {
100
+ true: string;
101
+ false: string;
102
+ };
103
+ }>, unknown, unknown, undefined>>;
104
+ export interface FormFieldProps extends ViewProps, VariantProps<typeof formFieldVariants> {
105
+ invalid?: boolean;
106
+ disabled?: boolean;
107
+ required?: boolean;
108
+ }
109
+ export interface FormLabelProps extends TextProps {
110
+ showRequiredIndicator?: boolean;
111
+ }
112
+ export interface FormControlProps extends ViewProps {
113
+ }
114
+ export interface FormHintProps extends TextProps {
115
+ }
116
+ export interface FormMessageProps extends TextProps {
117
+ }
118
+ declare const FormField: React.ForwardRefExoticComponent<FormFieldProps & React.RefAttributes<View>>;
119
+ declare const FormLabel: React.ForwardRefExoticComponent<FormLabelProps & React.RefAttributes<Text>>;
120
+ declare const FormControl: React.ForwardRefExoticComponent<FormControlProps & React.RefAttributes<View>>;
121
+ declare const FormHint: React.ForwardRefExoticComponent<FormHintProps & React.RefAttributes<Text>>;
122
+ declare const FormMessage: React.ForwardRefExoticComponent<FormMessageProps & React.RefAttributes<Text>>;
123
+ export { FormField, FormLabel, FormControl, FormHint, FormMessage, formFieldVariants, formControlVariants, };
124
+ //# sourceMappingURL=form-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../src/components/form-field/form-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAErD,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAWrB,CAAC;AAEH,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAgBvB,CAAC;AAkBH,MAAM,WAAW,cAAe,SAAQ,SAAS,EAAE,YAAY,CAAC,OAAO,iBAAiB,CAAC;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS;CAAG;AAEtD,MAAM,WAAW,aAAc,SAAQ,SAAS;CAAG;AAEnD,MAAM,WAAW,gBAAiB,SAAQ,SAAS;CAAG;AAEtD,QAAA,MAAM,SAAS,6EAsBd,CAAC;AAIF,QAAA,MAAM,SAAS,6EAoBd,CAAC;AAIF,QAAA,MAAM,WAAW,+EAef,CAAC;AAIH,QAAA,MAAM,QAAQ,4EAUZ,CAAC;AAIH,QAAA,MAAM,WAAW,+EAYhB,CAAC;AAIF,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { createContext, useContext } from 'react';
3
+ import { Text, View } from 'react-native';
4
+ import { cn } from '../../lib/cn';
5
+ import { tv } from '../../lib/tv';
6
+ const formFieldVariants = tv({
7
+ base: 'w-full',
8
+ variants: {
9
+ density: {
10
+ default: 'gap-1.5',
11
+ compact: 'gap-1',
12
+ },
13
+ },
14
+ defaultVariants: {
15
+ density: 'default',
16
+ },
17
+ });
18
+ const formControlVariants = tv({
19
+ base: 'justify-center',
20
+ variants: {
21
+ density: {
22
+ default: 'min-h-10',
23
+ compact: 'min-h-9',
24
+ },
25
+ invalid: {
26
+ true: '',
27
+ false: '',
28
+ },
29
+ },
30
+ defaultVariants: {
31
+ density: 'default',
32
+ invalid: false,
33
+ },
34
+ });
35
+ const FormFieldContext = createContext({
36
+ density: 'default',
37
+ invalid: false,
38
+ disabled: false,
39
+ required: false,
40
+ });
41
+ const FormField = React.forwardRef(({ className, density = 'default', invalid = false, disabled = false, required = false, ...props }, ref) => {
42
+ return (_jsx(FormFieldContext.Provider, { value: { density, invalid, disabled, required }, children: _jsx(View, { ref: ref, className: cn(formFieldVariants({ density }), disabled && 'opacity-60', className), ...props }) }));
43
+ });
44
+ FormField.displayName = 'FormField';
45
+ const FormLabel = React.forwardRef(({ className, showRequiredIndicator = true, children, ...props }, ref) => {
46
+ const { invalid, disabled, required } = useContext(FormFieldContext);
47
+ return (_jsxs(Text, { ref: ref, className: cn('text-sm font-medium leading-none text-foreground', invalid && 'text-destructive', disabled && 'text-muted-foreground', className), ...props, children: [children, required && showRequiredIndicator ? _jsx(Text, { className: "text-destructive", children: " *" }) : null] }));
48
+ });
49
+ FormLabel.displayName = 'FormLabel';
50
+ const FormControl = React.forwardRef(({ className, ...props }, ref) => {
51
+ const { density, invalid, disabled } = useContext(FormFieldContext);
52
+ return (_jsx(View, { ref: ref, className: cn(formControlVariants({ density, invalid }), invalid && 'rounded-md ring-1 ring-destructive/60', disabled && 'opacity-60', className), ...props }));
53
+ });
54
+ FormControl.displayName = 'FormControl';
55
+ const FormHint = React.forwardRef(({ className, ...props }, ref) => {
56
+ const { invalid } = useContext(FormFieldContext);
57
+ return (_jsx(Text, { ref: ref, className: cn('text-xs text-muted-foreground', invalid && 'text-destructive/80', className), ...props }));
58
+ });
59
+ FormHint.displayName = 'FormHint';
60
+ const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
61
+ if (children === undefined || children === null || children === false) {
62
+ return null;
63
+ }
64
+ return (_jsx(Text, { ref: ref, className: cn('text-xs font-medium text-destructive', className), ...props, children: children }));
65
+ });
66
+ FormMessage.displayName = 'FormMessage';
67
+ export { FormField, FormLabel, FormControl, FormHint, FormMessage, formFieldVariants, formControlVariants, };
68
+ //# sourceMappingURL=form-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field.js","sourceRoot":"","sources":["../../../src/components/form-field/form-field.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,EAAE,EAAqB,MAAM,cAAc,CAAC;AAErD,MAAM,iBAAiB,GAAG,EAAE,CAAC;IAC3B,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,SAAS;YAClB,O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AO,CACL,KAAC,IAAI,IACH,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,OAAO,IAAI,qBAAqB,EAAE,SAAS,CAAC,KACvF,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAClC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACzC,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACtE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,sCAAsC,EAAE,SAAS,CAAC,KAAM,KAAK,YACxF,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { FormField, FormLabel, FormControl, FormHint, FormMessage, formFieldVariants, formControlVariants, type FormFieldProps, type FormLabelProps, type FormControlProps, type FormHintProps, type FormMessageProps, } from './form-field';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { FormField, FormLabel, FormControl, FormHint, FormMessage, formFieldVariants, formControlVariants, } from './form-field';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/form-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GAMpB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { LabeledField, LabeledFieldControl, type LabeledFieldProps, type LabeledFieldControlProps, } from './labeled-field';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/labeled-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { LabeledField, LabeledFieldControl, } from './labeled-field';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/labeled-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,mBAAmB,GAGpB,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { View, type ViewProps } from 'react-native';
3
+ import { type FormFieldProps } from '../form-field';
4
+ export interface LabeledFieldProps extends Omit<FormFieldProps, 'children'> {
5
+ label?: React.ReactNode;
6
+ hint?: React.ReactNode;
7
+ error?: React.ReactNode;
8
+ leftSlot?: React.ReactNode;
9
+ rightSlot?: React.ReactNode;
10
+ controlWrapperClassName?: string;
11
+ children: React.ReactNode;
12
+ }
13
+ export interface LabeledFieldControlProps extends ViewProps {
14
+ className?: string;
15
+ }
16
+ declare function LabeledField({ label, hint, error, leftSlot, rightSlot, children, controlWrapperClassName, required, disabled, invalid, ...props }: LabeledFieldProps): import("react/jsx-runtime").JSX.Element;
17
+ declare const LabeledFieldControl: React.ForwardRefExoticComponent<LabeledFieldControlProps & React.RefAttributes<View>>;
18
+ export { LabeledField, LabeledFieldControl };
19
+ //# sourceMappingURL=labeled-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labeled-field.d.ts","sourceRoot":"","sources":["../../../src/components/labeled-field/labeled-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IACzE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,uBAAuB,EACvB,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAuBnB;AAED,QAAA,MAAM,mBAAmB,uFAIxB,CAAC;AAIF,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC"}