@mapples/ui 1.1.0 → 1.1.2
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 +0 -32
- package/dist/components/form/FormView/FormView.d.ts +16 -9
- package/dist/components/form/FormView/FormView.d.ts.map +1 -1
- package/dist/components/form/FormView/FormView.js +11 -8
- package/dist/components/form/FormView/FormView.js.map +1 -1
- package/dist/components/form/FormView/schematics.d.ts +8 -0
- package/dist/components/form/FormView/schematics.d.ts.map +1 -1
- package/dist/components/form/FormView/schematics.js +8 -0
- package/dist/components/form/FormView/schematics.js.map +1 -1
- package/dist/components/form/SubmitButton/schematics.d.ts +2 -2
- package/dist/components/form/SubmitButton/schematics.js +2 -2
- package/dist/components/form/TextField/TextField.d.ts +21 -17
- package/dist/components/form/TextField/TextField.d.ts.map +1 -1
- package/dist/components/form/TextField/TextField.js +13 -18
- package/dist/components/form/TextField/TextField.js.map +1 -1
- package/dist/components/form/TextField/schematics.d.ts +8 -0
- package/dist/components/form/TextField/schematics.d.ts.map +1 -1
- package/dist/components/form/TextField/schematics.js +8 -0
- package/dist/components/form/TextField/schematics.js.map +1 -1
- package/dist/components/form/schematics.d.ts +9 -0
- package/dist/components/form/schematics.d.ts.map +1 -1
- package/dist/components/form/schematics.js +9 -0
- package/dist/components/form/schematics.js.map +1 -1
- package/dist/components/inputs/IconButton/MockIcon.d.ts.map +1 -1
- package/dist/components/inputs/IconButton/MockIcon.js +8 -0
- package/dist/components/inputs/IconButton/MockIcon.js.map +1 -1
- package/dist/components/inputs/IconButton/schematics.d.ts +8 -0
- package/dist/components/inputs/IconButton/schematics.d.ts.map +1 -1
- package/dist/components/inputs/IconButton/schematics.js +8 -0
- package/dist/components/inputs/IconButton/schematics.js.map +1 -1
- package/dist/components/inputs/Pressable/Pressable.d.ts +26 -0
- package/dist/components/inputs/Pressable/Pressable.d.ts.map +1 -1
- package/dist/components/inputs/Pressable/Pressable.js +18 -0
- package/dist/components/inputs/Pressable/Pressable.js.map +1 -1
- package/dist/components/inputs/Pressable/schematics.d.ts +8 -0
- package/dist/components/inputs/Pressable/schematics.d.ts.map +1 -1
- package/dist/components/inputs/Pressable/schematics.js +8 -0
- package/dist/components/inputs/Pressable/schematics.js.map +1 -1
- package/dist/components/inputs/Select/Select.d.ts +30 -0
- package/dist/components/inputs/Select/Select.d.ts.map +1 -1
- package/dist/components/inputs/Select/Select.js +19 -0
- package/dist/components/inputs/Select/Select.js.map +1 -1
- package/dist/components/inputs/Select/SelectItem.d.ts +23 -0
- package/dist/components/inputs/Select/SelectItem.d.ts.map +1 -1
- package/dist/components/inputs/Select/SelectItem.js +16 -0
- package/dist/components/inputs/Select/SelectItem.js.map +1 -1
- package/dist/components/inputs/Select/schematics.d.ts +8 -0
- package/dist/components/inputs/Select/schematics.d.ts.map +1 -1
- package/dist/components/inputs/Select/schematics.js +8 -0
- package/dist/components/inputs/Select/schematics.js.map +1 -1
- package/dist/components/inputs/TextInput/schematics.d.ts +8 -0
- package/dist/components/inputs/TextInput/schematics.d.ts.map +1 -1
- package/dist/components/inputs/TextInput/schematics.js +8 -0
- package/dist/components/inputs/TextInput/schematics.js.map +1 -1
- package/dist/components/inputs/schematics.d.ts +9 -0
- package/dist/components/inputs/schematics.d.ts.map +1 -1
- package/dist/components/inputs/schematics.js +9 -0
- package/dist/components/inputs/schematics.js.map +1 -1
- package/dist/components/media/BarCode/BarCode.d.ts.map +1 -1
- package/dist/components/media/BarCode/BarCode.js +0 -8
- package/dist/components/media/BarCode/BarCode.js.map +1 -1
- package/dist/components/media/BarCode/schematics.d.ts +8 -0
- package/dist/components/media/BarCode/schematics.d.ts.map +1 -1
- package/dist/components/media/BarCode/schematics.js +8 -0
- package/dist/components/media/BarCode/schematics.js.map +1 -1
- package/dist/components/media/Icon/Icon.d.ts +34 -0
- package/dist/components/media/Icon/Icon.d.ts.map +1 -1
- package/dist/components/media/Icon/Icon.js +23 -0
- package/dist/components/media/Icon/Icon.js.map +1 -1
- package/dist/components/media/Icon/MockIcon.d.ts.map +1 -1
- package/dist/components/media/Icon/MockIcon.js +9 -0
- package/dist/components/media/Icon/MockIcon.js.map +1 -1
- package/dist/components/media/Icon/schematics.d.ts +8 -0
- package/dist/components/media/Icon/schematics.d.ts.map +1 -1
- package/dist/components/media/Icon/schematics.js +8 -0
- package/dist/components/media/Icon/schematics.js.map +1 -1
- package/dist/components/media/Image/Image.d.ts +2 -0
- package/dist/components/media/Image/Image.d.ts.map +1 -1
- package/dist/components/media/Image/Image.js.map +1 -1
- package/dist/components/media/Image/schematics.d.ts +8 -0
- package/dist/components/media/Image/schematics.d.ts.map +1 -1
- package/dist/components/media/Image/schematics.js +8 -0
- package/dist/components/media/Image/schematics.js.map +1 -1
- package/dist/components/media/QRCode/schematics.d.ts +8 -0
- package/dist/components/media/QRCode/schematics.d.ts.map +1 -1
- package/dist/components/media/QRCode/schematics.js +8 -0
- package/dist/components/media/QRCode/schematics.js.map +1 -1
- package/dist/components/media/Svg/Svg.d.ts.map +1 -1
- package/dist/components/media/Svg/Svg.js +1 -1
- package/dist/components/media/Svg/Svg.js.map +1 -1
- package/dist/components/media/Svg/schematics.d.ts +8 -0
- package/dist/components/media/Svg/schematics.d.ts.map +1 -1
- package/dist/components/media/Svg/schematics.js +8 -0
- package/dist/components/media/Svg/schematics.js.map +1 -1
- package/dist/components/media/Video/Video.d.ts +44 -0
- package/dist/components/media/Video/Video.d.ts.map +1 -1
- package/dist/components/media/Video/Video.js +25 -0
- package/dist/components/media/Video/Video.js.map +1 -1
- package/dist/components/media/Video/schematics.d.ts +8 -0
- package/dist/components/media/Video/schematics.d.ts.map +1 -1
- package/dist/components/media/Video/schematics.js +8 -0
- package/dist/components/media/Video/schematics.js.map +1 -1
- package/dist/components/media/schematics.d.ts +9 -0
- package/dist/components/media/schematics.d.ts.map +1 -1
- package/dist/components/media/schematics.js +9 -0
- package/dist/components/media/schematics.js.map +1 -1
- package/dist/components/typography/Text/Text.d.ts +14 -17
- package/dist/components/typography/Text/Text.d.ts.map +1 -1
- package/dist/components/typography/Text/Text.js +17 -18
- package/dist/components/typography/Text/Text.js.map +1 -1
- package/dist/components/typography/Text/schematics.d.ts +8 -0
- package/dist/components/typography/Text/schematics.d.ts.map +1 -1
- package/dist/components/typography/Text/schematics.js +8 -0
- package/dist/components/typography/Text/schematics.js.map +1 -1
- package/dist/components/typography/Typography/Typography.d.ts +27 -0
- package/dist/components/typography/Typography/Typography.d.ts.map +1 -1
- package/dist/components/typography/Typography/Typography.js +20 -0
- package/dist/components/typography/Typography/Typography.js.map +1 -1
- package/dist/components/typography/Typography/schematics.d.ts +8 -0
- package/dist/components/typography/Typography/schematics.d.ts.map +1 -1
- package/dist/components/typography/Typography/schematics.js +8 -0
- package/dist/components/typography/Typography/schematics.js.map +1 -1
- package/dist/components/typography/schematics.d.ts +9 -0
- package/dist/components/typography/schematics.d.ts.map +1 -1
- package/dist/components/typography/schematics.js +9 -0
- package/dist/components/typography/schematics.js.map +1 -1
- package/dist/components/views/FlatList/FlatList.d.ts +12 -0
- package/dist/components/views/FlatList/FlatList.d.ts.map +1 -1
- package/dist/components/views/FlatList/FlatList.js +24 -0
- package/dist/components/views/FlatList/FlatList.js.map +1 -1
- package/dist/components/views/FlatList/schematics.d.ts +20 -0
- package/dist/components/views/FlatList/schematics.d.ts.map +1 -1
- package/dist/components/views/FlatList/schematics.js +20 -0
- package/dist/components/views/FlatList/schematics.js.map +1 -1
- package/dist/components/views/GradientBackground/GradientBackground.d.ts +52 -0
- package/dist/components/views/GradientBackground/GradientBackground.d.ts.map +1 -0
- package/dist/components/views/GradientBackground/GradientBackground.js +41 -0
- package/dist/components/views/GradientBackground/GradientBackground.js.map +1 -0
- package/dist/components/views/GradientBackground/GradientLayer.d.ts +39 -0
- package/dist/components/views/GradientBackground/GradientLayer.d.ts.map +1 -0
- package/dist/components/views/GradientBackground/GradientLayer.js +51 -0
- package/dist/components/views/GradientBackground/GradientLayer.js.map +1 -0
- package/dist/components/views/GradientBackground/index.d.ts +7 -0
- package/dist/components/views/GradientBackground/index.d.ts.map +1 -0
- package/dist/components/views/GradientBackground/index.js +7 -0
- package/dist/components/views/GradientBackground/index.js.map +1 -0
- package/dist/components/views/GradientBackground/schematics.d.ts +13 -0
- package/dist/components/views/GradientBackground/schematics.d.ts.map +1 -0
- package/dist/components/views/GradientBackground/schematics.js +16 -0
- package/dist/components/views/GradientBackground/schematics.js.map +1 -0
- package/dist/components/views/ImageBackgroundView/ImageBackgroundView.d.ts +40 -0
- package/dist/components/views/ImageBackgroundView/ImageBackgroundView.d.ts.map +1 -1
- package/dist/components/views/ImageBackgroundView/ImageBackgroundView.js +24 -0
- package/dist/components/views/ImageBackgroundView/ImageBackgroundView.js.map +1 -1
- package/dist/components/views/ImageBackgroundView/schematics.d.ts +5 -0
- package/dist/components/views/ImageBackgroundView/schematics.d.ts.map +1 -1
- package/dist/components/views/ImageBackgroundView/schematics.js +5 -0
- package/dist/components/views/ImageBackgroundView/schematics.js.map +1 -1
- package/dist/components/views/SafeAreaView/SafeAreaView.d.ts +29 -0
- package/dist/components/views/SafeAreaView/SafeAreaView.d.ts.map +1 -1
- package/dist/components/views/SafeAreaView/SafeAreaView.js +24 -0
- package/dist/components/views/SafeAreaView/SafeAreaView.js.map +1 -1
- package/dist/components/views/SafeAreaView/schematics.d.ts +5 -0
- package/dist/components/views/SafeAreaView/schematics.d.ts.map +1 -1
- package/dist/components/views/SafeAreaView/schematics.js +5 -0
- package/dist/components/views/SafeAreaView/schematics.js.map +1 -1
- package/dist/components/views/ScrollView/schematics.d.ts +10 -0
- package/dist/components/views/ScrollView/schematics.d.ts.map +1 -1
- package/dist/components/views/ScrollView/schematics.js +10 -0
- package/dist/components/views/ScrollView/schematics.js.map +1 -1
- package/dist/components/views/View/View.d.ts +16 -1
- package/dist/components/views/View/View.d.ts.map +1 -1
- package/dist/components/views/View/View.js +5 -3
- package/dist/components/views/View/View.js.map +1 -1
- package/dist/components/views/View/schematics.d.ts +13 -0
- package/dist/components/views/View/schematics.d.ts.map +1 -1
- package/dist/components/views/View/schematics.js +13 -0
- package/dist/components/views/View/schematics.js.map +1 -1
- package/dist/components/views/index.d.ts +2 -0
- package/dist/components/views/index.d.ts.map +1 -1
- package/dist/components/views/index.js +2 -0
- package/dist/components/views/index.js.map +1 -1
- package/dist/components/views/schematics.d.ts +11 -0
- package/dist/components/views/schematics.d.ts.map +1 -1
- package/dist/components/views/schematics.js +11 -0
- package/dist/components/views/schematics.js.map +1 -1
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -51,14 +51,6 @@ Interactive input components:
|
|
|
51
51
|
- **IconButton**: Button with icon support
|
|
52
52
|
- **Pressable**: Enhanced pressable component with styling
|
|
53
53
|
|
|
54
|
-
### Form
|
|
55
|
-
|
|
56
|
-
Form building blocks that work with `@mapples/form`:
|
|
57
|
-
|
|
58
|
-
- **FormView**: Container that provides form context to children
|
|
59
|
-
- **TextField**: Text input bound to a form field
|
|
60
|
-
- **SubmitButton**: Button that triggers form submit and shows submitting state
|
|
61
|
-
|
|
62
54
|
### Media
|
|
63
55
|
|
|
64
56
|
Media display components:
|
|
@@ -180,30 +172,6 @@ function MyInput() {
|
|
|
180
172
|
}
|
|
181
173
|
```
|
|
182
174
|
|
|
183
|
-
### Form with FormView, TextField, SubmitButton
|
|
184
|
-
|
|
185
|
-
`FormView` wraps `Form` from `@mapples/form` and provides a styled container. Use `fieldName` on `TextField` to bind to form values; `SubmitButton` triggers submit and shows submitting state.
|
|
186
|
-
|
|
187
|
-
```tsx
|
|
188
|
-
import { FormView, TextField, SubmitButton } from '@mapples/ui';
|
|
189
|
-
|
|
190
|
-
function MyForm() {
|
|
191
|
-
return (
|
|
192
|
-
<FormView
|
|
193
|
-
initialValues={{ name: '', email: '' }}
|
|
194
|
-
onSubmit={(values) => console.log(values)}
|
|
195
|
-
styled={{ style: { padding: 16 } }}
|
|
196
|
-
>
|
|
197
|
-
<TextField fieldName="name" placeholder="Name" />
|
|
198
|
-
<TextField fieldName="email" placeholder="Email" />
|
|
199
|
-
<SubmitButton label="Submit" />
|
|
200
|
-
</FormView>
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
For Yup validation, use `Form` from `@mapples/form` as the outer wrapper and pass `validationSchema`; use `FormView` inside for layout and styling.
|
|
206
|
-
|
|
207
175
|
## Visual Editor Integration
|
|
208
176
|
|
|
209
177
|
The UI package includes comprehensive schematics for visual editor integration:
|
|
@@ -2,34 +2,39 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { WithStyledProps } from '@mapples/style';
|
|
3
3
|
import { ViewProps } from 'react-native';
|
|
4
4
|
/**
|
|
5
|
-
* Props for the
|
|
5
|
+
* Props for the FormView component.
|
|
6
6
|
*
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
9
|
export type FormViewProps = PropsWithChildren<WithStyledProps<ViewProps>> & {
|
|
10
|
+
/** Initial field values passed to the underlying form context. */
|
|
10
11
|
initialValues?: any;
|
|
12
|
+
/** Callback invoked with the form's collected values when the form is submitted. */
|
|
11
13
|
onSubmit?: (values: any) => void;
|
|
12
14
|
};
|
|
13
15
|
/**
|
|
14
|
-
* A
|
|
16
|
+
* A form container component that provides a shared form context to its children.
|
|
15
17
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
18
|
+
* Wraps React Native's View with the `@mapples/form` Form provider, enabling
|
|
19
|
+
* nested fields (such as {@link TextField}) and submit controls (such as
|
|
20
|
+
* {@link SubmitButton}) to participate in a single form lifecycle. Additional
|
|
21
|
+
* styling is applied via the `@mapples/style` styled-props system.
|
|
19
22
|
*
|
|
20
23
|
* @example
|
|
21
24
|
* ```tsx
|
|
22
25
|
* <FormView
|
|
26
|
+
* initialValues={{ email: '' }}
|
|
27
|
+
* onSubmit={(values) => console.log(values)}
|
|
23
28
|
* styled={{
|
|
24
29
|
* style: {
|
|
25
|
-
* backgroundColor: 'lightblue',
|
|
26
30
|
* padding: 16,
|
|
27
|
-
*
|
|
31
|
+
* gap: 12,
|
|
28
32
|
* }
|
|
29
33
|
* }}
|
|
30
34
|
* >
|
|
31
|
-
* <
|
|
32
|
-
*
|
|
35
|
+
* <TextField fieldName="email" placeholder="Email" />
|
|
36
|
+
* <SubmitButton label="Submit" />
|
|
37
|
+
* </FormView>
|
|
33
38
|
* ```
|
|
34
39
|
*
|
|
35
40
|
* @public
|
|
@@ -39,7 +44,9 @@ declare const FormView: import("react").ForwardRefExoticComponent<{
|
|
|
39
44
|
} & ViewProps & {
|
|
40
45
|
children?: import("react").ReactNode | undefined;
|
|
41
46
|
} & {
|
|
47
|
+
/** Initial field values passed to the underlying form context. */
|
|
42
48
|
initialValues?: any;
|
|
49
|
+
/** Callback invoked with the form's collected values when the form is submitted. */
|
|
43
50
|
onSubmit?: (values: any) => void;
|
|
44
51
|
} & import("react").RefAttributes<unknown>>;
|
|
45
52
|
export default FormView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormView.d.ts","sourceRoot":"","sources":["../../../../src/components/form/FormView/FormView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAc,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,GAAG;IAC1E,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"FormView.d.ts","sourceRoot":"","sources":["../../../../src/components/form/FormView/FormView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAc,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,GAAG;IAC1E,kEAAkE;IAClE,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,QAAQ;;;;;IAjCZ,kEAAkE;oBAClD,GAAG;IACnB,oFAAoF;eACzE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI;2CA8CjC,CAAC;AAGF,eAAe,QAAQ,CAAC"}
|
|
@@ -3,25 +3,28 @@ import { Form } from '@mapples/form';
|
|
|
3
3
|
import { StyledView } from '@mapples/style';
|
|
4
4
|
import { isObject } from 'lodash';
|
|
5
5
|
/**
|
|
6
|
-
* A
|
|
6
|
+
* A form container component that provides a shared form context to its children.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Wraps React Native's View with the `@mapples/form` Form provider, enabling
|
|
9
|
+
* nested fields (such as {@link TextField}) and submit controls (such as
|
|
10
|
+
* {@link SubmitButton}) to participate in a single form lifecycle. Additional
|
|
11
|
+
* styling is applied via the `@mapples/style` styled-props system.
|
|
11
12
|
*
|
|
12
13
|
* @example
|
|
13
14
|
* ```tsx
|
|
14
15
|
* <FormView
|
|
16
|
+
* initialValues={{ email: '' }}
|
|
17
|
+
* onSubmit={(values) => console.log(values)}
|
|
15
18
|
* styled={{
|
|
16
19
|
* style: {
|
|
17
|
-
* backgroundColor: 'lightblue',
|
|
18
20
|
* padding: 16,
|
|
19
|
-
*
|
|
21
|
+
* gap: 12,
|
|
20
22
|
* }
|
|
21
23
|
* }}
|
|
22
24
|
* >
|
|
23
|
-
* <
|
|
24
|
-
*
|
|
25
|
+
* <TextField fieldName="email" placeholder="Email" />
|
|
26
|
+
* <SubmitButton label="Submit" />
|
|
27
|
+
* </FormView>
|
|
25
28
|
* ```
|
|
26
29
|
*
|
|
27
30
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormView.js","sourceRoot":"","sources":["../../../../src/components/form/FormView/FormView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"FormView.js","sourceRoot":"","sources":["../../../../src/components/form/FormView/FormView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAelC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,QAAQ,GAAG,UAAU,CACzB,CACE,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAiB,EACtE,GAAG,EACH,EAAE;IACF,OAAO,CACL,CAAC,IAAI,CACH,aAAa,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAC5D,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAEnB;QAAA,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,CACrD;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,UAAU,CACd;MAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC;AAElC,eAAe,QAAQ,CAAC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { RegisteredComponent } from '@mapples/types';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic registration entry for the {@link FormView} component.
|
|
4
|
+
*
|
|
5
|
+
* Registers FormView under the `"FormView"` type key so that visual editors
|
|
6
|
+
* and the schematic system can identify and render it.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export declare const FormViewSchematic: RegisteredComponent;
|
|
3
11
|
//# sourceMappingURL=schematics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/form/FormView/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,eAAO,MAAM,iBAAiB,EAAE,mBAG/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/form/FormView/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,mBAG/B,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import FormView from './FormView';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic registration entry for the {@link FormView} component.
|
|
4
|
+
*
|
|
5
|
+
* Registers FormView under the `"FormView"` type key so that visual editors
|
|
6
|
+
* and the schematic system can identify and render it.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export const FormViewSchematic = {
|
|
3
11
|
type: 'FormView',
|
|
4
12
|
Component: FormView,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/form/FormView/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,CAAC,MAAM,iBAAiB,GAAwB;IACpD,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,QAAQ;CACpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/form/FormView/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAwB;IACpD,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,QAAQ;CACpB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RegisteredComponent } from '@mapples/types';
|
|
2
2
|
/**
|
|
3
|
-
* Schematic configuration for the
|
|
3
|
+
* Schematic configuration for the SubmitButton component.
|
|
4
4
|
*
|
|
5
|
-
* This configuration defines how the
|
|
5
|
+
* This configuration defines how the SubmitButton component appears in visual editors,
|
|
6
6
|
* including its properties, styling options, and default values.
|
|
7
7
|
*
|
|
8
8
|
* @public
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import SubmitButton from './SubmitButton';
|
|
2
2
|
/**
|
|
3
|
-
* Schematic configuration for the
|
|
3
|
+
* Schematic configuration for the SubmitButton component.
|
|
4
4
|
*
|
|
5
|
-
* This configuration defines how the
|
|
5
|
+
* This configuration defines how the SubmitButton component appears in visual editors,
|
|
6
6
|
* including its properties, styling options, and default values.
|
|
7
7
|
*
|
|
8
8
|
* @public
|
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
import { TextInputProps, TextInput } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the TextField component.
|
|
4
|
+
*
|
|
5
|
+
* Extends React Native's `TextInputProps`, omitting `onChangeText` because the
|
|
6
|
+
* component manages value changes internally via the form context.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export interface TextFieldProps extends Omit<TextInputProps, 'onChangeText'> {
|
|
11
|
+
/** The form field name used to read and write the value in the form context. */
|
|
3
12
|
fieldName?: string;
|
|
4
13
|
}
|
|
5
14
|
/**
|
|
6
|
-
* A
|
|
15
|
+
* A form-connected text input component.
|
|
7
16
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
17
|
+
* Reads and writes its value through the nearest {@link FormView} form context
|
|
18
|
+
* using `fieldName`. `onChangeText` is managed internally; do not pass it as a
|
|
19
|
+
* prop. All other standard `TextInputProps` (e.g. `placeholder`, `secureTextEntry`)
|
|
20
|
+
* are forwarded to the underlying `StyledTextInput`.
|
|
11
21
|
*
|
|
12
22
|
* @example
|
|
13
23
|
* ```tsx
|
|
14
|
-
* <
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* borderColor: 'gray',
|
|
22
|
-
* padding: 12,
|
|
23
|
-
* borderRadius: 8
|
|
24
|
-
* }
|
|
25
|
-
* }}
|
|
26
|
-
* />
|
|
24
|
+
* <FormView initialValues={{ username: '' }} onSubmit={console.log}>
|
|
25
|
+
* <TextField
|
|
26
|
+
* fieldName="username"
|
|
27
|
+
* placeholder="Enter your username"
|
|
28
|
+
* />
|
|
29
|
+
* <SubmitButton label="Submit" />
|
|
30
|
+
* </FormView>
|
|
27
31
|
* ```
|
|
28
32
|
*
|
|
29
33
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/form/TextField/TextField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/components/form/TextField/TextField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD;;;;;;;GAOG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC;IAC1E,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,SAAS;;6CAad,CAAC;AAGF,eAAe,SAAS,CAAC"}
|
|
@@ -2,33 +2,28 @@ import { forwardRef } from 'react';
|
|
|
2
2
|
import { useFormField } from '@mapples/form';
|
|
3
3
|
import { StyledTextInput } from '@mapples/style';
|
|
4
4
|
/**
|
|
5
|
-
* A
|
|
5
|
+
* A form-connected text input component.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Reads and writes its value through the nearest {@link FormView} form context
|
|
8
|
+
* using `fieldName`. `onChangeText` is managed internally; do not pass it as a
|
|
9
|
+
* prop. All other standard `TextInputProps` (e.g. `placeholder`, `secureTextEntry`)
|
|
10
|
+
* are forwarded to the underlying `StyledTextInput`.
|
|
10
11
|
*
|
|
11
12
|
* @example
|
|
12
13
|
* ```tsx
|
|
13
|
-
* <
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* borderColor: 'gray',
|
|
21
|
-
* padding: 12,
|
|
22
|
-
* borderRadius: 8
|
|
23
|
-
* }
|
|
24
|
-
* }}
|
|
25
|
-
* />
|
|
14
|
+
* <FormView initialValues={{ username: '' }} onSubmit={console.log}>
|
|
15
|
+
* <TextField
|
|
16
|
+
* fieldName="username"
|
|
17
|
+
* placeholder="Enter your username"
|
|
18
|
+
* />
|
|
19
|
+
* <SubmitButton label="Submit" />
|
|
20
|
+
* </FormView>
|
|
26
21
|
* ```
|
|
27
22
|
*
|
|
28
23
|
* @public
|
|
29
24
|
*/
|
|
30
25
|
const TextField = forwardRef(({ children, fieldName, ...props }, ref) => {
|
|
31
|
-
const { value, setValue } = useFormField(fieldName || 'unknown'
|
|
26
|
+
const { value, setValue } = useFormField(fieldName || 'unknown');
|
|
32
27
|
return (<StyledTextInput ref={ref} {...props} value={value || ''} onChangeText={setValue}/>);
|
|
33
28
|
});
|
|
34
29
|
TextField.displayName = 'TextField';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../../src/components/form/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../../src/components/form/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAgBjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,SAAS,GAAG,UAAU,CAC1B,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACzC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAS,SAAS,IAAI,SAAS,CAAC,CAAC;IAEzE,OAAO,CACL,CAAC,eAAe,CACd,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CACnB,YAAY,CAAC,CAAC,QAAQ,CAAC,EACvB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,eAAe,SAAS,CAAC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { RegisteredComponent } from '@mapples/types';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic registration entry for the {@link TextField} component.
|
|
4
|
+
*
|
|
5
|
+
* Registers TextField under the `"TextField"` type key so that visual editors
|
|
6
|
+
* and the schematic system can identify and render it.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export declare const TextFieldSchematics: RegisteredComponent;
|
|
3
11
|
//# sourceMappingURL=schematics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/form/TextField/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,eAAO,MAAM,mBAAmB,EAAE,mBAGjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/form/TextField/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAGjC,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import TextField from './TextField';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic registration entry for the {@link TextField} component.
|
|
4
|
+
*
|
|
5
|
+
* Registers TextField under the `"TextField"` type key so that visual editors
|
|
6
|
+
* and the schematic system can identify and render it.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export const TextFieldSchematics = {
|
|
3
11
|
type: 'TextField',
|
|
4
12
|
Component: TextField,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/form/TextField/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,MAAM,mBAAmB,GAAwB;IACtD,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,SAAS;CACrB,CAAC"}
|
|
1
|
+
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/form/TextField/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAwB;IACtD,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,SAAS;CACrB,CAAC"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { RegisteredComponents } from '@mapples/types';
|
|
2
|
+
/**
|
|
3
|
+
* Combined schematic registry for all form components.
|
|
4
|
+
*
|
|
5
|
+
* Aggregates {@link FormViewSchematic}, {@link TextFieldSchematics}, and
|
|
6
|
+
* {@link SubmitButtonSchematic} into a single `RegisteredComponents` map,
|
|
7
|
+
* keyed by each component's `type` string.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
2
11
|
export declare const FormSchematics: RegisteredComponents;
|
|
3
12
|
//# sourceMappingURL=schematics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../src/components/form/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtD,eAAO,MAAM,cAAc,EAAE,oBAI5B,CAAC"}
|
|
1
|
+
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../src/components/form/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,EAAE,oBAI5B,CAAC"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { FormViewSchematic } from './FormView';
|
|
2
2
|
import { SubmitButtonSchematic } from './SubmitButton';
|
|
3
3
|
import { TextFieldSchematics } from './TextField';
|
|
4
|
+
/**
|
|
5
|
+
* Combined schematic registry for all form components.
|
|
6
|
+
*
|
|
7
|
+
* Aggregates {@link FormViewSchematic}, {@link TextFieldSchematics}, and
|
|
8
|
+
* {@link SubmitButtonSchematic} into a single `RegisteredComponents` map,
|
|
9
|
+
* keyed by each component's `type` string.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
4
13
|
export const FormSchematics = {
|
|
5
14
|
[FormViewSchematic.type]: FormViewSchematic,
|
|
6
15
|
[TextFieldSchematics.type]: TextFieldSchematics,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../src/components/form/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,CAAC,MAAM,cAAc,GAAyB;IAClD,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,iBAAiB;IAC3C,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,mBAAmB;IAC/C,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,qBAAqB;CACpD,CAAC"}
|
|
1
|
+
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../src/components/form/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAyB;IAClD,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,iBAAiB;IAC3C,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,mBAAmB;IAC/C,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,qBAAqB;CACpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/MockIcon.tsx"],"names":[],"mappings":"AAGA,OAAY,EAAE,QAAQ,EAAQ,MAAM,kBAAkB,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"MockIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/MockIcon.tsx"],"names":[],"mappings":"AAGA,OAAY,EAAE,QAAQ,EAAQ,MAAM,kBAAkB,CAAC;;;;AAkBvD,wBAAgC"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { styled } from '@mapples/style';
|
|
2
2
|
import Svg, { Path } from 'react-native-svg';
|
|
3
|
+
/**
|
|
4
|
+
* Placeholder SVG icon rendered by `IconButton` when no `uri` prop is provided.
|
|
5
|
+
*
|
|
6
|
+
* Displays a generic image/landscape icon at the size and color forwarded from
|
|
7
|
+
* `IconButton`'s `styleSvg` prop.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
3
11
|
const MockIcon = (props) => {
|
|
4
12
|
return (<Svg {...props} viewBox="0 0 256 256">
|
|
5
13
|
<Path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16h64a8,8,0,0,0,7.59-5.47l14.83-44.48L163,151.43a8.07,8.07,0,0,0,4.46-4.46l14.62-36.55,44.48-14.83A8,8,0,0,0,232,88V56A16,16,0,0,0,216,40ZM112.41,157.47,98.23,200H40V172l52-52,30.42,30.42L117,152.57A8,8,0,0,0,112.41,157.47ZM216,82.23,173.47,96.41a8,8,0,0,0-4.9,4.62l-14.72,36.82L138.58,144l-35.27-35.27a16,16,0,0,0-22.62,0L40,149.37V56H216Zm12.68,33a8,8,0,0,0-7.21-1.1l-23.8,7.94a8,8,0,0,0-4.9,4.61l-14.31,35.77-35.77,14.31a8,8,0,0,0-4.61,4.9l-7.94,23.8A8,8,0,0,0,137.73,216H216a16,16,0,0,0,16-16V121.73A8,8,0,0,0,228.68,115.24ZM216,200H148.83l3.25-9.75,35.51-14.2a8.07,8.07,0,0,0,4.46-4.46l14.2-35.51,9.75-3.25Z"></Path>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockIcon.js","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/MockIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,GAAG,EAAE,EAAY,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,QAAQ,GAAiB,CAAC,KAAK,EAAE,EAAE;IACvC,OAAO,CACL,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,aAAa,CACnC;MAAA,CAAC,IAAI,CAAC,CAAC,CAAC,spBAAspB,CAAC,EAAE,IAAI,CACvqB;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC,QAAQ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"MockIcon.js","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/MockIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,GAAG,EAAE,EAAY,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,QAAQ,GAAiB,CAAC,KAAK,EAAE,EAAE;IACvC,OAAO,CACL,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,aAAa,CACnC;MAAA,CAAC,IAAI,CAAC,CAAC,CAAC,spBAAspB,CAAC,EAAE,IAAI,CACvqB;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { RegisteredComponent } from '@mapples/types';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic configuration for the IconButton component.
|
|
4
|
+
*
|
|
5
|
+
* This configuration defines how the IconButton component appears in visual editors,
|
|
6
|
+
* including its properties, styling options, and default values.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export declare const IconButtonSchematics: RegisteredComponent;
|
|
3
11
|
//# sourceMappingURL=schematics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,eAAO,MAAM,oBAAoB,EAAE,mBAGlC,CAAC"}
|
|
1
|
+
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,EAAE,mBAGlC,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import IconButton from './IconButton';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic configuration for the IconButton component.
|
|
4
|
+
*
|
|
5
|
+
* This configuration defines how the IconButton component appears in visual editors,
|
|
6
|
+
* including its properties, styling options, and default values.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export const IconButtonSchematics = {
|
|
3
11
|
type: 'IconButton',
|
|
4
12
|
Component: IconButton,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,oBAAoB,GAAwB;IACvD,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE,UAAU;CACtB,CAAC"}
|
|
1
|
+
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/inputs/IconButton/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAwB;IACvD,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE,UAAU;CACtB,CAAC"}
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
import { WithStyledProps } from '@mapples/style';
|
|
2
2
|
import { PressableProps as RNPressableProps, View } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Pressable component.
|
|
5
|
+
*
|
|
6
|
+
* Extends React Native's `PressableProps` with the `@mapples/style` styling
|
|
7
|
+
* system via `WithStyledProps`.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
3
11
|
export type PressableProps = WithStyledProps<RNPressableProps>;
|
|
12
|
+
/**
|
|
13
|
+
* A styled pressable container component.
|
|
14
|
+
*
|
|
15
|
+
* Wraps React Native's `Pressable` with the `@mapples/style` `StyledPressable`
|
|
16
|
+
* primitive, exposing the full `WithStyledProps` styling API.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Pressable
|
|
21
|
+
* onPress={() => console.log('pressed')}
|
|
22
|
+
* styled={{ style: { padding: 12, backgroundColor: 'blue' } }}
|
|
23
|
+
* >
|
|
24
|
+
* <Text>Press me</Text>
|
|
25
|
+
* </Pressable>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
4
30
|
declare const Pressable: import("react").ForwardRefExoticComponent<{
|
|
5
31
|
styled?: import("@mapples/style").StyledProps<Partial<RNPressableProps>> | undefined;
|
|
6
32
|
} & RNPressableProps & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/Pressable/Pressable.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAExE,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;AAE/D,QAAA,MAAM,SAAS;;;;wCAQd,CAAC;AAGF,eAAe,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/Pressable/Pressable.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC;AAE/D;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,SAAS;;;;wCAQd,CAAC;AAGF,eAAe,SAAS,CAAC"}
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import { StyledPressable } from '@mapples/style';
|
|
3
|
+
/**
|
|
4
|
+
* A styled pressable container component.
|
|
5
|
+
*
|
|
6
|
+
* Wraps React Native's `Pressable` with the `@mapples/style` `StyledPressable`
|
|
7
|
+
* primitive, exposing the full `WithStyledProps` styling API.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Pressable
|
|
12
|
+
* onPress={() => console.log('pressed')}
|
|
13
|
+
* styled={{ style: { padding: 12, backgroundColor: 'blue' } }}
|
|
14
|
+
* >
|
|
15
|
+
* <Text>Press me</Text>
|
|
16
|
+
* </Pressable>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
3
21
|
const Pressable = forwardRef(({ children, ...props }, ref) => {
|
|
4
22
|
return (<StyledPressable onPress={console.log} ref={ref} {...props}>
|
|
5
23
|
{children}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.js","sourceRoot":"","sources":["../../../../src/components/inputs/Pressable/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAmB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Pressable.js","sourceRoot":"","sources":["../../../../src/components/inputs/Pressable/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAmB,MAAM,gBAAgB,CAAC;AAalE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,SAAS,GAAG,UAAU,CAC1B,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC9B,OAAO,CACL,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CACzD;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CACF,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,eAAe,SAAS,CAAC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import { RegisteredComponent } from '@mapples/types';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic configuration for the Pressable component.
|
|
4
|
+
*
|
|
5
|
+
* This configuration defines how the Pressable component appears in visual editors,
|
|
6
|
+
* including its properties, styling options, and default values.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export declare const PressableSchematics: RegisteredComponent;
|
|
3
11
|
//# sourceMappingURL=schematics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/Pressable/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,eAAO,MAAM,mBAAmB,EAAE,mBAGjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"schematics.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/Pressable/schematics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAGjC,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import Pressable from './Pressable';
|
|
2
|
+
/**
|
|
3
|
+
* Schematic configuration for the Pressable component.
|
|
4
|
+
*
|
|
5
|
+
* This configuration defines how the Pressable component appears in visual editors,
|
|
6
|
+
* including its properties, styling options, and default values.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
2
10
|
export const PressableSchematics = {
|
|
3
11
|
type: 'Pressable',
|
|
4
12
|
Component: Pressable,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/inputs/Pressable/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,MAAM,mBAAmB,GAAwB;IACtD,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,SAAS;CACrB,CAAC"}
|
|
1
|
+
{"version":3,"file":"schematics.js","sourceRoot":"","sources":["../../../../src/components/inputs/Pressable/schematics.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAwB;IACtD,IAAI,EAAE,WAAW;IACjB,SAAS,EAAE,SAAS;CACrB,CAAC"}
|
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { WithStyledProps } from '@mapples/style';
|
|
3
3
|
import { ViewProps as RNViewProps } from 'react-native';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Select component.
|
|
6
|
+
*
|
|
7
|
+
* @typeParam T - The type of each item in the `data` array. Defaults to `string[]`.
|
|
8
|
+
*
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
4
11
|
export interface SelectProps<T = string[]> extends PropsWithChildren<WithStyledProps<RNViewProps>> {
|
|
12
|
+
/** Array of data items to render as selectable options. */
|
|
5
13
|
data?: T[];
|
|
14
|
+
/** Callback invoked when an item is selected. */
|
|
6
15
|
onSelect?: () => void;
|
|
16
|
+
/** Styling configuration for the container and individual items. */
|
|
7
17
|
styled?: WithStyledProps<RNViewProps> & {
|
|
18
|
+
/** Style applied to each `SelectItem` row. */
|
|
8
19
|
itemStyle?: WithStyledProps<RNViewProps>['style'];
|
|
9
20
|
};
|
|
10
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* A list component that renders each item in `data` as a pressable `SelectItem`.
|
|
24
|
+
*
|
|
25
|
+
* Each item is wrapped with a `StateProvider` so that child components can
|
|
26
|
+
* consume the item's value through the `@mapples/state` context.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <Select
|
|
31
|
+
* data={['Apple', 'Banana', 'Cherry']}
|
|
32
|
+
* onSelect={(item) => console.log('Selected:', item)}
|
|
33
|
+
* styled={{ style: { gap: 8 }, itemStyle: { padding: 12 } }}
|
|
34
|
+
* >
|
|
35
|
+
* <Text>{/* rendered inside each SelectItem via children *\/}</Text>
|
|
36
|
+
* </Select>
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
11
41
|
declare const Select: import("react").ForwardRefExoticComponent<SelectProps<string[]> & import("react").RefAttributes<unknown>>;
|
|
12
42
|
export default Select;
|
|
13
43
|
//# sourceMappingURL=Select.d.ts.map
|