panelui-native 0.7.0 → 0.12.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 +5 -3
- package/lib/module/components/attachment/index.js +219 -0
- package/lib/module/components/attachment/index.js.map +1 -0
- package/lib/module/components/bottom-sheet/index.js +53 -3
- package/lib/module/components/bottom-sheet/index.js.map +1 -1
- package/lib/module/components/button/index.js +19 -1
- package/lib/module/components/button/index.js.map +1 -1
- package/lib/module/components/dialog/index.js +6 -2
- package/lib/module/components/dialog/index.js.map +1 -1
- package/lib/module/components/empty-state/index.js +94 -17
- package/lib/module/components/empty-state/index.js.map +1 -1
- package/lib/module/components/frame/index.js +128 -15
- package/lib/module/components/frame/index.js.map +1 -1
- package/lib/module/components/input/index.js +107 -15
- package/lib/module/components/input/index.js.map +1 -1
- package/lib/module/components/line-chart/index.js +1024 -0
- package/lib/module/components/line-chart/index.js.map +1 -0
- package/lib/module/components/marker/index.js +190 -0
- package/lib/module/components/marker/index.js.map +1 -0
- package/lib/module/components/message/index.js +24 -8
- package/lib/module/components/message/index.js.map +1 -1
- package/lib/module/components/message-scroller/index.js +451 -0
- package/lib/module/components/message-scroller/index.js.map +1 -0
- package/lib/module/components/popover/index.js +511 -0
- package/lib/module/components/popover/index.js.map +1 -0
- package/lib/module/components/progress/index.js +52 -2
- package/lib/module/components/progress/index.js.map +1 -1
- package/lib/module/components/radio-group/index.js +132 -17
- package/lib/module/components/radio-group/index.js.map +1 -1
- package/lib/module/components/section-rail/index.js +355 -0
- package/lib/module/components/section-rail/index.js.map +1 -0
- package/lib/module/components/select/index.js +245 -56
- package/lib/module/components/select/index.js.map +1 -1
- package/lib/module/components/separator/index.js +91 -0
- package/lib/module/components/separator/index.js.map +1 -0
- package/lib/module/components/slider/index.js +355 -0
- package/lib/module/components/slider/index.js.map +1 -0
- package/lib/module/components/surface/index.js +21 -2
- package/lib/module/components/surface/index.js.map +1 -1
- package/lib/module/components/switch/index.js +10 -1
- package/lib/module/components/switch/index.js.map +1 -1
- package/lib/module/components/tabs/index.js +186 -16
- package/lib/module/components/tabs/index.js.map +1 -1
- package/lib/module/components/toggle-button/index.js +297 -0
- package/lib/module/components/toggle-button/index.js.map +1 -0
- package/lib/module/hooks/index.js +1 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/use-keyboard-avoidance.js +57 -8
- package/lib/module/hooks/use-keyboard-avoidance.js.map +1 -1
- package/lib/module/hooks/use-scroll-sections.js +89 -0
- package/lib/module/hooks/use-scroll-sections.js.map +1 -0
- package/lib/module/icons/index.js +69 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/index.js +11 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/index.js.map +1 -1
- package/lib/module/primitives/keyboard-avoider.js +2 -0
- package/lib/module/primitives/keyboard-avoider.js.map +1 -1
- package/lib/module/primitives/scrim.js +72 -0
- package/lib/module/primitives/scrim.js.map +1 -0
- package/lib/module/utils/haptics.js +57 -0
- package/lib/module/utils/haptics.js.map +1 -0
- package/lib/typescript/src/components/attachment/index.d.ts +93 -0
- package/lib/typescript/src/components/attachment/index.d.ts.map +1 -0
- package/lib/typescript/src/components/bottom-sheet/index.d.ts +6 -1
- package/lib/typescript/src/components/bottom-sheet/index.d.ts.map +1 -1
- package/lib/typescript/src/components/button/index.d.ts +9 -4
- package/lib/typescript/src/components/button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/dialog/index.d.ts +7 -1
- package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
- package/lib/typescript/src/components/empty-state/index.d.ts +152 -2
- package/lib/typescript/src/components/empty-state/index.d.ts.map +1 -1
- package/lib/typescript/src/components/frame/index.d.ts +47 -7
- package/lib/typescript/src/components/frame/index.d.ts.map +1 -1
- package/lib/typescript/src/components/input/index.d.ts +113 -2
- package/lib/typescript/src/components/input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/line-chart/index.d.ts +247 -0
- package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -0
- package/lib/typescript/src/components/marker/index.d.ts +137 -0
- package/lib/typescript/src/components/marker/index.d.ts.map +1 -0
- package/lib/typescript/src/components/message/index.d.ts +8 -1
- package/lib/typescript/src/components/message/index.d.ts.map +1 -1
- package/lib/typescript/src/components/message-scroller/index.d.ts +150 -0
- package/lib/typescript/src/components/message-scroller/index.d.ts.map +1 -0
- package/lib/typescript/src/components/popover/index.d.ts +136 -0
- package/lib/typescript/src/components/popover/index.d.ts.map +1 -0
- package/lib/typescript/src/components/progress/index.d.ts +33 -0
- package/lib/typescript/src/components/progress/index.d.ts.map +1 -1
- package/lib/typescript/src/components/radio-group/index.d.ts +39 -0
- package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
- package/lib/typescript/src/components/section-rail/index.d.ts +115 -0
- package/lib/typescript/src/components/section-rail/index.d.ts.map +1 -0
- package/lib/typescript/src/components/select/index.d.ts +46 -7
- package/lib/typescript/src/components/select/index.d.ts.map +1 -1
- package/lib/typescript/src/components/separator/index.d.ts +47 -0
- package/lib/typescript/src/components/separator/index.d.ts.map +1 -0
- package/lib/typescript/src/components/slider/index.d.ts +203 -0
- package/lib/typescript/src/components/slider/index.d.ts.map +1 -0
- package/lib/typescript/src/components/surface/index.d.ts +51 -2
- package/lib/typescript/src/components/surface/index.d.ts.map +1 -1
- package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
- package/lib/typescript/src/components/tabs/index.d.ts +46 -4
- package/lib/typescript/src/components/tabs/index.d.ts.map +1 -1
- package/lib/typescript/src/components/toggle-button/index.d.ts +244 -0
- package/lib/typescript/src/components/toggle-button/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/index.d.ts +1 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts +10 -1
- package/lib/typescript/src/hooks/use-keyboard-avoidance.d.ts.map +1 -1
- package/lib/typescript/src/hooks/use-scroll-sections.d.ts +31 -0
- package/lib/typescript/src/hooks/use-scroll-sections.d.ts.map +1 -0
- package/lib/typescript/src/icons/index.d.ts +6 -0
- package/lib/typescript/src/icons/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +13 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/index.d.ts +16 -1
- package/lib/typescript/src/native/index.d.ts.map +1 -1
- package/lib/typescript/src/primitives/keyboard-avoider.d.ts +8 -1
- package/lib/typescript/src/primitives/keyboard-avoider.d.ts.map +1 -1
- package/lib/typescript/src/primitives/scrim.d.ts +21 -0
- package/lib/typescript/src/primitives/scrim.d.ts.map +1 -0
- package/lib/typescript/src/utils/haptics.d.ts +12 -0
- package/lib/typescript/src/utils/haptics.d.ts.map +1 -0
- package/package.json +9 -1
- package/src/components/attachment/index.tsx +279 -0
- package/src/components/bottom-sheet/index.tsx +58 -2
- package/src/components/button/index.tsx +26 -5
- package/src/components/dialog/index.tsx +10 -1
- package/src/components/empty-state/index.tsx +60 -14
- package/src/components/frame/index.tsx +175 -29
- package/src/components/input/index.tsx +122 -16
- package/src/components/line-chart/index.tsx +1224 -0
- package/src/components/marker/index.tsx +194 -0
- package/src/components/message/index.tsx +29 -5
- package/src/components/message-scroller/index.tsx +574 -0
- package/src/components/popover/index.tsx +624 -0
- package/src/components/progress/index.tsx +81 -1
- package/src/components/radio-group/index.tsx +156 -18
- package/src/components/section-rail/index.tsx +459 -0
- package/src/components/select/index.tsx +265 -52
- package/src/components/separator/index.tsx +97 -0
- package/src/components/slider/index.tsx +371 -0
- package/src/components/surface/index.tsx +29 -3
- package/src/components/switch/index.tsx +8 -1
- package/src/components/tabs/index.tsx +208 -28
- package/src/components/toggle-button/index.tsx +374 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/use-keyboard-avoidance.ts +73 -7
- package/src/hooks/use-scroll-sections.ts +127 -0
- package/src/icons/index.tsx +48 -0
- package/src/index.ts +97 -6
- package/src/native/index.ts +13 -1
- package/src/primitives/keyboard-avoider.tsx +9 -1
- package/src/primitives/scrim.tsx +95 -0
- package/src/utils/haptics.ts +63 -0
- package/theme.css +64 -2
- package/lib/module/components/inline-select/index.js +0 -284
- package/lib/module/components/inline-select/index.js.map +0 -1
- package/lib/typescript/src/components/inline-select/index.d.ts +0 -48
- package/lib/typescript/src/components/inline-select/index.d.ts.map +0 -1
- package/src/components/inline-select/index.tsx +0 -332
|
@@ -8,25 +8,63 @@
|
|
|
8
8
|
* is a pair of CSS pseudo-elements; React Native has none, so it is two
|
|
9
9
|
* absolutely positioned siblings with static rotate transforms.
|
|
10
10
|
*/
|
|
11
|
-
import { forwardRef } from 'react';
|
|
11
|
+
import { createContext, forwardRef, useContext } from 'react';
|
|
12
12
|
import { View } from 'react-native';
|
|
13
13
|
import { tv } from 'tailwind-variants';
|
|
14
14
|
import { Text } from "../../primitives/text.js";
|
|
15
15
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
/** Sub-components read the size so the title, description and media scale with the root. */
|
|
17
|
+
const EmptyStateContext = /*#__PURE__*/createContext({
|
|
18
|
+
size: 'default'
|
|
19
|
+
});
|
|
16
20
|
const emptyStateVariants = tv({
|
|
17
21
|
slots: {
|
|
18
|
-
root: 'w-full
|
|
22
|
+
root: 'w-full items-center justify-center',
|
|
19
23
|
header: 'w-full max-w-sm items-center gap-1',
|
|
20
|
-
title: 'text-center
|
|
21
|
-
description: 'text-center text-
|
|
24
|
+
title: 'text-center font-semibold text-foreground',
|
|
25
|
+
description: 'text-center text-muted-foreground',
|
|
22
26
|
content: 'w-full max-w-sm items-center gap-3'
|
|
27
|
+
},
|
|
28
|
+
variants: {
|
|
29
|
+
variant: {
|
|
30
|
+
// Fills whatever space it is given — a whole screen, or a flex parent.
|
|
31
|
+
default: {
|
|
32
|
+
root: 'flex-1'
|
|
33
|
+
},
|
|
34
|
+
// A self-contained block that sits inside content rather than filling a
|
|
35
|
+
// screen: bordered, on the card fill, sized to its contents.
|
|
36
|
+
card: {
|
|
37
|
+
root: 'rounded-2xl border border-border bg-card'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
sm: {
|
|
42
|
+
root: 'gap-4 px-4 py-8',
|
|
43
|
+
title: 'text-base',
|
|
44
|
+
description: 'text-sm'
|
|
45
|
+
},
|
|
46
|
+
default: {
|
|
47
|
+
root: 'gap-6 px-6 py-12',
|
|
48
|
+
title: 'text-xl',
|
|
49
|
+
description: 'text-sm'
|
|
50
|
+
},
|
|
51
|
+
lg: {
|
|
52
|
+
root: 'gap-6 px-6 py-16',
|
|
53
|
+
title: 'text-2xl',
|
|
54
|
+
description: 'text-base'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
variant: 'default',
|
|
60
|
+
size: 'default'
|
|
23
61
|
}
|
|
24
62
|
});
|
|
25
63
|
const mediaVariants = tv({
|
|
26
64
|
slots: {
|
|
27
65
|
wrapper: 'items-center justify-center',
|
|
28
|
-
card: '
|
|
29
|
-
ghost: 'absolute
|
|
66
|
+
card: 'shrink-0 items-center justify-center',
|
|
67
|
+
ghost: 'absolute rounded-md border border-border bg-card'
|
|
30
68
|
},
|
|
31
69
|
variants: {
|
|
32
70
|
variant: {
|
|
@@ -37,25 +75,50 @@ const mediaVariants = tv({
|
|
|
37
75
|
icon: {
|
|
38
76
|
card: 'rounded-md border border-border bg-card'
|
|
39
77
|
}
|
|
78
|
+
},
|
|
79
|
+
size: {
|
|
80
|
+
sm: {
|
|
81
|
+
card: 'h-8 w-8',
|
|
82
|
+
ghost: 'h-8 w-8'
|
|
83
|
+
},
|
|
84
|
+
default: {
|
|
85
|
+
card: 'h-9 w-9',
|
|
86
|
+
ghost: 'h-9 w-9'
|
|
87
|
+
},
|
|
88
|
+
lg: {
|
|
89
|
+
card: 'h-11 w-11',
|
|
90
|
+
ghost: 'h-11 w-11'
|
|
91
|
+
}
|
|
40
92
|
}
|
|
41
93
|
},
|
|
42
94
|
defaultVariants: {
|
|
43
|
-
variant: 'default'
|
|
95
|
+
variant: 'default',
|
|
96
|
+
size: 'default'
|
|
44
97
|
}
|
|
45
98
|
});
|
|
46
99
|
const EmptyStateRoot = /*#__PURE__*/forwardRef(({
|
|
47
100
|
className,
|
|
101
|
+
variant,
|
|
102
|
+
size = 'default',
|
|
48
103
|
...props
|
|
49
104
|
}, ref) => {
|
|
50
105
|
const {
|
|
51
106
|
root
|
|
52
|
-
} = emptyStateVariants(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
107
|
+
} = emptyStateVariants({
|
|
108
|
+
variant,
|
|
109
|
+
size
|
|
110
|
+
});
|
|
111
|
+
return /*#__PURE__*/_jsx(EmptyStateContext.Provider, {
|
|
112
|
+
value: {
|
|
113
|
+
size
|
|
114
|
+
},
|
|
115
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
116
|
+
ref: ref,
|
|
117
|
+
className: root({
|
|
118
|
+
className
|
|
119
|
+
}),
|
|
120
|
+
...props
|
|
121
|
+
})
|
|
59
122
|
});
|
|
60
123
|
});
|
|
61
124
|
EmptyStateRoot.displayName = 'EmptyState';
|
|
@@ -87,12 +150,16 @@ const EmptyStateMedia = /*#__PURE__*/forwardRef(({
|
|
|
87
150
|
children,
|
|
88
151
|
...props
|
|
89
152
|
}, ref) => {
|
|
153
|
+
const {
|
|
154
|
+
size
|
|
155
|
+
} = useContext(EmptyStateContext);
|
|
90
156
|
const {
|
|
91
157
|
wrapper,
|
|
92
158
|
card,
|
|
93
159
|
ghost
|
|
94
160
|
} = mediaVariants({
|
|
95
|
-
variant
|
|
161
|
+
variant,
|
|
162
|
+
size
|
|
96
163
|
});
|
|
97
164
|
return /*#__PURE__*/_jsxs(View, {
|
|
98
165
|
ref: ref,
|
|
@@ -121,9 +188,14 @@ const EmptyStateTitle = /*#__PURE__*/forwardRef(({
|
|
|
121
188
|
className,
|
|
122
189
|
...props
|
|
123
190
|
}, ref) => {
|
|
191
|
+
const {
|
|
192
|
+
size
|
|
193
|
+
} = useContext(EmptyStateContext);
|
|
124
194
|
const {
|
|
125
195
|
title
|
|
126
|
-
} = emptyStateVariants(
|
|
196
|
+
} = emptyStateVariants({
|
|
197
|
+
size
|
|
198
|
+
});
|
|
127
199
|
return /*#__PURE__*/_jsx(Text, {
|
|
128
200
|
ref: ref,
|
|
129
201
|
className: title({
|
|
@@ -137,9 +209,14 @@ const EmptyStateDescription = /*#__PURE__*/forwardRef(({
|
|
|
137
209
|
className,
|
|
138
210
|
...props
|
|
139
211
|
}, ref) => {
|
|
212
|
+
const {
|
|
213
|
+
size
|
|
214
|
+
} = useContext(EmptyStateContext);
|
|
140
215
|
const {
|
|
141
216
|
description
|
|
142
|
-
} = emptyStateVariants(
|
|
217
|
+
} = emptyStateVariants({
|
|
218
|
+
size
|
|
219
|
+
});
|
|
143
220
|
return /*#__PURE__*/_jsx(Text, {
|
|
144
221
|
ref: ref,
|
|
145
222
|
className: description({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","View","tv","Text","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","emptyStateVariants","slots","root","header","title","description","content","
|
|
1
|
+
{"version":3,"names":["createContext","forwardRef","useContext","View","tv","Text","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","EmptyStateContext","size","emptyStateVariants","slots","root","header","title","description","content","variants","variant","default","card","sm","lg","defaultVariants","mediaVariants","wrapper","ghost","icon","EmptyStateRoot","className","props","ref","Provider","value","children","displayName","EmptyStateHeader","EmptyStateMedia","accessibilityElementsHidden","importantForAccessibility","EmptyStateTitle","EmptyStateDescription","EmptyStateContent","EmptyState","Object","assign","Header","Media","Title","Description","Content"],"sourceRoot":"../../../../src","sources":["components/empty-state/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,UAAU,EAAEC,UAAU,QAAwB,O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MAAEa;IAAU,CAAC,CAAE;IAAA,GAAKC;EAAK,CAAG,CAAC;AACzE,CACF,CAAC;AACDY,iBAAiB,CAACP,WAAW,GAAG,oBAAoB;AAEpD,OAAO,MAAMQ,UAAU,GAAGC,MAAM,CAACC,MAAM,CAACjB,cAAc,EAAE;EACtDkB,MAAM,EAAEV,gBAAgB;EACxBW,KAAK,EAAEV,eAAe;EACtBW,KAAK,EAAER,eAAe;EACtBS,WAAW,EAAER,qBAAqB;EAClCS,OAAO,EAAER;AACX,CAAC,CAAC","ignoreList":[]}
|
|
@@ -17,23 +17,57 @@
|
|
|
17
17
|
* </Frame.Header>
|
|
18
18
|
* <Frame.Panel>
|
|
19
19
|
* <Frame.Row>…</Frame.Row>
|
|
20
|
-
* <Frame.Row
|
|
20
|
+
* <Frame.Row>…</Frame.Row>
|
|
21
21
|
* </Frame.Panel>
|
|
22
22
|
* <Frame.Footer>Updated 2 minutes ago</Frame.Footer>
|
|
23
23
|
* </Frame>
|
|
24
24
|
* ```
|
|
25
|
+
*
|
|
26
|
+
* The panel draws the hairlines between its own rows. React Native has no
|
|
27
|
+
* `:first-child`, so the alternative is every caller writing
|
|
28
|
+
* `divided={index > 0}` on every row and getting it wrong once.
|
|
25
29
|
*/
|
|
26
|
-
import { forwardRef } from 'react';
|
|
27
|
-
import { View } from 'react-native';
|
|
30
|
+
import { Children, cloneElement, forwardRef, isValidElement } from 'react';
|
|
31
|
+
import { Pressable, View } from 'react-native';
|
|
32
|
+
import { tv } from 'tailwind-variants';
|
|
33
|
+
import { ChevronRightIcon } from "../../icons/index.js";
|
|
28
34
|
import { Text } from "../../primitives/text.js";
|
|
29
35
|
import { cn } from "../../utils/cn.js";
|
|
30
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
36
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
37
|
+
const frameVariants = tv({
|
|
38
|
+
slots: {
|
|
39
|
+
root: '',
|
|
40
|
+
panel: 'overflow-hidden rounded-xl border border-border bg-card'
|
|
41
|
+
},
|
|
42
|
+
variants: {
|
|
43
|
+
variant: {
|
|
44
|
+
default: {
|
|
45
|
+
root: 'rounded-2xl border border-border bg-surface p-1.5'
|
|
46
|
+
},
|
|
47
|
+
// No shell: the panel is the whole widget. For a Frame nested inside a
|
|
48
|
+
// card that already draws a border, where the shell's own edge sitting
|
|
49
|
+
// just inside it reads as a double line.
|
|
50
|
+
plain: {
|
|
51
|
+
root: '',
|
|
52
|
+
panel: 'rounded-2xl'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
variant: 'default'
|
|
58
|
+
}
|
|
59
|
+
});
|
|
31
60
|
const FrameRoot = /*#__PURE__*/forwardRef(({
|
|
32
61
|
className,
|
|
62
|
+
variant,
|
|
33
63
|
...props
|
|
34
64
|
}, ref) => /*#__PURE__*/_jsx(View, {
|
|
35
65
|
ref: ref,
|
|
36
|
-
className:
|
|
66
|
+
className: frameVariants({
|
|
67
|
+
variant
|
|
68
|
+
}).root({
|
|
69
|
+
className
|
|
70
|
+
}),
|
|
37
71
|
...props
|
|
38
72
|
}));
|
|
39
73
|
FrameRoot.displayName = 'Frame';
|
|
@@ -94,35 +128,113 @@ const FrameDescription = /*#__PURE__*/forwardRef(({
|
|
|
94
128
|
}));
|
|
95
129
|
FrameDescription.displayName = 'Frame.Description';
|
|
96
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Marks the parts that take part in the panel's own divider bookkeeping —
|
|
133
|
+
* a Row draws a line above itself, a Section draws one above its heading.
|
|
134
|
+
* Anything else the panel is given is left alone.
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Draws the hairline above every child but the first. An explicit `divided`
|
|
139
|
+
* on a child wins, so a row can still opt out or force one.
|
|
140
|
+
*/
|
|
141
|
+
function divideChildren(children) {
|
|
142
|
+
let seen = 0;
|
|
143
|
+
return Children.map(children, child => {
|
|
144
|
+
if (! /*#__PURE__*/isValidElement(child)) return child;
|
|
145
|
+
if (!DIVIDABLE.has(child.type)) return child;
|
|
146
|
+
const index = seen++;
|
|
147
|
+
if (child.props.divided !== undefined) return child;
|
|
148
|
+
return /*#__PURE__*/cloneElement(child, {
|
|
149
|
+
divided: index > 0
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
}
|
|
97
153
|
/**
|
|
98
154
|
* The inset card holding the frame's content — the raised surface sitting in
|
|
99
155
|
* from the shell's edges, with its own smaller radius.
|
|
100
156
|
*/
|
|
101
157
|
const FramePanel = /*#__PURE__*/forwardRef(({
|
|
102
158
|
className,
|
|
159
|
+
dividers = true,
|
|
160
|
+
children,
|
|
103
161
|
...props
|
|
104
162
|
}, ref) => /*#__PURE__*/_jsx(View, {
|
|
105
163
|
ref: ref,
|
|
106
|
-
className:
|
|
107
|
-
|
|
164
|
+
className: frameVariants().panel({
|
|
165
|
+
className
|
|
166
|
+
}),
|
|
167
|
+
...props,
|
|
168
|
+
children: dividers ? divideChildren(children) : children
|
|
108
169
|
}));
|
|
109
170
|
FramePanel.displayName = 'Frame.Panel';
|
|
110
|
-
|
|
111
171
|
/**
|
|
112
|
-
* A row inside a Frame.Panel.
|
|
113
|
-
*
|
|
172
|
+
* A row inside a Frame.Panel. Give it an `onPress` and it becomes a real
|
|
173
|
+
* pressable — press feedback, a button role — rather than a View with a
|
|
174
|
+
* handler bolted on.
|
|
114
175
|
*/
|
|
115
|
-
|
|
116
176
|
const FrameRow = /*#__PURE__*/forwardRef(({
|
|
117
177
|
className,
|
|
118
178
|
divided,
|
|
179
|
+
chevron,
|
|
180
|
+
children,
|
|
181
|
+
onPress,
|
|
119
182
|
...props
|
|
120
|
-
}, ref) =>
|
|
121
|
-
|
|
122
|
-
|
|
183
|
+
}, ref) => {
|
|
184
|
+
const classes = cn('flex-row items-center gap-3 px-4 py-3.5', divided && 'border-t border-border', onPress && 'active:bg-muted', className);
|
|
185
|
+
const body = /*#__PURE__*/_jsxs(_Fragment, {
|
|
186
|
+
children: [children, chevron ? /*#__PURE__*/_jsx(ChevronRightIcon, {
|
|
187
|
+
size: 16
|
|
188
|
+
}) : null]
|
|
189
|
+
});
|
|
190
|
+
if (!onPress) {
|
|
191
|
+
return /*#__PURE__*/_jsx(View, {
|
|
192
|
+
ref: ref,
|
|
193
|
+
className: classes,
|
|
194
|
+
...props,
|
|
195
|
+
children: body
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
199
|
+
ref: ref,
|
|
200
|
+
accessibilityRole: "button",
|
|
201
|
+
onPress: onPress,
|
|
202
|
+
className: classes,
|
|
203
|
+
...props,
|
|
204
|
+
children: body
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
FrameRow.displayName = 'Frame.Row';
|
|
208
|
+
/**
|
|
209
|
+
* A labelled cluster of rows inside a Panel, for a widget holding more than
|
|
210
|
+
* one group. It divides its own rows the way the panel does, so the two nest
|
|
211
|
+
* without either having to know about the other.
|
|
212
|
+
*/
|
|
213
|
+
const FrameSection = /*#__PURE__*/forwardRef(({
|
|
214
|
+
className,
|
|
215
|
+
title,
|
|
216
|
+
divided,
|
|
217
|
+
children,
|
|
123
218
|
...props
|
|
219
|
+
}, ref) => /*#__PURE__*/_jsxs(View, {
|
|
220
|
+
ref: ref,
|
|
221
|
+
className: cn(divided && 'border-t border-border', className),
|
|
222
|
+
...props,
|
|
223
|
+
children: [title ? /*#__PURE__*/_jsx(View, {
|
|
224
|
+
className: "bg-muted/40 px-4 pb-1.5 pt-2.5",
|
|
225
|
+
children: typeof title === 'string' ? /*#__PURE__*/_jsx(Text, {
|
|
226
|
+
size: "xs",
|
|
227
|
+
weight: "medium",
|
|
228
|
+
muted: true,
|
|
229
|
+
className: "uppercase tracking-wider",
|
|
230
|
+
children: title
|
|
231
|
+
}) : title
|
|
232
|
+
}) : null, divideChildren(children)]
|
|
124
233
|
}));
|
|
125
|
-
|
|
234
|
+
FrameSection.displayName = 'Frame.Section';
|
|
235
|
+
|
|
236
|
+
/** Parts the panel divides. Declared after them, since it holds references. */
|
|
237
|
+
const DIVIDABLE = new Set([FrameRow, FrameSection]);
|
|
126
238
|
/** Muted caption under the panel. Strings are wrapped for you. */
|
|
127
239
|
const FrameFooter = /*#__PURE__*/forwardRef(({
|
|
128
240
|
className,
|
|
@@ -145,6 +257,7 @@ export const Frame = Object.assign(FrameRoot, {
|
|
|
145
257
|
Action: FrameAction,
|
|
146
258
|
Description: FrameDescription,
|
|
147
259
|
Panel: FramePanel,
|
|
260
|
+
Section: FrameSection,
|
|
148
261
|
Row: FrameRow,
|
|
149
262
|
Footer: FrameFooter
|
|
150
263
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","View","Text","cn","jsx","_jsx","FrameRoot","className","props","ref","displayName","FrameHeader","FrameTitle","size","weight","FrameAction","children","muted","FrameDescription","FramePanel","FrameRow","
|
|
1
|
+
{"version":3,"names":["Children","cloneElement","forwardRef","isValidElement","Pressable","View","tv","ChevronRightIcon","Text","cn","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","frameVariants","slots","root","panel","variants","variant","default","plain","defaultVariants","FrameRoot","className","props","ref","displayName","FrameHeader","FrameTitle","size","weight","FrameAction","children","muted","FrameDescription","divideChildren","seen","map","child","DIVIDABLE","has","type","index","divided","undefined","FramePanel","dividers","FrameRow","chevron","onPress","classes","body","accessibilityRole","FrameSection","title","Set","FrameFooter","Frame","Object","assign","Header","Title","Action","Description","Panel","Section","Row","Footer"],"sourceRoot":"../../../../src","sources":["components/frame/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,UAAU,EAAEC,cAAc,QAAwB,OAAO;AAC1F,SACEC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AAAS,QAAA,EACvEsB;IAAK,CACF,CAAC,GAEPA;EACD,CACG,CAAC,GACL,IAAI,EACPnB,cAAc,CAACH,QAAQ,CAAC;AAAA,CACrB,CAEV,CAAC;AACDqB,YAAY,CAAC3B,WAAW,GAAG,eAAe;;AAE1C;AACA,MAAMa,SAAS,GAAG,IAAIgB,GAAG,CAAU,CAACR,QAAQ,EAAEM,YAAY,CAAC,CAAC;AAM5D;AACA,MAAMG,WAAW,gBAAGzD,UAAU,CAC5B,CAAC;EAAEwB,SAAS;EAAES,QAAQ;EAAE,GAAGR;AAAM,CAAC,EAAEC,GAAG,kBACrCjB,IAAA,CAACN,IAAI;EACHuB,GAAG,EAAEA,GAAI;EACTF,SAAS,EAAEjB,EAAE,CAAC,gDAAgD,EAAEiB,SAAS,CAAE;EAAA,GACvEC,KAAK;EAAAQ,QAAA,EAER,OAAOA,QAAQ,KAAK,QAAQ,gBAC3BxB,IAAA,CAACH,IAAI;IAACwB,IAAI,EAAC,IAAI;IAACI,KAAK;IAAAD,QAAA,EAClBA;EAAQ,CACL,CAAC,GAEPA;AACD,CACG,CAEV,CAAC;AACDwB,WAAW,CAAC9B,WAAW,GAAG,cAAc;AAExC,OAAO,MAAM+B,KAAK,GAAGC,MAAM,CAACC,MAAM,CAACrC,SAAS,EAAE;EAC5CsC,MAAM,EAAEjC,WAAW;EACnBkC,KAAK,EAAEjC,UAAU;EACjBkC,MAAM,EAAE/B,WAAW;EACnBgC,WAAW,EAAE7B,gBAAgB;EAC7B8B,KAAK,EAAEnB,UAAU;EACjBoB,OAAO,EAAEZ,YAAY;EACrBa,GAAG,EAAEnB,QAAQ;EACboB,MAAM,EAAEX;AACV,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,29 +1,72 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Input — a text field with a label, a description and an error line.
|
|
5
|
+
*
|
|
6
|
+
* The field's focus state is animated rather than switched. A border that
|
|
7
|
+
* snaps between two colours reads as a redraw; one that crosses over in
|
|
8
|
+
* 150ms reads as the field responding to you. The interpolation runs on the
|
|
9
|
+
* UI thread, so it costs nothing and keeps up with a fast tab through a form.
|
|
10
|
+
*
|
|
11
|
+
* Two backgrounds, because a field's job changes with what surrounds it:
|
|
12
|
+
* `outline` sits on the page and draws its own edge; `filled` sits inside a
|
|
13
|
+
* card or a sheet, where a second border next to the container's own reads as
|
|
14
|
+
* a seam.
|
|
15
|
+
*
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Input label="Email" placeholder="you@example.com" />
|
|
18
|
+
* <Input variant="filled" size="lg" label="Name" isRequired />
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* For a field with an icon or a button attached, reach for `InputGroup` — it
|
|
22
|
+
* measures its decorators and pads this field around them.
|
|
23
|
+
*/
|
|
24
|
+
import { forwardRef, useCallback, useEffect, useState } from 'react';
|
|
4
25
|
import { TextInput, View } from 'react-native';
|
|
26
|
+
import Animated, { interpolateColor, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
5
27
|
import { tv } from 'tailwind-variants';
|
|
6
28
|
import { useCSSVariable } from 'uniwind';
|
|
7
29
|
import { KeyboardAvoider } from "../../primitives/keyboard-avoider.js";
|
|
8
30
|
import { Text } from "../../primitives/text.js";
|
|
31
|
+
import { Label } from "../label/index.js";
|
|
32
|
+
|
|
33
|
+
/** Long enough to read as a transition, short enough not to lag a fast tab. */
|
|
9
34
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
35
|
+
const FOCUS_DURATION = 150;
|
|
10
36
|
const inputVariants = tv({
|
|
11
37
|
slots: {
|
|
12
38
|
container: 'w-full gap-1.5',
|
|
13
|
-
field: '
|
|
14
|
-
label: 'text-sm font-medium text-foreground',
|
|
39
|
+
field: 'w-full rounded-lg border text-foreground',
|
|
15
40
|
description: 'text-sm text-muted-foreground',
|
|
16
41
|
error: 'text-sm text-destructive'
|
|
17
42
|
},
|
|
18
43
|
variants: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
44
|
+
variant: {
|
|
45
|
+
// The border colour is animated, so it is deliberately not set here —
|
|
46
|
+
// only the background and the resting border width belong to the class.
|
|
47
|
+
outline: {
|
|
48
|
+
field: 'bg-background'
|
|
49
|
+
},
|
|
50
|
+
filled: {
|
|
51
|
+
field: 'bg-muted'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
size: {
|
|
55
|
+
sm: {
|
|
56
|
+
field: 'h-10 px-3 text-sm'
|
|
57
|
+
},
|
|
58
|
+
md: {
|
|
59
|
+
field: 'h-12 px-3.5 text-base'
|
|
60
|
+
},
|
|
61
|
+
lg: {
|
|
62
|
+
field: 'h-14 px-4 text-base'
|
|
22
63
|
}
|
|
23
64
|
},
|
|
24
|
-
|
|
65
|
+
multiline: {
|
|
66
|
+
// A multiline field grows, so a fixed height would crop it. Text starts
|
|
67
|
+
// at the top rather than floating in the middle of an empty box.
|
|
25
68
|
true: {
|
|
26
|
-
field: '
|
|
69
|
+
field: 'h-auto min-h-24 py-3'
|
|
27
70
|
}
|
|
28
71
|
},
|
|
29
72
|
disabled: {
|
|
@@ -31,28 +74,63 @@ const inputVariants = tv({
|
|
|
31
74
|
field: 'opacity-[0.64]'
|
|
32
75
|
}
|
|
33
76
|
}
|
|
77
|
+
},
|
|
78
|
+
defaultVariants: {
|
|
79
|
+
variant: 'outline',
|
|
80
|
+
size: 'md'
|
|
34
81
|
}
|
|
35
82
|
});
|
|
83
|
+
const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
|
|
36
84
|
export const Input = /*#__PURE__*/forwardRef(({
|
|
37
85
|
className,
|
|
38
86
|
containerClassName,
|
|
39
87
|
label,
|
|
40
88
|
description,
|
|
41
89
|
errorMessage,
|
|
90
|
+
isRequired,
|
|
42
91
|
disabled,
|
|
92
|
+
variant,
|
|
93
|
+
size,
|
|
43
94
|
avoidKeyboard = false,
|
|
44
95
|
keyboardOffset = 16,
|
|
45
96
|
onFocus,
|
|
46
97
|
onBlur,
|
|
98
|
+
style,
|
|
47
99
|
...props
|
|
48
100
|
}, ref) => {
|
|
49
101
|
const [focused, setFocused] = useState(false);
|
|
102
|
+
const invalid = !!errorMessage;
|
|
50
103
|
const placeholderColor = useCSSVariable('--color-muted-foreground');
|
|
104
|
+
const restColor = useCSSVariable('--color-input');
|
|
105
|
+
const focusColor = useCSSVariable('--color-ring');
|
|
106
|
+
const errorColor = useCSSVariable('--color-destructive');
|
|
51
107
|
const slots = inputVariants({
|
|
52
|
-
|
|
53
|
-
|
|
108
|
+
variant,
|
|
109
|
+
size,
|
|
110
|
+
multiline: !!props.multiline,
|
|
54
111
|
disabled: !!disabled
|
|
55
112
|
});
|
|
113
|
+
|
|
114
|
+
/*
|
|
115
|
+
* Border colour is driven by one 0..1 value rather than by a class per
|
|
116
|
+
* state. Uniwind can only swap a class wholesale, which is the snap this
|
|
117
|
+
* is here to avoid, and a shared value crosses between the two colours on
|
|
118
|
+
* the UI thread without a re-render.
|
|
119
|
+
*/
|
|
120
|
+
const focus = useSharedValue(0);
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
focus.value = withTiming(focused ? 1 : 0, {
|
|
123
|
+
duration: FOCUS_DURATION
|
|
124
|
+
});
|
|
125
|
+
}, [focused, focus]);
|
|
126
|
+
const resting = typeof restColor === 'string' ? restColor : '#e5e5e5';
|
|
127
|
+
const active = invalid ? typeof errorColor === 'string' ? errorColor : '#ef4444' : typeof focusColor === 'string' ? focusColor : '#a3a3a3';
|
|
128
|
+
// An invalid field is tinted even at rest — the error is a fact about the
|
|
129
|
+
// value, not about whether the field happens to be focused.
|
|
130
|
+
const idle = invalid ? active : resting;
|
|
131
|
+
const borderStyle = useAnimatedStyle(() => ({
|
|
132
|
+
borderColor: interpolateColor(focus.value, [0, 1], [idle, active])
|
|
133
|
+
}));
|
|
56
134
|
const handleFocus = useCallback(event => {
|
|
57
135
|
setFocused(true);
|
|
58
136
|
onFocus?.(event);
|
|
@@ -62,10 +140,12 @@ export const Input = /*#__PURE__*/forwardRef(({
|
|
|
62
140
|
onBlur?.(event);
|
|
63
141
|
}, [onBlur]);
|
|
64
142
|
const body = /*#__PURE__*/_jsxs(_Fragment, {
|
|
65
|
-
children: [label ? /*#__PURE__*/_jsx(
|
|
66
|
-
|
|
143
|
+
children: [label ? /*#__PURE__*/_jsx(Label, {
|
|
144
|
+
isRequired: isRequired,
|
|
145
|
+
isInvalid: invalid,
|
|
146
|
+
isDisabled: !!disabled,
|
|
67
147
|
children: label
|
|
68
|
-
}) : null, /*#__PURE__*/_jsx(
|
|
148
|
+
}) : null, /*#__PURE__*/_jsx(AnimatedTextInput, {
|
|
69
149
|
ref: ref,
|
|
70
150
|
editable: !disabled,
|
|
71
151
|
onFocus: handleFocus,
|
|
@@ -74,9 +154,15 @@ export const Input = /*#__PURE__*/forwardRef(({
|
|
|
74
154
|
accessibilityState: {
|
|
75
155
|
disabled: !!disabled
|
|
76
156
|
},
|
|
157
|
+
"aria-required": isRequired,
|
|
158
|
+
"aria-invalid": invalid,
|
|
77
159
|
className: slots.field({
|
|
78
160
|
className
|
|
79
|
-
})
|
|
161
|
+
})
|
|
162
|
+
// Caller styles come last so InputGroup can pad the field around its
|
|
163
|
+
// decorators, but never last enough to drop the animated border.
|
|
164
|
+
,
|
|
165
|
+
style: [borderStyle, style],
|
|
80
166
|
placeholderTextColor: typeof placeholderColor === 'string' ? placeholderColor : undefined,
|
|
81
167
|
...props
|
|
82
168
|
}), errorMessage ? /*#__PURE__*/_jsx(Text, {
|
|
@@ -100,7 +186,13 @@ export const Input = /*#__PURE__*/forwardRef(({
|
|
|
100
186
|
* that to every other screen.
|
|
101
187
|
*/
|
|
102
188
|
if (avoidKeyboard) {
|
|
103
|
-
return /*#__PURE__*/_jsx(KeyboardAvoider
|
|
189
|
+
return /*#__PURE__*/_jsx(KeyboardAvoider
|
|
190
|
+
// Only while *this* field is the one being typed into. Without it
|
|
191
|
+
// every avoiding field on the screen lifts the moment any field
|
|
192
|
+
// anywhere is tapped, and since they all aim at the same gap above
|
|
193
|
+
// the keyboard, they arrive stacked on top of one another.
|
|
194
|
+
, {
|
|
195
|
+
active: focused,
|
|
104
196
|
offset: keyboardOffset,
|
|
105
197
|
className: containerClasses,
|
|
106
198
|
children: body
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","useCallback","useState","TextInput","View","tv","useCSSVariable","KeyboardAvoider","Text","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","inputVariants","slots","container","field","
|
|
1
|
+
{"version":3,"names":["forwardRef","useCallback","useEffect","useState","TextInput","View","Animated","interpolateColor","useAnimatedStyle","useSharedValue","withTiming","tv","useCSSVariable","KeyboardAvoider","Text","Label","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FOCUS_DURATION","inputVariants","slots","container","field","description","error","variants","variant","outline","filled","size","sm","md","lg","multiline","true","disabled","defaultVariants","AnimatedTextInput","createAnimatedComponent","Input","className","containerClassName","label","errorMessage","isRequired","avoidKeyboard","keyboardOffset","onFocus","onBlur","style","props","ref","focused","setFocused","invalid","placeholderColor","restColor","focusColor","errorColor","focus","value","duration","resting","active","idle","borderStyle","borderColor","handleFocus","event","handleBlur","body","children","isInvalid","isDisabled","editable","accessibilityLabel","accessibilityState","placeholderTextColor","undefined","containerClasses","offset","displayName"],"sourceRoot":"../../../../src","sources":["components/input/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACpE,SAASC,SAAS,EAAEC,IAAI,QAA6B,cAAc;AACnE,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAChC,SAASC,EA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