panelui-native 0.2.0 → 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.
- package/README.md +251 -0
- package/lib/module/components/alert/index.js +106 -13
- package/lib/module/components/alert/index.js.map +1 -1
- package/lib/module/components/badge/index.js +3 -3
- package/lib/module/components/badge/index.js.map +1 -1
- package/lib/module/components/button/index.js +44 -15
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/checkbox/index.js +20 -7
- package/lib/module/components/checkbox/index.js.map +1 -1
- package/lib/module/components/empty-state/index.js +178 -0
- package/lib/module/components/empty-state/index.js.map +1 -0
- package/lib/module/components/input-group/index.js +132 -0
- package/lib/module/components/input-group/index.js.map +1 -0
- package/lib/module/components/label/index.js +117 -0
- package/lib/module/components/label/index.js.map +1 -0
- package/lib/module/components/progress/index.js +138 -0
- package/lib/module/components/progress/index.js.map +1 -0
- package/lib/module/components/steps/index.js +354 -0
- package/lib/module/components/steps/index.js.map +1 -0
- package/lib/module/components/tabs/index.js +9 -3
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/toast/index.js +479 -0
- package/lib/module/components/toast/index.js.map +1 -0
- package/lib/module/components/toast/toast-store.js +81 -0
- package/lib/module/components/toast/toast-store.js.map +1 -0
- package/lib/module/components/typography/index.js +126 -0
- package/lib/module/components/typography/index.js.map +1 -0
- package/lib/module/icons/index.js +223 -2
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +9 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/panel-ui-provider.js +2 -1
- package/lib/module/providers/panel-ui-provider.js.map +1 -1
- package/lib/module/theme/use-theme.js +90 -3
- package/lib/module/theme/use-theme.js.map +1 -1
- package/lib/typescript/src/components/alert/index.d.ts +56 -4
- package/lib/typescript/src/components/alert/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +39 -0
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/checkbox/index.d.ts +8 -0
- package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/index.d.ts +73 -0
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -0
- package/lib/typescript/src/components/input-group/index.d.ts +34 -0
- package/lib/typescript/src/components/input-group/index.d.ts.map +1 -0
- package/lib/typescript/src/components/label/index.d.ts +28 -0
- package/lib/typescript/src/components/label/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progress/index.d.ts +132 -0
- package/lib/typescript/src/components/progress/index.d.ts.map +1 -0
- package/lib/typescript/src/components/steps/index.d.ts +62 -0
- package/lib/typescript/src/components/steps/index.d.ts.map +1 -0
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toast/index.d.ts +176 -0
- package/lib/typescript/src/components/toast/index.d.ts.map +1 -0
- package/lib/typescript/src/components/toast/toast-store.d.ts +65 -0
- package/lib/typescript/src/components/toast/toast-store.d.ts.map +1 -0
- package/lib/typescript/src/components/typography/index.d.ts +77 -0
- package/lib/typescript/src/components/typography/index.d.ts.map +1 -0
- package/lib/typescript/src/icons/index.d.ts +25 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +10 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
- package/lib/typescript/src/theme/use-theme.d.ts +64 -4
- package/lib/typescript/src/theme/use-theme.d.ts.map +1 -1
- package/package.json +22 -4
- package/src/components/alert/index.tsx +102 -16
- package/src/components/badge/index.tsx +3 -3
- package/src/components/button/index.tsx +47 -7
- package/src/components/checkbox/index.tsx +17 -3
- package/src/components/empty-state/index.tsx +136 -0
- package/src/components/input-group/index.tsx +164 -0
- package/src/components/label/index.tsx +128 -0
- package/src/components/progress/index.tsx +147 -0
- package/src/components/steps/index.tsx +343 -0
- package/src/components/tabs/index.tsx +10 -2
- package/src/components/toast/index.tsx +447 -0
- package/src/components/toast/toast-store.ts +120 -0
- package/src/components/typography/index.tsx +121 -0
- package/src/icons/index.tsx +152 -1
- package/src/index.ts +76 -3
- package/src/providers/panel-ui-provider.tsx +3 -0
- package/src/theme/use-theme.ts +119 -4
- package/theme.css +330 -7
|
@@ -1,83 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert — a status message with an optional leading status icon.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from: heroui-inc/heroui-native src/components/alert/alert.tsx
|
|
5
|
+
* (Indicator / Content / Title / Description anatomy, status-driven icon and
|
|
6
|
+
* title colour), restyled with Coss UI tokens.
|
|
7
|
+
*
|
|
8
|
+
* The `variant` prop name is kept from PanelUI v0.2 rather than renamed to
|
|
9
|
+
* HeroUI's `status`, so existing code keeps working.
|
|
10
|
+
*/
|
|
1
11
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { View, type ViewProps } from 'react-native';
|
|
12
|
+
import { View, type Text as RNText, type ViewProps } from 'react-native';
|
|
3
13
|
import { type VariantProps } from 'tailwind-variants';
|
|
4
14
|
import { type TextProps } from '../../primitives/text.js';
|
|
5
15
|
declare const alertVariants: import("tailwind-variants").TVReturnType<{
|
|
6
16
|
variant: {
|
|
7
17
|
default: {
|
|
8
18
|
root: string;
|
|
19
|
+
title: string;
|
|
9
20
|
};
|
|
10
21
|
info: {
|
|
11
22
|
root: string;
|
|
23
|
+
title: string;
|
|
12
24
|
};
|
|
13
25
|
success: {
|
|
14
26
|
root: string;
|
|
27
|
+
title: string;
|
|
15
28
|
};
|
|
16
29
|
warning: {
|
|
17
30
|
root: string;
|
|
31
|
+
title: string;
|
|
18
32
|
};
|
|
19
33
|
destructive: {
|
|
20
34
|
root: string;
|
|
35
|
+
title: string;
|
|
21
36
|
};
|
|
22
37
|
};
|
|
23
38
|
}, {
|
|
24
39
|
root: string;
|
|
40
|
+
indicator: string;
|
|
41
|
+
content: string;
|
|
25
42
|
title: string;
|
|
26
43
|
description: string;
|
|
27
44
|
}, undefined, {
|
|
28
45
|
variant: {
|
|
29
46
|
default: {
|
|
30
47
|
root: string;
|
|
48
|
+
title: string;
|
|
31
49
|
};
|
|
32
50
|
info: {
|
|
33
51
|
root: string;
|
|
52
|
+
title: string;
|
|
34
53
|
};
|
|
35
54
|
success: {
|
|
36
55
|
root: string;
|
|
56
|
+
title: string;
|
|
37
57
|
};
|
|
38
58
|
warning: {
|
|
39
59
|
root: string;
|
|
60
|
+
title: string;
|
|
40
61
|
};
|
|
41
62
|
destructive: {
|
|
42
63
|
root: string;
|
|
64
|
+
title: string;
|
|
43
65
|
};
|
|
44
66
|
};
|
|
45
67
|
}, {
|
|
46
68
|
root: string;
|
|
69
|
+
indicator: string;
|
|
70
|
+
content: string;
|
|
47
71
|
title: string;
|
|
48
72
|
description: string;
|
|
49
73
|
}, import("tailwind-variants").TVReturnType<{
|
|
50
74
|
variant: {
|
|
51
75
|
default: {
|
|
52
76
|
root: string;
|
|
77
|
+
title: string;
|
|
53
78
|
};
|
|
54
79
|
info: {
|
|
55
80
|
root: string;
|
|
81
|
+
title: string;
|
|
56
82
|
};
|
|
57
83
|
success: {
|
|
58
84
|
root: string;
|
|
85
|
+
title: string;
|
|
59
86
|
};
|
|
60
87
|
warning: {
|
|
61
88
|
root: string;
|
|
89
|
+
title: string;
|
|
62
90
|
};
|
|
63
91
|
destructive: {
|
|
64
92
|
root: string;
|
|
93
|
+
title: string;
|
|
65
94
|
};
|
|
66
95
|
};
|
|
67
96
|
}, {
|
|
68
97
|
root: string;
|
|
98
|
+
indicator: string;
|
|
99
|
+
content: string;
|
|
69
100
|
title: string;
|
|
70
101
|
description: string;
|
|
71
102
|
}, undefined, unknown, unknown, undefined>>;
|
|
72
103
|
export interface AlertProps extends ViewProps, VariantProps<typeof alertVariants> {
|
|
73
104
|
className?: string;
|
|
74
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* Leading element rendered before the content.
|
|
107
|
+
*
|
|
108
|
+
* @deprecated Prefer `<Alert.Indicator>`, which picks a status icon for you.
|
|
109
|
+
* Still honoured so v0.2 call sites keep rendering.
|
|
110
|
+
*/
|
|
75
111
|
icon?: ReactNode;
|
|
76
112
|
children?: ReactNode;
|
|
77
113
|
}
|
|
114
|
+
export interface AlertIndicatorProps extends ViewProps {
|
|
115
|
+
className?: string;
|
|
116
|
+
/** Overrides the size/colour of the default status icon. */
|
|
117
|
+
iconProps?: {
|
|
118
|
+
size?: number;
|
|
119
|
+
color?: string;
|
|
120
|
+
};
|
|
121
|
+
/** Replaces the default status icon entirely. */
|
|
122
|
+
children?: ReactNode;
|
|
123
|
+
}
|
|
78
124
|
export declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & import("react").RefAttributes<View>> & {
|
|
79
|
-
|
|
80
|
-
|
|
125
|
+
/** @optional Status icon rendered as the leading visual element. */
|
|
126
|
+
Indicator: import("react").ForwardRefExoticComponent<AlertIndicatorProps & import("react").RefAttributes<View>>;
|
|
127
|
+
/** @optional Wrapper for title and description. */
|
|
128
|
+
Content: import("react").ForwardRefExoticComponent<ViewProps & {
|
|
129
|
+
className?: string;
|
|
130
|
+
} & import("react").RefAttributes<View>>;
|
|
131
|
+
Title: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
132
|
+
Description: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
81
133
|
};
|
|
82
134
|
export {};
|
|
83
135
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/alert/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/alert/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAG7D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmCjB,CAAC;AAuBH,MAAM,WAAW,UAAW,SAAQ,SAAS,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA6BD,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,iDAAiD;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAqDD,eAAO,MAAM,KAAK;IAChB,oEAAoE;;IAEpE,mDAAmD;;oBA9BW,MAAM;;;;CAkCpE,CAAC"}
|
|
@@ -7,22 +7,27 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
7
7
|
primary: {
|
|
8
8
|
root: string;
|
|
9
9
|
label: string;
|
|
10
|
+
spinner: string;
|
|
10
11
|
};
|
|
11
12
|
secondary: {
|
|
12
13
|
root: string;
|
|
13
14
|
label: string;
|
|
15
|
+
spinner: string;
|
|
14
16
|
};
|
|
15
17
|
outline: {
|
|
16
18
|
root: string;
|
|
17
19
|
label: string;
|
|
20
|
+
spinner: string;
|
|
18
21
|
};
|
|
19
22
|
ghost: {
|
|
20
23
|
root: string;
|
|
21
24
|
label: string;
|
|
25
|
+
spinner: string;
|
|
22
26
|
};
|
|
23
27
|
destructive: {
|
|
24
28
|
root: string;
|
|
25
29
|
label: string;
|
|
30
|
+
spinner: string;
|
|
26
31
|
};
|
|
27
32
|
};
|
|
28
33
|
size: {
|
|
@@ -42,6 +47,11 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
42
47
|
root: string;
|
|
43
48
|
};
|
|
44
49
|
};
|
|
50
|
+
fullWidth: {
|
|
51
|
+
true: {
|
|
52
|
+
root: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
45
55
|
disabled: {
|
|
46
56
|
true: {
|
|
47
57
|
root: string;
|
|
@@ -50,27 +60,33 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
50
60
|
}, {
|
|
51
61
|
root: string;
|
|
52
62
|
label: string;
|
|
63
|
+
spinner: string;
|
|
53
64
|
}, undefined, {
|
|
54
65
|
variant: {
|
|
55
66
|
primary: {
|
|
56
67
|
root: string;
|
|
57
68
|
label: string;
|
|
69
|
+
spinner: string;
|
|
58
70
|
};
|
|
59
71
|
secondary: {
|
|
60
72
|
root: string;
|
|
61
73
|
label: string;
|
|
74
|
+
spinner: string;
|
|
62
75
|
};
|
|
63
76
|
outline: {
|
|
64
77
|
root: string;
|
|
65
78
|
label: string;
|
|
79
|
+
spinner: string;
|
|
66
80
|
};
|
|
67
81
|
ghost: {
|
|
68
82
|
root: string;
|
|
69
83
|
label: string;
|
|
84
|
+
spinner: string;
|
|
70
85
|
};
|
|
71
86
|
destructive: {
|
|
72
87
|
root: string;
|
|
73
88
|
label: string;
|
|
89
|
+
spinner: string;
|
|
74
90
|
};
|
|
75
91
|
};
|
|
76
92
|
size: {
|
|
@@ -90,6 +106,11 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
90
106
|
root: string;
|
|
91
107
|
};
|
|
92
108
|
};
|
|
109
|
+
fullWidth: {
|
|
110
|
+
true: {
|
|
111
|
+
root: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
93
114
|
disabled: {
|
|
94
115
|
true: {
|
|
95
116
|
root: string;
|
|
@@ -98,27 +119,33 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
98
119
|
}, {
|
|
99
120
|
root: string;
|
|
100
121
|
label: string;
|
|
122
|
+
spinner: string;
|
|
101
123
|
}, import("tailwind-variants").TVReturnType<{
|
|
102
124
|
variant: {
|
|
103
125
|
primary: {
|
|
104
126
|
root: string;
|
|
105
127
|
label: string;
|
|
128
|
+
spinner: string;
|
|
106
129
|
};
|
|
107
130
|
secondary: {
|
|
108
131
|
root: string;
|
|
109
132
|
label: string;
|
|
133
|
+
spinner: string;
|
|
110
134
|
};
|
|
111
135
|
outline: {
|
|
112
136
|
root: string;
|
|
113
137
|
label: string;
|
|
138
|
+
spinner: string;
|
|
114
139
|
};
|
|
115
140
|
ghost: {
|
|
116
141
|
root: string;
|
|
117
142
|
label: string;
|
|
143
|
+
spinner: string;
|
|
118
144
|
};
|
|
119
145
|
destructive: {
|
|
120
146
|
root: string;
|
|
121
147
|
label: string;
|
|
148
|
+
spinner: string;
|
|
122
149
|
};
|
|
123
150
|
};
|
|
124
151
|
size: {
|
|
@@ -138,6 +165,11 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
138
165
|
root: string;
|
|
139
166
|
};
|
|
140
167
|
};
|
|
168
|
+
fullWidth: {
|
|
169
|
+
true: {
|
|
170
|
+
root: string;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
141
173
|
disabled: {
|
|
142
174
|
true: {
|
|
143
175
|
root: string;
|
|
@@ -146,11 +178,18 @@ declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
146
178
|
}, {
|
|
147
179
|
root: string;
|
|
148
180
|
label: string;
|
|
181
|
+
spinner: string;
|
|
149
182
|
}, undefined, unknown, unknown, undefined>>;
|
|
150
183
|
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
151
184
|
export interface ButtonProps extends Omit<AnimatedPressableProps, 'children' | 'disabled'>, Omit<ButtonVariantProps, 'disabled'> {
|
|
152
185
|
children?: ReactNode;
|
|
153
186
|
disabled?: boolean;
|
|
187
|
+
/** Show a spinner and block presses while an action is in flight. */
|
|
188
|
+
loading?: boolean;
|
|
189
|
+
/** Content rendered before the label (replaced by the spinner while loading). */
|
|
190
|
+
startContent?: ReactNode;
|
|
191
|
+
/** Content rendered after the label. */
|
|
192
|
+
endContent?: ReactNode;
|
|
154
193
|
/** Extra classes for the label when children is a string. */
|
|
155
194
|
labelClassName?: string;
|
|
156
195
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,wCAAqC,CAAC;AAI7C,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmDlB,CAAC;AAEH,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAI9D,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,UAAU,GAAG,UAAU,CAAC,EAC3D,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,wCAAwC;IACxC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,6DAA6D;IAC7D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,MAAM,8FAgDlB,CAAC"}
|
|
@@ -10,7 +10,9 @@ declare const checkboxVariants: import("tailwind-variants").TVReturnType<{
|
|
|
10
10
|
row: string;
|
|
11
11
|
box: string;
|
|
12
12
|
fill: string;
|
|
13
|
+
content: string;
|
|
13
14
|
label: string;
|
|
15
|
+
description: string;
|
|
14
16
|
}, undefined, {
|
|
15
17
|
disabled: {
|
|
16
18
|
true: {
|
|
@@ -21,7 +23,9 @@ declare const checkboxVariants: import("tailwind-variants").TVReturnType<{
|
|
|
21
23
|
row: string;
|
|
22
24
|
box: string;
|
|
23
25
|
fill: string;
|
|
26
|
+
content: string;
|
|
24
27
|
label: string;
|
|
28
|
+
description: string;
|
|
25
29
|
}, import("tailwind-variants").TVReturnType<{
|
|
26
30
|
disabled: {
|
|
27
31
|
true: {
|
|
@@ -32,7 +36,9 @@ declare const checkboxVariants: import("tailwind-variants").TVReturnType<{
|
|
|
32
36
|
row: string;
|
|
33
37
|
box: string;
|
|
34
38
|
fill: string;
|
|
39
|
+
content: string;
|
|
35
40
|
label: string;
|
|
41
|
+
description: string;
|
|
36
42
|
}, undefined, unknown, unknown, undefined>>;
|
|
37
43
|
export interface CheckboxProps extends VariantProps<typeof checkboxVariants> {
|
|
38
44
|
className?: string;
|
|
@@ -41,6 +47,8 @@ export interface CheckboxProps extends VariantProps<typeof checkboxVariants> {
|
|
|
41
47
|
disabled?: boolean;
|
|
42
48
|
/** Optional label rendered next to the box; pressing it also toggles. */
|
|
43
49
|
label?: string;
|
|
50
|
+
/** Secondary line under the label, for extra context. */
|
|
51
|
+
description?: string;
|
|
44
52
|
}
|
|
45
53
|
export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<View>>;
|
|
46
54
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/checkbox/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AAO/C,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK1D,QAAA,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/checkbox/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AAO/C,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK1D,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAcpB,CAAC;AAEH,MAAM,WAAW,aAAc,SAAQ,YAAY,CAAC,OAAO,gBAAgB,CAAC;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,gGAkDpB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EmptyState — the placeholder shown when a list or view has no content.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from: cosscom/coss packages/ui/src/components/empty.tsx
|
|
5
|
+
* (centered Header / Media / Title / Description / Content anatomy, and the
|
|
6
|
+
* `icon` media variant that stacks two rotated ghost cards behind the icon).
|
|
7
|
+
* Coss does that with CSS pseudo-elements; on native it is two absolutely
|
|
8
|
+
* positioned siblings with static rotate transforms.
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactNode } from 'react';
|
|
11
|
+
import { View, type Text as RNText, type ViewProps } from 'react-native';
|
|
12
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
13
|
+
import { type TextProps } from '../../primitives/text.js';
|
|
14
|
+
declare const mediaVariants: import("tailwind-variants").TVReturnType<{
|
|
15
|
+
variant: {
|
|
16
|
+
default: {
|
|
17
|
+
card: string;
|
|
18
|
+
ghost: string;
|
|
19
|
+
};
|
|
20
|
+
icon: {
|
|
21
|
+
card: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
wrapper: string;
|
|
26
|
+
card: string;
|
|
27
|
+
ghost: string;
|
|
28
|
+
}, undefined, {
|
|
29
|
+
variant: {
|
|
30
|
+
default: {
|
|
31
|
+
card: string;
|
|
32
|
+
ghost: string;
|
|
33
|
+
};
|
|
34
|
+
icon: {
|
|
35
|
+
card: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}, {
|
|
39
|
+
wrapper: string;
|
|
40
|
+
card: string;
|
|
41
|
+
ghost: string;
|
|
42
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
43
|
+
variant: {
|
|
44
|
+
default: {
|
|
45
|
+
card: string;
|
|
46
|
+
ghost: string;
|
|
47
|
+
};
|
|
48
|
+
icon: {
|
|
49
|
+
card: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}, {
|
|
53
|
+
wrapper: string;
|
|
54
|
+
card: string;
|
|
55
|
+
ghost: string;
|
|
56
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
57
|
+
export interface EmptyStateProps extends ViewProps {
|
|
58
|
+
className?: string;
|
|
59
|
+
children?: ReactNode;
|
|
60
|
+
}
|
|
61
|
+
export interface EmptyStateMediaProps extends ViewProps, VariantProps<typeof mediaVariants> {
|
|
62
|
+
className?: string;
|
|
63
|
+
children?: ReactNode;
|
|
64
|
+
}
|
|
65
|
+
export declare const EmptyState: import("react").ForwardRefExoticComponent<EmptyStateProps & import("react").RefAttributes<View>> & {
|
|
66
|
+
Header: import("react").ForwardRefExoticComponent<EmptyStateProps & import("react").RefAttributes<View>>;
|
|
67
|
+
Media: import("react").ForwardRefExoticComponent<EmptyStateMediaProps & import("react").RefAttributes<View>>;
|
|
68
|
+
Title: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
69
|
+
Description: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
|
|
70
|
+
Content: import("react").ForwardRefExoticComponent<EmptyStateProps & import("react").RefAttributes<View>>;
|
|
71
|
+
};
|
|
72
|
+
export {};
|
|
73
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/empty-state/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAY7D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAoBjB,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAmBD,MAAM,WAAW,oBACf,SAAQ,SAAS,EACf,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwDD,eAAO,MAAM,UAAU;;;;;;CAMrB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InputGroup — an Input with leading and/or trailing decorators.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from: heroui-inc/heroui-native src/components/input-group/
|
|
5
|
+
* Prefix and Suffix are absolutely positioned and their measured widths become
|
|
6
|
+
* padding on the Input, so text never runs underneath a decorator regardless
|
|
7
|
+
* of how wide that decorator turns out to be.
|
|
8
|
+
*/
|
|
9
|
+
import { type ReactNode } from 'react';
|
|
10
|
+
import { View, type TextInput, type ViewProps } from 'react-native';
|
|
11
|
+
import { type InputProps } from '../input/index.js';
|
|
12
|
+
export interface InputGroupProps extends ViewProps {
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Disables the input and dims both decorators. */
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export interface InputGroupDecoratorProps extends ViewProps {
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Marks the decorator as presentation-only: touches fall through to the
|
|
22
|
+
* Input and screen readers skip it. Leave it off when the decorator holds
|
|
23
|
+
* something interactive, such as a show-password toggle.
|
|
24
|
+
*/
|
|
25
|
+
isDecorative?: boolean;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export type InputGroupInputProps = InputProps;
|
|
29
|
+
export declare const InputGroup: import("react").ForwardRefExoticComponent<InputGroupProps & import("react").RefAttributes<View>> & {
|
|
30
|
+
Prefix: import("react").ForwardRefExoticComponent<InputGroupDecoratorProps & import("react").RefAttributes<View>>;
|
|
31
|
+
Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<TextInput>>;
|
|
32
|
+
Suffix: import("react").ForwardRefExoticComponent<InputGroupDecoratorProps & import("react").RefAttributes<View>>;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/input-group/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EACL,IAAI,EAEJ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,mBAAU,CAAC;AA6BlD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwBD,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwCD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC;AA4B9C,eAAO,MAAM,UAAU;;;;CAIrB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Label — text that names a form field.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from: heroui-inc/heroui-native src/components/label/ (root +
|
|
5
|
+
* Label.Text anatomy, string children auto-wrapping, the required asterisk,
|
|
6
|
+
* and the isInvalid / isDisabled recolouring).
|
|
7
|
+
*/
|
|
8
|
+
import { type ReactNode } from 'react';
|
|
9
|
+
import { View, type Text as RNText, type ViewProps } from 'react-native';
|
|
10
|
+
import { type TextProps } from '../../primitives/text.js';
|
|
11
|
+
export interface LabelProps extends ViewProps {
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Appends an asterisk marking the field as required. */
|
|
14
|
+
isRequired?: boolean;
|
|
15
|
+
/** Recolours the label to signal a validation error. */
|
|
16
|
+
isInvalid?: boolean;
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export interface LabelTextProps extends TextProps {
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Classes for the required asterisk. */
|
|
23
|
+
asteriskClassName?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<View>> & {
|
|
26
|
+
Text: import("react").ForwardRefExoticComponent<LabelTextProps & import("react").RefAttributes<RNText>>;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/label/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,0BAAuB,CAAC;AAiC7D,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAqCD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AA2BD,eAAO,MAAM,KAAK;;CAEhB,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { View, type ViewProps } from 'react-native';
|
|
2
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
3
|
+
declare const progressVariants: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
color: {
|
|
5
|
+
primary: {
|
|
6
|
+
track: string;
|
|
7
|
+
indicator: string;
|
|
8
|
+
};
|
|
9
|
+
success: {
|
|
10
|
+
track: string;
|
|
11
|
+
indicator: string;
|
|
12
|
+
};
|
|
13
|
+
warning: {
|
|
14
|
+
track: string;
|
|
15
|
+
indicator: string;
|
|
16
|
+
};
|
|
17
|
+
destructive: {
|
|
18
|
+
track: string;
|
|
19
|
+
indicator: string;
|
|
20
|
+
};
|
|
21
|
+
info: {
|
|
22
|
+
track: string;
|
|
23
|
+
indicator: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
size: {
|
|
27
|
+
sm: {
|
|
28
|
+
track: string;
|
|
29
|
+
};
|
|
30
|
+
md: {
|
|
31
|
+
track: string;
|
|
32
|
+
};
|
|
33
|
+
lg: {
|
|
34
|
+
track: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}, {
|
|
38
|
+
track: string;
|
|
39
|
+
indicator: string;
|
|
40
|
+
}, undefined, {
|
|
41
|
+
color: {
|
|
42
|
+
primary: {
|
|
43
|
+
track: string;
|
|
44
|
+
indicator: string;
|
|
45
|
+
};
|
|
46
|
+
success: {
|
|
47
|
+
track: string;
|
|
48
|
+
indicator: string;
|
|
49
|
+
};
|
|
50
|
+
warning: {
|
|
51
|
+
track: string;
|
|
52
|
+
indicator: string;
|
|
53
|
+
};
|
|
54
|
+
destructive: {
|
|
55
|
+
track: string;
|
|
56
|
+
indicator: string;
|
|
57
|
+
};
|
|
58
|
+
info: {
|
|
59
|
+
track: string;
|
|
60
|
+
indicator: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
size: {
|
|
64
|
+
sm: {
|
|
65
|
+
track: string;
|
|
66
|
+
};
|
|
67
|
+
md: {
|
|
68
|
+
track: string;
|
|
69
|
+
};
|
|
70
|
+
lg: {
|
|
71
|
+
track: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
}, {
|
|
75
|
+
track: string;
|
|
76
|
+
indicator: string;
|
|
77
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
78
|
+
color: {
|
|
79
|
+
primary: {
|
|
80
|
+
track: string;
|
|
81
|
+
indicator: string;
|
|
82
|
+
};
|
|
83
|
+
success: {
|
|
84
|
+
track: string;
|
|
85
|
+
indicator: string;
|
|
86
|
+
};
|
|
87
|
+
warning: {
|
|
88
|
+
track: string;
|
|
89
|
+
indicator: string;
|
|
90
|
+
};
|
|
91
|
+
destructive: {
|
|
92
|
+
track: string;
|
|
93
|
+
indicator: string;
|
|
94
|
+
};
|
|
95
|
+
info: {
|
|
96
|
+
track: string;
|
|
97
|
+
indicator: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
size: {
|
|
101
|
+
sm: {
|
|
102
|
+
track: string;
|
|
103
|
+
};
|
|
104
|
+
md: {
|
|
105
|
+
track: string;
|
|
106
|
+
};
|
|
107
|
+
lg: {
|
|
108
|
+
track: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
}, {
|
|
112
|
+
track: string;
|
|
113
|
+
indicator: string;
|
|
114
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
115
|
+
type ProgressVariantProps = VariantProps<typeof progressVariants>;
|
|
116
|
+
export interface ProgressProps extends Omit<ViewProps, 'children'>, ProgressVariantProps {
|
|
117
|
+
className?: string;
|
|
118
|
+
/** Progress value, 0–100. Ignored when `indeterminate` is set. */
|
|
119
|
+
value?: number;
|
|
120
|
+
/** Show a looping animation for unknown-duration work. */
|
|
121
|
+
indeterminate?: boolean;
|
|
122
|
+
/** Extra classes for the moving indicator. */
|
|
123
|
+
indicatorClassName?: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Determinate or indeterminate progress bar. The fill width (determinate) and
|
|
127
|
+
* the sliding bar (indeterminate) are both driven on the UI thread, so updates
|
|
128
|
+
* never re-render past the value change itself.
|
|
129
|
+
*/
|
|
130
|
+
export declare const Progress: import("react").ForwardRefExoticComponent<ProgressProps & import("react").RefAttributes<View>>;
|
|
131
|
+
export {};
|
|
132
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/progress/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAW5E,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAM1D,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAuBpB,CAAC;AAEH,KAAK,oBAAoB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAElE,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EACjC,oBAAoB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AASD;;;;GAIG;AACH,eAAO,MAAM,QAAQ,gGA2EpB,CAAC"}
|